wux-button 样式扩展 增加shape属性
1、原来的写法
和界面图
如下
<wux-button block type="orange">拍照确认</wux-button>
2、现在的写法只需要增加一个shape="round"
参数,可以实现按钮边框为半圆
<wux-button block type="orange" shape="round">拍照确认</wux-button>
3、改造方法button/index.js
增加
shape: {
type: String,
value: 'rect',
}
button/index.wxml
增加
{{ shape ? 'wux-button--' + shape : '' }}
button/index.wxss
增加
.wux-button--round {
border-radius: 84rpx;
}
搞定