From 2bae54e9fef3f9bd30d0182196d5ae9f9fcfc9a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=A2=81=E7=81=8F?=
Date: Thu, 14 Jan 2021 16:27:52 +0800
Subject: [PATCH] Divier add plain prop
---
examples/routers/divider.vue | 4 +++-
src/components/divider/divider.vue | 10 ++++++++--
src/styles/components/divider.less | 7 ++++++-
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/examples/routers/divider.vue b/examples/routers/divider.vue
index 03f43cd4..6986563f 100644
--- a/examples/routers/divider.vue
+++ b/examples/routers/divider.vue
@@ -67,7 +67,9 @@
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
+ iView
+ iView
diff --git a/src/components/divider/divider.vue b/src/components/divider/divider.vue
index 10fa1f62..2a5d9153 100644
--- a/src/components/divider/divider.vue
+++ b/src/components/divider/divider.vue
@@ -37,6 +37,11 @@
return oneOf(value, ['small', 'default']);
},
default: 'default'
+ },
+ // 4.5.0
+ plain: {
+ type: Boolean,
+ default: false
}
},
computed: {
@@ -51,7 +56,8 @@
{
[`${prefixCls}-with-text`]: this.hasSlot && this.orientation === 'center',
[`${prefixCls}-with-text-${this.orientation}`]: this.hasSlot,
- [`${prefixCls}-dashed`]: !!this.dashed
+ [`${prefixCls}-dashed`]: !!this.dashed,
+ [`${prefixCls}-plain`]: this.plain
}
];
},
@@ -62,4 +68,4 @@
}
}
};
-
\ No newline at end of file
+
diff --git a/src/styles/components/divider.less b/src/styles/components/divider.less
index be5e5cac..1650f97b 100644
--- a/src/styles/components/divider.less
+++ b/src/styles/components/divider.less
@@ -100,4 +100,9 @@
border-style: dashed none none;
}
}
-}
\ No newline at end of file
+ &-plain&-with-text, &-plain&-with-text-left, &-plain&-with-text-right {
+ color: @text-color;
+ font-weight: normal;
+ font-size: @font-size-base;
+ }
+}