12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import baseComponent from '../helpers/baseComponent'
- import classNames from '../helpers/classNames'
- baseComponent({
- properties: {
- prefixCls: {
- type: String,
- value: 'wux-divider',
- },
- position: {
- type: String,
- value: 'center',
- },
- dashed: {
- type: Boolean,
- value: false,
- },
- text: {
- type: String,
- value: '',
- },
- showText: {
- type: Boolean,
- value: true,
- },
- },
- computed: {
- classes() {
- const { prefixCls, dashed, showText, position } = this.data
- const wrap = classNames(prefixCls, {
- [`${prefixCls}--dashed`]: dashed,
- [`${prefixCls}--text`]: showText,
- [`${prefixCls}--text-${position}`]: showText && position,
- })
- const text = `${prefixCls}__text`
- return {
- wrap,
- text,
- }
- },
- },
- })
|