@opentiny/vue-renderless 3.11.0 → 3.11.2
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/color-picker/alpha-select/index.js +2 -6
- package/color-picker/alpha-select/vue.js +10 -8
- package/color-picker/color-select/index.js +2 -6
- package/color-picker/color-select/vue.js +9 -19
- package/color-picker/vue.js +1 -2
- package/color-select-panel/alpha-select/index.js +2 -6
- package/color-select-panel/alpha-select/vue.js +11 -9
- package/color-select-panel/hue-select/index.js +2 -6
- package/color-select-panel/hue-select/vue.js +9 -19
- package/color-select-panel/index.js +5 -1
- package/color-select-panel/vue.js +19 -24
- package/image-viewer/index.js +2 -2
- package/package.json +1 -1
- package/rich-text-edtior/vue.js +7 -23
- package/types/checkbox.type.d.mts +2 -2
- package/types/collapse.type.d.mts +1 -1
- package/types/file-upload.type.d.mts +1 -1
- package/types/form-item.type.d.mts +1 -1
- package/types/{form.type-004ecf93.d.ts → form.type-1e2e9272.d.ts} +1 -1
- package/types/form.type.d.mts +1 -1
- package/types/milestone.type.d.mts +1 -1
- package/types/popeditor.type.d.mts +1 -1
- package/types/popover.type.d.mts +1 -1
- package/types/progress.type.d.mts +1 -1
- package/types/steps.type.d.mts +1 -1
- package/types/switch.type.d.mts +3 -3
- package/types/upload-dragger.type.d.mts +2 -2
- package/types/{upload-list.type-aa21a42e.d.ts → upload-list.type-b934f279.d.ts} +2 -2
- package/types/upload-list.type.d.mts +1 -1
- package/types/upload.type.d.mts +1 -1
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import "../../chunk-G2ADBYYC.js";
|
|
2
2
|
const calcLeftByAlpha = (wrapper, thumb, alpha) => {
|
|
3
|
-
return Math.round(
|
|
4
|
-
alpha * (wrapper.offsetWidth - thumb.offsetWidth / 2) / 100
|
|
5
|
-
);
|
|
3
|
+
return Math.round(alpha * (wrapper.offsetWidth - thumb.offsetWidth / 2) / 100);
|
|
6
4
|
};
|
|
7
5
|
const updateThumb = (alpha, thumb, wrapper) => {
|
|
8
6
|
thumb.style.left = `${calcLeftByAlpha(wrapper, thumb, alpha)}px`;
|
|
@@ -13,9 +11,7 @@ const onDrag = (event, bar, thumb, alpha) => {
|
|
|
13
11
|
let left = clientX - rect.left;
|
|
14
12
|
left = Math.max(thumb.value.offsetWidth / 2, left);
|
|
15
13
|
left = Math.min(left, rect.width - thumb.value.offsetWidth / 2);
|
|
16
|
-
alpha.value = Math.round(
|
|
17
|
-
(left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * 100
|
|
18
|
-
);
|
|
14
|
+
alpha.value = Math.round((left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * 100);
|
|
19
15
|
};
|
|
20
16
|
export {
|
|
21
17
|
calcLeftByAlpha,
|
|
@@ -14,13 +14,16 @@ const renderless = (props, context, { emit }) => {
|
|
|
14
14
|
const alphaWrapper = context.ref();
|
|
15
15
|
const alphaThumb = context.ref();
|
|
16
16
|
const alpha = context.ref(color.get("a"));
|
|
17
|
-
context.watch(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
context.watch(
|
|
18
|
+
() => props.color,
|
|
19
|
+
(hex2) => {
|
|
20
|
+
color.reset(hex2);
|
|
21
|
+
const [rr2, gg2, bb2] = color.getRGB();
|
|
22
|
+
r.value = rr2;
|
|
23
|
+
g.value = gg2;
|
|
24
|
+
b.value = bb2;
|
|
25
|
+
}
|
|
26
|
+
);
|
|
24
27
|
context.watch(alpha, (newAlpha) => {
|
|
25
28
|
updateThumb(newAlpha, alphaThumb.value, alphaWrapper.value);
|
|
26
29
|
emit("alpha-update", alpha.value);
|
|
@@ -34,7 +37,6 @@ const renderless = (props, context, { emit }) => {
|
|
|
34
37
|
});
|
|
35
38
|
const api2 = {
|
|
36
39
|
state,
|
|
37
|
-
color: props.color,
|
|
38
40
|
slider,
|
|
39
41
|
alphaWrapper,
|
|
40
42
|
alphaThumb
|
|
@@ -18,9 +18,7 @@ const updatePosition = (event, rect, cursor) => {
|
|
|
18
18
|
const calcSaturation = (x, width) => x / width;
|
|
19
19
|
const calcBrightness = (y, height) => 100 - y / height * 100;
|
|
20
20
|
const getThumbTop = (wrapper, thumb, hue) => {
|
|
21
|
-
return Math.round(
|
|
22
|
-
hue * (wrapper.offsetHeight - thumb.offsetHeight / 2) / 360
|
|
23
|
-
);
|
|
21
|
+
return Math.round(hue * (wrapper.offsetHeight - thumb.offsetHeight / 2) / 360);
|
|
24
22
|
};
|
|
25
23
|
const resetCursor = (s, v, wrapper, cursor, thumb, color, h) => {
|
|
26
24
|
const { width, height } = wrapper.value.getBoundingClientRect();
|
|
@@ -53,9 +51,7 @@ const updateThumb = (bar, thumb, h, emit) => {
|
|
|
53
51
|
top = Math.min(top, rect.height - thumb.value.offsetHeight / 2);
|
|
54
52
|
top = Math.max(thumb.value.offsetHeight / 2, top);
|
|
55
53
|
thumb.value.style.top = `${top}px`;
|
|
56
|
-
h.value = Math.round(
|
|
57
|
-
(top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * 360
|
|
58
|
-
);
|
|
54
|
+
h.value = Math.round((top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * 360);
|
|
59
55
|
emit("hue-update", h.value);
|
|
60
56
|
};
|
|
61
57
|
};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import "../../chunk-G2ADBYYC.js";
|
|
2
2
|
import { draggable } from "../utils/use-drag";
|
|
3
3
|
import Color from "../utils/color";
|
|
4
|
-
import {
|
|
5
|
-
getThumbTop,
|
|
6
|
-
resetCursor,
|
|
7
|
-
updateThumb,
|
|
8
|
-
updateCursor
|
|
9
|
-
} from "./index";
|
|
4
|
+
import { getThumbTop, resetCursor, updateThumb, updateCursor } from "./index";
|
|
10
5
|
const api = ["state", "cursor", "wrapper", "bar", "thumb"];
|
|
11
6
|
const renderless = (props, context, { emit }) => {
|
|
12
7
|
const cursor = context.ref();
|
|
@@ -22,10 +17,13 @@ const renderless = (props, context, { emit }) => {
|
|
|
22
17
|
background
|
|
23
18
|
});
|
|
24
19
|
const api2 = { state, cursor, wrapper, bar, thumb };
|
|
25
|
-
context.watch(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
context.watch(
|
|
21
|
+
() => props.color,
|
|
22
|
+
(newColor) => {
|
|
23
|
+
color.reset(newColor);
|
|
24
|
+
resetCursor(color.get("s"), color.get("v"), wrapper, cursor, thumb, color, h);
|
|
25
|
+
}
|
|
26
|
+
);
|
|
29
27
|
context.onMounted(() => {
|
|
30
28
|
const update = {
|
|
31
29
|
thumb: updateThumb(bar, thumb, h, emit),
|
|
@@ -33,15 +31,7 @@ const renderless = (props, context, { emit }) => {
|
|
|
33
31
|
};
|
|
34
32
|
const thumbTop = getThumbTop(wrapper.value, thumb.value, h.value);
|
|
35
33
|
thumb.value.style.top = `${thumbTop}px`;
|
|
36
|
-
resetCursor(
|
|
37
|
-
color.get("s"),
|
|
38
|
-
color.get("v"),
|
|
39
|
-
wrapper,
|
|
40
|
-
cursor,
|
|
41
|
-
thumb,
|
|
42
|
-
color,
|
|
43
|
-
h
|
|
44
|
-
);
|
|
34
|
+
resetCursor(color.get("s"), color.get("v"), wrapper, cursor, thumb, color, h);
|
|
45
35
|
draggable(wrapper.value, {
|
|
46
36
|
drag(event) {
|
|
47
37
|
update.cursor(color, event);
|
package/color-picker/vue.js
CHANGED
|
@@ -52,8 +52,7 @@ const renderless = (props, context, { emit }) => {
|
|
|
52
52
|
onConfirm: onConfirm(hex, triggerBg, res, emit, isShow),
|
|
53
53
|
onCancel: onCancel(res, triggerBg, emit, isShow, hex, color),
|
|
54
54
|
onAlphaUpdate: update,
|
|
55
|
-
cursor
|
|
56
|
-
alpha: props.alpha
|
|
55
|
+
cursor
|
|
57
56
|
};
|
|
58
57
|
return api2;
|
|
59
58
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import "../../chunk-G2ADBYYC.js";
|
|
2
2
|
const calcLeftByAlpha = (wrapper, thumb, alpha) => {
|
|
3
|
-
return Math.round(
|
|
4
|
-
alpha * (wrapper.offsetWidth - thumb.offsetWidth / 2) / 100
|
|
5
|
-
);
|
|
3
|
+
return Math.round(alpha * (wrapper.offsetWidth - thumb.offsetWidth / 2) / 100);
|
|
6
4
|
};
|
|
7
5
|
const updateThumb = (alpha, thumb, wrapper) => {
|
|
8
6
|
thumb.style.left = `${calcLeftByAlpha(wrapper, thumb, alpha)}px`;
|
|
@@ -13,9 +11,7 @@ const onDrag = (event, bar, thumb, alpha) => {
|
|
|
13
11
|
let left = clientX - rect.left;
|
|
14
12
|
left = Math.max(thumb.value.offsetWidth / 2, left);
|
|
15
13
|
left = Math.min(left, rect.width - thumb.value.offsetWidth / 2);
|
|
16
|
-
alpha.value = Math.round(
|
|
17
|
-
(left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * 100
|
|
18
|
-
);
|
|
14
|
+
alpha.value = Math.round((left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * 100);
|
|
19
15
|
};
|
|
20
16
|
export {
|
|
21
17
|
calcLeftByAlpha,
|
|
@@ -14,14 +14,17 @@ const renderless = (props, context, { emit }) => {
|
|
|
14
14
|
const alphaWrapper = context.ref();
|
|
15
15
|
const alphaThumb = context.ref();
|
|
16
16
|
const alpha = context.ref(color.get("a"));
|
|
17
|
-
context.watch(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
context.watch(
|
|
18
|
+
() => props.color,
|
|
19
|
+
(hex2) => {
|
|
20
|
+
color.reset(hex2);
|
|
21
|
+
const [rr2, gg2, bb2] = color.getRGB();
|
|
22
|
+
r.value = rr2;
|
|
23
|
+
g.value = gg2;
|
|
24
|
+
b.value = bb2;
|
|
25
|
+
alpha.value = color.get("a");
|
|
26
|
+
}
|
|
27
|
+
);
|
|
25
28
|
context.watch(alpha, (newAlpha) => {
|
|
26
29
|
updateThumb(newAlpha, alphaThumb.value, alphaWrapper.value);
|
|
27
30
|
emit("alpha-update", alpha.value);
|
|
@@ -35,7 +38,6 @@ const renderless = (props, context, { emit }) => {
|
|
|
35
38
|
});
|
|
36
39
|
const api2 = {
|
|
37
40
|
state,
|
|
38
|
-
color: props.color,
|
|
39
41
|
slider,
|
|
40
42
|
alphaWrapper,
|
|
41
43
|
alphaThumb
|
|
@@ -18,9 +18,7 @@ const updatePosition = (event, rect, cursor) => {
|
|
|
18
18
|
const calcSaturation = (x, width) => x / width;
|
|
19
19
|
const calcBrightness = (y, height) => 100 - y / height * 100;
|
|
20
20
|
const getThumbTop = (wrapper, thumb, hue) => {
|
|
21
|
-
return Math.round(
|
|
22
|
-
hue * (wrapper.offsetHeight - thumb.offsetHeight / 2) / 360
|
|
23
|
-
);
|
|
21
|
+
return Math.round(hue * (wrapper.offsetHeight - thumb.offsetHeight / 2) / 360);
|
|
24
22
|
};
|
|
25
23
|
const resetCursor = (s, v, wrapper, cursor, thumb, color, h) => {
|
|
26
24
|
const { width, height } = wrapper.value.getBoundingClientRect();
|
|
@@ -53,9 +51,7 @@ const updateThumb = (bar, thumb, h, emit) => {
|
|
|
53
51
|
top = Math.min(top, rect.height - thumb.value.offsetHeight / 2);
|
|
54
52
|
top = Math.max(thumb.value.offsetHeight / 2, top);
|
|
55
53
|
thumb.value.style.top = `${top}px`;
|
|
56
|
-
h.value = Math.round(
|
|
57
|
-
(top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * 360
|
|
58
|
-
);
|
|
54
|
+
h.value = Math.round((top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * 360);
|
|
59
55
|
emit("hue-update", h.value);
|
|
60
56
|
};
|
|
61
57
|
};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import "../../chunk-G2ADBYYC.js";
|
|
2
2
|
import { draggable } from "../utils/use-drag";
|
|
3
3
|
import Color from "../utils/color";
|
|
4
|
-
import {
|
|
5
|
-
getThumbTop,
|
|
6
|
-
resetCursor,
|
|
7
|
-
updateThumb,
|
|
8
|
-
updateCursor
|
|
9
|
-
} from "./index";
|
|
4
|
+
import { getThumbTop, resetCursor, updateThumb, updateCursor } from "./index";
|
|
10
5
|
const api = ["state", "cursor", "wrapper", "bar", "thumb"];
|
|
11
6
|
const renderless = (props, context, { emit }) => {
|
|
12
7
|
const cursor = context.ref();
|
|
@@ -22,10 +17,13 @@ const renderless = (props, context, { emit }) => {
|
|
|
22
17
|
background
|
|
23
18
|
});
|
|
24
19
|
const api2 = { state, cursor, wrapper, bar, thumb };
|
|
25
|
-
context.watch(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
context.watch(
|
|
21
|
+
() => props.color,
|
|
22
|
+
(newColor) => {
|
|
23
|
+
color.reset(newColor);
|
|
24
|
+
resetCursor(color.get("s"), color.get("v"), wrapper, cursor, thumb, color, h);
|
|
25
|
+
}
|
|
26
|
+
);
|
|
29
27
|
context.onMounted(() => {
|
|
30
28
|
const update = {
|
|
31
29
|
thumb: updateThumb(bar, thumb, h, emit),
|
|
@@ -33,15 +31,7 @@ const renderless = (props, context, { emit }) => {
|
|
|
33
31
|
};
|
|
34
32
|
const thumbTop = getThumbTop(wrapper.value, thumb.value, h.value);
|
|
35
33
|
thumb.value.style.top = `${thumbTop}px`;
|
|
36
|
-
resetCursor(
|
|
37
|
-
color.get("s"),
|
|
38
|
-
color.get("v"),
|
|
39
|
-
wrapper,
|
|
40
|
-
cursor,
|
|
41
|
-
thumb,
|
|
42
|
-
color,
|
|
43
|
-
h
|
|
44
|
-
);
|
|
34
|
+
resetCursor(color.get("s"), color.get("v"), wrapper, cursor, thumb, color, h);
|
|
45
35
|
draggable(wrapper.value, {
|
|
46
36
|
drag(event) {
|
|
47
37
|
update.cursor(color, event);
|
|
@@ -4,7 +4,11 @@ const onConfirm = (hex, triggerBg, res, emit, stack, enableHistory) => {
|
|
|
4
4
|
hex.value = res.value;
|
|
5
5
|
triggerBg.value = res.value;
|
|
6
6
|
if (enableHistory) {
|
|
7
|
-
const itemIdx = Math.max(
|
|
7
|
+
const itemIdx = Math.max(
|
|
8
|
+
stack.value.indexOf(res.value),
|
|
9
|
+
stack.value.indexOf(res.value.toLowerCase()),
|
|
10
|
+
stack.value.indexOf(res.value.toUpperCase())
|
|
11
|
+
);
|
|
8
12
|
if (itemIdx !== -1) {
|
|
9
13
|
stack.value.splice(itemIdx, 1);
|
|
10
14
|
}
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import Color from "./utils/color";
|
|
3
|
-
import {
|
|
4
|
-
onConfirm,
|
|
5
|
-
onCancel,
|
|
6
|
-
onHSVUpdate,
|
|
7
|
-
onAlphaUpdate,
|
|
8
|
-
handleHistoryClick,
|
|
9
|
-
handlePredefineClick
|
|
10
|
-
} from ".";
|
|
3
|
+
import { onConfirm, onCancel, onHSVUpdate, onAlphaUpdate, handleHistoryClick, handlePredefineClick } from ".";
|
|
11
4
|
const api = [
|
|
12
5
|
"state",
|
|
13
6
|
"changeVisible",
|
|
@@ -19,8 +12,7 @@ const api = [
|
|
|
19
12
|
"onCancel",
|
|
20
13
|
"onAlphaUpdate",
|
|
21
14
|
"onHistoryClick",
|
|
22
|
-
"onPredefineColorClick"
|
|
23
|
-
"alpha"
|
|
15
|
+
"onPredefineColorClick"
|
|
24
16
|
];
|
|
25
17
|
const renderless = (props, context, { emit }) => {
|
|
26
18
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -30,12 +22,8 @@ const renderless = (props, context, { emit }) => {
|
|
|
30
22
|
const triggerBg = context.ref((_c = modelValue == null ? void 0 : modelValue.value) != null ? _c : "transparent");
|
|
31
23
|
const isShow = context.ref((_d = visible == null ? void 0 : visible.value) != null ? _d : false);
|
|
32
24
|
const cursor = context.ref();
|
|
33
|
-
const stack = context.ref(
|
|
34
|
-
|
|
35
|
-
);
|
|
36
|
-
const predefineStack = context.ref(
|
|
37
|
-
[...(_f = predefine == null ? void 0 : predefine.value) != null ? _f : []]
|
|
38
|
-
);
|
|
25
|
+
const stack = context.ref([...(_e = history == null ? void 0 : history.value) != null ? _e : []]);
|
|
26
|
+
const predefineStack = context.ref([...(_f = predefine == null ? void 0 : predefine.value) != null ? _f : []]);
|
|
39
27
|
const enableHistory = history == null ? void 0 : history.value;
|
|
40
28
|
const enablePredefineColor = predefine == null ? void 0 : predefine.value;
|
|
41
29
|
const changeVisible = (state2) => {
|
|
@@ -54,12 +42,20 @@ const renderless = (props, context, { emit }) => {
|
|
|
54
42
|
enableHistory,
|
|
55
43
|
enablePredefineColor
|
|
56
44
|
});
|
|
57
|
-
context.watch(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
45
|
+
context.watch(
|
|
46
|
+
predefine,
|
|
47
|
+
(newPredefine) => {
|
|
48
|
+
predefineStack.value = [...newPredefine];
|
|
49
|
+
},
|
|
50
|
+
{ deep: true }
|
|
51
|
+
);
|
|
52
|
+
context.watch(
|
|
53
|
+
history,
|
|
54
|
+
(newHistory) => {
|
|
55
|
+
stack.value = [...newHistory];
|
|
56
|
+
},
|
|
57
|
+
{ deep: true }
|
|
58
|
+
);
|
|
63
59
|
context.watch(modelValue, (newValue) => {
|
|
64
60
|
hex.value = newValue;
|
|
65
61
|
res.value = newValue;
|
|
@@ -81,8 +77,7 @@ const renderless = (props, context, { emit }) => {
|
|
|
81
77
|
onAlphaUpdate: update,
|
|
82
78
|
onHistoryClick: handleHistoryClick(hex, res, color),
|
|
83
79
|
onPredefineColorClick: handlePredefineClick(hex, res, color),
|
|
84
|
-
cursor
|
|
85
|
-
alpha: props.alpha
|
|
80
|
+
cursor
|
|
86
81
|
};
|
|
87
82
|
return api2;
|
|
88
83
|
};
|
package/image-viewer/index.js
CHANGED
|
@@ -345,8 +345,8 @@ const getImageWidth = ({ state, parent, props, vm, mode }) => () => {
|
|
|
345
345
|
}
|
|
346
346
|
state.imageList = vm.$refs.viewerItem;
|
|
347
347
|
} else {
|
|
348
|
-
imageW = parent.$el.querySelector(".
|
|
349
|
-
state.imageList = parent.$el.querySelectorAll(".
|
|
348
|
+
imageW = parent.$el.querySelector(".tiny-mobile-image-viewer__canvas").offsetWidth;
|
|
349
|
+
state.imageList = parent.$el.querySelectorAll(".tiny-mobile-image-viewer__item");
|
|
350
350
|
}
|
|
351
351
|
state.imageItemWidth = imageW;
|
|
352
352
|
state.imageAllWidth = state.urlList.length * imageW;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-renderless",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.2",
|
|
4
4
|
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
|
|
5
5
|
"homepage": "https://opentiny.design/tiny-vue",
|
|
6
6
|
"keywords": [
|
package/rich-text-edtior/vue.js
CHANGED
|
@@ -32,10 +32,6 @@ const api = [
|
|
|
32
32
|
];
|
|
33
33
|
const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref }, { vm, emit, parent }, {
|
|
34
34
|
Editor,
|
|
35
|
-
Collaboration,
|
|
36
|
-
CodehighComp,
|
|
37
|
-
Y,
|
|
38
|
-
WebrtcProvider,
|
|
39
35
|
StarterKit,
|
|
40
36
|
Table,
|
|
41
37
|
TableCell,
|
|
@@ -57,9 +53,10 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
|
|
|
57
53
|
CodeBlockLowlight,
|
|
58
54
|
lowlight,
|
|
59
55
|
VueNodeViewRenderer,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
// CodehighComp,
|
|
57
|
+
// NodeViewContent,
|
|
58
|
+
// nodeViewProps,
|
|
59
|
+
// NodeViewWrapper,
|
|
63
60
|
Placeholder,
|
|
64
61
|
codeHighlight
|
|
65
62
|
}) => {
|
|
@@ -98,8 +95,6 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
|
|
|
98
95
|
if (props.customToolBar) {
|
|
99
96
|
toolBar = props.customToolBar;
|
|
100
97
|
}
|
|
101
|
-
let ydoc = null;
|
|
102
|
-
let provider = null;
|
|
103
98
|
const CustomImage = Image.extend({
|
|
104
99
|
addAttributes() {
|
|
105
100
|
var _a2;
|
|
@@ -197,7 +192,7 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
|
|
|
197
192
|
extensions: [
|
|
198
193
|
StarterKit == null ? void 0 : StarterKit.configure({
|
|
199
194
|
// 开启多人协作功能要关闭默认的history模式
|
|
200
|
-
history:
|
|
195
|
+
history: true
|
|
201
196
|
}),
|
|
202
197
|
Table.configure({
|
|
203
198
|
resizable: true
|
|
@@ -267,19 +262,8 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
|
|
|
267
262
|
emit("destroy");
|
|
268
263
|
}
|
|
269
264
|
}, props.options);
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
window._yDoc = new Y.Doc();
|
|
273
|
-
}
|
|
274
|
-
ydoc = window._yDoc;
|
|
275
|
-
provider = new WebrtcProvider("tiny-examsple-document", ydoc);
|
|
276
|
-
defaultOptions.extensions.push(
|
|
277
|
-
Collaboration == null ? void 0 : Collaboration.configure({
|
|
278
|
-
document: ydoc
|
|
279
|
-
})
|
|
280
|
-
);
|
|
281
|
-
}
|
|
282
|
-
const editor = new Editor(props.options ? props.options : defaultOptions);
|
|
265
|
+
let options = props.options ? Object.assign(defaultOptions, props.options) : defaultOptions;
|
|
266
|
+
const editor = new Editor(options);
|
|
283
267
|
const box = ref(null);
|
|
284
268
|
const fontSize = ref("16px");
|
|
285
269
|
const state = reactive({
|
|
@@ -18,10 +18,10 @@ declare const checkboxProps: {
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
modelValue: {
|
|
21
|
-
type: (
|
|
21
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
22
22
|
};
|
|
23
23
|
label: {
|
|
24
|
-
type: (
|
|
24
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
25
25
|
default: string;
|
|
26
26
|
};
|
|
27
27
|
indeterminate: BooleanConstructor;
|
|
@@ -24,7 +24,7 @@ declare const collapseProps: {
|
|
|
24
24
|
accordion: BooleanConstructor;
|
|
25
25
|
beforeClose: FunctionConstructor;
|
|
26
26
|
modelValue: {
|
|
27
|
-
type: (
|
|
27
|
+
type: (StringConstructor | ArrayConstructor | NumberConstructor)[];
|
|
28
28
|
default: () => never[];
|
|
29
29
|
};
|
|
30
30
|
tiny_mode: StringConstructor;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { C as IFileUploadAfterDownload, m as IFileUploadApi, D as IFileUploadBatchSegmentDownload, y as IFileUploadBatchSegmentUpload, a as IFileUploadConstants, w as IFileUploadDownloadFileInner, x as IFileUploadDownloadFileSingle, u as IFileUploadDownloadFileSingleInner, t as IFileUploadEdmDownload, s as IFileUploadFile, A as IFileUploadGetFormData, v as IFileUploadLargeDocumentDownload, r as IFileUploadModalVm, o as IFileUploadProps, p as IFileUploadRenderlessParamUtils, q as IFileUploadRenderlessParams, z as IFileUploadSegmentUploadInner, n as IFileUploadService, B as IFileUploadSetWriterFile, E as IFileUploadSliceDownloadChunk, l as IFileUploadState, F as IFileUploadStreamsaver, I as IFileUploadVm } from './upload-list.type-
|
|
2
|
+
export { C as IFileUploadAfterDownload, m as IFileUploadApi, D as IFileUploadBatchSegmentDownload, y as IFileUploadBatchSegmentUpload, a as IFileUploadConstants, w as IFileUploadDownloadFileInner, x as IFileUploadDownloadFileSingle, u as IFileUploadDownloadFileSingleInner, t as IFileUploadEdmDownload, s as IFileUploadFile, A as IFileUploadGetFormData, v as IFileUploadLargeDocumentDownload, r as IFileUploadModalVm, o as IFileUploadProps, p as IFileUploadRenderlessParamUtils, q as IFileUploadRenderlessParams, z as IFileUploadSegmentUploadInner, n as IFileUploadService, B as IFileUploadSetWriterFile, E as IFileUploadSliceDownloadChunk, l as IFileUploadState, F as IFileUploadStreamsaver, I as IFileUploadVm } from './upload-list.type-b934f279.js';
|
|
3
3
|
import './shared.type.mjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { i as IFormItemApi, f as IFormItemConstants, I as IFormItemDisplayedValueParam, k as IFormItemInstance, c as IFormItemLabelStyle, g as IFormItemProps, j as IFormItemRenderlessParamUtils, h as IFormItemRenderlessParams, d as IFormItemRule, e as IFormItemState, b as IFormItemTrigger, a as IFormItemValidateStatus } from './form.type-
|
|
2
|
+
export { i as IFormItemApi, f as IFormItemConstants, I as IFormItemDisplayedValueParam, k as IFormItemInstance, c as IFormItemLabelStyle, g as IFormItemProps, j as IFormItemRenderlessParamUtils, h as IFormItemRenderlessParams, d as IFormItemRule, e as IFormItemState, b as IFormItemTrigger, a as IFormItemValidateStatus } from './form.type-1e2e9272.js';
|
|
3
3
|
import './shared.type.mjs';
|
|
@@ -126,7 +126,7 @@ declare const formItemProps: {
|
|
|
126
126
|
type: BooleanConstructor;
|
|
127
127
|
default: boolean;
|
|
128
128
|
};
|
|
129
|
-
rules: (
|
|
129
|
+
rules: (ObjectConstructor | ArrayConstructor)[];
|
|
130
130
|
showMessage: {
|
|
131
131
|
type: BooleanConstructor;
|
|
132
132
|
default: boolean;
|
package/types/form.type.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { p as IFormApi, r as IFormInstance, n as IFormProps, q as IFormRenderlessParamUtils, o as IFormRenderlessParams, l as IFormRules, m as IFormState } from './form.type-
|
|
2
|
+
export { p as IFormApi, r as IFormInstance, n as IFormProps, q as IFormRenderlessParamUtils, o as IFormRenderlessParams, l as IFormRules, m as IFormState } from './form.type-1e2e9272.js';
|
|
3
3
|
import './shared.type.mjs';
|
package/types/popover.type.d.mts
CHANGED
|
@@ -67,7 +67,7 @@ declare const popoverProps: {
|
|
|
67
67
|
maxHeight: {
|
|
68
68
|
type: (StringConstructor | NumberConstructor)[];
|
|
69
69
|
};
|
|
70
|
-
listData: (
|
|
70
|
+
listData: (ObjectConstructor | ArrayConstructor)[];
|
|
71
71
|
genArrowByHtml: {
|
|
72
72
|
type: BooleanConstructor;
|
|
73
73
|
default: () => boolean;
|
package/types/steps.type.d.mts
CHANGED
|
@@ -14,7 +14,7 @@ declare const stepsProps: {
|
|
|
14
14
|
type: StringConstructor;
|
|
15
15
|
default: string;
|
|
16
16
|
};
|
|
17
|
-
data: (
|
|
17
|
+
data: (ObjectConstructor | ArrayConstructor)[];
|
|
18
18
|
space: (StringConstructor | NumberConstructor)[];
|
|
19
19
|
active: {
|
|
20
20
|
type: NumberConstructor;
|
package/types/switch.type.d.mts
CHANGED
|
@@ -30,7 +30,7 @@ declare const switchProps: {
|
|
|
30
30
|
};
|
|
31
31
|
falseColor: StringConstructor;
|
|
32
32
|
falseValue: {
|
|
33
|
-
type: (
|
|
33
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
34
34
|
default: boolean;
|
|
35
35
|
};
|
|
36
36
|
mini: {
|
|
@@ -38,7 +38,7 @@ declare const switchProps: {
|
|
|
38
38
|
default: boolean;
|
|
39
39
|
};
|
|
40
40
|
modelValue: {
|
|
41
|
-
type: (
|
|
41
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
42
42
|
default: boolean;
|
|
43
43
|
};
|
|
44
44
|
size: (StringConstructor | NumberConstructor)[];
|
|
@@ -48,7 +48,7 @@ declare const switchProps: {
|
|
|
48
48
|
};
|
|
49
49
|
trueColor: StringConstructor;
|
|
50
50
|
trueValue: {
|
|
51
|
-
type: (
|
|
51
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
52
52
|
default: boolean;
|
|
53
53
|
};
|
|
54
54
|
beforeChange: FunctionConstructor;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
2
|
import { ISharedRenderlessParamUtils, ISharedRenderlessFunctionParams } from './shared.type.mjs';
|
|
3
|
-
import { I as IFileUploadVm, a as IFileUploadConstants } from './upload-list.type-
|
|
3
|
+
import { I as IFileUploadVm, a as IFileUploadConstants } from './upload-list.type-b934f279.js';
|
|
4
4
|
|
|
5
5
|
declare const UploadDraggerProps: {
|
|
6
6
|
disabled: BooleanConstructor;
|
|
7
|
-
customClass: (
|
|
7
|
+
customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
8
8
|
tiny_mode: StringConstructor;
|
|
9
9
|
tiny_mode_root: BooleanConstructor;
|
|
10
10
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
@@ -316,7 +316,7 @@ declare const fileUploadProps: {
|
|
|
316
316
|
type: BooleanConstructor;
|
|
317
317
|
default: boolean;
|
|
318
318
|
};
|
|
319
|
-
customClass: (
|
|
319
|
+
customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
320
320
|
hwh5: ObjectConstructor;
|
|
321
321
|
mode: {
|
|
322
322
|
type: StringConstructor;
|
|
@@ -617,7 +617,7 @@ declare const uploadProps: {
|
|
|
617
617
|
type: BooleanConstructor;
|
|
618
618
|
default: boolean;
|
|
619
619
|
};
|
|
620
|
-
customClass: (
|
|
620
|
+
customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
621
621
|
handleTriggerClick: {
|
|
622
622
|
type: FunctionConstructor;
|
|
623
623
|
default: () => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { H as IUploadListApi, J as IUploadListProps, K as IUploadListRenderlessParamUtils, L as IUploadListRenderlessParams, G as IUploadListState, M as IUploadListVideoParam } from './upload-list.type-
|
|
2
|
+
export { H as IUploadListApi, J as IUploadListProps, K as IUploadListRenderlessParamUtils, L as IUploadListRenderlessParams, G as IUploadListState, M as IUploadListVideoParam } from './upload-list.type-b934f279.js';
|
|
3
3
|
import './shared.type.mjs';
|
package/types/upload.type.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { d as IUploadApi, i as IUploadFormData, k as IUploadOptionsOfHwh5, j as IUploadOptionsOfPost, e as IUploadProps, h as IUploadRenderlessOtherParams, f as IUploadRenderlessParamUtils, g as IUploadRenderlessParams, c as IUploadState, b as IUploadStateHeader } from './upload-list.type-
|
|
2
|
+
export { d as IUploadApi, i as IUploadFormData, k as IUploadOptionsOfHwh5, j as IUploadOptionsOfPost, e as IUploadProps, h as IUploadRenderlessOtherParams, f as IUploadRenderlessParamUtils, g as IUploadRenderlessParams, c as IUploadState, b as IUploadStateHeader } from './upload-list.type-b934f279.js';
|
|
3
3
|
import './shared.type.mjs';
|