jky-component-lib 0.0.49 → 0.0.53
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/dist/es/code-mirror-editor/CodeMirrorEditor.test.d.ts +1 -0
- package/dist/es/code-mirror-editor/CodeMirrorEditor.vue.d.ts +25 -0
- package/dist/es/code-mirror-editor/CodeMirrorEditor.vue.js +178 -0
- package/dist/es/code-mirror-editor/CodeMirrorEditor.vue3.js +5 -0
- package/dist/es/code-mirror-editor/index.d.ts +4 -0
- package/dist/es/code-mirror-editor/index.js +8 -0
- package/dist/es/code-mirror-editor/style.css +44 -0
- package/dist/es/components.d.ts +1 -0
- package/dist/es/components.js +4 -1
- package/dist/es/form/FormItem.vue.js +245 -94
- package/dist/es/index.js +2 -0
- package/dist/es/node_modules/@element-plus/icons-vue/dist/index.js +84 -0
- package/dist/es/package.json.js +2 -2
- package/dist/es/page-header/PopoverMenu.vue.d.ts +1 -1
- package/dist/es/style.css +125 -4
- package/dist/es/styles.css +1 -1
- package/dist/lib/button/Button.vue.js +10 -10
- package/dist/lib/button-nav/ButtonNav.vue.js +4 -4
- package/dist/lib/code-mirror-editor/CodeMirrorEditor.test.d.ts +1 -0
- package/dist/lib/code-mirror-editor/CodeMirrorEditor.vue.d.ts +25 -0
- package/dist/lib/code-mirror-editor/CodeMirrorEditor.vue.js +178 -0
- package/dist/lib/code-mirror-editor/CodeMirrorEditor.vue3.js +5 -0
- package/dist/lib/code-mirror-editor/index.d.ts +4 -0
- package/dist/lib/code-mirror-editor/index.js +8 -0
- package/dist/lib/code-mirror-editor/style.css +44 -0
- package/dist/lib/components.d.ts +1 -0
- package/dist/lib/components.js +15 -12
- package/dist/lib/form/Form.vue.js +6 -6
- package/dist/lib/form/FormItem.vue.js +248 -97
- package/dist/lib/index.js +10 -8
- package/dist/lib/menu/Aside.vue.js +2 -2
- package/dist/lib/menu/Menu.vue.js +2 -2
- package/dist/lib/node_modules/@element-plus/icons-vue/dist/index.js +84 -0
- package/dist/lib/package.json.js +2 -2
- package/dist/lib/page-header/PageHeader.vue.js +2 -2
- package/dist/lib/page-header/PopoverMenu.vue.d.ts +1 -1
- package/dist/lib/page-header/PopoverMenu.vue.js +12 -12
- package/dist/lib/style.css +125 -4
- package/dist/lib/styles.css +1 -1
- package/dist/umd/index.js +626 -104
- package/dist/umd/styles.css +1 -1
- package/package.json +6 -1
|
@@ -29,22 +29,44 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
var __async = (__this, __arguments, generator) => {
|
|
33
|
+
return new Promise((resolve, reject) => {
|
|
34
|
+
var fulfilled = (value) => {
|
|
35
|
+
try {
|
|
36
|
+
step(generator.next(value));
|
|
37
|
+
} catch (e) {
|
|
38
|
+
reject(e);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var rejected = (value) => {
|
|
42
|
+
try {
|
|
43
|
+
step(generator.throw(value));
|
|
44
|
+
} catch (e) {
|
|
45
|
+
reject(e);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
49
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, resolveDynamicComponent, Fragment, createTextVNode, toDisplayString, createCommentVNode, createSlots, h } from "vue";
|
|
53
|
+
import { Plus as plus_default, CircleCloseFilled as circle_close_filled_default, CircleCheckFilled as circle_check_filled_default, WarningFilled as warning_filled_default, QuestionFilled as question_filled_default } from "../node_modules/@element-plus/icons-vue/dist/index.js";
|
|
54
|
+
import { ElFormItem, ElDivider, ElInput, ElUpload, ElButton, ElIcon, ElInputNumber, ElRate, ElColorPicker, ElTreeSelect, ElCascader, ElSlider, ElSwitch, ElCheckboxGroup, ElCheckbox, ElRadioGroup, ElRadio, ElTimeSelect, ElTimePicker, ElDatePicker, ElAutocomplete, ElSelect, ElTooltip } from "element-plus";
|
|
34
55
|
const _hoisted_1 = {
|
|
35
56
|
key: 0,
|
|
36
57
|
style: { "display": "none" }
|
|
37
58
|
};
|
|
38
|
-
const _hoisted_2 = { class: "jky-form-item__title text-base font-medium" };
|
|
39
|
-
const _hoisted_3 = {
|
|
59
|
+
const _hoisted_2 = { class: "jky-form-item__title text-base font-medium flex items-center" };
|
|
60
|
+
const _hoisted_3 = { class: "flex items-center" };
|
|
61
|
+
const _hoisted_4 = {
|
|
40
62
|
key: 0,
|
|
41
63
|
class: "flex items-center"
|
|
42
64
|
};
|
|
43
|
-
const
|
|
65
|
+
const _hoisted_5 = {
|
|
44
66
|
key: 0,
|
|
45
67
|
class: "mr-2"
|
|
46
68
|
};
|
|
47
|
-
const
|
|
69
|
+
const _hoisted_6 = {
|
|
48
70
|
key: 1,
|
|
49
71
|
class: "ml-2"
|
|
50
72
|
};
|
|
@@ -74,20 +96,43 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
74
96
|
},
|
|
75
97
|
setup(__props) {
|
|
76
98
|
const props = __props;
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
99
|
+
const loading = ref(false);
|
|
100
|
+
const componentProps = ref({});
|
|
101
|
+
function loadComponentProps() {
|
|
102
|
+
return __async(this, null, function* () {
|
|
103
|
+
const configProps = props.config.componentProps;
|
|
104
|
+
if (!configProps) {
|
|
105
|
+
componentProps.value = {};
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (typeof configProps === "function") {
|
|
109
|
+
loading.value = true;
|
|
110
|
+
try {
|
|
111
|
+
const result = yield configProps({
|
|
112
|
+
model: props.model,
|
|
113
|
+
field: props.field,
|
|
114
|
+
$form: props.model
|
|
115
|
+
});
|
|
116
|
+
componentProps.value = result || {};
|
|
117
|
+
} catch (error) {
|
|
118
|
+
console.error("Failed to load component props:", error);
|
|
119
|
+
componentProps.value = {};
|
|
120
|
+
} finally {
|
|
121
|
+
loading.value = false;
|
|
122
|
+
}
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
componentProps.value = configProps;
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
watch(
|
|
129
|
+
() => props.model,
|
|
130
|
+
() => {
|
|
131
|
+
loadComponentProps();
|
|
132
|
+
},
|
|
133
|
+
{ deep: true }
|
|
134
|
+
);
|
|
135
|
+
loadComponentProps();
|
|
91
136
|
const modelValue = computed({
|
|
92
137
|
get: () => props.model[props.field],
|
|
93
138
|
set: (val) => {
|
|
@@ -156,7 +201,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
156
201
|
return rest;
|
|
157
202
|
});
|
|
158
203
|
function renderComponent(type) {
|
|
159
|
-
var _a, _b
|
|
204
|
+
var _a, _b;
|
|
205
|
+
if (type === "divider") {
|
|
206
|
+
const dividerProps = __spreadValues({}, componentProps.value);
|
|
207
|
+
return h(ElDivider, dividerProps, {
|
|
208
|
+
default: () => props.config.children || null
|
|
209
|
+
});
|
|
210
|
+
}
|
|
160
211
|
const commonProps = __spreadValues({
|
|
161
212
|
"modelValue": modelValue.value,
|
|
162
213
|
"onUpdate:modelValue": (val) => {
|
|
@@ -164,11 +215,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
164
215
|
},
|
|
165
216
|
"placeholder": props.config.placeholder,
|
|
166
217
|
"disabled": props.disabled,
|
|
167
|
-
"clearable":
|
|
218
|
+
"clearable": props.config.clearable
|
|
168
219
|
}, componentProps.value);
|
|
169
|
-
const inputNumberProps = type === "input-number" ? __spreadProps(__spreadValues({}, commonProps), {
|
|
170
|
-
modelValue: commonProps.modelValue === "" ? null : commonProps.modelValue
|
|
171
|
-
}) : commonProps;
|
|
172
220
|
switch (type) {
|
|
173
221
|
case "input":
|
|
174
222
|
return h(ElInput, __spreadProps(__spreadValues({}, commonProps), {
|
|
@@ -181,96 +229,185 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
181
229
|
rows: 4
|
|
182
230
|
}));
|
|
183
231
|
case "select": {
|
|
184
|
-
const
|
|
185
|
-
return h(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}),
|
|
191
|
-
{
|
|
192
|
-
default: () => options.map(
|
|
193
|
-
(option) => h(ElOption, {
|
|
194
|
-
key: option.value,
|
|
195
|
-
label: option.label,
|
|
196
|
-
value: option.value,
|
|
197
|
-
disabled: option.disabled
|
|
198
|
-
})
|
|
199
|
-
)
|
|
200
|
-
}
|
|
201
|
-
);
|
|
232
|
+
const selectProps = __spreadValues(__spreadValues({}, commonProps), componentProps.value);
|
|
233
|
+
return h(ElSelect, selectProps);
|
|
234
|
+
}
|
|
235
|
+
case "autocomplete": {
|
|
236
|
+
const autocompleteProps = __spreadValues(__spreadValues({}, commonProps), componentProps.value);
|
|
237
|
+
return h(ElAutocomplete, autocompleteProps);
|
|
202
238
|
}
|
|
203
239
|
case "datepicker":
|
|
204
|
-
return h(ElDatePicker,
|
|
205
|
-
type: "date"
|
|
206
|
-
}));
|
|
240
|
+
return h(ElDatePicker, __spreadValues(__spreadValues({}, commonProps), componentProps.value));
|
|
207
241
|
case "datetime-picker":
|
|
208
|
-
return h(ElDatePicker,
|
|
209
|
-
type: "datetime"
|
|
210
|
-
}));
|
|
242
|
+
return h(ElDatePicker, __spreadValues(__spreadValues({}, commonProps), componentProps.value));
|
|
211
243
|
case "time-picker":
|
|
212
|
-
return h(ElTimePicker, __spreadValues({}, commonProps));
|
|
244
|
+
return h(ElTimePicker, __spreadValues(__spreadValues({}, commonProps), componentProps.value));
|
|
213
245
|
case "time-select":
|
|
214
|
-
return h(ElTimeSelect, __spreadValues({}, commonProps));
|
|
246
|
+
return h(ElTimeSelect, __spreadValues(__spreadValues({}, commonProps), componentProps.value));
|
|
215
247
|
case "radio-group": {
|
|
216
|
-
const
|
|
248
|
+
const radioGroupProps = __spreadValues(__spreadValues({}, commonProps), componentProps.value);
|
|
217
249
|
return h(
|
|
218
250
|
ElRadioGroup,
|
|
219
|
-
|
|
251
|
+
radioGroupProps,
|
|
220
252
|
{
|
|
221
|
-
default: () =>
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
253
|
+
default: () => {
|
|
254
|
+
const options = componentProps.value.options || props.config.options || [];
|
|
255
|
+
return options.map(
|
|
256
|
+
(option) => h(ElRadio, {
|
|
257
|
+
key: option.value,
|
|
258
|
+
value: option.value,
|
|
259
|
+
disabled: option.disabled
|
|
260
|
+
}, {
|
|
261
|
+
default: () => option.label
|
|
262
|
+
})
|
|
263
|
+
);
|
|
264
|
+
}
|
|
230
265
|
}
|
|
231
266
|
);
|
|
232
267
|
}
|
|
233
268
|
case "checkbox-group": {
|
|
234
|
-
const options = props.config.options || [];
|
|
235
269
|
const arrayModelValue = Array.isArray(modelValue.value) ? modelValue.value : [];
|
|
270
|
+
const checkboxGroupProps = __spreadValues(__spreadProps(__spreadValues({}, commonProps), {
|
|
271
|
+
modelValue: arrayModelValue
|
|
272
|
+
}), componentProps.value);
|
|
236
273
|
return h(
|
|
237
274
|
ElCheckboxGroup,
|
|
238
|
-
|
|
239
|
-
modelValue: arrayModelValue
|
|
240
|
-
}),
|
|
275
|
+
checkboxGroupProps,
|
|
241
276
|
{
|
|
242
|
-
default: () =>
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
277
|
+
default: () => {
|
|
278
|
+
const options = componentProps.value.options || props.config.options || [];
|
|
279
|
+
return options.map(
|
|
280
|
+
(option) => h(ElCheckbox, {
|
|
281
|
+
key: option.value,
|
|
282
|
+
value: option.value,
|
|
283
|
+
disabled: option.disabled
|
|
284
|
+
}, {
|
|
285
|
+
default: () => option.label
|
|
286
|
+
})
|
|
287
|
+
);
|
|
288
|
+
}
|
|
251
289
|
}
|
|
252
290
|
);
|
|
253
291
|
}
|
|
254
292
|
case "switch":
|
|
255
|
-
return h(ElSwitch, __spreadValues({}, commonProps));
|
|
293
|
+
return h(ElSwitch, __spreadValues(__spreadValues({}, commonProps), componentProps.value));
|
|
256
294
|
case "slider":
|
|
257
|
-
return h(ElSlider, __spreadValues({}, commonProps));
|
|
258
|
-
case "cascader":
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
295
|
+
return h(ElSlider, __spreadValues(__spreadValues({}, commonProps), componentProps.value));
|
|
296
|
+
case "cascader": {
|
|
297
|
+
const cascaderProps = __spreadValues(__spreadValues({}, commonProps), componentProps.value);
|
|
298
|
+
return h(ElCascader, cascaderProps);
|
|
299
|
+
}
|
|
300
|
+
case "tree-select": {
|
|
301
|
+
const treeSelectProps = __spreadValues(__spreadValues({}, commonProps), componentProps.value);
|
|
302
|
+
return h(ElTreeSelect, treeSelectProps);
|
|
303
|
+
}
|
|
262
304
|
case "color-picker":
|
|
263
|
-
return h(ElColorPicker, __spreadValues({}, commonProps));
|
|
305
|
+
return h(ElColorPicker, __spreadValues(__spreadValues({}, commonProps), componentProps.value));
|
|
264
306
|
case "rate":
|
|
265
|
-
return h(ElRate, __spreadValues({}, commonProps));
|
|
266
|
-
case "input-number":
|
|
307
|
+
return h(ElRate, __spreadValues(__spreadValues({}, commonProps), componentProps.value));
|
|
308
|
+
case "input-number": {
|
|
309
|
+
const numberModelValue = modelValue.value === "" || modelValue.value === null || modelValue.value === void 0 ? null : Number(modelValue.value);
|
|
310
|
+
const inputNumberProps = __spreadValues(__spreadProps(__spreadValues({}, commonProps), {
|
|
311
|
+
"modelValue": numberModelValue,
|
|
312
|
+
"onUpdate:modelValue": (val) => {
|
|
313
|
+
props.model[props.field] = val;
|
|
314
|
+
}
|
|
315
|
+
}), componentProps.value);
|
|
267
316
|
return h(ElInputNumber, inputNumberProps);
|
|
317
|
+
}
|
|
318
|
+
// 图片上传
|
|
319
|
+
case "image-upload": {
|
|
320
|
+
const uploadProps = __spreadValues(__spreadProps(__spreadValues({}, commonProps), {
|
|
321
|
+
"action": componentProps.value.action || "#",
|
|
322
|
+
"file-list": componentProps.value.fileList || [],
|
|
323
|
+
"list-type": componentProps.value.listType || "picture-card",
|
|
324
|
+
"onPreview": componentProps.value.onPreview,
|
|
325
|
+
"onRemove": componentProps.value.onRemove
|
|
326
|
+
}), componentProps.value);
|
|
327
|
+
if (uploadProps["list-type"] === "picture-card") {
|
|
328
|
+
return h(ElUpload, uploadProps, {
|
|
329
|
+
default: () => h("div", { class: "el-upload__picture-card-wrapper" }, [
|
|
330
|
+
h(ElIcon, { size: 24 }, { default: () => h(plus_default) })
|
|
331
|
+
])
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
if (uploadProps["list-type"] === "picture") {
|
|
335
|
+
return h(ElUpload, uploadProps, {
|
|
336
|
+
default: () => h(ElButton, { type: "primary" }, { default: () => "点击上传" })
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
return h(ElUpload, uploadProps);
|
|
340
|
+
}
|
|
341
|
+
// 文件上传
|
|
342
|
+
case "file-upload": {
|
|
343
|
+
const uploadProps = __spreadValues(__spreadProps(__spreadValues({}, commonProps), {
|
|
344
|
+
"action": componentProps.value.action || "#",
|
|
345
|
+
"file-list": componentProps.value.fileList || [],
|
|
346
|
+
"list-type": componentProps.value.listType || "text",
|
|
347
|
+
"onPreview": componentProps.value.onPreview,
|
|
348
|
+
"onRemove": componentProps.value.onRemove
|
|
349
|
+
}), componentProps.value);
|
|
350
|
+
if (uploadProps["list-type"] === "text") {
|
|
351
|
+
return h(ElUpload, uploadProps, {
|
|
352
|
+
default: () => h(ElButton, { type: "primary" }, { default: () => "点击上传" })
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
return h(ElUpload, uploadProps);
|
|
356
|
+
}
|
|
268
357
|
case "custom":
|
|
269
|
-
return (
|
|
358
|
+
return (_b = (_a = props.config).render) == null ? void 0 : _b.call(_a, commonProps);
|
|
270
359
|
default:
|
|
271
360
|
return h(ElInput, commonProps);
|
|
272
361
|
}
|
|
273
362
|
}
|
|
363
|
+
function renderHelpTooltip() {
|
|
364
|
+
if (!props.config.help)
|
|
365
|
+
return null;
|
|
366
|
+
const { help } = props.config;
|
|
367
|
+
const { text, type = "info", position = "top" } = help;
|
|
368
|
+
const iconMap = {
|
|
369
|
+
info: { icon: question_filled_default, color: "var(--el-color-info)" },
|
|
370
|
+
warning: { icon: warning_filled_default, color: "var(--el-color-warning)" },
|
|
371
|
+
success: { icon: circle_check_filled_default, color: "var(--el-color-success)" },
|
|
372
|
+
error: { icon: circle_close_filled_default, color: "var(--el-color-error)" }
|
|
373
|
+
};
|
|
374
|
+
const { icon, color } = iconMap[type];
|
|
375
|
+
return h(
|
|
376
|
+
ElTooltip,
|
|
377
|
+
{
|
|
378
|
+
content: text,
|
|
379
|
+
placement: position
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
default: () => h(
|
|
383
|
+
ElIcon,
|
|
384
|
+
{
|
|
385
|
+
style: { color, cursor: "pointer", marginLeft: "4px" },
|
|
386
|
+
size: 16
|
|
387
|
+
},
|
|
388
|
+
{ default: () => h(icon) }
|
|
389
|
+
)
|
|
390
|
+
}
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
function renderHelpText() {
|
|
394
|
+
if (!props.config.help || props.config.help.tooltip)
|
|
395
|
+
return null;
|
|
396
|
+
const { text, type = "info" } = props.config.help;
|
|
397
|
+
const typeStyles = {
|
|
398
|
+
info: "bg-(--el-color-info)/10 text-(--el-color-info)",
|
|
399
|
+
warning: "bg-(--el-color-warning)/10 text-(--el-color-warning)",
|
|
400
|
+
success: "bg-(--el-color-success)/10 text-(--el-color-success)",
|
|
401
|
+
error: "bg-(--el-color-error)/10 text-(--el-color-error)"
|
|
402
|
+
};
|
|
403
|
+
return h(
|
|
404
|
+
"div",
|
|
405
|
+
{
|
|
406
|
+
class: `jky-form-item__help mt-2 text-xs px-2 py-1.5 rounded ${typeStyles[type]}`
|
|
407
|
+
},
|
|
408
|
+
{ default: () => text }
|
|
409
|
+
);
|
|
410
|
+
}
|
|
274
411
|
return (_ctx, _cache) => {
|
|
275
412
|
return isHidden.value ? (openBlock(), createElementBlock("div", _hoisted_1)) : __props.config.title && !__props.config.label ? (openBlock(), createBlock(unref(ElFormItem), mergeProps({
|
|
276
413
|
key: 1,
|
|
@@ -283,9 +420,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
283
420
|
createElementVNode("div", _hoisted_2, [
|
|
284
421
|
__props.config.titleRender ? (openBlock(), createBlock(resolveDynamicComponent(__props.config.titleRender({ model: modelValue.value, field: __props.field })), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
285
422
|
createTextVNode(toDisplayString(__props.config.title), 1)
|
|
286
|
-
], 64))
|
|
423
|
+
], 64)),
|
|
424
|
+
__props.config.help && __props.config.help.tooltip ? (openBlock(), createBlock(resolveDynamicComponent(renderHelpTooltip()), { key: 2 })) : createCommentVNode("", true)
|
|
287
425
|
]),
|
|
288
|
-
(openBlock(), createBlock(resolveDynamicComponent(renderComponent(__props.config.type || "input"))))
|
|
426
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderComponent(__props.config.type || "input")))),
|
|
427
|
+
__props.config.help && !__props.config.help.tooltip ? (openBlock(), createBlock(resolveDynamicComponent(renderHelpText()), { key: 0 })) : createCommentVNode("", true)
|
|
289
428
|
]),
|
|
290
429
|
_: 1
|
|
291
430
|
}, 16, ["prop", "class", "style"])) : (openBlock(), createBlock(unref(ElFormItem), mergeProps({
|
|
@@ -294,16 +433,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
294
433
|
prop: __props.field
|
|
295
434
|
}, __spreadValues(__spreadValues({}, formItemProps.value), _ctx.$attrs), {
|
|
296
435
|
class: ["jky-form-item", [__props.config.className]]
|
|
297
|
-
}), {
|
|
436
|
+
}), createSlots({
|
|
298
437
|
default: withCtx(() => [
|
|
299
|
-
__props.config.prepend || __props.config.append ? (openBlock(), createElementBlock("div",
|
|
300
|
-
__props.config.prepend ? (openBlock(), createElementBlock("span",
|
|
438
|
+
__props.config.prepend || __props.config.append ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
439
|
+
__props.config.prepend ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(__props.config.prepend), 1)) : createCommentVNode("", true),
|
|
301
440
|
(openBlock(), createBlock(resolveDynamicComponent(renderComponent(__props.config.type || "input")))),
|
|
302
|
-
__props.config.append ? (openBlock(), createElementBlock("span",
|
|
303
|
-
])) : (openBlock(), createBlock(resolveDynamicComponent(renderComponent(__props.config.type || "input")), { key: 1 }))
|
|
441
|
+
__props.config.append ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(__props.config.append), 1)) : createCommentVNode("", true)
|
|
442
|
+
])) : (openBlock(), createBlock(resolveDynamicComponent(renderComponent(__props.config.type || "input")), { key: 1 })),
|
|
443
|
+
__props.config.help && !__props.config.help.tooltip ? (openBlock(), createBlock(resolveDynamicComponent(renderHelpText()), { key: 2 })) : createCommentVNode("", true)
|
|
304
444
|
]),
|
|
305
|
-
_:
|
|
306
|
-
},
|
|
445
|
+
_: 2
|
|
446
|
+
}, [
|
|
447
|
+
__props.config.help && __props.config.help.tooltip ? {
|
|
448
|
+
name: "label",
|
|
449
|
+
fn: withCtx(() => [
|
|
450
|
+
createElementVNode("div", _hoisted_3, [
|
|
451
|
+
createElementVNode("span", null, toDisplayString(__props.config.label), 1),
|
|
452
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderHelpTooltip())))
|
|
453
|
+
])
|
|
454
|
+
]),
|
|
455
|
+
key: "0"
|
|
456
|
+
} : void 0
|
|
457
|
+
]), 1040, ["label", "prop", "class"]));
|
|
307
458
|
};
|
|
308
459
|
}
|
|
309
460
|
}));
|
package/dist/es/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { createInstaller } from "./utils/installer.js";
|
|
|
4
4
|
import { JkyComponentLibResolver } from "./resolver.js";
|
|
5
5
|
import { JkyButton } from "./button/index.js";
|
|
6
6
|
import { JkyButtonNav } from "./button-nav/index.js";
|
|
7
|
+
import { JkyCodeMirrorEditor } from "./code-mirror-editor/index.js";
|
|
7
8
|
import { JkyForm } from "./form/index.js";
|
|
8
9
|
import { JkyMenu } from "./menu/index.js";
|
|
9
10
|
import { JkyPageHeader } from "./page-header/index.js";
|
|
@@ -14,6 +15,7 @@ const version = installer.version;
|
|
|
14
15
|
export {
|
|
15
16
|
JkyButton,
|
|
16
17
|
JkyButtonNav,
|
|
18
|
+
JkyCodeMirrorEditor,
|
|
17
19
|
JkyComponentLibResolver,
|
|
18
20
|
JkyForm,
|
|
19
21
|
JkyMenu,
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode } from "vue";
|
|
2
|
+
/*! Element Plus Icons Vue v2.3.2 */
|
|
3
|
+
var _sfc_main48 = /* @__PURE__ */ defineComponent({
|
|
4
|
+
name: "CircleCheckFilled",
|
|
5
|
+
__name: "circle-check-filled",
|
|
6
|
+
setup(__props) {
|
|
7
|
+
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
viewBox: "0 0 1024 1024"
|
|
10
|
+
}, [
|
|
11
|
+
createElementVNode("path", {
|
|
12
|
+
fill: "currentColor",
|
|
13
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"
|
|
14
|
+
})
|
|
15
|
+
]));
|
|
16
|
+
}
|
|
17
|
+
}), circle_check_filled_default = _sfc_main48;
|
|
18
|
+
var _sfc_main50 = /* @__PURE__ */ defineComponent({
|
|
19
|
+
name: "CircleCloseFilled",
|
|
20
|
+
__name: "circle-close-filled",
|
|
21
|
+
setup(__props) {
|
|
22
|
+
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
23
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
+
viewBox: "0 0 1024 1024"
|
|
25
|
+
}, [
|
|
26
|
+
createElementVNode("path", {
|
|
27
|
+
fill: "currentColor",
|
|
28
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
|
|
29
|
+
})
|
|
30
|
+
]));
|
|
31
|
+
}
|
|
32
|
+
}), circle_close_filled_default = _sfc_main50;
|
|
33
|
+
var _sfc_main201 = /* @__PURE__ */ defineComponent({
|
|
34
|
+
name: "Plus",
|
|
35
|
+
__name: "plus",
|
|
36
|
+
setup(__props) {
|
|
37
|
+
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
38
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
+
viewBox: "0 0 1024 1024"
|
|
40
|
+
}, [
|
|
41
|
+
createElementVNode("path", {
|
|
42
|
+
fill: "currentColor",
|
|
43
|
+
d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
|
|
44
|
+
})
|
|
45
|
+
]));
|
|
46
|
+
}
|
|
47
|
+
}), plus_default = _sfc_main201;
|
|
48
|
+
var _sfc_main211 = /* @__PURE__ */ defineComponent({
|
|
49
|
+
name: "QuestionFilled",
|
|
50
|
+
__name: "question-filled",
|
|
51
|
+
setup(__props) {
|
|
52
|
+
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
53
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
54
|
+
viewBox: "0 0 1024 1024"
|
|
55
|
+
}, [
|
|
56
|
+
createElementVNode("path", {
|
|
57
|
+
fill: "currentColor",
|
|
58
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"
|
|
59
|
+
})
|
|
60
|
+
]));
|
|
61
|
+
}
|
|
62
|
+
}), question_filled_default = _sfc_main211;
|
|
63
|
+
var _sfc_main287 = /* @__PURE__ */ defineComponent({
|
|
64
|
+
name: "WarningFilled",
|
|
65
|
+
__name: "warning-filled",
|
|
66
|
+
setup(__props) {
|
|
67
|
+
return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
|
|
68
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
69
|
+
viewBox: "0 0 1024 1024"
|
|
70
|
+
}, [
|
|
71
|
+
createElementVNode("path", {
|
|
72
|
+
fill: "currentColor",
|
|
73
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"
|
|
74
|
+
})
|
|
75
|
+
]));
|
|
76
|
+
}
|
|
77
|
+
}), warning_filled_default = _sfc_main287;
|
|
78
|
+
export {
|
|
79
|
+
circle_check_filled_default as CircleCheckFilled,
|
|
80
|
+
circle_close_filled_default as CircleCloseFilled,
|
|
81
|
+
plus_default as Plus,
|
|
82
|
+
question_filled_default as QuestionFilled,
|
|
83
|
+
warning_filled_default as WarningFilled
|
|
84
|
+
};
|
package/dist/es/package.json.js
CHANGED
|
@@ -6,7 +6,7 @@ declare const _default: import('vue').DefineComponent<PageHeaderPopoverMenuProps
|
|
|
6
6
|
placement: import('element-plus').Placement;
|
|
7
7
|
width: number;
|
|
8
8
|
menus: PageHeaderPopoverMenuItem[];
|
|
9
|
-
buttonClass: string;
|
|
10
9
|
highlightCurrent: boolean;
|
|
10
|
+
buttonClass: string;
|
|
11
11
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
export default _default;
|