@cldemo/ui-kit 1.1.3 → 1.1.4

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 (165) hide show
  1. package/buildLibs/all/index.cjs +8 -8
  2. package/buildLibs/all/index.js +12157 -12048
  3. package/buildLibs/common/globalConfig.cjs +1 -1
  4. package/buildLibs/common/globalConfig.js +29 -15
  5. package/buildLibs/common/i18n/en.cjs +1 -1
  6. package/buildLibs/common/i18n/en.js +3 -1
  7. package/buildLibs/common/i18n/zh_CN.cjs +1 -1
  8. package/buildLibs/common/i18n/zh_CN.js +3 -1
  9. package/buildLibs/common/index.cjs +1 -1
  10. package/buildLibs/common/index.js +26 -24
  11. package/buildLibs/mobile/index.cjs +5 -5
  12. package/buildLibs/mobile/index.js +5902 -5852
  13. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CKoVf-v1.js → Index.vue_vue_type_script_setup_true_lang-88gNFuK4.js} +2 -2
  14. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-BQXxDHbe.js +254 -0
  15. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D0g1xGPL.js → Index.vue_vue_type_script_setup_true_lang-BR0S3Sfl.js} +3 -3
  16. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-RRUPY9bd.js → Index.vue_vue_type_script_setup_true_lang-BrfAVhNV.js} +153 -145
  17. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DdLVG0R0.js → Index.vue_vue_type_script_setup_true_lang-Bw_jRoEX.js} +67 -59
  18. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-C6Zd584S.js +2536 -0
  19. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BOcOO9-n.js → Index.vue_vue_type_script_setup_true_lang-CD66oCaI.js} +386 -375
  20. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CEBiLDTm.js +310 -0
  21. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-C0DgaU5I.js → Index.vue_vue_type_script_setup_true_lang-CRlBvcCg.js} +53 -47
  22. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DqZBB8fM.js → Index.vue_vue_type_script_setup_true_lang-CdYh3Pzs.js} +1 -1
  23. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-XiSSYx4X.js → Index.vue_vue_type_script_setup_true_lang-D7YeNBdk.js} +120 -113
  24. package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-DKMVQrVU.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-D9sq4n9i.js} +66 -60
  25. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CRKrLCa6.js → Index.vue_vue_type_script_setup_true_lang-DFeBj9IN.js} +209 -201
  26. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D7bJ5UAn.js → Index.vue_vue_type_script_setup_true_lang-DY3tZQZe.js} +63 -55
  27. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-D_73B6av.js +1533 -0
  28. package/buildLibs/modules/shared/{Validate.vue_vue_type_script_setup_true_lang-3s_3ut9M.js → Validate.vue_vue_type_script_setup_true_lang-hn1Tat7L.js} +102 -92
  29. package/buildLibs/types/All/index.d.ts +1 -1
  30. package/buildLibs/types/Common/globalConfig.d.ts +29 -0
  31. package/buildLibs/types/Common/globalTypes.d.ts +11 -0
  32. package/buildLibs/types/Common/i18n/en.d.ts +2 -0
  33. package/buildLibs/types/Common/i18n/zh_CN.d.ts +2 -0
  34. package/buildLibs/types/Common/index.d.ts +1 -1
  35. package/buildLibs/types/Element/CheckBox/Index.vue.d.ts +9 -0
  36. package/buildLibs/types/Element/Input/Index.vue.d.ts +9 -0
  37. package/buildLibs/types/Element/InputNumber/Index.vue.d.ts +9 -0
  38. package/buildLibs/types/Element/InputNumberStepper/Index.vue.d.ts +9 -0
  39. package/buildLibs/types/Element/InputTextarea/Index.vue.d.ts +9 -0
  40. package/buildLibs/types/Element/Radio/Index.vue.d.ts +9 -0
  41. package/buildLibs/types/Web/DateTime/Index.vue.d.ts +9 -0
  42. package/buildLibs/types/Web/FileUpload/Index.vue.d.ts +9 -0
  43. package/buildLibs/types/Web/Select/Index.vue.d.ts +9 -0
  44. package/buildLibs/types/Web/SelectCascade/Index.vue.d.ts +9 -0
  45. package/buildLibs/types/Web/SelectMove/Index.vue.d.ts +9 -0
  46. package/buildLibs/types/Web/SelectTag/Index.vue.d.ts +9 -0
  47. package/buildLibs/types/Web/SelectTree/Index.vue.d.ts +9 -0
  48. package/buildLibs/types/Web/Tree/Index.vue.d.ts +9 -0
  49. package/buildLibs/types/Web/componentsInstalls.d.ts +90 -0
  50. package/buildLibs/utils/Element/ClCheckbox.cjs +1 -1
  51. package/buildLibs/utils/Element/ClCheckbox.js +1 -1
  52. package/buildLibs/utils/Element/ClInput.cjs +1 -1
  53. package/buildLibs/utils/Element/ClInput.js +1 -1
  54. package/buildLibs/utils/Element/ClInputCaptcha.cjs +1 -1
  55. package/buildLibs/utils/Element/ClInputCaptcha.js +1 -1
  56. package/buildLibs/utils/Element/ClInputNumber.cjs +1 -1
  57. package/buildLibs/utils/Element/ClInputNumber.js +1 -1
  58. package/buildLibs/utils/Element/ClInputNumberStepper.cjs +1 -1
  59. package/buildLibs/utils/Element/ClInputNumberStepper.js +1 -1
  60. package/buildLibs/utils/Element/ClInputPassword.cjs +1 -1
  61. package/buildLibs/utils/Element/ClInputPassword.js +1 -1
  62. package/buildLibs/utils/Element/ClInputSearch.cjs +1 -1
  63. package/buildLibs/utils/Element/ClInputSearch.js +1 -1
  64. package/buildLibs/utils/Element/ClInputTextarea.cjs +1 -1
  65. package/buildLibs/utils/Element/ClInputTextarea.js +1 -1
  66. package/buildLibs/utils/Element/ClRadio.cjs +1 -1
  67. package/buildLibs/utils/Element/ClRadio.js +1 -1
  68. package/buildLibs/utils/Element/__provide__/Validate.cjs +1 -1
  69. package/buildLibs/utils/Element/__provide__/Validate.js +13 -3
  70. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C1OgPpoJ.js → Index.vue_vue_type_script_setup_true_lang-0S6ab-Lp.js} +120 -113
  71. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-neC9NxKi.js → Index.vue_vue_type_script_setup_true_lang-2Fe9SkjL.js} +209 -201
  72. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-2THK822S.js +254 -0
  73. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BO4cal3i.js → Index.vue_vue_type_script_setup_true_lang-2dwwjiTV.js} +386 -375
  74. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5itnjwU_.js +1 -0
  75. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-ChnRq_PS.js → Index.vue_vue_type_script_setup_true_lang-B0MJO0JM.js} +2 -2
  76. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BIO6Me43.js +1 -0
  77. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BN9ybiKv.js +1 -0
  78. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BpG7AHvM.js +1 -0
  79. package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-CAe8mhTl.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-CATwJnes.js} +66 -60
  80. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CW4fM0by.js +1 -0
  81. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DxYJbPyJ.js → Index.vue_vue_type_script_setup_true_lang-C_exHzjc.js} +3 -3
  82. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CsCn637u.js +2 -0
  83. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D_XMW7K4.js → Index.vue_vue_type_script_setup_true_lang-D4a5Iaue.js} +153 -145
  84. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DXPZYc0c.js +1 -0
  85. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DY4m6Xyj.js +1 -0
  86. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DZCt32jb.js +1533 -0
  87. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DZF2gj7X.js +2536 -0
  88. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-De1eNjwC.js +1 -0
  89. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C6Evk0-z.js → Index.vue_vue_type_script_setup_true_lang-DtAy8lm9.js} +53 -47
  90. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DvN-fBNd.js +1 -0
  91. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DwBf338f.js +1 -0
  92. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Cg_benGj.js → Index.vue_vue_type_script_setup_true_lang-F9tBnc_7.js} +63 -55
  93. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-HfnOtuMz.js +310 -0
  94. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dwkuei2j.js → Index.vue_vue_type_script_setup_true_lang-VjIva6RM.js} +1 -1
  95. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-j7gxlOeM.js +1 -0
  96. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CgdGs-U2.js → Index.vue_vue_type_script_setup_true_lang-lKDQFZtY.js} +67 -59
  97. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dzm58mMQ.js → Index.vue_vue_type_script_setup_true_lang-nAMiORzN.js} +1 -1
  98. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CizRrQsH.js → Index.vue_vue_type_script_setup_true_lang-oovIcT38.js} +1 -1
  99. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BIFHYrzc.js → Index.vue_vue_type_script_setup_true_lang-qqnmaRnk.js} +1 -1
  100. package/buildLibs/utils/Web/ClColorPicker.cjs +1 -1
  101. package/buildLibs/utils/Web/ClColorPicker.js +1 -1
  102. package/buildLibs/utils/Web/ClCropperPreview.cjs +1 -1
  103. package/buildLibs/utils/Web/ClCropperPreview.js +1 -1
  104. package/buildLibs/utils/Web/ClDateTime.cjs +1 -1
  105. package/buildLibs/utils/Web/ClDateTime.js +1 -1
  106. package/buildLibs/utils/Web/ClFileUpload.cjs +1 -1
  107. package/buildLibs/utils/Web/ClFileUpload.js +1 -1
  108. package/buildLibs/utils/Web/ClInputTag.cjs +1 -1
  109. package/buildLibs/utils/Web/ClInputTag.js +1 -1
  110. package/buildLibs/utils/Web/ClPaginate.cjs +1 -1
  111. package/buildLibs/utils/Web/ClPaginate.js +1 -1
  112. package/buildLibs/utils/Web/ClSelect.cjs +1 -1
  113. package/buildLibs/utils/Web/ClSelect.js +1 -1
  114. package/buildLibs/utils/Web/ClSelectCascade.cjs +1 -1
  115. package/buildLibs/utils/Web/ClSelectCascade.js +1 -1
  116. package/buildLibs/utils/Web/ClSelectMove.cjs +1 -1
  117. package/buildLibs/utils/Web/ClSelectMove.js +655 -647
  118. package/buildLibs/utils/Web/ClSelectTag.cjs +1 -1
  119. package/buildLibs/utils/Web/ClSelectTag.js +1 -1
  120. package/buildLibs/utils/Web/ClSelectTree.cjs +1 -1
  121. package/buildLibs/utils/Web/ClSelectTree.js +71 -63
  122. package/buildLibs/utils/Web/ClTable.cjs +1 -1
  123. package/buildLibs/utils/Web/ClTable.js +1 -1
  124. package/buildLibs/utils/Web/ClTree.cjs +1 -1
  125. package/buildLibs/utils/Web/ClTree.js +1 -1
  126. package/buildLibs/utils/Web/ClXEditable.cjs +1 -1
  127. package/buildLibs/utils/Web/ClXEditable.js +10 -10
  128. package/buildLibs/web/index.cjs +7 -7
  129. package/buildLibs/web/index.js +10792 -10685
  130. package/docs/components/Element/Checkbox.md +2 -1
  131. package/docs/components/Element/Form.md +15 -0
  132. package/docs/components/Element/Input.md +2 -1
  133. package/docs/components/Element/InputNumber.md +2 -1
  134. package/docs/components/Element/InputNumberStepper.md +2 -1
  135. package/docs/components/Element/InputTextarea.md +2 -1
  136. package/docs/components/Element/Radio.md +2 -1
  137. package/docs/components/Web/DateTime.md +2 -1
  138. package/docs/components/Web/FileUpload.md +2 -1
  139. package/docs/components/Web/Select.md +2 -1
  140. package/docs/components/Web/SelectCascade.md +1 -0
  141. package/docs/components/Web/SelectMove.md +2 -1
  142. package/docs/components/Web/SelectTag.md +1 -0
  143. package/docs/components/Web/SelectTree.md +2 -1
  144. package/docs/components/Web/Tree.md +2 -1
  145. package/package.json +1 -1
  146. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CiNidFJt.js +0 -246
  147. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-DC6727pS.js +0 -2528
  148. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-EXqjkKwS.js +0 -302
  149. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-Hg16dgRQ.js +0 -1527
  150. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5aX79Fcf.js +0 -1
  151. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BRvOcf4B.js +0 -1
  152. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Ba8Z8fOP.js +0 -1
  153. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BjNP5odR.js +0 -1
  154. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CQ3RGLek.js +0 -302
  155. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CY5fRV6o.js +0 -1
  156. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CYN4r-Mx.js +0 -1
  157. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-C_7ArHlU.js +0 -1
  158. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CuJjJvft.js +0 -2
  159. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CwjigRBx.js +0 -2528
  160. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-D6cmq0Tf.js +0 -1527
  161. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Dbf-3Nik.js +0 -1
  162. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DgD_gHit.js +0 -1
  163. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-FowII7_3.js +0 -1
  164. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-c7oxeU_j.js +0 -246
  165. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-vLqCsSbV.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue");;/* empty css */;/* empty css */const l=require("@cldemo/ui-kit/common/base"),L=require("@cldemo/ui-kit/common/globalConfig"),K=require("@cldemo/ui-kit/common/Element"),h=require("./Index.vue_vue_type_script_setup_true_lang-CFZ5jK-q.js"),R=require("./index-q2CbfC2a.js"),z=["id"],A={key:0,class:"cl-plaintext-value"},O=["id","name","value","disabled","checked","onClick"],U=["for"],W={key:0},j=e.defineComponent({name:"ClRadio",directives:{cltooltip:R.tooltipDirectives},__name:"Index",props:{id:String,name:{type:String,required:!0},value:{type:[String,Number],required:!0},className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},width:String,isInline:{type:Boolean,default:!0},tipMode:{type:String,default:"tooltip",validator:d=>["tooltip","clickCallback"].includes(d)},checkChangeBefore:{type:Function,default:void 0},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0}},emits:["update:value","update:modelValue","onChange","onInit","onError","onTipClick"],setup(d,{expose:C,emit:x}){const i=d,p=x,v=`rd-${l.getRandom(8)}`,k=l.isEmpty(i.name)?v+"_name":i.name,S=i.id,s=e.ref(i.value?.toString()||"");let c={};const E=e.ref(0),r=e.ref(!1),u={isProcessing:!1,_initEmitted:!1},N=e.computed(()=>{if(i.isPlaintext)return[];const t=i.list;return l.isArray(t)?t.filter(o=>!l.isEmpty(o)):[]}),I=e.computed(()=>{i.list,E.value;const t=s.value;if(l.isEmpty(t))return"";const o=l.isExistJsonKey(c,t)?c[t]:void 0;return o&&l.isNonEmptyString(o.name)?o.name:t}),V=e.computed(()=>L.getPlaintextOutText("radio",i.plaintextEmptyText,I.value,i.value)),w=e.computed(()=>l.getJsonMerge({"panel-radio":!0},K.getClassNameJson(i.className))),T=e.computed(()=>{const t={radio:!0,"radio-default":!0};return t["radio-inline"]=i.isInline??!0,t}),f=t=>{p("update:value",t),p("update:modelValue",t)},b=t=>{const o=t.id?.toString()??"";f(o),p("onChange",o,l.getJsonClone(t))},g=()=>{u._initEmitted||(u._initEmitted=!0,e.nextTick(()=>{p("onInit")}))},D=t=>{const o={},{width:a}=i;return t&&!l.isEmpty(t.width)?o.width=t.width:l.isEmpty(a)||(o.width=i.width),o},q=()=>l.isExistJsonKey(c,s.value)?s.value:"",y=t=>{c=l.isEmpty(t)?{}:l.getJsonByList(t),E.value+=1},m=()=>{if(r.value){const t=l.isEmpty(s.value)?"":s.value;l.isExistJsonKey(c,t)||(s.value="",f(""))}},_=t=>{t!==s.value&&(s.value=t?.toString()||"")},$=()=>{r.value=i.list.length!==0,y(i.list),m()};e.onMounted(()=>{e.nextTick(()=>{$()})}),e.onBeforeUnmount(()=>{c={},r.value=!1,u._initEmitted=!1}),e.watch(r,t=>{t&&g()}),e.watch(()=>i.list,t=>{r.value||(r.value=!0,t.length===0&&m(),g())},{deep:!0}),e.watch([()=>i.value,()=>i.list],([t,o])=>{const a=o||[];!r.value&&a.length>0&&(r.value=!0,g()),y(a),_(t),m()},{deep:!0});const P=t=>{p("onTipClick",t)},F=async t=>{if(!(!t||t.isDisabled||i.disabled||u.isProcessing)&&!l.isEmpty(t.id)){u.isProcessing=!0;try{const o=String(t.id??"");if(o===s.value)return;let a=!0;if(i.checkChangeBefore)try{a=await i.checkChangeBefore(o),a=l.isBoolean(a)?a:!0}catch{a=!1}if(i.disabled||t.isDisabled)return;a&&(s.value=o,b(t))}catch(o){p("onError",o)}finally{u.isProcessing=!1}}},B=()=>q();return C({getValue:B,getValueData:()=>{const t=B();return l.isExistJsonKey(c,t)?l.getJsonClone(c[t]):{}},setValue:t=>{u.isProcessing||(_(t),m())},runInitComplete:()=>{r.value||(r.value=!0,y(i.list),_(i.value),m(),g())}}),(t,o)=>{const a=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(w.value),id:e.unref(S)},[d.isPlaintext?(e.openBlock(),e.createElementBlock("div",A,e.toDisplayString(V.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(n,J)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${v}-${n.id??""}-${J}`},[n&&(n.isShow||n.isShow===void 0)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(T.value),style:e.normalizeStyle(D(n))},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"radio",id:`${v}_${e.unref(k)}_${n.id??""}`,name:e.unref(k),value:n.id??"",disabled:n.isDisabled||d.disabled,checked:(n.id?.toString()??"")===s.value,onClick:M=>F(n)},null,8,O),e.createElementVNode("label",{for:`${v}_${e.unref(k)}_${n.id??""}`},[e.renderSlot(t.$slots,"default",{data:n},()=>[n.icon&&n.icon.length>0?e.withDirectives((e.openBlock(),e.createElementBlock("span",W,[e.createVNode(h._sfc_main,{name:n.icon},null,8,["name"])])),[[a,{html:n.name,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(n.name),1)],64))])],8,U)]),n.tipMsg&&n.tipMsg.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[d.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(h._sfc_main,{key:0,name:e.unref(l).isNonEmptyString(n.tipIcon)?void 0:"question-circle",className:e.unref(l).isNonEmptyString(n.tipIcon)?n.tipIcon:void 0,class:"radio-icon-tip"},null,8,["name","className"])),[[a,{html:n.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(h._sfc_main,{key:1,name:e.unref(l).isNonEmptyString(n.tipIcon)?void 0:"question-circle",className:e.unref(l).isNonEmptyString(n.tipIcon)?n.tipIcon:void 0,class:"radio-icon-tip",onClick:e.withModifiers(M=>P(n),["stop"])},null,8,["name","className","onClick"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128))],10,z)}}});exports._sfc_main=j;
