@jhl548/duplicate-doc-vue 0.1.1 → 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 +187 -161
- 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,286 +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(";;");
|
|
180
|
+
}
|
|
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
|
+
}));
|
|
166
186
|
}
|
|
167
|
-
return
|
|
168
|
-
|
|
169
|
-
|
|
187
|
+
return d(() => [W.documentModel.documentId, W.documentModel.html], ([e], [t]) => {
|
|
188
|
+
if (!X.value) return;
|
|
189
|
+
let n = e === t;
|
|
190
|
+
if (X.value.getHTML() !== W.documentModel.html) {
|
|
191
|
+
X.value.commands.setContent(W.documentModel.html, { emitUpdate: !1 }), $(!n && W.autofocusHighlight, !0);
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
n || $(W.autofocusHighlight, !0);
|
|
195
|
+
}), d(() => Q(), () => $()), d(() => W.editable, (e) => X.value?.setEditable(e)), ee(() => {
|
|
170
196
|
X.value?.destroy();
|
|
171
|
-
}),
|
|
197
|
+
}), U({
|
|
172
198
|
getSnapshot: Z,
|
|
173
|
-
getHTML: () => X.value?.getHTML() ??
|
|
174
|
-
getPlainText: () => X.value?.getText() ??
|
|
199
|
+
getHTML: () => X.value?.getHTML() ?? W.documentModel.html,
|
|
200
|
+
getPlainText: () => X.value?.getText() ?? f(W.documentModel.html),
|
|
175
201
|
focus: () => X.value?.commands.focus()
|
|
176
202
|
}), (e, a) => (c(), r("div", {
|
|
177
203
|
ref_key: "editorShellRef",
|
|
178
|
-
ref:
|
|
204
|
+
ref: K,
|
|
179
205
|
class: "dupdoc-editor"
|
|
180
|
-
}, [i("div",
|
|
181
|
-
i("div",
|
|
206
|
+
}, [i("div", z, [
|
|
207
|
+
i("div", B, [i("button", {
|
|
182
208
|
type: "button",
|
|
183
|
-
class: s(["dupdoc-toolbar-button", { "is-disabled": J.value || !
|
|
209
|
+
class: s(["dupdoc-toolbar-button", { "is-disabled": J.value || !u(X)?.can().undo() }]),
|
|
184
210
|
"data-tooltip": "撤销",
|
|
185
211
|
"aria-label": "撤销",
|
|
186
|
-
"aria-disabled": J.value || !
|
|
187
|
-
onClick:
|
|
212
|
+
"aria-disabled": J.value || !u(X)?.can().undo(),
|
|
213
|
+
onClick: ft
|
|
188
214
|
}, [i("span", {
|
|
189
215
|
class: "dupdoc-toolbar-icon",
|
|
190
216
|
innerHTML: Y.undo
|
|
191
|
-
}, null, 8,
|
|
217
|
+
}, null, 8, pe)], 10, V), i("button", {
|
|
192
218
|
type: "button",
|
|
193
|
-
class: s(["dupdoc-toolbar-button", { "is-disabled": J.value || !
|
|
219
|
+
class: s(["dupdoc-toolbar-button", { "is-disabled": J.value || !u(X)?.can().redo() }]),
|
|
194
220
|
"data-tooltip": "重做",
|
|
195
221
|
"aria-label": "重做",
|
|
196
|
-
"aria-disabled": J.value || !
|
|
197
|
-
onClick:
|
|
222
|
+
"aria-disabled": J.value || !u(X)?.can().redo(),
|
|
223
|
+
onClick: pt
|
|
198
224
|
}, [i("span", {
|
|
199
225
|
class: "dupdoc-toolbar-icon",
|
|
200
226
|
innerHTML: Y.redo
|
|
201
|
-
}, null, 8,
|
|
202
|
-
i("div",
|
|
203
|
-
value:
|
|
227
|
+
}, null, 8, he)], 10, me)]),
|
|
228
|
+
i("div", ge, [i("select", {
|
|
229
|
+
value: st.value,
|
|
204
230
|
disabled: J.value,
|
|
205
231
|
"aria-label": "选择文本层级",
|
|
206
|
-
onChange:
|
|
232
|
+
onChange: ct
|
|
207
233
|
}, [...a[14] ||= [
|
|
208
234
|
i("option", { value: "paragraph" }, "P", -1),
|
|
209
235
|
i("option", { value: "heading-1" }, "H1", -1),
|
|
210
236
|
i("option", { value: "heading-2" }, "H2", -1),
|
|
211
237
|
i("option", { value: "heading-3" }, "H3", -1)
|
|
212
|
-
]], 40,
|
|
213
|
-
i("div",
|
|
238
|
+
]], 40, _e)]),
|
|
239
|
+
i("div", ve, [
|
|
214
240
|
i("button", {
|
|
215
241
|
type: "button",
|
|
216
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
242
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("bold") }]),
|
|
217
243
|
"data-tooltip": "加粗",
|
|
218
244
|
"aria-label": "加粗",
|
|
219
245
|
disabled: J.value,
|
|
220
|
-
onClick: a[0] ||= (e) =>
|
|
246
|
+
onClick: a[0] ||= (e) => u(X)?.chain().focus().toggleBold().run()
|
|
221
247
|
}, [i("span", {
|
|
222
248
|
class: "dupdoc-toolbar-icon",
|
|
223
249
|
innerHTML: Y.bold
|
|
224
|
-
}, null, 8,
|
|
250
|
+
}, null, 8, be)], 10, ye),
|
|
225
251
|
i("button", {
|
|
226
252
|
type: "button",
|
|
227
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
253
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("italic") }]),
|
|
228
254
|
"data-tooltip": "斜体",
|
|
229
255
|
"aria-label": "斜体",
|
|
230
256
|
disabled: J.value,
|
|
231
|
-
onClick: a[1] ||= (e) =>
|
|
257
|
+
onClick: a[1] ||= (e) => u(X)?.chain().focus().toggleItalic().run()
|
|
232
258
|
}, [i("span", {
|
|
233
259
|
class: "dupdoc-toolbar-icon",
|
|
234
260
|
innerHTML: Y.italic
|
|
235
|
-
}, null, 8,
|
|
261
|
+
}, null, 8, Se)], 10, xe),
|
|
236
262
|
i("button", {
|
|
237
263
|
type: "button",
|
|
238
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
264
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("strike") }]),
|
|
239
265
|
"data-tooltip": "删除线",
|
|
240
266
|
"aria-label": "删除线",
|
|
241
267
|
disabled: J.value,
|
|
242
|
-
onClick: a[2] ||= (e) =>
|
|
268
|
+
onClick: a[2] ||= (e) => u(X)?.chain().focus().toggleStrike().run()
|
|
243
269
|
}, [i("span", {
|
|
244
270
|
class: "dupdoc-toolbar-icon",
|
|
245
271
|
innerHTML: Y.strike
|
|
246
|
-
}, null, 8,
|
|
272
|
+
}, null, 8, we)], 10, Ce),
|
|
247
273
|
i("button", {
|
|
248
274
|
type: "button",
|
|
249
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
275
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("code") }]),
|
|
250
276
|
"data-tooltip": "行内代码",
|
|
251
277
|
"aria-label": "行内代码",
|
|
252
278
|
disabled: J.value,
|
|
253
|
-
onClick: a[3] ||= (e) =>
|
|
279
|
+
onClick: a[3] ||= (e) => u(X)?.chain().focus().toggleCode().run()
|
|
254
280
|
}, [i("span", {
|
|
255
281
|
class: "dupdoc-toolbar-icon",
|
|
256
282
|
innerHTML: Y.code
|
|
257
|
-
}, null, 8,
|
|
283
|
+
}, null, 8, H)], 10, Te),
|
|
258
284
|
i("button", {
|
|
259
285
|
type: "button",
|
|
260
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
286
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("subscript") }]),
|
|
261
287
|
"data-tooltip": "下标",
|
|
262
288
|
"aria-label": "下标",
|
|
263
289
|
disabled: J.value,
|
|
264
|
-
onClick: a[4] ||= (e) =>
|
|
290
|
+
onClick: a[4] ||= (e) => u(X)?.chain().focus().toggleSubscript().run()
|
|
265
291
|
}, [i("span", {
|
|
266
292
|
class: "dupdoc-toolbar-icon",
|
|
267
293
|
innerHTML: Y.subscript
|
|
268
|
-
}, null, 8,
|
|
294
|
+
}, null, 8, De)], 10, Ee),
|
|
269
295
|
i("button", {
|
|
270
296
|
type: "button",
|
|
271
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
297
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("superscript") }]),
|
|
272
298
|
"data-tooltip": "上标",
|
|
273
299
|
"aria-label": "上标",
|
|
274
300
|
disabled: J.value,
|
|
275
|
-
onClick: a[5] ||= (e) =>
|
|
301
|
+
onClick: a[5] ||= (e) => u(X)?.chain().focus().toggleSuperscript().run()
|
|
276
302
|
}, [i("span", {
|
|
277
303
|
class: "dupdoc-toolbar-icon",
|
|
278
304
|
innerHTML: Y.superscript
|
|
279
|
-
}, null, 8,
|
|
305
|
+
}, null, 8, ke)], 10, Oe)
|
|
280
306
|
]),
|
|
281
|
-
i("div",
|
|
307
|
+
i("div", Ae, [i("label", je, [i("span", {
|
|
282
308
|
class: "dupdoc-toolbar-icon",
|
|
283
309
|
innerHTML: Y.textColor
|
|
284
|
-
}, null, 8,
|
|
310
|
+
}, null, 8, Me), i("input", {
|
|
285
311
|
type: "color",
|
|
286
312
|
disabled: J.value,
|
|
287
313
|
value: "#dc2626",
|
|
288
|
-
onInput:
|
|
289
|
-
}, null, 40,
|
|
314
|
+
onInput: lt
|
|
315
|
+
}, null, 40, Ne)]), i("label", Pe, [i("span", {
|
|
290
316
|
class: "dupdoc-toolbar-icon",
|
|
291
317
|
innerHTML: Y.highlightColor
|
|
292
|
-
}, null, 8,
|
|
318
|
+
}, null, 8, Fe), i("input", {
|
|
293
319
|
type: "color",
|
|
294
320
|
disabled: J.value,
|
|
295
321
|
value: "#fef08a",
|
|
296
|
-
onInput:
|
|
297
|
-
}, null, 40,
|
|
298
|
-
i("div",
|
|
322
|
+
onInput: ut
|
|
323
|
+
}, null, 40, Ie)])]),
|
|
324
|
+
i("div", Le, [
|
|
299
325
|
i("button", {
|
|
300
326
|
type: "button",
|
|
301
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
327
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive({ textAlign: "left" }) }]),
|
|
302
328
|
"data-tooltip": "左对齐",
|
|
303
329
|
"aria-label": "左对齐",
|
|
304
330
|
disabled: J.value,
|
|
305
|
-
onClick: a[6] ||= (e) =>
|
|
331
|
+
onClick: a[6] ||= (e) => u(X)?.chain().focus().setTextAlign("left").run()
|
|
306
332
|
}, [i("span", {
|
|
307
333
|
class: "dupdoc-toolbar-icon",
|
|
308
334
|
innerHTML: Y.alignLeft
|
|
309
|
-
}, null, 8,
|
|
335
|
+
}, null, 8, ze)], 10, Re),
|
|
310
336
|
i("button", {
|
|
311
337
|
type: "button",
|
|
312
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
338
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive({ textAlign: "center" }) }]),
|
|
313
339
|
"data-tooltip": "居中对齐",
|
|
314
340
|
"aria-label": "居中对齐",
|
|
315
341
|
disabled: J.value,
|
|
316
|
-
onClick: a[7] ||= (e) =>
|
|
342
|
+
onClick: a[7] ||= (e) => u(X)?.chain().focus().setTextAlign("center").run()
|
|
317
343
|
}, [i("span", {
|
|
318
344
|
class: "dupdoc-toolbar-icon",
|
|
319
345
|
innerHTML: Y.alignCenter
|
|
320
|
-
}, null, 8,
|
|
346
|
+
}, null, 8, Ve)], 10, Be),
|
|
321
347
|
i("button", {
|
|
322
348
|
type: "button",
|
|
323
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
349
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive({ textAlign: "right" }) }]),
|
|
324
350
|
"data-tooltip": "右对齐",
|
|
325
351
|
"aria-label": "右对齐",
|
|
326
352
|
disabled: J.value,
|
|
327
|
-
onClick: a[8] ||= (e) =>
|
|
353
|
+
onClick: a[8] ||= (e) => u(X)?.chain().focus().setTextAlign("right").run()
|
|
328
354
|
}, [i("span", {
|
|
329
355
|
class: "dupdoc-toolbar-icon",
|
|
330
356
|
innerHTML: Y.alignRight
|
|
331
|
-
}, null, 8,
|
|
357
|
+
}, null, 8, Ue)], 10, He)
|
|
332
358
|
]),
|
|
333
|
-
i("div",
|
|
359
|
+
i("div", We, [
|
|
334
360
|
i("button", {
|
|
335
361
|
type: "button",
|
|
336
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
362
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("bulletList") }]),
|
|
337
363
|
"data-tooltip": "无序列表",
|
|
338
364
|
"aria-label": "无序列表",
|
|
339
365
|
disabled: J.value,
|
|
340
|
-
onClick: a[9] ||= (e) =>
|
|
366
|
+
onClick: a[9] ||= (e) => u(X)?.chain().focus().toggleBulletList().run()
|
|
341
367
|
}, [i("span", {
|
|
342
368
|
class: "dupdoc-toolbar-icon",
|
|
343
369
|
innerHTML: Y.bulletList
|
|
344
|
-
}, null, 8,
|
|
370
|
+
}, null, 8, Ke)], 10, Ge),
|
|
345
371
|
i("button", {
|
|
346
372
|
type: "button",
|
|
347
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
373
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("orderedList") }]),
|
|
348
374
|
"data-tooltip": "有序列表",
|
|
349
375
|
"aria-label": "有序列表",
|
|
350
376
|
disabled: J.value,
|
|
351
|
-
onClick: a[10] ||= (e) =>
|
|
377
|
+
onClick: a[10] ||= (e) => u(X)?.chain().focus().toggleOrderedList().run()
|
|
352
378
|
}, [i("span", {
|
|
353
379
|
class: "dupdoc-toolbar-icon",
|
|
354
380
|
innerHTML: Y.orderedList
|
|
355
|
-
}, null, 8,
|
|
381
|
+
}, null, 8, Je)], 10, qe),
|
|
356
382
|
i("button", {
|
|
357
383
|
type: "button",
|
|
358
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
384
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("taskList") }]),
|
|
359
385
|
"data-tooltip": "任务列表",
|
|
360
386
|
"aria-label": "任务列表",
|
|
361
387
|
disabled: J.value,
|
|
362
|
-
onClick: a[11] ||= (e) =>
|
|
388
|
+
onClick: a[11] ||= (e) => u(X)?.chain().focus().toggleTaskList().run()
|
|
363
389
|
}, [i("span", {
|
|
364
390
|
class: "dupdoc-toolbar-icon",
|
|
365
391
|
innerHTML: Y.taskList
|
|
366
|
-
}, null, 8,
|
|
392
|
+
}, null, 8, Xe)], 10, Ye),
|
|
367
393
|
i("button", {
|
|
368
394
|
type: "button",
|
|
369
|
-
class: s(["dupdoc-toolbar-button", { active:
|
|
395
|
+
class: s(["dupdoc-toolbar-button", { active: u(X)?.isActive("blockquote") }]),
|
|
370
396
|
"data-tooltip": "引用",
|
|
371
397
|
"aria-label": "引用",
|
|
372
398
|
disabled: J.value,
|
|
373
|
-
onClick: a[12] ||= (e) =>
|
|
399
|
+
onClick: a[12] ||= (e) => u(X)?.chain().focus().toggleBlockquote().run()
|
|
374
400
|
}, [i("span", {
|
|
375
401
|
class: "dupdoc-toolbar-icon",
|
|
376
402
|
innerHTML: Y.quote
|
|
377
|
-
}, null, 8,
|
|
403
|
+
}, null, 8, Qe)], 10, Ze),
|
|
378
404
|
i("button", {
|
|
379
405
|
type: "button",
|
|
380
406
|
class: "dupdoc-toolbar-button",
|
|
381
407
|
"data-tooltip": "插入分割线",
|
|
382
408
|
"aria-label": "插入分割线",
|
|
383
409
|
disabled: J.value,
|
|
384
|
-
onClick: a[13] ||= (e) =>
|
|
410
|
+
onClick: a[13] ||= (e) => u(X)?.chain().focus().setHorizontalRule().run()
|
|
385
411
|
}, [i("span", {
|
|
386
412
|
class: "dupdoc-toolbar-icon",
|
|
387
413
|
innerHTML: Y.divider
|
|
388
|
-
}, null, 8,
|
|
414
|
+
}, null, 8, et)], 8, $e),
|
|
389
415
|
i("button", {
|
|
390
416
|
type: "button",
|
|
391
417
|
class: "dupdoc-toolbar-button",
|
|
392
418
|
"data-tooltip": "插入基础表格",
|
|
393
419
|
"aria-label": "插入基础表格",
|
|
394
420
|
disabled: J.value,
|
|
395
|
-
onClick:
|
|
421
|
+
onClick: dt
|
|
396
422
|
}, [i("span", {
|
|
397
423
|
class: "dupdoc-toolbar-icon",
|
|
398
424
|
innerHTML: Y.table
|
|
399
|
-
}, null, 8,
|
|
425
|
+
}, null, 8, nt)], 8, tt)
|
|
400
426
|
]),
|
|
401
|
-
i("div",
|
|
427
|
+
i("div", rt, [i("button", {
|
|
402
428
|
type: "button",
|
|
403
429
|
class: "dupdoc-toolbar-button dupdoc-toolbar-button--primary",
|
|
404
430
|
"data-tooltip": "定位当前重复点",
|
|
405
431
|
"aria-label": "定位当前重复点",
|
|
406
|
-
onClick:
|
|
432
|
+
onClick: mt
|
|
407
433
|
}, [i("span", {
|
|
408
434
|
class: "dupdoc-toolbar-icon",
|
|
409
435
|
innerHTML: Y.locate
|
|
410
|
-
}, null, 8,
|
|
411
|
-
]), i("div",
|
|
436
|
+
}, null, 8, it)])])
|
|
437
|
+
]), i("div", at, [u(X) ? (c(), t(u(_), {
|
|
412
438
|
key: 0,
|
|
413
|
-
editor:
|
|
439
|
+
editor: u(X)
|
|
414
440
|
}, null, 8, ["editor"])) : n("", !0)])], 512));
|
|
415
441
|
}
|
|
416
442
|
});
|
|
417
443
|
//#endregion
|
|
418
|
-
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",
|