@opentiny/vue-renderless 3.17.6 → 3.18.0
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 +12 -3
- package/anchor/index.js +6 -2
- package/autocomplete/index.js +12 -11
- package/autocomplete/vue.js +35 -7
- package/collapse-item/index.js +7 -1
- package/collapse-item/vue.js +12 -2
- package/color-picker/index.js +20 -32
- package/color-picker/vue.js +31 -54
- package/color-select-panel/index.js +8 -5
- package/color-select-panel/vue.js +1 -2
- package/common/deps/clickoutside.js +10 -3
- package/common/deps/tree-model/tree-store.js +13 -2
- package/common/deps/useRelation.js +24 -7
- package/common/form/const.js +10 -0
- package/common/index.js +1 -1
- package/common/runtime.js +1 -1
- package/dialog-box/index.js +1 -1
- package/dialog-select/index.js +40 -13
- package/dialog-select/vue.js +3 -3
- package/dropdown-item/mf.js +1 -1
- package/dropdown-menu/index.js +3 -0
- package/dropdown-menu/vue.js +5 -3
- package/file-upload/index.js +4 -4
- package/fluent-editor/index.js +10 -3
- package/fluent-editor/options.js +32 -2
- package/fluent-editor/vue.js +8 -8
- package/form-item/index.js +6 -1
- package/form-item/vue.js +3 -1
- package/guide/index.js +4 -4
- package/input/index.js +15 -0
- package/input/vue.js +11 -4
- package/option/index.js +0 -15
- package/option/vue.js +2 -13
- package/package.json +1 -1
- package/pager-item/index.js +4 -7
- package/picker/index.js +27 -7
- package/picker/vue.js +2 -1
- package/pop-upload/index.js +13 -4
- package/pop-upload/vue.js +4 -0
- package/popeditor/index.js +2 -1
- package/rich-text-editor/vue.js +9 -3
- package/select/index.js +5 -4
- package/select/vue.js +12 -4
- package/slider-button/index.js +8 -3
- package/slider-button/vue.js +6 -2
- package/slider-button-group/index.js +46 -9
- package/slider-button-group/vue.js +39 -18
- package/tab-item-mf/vue.js +6 -1
- package/tabs-mf/index.js +58 -3
- package/tabs-mf/vue-bar.js +0 -6
- package/tabs-mf/vue-swipe.js +20 -0
- package/tabs-mf/vue.js +22 -4
- package/time/index.js +6 -1
- package/time/vue.js +7 -2
- package/time-line/index.js +1 -1
- package/time-line-new/index.js +53 -0
- package/time-line-new/vue.js +41 -0
- package/time-spinner/index.js +1 -1
- package/time-spinner/vue.js +2 -2
- package/tooltip/vue.js +16 -3
- package/tree/index.js +1 -0
- package/tree/vue.js +4 -1
- package/tree-select/index.js +6 -6
- package/tree-select/vue.js +1 -1
- package/types/autocomplete.type.d.ts +16 -12
- package/types/button.type.d.ts +22 -1
- package/types/checkbox.type.d.ts +1 -0
- package/types/dropdown.type.d.ts +4 -0
- package/types/file-upload.type.d.ts +1 -1
- package/types/form-item.type.d.ts +1 -1
- package/types/{form.type-33aa784a.d.ts → form.type-f6fb4c38.d.ts} +5 -0
- package/types/form.type.d.ts +1 -1
- package/types/input.type.d.ts +5 -1
- package/types/link.type.d.ts +6 -1
- package/types/search.type.d.ts +7 -0
- package/types/tree-menu.type.d.ts +0 -1
- package/types/upload-dragger.type.d.ts +1 -1
- package/types/{upload-list.type-02a1effb.d.ts → upload-list.type-4194f534.d.ts} +6 -0
- package/types/upload-list.type.d.ts +1 -1
- package/types/upload.type.d.ts +1 -1
- package/types/user-head.type.d.ts +4 -1
package/dialog-select/index.js
CHANGED
|
@@ -55,24 +55,50 @@ const multiGridSelectAll = ({ api, props, state }) => ({ selection, checked }) =
|
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
} else {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
const { data = [] } = props.gridOp || {};
|
|
59
|
+
data.forEach((item) => {
|
|
60
|
+
const selectedItem = state.selectedValues.find((i) => i === item[props.valueField]);
|
|
61
|
+
if (selectedItem) {
|
|
62
|
+
const index = state.selectedValues.indexOf(selectedItem);
|
|
63
|
+
state.selectedValues.splice(index, 1);
|
|
64
|
+
state.selectedDatas.splice(index, 1);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
60
67
|
state.selectedChanged = true;
|
|
61
68
|
}
|
|
62
69
|
api.selectedBoxInit();
|
|
63
70
|
};
|
|
64
|
-
const multiGridSelectChange = ({ api, props, state }) => ({ row, checked }) => {
|
|
65
|
-
|
|
71
|
+
const multiGridSelectChange = ({ api, props, state, vm }) => ({ row, checked }) => {
|
|
72
|
+
var _a, _b, _c, _d, _e;
|
|
73
|
+
const property = props.valueField;
|
|
74
|
+
const grid = (_a = vm.$refs) == null ? void 0 : _a.multiGrid;
|
|
75
|
+
const selectedRows = grid.getSelectRecords();
|
|
66
76
|
if (checked) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
state.
|
|
77
|
+
const addSelectedRows = selectedRows.filter((row2) => !state.selectedValues.includes(row2[property]));
|
|
78
|
+
if (addSelectedRows.length > 0) {
|
|
79
|
+
state.selectedValues = [...state.selectedValues, ...addSelectedRows.map((row2) => row2[property])];
|
|
80
|
+
state.selectedDatas = [...state.selectedDatas, ...addSelectedRows];
|
|
70
81
|
state.selectedChanged = true;
|
|
71
82
|
}
|
|
72
83
|
} else {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
84
|
+
const childrenKey = (_c = (_b = props.gridOp) == null ? void 0 : _b.treeConfig) == null ? void 0 : _c.children;
|
|
85
|
+
const checkStrictly = (_e = (_d = props.gridOp) == null ? void 0 : _d.selectConfig) == null ? void 0 : _e.checkStrictly;
|
|
86
|
+
const getCancelRows = (row2, arr) => {
|
|
87
|
+
var _a2;
|
|
88
|
+
arr.push(row2);
|
|
89
|
+
if (((_a2 = row2[childrenKey]) == null ? void 0 : _a2.length) > 0) {
|
|
90
|
+
row2[childrenKey].forEach((childRow) => getCancelRows(childRow, arr));
|
|
91
|
+
}
|
|
92
|
+
return arr;
|
|
93
|
+
};
|
|
94
|
+
let cancelRows = checkStrictly ? [row] : getCancelRows(row, []);
|
|
95
|
+
cancelRows = cancelRows.filter((row2) => state.selectedValues.includes(row2[property]));
|
|
96
|
+
if (cancelRows.length > 0) {
|
|
97
|
+
cancelRows.forEach((row2) => {
|
|
98
|
+
const index = state.selectedValues.indexOf(row2[property]);
|
|
99
|
+
state.selectedValues.splice(index, 1);
|
|
100
|
+
state.selectedDatas.splice(index, 1);
|
|
101
|
+
});
|
|
76
102
|
state.selectedChanged = true;
|
|
77
103
|
}
|
|
78
104
|
}
|
|
@@ -275,15 +301,16 @@ const setChecked = ({ api, props, state }) => () => {
|
|
|
275
301
|
multi && api.selectedBoxInit();
|
|
276
302
|
}
|
|
277
303
|
};
|
|
278
|
-
const computedConfig = ({ props, state }) => () => {
|
|
304
|
+
const computedConfig = ({ props, state }) => (type) => {
|
|
279
305
|
const { multi, popseletor, gridOp } = props;
|
|
280
306
|
const { selectConfig = {}, radioConfig = {} } = gridOp || {};
|
|
281
307
|
const { selectedValues } = state;
|
|
282
308
|
let config = {};
|
|
283
309
|
if (popseletor === "grid") {
|
|
284
|
-
if (multi) {
|
|
310
|
+
if (multi && type === "select") {
|
|
285
311
|
config = Object.assign(config, selectConfig, { checkRowKeys: selectedValues });
|
|
286
|
-
}
|
|
312
|
+
}
|
|
313
|
+
if (!multi && type === "radio") {
|
|
287
314
|
config = Object.assign(config, radioConfig, { checkRowKey: selectedValues[0] });
|
|
288
315
|
}
|
|
289
316
|
}
|
package/dialog-select/vue.js
CHANGED
|
@@ -55,8 +55,8 @@ const renderless = (props, { reactive, computed, watch }, { vm, nextTick, emit }
|
|
|
55
55
|
selectedDatas: [],
|
|
56
56
|
selectedValues: [],
|
|
57
57
|
multiGridStore: {
|
|
58
|
-
selectConfig: computed(() => api2.computedConfig()),
|
|
59
|
-
radioConfig: computed(() => api2.computedConfig()),
|
|
58
|
+
selectConfig: computed(() => api2.computedConfig("select")),
|
|
59
|
+
radioConfig: computed(() => api2.computedConfig("radio")),
|
|
60
60
|
inited: false,
|
|
61
61
|
loading: false
|
|
62
62
|
},
|
|
@@ -92,7 +92,7 @@ const renderless = (props, { reactive, computed, watch }, { vm, nextTick, emit }
|
|
|
92
92
|
};
|
|
93
93
|
Object.assign(api2, {
|
|
94
94
|
multiGridSelectAll: multiGridSelectAll({ api: api2, props, state }),
|
|
95
|
-
multiGridSelectChange: multiGridSelectChange({ api: api2, props, state }),
|
|
95
|
+
multiGridSelectChange: multiGridSelectChange({ api: api2, props, state, vm }),
|
|
96
96
|
multiTreeAfterLoad: multiTreeAfterLoad({ api: api2, props, state, vm }),
|
|
97
97
|
multiTreeCheck: multiTreeCheck({ api: api2, props, state, vm, nextTick }),
|
|
98
98
|
multiTreeFilterPlain: multiTreeFilterPlain({ api: api2, props, state }),
|
package/dropdown-item/mf.js
CHANGED
|
@@ -65,7 +65,7 @@ const renderless = (props, { reactive, inject }, { dispatch, vm }) => {
|
|
|
65
65
|
Object.assign(api2, {
|
|
66
66
|
dataStore,
|
|
67
67
|
handleClick: handleClick({ dataStore, props, vm }),
|
|
68
|
-
mouseEnter: mouseEnter({ dataStore, vm }),
|
|
68
|
+
mouseEnter: mouseEnter({ dataStore, vm, props }),
|
|
69
69
|
mouseLeave: mouseLeave({ dataStore })
|
|
70
70
|
});
|
|
71
71
|
return api2;
|
package/dropdown-menu/index.js
CHANGED
package/dropdown-menu/vue.js
CHANGED
|
@@ -23,21 +23,23 @@ const renderless = (props, hooks, instance) => {
|
|
|
23
23
|
const api2 = {};
|
|
24
24
|
const { reactive, provide, onMounted, inject } = hooks;
|
|
25
25
|
const { nextTick, mode, vm, parent, dispatch, emit, designConfig } = instance;
|
|
26
|
+
provide("dropdownMenuVm", vm);
|
|
27
|
+
provide("multiStage", props.multiStage);
|
|
28
|
+
const dropdownVm = inject("dropdownVm");
|
|
26
29
|
const state = reactive({
|
|
27
30
|
offset: 0,
|
|
28
31
|
scroller: null,
|
|
29
32
|
children: [],
|
|
30
33
|
size: "",
|
|
31
34
|
showPopper: false,
|
|
35
|
+
initShowPopper: !dropdownVm.lazyShowPopper,
|
|
36
|
+
// 辅助变量,
|
|
32
37
|
label: "",
|
|
33
38
|
showContent: false,
|
|
34
39
|
selected: false,
|
|
35
40
|
selectedIndex: -1,
|
|
36
41
|
canvasHeight: inject("change-size", null)
|
|
37
42
|
});
|
|
38
|
-
provide("dropdownMenuVm", vm);
|
|
39
|
-
provide("multiStage", props.multiStage);
|
|
40
|
-
const dropdownVm = inject("dropdownVm");
|
|
41
43
|
if (mode === "mobile") {
|
|
42
44
|
nextTick(() => {
|
|
43
45
|
state.scroller = getScroller(vm.$refs.menu);
|
package/file-upload/index.js
CHANGED
|
@@ -2113,10 +2113,10 @@ const getTipMessage = ({ t, api, constants }) => ({ accept, fileSize, limit }) =
|
|
|
2113
2113
|
if (typeof fileSize === "number") {
|
|
2114
2114
|
fileSizeTip = `${t(constants.FILE_NOT_LESS_THAN)}${api.formatFileSize(fileSize * kibibyte)}`;
|
|
2115
2115
|
} else if (Array.isArray(fileSize)) {
|
|
2116
|
-
fileSizeTip += !isNaN(fileSize[0]) && fileSize[
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2116
|
+
fileSizeTip += !isNaN(fileSize[0]) && !isNaN(fileSize[1]) ? t(constants.FILE_SIZE_RANGE, {
|
|
2117
|
+
moreThan: api.formatFileSize(Number(fileSize[0]) * kibibyte),
|
|
2118
|
+
lessThan: api.formatFileSize(Number(fileSize[1]) * kibibyte)
|
|
2119
|
+
}) : "";
|
|
2120
2120
|
}
|
|
2121
2121
|
let limitTip = limit ? t(constants.NUMBER_LIMIT, { number: limit }) : "";
|
|
2122
2122
|
if ((fileSize || acceptTip.length !== 0) && limit) {
|
package/fluent-editor/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { xss } from "../common/xss";
|
|
|
5
5
|
import { set } from "../chart-core/deps/utils";
|
|
6
6
|
import { on, off } from "../common/deps/dom";
|
|
7
7
|
import PopupManager from "../common/deps/popup-manager";
|
|
8
|
-
const init = ({ api, emit, props, service, state, FluentEditor, UploaderDfls, defaultOptions, vm }) => () => {
|
|
8
|
+
const init = ({ api, emit, props, service, state, FluentEditor, UploaderDfls, defaultOptions, vm, useBreakpoint, simpleToolbar }) => () => {
|
|
9
9
|
UploaderDfls.enableMultiUpload = { file: true, image: true };
|
|
10
10
|
UploaderDfls.handler = api.uploaderDflsHandler;
|
|
11
11
|
UploaderDfls.imagePasteFailCallback = props.imagePasteFailCallback;
|
|
@@ -26,6 +26,10 @@ const init = ({ api, emit, props, service, state, FluentEditor, UploaderDfls, de
|
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
api.setToolbarTips();
|
|
29
|
+
const { current } = useBreakpoint();
|
|
30
|
+
if (current.value === "default") {
|
|
31
|
+
state.innerOptions.modules.toolbar = simpleToolbar;
|
|
32
|
+
}
|
|
29
33
|
const quill = new FluentEditor(vm.$refs.editor, state.innerOptions);
|
|
30
34
|
quill.emitter.on("file-change", api.fileOperationToSev);
|
|
31
35
|
state.quill = Object.freeze(quill);
|
|
@@ -62,15 +66,18 @@ const checkTableISEndElement = (element) => {
|
|
|
62
66
|
return element.children[0] instanceof HTMLTableElement;
|
|
63
67
|
}
|
|
64
68
|
};
|
|
69
|
+
const isSvg = (str) => {
|
|
70
|
+
return str.trim().startsWith("<svg");
|
|
71
|
+
};
|
|
65
72
|
const setIcons = ({ api, vm, iconOption, FluentEditor, keys = [] }) => {
|
|
73
|
+
var _a;
|
|
66
74
|
for (const key in iconOption) {
|
|
67
75
|
if (Object.hasOwnProperty.call(iconOption, key)) {
|
|
68
76
|
const option = iconOption[key];
|
|
69
77
|
if (typeof option === "object") {
|
|
70
78
|
setIcons({ api, vm, iconOption: option, FluentEditor, keys: [...keys, key] });
|
|
71
79
|
} else {
|
|
72
|
-
const
|
|
73
|
-
const outerHtml = api.getOuterHTML(iconElm);
|
|
80
|
+
const outerHtml = isSvg(option) ? option : api.getOuterHTML((_a = vm.$refs[option]) == null ? void 0 : _a[0]);
|
|
74
81
|
if (option && outerHtml) {
|
|
75
82
|
const k = keys.length ? [...keys, key].join(".") : key;
|
|
76
83
|
set(FluentEditor.imports["ui/icons"], k.replace(/default/, ""), outerHtml);
|
package/fluent-editor/options.js
CHANGED
|
@@ -44,7 +44,7 @@ const toolbar = (FluentEditor) => {
|
|
|
44
44
|
[{ direction: "rtl" }],
|
|
45
45
|
[{ color: [] }, { background: [] }],
|
|
46
46
|
[{ align: [] }],
|
|
47
|
-
["link", "image"
|
|
47
|
+
["link", "image"],
|
|
48
48
|
["better-table"],
|
|
49
49
|
["fullscreen"]
|
|
50
50
|
]
|
|
@@ -226,9 +226,39 @@ const iconOption = {
|
|
|
226
226
|
undo: "IconEditorUndo",
|
|
227
227
|
video: "IconEditorVideo"
|
|
228
228
|
};
|
|
229
|
+
const iconOptionMobileFirst = __spreadProps(__spreadValues({}, iconOption), {
|
|
230
|
+
align: {
|
|
231
|
+
default: `<svg width="16" height="16" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path id="\u77E2\u91CF 245" d="M21 3L3 3C2.58 3 2.25 3.33 2.25 3.75C2.25 4.16 2.58 4.5 3 4.5L21 4.5C21.41 4.5 21.75 4.16 21.75 3.75C21.75 3.33 21.41 3 21 3ZM3 8.5L15 8.5C15.41 8.5 15.75 8.83 15.75 9.25C15.75 9.66 15.41 10 15 10L3 10C2.58 10 2.25 9.66 2.25 9.25C2.25 8.83 2.58 8.5 3 8.5ZM21 14L3 14C2.58 14 2.25 14.33 2.25 14.75C2.25 15.16 2.58 15.5 3 15.5L21 15.5C21.41 15.5 21.75 15.16 21.75 14.75C21.75 14.33 21.41 14 21 14ZM15 19.5L3 19.5C2.58 19.5 2.25 19.83 2.25 20.25C2.25 20.66 2.58 21 3 21L15 21C15.41 21 15.75 20.66 15.75 20.25C15.75 19.83 15.41 19.5 15 19.5Z"/></svg>`,
|
|
232
|
+
center: `<svg width="16" height="16" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path id="\u77E2\u91CF 247" d="M21 3L3 3C2.58 3 2.25 3.33 2.25 3.75C2.25 4.16 2.58 4.5 3 4.5L21 4.5C21.41 4.5 21.75 4.16 21.75 3.75C21.75 3.33 21.41 3 21 3ZM6 8.5L18 8.5C18.41 8.5 18.75 8.83 18.75 9.25C18.75 9.66 18.41 10 18 10L6 10C5.58 10 5.25 9.66 5.25 9.25C5.25 8.83 5.58 8.5 6 8.5ZM21 14L3 14C2.58 14 2.25 14.33 2.25 14.75C2.25 15.16 2.58 15.5 3 15.5L21 15.5C21.41 15.5 21.75 15.16 21.75 14.75C21.75 14.33 21.41 14 21 14ZM18 19.5L6 19.5C5.58 19.5 5.25 19.83 5.25 20.25C5.25 20.66 5.58 21 6 21L18 21C18.41 21 18.75 20.66 18.75 20.25C18.75 19.83 18.41 19.5 18 19.5Z"/></svg>`,
|
|
233
|
+
right: `<svg width="16" height="16" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path id="\u77E2\u91CF 248" d="M21 3L3 3C2.58 3 2.25 3.33 2.25 3.75C2.25 4.16 2.58 4.5 3 4.5L21 4.5C21.41 4.5 21.75 4.16 21.75 3.75C21.75 3.33 21.41 3 21 3ZM9 8.5L21 8.5C21.41 8.5 21.75 8.83 21.75 9.25C21.75 9.66 21.41 10 21 10L9 10C8.58 10 8.25 9.66 8.25 9.25C8.25 8.83 8.58 8.5 9 8.5ZM21 14L3 14C2.58 14 2.25 14.33 2.25 14.75C2.25 15.16 2.58 15.5 3 15.5L21 15.5C21.41 15.5 21.75 15.16 21.75 14.75C21.75 14.33 21.41 14 21 14ZM21 19.5L9 19.5C8.58 19.5 8.25 19.83 8.25 20.25C8.25 20.66 8.58 21 9 21L21 21C21.41 21 21.75 20.66 21.75 20.25C21.75 19.83 21.41 19.5 21 19.5Z"/></svg>`
|
|
234
|
+
},
|
|
235
|
+
clean: `<svg width="16" height="16" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path id="\u77E2\u91CF 250" d="M7.2 11.15L20.25 11.15L20.25 9.82C20.25 9.66 20.23 9.51 20.19 9.36C20.17 9.25 20.13 9.14 20.09 9.03C20.04 8.92 19.98 8.81 19.92 8.71C19.84 8.6 19.75 8.49 19.65 8.39C19.55 8.28 19.44 8.2 19.32 8.12C19.22 8.05 19.12 8 19.01 7.95C18.9 7.91 18.8 7.87 18.68 7.85C18.54 7.81 18.38 7.79 18.23 7.79L14.64 7.79C14.43 7.79 14.25 7.72 14.11 7.58C13.96 7.43 13.89 7.25 13.89 7.04L13.89 2.79C13.89 2.77 13.85 2.69 13.84 2.67C13.82 2.65 13.74 2.63 13.72 2.62L11.85 2.62C11.82 2.62 11.75 2.66 11.73 2.67C11.71 2.68 11.68 2.77 11.67 2.79L11.67 7.04C11.67 7.25 11.6 7.43 11.45 7.58C11.31 7.72 11.13 7.79 10.92 7.79L7.18 7.79C7.02 7.79 6.87 7.81 6.72 7.85C6.61 7.87 6.5 7.91 6.39 7.95C6.28 8 6.18 8.05 6.08 8.12C5.96 8.19 5.85 8.28 5.75 8.39C5.65 8.49 5.56 8.6 5.49 8.71C5.42 8.81 5.36 8.92 5.32 9.03C5.27 9.14 5.24 9.24 5.21 9.36Q5.16 9.58 5.16 9.82C5.21 15.68 5.2 19.01 5.13 19.8C5.1 20.06 5.05 20.32 4.98 20.56C4.89 20.84 4.78 21.11 4.63 21.37L7.3 21.37C7.42 21.36 7.53 21.34 7.64 21.31C7.74 21.29 7.84 21.26 7.94 21.22C8.07 21.16 8.19 21.1 8.31 21.02Q8.45 20.92 8.58 20.79C8.7 20.68 8.8 20.56 8.88 20.43C8.93 20.35 8.97 20.26 9.01 20.17C9.06 20.06 9.1 19.95 9.12 19.84C9.15 19.7 9.17 19.56 9.17 19.42L9.17 16.63C9.17 16.21 9.5 15.88 9.92 15.88C10.34 15.88 10.67 16.21 10.67 16.63L10.67 19.42C10.67 19.67 10.64 19.91 10.59 20.14C10.54 20.35 10.48 20.56 10.39 20.77C10.31 20.95 10.22 21.12 10.11 21.28C10.1 21.31 10.08 21.34 10.06 21.37L12.84 21.37Q13.01 21.35 13.18 21.31C13.28 21.29 13.38 21.26 13.48 21.22C13.61 21.16 13.73 21.1 13.84 21.02Q13.99 20.92 14.12 20.79Q14.29 20.63 14.42 20.43C14.47 20.35 14.51 20.26 14.55 20.17C14.6 20.06 14.63 19.95 14.66 19.84C14.69 19.7 14.71 19.56 14.71 19.42L14.71 16.63C14.71 16.21 15.04 15.88 15.46 15.88C15.88 15.88 16.21 16.21 16.21 16.63L16.21 19.42C16.21 19.67 16.18 19.91 16.13 20.14C16.08 20.35 16.02 20.56 15.93 20.77C15.85 20.95 15.76 21.12 15.65 21.28Q15.62 21.32 15.59 21.37L18.23 21.37C18.38 21.37 18.53 21.35 18.68 21.32C18.79 21.29 18.9 21.25 19.01 21.21C19.12 21.16 19.22 21.11 19.32 21.04C19.44 20.97 19.55 20.88 19.65 20.77C19.75 20.67 19.84 20.57 19.92 20.45C19.98 20.35 20.04 20.24 20.09 20.13C20.13 20.02 20.17 19.91 20.19 19.8C20.23 19.65 20.25 19.5 20.25 19.34L20.25 14.67C20.25 14.25 20.58 13.92 21 13.92C21.42 13.92 21.75 14.25 21.75 14.67L21.75 19.34C21.75 19.6 21.72 19.85 21.66 20.1C21.62 20.31 21.55 20.51 21.47 20.71Q21.35 20.99 21.19 21.25Q21.18 21.27 21.16 21.29C21.03 21.48 20.88 21.66 20.72 21.83C20.54 22.01 20.36 22.16 20.16 22.29C19.98 22.4 19.8 22.51 19.6 22.59C19.4 22.67 19.19 22.74 18.98 22.79C18.74 22.84 18.48 22.87 18.23 22.87L12.89 22.87C12.82 22.87 12.75 22.87 12.69 22.87L11.76 22.87C11.73 22.87 11.7 22.87 11.67 22.87L7.35 22.87C7.28 22.87 7.22 22.87 7.15 22.87L6.22 22.87C6.19 22.87 6.16 22.87 6.13 22.87L3 22.87C2.88 22.87 2.78 22.84 2.68 22.8C2.57 22.75 2.49 22.68 2.42 22.59C2.29 22.43 2.23 22.25 2.25 22.05C2.27 21.84 2.36 21.67 2.52 21.54C3.12 21.04 3.48 20.5 3.6 19.9Q3.62 19.79 3.63 19.66C3.7 18.92 3.71 15.64 3.66 9.82C3.66 9.56 3.68 9.3 3.74 9.06C3.79 8.85 3.85 8.65 3.93 8.45C4.02 8.24 4.12 8.05 4.24 7.87C4.37 7.68 4.52 7.5 4.69 7.33C4.86 7.16 5.04 7 5.24 6.87C5.42 6.76 5.61 6.66 5.81 6.57C6.01 6.49 6.21 6.42 6.42 6.37C6.67 6.32 6.92 6.29 7.18 6.29L10.17 6.29L10.17 2.79C10.17 2.67 10.19 2.55 10.21 2.44C10.23 2.34 10.26 2.24 10.31 2.14C10.35 2.04 10.4 1.95 10.45 1.86C10.51 1.77 10.58 1.69 10.66 1.61C10.74 1.53 10.83 1.46 10.92 1.4C11.01 1.34 11.1 1.29 11.2 1.25Q11.32 1.2 11.44 1.17Q11.47 1.16 11.5 1.15C11.61 1.13 11.73 1.12 11.85 1.12L13.72 1.12C13.84 1.12 13.95 1.13 14.07 1.15Q14.22 1.19 14.37 1.25Q14.51 1.31 14.64 1.4C14.73 1.46 14.82 1.53 14.9 1.61C14.98 1.69 15.05 1.77 15.11 1.86C15.17 1.95 15.22 2.04 15.26 2.14C15.3 2.24 15.33 2.34 15.35 2.44C15.38 2.55 15.39 2.67 15.39 2.79L15.39 6.29L18.23 6.29C18.48 6.29 18.74 6.32 18.98 6.38Q18.99 6.38 19 6.38Q19.3 6.45 19.6 6.57C19.8 6.66 19.98 6.76 20.16 6.87C20.36 7.01 20.54 7.16 20.72 7.33C20.88 7.5 21.03 7.68 21.16 7.87C21.28 8.05 21.38 8.25 21.47 8.45Q21.6 8.75 21.66 9.06C21.72 9.31 21.75 9.56 21.75 9.82L21.75 11.9Q21.75 12.05 21.69 12.19Q21.64 12.32 21.53 12.43Q21.42 12.54 21.28 12.59Q21.15 12.65 21 12.65L7.2 12.65C6.78 12.65 6.45 12.32 6.45 11.9C6.45 11.48 6.78 11.15 7.2 11.15Z"/></svg>`,
|
|
236
|
+
code: `<svg width="16" height="16" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path id="\u77E2\u91CF 242" d="M22.3 6.67C22.17 6.46 22.01 6.26 21.83 6.08L18.61 2.87C18.43 2.69 18.24 2.53 18.03 2.4C17.85 2.28 17.66 2.19 17.46 2.11C17.26 2.03 17.06 1.96 16.85 1.92C16.63 1.87 16.39 1.85 16.16 1.85C15.92 1.85 15.68 1.87 15.46 1.92C15.25 1.96 15.05 2.03 14.85 2.11C14.65 2.19 14.46 2.28 14.28 2.4C14.07 2.53 13.88 2.69 13.7 2.87L6.62 9.95L4.79 14.36L1.36 17.79C1.34 17.82 1.25 17.94 1.23 17.98C1.13 18.16 1.12 18.35 1.18 18.55C1.21 18.65 1.26 18.73 1.32 18.81C1.38 18.88 1.46 18.94 1.55 18.99L7.44 22.05C7.59 22.13 7.74 22.15 7.9 22.13C7.98 22.12 8.06 22.09 8.13 22.06C8.2 22.02 8.26 21.98 8.32 21.92L10.33 19.9L14.75 18.08L21.83 11C22.01 10.82 22.17 10.63 22.3 10.42C22.41 10.24 22.51 10.05 22.59 9.85C22.67 9.65 22.73 9.45 22.78 9.24C22.82 9.01 22.85 8.78 22.85 8.54C22.85 8.3 22.82 8.07 22.78 7.84C22.73 7.64 22.67 7.43 22.59 7.23C22.51 7.04 22.41 6.85 22.3 6.67ZM10.09 18.38L13.9 16.81L20.77 9.94C20.88 9.83 20.97 9.71 21.05 9.59C21.11 9.49 21.16 9.39 21.2 9.29C21.25 9.18 21.28 9.07 21.3 8.95C21.33 8.82 21.35 8.68 21.35 8.54C21.35 8.4 21.33 8.27 21.3 8.13C21.28 8.02 21.25 7.91 21.2 7.8C21.16 7.69 21.11 7.59 21.05 7.5C20.97 7.37 20.88 7.25 20.77 7.14L17.55 3.93C17.44 3.82 17.33 3.73 17.2 3.65C17.1 3.59 17 3.54 16.9 3.5C16.79 3.45 16.68 3.42 16.57 3.39C16.43 3.37 16.3 3.35 16.16 3.35C16.02 3.35 15.88 3.37 15.74 3.39C15.63 3.42 15.52 3.45 15.41 3.5C15.31 3.54 15.21 3.59 15.11 3.65C14.98 3.73 14.87 3.82 14.76 3.93L7.89 10.8L6.32 14.61L10.09 18.38ZM10.68 15.08L18.1 7.66C18.4 7.36 18.4 6.89 18.1 6.6C17.8 6.3 17.34 6.3 17.04 6.6L9.61 14.02C9.32 14.32 9.32 14.79 9.61 15.08C9.91 15.38 10.38 15.38 10.68 15.08ZM5.43 15.85L8.85 19.27L7.65 20.47L3.15 18.13L5.43 15.85Z"/></svg>`,
|
|
237
|
+
"code-block": `<svg width="16" height="16" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path id="\u77E2\u91CF 244" d="M18.15 2.25C18.42 2.25 18.67 2.27 18.93 2.33C19.14 2.37 19.35 2.44 19.55 2.53C19.76 2.61 19.95 2.72 20.13 2.84Q20.43 3.04 20.69 3.3Q20.95 3.56 21.15 3.86C21.27 4.04 21.38 4.23 21.46 4.44C21.55 4.64 21.62 4.85 21.66 5.06C21.72 5.32 21.75 5.57 21.75 5.84L21.75 18.15C21.75 18.42 21.72 18.67 21.66 18.93C21.62 19.14 21.55 19.35 21.46 19.55C21.38 19.76 21.27 19.95 21.15 20.13Q20.95 20.43 20.69 20.69Q20.43 20.95 20.13 21.15C19.95 21.27 19.76 21.38 19.55 21.46C19.35 21.55 19.14 21.62 18.93 21.66C18.67 21.72 18.42 21.75 18.15 21.75L5.84 21.75C5.57 21.75 5.32 21.72 5.06 21.66C4.85 21.62 4.64 21.55 4.44 21.46C4.23 21.38 4.04 21.27 3.86 21.15Q3.56 20.95 3.3 20.69Q3.04 20.43 2.84 20.13C2.72 19.95 2.61 19.76 2.53 19.55C2.44 19.35 2.37 19.14 2.33 18.93C2.27 18.67 2.25 18.42 2.25 18.15L2.25 5.84C2.25 5.57 2.27 5.32 2.33 5.06C2.37 4.85 2.44 4.64 2.53 4.44C2.61 4.23 2.72 4.04 2.84 3.86Q3.04 3.56 3.3 3.3Q3.56 3.04 3.86 2.84C4.04 2.72 4.23 2.61 4.44 2.53C4.64 2.44 4.85 2.37 5.06 2.33C5.32 2.27 5.57 2.25 5.84 2.25L18.15 2.25ZM18.15 3.75L5.84 3.75C5.67 3.75 5.52 3.76 5.36 3.8C5.25 3.83 5.13 3.86 5.02 3.91C4.91 3.96 4.8 4.02 4.7 4.08C4.58 4.16 4.46 4.25 4.36 4.36C4.25 4.46 4.16 4.58 4.08 4.7C4.02 4.8 3.96 4.91 3.91 5.02C3.86 5.13 3.83 5.25 3.8 5.36C3.76 5.52 3.75 5.67 3.75 5.84L3.75 18.15C3.75 18.32 3.76 18.47 3.8 18.63C3.83 18.74 3.86 18.86 3.91 18.97C3.96 19.08 4.02 19.19 4.08 19.29C4.16 19.41 4.25 19.53 4.36 19.63C4.46 19.74 4.58 19.83 4.7 19.91C4.8 19.97 4.91 20.03 5.02 20.08C5.13 20.13 5.25 20.16 5.36 20.19C5.52 20.23 5.67 20.25 5.84 20.25L18.15 20.25C18.32 20.25 18.47 20.23 18.63 20.19C18.74 20.16 18.86 20.13 18.97 20.08C19.08 20.03 19.19 19.97 19.29 19.91C19.41 19.83 19.53 19.74 19.63 19.63C19.74 19.53 19.83 19.41 19.91 19.29C19.97 19.19 20.03 19.08 20.08 18.97C20.13 18.86 20.16 18.74 20.19 18.63C20.23 18.47 20.25 18.32 20.25 18.15L20.25 5.84C20.25 5.67 20.23 5.52 20.19 5.36C20.16 5.25 20.13 5.13 20.08 5.02C20.03 4.91 19.97 4.8 19.91 4.7C19.83 4.58 19.74 4.46 19.63 4.36C19.53 4.25 19.41 4.16 19.29 4.08C19.19 4.02 19.08 3.96 18.97 3.91C18.86 3.86 18.74 3.83 18.63 3.8C18.47 3.76 18.32 3.75 18.15 3.75ZM6.54 11.98L8.97 9.52C9.26 9.22 9.26 8.76 8.96 8.46C8.66 8.17 8.19 8.17 7.9 8.47L4.96 11.45C4.82 11.59 4.75 11.77 4.75 11.97C4.74 12.17 4.82 12.35 4.96 12.5L7.9 15.52C8.19 15.82 8.65 15.83 8.96 15.53C9.26 15.24 9.26 14.77 8.97 14.47L6.54 11.98ZM15.03 8.46C14.73 8.75 14.73 9.22 15.02 9.52L17.45 12.01L15.02 14.47C14.73 14.77 14.73 15.23 15.03 15.53C15.33 15.82 15.8 15.82 16.09 15.52L19.03 12.54C19.17 12.4 19.24 12.22 19.25 12.02C19.25 11.82 19.17 11.64 19.03 11.49L16.09 8.47C15.8 8.17 15.34 8.16 15.03 8.46ZM11.51 15.27L13.87 9.27C14.03 8.88 13.84 8.45 13.45 8.3C13.06 8.14 12.63 8.33 12.48 8.72L10.12 14.72C9.96 15.11 10.15 15.54 10.54 15.69C10.93 15.84 11.36 15.66 11.51 15.27Z"/></svg>`,
|
|
238
|
+
header: {
|
|
239
|
+
1: `<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g stroke-width="1" fill-rule="evenodd"><g><rect opacity="0" x="0" y="0" width="16" height="16"></rect><path d="M13.5713675,7.75269698 L13.578407,7.837994 L13.578407,13.0760491 C13.578407,13.3521915 13.3545494,13.5760491 13.078407,13.5760491 C12.8329471,13.5760491 12.6287986,13.3991739 12.5864627,13.1659247 L12.578407,13.0760491 L12.578,8.686 L11.6206466,9.21688158 C11.4059176,9.3358018 11.1416356,9.27997662 10.9915956,9.09644047 L10.9410056,9.02171982 C10.8220854,8.80699084 10.8779106,8.54270884 11.0614467,8.39266882 L11.1361674,8.34207882 L12.8361674,7.40059262 C13.1437867,7.23022831 13.5159343,7.42248511 13.5713675,7.75269698 Z M9,2.49644165 C9.24545989,2.49644165 9.44960837,2.67331681 9.49194433,2.90656602 L9.5,2.99644165 L9.5,12.9964417 C9.5,13.272584 9.27614237,13.4964417 9,13.4964417 C8.75454011,13.4964417 8.55039163,13.3195665 8.50805567,13.0863173 L8.5,12.9964417 L8.5,8.49944165 L3.5,8.49944165 L3.5,12.9964417 C3.5,13.272584 3.27614237,13.4964417 3,13.4964417 C2.75454011,13.4964417 2.55039163,13.3195665 2.50805567,13.0863173 L2.5,12.9964417 L2.5,2.99644165 C2.5,2.72029928 2.72385763,2.49644165 3,2.49644165 C3.24545989,2.49644165 3.44960837,2.67331681 3.49194433,2.90656602 L3.5,2.99644165 L3.5,7.49944165 L8.5,7.49944165 L8.5,2.99644165 C8.5,2.72029928 8.72385763,2.49644165 9,2.49644165 Z"></path></g></g></svg>`,
|
|
240
|
+
2: `<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g stroke-width="1" fill-rule="evenodd"><g><rect opacity="0" x="0" y="0" width="16" height="16"></rect><path d="M8.5,2.49644165 C8.74545989,2.49644165 8.94960837,2.67331681 8.99194433,2.90656602 L9,2.99644165 L9,12.9964416 C9,13.272584 8.77614237,13.4964416 8.5,13.4964416 C8.25454011,13.4964416 8.05039163,13.3195665 8.00805567,13.0863173 L8,12.9964416 L8,8.49944165 L3,8.49944165 L3,12.9964416 C3,13.272584 2.77614237,13.4964416 2.5,13.4964416 C2.25454011,13.4964416 2.05039163,13.3195665 2.00805567,13.0863173 L2,12.9964416 L2,2.99644165 C2,2.72029928 2.22385763,2.49644165 2.5,2.49644165 C2.74545989,2.49644165 2.94960837,2.67331681 2.99194433,2.90656602 L3,2.99644165 L3,7.49944165 L8,7.49944165 L8,2.99644165 C8,2.72029928 8.22385763,2.49644165 8.5,2.49644165 Z M13.3535741,7.87538235 C14.0803728,8.6021811 14.1186254,9.7567876 13.4683283,10.5286222 L13.35357,10.6535782 L11.706,12.3 L13.7607097,12.3000121 C14.0061696,12.3000121 14.2103181,12.4768873 14.252654,12.7101365 L14.2607097,12.8000121 C14.2607097,13.045472 14.0838345,13.2496205 13.8505853,13.2919564 L13.7607097,13.3000121 L10.4999715,13.3000121 C10.0842133,13.3000121 9.86216672,12.8308519 10.0905053,12.5122062 L10.1464222,12.4464546 L12.6464673,9.94646732 C13.0231195,9.56981513 13.0231195,8.95914129 12.6464673,8.58248912 C12.2698151,8.20583695 11.6591413,8.20583695 11.2824891,8.58248912 C11.1281904,8.73678781 11.0337606,8.93352153 11.0074836,9.1434112 L10.999962,9.27068948 C11.0016597,9.54682663 10.7791825,9.77205624 10.5030453,9.77375389 C10.2269082,9.77545154 10.0016786,9.55297436 9.99998091,9.2768372 C9.99677516,8.75539501 10.1992171,8.25154756 10.5753823,7.87538232 C11.3425589,7.10820589 12.5863977,7.10820589 13.3535741,7.87538235 Z"></path></g></g></svg>`
|
|
241
|
+
},
|
|
242
|
+
redo: `<svg width="16" height="16" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path id="path4 (\u8FB9\u6846)" d="M16 6.11L19.4 8.53L6.43 8.53C6.12 8.53 5.81 8.56 5.5 8.62C5.15 8.69 4.82 8.81 4.49 8.96C4.31 9.04 4.15 9.13 3.99 9.23C3.6 9.47 3.24 9.77 2.92 10.12C2.77 10.29 2.63 10.45 2.51 10.63C2.25 11 2.04 11.39 1.87 11.82C1.78 12.06 1.71 12.3 1.65 12.54C1.55 12.98 1.5 13.43 1.5 13.89C1.5 14.35 1.55 14.8 1.65 15.23C1.71 15.48 1.78 15.71 1.87 15.95C2.04 16.38 2.25 16.78 2.51 17.14C2.63 17.32 2.77 17.49 2.92 17.65C3.24 18 3.6 18.3 3.99 18.54C4.15 18.64 4.31 18.73 4.49 18.81C4.82 18.97 5.15 19.08 5.5 19.15C5.81 19.21 6.12 19.25 6.43 19.25L19.97 19.25C20.39 19.25 20.72 18.91 20.72 18.5C20.72 18.07 20.39 17.75 19.97 17.75L6.43 17.75C6.23 17.75 6.02 17.73 5.83 17.69C5.58 17.64 5.35 17.56 5.12 17.45C5.04 17.41 4.96 17.37 4.88 17.33C4.56 17.15 4.28 16.92 4.03 16.64C3.94 16.55 3.86 16.45 3.79 16.35C3.58 16.07 3.41 15.75 3.27 15.41C3.22 15.26 3.17 15.11 3.13 14.96C3.04 14.61 3 14.26 3 13.89C3 13.52 3.04 13.16 3.13 12.82C3.17 12.66 3.22 12.51 3.27 12.36C3.41 12.02 3.58 11.71 3.79 11.42C3.86 11.32 3.94 11.23 4.03 11.13C4.28 10.85 4.56 10.62 4.88 10.45C4.96 10.4 5.04 10.36 5.12 10.32C5.35 10.21 5.58 10.14 5.83 10.09C6.02 10.05 6.23 10.03 6.43 10.03L21.75 10.03C21.87 10.03 21.98 10 22.09 9.95C22.2 9.89 22.29 9.81 22.36 9.71C22.48 9.55 22.52 9.36 22.48 9.15C22.45 8.95 22.35 8.79 22.18 8.67L16.87 4.88C16.53 4.64 16.07 4.72 15.82 5.06C15.58 5.4 15.66 5.86 16 6.11Z"/></svg>`,
|
|
243
|
+
size: `<svg width="16" height="16" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>`,
|
|
244
|
+
undo: `<svg width="16" height="16" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path id="path4 (\u8FB9\u6846)" d="M7.99 6.11L4.59 8.53L17.56 8.53C17.87 8.53 18.18 8.56 18.49 8.62C18.84 8.69 19.17 8.81 19.5 8.96C19.68 9.04 19.84 9.13 20 9.23C20.39 9.47 20.75 9.77 21.07 10.12C21.22 10.29 21.36 10.45 21.48 10.63C21.74 11 21.95 11.39 22.12 11.82C22.21 12.06 22.28 12.3 22.34 12.54C22.44 12.98 22.5 13.43 22.5 13.89C22.5 14.35 22.44 14.8 22.34 15.23C22.28 15.48 22.21 15.71 22.12 15.95C21.95 16.38 21.74 16.78 21.48 17.14C21.36 17.32 21.22 17.49 21.07 17.65C20.75 18 20.39 18.3 20 18.54C19.84 18.64 19.68 18.73 19.5 18.81C19.17 18.97 18.84 19.08 18.49 19.15C18.18 19.21 17.87 19.25 17.56 19.25L4.02 19.25C3.6 19.25 3.27 18.91 3.27 18.5C3.27 18.07 3.6 17.75 4.02 17.75L17.56 17.75C17.76 17.75 17.97 17.73 18.16 17.69C18.41 17.64 18.64 17.56 18.87 17.45C18.95 17.41 19.03 17.37 19.11 17.33C19.43 17.15 19.71 16.92 19.96 16.64C20.05 16.55 20.13 16.45 20.2 16.35C20.41 16.07 20.58 15.75 20.72 15.41C20.77 15.26 20.82 15.11 20.86 14.96C20.95 14.61 21 14.26 21 13.89C21 13.52 20.95 13.16 20.86 12.82C20.82 12.66 20.77 12.51 20.72 12.36C20.58 12.02 20.41 11.71 20.2 11.42C20.13 11.32 20.05 11.23 19.96 11.13C19.71 10.85 19.43 10.62 19.11 10.45C19.03 10.4 18.95 10.36 18.87 10.32C18.64 10.21 18.41 10.14 18.16 10.09C17.97 10.05 17.76 10.03 17.56 10.03L2.25 10.03C2.12 10.03 2.01 10 1.9 9.95C1.79 9.89 1.7 9.81 1.63 9.71C1.51 9.55 1.47 9.36 1.51 9.15C1.54 8.95 1.64 8.79 1.81 8.67L7.12 4.88C7.46 4.64 7.92 4.72 8.17 5.06C8.41 5.4 8.33 5.86 7.99 6.11Z"/></svg>`
|
|
245
|
+
});
|
|
246
|
+
const simpleToolbar = [
|
|
247
|
+
"bold",
|
|
248
|
+
"italic",
|
|
249
|
+
"underline",
|
|
250
|
+
"strike",
|
|
251
|
+
{ list: "bullet" },
|
|
252
|
+
{ list: "ordered" },
|
|
253
|
+
{ align: "" },
|
|
254
|
+
{ align: "center" },
|
|
255
|
+
{ align: "right" }
|
|
256
|
+
];
|
|
229
257
|
export {
|
|
230
258
|
defaultOption,
|
|
231
259
|
iconOption,
|
|
260
|
+
iconOptionMobileFirst,
|
|
232
261
|
keyboard,
|
|
233
|
-
mention
|
|
262
|
+
mention,
|
|
263
|
+
simpleToolbar
|
|
234
264
|
};
|
package/fluent-editor/vue.js
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
removeHandleComposition,
|
|
39
39
|
checkTableISEndElement
|
|
40
40
|
} from "./index";
|
|
41
|
-
import { defaultOption, iconOption } from "./options";
|
|
41
|
+
import { defaultOption, iconOption, iconOptionMobileFirst, simpleToolbar } from "./options";
|
|
42
42
|
const api = ["state", "init", "initContent", "selectionChange", "textChange", "doPreview", "handleDblclick"];
|
|
43
43
|
const initState = ({ api: api2, reactive, computed, props }) => {
|
|
44
44
|
const state = reactive({
|
|
@@ -92,7 +92,7 @@ const initState = ({ api: api2, reactive, computed, props }) => {
|
|
|
92
92
|
});
|
|
93
93
|
return state;
|
|
94
94
|
};
|
|
95
|
-
const initApi = ({ api: api2, state, service, emit, props, nextTick, FluentEditor, UploaderDfls, Delta, vm, t }) => {
|
|
95
|
+
const initApi = ({ api: api2, state, service, emit, props, nextTick, FluentEditor, UploaderDfls, Delta, vm, t, mode }) => {
|
|
96
96
|
Object.assign(api2, {
|
|
97
97
|
state,
|
|
98
98
|
getFileUploadUrl: getFileUploadUrl({ service }),
|
|
@@ -107,16 +107,16 @@ const initApi = ({ api: api2, state, service, emit, props, nextTick, FluentEdito
|
|
|
107
107
|
uploadImageToSev: uploadImageToSev({ state }),
|
|
108
108
|
doPreview: doPreview({ props, state, nextTick }),
|
|
109
109
|
stringToJson: stringToJson({ props }),
|
|
110
|
-
setToolbarTips: setToolbarTips({ api: api2, vm, FluentEditor, iconOption }),
|
|
110
|
+
setToolbarTips: setToolbarTips({ api: api2, vm, FluentEditor, iconOption: mode === "mobile-first" ? iconOptionMobileFirst : iconOption }),
|
|
111
111
|
getOuterHTML: getOuterHTML(),
|
|
112
112
|
setToolbarTitle: setToolbarTitle({ state, t })
|
|
113
113
|
});
|
|
114
114
|
};
|
|
115
115
|
const mergeApi = (args) => {
|
|
116
|
-
let { api: api2, state, service, emit, props, vm, i18n, watch, nextTick } = args;
|
|
116
|
+
let { api: api2, state, service, emit, props, vm, i18n, watch, nextTick, useBreakpoint } = args;
|
|
117
117
|
let { constants, FluentEditor, UploaderDfls, Delta, defaultOptions } = args;
|
|
118
118
|
Object.assign(api2, {
|
|
119
|
-
init: init({ api: api2, emit, props, service, state, FluentEditor, UploaderDfls, defaultOptions, vm }),
|
|
119
|
+
init: init({ api: api2, emit, props, service, state, FluentEditor, UploaderDfls, defaultOptions, vm, useBreakpoint, simpleToolbar }),
|
|
120
120
|
initContent: initContent({ state, props, api: api2, nextTick }),
|
|
121
121
|
fileHandler: fileHandler({ api: api2, state }),
|
|
122
122
|
imageHandler: imageHandler({ api: api2, state }),
|
|
@@ -167,14 +167,14 @@ const initWatch = ({ watch, state, api: api2, props, vm }) => {
|
|
|
167
167
|
}
|
|
168
168
|
);
|
|
169
169
|
};
|
|
170
|
-
const renderless = (props, { reactive, watch, onMounted, onBeforeUnmount, computed }, { service, emit, i18n, constants, nextTick, vm, t }, { FluentEditor }) => {
|
|
170
|
+
const renderless = (props, { reactive, watch, onMounted, onBeforeUnmount, computed }, { service, emit, i18n, constants, nextTick, vm, t, useBreakpoint, mode }, { FluentEditor }) => {
|
|
171
171
|
const api2 = {};
|
|
172
172
|
const { DEFAULTS: UploaderDfls } = FluentEditor.imports["modules/uploader"];
|
|
173
173
|
const Delta = FluentEditor.imports["delta"];
|
|
174
174
|
const state = initState({ reactive, computed, api: api2, props });
|
|
175
175
|
const defaultOptions = defaultOption({ FluentEditor, state, mentionObj: props.mentionObj });
|
|
176
|
-
initApi({ api: api2, state, service, emit, props, nextTick, FluentEditor, UploaderDfls, Delta, vm, t });
|
|
177
|
-
const args = { api: api2, state, service, emit, props, vm, i18n, watch, nextTick };
|
|
176
|
+
initApi({ api: api2, state, service, emit, props, nextTick, FluentEditor, UploaderDfls, Delta, vm, t, mode });
|
|
177
|
+
const args = { api: api2, state, service, emit, props, vm, i18n, watch, nextTick, useBreakpoint };
|
|
178
178
|
Object.assign(args, { constants, FluentEditor, UploaderDfls, Delta, defaultOptions });
|
|
179
179
|
mergeApi(args);
|
|
180
180
|
initWatch({ watch, state, api: api2, props, vm });
|
package/form-item/index.js
CHANGED
|
@@ -154,7 +154,12 @@ const computedFieldValue = ({ props, state }) => () => {
|
|
|
154
154
|
return getPropByPath(model, path, true).v;
|
|
155
155
|
};
|
|
156
156
|
const mounted = ({ api, vm, props, state }) => () => {
|
|
157
|
-
|
|
157
|
+
const tooltip = vm.$refs.tooltip;
|
|
158
|
+
if (tooltip) {
|
|
159
|
+
const content = vm.$refs.content;
|
|
160
|
+
tooltip.state.referenceElm = state.isMultiple ? content : content == null ? void 0 : content.children[0];
|
|
161
|
+
state.tooltip = tooltip;
|
|
162
|
+
}
|
|
158
163
|
if (props.prop) {
|
|
159
164
|
api.dispatch("Form", "form:addField", vm);
|
|
160
165
|
let initialValue = state.fieldValue;
|
package/form-item/vue.js
CHANGED
|
@@ -99,7 +99,9 @@ const initState = ({
|
|
|
99
99
|
isErrorInline: computed(() => api2.computedIsErrorInline()),
|
|
100
100
|
isErrorBlock: computed(() => api2.computedIsErrorBlock()),
|
|
101
101
|
disabled: computed(() => state.formInstance.disabled),
|
|
102
|
-
tooltipType: computed(() => state.formInstance.state.tooltipType)
|
|
102
|
+
tooltipType: computed(() => state.formInstance.state.tooltipType),
|
|
103
|
+
// 标记表单项下是否有多个子节点
|
|
104
|
+
isMultiple: false
|
|
103
105
|
});
|
|
104
106
|
return state;
|
|
105
107
|
};
|
package/guide/index.js
CHANGED
|
@@ -36,7 +36,7 @@ const createShepherd = ({ state, props, Shepherd, offset, designConfig }) => ()
|
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
callBack(step, item);
|
|
39
|
+
callBack(step, item, tour);
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
state.tour.start();
|
|
@@ -126,7 +126,7 @@ const itemStep = (item, state, deepCopy, index, Shepherd) => {
|
|
|
126
126
|
};
|
|
127
127
|
return steps;
|
|
128
128
|
};
|
|
129
|
-
const callBack = (step, item) => {
|
|
129
|
+
const callBack = (step, item, tour) => {
|
|
130
130
|
step.on("before-show", () => {
|
|
131
131
|
if (typeof item.beforeShow === "function") {
|
|
132
132
|
item.beforeShow();
|
|
@@ -147,12 +147,12 @@ const callBack = (step, item) => {
|
|
|
147
147
|
item.hide();
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
|
-
|
|
150
|
+
tour.on("complete", () => {
|
|
151
151
|
if (typeof item.complete === "function") {
|
|
152
152
|
item.complete();
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
|
-
|
|
155
|
+
tour.on("cancel", () => {
|
|
156
156
|
if (typeof item.cancel === "function") {
|
|
157
157
|
item.cancel();
|
|
158
158
|
}
|
package/input/index.js
CHANGED
|
@@ -318,12 +318,18 @@ const setInputDomValue = ({ state, props, nextTick, vm }) => (type) => {
|
|
|
318
318
|
});
|
|
319
319
|
};
|
|
320
320
|
const handleEnterTextarea = ({ api, state, props, nextTick }) => () => {
|
|
321
|
+
if (state.isDragging) {
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
321
324
|
if (props.hoverExpand && !state.isDisplayOnly) {
|
|
322
325
|
state.enteredTextarea = true;
|
|
323
326
|
nextTick(api.resizeTextarea);
|
|
324
327
|
}
|
|
325
328
|
};
|
|
326
329
|
const handleLeaveTextarea = ({ api, state, props, nextTick, vm }) => () => {
|
|
330
|
+
if (state.isDragging) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
327
333
|
if (props.hoverExpand && !state.isDisplayOnly) {
|
|
328
334
|
state.enteredTextarea = false;
|
|
329
335
|
nextTick(() => {
|
|
@@ -362,6 +368,13 @@ const setShowMoreBtn = ({ state, vm }) => (init) => {
|
|
|
362
368
|
}
|
|
363
369
|
}, 100);
|
|
364
370
|
};
|
|
371
|
+
const handleTextareaMouseDown = ({ state }) => () => state.isDragging = true;
|
|
372
|
+
const handleTextareaMouseUp = ({ state, api }) => (isOutside) => {
|
|
373
|
+
state.isDragging = false;
|
|
374
|
+
if (isOutside) {
|
|
375
|
+
api.handleLeaveTextarea();
|
|
376
|
+
}
|
|
377
|
+
};
|
|
365
378
|
export {
|
|
366
379
|
blur,
|
|
367
380
|
calcIconOffset,
|
|
@@ -384,6 +397,8 @@ export {
|
|
|
384
397
|
handleInput,
|
|
385
398
|
handleLeaveTextarea,
|
|
386
399
|
handlePasswordVisible,
|
|
400
|
+
handleTextareaMouseDown,
|
|
401
|
+
handleTextareaMouseUp,
|
|
387
402
|
hasSelection,
|
|
388
403
|
hiddenPassword,
|
|
389
404
|
inputStyle,
|
package/input/vue.js
CHANGED
|
@@ -35,7 +35,9 @@ import {
|
|
|
35
35
|
handleEnterTextarea,
|
|
36
36
|
handleLeaveTextarea,
|
|
37
37
|
getDisplayOnlyText,
|
|
38
|
-
setShowMoreBtn
|
|
38
|
+
setShowMoreBtn,
|
|
39
|
+
handleTextareaMouseDown,
|
|
40
|
+
handleTextareaMouseUp
|
|
39
41
|
} from "./index";
|
|
40
42
|
import useStorageBox from "../tall-storage/vue-storage-box";
|
|
41
43
|
import { on, off } from "../common/deps/dom";
|
|
@@ -72,7 +74,9 @@ const api = [
|
|
|
72
74
|
"hiddenPassword",
|
|
73
75
|
"inputStyle",
|
|
74
76
|
"handleEnterTextarea",
|
|
75
|
-
"handleLeaveTextarea"
|
|
77
|
+
"handleLeaveTextarea",
|
|
78
|
+
"handleTextareaMouseDown",
|
|
79
|
+
"handleTextareaMouseUp"
|
|
76
80
|
];
|
|
77
81
|
const initState = ({
|
|
78
82
|
reactive,
|
|
@@ -138,7 +142,8 @@ const initState = ({
|
|
|
138
142
|
timer: null,
|
|
139
143
|
hiddenPassword: computed(() => api2.hiddenPassword()),
|
|
140
144
|
displayedMaskValue: computed(() => api2.getDisplayedMaskValue()),
|
|
141
|
-
displayOnlyText: computed(() => api2.getDisplayOnlyText())
|
|
145
|
+
displayOnlyText: computed(() => api2.getDisplayOnlyText()),
|
|
146
|
+
isDragging: false
|
|
142
147
|
});
|
|
143
148
|
return state;
|
|
144
149
|
};
|
|
@@ -173,7 +178,9 @@ const initApi = ({
|
|
|
173
178
|
getDisplayOnlyText: getDisplayOnlyText({ parent, props, state }),
|
|
174
179
|
handleEnterTextarea: handleEnterTextarea({ api: api2, state, props, nextTick }),
|
|
175
180
|
handleLeaveTextarea: handleLeaveTextarea({ api: api2, state, props, nextTick, vm }),
|
|
176
|
-
inputStyle: inputStyle({ props })
|
|
181
|
+
inputStyle: inputStyle({ props }),
|
|
182
|
+
handleTextareaMouseDown: handleTextareaMouseDown({ state }),
|
|
183
|
+
handleTextareaMouseUp: handleTextareaMouseUp({ state, api: api2 })
|
|
177
184
|
});
|
|
178
185
|
};
|
|
179
186
|
const mergeApi = ({
|
package/option/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { getObj } from "../common/object";
|
|
3
|
-
import { omitText } from "../common/string";
|
|
4
3
|
const escapeRegexpString = (value = "") => String(value).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
|
|
5
4
|
const isEqual = ({ select, state }) => (a, b) => {
|
|
6
5
|
if (!state.isObject) {
|
|
@@ -24,19 +23,6 @@ const handleGroupDisabled = ({ state, vm }) => (val) => {
|
|
|
24
23
|
state.groupDisabled = val;
|
|
25
24
|
vm.groupDisabled = val;
|
|
26
25
|
};
|
|
27
|
-
const hoverItem = ({ select, props, state }) => (e) => {
|
|
28
|
-
const dom = e.target;
|
|
29
|
-
const text = dom.textContent;
|
|
30
|
-
const style = window.getComputedStyle(dom);
|
|
31
|
-
const font = style.font;
|
|
32
|
-
const rect = dom.getBoundingClientRect();
|
|
33
|
-
const textWidth = rect.width - parseInt(style.paddingLeft || 0) - parseInt(style.paddingRight || 0);
|
|
34
|
-
const res = omitText(text, font, textWidth);
|
|
35
|
-
state.showTitle = res.o;
|
|
36
|
-
if (!props.disabled && !state.groupDisabled && !select.state.disabledOptionHover) {
|
|
37
|
-
select.state.hoverIndex = select.state.optionIndexArr.indexOf(state.index);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
26
|
const selectOptionClick = ({ props, state, select, constants, vm }) => () => {
|
|
41
27
|
if (props.disabled !== true && state.groupDisabled !== true) {
|
|
42
28
|
if (select.multiple && props.required === true)
|
|
@@ -67,7 +53,6 @@ export {
|
|
|
67
53
|
contains,
|
|
68
54
|
escapeRegexpString,
|
|
69
55
|
handleGroupDisabled,
|
|
70
|
-
hoverItem,
|
|
71
56
|
initValue,
|
|
72
57
|
isEqual,
|
|
73
58
|
queryChange,
|
package/option/vue.js
CHANGED
|
@@ -2,17 +2,8 @@ import {
|
|
|
2
2
|
__spreadProps,
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../chunk-G2ADBYYC.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
contains,
|
|
8
|
-
handleGroupDisabled,
|
|
9
|
-
hoverItem,
|
|
10
|
-
selectOptionClick,
|
|
11
|
-
queryChange,
|
|
12
|
-
toggleEvent,
|
|
13
|
-
initValue
|
|
14
|
-
} from "./index";
|
|
15
|
-
const api = ["state", "visible", "hoverItem", "selectOptionClick"];
|
|
5
|
+
import { isEqual, contains, handleGroupDisabled, selectOptionClick, queryChange, toggleEvent, initValue } from "./index";
|
|
6
|
+
const api = ["state", "visible", "selectOptionClick"];
|
|
16
7
|
const initState = ({ reactive, computed, props, api: api2, markRaw, select, parent }) => {
|
|
17
8
|
const state = reactive({
|
|
18
9
|
parent: markRaw(parent),
|
|
@@ -26,7 +17,6 @@ const initState = ({ reactive, computed, props, api: api2, markRaw, select, pare
|
|
|
26
17
|
disabled: computed(() => props.disabled || state.groupDisabled),
|
|
27
18
|
isObject: computed(() => Object.prototype.toString.call(props.value).toLowerCase() === "[object object]"),
|
|
28
19
|
currentLabel: computed(() => props.label || (state.isObject ? "" : props.value)),
|
|
29
|
-
showTitle: false,
|
|
30
20
|
currentValue: computed(() => props.value || props.label || ""),
|
|
31
21
|
itemSelected: computed(() => {
|
|
32
22
|
if (!select.multiple) {
|
|
@@ -54,7 +44,6 @@ const initApi = ({ api: api2, props, state, select, constants, vm }) => {
|
|
|
54
44
|
state,
|
|
55
45
|
isEqual: isEqual({ select, state }),
|
|
56
46
|
contains: contains({ select, state }),
|
|
57
|
-
hoverItem: hoverItem({ select, props, state }),
|
|
58
47
|
queryChange: queryChange({ select, props, state }),
|
|
59
48
|
selectOptionClick: selectOptionClick({ constants, vm, props, state, select }),
|
|
60
49
|
handleGroupDisabled: handleGroupDisabled({ state, vm }),
|
package/package.json
CHANGED
package/pager-item/index.js
CHANGED
|
@@ -65,13 +65,10 @@ const onPagerClick = ({ emit, props, vm }) => (event) => {
|
|
|
65
65
|
const pageCount = props.pageCount;
|
|
66
66
|
const currentPage = props.currentPage;
|
|
67
67
|
const pagerCountOffset = props.pagerCount - 2;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
} else if (classListVal.includes("quicknext")) {
|
|
73
|
-
newPage = currentPage + pagerCountOffset;
|
|
74
|
-
}
|
|
68
|
+
if (parentEl === vm.$refs.prev) {
|
|
69
|
+
newPage = currentPage - pagerCountOffset;
|
|
70
|
+
} else if (parentEl === vm.$refs.next) {
|
|
71
|
+
newPage = currentPage + pagerCountOffset;
|
|
75
72
|
}
|
|
76
73
|
if (!isNaN(newPage)) {
|
|
77
74
|
if (newPage < 1) {
|