This commit is contained in:
2026-04-22 18:54:52 +08:00
commit bc8986e3b2
49 changed files with 20987 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
Component({
options: {
multipleSlots: true
},
properties: {
text: {
type: String,
value: ''
},
theme: {
type: String,
value: 'primary'
},
variant: {
type: String,
value: 'base'
},
size: {
type: String,
value: 'medium'
},
block: {
type: Boolean,
value: false
},
disabled: {
type: Boolean,
value: false
},
loading: {
type: Boolean,
value: false
},
shape: {
type: String,
value: 'rectangle'
}
},
methods: {
handleTap(event) {
this.triggerEvent('tap', event.detail)
}
}
})

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"t-button": "tdesign-miniprogram/button/button"
}
}

View File

@@ -0,0 +1,14 @@
<t-button
class="app-button"
theme="{{theme}}"
variant="{{variant}}"
size="{{size}}"
block="{{block}}"
disabled="{{disabled}}"
loading="{{loading}}"
shape="{{shape}}"
bind:tap="handleTap"
>
<block wx:if="{{text}}">{{text}}</block>
<slot></slot>
</t-button>

View File

@@ -0,0 +1,7 @@
:host {
display: block;
}
.app-button {
width: 100%;
}