@fangzhongya/vue-archive 0.0.7 → 0.0.8

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 (125) hide show
  1. package/README.md +3 -2
  2. package/dist/node/index.cjs +135 -71
  3. package/dist/node/index.d.cts +8 -0
  4. package/dist/node/index.d.ts +8 -0
  5. package/dist/node/index.js +118 -54
  6. package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.cjs +1 -0
  7. package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-LPMR5W6M.js +9 -0
  8. package/dist/packages/components/aside/index.vue.cjs +1 -1
  9. package/dist/packages/components/aside/index.vue.js +43 -45
  10. package/dist/packages/components/boxurl/index.vue.cjs +1 -1
  11. package/dist/packages/components/boxurl/index.vue.js +34 -37
  12. package/dist/packages/components/choice/choice.vue.cjs +1 -1
  13. package/dist/packages/components/choice/choice.vue.js +29 -32
  14. package/dist/packages/components/choice/index.vue.cjs +1 -1
  15. package/dist/packages/components/choice/index.vue.js +39 -42
  16. package/dist/packages/components/code/highlight.vue2.cjs +1 -1
  17. package/dist/packages/components/code/highlight.vue2.js +1 -1
  18. package/dist/packages/components/code/index.vue.cjs +1 -1
  19. package/dist/packages/components/code/index.vue.js +79 -87
  20. package/dist/packages/components/compo/ftable.vue.cjs +1 -1
  21. package/dist/packages/components/compo/ftable.vue.js +15 -15
  22. package/dist/packages/components/compo/index.cjs +1 -1
  23. package/dist/packages/components/compo/index.js +86 -97
  24. package/dist/packages/components/compo/index.vue.cjs +1 -1
  25. package/dist/packages/components/compo/index.vue.js +33 -34
  26. package/dist/packages/components/compo/info.vue.cjs +1 -1
  27. package/dist/packages/components/compo/info.vue.js +22 -25
  28. package/dist/packages/components/compo/top.cjs +1 -1
  29. package/dist/packages/components/compo/top.js +21 -21
  30. package/dist/packages/components/main/index.vue.cjs +1 -1
  31. package/dist/packages/components/main/index.vue.js +16 -17
  32. package/dist/packages/components/md/index.vue.cjs +1 -1
  33. package/dist/packages/components/md/index.vue.js +28 -32
  34. package/dist/packages/components/test/index.cjs +1 -1
  35. package/dist/packages/components/test/index.js +39 -42
  36. package/dist/packages/components/test/index.vue.cjs +1 -1
  37. package/dist/packages/components/test/index.vue.js +44 -49
  38. package/dist/packages/components/use/code.cjs +1 -1
  39. package/dist/packages/components/use/code.js +3 -3
  40. package/dist/packages/components/use/index.cjs +1 -1
  41. package/dist/packages/components/use/index.js +1 -1
  42. package/dist/packages/components/use/retrie/choice/index.vue.cjs +1 -1
  43. package/dist/packages/components/use/retrie/choice/index.vue.js +32 -34
  44. package/dist/packages/components/use/retrie/expose/index.vue.cjs +1 -1
  45. package/dist/packages/components/use/retrie/expose/index.vue.js +18 -19
  46. package/dist/packages/components/use/retrie/form/index.vue.cjs +1 -1
  47. package/dist/packages/components/use/retrie/form/index.vue.js +110 -114
  48. package/dist/packages/components/use/retrie/function/index.vue.cjs +2 -2
  49. package/dist/packages/components/use/retrie/function/index.vue.js +1 -4
  50. package/dist/packages/components/use/retrie/input/index.vue.cjs +1 -1
  51. package/dist/packages/components/use/retrie/input/index.vue.js +20 -21
  52. package/dist/packages/components/use/retrie/number/index.vue.cjs +1 -1
  53. package/dist/packages/components/use/retrie/number/index.vue.js +12 -13
  54. package/dist/packages/components/use/retrie/select/index.vue.cjs +1 -1
  55. package/dist/packages/components/use/retrie/select/index.vue.js +21 -23
  56. package/dist/packages/components/use/retrie/slot/index.vue.cjs +1 -1
  57. package/dist/packages/components/use/retrie/slot/index.vue.js +15 -16
  58. package/dist/packages/components/use/retrie/string/index.vue.cjs +1 -1
  59. package/dist/packages/components/use/retrie/string/index.vue.js +14 -15
  60. package/dist/packages/components/use/set-emit.vue.cjs +1 -1
  61. package/dist/packages/components/use/set-emit.vue.js +20 -24
  62. package/dist/packages/components/use/set-expose.vue.cjs +1 -1
  63. package/dist/packages/components/use/set-expose.vue.js +15 -18
  64. package/dist/packages/components/use/set-props.vue.cjs +1 -1
  65. package/dist/packages/components/use/set-props.vue.js +48 -49
  66. package/dist/packages/config.cjs +1 -1
  67. package/dist/packages/config.d.ts +8 -1
  68. package/dist/packages/config.js +1 -1
  69. package/dist/packages/directives/adjust/index copy.d.ts +6 -0
  70. package/dist/packages/directives/adjust/index.cjs +1 -1
  71. package/dist/packages/directives/adjust/index.js +96 -97
  72. package/dist/packages/page/comprops/index.vue2.cjs +1 -1
  73. package/dist/packages/page/comprops/index.vue2.js +65 -71
  74. package/dist/packages/page/index/index.vue2.cjs +1 -1
  75. package/dist/packages/page/index/index.vue2.js +19 -23
  76. package/dist/packages/page/single/index.vue2.cjs +1 -1
  77. package/dist/packages/page/single/index.vue2.js +46 -49
  78. package/dist/packages/router/index.cjs +1 -1
  79. package/dist/packages/router/index.js +44 -46
  80. package/dist/packages/utils/common.cjs +1 -1
  81. package/dist/packages/utils/common.d.ts +4 -0
  82. package/dist/packages/utils/common.js +57 -54
  83. package/dist/packages/utils/glob.cjs +3 -3
  84. package/dist/packages/utils/glob.d.ts +1 -1
  85. package/dist/packages/utils/glob.js +269 -227
  86. package/dist/packages/utils/props.cjs +1 -1
  87. package/dist/packages/utils/props.js +34 -28
  88. package/dist/src/components/common/cs3.d.ts +4 -0
  89. package/dist/src/components/common/index.d.ts +4 -0
  90. package/dist/src/components/cs/expose/index.d.ts +4 -1
  91. package/dist/src/components/cs/expose/src/index.vue.d.ts +4 -1
  92. package/dist/vue-archive.css +1 -1
  93. package/package.json +18 -19
  94. package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.cjs +0 -1
  95. package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -9
  96. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs +0 -0
  97. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
  98. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-5RZYHE3X.cjs +0 -0
  99. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-5RZYHE3X.js +0 -0
  100. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-AM67P3W7.cjs +0 -0
  101. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-AM67P3W7.js +0 -0
  102. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-APKFW4LU.cjs +0 -0
  103. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-APKFW4LU.js +0 -0
  104. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs +0 -0
  105. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
  106. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs +0 -0
  107. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
  108. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.cjs +0 -0
  109. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +0 -0
  110. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.cjs +0 -0
  111. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
  112. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs +0 -0
  113. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
  114. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-VBS6YE6H.cjs +0 -0
  115. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-VBS6YE6H.js +0 -0
  116. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-VKE5JARB.cjs +0 -0
  117. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-VKE5JARB.js +0 -0
  118. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs +0 -0
  119. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
  120. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-XUL6LPTN.cjs +0 -0
  121. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-XUL6LPTN.js +0 -0
  122. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.cjs +0 -0
  123. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.8-77 → @fangzhongya_utils@0.0.24}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
  124. /package/dist/node_modules/.pnpm/{@highlightjs_vue-plugin@2.1_0b670f4f8863792fd47bf820772b9cbf → @highlightjs_vue-plugin@2.1_b586068ec461434c266304f56a34d01a}/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.cjs +0 -0
  125. /package/dist/node_modules/.pnpm/{@highlightjs_vue-plugin@2.1_0b670f4f8863792fd47bf820772b9cbf → @highlightjs_vue-plugin@2.1_b586068ec461434c266304f56a34d01a}/node_modules/@highlightjs/vue-plugin/dist/highlightjs-vue.esm.min.js +0 -0
