@fangzhongya/fang-ui 0.1.55 → 0.1.57
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/components/audios/src/index2.cjs +16 -10
- package/dist/components/audios/src/index2.js +16 -10
- package/dist/components/box-adjust/src/index2.cjs +6 -4
- package/dist/components/box-adjust/src/index2.js +6 -4
- package/dist/components/box-title/src/index2.cjs +3 -2
- package/dist/components/box-title/src/index2.js +3 -2
- package/dist/components/buttons/src/data.d.ts +5 -5
- package/dist/components/buttons/src/index2.cjs +2 -2
- package/dist/components/buttons/src/index2.js +2 -2
- package/dist/components/cascaders/src/data.d.ts +5 -5
- package/dist/components/checks/src/data.d.ts +5 -5
- package/dist/components/common/list.d.ts +1 -1
- package/dist/components/common/use.cjs +1 -1
- package/dist/components/common/use.js +1 -1
- package/dist/components/dates/src/data.d.ts +5 -5
- package/dist/components/dates2/src/data.d.ts +5 -5
- package/dist/components/double/src/index2.cjs +3 -2
- package/dist/components/double/src/index2.js +3 -2
- package/dist/components/edit/index.css +5 -5
- package/dist/components/edit/index.scss +5 -5
- package/dist/components/edit/src/data.cjs +3 -2
- package/dist/components/edit/src/data.d.ts +5 -1
- package/dist/components/edit/src/data.js +3 -2
- package/dist/components/edit/src/index2.cjs +32 -23
- package/dist/components/edit/src/index2.js +32 -23
- package/dist/components/edit-data/src/area/array-json2.cjs +8 -4
- package/dist/components/edit-data/src/area/array-json2.js +8 -4
- package/dist/components/edit-data/src/area/array2.cjs +46 -8
- package/dist/components/edit-data/src/area/array2.js +47 -9
- package/dist/components/edit-data/src/area/editor2.cjs +22 -4
- package/dist/components/edit-data/src/area/editor2.js +22 -4
- package/dist/components/edit-data/src/area/general2.cjs +8 -1
- package/dist/components/edit-data/src/area/general2.js +8 -1
- package/dist/components/edit-data/src/area/object-json2.cjs +5 -1
- package/dist/components/edit-data/src/area/object-json2.js +5 -1
- package/dist/components/edit-data/src/area/object2.cjs +48 -11
- package/dist/components/edit-data/src/area/object2.js +49 -12
- package/dist/components/edit-data/src/data/array2.cjs +9 -5
- package/dist/components/edit-data/src/data/array2.js +9 -5
- package/dist/components/edit-data/src/data/bigint2.cjs +7 -3
- package/dist/components/edit-data/src/data/bigint2.js +7 -3
- package/dist/components/edit-data/src/data/boolean2.cjs +7 -3
- package/dist/components/edit-data/src/data/boolean2.js +7 -3
- package/dist/components/edit-data/src/data/date.cjs +4 -0
- package/dist/components/edit-data/src/data/date.js +4 -0
- package/dist/components/edit-data/src/data/date2.cjs +48 -0
- package/dist/components/edit-data/src/data/date2.js +48 -0
- package/dist/components/edit-data/src/data/function2.cjs +16 -7
- package/dist/components/edit-data/src/data/function2.js +17 -8
- package/dist/components/edit-data/src/data/null2.cjs +3 -1
- package/dist/components/edit-data/src/data/null2.js +4 -2
- package/dist/components/edit-data/src/data/number2.cjs +7 -3
- package/dist/components/edit-data/src/data/number2.js +7 -3
- package/dist/components/edit-data/src/data/object2.cjs +9 -5
- package/dist/components/edit-data/src/data/object2.js +9 -5
- package/dist/components/edit-data/src/data/other2.cjs +13 -5
- package/dist/components/edit-data/src/data/other2.js +14 -6
- package/dist/components/edit-data/src/data/string2.cjs +7 -3
- package/dist/components/edit-data/src/data/string2.js +7 -3
- package/dist/components/edit-data/src/data/symbol2.cjs +7 -3
- package/dist/components/edit-data/src/data/symbol2.js +7 -3
- package/dist/components/edit-data/src/data/undefined2.cjs +3 -1
- package/dist/components/edit-data/src/data/undefined2.js +4 -2
- package/dist/components/edit-data/src/data.cjs +10 -0
- package/dist/components/edit-data/src/data.d.ts +20 -0
- package/dist/components/edit-data/src/data.js +10 -0
- package/dist/components/edit-data/src/index2.cjs +31 -2
- package/dist/components/edit-data/src/index2.js +45 -16
- package/dist/components/edit-data-add/src/index2.cjs +2 -0
- package/dist/components/edit-data-add/src/index2.js +2 -0
- package/dist/components/edit-float/src/index2.cjs +3 -2
- package/dist/components/edit-float/src/index2.js +3 -2
- package/dist/components/history/src/index2.cjs +6 -4
- package/dist/components/history/src/index2.js +6 -4
- package/dist/components/input-array/src/index2.cjs +3 -2
- package/dist/components/input-array/src/index2.js +3 -2
- package/dist/components/input-history/src/index2.cjs +3 -2
- package/dist/components/input-history/src/index2.js +3 -2
- package/dist/components/input-select/src/index2.cjs +6 -4
- package/dist/components/input-select/src/index2.js +6 -4
- package/dist/components/labels/src/data.d.ts +5 -5
- package/dist/components/message/index.d.ts +11 -4
- package/dist/components/message/src/function.d.ts +11 -4
- package/dist/components/message-box/index.d.ts +2 -3
- package/dist/components/message-box/src/function.d.ts +2 -3
- package/dist/components/retract/index.css +23 -20
- package/dist/components/retract/index.scss +39 -20
- package/dist/components/retract/src/data.cjs +4 -1
- package/dist/components/retract/src/data.d.ts +4 -1
- package/dist/components/retract/src/data.js +4 -1
- package/dist/components/retract/src/index2.cjs +12 -10
- package/dist/components/retract/src/index2.js +9 -7
- package/dist/components/right-key/index.css +2 -1
- package/dist/components/right-key/index.scss +2 -1
- package/dist/components/right-key/src/data.cjs +7 -2
- package/dist/components/right-key/src/data.d.ts +5 -0
- package/dist/components/right-key/src/data.js +7 -2
- package/dist/components/right-key/src/index2.cjs +134 -60
- package/dist/components/right-key/src/index2.js +135 -61
- package/dist/components/selects/src/data.d.ts +5 -5
- package/dist/components/stick-window/src/index2.cjs +3 -2
- package/dist/components/stick-window/src/index2.js +3 -2
- package/dist/components/switchs/src/data.d.ts +5 -4
- package/dist/components/uploads/src/data.d.ts +5 -5
- package/dist/components/uploads/src/index2.cjs +26 -21
- package/dist/components/uploads/src/index2.js +15 -10
- package/dist/components/videos/src/index2.cjs +30 -19
- package/dist/components/videos/src/index2.js +30 -19
- package/dist/components/window/src/index2.cjs +9 -6
- package/dist/components/window/src/index2.js +9 -6
- package/dist/css/edit.css +5 -5
- package/dist/css/index.css +30 -26
- package/dist/css/retract.css +23 -20
- package/dist/css/right-key.css +2 -1
- package/dist/hooks/model/index.cjs +25 -0
- package/dist/hooks/model/index.d.ts +2 -0
- package/dist/hooks/model/index.js +25 -0
- package/dist/icons/index.json +1 -1
- package/dist/icons/vue/bar.cjs +2 -18
- package/dist/icons/vue/bar.js +1 -17
- package/dist/icons/vue/bar2.cjs +21 -2
- package/dist/icons/vue/bar2.js +21 -2
- package/dist/icons/vue/below.cjs +2 -18
- package/dist/icons/vue/below.js +1 -17
- package/dist/icons/vue/below2.cjs +21 -2
- package/dist/icons/vue/below2.js +21 -2
- package/dist/icons/vue/bicycle.cjs +2 -15
- package/dist/icons/vue/bicycle.js +1 -14
- package/dist/icons/vue/bicycle2.cjs +18 -2
- package/dist/icons/vue/bicycle2.js +18 -2
- package/dist/icons/vue/bottom-left.cjs +2 -22
- package/dist/icons/vue/bottom-left.js +1 -21
- package/dist/icons/vue/bottom-left2.cjs +25 -2
- package/dist/icons/vue/bottom-left2.js +25 -2
- package/dist/icons/vue/bottom-right.cjs +2 -22
- package/dist/icons/vue/bottom-right.js +1 -21
- package/dist/icons/vue/bottom-right2.cjs +25 -2
- package/dist/icons/vue/bottom-right2.js +25 -2
- package/dist/icons/vue/bottom.cjs +2 -18
- package/dist/icons/vue/bottom.js +1 -17
- package/dist/icons/vue/bottom2.cjs +21 -2
- package/dist/icons/vue/bottom2.js +21 -2
- package/dist/icons/vue/catalogue.cjs +2 -23
- package/dist/icons/vue/catalogue.js +1 -22
- package/dist/icons/vue/catalogue2.cjs +26 -2
- package/dist/icons/vue/catalogue2.js +26 -2
- package/dist/icons/vue/clear.cjs +2 -23
- package/dist/icons/vue/clear.js +1 -22
- package/dist/icons/vue/clear2.cjs +26 -2
- package/dist/icons/vue/clear2.js +26 -2
- package/dist/icons/vue/close.cjs +2 -18
- package/dist/icons/vue/close.js +1 -17
- package/dist/icons/vue/close2.cjs +21 -2
- package/dist/icons/vue/close2.js +21 -2
- package/dist/icons/vue/delete.cjs +2 -18
- package/dist/icons/vue/delete.js +1 -17
- package/dist/icons/vue/delete2.cjs +21 -2
- package/dist/icons/vue/delete2.js +21 -2
- package/dist/icons/vue/document.cjs +2 -23
- package/dist/icons/vue/document.js +1 -22
- package/dist/icons/vue/document2.cjs +26 -2
- package/dist/icons/vue/document2.js +26 -2
- package/dist/icons/vue/down.cjs +2 -18
- package/dist/icons/vue/down.js +1 -17
- package/dist/icons/vue/down2.cjs +21 -2
- package/dist/icons/vue/down2.js +21 -2
- package/dist/icons/vue/download.cjs +2 -18
- package/dist/icons/vue/download.js +1 -17
- package/dist/icons/vue/download2.cjs +21 -2
- package/dist/icons/vue/download2.js +21 -2
- package/dist/icons/vue/edit.cjs +2 -23
- package/dist/icons/vue/edit.js +1 -22
- package/dist/icons/vue/edit2.cjs +26 -2
- package/dist/icons/vue/edit2.js +26 -2
- package/dist/icons/vue/enter.cjs +2 -19
- package/dist/icons/vue/enter.js +1 -18
- package/dist/icons/vue/enter2.cjs +22 -2
- package/dist/icons/vue/enter2.js +22 -2
- package/dist/icons/vue/frame.cjs +2 -15
- package/dist/icons/vue/frame.js +1 -14
- package/dist/icons/vue/frame2.cjs +18 -2
- package/dist/icons/vue/frame2.js +18 -2
- package/dist/icons/vue/index.cjs +81 -54
- package/dist/icons/vue/index.js +54 -27
- package/dist/icons/vue/left.cjs +2 -18
- package/dist/icons/vue/left.js +1 -17
- package/dist/icons/vue/left2.cjs +21 -2
- package/dist/icons/vue/left2.js +21 -2
- package/dist/icons/vue/mute.cjs +2 -18
- package/dist/icons/vue/mute.js +1 -17
- package/dist/icons/vue/mute2.cjs +21 -2
- package/dist/icons/vue/mute2.js +21 -2
- package/dist/icons/vue/pause.cjs +2 -24
- package/dist/icons/vue/pause.js +1 -23
- package/dist/icons/vue/pause2.cjs +27 -2
- package/dist/icons/vue/pause2.js +27 -2
- package/dist/icons/vue/play.cjs +2 -19
- package/dist/icons/vue/play.js +1 -18
- package/dist/icons/vue/play2.cjs +22 -2
- package/dist/icons/vue/play2.js +22 -2
- package/dist/icons/vue/plus.cjs +2 -18
- package/dist/icons/vue/plus.js +1 -17
- package/dist/icons/vue/plus2.cjs +21 -2
- package/dist/icons/vue/plus2.js +21 -2
- package/dist/icons/vue/retreat.cjs +2 -19
- package/dist/icons/vue/retreat.js +1 -18
- package/dist/icons/vue/retreat2.cjs +22 -2
- package/dist/icons/vue/retreat2.js +22 -2
- package/dist/icons/vue/right.cjs +2 -18
- package/dist/icons/vue/right.js +1 -17
- package/dist/icons/vue/right2.cjs +21 -2
- package/dist/icons/vue/right2.js +21 -2
- package/dist/icons/vue/sound.cjs +2 -22
- package/dist/icons/vue/sound.js +1 -21
- package/dist/icons/vue/sound2.cjs +25 -2
- package/dist/icons/vue/sound2.js +25 -2
- package/dist/icons/vue/star.cjs +2 -22
- package/dist/icons/vue/star.js +1 -21
- package/dist/icons/vue/star2.cjs +25 -2
- package/dist/icons/vue/star2.js +25 -2
- package/dist/icons/vue/up.cjs +2 -18
- package/dist/icons/vue/up.js +1 -17
- package/dist/icons/vue/up2.cjs +21 -2
- package/dist/icons/vue/up2.js +21 -2
- package/dist/icons/vue/views.cjs +2 -18
- package/dist/icons/vue/views.js +1 -17
- package/dist/icons/vue/views2.cjs +21 -2
- package/dist/icons/vue/views2.js +21 -2
- package/dist/index.css +30 -26
- package/dist/utils/vues/index.d.ts +1 -0
- package/dist/utils/vues/shared.cjs +19 -0
- package/dist/utils/vues/shared.d.ts +5 -0
- package/dist/utils/vues/shared.js +19 -0
- package/package.json +10 -11
- package/dist/_virtual/_plugin-vue_export-helper.cjs +0 -10
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -10
- /package/dist/components/{keep-com → global-config}/index.css +0 -0
- /package/dist/css/{keep-com.css → global-config.css} +0 -0
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const index$3 = require("../../icon/index.cjs");
|
|
5
|
-
|
|
5
|
+
require("../../../icons/vue/edit.cjs");
|
|
6
6
|
const data = require("./data.cjs");
|
|
7
7
|
const index$2 = require("../../inputs/index.cjs");
|
|
8
8
|
const index = require("../../../hooks/cssname/index.cjs");
|
|
9
9
|
const index$1 = require("../../../hooks/props-default/index.cjs");
|
|
10
|
+
const edit_vue_vue_type_script_setup_true_lang = require("../../../icons/vue/edit2.cjs");
|
|
10
11
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
11
12
|
__name: "index",
|
|
12
13
|
props: index$1.getProps(data.dataProps),
|
|
@@ -19,11 +20,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
19
20
|
const isInput = vue.ref(false);
|
|
20
21
|
const isIcon = vue.ref(false);
|
|
21
22
|
const refEditInput = vue.ref();
|
|
22
|
-
const
|
|
23
|
+
const refDom = vue.ref();
|
|
23
24
|
const width = vue.ref("");
|
|
24
|
-
const display = vue.ref("");
|
|
25
25
|
const getWidth = () => {
|
|
26
|
-
const dom =
|
|
26
|
+
const dom = refDom.value;
|
|
27
27
|
if (dom) {
|
|
28
28
|
width.value = (dom.clientWidth || dom.offsetWidth) + 40 + "px";
|
|
29
29
|
}
|
|
@@ -48,13 +48,19 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
48
48
|
}
|
|
49
49
|
function onBlur() {
|
|
50
50
|
setIsIcon();
|
|
51
|
-
isInput.value = false;
|
|
52
51
|
}
|
|
53
52
|
function setIsIcon() {
|
|
54
|
-
if (!value.value && props.isEmpty) {
|
|
55
|
-
|
|
53
|
+
if (!value.value && !props.isEmpty) {
|
|
54
|
+
if (props.type == "input") {
|
|
55
|
+
isInput.value = true;
|
|
56
|
+
isIcon.value = false;
|
|
57
|
+
} else {
|
|
58
|
+
isInput.value = false;
|
|
59
|
+
isIcon.value = true;
|
|
60
|
+
}
|
|
56
61
|
} else {
|
|
57
62
|
isIcon.value = false;
|
|
63
|
+
isInput.value = false;
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
66
|
function onClick() {
|
|
@@ -64,17 +70,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
64
70
|
refEditInput.value.focus();
|
|
65
71
|
});
|
|
66
72
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
const onmouseenter = (event) => {
|
|
74
|
+
if (props.type == "input") {
|
|
75
|
+
isInput.value = true;
|
|
76
|
+
} else {
|
|
70
77
|
isIcon.value = true;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
}
|
|
79
|
+
getWidth();
|
|
80
|
+
};
|
|
81
|
+
const onmouseleave = (event) => {
|
|
82
|
+
setIsIcon();
|
|
83
|
+
};
|
|
84
|
+
vue.onMounted(() => {
|
|
78
85
|
getWidth();
|
|
79
86
|
});
|
|
80
87
|
__expose({
|
|
@@ -82,13 +89,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
82
89
|
});
|
|
83
90
|
return (_ctx, _cache) => {
|
|
84
91
|
return vue.openBlock(), vue.createElementBlock("span", {
|
|
85
|
-
|
|
86
|
-
|
|
92
|
+
onMouseenter: onmouseenter,
|
|
93
|
+
onMouseleave: onmouseleave,
|
|
94
|
+
ref_key: "refDom",
|
|
95
|
+
ref: refDom,
|
|
87
96
|
class: vue.normalizeClass(vue.unref(cs).z())
|
|
88
97
|
}, [
|
|
89
98
|
isInput.value ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.Inputs), {
|
|
90
99
|
key: 0,
|
|
91
|
-
style: vue.normalizeStyle({ width: width.value
|
|
100
|
+
style: vue.normalizeStyle({ width: width.value }),
|
|
92
101
|
modelValue: value.value,
|
|
93
102
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
94
103
|
ref_key: "refEditInput",
|
|
@@ -102,17 +111,17 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
102
111
|
onDblclick: vue.withModifiers(onDblclick, ["stop"]),
|
|
103
112
|
class: vue.normalizeClass(vue.unref(cs).z("value"))
|
|
104
113
|
}, vue.toDisplayString(value.value), 35)),
|
|
105
|
-
isIcon.value && !isInput.value ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.Icon), {
|
|
114
|
+
vue.unref(props).type == "icon" && isIcon.value && !isInput.value ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.Icon), {
|
|
106
115
|
key: 2,
|
|
107
116
|
onClick,
|
|
108
117
|
class: vue.normalizeClass(vue.unref(cs).z("icon"))
|
|
109
118
|
}, {
|
|
110
119
|
default: vue.withCtx(() => [
|
|
111
|
-
vue.createVNode(
|
|
120
|
+
vue.createVNode(edit_vue_vue_type_script_setup_true_lang.default)
|
|
112
121
|
]),
|
|
113
122
|
_: 1
|
|
114
123
|
}, 8, ["class"])) : vue.createCommentVNode("", true)
|
|
115
|
-
],
|
|
124
|
+
], 34);
|
|
116
125
|
};
|
|
117
126
|
}
|
|
118
127
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, onMounted, createElementBlock, openBlock, normalizeClass, unref, createBlock, createCommentVNode, normalizeStyle, withModifiers, toDisplayString, withCtx, createVNode } from "vue";
|
|
2
2
|
import { Icon } from "../../icon/index.js";
|
|
3
|
-
import
|
|
3
|
+
import "../../../icons/vue/edit.js";
|
|
4
4
|
import { name, dataProps, dataExpose, dataEmits } from "./data.js";
|
|
5
5
|
import { Inputs } from "../../inputs/index.js";
|
|
6
6
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
7
7
|
import { usePropsDefault, getProps } from "../../../hooks/props-default/index.js";
|
|
8
|
+
import _sfc_main$1 from "../../../icons/vue/edit2.js";
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
10
|
__name: "index",
|
|
10
11
|
props: getProps(dataProps),
|
|
@@ -17,11 +18,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
18
|
const isInput = ref(false);
|
|
18
19
|
const isIcon = ref(false);
|
|
19
20
|
const refEditInput = ref();
|
|
20
|
-
const
|
|
21
|
+
const refDom = ref();
|
|
21
22
|
const width = ref("");
|
|
22
|
-
const display = ref("");
|
|
23
23
|
const getWidth = () => {
|
|
24
|
-
const dom =
|
|
24
|
+
const dom = refDom.value;
|
|
25
25
|
if (dom) {
|
|
26
26
|
width.value = (dom.clientWidth || dom.offsetWidth) + 40 + "px";
|
|
27
27
|
}
|
|
@@ -46,13 +46,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
46
|
}
|
|
47
47
|
function onBlur() {
|
|
48
48
|
setIsIcon();
|
|
49
|
-
isInput.value = false;
|
|
50
49
|
}
|
|
51
50
|
function setIsIcon() {
|
|
52
|
-
if (!value.value && props.isEmpty) {
|
|
53
|
-
|
|
51
|
+
if (!value.value && !props.isEmpty) {
|
|
52
|
+
if (props.type == "input") {
|
|
53
|
+
isInput.value = true;
|
|
54
|
+
isIcon.value = false;
|
|
55
|
+
} else {
|
|
56
|
+
isInput.value = false;
|
|
57
|
+
isIcon.value = true;
|
|
58
|
+
}
|
|
54
59
|
} else {
|
|
55
60
|
isIcon.value = false;
|
|
61
|
+
isInput.value = false;
|
|
56
62
|
}
|
|
57
63
|
}
|
|
58
64
|
function onClick() {
|
|
@@ -62,17 +68,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
68
|
refEditInput.value.focus();
|
|
63
69
|
});
|
|
64
70
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
const onmouseenter = (event) => {
|
|
72
|
+
if (props.type == "input") {
|
|
73
|
+
isInput.value = true;
|
|
74
|
+
} else {
|
|
68
75
|
isIcon.value = true;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
}
|
|
77
|
+
getWidth();
|
|
78
|
+
};
|
|
79
|
+
const onmouseleave = (event) => {
|
|
80
|
+
setIsIcon();
|
|
81
|
+
};
|
|
82
|
+
onMounted(() => {
|
|
76
83
|
getWidth();
|
|
77
84
|
});
|
|
78
85
|
__expose({
|
|
@@ -80,13 +87,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
87
|
});
|
|
81
88
|
return (_ctx, _cache) => {
|
|
82
89
|
return openBlock(), createElementBlock("span", {
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
onMouseenter: onmouseenter,
|
|
91
|
+
onMouseleave: onmouseleave,
|
|
92
|
+
ref_key: "refDom",
|
|
93
|
+
ref: refDom,
|
|
85
94
|
class: normalizeClass(unref(cs).z())
|
|
86
95
|
}, [
|
|
87
96
|
isInput.value ? (openBlock(), createBlock(unref(Inputs), {
|
|
88
97
|
key: 0,
|
|
89
|
-
style: normalizeStyle({ width: width.value
|
|
98
|
+
style: normalizeStyle({ width: width.value }),
|
|
90
99
|
modelValue: value.value,
|
|
91
100
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
92
101
|
ref_key: "refEditInput",
|
|
@@ -100,17 +109,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
100
109
|
onDblclick: withModifiers(onDblclick, ["stop"]),
|
|
101
110
|
class: normalizeClass(unref(cs).z("value"))
|
|
102
111
|
}, toDisplayString(value.value), 35)),
|
|
103
|
-
isIcon.value && !isInput.value ? (openBlock(), createBlock(unref(Icon), {
|
|
112
|
+
unref(props).type == "icon" && isIcon.value && !isInput.value ? (openBlock(), createBlock(unref(Icon), {
|
|
104
113
|
key: 2,
|
|
105
114
|
onClick,
|
|
106
115
|
class: normalizeClass(unref(cs).z("icon"))
|
|
107
116
|
}, {
|
|
108
117
|
default: withCtx(() => [
|
|
109
|
-
createVNode(
|
|
118
|
+
createVNode(_sfc_main$1)
|
|
110
119
|
]),
|
|
111
120
|
_: 1
|
|
112
121
|
}, 8, ["class"])) : createCommentVNode("", true)
|
|
113
|
-
],
|
|
122
|
+
], 34);
|
|
114
123
|
};
|
|
115
124
|
}
|
|
116
125
|
});
|
|
@@ -52,11 +52,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
52
52
|
}
|
|
53
53
|
} else if (name2 == "j") {
|
|
54
54
|
try {
|
|
55
|
-
if (
|
|
56
|
-
const v = json5.stringify(value.value, null, 4);
|
|
57
|
-
value.value = v;
|
|
58
|
-
} else {
|
|
55
|
+
if (typeof value.value == "string") {
|
|
59
56
|
value.value = value.value;
|
|
57
|
+
} else {
|
|
58
|
+
let o = value.value;
|
|
59
|
+
if (!props.isEmpty) {
|
|
60
|
+
o = o || [];
|
|
61
|
+
}
|
|
62
|
+
const v = json5.stringify(o, null, 4);
|
|
63
|
+
value.value = v;
|
|
60
64
|
}
|
|
61
65
|
return true;
|
|
62
66
|
} catch (error) {
|
|
@@ -50,11 +50,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
}
|
|
51
51
|
} else if (name2 == "j") {
|
|
52
52
|
try {
|
|
53
|
-
if (
|
|
54
|
-
const v = json5.stringify(value.value, null, 4);
|
|
55
|
-
value.value = v;
|
|
56
|
-
} else {
|
|
53
|
+
if (typeof value.value == "string") {
|
|
57
54
|
value.value = value.value;
|
|
55
|
+
} else {
|
|
56
|
+
let o = value.value;
|
|
57
|
+
if (!props.isEmpty) {
|
|
58
|
+
o = o || [];
|
|
59
|
+
}
|
|
60
|
+
const v = json5.stringify(o, null, 4);
|
|
61
|
+
value.value = v;
|
|
58
62
|
}
|
|
59
63
|
return true;
|
|
60
64
|
} catch (error) {
|
|
@@ -3,7 +3,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const index$5 = require("../../../no-data/index.cjs");
|
|
5
5
|
const index$3 = require("../../../icon/index.cjs");
|
|
6
|
-
|
|
6
|
+
require("../../../../icons/vue/edit.cjs");
|
|
7
|
+
require("../../../../icons/vue/delete.cjs");
|
|
7
8
|
const data = require("../data.cjs");
|
|
8
9
|
const index = require("../../../../hooks/cssname/index.cjs");
|
|
9
10
|
const index$1 = require("../../../../hooks/locale/index.cjs");
|
|
@@ -12,6 +13,8 @@ const index$4 = require("../../../../directives/sortable/index.cjs");
|
|
|
12
13
|
const index$2 = require("../../../button/index.cjs");
|
|
13
14
|
const index$6 = require("../../../edit-data-add/index.cjs");
|
|
14
15
|
const index_vue_vue_type_script_setup_true_lang = require("../index2.cjs");
|
|
16
|
+
const edit_vue_vue_type_script_setup_true_lang = require("../../../../icons/vue/edit2.cjs");
|
|
17
|
+
const delete_vue_vue_type_script_setup_true_lang = require("../../../../icons/vue/delete2.cjs");
|
|
15
18
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
16
19
|
__name: "array",
|
|
17
20
|
props: data.dataDataProps,
|
|
@@ -21,7 +24,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
21
24
|
const { getLocale } = index$1.useLocale();
|
|
22
25
|
const props = __props;
|
|
23
26
|
const emit = __emit;
|
|
24
|
-
const box = vue.
|
|
27
|
+
const box = vue.reactive({
|
|
28
|
+
value: false,
|
|
29
|
+
type: 0,
|
|
30
|
+
row: 0
|
|
31
|
+
});
|
|
25
32
|
const value = vue.computed({
|
|
26
33
|
get() {
|
|
27
34
|
return props.modelValue;
|
|
@@ -47,13 +54,28 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
47
54
|
};
|
|
48
55
|
const onAdd = () => {
|
|
49
56
|
box.value = true;
|
|
57
|
+
box.type = 0;
|
|
58
|
+
box.row = 0;
|
|
50
59
|
};
|
|
51
60
|
const onSubmit = (v) => {
|
|
52
|
-
value.value
|
|
61
|
+
if (value.value === void 0) {
|
|
62
|
+
value.value = [v.value];
|
|
63
|
+
} else {
|
|
64
|
+
if (box.type == 0) {
|
|
65
|
+
value.value.push(v.value);
|
|
66
|
+
} else {
|
|
67
|
+
value.value[box.row] = v.value;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
53
70
|
};
|
|
54
71
|
const onDelete = (index2) => {
|
|
55
72
|
value.value.splice(index2, 1);
|
|
56
73
|
};
|
|
74
|
+
const onEdit = (index2) => {
|
|
75
|
+
box.value = true;
|
|
76
|
+
box.type = 1;
|
|
77
|
+
box.row = index2;
|
|
78
|
+
};
|
|
57
79
|
return (_ctx, _cache) => {
|
|
58
80
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
59
81
|
class: vue.normalizeClass(vue.unref(cs).z("area-array"))
|
|
@@ -94,8 +116,24 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
94
116
|
}), null, 16, ["modelValue", "onUpdate:modelValue"])
|
|
95
117
|
], 2),
|
|
96
118
|
vue.createElementVNode("div", null, [
|
|
97
|
-
props.
|
|
119
|
+
props.isEmpty && item === void 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.Button), {
|
|
98
120
|
key: 0,
|
|
121
|
+
type: "primary",
|
|
122
|
+
onClick: ($event) => onEdit(index2),
|
|
123
|
+
text: ""
|
|
124
|
+
}, {
|
|
125
|
+
default: vue.withCtx(() => [
|
|
126
|
+
vue.createVNode(vue.unref(index$3.Icon), { title: "修改" }, {
|
|
127
|
+
default: vue.withCtx(() => [
|
|
128
|
+
vue.createVNode(edit_vue_vue_type_script_setup_true_lang.default)
|
|
129
|
+
]),
|
|
130
|
+
_: 1
|
|
131
|
+
})
|
|
132
|
+
]),
|
|
133
|
+
_: 1
|
|
134
|
+
}, 8, ["onClick"])) : vue.createCommentVNode("", true),
|
|
135
|
+
props.editable ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.Button), {
|
|
136
|
+
key: 1,
|
|
99
137
|
type: "danger",
|
|
100
138
|
onClick: ($event) => onDelete(index2),
|
|
101
139
|
text: ""
|
|
@@ -103,7 +141,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
103
141
|
default: vue.withCtx(() => [
|
|
104
142
|
vue.createVNode(vue.unref(index$3.Icon), { title: "删除" }, {
|
|
105
143
|
default: vue.withCtx(() => [
|
|
106
|
-
vue.createVNode(
|
|
144
|
+
vue.createVNode(delete_vue_vue_type_script_setup_true_lang.default)
|
|
107
145
|
]),
|
|
108
146
|
_: 1
|
|
109
147
|
})
|
|
@@ -116,18 +154,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
116
154
|
], 2)), [
|
|
117
155
|
[vue.unref(index$4.default), sortable]
|
|
118
156
|
]),
|
|
119
|
-
value.value.length == 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.NoData), {
|
|
157
|
+
(value.value ? value.value.length == 0 : true) ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.NoData), {
|
|
120
158
|
key: 1,
|
|
121
159
|
value: "空数组"
|
|
122
160
|
})) : vue.createCommentVNode("", true),
|
|
123
161
|
vue.createVNode(vue.unref(index$6.EditDataAdd), vue.mergeProps(props, {
|
|
124
162
|
type: "array",
|
|
125
163
|
labelName: "数组",
|
|
126
|
-
title: "新增数组",
|
|
164
|
+
title: box.type == 1 ? "修改数组" : "新增数组",
|
|
127
165
|
modelValue: box.value,
|
|
128
166
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => box.value = $event),
|
|
129
167
|
onSubmit
|
|
130
|
-
}), null, 16, ["modelValue"])
|
|
168
|
+
}), null, 16, ["title", "modelValue"])
|
|
131
169
|
], 2);
|
|
132
170
|
};
|
|
133
171
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, reactive, computed, ref, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, withDirectives, createBlock, createVNode, withCtx, createTextVNode, Fragment, renderList, createElementVNode, toDisplayString, mergeProps } from "vue";
|
|
2
2
|
import { NoData } from "../../../no-data/index.js";
|
|
3
3
|
import { Icon } from "../../../icon/index.js";
|
|
4
|
-
import
|
|
4
|
+
import "../../../../icons/vue/edit.js";
|
|
5
|
+
import "../../../../icons/vue/delete.js";
|
|
5
6
|
import { name, dataDataEmits, dataDataProps } from "../data.js";
|
|
6
7
|
import { useCssName } from "../../../../hooks/cssname/index.js";
|
|
7
8
|
import { useLocale } from "../../../../hooks/locale/index.js";
|
|
@@ -10,6 +11,8 @@ import vSortable from "../../../../directives/sortable/index.js";
|
|
|
10
11
|
import { Button } from "../../../button/index.js";
|
|
11
12
|
import { EditDataAdd } from "../../../edit-data-add/index.js";
|
|
12
13
|
import _sfc_main$1 from "../index2.js";
|
|
14
|
+
import _sfc_main$2 from "../../../../icons/vue/edit2.js";
|
|
15
|
+
import _sfc_main$3 from "../../../../icons/vue/delete2.js";
|
|
13
16
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
17
|
__name: "array",
|
|
15
18
|
props: dataDataProps,
|
|
@@ -19,7 +22,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
22
|
const { getLocale } = useLocale();
|
|
20
23
|
const props = __props;
|
|
21
24
|
const emit = __emit;
|
|
22
|
-
const box =
|
|
25
|
+
const box = reactive({
|
|
26
|
+
value: false,
|
|
27
|
+
type: 0,
|
|
28
|
+
row: 0
|
|
29
|
+
});
|
|
23
30
|
const value = computed({
|
|
24
31
|
get() {
|
|
25
32
|
return props.modelValue;
|
|
@@ -45,13 +52,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
52
|
};
|
|
46
53
|
const onAdd = () => {
|
|
47
54
|
box.value = true;
|
|
55
|
+
box.type = 0;
|
|
56
|
+
box.row = 0;
|
|
48
57
|
};
|
|
49
58
|
const onSubmit = (v) => {
|
|
50
|
-
value.value
|
|
59
|
+
if (value.value === void 0) {
|
|
60
|
+
value.value = [v.value];
|
|
61
|
+
} else {
|
|
62
|
+
if (box.type == 0) {
|
|
63
|
+
value.value.push(v.value);
|
|
64
|
+
} else {
|
|
65
|
+
value.value[box.row] = v.value;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
51
68
|
};
|
|
52
69
|
const onDelete = (index) => {
|
|
53
70
|
value.value.splice(index, 1);
|
|
54
71
|
};
|
|
72
|
+
const onEdit = (index) => {
|
|
73
|
+
box.value = true;
|
|
74
|
+
box.type = 1;
|
|
75
|
+
box.row = index;
|
|
76
|
+
};
|
|
55
77
|
return (_ctx, _cache) => {
|
|
56
78
|
return openBlock(), createElementBlock("div", {
|
|
57
79
|
class: normalizeClass(unref(cs).z("area-array"))
|
|
@@ -92,8 +114,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
92
114
|
}), null, 16, ["modelValue", "onUpdate:modelValue"])
|
|
93
115
|
], 2),
|
|
94
116
|
createElementVNode("div", null, [
|
|
95
|
-
props.
|
|
117
|
+
props.isEmpty && item === void 0 ? (openBlock(), createBlock(unref(Button), {
|
|
96
118
|
key: 0,
|
|
119
|
+
type: "primary",
|
|
120
|
+
onClick: ($event) => onEdit(index),
|
|
121
|
+
text: ""
|
|
122
|
+
}, {
|
|
123
|
+
default: withCtx(() => [
|
|
124
|
+
createVNode(unref(Icon), { title: "修改" }, {
|
|
125
|
+
default: withCtx(() => [
|
|
126
|
+
createVNode(_sfc_main$2)
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
})
|
|
130
|
+
]),
|
|
131
|
+
_: 1
|
|
132
|
+
}, 8, ["onClick"])) : createCommentVNode("", true),
|
|
133
|
+
props.editable ? (openBlock(), createBlock(unref(Button), {
|
|
134
|
+
key: 1,
|
|
97
135
|
type: "danger",
|
|
98
136
|
onClick: ($event) => onDelete(index),
|
|
99
137
|
text: ""
|
|
@@ -101,7 +139,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
101
139
|
default: withCtx(() => [
|
|
102
140
|
createVNode(unref(Icon), { title: "删除" }, {
|
|
103
141
|
default: withCtx(() => [
|
|
104
|
-
createVNode(
|
|
142
|
+
createVNode(_sfc_main$3)
|
|
105
143
|
]),
|
|
106
144
|
_: 1
|
|
107
145
|
})
|
|
@@ -114,18 +152,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
114
152
|
], 2)), [
|
|
115
153
|
[unref(vSortable), sortable]
|
|
116
154
|
]),
|
|
117
|
-
value.value.length == 0 ? (openBlock(), createBlock(unref(NoData), {
|
|
155
|
+
(value.value ? value.value.length == 0 : true) ? (openBlock(), createBlock(unref(NoData), {
|
|
118
156
|
key: 1,
|
|
119
157
|
value: "空数组"
|
|
120
158
|
})) : createCommentVNode("", true),
|
|
121
159
|
createVNode(unref(EditDataAdd), mergeProps(props, {
|
|
122
160
|
type: "array",
|
|
123
161
|
labelName: "数组",
|
|
124
|
-
title: "新增数组",
|
|
162
|
+
title: box.type == 1 ? "修改数组" : "新增数组",
|
|
125
163
|
modelValue: box.value,
|
|
126
164
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => box.value = $event),
|
|
127
165
|
onSubmit
|
|
128
|
-
}), null, 16, ["modelValue"])
|
|
166
|
+
}), null, 16, ["title", "modelValue"])
|
|
129
167
|
], 2);
|
|
130
168
|
};
|
|
131
169
|
}
|
|
@@ -33,12 +33,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
33
33
|
const { getLocale } = index$1.useLocale();
|
|
34
34
|
const props = __props;
|
|
35
35
|
const emit = __emit;
|
|
36
|
-
const code = vue.ref(props.value);
|
|
36
|
+
const code = vue.ref(props.value ?? props.default);
|
|
37
37
|
const value = vue.computed({
|
|
38
38
|
get() {
|
|
39
39
|
const v = props.modelValue;
|
|
40
40
|
if (v) {
|
|
41
|
-
code.value = props.value;
|
|
41
|
+
code.value = props.value ?? props.default;
|
|
42
42
|
}
|
|
43
43
|
return v;
|
|
44
44
|
},
|
|
@@ -49,11 +49,25 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
49
49
|
const size = vue.ref(0);
|
|
50
50
|
function onClick(key) {
|
|
51
51
|
if (key == 9) {
|
|
52
|
-
|
|
52
|
+
const v = props.value ?? props.default;
|
|
53
|
+
if (v) {
|
|
54
|
+
code.value = v;
|
|
55
|
+
} else {
|
|
56
|
+
if (props.type == "object") {
|
|
57
|
+
code.value = {};
|
|
58
|
+
} else if (props.type == "array") {
|
|
59
|
+
code.value = [];
|
|
60
|
+
} else if (props.type == "function") {
|
|
61
|
+
code.value = function() {
|
|
62
|
+
};
|
|
63
|
+
} else {
|
|
64
|
+
code.value = void 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
53
67
|
} else if (key == 1) {
|
|
54
68
|
submit();
|
|
55
69
|
} else {
|
|
56
|
-
code.value =
|
|
70
|
+
code.value = void 0;
|
|
57
71
|
}
|
|
58
72
|
}
|
|
59
73
|
function submit() {
|
|
@@ -84,6 +98,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
84
98
|
}, [
|
|
85
99
|
props.type == "array" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
86
100
|
props.isJson ? (vue.openBlock(), vue.createBlock(arrayJson_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ key: 0 }, props, {
|
|
101
|
+
default: void 0,
|
|
87
102
|
modelValue: code.value,
|
|
88
103
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => code.value = $event)
|
|
89
104
|
}), {
|
|
@@ -97,11 +112,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
97
112
|
]),
|
|
98
113
|
_: 1
|
|
99
114
|
}, 16, ["modelValue"])) : (vue.openBlock(), vue.createBlock(array_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ key: 1 }, props, {
|
|
115
|
+
default: void 0,
|
|
100
116
|
modelValue: code.value,
|
|
101
117
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => code.value = $event)
|
|
102
118
|
}), null, 16, ["modelValue"]))
|
|
103
119
|
], 64)) : props.type == "object" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
104
120
|
props.isJson ? (vue.openBlock(), vue.createBlock(objectJson_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ key: 0 }, props, {
|
|
121
|
+
default: void 0,
|
|
105
122
|
modelValue: code.value,
|
|
106
123
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => code.value = $event)
|
|
107
124
|
}), {
|
|
@@ -115,6 +132,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
115
132
|
]),
|
|
116
133
|
_: 1
|
|
117
134
|
}, 16, ["modelValue"])) : (vue.openBlock(), vue.createBlock(object_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ key: 1 }, props, {
|
|
135
|
+
default: void 0,
|
|
118
136
|
modelValue: code.value,
|
|
119
137
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => code.value = $event)
|
|
120
138
|
}), null, 16, ["modelValue"]))
|
|
@@ -31,12 +31,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
const { getLocale } = useLocale();
|
|
32
32
|
const props = __props;
|
|
33
33
|
const emit = __emit;
|
|
34
|
-
const code = ref(props.value);
|
|
34
|
+
const code = ref(props.value ?? props.default);
|
|
35
35
|
const value = computed({
|
|
36
36
|
get() {
|
|
37
37
|
const v = props.modelValue;
|
|
38
38
|
if (v) {
|
|
39
|
-
code.value = props.value;
|
|
39
|
+
code.value = props.value ?? props.default;
|
|
40
40
|
}
|
|
41
41
|
return v;
|
|
42
42
|
},
|
|
@@ -47,11 +47,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
const size = ref(0);
|
|
48
48
|
function onClick(key) {
|
|
49
49
|
if (key == 9) {
|
|
50
|
-
|
|
50
|
+
const v = props.value ?? props.default;
|
|
51
|
+
if (v) {
|
|
52
|
+
code.value = v;
|
|
53
|
+
} else {
|
|
54
|
+
if (props.type == "object") {
|
|
55
|
+
code.value = {};
|
|
56
|
+
} else if (props.type == "array") {
|
|
57
|
+
code.value = [];
|
|
58
|
+
} else if (props.type == "function") {
|
|
59
|
+
code.value = function() {
|
|
60
|
+
};
|
|
61
|
+
} else {
|
|
62
|
+
code.value = void 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
51
65
|
} else if (key == 1) {
|
|
52
66
|
submit();
|
|
53
67
|
} else {
|
|
54
|
-
code.value =
|
|
68
|
+
code.value = void 0;
|
|
55
69
|
}
|
|
56
70
|
}
|
|
57
71
|
function submit() {
|
|
@@ -82,6 +96,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
82
96
|
}, [
|
|
83
97
|
props.type == "array" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
84
98
|
props.isJson ? (openBlock(), createBlock(_sfc_main$1, mergeProps({ key: 0 }, props, {
|
|
99
|
+
default: void 0,
|
|
85
100
|
modelValue: code.value,
|
|
86
101
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => code.value = $event)
|
|
87
102
|
}), {
|
|
@@ -95,11 +110,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
95
110
|
]),
|
|
96
111
|
_: 1
|
|
97
112
|
}, 16, ["modelValue"])) : (openBlock(), createBlock(_sfc_main$3, mergeProps({ key: 1 }, props, {
|
|
113
|
+
default: void 0,
|
|
98
114
|
modelValue: code.value,
|
|
99
115
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => code.value = $event)
|
|
100
116
|
}), null, 16, ["modelValue"]))
|
|
101
117
|
], 64)) : props.type == "object" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
102
118
|
props.isJson ? (openBlock(), createBlock(_sfc_main$4, mergeProps({ key: 0 }, props, {
|
|
119
|
+
default: void 0,
|
|
103
120
|
modelValue: code.value,
|
|
104
121
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => code.value = $event)
|
|
105
122
|
}), {
|
|
@@ -113,6 +130,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
113
130
|
]),
|
|
114
131
|
_: 1
|
|
115
132
|
}, 16, ["modelValue"])) : (openBlock(), createBlock(_sfc_main$5, mergeProps({ key: 1 }, props, {
|
|
133
|
+
default: void 0,
|
|
116
134
|
modelValue: code.value,
|
|
117
135
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => code.value = $event)
|
|
118
136
|
}), null, 16, ["modelValue"]))
|