feat: 接入小程序品牌组件基础层
This commit is contained in:
1 parent
8fd399f4c2
commit
1a9dc426f6
27 files changed
+158
-9
No files matched your search
@@ -0,0 +1,15 @@
|
||||
Component({
|
||||
options: { addGlobalClass: true },
|
||||
properties: {
|
||||
theme: { type: String, value: "primary" },
|
||||
size: { type: String, value: "large" },
|
||||
disabled: Boolean,
|
||||
loading: Boolean,
|
||||
block: { type: Boolean, value: true },
|
||||
},
|
||||
methods: {
|
||||
handleTap(event) {
|
||||
if (!this.data.disabled && !this.data.loading) this.triggerEvent("tap", event.detail);
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-button": "tdesign-miniprogram/button/button"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<t-button theme="{{theme}}" size="{{size}}" block="{{block}}" disabled="{{disabled}}" loading="{{loading}}" bind:tap="handleTap"><slot /></t-button>
|
||||
@@ -0,0 +1,8 @@
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
t-button {
|
||||
--td-button-primary-bg-color: var(--brand-color-primary);
|
||||
--td-button-primary-active-bg-color: var(--brand-color-primary-dark);
|
||||
--td-button-radius: var(--brand-radius-control);
|
||||
}
|
||||
Reference in new issue
Block a user