feat:完成颜色选择器和button组件
This commit is contained in:
@@ -8,16 +8,12 @@ Component({
|
||||
properties: {
|
||||
type: {
|
||||
type: String,
|
||||
value: 'default', // default, green, white
|
||||
value: 'default', // primary, green, white
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
value: 'normal', // large, normal, small, mini
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
value: '', // 图标名称
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
value: false, // 是否禁用
|
||||
@@ -30,6 +26,52 @@ Component({
|
||||
type: Boolean,
|
||||
value: false, // 是否加载中
|
||||
},
|
||||
style: {
|
||||
type: String,
|
||||
value: '', // 自定义样式
|
||||
},
|
||||
// className: {
|
||||
// type: String,
|
||||
// value: '', // 自定义类名
|
||||
// },
|
||||
width: {
|
||||
type: String,
|
||||
value: '', // 按钮宽度
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
value: '',
|
||||
},
|
||||
loadingType: {
|
||||
type: String,
|
||||
value: 'circular',
|
||||
},
|
||||
loadingSize: {
|
||||
type: String,
|
||||
value: '20px',
|
||||
},
|
||||
loadingColor: {
|
||||
type: String,
|
||||
value: '#ffffff',
|
||||
},
|
||||
|
||||
// icon
|
||||
icon: {
|
||||
type: String,
|
||||
value: '',
|
||||
},
|
||||
iconClassPrefix: {
|
||||
type: String,
|
||||
value: 'j-icon',
|
||||
},
|
||||
iconSize: {
|
||||
type: String,
|
||||
value: '44rpx',
|
||||
},
|
||||
iconColor: {
|
||||
type: String,
|
||||
value: '#ffffff',
|
||||
},
|
||||
},
|
||||
/**
|
||||
* 组件的初始数据
|
||||
@@ -41,5 +83,9 @@ Component({
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {},
|
||||
methods: {
|
||||
onClick(e: WechatMiniprogram.TouchEvent): void {
|
||||
this.triggerEvent('click', e);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user