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(Icon): update demo #2498

Merged
merged 2 commits into from
Dec 15, 2023
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
1 change: 1 addition & 0 deletions example/pages/home/home.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</view>
<view class="footer">
<view class="show_privacy" bindtap="showPrivacyWin">《TDesign组件库服务声明》</view>
<t-footer text="该小程序仅演示示例,不收集个人信息。"></t-footer>
<t-footer text="Copyright © 1998 - {{currentYear}} Tencent. All Rights Reserved. 腾讯公司 版权所有"></t-footer>
</view>
<trd-privacy id="trdPrivacy" name="TDesign组件库" date="2023年11月14日" winStyle="{{winStyle}}"></trd-privacy>
8 changes: 2 additions & 6 deletions src/icon/_example/base/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ Component({
methods: {
onIconTap(event) {
const { name, type } = event.currentTarget.dataset;
if (type === 'prefix') {
return;
}
wx.setClipboardData({
data: name,
});
if (type === 'prefix') return;
wx.showToast({ title: name, icon: 'none', duration: 1000 });
},
},
});
8 changes: 2 additions & 6 deletions src/icon/_example/custom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ Component({
methods: {
onIconTap(event) {
const { name, type } = event.currentTarget.dataset;
if (type === 'prefix') {
return;
}
wx.setClipboardData({
data: name,
});
if (type === 'prefix') return;
wx.showToast({ title: name, icon: 'none', duration: 1000 });
},
},
});
8 changes: 2 additions & 6 deletions src/icon/_example/iconImage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ Component({
methods: {
onIconTap(event) {
const { name, type } = event.currentTarget.dataset;
if (type === 'prefix') {
return;
}
wx.setClipboardData({
data: name,
});
if (type === 'prefix') return;
wx.showToast({ title: name, icon: 'none', duration: 1000 });
},
},
});