@cmstops/pro-compo 0.3.39 → 0.3.40

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.
Files changed (41) hide show
  1. package/dist/index.css +74 -0
  2. package/dist/index.min.css +1 -1
  3. package/es/docHistory/component.d.ts +0 -0
  4. package/es/docHistory/component.js +100 -0
  5. package/es/docHistory/components/DocDiffPanel/index.d.ts +0 -0
  6. package/es/docHistory/components/DocDiffPanel/index.js +22 -0
  7. package/es/docHistory/components/DocHistoryList/index.d.ts +0 -0
  8. package/es/docHistory/components/DocHistoryList/index.js +37 -0
  9. package/es/docHistory/index.d.ts +2 -0
  10. package/es/docHistory/index.js +7 -0
  11. package/es/docHistory/scripts/diff.d.ts +1 -0
  12. package/es/docHistory/scripts/diff.js +293 -0
  13. package/es/docHistory/scripts/useDocHistory.d.ts +10 -0
  14. package/es/docHistory/scripts/useDocHistory.js +71 -0
  15. package/es/docHistory/style/css.js +1 -0
  16. package/es/docHistory/style/docDiffPanel.less +9 -0
  17. package/es/docHistory/style/docHistoryList.less +58 -0
  18. package/es/docHistory/style/index.css +74 -0
  19. package/es/docHistory/style/index.d.ts +1 -0
  20. package/es/docHistory/style/index.js +1 -0
  21. package/es/docHistory/style/index.less +28 -0
  22. package/es/index.css +74 -0
  23. package/es/index.d.ts +1 -0
  24. package/es/index.js +1 -0
  25. package/es/index.less +1 -0
  26. package/lib/docHistory/component.js +101 -0
  27. package/lib/docHistory/components/DocDiffPanel/index.js +23 -0
  28. package/lib/docHistory/components/DocHistoryList/index.js +38 -0
  29. package/lib/docHistory/index.js +8 -0
  30. package/lib/docHistory/scripts/diff.js +295 -0
  31. package/lib/docHistory/scripts/useDocHistory.js +74 -0
  32. package/lib/docHistory/style/css.js +2 -0
  33. package/lib/docHistory/style/docDiffPanel.less +9 -0
  34. package/lib/docHistory/style/docHistoryList.less +58 -0
  35. package/lib/docHistory/style/index.css +74 -0
  36. package/lib/docHistory/style/index.js +2 -0
  37. package/lib/docHistory/style/index.less +28 -0
  38. package/lib/index.css +74 -0
  39. package/lib/index.js +2 -0
  40. package/lib/index.less +1 -0
  41. package/package.json +7 -5
