first add files

This commit is contained in:
2025-08-15 14:05:08 +08:00
parent c58f74bcc0
commit b6216570d9
2451 changed files with 29056 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
Component({
data: {
value: '',
resultList: [],
},
methods: {
onChangeValue(e) {
const { value } = e.detail;
const list = [
'tdesign-vue',
'tdesign-react',
'tdesign-miniprogram',
'tdesign-angular',
'tdesign-mobile-vue',
'tdesign-mobile-react',
];
this.setData({
resultList: value ? list.filter((v) => v.includes(value)) : [],
});
},
},
});

View File

@@ -0,0 +1,5 @@
{
"usingComponents": {
"t-search": "tdesign-miniprogram/search/search"
}
}

View File

@@ -0,0 +1,7 @@
<view class="example-search">
<t-search placeholder="搜索预设文案" />
</view>
<view class="example-search">
<t-search placeholder="输入tdesign有预览结果" resultList="{{resultList}}" bind:change="onChangeValue" />
</view>

View File

@@ -0,0 +1,8 @@
.example-search {
background-color: var(--bg-color-demo);
padding: 16rpx 32rpx;
}
.example-search:not(:last-child) {
margin-bottom: 32rpx;
}