Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Tag): use correct event name #738

Merged
merged 2 commits into from
Aug 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ isComponent: true
| 名称 | 参数 | 描述 |
| ------ | -------------------- | -------------- |
| change | `(checked: boolean)` | 组件子元素 |
| click | - | 点击标签时触发 |
| close | - | 如果关闭按钮存在,点击关闭按钮时触发 |
LeeJim marked this conversation as resolved.
Show resolved Hide resolved
21 changes: 11 additions & 10 deletions src/tag/common/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@
@tag-medium-icon-size: @font-size * 1.4;
@tag-large-icon-size: @font-size * 1.8;

@tag-small-height: 22px;
@tag-medium-height: 24px;
@tag-large-height: 30px;
@tag-small-height: 44rpx;
@tag-medium-height: 48rpx;
@tag-large-height: 60rpx;

@border-radius-square: 4px;
@tag-border-size: 2rpx;

@border-radius-square: 8rpx;
@border-radius-round: 999px;
@border-radius-mark: @border-radius-round;

Expand All @@ -70,19 +72,18 @@
.@{prefix}-tag {
display: inline-flex;
align-items: center;
border: 2rpx solid transparent;
border: @tag-border-size solid transparent;
box-sizing: border-box;
border-radius: @border-radius-square;
font-size: @tag-medium-font-size;
user-select: none;
vertical-align: middle;

&__text {
word-wrap: normal;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
height: @tag-medium-height;
line-height: @tag-medium-height;
}

&__icon,
Expand All @@ -99,7 +100,7 @@
&.@{prefix}-tag--size {
&-small {
height: @tag-small-height;
line-height: @tag-small-height - 2px;
line-height: @tag-small-height;
padding: 0 @tag-small-padding;
font-size: @tag-small-font-size;

Expand All @@ -111,7 +112,7 @@

&-medium {
height: @tag-medium-height;
line-height: @tag-medium-height - 2px;
line-height: @tag-medium-height;
padding: 0 @tag-medium-padding;
font-size: @tag-medium-font-size;

Expand All @@ -123,7 +124,7 @@

&-large {
height: @tag-large-height;
line-height: @tag-large-height - 2px;
line-height: @tag-large-height;
padding: 0 @tag-large-padding;
font-size: @tag-large-font-size;

Expand Down
2 changes: 1 addition & 1 deletion src/tag/tag.wxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<view class="{{className}} {{prefix}}-class" style="{{tagStyle}}" bind:tap="handleChange">
<view class="{{className}} {{prefix}}-class" style="{{tagStyle}}" bind:tap="handleClick">
<view class="{{classPrefix}}__icon">
<t-icon wx:if="{{icon}}" name="{{icon}}" t-class="{{prefix}}-icon" />
<slot wx:else name="icon" />
Expand Down