Commit 9cdfb2e20606df0071cc9aa7aacd76b8815053df

Authored by 梁灏
1 parent 07201151

fix #5135

examples/routers/divider.vue
@@ -25,6 +25,25 @@ @@ -25,6 +25,25 @@
25 iView is a set of UI components and widgets built on Vue.js. 25 iView is a set of UI components and widgets built on Vue.js.
26 </p> 26 </p>
27 27
  28 + <Divider dashed>iView Developer</Divider>
  29 + <p>
  30 + iView is a set of UI components and widgets built on Vue.js.
  31 + iView is a set of UI components and widgets built on Vue.js.
  32 + iView is a set of UI components and widgets built on Vue.js.
  33 + </p>
  34 + <Divider dashed orientation="left">iView Developer</Divider>
  35 + <p>
  36 + iView is a set of UI components and widgets built on Vue.js.
  37 + iView is a set of UI components and widgets built on Vue.js.
  38 + iView is a set of UI components and widgets built on Vue.js.
  39 + </p>
  40 + <Divider dashed orientation="right">iView Developer</Divider>
  41 + <p>
  42 + iView is a set of UI components and widgets built on Vue.js.
  43 + iView is a set of UI components and widgets built on Vue.js.
  44 + iView is a set of UI components and widgets built on Vue.js.
  45 + </p>
  46 +
28 <Divider dashed/> 47 <Divider dashed/>
29 48
30 <p> 49 <p>
@@ -60,6 +79,8 @@ @@ -60,6 +79,8 @@
60 <a href="#">Components</a> 79 <a href="#">Components</a>
61 <Divider type="vertical" /> 80 <Divider type="vertical" />
62 <a href="#">Divider</a> 81 <a href="#">Divider</a>
  82 + <Divider type="vertical" dashed />
  83 + <a href="#">ABCDE</a>
63 </div> 84 </div>
64 </Card> 85 </Card>
65 </i-col> 86 </i-col>
src/components/divider/divider.vue
@@ -42,6 +42,7 @@ @@ -42,6 +42,7 @@
42 `${prefixCls}`, 42 `${prefixCls}`,
43 `${prefixCls}-${this.type}`, 43 `${prefixCls}-${this.type}`,
44 { 44 {
  45 + [`${prefixCls}-with-text`]: this.hasSlot && this.orientation === 'center',
45 [`${prefixCls}-with-text-${this.orientation}`]: this.hasSlot, 46 [`${prefixCls}-with-text-${this.orientation}`]: this.hasSlot,
46 [`${prefixCls}-dashed`]: !!this.dashed 47 [`${prefixCls}-dashed`]: !!this.dashed
47 } 48 }
src/styles/components/divider.less
@@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
18 display: block; 18 display: block;
19 height: 1px; 19 height: 1px;
20 width: 100%; 20 width: 100%;
  21 + min-width: 100%;
21 margin: 24px 0; 22 margin: 24px 0;
22 clear: both; 23 clear: both;
23 } 24 }