mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-04-19 11:20:02 +08:00
增加微信小程序版
This commit is contained in:
42
liferestartWX/utils/wux/divider/index.js
Normal file
42
liferestartWX/utils/wux/divider/index.js
Normal file
@@ -0,0 +1,42 @@
|
||||
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: ['prefixCls, dashed, showText, position', function(prefixCls, dashed, showText, position) {
|
||||
const wrap = classNames(prefixCls, {
|
||||
[`${prefixCls}--dashed`]: dashed,
|
||||
[`${prefixCls}--text`]: showText,
|
||||
[`${prefixCls}--text-${position}`]: showText && position,
|
||||
})
|
||||
const text = `${prefixCls}__text`
|
||||
|
||||
return {
|
||||
wrap,
|
||||
text,
|
||||
}
|
||||
}],
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user