@@ -0,0 +1,74 @@
1
+ .doc-diff-panel-wrap {
2
+ padding: 24px;
3
+ }
4
+ .doc-diff-panel-wrap .doc-title {
5
+ color: var(--color-text-1);
6
+ font-weight: bold;
7
+ font-size: 24px;
8
+ }
9
+ .doc-history-list-wrap {
10
+ box-sizing: border-box;
11
+ border-left: 1px solid var(--color-border-1);
12
+ }
13
+ .doc-history-list-wrap .doc-history-item {
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: 5px;
17
+ box-sizing: border-box;
18
+ width: 260px;
19
+ padding: 20px 16px;
20
+ border-bottom: 1px solid var(--color-border-1);
21
+ border-left: 3px solid transparent;
22
+ cursor: pointer;
23
+ }
24
+ .doc-history-list-wrap .doc-history-item .update-time {
25
+ color: var(--color-text-1);
26
+ font-size: 14px;
27
+ }
28
+ .doc-history-list-wrap .doc-history-item .tips {
29
+ color: var(--color-text-2);
30
+ font-size: 12px;
31
+ }
32
+ .doc-history-list-wrap .doc-history-item .doc-author {
33
+ display: flex;
34
+ gap: 8px;
35
+ align-items: center;
36
+ color: var(--color-text-1);
37
+ font-size: 14px;
38
+ }
39
+ .doc-history-list-wrap .doc-history-item .doc-author::before {
40
+ width: 5px;
41
+ height: 5px;
42
+ background-color: rgb(var(--primary-6));
43
+ border-radius: 50%;
44
+ content: ' ';
45
+ }
46
+ .doc-history-list-wrap .doc-history-item.active {
47
+ background-color: rgba(var(--primary-6), 0.1);
48
+ border-left-color: rgb(var(--primary-6));
49
+ }
50
+ .doc-history-list-wrap .doc-history-item.active .update-time {
51
+ color: rgb(var(--primary-6));
52
+ }
53
+ .doc-history-list-wrap .doc-history-item:hover {
54
+ background-color: var(--color-fill-1);
55
+ }
56
+ .doc-history-wrap {
57
+ display: flex;
58
+ width: 100%;
59
+ height: 100%;
60
+ overflow: hidden;
61
+ }
62
+ .doc-history-wrap .doc-diff-panel {
63
+ flex: 1;
64
+ height: 100%;
65
+ }
66
+ .doc-history-wrap .doc-diff-panel .doc-diff-panel-wrap {
67
+ padding: 24px;
68
+ }
69
+ .doc-history-wrap .doc-history-list {
70
+ height: 100%;
71
+ }
72
+ .doc-history-drawer .arco-drawer-body {
73
+ padding: 0;
74
+ }
@@ -0,0 +1 @@
1
+ import './index.less';
@@ -0,0 +1 @@
1
+ import "./index.less";
@@ -0,0 +1,28 @@
1
+ @import './docDiffPanel.less';
2
+ @import './docHistoryList.less';
3
+
4
+ .doc-history-wrap {
5
+ display: flex;
6
+ width: 100%;
7
+ height: 100%;
8
+ overflow: hidden;
9
+
10
+ .doc-diff-panel {
11
+ flex: 1;
12
+ height: 100%;
13
+
14
+ .doc-diff-panel-wrap {
15
+ padding: 24px;
16
+ }
17
+ }
18
+
19
+ .doc-history-list {
20
+ height: 100%;
21
+ }
22
+ }
23
+
24
+ .doc-history-drawer {
25
+ .arco-drawer-body {
26
+ padding: 0;
27
+ }
28
+ }
package/es/index.css CHANGED
@@ -4672,3 +4672,77 @@
4672
4672
  font-size: 20px;
4673
4673
  cursor: pointer;
4674
4674
  }
4675
+ .doc-diff-panel-wrap {
4676
+ padding: 24px;
4677
+ }
4678
+ .doc-diff-panel-wrap .doc-title {
4679
+ color: var(--color-text-1);
4680
+ font-weight: bold;
4681
+ font-size: 24px;
4682
+ }
4683
+ .doc-history-list-wrap {
4684
+ box-sizing: border-box;
4685
+ border-left: 1px solid var(--color-border-1);
4686
+ }
4687
+ .doc-history-list-wrap .doc-history-item {
4688
+ display: flex;
4689
+ flex-direction: column;
4690
+ gap: 5px;
4691
+ box-sizing: border-box;
4692
+ width: 260px;
4693
+ padding: 20px 16px;
4694
+ border-bottom: 1px solid var(--color-border-1);
4695
+ border-left: 3px solid transparent;
4696
+ cursor: pointer;
4697
+ }
4698
+ .doc-history-list-wrap .doc-history-item .update-time {
4699
+ color: var(--color-text-1);
4700
+ font-size: 14px;
4701
+ }
4702
+ .doc-history-list-wrap .doc-history-item .tips {
4703
+ color: var(--color-text-2);
4704
+ font-size: 12px;
4705
+ }
4706
+ .doc-history-list-wrap .doc-history-item .doc-author {
4707
+ display: flex;
4708
+ gap: 8px;
4709
+ align-items: center;
4710
+ color: var(--color-text-1);
4711
+ font-size: 14px;
4712
+ }
4713
+ .doc-history-list-wrap .doc-history-item .doc-author::before {
4714
+ width: 5px;
4715
+ height: 5px;
4716
+ background-color: rgb(var(--primary-6));
4717
+ border-radius: 50%;
4718
+ content: ' ';
4719
+ }
4720
+ .doc-history-list-wrap .doc-history-item.active {
4721
+ background-color: rgba(var(--primary-6), 0.1);
4722
+ border-left-color: rgb(var(--primary-6));
4723
+ }
4724
+ .doc-history-list-wrap .doc-history-item.active .update-time {
4725
+ color: rgb(var(--primary-6));
4726
+ }
4727
+ .doc-history-list-wrap .doc-history-item:hover {
4728
+ background-color: var(--color-fill-1);
4729
+ }
4730
+ .doc-history-wrap {
4731
+ display: flex;
4732
+ width: 100%;
4733
+ height: 100%;
4734
+ overflow: hidden;
4735
+ }
4736
+ .doc-history-wrap .doc-diff-panel {
4737
+ flex: 1;
4738
+ height: 100%;
4739
+ }
4740
+ .doc-history-wrap .doc-diff-panel .doc-diff-panel-wrap {
4741
+ padding: 24px;
4742
+ }
4743
+ .doc-history-wrap .doc-history-list {
4744
+ height: 100%;
4745
+ }
4746
+ .doc-history-drawer .arco-drawer-body {
4747
+ padding: 0;
4748
+ }
package/es/index.d.ts CHANGED
@@ -25,3 +25,4 @@ export { default as mediaView } from './mediaView';
25
25
  export { default as thumbCard } from './thumbCard';