@@ -1,8 +1,8 @@
1
- import { defineComponent as te, useTemplateRef as ne, computed as E, onMounted as fe, nextTick as me, onBeforeUnmount as oe, openBlock as F, createElementBlock as R, normalizeClass as ae, renderSlot as ie, reactive as X, ref as pe, watch as be, unref as ge, createVNode as L, createSlots as ye, withCtx as U, Fragment as Y } from "vue";
1
+ import { defineComponent as te, useTemplateRef as ne, computed as I, onMounted as fe, nextTick as pe, onBeforeUnmount as oe, openBlock as F, createElementBlock as R, normalizeClass as ae, renderSlot as ie, reactive as X, ref as me, watch as be, unref as ge, createVNode as L, createSlots as ye, withCtx as U, Fragment as Y } from "vue";
2
2
  import le from "@cldemo/ui-kit/common/log";
3
3
  import a from "@cldemo/ui-kit/common/base";
4
4
  import j from "@cldemo/ui-kit/common/Element";
5
- import { _ as ee } from "./Index.vue_vue_type_script_setup_true_lang-DKMVQrVU.js";
5
+ import { _ as ee } from "./Index.vue_vue_type_script_setup_true_lang-CATwJnes.js";
6
6
  import { Drag as we } from "@cldemo/ui-kit/common/Element/Event";
7
7
  import { _ as z } from "./Index.vue_vue_type_script_setup_true_lang-C2LGy18j.js";
