34 lines
541 B
TypeScript
34 lines
541 B
TypeScript
type NavItem = {
|
|
title: string;
|
|
icon: string;
|
|
url: string;
|
|
};
|
|
|
|
interface OtherData {
|
|
navList: NavItem[];
|
|
}
|
|
|
|
Page({
|
|
data: <OtherData>{
|
|
navList: [
|
|
{
|
|
title: "备忘录",
|
|
icon: "task-checked",
|
|
url: "/pages/main/other/portfolio/index"
|
|
},
|
|
{
|
|
title: "专拍",
|
|
icon: "face-retouching",
|
|
url: "/pages/main/other/portfolio/index"
|
|
}
|
|
],
|
|
},
|
|
onNavTap(e: WechatMiniprogram.BaseEvent) {
|
|
const { url } = e.currentTarget.dataset as { url?: string };
|
|
if (!url) {
|
|
return;
|
|
}
|
|
wx.navigateTo({ url });
|
|
}
|
|
});
|