@fangzhongya/fang-ui 0.1.51 → 0.1.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.
Files changed (197) hide show
  1. package/bin/fang-ui.js +2 -2
  2. package/dist/components/box-fun/index.cjs +1 -0
  3. package/dist/components/box-fun/index.js +1 -0
  4. package/dist/components/box-fun/index.scss +8 -0
  5. package/dist/components/box-fun/style/index2.scss +4 -0
  6. package/dist/components/buttons/src/data.d.ts +14 -11
  7. package/dist/components/cascaders/src/data.d.ts +14 -11
  8. package/dist/components/cascaders/src/index2.cjs +15 -8
  9. package/dist/components/cascaders/src/index2.js +15 -8
  10. package/dist/components/checks/src/data.d.ts +14 -11
  11. package/dist/components/checks/src/index2.cjs +6 -6
  12. package/dist/components/checks/src/index2.js +6 -6
  13. package/dist/components/common/list.cjs +34 -15
  14. package/dist/components/common/list.d.ts +25 -12
  15. package/dist/components/common/list.js +34 -15
  16. package/dist/components/common/use.cjs +9 -5
  17. package/dist/components/common/use.js +9 -5
  18. package/dist/components/dates/src/data.d.ts +14 -11
  19. package/dist/components/dates2/src/data.d.ts +14 -11
  20. package/dist/components/draggable/style/index2.scss +1 -0
  21. package/dist/components/edit-data/index.cjs +9 -0
  22. package/dist/components/edit-data/index.d.ts +5 -0
  23. package/dist/components/edit-data/index.js +9 -0
  24. package/dist/components/edit-data/index.scss +95 -0
  25. package/dist/components/edit-data/src/area/array-json.cjs +4 -0
  26. package/dist/components/edit-data/src/area/array-json.js +4 -0
  27. package/dist/components/edit-data/src/area/array-json2.cjs +109 -0
  28. package/dist/components/edit-data/src/area/array-json2.js +109 -0
  29. package/dist/components/edit-data/src/area/array.cjs +4 -0
  30. package/dist/components/edit-data/src/area/array.js +4 -0
  31. package/dist/components/edit-data/src/area/array2.cjs +135 -0
  32. package/dist/components/edit-data/src/area/array2.js +135 -0
  33. package/dist/components/edit-data/src/area/code.cjs +4 -0
  34. package/dist/components/edit-data/src/area/code.js +4 -0
  35. package/dist/components/edit-data/src/area/code2.cjs +52 -0
  36. package/dist/components/edit-data/src/area/code2.js +52 -0
  37. package/dist/components/edit-data/src/area/editor.cjs +4 -0
  38. package/dist/components/edit-data/src/area/editor.js +4 -0
  39. package/dist/components/edit-data/src/area/editor2.cjs +170 -0
  40. package/dist/components/edit-data/src/area/editor2.js +170 -0
  41. package/dist/components/edit-data/src/area/general.cjs +4 -0
  42. package/dist/components/edit-data/src/area/general.js +4 -0
  43. package/dist/components/edit-data/src/area/general2.cjs +88 -0
  44. package/dist/components/edit-data/src/area/general2.js +88 -0
  45. package/dist/components/edit-data/src/area/object-json.cjs +4 -0
  46. package/dist/components/edit-data/src/area/object-json.js +4 -0
  47. package/dist/components/edit-data/src/area/object-json2.cjs +109 -0
  48. package/dist/components/edit-data/src/area/object-json2.js +109 -0
  49. package/dist/components/edit-data/src/area/object.cjs +4 -0
  50. package/dist/components/edit-data/src/area/object.js +4 -0
  51. package/dist/components/edit-data/src/area/object2.cjs +116 -0
  52. package/dist/components/edit-data/src/area/object2.js +116 -0
  53. package/dist/components/edit-data/src/data/array.cjs +4 -0
  54. package/dist/components/edit-data/src/data/array.js +4 -0
  55. package/dist/components/edit-data/src/data/array2.cjs +68 -0
  56. package/dist/components/edit-data/src/data/array2.js +68 -0
  57. package/dist/components/edit-data/src/data/bigint.cjs +4 -0
  58. package/dist/components/edit-data/src/data/bigint.js +4 -0
  59. package/dist/components/edit-data/src/data/bigint2.cjs +42 -0
  60. package/dist/components/edit-data/src/data/bigint2.js +42 -0
  61. package/dist/components/edit-data/src/data/boolean.cjs +4 -0
  62. package/dist/components/edit-data/src/data/boolean.js +4 -0
  63. package/dist/components/edit-data/src/data/boolean2.cjs +53 -0
  64. package/dist/components/edit-data/src/data/boolean2.js +53 -0
  65. package/dist/components/edit-data/src/data/function.cjs +4 -0
  66. package/dist/components/edit-data/src/data/function.js +4 -0
  67. package/dist/components/edit-data/src/data/function2.cjs +61 -0
  68. package/dist/components/edit-data/src/data/function2.js +61 -0
  69. package/dist/components/edit-data/src/data/not.cjs +4 -0
  70. package/dist/components/edit-data/src/data/not.js +4 -0
  71. package/dist/components/edit-data/src/data/not2.cjs +56 -0
  72. package/dist/components/edit-data/src/data/not2.js +56 -0
  73. package/dist/components/edit-data/src/data/null.cjs +4 -0
  74. package/dist/components/edit-data/src/data/null.js +4 -0
  75. package/dist/components/edit-data/src/data/null2.cjs +24 -0
  76. package/dist/components/edit-data/src/data/null2.js +24 -0
  77. package/dist/components/edit-data/src/data/number.cjs +4 -0
  78. package/dist/components/edit-data/src/data/number.js +4 -0
  79. package/dist/components/edit-data/src/data/number2.cjs +42 -0
  80. package/dist/components/edit-data/src/data/number2.js +42 -0
  81. package/dist/components/edit-data/src/data/object.cjs +4 -0
  82. package/dist/components/edit-data/src/data/object.js +4 -0
  83. package/dist/components/edit-data/src/data/object2.cjs +68 -0
  84. package/dist/components/edit-data/src/data/object2.js +68 -0
  85. package/dist/components/edit-data/src/data/other.cjs +4 -0
  86. package/dist/components/edit-data/src/data/other.js +4 -0
  87. package/dist/components/edit-data/src/data/other2.cjs +59 -0
  88. package/dist/components/edit-data/src/data/other2.js +59 -0
  89. package/dist/components/edit-data/src/data/string.cjs +4 -0
  90. package/dist/components/edit-data/src/data/string.js +4 -0
  91. package/dist/components/edit-data/src/data/string2.cjs +43 -0
  92. package/dist/components/edit-data/src/data/string2.js +43 -0
  93. package/dist/components/edit-data/src/data/symbol.cjs +4 -0
  94. package/dist/components/edit-data/src/data/symbol.js +4 -0
  95. package/dist/components/edit-data/src/data/symbol2.cjs +55 -0
  96. package/dist/components/edit-data/src/data/symbol2.js +55 -0
  97. package/dist/components/edit-data/src/data/undefined.cjs +4 -0
  98. package/dist/components/edit-data/src/data/undefined.js +4 -0
  99. package/dist/components/edit-data/src/data/undefined2.cjs +24 -0
  100. package/dist/components/edit-data/src/data/undefined2.js +24 -0
  101. package/dist/components/edit-data/src/data.cjs +57 -0
  102. package/dist/components/edit-data/src/data.d.ts +131 -0
  103. package/dist/components/edit-data/src/data.js +57 -0
  104. package/dist/components/edit-data/src/index.cjs +4 -0
  105. package/dist/components/edit-data/src/index.js +4 -0
  106. package/dist/components/edit-data/src/index2.cjs +134 -0
  107. package/dist/components/edit-data/src/index2.js +134 -0
  108. package/dist/components/edit-data/src/util.cjs +99 -0
  109. package/dist/components/edit-data/src/util.d.ts +1 -0
  110. package/dist/components/edit-data/src/util.js +99 -0
  111. package/dist/components/edit-data/style/index2.scss +13 -0
  112. package/dist/components/edit-data-add/index.cjs +9 -0
  113. package/dist/components/edit-data-add/index.css +144 -0
  114. package/dist/components/edit-data-add/index.d.ts +5 -0
  115. package/dist/components/edit-data-add/index.js +9 -0
  116. package/dist/components/edit-data-add/index.scss +5 -0
  117. package/dist/components/edit-data-add/src/data.cjs +24 -0
  118. package/dist/components/edit-data-add/src/data.d.ts +36 -0
  119. package/dist/components/edit-data-add/src/data.js +24 -0
  120. package/dist/components/edit-data-add/src/index.cjs +4 -0
  121. package/dist/components/edit-data-add/src/index.js +4 -0
  122. package/dist/components/edit-data-add/src/index2.cjs +241 -0
  123. package/dist/components/edit-data-add/src/index2.js +241 -0
  124. package/dist/components/edit-data-add/style/comm.scss +38 -0
  125. package/dist/components/edit-data-add/style/index2.scss +2 -0
  126. package/dist/components/history/src/data.cjs +9 -1
  127. package/dist/components/history/src/data.d.ts +13 -1
  128. package/dist/components/history/src/data.js +9 -1
  129. package/dist/components/history/src/index2.cjs +27 -9
  130. package/dist/components/history/src/index2.js +27 -9
  131. package/dist/components/index.cjs +60 -56
  132. package/dist/components/index.d.ts +2 -0
  133. package/dist/components/index.js +4 -0
  134. package/dist/components/index.scss +3 -0
  135. package/dist/components/index2.scss +5 -2
  136. package/dist/components/labels/src/data.d.ts +14 -11
  137. package/dist/components/labels/src/index2.cjs +13 -2
  138. package/dist/components/labels/src/index2.js +13 -2
  139. package/dist/components/page/index.css +8 -0
  140. package/dist/components/retract/index.css +20 -0
  141. package/dist/components/retract/index.scss +24 -0
  142. package/dist/components/retract/src/data.cjs +10 -0
  143. package/dist/components/retract/src/data.d.ts +10 -0
  144. package/dist/components/retract/src/data.js +10 -0
  145. package/dist/components/retract/src/index2.cjs +24 -4
  146. package/dist/components/retract/src/index2.js +23 -3
  147. package/dist/components/retract/style/index2.scss +1 -0
  148. package/dist/components/selects/src/data.d.ts +14 -11
  149. package/dist/components/selects/src/index2.cjs +1 -1
  150. package/dist/components/selects/src/index2.js +1 -1
  151. package/dist/components/switchs/src/data.d.ts +14 -11
  152. package/dist/components/switchs/src/index2.cjs +9 -5
  153. package/dist/components/switchs/src/index2.js +9 -5
  154. package/dist/components/tables/common/com-limit.cjs +4 -0
  155. package/dist/components/tables/common/com-limit.js +4 -0
  156. package/dist/components/tables/common/com-limit2.cjs +103 -0
  157. package/dist/components/tables/common/com-limit2.js +103 -0
  158. package/dist/components/tables/common/com.scss +12 -0
  159. package/dist/components/tables/index.css +9 -0
  160. package/dist/components/tables/index.scss +2 -0
  161. package/dist/components/tables/src/columns2.cjs +3 -1
  162. package/dist/components/tables/src/columns2.js +7 -5
  163. package/dist/components/tablesp/index.css +9 -0
  164. package/dist/components/tablespd/index.css +9 -0
  165. package/dist/components/uploads/src/data.d.ts +14 -11
  166. package/dist/css/edit-data-add.css +144 -0
  167. package/dist/css/index.css +149 -0
  168. package/dist/css/page.css +8 -0
  169. package/dist/css/retract.css +20 -0
  170. package/dist/css/tables.css +9 -0
  171. package/dist/css/tablesp.css +9 -0
  172. package/dist/css/tablespd.css +9 -0
  173. package/dist/directives/adjust/index.cjs +14 -6
  174. package/dist/directives/adjust/index.js +14 -6
  175. package/dist/directives/adjustment/index.cjs +622 -0
  176. package/dist/directives/adjustment/index.d.ts +7 -0
  177. package/dist/directives/adjustment/index.js +622 -0
  178. package/dist/directives/index.cjs +18 -16
  179. package/dist/directives/index.d.ts +1 -0
  180. package/dist/directives/index.js +16 -14
  181. package/dist/expand/{chunk-A7IW6WRD.cjs → chunk-BJVT6JH7.cjs} +6 -0
  182. package/dist/expand/{chunk-L4FI5HCY.js → chunk-I5UJEJJB.js} +6 -0
  183. package/dist/expand/components.cjs +5 -5
  184. package/dist/expand/components.js +1 -1
  185. package/dist/expand/config.cjs +2 -2
  186. package/dist/expand/config.js +1 -1
  187. package/dist/icons/index.json +1 -1
  188. package/dist/index.cjs +84 -78
  189. package/dist/index.css +149 -0
  190. package/dist/index.js +20 -14
  191. package/dist/utils/util.cjs +1 -1
  192. package/dist/utils/util.js +2 -2
  193. package/dist/utils/vues/withInstall.cjs +2 -1
  194. package/dist/utils/vues/withInstall.js +2 -1
  195. package/package.json +12 -11
  196. /package/dist/components/{draggable → keep-com}/index.css +0 -0
  197. /package/dist/css/{draggable.css → keep-com.css} +0 -0
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const code_vue_vue_type_script_setup_true_lang = require("./code2.cjs");
4
+ exports.default = code_vue_vue_type_script_setup_true_lang.default;
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./code2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const vue = require("vue");
4
+ const data = require("../data.cjs");
5
+ const index = require("../../../../hooks/cssname/index.cjs");
6
+ const index$1 = require("../../../../hooks/locale/index.cjs");
7
+ const index$2 = require("../../../inputs/index.cjs");
8
+ const json5 = require("json5");
9
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
10
+ __name: "code",
11
+ props: data.dataDataProps,
12
+ emits: data.dataDataEmits,
13
+ setup(__props, { emit: __emit }) {
14
+ const cs = index.useCssName(data.name);
15
+ const { getLocale } = index$1.useLocale();
16
+ const props = __props;
17
+ const emit = __emit;
18
+ const value = vue.computed({
19
+ get() {
20
+ const v = props.modelValue;
21
+ if (typeof v === "string") {
22
+ return v;
23
+ } else {
24
+ if (typeof v === "function") {
25
+ return v.toString();
26
+ } else {
27
+ return json5.stringify(v, null, 4);
28
+ }
29
+ }
30
+ },
31
+ set(value2) {
32
+ emit("update:modelValue", value2);
33
+ }
34
+ });
35
+ return (_ctx, _cache) => {
36
+ return vue.openBlock(), vue.createElementBlock("div", {
37
+ class: vue.normalizeClass(vue.unref(cs).z("code"))
38
+ }, [
39
+ props.compon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(props.compon), vue.mergeProps({ key: 0 }, props, {
40
+ modelValue: value.value,
41
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
42
+ }), null, 16, ["modelValue"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$2.Inputs), {
43
+ key: 1,
44
+ type: "textarea",
45
+ modelValue: value.value,
46
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event)
47
+ }, null, 8, ["modelValue"]))
48
+ ], 2);
49
+ };
50
+ }
51
+ });
52
+ exports.default = _sfc_main;
@@ -0,0 +1,52 @@
1
+ import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createBlock, resolveDynamicComponent, mergeProps } from "vue";
2
+ import { name, dataDataEmits, dataDataProps } from "../data.js";
3
+ import { useCssName } from "../../../../hooks/cssname/index.js";
4
+ import { useLocale } from "../../../../hooks/locale/index.js";
5
+ import { Inputs } from "../../../inputs/index.js";
6
+ import json5 from "json5";
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "code",
9
+ props: dataDataProps,
10
+ emits: dataDataEmits,
11
+ setup(__props, { emit: __emit }) {
12
+ const cs = useCssName(name);
13
+ const { getLocale } = useLocale();
14
+ const props = __props;
15
+ const emit = __emit;
16
+ const value = computed({
17
+ get() {
18
+ const v = props.modelValue;
19
+ if (typeof v === "string") {
20
+ return v;
21
+ } else {
22
+ if (typeof v === "function") {
23
+ return v.toString();
24
+ } else {
25
+ return json5.stringify(v, null, 4);
26
+ }
27
+ }
28
+ },
29
+ set(value2) {
30
+ emit("update:modelValue", value2);
31
+ }
32
+ });
33
+ return (_ctx, _cache) => {
34
+ return openBlock(), createElementBlock("div", {
35
+ class: normalizeClass(unref(cs).z("code"))
36
+ }, [
37
+ props.compon ? (openBlock(), createBlock(resolveDynamicComponent(props.compon), mergeProps({ key: 0 }, props, {
38
+ modelValue: value.value,
39
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
40
+ }), null, 16, ["modelValue"])) : (openBlock(), createBlock(unref(Inputs), {
41
+ key: 1,
42
+ type: "textarea",
43
+ modelValue: value.value,
44
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event)
45
+ }, null, 8, ["modelValue"]))
46
+ ], 2);
47
+ };
48
+ }
49
+ });
50
+ export {
51
+ _sfc_main as default
52
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const editor_vue_vue_type_script_setup_true_lang = require("./editor2.cjs");
4
+ exports.default = editor_vue_vue_type_script_setup_true_lang.default;
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./editor2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const vue = require("vue");
4
+ const data = require("../data.cjs");
5
+ const index = require("../../../../hooks/cssname/index.cjs");
6
+ const index$1 = require("../../../../hooks/locale/index.cjs");
7
+ const index$3 = require("../../../button/index.cjs");
8
+ const index$2 = require("../../../window/index.cjs");
9
+ require("./code.cjs");
10
+ require("./array.cjs");
11
+ require("./array-json.cjs");
12
+ require("./object.cjs");
13
+ require("./object-json.cjs");
14
+ const arrayJson_vue_vue_type_script_setup_true_lang = require("./array-json2.cjs");
15
+ const code_vue_vue_type_script_setup_true_lang = require("./code2.cjs");
16
+ const array_vue_vue_type_script_setup_true_lang = require("./array2.cjs");
17
+ const objectJson_vue_vue_type_script_setup_true_lang = require("./object-json2.cjs");
18
+ const object_vue_vue_type_script_setup_true_lang = require("./object2.cjs");
19
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20
+ ...{
21
+ inheritAttrs: false
22
+ },
23
+ __name: "editor",
24
+ props: {
25
+ ...data.dataDataProps,
26
+ type: { type: String },
27
+ title: { type: String, default: "设置" },
28
+ value: { type: null }
29
+ },
30
+ emits: [...data.dataDataEmits, "submit"],
31
+ setup(__props, { emit: __emit }) {
32
+ const cs = index.useCssName(data.name);
33
+ const { getLocale } = index$1.useLocale();
34
+ const props = __props;
35
+ const emit = __emit;
36
+ const code = vue.ref(props.value);
37
+ const value = vue.computed({
38
+ get() {
39
+ const v = props.modelValue;
40
+ if (v) {
41
+ code.value = props.value;
42
+ }
43
+ return v;
44
+ },
45
+ set(value2) {
46
+ emit("update:modelValue", value2);
47
+ }
48
+ });
49
+ const size = vue.ref(0);
50
+ function onClick(key) {
51
+ if (key == 9) {
52
+ code.value = props.value;
53
+ } else if (key == 1) {
54
+ submit();
55
+ } else {
56
+ code.value = "";
57
+ }
58
+ }
59
+ function submit() {
60
+ emit("submit", code.value);
61
+ }
62
+ function onChangesize() {
63
+ setTimeout(() => {
64
+ size.value++;
65
+ }, 100);
66
+ }
67
+ return (_ctx, _cache) => {
68
+ return vue.openBlock(), vue.createBlock(vue.unref(index$2.Window), {
69
+ isMin: false,
70
+ title: props.title,
71
+ onChangesize,
72
+ modelValue: value.value,
73
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => value.value = $event)
74
+ }, {
75
+ default: vue.withCtx(() => [
76
+ vue.createElementVNode("div", {
77
+ class: vue.normalizeClass(vue.unref(cs).z("editor"))
78
+ }, [
79
+ vue.createElementVNode("div", {
80
+ class: vue.normalizeClass(vue.unref(cs).z("editor-main"))
81
+ }, [
82
+ vue.createElementVNode("div", {
83
+ class: vue.normalizeClass(vue.unref(cs).z("editor-content"))
84
+ }, [
85
+ props.type == "array" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
86
+ props.isJson ? (vue.openBlock(), vue.createBlock(arrayJson_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ key: 0 }, props, {
87
+ modelValue: code.value,
88
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => code.value = $event)
89
+ }), {
90
+ default: vue.withCtx(() => [
91
+ vue.createVNode(code_vue_vue_type_script_setup_true_lang.default, {
92
+ size: size.value,
93
+ compon: props.compon,
94
+ modelValue: code.value,
95
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => code.value = $event)
96
+ }, null, 8, ["size", "compon", "modelValue"])
97
+ ]),
98
+ _: 1
99
+ }, 16, ["modelValue"])) : (vue.openBlock(), vue.createBlock(array_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ key: 1 }, props, {
100
+ modelValue: code.value,
101
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => code.value = $event)
102
+ }), null, 16, ["modelValue"]))
103
+ ], 64)) : props.type == "object" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
104
+ props.isJson ? (vue.openBlock(), vue.createBlock(objectJson_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ key: 0 }, props, {
105
+ modelValue: code.value,
106
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => code.value = $event)
107
+ }), {
108
+ default: vue.withCtx(() => [
109
+ vue.createVNode(code_vue_vue_type_script_setup_true_lang.default, {
110
+ size: size.value,
111
+ compon: props.compon,
112
+ modelValue: code.value,
113
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => code.value = $event)
114
+ }, null, 8, ["size", "compon", "modelValue"])
115
+ ]),
116
+ _: 1
117
+ }, 16, ["modelValue"])) : (vue.openBlock(), vue.createBlock(object_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ key: 1 }, props, {
118
+ modelValue: code.value,
119
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => code.value = $event)
120
+ }), null, 16, ["modelValue"]))
121
+ ], 64)) : (vue.openBlock(), vue.createBlock(code_vue_vue_type_script_setup_true_lang.default, {
122
+ key: 2,
123
+ size: size.value,
124
+ compon: props.compon,
125
+ modelValue: code.value,
126
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => code.value = $event)
127
+ }, null, 8, ["size", "compon", "modelValue"]))
128
+ ], 2)
129
+ ], 2),
130
+ vue.createElementVNode("div", {
131
+ class: vue.normalizeClass(vue.unref(cs).z("editor-footer"))
132
+ }, [
133
+ vue.createElementVNode("div", {
134
+ class: vue.normalizeClass(vue.unref(cs).z("editor-top-but"))
135
+ }, [
136
+ vue.createVNode(vue.unref(index$3.Button), {
137
+ onClick: _cache[7] || (_cache[7] = ($event) => onClick(9))
138
+ }, {
139
+ default: vue.withCtx(() => [..._cache[11] || (_cache[11] = [
140
+ vue.createTextVNode("重置", -1)
141
+ ])]),
142
+ _: 1
143
+ }),
144
+ vue.createVNode(vue.unref(index$3.Button), {
145
+ onClick: _cache[8] || (_cache[8] = ($event) => onClick(0))
146
+ }, {
147
+ default: vue.withCtx(() => [..._cache[12] || (_cache[12] = [
148
+ vue.createTextVNode("清空", -1)
149
+ ])]),
150
+ _: 1
151
+ }),
152
+ vue.createVNode(vue.unref(index$3.Button), {
153
+ onClick: _cache[9] || (_cache[9] = ($event) => onClick(1)),
154
+ type: "primary"
155
+ }, {
156
+ default: vue.withCtx(() => [..._cache[13] || (_cache[13] = [
157
+ vue.createTextVNode("确认", -1)
158
+ ])]),
159
+ _: 1
160
+ })
161
+ ], 2)
162
+ ], 2)
163
+ ], 2)
164
+ ]),
165
+ _: 1
166
+ }, 8, ["title", "modelValue"]);
167
+ };
168
+ }
169
+ });
170
+ exports.default = _sfc_main;
@@ -0,0 +1,170 @@
1
+ import { defineComponent, ref, computed, createBlock, openBlock, unref, withCtx, createElementVNode, normalizeClass, createElementBlock, Fragment, mergeProps, createVNode, createTextVNode } from "vue";
2
+ import { dataDataEmits, dataDataProps, name } from "../data.js";
3
+ import { useCssName } from "../../../../hooks/cssname/index.js";
4
+ import { useLocale } from "../../../../hooks/locale/index.js";
5
+ import { Button } from "../../../button/index.js";
6
+ import { Window } from "../../../window/index.js";
7
+ import "./code.js";
8
+ import "./array.js";
9
+ import "./array-json.js";
10
+ import "./object.js";
11
+ import "./object-json.js";
12
+ import _sfc_main$1 from "./array-json2.js";
13
+ import _sfc_main$2 from "./code2.js";
14
+ import _sfc_main$3 from "./array2.js";
15
+ import _sfc_main$4 from "./object-json2.js";
16
+ import _sfc_main$5 from "./object2.js";
17
+ const _sfc_main = /* @__PURE__ */ defineComponent({
18
+ ...{
19
+ inheritAttrs: false
20
+ },
21
+ __name: "editor",
22
+ props: {
23
+ ...dataDataProps,
24
+ type: { type: String },
25
+ title: { type: String, default: "设置" },
26
+ value: { type: null }
27
+ },
28
+ emits: [...dataDataEmits, "submit"],
29
+ setup(__props, { emit: __emit }) {
30
+ const cs = useCssName(name);
31
+ const { getLocale } = useLocale();
32
+ const props = __props;
33
+ const emit = __emit;
34
+ const code = ref(props.value);
35
+ const value = computed({
36
+ get() {
37
+ const v = props.modelValue;
38
+ if (v) {
39
+ code.value = props.value;
40
+ }
41
+ return v;
42
+ },
43
+ set(value2) {
44
+ emit("update:modelValue", value2);
45
+ }
46
+ });
47
+ const size = ref(0);
48
+ function onClick(key) {
49
+ if (key == 9) {
50
+ code.value = props.value;
51
+ } else if (key == 1) {
52
+ submit();
53
+ } else {
54
+ code.value = "";
55
+ }
56
+ }
57
+ function submit() {
58
+ emit("submit", code.value);
59
+ }
60
+ function onChangesize() {
61
+ setTimeout(() => {
62
+ size.value++;
63
+ }, 100);
64
+ }
65
+ return (_ctx, _cache) => {
66
+ return openBlock(), createBlock(unref(Window), {
67
+ isMin: false,
68
+ title: props.title,
69
+ onChangesize,
70
+ modelValue: value.value,
71
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => value.value = $event)
72
+ }, {
73
+ default: withCtx(() => [
74
+ createElementVNode("div", {
75
+ class: normalizeClass(unref(cs).z("editor"))
76
+ }, [
77
+ createElementVNode("div", {
78
+ class: normalizeClass(unref(cs).z("editor-main"))
79
+ }, [
80
+ createElementVNode("div", {
81
+ class: normalizeClass(unref(cs).z("editor-content"))
82
+ }, [
83
+ props.type == "array" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
84
+ props.isJson ? (openBlock(), createBlock(_sfc_main$1, mergeProps({ key: 0 }, props, {
85
+ modelValue: code.value,
86
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => code.value = $event)
87
+ }), {
88
+ default: withCtx(() => [
89
+ createVNode(_sfc_main$2, {
90
+ size: size.value,
91
+ compon: props.compon,
92
+ modelValue: code.value,
93
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => code.value = $event)
94
+ }, null, 8, ["size", "compon", "modelValue"])
95
+ ]),
96
+ _: 1
97
+ }, 16, ["modelValue"])) : (openBlock(), createBlock(_sfc_main$3, mergeProps({ key: 1 }, props, {
98
+ modelValue: code.value,
99
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => code.value = $event)
100
+ }), null, 16, ["modelValue"]))
101
+ ], 64)) : props.type == "object" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
102
+ props.isJson ? (openBlock(), createBlock(_sfc_main$4, mergeProps({ key: 0 }, props, {
103
+ modelValue: code.value,
104
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => code.value = $event)
105
+ }), {
106
+ default: withCtx(() => [
107
+ createVNode(_sfc_main$2, {
108
+ size: size.value,
109
+ compon: props.compon,
110
+ modelValue: code.value,
111
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => code.value = $event)
112
+ }, null, 8, ["size", "compon", "modelValue"])
113
+ ]),
114
+ _: 1
115
+ }, 16, ["modelValue"])) : (openBlock(), createBlock(_sfc_main$5, mergeProps({ key: 1 }, props, {
116
+ modelValue: code.value,
117
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => code.value = $event)
118
+ }), null, 16, ["modelValue"]))
119
+ ], 64)) : (openBlock(), createBlock(_sfc_main$2, {
120
+ key: 2,
121
+ size: size.value,
122
+ compon: props.compon,
123
+ modelValue: code.value,
124
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => code.value = $event)
125
+ }, null, 8, ["size", "compon", "modelValue"]))
126
+ ], 2)
127
+ ], 2),
128
+ createElementVNode("div", {
129
+ class: normalizeClass(unref(cs).z("editor-footer"))
130
+ }, [
131
+ createElementVNode("div", {
132
+ class: normalizeClass(unref(cs).z("editor-top-but"))
133
+ }, [
134
+ createVNode(unref(Button), {
135
+ onClick: _cache[7] || (_cache[7] = ($event) => onClick(9))
136
+ }, {
137
+ default: withCtx(() => [..._cache[11] || (_cache[11] = [
138
+ createTextVNode("重置", -1)
139
+ ])]),
140
+ _: 1
141
+ }),
142
+ createVNode(unref(Button), {
143
+ onClick: _cache[8] || (_cache[8] = ($event) => onClick(0))
144
+ }, {
145
+ default: withCtx(() => [..._cache[12] || (_cache[12] = [
146
+ createTextVNode("清空", -1)
147
+ ])]),
148
+ _: 1
149
+ }),
150
+ createVNode(unref(Button), {
151
+ onClick: _cache[9] || (_cache[9] = ($event) => onClick(1)),
152
+ type: "primary"
153
+ }, {
154
+ default: withCtx(() => [..._cache[13] || (_cache[13] = [
155
+ createTextVNode("确认", -1)
156
+ ])]),
157
+ _: 1
158
+ })
159
+ ], 2)
160
+ ], 2)
161
+ ], 2)
162
+ ]),
163
+ _: 1
164
+ }, 8, ["title", "modelValue"]);
165
+ };
166
+ }
167
+ });
168
+ export {
169
+ _sfc_main as default
170
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const general_vue_vue_type_script_setup_true_lang = require("./general2.cjs");
4
+ exports.default = general_vue_vue_type_script_setup_true_lang.default;
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./general2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const vue = require("vue");
4
+ const data = require("../data.cjs");
5
+ const index = require("../../../../hooks/cssname/index.cjs");
6
+ const index$1 = require("../../../../hooks/locale/index.cjs");
7
+ const index$2 = require("../../../inputs/index.cjs");
8
+ const index$3 = require("../../../button/index.cjs");
9
+ require("./editor.cjs");
10
+ const index$4 = require("../../../message/index.cjs");
11
+ const json5 = require("json5");
12
+ const editor_vue_vue_type_script_setup_true_lang = require("./editor2.cjs");
13
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
14
+ __name: "general",
15
+ props: {
16
+ ...data.dataDataProps,
17
+ title: { type: String, default: "设置" },
18
+ check: { type: Function }
19
+ },
20
+ emits: data.dataDataEmits,
21
+ setup(__props, { emit: __emit }) {
22
+ const cs = index.useCssName(data.name);
23
+ const { getLocale } = index$1.useLocale();
24
+ const props = __props;
25
+ const emit = __emit;
26
+ const box = vue.ref(false);
27
+ const value = vue.computed({
28
+ get() {
29
+ return props.modelValue;
30
+ },
31
+ set(value2) {
32
+ emit("update:modelValue", value2);
33
+ }
34
+ });
35
+ const inputValue = vue.computed(() => {
36
+ if (value.value) {
37
+ return json5.stringify(value.value);
38
+ } else {
39
+ return String(value.value);
40
+ }
41
+ });
42
+ const onSubmit = (v) => {
43
+ if (props.check) {
44
+ const err = props.check(v);
45
+ if (err) {
46
+ index$4.Message.error(err);
47
+ return;
48
+ }
49
+ }
50
+ value.value = v;
51
+ box.value = false;
52
+ };
53
+ const onClick = () => {
54
+ box.value = true;
55
+ };
56
+ return (_ctx, _cache) => {
57
+ return vue.openBlock(), vue.createElementBlock("div", {
58
+ class: vue.normalizeClass(vue.unref(cs).z("general"))
59
+ }, [
60
+ vue.createElementVNode("div", {
61
+ class: vue.normalizeClass(vue.unref(cs).z("general-set"))
62
+ }, [
63
+ vue.createVNode(vue.unref(index$2.Inputs), {
64
+ readonly: "",
65
+ clearable: "",
66
+ "model-value": inputValue.value
67
+ }, null, 8, ["model-value"]),
68
+ vue.createVNode(vue.unref(index$3.Button), {
69
+ type: "primary",
70
+ onClick
71
+ }, {
72
+ default: vue.withCtx(() => [
73
+ vue.createTextVNode(vue.toDisplayString(props.title), 1)
74
+ ]),
75
+ _: 1
76
+ })
77
+ ], 2),
78
+ vue.createVNode(editor_vue_vue_type_script_setup_true_lang.default, vue.mergeProps(props, {
79
+ modelValue: box.value,
80
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => box.value = $event),
81
+ value: value.value,
82
+ onSubmit
83
+ }), null, 16, ["modelValue", "value"])
84
+ ], 2);
85
+ };
86
+ }
87
+ });
88
+ exports.default = _sfc_main;
@@ -0,0 +1,88 @@
1
+ import { defineComponent, ref, computed, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createVNode, withCtx, createTextVNode, toDisplayString, mergeProps } from "vue";
2
+ import { dataDataEmits, dataDataProps, name } from "../data.js";
3
+ import { useCssName } from "../../../../hooks/cssname/index.js";
4
+ import { useLocale } from "../../../../hooks/locale/index.js";
5
+ import { Inputs } from "../../../inputs/index.js";
6
+ import { Button } from "../../../button/index.js";
7
+ import "./editor.js";
8
+ import { Message } from "../../../message/index.js";
9
+ import json5 from "json5";
10
+ import _sfc_main$1 from "./editor2.js";
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ __name: "general",
13
+ props: {
14
+ ...dataDataProps,
15
+ title: { type: String, default: "设置" },
16
+ check: { type: Function }
17
+ },
18
+ emits: dataDataEmits,
19
+ setup(__props, { emit: __emit }) {
20
+ const cs = useCssName(name);
21
+ const { getLocale } = useLocale();
22
+ const props = __props;
23
+ const emit = __emit;
24
+ const box = ref(false);
25
+ const value = computed({
26
+ get() {
27
+ return props.modelValue;
28
+ },
29
+ set(value2) {
30
+ emit("update:modelValue", value2);
31
+ }
32
+ });
33
+ const inputValue = computed(() => {
34
+ if (value.value) {
35
+ return json5.stringify(value.value);
36
+ } else {
37
+ return String(value.value);
38
+ }
39
+ });
40
+ const onSubmit = (v) => {
41
+ if (props.check) {
42
+ const err = props.check(v);
43
+ if (err) {
44
+ Message.error(err);
45
+ return;
46
+ }
47
+ }
48
+ value.value = v;
49
+ box.value = false;
50
+ };
51
+ const onClick = () => {
52
+ box.value = true;
53
+ };
54
+ return (_ctx, _cache) => {
55
+ return openBlock(), createElementBlock("div", {
56
+ class: normalizeClass(unref(cs).z("general"))
57
+ }, [
58
+ createElementVNode("div", {
59
+ class: normalizeClass(unref(cs).z("general-set"))
60
+ }, [
61
+ createVNode(unref(Inputs), {
62
+ readonly: "",
63
+ clearable: "",
64
+ "model-value": inputValue.value
65
+ }, null, 8, ["model-value"]),
66
+ createVNode(unref(Button), {
67
+ type: "primary",
68
+ onClick
69
+ }, {
70
+ default: withCtx(() => [
71
+ createTextVNode(toDisplayString(props.title), 1)
72
+ ]),
73
+ _: 1
74
+ })
75
+ ], 2),
76
+ createVNode(_sfc_main$1, mergeProps(props, {
77
+ modelValue: box.value,
78
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => box.value = $event),
79
+ value: value.value,
80
+ onSubmit
81
+ }), null, 16, ["modelValue", "value"])
82
+ ], 2);
83
+ };
84
+ }
85
+ });
86
+ export {
87
+ _sfc_main as default
88
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const objectJson_vue_vue_type_script_setup_true_lang = require("./object-json2.cjs");
4
+ exports.default = objectJson_vue_vue_type_script_setup_true_lang.default;
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./object-json2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };