@jhl548/duplicate-doc-vue 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/index.js +183 -163
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ const highlights = computed<DuplicateHighlight[]>(() => [
|
|
|
59
59
|
similarity: 0.92,
|
|
60
60
|
active: true,
|
|
61
61
|
label: "重复点 1",
|
|
62
|
-
ranges: [{ start: 6, end: 20, blockId: "b-1" }]
|
|
62
|
+
ranges: [{ start: 6, end: 20, matchedText: "这是一段需要高亮的重复内容", blockId: "b-1" }]
|
|
63
63
|
}
|
|
64
64
|
]);
|
|
65
65
|
|
|
@@ -128,6 +128,7 @@ interface NormalizedDocument {
|
|
|
128
128
|
- `plainText` 必须与算法计算重复点范围时使用的文本一致。
|
|
129
129
|
- `rangeMap` 负责把结构块和纯文本偏移关联起来,便于联调和问题排查。
|
|
130
130
|
- `DuplicateHighlight.ranges[].start/end` 使用基于 `plainText` 的左闭右开区间。
|
|
131
|
+
- 可编辑场景建议传入 `DuplicateHighlight.ranges[].matchedText`,其值应等于原始命中文本;插件会自动记录兜底文本,但后端显式提供可提升删除、编辑和切换重复点后的高亮稳定性。
|
|
131
132
|
|
|
132
133
|
## Word 转 HTML 建议
|
|
133
134
|
|
|
@@ -193,6 +194,7 @@ npm run verify:npm
|
|
|
193
194
|
- 应用入口已导入 `@jhl548/duplicate-doc-vue/style.css`。
|
|
194
195
|
- `documentModel.documentId` 与 `highlights[].documentId` 一致。
|
|
195
196
|
- `TextRange.start/end` 不越界。
|
|
197
|
+
- 可编辑场景下 `TextRange.matchedText` 与 `plainText.slice(start, end)` 一致。
|
|
196
198
|
- `rangeMap.textStart/textEnd` 与 `plainText` 对齐。
|
|
197
199
|
- 后端块级换行规则与插件映射规则一致。
|
|
198
200
|
- 表格、列表、标题、图片在 HTML 中仍是 Tiptap 可解析结构。
|
package/dist/index.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, nextTick as o, normalizeClass as s, onBeforeUnmount as ee, openBlock as c, ref as
|
|
2
|
-
import { DuplicateHighlightExtension as
|
|
3
|
-
import { Color as
|
|
4
|
-
import { Highlight as
|
|
5
|
-
import { Image as
|
|
6
|
-
import { Subscript as
|
|
7
|
-
import { Superscript as
|
|
8
|
-
import { Table as
|
|
9
|
-
import { TableCell as
|
|
10
|
-
import { TableHeader as
|
|
11
|
-
import { TableRow as
|
|
12
|
-
import { TaskItem as
|
|
13
|
-
import { TaskList as
|
|
14
|
-
import { TextAlign as
|
|
15
|
-
import { TextStyle as
|
|
16
|
-
import
|
|
17
|
-
import { EditorContent as
|
|
1
|
+
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, nextTick as o, normalizeClass as s, onBeforeUnmount as ee, openBlock as c, ref as l, unref as u, watch as d } from "vue";
|
|
2
|
+
import { DuplicateHighlightExtension as te, plainTextFromHtml as f, scrollToActiveHighlight as p } from "@jhl548/duplicate-doc-core";
|
|
3
|
+
import { Color as ne } from "@tiptap/extension-color";
|
|
4
|
+
import { Highlight as re } from "@tiptap/extension-highlight";
|
|
5
|
+
import { Image as ie } from "@tiptap/extension-image";
|
|
6
|
+
import { Subscript as ae } from "@tiptap/extension-subscript";
|
|
7
|
+
import { Superscript as oe } from "@tiptap/extension-superscript";
|
|
8
|
+
import { Table as se } from "@tiptap/extension-table";
|
|
9
|
+
import { TableCell as ce } from "@tiptap/extension-table-cell";
|
|
10
|
+
import { TableHeader as le } from "@tiptap/extension-table-header";
|
|
11
|
+
import { TableRow as ue } from "@tiptap/extension-table-row";
|
|
12
|
+
import { TaskItem as de } from "@tiptap/extension-task-item";
|
|
13
|
+
import { TaskList as fe } from "@tiptap/extension-task-list";
|
|
14
|
+
import { TextAlign as m } from "@tiptap/extension-text-align";
|
|
15
|
+
import { TextStyle as h } from "@tiptap/extension-text-style";
|
|
16
|
+
import g from "@tiptap/starter-kit";
|
|
17
|
+
import { EditorContent as _, useEditor as v } from "@tiptap/vue-3";
|
|
18
18
|
export * from "@jhl548/duplicate-doc-core";
|
|
19
19
|
//#region src/icons/align-center.svg?raw
|
|
20
|
-
var
|
|
20
|
+
var y = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M5 7h14\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M7 11h10\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M5 15h14\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M8 19h8\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", b = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M5 7h14\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M5 11h10\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M5 15h14\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M5 19h8\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", x = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M5 7h14\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M9 11h10\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M5 15h14\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M11 19h8\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", S = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M8 5h5.2a3.2 3.2 0 0 1 0 6.4H8V5Z\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linejoin=\"round\"/>\n <path d=\"M8 11.4h6a3.3 3.3 0 0 1 0 6.6H8v-6.6Z\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linejoin=\"round\"/>\n <path d=\"M7 5h2v13H7\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", C = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M9 7h10\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M9 12h10\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M9 17h10\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M5 7h.1M5 12h.1M5 17h.1\" stroke=\"currentColor\" stroke-width=\"2.8\" stroke-linecap=\"round\"/>\n</svg>\n", w = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"m9 8-4 4 4 4\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"m15 8 4 4-4 4\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"m13 6-2 12\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", T = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M5 12h14\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M7 7h10\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" opacity=\".45\"/>\n <path d=\"M7 17h10\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" opacity=\".45\"/>\n</svg>\n", E = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"m8 14 6.6-6.6a2 2 0 0 1 2.8 2.8L10.8 17H8v-3Z\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linejoin=\"round\"/>\n <path d=\"m13.4 8.6 2 2\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\"/>\n <path d=\"M5 20h14\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", D = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M10 5h7\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M7 19h7\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M14.5 5 9.5 19\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", O = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"5.2\" stroke=\"currentColor\" stroke-width=\"1.8\"/>\n <circle cx=\"12\" cy=\"12\" r=\"1.7\" fill=\"currentColor\"/>\n <path d=\"M12 3.5v3M12 17.5v3M3.5 12h3M17.5 12h3\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", k = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M10 7h9\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M10 12h9\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M10 17h9\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M5.4 5.8v3.4\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n <path d=\"M4.5 14.1c.2-.8.8-1.2 1.5-1.2.8 0 1.4.4 1.4 1.1 0 .5-.3.9-.9 1.3l-1.9 1.3h2.9\" stroke=\"currentColor\" stroke-width=\"1.35\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", A = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M8.5 6.5c-1.8 1.3-2.7 3-2.7 5.2v5.1h5.1v-5.1H8.1c0-1.4.6-2.6 1.9-3.5\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M16.5 6.5c-1.8 1.3-2.7 3-2.7 5.2v5.1h5.1v-5.1h-2.8c0-1.4.6-2.6 1.9-3.5\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", j = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"m15 7 4 4-4 4\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M18 11h-7.5a4.5 4.5 0 0 0 0 9H13\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", M = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M8 7.4c.9-1.4 2.4-2.1 4.3-2.1 2 0 3.5.7 4.6 2\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\"/>\n <path d=\"M16.4 16.3c-.9 1.6-2.4 2.4-4.6 2.4-2.1 0-3.8-.8-5-2.3\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\"/>\n <path d=\"M5 12h14\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", N = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"m6 7 7 9\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"m13 7-7 9\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M15.5 18.2c.4-.8 1.1-1.2 2-1.2 1 0 1.8.6 1.8 1.5 0 .6-.3 1.1-1 1.5l-2.7 1.8h3.9\" stroke=\"currentColor\" stroke-width=\"1.45\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", P = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"m6 9 7 9\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"m13 9-7 9\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M15.5 5.2c.4-.8 1.1-1.2 2-1.2 1 0 1.8.6 1.8 1.5 0 .6-.3 1.1-1 1.5l-2.7 1.8h3.9\" stroke=\"currentColor\" stroke-width=\"1.45\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", F = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"5\" y=\"6\" width=\"14\" height=\"12\" rx=\"2\" stroke=\"currentColor\" stroke-width=\"1.8\"/>\n <path d=\"M5 10h14M5 14h14M10 6v12M14 6v12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n</svg>\n", I = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"m4.5 7.2 1.5 1.5 3-3\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M11 7h8\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"m4.5 15.2 1.5 1.5 3-3\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M11 15h8\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", L = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"m6 18 5-12 5 12\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M8.2 13.2h5.6\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n <path d=\"M5 21h14\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", R = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M9 7 5 11l4 4\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M6 11h7.5a4.5 4.5 0 0 1 0 9H11\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>\n</svg>\n", z = {
|
|
21
21
|
class: "dupdoc-editor__toolbar",
|
|
22
22
|
"aria-label": "文档编辑工具"
|
|
23
|
-
},
|
|
23
|
+
}, B = {
|
|
24
24
|
class: "dupdoc-editor__toolbar-group dupdoc-editor__toolbar-group--history",
|
|
25
25
|
"aria-label": "历史操作"
|
|
26
|
-
},
|
|
26
|
+
}, V = ["aria-disabled"], pe = ["innerHTML"], me = ["aria-disabled"], he = ["innerHTML"], ge = { class: "dupdoc-editor__toolbar-group dupdoc-editor__toolbar-group--select" }, _e = ["value", "disabled"], ve = {
|
|
27
27
|
class: "dupdoc-editor__toolbar-group",
|
|
28
28
|
"aria-label": "基础文字样式"
|
|
29
|
-
},
|
|
29
|
+
}, ye = ["disabled"], be = ["innerHTML"], xe = ["disabled"], Se = ["innerHTML"], Ce = ["disabled"], we = ["innerHTML"], Te = ["disabled"], H = ["innerHTML"], Ee = ["disabled"], De = ["innerHTML"], Oe = ["disabled"], ke = ["innerHTML"], Ae = {
|
|
30
30
|
class: "dupdoc-editor__toolbar-group",
|
|
31
31
|
"aria-label": "颜色"
|
|
32
|
-
},
|
|
32
|
+
}, je = {
|
|
33
33
|
class: "dupdoc-toolbar-color",
|
|
34
34
|
"data-tooltip": "文字颜色",
|
|
35
35
|
"aria-label": "文字颜色"
|
|
36
|
-
},
|
|
36
|
+
}, Me = ["innerHTML"], Ne = ["disabled"], Pe = {
|
|
37
37
|
class: "dupdoc-toolbar-color",
|
|
38
38
|
"data-tooltip": "高亮颜色",
|
|
39
39
|
"aria-label": "高亮颜色"
|
|
40
|
-
},
|
|
40
|
+
}, Fe = ["innerHTML"], Ie = ["disabled"], Le = {
|
|
41
41
|
class: "dupdoc-editor__toolbar-group",
|
|
42
42
|
"aria-label": "段落对齐"
|
|
43
|
-
},
|
|
43
|
+
}, Re = ["disabled"], ze = ["innerHTML"], Be = ["disabled"], Ve = ["innerHTML"], He = ["disabled"], Ue = ["innerHTML"], We = {
|
|
44
44
|
class: "dupdoc-editor__toolbar-group",
|
|
45
45
|
"aria-label": "列表与结构"
|
|
46
|
-
},
|
|
46
|
+
}, Ge = ["disabled"], Ke = ["innerHTML"], qe = ["disabled"], Je = ["innerHTML"], Ye = ["disabled"], Xe = ["innerHTML"], Ze = ["disabled"], Qe = ["innerHTML"], $e = ["disabled"], et = ["innerHTML"], tt = ["disabled"], nt = ["innerHTML"], rt = {
|
|
47
47
|
class: "dupdoc-editor__toolbar-group dupdoc-editor__toolbar-group--action",
|
|
48
48
|
"aria-label": "查重定位"
|
|
49
|
-
},
|
|
49
|
+
}, it = ["innerHTML"], at = { class: "dupdoc-editor__body" }, U = /* @__PURE__ */ a({
|
|
50
50
|
__name: "DuplicateDocumentEditor",
|
|
51
51
|
props: {
|
|
52
52
|
documentModel: {},
|
|
@@ -61,69 +61,69 @@ var x = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
emits: ["change", "ready"],
|
|
64
|
-
setup(a, { expose:
|
|
65
|
-
let
|
|
66
|
-
alignCenter:
|
|
67
|
-
alignLeft:
|
|
68
|
-
alignRight:
|
|
69
|
-
bold:
|
|
70
|
-
bulletList:
|
|
71
|
-
code:
|
|
72
|
-
divider:
|
|
73
|
-
highlightColor:
|
|
74
|
-
italic:
|
|
75
|
-
locate:
|
|
76
|
-
orderedList:
|
|
77
|
-
quote:
|
|
78
|
-
redo:
|
|
79
|
-
strike:
|
|
80
|
-
subscript:
|
|
81
|
-
superscript:
|
|
82
|
-
table:
|
|
83
|
-
taskList:
|
|
84
|
-
textColor:
|
|
85
|
-
undo:
|
|
86
|
-
},
|
|
87
|
-
content:
|
|
88
|
-
editable:
|
|
64
|
+
setup(a, { expose: U, emit: ot }) {
|
|
65
|
+
let W = a, G = ot, K = l(null), q = l(""), J = e(() => !W.editable || !X.value), Y = {
|
|
66
|
+
alignCenter: y,
|
|
67
|
+
alignLeft: b,
|
|
68
|
+
alignRight: x,
|
|
69
|
+
bold: S,
|
|
70
|
+
bulletList: C,
|
|
71
|
+
code: w,
|
|
72
|
+
divider: T,
|
|
73
|
+
highlightColor: E,
|
|
74
|
+
italic: D,
|
|
75
|
+
locate: O,
|
|
76
|
+
orderedList: k,
|
|
77
|
+
quote: A,
|
|
78
|
+
redo: j,
|
|
79
|
+
strike: M,
|
|
80
|
+
subscript: N,
|
|
81
|
+
superscript: P,
|
|
82
|
+
table: F,
|
|
83
|
+
taskList: I,
|
|
84
|
+
textColor: L,
|
|
85
|
+
undo: R
|
|
86
|
+
}, st = e(() => X.value?.isActive("heading", { level: 1 }) ? "heading-1" : X.value?.isActive("heading", { level: 2 }) ? "heading-2" : X.value?.isActive("heading", { level: 3 }) ? "heading-3" : "paragraph"), X = v({
|
|
87
|
+
content: W.documentModel.html,
|
|
88
|
+
editable: W.editable,
|
|
89
89
|
extensions: [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
g,
|
|
91
|
+
h,
|
|
92
|
+
ne,
|
|
93
|
+
re.configure({ multicolor: !0 }),
|
|
94
|
+
ie.configure({
|
|
95
95
|
inline: !1,
|
|
96
96
|
allowBase64: !0
|
|
97
97
|
}),
|
|
98
|
-
|
|
98
|
+
m.configure({ types: ["heading", "paragraph"] }),
|
|
99
|
+
ae,
|
|
99
100
|
oe,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
ce.configure({ resizable: !0 }),
|
|
104
|
-
p,
|
|
101
|
+
fe,
|
|
102
|
+
de.configure({ nested: !0 }),
|
|
103
|
+
se.configure({ resizable: !0 }),
|
|
105
104
|
ue,
|
|
106
105
|
le,
|
|
107
|
-
|
|
106
|
+
ce,
|
|
107
|
+
te
|
|
108
108
|
],
|
|
109
109
|
editorProps: { attributes: { class: "dupdoc-editor__content" } },
|
|
110
110
|
onCreate: ({ editor: e }) => {
|
|
111
|
-
e.commands.setDuplicateHighlights(
|
|
111
|
+
e.commands.setDuplicateHighlights(W.highlights), G("ready");
|
|
112
112
|
},
|
|
113
113
|
onUpdate: ({ editor: e }) => {
|
|
114
|
-
|
|
114
|
+
G("change", Z(e));
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
117
|
function Z(e) {
|
|
118
118
|
let t = e ?? X.value;
|
|
119
119
|
return {
|
|
120
|
-
documentId:
|
|
121
|
-
html: t?.getHTML() ??
|
|
122
|
-
plainText: t?.getText() ??
|
|
120
|
+
documentId: W.documentModel.documentId,
|
|
121
|
+
html: t?.getHTML() ?? W.documentModel.html,
|
|
122
|
+
plainText: t?.getText() ?? f(W.documentModel.html),
|
|
123
123
|
json: t?.getJSON()
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function ct(e) {
|
|
127
127
|
let t = e.target.value, n = X.value?.chain().focus();
|
|
128
128
|
if (!n) return;
|
|
129
129
|
if (t === "paragraph") {
|
|
@@ -133,292 +133,312 @@ var x = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"
|
|
|
133
133
|
let r = Number(t.replace("heading-", ""));
|
|
134
134
|
n.toggleHeading({ level: r }).run();
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function lt(e) {
|
|
137
137
|
let t = e.target.value;
|
|
138
138
|
X.value?.chain().focus().setColor(t).run();
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function ut(e) {
|
|
141
141
|
let t = e.target.value;
|
|
142
142
|
X.value?.chain().focus().toggleHighlight({ color: t }).run();
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function dt() {
|
|
145
145
|
X.value?.chain().focus().insertTable({
|
|
146
146
|
rows: 3,
|
|
147
147
|
cols: 3,
|
|
148
148
|
withHeaderRow: !0
|
|
149
149
|
}).run();
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function ft() {
|
|
152
152
|
J.value || !X.value?.can().undo() || X.value.chain().focus().undo().run();
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function pt() {
|
|
155
155
|
J.value || !X.value?.can().redo() || X.value.chain().focus().redo().run();
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function mt() {
|
|
158
158
|
o(() => {
|
|
159
|
-
|
|
159
|
+
p(K.value);
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
function Q(e = W.highlights) {
|
|
163
|
+
return e.map((e) => [
|
|
164
|
+
e.documentId,
|
|
165
|
+
e.duplicateId,
|
|
166
|
+
e.similarity,
|
|
167
|
+
e.active ? "active" : "",
|
|
168
|
+
e.ignored ? "ignored" : "",
|
|
169
|
+
e.region,
|
|
170
|
+
e.semanticType,
|
|
171
|
+
e.noiseReason,
|
|
172
|
+
e.tableContext?.tableId,
|
|
173
|
+
e.ranges.map((e) => [
|
|
174
|
+
e.blockId,
|
|
175
|
+
e.start,
|
|
176
|
+
e.end,
|
|
177
|
+
e.matchedText
|
|
178
|
+
].join(":")).join("|")
|
|
179
|
+
].join("::")).join(";;");
|
|
166
180
|
}
|
|
167
|
-
|
|
181
|
+
function $(e = W.autofocusHighlight, t = !1) {
|
|
182
|
+
let n = Q();
|
|
183
|
+
!t && n === q.value || (X.value?.commands.setDuplicateHighlights(W.highlights), q.value = n, e && o(() => {
|
|
184
|
+
p(K.value);
|
|
185
|
+
}));
|
|
186
|
+
}
|
|
187
|
+
return d(() => [W.documentModel.documentId, W.documentModel.html], ([e], [t]) => {
|
|
168
188
|
if (!X.value) return;
|
|
169
189
|
let n = e === t;
|
|
170
|
-
if (X.value.getHTML() !==
|
|
171
|
-
X.value.commands.setContent(
|
|
190
|
+
if (X.value.getHTML() !== W.documentModel.html) {
|
|
191
|
+
X.value.commands.setContent(W.documentModel.html, { emitUpdate: !1 }), $(!n && W.autofocusHighlight, !0);
|
|
172
192
|
return;
|
|
173
193
|
}
|
|
174
|
-
n || $(
|
|
175
|
-
}),
|
|
194
|
+
n || $(W.autofocusHighlight, !0);
|
|
195
|
+
}), d(() => Q(), () => $()), d(() => W.editable, (e) => X.value?.setEditable(e)), ee(() => {
|
|
176
196
|
X.value?.destroy();
|
|
177
|
-
}),
|
|
197
|
+
}), U({
|
|
178
198
|
getSnapshot: Z,
|
|
179
|
-
getHTML: () => X.value?.getHTML() ??
|
|
180
|
-
getPlainText: () => X.value?.getText() ??
|
|
199
|
+
getHTML: () => X.value?.getHTML() ?? W.documentModel.html,
|
|
200
|
+
getPlainText: () => X.value?.getText() ?? f(W.documentModel.html),
|
|
181
201
|
focus: () => X.value?.commands.focus()
|
|
182
202
|
}), (e, a) => (c(), r("div", {
|
|
183
203
|
ref_key: "editorShellRef",
|
|
184
|
-
ref:
|
|
204
|
+
ref: K,
|
|
185
205
|
class: "dupdoc-editor"
|
|
186
|
-
}, [i("div",
|
|
187
|
-
i("div",
|
|
206
|
+
}, [i("div", z, [
|
|
207
|
+
i("div", B, [i("button", {
|
|
188
208
|
type: "button",
|
|
189
|
-
class: s(["dupdoc-toolbar-button", { "is-disabled": J.value || !
|
|
209
|
+
class: s(["dupdoc-toolbar-button", { "is-disabled": J.value || !u(X)?.can().undo() }]),
|
|
190
210
|
"data-tooltip": "撤销",
|
|
191
211
|
"aria-label": "撤销",
|
|
192
|
-
"aria-disabled": J.value || !
|
|
193
|
-
onClick:
|
|
212
|
+
"aria-disabled": J.value || !u(X)?.can().undo(),
|
|
213
|
+
onClick: ft
|
|
194
214
|
}, [i("span", {
|
|
195
215
|
class: "dupdoc-toolbar-icon",
|
|
196
216
|
innerHTML: Y.undo
|
|
197
|
-
}, null, 8,
|
|
217
|
+
}, null, 8, pe)], 10, V), i("button", {
|
|
198
218
|
type: "button",
|
|
199
|
-
class: s(["dupdoc-toolbar-button", { "is-disabled": J.value || !
|
|
219
|
+
class: s(["dupdoc-toolbar-button", { "is-disabled": J.value || !u(X)?.can().redo() }]),
|
|
200
220
|
"data-tooltip": "重做",
|
|
201
221
|
"aria-label": "重做",
|
|
202
|
-
"aria-disabled": J.value || !
|
|
203
|
-
onClick:
|
|
222
|
+
"aria-disabled": J.value || !u(X)?.can().redo(),
|
|
223
|
+
onClick: pt
|
|
204
224
|
}, [i("span", {
|
|
205
225
|
class: "dupdoc-toolbar-icon",
|
|
206
226
|
innerHTML: Y.redo
|
|
207
|
-
}, null, 8,
|
|
208
|
-
i("div",
|
|
209
|
-
value:
|
|
227
|
+
}, null, 8, he)], 10, me)]),
|
|
228
|
+
i("div", ge, [i("select", {
|
|
229
|
+
value: st.value,
|
|
210
230
|
disabled: J.value,
|
|
211
231
|
"aria-label": "选择文本层级",
|
|
212
|
-
onChange:
|
|
232
|
+
onChange: ct
|
|
213
233
|
}, [...a[14] ||= [
|
|
214
234
|
i("option", { value: "paragraph" }, "P", -1),
|
|
215
235
|
i("option", { value: "heading-1" }, "H1", -1),
|
|
216
236
|
i("option", { value: "heading-2" }, "H2", -1),
|
|
217
237
|
i("option", { value: "heading-3" }, "H3", -1)
|
|
218
|
-
]], 40,
|
|
219
|
-
i("div",
|
|
238
|
+
]], 40, _e)]),
|
|
239
|
+
i("div", ve, [
|
|
220
240
|
i("button", {
|
|
221
241
|
type: "button",
|
|
222
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
242
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("bold") }]),
|
|
223
243
|
"data-tooltip": "加粗",
|
|
224
244
|
"aria-label": "加粗",
|
|
225
245
|
disabled: J.value,
|
|
226
|
-
onClick: a[0] ||= (e) =>
|
|
246
|
+
onClick: a[0] ||= (e) => u(X)?.chain().focus().toggleBold().run()
|
|
227
247
|
}, [i("span", {
|
|
228
248
|
class: "dupdoc-toolbar-icon",
|
|
229
249
|
innerHTML: Y.bold
|
|
230
|
-
}, null, 8,
|
|
250
|
+
}, null, 8, be)], 10, ye),
|
|
231
251
|
i("button", {
|
|
232
252
|
type: "button",
|
|
233
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
253
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("italic") }]),
|
|
234
254
|
"data-tooltip": "斜体",
|
|
235
255
|
"aria-label": "斜体",
|
|
236
256
|
disabled: J.value,
|
|
237
|
-
onClick: a[1] ||= (e) =>
|
|
257
|
+
onClick: a[1] ||= (e) => u(X)?.chain().focus().toggleItalic().run()
|
|
238
258
|
}, [i("span", {
|
|
239
259
|
class: "dupdoc-toolbar-icon",
|
|
240
260
|
innerHTML: Y.italic
|
|
241
|
-
}, null, 8,
|
|
261
|
+
}, null, 8, Se)], 10, xe),
|
|
242
262
|
i("button", {
|
|
243
263
|
type: "button",
|
|
244
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
264
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("strike") }]),
|
|
245
265
|
"data-tooltip": "删除线",
|
|
246
266
|
"aria-label": "删除线",
|
|
247
267
|
disabled: J.value,
|
|
248
|
-
onClick: a[2] ||= (e) =>
|
|
268
|
+
onClick: a[2] ||= (e) => u(X)?.chain().focus().toggleStrike().run()
|
|
249
269
|
}, [i("span", {
|
|
250
270
|
class: "dupdoc-toolbar-icon",
|
|
251
271
|
innerHTML: Y.strike
|
|
252
|
-
}, null, 8,
|
|
272
|
+
}, null, 8, we)], 10, Ce),
|
|
253
273
|
i("button", {
|
|
254
274
|
type: "button",
|
|
255
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
275
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("code") }]),
|
|
256
276
|
"data-tooltip": "行内代码",
|
|
257
277
|
"aria-label": "行内代码",
|
|
258
278
|
disabled: J.value,
|
|
259
|
-
onClick: a[3] ||= (e) =>
|
|
279
|
+
onClick: a[3] ||= (e) => u(X)?.chain().focus().toggleCode().run()
|
|
260
280
|
}, [i("span", {
|
|
261
281
|
class: "dupdoc-toolbar-icon",
|
|
262
282
|
innerHTML: Y.code
|
|
263
|
-
}, null, 8,
|
|
283
|
+
}, null, 8, H)], 10, Te),
|
|
264
284
|
i("button", {
|
|
265
285
|
type: "button",
|
|
266
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
286
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("subscript") }]),
|
|
267
287
|
"data-tooltip": "下标",
|
|
268
288
|
"aria-label": "下标",
|
|
269
289
|
disabled: J.value,
|
|
270
|
-
onClick: a[4] ||= (e) =>
|
|
290
|
+
onClick: a[4] ||= (e) => u(X)?.chain().focus().toggleSubscript().run()
|
|
271
291
|
}, [i("span", {
|
|
272
292
|
class: "dupdoc-toolbar-icon",
|
|
273
293
|
innerHTML: Y.subscript
|
|
274
|
-
}, null, 8,
|
|
294
|
+
}, null, 8, De)], 10, Ee),
|
|
275
295
|
i("button", {
|
|
276
296
|
type: "button",
|
|
277
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
297
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("superscript") }]),
|
|
278
298
|
"data-tooltip": "上标",
|
|
279
299
|
"aria-label": "上标",
|
|
280
300
|
disabled: J.value,
|
|
281
|
-
onClick: a[5] ||= (e) =>
|
|
301
|
+
onClick: a[5] ||= (e) => u(X)?.chain().focus().toggleSuperscript().run()
|
|
282
302
|
}, [i("span", {
|
|
283
303
|
class: "dupdoc-toolbar-icon",
|
|
284
304
|
innerHTML: Y.superscript
|
|
285
|
-
}, null, 8,
|
|
305
|
+
}, null, 8, ke)], 10, Oe)
|
|
286
306
|
]),
|
|
287
|
-
i("div",
|
|
307
|
+
i("div", Ae, [i("label", je, [i("span", {
|
|
288
308
|
class: "dupdoc-toolbar-icon",
|
|
289
309
|
innerHTML: Y.textColor
|
|
290
|
-
}, null, 8,
|
|
310
|
+
}, null, 8, Me), i("input", {
|
|
291
311
|
type: "color",
|
|
292
312
|
disabled: J.value,
|
|
293
313
|
value: "#dc2626",
|
|
294
|
-
onInput:
|
|
295
|
-
}, null, 40,
|
|
314
|
+
onInput: lt
|
|
315
|
+
}, null, 40, Ne)]), i("label", Pe, [i("span", {
|
|
296
316
|
class: "dupdoc-toolbar-icon",
|
|
297
317
|
innerHTML: Y.highlightColor
|
|
298
|
-
}, null, 8,
|
|
318
|
+
}, null, 8, Fe), i("input", {
|
|
299
319
|
type: "color",
|
|
300
320
|
disabled: J.value,
|
|
301
321
|
value: "#fef08a",
|
|
302
|
-
onInput:
|
|
303
|
-
}, null, 40,
|
|
304
|
-
i("div",
|
|
322
|
+
onInput: ut
|
|
323
|
+
}, null, 40, Ie)])]),
|
|
324
|
+
i("div", Le, [
|
|
305
325
|
i("button", {
|
|
306
326
|
type: "button",
|
|
307
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
327
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive({ textAlign: "left" }) }]),
|
|
308
328
|
"data-tooltip": "左对齐",
|
|
309
329
|
"aria-label": "左对齐",
|
|
310
330
|
disabled: J.value,
|
|
311
|
-
onClick: a[6] ||= (e) =>
|
|
331
|
+
onClick: a[6] ||= (e) => u(X)?.chain().focus().setTextAlign("left").run()
|
|
312
332
|
}, [i("span", {
|
|
313
333
|
class: "dupdoc-toolbar-icon",
|
|
314
334
|
innerHTML: Y.alignLeft
|
|
315
|
-
}, null, 8,
|
|
335
|
+
}, null, 8, ze)], 10, Re),
|
|
316
336
|
i("button", {
|
|
317
337
|
type: "button",
|
|
318
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
338
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive({ textAlign: "center" }) }]),
|
|
319
339
|
"data-tooltip": "居中对齐",
|
|
320
340
|
"aria-label": "居中对齐",
|
|
321
341
|
disabled: J.value,
|
|
322
|
-
onClick: a[7] ||= (e) =>
|
|
342
|
+
onClick: a[7] ||= (e) => u(X)?.chain().focus().setTextAlign("center").run()
|
|
323
343
|
}, [i("span", {
|
|
324
344
|
class: "dupdoc-toolbar-icon",
|
|
325
345
|
innerHTML: Y.alignCenter
|
|
326
|
-
}, null, 8,
|
|
346
|
+
}, null, 8, Ve)], 10, Be),
|
|
327
347
|
i("button", {
|
|
328
348
|
type: "button",
|
|
329
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
349
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive({ textAlign: "right" }) }]),
|
|
330
350
|
"data-tooltip": "右对齐",
|
|
331
351
|
"aria-label": "右对齐",
|
|
332
352
|
disabled: J.value,
|
|
333
|
-
onClick: a[8] ||= (e) =>
|
|
353
|
+
onClick: a[8] ||= (e) => u(X)?.chain().focus().setTextAlign("right").run()
|
|
334
354
|
}, [i("span", {
|
|
335
355
|
class: "dupdoc-toolbar-icon",
|
|
336
356
|
innerHTML: Y.alignRight
|
|
337
|
-
}, null, 8,
|
|
357
|
+
}, null, 8, Ue)], 10, He)
|
|
338
358
|
]),
|
|
339
|
-
i("div",
|
|
359
|
+
i("div", We, [
|
|
340
360
|
i("button", {
|
|
341
361
|
type: "button",
|
|
342
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
362
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("bulletList") }]),
|
|
343
363
|
"data-tooltip": "无序列表",
|
|
344
364
|
"aria-label": "无序列表",
|
|
345
365
|
disabled: J.value,
|
|
346
|
-
onClick: a[9] ||= (e) =>
|
|
366
|
+
onClick: a[9] ||= (e) => u(X)?.chain().focus().toggleBulletList().run()
|
|
347
367
|
}, [i("span", {
|
|
348
368
|
class: "dupdoc-toolbar-icon",
|
|
349
369
|
innerHTML: Y.bulletList
|
|
350
|
-
}, null, 8,
|
|
370
|
+
}, null, 8, Ke)], 10, Ge),
|
|
351
371
|
i("button", {
|
|
352
372
|
type: "button",
|
|
353
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
373
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("orderedList") }]),
|
|
354
374
|
"data-tooltip": "有序列表",
|
|
355
375
|
"aria-label": "有序列表",
|
|
356
376
|
disabled: J.value,
|
|
357
|
-
onClick: a[10] ||= (e) =>
|
|
377
|
+
onClick: a[10] ||= (e) => u(X)?.chain().focus().toggleOrderedList().run()
|
|
358
378
|
}, [i("span", {
|
|
359
379
|
class: "dupdoc-toolbar-icon",
|
|
360
380
|
innerHTML: Y.orderedList
|
|
361
|
-
}, null, 8,
|
|
381
|
+
}, null, 8, Je)], 10, qe),
|
|
362
382
|
i("button", {
|
|
363
383
|
type: "button",
|
|
364
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
384
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("taskList") }]),
|
|
365
385
|
"data-tooltip": "任务列表",
|
|
366
386
|
"aria-label": "任务列表",
|
|
367
387
|
disabled: J.value,
|
|
368
|
-
onClick: a[11] ||= (e) =>
|
|
388
|
+
onClick: a[11] ||= (e) => u(X)?.chain().focus().toggleTaskList().run()
|
|
369
389
|
}, [i("span", {
|
|
370
390
|
class: "dupdoc-toolbar-icon",
|
|
371
391
|
innerHTML: Y.taskList
|
|
372
|
-
}, null, 8,
|
|
392
|
+
}, null, 8, Xe)], 10, Ye),
|
|
373
393
|
i("button", {
|
|
374
394
|
type: "button",
|
|
375
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
395
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("blockquote") }]),
|
|
376
396
|
"data-tooltip": "引用",
|
|
377
397
|
"aria-label": "引用",
|
|
378
398
|
disabled: J.value,
|
|
379
|
-
onClick: a[12] ||= (e) =>
|
|
399
|
+
onClick: a[12] ||= (e) => u(X)?.chain().focus().toggleBlockquote().run()
|
|
380
400
|
}, [i("span", {
|
|
381
401
|
class: "dupdoc-toolbar-icon",
|
|
382
402
|
innerHTML: Y.quote
|
|
383
|
-
}, null, 8,
|
|
403
|
+
}, null, 8, Qe)], 10, Ze),
|
|
384
404
|
i("button", {
|
|
385
405
|
type: "button",
|
|
386
406
|
class: "dupdoc-toolbar-button",
|
|
387
407
|
"data-tooltip": "插入分割线",
|
|
388
408
|
"aria-label": "插入分割线",
|
|
389
409
|
disabled: J.value,
|
|
390
|
-
onClick: a[13] ||= (e) =>
|
|
410
|
+
onClick: a[13] ||= (e) => u(X)?.chain().focus().setHorizontalRule().run()
|
|
391
411
|
}, [i("span", {
|
|
392
412
|
class: "dupdoc-toolbar-icon",
|
|
393
413
|
innerHTML: Y.divider
|
|
394
|
-
}, null, 8,
|
|
414
|
+
}, null, 8, et)], 8, $e),
|
|
395
415
|
i("button", {
|
|
396
416
|
type: "button",
|
|
397
417
|
class: "dupdoc-toolbar-button",
|
|
398
418
|
"data-tooltip": "插入基础表格",
|
|
399
419
|
"aria-label": "插入基础表格",
|
|
400
420
|
disabled: J.value,
|
|
401
|
-
onClick:
|
|
421
|
+
onClick: dt
|
|
402
422
|
}, [i("span", {
|
|
403
423
|
class: "dupdoc-toolbar-icon",
|
|
404
424
|
innerHTML: Y.table
|
|
405
|
-
}, null, 8,
|
|
425
|
+
}, null, 8, nt)], 8, tt)
|
|
406
426
|
]),
|
|
407
|
-
i("div",
|
|
427
|
+
i("div", rt, [i("button", {
|
|
408
428
|
type: "button",
|
|
409
429
|
class: "dupdoc-toolbar-button dupdoc-toolbar-button--primary",
|
|
410
430
|
"data-tooltip": "定位当前重复点",
|
|
411
431
|
"aria-label": "定位当前重复点",
|
|
412
|
-
onClick:
|
|
432
|
+
onClick: mt
|
|
413
433
|
}, [i("span", {
|
|
414
434
|
class: "dupdoc-toolbar-icon",
|
|
415
435
|
innerHTML: Y.locate
|
|
416
|
-
}, null, 8,
|
|
417
|
-
]), i("div",
|
|
436
|
+
}, null, 8, it)])])
|
|
437
|
+
]), i("div", at, [u(X) ? (c(), t(u(_), {
|
|
418
438
|
key: 0,
|
|
419
|
-
editor:
|
|
439
|
+
editor: u(X)
|
|
420
440
|
}, null, 8, ["editor"])) : n("", !0)])], 512));
|
|
421
441
|
}
|
|
422
442
|
});
|
|
423
443
|
//#endregion
|
|
424
|
-
export {
|
|
444
|
+
export { U as DuplicateDocumentEditor };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jhl548/duplicate-doc-vue",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"typecheck": "vue-tsc -p tsconfig.json --noEmit"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@jhl548/duplicate-doc-core": "0.1.
|
|
30
|
+
"@jhl548/duplicate-doc-core": "0.1.2",
|
|
31
31
|
"@tiptap/extension-color": "^3.23.4",
|
|
32
32
|
"@tiptap/extension-highlight": "^3.23.4",
|
|
33
33
|
"@tiptap/extension-image": "^3.23.4",
|