@@ -1,5 +1,5 @@
1
- import { defineComponent as c, ref as m, watch as f, createElementBlock as d, openBlock as p, createElementVNode as v, withModifiers as _ } from "vue";
2
- const h = { class: "form-number" }, N = ["value"], B = /* @__PURE__ */ c({
1
+ import { defineComponent as s, ref as c, watch as m, createElementBlock as f, openBlock as d, createElementVNode as p, withModifiers as v } from "vue";
2
+ const _ = { class: "form-number" }, h = ["value"], y = /* @__PURE__ */ s({
3
3
  __name: "index",
4
4
  props: {
5
5
  modelValue: {
@@ -7,9 +7,9 @@ const h = { class: "form-number" }, N = ["value"], B = /* @__PURE__ */ c({
7
7
  }
8
8
  },
9
9
  emits: ["value", "error"],
10
- setup(a, { emit: i }) {
11
- const o = a, r = i, n = m("");
12
- f(
10
+ setup(u, { emit: a }) {
11
+ const o = u, r = a, n = c("");
12
+ m(
13
13
  () => o.modelValue,
14
14
  () => {
15
15
  let e = o.modelValue;
@@ -19,9 +19,8 @@ const h = { class: "form-number" }, N = ["value"], B = /* @__PURE__ */ c({
19
19
  immediate: !0
20
20
  }
21
21
  );
22
- function s(e) {
23
- var u;
24
- const t = (u = e.target) == null ? void 0 : u.value;
22
+ function i(e) {
23
+ const t = e.target?.value;
25
24
  l(t);
26
25
  }
27
26
  function l(e) {
@@ -34,15 +33,15 @@ const h = { class: "form-number" }, N = ["value"], B = /* @__PURE__ */ c({
34
33
  } else
35
34
  return r("value", void 0, JSON.stringify(0)), r("error", !1), 0;
36
35
  }
37
- return (e, t) => (p(), d("div", h, [
38
- v("input", {
36
+ return (e, t) => (d(), f("div", _, [
37
+ p("input", {
39
38
  value: n.value,
40
39
  type: "number",
41
- onBlur: _(s, ["stop"])
42
- }, null, 40, N)
40
+ onBlur: v(i, ["stop"])
41
+ }, null, 40, h)
43
42
  ]));
44
43
  }
45
44
  });
46
45
  export {
47
- B as default
46
+ y as default
48
47
  };
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),k=require("../../util.cjs"),b={class:"form-select"},g=["value","disabled"],B={class:"form-select-box"},V={class:"form-select-list"},E={key:0,class:"form-select-list-div"},N=["onClick"],w={key:1,class:"no-data"},C=e.defineComponent({__name:"index",props:{modelValue:{type:null},dataType:{type:[String,Array]},disabled:Boolean,list:{type:Array},noValue:Boolean,config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value","change"],setup(f,{emit:p}){const o=f,r=p,a=e.ref(!1),i=e.ref({});e.watch(()=>o.modelValue,()=>{m()},{immediate:!0});function m(){if(o.list)for(let t=0;t<o.list.length;t++){const l=o.list[t];if(c(l)===o.modelValue){i.value=l,o.noValue||d();break}}}function u(t){var n;let l=(n=o.config)==null?void 0:n.label;return l&&typeof t=="object"&&t?t[l]:t}function c(t){var n;let l=(n=o.config)==null?void 0:n.prop;return l&&typeof t=="object"&&t?t[l]:t}function h(t){return c(t)===c(i.value)}function _(){o.disabled||(a.value=!0)}function v(){setTimeout(()=>{a.value=!1},100)}function y(t){i.value=t,d()}function d(){const t=c(i.value);let l;if(o.dataType&&o.dataType.length==1){let n=o.dataType[0];if(n=="string")l=k.getString(t);else if(n=="number"){const s=Number(t);isNaN(s)?l=0:l=s}else l=t}else l=t;r("value",l,JSON.stringify(t)),r("change",l,i.value)}return(t,l)=>(e.openBlock(),e.createElementBlock("div",b,[e.createElementVNode("input",{value:u(i.value),readonly:"",placeholder:"请选择",type:"text",disabled:o.disabled,onClick:e.withModifiers(_,["stop"]),onBlur:e.withModifiers(v,["stop"])},null,40,g),e.createElementVNode("div",B,[e.withDirectives(e.createElementVNode("div",V,[o.list&&o.list.length>0?(e.openBlock(),e.createElementBlock("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.list,(n,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-select-list-li",{active:h(n)}]),onClick:e.withModifiers(S=>y(n),["stop"])},[e.createElementVNode("span",null,e.toDisplayString(u(n)),1)],10,N))),256))])):(e.openBlock(),e.createElementBlock("div",w,"暂无数据"))],512),[[e.vShow,a.value]])])]))}});module.exports=C;
1
+ "use strict";const e=require("vue"),k=require("../../util.cjs"),b={class:"form-select"},g=["value","disabled"],B={class:"form-select-box"},V={class:"form-select-list"},E={key:0,class:"form-select-list-div"},N=["onClick"],w={key:1,class:"no-data"},C=e.defineComponent({__name:"index",props:{modelValue:{type:null},dataType:{type:[String,Array]},disabled:Boolean,list:{type:Array},noValue:Boolean,config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value","change"],setup(f,{emit:p}){const o=f,r=p,c=e.ref(!1),i=e.ref({});e.watch(()=>o.modelValue,()=>{m()},{immediate:!0});function m(){if(o.list)for(let t=0;t<o.list.length;t++){const l=o.list[t];if(s(l)===o.modelValue){i.value=l,o.noValue||d();break}}}function u(t){let l=o.config?.label;return l&&typeof t=="object"&&t?t[l]:t}function s(t){let l=o.config?.prop;return l&&typeof t=="object"&&t?t[l]:t}function h(t){return s(t)===s(i.value)}function _(){o.disabled||(c.value=!0)}function v(){setTimeout(()=>{c.value=!1},100)}function y(t){i.value=t,d()}function d(){const t=s(i.value);let l;if(o.dataType&&o.dataType.length==1){let n=o.dataType[0];if(n=="string")l=k.getString(t);else if(n=="number"){const a=Number(t);isNaN(a)?l=0:l=a}else l=t}else l=t;r("value",l,JSON.stringify(t)),r("change",l,i.value)}return(t,l)=>(e.openBlock(),e.createElementBlock("div",b,[e.createElementVNode("input",{value:u(i.value),readonly:"",placeholder:"请选择",type:"text",disabled:o.disabled,onClick:e.withModifiers(_,["stop"]),onBlur:e.withModifiers(v,["stop"])},null,40,g),e.createElementVNode("div",B,[e.withDirectives(e.createElementVNode("div",V,[o.list&&o.list.length>0?(e.openBlock(),e.createElementBlock("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.list,(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-select-list-li",{active:h(n)}]),onClick:e.withModifiers(S=>y(n),["stop"])},[e.createElementVNode("span",null,e.toDisplayString(u(n)),1)],10,N))),256))])):(e.openBlock(),e.createElementBlock("div",w,"暂无数据"))],512),[[e.vShow,c.value]])])]))}});module.exports=C;
@@ -1,4 +1,4 @@
1
- import { defineComponent as C, ref as h, watch as S, createElementBlock as i, openBlock as a, createElementVNode as c, withModifiers as d, withDirectives as x, Fragment as B, renderList as w, normalizeClass as N, toDisplayString as T, vShow as j } from "vue";
1
+ import { defineComponent as C, ref as h, watch as S, createElementBlock as s, openBlock as i, createElementVNode as r, withModifiers as d, withDirectives as x, Fragment as B, renderList as w, normalizeClass as N, toDisplayString as T, vShow as j } from "vue";
2
2
  import { getString as A } from "../../util.js";
3
3
  const z = { class: "form-select" }, D = ["value", "disabled"], E = { class: "form-select-box" }, L = { class: "form-select-list" }, O = {
4
4
  key: 0,
@@ -30,7 +30,7 @@ const z = { class: "form-select" }, D = ["value", "disabled"], E = { class: "for
30
30
  },
31
31
  emits: ["value", "change"],
32
32
  setup(_, { emit: y }) {
33
- const l = _, f = y, u = h(!1), n = h({});
33
+ const l = _, f = y, c = h(!1), n = h({});
34
34
  S(
35
35
  () => l.modelValue,
36
36
  () => {
@@ -44,54 +44,52 @@ const z = { class: "form-select" }, D = ["value", "disabled"], E = { class: "for
44
44
  if (l.list)
45
45
  for (let e = 0; e < l.list.length; e++) {
46
46
  const t = l.list[e];
47
- if (r(t) === l.modelValue) {
47
+ if (a(t) === l.modelValue) {
48
48
  n.value = t, l.noValue || m();
49
49
  break;
50
50
  }
51
51
  }
52
52
  }
53
53
  function p(e) {
54
- var o;
55
- let t = (o = l.config) == null ? void 0 : o.label;
54
+ let t = l.config?.label;
56
55
  return t && typeof e == "object" && e ? e[t] : e;
57
56
  }
58
- function r(e) {
59
- var o;
60
- let t = (o = l.config) == null ? void 0 : o.prop;
57
+ function a(e) {
58
+ let t = l.config?.prop;
61
59
  return t && typeof e == "object" && e ? e[t] : e;
62
60
  }
63
61
  function b(e) {
64
- return r(e) === r(n.value);
62
+ return a(e) === a(n.value);
65
63
  }
66
64
  function g() {
67
- l.disabled || (u.value = !0);
65
+ l.disabled || (c.value = !0);
68
66
  }
69
67
  function k() {
70
68
  setTimeout(() => {
71
- u.value = !1;
69
+ c.value = !1;
72
70
  }, 100);
73
71
  }
74
72
  function V(e) {
75
73
  n.value = e, m();
76
74
  }
77
75
  function m() {
78
- const e = r(n.value);
76
+ const e = a(n.value);
79
77
  let t;
80
78
  if (l.dataType && l.dataType.length == 1) {
81
79
  let o = l.dataType[0];
82
80
  if (o == "string")
83
81
  t = A(e);
84
82
  else if (o == "number") {
85
- const s = Number(e);
86
- isNaN(s) ? t = 0 : t = s;
83
+ const u = Number(e);
84
+ isNaN(u) ? t = 0 : t = u;
87
85
  } else
88
86
  t = e;
89
87
  } else
90
88
  t = e;
91
89
  f("value", t, JSON.stringify(e)), f("change", t, n.value);
92
90
  }
93
- return (e, t) => (a(), i("div", z, [
94
- c("input", {
91
+ return (e, t) => (i(), s("div", z, [
92
+ r("input", {
95
93
  value: p(n.value),
96
94
  readonly: "",
97
95
  placeholder: "请选择",
@@ -100,20 +98,20 @@ const z = { class: "form-select" }, D = ["value", "disabled"], E = { class: "for
100
98
  onClick: d(g, ["stop"]),
101
99
  onBlur: d(k, ["stop"])
102
100
  }, null, 40, D),
103
- c("div", E, [
104
- x(c("div", L, [
105
- l.list && l.list.length > 0 ? (a(), i("div", O, [
106
- (a(!0), i(B, null, w(l.list, (o, s) => (a(), i("div", {
101
+ r("div", E, [
102
+ x(r("div", L, [
103
+ l.list && l.list.length > 0 ? (i(), s("div", O, [
104
+ (i(!0), s(B, null, w(l.list, (o, u) => (i(), s("div", {
107
105
  class: N(["form-select-list-li", {
108
106
  active: b(o)
109
107
  }]),
110
108
  onClick: d((M) => V(o), ["stop"])
111
109
  }, [
112
- c("span", null, T(p(o)), 1)
110
+ r("span", null, T(p(o)), 1)
113
111
  ], 10, F))), 256))
114
- ])) : (a(), i("div", J, "暂无数据"))
112
+ ])) : (i(), s("div", J, "暂无数据"))
115
113
  ], 512), [
116
- [j, u.value]
114
+ [j, c.value]
117
115
  ])
118
116
  ])
119
117
  ]));
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),f=require("../../codemirror.cjs"),m=require("../../util.cjs"),p={class:"slot"},_=e.defineComponent({__name:"index",props:{value:{type:Object}},emits:["change","error"],setup(h,{emit:l}){const n=e.ref(),s=e.ref(),i=e.ref(""),t=l;function a(){var r;const o=(r=n.value)==null?void 0:r.state.doc.toString();try{t("change",o),t("error",!1)}catch(c){t("error",!0),console.log("error",c)}}function u(o){const r=o.view,c=r.state.doc,d=c.toString().trim();try{i.value=m.prettierHtml(d),r.dispatch({changes:{from:0,to:c.length,insert:i.value}}),t("error",!1)}catch(v){t("error",!0),console.log("error",v)}}return e.onMounted(()=>{n.value=f.getHtml(s.value,{onBlur:u})}),(o,r)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",{class:"codemirror-div",ref_key:"refText",ref:s},null,512),e.createElementVNode("div",{onClick:e.withModifiers(a,["stop"]),class:"but-div"},"插入")]))}});module.exports=_;
1
+ "use strict";const e=require("vue"),f=require("../../codemirror.cjs"),m=require("../../util.cjs"),p={class:"slot"},_=e.defineComponent({__name:"index",props:{value:{type:Object}},emits:["change","error"],setup(h,{emit:l}){const c=e.ref(),n=e.ref(),s=e.ref(""),r=l;function a(){const o=c.value?.state.doc.toString();try{r("change",o),r("error",!1)}catch(t){r("error",!0),console.log("error",t)}}function u(o){const t=o.view,i=t.state.doc,d=i.toString().trim();try{s.value=m.prettierHtml(d),t.dispatch({changes:{from:0,to:i.length,insert:s.value}}),r("error",!1)}catch(v){r("error",!0),console.log("error",v)}}return e.onMounted(()=>{c.value=f.getHtml(n.value,{onBlur:u})}),(o,t)=>(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",{class:"codemirror-div",ref_key:"refText",ref:n},null,512),e.createElementVNode("div",{onClick:e.withModifiers(a,["stop"]),class:"but-div"},"插入")]))}});module.exports=_;
@@ -1,4 +1,4 @@
1
- import { defineComponent as v, ref as c, onMounted as p, createElementBlock as _, openBlock as h, createElementVNode as l, withModifiers as g } from "vue";
1
+ import { defineComponent as v, ref as o, onMounted as p, createElementBlock as _, openBlock as h, createElementVNode as l, withModifiers as g } from "vue";
2
2
  import { getHtml as k } from "../../codemirror.js";
3
3
  import { prettierHtml as x } from "../../util.js";
4
4
  const y = { class: "slot" }, E = /* @__PURE__ */ v({
@@ -10,39 +10,38 @@ const y = { class: "slot" }, E = /* @__PURE__ */ v({
10
10
  },
11
11
  emits: ["change", "error"],
12
12
  setup(w, { emit: a }) {
13
- const n = c(), s = c(), i = c(""), r = a;
13
+ const c = o(), n = o(), s = o(""), e = a;
14
14
  function m() {
15
- var e;
16
- const t = (e = n.value) == null ? void 0 : e.state.doc.toString();
15
+ const t = c.value?.state.doc.toString();
17
16
  try {
18
- r("change", t), r("error", !1);
19
- } catch (o) {
20
- r("error", !0), console.log("error", o);
17
+ e("change", t), e("error", !1);
18
+ } catch (r) {
19
+ e("error", !0), console.log("error", r);
21
20
  }
22
21
  }
23
22
  function u(t) {
24
- const e = t.view, o = e.state.doc, d = o.toString().trim();
23
+ const r = t.view, i = r.state.doc, d = i.toString().trim();
25
24
  try {
26
- i.value = x(d), e.dispatch({
25
+ s.value = x(d), r.dispatch({
27
26
  changes: {
28
27
  from: 0,
29
- to: o.length,
30
- insert: i.value
28
+ to: i.length,
29
+ insert: s.value
31
30
  }
32
- }), r("error", !1);
31
+ }), e("error", !1);
33
32
  } catch (f) {
34
- r("error", !0), console.log("error", f);
33
+ e("error", !0), console.log("error", f);
35
34
  }
36
35
  }
37
36
  return p(() => {
38
- n.value = k(s.value, {
37
+ c.value = k(n.value, {
39
38
  onBlur: u
40
39
  });
41
- }), (t, e) => (h(), _("div", y, [
40
+ }), (t, r) => (h(), _("div", y, [
42
41
  l("div", {
43
42
  class: "codemirror-div",
44
43
  ref_key: "refText",
45
- ref: s
44
+ ref: n
46
45
  }, null, 512),
47
46
  l("div", {
48
47
  onClick: g(m, ["stop"]),
@@ -1 +1 @@
1
- "use strict";const t=require("vue"),m=require("../../util.cjs"),p={class:"form-number"},v=["value"],d=t.defineComponent({__name:"index",props:{modelValue:{type:null},config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value"],setup(a,{emit:c}){const n=a,o=c,r=t.ref("");t.watch(()=>n.modelValue,()=>{let e=n.modelValue;r.value=l(e)},{immediate:!0});function s(e){var i;const u=(i=e.target)==null?void 0:i.value;l(u)}function l(e){return e?(e=m.getString(e),o("value",e,JSON.stringify(e)),e):(o("value",void 0,JSON.stringify("")),"")}return(e,u)=>(t.openBlock(),t.createElementBlock("div",p,[t.createElementVNode("textarea",{rows:"3",value:r.value,onBlur:t.withModifiers(s,["stop"])},null,40,v)]))}});module.exports=d;
1
+ "use strict";const t=require("vue"),s=require("../../util.cjs"),m={class:"form-number"},p=["value"],v=t.defineComponent({__name:"index",props:{modelValue:{type:null},config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value"],setup(i,{emit:a}){const n=i,o=a,r=t.ref("");t.watch(()=>n.modelValue,()=>{let e=n.modelValue;r.value=l(e)},{immediate:!0});function c(e){const u=e.target?.value;l(u)}function l(e){return e?(e=s.getString(e),o("value",e,JSON.stringify(e)),e):(o("value",void 0,JSON.stringify("")),"")}return(e,u)=>(t.openBlock(),t.createElementBlock("div",m,[t.createElementVNode("textarea",{rows:"3",value:r.value,onBlur:t.withModifiers(c,["stop"])},null,40,p)]))}});module.exports=v;
@@ -1,6 +1,6 @@
1
- import { defineComponent as m, ref as s, watch as p, createElementBlock as f, openBlock as d, createElementVNode as v, withModifiers as _ } from "vue";
2
- import { getString as g } from "../../util.js";
3
- const h = { class: "form-number" }, b = ["value"], B = /* @__PURE__ */ m({
1
+ import { defineComponent as c, ref as m, watch as s, createElementBlock as p, openBlock as f, createElementVNode as d, withModifiers as v } from "vue";
2
+ import { getString as _ } from "../../util.js";
3
+ const g = { class: "form-number" }, h = ["value"], y = /* @__PURE__ */ c({
4
4
  __name: "index",
5
5
  props: {
6
6
  modelValue: {
@@ -17,9 +17,9 @@ const h = { class: "form-number" }, b = ["value"], B = /* @__PURE__ */ m({
17
17
  }
18
18
  },
19
19
  emits: ["value"],
20
- setup(u, { emit: i }) {
21
- const t = u, o = i, l = s("");
22
- p(
20
+ setup(a, { emit: u }) {
21
+ const t = a, o = u, l = m("");
22
+ s(
23
23
  () => t.modelValue,
24
24
  () => {
25
25
  let e = t.modelValue;
@@ -29,23 +29,22 @@ const h = { class: "form-number" }, b = ["value"], B = /* @__PURE__ */ m({
29
29
  immediate: !0
30
30
  }
31
31
  );
32
- function c(e) {
33
- var a;
34
- const r = (a = e.target) == null ? void 0 : a.value;
32
+ function i(e) {
33
+ const r = e.target?.value;
35
34
  n(r);
36
35
  }
37
36
  function n(e) {
38
- return e ? (e = g(e), o("value", e, JSON.stringify(e)), e) : (o("value", void 0, JSON.stringify("")), "");
37
+ return e ? (e = _(e), o("value", e, JSON.stringify(e)), e) : (o("value", void 0, JSON.stringify("")), "");
39
38
  }
40
- return (e, r) => (d(), f("div", h, [
41
- v("textarea", {
39
+ return (e, r) => (f(), p("div", g, [
40
+ d("textarea", {
42
41
  rows: "3",
43
42
  value: l.value,
44
- onBlur: _(c, ["stop"])
45
- }, null, 40, b)
43
+ onBlur: v(i, ["stop"])
44
+ }, null, 40, h)
46
45
  ]));
47
46
  }
48
47
  });
49
48
  export {
50
- B as default
49
+ y as default
51
50
  };
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),p={key:0,class:"set-emit"},d=e.defineComponent({__name:"set-emit",props:{list:Array,value:{type:Object}},setup(s){const l=s;function a(n){return n.name+": ("+n.selectable+") "+n.description}function c(n){let r=n.name;if(l.value){let t=l.value[r];return t?t.arr||[]:[]}else return[]}function i(n){let r=n.name;if(l.value){let t=l.value[r];return(t==null?void 0:t._date_)||""}else return""}return(n,r)=>l.list&&l.list.length>0?(e.openBlock(),e.createElementBlock("div",p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.list,(t,u)=>(e.openBlock(),e.createElementBlock("div",{key:u},[e.createElementVNode("div",null,e.toDisplayString(a(t)),1),e.createElementVNode("div",null,[e.createElementVNode("span",null,"事件返回数据:"+e.toDisplayString(i(t)),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c(t),(m,o)=>(e.openBlock(),e.createElementBlock("div",{key:o},[e.createElementVNode("span",null,"参数"+e.toDisplayString(o+1)+":",1),e.createElementVNode("span",null,e.toDisplayString(JSON.stringify(m)),1)]))),128))])]))),128))])):e.createCommentVNode("",!0)}});module.exports=d;
1
+ "use strict";const e=require("vue"),p={key:0,class:"set-emit"},d=e.defineComponent({__name:"set-emit",props:{list:Array,value:{type:Object}},setup(o){const n=o;function s(t){return t.name+": ("+t.selectable+") "+t.description}function c(t){let l=t.name;if(n.value){let r=n.value[l];return r?r.arr||[]:[]}else return[]}function i(t){let l=t.name;return n.value&&n.value[l]?._date_||""}return(t,l)=>n.list&&n.list.length>0?(e.openBlock(),e.createElementBlock("div",p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(r,u)=>(e.openBlock(),e.createElementBlock("div",{key:u},[e.createElementVNode("div",null,e.toDisplayString(s(r)),1),e.createElementVNode("div",null,[e.createElementVNode("span",null,"事件返回数据:"+e.toDisplayString(i(r)),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c(r),(m,a)=>(e.openBlock(),e.createElementBlock("div",{key:a},[e.createElementVNode("span",null,"参数"+e.toDisplayString(a+1)+":",1),e.createElementVNode("span",null,e.toDisplayString(JSON.stringify(m)),1)]))),128))])]))),128))])):e.createCommentVNode("",!0)}});module.exports=d;
@@ -1,4 +1,4 @@
1
- import { defineComponent as y, createElementBlock as r, createCommentVNode as g, openBlock as s, Fragment as o, renderList as c, createElementVNode as u, toDisplayString as a } from "vue";
1
+ import { defineComponent as y, createElementBlock as l, createCommentVNode as g, openBlock as s, Fragment as o, renderList as c, createElementVNode as a, toDisplayString as u } from "vue";
2
2
  const b = {
3
3
  key: 0,
4
4
  class: "set-emit"
@@ -11,34 +11,30 @@ const b = {
11
11
  }
12
12
  },
13
13
  setup(m) {
14
- const n = m;
15
- function p(t) {
16
- return t.name + ": (" + t.selectable + ") " + t.description;
14
+ const t = m;
15
+ function p(e) {
16
+ return e.name + ": (" + e.selectable + ") " + e.description;
17
17
  }
18
- function d(t) {
19
- let l = t.name;
20
- if (n.value) {
21
- let e = n.value[l];
22
- return e ? e.arr || [] : [];
18
+ function d(e) {
19
+ let r = e.name;
20
+ if (t.value) {
21
+ let n = t.value[r];
22
+ return n ? n.arr || [] : [];
23
23
  } else
24
24
  return [];
25
25
  }
26
- function f(t) {
27
- let l = t.name;
28
- if (n.value) {
29
- let e = n.value[l];
30
- return (e == null ? void 0 : e._date_) || "";
31
- } else
32
- return "";
26
+ function f(e) {
27
+ let r = e.name;
28
+ return t.value && t.value[r]?._date_ || "";
33
29
  }
34
- return (t, l) => n.list && n.list.length > 0 ? (s(), r("div", b, [
35
- (s(!0), r(o, null, c(n.list, (e, _) => (s(), r("div", { key: _ }, [
36
- u("div", null, a(p(e)), 1),
37
- u("div", null, [
38
- u("span", null, "事件返回数据:" + a(f(e)), 1),
39
- (s(!0), r(o, null, c(d(e), (v, i) => (s(), r("div", { key: i }, [
40
- u("span", null, "参数" + a(i + 1) + ":", 1),
41
- u("span", null, a(JSON.stringify(v)), 1)
30
+ return (e, r) => t.list && t.list.length > 0 ? (s(), l("div", b, [
31
+ (s(!0), l(o, null, c(t.list, (n, _) => (s(), l("div", { key: _ }, [
32
+ a("div", null, u(p(n)), 1),
33
+ a("div", null, [
34
+ a("span", null, "事件返回数据:" + u(f(n)), 1),
35
+ (s(!0), l(o, null, c(d(n), (v, i) => (s(), l("div", { key: i }, [
36
+ a("span", null, "参数" + u(i + 1) + ":", 1),
37
+ a("span", null, u(JSON.stringify(v)), 1)
42
38
  ]))), 128))
43
39
  ])
44
40
  ]))), 128))
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),a=require("./retrie/select/index.vue.cjs");;/* empty css */const c=require("./retrie/expose/index.vue.cjs"),p={key:0,class:"set-expose"},_=e.defineComponent({__name:"set-expose",props:{list:Array,name:String,getRef:{type:Function}},setup(u){const t=u,o=e.computed(()=>{var n;return(n=t.list)==null?void 0:n.map((r,i)=>({label:r.name,prop:i}))}),s=e.ref({});function l(n){t.list&&(s.value=t.list[n])}return(n,r)=>t.list&&t.list.length>0?(e.openBlock(),e.createElementBlock("div",p,[r[0]||(r[0]=e.createTextVNode(" 请先选择要执行的方法 ")),e.createVNode(a,{onChange:l,list:o.value},null,8,["list"]),e.createVNode(c,{name:t.name,value:s.value,getRef:t.getRef},null,8,["name","value","getRef"])])):e.createCommentVNode("",!0)}});module.exports=_;
1
+ "use strict";const e=require("vue"),i=require("./retrie/select/index.vue.cjs");;/* empty css */const a=require("./retrie/expose/index.vue.cjs"),c={key:0,class:"set-expose"},p=e.defineComponent({__name:"set-expose",props:{list:Array,name:String,getRef:{type:Function}},setup(u){const t=u,o=e.computed(()=>t.list?.map((n,r)=>({label:n.name,prop:r}))),s=e.ref({});function l(n){t.list&&(s.value=t.list[n])}return(n,r)=>t.list&&t.list.length>0?(e.openBlock(),e.createElementBlock("div",c,[r[0]||(r[0]=e.createTextVNode(" 请先选择要执行的方法 ",-1)),e.createVNode(i,{onChange:l,list:o.value},null,8,["list"]),e.createVNode(a,{name:t.name,value:s.value,getRef:t.getRef},null,8,["name","value","getRef"])])):e.createCommentVNode("",!0)}});module.exports=p;
@@ -1,11 +1,11 @@
1
- import { defineComponent as m, computed as p, ref as u, createElementBlock as c, createCommentVNode as f, openBlock as _, createTextVNode as d, createVNode as r } from "vue";
2
- import g from "./retrie/select/index.vue.js";
1
+ import { defineComponent as i, computed as m, ref as p, createElementBlock as u, createCommentVNode as c, openBlock as f, createTextVNode as _, createVNode as r } from "vue";
2
+ import d from "./retrie/select/index.vue.js";
3
3
  /* empty css */
4
- import v from "./retrie/expose/index.vue.js";
5
- const x = {
4
+ import g from "./retrie/expose/index.vue.js";
5
+ const v = {
6
6
  key: 0,
7
7
  class: "set-expose"
8
- }, C = /* @__PURE__ */ m({
8
+ }, y = /* @__PURE__ */ i({
9
9
  __name: "set-expose",
10
10
  props: {
11
11
  list: Array,
@@ -15,30 +15,27 @@ const x = {
15
15
  }
16
16
  },
17
17
  setup(s) {
18
- const e = s, l = p(() => {
19
- var t;
20
- return (t = e.list) == null ? void 0 : t.map((n, i) => ({
21
- label: n.name,
22
- prop: i
23
- }));
24
- }), o = u({});
18
+ const e = s, l = m(() => e.list?.map((t, n) => ({
19
+ label: t.name,
20
+ prop: n
21
+ }))), o = p({});
25
22
  function a(t) {
26
23
  e.list && (o.value = e.list[t]);
27
24
  }
28
- return (t, n) => e.list && e.list.length > 0 ? (_(), c("div", x, [
29
- n[0] || (n[0] = d(" 请先选择要执行的方法 ")),
30
- r(g, {
25
+ return (t, n) => e.list && e.list.length > 0 ? (f(), u("div", v, [
26
+ n[0] || (n[0] = _(" 请先选择要执行的方法 ", -1)),
27
+ r(d, {
31
28
  onChange: a,
32
29
  list: l.value
33
30
  }, null, 8, ["list"]),
34
- r(v, {
31
+ r(g, {
35
32
  name: e.name,
36
33
  value: o.value,
37
34
  getRef: e.getRef
38
35
  }, null, 8, ["name", "value", "getRef"])
39
- ])) : f("", !0);
36
+ ])) : c("", !0);
40
37
  }
41
38
  });
42
39
  export {
43
- C as default
40
+ y as default
44
41
  };
@@ -1 +1 @@
1
- "use strict";const t=require("vue"),T=require("./retrie/index.vue.cjs"),k=require("./code.cjs"),x={key:0,class:"set-props"},q=t.defineComponent({__name:"set-props",props:{name:String,list:Array},emits:["change"],setup(i,{emit:p}){const c=i,m=p,u=t.ref({}),f=t.ref(0),a=t.ref({}),l=t.ref([]);function d(){var e;a.value={};const r=[];(e=c.list)==null||e.forEach(s=>{let n=s.name;if(n.includes(".")?n="":n=(n.split("/")[0]||"").trim(),n){a.value[n]=(s.default||"").trim();const{arr:v,type:b,dataType:g}=k.getSpecType(s);u.value[n]=v;let V={label:_(n,s),prop:n,type:b,dataType:g,select:n};r.push(V)}}),l.value=r}function _(r,e){let s=r+": { "+(e.type||"any")+" } "+e.description;return e.default&&(s+=" 默认值="+e.default),e.selectable&&(s+=" 可选值="+e.selectable),s}function h(r,e){let s=Object.assign({},r);m("change",s,e)}let o;function y(){clearTimeout(o),o=setTimeout(()=>{d()},400)}return t.watch(()=>c.name,()=>{l.value=[],t.nextTick(()=>{y()})},{immediate:!0}),(r,e)=>l.value&&l.value.length>0?(t.openBlock(),t.createElementBlock("div",x,[t.createVNode(T,{refresh:f.value,modelValue:a.value,selects:u.value,list:l.value,name:c.name,onQuery:h},null,8,["refresh","modelValue","selects","list","name"])])):t.createCommentVNode("",!0)}});module.exports=q;
1
+ "use strict";const s=require("vue"),V=require("./retrie/index.vue.cjs"),T=require("./code.cjs"),k={key:0,class:"set-props"},x=s.defineComponent({__name:"set-props",props:{name:String,list:Array},emits:["change"],setup(o,{emit:i}){const l=o,p=i,a=s.ref({}),m=s.ref(0),c=s.ref({}),r=s.ref([]);function f(){c.value={};const n=[];l.list?.forEach(t=>{let e=t.name;if(e.includes(".")?e="":e=(e.split("/")[0]||"").trim(),e){c.value[e]=(t.default||"").trim();const{arr:y,type:v,dataType:b}=T.getSpecType(t);a.value[e]=y;let g={label:d(e,t),prop:e,type:v,dataType:b,select:e};n.push(g)}}),r.value=n}function d(n,t){let e=n+": { "+(t.type||"any")+" } "+t.description;return t.default&&(e+=" 默认值="+t.default),t.selectable&&(e+=" 可选值="+t.selectable),e}function _(n,t){let e=Object.assign({},n);p("change",e,t)}let u;function h(){clearTimeout(u),u=setTimeout(()=>{f()},400)}return s.watch(()=>l.name,()=>{r.value=[],s.nextTick(()=>{h()})},{immediate:!0}),(n,t)=>r.value&&r.value.length>0?(s.openBlock(),s.createElementBlock("div",k,[s.createVNode(V,{refresh:m.value,modelValue:c.value,selects:a.value,list:r.value,name:l.name,onQuery:_},null,8,["refresh","modelValue","selects","list","name"])])):s.createCommentVNode("",!0)}});module.exports=x;
@@ -1,75 +1,74 @@
1
- import { defineComponent as T, ref as a, watch as k, nextTick as x, createElementBlock as j, createCommentVNode as B, openBlock as C, createVNode as E } from "vue";
2
- import N from "./retrie/index.vue.js";
3
- import { getSpecType as S } from "./code.js";
4
- const w = {
1
+ import { defineComponent as v, ref as n, watch as T, nextTick as k, createElementBlock as x, createCommentVNode as j, openBlock as B, createVNode as C } from "vue";
2
+ import E from "./retrie/index.vue.js";
3
+ import { getSpecType as N } from "./code.js";
4
+ const S = {
5
5
  key: 0,
6
6
  class: "set-props"
7
- }, R = /* @__PURE__ */ T({
7
+ }, Q = /* @__PURE__ */ v({
8
8
  __name: "set-props",
9
9
  props: {
10
10
  name: String,
11
11
  list: Array
12
12
  },
13
13
  emits: ["change"],
14
- setup(u, { emit: m }) {
15
- const r = u, p = m, c = a({}), f = a(0), o = a({}), n = a([]);
16
- function d() {
17
- var e;
18
- o.value = {};
19
- const l = [];
20
- (e = r.list) == null || e.forEach((t) => {
21
- let s = t.name;
22
- if (s.includes(".") ? s = "" : s = (s.split("/")[0] || "").trim(), s) {
23
- o.value[s] = (t.default || "").trim();
24
- const { arr: b, type: g, dataType: V } = S(t);
25
- c.value[s] = b;
26
- let v = {
27
- label: h(s, t),
28
- prop: s,
29
- type: g,
30
- dataType: V,
31
- select: s
14
+ setup(i, { emit: u }) {
15
+ const a = i, m = u, o = n({}), p = n(0), r = n({}), l = n([]);
16
+ function f() {
17
+ r.value = {};
18
+ const s = [];
19
+ a.list?.forEach((t) => {
20
+ let e = t.name;
21
+ if (e.includes(".") ? e = "" : e = (e.split("/")[0] || "").trim(), e) {
22
+ r.value[e] = (t.default || "").trim();
23
+ const { arr: y, type: b, dataType: g } = N(t);
24
+ o.value[e] = y;
25
+ let V = {
26
+ label: d(e, t),
27
+ prop: e,
28
+ type: b,
29
+ dataType: g,
30
+ select: e
32
31
  };
33
- l.push(v);
32
+ s.push(V);
34
33
  }
35
- }), n.value = l;
34
+ }), l.value = s;
36
35
  }
37
- function h(l, e) {
38
- let t = l + ": { " + (e.type || "any") + " } " + e.description;
39
- return e.default && (t += " 默认值=" + e.default), e.selectable && (t += " 可选值=" + e.selectable), t;
36
+ function d(s, t) {
37
+ let e = s + ": { " + (t.type || "any") + " } " + t.description;
38
+ return t.default && (e += " 默认值=" + t.default), t.selectable && (e += " 可选值=" + t.selectable), e;
40
39
  }
41
- function _(l, e) {
42
- let t = Object.assign({}, l);
43
- p("change", t, e);
40
+ function h(s, t) {
41
+ let e = Object.assign({}, s);
42
+ m("change", e, t);
44
43
  }
45
- let i;
46
- function y() {
47
- clearTimeout(i), i = setTimeout(() => {
48
- d();
44
+ let c;
45
+ function _() {
46
+ clearTimeout(c), c = setTimeout(() => {
47
+ f();
49
48
  }, 400);
50
49
  }
51
- return k(
52
- () => r.name,
50
+ return T(
51
+ () => a.name,
53
52
  () => {
54
- n.value = [], x(() => {
55
- y();
53
+ l.value = [], k(() => {
54
+ _();
56
55
  });
57
56
  },
58
57
  {
59
58
  immediate: !0
60
59
  }
61
- ), (l, e) => n.value && n.value.length > 0 ? (C(), j("div", w, [
62
- E(N, {
63
- refresh: f.value,
64
- modelValue: o.value,
65
- selects: c.value,
66
- list: n.value,
67
- name: r.name,
68
- onQuery: _
60
+ ), (s, t) => l.value && l.value.length > 0 ? (B(), x("div", S, [
61
+ C(E, {
62
+ refresh: p.value,
63
+ modelValue: r.value,
64
+ selects: o.value,
65
+ list: l.value,
66
+ name: a.name,
67
+ onQuery: h
69
68
  }, null, 8, ["refresh", "modelValue", "selects", "list", "name"])
70
- ])) : B("", !0);
69
+ ])) : j("", !0);
71
70
  }
72
71
  });
73
72
  export {
74
- R as default
73
+ Q as default
75
74
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.cjs"),n={components:[]};function o(e){return t.mergeObject(n,e,2)}function r(e){return n[e]}exports.getConfig=r;exports.userConfig=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.cjs"),n={components:[]};function o(e){return t.mergeObject(n,e,2)}function r(e){return n[e]}exports.getConfig=r;exports.userConfig=o;
@@ -59,12 +59,19 @@ export interface ExampleObj {
59
59
  examplesRaw?: Globs;
60
60
  md?: string;
61
61
  }
62
+ export type Resolve = {
63
+ find: string | RegExp;
64
+ replacement: string;
65
+ } | {
66
+ [find: string]: string;
67
+ };
62
68
  export interface Config {
63
69
  router?: string;
64
70
  redirect?: boolean;
65
71
  useparam?: boolean;
72
+ resolve?: Resolve[];
66
73
  components: Array<Components>;
67
74
  example?: ExampleObj;
68
75
  }
69
76
  export declare function userConfig(defaultConfig: Config): Config;
70
- export declare function getConfig(key: keyof Config): string | boolean | ExampleObj | Components[] | undefined;
77
+ export declare function getConfig(key: keyof Config): string | boolean | ExampleObj | Resolve[] | Components[] | undefined;
@@ -1,4 +1,4 @@
1
- import { mergeObject as t } from "../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js";
1
+ import { mergeObject as t } from "../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js";
2
2
  const o = {
3
3
  components: []
4
4
  };
@@ -0,0 +1,6 @@
1
+ import { Directive } from '../../../vue/dist/vue.esm-bundler.js';
2
+ /**
3
+ * Adjust
4
+ */
5
+ declare const _default: Directive;
6
+ export default _default;