From f308dcac80f46abadccdf8da16e408a214c3dc3f Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Tue, 5 Mar 2019 09:18:44 +0800 Subject: [PATCH] fixed #4415 --- examples/routers/divider.vue | 4 ++-- src/components/divider/divider.vue | 7 +++++++ src/styles/components/divider.less | 8 +++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/examples/routers/divider.vue b/examples/routers/divider.vue index c874fc4..03f43cd 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 + iView

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 Developer + iView Developer

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 22d0990..10fa1f6 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 3c5a7c7..be5e5ca 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; -- libgit2 0.21.4