8
8
  const De = ["aria-disabled"], q = /* @__PURE__ */ te({
@@ -22,7 +22,7 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
22
22
  isKeyDown: !1,
23
23
  dragEvent: null,
24
24
  sessionSource: null
25
- }, f = E(() => {
25
+ }, f = I(() => {
26
26
  const n = a.getJsonMerge(
27
27
  { "inputNumberStepper-controls": !0 },
28
28
  j.getClassNameJson(t.className)
@@ -45,15 +45,15 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
45
45
  return n;
46
46
  }, l = () => {
47
47
  o.longDownInterval && (clearInterval(o.longDownInterval), o.longDownInterval = null);
48
- }, B = (n) => {
48
+ }, x = (n) => {
49
49
  o.isLongDownActive && o.sessionSource !== n || (o.isLongDownActive = !0, o.sessionSource = n, g(), l(), o.longDownInterval = setInterval(() => {
50
50
  t.disabled ? D() : g();
51
51
  }, 200));
52
- }, N = (n) => {
52
+ }, B = (n) => {
53
53
  if (o.sessionSource !== "mouse")
54
54
  return;
55
55
  const i = n.target;
56
- b.value === n.target || b.value?.contains(i) ? o.isMoveBoundary && (o.isMoveBoundary = !1, !t.disabled && w() && B("mouse")) : (l(), o.isMoveBoundary = !0);
56
+ b.value === n.target || b.value?.contains(i) ? o.isMoveBoundary && (o.isMoveBoundary = !1, !t.disabled && w() && x("mouse")) : (l(), o.isMoveBoundary = !0);
57
57
  }, D = (n, i) => {
58
58
  if (o.isLongDownActive) {
59
59
  if (n && o.sessionSource && n !== o.sessionSource)
@@ -66,11 +66,11 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
66
66
  if (t.disabled)
67
67
  return !1;
68
68
  const C = i, T = i;
69
- let x = !1;
70
- return (C.buttons === 1 || i.type === "touchstart" || (T.touches?.length ?? 0) > 0) && (x = w(), x && (o.isMoveBoundary = !1, B("mouse"))), x;
69
+ let k = !1;
70
+ return (C.buttons === 1 || i.type === "touchstart" || (T.touches?.length ?? 0) > 0) && (k = w(), k && (o.isMoveBoundary = !1, x("mouse"))), k;
71
71
  },
72
72
  ing: (i) => {
73
- N(i);
73
+ B(i);
74
74
  },
75
75
  end: () => {
76
76
  D("mouse");
@@ -79,23 +79,23 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
79
79
  b.value && (o.dragEvent = new we(b.value, n));
80
80
  };
81
81
  fe(() => {
82
- me(() => {
82
+ pe(() => {
83
83
  M();
84
84
  });
85
85
  }), oe(() => {
86
86
  D(), o.dragEvent && (o.dragEvent.end(), o.dragEvent = null);
87
87
  });
88
- const _ = (n) => {
88
+ const P = (n) => {
89
89
  const i = n.key;
90
90
  if (i === "Enter" || i === " ") {
91
91
  if (t.disabled)
92
92
  return;
93
- n.preventDefault(), !o.isKeyDown && !o.isLongDownActive && w() && (o.isKeyDown = !0, B("keyboard"));
93
+ n.preventDefault(), !o.isKeyDown && !o.isLongDownActive && w() && (o.isKeyDown = !0, x("keyboard"));
94
94
  }
95
- }, P = (n) => {
95
+ }, _ = (n) => {
96
96
  const i = n.key;
97
97
  (i === "Enter" || i === " ") && o.isKeyDown && D("keyboard");
98
- }, I = () => {
98
+ }, N = () => {
99
99
  (o.isKeyDown || o.isLongDownActive) && D(void 0, !0);
100
100
  };
101
101
  return (n, i) => (F(), R("span", {
@@ -105,14 +105,14 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
105
105
  role: "button",
106
106
  tabindex: "0",
107
107
  "aria-disabled": t.disabled,
108
- onKeydown: _,
109
- onKeyup: P,
110
- onBlur: I
108
+ onKeydown: P,
109
+ onKeyup: _,
110
+ onBlur: N
111
111
  }, [
112
112
  ie(n.$slots, "icon")
113
113
  ], 42, De));
114
114
  }
115
- }), Se = ["id"], Ee = /* @__PURE__ */ te({
115
+ }), Se = ["id"], Ie = /* @__PURE__ */ te({
116
116
  name: "ClInputNumberStepper",
117
117
  components: {
118
118
  ClInputNumber: ee,
@@ -223,13 +223,18 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
223
223
  type: Boolean,
224
224
  default: !1
225
225
  // desc: 是否纯文本只读模式,只渲染显示文本(含千分位与小数位)不挂载输入框与加减按钮
226
+ },
227
+ plaintextEmptyText: {
228
+ type: String,
229
+ default: void 0
230
+ // desc: 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段)
226
231
  }
227
232
  },
228
233
  emits: ["update:value", "update:modelValue", "onChange", "onError"],
229
234
  setup(u, { emit: A }) {
230
235
  const t = u, h = A, b = ne("refElInput"), o = X({
231
236
  isFocus: !1
232
- }), f = pe(""), g = X({
237
+ }), f = me(""), g = X({
233
238
  subtractDisabled: !1,
234
239
  addDisabled: !1
235
240
  }), K = t.id, w = {
@@ -243,28 +248,28 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
243
248
  }
244
249
  };
245
250
  let l = null;
246
- const B = () => {
251
+ const x = () => {
247
252
  const e = t.btnStep;
248
253
  return a.isFinite(e) && e > 0 ? e : 1;
249
- }, N = E(() => {
250
- const e = t.decimal, r = B().toString();
254
+ }, B = I(() => {
255
+ const e = t.decimal, r = x().toString();
251
256
  let S = e;
252
257
  if (r.indexOf(".") > -1) {
253
258
  const s = r.split(".")[1].length;
254
259
  e < s && (S = s);
255
260
  }
256
261
  return S === -1 ? -1 : Math.max(0, Math.min(100, Math.round(S)));
257
- }), D = E(() => t.fillZeroCount > 0 && a.isFinite(t.fillZeroCount)), M = E(() => {
262
+ }), D = I(() => t.fillZeroCount > 0 && a.isFinite(t.fillZeroCount)), M = I(() => {
258
263
  if (a.isNonEmptyString(t.btnClsIconSub))
259
264
  return "";
260
265
  const e = t.btnTheme || "leftRight";
261
266
  return w[e] ? w[e].subtract : "";
262
- }), _ = E(() => {
267
+ }), P = I(() => {
263
268
  if (a.isNonEmptyString(t.btnClsIconAdd))
264
269
  return "";
265
270
  const e = t.btnTheme || "leftRight";
266
271
  return w[e] ? w[e].add : "";
267
- }), P = E(() => {
272
+ }), _ = I(() => {
268
273
  if (t.isPlaintext) {
269
274
  let r = { "cl-plaintext-stepper": !0 };
270
275
  return r = a.getJsonMerge(r, j.getClassNameJson(t.className)), r;
@@ -274,7 +279,7 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
274
279
  "inputNumberStepper-disabled": t.disabled || !1
275
280
  };
276
281
  return e = a.getJsonMerge(e, j.getClassNameJson(t.className)), e[`inputNumberStepper-btn-${t.btnTheme || "leftRight"}`] = !0, e[`inputNumberStepper-btn-${t.btnShowType || "fixed"}`] = !0, (t.btnTheme || "leftRight") === "leftRight" && t.btnShape === "circle" && (e["inputNumberStepper-btnShape-circle"] = !0), e["inputNumberStepper-focus"] = o.isFocus, e[`inputNumberStepper-${t.size || "large"}`] = !0, e;
277
- }), I = () => {
282
+ }), N = () => {
278
283
  const e = f.value;
279
284
  h("update:value", e), h("update:modelValue", e), h("onChange", e);
280
285
  }, n = (e) => {
@@ -286,8 +291,8 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
286
291
  if (t.calculationOperateValueCallback) {
287
292
  let c = null;
288
293
  try {
289
- const p = t.calculationOperateValueCallback({ value: e, type: r });
290
- p && (c = p);
294
+ const m = t.calculationOperateValueCallback({ value: e, type: r });
295
+ m && (c = m);
291
296
  } catch {
292
297
  h("onError", "数值计算回调执行失败");
293
298
  }
@@ -295,26 +300,26 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
295
300
  } else {
296
301
  const c = r && !a.isEmpty(r);
297
302
  if (c || !a.isEmpty(e)) {
298
- const p = a.isEmpty(e) ? 0 : Number(e);
299
- if (a.isFinite(p)) {
300
- const v = t.min, m = t.max, { isLoop: y = !1 } = t, k = a.isUndefined(v), O = a.isUndefined(m), Q = B();
301
- let d = p;
303
+ const m = a.isEmpty(e) ? 0 : Number(e);
304
+ if (a.isFinite(m)) {
305
+ const v = t.min, p = t.max, { isLoop: y = !1 } = t, E = a.isUndefined(v), O = a.isUndefined(p), Q = x();
306
+ let d = m;
302
307
  if (c) {
303
308
  d += Q * (r === "subtract" ? -1 : 1);
304
309
  const W = d.toString();
305
310
  if (W.indexOf(".") > -1) {
306
- const de = W.split(".")[1].length, J = N.value;
311
+ const de = W.split(".")[1].length, J = B.value;
307
312
  J >= 0 && de > J && (d = Number(d.toFixed(J)));
308
313
  }
309
314
  }
310
- !k && d <= v ? (y || ($ = !0), s = d < v && y && !O ? m : v, Z = d !== s) : !O && d >= m ? (y || (V = !0), s = d > m && y && !k ? v : m, Z = d !== s) : s = d;
315
+ !E && d <= v ? (y || ($ = !0), s = d < v && y && !O ? p : v, Z = d !== s) : !O && d >= p ? (y || (V = !0), s = d > p && y && !E ? v : p, Z = d !== s) : s = d;
311
316
  }
312
317
  }
313
318
  }
314
- if (typeof s == "number" && N.value > 0 && (s.toString().indexOf(".") > -1 || S.indexOf(".") > -1) && (s = s.toFixed(N.value)), !a.isString(s) && !(typeof s == "number" && a.isFinite(s)) && (s = ""), D.value && !a.isEmpty(s) && a.isFinite(s)) {
319
+ if (typeof s == "number" && B.value > 0 && (s.toString().indexOf(".") > -1 || S.indexOf(".") > -1) && (s = s.toFixed(B.value)), !a.isString(s) && !(typeof s == "number" && a.isFinite(s)) && (s = ""), D.value && !a.isEmpty(s) && a.isFinite(s)) {
315
320
  const c = t.fillZeroCount;
316
321
  c > 10 && le.warn("ClInputNumberStepper", "fillZeroCount 超过 10,按 10 处理", c);
317
- const p = s.toString(), v = p.charAt(0) === "-", m = v ? p.slice(1) : p, y = m.indexOf("."), k = y > -1 ? m.slice(0, y) : m, O = y > -1 ? m.slice(y) : "", d = !/[eE]/.test(m) && k.length < c ? a.getFillZero(k, Math.min(c, 10)) : k;
322
+ const m = s.toString(), v = m.charAt(0) === "-", p = v ? m.slice(1) : m, y = p.indexOf("."), E = y > -1 ? p.slice(0, y) : p, O = y > -1 ? p.slice(y) : "", d = !/[eE]/.test(p) && E.length < c ? a.getFillZero(E, Math.min(c, 10)) : E;
318
323
  s = (v ? "-" : "") + d + O;
319
324
  }
320
325
  return n(s.toString()), g.subtractDisabled = $, g.addDisabled = V, Z;
@@ -326,19 +331,19 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
326
331
  }), be(
327
332
  () => t.value,
328
333
  (e, r) => {
329
- e !== r && e !== f.value && i(e) && I();
334
+ e !== r && e !== f.value && i(e) && N();
330
335
  },
331
336
  { immediate: !0 }
332
337
  );
333
- const x = (e) => {
338
+ const k = (e) => {
334
339
  t.disabled || (e = a.removeReplace(e), n(e), l && (clearTimeout(l), l = null), l = setTimeout(() => {
335
- a.isEmpty(f.value) ? (g.subtractDisabled = !1, g.addDisabled = !1) : i(f.value), I();
340
+ a.isEmpty(f.value) ? (g.subtractDisabled = !1, g.addDisabled = !1) : i(f.value), N();
336
341
  }, 100));
337
342
  }, se = (e) => {
338
343
  if (!t.disabled && !t.isTextRead && T(e)) {
339
344
  e.preventDefault(), l && (clearTimeout(l), l = null);
340
345
  const r = e.key;
341
- r === "ArrowLeft" || r === "ArrowDown" ? i(f.value, "subtract") : i(f.value, "add"), I(), C(!0);
346
+ r === "ArrowLeft" || r === "ArrowDown" ? i(f.value, "subtract") : i(f.value, "add"), N(), C(!0);
342
347
  }
343
348
  }, re = (e) => {
344
349
  !t.disabled && !t.isTextRead && T(e) && (l && (clearTimeout(l), l = null), C(!0));
@@ -349,11 +354,11 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
349
354
  }, G = (e) => {
350
355
  l && (clearTimeout(l), l = null), i(f.value, e);
351
356
  }, H = (e) => {
352
- l && (clearTimeout(l), l = null), I(), e || C(!0);
357
+ l && (clearTimeout(l), l = null), N(), e || C(!0);
353
358
  };
354
359
  return (e, r) => (F(), R("div", {
355
360
  id: ge(K),
356
- class: ae(P.value)
361
+ class: ae(_.value)
357
362
  }, [
358
363
  L(ee, {
359
364
  ref_key: "refElInput",
@@ -364,10 +369,11 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
364
369
  isReadonly: u.isTextRead,
365
370
  isClean: u.isClean,
366
371
  isNumber: !D.value,
367
- decimal: N.value,
372
+ decimal: B.value,
368
373
  isPlaintext: u.isPlaintext,
374
+ plaintextEmptyText: u.plaintextEmptyText,
369
375
  theme: "icon",
370
- onOnChange: x,
376
+ onOnChange: k,
371
377
  onOnKeydown: se,
372
378
  onOnKeyup: re,
373
379
  onOnFocus: ue,
@@ -380,7 +386,7 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
380
386
  ]),
381
387
  key: "0"
382
388
  } : void 0
383
- ]), 1032, ["value", "placeholder", "disabled", "isReadonly", "isClean", "isNumber", "decimal", "isPlaintext"]),
389
+ ]), 1032, ["value", "placeholder", "disabled", "isReadonly", "isClean", "isNumber", "decimal", "isPlaintext", "plaintextEmptyText"]),
384
390
  u.isPlaintext ? (F(), R(Y, { key: 1 }, [], 64)) : (F(), R(Y, { key: 0 }, [
385
391
  L(q, {
386
392
  className: "inputNumberStepper-subtract",
@@ -408,7 +414,7 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
408
414
  }, {
409
415
  icon: U(() => [
410
416
  L(z, {
411
- name: _.value,
417
+ name: P.value,
412
418
  className: u.btnClsIconAdd
413
419
  }, null, 8, ["name", "className"])
414
420
  ]),
@@ -419,5 +425,5 @@ const De = ["aria-disabled"], q = /* @__PURE__ */ te({
419
425
  }
420
426
  });
421
427
  export {
422
- Ee as _
428
+ Ie as _
423
429
  };
@@ -0,0 +1 @@
1
+ "use strict";var Ie=Object.create;var we=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var ke=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var Be=(c,O,L,r)=>{if(O&&typeof O=="object"||typeof O=="function")for(let o of ke(O))!Te.call(c,o)&&o!==L&&we(c,o,{get:()=>O[o],enumerable:!(r=xe(O,o))||r.enumerable});return c};var Ce=(c,O,L)=>(L=c!=null?Ie(_e(c)):{},Be(O||!c||!c.__esModule?we(L,"default",{value:c,enumerable:!0}):L,c));const e=require("vue"),G=require("@cldemo/ui-kit/common/log"),n=require("@cldemo/ui-kit/common/base"),N=require("@cldemo/ui-kit/common/Element"),Ve=require("@cldemo/ui-kit/common/globalConfig"),Me=require("./Index.vue_vue_type_script_setup_true_lang-BPTL5eCB.js"),Le=require("./List.vue_vue_type_script_setup_true_lang-CFCST05R.js"),Oe=require("./Index.vue_vue_type_script_setup_true_lang-qqnmaRnk.js"),De=require("./One.vue_vue_type_script_setup_true_lang-D9zWNf0s.js"),be=require("./language-BJ4aVgHI.js"),Pe=require("./Index.vue_vue_type_script_setup_true_lang-CFZ5jK-q.js"),Fe=require("./Index.vue_vue_type_script_setup_true_lang-CYFgnd30.js");;/* empty css */const Ae=["id"],Ke={key:0,class:"select-inDropdown-search",role:"search","aria-label":"搜索选项"},Ne={key:2,class:"select-inDropdown-checkboxAll"},Re=["aria-selected","aria-disabled","onClick"],$e={class:"select-inDropdown-item-inner"},qe={key:0,class:"select-inDropdown-checkbox"},He=["innerHTML"],Je={key:5,class:"select-inDropdown-body"},je={class:"select-inDropdown-empty"},Se=35,We=210,ze=20,Ue=e.defineComponent({name:"ClSelectInDropdown",__name:"Dropdown",props:{id:String,disabled:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},isMultiple:{type:Boolean,default:!1},isCheckBoxAll:{type:Boolean,default:!0},showDropDownTextFormat:String,showDropDownTextFormatSub:String,isCascade:{type:Boolean,default:!1},parentSelectable:{type:Boolean,default:!1},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},originalData:{type:Array,default:()=>[]},keyIndex:String,isOpen:{type:Boolean,default:!1},selectId:{type:Array,default:()=>[]},serverCallback:Function},emits:{onChange:c=>!0,onInitComplete:()=>!0,onError:c=>!0},setup(c,{expose:O,emit:L}){const r=e.defineAsyncComponent(()=>import("vue-virtual-scroller").then(l=>(Promise.resolve().then(()=>require("./vue-virtual-scroller-C_hlZMj5.js")),l.RecycleScroller))),o=c,_=L,{optPageLanguage:X,getPageLanguage:Y}=be.useLanguage();Y("common");const T=e.inject("$SelectTop",{}),M=typeof T.getSelectData=="function",E=e.useTemplateRef("refElSearch"),P=e.useTemplateRef("refElScroller"),I=e.useTemplateRef("refElRoot");let S=!0;const w={isScrollLoading:!1,hasMoreData:!0};let f=[],F=0,B=0;const Z=o.id,ee=`select-inList-${o.keyIndex||""}`;let R=!1;const J=e.ref(""),k=e.ref([]),te=e.ref([]);let ne={};const re=l=>{const s=l.id.toString();if(o.isMultiple&&o.isCascade&&l._hasChildren&&M){const p=T.getAllChildIds(s).filter(g=>!T.getSelectValueInfo(g)?.isDisabled);if(p.length===0)return 0;const m=p.filter(g=>n.isExistValue(o.selectId,g)).length;return m===0?0:m===p.length?2:1}return n.isExistValue(o.selectId,s)?2:0},oe=l=>re(l)===2,pe=l=>re(l)===1,he=e.computed(()=>{let l=!1;return te.value.length>0&&o.selectId.length>=te.value.length&&(l=n.isContainArr(o.selectId,te.value)),l}),ge=l=>{if(!l||typeof l!="object")return"";let s=n.isNonEmptyString(o.showDropDownTextFormat)?o.showDropDownTextFormat:"";l._level>=1&&n.isNonEmptyString(o.showDropDownTextFormatSub)&&(s=o.showDropDownTextFormatSub);let a=n.isEmpty(s)?l.name:n.convertStringFormat(s,l);return n.isHtml(a)?n.isEmpty(s)&&n.isHtml(l.name)?a=n.encodeHTML(l.name):a=n.convertStringFormatEncodeHTML(s,l):typeof a=="string"&&a.indexOf("<")>-1&&(a=n.encodeHTML(a)),a},j=l=>{const s=ne[l]||{};if(n.isBoolean(s._isTypeRadio))return s._isTypeRadio;if(M){const a=T.getSelectValueInfo(l);if(n.isBoolean(a?._isTypeRadio))return a._isTypeRadio}return!1},W=()=>{const l=[];ne=n.getJsonByList(k.value),k.value.forEach(s=>{if(!n.isObject(s))return;const a=typeof s.id;if(s.id==null||a!=="string"&&(a!=="number"||!n.isFinite(s.id)))return;const p=s.id.toString();if(!(o.isCascade&&s._hasChildren)&&!j(p)){if(n.isExistValue(l,p))return;s.isDisabled?n.isExistValue(o.selectId,p)&&l.push(p):l.push(p)}}),te.value=l},z=l=>{const s=o.parentKey,a=o.topParentValue,p={};l.forEach(y=>{if(!n.isObject(y)||y.id==null||typeof y.id!="string"&&(typeof y.id!="number"||!n.isFinite(y.id)))return;const x=y[s],V=x!=null&&(typeof x=="string"||typeof x=="number")?x.toString():"";V!==""&&V!==String(a)&&(p[V]||(p[V]=[]),p[V].push(y))});const m=[],g=(y,x,V,C)=>{y.forEach(K=>{const ae=K.id.toString();if(C.has(ae))return;C.add(ae);const $=p[ae]||[];m.push({...K,_level:x,_parentName:V,_hasChildren:$.length>0}),$.length>0&&g($,x+1,K.name,C)})},D=l.filter(y=>{if(!n.isObject(y)||y.id==null||typeof y.id!="string"&&(typeof y.id!="number"||!n.isFinite(y.id)))return!1;const x=y[s],V=x!=null&&(typeof x=="string"||typeof x=="number")?x.toString():"";return n.isEmpty(V)||V===String(a)});return g(D,0,"",new Set),m},ie=(l,s)=>{if(!M)return l;const a=l.filter(C=>C!=null&&C.id!=null&&(typeof C.id=="string"||typeof C.id=="number"&&n.isFinite(C.id))),p=s.filter(C=>C!=null&&C.id!=null&&(typeof C.id=="string"||typeof C.id=="number"&&n.isFinite(C.id))),m=o.parentKey,g=o.topParentValue,D=new Set,y=new Set(a.map(C=>C.id.toString()));a.forEach(C=>{const K=C.id.toString();D.add(K);const ae=new Set;let $=C[m];for(;$!=null&&(typeof $=="string"||typeof $=="number")&&$.toString()!==String(g);){const i=$.toString();if(ae.has(i))break;ae.add(i),y.has(i)||D.add(i),$=T.getSelectValueInfo(i)?.[m]}T.getAllChildIds(K).forEach(i=>{D.add(i)})});const x=p.filter(C=>D.has(C.id.toString())),V=new Set(x.map(C=>C.id.toString()));return D.forEach(C=>{if(!V.has(C)){const K=T.getSelectValueInfo(C);K&&Object.keys(K).length>0&&x.push(K)}}),x},ce=()=>{S&&(S=!1,w.hasMoreData=!0,o.isCascade?(f=[...o.originalData||[]],k.value=z(f)):k.value=n.getListClone(o.originalData).filter(l=>l!=null&&l.id!=null&&(typeof l.id=="string"||typeof l.id=="number"&&n.isFinite(l.id))),W(),ye(),J.value="",e.nextTick(()=>{E.value&&E.value.setValue("")}))},ye=()=>{e.nextTick(()=>{if(P.value&&o.selectId.length>0){const l=k.value.findIndex(s=>s.id!=null&&n.isExistValue(o.selectId,s.id.toString()));l>-1&&P.value.scrollToItem(l)}})},se=l=>{const s=[],a=ne[l]||{},p=o.isCascade&&a._hasChildren;if(o.isMultiple)if(j(l))n.isExistValue(o.selectId,l)?o.selectId.forEach(m=>{m!==l&&s.push(m)}):(o.selectId.forEach(m=>{j(m)||s.push(m)}),s.push(l));else if(p&&M){const m=T.getAllChildIds(l),g=m.filter(y=>!T.getSelectValueInfo(y)?.isDisabled),D=g.length>0&&g.every(y=>n.isExistValue(o.selectId,y));o.selectId.forEach(y=>{m.includes(y)?m.includes(y)&&T.getSelectValueInfo(y)?.isDisabled&&s.push(y):s.push(y)}),D||g.forEach(y=>{n.isExistValue(s,y)||s.push(y)})}else o.selectId.forEach(m=>{m!==l&&s.push(m)}),n.isExistValue(o.selectId,l)||s.push(l);else{if(p&&!o.parentSelectable)return[...o.selectId];s.push(l)}return s},le=l=>{const s=k.value;if(s.length===0)return;let a=-1;const p=J.value;p.length>0?(s.forEach((m,g)=>{m.id.toString()===p&&(a=g)}),a+=l,a<0?a=0:a>=s.length&&(a=s.length-1)):a=0,J.value=s[a].id.toString(),P.value&&P.value.scrollToItem(a)},q=l=>{let s=l.keyCode;if(!n.isUndefined(s))switch(s=s.toString(),s){case"13":{const a=I.value&&l.target instanceof Node&&I.value.contains(l.target);(l.target===document.body||a)&&(l.preventDefault(),l.stopPropagation());break}case"38":l.preventDefault(),l.stopPropagation(),le(-1);break;case"40":l.preventDefault(),l.stopPropagation(),le(1);break}},H=l=>{let s=l.keyCode;if(!n.isUndefined(s))switch(s=s.toString(),s){case"27":M&&T.closeDropdown?.();break;case"13":{const a=J.value;if(!a||o.disabled||!o.isOpen)break;const p=I.value&&l.target instanceof Node&&I.value.contains(l.target);if(l.target!==document.body&&!p||!k.value.some(D=>D.id.toString()===a)||ne[a]?.isDisabled)break;const g=se(a);_("onChange",g);break}}},U=l=>l.map(s=>{const{_level:a,_parentName:p,_hasChildren:m,...g}=s;return g}),ue=async()=>{if(o.serverCallback&&!(w.isScrollLoading||!w.hasMoreData)&&(w.isScrollLoading=!0,o.serverCallback)){const l=++B,s=k.value;try{const a={offset:s.length};if(o.isSearch&&E.value){const D=E.value.getValue();n.isEmpty(D)||(a.search=D)}const p=await o.serverCallback(a);if(l!==B||s!==k.value)return;if(!Array.isArray(p)){G.error("ClSelect","_loadMore 服务端返回数据格式异常(非数组):",typeof p),_("onError","服务端加载失败:返回数据格式异常");return}if(p.length===0){w.hasMoreData=!1;return}const m=new Set(s.map(D=>D?.id?.toString()).filter(Boolean)),g=p.filter(D=>{if(D?.id==null)return!1;const y=typeof D.id;return y!=="string"&&(y!=="number"||!n.isFinite(D.id))?!1:!m.has(D.id.toString())});if(g.length===0){w.hasMoreData=!1;return}o.isCascade?a.search?k.value=z([...k.value,...g]):(f.length===0&&(f=U(k.value)),f.length===0&&(f=[...o.originalData]),f.push(...g),k.value=z(f)):k.value.push(...g),W(),M&&(T.convertListToJson(g),T.refreshDisplayLabels?.())}catch(a){G.error("ClSelect","_loadMore 服务端加载失败:",a),_("onError","服务端加载失败,请稍后重试")}finally{w.isScrollLoading=!1}}},de=()=>{ce(),_("onInitComplete")};e.onMounted(()=>{de()}),e.onBeforeUnmount(()=>{N.offListener(window,"keydown",q),N.offListener(window,"keyup",H),R=!1}),e.onDeactivated(()=>{N.offListener(window,"keydown",q),N.offListener(window,"keyup",H),R=!1}),e.onActivated(()=>{o.isOpen&&!R&&(N.onListener(window,"keydown",q),N.onListener(window,"keyup",H),R=!0)}),e.watch(()=>o.isOpen,l=>{l?(S=!0,ce()):w.isScrollLoading=!1}),e.watch(()=>o.originalData,l=>{S=!0,o.isCascade?(f=[...l||[]],k.value=z(f)):k.value=n.getListClone(l).filter(s=>s!=null&&s.id!=null&&(typeof s.id=="string"||typeof s.id=="number"&&n.isFinite(s.id))),W(),w.hasMoreData=!0,J.value="",e.nextTick(()=>{E.value&&E.value.setValue("")})});const me=async l=>{const s=++F;B=Math.max(B,s+1);let a=[];if(o.isCascade&&(f=[]),w.hasMoreData=!0,o.serverCallback){try{if(a=await o.serverCallback({search:l,offset:0}),Array.isArray(a)||(G.error("ClSelect","onSearch 服务端返回数据格式异常(非数组):",typeof a),_("onError","服务端搜索失败:返回数据格式异常"),a=[]),s!==F)return;M&&T.convertListToJson(a)}catch(p){G.error("ClSelect","onSearch 服务端搜索失败:",p),_("onError","服务端搜索失败,请稍后重试"),a=[]}if(s!==F)return;o.isCascade&&(a=ie(a,o.originalData),a=z(a))}else{const p=o.originalData.filter(m=>m!=null&&m.id!=null&&(typeof m.id=="string"||typeof m.id=="number"&&n.isFinite(m.id)));if(n.isEmpty(l))a=p;else{o.searchKeyType!=="||"&&o.searchKeyType!=="&&"&&G.warn("ClSelect","onSearch searchKeyType 未知值,已降级为 OR 匹配:",o.searchKeyType);const m=l.toLowerCase(),g=n.isArray(o.searchKey)?o.searchKey:["name"],D=g.length;p.forEach(y=>{const x=[];for(let V=0;V<D;V++){const C=y[g[V]];if(C==null)continue;String(C).toLowerCase().indexOf(m)>-1&&x.push(!0)}if(x.length>0)switch(o.searchKeyType){case"||":a.push(y);break;case"&&":x.length===D&&a.push(y);break;default:a.push(y)}})}o.isCascade&&(n.isEmpty(l)||(a=ie(a,o.originalData)),a=z(a))}k.value=a.filter(p=>p!=null&&p.id!=null&&(typeof p.id=="string"||typeof p.id=="number"&&n.isFinite(p.id))),W(),J.value="",M&&T.calculationDropdownPosition()},fe=l=>{if(!o.disabled&&o.isMultiple){const s=[],a=[];te.value.forEach(g=>{l.value?n.isExistValue(o.selectId,g)||s.push(g):n.isExistValue(o.selectId,g)&&(ne[g]?.isDisabled||a.push(g))});const p=n.getArrClone(o.selectId);a.length>0&&a.forEach(g=>{const D=p.indexOf(g);D>-1&&p.splice(D,1)}),s.length>0&&s.forEach(g=>{n.isExistValue(p,g)||p.push(g)});const m=[];p.forEach(g=>{(!j(g)||n.isExistValue(o.selectId,g))&&m.push(g)}),_("onChange",m)}},Q=l=>{if(l.id==null||typeof l.id!="string"&&(typeof l.id!="number"||!n.isFinite(l.id))||l.isDisabled||o.disabled)return;const s=l.id.toString(),a=se(s);_("onChange",a)};return O({initOpenShow:l=>{l?R||(N.onListener(window,"keydown",q),N.onListener(window,"keyup",H),R=!0):R&&(N.offListener(window,"keydown",q),N.offListener(window,"keyup",H),R=!1)}}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"select-inDropdown-container",id:e.unref(Z),ref_key:"refElRoot",ref:I},[c.isSearch?(e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(Oe._sfc_main,{ref_key:"refElSearch",ref:E,placeholder:c.searchPlaceholder,disabled:c.disabled,onOnChange:me},null,8,["placeholder","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),c.isMultiple&&c.isCheckBoxAll&&k.value.length>0?(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(De._sfc_main,{forId:`${ee}-cb-all`,label:e.unref(X).checkboxAll,value:he.value,disabled:c.disabled,onOnChange:fe},null,8,["forId","label","value","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),k.value.length>0?(e.openBlock(),e.createBlock(e.unref(r),{key:4,class:"select-inDropdown-body select-inDropdown-scroller",role:"listbox",style:e.normalizeStyle({height:Math.min(k.value.length*Se,We)+"px"}),items:k.value,"item-size":Se,"key-field":"id",ref_key:"refElScroller",ref:P,onScrollEnd:ue},{default:e.withCtx(({item:a})=>[e.createElementVNode("div",{role:"option","aria-selected":oe(a),"aria-disabled":a.isDisabled||!1,class:e.normalizeClass({"option-selected":oe(a),"option-disabled":a.isDisabled,"option-hoverKeydown":J.value===a.id.toString(),"select-inDropdown-item-child":a._level>=1}),style:e.normalizeStyle({height:Se+"px",paddingLeft:a._level?a._level*ze+"px":void 0}),onClick:p=>Q(a)},[e.createElementVNode("div",$e,[c.isMultiple?(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(De._sfc_main,{name:`${ee}-cb`,forId:`${ee}-cb-${a.id}`,value:oe(a),indeterminate:pe(a),disabled:a.isDisabled},null,8,["name","forId","value","indeterminate","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"select-inDropdown-title",innerHTML:ge(a)},null,8,He)])],14,Re)]),_:1},8,["style","items"])):(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("div",je,e.toDisplayString(e.unref(X).noResultsText),1)]))],8,Ae))}}),Ge=["id"],Xe={class:"select-inTag-title"},Qe={class:"select-inTag-operate"},Ye={class:"select-inTag-body"},Ze=e.defineComponent({name:"ClSelectInTags",__name:"Tags",props:{id:String,showTextFormat:String,selectId:{type:Array,default:()=>[]}},emits:{onRemove:c=>!0},setup(c,{emit:O}){const L=c,r=O,o=L.id,{optPageLanguage:_,getPageLanguage:X}=be.useLanguage();X("common");const Y=e.inject("$SelectTop",{}),T=typeof Y.getSelectData=="function",M=e.computed(()=>T?n.isArray(L.selectId)?Y.getSelectData(L.selectId):[]:[]),E=e.computed(()=>T?M.value.length:0),P=e.computed(()=>n.isArray(M.value)?M.value.some(w=>n.isObject(w)?!(n.isBoolean(w.isDisabled)&&w.isDisabled):!1):!1),I=()=>{const w=M.value;if(!n.isArray(w))return;const f=[];let F=!1;w.forEach(B=>{if(!n.isObject(B))return;(n.isBoolean(B.isDisabled)?!!B.isDisabled:!1)?(typeof B.id=="string"&&!n.isEmpty(B.id)||typeof B.id=="number"&&n.isFinite(B.id))&&f.push(B.id.toString()):F=!0}),F&&r("onRemove",f)},S=w=>{if(!n.isArray(L.selectId)||n.isEmpty(w))return;const f=String(w),F=L.selectId.findIndex(Z=>String(Z)===f);if(F===-1)return;const B=n.getArrClone(L.selectId);B.splice(F,1),r("onRemove",B)};return(w,f)=>(e.openBlock(),e.createElementBlock("div",{class:"select-inTag-container",id:e.unref(o)},[e.createElementVNode("div",Xe,[e.createElementVNode("span",null,e.toDisplayString(e.unref(_).selected)+" "+e.toDisplayString(E.value)+" "+e.toDisplayString(e.unref(_).count),1),e.createElementVNode("span",Qe,[P.value?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,class:"select-inTag-deleteAll",name:"remove",title:e.unref(_).deleteAll,"aria-label":e.unref(_).deleteAll,onClick:I},null,8,["title","aria-label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),e.createElementVNode("div",Ye,[e.createVNode(Fe._sfc_main,{showTextFormat:c.showTextFormat,list:M.value,onOnRemove:S},null,8,["showTextFormat","list"])])],8,Ge))}}),et=["id"],tt={key:0,class:"select-inText-num"},nt=e.defineComponent({name:"ClSelect",__name:"Index",props:{id:String,value:[String,Number],className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},placeholder:String,classDropDown:String,theme:{type:String,default:"default",validator:c=>["default","noBorder"].includes(c)},multiple:{type:Boolean,default:!1},isClear:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},isCheckBoxAll:{type:Boolean,default:!0},isShowTag:{type:Boolean,default:!0},arrowDirection:{type:String,default:"right",validator:c=>["left","right"].includes(c)},transitionLeave:{type:String,default:"zoomOutTop"},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:c=>["||","&&"].includes(c)},showTextFormat:String,showDropDownTextFormat:String,multipleRealTimeChange:{type:Boolean,default:!1},isCascade:{type:Boolean,default:!1},parentSelectable:{type:Boolean,default:!1},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},showDropDownTextFormatSub:String,isOutMerge:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "},onOpenBefore:Function,serverCallback:Function,appendContainer:{type:String,default:""}},emits:{"update:value":c=>!0,"update:modelValue":c=>!0,onChange:(c,O)=>!0,onInit:()=>!0,onOpen:c=>!0,onError:c=>!0},setup(c,{expose:O,emit:L}){const r=c,o=L,_=e.useTemplateRef("refElDropdownLayer"),X=e.useTemplateRef("refElList"),Y=e.useTemplateRef("refElTags"),T=`select-${n.getRandom(8)}`,M=r.id,E=e.reactive({isOpen:!1,dropDownPos:"down",tagHeight:"",tagLeft:"",tagDirection:"right"});let P=[],I={};const S={childrenMap:{},parentMap:{},lastChildMap:{},allChildMap:{}},w=e.ref(!1),f=e.ref([]),F=e.ref([]),B=e.ref([]);let Z=!1;const ee=e.computed(()=>n.isNonEmptyString(r.showTextFormat)?r.showTextFormat:r.isCascade?"${name}(${parentName})":""),R=e.computed(()=>{let t={"panel-select":!0};return r.theme==="noBorder"&&(t["select-theme-noBorder"]=!0),t=n.getJsonMerge(t,N.getClassNameJson(r.className)),n.getStringByJson(t," ")}),J=e.computed(()=>`${R.value} cl-plaintext-value`),k=e.computed(()=>{const t=n.isString(r.plaintextSeparator)?r.plaintextSeparator:",";return B.value.join(t)}),te=e.computed(()=>Ve.getPlaintextOutText("select",r.plaintextEmptyText,k.value,r.value)),ne=e.computed(()=>{let t={"select-inDropdown":!0};return r.theme==="noBorder"&&(t["select-inDropdown-noBorder"]=!0),E.isOpen&&r.multiple&&r.isShowTag&&(t["select-inTag-ext"]=!0,t[`select-inTag-${E.tagDirection}`]=!0),t=n.getJsonMerge(t,N.getClassNameJson(r.classDropDown)),n.getStringByJson(t," ")}),re=e.computed(()=>{const t={"select-inTag":!0,"select-inTag-open":E.isOpen};return t[`select-inTag-${E.dropDownPos}`]=!0,t[`select-inTag-${E.tagDirection}`]=!0,t}),oe=t=>{o("update:value",t),o("update:modelValue",t)},pe=(t,i)=>{oe(t),o("onChange",t,i)},he=()=>{Z||(Z=!0,e.nextTick(()=>{o("onInit")}))},ge=t=>{e.nextTick(()=>{o("onOpen",t)})},j=()=>{const t=[];return f.value.forEach(i=>{n.isExistJsonKey(I,i)&&t.push(i)}),t},W=t=>{if(n.isEmpty(t)||!n.isArray(t))return;const i={},u=r.parentKey,h=r.topParentValue;if(t.forEach(d=>{if(!n.isObject(d)){G.warn("ClSelect","_convertListToJson 跳过非对象数据项:",d);return}if(!(typeof d.id=="string"||typeof d.id=="number"&&n.isFinite(d.id))){G.warn("ClSelect","_convertListToJson 跳过无 id 或 id 类型异常的数据项:",d);return}const b=d.id.toString();i[b]=n.getJsonClone(d)}),I=n.getJsonMerge(I,i),r.serverCallback&&!w.value&&!n.isEmpty(i)&&(w.value=!0,r.value!=null&&r.value!==""&&(H(r.value),q())),r.isCascade&&Object.keys(I).forEach(d=>{const v=I[d][u],b=v!=null&&(typeof v=="string"||typeof v=="number")?v.toString():"";if(b!==""&&b!==String(h)){const A=I[b];A?.name&&(I[d].parentName=A.name)}}),r.isCascade&&(z(),r.isOutMerge&&r.multiple&&f.value.length>0)){const d=se(f.value);n.isEqualArr(f.value,d)||(f.value=d,P=d)}if(r.multiple&&f.value.length>1){const d=f.value.filter(v=>{const b=I[v];return n.isBoolean(b?._isTypeRadio)&&b._isTypeRadio});if(d.length>1){const v=d[d.length-1],b=f.value.filter(A=>A===v||!d.includes(A));n.isEqualArr(f.value,b)||(f.value=b,Q())}}f.value.length>0&&(f.value=[...f.value])},z=()=>{const t=r.parentKey,i=r.topParentValue;S.childrenMap={},S.parentMap={},S.lastChildMap={},S.allChildMap={},Object.keys(I).forEach(h=>{const v=I[h][t],b=v!=null&&(typeof v=="string"||typeof v=="number")?v.toString():"";b!==""&&b!==String(i)&&(S.parentMap[h]=b,S.childrenMap[b]||(S.childrenMap[b]=[]),S.childrenMap[b].push(h))})},ie=t=>{const i=(u,h)=>{if(S.lastChildMap[u])return S.lastChildMap[u];if(h.has(u))return[];h.add(u);const d=S.childrenMap[u];if(!d||d.length===0)return S.lastChildMap[u]=[u],[u];const v=[];return d.forEach(b=>{v.push(...i(b,new Set(h)))}),S.lastChildMap[u]=v,v};return i(t,new Set)},ce=t=>{const i=(u,h)=>{if(S.allChildMap[u])return S.allChildMap[u];if(h.has(u))return[];h.add(u);const d=S.childrenMap[u];if(!d||d.length===0)return S.allChildMap[u]=[],[];const v=[];d.forEach(A=>{v.push(A),v.push(...i(A,new Set(h)))});const b=Array.from(new Set(v));return S.allChildMap[u]=b,b};return i(t,new Set)},ye=t=>{if(t.length===0)return[];const i=new Set(t),u=new Set,h=new Set;for(const d of i){const v=S.parentMap[d];v&&!h.has(v)&&u.add(v)}for(;u.size>0;){const d=u.values().next().value;if(u.delete(d),h.has(d))continue;h.add(d);const v=S.childrenMap[d];if(!v||v.length===0)continue;let b=!0;for(const A of v)if(!i.has(A)){b=!1;break}if(b){for(const Ee of v)i.delete(Ee);i.add(d);const A=S.parentMap[d];A&&!h.has(A)&&u.add(A)}}return[...i]},se=t=>{if(t.length===0)return[];const i=[];return t.forEach(u=>{i.push(...ie(u))}),n.getArrUnique(i)},le=t=>!r.isCascade||!r.multiple?t:r.isOutMerge?ye(t):se(t),q=()=>{if(w.value&&!n.isEmpty(f.value)){if(n.isEmpty(I)||r.serverCallback)return;const t=j();if(!n.isEqualArr(f.value,t)){const i=f.value.filter(h=>!t.includes(h));i.length>0&&G.warn("ClSelect","以下 id 在数据列表中不存在,已自动清除:",i),f.value=t,P=t;const u=le(t);oe(u.join(","))}}},H=t=>{if(t!=null&&typeof t!="string"&&(typeof t!="number"||!n.isFinite(t))){G.warn("ClSelect","setValue 收到非预期类型值:",typeof t,t);return}let i=t==null||t===""?[]:t.toString().split(",").filter(h=>h!=="");i=n.getArrUnique(i),r.isCascade&&r.isOutMerge&&i.length>0&&r.multiple&&(i=se(i));let u=n.isEqualArr(f.value,i);u&&(u=i.join(",")===f.value.join(",")),u||(P=i,f.value=i)},U=t=>n.isExistJsonKey(I,t)?n.getJsonClone(I[t]):{},ue=t=>{const i=n.isArray(t)?t:f.value,u=[];return i.forEach(h=>{const d=U(h);n.isEmpty(d)||u.push(d)}),u},de=t=>{const u=r.isCascade&&!r.multiple&&(S.childrenMap[t.id?.toString()]?.length>0||!S.parentMap[t.id?.toString()])&&n.isEmpty(r.showTextFormat)?"":ee.value;let h=n.isEmpty(u)?t.name??"":n.convertStringFormat(u,t);return n.isHtml(h)?h=n.isEmpty(u)?n.encodeHTML(t.name):n.convertStringFormatEncodeHTML(u,t):typeof h=="string"&&h.indexOf("<")>-1&&(h=n.encodeHTML(h)),h},me=t=>{if(n.isNonEmptyString(r.showTextFormat))return n.removeHTMLTags(de(t));const i=n.isString(r.plaintextLevelSeparator)?r.plaintextLevelSeparator:" > ",u=n.isString(t?.name)?t.name:"",h=n.isString(t?.parentName)?t.parentName:"",d=r.isCascade&&n.isNonEmptyString(h)?`${h}${i}${u}`:u;return n.removeHTMLTags(d)},fe=()=>{const t=ue();F.value=t.map(i=>de(i)),B.value=f.value.map(i=>{const u=U(i);return n.isEmpty(u)?i:me(u)})},Q=()=>{const t=j();P=t,f.value=t;const i=le(t),u=i.join(",");let h;if(r.multiple){const d=[];i.forEach(v=>{const b=U(v);n.isEmpty(b)||d.push(b)}),h=d}else h=U(u),n.isEmpty(h)&&(h=null);pe(u,h)},ve=()=>{E.isOpen||!n.isEqualArr(f.value,P)&&Q()},l=()=>{w.value||(w.value=!0,W(r.list),H(r.value),q())},s=()=>{!w.value&&r.list&&r.list.length>0&&l()},a=()=>{import("vue-virtual-scroller").then(()=>{Promise.resolve().then(()=>require("./vue-virtual-scroller-C_hlZMj5.js"))})};e.onMounted(()=>{r.isPlaintext||a(),e.nextTick(()=>{s()})}),e.watch(w,t=>{t&&he()}),e.watch(()=>r.list,(t,i)=>{w.value||(t&&t.length>0||i===void 0)&&(w.value=!0)}),e.watch([()=>r.value,()=>r.list],([t,i],[u,h])=>{const d=i||[];!w.value&&d.length>0&&(w.value=!0),i!==h&&(I={},S.childrenMap={},S.parentMap={},S.lastChildMap={},S.allChildMap={}),W(d),t!==void 0&&H(t),q()}),e.watch([f,()=>r.list],([t,i])=>{i&&i.length>0&&n.isEmpty(I)&&W(i),fe()}),e.watch(()=>r.isOutMerge,()=>{r.isCascade&&r.multiple&&f.value.length>0&&le(j()).join(",")!==String(r.value??"")&&Q()}),e.watch([()=>r.parentKey,()=>r.topParentValue],()=>{r.isCascade&&!n.isEmpty(I)&&z()});const p=t=>{t&&r.disabled||(E.isOpen=t,t?P=f.value:ve(),e.nextTick(()=>{X.value&&X.value.initOpenShow(t)}),ge(t))},m=()=>{r.disabled||(f.value=[],r.multiple&&r.multipleRealTimeChange?Q():ve())},g=t=>{if(E.dropDownPos=t.use.dropDownPos,r.multiple&&r.isShowTag){const i=Y.value?.$el?.offsetWidth||0;E.tagHeight=r.theme==="default"?`${t.original.dropDownHeight+1}px`:`${t.original.dropDownHeight}px`;const u=t.original.winWidth-(t.original.controlOffset.left+t.original.dropDownWidth)>=i?"right":"left";E.tagDirection=u,u==="right"?E.tagLeft=`${t.original.dropDownWidth-1}px`:E.tagLeft=`${(t.original.dropDownWidth-t.original.textWidth+i+1)*-1}px`}},D=t=>{f.value=t,r.multiple?r.multipleRealTimeChange&&Q():_.value?.setOpen(!1)},y=t=>{r.disabled||(f.value=t,Q())},x=t=>{o("onError",t)},V=()=>{_.value&&(_.value.checkIsShowOpen()||_.value.initCompleteOpen())};e.provide("$SelectTop",{getSelectData:ue,getSelectValueInfo:U,getAllChildIds:ce,calculationDropdownPosition:()=>{_.value?.calculationPosition()},convertListToJson:W,closeDropdown:()=>{_.value?.setOpen(!1)},refreshDisplayLabels:()=>{fe()}});const C=()=>{const t=j();return le(t).join(",")};return O({getValue:C,getValueData:()=>{const t=C();if(r.multiple){const u=t?t.split(","):[],h=[];return u.forEach(d=>{const v=U(d);n.isEmpty(v)||h.push(v)}),h}if(!t)return null;const i=U(t);return n.isEmpty(i)?null:i},setValue:t=>{H(t),q()},runInitComplete:()=>{l()}}),(t,i)=>c.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(M),class:e.normalizeClass(J.value)},e.toDisplayString(te.value),11,et)):(e.openBlock(),e.createBlock(Le._sfc_main,{key:1,id:e.unref(M),ref_key:"refElDropdownLayer",ref:_,classParent:R.value,classText:"select-inText",classDropDown:ne.value,placeholder:c.placeholder,isDisabled:c.disabled,isClear:c.isClear,textLabel:F.value.join(","),textArrowDirection:c.arrowDirection,transitionLeave:c.transitionLeave,appendContainer:c.appendContainer,appendFollowWidth:c.theme!=="noBorder",onOpenBeforeCallback:c.onOpenBefore,onOnChangeOpen:p,onOnClear:m,onOnChangePosition:g},{textExtend:e.withCtx(()=>[c.multiple?(e.openBlock(),e.createElementBlock("span",tt,[F.value.length>1?(e.openBlock(),e.createBlock(Me._sfc_main,{key:0,num:F.value.length},null,8,["num"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),dropdown:e.withCtx(()=>[e.createVNode(Ue,{ref_key:"refElList",ref:X,isSearch:c.isSearch,searchPlaceholder:c.searchPlaceholder,searchKey:c.searchKey,searchKeyType:c.searchKeyType,isMultiple:c.multiple,isCheckBoxAll:c.isCheckBoxAll,showDropDownTextFormat:c.showDropDownTextFormat,showDropDownTextFormatSub:c.showDropDownTextFormatSub,isCascade:c.isCascade,parentSelectable:c.parentSelectable,parentKey:c.parentKey,topParentValue:c.topParentValue,originalData:c.list,keyIndex:T,selectId:f.value,disabled:c.disabled,isOpen:E.isOpen,serverCallback:c.serverCallback,onOnChange:D,onOnInitComplete:V,onOnError:x},null,8,["isSearch","searchPlaceholder","searchKey","searchKeyType","isMultiple","isCheckBoxAll","showDropDownTextFormat","showDropDownTextFormatSub","isCascade","parentSelectable","parentKey","topParentValue","originalData","selectId","disabled","isOpen","serverCallback"])]),dropdownExtend:e.withCtx(()=>[c.multiple&&c.isShowTag?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(re.value),style:e.normalizeStyle({height:E.tagHeight,left:E.tagLeft}),ref_key:"refElTags",ref:Y},[e.createVNode(Ze,{showTextFormat:ee.value,selectId:f.value,onOnRemove:y},null,8,["showTextFormat","selectId"])],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:1},8,["id","classParent","classDropDown","placeholder","isDisabled","isClear","textLabel","textArrowDirection","transitionLeave","appendContainer","appendFollowWidth","onOpenBeforeCallback"]))}});exports._sfc_main=nt;
@@ -0,0 +1 @@
1
+ "use strict";const a=require("vue"),o=require("@cldemo/ui-kit/common/base"),W=require("@cldemo/ui-kit/common/Element"),H=require("@cldemo/ui-kit/common/globalConfig"),Q=require("./language-BJ4aVgHI.js"),X=require("./Validate.vue_vue_type_script_setup_true_lang-W46p_d7L.js"),Y=require("./Index.vue_vue_type_script_setup_true_lang-DvN-fBNd.js");;/* empty css */const Z=["id"],ee=["id"],te=a.defineComponent({name:"ClSelectCascade",__name:"Index",props:{id:String,value:[String,Number],className:{type:String,default:""},disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},placeholder:String,isClear:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},width:String,isCheckValidate:{type:Boolean,default:!1},validateRules:{type:Array,default:()=>[{r:"required"}]},isShowInMsg:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextLevelSeparator:{type:String,default:" > "}},emits:{"update:value":p=>!0,"update:modelValue":p=>!0,onChange:p=>!0},setup(p,{expose:w,emit:B}){const r=p,_=B,{optPageLanguage:L,getPageLanguage:D}=Q.useLanguage();D("common");const N=`selectCascade-${o.getRandom(5)}`,C=r.id,u=a.reactive({lastValue:r.value,isFirstDataFinish:!1}),m=a.ref([]),d={dataJson:{},dataGroup:{},parentIdsJson:{}},I=a.ref(0),k=a.computed(()=>L.value.pleaseSelect),F=a.computed(()=>{const{placeholder:e}=r;return o.isNonEmptyString(e)?e.split("|"):[]}),K=a.computed(()=>{const{width:e}=r;return o.isNonEmptyString(e)?e.split("|"):[]}),q=a.computed(()=>{let e={"panel-select-cascade":!0};return e=o.getJsonMerge(e,W.getClassNameJson(r.className)),e}),b=e=>{e!==u.lastValue&&(u.lastValue=e,_("update:value",e),_("update:modelValue",e),_("onChange",e))},P=e=>o.isExistJsonKey(d.dataGroup,e),T=e=>P(e)?d.dataGroup[e]:[],E=e=>o.isExistJsonKey(d.dataJson,e)?d.dataJson[e]:null,S=()=>`top_${r.topParentValue}`,J=e=>{const{parentKey:t,topParentValue:s}=r,l={},n={};o.isEmpty(e)||e.forEach(c=>{const i=o.getJsonClone(c);if(o.isEmpty(i?.id)||o.isEmpty(i?.[t]))return;const g=i.id.toString(),f=i[t].toString();l[g]=i;const h=f===s.toString()?S():f;o.isExistJsonKey(n,h)||(n[h]=[]),n[h].push(i)}),d.dataJson=l,d.dataGroup=n,I.value+=1},y=(e,t)=>{const s={idx:e,pId:t,placeholder:k.value,list:[],sty:{},selected:""};if(!o.isEmpty(t)){const i=T(t);s.list=o.getListClone(i)}const l=F.value,n=l.length;n>0&&(n>e?s.placeholder=o.isEmpty(l[e])?k.value:l[e]:n===1&&(s.placeholder=l[0]));const c=K.value;return c.length>e&&(o.isEmpty(c[e])||(s.sty.width=c[e],s.sty.flex="none")),s},V=(e,t)=>{const{parentKey:s,topParentValue:l}=r;let n=[];if(t&&t.indexOf(e)>-1)return[];const c=t?t.concat([e]):[e];if(o.isExistJsonKey(d.parentIdsJson,e))n=d.parentIdsJson[e];else{const i=E(e);if(i!=null){const g=i[s].toString();if(g!==l.toString()){const f=E(g);if(f!=null){n.push(g);const h=V(g,c);h.length>0&&(n=n.concat(h))}}}d.parentIdsJson[e]=n}return n},v=e=>{let t=o.isUndefined(e)?r.value:e;t!=null&&!o.isEmpty(t)&&!o.isExistJsonKey(d.dataJson,t.toString())&&(t="");const s=[];if(t==null||o.isEmpty(t))s.push(y(0,S())),s.push(y(1,""));else{const l=t.toString(),n=[...V(l)].reverse(),c=n.length;if(c>0){n.forEach((g,f)=>{const h=f===0?S():n[f-1],x=y(f,h);x.selected=g,s.push(x)});const i=y(c,n[c-1]);i.selected=l,s.push(i)}else{const i=y(0,S());i.selected=l,s.push(i)}}m.value=s},M=()=>{J(r.list),v(),u.isFirstDataFinish=!0,u.lastValue=r.value};a.onMounted(()=>{a.nextTick(()=>{M()})}),a.watch(()=>r.value,e=>{e!==u.lastValue&&u.isFirstDataFinish&&(v(),u.lastValue=e)}),a.watch(()=>r.list,e=>{if(!u.isFirstDataFinish){u.isFirstDataFinish=!0;return}d.parentIdsJson={},J(e);const{value:t}=r,s=t!=null&&!o.isEmpty(t)&&o.isExistJsonKey(d.dataJson,t.toString())?t:"";v(s),u.lastValue=s});const O=()=>!0,G=(e,t)=>{let s="";if(o.isEmpty(e)&&t===0)v("");else if(o.isEmpty(e)){if(m.value.splice(t+1),t>0){const l=m.value[t-1];l&&(s=l.selected)}}else{const l=e.toString();P(l)?(m.value.splice(t+1),m.value.push(y(t+1,l))):(s=e,m.value.splice(t+1))}b(s)},R=()=>u.lastValue,j=e=>{const t=V(e),s=t.length>0?t.slice().reverse().concat([e]):[e],l=[];return s.forEach(n=>{const c=d.dataJson[n];c!=null&&!o.isEmpty(c.name)&&l.push(c.name)}),l},$=()=>{const e=u.lastValue;let t="";return e!=null&&!o.isEmpty(e)&&(t=j(e.toString()).join(" → ")),{value:e,show:t||(e!=null?e.toString():"")}},U=e=>{const t=[],s=new Set;let l=e;for(;o.isNonEmptyString(l)&&!s.has(l);){s.add(l);const n=E(l);if(n==null)break;o.isNonEmptyString(n.name)&&t.unshift(n.name);const c=n[r.parentKey],i=c!=null?String(c):"";if(i===""||i===String(r.topParentValue))break;l=i}return t},z=a.computed(()=>{r.list,I.value;const e=u.lastValue;if(e==null||o.isEmpty(e))return"";const t=o.isString(r.plaintextLevelSeparator)?r.plaintextLevelSeparator:" > ",s=U(e.toString());return s.length>0?s.join(t):e.toString()}),A=a.computed(()=>H.getPlaintextOutText("selectCascade",r.plaintextEmptyText,z.value,r.value));return w({getValue:R,getValueData:$,setValue:e=>{v(e),u.lastValue=e}}),(e,t)=>p.isPlaintext?(a.openBlock(),a.createElementBlock("div",{key:0,id:a.unref(C),class:"cl-plaintext-value"},a.toDisplayString(A.value),9,Z)):(a.openBlock(),a.createElementBlock("div",{key:1,id:a.unref(C),class:a.normalizeClass(q.value)},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(m.value,(s,l)=>(a.openBlock(),a.createElementBlock("div",{key:`${N}-${l}`,class:"selectCascade-item",style:a.normalizeStyle(s.sty)},[a.createVNode(X._sfc_main,{isShowMsg:p.isShowInMsg,isCheck:p.isCheckValidate,checkValue:s.selected,rules:p.validateRules},{default:a.withCtx(()=>[a.createVNode(Y._sfc_main,{isClear:p.isClear,isSearch:p.isSearch,placeholder:s.placeholder,list:s.list,disabled:p.disabled,value:s.selected,"onUpdate:value":n=>s.selected=n,onOpenBefore:O,onOnChange:n=>G(n,l)},null,8,["isClear","isSearch","placeholder","list","disabled","value","onUpdate:value","onOnChange"])]),_:2},1032,["isShowMsg","isCheck","checkValue","rules"])],4))),128))],10,ee))}});exports._sfc_main=te;
@@ -1,10 +1,11 @@
1
- import { defineComponent as R, useTemplateRef as A, reactive as K, ref as U, computed as c, onMounted as $, onBeforeUnmount as q, watch as z, openBlock as m, createElementBlock as g, normalizeStyle as J, normalizeClass as G, unref as L, Fragment as y, createTextVNode as j, toDisplayString as O, withDirectives as Q, createElementVNode as W, vModelText as X, createBlock as Y, withModifiers as Z, nextTick as ee } from "vue";
1
+ import { defineComponent as A, useTemplateRef as K, reactive as U, ref as $, computed as u, onMounted as q, onBeforeUnmount as z, watch as J, openBlock as m, createElementBlock as h, normalizeStyle as O, normalizeClass as G, unref as L, Fragment as y, createTextVNode as j, toDisplayString as Q, withDirectives as W, createElementVNode as X, vModelText as Y, createBlock as Z, withModifiers as ee, nextTick as te } from "vue";
2
2
  import l from "@cldemo/ui-kit/common/base";
3
- import te from "@cldemo/ui-kit/common/Element";
4
- import { _ as ae } from "./Index.vue_vue_type_script_setup_true_lang-C2LGy18j.js";
3
+ import { getPlaintextOutText as ae } from "@cldemo/ui-kit/common/globalConfig";
4
+ import le from "@cldemo/ui-kit/common/Element";
5
+ import { _ as ne } from "./Index.vue_vue_type_script_setup_true_lang-C2LGy18j.js";
5
6
  /* empty css */
6
7
  /* empty css */
7
- const le = ["id"], ne = ["name", "placeholder", "disabled", "aria-label"], d = "100px", de = /* @__PURE__ */ R({
8
+ const ie = ["id"], oe = ["name", "placeholder", "disabled", "aria-label"], d = "100px", ve = /* @__PURE__ */ A({
8
9
  name: "ClInputTextarea",
9
10
  __name: "Index",
10
11
  props: {
@@ -72,33 +73,40 @@ const le = ["id"], ne = ["name", "placeholder", "disabled", "aria-label"], d = "
72
73
  type: Boolean,
73
74
  default: !1
74
75
  // desc: 是否纯文本只读模式,只渲染文本不挂载文本域(\n 与 <br> 均按换行呈现)
76
+ },
77
+ plaintextEmptyText: {
78
+ type: String,
79
+ default: void 0
80
+ // desc: 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段)
75
81
  }
76
82
  },
77
83
  emits: ["update:value", "update:modelValue", "onChange", "onInit", "onKeydownEnter", "onKeyupEnter", "onFocus", "onBlur", "onChangeDelay"],
78
- setup(u, { expose: C, emit: D }) {
79
- const t = u, o = D, T = t.id, p = A("refElTextarea"), h = K({
84
+ setup(c, { expose: T, emit: C }) {
85
+ const t = c, o = C, D = t.id, p = K("refElTextarea"), f = U({
80
86
  height: t.height || d
81
- }), s = U(l.isString(t.value) ? t.value : ""), n = {
87
+ }), s = $(l.isString(t.value) ? t.value : ""), n = {
82
88
  lastValue: l.isString(t.value) ? t.value : "",
83
89
  prevDelayValue: l.isString(t.value) ? t.value : "",
84
90
  valueDelayRun: !1
85
- }, S = c(() => {
91
+ }, S = u(() => {
86
92
  let e = t.name;
87
93
  return l.isEmpty(e) && (e = `textarea_${l.getRandom(8)}`), e;
88
- }), V = c(() => t.isClean && !t.disabled && !l.isEmpty(s.value)), k = c(() => {
94
+ }), V = u(() => t.isClean && !t.disabled && !l.isEmpty(s.value)), k = u(() => {
89
95
  let e = {
90
96
  "panel-input-textarea": !0,
91
97
  // 纯文本模式无清除图标,不再预留图标位
92
98
  "textarea-clean": t.isClean && !t.isPlaintext
93
99
  };
94
- return t.isPlaintext && (e["cl-plaintext-value"] = !0, e["cl-plaintext-value-pre"] = !0), e = l.getJsonMerge(e, te.getClassNameJson(t.className)), e;
95
- }), _ = c(() => {
100
+ return t.isPlaintext && (e["cl-plaintext-value"] = !0, e["cl-plaintext-value-pre"] = !0), e = l.getJsonMerge(e, le.getClassNameJson(t.className)), e;
101
+ }), _ = u(() => {
96
102
  const e = s.value;
97
103
  return l.isString(e) ? e.replace(/<\/?br\s*\/?>/gi, `
98
104
  `) : "";
99
- }), B = c(() => {
105
+ }), B = u(
106
+ () => ae("inputTextarea", t.plaintextEmptyText, _.value, t.value)
107
+ ), P = u(() => {
100
108
  const { width: e, heightMax: a } = t, r = {};
101
- return l.isNonEmptyString(e) && (r.width = e), t.isPlaintext || (l.isEmpty(h.height) || (r.height = h.height), l.isNonEmptyString(a) && (r["max-height"] = a)), r;
109
+ return l.isNonEmptyString(e) && (r.width = e), t.isPlaintext || (l.isEmpty(f.height) || (r.height = f.height), l.isNonEmptyString(a) && (r["max-height"] = a)), r;
102
110
  });
103
111
  let i;
104
112
  const H = (e) => {
@@ -108,101 +116,101 @@ const le = ["id"], ne = ["name", "placeholder", "disabled", "aria-label"], d = "
108
116
  },
109
117
  Math.max(t.changeDelayTime, 0)
110
118
  );
111
- }, v = (e) => {
119
+ }, x = (e) => {
112
120
  e !== n.lastValue && (n.lastValue = e, o("update:value", e), o("update:modelValue", e), o("onChange", e), H(e));
113
- }, f = () => {
121
+ }, g = () => {
114
122
  if (t.isAutoHeight) {
115
123
  const e = p.value;
116
124
  if (e) {
117
125
  e.style.height = t.height || d;
118
126
  const a = e.scrollHeight + e.scrollTop + (e.offsetHeight - e.clientHeight);
119
- e.style.height = "100%", h.height = a > 0 ? `${a}px` : t.height || d;
127
+ e.style.height = "100%", f.height = a > 0 ? `${a}px` : t.height || d;
120
128
  }
121
129
  }
122
- }, x = () => {
130
+ }, v = () => {
123
131
  p.value?.focus();
124
132
  }, b = () => {
125
- ee(() => {
133
+ te(() => {
126
134
  o("onInit");
127
135
  });
128
136
  };
129
- $(() => {
137
+ q(() => {
130
138
  b();
131
- }), q(() => {
139
+ }), z(() => {
132
140
  i && (clearTimeout(i), i = null);
133
- }), z(
141
+ }), J(
134
142
  () => t.value,
135
143
  (e, a) => {
136
- e !== a && (s.value = l.isString(e) ? e : "", n.lastValue = l.isString(e) ? e : "", requestAnimationFrame(() => f()), n.valueDelayRun || (n.prevDelayValue = e || ""));
144
+ e !== a && (s.value = l.isString(e) ? e : "", n.lastValue = l.isString(e) ? e : "", requestAnimationFrame(() => g()), n.valueDelayRun || (n.prevDelayValue = e || ""));
137
145
  }
138
146
  );
139
- const P = (e) => {
147
+ const I = (e) => {
140
148
  const a = e.target;
141
149
  if (!a) return;
142
150
  const r = a.value;
143
- requestAnimationFrame(() => f()), v(r);
144
- }, I = (e) => {
145
- e.key === "Enter" && o("onKeydownEnter", e);
151
+ requestAnimationFrame(() => g()), x(r);
146
152
  }, N = (e) => {
153
+ e.key === "Enter" && o("onKeydownEnter", e);
154
+ }, M = (e) => {
147
155
  e.key === "Enter" && o("onKeyupEnter", e);
148
- }, M = () => {
149
- s.value = "", v(""), x();
150
156
  }, w = () => {
151
- o("onFocus");
157
+ s.value = "", x(""), v();
152
158
  }, F = () => {
159
+ o("onFocus");
160
+ }, R = () => {
153
161
  o("onBlur");
154
162
  }, E = () => l.trim(s.value);
155
- return C({
163
+ return T({
156
164
  getValue: E,
157
165
  getValueData: () => ({ value: E(), show: s.value }),
158
166
  setValue: (e) => {
159
167
  i && (clearTimeout(i), i = null, n.valueDelayRun = !1);
160
168
  const a = l.isEmpty(e) ? "" : e;
161
- n.lastValue = a, n.prevDelayValue = a, s.value = a, f();
169
+ n.lastValue = a, n.prevDelayValue = a, s.value = a, g();
162
170
  },
163
171
  initHeight: () => {
164
- h.height = t.height || d, t.isAutoHeight && f();
172
+ f.height = t.height || d, t.isAutoHeight && g();
165
173
  },
166
174
  focus: () => {
167
- x();
175
+ v();
168
176
  },
169
177
  getParentElement: () => p.value?.parentElement || null
170
- }), (e, a) => (m(), g("div", {
171
- id: L(T),
178
+ }), (e, a) => (m(), h("div", {
179
+ id: L(D),
172
180
  class: G(k.value),
173
- style: J(B.value)
181
+ style: O(P.value)
174
182
  }, [
175
- u.isPlaintext ? (m(), g(y, { key: 0 }, [
176
- j(O(_.value), 1)
177
- ], 64)) : (m(), g(y, { key: 1 }, [
178
- Q(W("textarea", {
183
+ c.isPlaintext ? (m(), h(y, { key: 0 }, [
184
+ j(Q(B.value), 1)
185
+ ], 64)) : (m(), h(y, { key: 1 }, [
186
+ W(X("textarea", {
179
187
  ref_key: "refElTextarea",
180
188
  ref: p,
181
189
  class: "form-control text-area",
182
190
  "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
183
191
  name: S.value,
184
- placeholder: u.placeholder,
185
- disabled: u.disabled,
186
- "aria-label": u.placeholder || "文本输入区域",
187
- onInput: P,
188
- onKeydown: I,
189
- onKeyup: N,
190
- onFocus: w,
191
- onBlur: F
192
- }, null, 40, ne), [
193
- [X, s.value]
192
+ placeholder: c.placeholder,
193
+ disabled: c.disabled,
194
+ "aria-label": c.placeholder || "文本输入区域",
195
+ onInput: I,
196
+ onKeydown: N,
197
+ onKeyup: M,
198
+ onFocus: F,
199
+ onBlur: R
200
+ }, null, 40, oe), [
201
+ [Y, s.value]
194
202
  ]),
195
- V.value ? (m(), Y(ae, {
203
+ V.value ? (m(), Z(ne, {
196
204
  key: 0,
197
205
  name: "close-circle-fill",
198
206
  class: "textarea-clear-icon",
199
207
  "aria-label": "清除输入内容",
200
- onClick: Z(M, ["stop"])
201
- })) : (m(), g(y, { key: 1 }, [], 64))
208
+ onClick: ee(w, ["stop"])
209
+ })) : (m(), h(y, { key: 1 }, [], 64))
202
210
  ], 64))
203
- ], 14, le));
211
+ ], 14, ie));
204
212
  }
205
213
  });
206
214
  export {
207
- de as _
215
+ ve as _
208
216
  };