add editor
This commit is contained in:
@ -1,12 +1,19 @@
|
||||
// pages/main/journal-search/index.ts
|
||||
import Events from "../../../utils/Events";
|
||||
|
||||
Page({
|
||||
onLoad() {
|
||||
Events.reset("JOURNAL_LIST_REFRESH", () => {
|
||||
const listRef = this.selectComponent('#listRef');
|
||||
if (listRef) {
|
||||
listRef.reSearch();
|
||||
}
|
||||
});
|
||||
},
|
||||
onNavigateItem(e: WechatMiniprogram.CustomEvent) {
|
||||
const { id } = e.detail;
|
||||
// TODO: 跳转到编辑页面或详情页
|
||||
wx.showToast({
|
||||
title: `编辑功能待开发 (ID: ${id})`,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
wx.navigateTo({
|
||||
url: `/pages/main/journal-editor/index?id=${id}`
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
|
||||
<view class="content">
|
||||
<journal-list
|
||||
id="listRef"
|
||||
searchable="{{true}}"
|
||||
mode="navigate"
|
||||
type="NORMAL"
|
||||
|
||||
Reference in New Issue
Block a user