@vunk/form 1.2.2 → 1.3.1
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/components/button/src/index.vue.d.ts +282 -6
- package/components/cascader/src/ctx.d.ts +1 -1
- package/components/cascader/src/index.vue.d.ts +13672 -8
- package/components/checkbox/src/ctx.d.ts +1 -1
- package/components/checkbox/src/index.vue.d.ts +906 -10
- package/components/color-picker/src/index.vue.d.ts +10950 -7
- package/components/date-picker/src/ctx.d.ts +1 -1
- package/components/date-picker/src/index.vue.d.ts +225 -11
- package/components/date-picker-range/src/ctx.d.ts +1 -1
- package/components/date-picker-range/src/index.vue.d.ts +24 -12
- package/components/download-plus/index.cjs +4 -4
- package/components/download-plus/index.mjs +4 -4
- package/components/download-plus/src/index.vue.d.ts +822 -8
- package/components/esri-input-geojson/src/append.vue.d.ts +2232 -5
- package/components/esri-input-geojson/src/ctx.d.ts +1 -1
- package/components/esri-input-geojson/src/default-view.vue.d.ts +3 -3
- package/components/esri-input-geojson/src/index.vue.d.ts +723 -23
- package/components/esri-input-geojson/src/viewer.vue.d.ts +141 -10
- package/components/form/src/ctx.d.ts +1 -1
- package/components/form/src/index.vue.d.ts +373 -39
- package/components/form-item/index.cjs +3 -4
- package/components/form-item/index.mjs +3 -4
- package/components/form-item/src/index.vue.d.ts +185 -5
- package/components/form-item-renderer/src/index.vue.d.ts +5 -5
- package/components/form-item-renderer-template/src/index.vue.d.ts +4 -4
- package/components/geoinput/src/index.vue.d.ts +40 -17
- package/components/geoinput-read/src/append.vue.d.ts +379 -2
- package/components/geoinput-read/src/core.vue.d.ts +176 -14
- package/components/geoinput-read/src/ctx.d.ts +1 -1
- package/components/geoinput-read/src/index.vue.d.ts +743 -15
- package/components/geoinput-update/src/append.vue.d.ts +2231 -5
- package/components/geoinput-update/src/ctx.d.ts +1 -1
- package/components/geoinput-update/src/index.vue.d.ts +814 -20
- package/components/input/index.cjs +2 -2
- package/components/input/index.mjs +2 -2
- package/components/input/src/index.vue.d.ts +479 -13
- package/components/input-link/src/index.vue.d.ts +25 -13
- package/components/input-number/src/ctx.d.ts +1 -1
- package/components/input-number/src/index.vue.d.ts +1579 -12
- package/components/monaco-editor/index.cjs +83 -0
- package/components/monaco-editor/index.css +3 -0
- package/components/monaco-editor/index.d.ts +4 -0
- package/components/monaco-editor/index.mjs +77 -0
- package/components/monaco-editor/src/ctx.d.ts +70 -0
- package/components/monaco-editor/src/index.vue.d.ts +209 -0
- package/components/monaco-editor/src/types.d.ts +7 -0
- package/components/radio/src/index.vue.d.ts +444 -10
- package/components/select/src/ctx.d.ts +3 -3
- package/components/select/src/index.vue.d.ts +12944 -31
- package/components/slider/index.cjs +3 -3
- package/components/slider/index.mjs +3 -3
- package/components/slider/src/index.vue.d.ts +25 -12
- package/components/switch/src/index.vue.d.ts +319 -8
- package/components/templates-default/index.cjs +41 -26
- package/components/templates-default/index.mjs +41 -26
- package/components/templates-default/src/index.vue.d.ts +162 -7
- package/components/templates-element-plus/src/index.vue.d.ts +193 -6
- package/components/templates-esri/src/index.vue.d.ts +30 -7
- package/components/templates-layout/src/index.vue.d.ts +148 -6
- package/components/templates-mapbox/src/index.vue.d.ts +30 -7
- package/components/templates-variant/src/index.vue.d.ts +30 -7
- package/components/upload/index.cjs +2 -2
- package/components/upload/index.mjs +2 -2
- package/components/upload/src/ctx.d.ts +1 -1
- package/components/upload/src/file.vue.d.ts +263 -6
- package/components/upload/src/index.vue.d.ts +2366 -9
- package/components/upload-plus/index.cjs +19 -20
- package/components/upload-plus/index.mjs +19 -20
- package/components/upload-plus/src/index.vue.d.ts +874 -12
- package/components/van-cascader/src/index.vue.d.ts +13048 -11
- package/components/var-datetime-picker/src/index.vue.d.ts +624 -10
- package/components/vditor/index.cjs +43 -408
- package/components/vditor/index.mjs +44 -409
- package/components/vditor/src/ctx.d.ts +52 -6
- package/components/vditor/src/index.vue.d.ts +274 -16
- package/components/vditor/src/types.d.ts +7 -9
- package/composables/useSourceManager.d.ts +1 -1
- package/index.css +4 -13
- package/package.json +9 -4
- package/shared/element-plus/ctx.d.ts +3 -3
- package/shared/element-plus/instances.d.ts +2 -2
- package/components/vditor/index.css +0 -12
- package/components/vditor/src/handle-fullscreen.vue.d.ts +0 -18
- package/components/vditor/src/handle-value.vue.d.ts +0 -18
- package/components/vditor/src/use.d.ts +0 -4
|
@@ -2,438 +2,73 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Vditor = require('vditor');
|
|
6
5
|
var vue = require('vue');
|
|
6
|
+
var vditor = require('@vunk/plus/components/vditor');
|
|
7
|
+
var formItem = require('@vunk/form/components/form-item');
|
|
8
|
+
var composables = require('@vunk/form/composables');
|
|
7
9
|
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
8
|
-
var core = require('@vunk/core');
|
|
9
10
|
|
|
10
11
|
const props = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
defaultOptions: {
|
|
16
|
-
type: Object,
|
|
17
|
-
default: () => ({})
|
|
18
|
-
},
|
|
19
|
-
placeholder: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: "\u95EE\u6211\u4EFB\u4F55\u95EE\u9898...(Crtl + Enter \u53D1\u9001)"
|
|
22
|
-
},
|
|
23
|
-
toolbar: {
|
|
24
|
-
type: Array,
|
|
25
|
-
default: () => [
|
|
26
|
-
"headings",
|
|
27
|
-
"bold",
|
|
28
|
-
"italic",
|
|
29
|
-
"strike",
|
|
30
|
-
"link",
|
|
31
|
-
"|",
|
|
32
|
-
"list",
|
|
33
|
-
"ordered-list",
|
|
34
|
-
"outdent",
|
|
35
|
-
"indent",
|
|
36
|
-
"|",
|
|
37
|
-
"line",
|
|
38
|
-
"code",
|
|
39
|
-
"inline-code",
|
|
40
|
-
"insert-before",
|
|
41
|
-
"insert-after",
|
|
42
|
-
"|",
|
|
43
|
-
"table",
|
|
44
|
-
"|",
|
|
45
|
-
"undo",
|
|
46
|
-
"redo",
|
|
47
|
-
"|",
|
|
48
|
-
"fullscreen",
|
|
49
|
-
"outline",
|
|
50
|
-
"export",
|
|
51
|
-
"|"
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
fullscreen: {
|
|
12
|
+
...formItem._VkfFormItemCtx.props,
|
|
13
|
+
...vditor._VkVditorCtx.props,
|
|
14
|
+
readonly: {
|
|
55
15
|
type: Boolean,
|
|
56
|
-
default:
|
|
16
|
+
default: void 0
|
|
57
17
|
}
|
|
58
18
|
};
|
|
59
19
|
const emits = {
|
|
60
|
-
|
|
61
|
-
"update:modelValue": (e) => e,
|
|
62
|
-
ctrlEnter: (e) => e,
|
|
63
|
-
"update:fullscreen": (e) => e
|
|
20
|
+
...vditor._VkVditorCtx.emits
|
|
64
21
|
};
|
|
65
22
|
|
|
66
|
-
function mitt(n){return {all:n=n||new Map,on:function(t,e){var i=n.get(t);i?i.push(e):n.set(t,[e]);},off:function(t,e){var i=n.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):n.set(t,[]));},emit:function(t,e){var i=n.get(t);i&&i.slice().map(function(n){n(e);}),(i=n.get("*"))&&i.slice().map(function(n){n(t,e);});}}}
|
|
67
|
-
|
|
68
|
-
const useVditor = () => {
|
|
69
|
-
const core = vue.inject("vkfVditorRef", null);
|
|
70
|
-
if (!core) {
|
|
71
|
-
throw new Error("useVditor must be used after VditorProvider");
|
|
72
|
-
}
|
|
73
|
-
return vue.unref(core);
|
|
74
|
-
};
|
|
75
|
-
const useVditorMitter = () => {
|
|
76
|
-
const core = vue.inject("vkfVditorMitter", null);
|
|
77
|
-
if (!core) {
|
|
78
|
-
throw new Error("useVditorMitter must be used after VditorProvider");
|
|
79
|
-
}
|
|
80
|
-
return core;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
var _a;
|
|
84
|
-
const isClient = typeof window !== "undefined";
|
|
85
|
-
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
86
|
-
|
|
87
|
-
function createFilterWrapper(filter, fn) {
|
|
88
|
-
function wrapper(...args) {
|
|
89
|
-
filter(() => fn.apply(this, args), { fn, thisArg: this, args });
|
|
90
|
-
}
|
|
91
|
-
return wrapper;
|
|
92
|
-
}
|
|
93
|
-
const bypassFilter = (invoke) => {
|
|
94
|
-
return invoke();
|
|
95
|
-
};
|
|
96
|
-
function pausableFilter(extendFilter = bypassFilter) {
|
|
97
|
-
const isActive = vue.ref(true);
|
|
98
|
-
function pause() {
|
|
99
|
-
isActive.value = false;
|
|
100
|
-
}
|
|
101
|
-
function resume() {
|
|
102
|
-
isActive.value = true;
|
|
103
|
-
}
|
|
104
|
-
const eventFilter = (...args) => {
|
|
105
|
-
if (isActive.value)
|
|
106
|
-
extendFilter(...args);
|
|
107
|
-
};
|
|
108
|
-
return { isActive, pause, resume, eventFilter };
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function tryOnScopeDispose(fn) {
|
|
112
|
-
if (vue.getCurrentScope()) {
|
|
113
|
-
vue.onScopeDispose(fn);
|
|
114
|
-
return true;
|
|
115
|
-
}
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
var __getOwnPropSymbols$6$1 = Object.getOwnPropertySymbols;
|
|
120
|
-
var __hasOwnProp$6$1 = Object.prototype.hasOwnProperty;
|
|
121
|
-
var __propIsEnum$6$1 = Object.prototype.propertyIsEnumerable;
|
|
122
|
-
var __objRest$5 = (source, exclude) => {
|
|
123
|
-
var target = {};
|
|
124
|
-
for (var prop in source)
|
|
125
|
-
if (__hasOwnProp$6$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
126
|
-
target[prop] = source[prop];
|
|
127
|
-
if (source != null && __getOwnPropSymbols$6$1)
|
|
128
|
-
for (var prop of __getOwnPropSymbols$6$1(source)) {
|
|
129
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$6$1.call(source, prop))
|
|
130
|
-
target[prop] = source[prop];
|
|
131
|
-
}
|
|
132
|
-
return target;
|
|
133
|
-
};
|
|
134
|
-
function watchWithFilter(source, cb, options = {}) {
|
|
135
|
-
const _a = options, {
|
|
136
|
-
eventFilter = bypassFilter
|
|
137
|
-
} = _a, watchOptions = __objRest$5(_a, [
|
|
138
|
-
"eventFilter"
|
|
139
|
-
]);
|
|
140
|
-
return vue.watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
var __defProp$2 = Object.defineProperty;
|
|
144
|
-
var __defProps$2 = Object.defineProperties;
|
|
145
|
-
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
146
|
-
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
147
|
-
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
148
|
-
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
149
|
-
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
150
|
-
var __spreadValues$2 = (a, b) => {
|
|
151
|
-
for (var prop in b || (b = {}))
|
|
152
|
-
if (__hasOwnProp$2.call(b, prop))
|
|
153
|
-
__defNormalProp$2(a, prop, b[prop]);
|
|
154
|
-
if (__getOwnPropSymbols$2)
|
|
155
|
-
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
156
|
-
if (__propIsEnum$2.call(b, prop))
|
|
157
|
-
__defNormalProp$2(a, prop, b[prop]);
|
|
158
|
-
}
|
|
159
|
-
return a;
|
|
160
|
-
};
|
|
161
|
-
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
162
|
-
var __objRest$1$1 = (source, exclude) => {
|
|
163
|
-
var target = {};
|
|
164
|
-
for (var prop in source)
|
|
165
|
-
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
166
|
-
target[prop] = source[prop];
|
|
167
|
-
if (source != null && __getOwnPropSymbols$2)
|
|
168
|
-
for (var prop of __getOwnPropSymbols$2(source)) {
|
|
169
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
|
170
|
-
target[prop] = source[prop];
|
|
171
|
-
}
|
|
172
|
-
return target;
|
|
173
|
-
};
|
|
174
|
-
function watchPausable(source, cb, options = {}) {
|
|
175
|
-
const _a = options, {
|
|
176
|
-
eventFilter: filter
|
|
177
|
-
} = _a, watchOptions = __objRest$1$1(_a, [
|
|
178
|
-
"eventFilter"
|
|
179
|
-
]);
|
|
180
|
-
const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
|
|
181
|
-
const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {
|
|
182
|
-
eventFilter
|
|
183
|
-
}));
|
|
184
|
-
return { stop, pause, resume, isActive };
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
function unrefElement(elRef) {
|
|
188
|
-
var _a;
|
|
189
|
-
const plain = vue.unref(elRef);
|
|
190
|
-
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
const defaultWindow = isClient ? window : void 0;
|
|
194
|
-
|
|
195
|
-
const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
196
|
-
const globalKey = "__vueuse_ssr_handlers__";
|
|
197
|
-
_global[globalKey] = _global[globalKey] || {};
|
|
198
|
-
|
|
199
|
-
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
200
|
-
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
201
|
-
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
202
|
-
var __objRest$1 = (source, exclude) => {
|
|
203
|
-
var target = {};
|
|
204
|
-
for (var prop in source)
|
|
205
|
-
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
206
|
-
target[prop] = source[prop];
|
|
207
|
-
if (source != null && __getOwnPropSymbols$6)
|
|
208
|
-
for (var prop of __getOwnPropSymbols$6(source)) {
|
|
209
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
|
|
210
|
-
target[prop] = source[prop];
|
|
211
|
-
}
|
|
212
|
-
return target;
|
|
213
|
-
};
|
|
214
|
-
function useMutationObserver(target, callback, options = {}) {
|
|
215
|
-
const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$1(_a, ["window"]);
|
|
216
|
-
let observer;
|
|
217
|
-
const isSupported = window && "MutationObserver" in window;
|
|
218
|
-
const cleanup = () => {
|
|
219
|
-
if (observer) {
|
|
220
|
-
observer.disconnect();
|
|
221
|
-
observer = void 0;
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
const stopWatch = vue.watch(() => unrefElement(target), (el) => {
|
|
225
|
-
cleanup();
|
|
226
|
-
if (isSupported && window && el) {
|
|
227
|
-
observer = new MutationObserver(callback);
|
|
228
|
-
observer.observe(el, mutationOptions);
|
|
229
|
-
}
|
|
230
|
-
}, { immediate: true });
|
|
231
|
-
const stop = () => {
|
|
232
|
-
cleanup();
|
|
233
|
-
stopWatch();
|
|
234
|
-
};
|
|
235
|
-
tryOnScopeDispose(stop);
|
|
236
|
-
return {
|
|
237
|
-
isSupported,
|
|
238
|
-
stop
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
var SwipeDirection;
|
|
243
|
-
(function(SwipeDirection2) {
|
|
244
|
-
SwipeDirection2["UP"] = "UP";
|
|
245
|
-
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
246
|
-
SwipeDirection2["DOWN"] = "DOWN";
|
|
247
|
-
SwipeDirection2["LEFT"] = "LEFT";
|
|
248
|
-
SwipeDirection2["NONE"] = "NONE";
|
|
249
|
-
})(SwipeDirection || (SwipeDirection = {}));
|
|
250
|
-
|
|
251
|
-
var _sfc_main$2 = vue.defineComponent({
|
|
252
|
-
props: {
|
|
253
|
-
modelValue: {
|
|
254
|
-
type: String,
|
|
255
|
-
default: ""
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
emits: {
|
|
259
|
-
"update:modelValue": null
|
|
260
|
-
},
|
|
261
|
-
setup(props, { emit }) {
|
|
262
|
-
const vditor = useVditor();
|
|
263
|
-
const mitter = useVditorMitter();
|
|
264
|
-
if (props.modelValue) {
|
|
265
|
-
vditor.setValue(props.modelValue, true);
|
|
266
|
-
}
|
|
267
|
-
const { pause, resume } = watchPausable(() => props.modelValue, (value) => {
|
|
268
|
-
vditor.setValue(value, true);
|
|
269
|
-
});
|
|
270
|
-
mitter.on("input", (value) => {
|
|
271
|
-
pause();
|
|
272
|
-
emit("update:modelValue", value);
|
|
273
|
-
vue.nextTick(resume);
|
|
274
|
-
});
|
|
275
|
-
return () => null;
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
var HandleValue = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$2, [["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/vditor/src/handle-value.vue"]]);
|
|
280
|
-
|
|
281
|
-
var _sfc_main$1 = vue.defineComponent({
|
|
282
|
-
props: {
|
|
283
|
-
fullscreen: {
|
|
284
|
-
type: Boolean,
|
|
285
|
-
default: false
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
emits: {
|
|
289
|
-
"update:fullscreen": null
|
|
290
|
-
},
|
|
291
|
-
setup(props, { emit }) {
|
|
292
|
-
const vditor = useVditor();
|
|
293
|
-
const el = vditor.vditor.element;
|
|
294
|
-
const domFullscreen = vue.ref(false);
|
|
295
|
-
useMutationObserver(el, () => {
|
|
296
|
-
if (el.classList.contains("vditor--fullscreen")) {
|
|
297
|
-
domFullscreen.value = true;
|
|
298
|
-
} else {
|
|
299
|
-
domFullscreen.value = false;
|
|
300
|
-
}
|
|
301
|
-
}, {
|
|
302
|
-
attributes: true
|
|
303
|
-
});
|
|
304
|
-
vue.watch(() => props.fullscreen, (value) => {
|
|
305
|
-
if (value !== domFullscreen.value) {
|
|
306
|
-
const ir = vditor.vditor.ir?.element;
|
|
307
|
-
if (!ir) return;
|
|
308
|
-
ir.dispatchEvent(new KeyboardEvent("keydown", {
|
|
309
|
-
key: "'",
|
|
310
|
-
ctrlKey: true
|
|
311
|
-
}));
|
|
312
|
-
}
|
|
313
|
-
}, { immediate: true });
|
|
314
|
-
vue.watch(() => domFullscreen.value, (value) => {
|
|
315
|
-
emit("update:fullscreen", value);
|
|
316
|
-
});
|
|
317
|
-
return () => null;
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
var HandleFullscreen = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$1, [["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/vditor/src/handle-fullscreen.vue"]]);
|
|
322
|
-
|
|
323
23
|
var _sfc_main = vue.defineComponent({
|
|
324
24
|
name: "VkfVditor",
|
|
325
25
|
components: {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
VkAsyncTeleport: core.VkAsyncTeleport
|
|
26
|
+
VkfFormItem: formItem.VkfFormItem,
|
|
27
|
+
VkVditor: vditor.VkVditor
|
|
329
28
|
},
|
|
330
29
|
props,
|
|
331
30
|
emits,
|
|
332
31
|
setup(props2, { emit }) {
|
|
333
|
-
const
|
|
334
|
-
const
|
|
335
|
-
const
|
|
336
|
-
const
|
|
337
|
-
const isTextareaFocus = vue.ref(false);
|
|
338
|
-
vue.provide("vkfVditorMitter", mitter);
|
|
339
|
-
vue.provide("vkfVditorRef", vditorRef);
|
|
340
|
-
vue.onMounted(() => {
|
|
341
|
-
const vditor = new Vditor(vditorNode.value, {
|
|
342
|
-
...props2.defaultOptions,
|
|
343
|
-
placeholder: props2.placeholder,
|
|
344
|
-
cache: {
|
|
345
|
-
enable: true,
|
|
346
|
-
id: "VkfVditorCache",
|
|
347
|
-
...props2.defaultOptions.cache || {}
|
|
348
|
-
},
|
|
349
|
-
after() {
|
|
350
|
-
vditorRef.value = vditor;
|
|
351
|
-
ready.value = true;
|
|
352
|
-
emit("load", vditor);
|
|
353
|
-
props2.defaultOptions.after?.();
|
|
354
|
-
},
|
|
355
|
-
input(value) {
|
|
356
|
-
mitter.emit("input", value);
|
|
357
|
-
props2.defaultOptions.input?.(value);
|
|
358
|
-
},
|
|
359
|
-
ctrlEnter(value) {
|
|
360
|
-
emit("update:modelValue", value);
|
|
361
|
-
emit("ctrlEnter", value);
|
|
362
|
-
},
|
|
363
|
-
focus(v) {
|
|
364
|
-
isTextareaFocus.value = true;
|
|
365
|
-
props2.defaultOptions.focus?.(v);
|
|
366
|
-
},
|
|
367
|
-
blur(v) {
|
|
368
|
-
isTextareaFocus.value = false;
|
|
369
|
-
props2.defaultOptions.blur?.(v);
|
|
370
|
-
},
|
|
371
|
-
toolbar: props2.toolbar
|
|
372
|
-
});
|
|
373
|
-
});
|
|
32
|
+
const coreProps = vditor._VkVditorCtx.createBindProps(props2);
|
|
33
|
+
const coreEmits = vditor._VkVditorCtx.createOnEmits(emit);
|
|
34
|
+
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
35
|
+
const readonly = composables.useComputedReadonly(props2);
|
|
374
36
|
return {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
37
|
+
formItemBindProps,
|
|
38
|
+
coreProps,
|
|
39
|
+
coreEmits,
|
|
40
|
+
readonly
|
|
378
41
|
};
|
|
379
42
|
}
|
|
380
43
|
});
|
|
381
44
|
|
|
382
|
-
const _hoisted_1 = {
|
|
383
|
-
ref: "vditorNode",
|
|
384
|
-
class: "vkf-vditor"
|
|
385
|
-
};
|
|
386
45
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
387
|
-
const
|
|
388
|
-
const
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
vue.
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
/* NEED_PATCH */
|
|
400
|
-
),
|
|
401
|
-
_ctx.ready ? (vue.openBlock(), vue.createBlock(_component_VkAsyncTeleport, {
|
|
402
|
-
key: 0,
|
|
403
|
-
to: _ctx.vditorNode
|
|
404
|
-
}, {
|
|
405
|
-
default: vue.withCtx(() => [
|
|
406
|
-
vue.createElementVNode(
|
|
407
|
-
"div",
|
|
408
|
-
{
|
|
409
|
-
class: vue.normalizeClass(["vkf-vditor-footer", {
|
|
410
|
-
"is-textarea-focus": _ctx.isTextareaFocus
|
|
411
|
-
}])
|
|
412
|
-
},
|
|
413
|
-
[
|
|
46
|
+
const _component_VkVditor = vue.resolveComponent("VkVditor");
|
|
47
|
+
const _component_VkfFormItem = vue.resolveComponent("VkfFormItem");
|
|
48
|
+
return vue.openBlock(), vue.createBlock(
|
|
49
|
+
_component_VkfFormItem,
|
|
50
|
+
vue.normalizeProps(vue.guardReactiveProps(_ctx.formItemBindProps)),
|
|
51
|
+
{
|
|
52
|
+
default: vue.withCtx(() => [
|
|
53
|
+
vue.createVNode(
|
|
54
|
+
_component_VkVditor,
|
|
55
|
+
vue.mergeProps(_ctx.coreProps, vue.toHandlers(_ctx.coreEmits)),
|
|
56
|
+
{
|
|
57
|
+
footer: vue.withCtx(() => [
|
|
414
58
|
vue.renderSlot(_ctx.$slots, "footer")
|
|
415
|
-
],
|
|
416
|
-
|
|
417
|
-
/*
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
_ctx.ready ? (vue.openBlock(), vue.createBlock(_component_HandleFullscreen, {
|
|
429
|
-
key: 2,
|
|
430
|
-
fullscreen: _ctx.fullscreen,
|
|
431
|
-
"onUpdate:fullscreen": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:fullscreen", $event))
|
|
432
|
-
}, null, 8, ["fullscreen"])) : vue.createCommentVNode("v-if", true),
|
|
433
|
-
_ctx.ready ? vue.renderSlot(_ctx.$slots, "default", { key: 3 }) : vue.createCommentVNode("v-if", true)
|
|
434
|
-
],
|
|
435
|
-
64
|
|
436
|
-
/* STABLE_FRAGMENT */
|
|
59
|
+
]),
|
|
60
|
+
_: 3
|
|
61
|
+
/* FORWARDED */
|
|
62
|
+
},
|
|
63
|
+
16
|
|
64
|
+
/* FULL_PROPS */
|
|
65
|
+
)
|
|
66
|
+
]),
|
|
67
|
+
_: 3
|
|
68
|
+
/* FORWARDED */
|
|
69
|
+
},
|
|
70
|
+
16
|
|
71
|
+
/* FULL_PROPS */
|
|
437
72
|
);
|
|
438
73
|
}
|
|
439
74
|
var VkfVditor = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/vditor/src/index.vue"]]);
|