feat:完成颜色选择器和button组件

This commit is contained in:
2025-06-10 17:32:08 +08:00
parent 13a0afe97e
commit efa213bfe1
14 changed files with 515 additions and 17 deletions
+52 -6
View File
@@ -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);
},
},
});