@fangzhongya/vue-archive 0.0.6 → 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 +19 -20
  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
@@ -5,7 +5,7 @@ import E from "./set-code.vue.js";
5
5
  import O from "./set-expose.vue.js";
6
6
  import $ from "./set-slot.vue.js";
7
7
  import { getPropsValue as D, getEmitsValue as w, getExposeValue as U, getSlotValue as k } from "../../utils/props.js";
8
- import { firstUpper as h } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js";
8
+ import { firstUpper as h } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js";
9
9
  const K = g({
10
10
  /**
11
11
  * @props {Stinrg} value 插入数据
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),C=require("../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-APKFW4LU.cjs"),v=require("../../util.cjs"),x={class:"form-select"},A=["value","disabled"],j={class:"form-select-list"},L={key:0,class:"form-select-list-div"},T=["onClick"],q={key:1,class:"no-data"},F=e.defineComponent({__name:"index",props:{modelValue:{type:null},dataType:{type:[String,Array]},disabled:Boolean,list:{type:Array},config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value","change"],setup(h,{emit:g}){const o=h,y=g,u=e.ref(),a=e.ref(!1),c=e.ref(!1),r=e.ref([]),k=e.computed(()=>r.value.map(t=>d(t)).join(",")),p=e.computed(()=>{let t=o.dataType||"";return(v.getSonType(t)||[])[1]});e.watch(()=>o.modelValue,()=>{B()},{immediate:!0});function _(t=[]){return p.value=="string"?t.map(n=>v.getString(n)):p.value=="number"?t.map(n=>{let l=Number(n);return isNaN(l)&&(l=0),l}):t}function b(t){return new Function("",`{ return ${t}}`)}function B(){r.value=[];let t=o.modelValue,n=[];const l=b(t);if(l instanceof Array&&(n=l),o.list)for(let i=0;i<o.list.length;i++){const f=o.list[i];n.includes(s(f))&&r.value.push(f)}m()}function d(t){var l;let n=(l=o.config)==null?void 0:l.label;return n&&typeof t=="object"&&t?t[n]:t}function s(t){var l;let n=(l=o.config)==null?void 0:l.prop;return n&&typeof t=="object"&&t?t[n]:t}function w(t){return r.value.map(n=>s(n)).includes(s(t))}function V(){o.disabled||(a.value=!0)}function E(){c.value||(a.value=!1)}function M(){c.value=!0}function S(){c.value=!1}function N(t){u.value&&u.value.focus(),r.value=C.toggleArray(r.value,t,o.config.prop),m()}function m(){let t=_(r.value.map(n=>s(n)));y("value",t,JSON.stringify(t))}return(t,n)=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("input",{value:k.value,readonly:"",placeholder:"请选择",type:"text",disabled:o.disabled,ref_key:"refInput",ref:u,onClick:e.withModifiers(V,["stop"]),onBlur:e.withModifiers(E,["stop"])},null,40,A),e.createElementVNode("div",{onMousemove:e.withModifiers(M,["stop"]),onMouseout:e.withModifiers(S,["stop"]),class:"form-select-box"},[e.withDirectives(e.createElementVNode("div",j,[o.list&&o.list.length>0?(e.openBlock(),e.createElementBlock("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.list,(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-select-list-li",{active:w(l)}]),onClick:e.withModifiers(f=>N(l),["stop"])},[e.createElementVNode("span",null,e.toDisplayString(d(l)),1)],10,T))),256))])):(e.openBlock(),e.createElementBlock("div",q,"暂无数据"))],512),[[e.vShow,a.value]])],32)]))}});module.exports=F;
1
+ "use strict";const e=require("vue"),C=require("../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-APKFW4LU.cjs"),v=require("../../util.cjs"),x={class:"form-select"},A=["value","disabled"],j={class:"form-select-list"},L={key:0,class:"form-select-list-div"},T=["onClick"],q={key:1,class:"no-data"},F=e.defineComponent({__name:"index",props:{modelValue:{type:null},dataType:{type:[String,Array]},disabled:Boolean,list:{type:Array},config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value","change"],setup(h,{emit:g}){const l=h,y=g,u=e.ref(),a=e.ref(!1),c=e.ref(!1),r=e.ref([]),k=e.computed(()=>r.value.map(t=>d(t)).join(",")),p=e.computed(()=>{let t=l.dataType||"";return(v.getSonType(t)||[])[1]});e.watch(()=>l.modelValue,()=>{B()},{immediate:!0});function _(t=[]){return p.value=="string"?t.map(n=>v.getString(n)):p.value=="number"?t.map(n=>{let o=Number(n);return isNaN(o)&&(o=0),o}):t}function b(t){return new Function("",`{ return ${t}}`)}function B(){r.value=[];let t=l.modelValue,n=[];const o=b(t);if(o instanceof Array&&(n=o),l.list)for(let s=0;s<l.list.length;s++){const f=l.list[s];n.includes(i(f))&&r.value.push(f)}m()}function d(t){let n=l.config?.label;return n&&typeof t=="object"&&t?t[n]:t}function i(t){let n=l.config?.prop;return n&&typeof t=="object"&&t?t[n]:t}function w(t){return r.value.map(n=>i(n)).includes(i(t))}function V(){l.disabled||(a.value=!0)}function E(){c.value||(a.value=!1)}function M(){c.value=!0}function S(){c.value=!1}function N(t){u.value&&u.value.focus(),r.value=C.toggleArray(r.value,t,l.config.prop),m()}function m(){let t=_(r.value.map(n=>i(n)));y("value",t,JSON.stringify(t))}return(t,n)=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("input",{value:k.value,readonly:"",placeholder:"请选择",type:"text",disabled:l.disabled,ref_key:"refInput",ref:u,onClick:e.withModifiers(V,["stop"]),onBlur:e.withModifiers(E,["stop"])},null,40,A),e.createElementVNode("div",{onMousemove:e.withModifiers(M,["stop"]),onMouseout:e.withModifiers(S,["stop"]),class:"form-select-box"},[e.withDirectives(e.createElementVNode("div",j,[l.list&&l.list.length>0?(e.openBlock(),e.createElementBlock("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.list,(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-select-list-li",{active:w(o)}]),onClick:e.withModifiers(f=>N(o),["stop"])},[e.createElementVNode("span",null,e.toDisplayString(d(o)),1)],10,T))),256))])):(e.openBlock(),e.createElementBlock("div",q,"暂无数据"))],512),[[e.vShow,a.value]])],32)]))}});module.exports=F;
@@ -1,5 +1,5 @@
1
- import { defineComponent as L, ref as c, computed as _, watch as z, createElementBlock as s, openBlock as i, createElementVNode as f, withModifiers as u, withDirectives as D, Fragment as E, renderList as F, normalizeClass as I, toDisplayString as O, vShow as $ } from "vue";
2
- import { toggleArray as J } from "../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.8-77/node_modules/@fangzhongya/utils/dist/chunk-APKFW4LU.js";
1
+ import { defineComponent as L, ref as c, computed as _, watch as z, createElementBlock as r, openBlock as s, createElementVNode as f, withModifiers as i, withDirectives as D, Fragment as E, renderList as F, normalizeClass as I, toDisplayString as O, vShow as $ } from "vue";
2
+ import { toggleArray as J } from "../../../../../node_modules/.pnpm/@fangzhongya_utils@0.0.24/node_modules/@fangzhongya/utils/dist/chunk-APKFW4LU.js";
3
3
  import { getSonType as P, getString as q } from "../../util.js";
4
4
  const G = { class: "form-select" }, H = ["value", "disabled"], K = { class: "form-select-list" }, Q = {
5
5
  key: 0,
@@ -30,12 +30,12 @@ const G = { class: "form-select" }, H = ["value", "disabled"], K = { class: "for
30
30
  },
31
31
  emits: ["value", "change"],
32
32
  setup(b, { emit: k }) {
33
- const l = b, S = k, p = c(), d = c(!1), m = c(!1), o = c([]), V = _(() => o.value.map((e) => y(e)).join(",")), g = _(() => {
34
- let e = l.dataType || "";
33
+ const n = b, S = k, p = c(), d = c(!1), m = c(!1), o = c([]), V = _(() => o.value.map((e) => y(e)).join(",")), g = _(() => {
34
+ let e = n.dataType || "";
35
35
  return (P(e) || [])[1];
36
36
  });
37
37
  z(
38
- () => l.modelValue,
38
+ () => n.modelValue,
39
39
  () => {
40
40
  x();
41
41
  },
@@ -45,8 +45,8 @@ const G = { class: "form-select" }, H = ["value", "disabled"], K = { class: "for
45
45
  );
46
46
  function w(e = []) {
47
47
  return g.value == "string" ? e.map((t) => q(t)) : g.value == "number" ? e.map((t) => {
48
- let n = Number(t);
49
- return isNaN(n) && (n = 0), n;
48
+ let l = Number(t);
49
+ return isNaN(l) && (l = 0), l;
50
50
  }) : e;
51
51
  }
52
52
  function C(e) {
@@ -54,30 +54,28 @@ const G = { class: "form-select" }, H = ["value", "disabled"], K = { class: "for
54
54
  }
55
55
  function x() {
56
56
  o.value = [];
57
- let e = l.modelValue, t = [];
58
- const n = C(e);
59
- if (n instanceof Array && (t = n), l.list)
60
- for (let r = 0; r < l.list.length; r++) {
61
- const v = l.list[r];
62
- t.includes(a(v)) && o.value.push(v);
57
+ let e = n.modelValue, t = [];
58
+ const l = C(e);
59
+ if (l instanceof Array && (t = l), n.list)
60
+ for (let a = 0; a < n.list.length; a++) {
61
+ const v = n.list[a];
62
+ t.includes(u(v)) && o.value.push(v);
63
63
  }
64
64
  h();
65
65
  }
66
66
  function y(e) {
67
- var n;
68
- let t = (n = l.config) == null ? void 0 : n.label;
67
+ let t = n.config?.label;
69
68
  return t && typeof e == "object" && e ? e[t] : e;
70
69
  }
71
- function a(e) {
72
- var n;
73
- let t = (n = l.config) == null ? void 0 : n.prop;
70
+ function u(e) {
71
+ let t = n.config?.prop;
74
72
  return t && typeof e == "object" && e ? e[t] : e;
75
73
  }
76
74
  function A(e) {
77
- return o.value.map((t) => a(t)).includes(a(e));
75
+ return o.value.map((t) => u(t)).includes(u(e));
78
76
  }
79
77
  function B() {
80
- l.disabled || (d.value = !0);
78
+ n.disabled || (d.value = !0);
81
79
  }
82
80
  function M() {
83
81
  m.value || (d.value = !1);
@@ -89,42 +87,42 @@ const G = { class: "form-select" }, H = ["value", "disabled"], K = { class: "for
89
87
  m.value = !1;
90
88
  }
91
89
  function T(e) {
92
- p.value && p.value.focus(), o.value = J(o.value, e, l.config.prop), h();
90
+ p.value && p.value.focus(), o.value = J(o.value, e, n.config.prop), h();
93
91
  }
94
92
  function h() {
95
93
  let e = w(
96
- o.value.map((t) => a(t))
94
+ o.value.map((t) => u(t))
97
95
  );
98
96
  S("value", e, JSON.stringify(e));
99
97
  }
100
- return (e, t) => (i(), s("div", G, [
98
+ return (e, t) => (s(), r("div", G, [
101
99
  f("input", {
102
100
  value: V.value,
103
101
  readonly: "",
104
102
  placeholder: "请选择",
105
103
  type: "text",
106
- disabled: l.disabled,
104
+ disabled: n.disabled,
107
105
  ref_key: "refInput",
108
106
  ref: p,
109
- onClick: u(B, ["stop"]),
110
- onBlur: u(M, ["stop"])
107
+ onClick: i(B, ["stop"]),
108
+ onBlur: i(M, ["stop"])
111
109
  }, null, 40, H),
112
110
  f("div", {
113
- onMousemove: u(N, ["stop"]),
114
- onMouseout: u(j, ["stop"]),
111
+ onMousemove: i(N, ["stop"]),
112
+ onMouseout: i(j, ["stop"]),
115
113
  class: "form-select-box"
116
114
  }, [
117
115
  D(f("div", K, [
118
- l.list && l.list.length > 0 ? (i(), s("div", Q, [
119
- (i(!0), s(E, null, F(l.list, (n, r) => (i(), s("div", {
116
+ n.list && n.list.length > 0 ? (s(), r("div", Q, [
117
+ (s(!0), r(E, null, F(n.list, (l, a) => (s(), r("div", {
120
118
  class: I(["form-select-list-li", {
121
- active: A(n)
119
+ active: A(l)
122
120
  }]),
123
- onClick: u((v) => T(n), ["stop"])
121
+ onClick: i((v) => T(l), ["stop"])
124
122
  }, [
125
- f("span", null, O(y(n)), 1)
123
+ f("span", null, O(y(l)), 1)
126
124
  ], 10, R))), 256))
127
- ])) : (i(), s("div", U, "暂无数据"))
125
+ ])) : (s(), r("div", U, "暂无数据"))
128
126
  ], 512), [
129
127
  [$, d.value]
130
128
  ])
@@ -1 +1 @@
1
- "use strict";const t=require("vue"),g=require("../index.vue.cjs"),y=t.defineComponent({__name:"index",props:{getRef:{type:Function},name:String,value:{type:Object}},setup(m){const s=m,o=t.ref(""),c=t.ref(""),i=t.ref([]),v=t.computed(()=>{i.value=[];const e=s.value;if(e&&e.name){let n=(e.selectable+"").trim();if(o.value=e.name+": "+e.description+" 入参=("+n+") 返回值: "+e.type,n)return n.split(",").map(l=>{let u=l.split(":"),a=u[0];i.value.push(a);let p=f(u[1]);return{label:l,prop:a,type:p[0],dataType:p}})}return[]});function f(e){if(e){e=(e+"").trim().toLowerCase();let r=/^\<([a-z|\<|\>|\|]+)\>/.exec(e);return r&&r.length>0?r[1].split("|"):["any"]}else return["any"]}function d(e){var l;let n=s.getRef?s.getRef():void 0,r=(l=s.value)==null?void 0:l.name;if(r){let u=i.value.map(a=>e[a]);if(n&&n[r]){let a=n[r](...u);c.value=JSON.stringify(a)}}else console.log("请选择方法")}return(e,n)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",null,t.toDisplayString(o.value||"请选择方法"),1),t.createVNode(g,{list:v.value,name:s.name,queryName:"调用",onQuery:d},null,8,["list","name"]),t.createElementVNode("div",null,"返回值:"+t.toDisplayString(c.value),1)]))}});module.exports=y;
1
+ "use strict";const t=require("vue"),g=require("../index.vue.cjs"),y=t.defineComponent({__name:"index",props:{getRef:{type:Function},name:String,value:{type:Object}},setup(m){const a=m,i=t.ref(""),o=t.ref(""),u=t.ref([]),v=t.computed(()=>{u.value=[];const e=a.value;if(e&&e.name){let n=(e.selectable+"").trim();if(i.value=e.name+": "+e.description+" 入参=("+n+") 返回值: "+e.type,n)return n.split(",").map(s=>{let l=s.split(":"),c=l[0];u.value.push(c);let p=f(l[1]);return{label:s,prop:c,type:p[0],dataType:p}})}return[]});function f(e){if(e){e=(e+"").trim().toLowerCase();let r=/^\<([a-z|\<|\>|\|]+)\>/.exec(e);return r&&r.length>0?r[1].split("|"):["any"]}else return["any"]}function d(e){let n=a.getRef?a.getRef():void 0,r=a.value?.name;if(r){let s=u.value.map(l=>e[l]);if(n&&n[r]){let l=n[r](...s);o.value=JSON.stringify(l)}}else console.log("请选择方法")}return(e,n)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",null,t.toDisplayString(i.value||"请选择方法"),1),t.createVNode(g,{list:v.value,name:a.name,queryName:"调用",onQuery:d},null,8,["list","name"]),t.createElementVNode("div",null,"返回值:"+t.toDisplayString(o.value),1)]))}});module.exports=y;
@@ -1,4 +1,4 @@
1
- import { defineComponent as _, ref as i, computed as b, createElementBlock as x, openBlock as N, createElementVNode as m, createVNode as h, toDisplayString as f } from "vue";
1
+ import { defineComponent as _, ref as s, computed as b, createElementBlock as x, openBlock as N, createElementVNode as m, createVNode as h, toDisplayString as f } from "vue";
2
2
  import R from "../index.vue.js";
3
3
  const B = /* @__PURE__ */ _({
4
4
  __name: "index",
@@ -12,19 +12,19 @@ const B = /* @__PURE__ */ _({
12
12
  }
13
13
  },
14
14
  setup(v) {
15
- const r = v, u = i(""), c = i(""), s = i([]), d = b(() => {
16
- s.value = [];
17
- const e = r.value;
15
+ const a = v, i = s(""), u = s(""), o = s([]), d = b(() => {
16
+ o.value = [];
17
+ const e = a.value;
18
18
  if (e && e.name) {
19
19
  let t = (e.selectable + "").trim();
20
- if (u.value = e.name + ": " + e.description + " 入参=(" + t + ") 返回值: " + e.type, t)
21
- return t.split(",").map((n) => {
22
- let o = n.split(":"), a = o[0];
23
- s.value.push(a);
24
- let p = g(o[1]);
20
+ if (i.value = e.name + ": " + e.description + " 入参=(" + t + ") 返回值: " + e.type, t)
21
+ return t.split(",").map((r) => {
22
+ let n = r.split(":"), c = n[0];
23
+ o.value.push(c);
24
+ let p = g(n[1]);
25
25
  return {
26
- label: n,
27
- prop: a,
26
+ label: r,
27
+ prop: c,
28
28
  type: p[0],
29
29
  dataType: p
30
30
  };
@@ -41,26 +41,25 @@ const B = /* @__PURE__ */ _({
41
41
  return ["any"];
42
42
  }
43
43
  function y(e) {
44
- var n;
45
- let t = r.getRef ? r.getRef() : void 0, l = (n = r.value) == null ? void 0 : n.name;
44
+ let t = a.getRef ? a.getRef() : void 0, l = a.value?.name;
46
45
  if (l) {
47
- let o = s.value.map((a) => e[a]);
46
+ let r = o.value.map((n) => e[n]);
48
47
  if (t && t[l]) {
49
- let a = t[l](...o);
50
- c.value = JSON.stringify(a);
48
+ let n = t[l](...r);
49
+ u.value = JSON.stringify(n);
51
50
  }
52
51
  } else
53
52
  console.log("请选择方法");
54
53
  }
55
54
  return (e, t) => (N(), x("div", null, [
56
- m("div", null, f(u.value || "请选择方法"), 1),
55
+ m("div", null, f(i.value || "请选择方法"), 1),
57
56
  h(R, {
58
57
  list: d.value,
59
- name: r.name,
58
+ name: a.name,
60
59
  queryName: "调用",
61
60
  onQuery: y
62
61
  }, null, 8, ["list", "name"]),
63
- m("div", null, "返回值:" + f(c.value), 1)
62
+ m("div", null, "返回值:" + f(u.value), 1)
64
63
  ]));
65
64
  }
66
65
  });
@@ -1 +1 @@
1
- "use strict";const o=require("vue"),F=require("../function/index.vue.cjs"),G=require("../object/index.vue.cjs"),H=require("../array/index.vue.cjs"),I=require("../select/index.vue.cjs");;/* empty css */const J=require("../choice/index.vue.cjs");;/* empty css */const K=require("../boolean/index.vue.cjs"),L=require("../string/index.vue.cjs"),M=require("../number/index.vue.cjs"),N=require("../other/index.vue.cjs"),P=o.defineComponent({__name:"index",props:{selects:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}},modelValue:{type:null}},emits:["change"],setup(w,{emit:A}){const e=w,s=o.ref(!1),D=A;function a(l,...t){return l?typeof l.select=="string"?e.selects[l.select]:typeof l.select=="function"?l.select(l,...t):l.select:[]}function i(l,t){var c;const d=(c=e.config)==null?void 0:c.prop;D("change",d,l,t)}function n(l){s.value=l}return(l,t)=>{var d,c,u,r,p,f,g,_,y,m,b,k,V,T,B,v,q,x,$,h,j,E,C,O,z,S;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["form-item",{error:s.value}])},[((d=e.config)==null?void 0:d.type)=="select"?(o.openBlock(),o.createBlock(I,{key:0,modelValue:e.modelValue,class:"form-inp",disabled:(c=e.config)==null?void 0:c.disabled,dataType:e.config.dataType,list:a(e.config),config:(u=e.config)==null?void 0:u.config,onError:n,onValue:i},null,8,["modelValue","disabled","dataType","list","config"])):((r=e.config)==null?void 0:r.type)=="choice"?(o.openBlock(),o.createBlock(J,{key:1,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,disabled:(p=e.config)==null?void 0:p.disabled,list:a(e.config),config:(f=e.config)==null?void 0:f.config,onError:n,onValue:i},null,8,["modelValue","dataType","disabled","list","config"])):((g=e.config)==null?void 0:g.type)=="boolean"?(o.openBlock(),o.createBlock(K,{key:2,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,disabled:(_=e.config)==null?void 0:_.disabled,config:(y=e.config)==null?void 0:y.config,onError:n,onValue:i},null,8,["modelValue","dataType","disabled","config"])):((m=e.config)==null?void 0:m.type)=="string"?(o.openBlock(),o.createBlock(L,{key:3,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,disabled:(b=e.config)==null?void 0:b.disabled,config:(k=e.config)==null?void 0:k.config,onError:n,onValue:i},null,8,["modelValue","dataType","disabled","config"])):((V=e.config)==null?void 0:V.type)=="number"?(o.openBlock(),o.createBlock(M,{key:4,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,disabled:(T=e.config)==null?void 0:T.disabled,config:(B=e.config)==null?void 0:B.config,onError:n,onValue:i},null,8,["modelValue","dataType","disabled","config"])):((v=e.config)==null?void 0:v.type)=="object"?(o.openBlock(),o.createBlock(G,{key:5,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,disabled:(q=e.config)==null?void 0:q.disabled,config:(x=e.config)==null?void 0:x.config,onError:n,onValue:i},null,8,["modelValue","dataType","disabled","config"])):(($=e.config)==null?void 0:$.type)=="array"?(o.openBlock(),o.createBlock(H,{key:6,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,disabled:(h=e.config)==null?void 0:h.disabled,config:(j=e.config)==null?void 0:j.config,onError:n,onValue:i},null,8,["modelValue","dataType","disabled","config"])):((E=e.config)==null?void 0:E.type)=="function"?(o.openBlock(),o.createBlock(F,{key:7,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,list:a(e.config),disabled:(C=e.config)==null?void 0:C.disabled,config:(O=e.config)==null?void 0:O.config,onError:n,onValue:i},null,8,["modelValue","dataType","list","disabled","config"])):(o.openBlock(),o.createBlock(N,{key:8,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,list:a(e.config),disabled:(z=e.config)==null?void 0:z.disabled,config:(S=e.config)==null?void 0:S.config,onError:n,onValue:i},null,8,["modelValue","dataType","list","disabled","config"]))],2)}}});module.exports=P;
1
+ "use strict";const o=require("vue"),p=require("../function/index.vue.cjs"),f=require("../object/index.vue.cjs"),g=require("../array/index.vue.cjs"),_=require("../select/index.vue.cjs");;/* empty css */const y=require("../choice/index.vue.cjs");;/* empty css */const m=require("../boolean/index.vue.cjs"),b=require("../string/index.vue.cjs"),k=require("../number/index.vue.cjs"),V=require("../other/index.vue.cjs"),T=o.defineComponent({__name:"index",props:{selects:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}},modelValue:{type:null}},emits:["change"],setup(d,{emit:s}){const e=d,t=o.ref(!1),u=s;function c(l,...a){return l?typeof l.select=="string"?e.selects[l.select]:typeof l.select=="function"?l.select(l,...a):l.select:[]}function i(l,a){const r=e.config?.prop;u("change",r,l,a)}function n(l){t.value=l}return(l,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["form-item",{error:t.value}])},[e.config?.type=="select"?(o.openBlock(),o.createBlock(_,{key:0,modelValue:e.modelValue,class:"form-inp",disabled:e.config?.disabled,dataType:e.config.dataType,list:c(e.config),config:e.config?.config,onError:n,onValue:i},null,8,["modelValue","disabled","dataType","list","config"])):e.config?.type=="choice"?(o.openBlock(),o.createBlock(y,{key:1,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,disabled:e.config?.disabled,list:c(e.config),config:e.config?.config,onError:n,onValue:i},null,8,["modelValue","dataType","disabled","list","config"])):e.config?.type=="boolean"?(o.openBlock(),o.createBlock(m,{key:2,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,disabled:e.config?.disabled,config:e.config?.config,onError:n,onValue:i},null,8,["modelValue","dataType","disabled","config"])):e.config?.type=="string"?(o.openBlock(),o.createBlock(b,{key:3,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,disabled:e.config?.disabled,config:e.config?.config,onError:n,onValue:i},null,8,["modelValue","dataType","disabled","config"])):e.config?.type=="number"?(o.openBlock(),o.createBlock(k,{key:4,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,disabled:e.config?.disabled,config:e.config?.config,onError:n,onValue:i},null,8,["modelValue","dataType","disabled","config"])):e.config?.type=="object"?(o.openBlock(),o.createBlock(f,{key:5,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,disabled:e.config?.disabled,config:e.config?.config,onError:n,onValue:i},null,8,["modelValue","dataType","disabled","config"])):e.config?.type=="array"?(o.openBlock(),o.createBlock(g,{key:6,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,disabled:e.config?.disabled,config:e.config?.config,onError:n,onValue:i},null,8,["modelValue","dataType","disabled","config"])):e.config?.type=="function"?(o.openBlock(),o.createBlock(p,{key:7,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,list:c(e.config),disabled:e.config?.disabled,config:e.config?.config,onError:n,onValue:i},null,8,["modelValue","dataType","list","disabled","config"])):(o.openBlock(),o.createBlock(V,{key:8,modelValue:e.modelValue,class:"form-inp",dataType:e.config.dataType,list:c(e.config),disabled:e.config?.disabled,config:e.config?.config,onError:n,onValue:i},null,8,["modelValue","dataType","list","disabled","config"]))],2))}});module.exports=T;
@@ -1,16 +1,16 @@
1
- import { defineComponent as H, ref as I, createElementBlock as J, openBlock as i, normalizeClass as K, createBlock as n } from "vue";
2
- import L from "../function/index.vue.js";
3
- import M from "../object/index.vue.js";
4
- import N from "../array/index.vue.js";
5
- import P from "../select/index.vue.js";
1
+ import { defineComponent as g, ref as r, createElementBlock as u, openBlock as i, normalizeClass as y, createBlock as n } from "vue";
2
+ import b from "../function/index.vue.js";
3
+ import V from "../object/index.vue.js";
4
+ import T from "../array/index.vue.js";
5
+ import _ from "../select/index.vue.js";
6
6
  /* empty css */
7
- import Q from "../choice/index.vue.js";
7
+ import k from "../choice/index.vue.js";
8
8
  /* empty css */
9
- import R from "../boolean/index.vue.js";
10
- import U from "../string/index.vue.js";
11
- import W from "../number/index.vue.js";
12
- import X from "../other/index.vue.js";
13
- const te = /* @__PURE__ */ H({
9
+ import $ from "../boolean/index.vue.js";
10
+ import h from "../string/index.vue.js";
11
+ import j from "../number/index.vue.js";
12
+ import x from "../other/index.vue.js";
13
+ const H = /* @__PURE__ */ g({
14
14
  __name: "index",
15
15
  props: {
16
16
  /**
@@ -36,114 +36,110 @@ const te = /* @__PURE__ */ H({
36
36
  }
37
37
  },
38
38
  emits: ["change"],
39
- setup(D, { emit: F }) {
40
- const e = D, s = I(!1), G = F;
41
- function d(o, ...f) {
42
- return o ? typeof o.select == "string" ? e.selects[o.select] : typeof o.select == "function" ? o.select(o, ...f) : o.select : [];
39
+ setup(t, { emit: s }) {
40
+ const e = t, f = r(!1), m = s;
41
+ function c(o, ...d) {
42
+ return o ? typeof o.select == "string" ? e.selects[o.select] : typeof o.select == "function" ? o.select(o, ...d) : o.select : [];
43
43
  }
44
- function a(o, f) {
45
- var c;
46
- const t = (c = e.config) == null ? void 0 : c.prop;
47
- G("change", t, o, f);
44
+ function a(o, d) {
45
+ const p = e.config?.prop;
46
+ m("change", p, o, d);
48
47
  }
49
48
  function l(o) {
50
- s.value = o;
49
+ f.value = o;
51
50
  }
52
- return (o, f) => {
53
- var t, c, m, p, g, r, u, y, b, V, T, _, k, $, h, j, x, B, E, C, O, z, S, q, w, A;
54
- return i(), J("div", {
55
- class: K(["form-item", { error: s.value }])
56
- }, [
57
- ((t = e.config) == null ? void 0 : t.type) == "select" ? (i(), n(P, {
58
- key: 0,
59
- modelValue: e.modelValue,
60
- class: "form-inp",
61
- disabled: (c = e.config) == null ? void 0 : c.disabled,
62
- dataType: e.config.dataType,
63
- list: d(e.config),
64
- config: (m = e.config) == null ? void 0 : m.config,
65
- onError: l,
66
- onValue: a
67
- }, null, 8, ["modelValue", "disabled", "dataType", "list", "config"])) : ((p = e.config) == null ? void 0 : p.type) == "choice" ? (i(), n(Q, {
68
- key: 1,
69
- modelValue: e.modelValue,
70
- class: "form-inp",
71
- dataType: e.config.dataType,
72
- disabled: (g = e.config) == null ? void 0 : g.disabled,
73
- list: d(e.config),
74
- config: (r = e.config) == null ? void 0 : r.config,
75
- onError: l,
76
- onValue: a
77
- }, null, 8, ["modelValue", "dataType", "disabled", "list", "config"])) : ((u = e.config) == null ? void 0 : u.type) == "boolean" ? (i(), n(R, {
78
- key: 2,
79
- modelValue: e.modelValue,
80
- class: "form-inp",
81
- dataType: e.config.dataType,
82
- disabled: (y = e.config) == null ? void 0 : y.disabled,
83
- config: (b = e.config) == null ? void 0 : b.config,
84
- onError: l,
85
- onValue: a
86
- }, null, 8, ["modelValue", "dataType", "disabled", "config"])) : ((V = e.config) == null ? void 0 : V.type) == "string" ? (i(), n(U, {
87
- key: 3,
88
- modelValue: e.modelValue,
89
- class: "form-inp",
90
- dataType: e.config.dataType,
91
- disabled: (T = e.config) == null ? void 0 : T.disabled,
92
- config: (_ = e.config) == null ? void 0 : _.config,
93
- onError: l,
94
- onValue: a
95
- }, null, 8, ["modelValue", "dataType", "disabled", "config"])) : ((k = e.config) == null ? void 0 : k.type) == "number" ? (i(), n(W, {
96
- key: 4,
97
- modelValue: e.modelValue,
98
- class: "form-inp",
99
- dataType: e.config.dataType,
100
- disabled: ($ = e.config) == null ? void 0 : $.disabled,
101
- config: (h = e.config) == null ? void 0 : h.config,
102
- onError: l,
103
- onValue: a
104
- }, null, 8, ["modelValue", "dataType", "disabled", "config"])) : ((j = e.config) == null ? void 0 : j.type) == "object" ? (i(), n(M, {
105
- key: 5,
106
- modelValue: e.modelValue,
107
- class: "form-inp",
108
- dataType: e.config.dataType,
109
- disabled: (x = e.config) == null ? void 0 : x.disabled,
110
- config: (B = e.config) == null ? void 0 : B.config,
111
- onError: l,
112
- onValue: a
113
- }, null, 8, ["modelValue", "dataType", "disabled", "config"])) : ((E = e.config) == null ? void 0 : E.type) == "array" ? (i(), n(N, {
114
- key: 6,
115
- modelValue: e.modelValue,
116
- class: "form-inp",
117
- dataType: e.config.dataType,
118
- disabled: (C = e.config) == null ? void 0 : C.disabled,
119
- config: (O = e.config) == null ? void 0 : O.config,
120
- onError: l,
121
- onValue: a
122
- }, null, 8, ["modelValue", "dataType", "disabled", "config"])) : ((z = e.config) == null ? void 0 : z.type) == "function" ? (i(), n(L, {
123
- key: 7,
124
- modelValue: e.modelValue,
125
- class: "form-inp",
126
- dataType: e.config.dataType,
127
- list: d(e.config),
128
- disabled: (S = e.config) == null ? void 0 : S.disabled,
129
- config: (q = e.config) == null ? void 0 : q.config,
130
- onError: l,
131
- onValue: a
132
- }, null, 8, ["modelValue", "dataType", "list", "disabled", "config"])) : (i(), n(X, {
133
- key: 8,
134
- modelValue: e.modelValue,
135
- class: "form-inp",
136
- dataType: e.config.dataType,
137
- list: d(e.config),
138
- disabled: (w = e.config) == null ? void 0 : w.disabled,
139
- config: (A = e.config) == null ? void 0 : A.config,
140
- onError: l,
141
- onValue: a
142
- }, null, 8, ["modelValue", "dataType", "list", "disabled", "config"]))
143
- ], 2);
144
- };
51
+ return (o, d) => (i(), u("div", {
52
+ class: y(["form-item", { error: f.value }])
53
+ }, [
54
+ e.config?.type == "select" ? (i(), n(_, {
55
+ key: 0,
56
+ modelValue: e.modelValue,
57
+ class: "form-inp",
58
+ disabled: e.config?.disabled,
59
+ dataType: e.config.dataType,
60
+ list: c(e.config),
61
+ config: e.config?.config,
62
+ onError: l,
63
+ onValue: a
64
+ }, null, 8, ["modelValue", "disabled", "dataType", "list", "config"])) : e.config?.type == "choice" ? (i(), n(k, {
65
+ key: 1,
66
+ modelValue: e.modelValue,
67
+ class: "form-inp",
68
+ dataType: e.config.dataType,
69
+ disabled: e.config?.disabled,
70
+ list: c(e.config),
71
+ config: e.config?.config,
72
+ onError: l,
73
+ onValue: a
74
+ }, null, 8, ["modelValue", "dataType", "disabled", "list", "config"])) : e.config?.type == "boolean" ? (i(), n($, {
75
+ key: 2,
76
+ modelValue: e.modelValue,
77
+ class: "form-inp",
78
+ dataType: e.config.dataType,
79
+ disabled: e.config?.disabled,
80
+ config: e.config?.config,
81
+ onError: l,
82
+ onValue: a
83
+ }, null, 8, ["modelValue", "dataType", "disabled", "config"])) : e.config?.type == "string" ? (i(), n(h, {
84
+ key: 3,
85
+ modelValue: e.modelValue,
86
+ class: "form-inp",
87
+ dataType: e.config.dataType,
88
+ disabled: e.config?.disabled,
89
+ config: e.config?.config,
90
+ onError: l,
91
+ onValue: a
92
+ }, null, 8, ["modelValue", "dataType", "disabled", "config"])) : e.config?.type == "number" ? (i(), n(j, {
93
+ key: 4,
94
+ modelValue: e.modelValue,
95
+ class: "form-inp",
96
+ dataType: e.config.dataType,
97
+ disabled: e.config?.disabled,
98
+ config: e.config?.config,
99
+ onError: l,
100
+ onValue: a
101
+ }, null, 8, ["modelValue", "dataType", "disabled", "config"])) : e.config?.type == "object" ? (i(), n(V, {
102
+ key: 5,
103
+ modelValue: e.modelValue,
104
+ class: "form-inp",
105
+ dataType: e.config.dataType,
106
+ disabled: e.config?.disabled,
107
+ config: e.config?.config,
108
+ onError: l,
109
+ onValue: a
110
+ }, null, 8, ["modelValue", "dataType", "disabled", "config"])) : e.config?.type == "array" ? (i(), n(T, {
111
+ key: 6,
112
+ modelValue: e.modelValue,
113
+ class: "form-inp",
114
+ dataType: e.config.dataType,
115
+ disabled: e.config?.disabled,
116
+ config: e.config?.config,
117
+ onError: l,
118
+ onValue: a
119
+ }, null, 8, ["modelValue", "dataType", "disabled", "config"])) : e.config?.type == "function" ? (i(), n(b, {
120
+ key: 7,
121
+ modelValue: e.modelValue,
122
+ class: "form-inp",
123
+ dataType: e.config.dataType,
124
+ list: c(e.config),
125
+ disabled: e.config?.disabled,
126
+ config: e.config?.config,
127
+ onError: l,
128
+ onValue: a
129
+ }, null, 8, ["modelValue", "dataType", "list", "disabled", "config"])) : (i(), n(x, {
130
+ key: 8,
131
+ modelValue: e.modelValue,
132
+ class: "form-inp",
133
+ dataType: e.config.dataType,
134
+ list: c(e.config),
135
+ disabled: e.config?.disabled,
136
+ config: e.config?.config,
137
+ onError: l,
138
+ onValue: a
139
+ }, null, 8, ["modelValue", "dataType", "list", "disabled", "config"]))
140
+ ], 2));
145
141
  }
146
142
  });
147
143
  export {
148
- te as default
144
+ H as default
149
145
  };
@@ -1,3 +1,3 @@
1
- "use strict";const o=require("vue"),v=require("../input/index.vue.cjs"),f=require("../../util.cjs"),_={class:"form-function"},g=o.defineComponent({__name:"index",props:{modelValue:{type:null},list:{type:Array},config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value","error"],setup(p,{emit:m}){const u=p,a=o.computed(()=>{var e;return((e=u.list)==null?void 0:e.map(t=>t[u.config.prop]))||[]}),n=m,l=o.ref("");o.watch(()=>u.modelValue,()=>{let e=u.modelValue;l.value=i(e)||e},{immediate:!0});function d(e){return new Function(...a.value,e)}function c(){return`(${a.value.join(", ")}) `}function i(e){let t;if(e)try{let r=f.getFunctionFormat(e);if(r){t=r.body;const s=d(t);s(),n("value",s,c()+t),n("error",!1)}}catch(r){n("error",!0),console.log("error",r)}else t=`{
1
+ "use strict";const r=require("vue"),v=require("../input/index.vue.cjs"),f=require("../../util.cjs"),_={class:"form-function"},g=r.defineComponent({__name:"index",props:{modelValue:{type:null},list:{type:Array},config:{type:Object,default(){return{label:"label",prop:"prop"}}}},emits:["value","error"],setup(p,{emit:m}){const u=p,a=r.computed(()=>u.list?.map(e=>e[u.config.prop])||[]),n=m,l=r.ref("");r.watch(()=>u.modelValue,()=>{let e=u.modelValue;l.value=i(e)||e},{immediate:!0});function d(e){return new Function(...a.value,e)}function c(){return`(${a.value.join(", ")}) `}function i(e){let t;if(e)try{let o=f.getFunctionFormat(e);if(o){t=o.body;const s=d(t);s(),n("value",s,c()+t),n("error",!1)}}catch(o){n("error",!0),console.log("error",o)}else t=`{
2
2
 
3
- }`,n("value",void 0,c()+t),n("error",!1);return t}return(e,t)=>(o.openBlock(),o.createElementBlock("div",_,[o.createVNode(v,{modelValue:l.value,"onUpdate:modelValue":t[0]||(t[0]=r=>l.value=r),check:i},null,8,["modelValue"])]))}});module.exports=g;
3
+ }`,n("value",void 0,c()+t),n("error",!1);return t}return(e,t)=>(r.openBlock(),r.createElementBlock("div",_,[r.createVNode(v,{modelValue:l.value,"onUpdate:modelValue":t[0]||(t[0]=o=>l.value=o),check:i},null,8,["modelValue"])]))}});module.exports=g;
@@ -22,10 +22,7 @@ const j = { class: "form-function" }, w = /* @__PURE__ */ f({
22
22
  },
23
23
  emits: ["value", "error"],
24
24
  setup(m, { emit: p }) {
25
- const n = m, a = d(() => {
26
- var e;
27
- return ((e = n.list) == null ? void 0 : e.map((r) => r[n.config.prop])) || [];
28
- }), o = p, l = v("");
25
+ const n = m, a = d(() => n.list?.map((e) => e[n.config.prop]) || []), o = p, l = v("");
29
26
  _(
30
27
  () => n.modelValue,
31
28
  () => {
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),v=require("../../codemirror.cjs"),k=["value"],_=e.defineComponent({__name:"index",props:{modelValue:{type:null},check:{type:Function,default(){return""}}},emits:["update:modelValue"],setup(a,{emit:i}){const c=a,d=e.ref(!0),u=i,s=e.ref(),m=e.ref();function p(n){var r;const t=(r=n.target)==null?void 0:r.value;let o=c.check(t);o&&u("update:modelValue",o)}function f(n){const t=n.view,o=t.state.doc,r=o.toString().trim();let l=c.check(r);l&&(t.dispatch({changes:{from:0,to:o.length,insert:l}}),u("update:modelValue",l))}return e.onMounted(()=>{m.value=v.getJs(s.value,{onBlur:f})}),(n,t)=>d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"codemirror-div",ref_key:"refText",ref:s},null,512)):(e.openBlock(),e.createElementBlock("textarea",{key:1,rows:"5",value:c.modelValue,onBlur:p},null,40,k))}});module.exports=_;
1
+ "use strict";const e=require("vue"),v=require("../../codemirror.cjs"),k=["value"],_=e.defineComponent({__name:"index",props:{modelValue:{type:null},check:{type:Function,default(){return""}}},emits:["update:modelValue"],setup(s,{emit:a}){const r=s,i=e.ref(!0),l=a,u=e.ref(),d=e.ref();function m(n){const t=n.target?.value;let o=r.check(t);o&&l("update:modelValue",o)}function p(n){const t=n.view,o=t.state.doc,f=o.toString().trim();let c=r.check(f);c&&(t.dispatch({changes:{from:0,to:o.length,insert:c}}),l("update:modelValue",c))}return e.onMounted(()=>{d.value=v.getJs(u.value,{onBlur:p})}),(n,t)=>i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"codemirror-div",ref_key:"refText",ref:u},null,512)):(e.openBlock(),e.createElementBlock("textarea",{key:1,rows:"5",value:r.modelValue,onBlur:m},null,40,k))}});module.exports=_;
@@ -1,4 +1,4 @@
1
- import { defineComponent as h, ref as c, onMounted as k, createElementBlock as s, openBlock as i } from "vue";
1
+ import { defineComponent as h, ref as r, onMounted as k, createElementBlock as a, openBlock as s } from "vue";
2
2
  import { getJs as x } from "../../codemirror.js";
3
3
  const y = ["value"], V = /* @__PURE__ */ h({
4
4
  __name: "index",
@@ -14,39 +14,38 @@ const y = ["value"], V = /* @__PURE__ */ h({
14
14
  }
15
15
  },
16
16
  emits: ["update:modelValue"],
17
- setup(d, { emit: m }) {
18
- const l = d, p = c(!0), u = m, a = c(), f = c();
19
- function v(o) {
20
- var n;
21
- const e = (n = o.target) == null ? void 0 : n.value;
22
- let t = l.check(e);
23
- t && u("update:modelValue", t);
17
+ setup(i, { emit: d }) {
18
+ const n = i, m = r(!0), c = d, u = r(), p = r();
19
+ function f(o) {
20
+ const e = o.target?.value;
21
+ let t = n.check(e);
22
+ t && c("update:modelValue", t);
24
23
  }
25
- function _(o) {
26
- const e = o.view, t = e.state.doc, n = t.toString().trim();
27
- let r = l.check(n);
28
- r && (e.dispatch({
24
+ function v(o) {
25
+ const e = o.view, t = e.state.doc, _ = t.toString().trim();
26
+ let l = n.check(_);
27
+ l && (e.dispatch({
29
28
  changes: {
30
29
  from: 0,
31
30
  to: t.length,
32
- insert: r
31
+ insert: l
33
32
  }
34
- }), u("update:modelValue", r));
33
+ }), c("update:modelValue", l));
35
34
  }
36
35
  return k(() => {
37
- f.value = x(a.value, {
38
- onBlur: _
36
+ p.value = x(u.value, {
37
+ onBlur: v
39
38
  });
40
- }), (o, e) => p.value ? (i(), s("div", {
39
+ }), (o, e) => m.value ? (s(), a("div", {
41
40
  key: 0,
42
41
  class: "codemirror-div",
43
42
  ref_key: "refText",
44
- ref: a
45
- }, null, 512)) : (i(), s("textarea", {
43
+ ref: u
44
+ }, null, 512)) : (s(), a("textarea", {
46
45
  key: 1,
47
46
  rows: "5",
48
- value: l.modelValue,
49
- onBlur: v
47
+ value: n.modelValue,
48
+ onBlur: f
50
49
  }, null, 40, y));
51
50
  }
52
51
  });
@@ -1 +1 @@
1
- "use strict";const r=require("vue"),m={class:"form-number"},v=["value"],f=r.defineComponent({__name:"index",props:{modelValue:{type:null}},emits:["value","error"],setup(i,{emit:a}){const o=i,n=a,u=r.ref("");r.watch(()=>o.modelValue,()=>{let e=o.modelValue;u.value=l(e)||e},{immediate:!0});function c(e){var s;const t=(s=e.target)==null?void 0:s.value;l(t)}function l(e){if(e){const t=Number(e);if(isNaN(t))n("error",!0);else return n("value",t,JSON.stringify(t)),n("error",!1),t}else return n("value",void 0,JSON.stringify(0)),n("error",!1),0}return(e,t)=>(r.openBlock(),r.createElementBlock("div",m,[r.createElementVNode("input",{value:u.value,type:"number",onBlur:r.withModifiers(c,["stop"])},null,40,v)]))}});module.exports=f;
1
+ "use strict";const r=require("vue"),c={class:"form-number"},m=["value"],v=r.defineComponent({__name:"index",props:{modelValue:{type:null}},emits:["value","error"],setup(s,{emit:i}){const o=s,n=i,u=r.ref("");r.watch(()=>o.modelValue,()=>{let e=o.modelValue;u.value=l(e)||e},{immediate:!0});function a(e){const t=e.target?.value;l(t)}function l(e){if(e){const t=Number(e);if(isNaN(t))n("error",!0);else return n("value",t,JSON.stringify(t)),n("error",!1),t}else return n("value",void 0,JSON.stringify(0)),n("error",!1),0}return(e,t)=>(r.openBlock(),r.createElementBlock("div",c,[r.createElementVNode("input",{value:u.value,type:"number",onBlur:r.withModifiers(a,["stop"])},null,40,m)]))}});module.exports=v;