diff --git a/packages/divider/index.ts b/packages/divider/index.ts index df1e2d65..7055aa5d 100644 --- a/packages/divider/index.ts +++ b/packages/divider/index.ts @@ -2,33 +2,12 @@ import { VantComponent } from '../common/component'; VantComponent({ props: { - dashed: { - type: Boolean, - value: false, - }, - hairline: { - type: Boolean, - value: false, - }, - contentPosition: { - type: String, - value: '', - }, - fontSize: { - type: Number, - value: '', - }, - borderColor: { - type: String, - value: '', - }, - textColor: { - type: String, - value: '', - }, - customStyle: { - type: String, - value: '', - }, + dashed: Boolean, + hairline: Boolean, + contentPosition: String, + fontSize: String, + borderColor: String, + textColor: String, + customStyle: String, }, }); diff --git a/packages/divider/index.wxml b/packages/divider/index.wxml index 412e73f2..f6a5a457 100644 --- a/packages/divider/index.wxml +++ b/packages/divider/index.wxml @@ -1,8 +1,9 @@ + diff --git a/packages/divider/index.wxs b/packages/divider/index.wxs new file mode 100644 index 00000000..215b14f4 --- /dev/null +++ b/packages/divider/index.wxs @@ -0,0 +1,18 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function rootStyle(data) { + return style([ + { + 'border-color': data.borderColor, + color: data.textColor, + 'font-size': addUnit(data.fontSize), + }, + data.customStyle, + ]); +} + +module.exports = { + rootStyle: rootStyle, +};