@longhongguo/form-create-ant-design-vue 3.2.50 → 3.2.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/form-create.css +27 -14
- package/dist/form-create.esm.css +27 -14
- package/dist/form-create.esm.js +2 -2
- package/dist/form-create.esm.js.map +1 -1
- package/dist/form-create.js +2 -2
- package/dist/form-create.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CusSelect/index.vue +18 -1
- package/src/components/CusStoreSelect/index.vue +18 -5
- package/src/components/CusUserSelect/index.vue +20 -5
- package/src/core/maker.js +5 -0
- package/src/parsers/index.js +2 -0
- package/src/parsers/text.js +422 -0
- package/src/style/index.css +27 -14
package/dist/form-create.css
CHANGED
|
@@ -317,18 +317,21 @@
|
|
|
317
317
|
margin-bottom: 1px !important;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
._fc-table-form .ant-form-item-label,
|
|
320
|
+
._fc-table-form .ant-form-item-label,
|
|
321
|
+
._fc-table-form .van-field__label {
|
|
321
322
|
display: none !important;
|
|
322
323
|
}
|
|
323
324
|
|
|
324
|
-
._fc-tf-head-idx,
|
|
325
|
+
._fc-tf-head-idx,
|
|
326
|
+
._fc-tf-idx {
|
|
325
327
|
width: 40px;
|
|
326
328
|
min-width: 40px;
|
|
327
329
|
font-weight: 500;
|
|
328
330
|
text-align: center;
|
|
329
331
|
}
|
|
330
332
|
|
|
331
|
-
._fc-tf-edit,
|
|
333
|
+
._fc-tf-edit,
|
|
334
|
+
._fc-tf-btn {
|
|
332
335
|
width: 70px;
|
|
333
336
|
min-width: 70px;
|
|
334
337
|
text-align: center;
|
|
@@ -344,7 +347,8 @@
|
|
|
344
347
|
padding: 2px;
|
|
345
348
|
}
|
|
346
349
|
|
|
347
|
-
._fc-table-form._fc-disabled ._fc-tf-btn .fc-icon,
|
|
350
|
+
._fc-table-form._fc-disabled ._fc-tf-btn .fc-icon,
|
|
351
|
+
._fc-table-form._fc-disabled > .ant-btn {
|
|
348
352
|
cursor: not-allowed;
|
|
349
353
|
}
|
|
350
354
|
|
|
@@ -353,13 +357,13 @@
|
|
|
353
357
|
height: 100%;
|
|
354
358
|
overflow: hidden;
|
|
355
359
|
table-layout: fixed;
|
|
356
|
-
border: 1px solid #
|
|
360
|
+
border: 1px solid #ebeef5;
|
|
357
361
|
border-bottom: 0 none;
|
|
358
362
|
}
|
|
359
363
|
|
|
360
364
|
._fc-table-form ._fc-tf-table > thead > tr > th {
|
|
361
365
|
border: 0 none;
|
|
362
|
-
border-bottom: 1px solid #
|
|
366
|
+
border-bottom: 1px solid #ebeef5;
|
|
363
367
|
height: 40px;
|
|
364
368
|
font-weight: 500;
|
|
365
369
|
padding: 0 5px;
|
|
@@ -367,7 +371,7 @@
|
|
|
367
371
|
}
|
|
368
372
|
|
|
369
373
|
._fc-table-form ._fc-tf-table > thead > tr > th + th {
|
|
370
|
-
border-left: 1px solid #
|
|
374
|
+
border-left: 1px solid #ebeef5;
|
|
371
375
|
}
|
|
372
376
|
|
|
373
377
|
._fc-table-form tr {
|
|
@@ -388,14 +392,18 @@
|
|
|
388
392
|
overflow-wrap: break-word;
|
|
389
393
|
overflow: hidden;
|
|
390
394
|
border: 0 none;
|
|
391
|
-
border-bottom: 1px solid #
|
|
395
|
+
border-bottom: 1px solid #ebeef5;
|
|
392
396
|
}
|
|
393
397
|
|
|
394
398
|
._fc-table-form td + td {
|
|
395
|
-
border-left: 1px solid #
|
|
399
|
+
border-left: 1px solid #ebeef5;
|
|
396
400
|
}
|
|
397
401
|
|
|
398
|
-
._fc-tf-table .ant-input-number,
|
|
402
|
+
._fc-tf-table .ant-input-number,
|
|
403
|
+
._fc-tf-table .ant-select,
|
|
404
|
+
._fc-tf-table .ant-slider,
|
|
405
|
+
._fc-tf-table .ant-cascader,
|
|
406
|
+
._fc-tf-table .ant-picker {
|
|
399
407
|
width: 100%;
|
|
400
408
|
}
|
|
401
409
|
|
|
@@ -409,8 +417,8 @@
|
|
|
409
417
|
._fd-table-form {
|
|
410
418
|
min-height: 130px;
|
|
411
419
|
width: 100%;
|
|
412
|
-
border: 1px solid #
|
|
413
|
-
background: #
|
|
420
|
+
border: 1px solid #ececec;
|
|
421
|
+
background: #ffffff;
|
|
414
422
|
}
|
|
415
423
|
|
|
416
424
|
._fc-child-empty {
|
|
@@ -443,7 +451,8 @@
|
|
|
443
451
|
flex-shrink: 0;
|
|
444
452
|
}
|
|
445
453
|
|
|
446
|
-
._fd-tf-con .ant-form-item-label
|
|
454
|
+
._fd-tf-con .ant-form-item-label,
|
|
455
|
+
._fd-tf-con .van-field__label {
|
|
447
456
|
display: none !important;
|
|
448
457
|
}
|
|
449
458
|
|
|
@@ -471,7 +480,11 @@
|
|
|
471
480
|
display: none !important;
|
|
472
481
|
}
|
|
473
482
|
|
|
474
|
-
._fd-tf-con .ant-input-number,
|
|
483
|
+
._fd-tf-con .ant-input-number,
|
|
484
|
+
._fd-tf-con .ant-select,
|
|
485
|
+
._fd-tf-con .ant-slider,
|
|
486
|
+
._fd-tf-con .ant-cascader,
|
|
487
|
+
._fd-tf-con .ant-picker {
|
|
475
488
|
width: 100%;
|
|
476
489
|
}
|
|
477
490
|
|
package/dist/form-create.esm.css
CHANGED
|
@@ -317,18 +317,21 @@
|
|
|
317
317
|
margin-bottom: 1px !important;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
._fc-table-form .ant-form-item-label,
|
|
320
|
+
._fc-table-form .ant-form-item-label,
|
|
321
|
+
._fc-table-form .van-field__label {
|
|
321
322
|
display: none !important;
|
|
322
323
|
}
|
|
323
324
|
|
|
324
|
-
._fc-tf-head-idx,
|
|
325
|
+
._fc-tf-head-idx,
|
|
326
|
+
._fc-tf-idx {
|
|
325
327
|
width: 40px;
|
|
326
328
|
min-width: 40px;
|
|
327
329
|
font-weight: 500;
|
|
328
330
|
text-align: center;
|
|
329
331
|
}
|
|
330
332
|
|
|
331
|
-
._fc-tf-edit,
|
|
333
|
+
._fc-tf-edit,
|
|
334
|
+
._fc-tf-btn {
|
|
332
335
|
width: 70px;
|
|
333
336
|
min-width: 70px;
|
|
334
337
|
text-align: center;
|
|
@@ -344,7 +347,8 @@
|
|
|
344
347
|
padding: 2px;
|
|
345
348
|
}
|
|
346
349
|
|
|
347
|
-
._fc-table-form._fc-disabled ._fc-tf-btn .fc-icon,
|
|
350
|
+
._fc-table-form._fc-disabled ._fc-tf-btn .fc-icon,
|
|
351
|
+
._fc-table-form._fc-disabled > .ant-btn {
|
|
348
352
|
cursor: not-allowed;
|
|
349
353
|
}
|
|
350
354
|
|
|
@@ -353,13 +357,13 @@
|
|
|
353
357
|
height: 100%;
|
|
354
358
|
overflow: hidden;
|
|
355
359
|
table-layout: fixed;
|
|
356
|
-
border: 1px solid #
|
|
360
|
+
border: 1px solid #ebeef5;
|
|
357
361
|
border-bottom: 0 none;
|
|
358
362
|
}
|
|
359
363
|
|
|
360
364
|
._fc-table-form ._fc-tf-table > thead > tr > th {
|
|
361
365
|
border: 0 none;
|
|
362
|
-
border-bottom: 1px solid #
|
|
366
|
+
border-bottom: 1px solid #ebeef5;
|
|
363
367
|
height: 40px;
|
|
364
368
|
font-weight: 500;
|
|
365
369
|
padding: 0 5px;
|
|
@@ -367,7 +371,7 @@
|
|
|
367
371
|
}
|
|
368
372
|
|
|
369
373
|
._fc-table-form ._fc-tf-table > thead > tr > th + th {
|
|
370
|
-
border-left: 1px solid #
|
|
374
|
+
border-left: 1px solid #ebeef5;
|
|
371
375
|
}
|
|
372
376
|
|
|
373
377
|
._fc-table-form tr {
|
|
@@ -388,14 +392,18 @@
|
|
|
388
392
|
overflow-wrap: break-word;
|
|
389
393
|
overflow: hidden;
|
|
390
394
|
border: 0 none;
|
|
391
|
-
border-bottom: 1px solid #
|
|
395
|
+
border-bottom: 1px solid #ebeef5;
|
|
392
396
|
}
|
|
393
397
|
|
|
394
398
|
._fc-table-form td + td {
|
|
395
|
-
border-left: 1px solid #
|
|
399
|
+
border-left: 1px solid #ebeef5;
|
|
396
400
|
}
|
|
397
401
|
|
|
398
|
-
._fc-tf-table .ant-input-number,
|
|
402
|
+
._fc-tf-table .ant-input-number,
|
|
403
|
+
._fc-tf-table .ant-select,
|
|
404
|
+
._fc-tf-table .ant-slider,
|
|
405
|
+
._fc-tf-table .ant-cascader,
|
|
406
|
+
._fc-tf-table .ant-picker {
|
|
399
407
|
width: 100%;
|
|
400
408
|
}
|
|
401
409
|
|
|
@@ -409,8 +417,8 @@
|
|
|
409
417
|
._fd-table-form {
|
|
410
418
|
min-height: 130px;
|
|
411
419
|
width: 100%;
|
|
412
|
-
border: 1px solid #
|
|
413
|
-
background: #
|
|
420
|
+
border: 1px solid #ececec;
|
|
421
|
+
background: #ffffff;
|
|
414
422
|
}
|
|
415
423
|
|
|
416
424
|
._fc-child-empty {
|
|
@@ -443,7 +451,8 @@
|
|
|
443
451
|
flex-shrink: 0;
|
|
444
452
|
}
|
|
445
453
|
|
|
446
|
-
._fd-tf-con .ant-form-item-label
|
|
454
|
+
._fd-tf-con .ant-form-item-label,
|
|
455
|
+
._fd-tf-con .van-field__label {
|
|
447
456
|
display: none !important;
|
|
448
457
|
}
|
|
449
458
|
|
|
@@ -471,7 +480,11 @@
|
|
|
471
480
|
display: none !important;
|
|
472
481
|
}
|
|
473
482
|
|
|
474
|
-
._fd-tf-con .ant-input-number,
|
|
483
|
+
._fd-tf-con .ant-input-number,
|
|
484
|
+
._fd-tf-con .ant-select,
|
|
485
|
+
._fd-tf-con .ant-slider,
|
|
486
|
+
._fd-tf-con .ant-cascader,
|
|
487
|
+
._fd-tf-con .ant-picker {
|
|
475
488
|
width: 100%;
|
|
476
489
|
}
|
|
477
490
|
|
package/dist/form-create.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @longhongguo/form-create-ant-design-vue v3.2.
|
|
2
|
+
* @longhongguo/form-create-ant-design-vue v3.2.52
|
|
3
3
|
* (c) 2018-2025 xaboy
|
|
4
4
|
* Github https://github.com/xaboy/form-create
|
|
5
5
|
* Released under the MIT License.
|
|
6
6
|
*/
|
|
7
|
-
import e from"@form-create/component-antdv-upload/src/index";import t from"@form-create/component-antdv-frame/src/index";import a from"@form-create/component-antdv-group/src/index";import l from"@form-create/component-subform/src/index";import{openBlock as i,createElementBlock as r,createElementVNode as s,defineComponent as o,Fragment as n,createCommentVNode as c,normalizeClass as d,normalizeStyle as p,toDisplayString as u,renderList as h,resolveComponent as m,createVNode as f,reactive as y,markRaw as g,createBlock as v,resolveDynamicComponent as b,withCtx as w,createTextVNode as C,renderSlot as k,nextTick as S}from"vue";import V,{hasProperty as x}from"@form-create/utils/lib/type";import $,{creatorFactory as O}from"@longhongguo/form-create-core/src/index";import F from"@form-create/utils/lib/mergeprops";import P from"@form-create/utils/lib/extend";import{invoke as E}from"@longhongguo/form-create-core/src/frame/util";import j from"@form-create/utils/lib/toarray";var T={name:"QuestionCircleOutlined"};const B={class:"anticon"};T.render=function(e,t,a,l,o,n){return i(),r("span",B,[...t[0]||(t[0]=[s("svg",{height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448s448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372z",fill:"currentColor"}),s("path",{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7c-21.2 8.1-39.2 22.3-52.1 40.9c-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0 1 30.9-44.8c59-22.7 97.1-74.7 97.1-132.5c.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1 0 80 0a40 40 0 1 0-80 0z",fill:"currentColor"})],-1)])])};var A=o({name:"CusSelect",props:{modelValue:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},maxTagCount:{type:Number,default:void 0},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},style:{type:[String,Object],default:()=>({width:"100%"})},valueKey:{type:String,default:"value"},labelKey:{type:String,default:"label"},allowClear:{type:Boolean,default:!1},bordered:{type:Boolean,default:!0}},emits:["update:modelValue","change"],computed:{currentValue:{get(){return Array.isArray(this.modelValue)?this.modelValue.map(e=>"object"!=typeof e||null===e||void 0===e.value&&void 0===e[this.valueKey]?{[this.valueKey]:e,[this.labelKey]:this.getLabel(e)}:e):null===this.modelValue||void 0===this.modelValue||""===this.modelValue?[]:"object"==typeof this.modelValue?[this.modelValue]:[{value:this.modelValue,label:this.getLabel(this.modelValue)}]},set(e){let t=[];null!=e&&(t=Array.isArray(e)?e.map(e=>"object"!=typeof e||null===e||void 0===e.value&&void 0===e[this.valueKey]?{[this.valueKey]:e,[this.labelKey]:this.getLabel(e)}:e):"object"==typeof e&&null!==e?[e]:[{[this.valueKey]:e,[this.labelKey]:this.getLabel(e)}]),this.$emit("update:modelValue",t),this.$emit("change",t)}},hasValue(){const e=this.currentValue;return Array.isArray(e)&&e.length>0},displayValue(){return this.hasValue?this.currentValue[0]:null},displayLabel(){if(!this.displayValue)return"";const e=this.displayValue;return"object"==typeof e&&null!==e?e[this.labelKey]||e.label||String(e[this.valueKey]||e.value||""):this.getLabel(e)},allSelectedItems(){const e=this.currentValue;return Array.isArray(e)&&0!==e.length?e.map(e=>"object"==typeof e&&null!==e?{value:e[this.valueKey]||e.value,label:e[this.labelKey]||e.label||String(e[this.valueKey]||e.value||"")}:{value:e,label:this.getLabel(e)}):[]},displayItems(){const e=this.allSelectedItems;return void 0===this.maxTagCount||null===this.maxTagCount?e:e.slice(0,this.maxTagCount)},remainingCount(){if(void 0===this.maxTagCount||null===this.maxTagCount)return 0;const e=this.allSelectedItems.length;return Math.max(0,e-this.maxTagCount)},showClear(){return this.allowClear&&this.hasValue&&!this.disabled}},methods:{findOptionByValue(e){return this.options&&0!==this.options.length?this.options.find(t=>{const a="object"==typeof t?t[this.valueKey]:t;return a===e||String(a)===String(e)}):null},getLabel(e){const t=this.findOptionByValue(e);return t?"object"==typeof t?t[this.labelKey]:t:String(e)},removeItem(e,t){if(this.disabled)return;t.stopPropagation();const a=this.currentValue;if(Array.isArray(a)){const t=a.filter(t=>{if("object"==typeof t&&null!==t){return(t[this.valueKey]||t.value)!==e}return t!==e});this.currentValue=t}},clearValue(e){this.disabled||(e.stopPropagation(),this.currentValue=[])}}});const I=["tabindex"],R=["title"],K={key:1,class:"fc-cus-select-selection-placeholder"},L={key:3,class:"fc-cus-select-arrow"},_=["tabindex"],M={class:"fc-cus-select-selection-overflow"},N=["title"],U={class:"fc-cus-select-selection-item-content"},z=["onClick"],D={key:0,class:"fc-cus-select-selection-overflow-item",style:{opacity:"1"}},Y={class:"fc-cus-select-selection-item"},q={class:"fc-cus-select-selection-item-content"},Q={key:1,class:"fc-cus-select-selection-placeholder"},J={key:1,class:"fc-cus-select-arrow"};A.render=function(e,t,a,l,o,m){return i(),r(n,null,[c(" 单个展示模式 "),e.multiple?(i(),r(n,{key:1},[c(" 多个展示模式 "),s("div",{class:d(["fc-cus-select fc-cus-select-multiple",{"fc-cus-select-disabled":e.disabled}]),style:p(e.style),tabindex:e.disabled?-1:0},[s("div",{class:d(["fc-cus-select-selector",{"fc-cus-select-selector-borderless":!e.bordered}])},[s("div",M,[c(" 显示的 tags "),(i(!0),r(n,null,h(e.displayItems,(a,l)=>(i(),r("div",{key:l,class:"fc-cus-select-selection-overflow-item",style:{opacity:"1"}},[s("span",{class:"fc-cus-select-selection-item",title:a.label},[s("span",U,u(a.label),1),s("span",{class:"fc-cus-select-selection-item-remove",onClick:t=>e.removeItem(a.value,t)},[...t[4]||(t[4]=[s("span",{role:"img","aria-label":"close",class:"anticon anticon-close"},[s("svg",{focusable:"false","data-icon":"close",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true","fill-rule":"evenodd",viewBox:"64 64 896 896"},[s("path",{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"})])],-1)])],8,z)],8,N)]))),128)),c(" 折叠提示 "),e.remainingCount>0?(i(),r("div",D,[s("span",Y,[s("span",q," +"+u(e.remainingCount),1)])])):c("v-if",!0),c(" 空值占位符 "),e.hasValue?c("v-if",!0):(i(),r("span",Q,u(e.placeholder||"请选择"),1))]),e.showClear?(i(),r("span",{key:0,class:"fc-cus-select-clear",onClick:t[1]||(t[1]=(...t)=>e.clearValue&&e.clearValue(...t))},[...t[5]||(t[5]=[s("span",{role:"img","aria-label":"close-circle",class:"anticon anticon-close-circle"},[s("svg",{focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true","fill-rule":"evenodd",viewBox:"64 64 896 896"},[s("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})])],-1)])])):(i(),r("span",J,[...t[6]||(t[6]=[s("span",{role:"img","aria-label":"down",class:"anticon anticon-down"},[s("svg",{focusable:"false","data-icon":"down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"64 64 896 896"},[s("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})])],-1)])]))],2)],14,_)],2112)):(i(),r("div",{key:0,class:d(["fc-cus-select fc-cus-select-single",{"fc-cus-select-disabled":e.disabled}]),style:p(e.style),tabindex:e.disabled?-1:0},[s("div",{class:d(["fc-cus-select-selector",{"fc-cus-select-selector-borderless":!e.bordered}])},[e.displayValue?(i(),r("span",{key:0,class:"fc-cus-select-selection-item",title:e.displayLabel},u(e.displayLabel),9,R)):(i(),r("span",K,u(e.placeholder||"请选择"),1)),e.showClear?(i(),r("span",{key:2,class:"fc-cus-select-clear",onClick:t[0]||(t[0]=(...t)=>e.clearValue&&e.clearValue(...t))},[...t[2]||(t[2]=[s("span",{role:"img","aria-label":"close-circle",class:"anticon anticon-close-circle"},[s("svg",{focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true","fill-rule":"evenodd",viewBox:"64 64 896 896"},[s("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})])],-1)])])):(i(),r("span",L,[...t[3]||(t[3]=[s("span",{role:"img","aria-label":"down",class:"anticon anticon-down"},[s("svg",{focusable:"false","data-icon":"down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"64 64 896 896"},[s("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})])],-1)])]))],2)],14,I))],2112)};var G=o({name:"CusStoreSelect",components:{CusSelect:A},props:{formCreateInject:{type:Object,default:null},modelValue:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},maxTagCount:{type:Number,default:void 0},placeholder:{type:String,default:"请选择"},disabled:{type:Boolean,default:!1},style:{type:[String,Object],default:()=>({width:"100%"})},valueKey:{type:String,default:"value"},labelKey:{type:String,default:"label"},allowClear:{type:Boolean,default:!1},field:{type:String,default:""},bordered:{type:Boolean,default:!0},extraQuery:{type:Object,default:()=>({})}},emits:["update:modelValue","change"],data:()=>({messageId:0,pendingCallbacks:{},internalOptions:[]}),computed:{mergedOptions(){if(this.internalOptions.length>0){const e=new Map;return this.options.forEach(t=>{const a="object"==typeof t?t[this.valueKey]:t;e.set(a,t)}),this.internalOptions.forEach(t=>{const a="object"==typeof t?t[this.valueKey]:t;e.set(a,t)}),Array.from(e.values())}return this.options}},watch:{options:{immediate:!0,handler(e){0===this.internalOptions.length&&Array.isArray(e)&&e.length>0&&(this.internalOptions=[...e])}}},mounted(){window.addEventListener("message",this.handleMessage)},beforeUnmount(){window.removeEventListener("message",this.handleMessage)},methods:{serializeForPostMessage(e){if(null==e)return e;try{return JSON.parse(JSON.stringify(e))}catch(t){if(console.warn("CusStoreSelect: 数据序列化失败,尝试递归处理",t),Array.isArray(e))return 0===e.length?[]:e.map(e=>this.serializeForPostMessage(e));if("object"==typeof e){const t={};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a))try{t[a]=this.serializeForPostMessage(e[a])}catch(e){console.warn("CusStoreSelect: 跳过无法序列化的属性: "+a,e)}return t}return e}},handleClick(){if(this.disabled)return;const e=`store-select-${this.field||"default"}-${Date.now()}-${++this.messageId}`,t=Array.isArray(this.modelValue)?this.modelValue:[];let a=null;t.length>0&&(a=t);const l=null==a?null:this.serializeForPostMessage(a),i={type:"OPEN_STORE_SELECT",field:this.field||"",multiple:this.multiple,currentValue:l,valueKey:this.valueKey,labelKey:this.labelKey,extraQuery:this.extraQuery,messageId:e};if(window.parent&&window.parent!==window)try{window.parent.postMessage(i,"*")}catch(e){console.error("CusStoreSelect: 发送消息失败",e)}else console.warn("CusStoreSelect: 当前不在 iframe 环境中,无法向父窗口发送消息");this.pendingCallbacks[e]=(e,t)=>{t&&Array.isArray(t)&&t.length>0&&this.mergeOptions(t),this.handleUpdate(e),this.handleChange(e)}},handleMessage(e){const t=e.data;if(t&&"STORE_SELECT_RESULT"===t.type){const{field:e,value:a,sourceItems:l,messageId:i}=t;if(e!==this.field)return;const r=this.pendingCallbacks[i];r&&(r(a,l),delete this.pendingCallbacks[i])}},mergeOptions(e){if(!Array.isArray(e)||0===e.length)return;const t=new Map;this.internalOptions.forEach(e=>{const a="object"==typeof e?e[this.valueKey]:e;t.set(a,e)}),e.forEach(e=>{const a="object"==typeof e?e[this.valueKey]:e;t.set(a,e)}),this.internalOptions=Array.from(t.values())},handleUpdate(e){this.$emit("update:modelValue",e),this.triggerValidate()},handleChange(e){this.$emit("change",e,this.internalOptions&&this.internalOptions.length>0?this.multiple?this.internalOptions:this.internalOptions[0]:this.multiple?[]:null)},triggerValidate(){this.$nextTick(()=>{this.$nextTick(()=>{try{if(this.formCreateInject&&this.formCreateInject.api&&this.field)return void this.formCreateInject.api.validateField(this.field).catch(()=>{});let e=this.$parent;for(;e;){if(e.$options&&"FormCreate"===e.$options.name&&e.fapi){this.field&&e.fapi.validateField&&e.fapi.validateField(this.field).catch(()=>{});break}e=e.$parent}}catch(e){console.warn("CusStoreSelect: 触发校验失败",e)}})})}}});G.render=function(e,t,a,l,s,o){const n=m("CusSelect");return i(),r("div",{onClick:t[0]||(t[0]=(...t)=>e.handleClick&&e.handleClick(...t))},[f(n,{"model-value":e.modelValue,options:e.mergedOptions,multiple:e.multiple,"max-tag-count":e.maxTagCount,placeholder:e.placeholder,disabled:e.disabled,style:p(e.style),valueKey:e.valueKey,labelKey:e.labelKey,allowClear:e.allowClear,bordered:e.bordered,"onUpdate:modelValue":e.handleUpdate,onChange:e.handleChange},null,8,["model-value","options","multiple","max-tag-count","placeholder","disabled","style","valueKey","labelKey","allowClear","bordered","onUpdate:modelValue","onChange"])])};var H=o({name:"CusUserSelect",components:{CusSelect:A},props:{formCreateInject:{type:Object,default:null},modelValue:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},maxTagCount:{type:Number,default:void 0},placeholder:{type:String,default:"请选择"},disabled:{type:Boolean,default:!1},style:{type:[String,Object],default:()=>({width:"100%"})},valueKey:{type:String,default:"value"},labelKey:{type:String,default:"label"},allowClear:{type:Boolean,default:!1},field:{type:String,default:""},bordered:{type:Boolean,default:!0},selectType:{type:[String,Number],default:null},extraQuery:{type:Object,default:()=>({})}},emits:["update:modelValue","change"],data:()=>({messageId:0,pendingCallbacks:{},internalOptions:[]}),computed:{mergedOptions(){if(this.internalOptions.length>0){const e=new Map;return this.options.forEach(t=>{const a="object"==typeof t?t[this.valueKey]:t;e.set(a,t)}),this.internalOptions.forEach(t=>{const a="object"==typeof t?t[this.valueKey]:t;e.set(a,t)}),Array.from(e.values())}return this.options}},watch:{options:{immediate:!0,handler(e){0===this.internalOptions.length&&Array.isArray(e)&&e.length>0&&(this.internalOptions=[...e])}}},mounted(){window.addEventListener("message",this.handleMessage)},beforeUnmount(){window.removeEventListener("message",this.handleMessage)},methods:{serializeForPostMessage(e){if(null==e)return e;try{return JSON.parse(JSON.stringify(e))}catch(t){if(console.warn("CusUserSelect: 数据序列化失败,尝试递归处理",t),Array.isArray(e))return 0===e.length?[]:e.map(e=>this.serializeForPostMessage(e));if("object"==typeof e){const t={};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a))try{t[a]=this.serializeForPostMessage(e[a])}catch(e){console.warn("CusUserSelect: 跳过无法序列化的属性: "+a,e)}return t}return e}},handleClick(){if(this.disabled)return;const e=`user-select-${this.field||"default"}-${Date.now()}-${++this.messageId}`,t=Array.isArray(this.modelValue)?this.modelValue:[];let a=null;t.length>0&&(a=t);const l=null==a?null:this.serializeForPostMessage(a),i={type:"OPEN_USER_SELECT",field:this.field||"",multiple:this.multiple,currentValue:l,valueKey:this.valueKey,labelKey:this.labelKey,selectType:this.selectType,extraQuery:this.extraQuery,messageId:e};if(window.parent&&window.parent!==window)try{window.parent.postMessage(i,"*")}catch(e){console.error("CusUserSelect: 发送消息失败",e)}else console.warn("CusUserSelect: 当前不在 iframe 环境中,无法向父窗口发送消息");this.pendingCallbacks[e]=(e,t)=>{t&&Array.isArray(t)&&t.length>0&&this.mergeOptions(t),this.handleUpdate(e),this.handleChange(e)}},handleMessage(e){const t=e.data;if(t&&"USER_SELECT_RESULT"===t.type){const{field:e,value:a,sourceItems:l,messageId:i}=t;if(e!==this.field)return;const r=this.pendingCallbacks[i];r&&(r(a,l),delete this.pendingCallbacks[i])}},mergeOptions(e){if(!Array.isArray(e)||0===e.length)return;const t=new Map;this.internalOptions.forEach(e=>{const a="object"==typeof e?e[this.valueKey]:e;t.set(a,e)}),e.forEach(e=>{const a="object"==typeof e?e[this.valueKey]:e;t.set(a,e)}),this.internalOptions=Array.from(t.values())},handleUpdate(e){this.$emit("update:modelValue",e),this.triggerValidate()},handleChange(e){this.$emit("change",e,this.internalOptions&&this.internalOptions.length>0?this.multiple?this.internalOptions:this.internalOptions[0]:this.multiple?[]:null)},triggerValidate(){this.$nextTick(()=>{this.$nextTick(()=>{try{if(this.formCreateInject&&this.formCreateInject.api&&this.field)return void this.formCreateInject.api.validateField(this.field).catch(()=>{});let e=this.$parent;for(;e;){if(e.$options&&"FormCreate"===e.$options.name&&e.fapi){this.field&&e.fapi.validateField&&e.fapi.validateField(this.field).catch(()=>{});break}e=e.$parent}}catch(e){console.warn("CusUserSelect: 触发校验失败",e)}})})}}});H.render=function(e,t,a,l,s,o){const n=m("CusSelect");return i(),r("div",{onClick:t[0]||(t[0]=(...t)=>e.handleClick&&e.handleClick(...t))},[f(n,{"model-value":e.modelValue,options:e.mergedOptions,multiple:e.multiple,"max-tag-count":e.maxTagCount,placeholder:e.placeholder,disabled:e.disabled,style:p(e.style),valueKey:e.valueKey,labelKey:e.labelKey,allowClear:e.allowClear,bordered:e.bordered,"onUpdate:modelValue":e.handleUpdate,onChange:e.handleChange},null,8,["model-value","options","multiple","max-tag-count","placeholder","disabled","style","valueKey","labelKey","allowClear","bordered","onUpdate:modelValue","onChange"])])};var W={name:"TableForm",emits:["change","add","delete","update:modelValue"],props:{formCreateInject:Object,modelValue:{type:Array,default:()=>[]},columns:{type:Array,required:!0,default:()=>[]},filterEmptyColumn:{type:Boolean,default:!0},deletable:{type:Boolean,default:!0},addable:{type:Boolean,default:!0},options:{type:Object,default:()=>y({submitBtn:!1,resetBtn:!1})},min:Number,max:Number,disabled:Boolean},watch:{modelValue:{handler(){this.updateTable()},deep:!0},"formCreateInject.preview":function(e){this.emptyRule.children[0].props.colspan=this.columns.length+(e?1:2)}},data(){return{rule:[],trs:[],fapi:{},Form:g(this.formCreateInject.form.$form()),copyTrs:"",oldValue:"",emptyRule:{type:"tr",_isEmpty:!0,native:!0,subRule:!0,children:[{type:"td",style:{textAlign:"center"},native:!0,subRule:!0,props:{colspan:this.columns.length+(this.formCreateInject.preview?1:2)},children:[this.formCreateInject.t("dataEmpty")||"暂无数据"]}]}}},methods:{formChange(){this.updateValue()},updateValue(){const e=this.trs.map((e,t)=>({...this.modelValue[t]||{},...this.fapi.getChildrenFormData(e)})).filter(e=>{if(!this.filterEmptyColumn)return!0;if(null==e)return!1;let t=!1;return Object.keys(e).forEach(a=>{t=t||void 0!==e[a]&&""!==e[a]&&null!==e[a]}),t}),t=JSON.stringify(e);t!==this.oldValue&&(this.oldValue=t,this.$emit("update:modelValue",e),this.$emit("change",e))},setRawData(e,t){const a=this.trs[e];this.fapi.setChildrenFormData(a,t,!0)},updateTable(){const e=JSON.stringify(this.modelValue);this.oldValue!==e&&(this.oldValue=e,this.trs=this.trs.splice(0,this.modelValue.length),this.modelValue.length?this.clearEmpty():this.addEmpty(),this.modelValue.forEach((e,t)=>{this.trs[t]||this.addRaw(),this.setRawData(t,e||{})}),this.rule[0].children[1].children=this.trs)},addEmpty(){this.trs.length&&this.trs.splice(0,this.trs.length),this.trs.push(this.emptyRule)},clearEmpty(){this.trs[0]&&this.trs[0]._isEmpty&&this.trs.splice(0,1)},delRaw(e){this.disabled||!this.deletable||this.min>0&&this.trs.length<=this.min||(this.trs.splice(e,1),this.updateValue(),this.trs.length?this.trs.forEach(e=>this.updateRaw(e)):this.addEmpty(),this.$emit("delete",e))},addRaw(e){if(e&&this.disabled)return;const t=this.formCreateInject.form.parseJson(this.copyTrs)[0];1===this.trs.length&&this.trs[0]._isEmpty&&this.trs.splice(0,1),this.trs.push(t),this.updateRaw(t),e&&(this.$emit("add",this.trs.length),this.updateValue())},updateRaw(e){const t=this.trs.indexOf(e);e.children[0].props.innerText=t+1,e.children[e.children.length-1].children[0].props.onClick=()=>{this.delRaw(t)}},loadRule(){const e=[{type:"th",native:!0,class:"_fc-tf-head-idx",props:{innerText:"#"}}];let t=[{type:"td",class:"_fc-tf-idx",native:!0,props:{innerText:"0"}}];this.columns.forEach(a=>{e.push({type:"th",native:!0,style:{...a.style||{},textAlign:a.align||"center"},class:a.required?"_fc-tf-head-required":"",props:{innerText:a.label||""}}),t.push({type:"td",native:!0,children:[...a.rule||[]]})}),e.push({type:"th",native:!0,class:"_fc-tf-edit fc-clock",props:{innerText:this.formCreateInject.t("operation")||"操作"}}),t.push({type:"td",native:!0,class:"_fc-tf-btn fc-clock",children:[{type:"i",native:!0,class:"fc-icon icon-delete",props:{}}]}),this.copyTrs=this.formCreateInject.form.toJson([{type:"tr",native:!0,subRule:!0,children:t}]),this.rule=[{type:"table",native:!0,class:"_fc-tf-table",props:{border:"1",cellspacing:"0",cellpadding:"0"},children:[{type:"thead",native:!0,children:[{type:"tr",native:!0,children:e}]},{type:"tbody",native:!0,children:this.trs}]}]}},created(){this.loadRule()},mounted(){this.updateTable()}};W.render=function(e,t,a,l,o,n){const p=m("a-button");return i(),r("div",{class:d(["_fc-table-form",{"_fc-disabled":a.disabled}])},[(i(),v(b(o.Form),{option:a.options,rule:o.rule,extendOption:!0,disabled:a.disabled,onChange:n.formChange,api:o.fapi,"onUpdate:api":t[0]||(t[0]=e=>o.fapi=e),onEmitEvent:e.$emit},null,40,["option","rule","disabled","onChange","api","onEmitEvent"])),a.addable&&(!a.max||a.max>this.trs.length)?(i(),v(p,{key:0,type:"link",class:"fc-clock",onClick:t[1]||(t[1]=e=>n.addRaw(!0)),disabled:a.disabled},{default:w(()=>[t[2]||(t[2]=s("i",{class:"fc-icon icon-add-circle",style:{"font-weight":"700"}},null,-1)),C(" "+u(a.formCreateInject.t("add")||"添加"),1)]),_:1},8,["disabled"])):c("v-if",!0)],2)};var X=o({name:"TableFormView",data:()=>({})});const Z={class:"_fd-table-form"},ee={key:0,class:"_fd-tf-wrap"},te={key:1,class:"_fc-child-empty"};X.render=function(e,t,a,l,s,o){return i(),r("div",Z,[e.$slots.default?(i(),r("div",ee,[k(e.$slots,"default")])):(i(),r("div",te))])};var ae=o({name:"TableFormColumnView",props:{label:String,align:String,width:[Number,String],color:String,required:Boolean},computed:{colStyle(){const e=this.width,t={width:V.Number(e)?e+"px":e&&"auto"!==e?e:"180px"};return this.color&&(t.color=this.color),t}},data:()=>({})});const le={key:0,class:"_fd-tf-required"},ie={class:"_fd-tf-con"};ae.render=function(e,t,a,l,o,n){return i(),r("div",{class:"_fd-tf-col",style:p(e.colStyle)},[s("div",{class:"_fd-tf-title",style:p({textAlign:e.align||"center"})},[e.required?(i(),r("span",le,"*")):c("v-if",!0),C(u(e.label||""),1)],4),s("div",ie,[k(e.$slots,"default")])],4)};var re=[e,t,a,l,T,A,G,H,W,X,ae],se={name:"checkbox",modelField:"value",mergeProp(e){const t=e.prop.props;x(t,"options")||(t.options=e.prop.options||[])}},oe={...se,name:"radio"},ne={...se,name:"select",mergeProp(e){const t=e.prop.props;x(t,"options")||(t.options=e.prop.options||[]);const a=e.effectData("fetch");a&&!0===a.loading&&(t.disabled=!0,t.loading=!0)},render(e,t){const a=t.effectData("fetch");if(a&&!0===a.loading&&e.loading){const a={...e};return a.notFoundContent=e.loading,t.$render.defaultRender(t,a)}return t.$render.defaultRender(t,e)}},ce={name:"cascader",mergeProp(e){const t=e.prop.props;x(t,"options")||(t.options=e.prop.options||[]);const a=e.effectData("fetch");a&&!0===a.loading&&(t.disabled=!0,t.loading=!0)},render(e,t){const a=t.effectData("fetch");if(a&&!0===a.loading&&e.loading){const a={...e};return a.notFoundContent=e.loading,t.$render.defaultRender(t,a)}return t.$render.defaultRender(t,e)}};const de={date:"YYYY-MM-DD",month:"YYYY-MM",week:"YYYY-wo",quarter:"YYYY-qQ",year:"YYYY"},pe="datePicker";var ue={name:pe,maker:["date","month","week"].reduce((e,t)=>(e[t]=O(pe,{type:t}),e),{dateRange:O(pe,{type:"range"}),datetimeRange:O(pe,e=>e.props({type:"range",showTime:!0}))}),modelField:"value",mergeProp(e){const t=e.prop.props,a=t.type||t.picker;t.valueFormat||(t.valueFormat=(de[a]||de.date)+(!t.showTime||a&&"date"!==a?"":" HH:mm:ss"))},render:(e,t)=>t.$render.vNode[(!0===t.prop.props.range?"range":"date")+"Picker"](t.prop,e)};var he={name:"hidden",maker:{hidden:(e,t)=>O("hidden")("",e,t)},render:()=>[]};var me={name:"input",maker:["password","url","email","text","textarea","search"].reduce((e,t)=>(e[t]=O("input",{type:t}),e),{idate:O("input",{type:"date"})}),modelField:"value",render(e,t){let a=t.prop.props.type;return-1===["textarea","search","password"].indexOf(a)&&(a="input"),a={textarea:"aTextarea",search:"aInputSearch",password:"aInputPassword"}[a]||"aInput",t.$render.vNode.make(a,t.prop,e)}},fe={name:"timePicker",modelField:"value",mergeProp(e){const t=e.prop.props;t.valueFormat||(t.valueFormat="HH:mm:ss")},render:(e,t)=>t.$render.vNode["time"+(!0===t.prop.props.range?"Range":"")+"Picker"](t.prop,e)},ye={name:"tree",modelField:"checkedKeys",mergeProp(e){const t=e.prop.props;t.fieldNames?t.fieldNames.key||(t.fieldNames.key="id"):t.fieldNames={key:"id"},t.checkedKeys=e.rule.value,t.checkable=!0}},ge={name:"FcRow",render:(e,t)=>t.vNode.col({props:{span:24}},{default:()=>[t.vNode.row(t.prop,e)]})};var ve=[se,ue,{...ue,name:"rangePicker",maker:{},render:(e,t)=>t.$render.vNode.rangePicker(t.prop,e)},he,me,fe,{...fe,name:"timeRangePicker",render:(e,t)=>t.$render.vNode.timeRangePicker(t.prop,e)},ye,oe,ne,ce,ge,{name:"cusStoreSelect",modelField:"modelValue",toFormValue:(e,t)=>null==e||""===e?[]:Array.isArray(e)?e.map(e=>("object"!=typeof e||null===e||void 0===e.value&&e.label,e)):[e],toValue:(e,t)=>e,mergeProp(e){const t=e.prop.props;if(x(t,"options")||(t.options=e.prop.options||[]),x(t,"field")||(t.field=e.rule.field||""),void 0!==e.rule.value){const t=e.rule.value;null==t||""===t?e.rule.value=[]:Array.isArray(t)||(e.rule.value=[t])}},render(e,t){const a=t.$render.defaultRender(t,e);if(a&&a.props&&a.props.on){const e=a.props.on["update:modelValue"],l=()=>{S(()=>{S(()=>{try{const e=t.rule.field;if(e)return void t.$handle.api.validateField(e).catch(()=>{});const a=t.$handle.getFieldCtx(t.rule.field);a&&a.id&&t.$handle.$manager.validateField(a.id).catch(()=>{})}catch(e){console.warn("CusStoreSelect: 触发校验失败",e)}})})};a.props.on["update:modelValue"]=(...t)=>{e&&e(...t),l()};const i=a.props.on.change;a.props.on.change=i?(...e)=>{i(...e),l()}:l}return a}},{name:"cusUserSelect",modelField:"modelValue",toFormValue:(e,t)=>null==e||""===e?[]:Array.isArray(e)?e.map(e=>("object"!=typeof e||null===e||void 0===e.value&&e.label,e)):[e],toValue:(e,t)=>e,mergeProp(e){const t=e.prop.props;if(x(t,"options")||(t.options=e.prop.options||[]),x(t,"field")||(t.field=e.rule.field||""),x(t,"formCreateInject")||(t.formCreateInject=e.inject),void 0!==e.rule.value){const t=e.rule.value;null==t||""===t?e.rule.value=[]:Array.isArray(t)||(e.rule.value=[t])}},render(e,t){const a=t.$render.defaultRender(t,e);if(a&&a.props&&a.props.on){const e=a.props.on["update:modelValue"],l=()=>{S(()=>{S(()=>{try{const e=t.rule.field;if(e)return void t.$handle.api.validateField(e).catch(()=>{});const a=t.$handle.getFieldCtx(t.rule.field);a&&a.id&&t.$handle.$manager.validateField(a.id).catch(()=>{})}catch(e){console.warn("CusUserSelect: 触发校验失败",e)}})})};a.props.on["update:modelValue"]=(...t)=>{e&&e(...t),l()};const i=a.props.on.change;a.props.on.change=i?(...e)=>{i(...e),l()}:l}return a}}];var be={tooltip:"aTooltip",popover:"aPopover",button:"aButton",icon:"aIcon",slider:"aSlider",rate:"aRate",upload:"fcUpload",cascader:"aCascader",timePicker:"aTimePicker",timeRangePicker:"aTimeRangePicker",datePicker:"aDatePicker",rangePicker:"aRangePicker",switch:"aSwitch",select:"aSelect",checkbox:"aCheckboxGroup",radio:"aRadioGroup",input:"aInput",inputNumber:"aInputNumber",treeSelect:"aTreeSelect",search:"aInputSearch",inputPassword:"aInputPassword",textarea:"aTextarea",formItem:"aFormItem",form:"aForm",frame:"fcFrame",col:"aCol",row:"aRow",tree:"aTree",autoComplete:"aAutoComplete",transfer:"aTransfer",group:"fcGroup",array:"fcGroup",subForm:"fcSubForm",object:"fcSubForm"};function we(e,t){x(e,t)&&V.String(e[t])&&(e[t]={[t]:e[t],show:!0})}function Ce(e){return!1===e}function ke(e){const t={...e};return delete t.children,t}var Se={validate(){const e=this.form();return e?e.validate():new Promise(e=>e())},validateField(e){const t=this.form();return t?t.validateFields(e):new Promise(e=>e())},clearValidateState(e){const t=this.vm.refs[e.wrapRef];t&&t.clearValidate()},tidyOptions:e=>(["submitBtn","resetBtn","row","info","wrap","col","title"].forEach(t=>{!function(e,t){x(e,t)&&!V.Object(e[t])&&(e[t]={show:!!e[t]})}(e,t)}),e),tidyRule:({prop:e})=>(we(e,"title"),we(e,"info"),e),mergeProp(e){const t={info:{type:"popover",placement:"topLeft",icon:"QuestionCircleOutlined"},title:{},col:{span:24},wrap:{}};if(["info","wrap","col","title"].forEach(a=>{e.prop[a]=F([this.options[a]||{},e.prop[a]||{}],t[a])}),"upload"!==e.rule.type||e.prop.props.onPreview){if("upload"===e.rule.type&&e.prop.props.onPreview){const t=e.prop.props.onPreview,a=function(e){window.parent&&window.parent!==window&&window.parent.postMessage({type:"upload-preview",file:{url:e.url,name:e.name,uid:e.uid,size:e.size,type:e.type},timestamp:Date.now()},"*")};e.prop.props.onPreview=function(e){a(e),t&&"function"==typeof t&&t.apply(this,arguments)}}}else{const t=function(e){window.parent&&window.parent!==window&&window.parent.postMessage({type:"upload-preview",file:{url:e.url,name:e.name,uid:e.uid,size:e.size,type:e.type},timestamp:Date.now()},"*")};e.prop.props.onPreview=function(e){t(e)}}},getDefaultOptions:()=>({form:{hideRequiredMark:!1,layout:"horizontal",labelAlign:"right",labelCol:{span:3},wrapperCol:{span:21},validateOnRuleChange:!0},row:{gutter:0},submitBtn:{disabled:!1,loading:!1,type:"primary",innerText:"",show:!1,col:void 0,click:void 0},resetBtn:{disabled:!1,loading:!1,type:"default",innerText:"",show:!1,col:void 0,click:void 0}}),adapterValidate:(e,t)=>(e.validator=(e,a)=>new Promise((e,l)=>t(a,t=>{t?l(t):e()})),e),update(){const e=this.options.form;this.rule={props:{...e},on:{submit:e=>{e.preventDefault()}},style:e.style,type:"form"}},beforeRender(){const{key:e,ref:t,$handle:a}=this,l=this.options.form;P(this.rule,{key:e,ref:t,class:[l.className,l.class,"form-create",this.$handle.preview?"is-preview":""]}),P(this.rule.props,{model:a.formData})},render(e){return e.slotLen()&&!this.$handle.preview&&e.setSlot(void 0,()=>this.makeFormBtn()),this.$r(this.rule,Ce(this.options.row.show)?e.getSlots():[this.makeRow(e)])},makeWrap(e,t){const a=e.prop,l=`${this.key}${e.key}`,i=a.col,r=this.isTitle(a)&&!1!==a.wrap.title,{layout:s,col:o}=this.rule.props,n=a.wrap.class;delete a.wrap.class,delete a.wrap.title;const c=Ce(a.wrap.show)?t:this.$r(F([a.wrap,{props:{...ke(a.wrap||{}),hasFeedback:a.hasFeedback||!1,name:e.id,rules:e.injectValidate(),..."horizontal"!==s?{labelCol:{},wrapperCol:{}}:{}},class:this.$render.mergeClass(n||a.className,"fc-form-item"),key:l+"fi",ref:e.wrapRef,type:"formItem"}]),{default:()=>t,...r?{label:()=>this.makeInfo(a,l,e)}:{}});return"inline"===s||Ce(o)||Ce(i.show)?c:this.makeCol(a,l,[c])},isTitle(e){if(!1===this.options.form.title)return!1;const t=e.title;return!(!t.title&&!t.native||Ce(t.show))},makeInfo(e,t,a){var l,i;const r={...e.title},s={...e.info};if(!1===this.options.form.title)return!1;if(!r.title&&!r.native||Ce(r.show))return;const o="tooltip"===s.type;const n=this.getSlot("title"),c=[n?n({title:null===(l=a.refRule)||void 0===l||null===(l=l.__$title)||void 0===l?void 0:l.value,rule:a.rule,options:this.options}):null===(i=a.refRule)||void 0===i||null===(i=i.__$title)||void 0===i?void 0:i.value];if(!Ce(s.show)&&(s.info||s.native)&&!Ce(s.icon)){const e={type:s.type||"popover",props:ke(s),key:t+"pop"};delete e.props.icon,delete e.props.show,delete e.props.info,delete e.props.align,delete e.props.native;const l=o?"title":"content";var d;if(s.info&&!x(e.props,l))e.props[l]=null===(d=a.refRule)||void 0===d||null===(d=d.__$info)||void 0===d?void 0:d.value;c["left"!==s.align?"unshift":"push"](this.$r(F([s,e]),{[r.slot||"default"]:()=>this.$r({type:!0===s.icon?"QuestionCircleOutlined":s.icon||"",props:{type:!0===s.icon?"QuestionCircleOutlined":s.icon},key:t+"i"})}))}const p=F([r,{props:ke(r),key:t+"tit",class:"fc-form-title",type:r.type||"span"}]);return delete p.props.show,delete p.props.title,delete p.props.native,this.$r(p,c)},makeCol(e,t,a){const l=e.col;return this.$r({class:this.$render.mergeClass(l.class,"fc-form-col"),type:"col",props:l||{span:24},key:t+"col"},a)},makeRow(e){const t=this.options.row||{};return this.$r({type:"row",props:t,class:this.$render.mergeClass(t.class,"fc-form-row"),key:this.key+"row"},e)},makeFormBtn(){let e=[];if(Ce(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),Ce(this.options.resetBtn.show)||e.push(this.makeResetBtn()),!e.length)return;let{labelCol:t,wrapperCol:a,layout:l}=this.rule.props;"horizontal"!==l&&(t=a={});const i=this.$r({type:"formItem",class:"fc-form-item fc-form-footer",key:this.key+"fb",props:{labelCol:t,wrapperCol:a,label:" ",colon:!1}},e);return"inline"===l?i:this.$r({type:"col",class:"fc-form-col",props:{span:24},key:this.key+"fc"},[i])},makeResetBtn(){const e={...this.options.resetBtn},t=e.innerText||this.$handle.api.t("reset")||"重置";return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:"button",props:e,class:"fc-reset-btn",style:{width:e.width,marginLeft:"10px"},on:{click:()=>{const e=this.$handle.api;this.options.resetBtn.click?this.options.resetBtn.click(e):e.resetFields()}},key:this.key+"b2"},[t])},makeSubmitBtn(){const e={...this.options.submitBtn},t=e.innerText||this.$handle.api.t("submit")||"提交";return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:"button",props:e,class:"fc-submit-btn",style:{width:e.width},on:{click:()=>{const e=this.$handle.api;this.options.submitBtn.click?this.options.submitBtn.click(e):e.submit().catch(()=>{})}},key:this.key+"b1"},[t])}};const Ve={};var xe;function $e(e,t){return V.Boolean(e)?e={show:e}:V.Undef(e)||V.Object(e)||(e={show:t}),e}function Oe(e,t){return{formEl:()=>t.$manager.form(),wrapEl(e){const a=t.getFieldCtx(e);if(a)return t.vm.refs[a.wrapRef]},validate:a=>new Promise((l,i)=>{const r=e.children,s=[t.$manager.validate()];r.filter(e=>!e.isScope).forEach(e=>{s.push(e.validate())}),Promise.all(s).then(()=>{l(!0),a&&a(!0)}).catch(l=>{i(l),a&&a(l),t.vm.emit("validate-fail",l,{api:e}),t.emitEvent("validate-fail",l,{api:e})})}),validateField:(a,l)=>new Promise((i,r)=>{const s=t.getFieldCtx(a);if(!s)return;const o=t.subForm[s.id],n=[t.$manager.validateField(s.id)];j(o).filter(e=>!e.isScope).forEach(e=>{n.push(e.validate())}),Promise.all(n).then(()=>{i(null),l&&l(null)}).catch(i=>{r(i),l&&l(i),t.vm.emit("validate-field-fail",i,{field:a,api:e})})}),clearValidateState(a,l=!0){e.helper.tidyFields(a).forEach(e=>{l&&this.clearSubValidateState(e),t.getCtxs(e).forEach(e=>{t.$manager.clearValidateState(e)})})},clearSubValidateState(a){e.helper.tidyFields(a).forEach(e=>{t.getCtxs(e).forEach(e=>{const a=t.subForm[e.id];a&&(Array.isArray(a)?a.forEach(e=>{e.clearValidateState()}):a&&a.clearValidateState())})})},btn:{loading:(t=!0)=>{e.submitBtnProps({loading:!!t})},disabled:(t=!0)=>{e.submitBtnProps({disabled:!!t})},show:(t=!0)=>{e.submitBtnProps({show:!!t})}},resetBtn:{loading:(t=!0)=>{e.resetBtnProps({loading:!!t})},disabled:(t=!0)=>{e.resetBtnProps({disabled:!!t})},show:(t=!0)=>{e.resetBtnProps({show:!!t})}},submitBtnProps:(a={})=>{let l=$e(t.options.submitBtn,!0);P(l,a),t.options.submitBtn=l,e.refreshOptions()},resetBtnProps:(a={})=>{let l=$e(t.options.resetBtn,!1);P(l,a),t.options.resetBtn=l,e.refreshOptions()},submit:(a,l)=>new Promise((i,r)=>{(!1===t.options.validateOnSubmit?Promise.resolve():e.validate()).then(()=>{let l=e.formData();t.beforeSubmit(l).then(()=>{V.Function(a)&&E(()=>a(l,e)),V.Function(t.options.onSubmit)&&E(()=>t.options.onSubmit(l,e)),t.vm.emit("submit",l,e),i(l)}).catch(e=>{})}).catch((...t)=>{V.Function(l)&&E(()=>l(e,...t)),r(...t)})}),request:t=>("string"==typeof t&&(t={action:t}),e.fetch(t)),throttle(e,t){let a=0;return function(...l){const i=this,r=Date.now();r-a>=(t||0)&&(a=r,e.call(i,...l))}},debounce(e,t){let a=null;return function(...l){const i=this;null!==a&&clearTimeout(a),a=setTimeout(()=>{e.call(i,...l)},t||0)}}}}!function(e){["treeSelect","upload","frame","autoComplete","cascader","datePicker","frame","inputNumber","inputPassword","radio","rate","switch","rate","slider","timePicker"].reduce((e,t)=>(e[t]=O(t),e),e),e.auto=e.autoComplete,e.number=e.inputNumber,e.time=e.timePicker,e.password=e.inputPassword}(Ve),function(e){e.sliderRange=O("slider",{range:!0})}(Ve),function(e){const t={frameInputs:["input",0],frameFiles:["file",0],frameImages:["image",0],frameInputOne:["input",1],frameFileOne:["file",1],frameImageOne:["image",1]};Object.keys(t).reduce((e,a)=>(e[a]=O("frame",e=>e.props({type:t[a][0],maxLength:t[a][1]})),e),e),e.frameInput=e.frameInputs,e.frameFile=e.frameFiles,e.frameImage=e.frameImages}(Ve),function(e){const t={image:["image",0],file:["file",0],uploadFileOne:["file",1],uploadImageOne:["image",1]};Object.keys(t).reduce((e,a)=>(e[a]=O("upload",e=>e.props({uploadType:t[a][0],maxLength:t[a][1]})),e),e),e.uploadImage=e.image,e.uploadFile=e.file}(Ve),(xe=Ve).selectMultiple=O("select",{mode:"multiple"}),xe.selectTags=O("select",{mode:"tags"}),xe.selectCombobox=O("select",{mode:"combobox"}),function(e){e.cusStoreSelect=O("cusStoreSelect"),e.storeSelect=e.cusStoreSelect}(Ve),function(e){e.cusUserSelect=O("cusUserSelect"),e.userSelect=e.cusUserSelect}(Ve);var Fe={autoComplete:"value",cascader:"value",inputNumber:"value",inputPassword:"value",textarea:"value",rate:"value",slider:"value",treeSelect:"value",switch:"checked",cusStoreSelect:"modelValue",cusUserSelect:"modelValue"};const Pe={name:"required",load(e,t,a){const l=function(e){return V.Boolean(e)?{required:e}:V.String(e)?{message:e}:V.Undef(e)?{required:!1}:V.Function(e)?{validator:e}:V.Object(e)?e:{}}(e.getValue());if(!1===l.required)e.clearProp(),a.clearValidateState([t.field]);else{var i;const r={required:!0,validator:(e,t)=>new Promise((e,a)=>{V.empty(t)?a(r.message):e()}),...l},s=null===(i=t.__fc__.refRule)||void 0===i||null===(i=i.__$title)||void 0===i?void 0:i.value;if(r.message){const e=r.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);e&&(r.message=a.t(e[1],{title:s}))}else r.message=a.t("required",{title:s})||s+("en"===a.getLocale()?" is required":"不能为空");e.getProp().validate=[r]}a.sync(t)},watch(...e){Pe.load(...e)}};function Ee(e){e.componentAlias(be),Object.keys(Fe).forEach(t=>{e.setModelField(t,Fe[t])}),re.forEach(t=>{e.component(t.name,t)}),e.register(Pe),ve.forEach(t=>{e.parser(t)}),Object.keys(Ve).forEach(t=>{e.maker[t]=Ve[t]}),"undefined"!=typeof window&&window.antd&&e.useApp((e,t)=>{t.use(window.antd)})}const je=$({ui:'"ant-design-vue"',version:'"3.2.50"',manager:Se,install:Ee,extendApi:Oe,attrs:{normal:["col","wrap"],array:["className"],key:["title","info"]}});"undefined"!=typeof window&&(window.formCreate=je);const Te=je.maker;export{je as default,Te as maker};
|
|
7
|
+
import e from"@form-create/component-antdv-upload/src/index";import t from"@form-create/component-antdv-frame/src/index";import l from"@form-create/component-antdv-group/src/index";import a from"@form-create/component-subform/src/index";import{openBlock as r,createElementBlock as i,createElementVNode as o,defineComponent as s,Fragment as n,createCommentVNode as c,normalizeClass as d,normalizeStyle as u,toDisplayString as p,renderList as h,resolveComponent as f,createVNode as m,reactive as y,markRaw as g,createBlock as v,resolveDynamicComponent as b,withCtx as w,createTextVNode as C,renderSlot as k,toRef as x,watch as S,nextTick as $}from"vue";import V,{hasProperty as P}from"@form-create/utils/lib/type";import F,{creatorFactory as T}from"@longhongguo/form-create-core/src/index";import I from"@form-create/utils/lib/mergeprops";import O from"@form-create/utils/lib/extend";import{invoke as A}from"@longhongguo/form-create-core/src/frame/util";import j from"@form-create/utils/lib/toarray";var E={name:"QuestionCircleOutlined"};const B={class:"anticon"};E.render=function(e,t,l,a,s,n){return r(),i("span",B,[...t[0]||(t[0]=[o("svg",{height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448s448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372z",fill:"currentColor"}),o("path",{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7c-21.2 8.1-39.2 22.3-52.1 40.9c-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0 1 30.9-44.8c59-22.7 97.1-74.7 97.1-132.5c.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1 0 80 0a40 40 0 1 0-80 0z",fill:"currentColor"})],-1)])])};var R=s({name:"CusSelect",props:{modelValue:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},sourceItems:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},maxTagCount:{type:Number,default:void 0},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},style:{type:[String,Object],default:()=>({width:"100%"})},valueKey:{type:String,default:"value"},labelKey:{type:String,default:"label"},allowClear:{type:Boolean,default:!1},bordered:{type:Boolean,default:!0}},emits:["update:modelValue","update:sourceItems","change"],computed:{currentValue:{get(){return Array.isArray(this.modelValue)?this.modelValue.map(e=>"object"!=typeof e||null===e||void 0===e.value&&void 0===e[this.valueKey]?{[this.valueKey]:e,[this.labelKey]:this.getLabel(e)}:e):null===this.modelValue||void 0===this.modelValue||""===this.modelValue?[]:"object"==typeof this.modelValue?[this.modelValue]:[{value:this.modelValue,label:this.getLabel(this.modelValue)}]},set(e){let t=[];null!=e&&(t=Array.isArray(e)?e.map(e=>"object"!=typeof e||null===e||void 0===e.value&&void 0===e[this.valueKey]?{[this.valueKey]:e,[this.labelKey]:this.getLabel(e)}:e):"object"==typeof e&&null!==e?[e]:[{[this.valueKey]:e,[this.labelKey]:this.getLabel(e)}]),this.$emit("update:modelValue",t),this.$emit("change",t)}},hasValue(){const e=this.currentValue;return Array.isArray(e)&&e.length>0},displayValue(){return this.hasValue?this.currentValue[0]:null},displayLabel(){if(!this.displayValue)return"";const e=this.displayValue;return"object"==typeof e&&null!==e?e[this.labelKey]||e.label||String(e[this.valueKey]||e.value||""):this.getLabel(e)},allSelectedItems(){const e=this.currentValue;return Array.isArray(e)&&0!==e.length?e.map(e=>"object"==typeof e&&null!==e?{value:e[this.valueKey]||e.value,label:e[this.labelKey]||e.label||String(e[this.valueKey]||e.value||"")}:{value:e,label:this.getLabel(e)}):[]},displayItems(){const e=this.allSelectedItems;return void 0===this.maxTagCount||null===this.maxTagCount?e:e.slice(0,this.maxTagCount)},remainingCount(){if(void 0===this.maxTagCount||null===this.maxTagCount)return 0;const e=this.allSelectedItems.length;return Math.max(0,e-this.maxTagCount)},showClear(){return this.allowClear&&this.hasValue&&!this.disabled}},methods:{findOptionByValue(e){return this.options&&0!==this.options.length?this.options.find(t=>{const l="object"==typeof t?t[this.valueKey]:t;return l===e||String(l)===String(e)}):null},getLabel(e){const t=this.findOptionByValue(e);return t?"object"==typeof t?t[this.labelKey]:t:String(e)},removeItem(e,t){if(this.disabled)return;t.stopPropagation();const l=this.currentValue;if(Array.isArray(l)){const t=l.filter(t=>{if("object"==typeof t&&null!==t){return(t[this.valueKey]||t.value)!==e}return t!==e}),a=this.sourceItems.filter(e=>!t.some(t=>t[this.valueKey]===e[this.valueKey]));this.$emit("update:sourceItems",a),this.currentValue=t}},clearValue(e){if(this.disabled)return;e.stopPropagation(),this.currentValue=[];const t=this.sourceItems.filter(e=>!this.currentValue.some(t=>t[this.valueKey]===e[this.valueKey]));this.$emit("update:sourceItems",t)}}});const K=["tabindex"],M=["title"],D={key:1,class:"fc-cus-select-selection-placeholder"},L={key:3,class:"fc-cus-select-arrow"},_=["tabindex"],N={class:"fc-cus-select-selection-overflow"},U=["title"],z={class:"fc-cus-select-selection-item-content"},Y=["onClick"],q={key:0,class:"fc-cus-select-selection-overflow-item",style:{opacity:"1"}},Q={class:"fc-cus-select-selection-item"},J={class:"fc-cus-select-selection-item-content"},G={key:1,class:"fc-cus-select-selection-placeholder"},H={key:1,class:"fc-cus-select-arrow"};R.render=function(e,t,l,a,s,f){return r(),i(n,null,[c(" 单个展示模式 "),e.multiple?(r(),i(n,{key:1},[c(" 多个展示模式 "),o("div",{class:d(["fc-cus-select fc-cus-select-multiple",{"fc-cus-select-disabled":e.disabled}]),style:u(e.style),tabindex:e.disabled?-1:0},[o("div",{class:d(["fc-cus-select-selector",{"fc-cus-select-selector-borderless":!e.bordered}])},[o("div",N,[c(" 显示的 tags "),(r(!0),i(n,null,h(e.displayItems,(l,a)=>(r(),i("div",{key:a,class:"fc-cus-select-selection-overflow-item",style:{opacity:"1"}},[o("span",{class:"fc-cus-select-selection-item",title:l.label},[o("span",z,p(l.label),1),o("span",{class:"fc-cus-select-selection-item-remove",onClick:t=>e.removeItem(l.value,t)},[...t[4]||(t[4]=[o("span",{role:"img","aria-label":"close",class:"anticon anticon-close"},[o("svg",{focusable:"false","data-icon":"close",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true","fill-rule":"evenodd",viewBox:"64 64 896 896"},[o("path",{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"})])],-1)])],8,Y)],8,U)]))),128)),c(" 折叠提示 "),e.remainingCount>0?(r(),i("div",q,[o("span",Q,[o("span",J," +"+p(e.remainingCount),1)])])):c("v-if",!0),c(" 空值占位符 "),e.hasValue?c("v-if",!0):(r(),i("span",G,p(e.placeholder||"请选择"),1))]),e.showClear?(r(),i("span",{key:0,class:"fc-cus-select-clear",onClick:t[1]||(t[1]=(...t)=>e.clearValue&&e.clearValue(...t))},[...t[5]||(t[5]=[o("span",{role:"img","aria-label":"close-circle",class:"anticon anticon-close-circle"},[o("svg",{focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true","fill-rule":"evenodd",viewBox:"64 64 896 896"},[o("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})])],-1)])])):(r(),i("span",H,[...t[6]||(t[6]=[o("span",{role:"img","aria-label":"down",class:"anticon anticon-down"},[o("svg",{focusable:"false","data-icon":"down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"64 64 896 896"},[o("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})])],-1)])]))],2)],14,_)],2112)):(r(),i("div",{key:0,class:d(["fc-cus-select fc-cus-select-single",{"fc-cus-select-disabled":e.disabled}]),style:u(e.style),tabindex:e.disabled?-1:0},[o("div",{class:d(["fc-cus-select-selector",{"fc-cus-select-selector-borderless":!e.bordered}])},[e.displayValue?(r(),i("span",{key:0,class:"fc-cus-select-selection-item",title:e.displayLabel},p(e.displayLabel),9,M)):(r(),i("span",D,p(e.placeholder||"请选择"),1)),e.showClear?(r(),i("span",{key:2,class:"fc-cus-select-clear",onClick:t[0]||(t[0]=(...t)=>e.clearValue&&e.clearValue(...t))},[...t[2]||(t[2]=[o("span",{role:"img","aria-label":"close-circle",class:"anticon anticon-close-circle"},[o("svg",{focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true","fill-rule":"evenodd",viewBox:"64 64 896 896"},[o("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})])],-1)])])):(r(),i("span",L,[...t[3]||(t[3]=[o("span",{role:"img","aria-label":"down",class:"anticon anticon-down"},[o("svg",{focusable:"false","data-icon":"down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"64 64 896 896"},[o("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})])],-1)])]))],2)],14,K))],2112)};var W=s({name:"CusStoreSelect",components:{CusSelect:R},props:{formCreateInject:{type:Object,default:null},modelValue:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},maxTagCount:{type:Number,default:void 0},placeholder:{type:String,default:"请选择"},disabled:{type:Boolean,default:!1},style:{type:[String,Object],default:()=>({width:"100%"})},valueKey:{type:String,default:"value"},labelKey:{type:String,default:"label"},allowClear:{type:Boolean,default:!1},field:{type:String,default:""},bordered:{type:Boolean,default:!0},extraQuery:{type:Object,default:()=>({})},extraQueryFn:{type:Function,default:()=>{}}},emits:["update:modelValue","change"],data:()=>({messageId:0,pendingCallbacks:{},internalOptions:[],sourceItems:[]}),computed:{mergedOptions(){if(this.internalOptions.length>0){const e=new Map;return this.options.forEach(t=>{const l="object"==typeof t?t[this.valueKey]:t;e.set(l,t)}),this.internalOptions.forEach(t=>{const l="object"==typeof t?t[this.valueKey]:t;e.set(l,t)}),Array.from(e.values())}return this.options}},watch:{options:{immediate:!0,handler(e){0===this.internalOptions.length&&Array.isArray(e)&&e.length>0&&(this.internalOptions=[...e])}}},mounted(){window.addEventListener("message",this.handleMessage)},beforeUnmount(){window.removeEventListener("message",this.handleMessage)},methods:{serializeForPostMessage(e){if(null==e)return e;try{return JSON.parse(JSON.stringify(e))}catch(t){if(console.warn("CusStoreSelect: 数据序列化失败,尝试递归处理",t),Array.isArray(e))return 0===e.length?[]:e.map(e=>this.serializeForPostMessage(e));if("object"==typeof e){const t={};for(const l in e)if(Object.prototype.hasOwnProperty.call(e,l))try{t[l]=this.serializeForPostMessage(e[l])}catch(e){console.warn("CusStoreSelect: 跳过无法序列化的属性: "+l,e)}return t}return e}},handleClick(){if(this.disabled)return;const e=`store-select-${this.field||"default"}-${Date.now()}-${++this.messageId}`,t=Array.isArray(this.modelValue)?this.modelValue:[];let l=null;t.length>0&&(l=t);const a=null==l?null:this.serializeForPostMessage(l),r={...this.extraQuery};this.extraQueryFn&&Object.assign(r,this.extraQueryFn());const i={type:"OPEN_STORE_SELECT",field:this.field||"",multiple:this.multiple,currentValue:a,valueKey:this.valueKey,labelKey:this.labelKey,extraQuery:r,messageId:e};if(window.parent&&window.parent!==window)try{window.parent.postMessage(i,"*")}catch(e){console.error("CusStoreSelect: 发送消息失败",e)}else console.warn("CusStoreSelect: 当前不在 iframe 环境中,无法向父窗口发送消息");this.pendingCallbacks[e]=(e,t)=>{t&&Array.isArray(t)&&t.length>0&&this.mergeOptions(t),this.sourceItems=t,this.handleUpdate(e),this.handleChange(e)}},handleMessage(e){const t=e.data;if(t&&"STORE_SELECT_RESULT"===t.type){const{field:e,value:l,sourceItems:a,messageId:r}=t;if(e!==this.field)return;const i=this.pendingCallbacks[r];i&&(i(l,a),delete this.pendingCallbacks[r])}},mergeOptions(e){if(!Array.isArray(e)||0===e.length)return;const t=new Map;this.internalOptions.forEach(e=>{const l="object"==typeof e?e[this.valueKey]:e;t.set(l,e)}),e.forEach(e=>{const l="object"==typeof e?e[this.valueKey]:e;t.set(l,e)}),this.internalOptions=Array.from(t.values())},handleUpdate(e){this.$emit("update:modelValue",e),this.triggerValidate()},handleChange(e){this.$emit("change",e,this.sourceItems&&this.sourceItems.length>0?this.multiple?this.sourceItems:this.sourceItems[0]:this.multiple?[]:null)},triggerValidate(){this.$nextTick(()=>{this.$nextTick(()=>{try{if(this.formCreateInject&&this.formCreateInject.api&&this.field)return void this.formCreateInject.api.validateField(this.field).catch(()=>{});let e=this.$parent;for(;e;){if(e.$options&&"FormCreate"===e.$options.name&&e.fapi){this.field&&e.fapi.validateField&&e.fapi.validateField(this.field).catch(()=>{});break}e=e.$parent}}catch(e){console.warn("CusStoreSelect: 触发校验失败",e)}})})}}});W.render=function(e,t,l,a,o,s){const n=f("CusSelect");return r(),i("div",{onClick:t[1]||(t[1]=(...t)=>e.handleClick&&e.handleClick(...t))},[m(n,{"model-value":e.modelValue,options:e.mergedOptions,"source-items":e.sourceItems,"onUpdate:sourceItems":t[0]||(t[0]=t=>e.sourceItems=t),multiple:e.multiple,"max-tag-count":e.maxTagCount,placeholder:e.placeholder,disabled:e.disabled,style:u(e.style),valueKey:e.valueKey,labelKey:e.labelKey,allowClear:e.allowClear,bordered:e.bordered,"onUpdate:modelValue":e.handleUpdate,onChange:e.handleChange},null,8,["model-value","options","source-items","multiple","max-tag-count","placeholder","disabled","style","valueKey","labelKey","allowClear","bordered","onUpdate:modelValue","onChange"])])};var X=s({name:"CusUserSelect",components:{CusSelect:R},props:{formCreateInject:{type:Object,default:null},modelValue:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},maxTagCount:{type:Number,default:void 0},placeholder:{type:String,default:"请选择"},disabled:{type:Boolean,default:!1},style:{type:[String,Object],default:()=>({width:"100%"})},valueKey:{type:String,default:"value"},labelKey:{type:String,default:"label"},allowClear:{type:Boolean,default:!1},field:{type:String,default:""},bordered:{type:Boolean,default:!0},selectType:{type:[String,Number],default:null},extraQuery:{type:Object,default:()=>({})},extraQueryFn:{type:Function,default:()=>{}}},emits:["update:modelValue","change"],data:()=>({messageId:0,pendingCallbacks:{},internalOptions:[],sourceItems:[]}),computed:{mergedOptions(){if(this.internalOptions.length>0){const e=new Map;return this.options.forEach(t=>{const l="object"==typeof t?t[this.valueKey]:t;e.set(l,t)}),this.internalOptions.forEach(t=>{const l="object"==typeof t?t[this.valueKey]:t;e.set(l,t)}),Array.from(e.values())}return this.options}},watch:{options:{immediate:!0,handler(e){0===this.internalOptions.length&&Array.isArray(e)&&e.length>0&&(this.internalOptions=[...e])}}},mounted(){window.addEventListener("message",this.handleMessage)},beforeUnmount(){window.removeEventListener("message",this.handleMessage)},methods:{serializeForPostMessage(e){if(null==e)return e;try{return JSON.parse(JSON.stringify(e))}catch(t){if(console.warn("CusUserSelect: 数据序列化失败,尝试递归处理",t),Array.isArray(e))return 0===e.length?[]:e.map(e=>this.serializeForPostMessage(e));if("object"==typeof e){const t={};for(const l in e)if(Object.prototype.hasOwnProperty.call(e,l))try{t[l]=this.serializeForPostMessage(e[l])}catch(e){console.warn("CusUserSelect: 跳过无法序列化的属性: "+l,e)}return t}return e}},handleClick(){if(this.disabled)return;const e=`user-select-${this.field||"default"}-${Date.now()}-${++this.messageId}`,t=Array.isArray(this.modelValue)?this.modelValue:[];let l=null;t.length>0&&(l=t);const a=null==l?null:this.serializeForPostMessage(l),r={...this.extraQuery};this.extraQueryFn&&Object.assign(r,this.extraQueryFn());const i={type:"OPEN_USER_SELECT",field:this.field||"",multiple:this.multiple,currentValue:a,valueKey:this.valueKey,labelKey:this.labelKey,selectType:this.selectType,extraQuery:r,messageId:e};if(window.parent&&window.parent!==window)try{window.parent.postMessage(i,"*")}catch(e){console.error("CusUserSelect: 发送消息失败",e)}else console.warn("CusUserSelect: 当前不在 iframe 环境中,无法向父窗口发送消息");this.pendingCallbacks[e]=(e,t)=>{t&&Array.isArray(t)&&t.length>0&&this.mergeOptions(t),this.sourceItems=t,this.handleUpdate(e),this.handleChange(e)}},handleMessage(e){const t=e.data;if(t&&"USER_SELECT_RESULT"===t.type){const{field:e,value:l,sourceItems:a,messageId:r}=t;if(e!==this.field)return;const i=this.pendingCallbacks[r];i&&(i(l,a),delete this.pendingCallbacks[r])}},mergeOptions(e){if(!Array.isArray(e)||0===e.length)return;const t=new Map;this.internalOptions.forEach(e=>{const l="object"==typeof e?e[this.valueKey]:e;t.set(l,e)}),e.forEach(e=>{const l="object"==typeof e?e[this.valueKey]:e;t.set(l,e)}),this.internalOptions=Array.from(t.values())},handleUpdate(e){this.$emit("update:modelValue",e),this.triggerValidate()},handleChange(e){this.$emit("change",e,this.sourceItems&&this.sourceItems.length>0?this.multiple?this.sourceItems:this.sourceItems[0]:this.multiple?[]:null)},triggerValidate(){this.$nextTick(()=>{this.$nextTick(()=>{try{if(this.formCreateInject&&this.formCreateInject.api&&this.field)return void this.formCreateInject.api.validateField(this.field).catch(()=>{});let e=this.$parent;for(;e;){if(e.$options&&"FormCreate"===e.$options.name&&e.fapi){this.field&&e.fapi.validateField&&e.fapi.validateField(this.field).catch(()=>{});break}e=e.$parent}}catch(e){console.warn("CusUserSelect: 触发校验失败",e)}})})}}});X.render=function(e,t,l,a,o,s){const n=f("CusSelect");return r(),i("div",{onClick:t[1]||(t[1]=(...t)=>e.handleClick&&e.handleClick(...t))},[m(n,{"model-value":e.modelValue,options:e.mergedOptions,"source-items":e.sourceItems,"onUpdate:sourceItems":t[0]||(t[0]=t=>e.sourceItems=t),multiple:e.multiple,"max-tag-count":e.maxTagCount,placeholder:e.placeholder,disabled:e.disabled,style:u(e.style),valueKey:e.valueKey,labelKey:e.labelKey,allowClear:e.allowClear,bordered:e.bordered,"onUpdate:modelValue":e.handleUpdate,onChange:e.handleChange},null,8,["model-value","options","source-items","multiple","max-tag-count","placeholder","disabled","style","valueKey","labelKey","allowClear","bordered","onUpdate:modelValue","onChange"])])};var Z={name:"TableForm",emits:["change","add","delete","update:modelValue"],props:{formCreateInject:Object,modelValue:{type:Array,default:()=>[]},columns:{type:Array,required:!0,default:()=>[]},filterEmptyColumn:{type:Boolean,default:!0},deletable:{type:Boolean,default:!0},addable:{type:Boolean,default:!0},options:{type:Object,default:()=>y({submitBtn:!1,resetBtn:!1})},min:Number,max:Number,disabled:Boolean},watch:{modelValue:{handler(){this.updateTable()},deep:!0},"formCreateInject.preview":function(e){this.emptyRule.children[0].props.colspan=this.columns.length+(e?1:2)}},data(){return{rule:[],trs:[],fapi:{},Form:g(this.formCreateInject.form.$form()),copyTrs:"",oldValue:"",emptyRule:{type:"tr",_isEmpty:!0,native:!0,subRule:!0,children:[{type:"td",style:{textAlign:"center"},native:!0,subRule:!0,props:{colspan:this.columns.length+(this.formCreateInject.preview?1:2)},children:[this.formCreateInject.t("dataEmpty")||"暂无数据"]}]}}},methods:{formChange(){this.updateValue()},updateValue(){const e=this.trs.map((e,t)=>({...this.modelValue[t]||{},...this.fapi.getChildrenFormData(e)})).filter(e=>{if(!this.filterEmptyColumn)return!0;if(null==e)return!1;let t=!1;return Object.keys(e).forEach(l=>{t=t||void 0!==e[l]&&""!==e[l]&&null!==e[l]}),t}),t=JSON.stringify(e);t!==this.oldValue&&(this.oldValue=t,this.$emit("update:modelValue",e),this.$emit("change",e))},setRawData(e,t){const l=this.trs[e];this.fapi.setChildrenFormData(l,t,!0)},updateTable(){const e=JSON.stringify(this.modelValue);this.oldValue!==e&&(this.oldValue=e,this.trs=this.trs.splice(0,this.modelValue.length),this.modelValue.length?this.clearEmpty():this.addEmpty(),this.modelValue.forEach((e,t)=>{this.trs[t]||this.addRaw(),this.setRawData(t,e||{})}),this.rule[0].children[1].children=this.trs)},addEmpty(){this.trs.length&&this.trs.splice(0,this.trs.length),this.trs.push(this.emptyRule)},clearEmpty(){this.trs[0]&&this.trs[0]._isEmpty&&this.trs.splice(0,1)},delRaw(e){this.disabled||!this.deletable||this.min>0&&this.trs.length<=this.min||(this.trs.splice(e,1),this.updateValue(),this.trs.length?this.trs.forEach(e=>this.updateRaw(e)):this.addEmpty(),this.$emit("delete",e))},addRaw(e){if(e&&this.disabled)return;const t=this.formCreateInject.form.parseJson(this.copyTrs)[0];1===this.trs.length&&this.trs[0]._isEmpty&&this.trs.splice(0,1),this.trs.push(t),this.updateRaw(t),e&&(this.$emit("add",this.trs.length),this.updateValue())},updateRaw(e){const t=this.trs.indexOf(e);e.children[0].props.innerText=t+1,e.children[e.children.length-1].children[0].props.onClick=()=>{this.delRaw(t)}},loadRule(){const e=[{type:"th",native:!0,class:"_fc-tf-head-idx",props:{innerText:"#"}}];let t=[{type:"td",class:"_fc-tf-idx",native:!0,props:{innerText:"0"}}];this.columns.forEach(l=>{e.push({type:"th",native:!0,style:{...l.style||{},textAlign:l.align||"center"},class:l.required?"_fc-tf-head-required":"",props:{innerText:l.label||""}}),t.push({type:"td",native:!0,children:[...l.rule||[]]})}),e.push({type:"th",native:!0,class:"_fc-tf-edit fc-clock",props:{innerText:this.formCreateInject.t("operation")||"操作"}}),t.push({type:"td",native:!0,class:"_fc-tf-btn fc-clock",children:[{type:"i",native:!0,class:"fc-icon icon-delete",props:{}}]}),this.copyTrs=this.formCreateInject.form.toJson([{type:"tr",native:!0,subRule:!0,children:t}]),this.rule=[{type:"table",native:!0,class:"_fc-tf-table",props:{border:"1",cellspacing:"0",cellpadding:"0"},children:[{type:"thead",native:!0,children:[{type:"tr",native:!0,children:e}]},{type:"tbody",native:!0,children:this.trs}]}]}},created(){this.loadRule()},mounted(){this.updateTable()}};Z.render=function(e,t,l,a,s,n){const u=f("a-button");return r(),i("div",{class:d(["_fc-table-form",{"_fc-disabled":l.disabled}])},[(r(),v(b(s.Form),{option:l.options,rule:s.rule,extendOption:!0,disabled:l.disabled,onChange:n.formChange,api:s.fapi,"onUpdate:api":t[0]||(t[0]=e=>s.fapi=e),onEmitEvent:e.$emit},null,40,["option","rule","disabled","onChange","api","onEmitEvent"])),l.addable&&(!l.max||l.max>this.trs.length)?(r(),v(u,{key:0,type:"link",class:"fc-clock",onClick:t[1]||(t[1]=e=>n.addRaw(!0)),disabled:l.disabled},{default:w(()=>[t[2]||(t[2]=o("i",{class:"fc-icon icon-add-circle",style:{"font-weight":"700"}},null,-1)),C(" "+p(l.formCreateInject.t("add")||"添加"),1)]),_:1},8,["disabled"])):c("v-if",!0)],2)};var ee=s({name:"TableFormView",data:()=>({})});const te={class:"_fd-table-form"},le={key:0,class:"_fd-tf-wrap"},ae={key:1,class:"_fc-child-empty"};ee.render=function(e,t,l,a,o,s){return r(),i("div",te,[e.$slots.default?(r(),i("div",le,[k(e.$slots,"default")])):(r(),i("div",ae))])};var re=s({name:"TableFormColumnView",props:{label:String,align:String,width:[Number,String],color:String,required:Boolean},computed:{colStyle(){const e=this.width,t={width:V.Number(e)?e+"px":e&&"auto"!==e?e:"180px"};return this.color&&(t.color=this.color),t}},data:()=>({})});const ie={key:0,class:"_fd-tf-required"},oe={class:"_fd-tf-con"};re.render=function(e,t,l,a,s,n){return r(),i("div",{class:"_fd-tf-col",style:u(e.colStyle)},[o("div",{class:"_fd-tf-title",style:u({textAlign:e.align||"center"})},[e.required?(r(),i("span",ie,"*")):c("v-if",!0),C(p(e.label||""),1)],4),o("div",oe,[k(e.$slots,"default")])],4)};var se=[e,t,l,a,E,R,W,X,Z,ee,re],ne={name:"checkbox",modelField:"value",mergeProp(e){const t=e.prop.props;P(t,"options")||(t.options=e.prop.options||[])}},ce={...ne,name:"radio"},de={...ne,name:"select",mergeProp(e){const t=e.prop.props;P(t,"options")||(t.options=e.prop.options||[]);const l=e.effectData("fetch");l&&!0===l.loading&&(t.disabled=!0,t.loading=!0)},render(e,t){const l=t.effectData("fetch");if(l&&!0===l.loading&&e.loading){const l={...e};return l.notFoundContent=e.loading,t.$render.defaultRender(t,l)}return t.$render.defaultRender(t,e)}},ue={name:"cascader",mergeProp(e){const t=e.prop.props;P(t,"options")||(t.options=e.prop.options||[]);const l=e.effectData("fetch");l&&!0===l.loading&&(t.disabled=!0,t.loading=!0)},render(e,t){const l=t.effectData("fetch");if(l&&!0===l.loading&&e.loading){const l={...e};return l.notFoundContent=e.loading,t.$render.defaultRender(t,l)}return t.$render.defaultRender(t,e)}};const pe={date:"YYYY-MM-DD",month:"YYYY-MM",week:"YYYY-wo",quarter:"YYYY-qQ",year:"YYYY"},he="datePicker";var fe={name:he,maker:["date","month","week"].reduce((e,t)=>(e[t]=T(he,{type:t}),e),{dateRange:T(he,{type:"range"}),datetimeRange:T(he,e=>e.props({type:"range",showTime:!0}))}),modelField:"value",mergeProp(e){const t=e.prop.props,l=t.type||t.picker;t.valueFormat||(t.valueFormat=(pe[l]||pe.date)+(!t.showTime||l&&"date"!==l?"":" HH:mm:ss"))},render:(e,t)=>t.$render.vNode[(!0===t.prop.props.range?"range":"date")+"Picker"](t.prop,e)};var me={name:"hidden",maker:{hidden:(e,t)=>T("hidden")("",e,t)},render:()=>[]},ye={name:"text",loadChildren:!1,init(e){console.log("[Text Parser] Text parser initialized for rule:",e.rule.field||e.rule.name||"unnamed")},mounted(e){var t,l;const a=e.rule.props||{},r=e.rule.bindField||a.bindField||(null===(t=e.prop.props)||void 0===t?void 0:t.bindField),i=e.rule.template||a.template||(null===(l=e.prop.props)||void 0===l?void 0:l.template);(i||r)&&setTimeout(()=>{if(e.$handle&&e.$handle.api)try{let t="";if(i){const l=e.$handle.api.formData();console.log("[Text Parser] Current form data:",l),t=e.$handle.loadStrVar(i,t=>{const a=e.$handle.api.getValue(t);return console.log("[Text Parser] Getting field value:",t,"=",a,"type:",typeof a),void 0===a&&l&&void 0!==l[t]?(console.log("[Text Parser] Fallback to formData:",t,"=",l[t]),l[t]):a},null),console.log("[Text Parser] Manually parsed template:",i,"result:",t,"type:",typeof t)}else r&&(t=e.$handle.api.getValue(r)||"",console.log("[Text Parser] Manually got field value:",r,"result:",t));null!=t?(e.rule.children||(e.rule.children=[]),e.rule.children[0]=String(t),e.$handle.api.sync(e.rule),e.$handle.refresh(),console.log("[Text Parser] Updated rule.children to:",e.rule.children,"value:",t)):console.log("[Text Parser] Value is null/undefined, not updating children")}catch(e){console.error("[Text Parser] Error in mounted hook:",e)}},500)},renderChildren:(e,t)=>({default:()=>{var l;let a=null===(l=t.rule)||void 0===l?void 0:l.children;a||(a=e);const r=(Array.isArray(a)?a:[a]).filter(e=>null!=e).map(e=>V.String(e)?e:String(e)).join("");return console.log("[Text Parser] renderChildren default() called, text:",r,"for rule:",t.rule.field||t.rule.name||"unnamed"),r||""}}),mergeProp(e){var t,l,a;console.log("[Text Parser] mergeProp called for rule:",e.rule.field||e.rule.name||"unnamed","type:",e.rule.type);const r=e.rule.props||{},i=e.rule.bindField||r.bindField||(null===(t=e.prop.props)||void 0===t?void 0:t.bindField),o=e.rule.template||r.template||(null===(l=e.prop.props)||void 0===l?void 0:l.template);let s=e.rule.bindMode||r.bindMode||(null===(a=e.prop.props)||void 0===a?void 0:a.bindMode);if(s||(s=o?"template":i?"field":"static"),"field"===s&&i){const t={attr:i,to:"child",modify:!0,wait:300,watch:!0};e.rule.effect||(e.rule.effect={}),e.rule.effect.loadData||(e.rule.effect.loadData=[]);var n;if(!e.rule.effect.loadData.some(e=>e.attr===i&&"child"===e.to))if(e.rule.effect.loadData.push(t),console.log("[Text Parser] Added loadData config (field mode):",t,"to effect.loadData:",e.rule.effect.loadData,"rule effect:",e.rule.effect,"ctx:",e),e.$handle&&e.$handle.effect)console.log('[Text Parser] Manually calling effect(ctx, "loaded") for loadData (field)'),e.$handle.effect(e,"loaded");else console.log("[Text Parser] ctx.$handle.effect not available:",!!e.$handle,!(null===(n=e.$handle)||void 0===n||!n.effect))}else if("template"===s&&o){console.log("[Text Parser] Setting up template binding:",o,"for rule:",e.rule.field||e.rule.name||"unnamed");const t={template:o,to:"child",modify:!0,wait:300,watch:!0};e.rule.effect||(e.rule.effect={}),e.rule.effect.loadData||(e.rule.effect.loadData=[]);var c;if(e.rule.effect.loadData.some(e=>e.template===o&&"child"===e.to))console.log("[Text Parser] loadData config already exists, skipping");else if(e.rule.effect.loadData.push(t),console.log("[Text Parser] Added loadData config:",t,"to effect.loadData:",e.rule.effect.loadData,"rule effect:",e.rule.effect,"ctx:",e),e.$handle&&e.$handle.effect){if(console.log('[Text Parser] Manually calling effect(ctx, "loaded") for loadData (template)'),e.$handle.effect(e,"loaded"),!e._textLoadDataWatched){e._textLoadDataWatched=!0;const t=x(e.rule.effect,"loadData");e.watch.push(S(t,(t,l)=>{console.log("[Text Parser] effect.loadData changed, triggering watch",t,l),e.$handle.effect(e,"watch",{loadData:t})},{deep:!0}))}}else console.log("[Text Parser] ctx.$handle.effect not available:",!!e.$handle,!(null===(c=e.$handle)||void 0===c||!c.effect))}null==e.rule.formCreateChild||e.rule.children||(e.rule.children=[e.rule.formCreateChild]),e.rule.children||(e.rule.children=[]),("field"===s&&i||"template"===s&&o)&&((!e.rule.children||Array.isArray(e.rule.children)&&0===e.rule.children.length)&&(e.rule.children="template"===s?[""]:[" "]),console.log("[Text Parser] Initialized children for dynamic binding:",e.rule.children,"bindMode:",s))},render(e,t){var l,a;console.log("[Text Parser] render called for rule:",t.rule.field||t.rule.name||"unnamed","children:",e,"prop:",t.prop,"hidden:",null===(l=t.prop)||void 0===l?void 0:l.hidden,"display:",null===(a=t.prop)||void 0===a?void 0:a.display);let r="";if(e&&"function"==typeof e.default)try{r=e.default()||"",console.log("[Text Parser] text content:",r)}catch(e){console.warn("Text component render children error:",e),r=""}r=null==r||void 0===r?"":String(r);const i={...t.prop};i.props||(i.props={}),"text"===i.type&&(i.type="div"),delete i.props.innerHTML;const o=t.vNode.make("div",i,[r]);return console.log("[Text Parser] created vnode:",o),o}};var ge={name:"input",maker:["password","url","email","text","textarea","search"].reduce((e,t)=>(e[t]=T("input",{type:t}),e),{idate:T("input",{type:"date"})}),modelField:"value",render(e,t){let l=t.prop.props.type;return-1===["textarea","search","password"].indexOf(l)&&(l="input"),l={textarea:"aTextarea",search:"aInputSearch",password:"aInputPassword"}[l]||"aInput",t.$render.vNode.make(l,t.prop,e)}},ve={name:"timePicker",modelField:"value",mergeProp(e){const t=e.prop.props;t.valueFormat||(t.valueFormat="HH:mm:ss")},render:(e,t)=>t.$render.vNode["time"+(!0===t.prop.props.range?"Range":"")+"Picker"](t.prop,e)},be={name:"tree",modelField:"checkedKeys",mergeProp(e){const t=e.prop.props;t.fieldNames?t.fieldNames.key||(t.fieldNames.key="id"):t.fieldNames={key:"id"},t.checkedKeys=e.rule.value,t.checkable=!0}},we={name:"FcRow",render:(e,t)=>t.vNode.col({props:{span:24}},{default:()=>[t.vNode.row(t.prop,e)]})};var Ce=[ne,fe,{...fe,name:"rangePicker",maker:{},render:(e,t)=>t.$render.vNode.rangePicker(t.prop,e)},me,ye,ge,ve,{...ve,name:"timeRangePicker",render:(e,t)=>t.$render.vNode.timeRangePicker(t.prop,e)},be,ce,de,ue,we,{name:"cusStoreSelect",modelField:"modelValue",toFormValue:(e,t)=>null==e||""===e?[]:Array.isArray(e)?e.map(e=>("object"!=typeof e||null===e||void 0===e.value&&e.label,e)):[e],toValue:(e,t)=>e,mergeProp(e){const t=e.prop.props;if(P(t,"options")||(t.options=e.prop.options||[]),P(t,"field")||(t.field=e.rule.field||""),void 0!==e.rule.value){const t=e.rule.value;null==t||""===t?e.rule.value=[]:Array.isArray(t)||(e.rule.value=[t])}},render(e,t){const l=t.$render.defaultRender(t,e);if(l&&l.props&&l.props.on){const e=l.props.on["update:modelValue"],a=()=>{$(()=>{$(()=>{try{const e=t.rule.field;if(e)return void t.$handle.api.validateField(e).catch(()=>{});const l=t.$handle.getFieldCtx(t.rule.field);l&&l.id&&t.$handle.$manager.validateField(l.id).catch(()=>{})}catch(e){console.warn("CusStoreSelect: 触发校验失败",e)}})})};l.props.on["update:modelValue"]=(...t)=>{e&&e(...t),a()};const r=l.props.on.change;l.props.on.change=r?(...e)=>{r(...e),a()}:a}return l}},{name:"cusUserSelect",modelField:"modelValue",toFormValue:(e,t)=>null==e||""===e?[]:Array.isArray(e)?e.map(e=>("object"!=typeof e||null===e||void 0===e.value&&e.label,e)):[e],toValue:(e,t)=>e,mergeProp(e){const t=e.prop.props;if(P(t,"options")||(t.options=e.prop.options||[]),P(t,"field")||(t.field=e.rule.field||""),P(t,"formCreateInject")||(t.formCreateInject=e.inject),void 0!==e.rule.value){const t=e.rule.value;null==t||""===t?e.rule.value=[]:Array.isArray(t)||(e.rule.value=[t])}},render(e,t){const l=t.$render.defaultRender(t,e);if(l&&l.props&&l.props.on){const e=l.props.on["update:modelValue"],a=()=>{$(()=>{$(()=>{try{const e=t.rule.field;if(e)return void t.$handle.api.validateField(e).catch(()=>{});const l=t.$handle.getFieldCtx(t.rule.field);l&&l.id&&t.$handle.$manager.validateField(l.id).catch(()=>{})}catch(e){console.warn("CusUserSelect: 触发校验失败",e)}})})};l.props.on["update:modelValue"]=(...t)=>{e&&e(...t),a()};const r=l.props.on.change;l.props.on.change=r?(...e)=>{r(...e),a()}:a}return l}}];var ke={tooltip:"aTooltip",popover:"aPopover",button:"aButton",icon:"aIcon",slider:"aSlider",rate:"aRate",upload:"fcUpload",cascader:"aCascader",timePicker:"aTimePicker",timeRangePicker:"aTimeRangePicker",datePicker:"aDatePicker",rangePicker:"aRangePicker",switch:"aSwitch",select:"aSelect",checkbox:"aCheckboxGroup",radio:"aRadioGroup",input:"aInput",inputNumber:"aInputNumber",treeSelect:"aTreeSelect",search:"aInputSearch",inputPassword:"aInputPassword",textarea:"aTextarea",formItem:"aFormItem",form:"aForm",frame:"fcFrame",col:"aCol",row:"aRow",tree:"aTree",autoComplete:"aAutoComplete",transfer:"aTransfer",group:"fcGroup",array:"fcGroup",subForm:"fcSubForm",object:"fcSubForm"};function xe(e,t){P(e,t)&&V.String(e[t])&&(e[t]={[t]:e[t],show:!0})}function Se(e){return!1===e}function $e(e){const t={...e};return delete t.children,t}var Ve={validate(){const e=this.form();return e?e.validate():new Promise(e=>e())},validateField(e){const t=this.form();return t?t.validateFields(e):new Promise(e=>e())},clearValidateState(e){const t=this.vm.refs[e.wrapRef];t&&t.clearValidate()},tidyOptions:e=>(["submitBtn","resetBtn","row","info","wrap","col","title"].forEach(t=>{!function(e,t){P(e,t)&&!V.Object(e[t])&&(e[t]={show:!!e[t]})}(e,t)}),e),tidyRule:({prop:e})=>(xe(e,"title"),xe(e,"info"),e),mergeProp(e){const t={info:{type:"popover",placement:"topLeft",icon:"QuestionCircleOutlined"},title:{},col:{span:24},wrap:{}};if(["info","wrap","col","title"].forEach(l=>{e.prop[l]=I([this.options[l]||{},e.prop[l]||{}],t[l])}),"upload"!==e.rule.type||e.prop.props.onPreview){if("upload"===e.rule.type&&e.prop.props.onPreview){const t=e.prop.props.onPreview,l=function(e){window.parent&&window.parent!==window&&window.parent.postMessage({type:"upload-preview",file:{url:e.url,name:e.name,uid:e.uid,size:e.size,type:e.type},timestamp:Date.now()},"*")};e.prop.props.onPreview=function(e){l(e),t&&"function"==typeof t&&t.apply(this,arguments)}}}else{const t=function(e){window.parent&&window.parent!==window&&window.parent.postMessage({type:"upload-preview",file:{url:e.url,name:e.name,uid:e.uid,size:e.size,type:e.type},timestamp:Date.now()},"*")};e.prop.props.onPreview=function(e){t(e)}}},getDefaultOptions:()=>({form:{hideRequiredMark:!1,layout:"horizontal",labelAlign:"right",labelCol:{span:3},wrapperCol:{span:21},validateOnRuleChange:!0},row:{gutter:0},submitBtn:{disabled:!1,loading:!1,type:"primary",innerText:"",show:!1,col:void 0,click:void 0},resetBtn:{disabled:!1,loading:!1,type:"default",innerText:"",show:!1,col:void 0,click:void 0}}),adapterValidate:(e,t)=>(e.validator=(e,l)=>new Promise((e,a)=>t(l,t=>{t?a(t):e()})),e),update(){const e=this.options.form;this.rule={props:{...e},on:{submit:e=>{e.preventDefault()}},style:e.style,type:"form"}},beforeRender(){const{key:e,ref:t,$handle:l}=this,a=this.options.form;O(this.rule,{key:e,ref:t,class:[a.className,a.class,"form-create",this.$handle.preview?"is-preview":""]}),O(this.rule.props,{model:l.formData})},render(e){return e.slotLen()&&!this.$handle.preview&&e.setSlot(void 0,()=>this.makeFormBtn()),this.$r(this.rule,Se(this.options.row.show)?e.getSlots():[this.makeRow(e)])},makeWrap(e,t){const l=e.prop,a=`${this.key}${e.key}`,r=l.col,i=this.isTitle(l)&&!1!==l.wrap.title,{layout:o,col:s}=this.rule.props,n=l.wrap.class;delete l.wrap.class,delete l.wrap.title;const c=Se(l.wrap.show)?t:this.$r(I([l.wrap,{props:{...$e(l.wrap||{}),hasFeedback:l.hasFeedback||!1,name:e.id,rules:e.injectValidate(),..."horizontal"!==o?{labelCol:{},wrapperCol:{}}:{}},class:this.$render.mergeClass(n||l.className,"fc-form-item"),key:a+"fi",ref:e.wrapRef,type:"formItem"}]),{default:()=>t,...i?{label:()=>this.makeInfo(l,a,e)}:{}});return"inline"===o||Se(s)||Se(r.show)?c:this.makeCol(l,a,[c])},isTitle(e){if(!1===this.options.form.title)return!1;const t=e.title;return!(!t.title&&!t.native||Se(t.show))},makeInfo(e,t,l){var a,r;const i={...e.title},o={...e.info};if(!1===this.options.form.title)return!1;if(!i.title&&!i.native||Se(i.show))return;const s="tooltip"===o.type;const n=this.getSlot("title"),c=[n?n({title:null===(a=l.refRule)||void 0===a||null===(a=a.__$title)||void 0===a?void 0:a.value,rule:l.rule,options:this.options}):null===(r=l.refRule)||void 0===r||null===(r=r.__$title)||void 0===r?void 0:r.value];if(!Se(o.show)&&(o.info||o.native)&&!Se(o.icon)){const e={type:o.type||"popover",props:$e(o),key:t+"pop"};delete e.props.icon,delete e.props.show,delete e.props.info,delete e.props.align,delete e.props.native;const a=s?"title":"content";var d;if(o.info&&!P(e.props,a))e.props[a]=null===(d=l.refRule)||void 0===d||null===(d=d.__$info)||void 0===d?void 0:d.value;c["left"!==o.align?"unshift":"push"](this.$r(I([o,e]),{[i.slot||"default"]:()=>this.$r({type:!0===o.icon?"QuestionCircleOutlined":o.icon||"",props:{type:!0===o.icon?"QuestionCircleOutlined":o.icon},key:t+"i"})}))}const u=I([i,{props:$e(i),key:t+"tit",class:"fc-form-title",type:i.type||"span"}]);return delete u.props.show,delete u.props.title,delete u.props.native,this.$r(u,c)},makeCol(e,t,l){const a=e.col;return this.$r({class:this.$render.mergeClass(a.class,"fc-form-col"),type:"col",props:a||{span:24},key:t+"col"},l)},makeRow(e){const t=this.options.row||{};return this.$r({type:"row",props:t,class:this.$render.mergeClass(t.class,"fc-form-row"),key:this.key+"row"},e)},makeFormBtn(){let e=[];if(Se(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),Se(this.options.resetBtn.show)||e.push(this.makeResetBtn()),!e.length)return;let{labelCol:t,wrapperCol:l,layout:a}=this.rule.props;"horizontal"!==a&&(t=l={});const r=this.$r({type:"formItem",class:"fc-form-item fc-form-footer",key:this.key+"fb",props:{labelCol:t,wrapperCol:l,label:" ",colon:!1}},e);return"inline"===a?r:this.$r({type:"col",class:"fc-form-col",props:{span:24},key:this.key+"fc"},[r])},makeResetBtn(){const e={...this.options.resetBtn},t=e.innerText||this.$handle.api.t("reset")||"重置";return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:"button",props:e,class:"fc-reset-btn",style:{width:e.width,marginLeft:"10px"},on:{click:()=>{const e=this.$handle.api;this.options.resetBtn.click?this.options.resetBtn.click(e):e.resetFields()}},key:this.key+"b2"},[t])},makeSubmitBtn(){const e={...this.options.submitBtn},t=e.innerText||this.$handle.api.t("submit")||"提交";return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:"button",props:e,class:"fc-submit-btn",style:{width:e.width},on:{click:()=>{const e=this.$handle.api;this.options.submitBtn.click?this.options.submitBtn.click(e):e.submit().catch(()=>{})}},key:this.key+"b1"},[t])}};const Pe={};var Fe;function Te(e,t){return V.Boolean(e)?e={show:e}:V.Undef(e)||V.Object(e)||(e={show:t}),e}function Ie(e,t){return{formEl:()=>t.$manager.form(),wrapEl(e){const l=t.getFieldCtx(e);if(l)return t.vm.refs[l.wrapRef]},validate:l=>new Promise((a,r)=>{const i=e.children,o=[t.$manager.validate()];i.filter(e=>!e.isScope).forEach(e=>{o.push(e.validate())}),Promise.all(o).then(()=>{a(!0),l&&l(!0)}).catch(a=>{r(a),l&&l(a),t.vm.emit("validate-fail",a,{api:e}),t.emitEvent("validate-fail",a,{api:e})})}),validateField:(l,a)=>new Promise((r,i)=>{const o=t.getFieldCtx(l);if(!o)return;const s=t.subForm[o.id],n=[t.$manager.validateField(o.id)];j(s).filter(e=>!e.isScope).forEach(e=>{n.push(e.validate())}),Promise.all(n).then(()=>{r(null),a&&a(null)}).catch(r=>{i(r),a&&a(r),t.vm.emit("validate-field-fail",r,{field:l,api:e})})}),clearValidateState(l,a=!0){e.helper.tidyFields(l).forEach(e=>{a&&this.clearSubValidateState(e),t.getCtxs(e).forEach(e=>{t.$manager.clearValidateState(e)})})},clearSubValidateState(l){e.helper.tidyFields(l).forEach(e=>{t.getCtxs(e).forEach(e=>{const l=t.subForm[e.id];l&&(Array.isArray(l)?l.forEach(e=>{e.clearValidateState()}):l&&l.clearValidateState())})})},btn:{loading:(t=!0)=>{e.submitBtnProps({loading:!!t})},disabled:(t=!0)=>{e.submitBtnProps({disabled:!!t})},show:(t=!0)=>{e.submitBtnProps({show:!!t})}},resetBtn:{loading:(t=!0)=>{e.resetBtnProps({loading:!!t})},disabled:(t=!0)=>{e.resetBtnProps({disabled:!!t})},show:(t=!0)=>{e.resetBtnProps({show:!!t})}},submitBtnProps:(l={})=>{let a=Te(t.options.submitBtn,!0);O(a,l),t.options.submitBtn=a,e.refreshOptions()},resetBtnProps:(l={})=>{let a=Te(t.options.resetBtn,!1);O(a,l),t.options.resetBtn=a,e.refreshOptions()},submit:(l,a)=>new Promise((r,i)=>{(!1===t.options.validateOnSubmit?Promise.resolve():e.validate()).then(()=>{let a=e.formData();t.beforeSubmit(a).then(()=>{V.Function(l)&&A(()=>l(a,e)),V.Function(t.options.onSubmit)&&A(()=>t.options.onSubmit(a,e)),t.vm.emit("submit",a,e),r(a)}).catch(e=>{})}).catch((...t)=>{V.Function(a)&&A(()=>a(e,...t)),i(...t)})}),request:t=>("string"==typeof t&&(t={action:t}),e.fetch(t)),throttle(e,t){let l=0;return function(...a){const r=this,i=Date.now();i-l>=(t||0)&&(l=i,e.call(r,...a))}},debounce(e,t){let l=null;return function(...a){const r=this;null!==l&&clearTimeout(l),l=setTimeout(()=>{e.call(r,...a)},t||0)}}}}!function(e){["treeSelect","upload","frame","autoComplete","cascader","datePicker","frame","inputNumber","inputPassword","radio","rate","switch","rate","slider","timePicker"].reduce((e,t)=>(e[t]=T(t),e),e),e.auto=e.autoComplete,e.number=e.inputNumber,e.time=e.timePicker,e.password=e.inputPassword}(Pe),function(e){e.sliderRange=T("slider",{range:!0})}(Pe),function(e){const t={frameInputs:["input",0],frameFiles:["file",0],frameImages:["image",0],frameInputOne:["input",1],frameFileOne:["file",1],frameImageOne:["image",1]};Object.keys(t).reduce((e,l)=>(e[l]=T("frame",e=>e.props({type:t[l][0],maxLength:t[l][1]})),e),e),e.frameInput=e.frameInputs,e.frameFile=e.frameFiles,e.frameImage=e.frameImages}(Pe),function(e){const t={image:["image",0],file:["file",0],uploadFileOne:["file",1],uploadImageOne:["image",1]};Object.keys(t).reduce((e,l)=>(e[l]=T("upload",e=>e.props({uploadType:t[l][0],maxLength:t[l][1]})),e),e),e.uploadImage=e.image,e.uploadFile=e.file}(Pe),(Fe=Pe).selectMultiple=T("select",{mode:"multiple"}),Fe.selectTags=T("select",{mode:"tags"}),Fe.selectCombobox=T("select",{mode:"combobox"}),function(e){e.cusStoreSelect=T("cusStoreSelect"),e.storeSelect=e.cusStoreSelect}(Pe),function(e){e.cusUserSelect=T("cusUserSelect"),e.userSelect=e.cusUserSelect}(Pe),function(e){e.text=T("text")}(Pe);var Oe={autoComplete:"value",cascader:"value",inputNumber:"value",inputPassword:"value",textarea:"value",rate:"value",slider:"value",treeSelect:"value",switch:"checked",cusStoreSelect:"modelValue",cusUserSelect:"modelValue"};const Ae={name:"required",load(e,t,l){const a=function(e){return V.Boolean(e)?{required:e}:V.String(e)?{message:e}:V.Undef(e)?{required:!1}:V.Function(e)?{validator:e}:V.Object(e)?e:{}}(e.getValue());if(!1===a.required)e.clearProp(),l.clearValidateState([t.field]);else{var r;const i={required:!0,validator:(e,t)=>new Promise((e,l)=>{V.empty(t)?l(i.message):e()}),...a},o=null===(r=t.__fc__.refRule)||void 0===r||null===(r=r.__$title)||void 0===r?void 0:r.value;if(i.message){const e=i.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);e&&(i.message=l.t(e[1],{title:o}))}else i.message=l.t("required",{title:o})||o+("en"===l.getLocale()?" is required":"不能为空");e.getProp().validate=[i]}l.sync(t)},watch(...e){Ae.load(...e)}};function je(e){e.componentAlias(ke),Object.keys(Oe).forEach(t=>{e.setModelField(t,Oe[t])}),se.forEach(t=>{e.component(t.name,t)}),e.register(Ae),Ce.forEach(t=>{e.parser(t)}),Object.keys(Pe).forEach(t=>{e.maker[t]=Pe[t]}),"undefined"!=typeof window&&window.antd&&e.useApp((e,t)=>{t.use(window.antd)})}const Ee=F({ui:'"ant-design-vue"',version:'"3.2.52"',manager:Ve,install:je,extendApi:Ie,attrs:{normal:["col","wrap"],array:["className"],key:["title","info"]}});"undefined"!=typeof window&&(window.formCreate=Ee);const Be=Ee.maker;export{Ee as default,Be as maker};
|
|
8
8
|
//# sourceMappingURL=form-create.esm.js.map
|