UNPKG

wux-weapp

Version:

一套组件化、可复用、易扩展的微信小程序 UI 组件库

40 lines (37 loc) 946 B
import baseComponent from '../helpers/baseComponent' import classNames from '../helpers/libs/classNames' import styleToCssString from '../helpers/libs/styleToCssString' baseComponent({ properties: { prefixCls: { type: String, value: 'wux-wingblank', }, size: { type: String, value: 'default', }, bodyStyle: { type: [String, Object], value: '', observer(newVal) { this.setData({ extStyle: styleToCssString(newVal), }) }, }, }, data: { extStyle: '', }, computed: { classes: ['prefixCls, size', function(prefixCls, size) { const wrap = classNames(prefixCls, { [`${prefixCls}--${size}`]: size, }) return { wrap, } }], }, })