mock方法

This commit is contained in:
2022-11-17 21:09:17 +08:00
parent eec0e5575f
commit 0a8e99c94c
4 changed files with 20 additions and 17 deletions

View File

@@ -8,6 +8,7 @@ Page({
* 页面的初始数据
*/
data: {
tapCheckHandle: undefined,
aIconList: ['check-rectangle', 'star-filled', 'notification', 'info-circle'],
taskList: [{'taskId':'1','title':'标题德外旗舰店1','note':'2022-11-11'},{'taskId':'2','title':'标题德外旗舰店2','note':'2022-11-11'}],
todayList: [{'taskId':'1','title':'标题德外旗舰店1','note':'2022-11-11'},{'taskId':'2','title':'标题德外旗舰店2','note':'2022-11-11'}],
@@ -122,37 +123,36 @@ Page({
this.setCurrentData(currentCur,categoryData);
},
handleAction(e) {
console.log('testade');
console.log(e.detail);
try{
ActionSheet.show({
this.data.tapCheckHandle = ActionSheet.show({
theme: ActionSheetTheme.List,
selector: '#t-action-sheet',
context: this,
items: [
{
label: '默认选项',
label: '详情xxx',
},
{
label: '自定义选项',
label: '截止日期xxx',
color: '#0052D9',
},
{
label: '失效选项',
disabled: true,
label: '配置提醒',
color: '#0052D9',
},
{
label: '警告选项',
label: '删除xxx',
color: '#e34d59',
},
],
});}catch (e){
console.log(e);
}
});
},
handleSelected(e) {
console.log(e.detail);
},
selectCancel() {
this.data.tapCheckHandle.close();
},
onLoad() {
let categoryData = [];
this.data.categoryMenu.forEach(index =>{

View File

@@ -40,7 +40,7 @@
</scroll>
</swiper-item>
</swiper>
<t-action-sheet id="t-action-sheet" bind:selected="handleSelected" />
<t-action-sheet id="t-action-sheet" bind:selected="handleSelected" bind:cancel="selectCancel"/>
<view>
<foot-tab iconList="{{aIconList}}"/>
</view>