add editor

This commit is contained in:
Timi
2025-12-09 18:02:23 +08:00
parent 6dc4d71718
commit 19b6206695
13 changed files with 898 additions and 22 deletions

View File

@ -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}`
});
}
});

View File

@ -4,6 +4,7 @@
<view class="content">
<journal-list
id="listRef"
searchable="{{true}}"
mode="navigate"
type="NORMAL"