wizhi更新

This commit is contained in:
hero920103 committed 2026-11-03 09:00:29 +08:00
1 parent d4e89788c5
commit 0c6efc4160
16 files changed
+11810 -811

No files matched your search

+2
View File
@@ -35,6 +35,8 @@ const NATIVE_RULES = [
{ pattern: /\/apps\/erp\/finance\/payment/i, route: '/pages/erp/finance/fund' },
{ pattern: /\/apps\/erp\/report/i, route: '/pages/erp/report/index' },
{ pattern: /记事本|笔记|便签|notebook/i, route: '/pages/tools/notepad/index' },
// 账号管理(密码库):记录个人各平台账号
{ pattern: /账号管理|密码库|passwordStore|password-store/i, route: '/pages/tools/account/index' },
// 「日程提醒」与「工作日程」是两个独立功能:提醒在前,命中"提醒"后即不再落到日历页
{ pattern: /提醒|reminder/i, route: '/pages/tools/schedule/reminder' },
// 自定义审批流(移动端):放在工作日程之前,避免「待办审批」「审批中心」被工作日程吞掉
+14
View File
@@ -5,6 +5,7 @@
*/
const TABLE_STYLE = 'border-collapse: collapse; width: 100%; border: 1px solid #dcdfe6; margin: 12px 0; table-layout: auto;'
const TABLE_CLASS = 'rich-table note-rich-editor-table'
const TR_STYLE = 'border-bottom: 1px solid #ebeef5;'
const TH_STYLE = 'border: 1px solid #dcdfe6; background-color: #f5f7fa; color: #303133; font-weight: 600; padding: 8px 12px; font-size: 14px; text-align: left; min-width: 44px; word-break: break-word;'
const TD_STYLE = 'border: 1px solid #dcdfe6; background-color: #ffffff; color: #303133; padding: 8px 12px; font-size: 14px; vertical-align: top; word-break: break-word; min-width: 44px;'
@@ -26,9 +27,22 @@ export function injectTableInlineStyles(html) {
} else {
cleanAttrs = ` style="${TABLE_STYLE}"` + cleanAttrs
}
if (/class\s*=\s*["']/i.test(cleanAttrs)) {
cleanAttrs = cleanAttrs.replace(/class\s*=\s*["']([^"']*)["']/i, (m, value) => `class="${value} ${TABLE_CLASS}"`)
} else {
cleanAttrs = ` class="${TABLE_CLASS}"` + cleanAttrs
}
return `<table border="1" cellpadding="8" cellspacing="0"${cleanAttrs}>`
})
// 使用 class 定位表体,避免小程序端不支持 tbody 标签选择器
res = res.replace(/<tbody(\s+[^>]*)?>/gi, (match, attrs = '') => {
if (/class\s*=\s*["']/i.test(attrs)) {
return `<tbody${attrs.replace(/class\s*=\s*["']([^"']*)["']/i, (m, value) => `class="${value} rich-table__body"`)}>`
}
return `<tbody class="rich-table__body"${attrs}>`
})
// 注入 tr 样式
res = res.replace(/<tr(\s+[^>]*)?>/gi, (match, attrs = '') => {
if (/style\s*=\s*["']/i.test(attrs)) {