Commit 145997df801f3e7c3a286655249f4563b0d3204e
1 parent
b1fcdaeb
Exists in
master
and in
3 other branches
feat: 支持组件库全局配置默认size
Showing
3 changed files
with
5 additions
and
1 deletions
Show diff stats
examples/main.js
examples/views/docs/component/filter.md
packages/index.js
| ... | ... | @@ -14,6 +14,9 @@ const install = function(Vue, opts = {}) { |
| 14 | 14 | // 配置组件名称 |
| 15 | 15 | const name = prefix + component.name; |
| 16 | 16 | component.name = name; |
| 17 | + if (component.props && component.props.size && component.props.size.default && opts.size) { | |
| 18 | + component.props.size.default = opts.size; | |
| 19 | + } | |
| 17 | 20 | if (component.computed) { |
| 18 | 21 | component.computed.zAlias = () => opts.alias || {}; |
| 19 | 22 | component.computed.zHttp = () => opts.http; | ... | ... |