26
26
  export { default as selectResourceModal } from './selectResourceModal';
27
27
  export { default as docPreview } from './docPreview';
28
+ export { default as docHistory } from './docHistory';
package/es/index.js CHANGED
@@ -25,3 +25,4 @@ export { default as mediaView } from "./mediaView/index.js";
25
25
  export { default as thumbCard } from "./thumbCard/index.js";
26
26
  export { default as selectResourceModal } from "./selectResourceModal/index.js";
27
27
  export { default as docPreview } from "./docPreview/index.js";
28
+ export { default as docHistory } from "./docHistory/index.js";
package/es/index.less CHANGED
@@ -25,3 +25,4 @@
25
25
  @import './thumbCard/style/index.less';
26
26
  @import './selectResourceModal/style/index.less';
27
27
  @import './docPreview/style/index.less';
28
+ @import './docHistory/style/index.less';
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var webVue = require("@arco-design/web-vue");
4
+ var config = require("../config.js");
5
+ var useDocHistory = require("./scripts/useDocHistory.js");
6
+ var index$1 = require("./components/DocHistoryList/index.js");
7
+ var index = require("./components/DocDiffPanel/index.js");
8
+ const _hoisted_1 = { class: "doc-history-wrap" };
9
+ const _hoisted_2 = { class: "doc-diff-panel" };
10
+ const _hoisted_3 = { class: "doc-history-list" };
11
+ const _sfc_main = vue.defineComponent({
12
+ ...{ name: "docHistory" },
13
+ __name: "component",
14
+ props: {
15
+ BASE_API: {},
16
+ visible: { type: Boolean },
17
+ docInfo: {},
18
+ pub: { type: Boolean }
19
+ },
20
+ emits: ["update:visible"],
21
+ setup(__props, { emit: __emit }) {
22
+ const props = __props;
23
+ const emits = __emit;
24
+ const vis = vue.computed({
25
+ get: () => props.visible,
26
+ set: (val) => {
27
+ emits("update:visible", val);
28
+ }
29
+ });
30
+ const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
31
+ const {
32
+ initParams,
33
+ loadData,
34
+ handleSelect,
35
+ loading,
36
+ diffContent,
37
+ list,
38
+ current
39
+ } = useDocHistory.useDocHistory(BASE_API);
40
+ vue.onMounted(() => {
41
+ if (!props.docInfo)
42
+ return;
43
+ initParams(props.docInfo.id, props.pub);
44
+ loadData();
45
+ });
46
+ return (_ctx, _cache) => {
47
+ return vue.openBlock(), vue.createBlock(vue.unref(webVue.Drawer), {
48
+ visible: vis.value,
49
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => vis.value = $event),
50
+ class: "doc-history-drawer",
51
+ title: "\u7248\u672C\u8BB0\u5F55",
52
+ width: 1e3,
53
+ footer: false
54
+ }, {
55
+ default: vue.withCtx(() => [
56
+ vue.createElementVNode("div", _hoisted_1, [
57
+ vue.createElementVNode("div", _hoisted_2, [
58
+ vue.createVNode(vue.unref(webVue.Spin), {
59
+ loading: vue.unref(loading),
60
+ style: { "height": "100%", "width": "100%" }
61
+ }, {
62
+ default: vue.withCtx(() => [
63
+ vue.createVNode(vue.unref(webVue.Scrollbar), {
64
+ "outer-style": { height: "100%" },
65
+ style: { "height": "100%", "overflow": "auto" }
66
+ }, {
67
+ default: vue.withCtx(() => [
68
+ vue.unref(diffContent) ? (vue.openBlock(), vue.createBlock(index, {
69
+ key: 0,
70
+ doc: vue.unref(diffContent)
71
+ }, null, 8, ["doc"])) : vue.createCommentVNode("v-if", true)
72
+ ]),
73
+ _: 1
74
+ })
75
+ ]),
76
+ _: 1
77
+ }, 8, ["loading"])
78
+ ]),
79
+ vue.createElementVNode("div", _hoisted_3, [
80
+ vue.createVNode(vue.unref(webVue.Scrollbar), {
81
+ "outer-style": { height: "100%" },
82
+ style: { "height": "100%", "overflow": "auto" }
83
+ }, {
84
+ default: vue.withCtx(() => [
85
+ vue.createVNode(index$1, {
86
+ list: vue.unref(list),
87
+ current: vue.unref(current),
88
+ onSelect: vue.unref(handleSelect)
89
+ }, null, 8, ["list", "current", "onSelect"])
90
+ ]),
91
+ _: 1
92
+ })
93
+ ])
94
+ ])
95
+ ]),
96
+ _: 1
97
+ }, 8, ["visible"]);
98
+ };
99
+ }
100
+ });
101
+ module.exports = _sfc_main;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ const _hoisted_1 = { class: "doc-diff-panel-wrap" };
4
+ const _hoisted_2 = { class: "doc-title" };
5
+ const _hoisted_3 = ["innerHTML"];
6
+ const _sfc_main = vue.defineComponent({
7
+ __name: "index",
8
+ props: {
9
+ doc: {}
10
+ },
11
+ setup(__props) {
12
+ return (_ctx, _cache) => {
13
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
14
+ vue.createElementVNode("div", _hoisted_2, vue.toDisplayString(_ctx.doc.title), 1),
15
+ vue.createElementVNode("div", {
16
+ class: "doc-content",
17
+ innerHTML: _ctx.doc.content
18
+ }, null, 8, _hoisted_3)
19
+ ]);
20
+ };
21
+ }
22
+ });
23
+ module.exports = _sfc_main;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var vue = require("vue");
3
+ var index = require("../../../utils/index.js");
4
+ const _hoisted_1 = { class: "doc-history-list-wrap" };
5
+ const _hoisted_2 = ["onClick"];
6
+ const _hoisted_3 = { class: "update-time" };
7
+ const _hoisted_4 = {
8
+ key: 0,
9
+ class: "tips"
10
+ };
11
+ const _hoisted_5 = { class: "doc-author" };
12
+ const _sfc_main = vue.defineComponent({
13
+ __name: "index",
14
+ props: {
15
+ list: {},
16
+ current: {}
17
+ },
18
+ emits: ["select"],
19
+ setup(__props, { emit: __emit }) {
20
+ const emits = __emit;
21
+ return (_ctx, _cache) => {
22
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
23
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item, idx) => {
24
+ return vue.openBlock(), vue.createElementBlock("div", {
25
+ key: item,
26
+ class: vue.normalizeClass(["doc-history-item", { active: idx === _ctx.current }]),
27
+ onClick: ($event) => emits("select", idx)
28
+ }, [
29
+ vue.createElementVNode("div", _hoisted_3, vue.toDisplayString(vue.unref(index.timeFormat)(item.update_time)), 1),
30
+ idx === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, " \u6700\u8FD1\u66F4\u65B0")) : vue.createCommentVNode("v-if", true),
31
+ vue.createElementVNode("div", _hoisted_5, vue.toDisplayString(item.author), 1)
32
+ ], 10, _hoisted_2);
33
+ }), 128))
34
+ ]);
35
+ };
36
+ }
37
+ });
38
+ module.exports = _sfc_main;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var component = require("./component.js");
3
+ const docHistory = Object.assign(component, {
4
+ install: (app) => {
5
+ app.component(component.name, component);
6
+ }
7
+ });
8
+ module.exports = docHistory;
@@ -0,0 +1,295 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ var diff = require("diff");
4
+ function GetAllTextNodes(parent) {
5
+ let nodesList = [];
6
+ const layer = parent.childNodes;
7
+ const childNum = layer.length;
8
+ for (let i = 0; i < childNum; i++) {
9
+ const childNode = layer[i];
10
+ const noteType = childNode.nodeType;
11
+ if (noteType === 3 && Trim(childNode.data).length !== 0) {
12
+ nodesList[nodesList.length] = childNode;
13
+ }
14
+ if (noteType === 1) {
15
+ nodesList = nodesList.concat(GetAllTextNodes(childNode));
16
+ }
17
+ }
18
+ return nodesList;
19
+ }
20
+ function CompareById2(leftNode, rightNode) {
21
+ const lftList = GetAllTextNodes(leftNode);
22
+ const rhtList = GetAllTextNodes(rightNode);
23
+ CompareNodes(lftList, rhtList);
24
+ return leftNode.innerHTML;
25
+ }
26
+ function Equal(v_node1, v_node2) {
27
+ if (v_node1.data === v_node2.data)
28
+ return true;
29
+ return false;
30
+ }
31
+ function CompareText(v_LeftList, v_RightList, lftPNode = null) {
32
+ const leftLen = v_LeftList.length;
33
+ const rightLen = v_RightList.length;
34
+ if (rightLen === leftLen && rightLen === 1) {
35
+ if (v_LeftList[0].data.length === v_RightList[0].data.length && v_RightList[0].data.length === 1)
36
+ return;
37
+ }
38
+ if (leftLen === 0) {
39
+ let rightFather = null;
40
+ for (let i = 0; i < rightLen; i++) {
41
+ if (!rightFather)
42
+ rightFather = v_RightList[i].parentNode;
43
+ const node = v_RightList[i].clone(true);
44
+ try {
45
+ rightFather.removeChild(v_RightList[i]);
46
+ } catch (e) {
47
+ console.log(e);
48
+ }
49
+ if (lftPNode)
50
+ lftPNode.appendChild(node);
51
+ PaintRemove(node);
52
+ }
53
+ } else if (rightLen === 0) {
54
+ for (let i = 0; i < leftLen; i++)
55
+ PaintAdd(v_LeftList[i]);
56
+ } else {
57
+ const LeftTextList = GetCharList(v_LeftList);
58
+ const RightTextList = GetCharList(v_RightList);
59
+ const diff$1 = diff.diffChars(RightTextList.join(""), LeftTextList.join(""));
60
+ let leftFather = null;
61
+ for (let i = 0; i < v_LeftList.length; i++) {
62
+ if (!leftFather)
63
+ leftFather = v_LeftList[i].parentNode;
64
+ try {
65
+ leftFather.removeChild(v_LeftList[i]);
66
+ } catch (e) {
67
+ console.log(e);
68
+ }
69
+ }
70
+ diff$1.forEach((item) => {
71
+ if (item.added) {
72
+ const addNode = document.createTextNode(item.value);
73
+ leftFather.appendChild(addNode);
74
+ PaintAdd(addNode);
75
+ return;
76
+ }
77
+ if (item.removed) {
78
+ const removeNode = document.createTextNode(item.value);
79
+ leftFather.appendChild(removeNode);
80
+ PaintRemove(removeNode);
81
+ return;
82
+ }
83
+ const changeNode = document.createTextNode(item.value);
84
+ leftFather.appendChild(changeNode);
85
+ });
86
+ }
87
+ }
88
+ function GetCharList(v_nodeList) {
89
+ const CharList = [];
90
+ for (let i = 0; i < v_nodeList.length; i++) {
91
+ const text = v_nodeList[i].data;
92
+ for (let j = 0; j < text.length; j++) {
93
+ CharList[CharList.length] = text.charAt(j);
94
+ }
95
+ }
96
+ return CharList;
97
+ }
98
+ function PaintAdd(vNode) {
99
+ const nNode = document.createElement("span");
100
+ nNode.style.background = "#d3fadc";
101
+ const c = vNode.cloneNode(true);
102
+ nNode.appendChild(c);
103
+ const f = vNode.parentNode;
104
+ f.replaceChild(nNode, vNode);
105
+ vNode = c;
106
+ return vNode;
107
+ }
108
+ function PaintRemove(vNode) {
109
+ const nNode = document.createElement("span");
110
+ nNode.style.textDecoration = "line-through";
111
+ nNode.style.background = "#f7cfd3";
112
+ const c = vNode.cloneNode(true);
113
+ nNode.appendChild(c);
114
+ const f = vNode.parentNode;
115
+ f.replaceChild(nNode, vNode);
116
+ vNode = c;
117
+ return vNode;
118
+ }
119
+ function GetNodeList(v_nodesList, v_begin, v_len) {
120
+ const List = [];
121
+ for (let j = 0; j < v_len; j++) {
122
+ List[j] = v_nodesList[v_begin + j];
123
+ }
124
+ return List;
125
+ }
126
+ function LTrim(s) {
127
+ return s.replace(/^\s*/, "");
128
+ }
129
+ function RTrim(s) {
130
+ return s.replace(/\s*$/, "");
131
+ }
132
+ function Trim(s) {
133
+ return RTrim(LTrim(s));
134
+ }
135
+ function CompareNodes(v_LeftNodesList, v_RightNodesList) {
136
+ let PreRightIndex = -1;
137
+ let PreLeftIndex = -1;
138
+ let RightIndex = 0;
139
+ let LeftIndex = 0;
140
+ const nLeftNodesListLen = v_LeftNodesList.length;
141
+ const nRightNodesListLen = v_RightNodesList.length;
142
+ while (LeftIndex <= nLeftNodesListLen || RightIndex <= nRightNodesListLen) {
143
+ const leftFather = LeftIndex === nLeftNodesListLen ? v_LeftNodesList[LeftIndex - 1] : v_LeftNodesList[LeftIndex];
144
+ if (LeftIndex === nLeftNodesListLen) {
145
+ try {
146
+ CompareText(
147
+ GetNodeList(
148
+ v_LeftNodesList,
149
+ PreLeftIndex + 1,
150
+ LeftIndex - PreLeftIndex - 1
151
+ ),
152
+ GetNodeList(
153
+ v_RightNodesList,
154
+ PreRightIndex + 1,
155
+ RightIndex - PreRightIndex - 1
156
+ ),
157
+ leftFather
158
+ );
159
+ } catch (e) {
160
+ console.log("\u5220\u9664\u6570\u636E\u586B\u5145\u5F02\u5E38");
161
+ throw e;
162
+ }
163
+ break;
164
+ }
165
+ if (RightIndex === nRightNodesListLen) {
166
+ try {
167
+ CompareText(
168
+ GetNodeList(
169
+ v_LeftNodesList,
170
+ PreLeftIndex + 1,
171
+ LeftIndex - PreLeftIndex - 1
172
+ ),
173
+ GetNodeList(
174
+ v_RightNodesList,
175
+ PreRightIndex + 1,
176
+ RightIndex - PreRightIndex - 1
177
+ ),
178
+ leftFather
179
+ );
180
+ for (let j = LeftIndex; j < nLeftNodesListLen; j++)
181
+ v_RightNodesList[j] = PaintAdd(v_LeftNodesList[j]);
182
+ break;
183
+ } catch (e) {
184
+ console.log("\u65B0\u589E\u6570\u636E\u586B\u5145\u5F02\u5E38");
185
+ throw e;
186
+ }
187
+ }
188
+ if (Equal(v_LeftNodesList[LeftIndex], v_RightNodesList[RightIndex])) {
189
+ if (v_LeftNodesList[LeftIndex].data.length > 1) {
190
+ try {
191
+ CompareText(
192
+ GetNodeList(
193
+ v_LeftNodesList,
194
+ PreLeftIndex + 1,
195
+ LeftIndex - PreLeftIndex - 1
196
+ ),
197
+ GetNodeList(
198
+ v_RightNodesList,
199
+ PreRightIndex + 1,
200
+ RightIndex - PreRightIndex - 1
201
+ ),
202
+ leftFather
203
+ );
204
+ } catch (e) {
205
+ console.log("\u76F8\u4F3C\u8282\u70B9\u5BF9\u6BD4\u5F02\u5E38");
206
+ throw e;
207
+ }
208
+ PreLeftIndex = LeftIndex;
209
+ PreRightIndex = RightIndex;
210
+ } else if (v_LeftNodesList[LeftIndex].data.length === 1 && v_LeftNodesList[LeftIndex].data.charCodeAt(0) > 127) {
211
+ PreLeftIndex = LeftIndex;
212
+ PreRightIndex = RightIndex;
213
+ }
214
+ LeftIndex++;
215
+ RightIndex++;
216
+ } else {
217
+ let i = 0;
218
+ for (i = RightIndex + 1; i < nRightNodesListLen; i++) {
219
+ if (Equal(v_LeftNodesList[LeftIndex], v_RightNodesList[i])) {
220
+ if (v_LeftNodesList[LeftIndex].data.length > 1) {
221
+ CompareText(
222
+ GetNodeList(
223
+ v_LeftNodesList,
224
+ PreLeftIndex + 1,
225
+ LeftIndex - PreLeftIndex - 1
226
+ ),
227
+ GetNodeList(
228
+ v_RightNodesList,
229
+ PreRightIndex + 1,
230
+ i - PreRightIndex - 1
231
+ ),
232
+ leftFather
233
+ );
234
+ PreLeftIndex = LeftIndex;
235
+ PreRightIndex = i;
236
+ LeftIndex++;
237
+ RightIndex = i + 1;
238
+ } else {
239
+ if (v_LeftNodesList[LeftIndex].data.length === 1 && v_LeftNodesList[LeftIndex].data.charCodeAt(0) > 127) {
240
+ PreLeftIndex = LeftIndex;
241
+ PreRightIndex = RightIndex;
242
+ }
243
+ RightIndex++;
244
+ LeftIndex++;
245
+ }
246
+ break;
247
+ }
248
+ }
249
+ if (i === nRightNodesListLen) {
250
+ i = 0;
251
+ for (i = LeftIndex + 1; i < nLeftNodesListLen; i++) {
252
+ if (Equal(v_RightNodesList[RightIndex], v_LeftNodesList[i])) {
253
+ if (v_LeftNodesList[i].data.length > 1) {
254
+ try {
255
+ CompareText(
256
+ GetNodeList(
257
+ v_LeftNodesList,
258
+ PreLeftIndex + 1,
259
+ i - PreLeftIndex - 1
260
+ ),
261
+ GetNodeList(
262
+ v_RightNodesList,
263
+ PreRightIndex + 1,
264
+ RightIndex - PreRightIndex - 1
265
+ ),
266
+ leftFather
267
+ );
268
+ } catch (e) {
269
+ console.log("\u975E\u76F8\u4F3C\u8282\u70B9\u5BF9\u6BD4\u5F02\u5E38");
270
+ throw e;
271
+ }
272
+ PreLeftIndex = i;
273
+ PreRightIndex = RightIndex;
274
+ RightIndex++;
275
+ LeftIndex = i + 1;
276
+ } else {
277
+ if (v_LeftNodesList[LeftIndex].data.length === 1 && v_LeftNodesList[LeftIndex].data.charCodeAt(0) > 127) {
278
+ PreLeftIndex = LeftIndex;
279
+ PreRightIndex = RightIndex;
280
+ }
281
+ RightIndex++;
282
+ LeftIndex++;
283
+ }
284
+ break;
285
+ }
286
+ }
287
+ if (i === nLeftNodesListLen) {
288
+ LeftIndex++;
289
+ RightIndex++;
290
+ }
291
+ }
292
+ }
293
+ }
294
+ }
295
+ exports.CompareById2 = CompareById2;