-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
282 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Component({ | ||
data: { | ||
items: [ | ||
{ | ||
name: '选中', | ||
checked: true, | ||
}, | ||
{ | ||
name: '未选中', | ||
checked: false, | ||
}, | ||
{ | ||
name: '不可选', | ||
checked: false, | ||
disabled: true, | ||
}, | ||
], | ||
}, | ||
|
||
methods: { | ||
handleCheckTagChange(e) { | ||
console.log(e.detail.checked); | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"component": true, | ||
"usingComponents": { | ||
"t-tag": "tdesign-miniprogram/tag/tag", | ||
"t-check-tag": "tdesign-miniprogram/tag/check-tag" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<view class="group margin"> | ||
<t-check-tag | ||
class="margin-right" | ||
wx:for="{{items}}" | ||
wx:for-index="index" | ||
wx:key="index" | ||
checked="{{item.checked}}" | ||
disabled="{{item.disabled}}" | ||
data-index="{{index}}" | ||
bind:change="handleCheckTagChange" | ||
>{{item.name}}</t-check-tag | ||
> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.group { | ||
padding: 32rpx; | ||
background-color: #fff; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.margin { | ||
margin: 16rpx 0; | ||
} | ||
|
||
.margin-right { | ||
margin-right: 32rpx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Component({ | ||
data: { | ||
show: [true, true], | ||
}, | ||
|
||
methods: { | ||
handleClose0() { | ||
this.setData({ | ||
[`show[0]`]: false, | ||
}); | ||
}, | ||
handleClose1() { | ||
this.setData({ | ||
[`show[1]`]: false, | ||
}); | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"component": true, | ||
"usingComponents": { | ||
"t-tag": "tdesign-miniprogram/tag/tag" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<view class="group margin"> | ||
<t-tag class="margin-right" wx:if="{{show[0]}}" bind:close="handleClose0" closable theme="primary">标签</t-tag> | ||
<t-tag wx:if="{{show[1]}}" icon="app" bind:close="handleClose1" closable theme="primary">标签</t-tag> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.group { | ||
padding: 32rpx; | ||
background-color: #fff; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.margin { | ||
margin: 16rpx 0; | ||
} | ||
|
||
.margin-right { | ||
margin-right: 32rpx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Component({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"component": true, | ||
"usingComponents": { | ||
"t-tag": "tdesign-miniprogram/tag/tag" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<view class="group margin"> | ||
<t-tag max-width="{{130}}" title="超长省略文本标签超长省略文本标签">超长省略文本标签超长省略文本标签</t-tag> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.group { | ||
padding: 32rpx; | ||
background-color: #fff; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.margin { | ||
margin: 16rpx 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Component({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"component": true, | ||
"usingComponents": { | ||
"t-tag": "tdesign-miniprogram/tag/tag" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<view class="group margin"> | ||
<t-tag theme="primary"> | ||
标签 | ||
<t-icon name="app" size="14px" slot="icon" /> | ||
</t-tag> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.group { | ||
padding: 32rpx; | ||
background-color: #fff; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.margin { | ||
margin: 16rpx 0; | ||
} | ||
|
||
.margin-right { | ||
margin-right: 32rpx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Component({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"component": true, | ||
"usingComponents": { | ||
"t-tag": "tdesign-miniprogram/tag/tag" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<view class="group margin"> | ||
<t-tag class="margin-right" theme="primary" shape="round">圆弧</t-tag> | ||
<t-tag theme="primary" shape="mark">半圆弧</t-tag> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.group { | ||
padding: 32rpx; | ||
background-color: #fff; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.margin { | ||
margin: 16rpx 0; | ||
} | ||
|
||
.margin-right { | ||
margin-right: 32rpx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Component({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"component": true, | ||
"usingComponents": { | ||
"t-tag": "tdesign-miniprogram/tag/tag", | ||
"t-check-tag": "tdesign-miniprogram/tag/check-tag" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<view class="group padding-bottom d-flex"> | ||
<t-tag class="margin-right" size="large" theme="primary">展示标签30</t-tag> | ||
<t-tag size="medium" theme="primary">展示标签24</t-tag> | ||
</view> | ||
<view class="group d-flex"> | ||
<t-check-tag class="margin-right" size="large">点击标签30</t-check-tag> | ||
<t-check-tag size="medium">点击标签24</t-check-tag> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.group { | ||
padding: 32rpx; | ||
background-color: #fff; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.d-flex { | ||
display: flex; | ||
align-items: flex-start; | ||
} | ||
|
||
.padding-bottom { | ||
padding: 32rpx 32rpx 0; | ||
} | ||
|
||
.margin-right { | ||
margin-right: 32rpx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
{ | ||
"navigationBarTitleText": "Tag" | ||
"navigationBarTitleText": "Tag", | ||
"usingComponents": { | ||
"theme": "./theme", | ||
"ellipsis": "./ellipsis", | ||
"size": "./size", | ||
"iconDemo": "./iconDemo", | ||
"shape": "./shape", | ||
"closable": "./closable", | ||
"checkable": "./checkable" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +0,0 @@ | ||
.group { | ||
padding: 32rpx; | ||
background-color: #fff; | ||
display: flex; | ||
align-items: center; | ||
|
||
&.d-flex { | ||
display: flex; | ||
align-items: flex-start; | ||
} | ||
|
||
&.padding-bottom { | ||
padding: 32rpx 32rpx 0; | ||
} | ||
|
||
&.margin { | ||
margin: 16rpx 0; | ||
} | ||
|
||
.t-tag { | ||
margin-right: 32rpx; | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1 @@ | ||
Page({ | ||
data: { | ||
show: [true, true], | ||
items: [ | ||
{ | ||
name: '选中', | ||
checked: true, | ||
}, | ||
{ | ||
name: '未选中', | ||
checked: false, | ||
}, | ||
{ | ||
name: '不可选', | ||
checked: false, | ||
disabled: true, | ||
}, | ||
], | ||
}, | ||
handleCheckTagChange(e) { | ||
console.log(e.detail.checked); | ||
}, | ||
handleClose0() { | ||
this.setData({ | ||
[`show[0]`]: false, | ||
}); | ||
}, | ||
handleClose1() { | ||
this.setData({ | ||
[`show[1]`]: false, | ||
}); | ||
}, | ||
}); | ||
Page({}); |
Oops, something went wrong.