You've already forked SmartisanNote.Remake
"优化:编辑器图标实现方式并更新mock数据"
This commit is contained in:
@@ -81,92 +81,22 @@ export const useAppStore = defineStore('app', {
|
||||
async loadMockData() {
|
||||
// Mock notes - 使用固定的日期值以避免每次运行时变化
|
||||
const fixedCurrentDate = '2025-10-12T10:00:00.000Z';
|
||||
const fixedYesterday = '2025-10-11T10:00:00.000Z';
|
||||
const fixedTwoDaysAgo = '2025-10-10T10:00:00.000Z';
|
||||
const fixedThreeDaysAgo = '2025-10-09T10:00:00.000Z';
|
||||
const fixedFourDaysAgo = '2025-10-08T10:00:00.000Z';
|
||||
const fixedFiveDaysAgo = '2025-10-07T10:00:00.000Z';
|
||||
|
||||
// 预设的便签示例数据
|
||||
// 预设的便签示例数据 - 仅保留一条关于应用功能介绍和示例的便签
|
||||
const mockNotes = [
|
||||
{
|
||||
id: '1',
|
||||
title: '欢迎使用锤子便签',
|
||||
content: '这是一个功能强大的便签应用,您可以在这里记录您的想法、待办事项等。',
|
||||
content: '<p>这是一个功能强大的便签应用,您可以在这里记录您的想法、待办事项等。</p><br><h2>功能介绍</h2><p>1. 创建和编辑便签<br>2. 为便签加星和置顶<br>3. 将便签分类到文件夹<br>4. 搜索便签内容<br>5. 回收站功能</p><br><h2>编辑器功能演示</h2><br><h2>标题格式</h2><p>点击标题按钮可创建居中的标题</p><br><h2>待办事项</h2><div class="todo-container"><div class="todo-icon"></div><div contenteditable="true" class="todo-content">这是一个待办事项</div></div><div class="todo-container"><div class="todo-icon completed"></div><div contenteditable="true" class="todo-content" style="color: var(--text-tertiary); text-decoration: line-through;">这是一个已完成的待办事项</div></div><br><h2>列表格式</h2><ul><li>无序列表项1</li><li>无序列表项2</li></ul><br><h2>文本格式</h2><p><strong>加粗文本</strong></p><br><h2>引用格式</h2><div class="quote-container"><div class="quote-icon"></div><div class="quote-content">这是一段引用文本<br>可以用来引用他人的话语</div></div><br><h2>图片</h2><p>点击图片按钮可以插入图片,长按图片可以拖拽排序</p>',
|
||||
createdAt: fixedCurrentDate,
|
||||
updatedAt: fixedCurrentDate,
|
||||
folderId: null,
|
||||
isStarred: true, // 加星便签
|
||||
isTop: true, // 置顶便签
|
||||
hasImage: false, // 不包含图片
|
||||
isDeleted: false, // 未删除
|
||||
deletedAt: null,
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
title: '待办事项',
|
||||
content: '1. 完成项目报告\n2. 购买 groceries\n3. 预约医生\n4. 给朋友打电话',
|
||||
createdAt: fixedYesterday,
|
||||
updatedAt: fixedYesterday,
|
||||
folderId: null,
|
||||
isStarred: true, // 加星便签
|
||||
isTop: false, // 非置顶
|
||||
hasImage: true, // 包含图片
|
||||
isDeleted: false, // 未删除
|
||||
deletedAt: null,
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
title: '购物清单',
|
||||
content: '苹果\n牛奶\n面包\n鸡蛋\n西红柿\n咖啡',
|
||||
createdAt: fixedTwoDaysAgo,
|
||||
updatedAt: fixedTwoDaysAgo,
|
||||
folderId: null,
|
||||
isStarred: false, // 非加星
|
||||
isTop: false, // 非置顶
|
||||
hasImage: false, // 不包含图片
|
||||
isDeleted: false, // 未删除
|
||||
deletedAt: null,
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
title: '项目想法',
|
||||
content: '1. 实现云同步功能\n2. 添加深色模式\n3. 支持Markdown语法\n4. 添加标签功能',
|
||||
createdAt: fixedThreeDaysAgo,
|
||||
updatedAt: fixedThreeDaysAgo,
|
||||
folderId: null,
|
||||
isStarred: false, // 非加星
|
||||
isTop: false, // 非置顶
|
||||
hasImage: false, // 不包含图片
|
||||
isDeleted: false, // 未删除
|
||||
deletedAt: null,
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
title: '读书笔记',
|
||||
content: '《Vue.js实战》\n- 组件化思想是Vue的核心\n- 理解响应式原理很重要\n- Pinia是Vue 3的推荐状态管理库',
|
||||
createdAt: fixedFourDaysAgo,
|
||||
updatedAt: fixedFourDaysAgo,
|
||||
folderId: null,
|
||||
isStarred: false, // 非加星
|
||||
isTop: false, // 非置顶
|
||||
hasImage: false, // 不包含图片
|
||||
isDeleted: false, // 未删除
|
||||
deletedAt: null,
|
||||
},
|
||||
{
|
||||
id: '6',
|
||||
title: '已删除的便签',
|
||||
content: '这是一条已删除的便签示例,应该只在回收站中显示。',
|
||||
createdAt: fixedFiveDaysAgo,
|
||||
updatedAt: fixedFiveDaysAgo,
|
||||
folderId: null,
|
||||
isStarred: false, // 非加星
|
||||
isTop: false, // 非置顶
|
||||
hasImage: false, // 不包含图片
|
||||
isDeleted: true, // 已删除
|
||||
deletedAt: fixedYesterday,
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
// Mock folders - 使用固定的日期值
|
||||
|
||||
Reference in New Issue
Block a user