diff --git a/examples/routers/divider.vue b/examples/routers/divider.vue index c874fc42..03f43cd4 100644 --- a/examples/routers/divider.vue +++ b/examples/routers/divider.vue @@ -17,7 +17,7 @@ iView is a set of UI components and widgets built on Vue.js.
-iView is a set of UI components and widgets built on Vue.js. @@ -31,7 +31,7 @@ iView is a set of UI components and widgets built on Vue.js. iView is a set of UI components and widgets built on Vue.js.
-iView is a set of UI components and widgets built on Vue.js. iView is a set of UI components and widgets built on Vue.js. diff --git a/src/components/divider/divider.vue b/src/components/divider/divider.vue index 22d0990a..10fa1f62 100644 --- a/src/components/divider/divider.vue +++ b/src/components/divider/divider.vue @@ -31,6 +31,12 @@ dashed: { type: Boolean, default: false, + }, + size: { + validator (value) { + return oneOf(value, ['small', 'default']); + }, + default: 'default' } }, computed: { @@ -41,6 +47,7 @@ return [ `${prefixCls}`, `${prefixCls}-${this.type}`, + `${prefixCls}-${this.size}`, { [`${prefixCls}-with-text`]: this.hasSlot && this.orientation === 'center', [`${prefixCls}-with-text-${this.orientation}`]: this.hasSlot, diff --git a/src/styles/components/divider.less b/src/styles/components/divider.less index 3c5a7c7f..be5e5cac 100644 --- a/src/styles/components/divider.less +++ b/src/styles/components/divider.less @@ -45,9 +45,15 @@ } } + &-horizontal&-small&-with-text-center, + &-horizontal&-small&-with-text-left, + &-horizontal&-small&-with-text-right{ + font-size: @font-size-base; + margin: 8px 0; + } + &-horizontal&-with-text-left, &-horizontal&-with-text-right { - font-size: @font-size-base; .@{divider-prefix-cls}-inner-text { display: inline-block; padding: 0 10px;