@yidun/antd-super-table 0.1.0 → 0.1.2
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/README.md +177 -150
- package/dist/SuperTable.vue.d.ts +311 -0
- package/dist/components/DynamicList.vue.d.ts +518 -0
- package/dist/components/EllipsisElement.vue.d.ts +347 -0
- package/dist/components/FormFieldItem.vue.d.ts +84 -0
- package/dist/components/FormSearchParams.vue.d.ts +101 -0
- package/dist/components/InputGroup.vue.d.ts +62 -0
- package/dist/components/InputNumberRange.vue.d.ts +44 -0
- package/dist/components/SceneConfigModal.vue.d.ts +93 -0
- package/dist/components/SceneListModal.vue.d.ts +90 -0
- package/dist/components/TableCellContent.vue.d.ts +79 -0
- package/dist/components/TableConfig.vue.d.ts +30 -0
- package/dist/{src/config.d.ts → config.d.ts} +1 -1
- package/dist/{src/index.d.ts → index.d.ts} +1 -3
- package/dist/index.js +1791 -1631
- package/dist/{types.d.ts → interface.d.ts} +17 -2
- package/dist/{src/utils → utils}/index.d.ts +1 -1
- package/dist/{src/utils → utils}/service.d.ts +1 -1
- package/example/index.vue +16 -4
- package/example/type-example.ts +0 -0
- package/package.json +3 -3
- package/dist/example/formItems.d.ts +0 -325
- package/dist/example/main.d.ts +0 -1
- package/dist/example/tableColumns.d.ts +0 -1146
- /package/dist/{src/components → components}/VNodes.d.ts +0 -0
- /package/dist/{src/utils → utils}/dialogManager.d.ts +0 -0
- /package/dist/{src/utils → utils}/useDialog.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._ellipsisElement_6fog1_1{width:100%;overflow:hidden;display:flex}._ellipsisElement_6fog1_1 ._elementItem_6fog1_6{min-width:0}._ellipsisElementHasGap_6fog1_10{gap:8px}._flexWrap_6fog1_14{flex-wrap:wrap}._ellipsisTag_6fog1_18{cursor:pointer}._imageEllipsisTag_6fog1_22{line-height:30px;min-width:32px;padding:0;text-align:center}._ellipsisList_6fog1_29{max-width:500px;display:flex;gap:8px;flex-wrap:wrap}._tableCellContent_1chn7_1 ._antTypographyEllipsis_1chn7_1{width:100%}._tableCellContent_1chn7_1 ._draggableIcon_1chn7_4{cursor:grab}._textListItem_1chn7_8{width:100%;margin-bottom:4px}._configBtn_fstz6_1{position:absolute;z-index:999;right:4px;top:8px;background:#fafafa}._tableConfig_fstz6_9{width:260px}._tableConfig_fstz6_9 ._tableConfigHead_fstz6_12{padding:8px}._tableConfig_fstz6_9 ._tableConfigActions_fstz6_15{display:flex;align-items:center;justify-content:space-between;padding:8px;border-bottom:1px solid #d9d9d9}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22{min-height:300px;max-height:60vh;overflow:auto;padding-bottom:12px}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._groupTitle_fstz6_28{padding:0 8px;font-size:12px;color:#000000a6;background:#fafafa;line-height:28px}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35{max-height:20vh;overflow-y:auto}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39{display:flex;align-items:center;gap:8px;min-height:28px;padding:0 8px;position:relative}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._columnItemContent_fstz6_47{flex:1;cursor:pointer}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._dragIcon_fstz6_51,._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._dragHandle_fstz6_54{cursor:grab}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._fixedActions_fstz6_57{display:none;align-items:center;gap:4px}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39:hover ._fixedActions_fstz6_57{display:flex}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._emptyText_fstz6_65{line-height:200px;text-align:center}.pro-table-config-popover .ant-popover-inner-content{padding:0}._dynamicList_1woe5_1{list-style:none;padding:0;margin:0}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6{display:flex;align-items:center;gap:16px;padding:8px;background-color:#fff}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6 ._dynamicListItemContent_1woe5_13{flex:1;min-width:0}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6 ._actionsIcons_1woe5_17{display:flex;align-items:center}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6 ._actionsIcons_1woe5_17 ._dragIcon_1woe5_21{cursor:grab}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6:last-child{border-bottom:none;margin-bottom:16px}._inputGroup_eukv3_1,._inputNumberGroup_149g6_1{width:100%}._inputNumberGroup_149g6_1 ._inputNumberGroupContent_149g6_4{width:100%;display:flex;align-items:center}._inputNumberGroup_149g6_1 ._inputNumber_149g6_1{width:unset!important;flex:1}._inputNumberGroup_149g6_1 ._startInputNumber_149g6_13{border-top-right-radius:0;border-bottom-right-radius:0;border-right-color:transparent}._inputNumberGroup_149g6_1 ._startInputNumber_149g6_13:focus,._inputNumberGroup_149g6_1 ._startInputNumber_149g6_13:hover{border-right-color:#1677ff}._inputNumberGroup_149g6_1 ._endInputNumber_149g6_21{border-top-left-radius:0;border-bottom-left-radius:0;border-left-color:transparent}._inputNumberGroup_149g6_1 ._endInputNumber_149g6_21:focus,._inputNumberGroup_149g6_1 ._endInputNumber_149g6_21:hover{border-left-color:#1677ff}._inputNumberGroup_149g6_1 ._divider_149g6_29{display:inline-block;padding:0 8px;line-height:30px;border-top:1px solid #d9d9d9;border-bottom:1px solid #d9d9d9}._formFieldItem_1imun_1{display:flex;align-items:center;min-width:0}._inputGroup_1imun_7{width:unset}._formFieldItemLabel_1imun_11{padding-left:8px;padding-right:8px;background-color:transparent!important;text-align:center;cursor:default!important;border-right:none!important}._customItemLabel_1imun_20{font-size:14px;padding-right:8px;color:#000000e0}.super-table-input-group{width:100%}.super-table-input-group .super-table-filter-form-item-label+.ant-input,.super-table-input-group .super-table-filter-form-item-label+.ant-input-number,.super-table-input-group .super-table-filter-form-item-label+.ant-select .ant-select-selector,.super-table-input-group .super-table-filter-form-item-label+.ant-picker,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group{border-left-color:transparent!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-input-number:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-number:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-select .ant-select-selector:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-select .ant-select-selector:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-picker:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-picker:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group:hover{border-left-color:#1677ff!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-input{border-left-color:transparent!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-input:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-input:hover{border-left-color:#1677ff!important;border-right-color:#1677ff!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-select .ant-select-selector{border-start-start-radius:0!important;border-end-start-radius:0!important;border-left-color:transparent!important;border-right-color:transparent!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-select .ant-select-selector:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-select .ant-select-selector:hover{border-left-color:#1677ff!important;border-right-color:#1677ff!important}.super-table-input-group .input-number-group .ant-input-number:first-child{border-top-left-radius:0;border-bottom-left-radius:0;border-left-color:transparent!important}.super-table-input-group .input-number-group .ant-input-number:first-child:focus,.super-table-input-group .input-number-group .ant-input-number:first-child:hover{border-left-color:#1677ff!important}._sceneForm_njdgy_1 ._queryFieldItem_njdgy_1{display:flex;align-items:center;gap:8px;min-width:0}._sceneForm_njdgy_1 ._queryFieldItem_njdgy_1 ._fieldSelect_njdgy_7{width:200px}._sceneForm_njdgy_1 ._queryFieldItem_njdgy_1 ._fieldComponent_njdgy_10{flex:1;min-width:0}._sceneList_3nrgr_1{max-height:50vh;overflow:auto}._sceneList_3nrgr_1 ._sceneListHead_3nrgr_5{background-color:#fafafa}._sceneList_3nrgr_1 ._sceneListItem_3nrgr_8{border-top:1px solid #d9d9d9;transition:all .3s;background-color:#fff}._sceneList_3nrgr_1 ._sceneListItem_3nrgr_8:hover{background-color:#f9f9f9}._sceneList_3nrgr_1 ._col_3nrgr_16{padding:12px 16px}._dragIcon_3nrgr_20{cursor:grab}.
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
import { h as
|
|
6
|
-
import
|
|
7
|
-
import { DownOutlined as
|
|
8
|
-
import { slice as
|
|
9
|
-
import { useStorage as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { JSONPath as
|
|
13
|
-
import { v5 as
|
|
14
|
-
import
|
|
15
|
-
const
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._ellipsisElement_6fog1_1{width:100%;overflow:hidden;display:flex}._ellipsisElement_6fog1_1 ._elementItem_6fog1_6{min-width:0}._ellipsisElementHasGap_6fog1_10{gap:8px}._flexWrap_6fog1_14{flex-wrap:wrap}._ellipsisTag_6fog1_18{cursor:pointer}._imageEllipsisTag_6fog1_22{line-height:30px;min-width:32px;padding:0;text-align:center}._ellipsisList_6fog1_29{max-width:500px;display:flex;gap:8px;flex-wrap:wrap}._tableCellContent_1chn7_1 ._antTypographyEllipsis_1chn7_1{width:100%}._tableCellContent_1chn7_1 ._draggableIcon_1chn7_4{cursor:grab}._textListItem_1chn7_8{width:100%;margin-bottom:4px}._configBtn_fstz6_1{position:absolute;z-index:999;right:4px;top:8px;background:#fafafa}._tableConfig_fstz6_9{width:260px}._tableConfig_fstz6_9 ._tableConfigHead_fstz6_12{padding:8px}._tableConfig_fstz6_9 ._tableConfigActions_fstz6_15{display:flex;align-items:center;justify-content:space-between;padding:8px;border-bottom:1px solid #d9d9d9}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22{min-height:300px;max-height:60vh;overflow:auto;padding-bottom:12px}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._groupTitle_fstz6_28{padding:0 8px;font-size:12px;color:#000000a6;background:#fafafa;line-height:28px}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35{max-height:20vh;overflow-y:auto}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39{display:flex;align-items:center;gap:8px;min-height:28px;padding:0 8px;position:relative}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._columnItemContent_fstz6_47{flex:1;cursor:pointer}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._dragIcon_fstz6_51,._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._dragHandle_fstz6_54{cursor:grab}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._fixedActions_fstz6_57{display:none;align-items:center;gap:4px}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39:hover ._fixedActions_fstz6_57{display:flex}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._emptyText_fstz6_65{line-height:200px;text-align:center}.pro-table-config-popover .ant-popover-inner-content{padding:0}._dynamicList_1woe5_1{list-style:none;padding:0;margin:0}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6{display:flex;align-items:center;gap:16px;padding:8px;background-color:#fff}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6 ._dynamicListItemContent_1woe5_13{flex:1;min-width:0}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6 ._actionsIcons_1woe5_17{display:flex;align-items:center}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6 ._actionsIcons_1woe5_17 ._dragIcon_1woe5_21{cursor:grab}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6:last-child{border-bottom:none;margin-bottom:16px}._inputGroup_eukv3_1,._inputNumberGroup_149g6_1{width:100%}._inputNumberGroup_149g6_1 ._inputNumberGroupContent_149g6_4{width:100%;display:flex;align-items:center}._inputNumberGroup_149g6_1 ._inputNumber_149g6_1{width:unset!important;flex:1}._inputNumberGroup_149g6_1 ._startInputNumber_149g6_13{border-top-right-radius:0;border-bottom-right-radius:0;border-right-color:transparent}._inputNumberGroup_149g6_1 ._startInputNumber_149g6_13:focus,._inputNumberGroup_149g6_1 ._startInputNumber_149g6_13:hover{border-right-color:#1677ff}._inputNumberGroup_149g6_1 ._endInputNumber_149g6_21{border-top-left-radius:0;border-bottom-left-radius:0;border-left-color:transparent}._inputNumberGroup_149g6_1 ._endInputNumber_149g6_21:focus,._inputNumberGroup_149g6_1 ._endInputNumber_149g6_21:hover{border-left-color:#1677ff}._inputNumberGroup_149g6_1 ._divider_149g6_29{display:inline-block;padding:0 8px;line-height:30px;border-top:1px solid #d9d9d9;border-bottom:1px solid #d9d9d9}._formFieldItem_1imun_1{display:flex;align-items:center;min-width:0}._inputGroup_1imun_7{width:unset}._formFieldItemLabel_1imun_11{padding-left:8px;padding-right:8px;background-color:transparent!important;text-align:center;cursor:default!important;border-right:none!important}._customItemLabel_1imun_20{font-size:14px;padding-right:8px;color:#000000e0}.super-table-input-group{width:100%}.super-table-input-group .super-table-filter-form-item-label+.ant-input,.super-table-input-group .super-table-filter-form-item-label+.ant-input-number,.super-table-input-group .super-table-filter-form-item-label+.ant-select .ant-select-selector,.super-table-input-group .super-table-filter-form-item-label+.ant-picker,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group{border-left-color:transparent!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-input-number:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-number:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-select .ant-select-selector:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-select .ant-select-selector:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-picker:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-picker:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group:hover{border-left-color:#1677ff!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-input{border-left-color:transparent!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-input:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-input:hover{border-left-color:#1677ff!important;border-right-color:#1677ff!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-select .ant-select-selector{border-start-start-radius:0!important;border-end-start-radius:0!important;border-left-color:transparent!important;border-right-color:transparent!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-select .ant-select-selector:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-select .ant-select-selector:hover{border-left-color:#1677ff!important;border-right-color:#1677ff!important}.super-table-input-group .input-number-group .ant-input-number:first-child{border-top-left-radius:0;border-bottom-left-radius:0;border-left-color:transparent!important}.super-table-input-group .input-number-group .ant-input-number:first-child:focus,.super-table-input-group .input-number-group .ant-input-number:first-child:hover{border-left-color:#1677ff!important}._sceneForm_njdgy_1 ._queryFieldItem_njdgy_1{display:flex;align-items:center;gap:8px;min-width:0}._sceneForm_njdgy_1 ._queryFieldItem_njdgy_1 ._fieldSelect_njdgy_7{width:200px}._sceneForm_njdgy_1 ._queryFieldItem_njdgy_1 ._fieldComponent_njdgy_10{flex:1;min-width:0}._sceneList_3nrgr_1{max-height:50vh;overflow:auto}._sceneList_3nrgr_1 ._sceneListHead_3nrgr_5{background-color:#fafafa}._sceneList_3nrgr_1 ._sceneListItem_3nrgr_8{border-top:1px solid #d9d9d9;transition:all .3s;background-color:#fff}._sceneList_3nrgr_1 ._sceneListItem_3nrgr_8:hover{background-color:#f9f9f9}._sceneList_3nrgr_1 ._col_3nrgr_16{padding:12px 16px}._dragIcon_3nrgr_20{cursor:grab}._searchParamsWrapper_mo3ie_1{padding:16px;background-color:#fff;margin-bottom:0}._searchParamsWrapper_mo3ie_1._hasActions_mo3ie_6{margin-bottom:16px}._searchParams_mo3ie_1{flex:1}._searchActionsWrapper_mo3ie_14{display:flex;justify-content:flex-end;gap:8px}._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1{padding:16px;display:flex;gap:16px;background-color:#fff}._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1 ._sceneFormWrapper_1jyjb_7,._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1 ._sceneFormWrapper_1jyjb_7 ._sceneForm_1jyjb_7{flex:1}._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1 ._sceneFormWrapper_1jyjb_7 ._sceneForm_1jyjb_7 ._sceneSelect_1jyjb_13{width:240px}._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1 ._sceneExtra_1jyjb_16{flex-shrink:0}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19{background:#fff;padding:16px}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._toolbar_1jyjb_23{padding-bottom:12px;display:flex;align-items:flex-start;justify-content:flex-end;gap:16px}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._toolbar_1jyjb_23 ._actionBtns_1jyjb_30{display:flex;align-items:center;gap:8px}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._toolbar_1jyjb_23 ._tableHeadWrapper_1jyjb_35{flex:1}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._tableContent_1jyjb_38{position:relative}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._headerCell_1jyjb_41{display:flex;align-items:center;gap:4px}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._headerCell_1jyjb_41 ._headerCellText_1jyjb_46{flex:1}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._headerCell_1jyjb_41 ._headerCellTooltipIcon_1jyjb_49{cursor:pointer}._sceneOpBtnWrapper_1jyjb_53{border-top:1px solid #d9d9d9;padding-top:8px}._sceneOpBtnWrapper_1jyjb_53 ._sceneOpBtn_1jyjb_53{text-align:left}.antd-super-table .ant-table-body{overflow-y:auto!important}.antd-super-table .ant-table-cell{padding:12px!important}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
var mn = Object.defineProperty;
|
|
3
|
+
var yn = (a, e, n) => e in a ? mn(a, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[e] = n;
|
|
4
|
+
var Me = (a, e, n) => yn(a, typeof e != "symbol" ? e + "" : e, n);
|
|
5
|
+
import { h as U, defineComponent as fe, computed as L, resolveComponent as q, createElementBlock as H, openBlock as k, normalizeClass as v, unref as y, createCommentVNode as B, Fragment as Pe, renderList as mt, normalizeStyle as te, renderSlot as ve, createBlock as R, withCtx as b, createVNode as _, createTextVNode as Z, toDisplayString as he, createElementVNode as Y, withMemo as Ht, resolveDynamicComponent as Xe, normalizeProps as ct, mergeProps as ue, ref as ne, watchEffect as Ft, watch as Ie, useAttrs as gn, reactive as et, toRaw as ge, createApp as vn, onBeforeUnmount as hn, getCurrentInstance as bn, markRaw as _n, shallowRef as Cn, onMounted as $n, createSlots as wn, nextTick as Sn } from "vue";
|
|
6
|
+
import In, { theme as kn, Form as Fn, RangePicker as xn, DatePicker as Tn, TreeSelect as Pn, Cascader as On, Select as An, InputNumber as qn, Input as jn, Empty as En, ConfigProvider as Ln, message as dt } from "ant-design-vue";
|
|
7
|
+
import { DownOutlined as Ut, HolderOutlined as Oe, EyeOutlined as Mn, SettingOutlined as Bn, VerticalAlignBottomOutlined as xt, PushpinOutlined as Tt, VerticalAlignTopOutlined as Pt, MinusCircleOutlined as Ot, PlusOutlined as Gt, UpOutlined as Nn, PlusCircleFilled as Rn, SettingFilled as Dn, FilterFilled as Vn, ReloadOutlined as zn, InfoCircleFilled as Yn } from "@ant-design/icons-vue";
|
|
8
|
+
import { slice as At, isFunction as ke, get as tt, castArray as Ee, debounce as wt, pick as Fe, omit as Qt, set as Ve, cloneDeep as pt, sortBy as yt, unionBy as qt, uniqueId as Wn, merge as Hn } from "lodash-es";
|
|
9
|
+
import { useLocalStorage as Un, useStorage as Gn } from "@vueuse/core";
|
|
10
|
+
import ze from "dayjs";
|
|
11
|
+
import Qn from "sortablejs";
|
|
12
|
+
import { JSONPath as Jn } from "jsonpath-plus";
|
|
13
|
+
import { v5 as Kn } from "uuid";
|
|
14
|
+
import Re from "vuedraggable";
|
|
15
|
+
const Zn = {
|
|
16
16
|
// Options.jsx
|
|
17
17
|
items_per_page: "条/页",
|
|
18
18
|
jump_to: "跳至",
|
|
@@ -26,16 +26,16 @@ const Qn = {
|
|
|
26
26
|
prev_3: "向前 3 页",
|
|
27
27
|
next_3: "向后 3 页"
|
|
28
28
|
};
|
|
29
|
-
function
|
|
30
|
-
return
|
|
29
|
+
function nt() {
|
|
30
|
+
return nt = Object.assign ? Object.assign.bind() : function(a) {
|
|
31
31
|
for (var e = 1; e < arguments.length; e++) {
|
|
32
32
|
var n = arguments[e];
|
|
33
33
|
for (var t in n) ({}).hasOwnProperty.call(n, t) && (a[t] = n[t]);
|
|
34
34
|
}
|
|
35
35
|
return a;
|
|
36
|
-
},
|
|
36
|
+
}, nt.apply(null, arguments);
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const Xn = {
|
|
39
39
|
locale: "zh_CN",
|
|
40
40
|
today: "今天",
|
|
41
41
|
now: "此刻",
|
|
@@ -62,11 +62,11 @@ const Jn = {
|
|
|
62
62
|
nextDecade: "下一年代",
|
|
63
63
|
previousCentury: "上一世纪",
|
|
64
64
|
nextCentury: "下一世纪"
|
|
65
|
-
},
|
|
65
|
+
}, Jt = {
|
|
66
66
|
placeholder: "请选择时间",
|
|
67
67
|
rangePlaceholder: ["开始时间", "结束时间"]
|
|
68
68
|
}, gt = {
|
|
69
|
-
lang:
|
|
69
|
+
lang: nt({
|
|
70
70
|
placeholder: "请选择日期",
|
|
71
71
|
yearPlaceholder: "请选择年份",
|
|
72
72
|
quarterPlaceholder: "请选择季度",
|
|
@@ -77,15 +77,15 @@ const Jn = {
|
|
|
77
77
|
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
78
78
|
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
79
79
|
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
80
|
-
},
|
|
81
|
-
timePickerLocale:
|
|
80
|
+
}, Xn),
|
|
81
|
+
timePickerLocale: nt({}, Jt)
|
|
82
82
|
};
|
|
83
83
|
gt.lang.ok = "确定";
|
|
84
|
-
const ce = "${label}不是一个有效的${type}",
|
|
84
|
+
const ce = "${label}不是一个有效的${type}", Kt = {
|
|
85
85
|
locale: "zh-cn",
|
|
86
|
-
Pagination:
|
|
86
|
+
Pagination: Zn,
|
|
87
87
|
DatePicker: gt,
|
|
88
|
-
TimePicker:
|
|
88
|
+
TimePicker: Jt,
|
|
89
89
|
Calendar: gt,
|
|
90
90
|
// locales for all components
|
|
91
91
|
global: {
|
|
@@ -215,29 +215,29 @@ const ce = "${label}不是一个有效的${type}", Jt = {
|
|
|
215
215
|
scanned: "已扫描"
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
|
-
var
|
|
219
|
-
function
|
|
220
|
-
return
|
|
218
|
+
var Ke = { exports: {} }, ea = Ke.exports, jt;
|
|
219
|
+
function ta() {
|
|
220
|
+
return jt || (jt = 1, function(a, e) {
|
|
221
221
|
(function(n, t) {
|
|
222
|
-
a.exports = t(
|
|
223
|
-
})(
|
|
224
|
-
function t(
|
|
225
|
-
return
|
|
222
|
+
a.exports = t(ze);
|
|
223
|
+
})(ea, function(n) {
|
|
224
|
+
function t(l) {
|
|
225
|
+
return l && typeof l == "object" && "default" in l ? l : { default: l };
|
|
226
226
|
}
|
|
227
|
-
var
|
|
228
|
-
return
|
|
229
|
-
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(
|
|
230
|
-
var d = 100 *
|
|
227
|
+
var o = t(n), r = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(l, s) {
|
|
228
|
+
return s === "W" ? l + "周" : l + "日";
|
|
229
|
+
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(l, s) {
|
|
230
|
+
var d = 100 * l + s;
|
|
231
231
|
return d < 600 ? "凌晨" : d < 900 ? "早上" : d < 1100 ? "上午" : d < 1300 ? "中午" : d < 1800 ? "下午" : "晚上";
|
|
232
232
|
} };
|
|
233
|
-
return
|
|
233
|
+
return o.default.locale(r, null, !0), r;
|
|
234
234
|
});
|
|
235
|
-
}(
|
|
235
|
+
}(Ke)), Ke.exports;
|
|
236
236
|
}
|
|
237
|
-
|
|
238
|
-
const { defaultAlgorithm:
|
|
237
|
+
ta();
|
|
238
|
+
const { defaultAlgorithm: na, defaultSeed: aa } = kn, oe = na(aa);
|
|
239
239
|
var Se = /* @__PURE__ */ ((a) => (a.order = "_order", a.orderInScene = "_orderInScene", a.defaultValue = "_defaultValue", a.selected = "_selected", a))(Se || {});
|
|
240
|
-
const
|
|
240
|
+
const Zt = Object.values(Se), G = {
|
|
241
241
|
/** 文本(默认)*/
|
|
242
242
|
text: "text",
|
|
243
243
|
/** 链接 */
|
|
@@ -291,20 +291,20 @@ function Te() {
|
|
|
291
291
|
return a;
|
|
292
292
|
}, Te.apply(this, arguments);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
a.prototype = Object.create(e.prototype), a.prototype.constructor = a,
|
|
294
|
+
function oa(a, e) {
|
|
295
|
+
a.prototype = Object.create(e.prototype), a.prototype.constructor = a, Ye(a, e);
|
|
296
296
|
}
|
|
297
297
|
function ht(a) {
|
|
298
298
|
return ht = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
|
|
299
299
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
300
300
|
}, ht(a);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
return
|
|
304
|
-
return t.__proto__ =
|
|
305
|
-
},
|
|
302
|
+
function Ye(a, e) {
|
|
303
|
+
return Ye = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, o) {
|
|
304
|
+
return t.__proto__ = o, t;
|
|
305
|
+
}, Ye(a, e);
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function ra() {
|
|
308
308
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
309
309
|
if (typeof Proxy == "function") return !0;
|
|
310
310
|
try {
|
|
@@ -314,43 +314,43 @@ function na() {
|
|
|
314
314
|
return !1;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
function
|
|
318
|
-
return
|
|
319
|
-
var
|
|
320
|
-
|
|
321
|
-
var d = Function.bind.apply(
|
|
322
|
-
return
|
|
323
|
-
},
|
|
317
|
+
function Ze(a, e, n) {
|
|
318
|
+
return ra() ? Ze = Reflect.construct.bind() : Ze = function(o, r, l) {
|
|
319
|
+
var s = [null];
|
|
320
|
+
s.push.apply(s, r);
|
|
321
|
+
var d = Function.bind.apply(o, s), I = new d();
|
|
322
|
+
return l && Ye(I, l.prototype), I;
|
|
323
|
+
}, Ze.apply(null, arguments);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function sa(a) {
|
|
326
326
|
return Function.toString.call(a).indexOf("[native code]") !== -1;
|
|
327
327
|
}
|
|
328
328
|
function bt(a) {
|
|
329
329
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
330
330
|
return bt = function(t) {
|
|
331
|
-
if (t === null || !
|
|
331
|
+
if (t === null || !sa(t)) return t;
|
|
332
332
|
if (typeof t != "function")
|
|
333
333
|
throw new TypeError("Super expression must either be null or a function");
|
|
334
334
|
if (typeof e < "u") {
|
|
335
335
|
if (e.has(t)) return e.get(t);
|
|
336
|
-
e.set(t,
|
|
336
|
+
e.set(t, o);
|
|
337
337
|
}
|
|
338
|
-
function
|
|
339
|
-
return
|
|
338
|
+
function o() {
|
|
339
|
+
return Ze(t, arguments, ht(this).constructor);
|
|
340
340
|
}
|
|
341
|
-
return
|
|
341
|
+
return o.prototype = Object.create(t.prototype, {
|
|
342
342
|
constructor: {
|
|
343
|
-
value:
|
|
343
|
+
value: o,
|
|
344
344
|
enumerable: !1,
|
|
345
345
|
writable: !0,
|
|
346
346
|
configurable: !0
|
|
347
347
|
}
|
|
348
|
-
}),
|
|
348
|
+
}), Ye(o, t);
|
|
349
349
|
}, bt(a);
|
|
350
350
|
}
|
|
351
|
-
var
|
|
351
|
+
var la = /%[sdj%]/g, Xt = function() {
|
|
352
352
|
};
|
|
353
|
-
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (
|
|
353
|
+
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (Xt = function(e, n) {
|
|
354
354
|
typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(t) {
|
|
355
355
|
return typeof t == "string";
|
|
356
356
|
}) && console.warn(e, n);
|
|
@@ -363,109 +363,109 @@ function _t(a) {
|
|
|
363
363
|
e[t] = e[t] || [], e[t].push(n);
|
|
364
364
|
}), e;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function pe(a) {
|
|
367
367
|
for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), t = 1; t < e; t++)
|
|
368
368
|
n[t - 1] = arguments[t];
|
|
369
|
-
var
|
|
369
|
+
var o = 0, r = n.length;
|
|
370
370
|
if (typeof a == "function")
|
|
371
371
|
return a.apply(null, n);
|
|
372
372
|
if (typeof a == "string") {
|
|
373
|
-
var
|
|
374
|
-
if (
|
|
373
|
+
var l = a.replace(la, function(s) {
|
|
374
|
+
if (s === "%%")
|
|
375
375
|
return "%";
|
|
376
|
-
if (
|
|
377
|
-
return
|
|
378
|
-
switch (
|
|
376
|
+
if (o >= r)
|
|
377
|
+
return s;
|
|
378
|
+
switch (s) {
|
|
379
379
|
case "%s":
|
|
380
|
-
return String(n[
|
|
380
|
+
return String(n[o++]);
|
|
381
381
|
case "%d":
|
|
382
|
-
return Number(n[
|
|
382
|
+
return Number(n[o++]);
|
|
383
383
|
case "%j":
|
|
384
384
|
try {
|
|
385
|
-
return JSON.stringify(n[
|
|
385
|
+
return JSON.stringify(n[o++]);
|
|
386
386
|
} catch {
|
|
387
387
|
return "[Circular]";
|
|
388
388
|
}
|
|
389
389
|
break;
|
|
390
390
|
default:
|
|
391
|
-
return
|
|
391
|
+
return s;
|
|
392
392
|
}
|
|
393
393
|
});
|
|
394
|
-
return
|
|
394
|
+
return l;
|
|
395
395
|
}
|
|
396
396
|
return a;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function ia(a) {
|
|
399
399
|
return a === "string" || a === "url" || a === "hex" || a === "email" || a === "date" || a === "pattern";
|
|
400
400
|
}
|
|
401
401
|
function ae(a, e) {
|
|
402
|
-
return !!(a == null || e === "array" && Array.isArray(a) && !a.length ||
|
|
402
|
+
return !!(a == null || e === "array" && Array.isArray(a) && !a.length || ia(e) && typeof a == "string" && !a);
|
|
403
403
|
}
|
|
404
|
-
function
|
|
405
|
-
var t = [],
|
|
406
|
-
function s
|
|
407
|
-
t.push.apply(t,
|
|
404
|
+
function ua(a, e, n) {
|
|
405
|
+
var t = [], o = 0, r = a.length;
|
|
406
|
+
function l(s) {
|
|
407
|
+
t.push.apply(t, s || []), o++, o === r && n(t);
|
|
408
408
|
}
|
|
409
|
-
a.forEach(function(
|
|
410
|
-
e(
|
|
409
|
+
a.forEach(function(s) {
|
|
410
|
+
e(s, l);
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
var t = 0,
|
|
415
|
-
function
|
|
416
|
-
if (
|
|
417
|
-
n(
|
|
413
|
+
function Et(a, e, n) {
|
|
414
|
+
var t = 0, o = a.length;
|
|
415
|
+
function r(l) {
|
|
416
|
+
if (l && l.length) {
|
|
417
|
+
n(l);
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
420
|
-
var
|
|
421
|
-
t = t + 1,
|
|
420
|
+
var s = t;
|
|
421
|
+
t = t + 1, s < o ? e(a[s], r) : n([]);
|
|
422
422
|
}
|
|
423
|
-
|
|
423
|
+
r([]);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function ca(a) {
|
|
426
426
|
var e = [];
|
|
427
427
|
return Object.keys(a).forEach(function(n) {
|
|
428
428
|
e.push.apply(e, a[n] || []);
|
|
429
429
|
}), e;
|
|
430
430
|
}
|
|
431
|
-
var
|
|
432
|
-
|
|
431
|
+
var Lt = /* @__PURE__ */ function(a) {
|
|
432
|
+
oa(e, a);
|
|
433
433
|
function e(n, t) {
|
|
434
|
-
var
|
|
435
|
-
return
|
|
434
|
+
var o;
|
|
435
|
+
return o = a.call(this, "Async Validation Error") || this, o.errors = n, o.fields = t, o;
|
|
436
436
|
}
|
|
437
437
|
return e;
|
|
438
438
|
}(/* @__PURE__ */ bt(Error));
|
|
439
|
-
function
|
|
439
|
+
function da(a, e, n, t, o) {
|
|
440
440
|
if (e.first) {
|
|
441
|
-
var
|
|
442
|
-
var T = function(
|
|
443
|
-
return t(
|
|
444
|
-
},
|
|
445
|
-
|
|
441
|
+
var r = new Promise(function(u, $) {
|
|
442
|
+
var T = function(m) {
|
|
443
|
+
return t(m), m.length ? $(new Lt(m, _t(m))) : u(o);
|
|
444
|
+
}, C = ca(a);
|
|
445
|
+
Et(C, n, T);
|
|
446
446
|
});
|
|
447
|
-
return
|
|
447
|
+
return r.catch(function(u) {
|
|
448
448
|
return u;
|
|
449
|
-
}),
|
|
449
|
+
}), r;
|
|
450
450
|
}
|
|
451
|
-
var
|
|
452
|
-
var T = function(
|
|
453
|
-
if (
|
|
454
|
-
return t(
|
|
451
|
+
var l = e.firstFields === !0 ? Object.keys(a) : e.firstFields || [], s = Object.keys(a), d = s.length, I = 0, F = [], h = new Promise(function(u, $) {
|
|
452
|
+
var T = function(f) {
|
|
453
|
+
if (F.push.apply(F, f), I++, I === d)
|
|
454
|
+
return t(F), F.length ? $(new Lt(F, _t(F))) : u(o);
|
|
455
455
|
};
|
|
456
|
-
|
|
457
|
-
var
|
|
458
|
-
|
|
456
|
+
s.length || (t(F), u(o)), s.forEach(function(C) {
|
|
457
|
+
var f = a[C];
|
|
458
|
+
l.indexOf(C) !== -1 ? Et(f, n, T) : ua(f, n, T);
|
|
459
459
|
});
|
|
460
460
|
});
|
|
461
|
-
return
|
|
461
|
+
return h.catch(function(u) {
|
|
462
462
|
return u;
|
|
463
|
-
}),
|
|
463
|
+
}), h;
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function pa(a) {
|
|
466
466
|
return !!(a && a.message !== void 0);
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function fa(a, e) {
|
|
469
469
|
for (var n = a, t = 0; t < e.length; t++) {
|
|
470
470
|
if (n == null)
|
|
471
471
|
return n;
|
|
@@ -473,17 +473,17 @@ function ca(a, e) {
|
|
|
473
473
|
}
|
|
474
474
|
return n;
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Mt(a, e) {
|
|
477
477
|
return function(n) {
|
|
478
478
|
var t;
|
|
479
|
-
return a.fullFields ? t =
|
|
479
|
+
return a.fullFields ? t = fa(e, a.fullFields) : t = e[n.field || a.fullField], pa(n) ? (n.field = n.field || a.fullField, n.fieldValue = t, n) : {
|
|
480
480
|
message: typeof n == "function" ? n() : n,
|
|
481
481
|
fieldValue: t,
|
|
482
482
|
field: n.field || a.fullField
|
|
483
483
|
};
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function Bt(a, e) {
|
|
487
487
|
if (e) {
|
|
488
488
|
for (var n in e)
|
|
489
489
|
if (e.hasOwnProperty(n)) {
|
|
@@ -493,16 +493,16 @@ function Nt(a, e) {
|
|
|
493
493
|
}
|
|
494
494
|
return a;
|
|
495
495
|
}
|
|
496
|
-
var
|
|
497
|
-
e.required && (!t.hasOwnProperty(e.field) || ae(n,
|
|
498
|
-
},
|
|
499
|
-
(/^\s+$/.test(n) || n === "") &&
|
|
500
|
-
},
|
|
501
|
-
if (
|
|
502
|
-
return
|
|
503
|
-
var a = "[a-fA-F\\d:]", e = function(
|
|
504
|
-
return
|
|
505
|
-
}, n = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", t = "[a-fA-F\\d]{1,4}",
|
|
496
|
+
var en = function(e, n, t, o, r, l) {
|
|
497
|
+
e.required && (!t.hasOwnProperty(e.field) || ae(n, l || e.type)) && o.push(pe(r.messages.required, e.fullField));
|
|
498
|
+
}, ma = function(e, n, t, o, r) {
|
|
499
|
+
(/^\s+$/.test(n) || n === "") && o.push(pe(r.messages.whitespace, e.fullField));
|
|
500
|
+
}, Ge, ya = function() {
|
|
501
|
+
if (Ge)
|
|
502
|
+
return Ge;
|
|
503
|
+
var a = "[a-fA-F\\d:]", e = function(S) {
|
|
504
|
+
return S && S.includeBoundaries ? "(?:(?<=\\s|^)(?=" + a + ")|(?<=" + a + ")(?=\\s|$))" : "";
|
|
505
|
+
}, n = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", t = "[a-fA-F\\d]{1,4}", o = (`
|
|
506
506
|
(?:
|
|
507
507
|
(?:` + t + ":){7}(?:" + t + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
508
508
|
(?:` + t + ":){6}(?:" + n + "|:" + t + `|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
@@ -513,17 +513,17 @@ var Xt = function(e, n, t, r, o, s) {
|
|
|
513
513
|
(?:` + t + ":){1}(?:(?::" + t + "){0,4}:" + n + "|(?::" + t + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
514
514
|
(?::(?:(?::` + t + "){0,5}:" + n + "|(?::" + t + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
515
515
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
516
|
-
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(),
|
|
517
|
-
return
|
|
516
|
+
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + n + "$)|(?:^" + o + "$)"), l = new RegExp("^" + n + "$"), s = new RegExp("^" + o + "$"), d = function(S) {
|
|
517
|
+
return S && S.exact ? r : new RegExp("(?:" + e(S) + n + e(S) + ")|(?:" + e(S) + o + e(S) + ")", "g");
|
|
518
518
|
};
|
|
519
|
-
d.v4 = function(
|
|
520
|
-
return
|
|
521
|
-
}, d.v6 = function(
|
|
522
|
-
return
|
|
519
|
+
d.v4 = function(g) {
|
|
520
|
+
return g && g.exact ? l : new RegExp("" + e(g) + n + e(g), "g");
|
|
521
|
+
}, d.v6 = function(g) {
|
|
522
|
+
return g && g.exact ? s : new RegExp("" + e(g) + o + e(g), "g");
|
|
523
523
|
};
|
|
524
|
-
var
|
|
525
|
-
return
|
|
526
|
-
},
|
|
524
|
+
var I = "(?:(?:[a-z]+:)?//)", F = "(?:\\S+(?::\\S*)?@)?", h = d.v4().source, u = d.v6().source, $ = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", T = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", C = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", f = "(?::\\d{2,5})?", m = '(?:[/?#][^\\s"]*)?', N = "(?:" + I + "|www\\.)" + F + "(?:localhost|" + h + "|" + u + "|" + $ + T + C + ")" + f + m;
|
|
525
|
+
return Ge = new RegExp("(?:^" + N + "$)", "i"), Ge;
|
|
526
|
+
}, Nt = {
|
|
527
527
|
// http://emailregex.com/
|
|
528
528
|
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
|
|
529
529
|
// url: new RegExp(
|
|
@@ -531,12 +531,12 @@ var Xt = function(e, n, t, r, o, s) {
|
|
|
531
531
|
// 'i',
|
|
532
532
|
// ),
|
|
533
533
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
534
|
-
},
|
|
534
|
+
}, Ne = {
|
|
535
535
|
integer: function(e) {
|
|
536
|
-
return
|
|
536
|
+
return Ne.number(e) && parseInt(e, 10) === e;
|
|
537
537
|
},
|
|
538
538
|
float: function(e) {
|
|
539
|
-
return
|
|
539
|
+
return Ne.number(e) && !Ne.integer(e);
|
|
540
540
|
},
|
|
541
541
|
array: function(e) {
|
|
542
542
|
return Array.isArray(e);
|
|
@@ -557,186 +557,186 @@ var Xt = function(e, n, t, r, o, s) {
|
|
|
557
557
|
return isNaN(e) ? !1 : typeof e == "number";
|
|
558
558
|
},
|
|
559
559
|
object: function(e) {
|
|
560
|
-
return typeof e == "object" && !
|
|
560
|
+
return typeof e == "object" && !Ne.array(e);
|
|
561
561
|
},
|
|
562
562
|
method: function(e) {
|
|
563
563
|
return typeof e == "function";
|
|
564
564
|
},
|
|
565
565
|
email: function(e) {
|
|
566
|
-
return typeof e == "string" && e.length <= 320 && !!e.match(
|
|
566
|
+
return typeof e == "string" && e.length <= 320 && !!e.match(Nt.email);
|
|
567
567
|
},
|
|
568
568
|
url: function(e) {
|
|
569
|
-
return typeof e == "string" && e.length <= 2048 && !!e.match(
|
|
569
|
+
return typeof e == "string" && e.length <= 2048 && !!e.match(ya());
|
|
570
570
|
},
|
|
571
571
|
hex: function(e) {
|
|
572
|
-
return typeof e == "string" && !!e.match(
|
|
572
|
+
return typeof e == "string" && !!e.match(Nt.hex);
|
|
573
573
|
}
|
|
574
|
-
},
|
|
574
|
+
}, ga = function(e, n, t, o, r) {
|
|
575
575
|
if (e.required && n === void 0) {
|
|
576
|
-
|
|
576
|
+
en(e, n, t, o, r);
|
|
577
577
|
return;
|
|
578
578
|
}
|
|
579
|
-
var
|
|
580
|
-
|
|
581
|
-
},
|
|
582
|
-
var
|
|
583
|
-
if (u ?
|
|
579
|
+
var l = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], s = e.type;
|
|
580
|
+
l.indexOf(s) > -1 ? Ne[s](n) || o.push(pe(r.messages.types[s], e.fullField, e.type)) : s && typeof n !== e.type && o.push(pe(r.messages.types[s], e.fullField, e.type));
|
|
581
|
+
}, va = function(e, n, t, o, r) {
|
|
582
|
+
var l = typeof e.len == "number", s = typeof e.min == "number", d = typeof e.max == "number", I = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, F = n, h = null, u = typeof n == "number", $ = typeof n == "string", T = Array.isArray(n);
|
|
583
|
+
if (u ? h = "number" : $ ? h = "string" : T && (h = "array"), !h)
|
|
584
584
|
return !1;
|
|
585
|
-
T && (
|
|
586
|
-
},
|
|
587
|
-
e[
|
|
588
|
-
},
|
|
585
|
+
T && (F = n.length), $ && (F = n.replace(I, "_").length), l ? F !== e.len && o.push(pe(r.messages[h].len, e.fullField, e.len)) : s && !d && F < e.min ? o.push(pe(r.messages[h].min, e.fullField, e.min)) : d && !s && F > e.max ? o.push(pe(r.messages[h].max, e.fullField, e.max)) : s && d && (F < e.min || F > e.max) && o.push(pe(r.messages[h].range, e.fullField, e.min, e.max));
|
|
586
|
+
}, je = "enum", ha = function(e, n, t, o, r) {
|
|
587
|
+
e[je] = Array.isArray(e[je]) ? e[je] : [], e[je].indexOf(n) === -1 && o.push(pe(r.messages[je], e.fullField, e[je].join(", ")));
|
|
588
|
+
}, ba = function(e, n, t, o, r) {
|
|
589
589
|
if (e.pattern) {
|
|
590
590
|
if (e.pattern instanceof RegExp)
|
|
591
|
-
e.pattern.lastIndex = 0, e.pattern.test(n) ||
|
|
591
|
+
e.pattern.lastIndex = 0, e.pattern.test(n) || o.push(pe(r.messages.pattern.mismatch, e.fullField, n, e.pattern));
|
|
592
592
|
else if (typeof e.pattern == "string") {
|
|
593
|
-
var
|
|
594
|
-
|
|
593
|
+
var l = new RegExp(e.pattern);
|
|
594
|
+
l.test(n) || o.push(pe(r.messages.pattern.mismatch, e.fullField, n, e.pattern));
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
},
|
|
598
|
-
required:
|
|
599
|
-
whitespace:
|
|
600
|
-
type:
|
|
601
|
-
range:
|
|
602
|
-
enum:
|
|
603
|
-
pattern:
|
|
604
|
-
},
|
|
605
|
-
var
|
|
606
|
-
if (
|
|
597
|
+
}, V = {
|
|
598
|
+
required: en,
|
|
599
|
+
whitespace: ma,
|
|
600
|
+
type: ga,
|
|
601
|
+
range: va,
|
|
602
|
+
enum: ha,
|
|
603
|
+
pattern: ba
|
|
604
|
+
}, _a = function(e, n, t, o, r) {
|
|
605
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
606
|
+
if (s) {
|
|
607
607
|
if (ae(n, "string") && !e.required)
|
|
608
608
|
return t();
|
|
609
|
-
|
|
609
|
+
V.required(e, n, o, l, r, "string"), ae(n, "string") || (V.type(e, n, o, l, r), V.range(e, n, o, l, r), V.pattern(e, n, o, l, r), e.whitespace === !0 && V.whitespace(e, n, o, l, r));
|
|
610
610
|
}
|
|
611
|
-
t(
|
|
612
|
-
},
|
|
613
|
-
var
|
|
614
|
-
if (
|
|
611
|
+
t(l);
|
|
612
|
+
}, Ca = function(e, n, t, o, r) {
|
|
613
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
614
|
+
if (s) {
|
|
615
615
|
if (ae(n) && !e.required)
|
|
616
616
|
return t();
|
|
617
|
-
|
|
617
|
+
V.required(e, n, o, l, r), n !== void 0 && V.type(e, n, o, l, r);
|
|
618
618
|
}
|
|
619
|
-
t(
|
|
620
|
-
},
|
|
621
|
-
var
|
|
622
|
-
if (
|
|
619
|
+
t(l);
|
|
620
|
+
}, $a = function(e, n, t, o, r) {
|
|
621
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
622
|
+
if (s) {
|
|
623
623
|
if (n === "" && (n = void 0), ae(n) && !e.required)
|
|
624
624
|
return t();
|
|
625
|
-
|
|
625
|
+
V.required(e, n, o, l, r), n !== void 0 && (V.type(e, n, o, l, r), V.range(e, n, o, l, r));
|
|
626
626
|
}
|
|
627
|
-
t(
|
|
628
|
-
},
|
|
629
|
-
var
|
|
630
|
-
if (
|
|
627
|
+
t(l);
|
|
628
|
+
}, wa = function(e, n, t, o, r) {
|
|
629
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
630
|
+
if (s) {
|
|
631
631
|
if (ae(n) && !e.required)
|
|
632
632
|
return t();
|
|
633
|
-
|
|
633
|
+
V.required(e, n, o, l, r), n !== void 0 && V.type(e, n, o, l, r);
|
|
634
634
|
}
|
|
635
|
-
t(
|
|
636
|
-
},
|
|
637
|
-
var
|
|
638
|
-
if (
|
|
635
|
+
t(l);
|
|
636
|
+
}, Sa = function(e, n, t, o, r) {
|
|
637
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
638
|
+
if (s) {
|
|
639
639
|
if (ae(n) && !e.required)
|
|
640
640
|
return t();
|
|
641
|
-
|
|
641
|
+
V.required(e, n, o, l, r), ae(n) || V.type(e, n, o, l, r);
|
|
642
642
|
}
|
|
643
|
-
t(
|
|
644
|
-
},
|
|
645
|
-
var
|
|
646
|
-
if (
|
|
643
|
+
t(l);
|
|
644
|
+
}, Ia = function(e, n, t, o, r) {
|
|
645
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
646
|
+
if (s) {
|
|
647
647
|
if (ae(n) && !e.required)
|
|
648
648
|
return t();
|
|
649
|
-
|
|
649
|
+
V.required(e, n, o, l, r), n !== void 0 && (V.type(e, n, o, l, r), V.range(e, n, o, l, r));
|
|
650
650
|
}
|
|
651
|
-
t(
|
|
652
|
-
},
|
|
653
|
-
var
|
|
654
|
-
if (
|
|
651
|
+
t(l);
|
|
652
|
+
}, ka = function(e, n, t, o, r) {
|
|
653
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
654
|
+
if (s) {
|
|
655
655
|
if (ae(n) && !e.required)
|
|
656
656
|
return t();
|
|
657
|
-
|
|
657
|
+
V.required(e, n, o, l, r), n !== void 0 && (V.type(e, n, o, l, r), V.range(e, n, o, l, r));
|
|
658
658
|
}
|
|
659
|
-
t(
|
|
660
|
-
},
|
|
661
|
-
var
|
|
662
|
-
if (
|
|
659
|
+
t(l);
|
|
660
|
+
}, Fa = function(e, n, t, o, r) {
|
|
661
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
662
|
+
if (s) {
|
|
663
663
|
if (n == null && !e.required)
|
|
664
664
|
return t();
|
|
665
|
-
|
|
665
|
+
V.required(e, n, o, l, r, "array"), n != null && (V.type(e, n, o, l, r), V.range(e, n, o, l, r));
|
|
666
666
|
}
|
|
667
|
-
t(
|
|
668
|
-
},
|
|
669
|
-
var
|
|
670
|
-
if (
|
|
667
|
+
t(l);
|
|
668
|
+
}, xa = function(e, n, t, o, r) {
|
|
669
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
670
|
+
if (s) {
|
|
671
671
|
if (ae(n) && !e.required)
|
|
672
672
|
return t();
|
|
673
|
-
|
|
673
|
+
V.required(e, n, o, l, r), n !== void 0 && V.type(e, n, o, l, r);
|
|
674
674
|
}
|
|
675
|
-
t(
|
|
676
|
-
},
|
|
677
|
-
var
|
|
678
|
-
if (
|
|
675
|
+
t(l);
|
|
676
|
+
}, Ta = "enum", Pa = function(e, n, t, o, r) {
|
|
677
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
678
|
+
if (s) {
|
|
679
679
|
if (ae(n) && !e.required)
|
|
680
680
|
return t();
|
|
681
|
-
|
|
681
|
+
V.required(e, n, o, l, r), n !== void 0 && V[Ta](e, n, o, l, r);
|
|
682
682
|
}
|
|
683
|
-
t(
|
|
684
|
-
},
|
|
685
|
-
var
|
|
686
|
-
if (
|
|
683
|
+
t(l);
|
|
684
|
+
}, Oa = function(e, n, t, o, r) {
|
|
685
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
686
|
+
if (s) {
|
|
687
687
|
if (ae(n, "string") && !e.required)
|
|
688
688
|
return t();
|
|
689
|
-
|
|
689
|
+
V.required(e, n, o, l, r), ae(n, "string") || V.pattern(e, n, o, l, r);
|
|
690
690
|
}
|
|
691
|
-
t(
|
|
692
|
-
},
|
|
693
|
-
var
|
|
694
|
-
if (
|
|
691
|
+
t(l);
|
|
692
|
+
}, Aa = function(e, n, t, o, r) {
|
|
693
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
694
|
+
if (s) {
|
|
695
695
|
if (ae(n, "date") && !e.required)
|
|
696
696
|
return t();
|
|
697
|
-
if (
|
|
697
|
+
if (V.required(e, n, o, l, r), !ae(n, "date")) {
|
|
698
698
|
var d;
|
|
699
|
-
n instanceof Date ? d = n : d = new Date(n),
|
|
699
|
+
n instanceof Date ? d = n : d = new Date(n), V.type(e, d, o, l, r), d && V.range(e, d.getTime(), o, l, r);
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
|
-
t(
|
|
703
|
-
},
|
|
704
|
-
var
|
|
705
|
-
|
|
706
|
-
},
|
|
707
|
-
var
|
|
702
|
+
t(l);
|
|
703
|
+
}, qa = function(e, n, t, o, r) {
|
|
704
|
+
var l = [], s = Array.isArray(n) ? "array" : typeof n;
|
|
705
|
+
V.required(e, n, o, l, r, s), t(l);
|
|
706
|
+
}, ft = function(e, n, t, o, r) {
|
|
707
|
+
var l = e.type, s = [], d = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
708
708
|
if (d) {
|
|
709
|
-
if (ae(n,
|
|
709
|
+
if (ae(n, l) && !e.required)
|
|
710
710
|
return t();
|
|
711
|
-
|
|
711
|
+
V.required(e, n, o, s, r, l), ae(n, l) || V.type(e, n, o, s, r);
|
|
712
712
|
}
|
|
713
|
-
t(
|
|
714
|
-
},
|
|
715
|
-
var
|
|
716
|
-
if (
|
|
713
|
+
t(s);
|
|
714
|
+
}, ja = function(e, n, t, o, r) {
|
|
715
|
+
var l = [], s = e.required || !e.required && o.hasOwnProperty(e.field);
|
|
716
|
+
if (s) {
|
|
717
717
|
if (ae(n) && !e.required)
|
|
718
718
|
return t();
|
|
719
|
-
|
|
719
|
+
V.required(e, n, o, l, r);
|
|
720
720
|
}
|
|
721
|
-
t(
|
|
722
|
-
},
|
|
723
|
-
string:
|
|
724
|
-
method:
|
|
725
|
-
number:
|
|
726
|
-
boolean:
|
|
727
|
-
regexp:
|
|
728
|
-
integer:
|
|
729
|
-
float:
|
|
730
|
-
array:
|
|
731
|
-
object:
|
|
732
|
-
enum:
|
|
733
|
-
pattern:
|
|
734
|
-
date:
|
|
735
|
-
url:
|
|
736
|
-
hex:
|
|
737
|
-
email:
|
|
738
|
-
required:
|
|
739
|
-
any:
|
|
721
|
+
t(l);
|
|
722
|
+
}, De = {
|
|
723
|
+
string: _a,
|
|
724
|
+
method: Ca,
|
|
725
|
+
number: $a,
|
|
726
|
+
boolean: wa,
|
|
727
|
+
regexp: Sa,
|
|
728
|
+
integer: Ia,
|
|
729
|
+
float: ka,
|
|
730
|
+
array: Fa,
|
|
731
|
+
object: xa,
|
|
732
|
+
enum: Pa,
|
|
733
|
+
pattern: Oa,
|
|
734
|
+
date: Aa,
|
|
735
|
+
url: ft,
|
|
736
|
+
hex: ft,
|
|
737
|
+
email: ft,
|
|
738
|
+
required: qa,
|
|
739
|
+
any: ja
|
|
740
740
|
};
|
|
741
741
|
function Ct() {
|
|
742
742
|
return {
|
|
@@ -791,188 +791,188 @@ function Ct() {
|
|
|
791
791
|
}
|
|
792
792
|
};
|
|
793
793
|
}
|
|
794
|
-
var $t = Ct(),
|
|
794
|
+
var $t = Ct(), Le = /* @__PURE__ */ function() {
|
|
795
795
|
function a(n) {
|
|
796
796
|
this.rules = null, this._messages = $t, this.define(n);
|
|
797
797
|
}
|
|
798
798
|
var e = a.prototype;
|
|
799
799
|
return e.define = function(t) {
|
|
800
|
-
var
|
|
800
|
+
var o = this;
|
|
801
801
|
if (!t)
|
|
802
802
|
throw new Error("Cannot configure a schema with no rules");
|
|
803
803
|
if (typeof t != "object" || Array.isArray(t))
|
|
804
804
|
throw new Error("Rules must be an object");
|
|
805
|
-
this.rules = {}, Object.keys(t).forEach(function(
|
|
806
|
-
var
|
|
807
|
-
|
|
805
|
+
this.rules = {}, Object.keys(t).forEach(function(r) {
|
|
806
|
+
var l = t[r];
|
|
807
|
+
o.rules[r] = Array.isArray(l) ? l : [l];
|
|
808
808
|
});
|
|
809
809
|
}, e.messages = function(t) {
|
|
810
|
-
return t && (this._messages =
|
|
811
|
-
}, e.validate = function(t,
|
|
812
|
-
var
|
|
813
|
-
|
|
810
|
+
return t && (this._messages = Bt(Ct(), t)), this._messages;
|
|
811
|
+
}, e.validate = function(t, o, r) {
|
|
812
|
+
var l = this;
|
|
813
|
+
o === void 0 && (o = {}), r === void 0 && (r = function() {
|
|
814
814
|
});
|
|
815
|
-
var
|
|
816
|
-
if (typeof d == "function" && (
|
|
817
|
-
return
|
|
818
|
-
function
|
|
819
|
-
var
|
|
820
|
-
function
|
|
821
|
-
if (Array.isArray(
|
|
822
|
-
var
|
|
823
|
-
|
|
815
|
+
var s = t, d = o, I = r;
|
|
816
|
+
if (typeof d == "function" && (I = d, d = {}), !this.rules || Object.keys(this.rules).length === 0)
|
|
817
|
+
return I && I(null, s), Promise.resolve(s);
|
|
818
|
+
function F(C) {
|
|
819
|
+
var f = [], m = {};
|
|
820
|
+
function N(S) {
|
|
821
|
+
if (Array.isArray(S)) {
|
|
822
|
+
var p;
|
|
823
|
+
f = (p = f).concat.apply(p, S);
|
|
824
824
|
} else
|
|
825
|
-
|
|
825
|
+
f.push(S);
|
|
826
826
|
}
|
|
827
|
-
for (var
|
|
828
|
-
|
|
829
|
-
|
|
827
|
+
for (var g = 0; g < C.length; g++)
|
|
828
|
+
N(C[g]);
|
|
829
|
+
f.length ? (m = _t(f), I(f, m)) : I(null, s);
|
|
830
830
|
}
|
|
831
831
|
if (d.messages) {
|
|
832
|
-
var
|
|
833
|
-
|
|
832
|
+
var h = this.messages();
|
|
833
|
+
h === $t && (h = Ct()), Bt(h, d.messages), d.messages = h;
|
|
834
834
|
} else
|
|
835
835
|
d.messages = this.messages();
|
|
836
|
-
var u = {},
|
|
837
|
-
|
|
838
|
-
var
|
|
839
|
-
|
|
840
|
-
var
|
|
841
|
-
typeof
|
|
842
|
-
validator:
|
|
843
|
-
} :
|
|
844
|
-
rule:
|
|
845
|
-
value:
|
|
846
|
-
source:
|
|
847
|
-
field:
|
|
836
|
+
var u = {}, $ = d.keys || Object.keys(this.rules);
|
|
837
|
+
$.forEach(function(C) {
|
|
838
|
+
var f = l.rules[C], m = s[C];
|
|
839
|
+
f.forEach(function(N) {
|
|
840
|
+
var g = N;
|
|
841
|
+
typeof g.transform == "function" && (s === t && (s = Te({}, s)), m = s[C] = g.transform(m)), typeof g == "function" ? g = {
|
|
842
|
+
validator: g
|
|
843
|
+
} : g = Te({}, g), g.validator = l.getValidationMethod(g), g.validator && (g.field = C, g.fullField = g.fullField || C, g.type = l.getType(g), u[C] = u[C] || [], u[C].push({
|
|
844
|
+
rule: g,
|
|
845
|
+
value: m,
|
|
846
|
+
source: s,
|
|
847
|
+
field: C
|
|
848
848
|
}));
|
|
849
849
|
});
|
|
850
850
|
});
|
|
851
851
|
var T = {};
|
|
852
|
-
return
|
|
853
|
-
var
|
|
854
|
-
|
|
855
|
-
function
|
|
856
|
-
return Te({},
|
|
857
|
-
fullField:
|
|
858
|
-
fullFields:
|
|
852
|
+
return da(u, d, function(C, f) {
|
|
853
|
+
var m = C.rule, N = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
|
|
854
|
+
N = N && (m.required || !m.required && C.value), m.field = C.field;
|
|
855
|
+
function g(E, W) {
|
|
856
|
+
return Te({}, W, {
|
|
857
|
+
fullField: m.fullField + "." + E,
|
|
858
|
+
fullFields: m.fullFields ? [].concat(m.fullFields, [E]) : [E]
|
|
859
859
|
});
|
|
860
860
|
}
|
|
861
|
-
function
|
|
862
|
-
|
|
863
|
-
var
|
|
864
|
-
!d.suppressWarning &&
|
|
865
|
-
var
|
|
866
|
-
if (d.first &&
|
|
867
|
-
return T[
|
|
868
|
-
if (!
|
|
869
|
-
|
|
861
|
+
function S(E) {
|
|
862
|
+
E === void 0 && (E = []);
|
|
863
|
+
var W = Array.isArray(E) ? E : [E];
|
|
864
|
+
!d.suppressWarning && W.length && a.warning("async-validator:", W), W.length && m.message !== void 0 && (W = [].concat(m.message));
|
|
865
|
+
var J = W.map(Mt(m, s));
|
|
866
|
+
if (d.first && J.length)
|
|
867
|
+
return T[m.field] = 1, f(J);
|
|
868
|
+
if (!N)
|
|
869
|
+
f(J);
|
|
870
870
|
else {
|
|
871
|
-
if (
|
|
872
|
-
return
|
|
873
|
-
var
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
}),
|
|
871
|
+
if (m.required && !C.value)
|
|
872
|
+
return m.message !== void 0 ? J = [].concat(m.message).map(Mt(m, s)) : d.error && (J = [d.error(m, pe(d.messages.required, m.field))]), f(J);
|
|
873
|
+
var _e = {};
|
|
874
|
+
m.defaultField && Object.keys(C.value).map(function(re) {
|
|
875
|
+
_e[re] = m.defaultField;
|
|
876
|
+
}), _e = Te({}, _e, C.rule.fields);
|
|
877
877
|
var me = {};
|
|
878
|
-
Object.keys(
|
|
879
|
-
var se =
|
|
880
|
-
me[
|
|
878
|
+
Object.keys(_e).forEach(function(re) {
|
|
879
|
+
var se = _e[re], j = Array.isArray(se) ? se : [se];
|
|
880
|
+
me[re] = j.map(g.bind(null, re));
|
|
881
881
|
});
|
|
882
882
|
var ie = new a(me);
|
|
883
|
-
ie.messages(d.messages),
|
|
883
|
+
ie.messages(d.messages), C.rule.options && (C.rule.options.messages = d.messages, C.rule.options.error = d.error), ie.validate(C.value, C.rule.options || d, function(re) {
|
|
884
884
|
var se = [];
|
|
885
|
-
|
|
885
|
+
J && J.length && se.push.apply(se, J), re && re.length && se.push.apply(se, re), f(se.length ? se : null);
|
|
886
886
|
});
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
var
|
|
890
|
-
if (
|
|
891
|
-
|
|
892
|
-
else if (
|
|
889
|
+
var p;
|
|
890
|
+
if (m.asyncValidator)
|
|
891
|
+
p = m.asyncValidator(m, C.value, S, C.source, d);
|
|
892
|
+
else if (m.validator) {
|
|
893
893
|
try {
|
|
894
|
-
|
|
895
|
-
} catch (
|
|
896
|
-
console.error == null || console.error(
|
|
897
|
-
throw
|
|
898
|
-
}, 0),
|
|
894
|
+
p = m.validator(m, C.value, S, C.source, d);
|
|
895
|
+
} catch (E) {
|
|
896
|
+
console.error == null || console.error(E), d.suppressValidatorError || setTimeout(function() {
|
|
897
|
+
throw E;
|
|
898
|
+
}, 0), S(E.message);
|
|
899
899
|
}
|
|
900
|
-
|
|
900
|
+
p === !0 ? S() : p === !1 ? S(typeof m.message == "function" ? m.message(m.fullField || m.field) : m.message || (m.fullField || m.field) + " fails") : p instanceof Array ? S(p) : p instanceof Error && S(p.message);
|
|
901
901
|
}
|
|
902
|
-
|
|
903
|
-
return
|
|
904
|
-
}, function(
|
|
905
|
-
return
|
|
902
|
+
p && p.then && p.then(function() {
|
|
903
|
+
return S();
|
|
904
|
+
}, function(E) {
|
|
905
|
+
return S(E);
|
|
906
906
|
});
|
|
907
|
-
}, function(
|
|
908
|
-
|
|
909
|
-
},
|
|
907
|
+
}, function(C) {
|
|
908
|
+
F(C);
|
|
909
|
+
}, s);
|
|
910
910
|
}, e.getType = function(t) {
|
|
911
|
-
if (t.type === void 0 && t.pattern instanceof RegExp && (t.type = "pattern"), typeof t.validator != "function" && t.type && !
|
|
912
|
-
throw new Error(
|
|
911
|
+
if (t.type === void 0 && t.pattern instanceof RegExp && (t.type = "pattern"), typeof t.validator != "function" && t.type && !De.hasOwnProperty(t.type))
|
|
912
|
+
throw new Error(pe("Unknown rule type %s", t.type));
|
|
913
913
|
return t.type || "string";
|
|
914
914
|
}, e.getValidationMethod = function(t) {
|
|
915
915
|
if (typeof t.validator == "function")
|
|
916
916
|
return t.validator;
|
|
917
|
-
var
|
|
918
|
-
return
|
|
917
|
+
var o = Object.keys(t), r = o.indexOf("message");
|
|
918
|
+
return r !== -1 && o.splice(r, 1), o.length === 1 && o[0] === "required" ? De.required : De[this.getType(t)] || void 0;
|
|
919
919
|
}, a;
|
|
920
920
|
}();
|
|
921
|
-
|
|
921
|
+
Le.register = function(e, n) {
|
|
922
922
|
if (typeof n != "function")
|
|
923
923
|
throw new Error("Cannot register a validator by type, validator is not a function");
|
|
924
|
-
|
|
924
|
+
De[e] = n;
|
|
925
925
|
};
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
const we = (a) => Object.prototype.toString.call(a).slice(8, -1).toLowerCase(),
|
|
926
|
+
Le.warning = Xt;
|
|
927
|
+
Le.messages = $t;
|
|
928
|
+
Le.validators = De;
|
|
929
|
+
const we = (a) => Object.prototype.toString.call(a).slice(8, -1).toLowerCase(), Rt = (a) => (La(a), a.map((e, n) => ({
|
|
930
930
|
...e,
|
|
931
931
|
props: e.props ?? {},
|
|
932
932
|
visible: e.visible ?? !0,
|
|
933
933
|
_order: n,
|
|
934
934
|
_defaultValue: e.value
|
|
935
|
-
}))),
|
|
936
|
-
const { content: t, width:
|
|
935
|
+
}))), Dt = (a) => (Ma(a), a.map((e, n) => {
|
|
936
|
+
const { content: t, width: o = 120, visible: r = !0, resizable: l = !0, ellipsis: s = !0, component: d } = e;
|
|
937
937
|
return {
|
|
938
938
|
...e,
|
|
939
939
|
dataIndex: typeof t == "string" ? t : void 0,
|
|
940
|
-
width:
|
|
941
|
-
visible:
|
|
942
|
-
resizable:
|
|
943
|
-
ellipsis:
|
|
944
|
-
component: d ?
|
|
940
|
+
width: o,
|
|
941
|
+
visible: r,
|
|
942
|
+
resizable: l,
|
|
943
|
+
ellipsis: s,
|
|
944
|
+
component: d ? U(d) : void 0,
|
|
945
945
|
index: n
|
|
946
946
|
};
|
|
947
|
-
})),
|
|
948
|
-
const
|
|
949
|
-
if (
|
|
947
|
+
})), Ea = (a, e, n) => a.sort((t, o) => n.indexOf(t.code) - n.indexOf(o.code)).map((t) => {
|
|
948
|
+
const o = Na(t.value ?? "", null);
|
|
949
|
+
if (o)
|
|
950
950
|
return {
|
|
951
951
|
...t,
|
|
952
|
-
items:
|
|
953
|
-
var
|
|
954
|
-
const
|
|
955
|
-
return
|
|
956
|
-
...
|
|
957
|
-
value:
|
|
958
|
-
} :
|
|
959
|
-
...
|
|
960
|
-
value:
|
|
961
|
-
} :
|
|
952
|
+
items: o.map((r) => {
|
|
953
|
+
var s;
|
|
954
|
+
const l = e[r.name];
|
|
955
|
+
return l ? l.type !== r.type ? console.warn(`formItem type not match: name = ${r.name}, type = ${r.type}`) : r.type === K.datePicker && r.value ? {
|
|
956
|
+
...r,
|
|
957
|
+
value: r.value ? ze(r.value) : void 0
|
|
958
|
+
} : r.type === K.rangePicker && ((s = r.value) != null && s.length) ? {
|
|
959
|
+
...r,
|
|
960
|
+
value: r.value.map(ze)
|
|
961
|
+
} : r : console.warn(`formItem not exit: name = ${r.name}`);
|
|
962
962
|
}).filter(Boolean)
|
|
963
963
|
};
|
|
964
964
|
}).filter(Boolean);
|
|
965
965
|
function xe(...a) {
|
|
966
966
|
console.log("%c[pro-table]:", "color: #f00; padding: 2px 4px; font-weight: bold; font-size: 14px;", ...a);
|
|
967
967
|
}
|
|
968
|
-
const
|
|
968
|
+
const La = (a) => {
|
|
969
969
|
a.forEach((e) => {
|
|
970
|
-
new
|
|
970
|
+
new Le({
|
|
971
971
|
type: [
|
|
972
972
|
{ required: !0 },
|
|
973
973
|
{
|
|
974
|
-
validator(t,
|
|
975
|
-
return ["string", "function"].includes(we(
|
|
974
|
+
validator(t, o, r) {
|
|
975
|
+
return ["string", "function"].includes(we(o)) ? r() : r(new Error("type must be string or function"));
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
],
|
|
@@ -986,7 +986,7 @@ const Aa = (a) => {
|
|
|
986
986
|
required: e.type === "component"
|
|
987
987
|
},
|
|
988
988
|
props: {
|
|
989
|
-
validator: (t,
|
|
989
|
+
validator: (t, o, r) => o && !["object", "function"].includes(we(o)) ? r(new Error("props must be object or function")) : r()
|
|
990
990
|
}
|
|
991
991
|
}).validate(e, (t) => {
|
|
992
992
|
t && console.error(`[pro-table]: defineFormItems error, [${t[0].message}]`, {
|
|
@@ -995,31 +995,31 @@ const Aa = (a) => {
|
|
|
995
995
|
});
|
|
996
996
|
});
|
|
997
997
|
});
|
|
998
|
-
},
|
|
998
|
+
}, Ma = (a) => {
|
|
999
999
|
a.forEach((e) => {
|
|
1000
|
-
new
|
|
1000
|
+
new Le({
|
|
1001
1001
|
key: [{ required: !0, type: "string" }],
|
|
1002
1002
|
type: [
|
|
1003
1003
|
{
|
|
1004
|
-
validator(t,
|
|
1005
|
-
return
|
|
1004
|
+
validator(t, o, r) {
|
|
1005
|
+
return o ? ["string", "function"].includes(we(o)) ? we(o) === "string" && !Object.keys(G).includes(o) ? r(new Error(`type must be one of ${Object.keys(G).join(", ")}`)) : r() : r(new Error("type must be string or function")) : r();
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
1008
|
],
|
|
1009
1009
|
title: [{ required: !0 }, { type: "string" }],
|
|
1010
1010
|
titleTooltip: {
|
|
1011
|
-
validator(t,
|
|
1012
|
-
return
|
|
1011
|
+
validator(t, o, r) {
|
|
1012
|
+
return o && !["string", "function"].includes(we(o)) ? r(new Error("titleTooltip must be string or function")) : r();
|
|
1013
1013
|
}
|
|
1014
1014
|
},
|
|
1015
1015
|
content: {
|
|
1016
|
-
validator(t,
|
|
1017
|
-
return
|
|
1016
|
+
validator(t, o, r) {
|
|
1017
|
+
return o && !["string", "function"].includes(we(o)) ? r(new Error("content must be string or function")) : r();
|
|
1018
1018
|
}
|
|
1019
1019
|
},
|
|
1020
1020
|
tooltip: {
|
|
1021
|
-
validator(t,
|
|
1022
|
-
return
|
|
1021
|
+
validator(t, o, r) {
|
|
1022
|
+
return o && !["string", "boolean", "function"].includes(we(o)) ? r(new Error("tooltip must be string, boolean, or function")) : r();
|
|
1023
1023
|
}
|
|
1024
1024
|
},
|
|
1025
1025
|
component: {
|
|
@@ -1028,8 +1028,8 @@ const Aa = (a) => {
|
|
|
1028
1028
|
copyable: { type: "boolean" },
|
|
1029
1029
|
ellipsis: { type: "boolean" },
|
|
1030
1030
|
props: {
|
|
1031
|
-
validator(t,
|
|
1032
|
-
return
|
|
1031
|
+
validator(t, o, r) {
|
|
1032
|
+
return o && !["object", "function"].includes(we(o)) ? r(new Error("props must be object or function")) : r();
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
1035
|
}).validate(e, (t) => {
|
|
@@ -1039,7 +1039,7 @@ const Aa = (a) => {
|
|
|
1039
1039
|
});
|
|
1040
1040
|
});
|
|
1041
1041
|
});
|
|
1042
|
-
},
|
|
1042
|
+
}, Ba = (a, e) => {
|
|
1043
1043
|
if (!a) return 0;
|
|
1044
1044
|
const t = document.createElement("canvas").getContext("2d");
|
|
1045
1045
|
return t ? (t.font = [
|
|
@@ -1047,7 +1047,7 @@ const Aa = (a) => {
|
|
|
1047
1047
|
`${oe.fontSize}px`,
|
|
1048
1048
|
oe.fontFamily
|
|
1049
1049
|
].join(" "), Math.ceil(t.measureText(a).width)) : 0;
|
|
1050
|
-
},
|
|
1050
|
+
}, Na = (a, e) => {
|
|
1051
1051
|
if (a === "" || a === null)
|
|
1052
1052
|
return e;
|
|
1053
1053
|
try {
|
|
@@ -1058,15 +1058,15 @@ const Aa = (a) => {
|
|
|
1058
1058
|
defaultVal: e
|
|
1059
1059
|
}), e;
|
|
1060
1060
|
}
|
|
1061
|
-
},
|
|
1061
|
+
}, Ra = (a) => {
|
|
1062
1062
|
let e = 0;
|
|
1063
1063
|
for (let n = 0; n < a.length; n++)
|
|
1064
1064
|
e = (e << 5) - e + a.charCodeAt(n), e |= 0;
|
|
1065
1065
|
return e.toString(16);
|
|
1066
|
-
},
|
|
1067
|
-
const e =
|
|
1068
|
-
return
|
|
1069
|
-
},
|
|
1066
|
+
}, tn = (a) => {
|
|
1067
|
+
const e = Ra(a);
|
|
1068
|
+
return Kn(e, "1b671a64-40d5-491e-99b0-da01ff1f3341").replace(/-/g, "");
|
|
1069
|
+
}, Da = /* @__PURE__ */ fe({
|
|
1070
1070
|
__name: "EllipsisElement",
|
|
1071
1071
|
props: {
|
|
1072
1072
|
/**
|
|
@@ -1133,117 +1133,117 @@ const Aa = (a) => {
|
|
|
1133
1133
|
}
|
|
1134
1134
|
},
|
|
1135
1135
|
setup(a) {
|
|
1136
|
-
const e = a, n =
|
|
1137
|
-
() =>
|
|
1138
|
-
),
|
|
1139
|
-
key:
|
|
1140
|
-
label:
|
|
1136
|
+
const e = a, n = L(() => e.list.map((s) => we(s) === "object" ? s : { label: s }).map((s, d) => ({ ...s, index: d, __key: s.key ?? `${d}-${String(s.label)}` }))), t = L(() => At(n.value, 0, e.maxCount)), o = L(
|
|
1137
|
+
() => At(n.value, e.maxCount, n.value.length)
|
|
1138
|
+
), r = L(() => o.value.map(({ index: s, disabled: d, label: I, onClick: F }) => ({
|
|
1139
|
+
key: s + e.maxCount,
|
|
1140
|
+
label: I,
|
|
1141
1141
|
disabled: d,
|
|
1142
|
-
onClick: () =>
|
|
1143
|
-
}))),
|
|
1144
|
-
const
|
|
1145
|
-
return
|
|
1142
|
+
onClick: () => F == null ? void 0 : F(e.record)
|
|
1143
|
+
}))), l = L(() => {
|
|
1144
|
+
const s = {}, { maxCount: d, cellWidth: I, type: F } = e;
|
|
1145
|
+
return F === G.text && (s.flex = 1), F === G.link && t.value.length > 1 && (s.maxWidth = `${((I - 50) / I / d * 100).toFixed(2)}%`), s;
|
|
1146
1146
|
});
|
|
1147
|
-
return (
|
|
1148
|
-
const
|
|
1149
|
-
return
|
|
1150
|
-
class:
|
|
1151
|
-
|
|
1147
|
+
return (s, d) => {
|
|
1148
|
+
const I = q("a-tag"), F = q("a-popover"), h = q("a-button"), u = q("a-menu"), $ = q("a-dropdown");
|
|
1149
|
+
return k(), H("div", {
|
|
1150
|
+
class: v([
|
|
1151
|
+
s.$style.ellipsisElement,
|
|
1152
1152
|
{
|
|
1153
|
-
[
|
|
1153
|
+
[s.$style.ellipsisElementHasGap]: ![y(G).button, y(G).tag].includes(a.type)
|
|
1154
1154
|
}
|
|
1155
1155
|
])
|
|
1156
1156
|
}, [
|
|
1157
|
-
(
|
|
1157
|
+
(k(!0), H(Pe, null, mt(t.value, (T, C) => (k(), H("div", {
|
|
1158
1158
|
key: T.__key,
|
|
1159
|
-
class:
|
|
1160
|
-
style:
|
|
1159
|
+
class: v(s.$style.elementItem),
|
|
1160
|
+
style: te(l.value)
|
|
1161
1161
|
}, [
|
|
1162
|
-
ve(
|
|
1162
|
+
ve(s.$slots, "default", {
|
|
1163
1163
|
item: T,
|
|
1164
|
-
index:
|
|
1164
|
+
index: C
|
|
1165
1165
|
})
|
|
1166
1166
|
], 6))), 128)),
|
|
1167
|
-
|
|
1168
|
-
a.displayType === "popover" ? (
|
|
1167
|
+
o.value.length ? (k(), H(Pe, { key: 0 }, [
|
|
1168
|
+
a.displayType === "popover" ? (k(), R(F, {
|
|
1169
1169
|
key: 0,
|
|
1170
1170
|
trigger: a.trigger,
|
|
1171
1171
|
"overlay-style": { maxWidth: "500px" },
|
|
1172
1172
|
"destroy-on-close": ""
|
|
1173
1173
|
}, {
|
|
1174
|
-
content:
|
|
1175
|
-
|
|
1176
|
-
class:
|
|
1174
|
+
content: b(() => [
|
|
1175
|
+
Y("div", {
|
|
1176
|
+
class: v(s.$style.ellipsisList)
|
|
1177
1177
|
}, [
|
|
1178
|
-
(
|
|
1178
|
+
(k(!0), H(Pe, null, mt(o.value, (T, C) => ve(s.$slots, "default", {
|
|
1179
1179
|
key: T.__key,
|
|
1180
1180
|
item: T,
|
|
1181
|
-
index:
|
|
1181
|
+
index: C + a.maxCount,
|
|
1182
1182
|
inPopover: !0
|
|
1183
1183
|
})), 128))
|
|
1184
1184
|
], 2)
|
|
1185
1185
|
]),
|
|
1186
|
-
default:
|
|
1187
|
-
|
|
1186
|
+
default: b(() => [
|
|
1187
|
+
_(I, {
|
|
1188
1188
|
size: "mini",
|
|
1189
1189
|
type: "info",
|
|
1190
|
-
class:
|
|
1191
|
-
|
|
1190
|
+
class: v([
|
|
1191
|
+
s.$style.ellipsisTag,
|
|
1192
1192
|
{
|
|
1193
|
-
[
|
|
1193
|
+
[s.$style.imageEllipsisTag]: a.type === y(G).image
|
|
1194
1194
|
}
|
|
1195
1195
|
])
|
|
1196
1196
|
}, {
|
|
1197
|
-
default:
|
|
1198
|
-
|
|
1197
|
+
default: b(() => [
|
|
1198
|
+
Z(he(`+${o.value.length}...`), 1)
|
|
1199
1199
|
]),
|
|
1200
1200
|
_: 1
|
|
1201
1201
|
}, 8, ["class"])
|
|
1202
1202
|
]),
|
|
1203
1203
|
_: 3
|
|
1204
|
-
}, 8, ["trigger"])) :
|
|
1205
|
-
a.displayType === "dropdown" ? (
|
|
1204
|
+
}, 8, ["trigger"])) : B("", !0),
|
|
1205
|
+
a.displayType === "dropdown" ? (k(), R($, {
|
|
1206
1206
|
key: 1,
|
|
1207
1207
|
"destroy-on-close": "",
|
|
1208
1208
|
trigger: a.trigger
|
|
1209
1209
|
}, {
|
|
1210
|
-
overlay:
|
|
1211
|
-
|
|
1210
|
+
overlay: b(() => [
|
|
1211
|
+
_(u, { items: r.value }, null, 8, ["items"])
|
|
1212
1212
|
]),
|
|
1213
|
-
default:
|
|
1214
|
-
|
|
1213
|
+
default: b(() => [
|
|
1214
|
+
_(h, {
|
|
1215
1215
|
type: "link",
|
|
1216
1216
|
size: "small"
|
|
1217
1217
|
}, {
|
|
1218
|
-
default:
|
|
1219
|
-
d[0] || (d[0] =
|
|
1220
|
-
|
|
1218
|
+
default: b(() => [
|
|
1219
|
+
d[0] || (d[0] = Z(" 更多 ")),
|
|
1220
|
+
_(y(Ut))
|
|
1221
1221
|
]),
|
|
1222
1222
|
_: 1
|
|
1223
1223
|
})
|
|
1224
1224
|
]),
|
|
1225
1225
|
_: 1
|
|
1226
|
-
}, 8, ["trigger"])) :
|
|
1227
|
-
], 64)) :
|
|
1226
|
+
}, 8, ["trigger"])) : B("", !0)
|
|
1227
|
+
], 64)) : B("", !0)
|
|
1228
1228
|
], 2);
|
|
1229
1229
|
};
|
|
1230
1230
|
}
|
|
1231
|
-
}),
|
|
1232
|
-
ellipsisElement:
|
|
1233
|
-
elementItem:
|
|
1234
|
-
ellipsisElementHasGap:
|
|
1235
|
-
flexWrap:
|
|
1236
|
-
ellipsisTag:
|
|
1237
|
-
imageEllipsisTag:
|
|
1238
|
-
ellipsisList:
|
|
1239
|
-
},
|
|
1231
|
+
}), Va = "_ellipsisElement_6fog1_1", za = "_elementItem_6fog1_6", Ya = "_ellipsisElementHasGap_6fog1_10", Wa = "_flexWrap_6fog1_14", Ha = "_ellipsisTag_6fog1_18", Ua = "_imageEllipsisTag_6fog1_22", Ga = "_ellipsisList_6fog1_29", Qa = {
|
|
1232
|
+
ellipsisElement: Va,
|
|
1233
|
+
elementItem: za,
|
|
1234
|
+
ellipsisElementHasGap: Ya,
|
|
1235
|
+
flexWrap: Wa,
|
|
1236
|
+
ellipsisTag: Ha,
|
|
1237
|
+
imageEllipsisTag: Ua,
|
|
1238
|
+
ellipsisList: Ga
|
|
1239
|
+
}, be = (a, e) => {
|
|
1240
1240
|
const n = a.__vccOpts || a;
|
|
1241
|
-
for (const [t,
|
|
1242
|
-
n[t] =
|
|
1241
|
+
for (const [t, o] of e)
|
|
1242
|
+
n[t] = o;
|
|
1243
1243
|
return n;
|
|
1244
|
-
},
|
|
1245
|
-
$style:
|
|
1246
|
-
},
|
|
1244
|
+
}, Ja = {
|
|
1245
|
+
$style: Qa
|
|
1246
|
+
}, Ka = /* @__PURE__ */ be(Da, [["__cssModules", Ja]]), Za = { key: 1 }, Xa = /* @__PURE__ */ fe({
|
|
1247
1247
|
__name: "TableCellContent",
|
|
1248
1248
|
props: {
|
|
1249
1249
|
/**
|
|
@@ -1283,139 +1283,139 @@ const Aa = (a) => {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
},
|
|
1285
1285
|
setup(a) {
|
|
1286
|
-
const e = a, n = /* @__PURE__ */ new Map(), t =
|
|
1287
|
-
const { index:
|
|
1288
|
-
return
|
|
1289
|
-
}),
|
|
1290
|
-
const { index:
|
|
1291
|
-
if (
|
|
1292
|
-
return
|
|
1293
|
-
if (typeof
|
|
1294
|
-
if (
|
|
1295
|
-
let
|
|
1296
|
-
|
|
1297
|
-
const
|
|
1298
|
-
if (
|
|
1299
|
-
const
|
|
1300
|
-
return
|
|
1286
|
+
const e = a, n = /* @__PURE__ */ new Map(), t = L(() => {
|
|
1287
|
+
const { index: $, record: T, column: C } = e, f = (C == null ? void 0 : C.type) ?? G.text;
|
|
1288
|
+
return ke(f) ? f(T, $) : f;
|
|
1289
|
+
}), o = L(() => {
|
|
1290
|
+
const { index: $, record: T, column: C } = e, f = C.content;
|
|
1291
|
+
if (ke(f))
|
|
1292
|
+
return f(T, $);
|
|
1293
|
+
if (typeof f == "string") {
|
|
1294
|
+
if (f.startsWith("$")) {
|
|
1295
|
+
let m = n.get(f);
|
|
1296
|
+
m || (m = /* @__PURE__ */ new WeakMap(), n.set(f, m));
|
|
1297
|
+
const N = m.get(T);
|
|
1298
|
+
if (N !== void 0) return N;
|
|
1299
|
+
const g = Jn({ path: f, json: T });
|
|
1300
|
+
return m.set(T, g), g;
|
|
1301
1301
|
}
|
|
1302
|
-
return
|
|
1302
|
+
return tt(T, f, "");
|
|
1303
1303
|
}
|
|
1304
1304
|
return "";
|
|
1305
|
-
}),
|
|
1306
|
-
const { index:
|
|
1305
|
+
}), r = L(() => Ee(o.value)), l = L(() => {
|
|
1306
|
+
const { index: $, record: T, column: C } = e;
|
|
1307
1307
|
if (t.value === G.component) {
|
|
1308
|
-
const { props:
|
|
1309
|
-
return
|
|
1310
|
-
...
|
|
1311
|
-
index:
|
|
1308
|
+
const { props: f = {} } = C;
|
|
1309
|
+
return ke(f) ? f(T, $) : {
|
|
1310
|
+
...f,
|
|
1311
|
+
index: $,
|
|
1312
1312
|
record: T
|
|
1313
1313
|
};
|
|
1314
1314
|
}
|
|
1315
1315
|
return {};
|
|
1316
|
-
}),
|
|
1317
|
-
const { index:
|
|
1318
|
-
if (!
|
|
1319
|
-
if (
|
|
1320
|
-
return
|
|
1321
|
-
const
|
|
1322
|
-
return (
|
|
1323
|
-
}), d =
|
|
1324
|
-
return (
|
|
1325
|
-
var
|
|
1326
|
-
const
|
|
1327
|
-
return d.value ? (
|
|
1316
|
+
}), s = L(() => {
|
|
1317
|
+
const { index: $, record: T, column: C } = e, f = C.tooltip ?? [G.text, G.link].includes(t.value);
|
|
1318
|
+
if (!f) return "";
|
|
1319
|
+
if (ke(f))
|
|
1320
|
+
return f(T, $);
|
|
1321
|
+
const m = r.value[0];
|
|
1322
|
+
return (m == null ? void 0 : m.label) || m;
|
|
1323
|
+
}), d = L(() => !(["", void 0, null].includes(o.value) && ![G.component, G.sort].includes(t.value))), I = ($) => typeof $ == "string" && /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test($), F = ($) => e.hasRouter && !I($), h = ($) => F($) ? "router-link" : "a", u = ($, T) => F($) ? { to: $, target: T ?? "_blank" } : { href: $, target: T ?? "_blank" };
|
|
1324
|
+
return ($, T) => {
|
|
1325
|
+
var g;
|
|
1326
|
+
const C = q("a-button"), f = q("a-typography-text"), m = q("a-tag"), N = q("a-image");
|
|
1327
|
+
return d.value ? (k(), H("div", {
|
|
1328
1328
|
key: 0,
|
|
1329
|
-
class:
|
|
1329
|
+
class: v($.$style.tableCellContent)
|
|
1330
1330
|
}, [
|
|
1331
|
-
t.value ===
|
|
1331
|
+
t.value === y(G).sort ? (k(), R(C, {
|
|
1332
1332
|
key: 0,
|
|
1333
1333
|
type: "text",
|
|
1334
1334
|
size: "small",
|
|
1335
|
-
icon:
|
|
1336
|
-
class:
|
|
1337
|
-
}, null, 8, ["icon", "class"])) :
|
|
1338
|
-
t.value ===
|
|
1335
|
+
icon: U(y(Oe)),
|
|
1336
|
+
class: v([$.$style.draggableIcon, "super-table-column-draggable-handle"])
|
|
1337
|
+
}, null, 8, ["icon", "class"])) : B("", !0),
|
|
1338
|
+
t.value === y(G).component ? (k(), R(Xe(a.column.component), ct(ue({ key: 1 }, l.value)), null, 16)) : Ht([(g = a.column) == null ? void 0 : g.key, a.index, r.value], () => (k(), R(Ka, {
|
|
1339
1339
|
key: 2,
|
|
1340
|
-
list:
|
|
1341
|
-
"max-count": t.value ===
|
|
1340
|
+
list: r.value,
|
|
1341
|
+
"max-count": t.value === y(G).text ? 1 : a.column.maxCount,
|
|
1342
1342
|
record: a.record,
|
|
1343
1343
|
type: t.value,
|
|
1344
1344
|
"cell-width": a.column.width,
|
|
1345
|
-
"display-type": [
|
|
1345
|
+
"display-type": [y(G).button].includes(t.value) ? "dropdown" : "popover"
|
|
1346
1346
|
}, {
|
|
1347
|
-
default:
|
|
1348
|
-
t.value ===
|
|
1349
|
-
|
|
1347
|
+
default: b(({ item: S, index: p, inPopover: E }) => [
|
|
1348
|
+
t.value === y(G).text ? (k(), H(Pe, { key: 0 }, [
|
|
1349
|
+
p === 0 ? (k(), R(f, {
|
|
1350
1350
|
key: 0,
|
|
1351
|
-
ellipsis: { tooltip:
|
|
1352
|
-
content: String(
|
|
1353
|
-
class:
|
|
1354
|
-
}, null, 8, ["ellipsis", "content", "class"])) : (
|
|
1351
|
+
ellipsis: { tooltip: s.value },
|
|
1352
|
+
content: String(S.label),
|
|
1353
|
+
class: v($.$style.antTypographyEllipsis)
|
|
1354
|
+
}, null, 8, ["ellipsis", "content", "class"])) : (k(), H("div", {
|
|
1355
1355
|
key: 1,
|
|
1356
|
-
class:
|
|
1357
|
-
},
|
|
1358
|
-
], 64)) :
|
|
1359
|
-
t.value ===
|
|
1360
|
-
default:
|
|
1361
|
-
a.column.ellipsis ? (
|
|
1356
|
+
class: v($.$style.textListItem)
|
|
1357
|
+
}, he(S.label), 3))
|
|
1358
|
+
], 64)) : B("", !0),
|
|
1359
|
+
t.value === y(G).link ? (k(), R(Xe(h(S.to)), ct(ue({ key: 1 }, u(S.to, S.target))), {
|
|
1360
|
+
default: b(() => [
|
|
1361
|
+
a.column.ellipsis ? (k(), R(f, {
|
|
1362
1362
|
key: 0,
|
|
1363
|
-
ellipsis: { tooltip:
|
|
1364
|
-
content: String(
|
|
1365
|
-
style:
|
|
1366
|
-
class:
|
|
1367
|
-
}, null, 8, ["ellipsis", "content", "style", "class"])) : (
|
|
1363
|
+
ellipsis: { tooltip: S.label },
|
|
1364
|
+
content: String(S.label),
|
|
1365
|
+
style: te({ color: y(oe).colorPrimary }),
|
|
1366
|
+
class: v($.$style.antTypographyEllipsis)
|
|
1367
|
+
}, null, 8, ["ellipsis", "content", "style", "class"])) : (k(), H("span", Za, he(S.label), 1))
|
|
1368
1368
|
]),
|
|
1369
1369
|
_: 2
|
|
1370
|
-
}, 1040)) :
|
|
1371
|
-
t.value ===
|
|
1372
|
-
default:
|
|
1373
|
-
|
|
1370
|
+
}, 1040)) : B("", !0),
|
|
1371
|
+
t.value === y(G).tag ? (k(), R(m, ct(ue({ key: 2 }, S)), {
|
|
1372
|
+
default: b(() => [
|
|
1373
|
+
Z(he(S.label), 1)
|
|
1374
1374
|
]),
|
|
1375
1375
|
_: 2
|
|
1376
|
-
}, 1040)) :
|
|
1377
|
-
t.value ===
|
|
1376
|
+
}, 1040)) : B("", !0),
|
|
1377
|
+
t.value === y(G).button ? (k(), R(C, ue({
|
|
1378
1378
|
key: 3,
|
|
1379
1379
|
type: "link",
|
|
1380
1380
|
size: "small",
|
|
1381
|
-
disabled:
|
|
1382
|
-
},
|
|
1383
|
-
onClick: (
|
|
1384
|
-
var
|
|
1385
|
-
return (
|
|
1381
|
+
disabled: S.disabled
|
|
1382
|
+
}, S.buttonProps, {
|
|
1383
|
+
onClick: (W) => {
|
|
1384
|
+
var J;
|
|
1385
|
+
return (J = S.onClick) == null ? void 0 : J.call(S, a.record, a.index);
|
|
1386
1386
|
}
|
|
1387
1387
|
}), {
|
|
1388
|
-
default:
|
|
1389
|
-
|
|
1388
|
+
default: b(() => [
|
|
1389
|
+
Z(he(S.label), 1)
|
|
1390
1390
|
]),
|
|
1391
1391
|
_: 2
|
|
1392
|
-
}, 1040, ["disabled", "onClick"])) :
|
|
1393
|
-
t.value ===
|
|
1392
|
+
}, 1040, ["disabled", "onClick"])) : B("", !0),
|
|
1393
|
+
t.value === y(G).image ? (k(), R(N, {
|
|
1394
1394
|
key: 4,
|
|
1395
|
-
width:
|
|
1396
|
-
height:
|
|
1397
|
-
src:
|
|
1395
|
+
width: E ? 100 : 32,
|
|
1396
|
+
height: E ? 100 : 32,
|
|
1397
|
+
src: S.label,
|
|
1398
1398
|
style: { objectFit: "cover" }
|
|
1399
1399
|
}, {
|
|
1400
|
-
previewMask:
|
|
1401
|
-
|
|
1400
|
+
previewMask: b(() => [
|
|
1401
|
+
_(y(Mn))
|
|
1402
1402
|
]),
|
|
1403
1403
|
_: 2
|
|
1404
|
-
}, 1032, ["width", "height", "src"])) :
|
|
1404
|
+
}, 1032, ["width", "height", "src"])) : B("", !0)
|
|
1405
1405
|
]),
|
|
1406
1406
|
_: 1
|
|
1407
1407
|
}, 8, ["list", "max-count", "record", "type", "cell-width", "display-type"])), T, 0)
|
|
1408
|
-
], 2)) :
|
|
1408
|
+
], 2)) : B("", !0);
|
|
1409
1409
|
};
|
|
1410
1410
|
}
|
|
1411
|
-
}),
|
|
1412
|
-
tableCellContent:
|
|
1413
|
-
antTypographyEllipsis:
|
|
1414
|
-
draggableIcon:
|
|
1415
|
-
textListItem:
|
|
1416
|
-
},
|
|
1417
|
-
$style:
|
|
1418
|
-
},
|
|
1411
|
+
}), eo = "_tableCellContent_1chn7_1", to = "_antTypographyEllipsis_1chn7_1", no = "_draggableIcon_1chn7_4", ao = "_textListItem_1chn7_8", oo = {
|
|
1412
|
+
tableCellContent: eo,
|
|
1413
|
+
antTypographyEllipsis: to,
|
|
1414
|
+
draggableIcon: no,
|
|
1415
|
+
textListItem: ao
|
|
1416
|
+
}, ro = {
|
|
1417
|
+
$style: oo
|
|
1418
|
+
}, so = /* @__PURE__ */ be(Xa, [["__cssModules", ro]]), lo = fe({
|
|
1419
1419
|
name: "VNodes",
|
|
1420
1420
|
props: {
|
|
1421
1421
|
vnodes: {
|
|
@@ -1426,7 +1426,7 @@ const Aa = (a) => {
|
|
|
1426
1426
|
render() {
|
|
1427
1427
|
return this.vnodes;
|
|
1428
1428
|
}
|
|
1429
|
-
}),
|
|
1429
|
+
}), io = /* @__PURE__ */ fe({
|
|
1430
1430
|
__name: "TableConfig",
|
|
1431
1431
|
props: {
|
|
1432
1432
|
/**
|
|
@@ -1441,340 +1441,340 @@ const Aa = (a) => {
|
|
|
1441
1441
|
},
|
|
1442
1442
|
emits: ["change"],
|
|
1443
1443
|
setup(a, { emit: e }) {
|
|
1444
|
-
const n =
|
|
1445
|
-
|
|
1444
|
+
const n = ne(!1), t = a, o = e, r = ne([]), l = ne([]), s = ne([]), d = ne([]), I = ne(""), F = ne(""), h = () => {
|
|
1445
|
+
l.value = r.value.filter((p) => p.fixed === "left"), s.value = r.value.filter((p) => !p.fixed), d.value = r.value.filter((p) => p.fixed === "right");
|
|
1446
1446
|
};
|
|
1447
1447
|
Ft(() => {
|
|
1448
|
-
|
|
1448
|
+
r.value = t.columns, h();
|
|
1449
1449
|
});
|
|
1450
|
-
const u = ({ title:
|
|
1451
|
-
var
|
|
1452
|
-
const
|
|
1453
|
-
return
|
|
1454
|
-
},
|
|
1455
|
-
|
|
1456
|
-
}, 300),
|
|
1457
|
-
|
|
1458
|
-
...s.value,
|
|
1450
|
+
const u = ({ title: p }) => {
|
|
1451
|
+
var W;
|
|
1452
|
+
const E = (W = F.value) == null ? void 0 : W.trim();
|
|
1453
|
+
return E ? p.toLocaleLowerCase().includes(E.toLocaleLowerCase()) : !0;
|
|
1454
|
+
}, $ = L(() => r.value.every((p) => !u(p))), T = wt((p) => {
|
|
1455
|
+
F.value = p.target.value;
|
|
1456
|
+
}, 300), C = () => {
|
|
1457
|
+
r.value = [
|
|
1459
1458
|
...l.value,
|
|
1459
|
+
...s.value,
|
|
1460
1460
|
...d.value
|
|
1461
1461
|
];
|
|
1462
|
-
},
|
|
1463
|
-
|
|
1462
|
+
}, f = () => {
|
|
1463
|
+
C(), o(
|
|
1464
1464
|
"change",
|
|
1465
|
-
|
|
1465
|
+
r.value.map((p) => Fe(p, vt))
|
|
1466
1466
|
);
|
|
1467
|
-
},
|
|
1467
|
+
}, m = L({
|
|
1468
1468
|
get() {
|
|
1469
|
-
return
|
|
1469
|
+
return r.value.every((p) => p.visible);
|
|
1470
1470
|
},
|
|
1471
|
-
set(
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
}),
|
|
1471
|
+
set(p) {
|
|
1472
|
+
r.value.forEach((E) => {
|
|
1473
|
+
E.visible = p;
|
|
1474
|
+
}), f();
|
|
1475
1475
|
}
|
|
1476
|
-
}),
|
|
1477
|
-
const
|
|
1478
|
-
return
|
|
1479
|
-
}),
|
|
1480
|
-
|
|
1481
|
-
},
|
|
1482
|
-
|
|
1476
|
+
}), N = L(() => {
|
|
1477
|
+
const p = r.value.filter((E) => E.visible).length;
|
|
1478
|
+
return p > 0 && p < r.value.length;
|
|
1479
|
+
}), g = () => {
|
|
1480
|
+
o("change", []);
|
|
1481
|
+
}, S = (p, E) => {
|
|
1482
|
+
p.fixed = E, h(), C(), f();
|
|
1483
1483
|
};
|
|
1484
1484
|
return Ft(() => {
|
|
1485
|
-
n.value || (
|
|
1486
|
-
}), (
|
|
1487
|
-
const
|
|
1488
|
-
return
|
|
1485
|
+
n.value || (I.value = "", F.value = "");
|
|
1486
|
+
}), (p, E) => {
|
|
1487
|
+
const W = q("a-button"), J = q("a-checkbox"), _e = q("a-input"), me = q("a-typography-text"), ie = q("a-tooltip"), re = q("a-popover"), se = q("a-config-provider");
|
|
1488
|
+
return k(), R(se, { theme: {
|
|
1489
1489
|
token: {
|
|
1490
1490
|
borderRadius: 2
|
|
1491
1491
|
}
|
|
1492
1492
|
} }, {
|
|
1493
|
-
default:
|
|
1494
|
-
|
|
1493
|
+
default: b(() => [
|
|
1494
|
+
_(re, {
|
|
1495
1495
|
open: n.value,
|
|
1496
|
-
"onUpdate:open":
|
|
1496
|
+
"onUpdate:open": E[2] || (E[2] = (j) => n.value = j),
|
|
1497
1497
|
placement: "bottomRight",
|
|
1498
1498
|
trigger: "click",
|
|
1499
1499
|
"overlay-inner-style": { padding: 0 },
|
|
1500
1500
|
"overlay-class-name": "pro-table-config-popover"
|
|
1501
1501
|
}, {
|
|
1502
|
-
content:
|
|
1503
|
-
|
|
1504
|
-
class:
|
|
1502
|
+
content: b(() => [
|
|
1503
|
+
Y("div", {
|
|
1504
|
+
class: v(p.$style.tableConfig)
|
|
1505
1505
|
}, [
|
|
1506
|
-
|
|
1507
|
-
class:
|
|
1506
|
+
Y("div", {
|
|
1507
|
+
class: v(p.$style.tableConfigActions)
|
|
1508
1508
|
}, [
|
|
1509
|
-
|
|
1510
|
-
checked:
|
|
1511
|
-
"onUpdate:checked":
|
|
1512
|
-
indeterminate:
|
|
1509
|
+
_(J, {
|
|
1510
|
+
checked: m.value,
|
|
1511
|
+
"onUpdate:checked": E[0] || (E[0] = (j) => m.value = j),
|
|
1512
|
+
indeterminate: N.value
|
|
1513
1513
|
}, {
|
|
1514
|
-
default:
|
|
1515
|
-
|
|
1514
|
+
default: b(() => E[3] || (E[3] = [
|
|
1515
|
+
Z(" 全选 ")
|
|
1516
1516
|
])),
|
|
1517
1517
|
_: 1
|
|
1518
1518
|
}, 8, ["checked", "indeterminate"]),
|
|
1519
|
-
|
|
1519
|
+
_(W, {
|
|
1520
1520
|
type: "link",
|
|
1521
1521
|
size: "small",
|
|
1522
|
-
onClick:
|
|
1522
|
+
onClick: g
|
|
1523
1523
|
}, {
|
|
1524
|
-
default:
|
|
1525
|
-
|
|
1524
|
+
default: b(() => E[4] || (E[4] = [
|
|
1525
|
+
Z(" 重置 ")
|
|
1526
1526
|
])),
|
|
1527
1527
|
_: 1
|
|
1528
1528
|
})
|
|
1529
1529
|
], 2),
|
|
1530
|
-
|
|
1531
|
-
class:
|
|
1530
|
+
Y("div", {
|
|
1531
|
+
class: v(p.$style.tableConfigHead)
|
|
1532
1532
|
}, [
|
|
1533
|
-
|
|
1534
|
-
value:
|
|
1535
|
-
"onUpdate:value":
|
|
1533
|
+
_(_e, {
|
|
1534
|
+
value: I.value,
|
|
1535
|
+
"onUpdate:value": E[1] || (E[1] = (j) => I.value = j),
|
|
1536
1536
|
placeholder: "搜索标题",
|
|
1537
|
-
onChange:
|
|
1537
|
+
onChange: y(T)
|
|
1538
1538
|
}, null, 8, ["value", "onChange"])
|
|
1539
1539
|
], 2),
|
|
1540
|
-
|
|
1541
|
-
class:
|
|
1540
|
+
Y("div", {
|
|
1541
|
+
class: v(p.$style.tableConfigContent)
|
|
1542
1542
|
}, [
|
|
1543
|
-
|
|
1543
|
+
l.value.some((j) => u(j)) ? (k(), H("div", {
|
|
1544
1544
|
key: 0,
|
|
1545
|
-
class:
|
|
1545
|
+
class: v(p.$style.columnGroup)
|
|
1546
1546
|
}, [
|
|
1547
|
-
|
|
1548
|
-
class:
|
|
1547
|
+
Y("div", {
|
|
1548
|
+
class: v(p.$style.groupTitle)
|
|
1549
1549
|
}, "固定在左侧", 2),
|
|
1550
|
-
|
|
1551
|
-
list:
|
|
1550
|
+
_(y(Re), {
|
|
1551
|
+
list: l.value,
|
|
1552
1552
|
"item-key": "key",
|
|
1553
|
-
class:
|
|
1553
|
+
class: v(p.$style.columnList),
|
|
1554
1554
|
handle: ".table-column-draggable-handle",
|
|
1555
|
-
disabled:
|
|
1556
|
-
onEnd:
|
|
1555
|
+
disabled: l.value.length <= 1,
|
|
1556
|
+
onEnd: f
|
|
1557
1557
|
}, {
|
|
1558
|
-
item:
|
|
1559
|
-
u(
|
|
1558
|
+
item: b(({ element: j }) => [
|
|
1559
|
+
u(j) ? (k(), H("div", {
|
|
1560
1560
|
key: 0,
|
|
1561
|
-
class:
|
|
1562
|
-
style:
|
|
1561
|
+
class: v(p.$style.columnItem),
|
|
1562
|
+
style: te({ background: y(oe).colorBgContainer })
|
|
1563
1563
|
}, [
|
|
1564
|
-
|
|
1564
|
+
_(W, {
|
|
1565
1565
|
type: "text",
|
|
1566
1566
|
size: "small",
|
|
1567
|
-
icon:
|
|
1568
|
-
style:
|
|
1569
|
-
class:
|
|
1567
|
+
icon: U(y(Oe)),
|
|
1568
|
+
style: te({ color: y(oe).colorTextQuaternary }),
|
|
1569
|
+
class: v(["table-column-draggable-handle", p.$style.dragIcon])
|
|
1570
1570
|
}, null, 8, ["icon", "style", "class"]),
|
|
1571
|
-
|
|
1572
|
-
checked:
|
|
1573
|
-
"onUpdate:checked": (
|
|
1574
|
-
onChange:
|
|
1571
|
+
_(J, {
|
|
1572
|
+
checked: j.visible,
|
|
1573
|
+
"onUpdate:checked": (D) => j.visible = D,
|
|
1574
|
+
onChange: f
|
|
1575
1575
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
1576
|
-
|
|
1577
|
-
ellipsis: { tooltip:
|
|
1578
|
-
content:
|
|
1579
|
-
class:
|
|
1576
|
+
_(me, {
|
|
1577
|
+
ellipsis: { tooltip: j.title },
|
|
1578
|
+
content: j.title,
|
|
1579
|
+
class: v([p.$style.columnItemContent, p.$style.dragHandle, "table-column-draggable-handle"]),
|
|
1580
1580
|
onClick: () => {
|
|
1581
|
-
|
|
1581
|
+
j.visible = !j.visible, f();
|
|
1582
1582
|
}
|
|
1583
1583
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
1584
|
-
|
|
1585
|
-
class:
|
|
1584
|
+
Y("div", {
|
|
1585
|
+
class: v(p.$style.fixedActions)
|
|
1586
1586
|
}, [
|
|
1587
|
-
|
|
1588
|
-
default:
|
|
1589
|
-
|
|
1587
|
+
_(ie, { title: "固定在右侧" }, {
|
|
1588
|
+
default: b(() => [
|
|
1589
|
+
_(W, {
|
|
1590
1590
|
type: "text",
|
|
1591
1591
|
size: "small",
|
|
1592
|
-
icon:
|
|
1593
|
-
style:
|
|
1594
|
-
onClick: (
|
|
1592
|
+
icon: U(y(xt)),
|
|
1593
|
+
style: te({ color: y(oe).colorTextQuaternary }),
|
|
1594
|
+
onClick: (D) => S(j, "right")
|
|
1595
1595
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1596
1596
|
]),
|
|
1597
1597
|
_: 2
|
|
1598
1598
|
}, 1024),
|
|
1599
|
-
|
|
1600
|
-
default:
|
|
1601
|
-
|
|
1599
|
+
_(ie, { title: "取消固定" }, {
|
|
1600
|
+
default: b(() => [
|
|
1601
|
+
_(W, {
|
|
1602
1602
|
type: "text",
|
|
1603
1603
|
size: "small",
|
|
1604
|
-
icon:
|
|
1605
|
-
style:
|
|
1606
|
-
onClick: (
|
|
1604
|
+
icon: U(y(Tt)),
|
|
1605
|
+
style: te({ color: y(oe).colorPrimary }),
|
|
1606
|
+
onClick: (D) => S(j, !1)
|
|
1607
1607
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1608
1608
|
]),
|
|
1609
1609
|
_: 2
|
|
1610
1610
|
}, 1024)
|
|
1611
1611
|
], 2)
|
|
1612
|
-
], 6)) :
|
|
1612
|
+
], 6)) : B("", !0)
|
|
1613
1613
|
]),
|
|
1614
1614
|
_: 1
|
|
1615
1615
|
}, 8, ["list", "class", "disabled"])
|
|
1616
|
-
], 2)) :
|
|
1617
|
-
|
|
1616
|
+
], 2)) : B("", !0),
|
|
1617
|
+
s.value.some((j) => u(j)) ? (k(), H("div", {
|
|
1618
1618
|
key: 1,
|
|
1619
|
-
class:
|
|
1619
|
+
class: v(p.$style.columnGroup)
|
|
1620
1620
|
}, [
|
|
1621
|
-
|
|
1622
|
-
class:
|
|
1621
|
+
Y("div", {
|
|
1622
|
+
class: v(p.$style.groupTitle)
|
|
1623
1623
|
}, "不固定", 2),
|
|
1624
|
-
|
|
1625
|
-
list:
|
|
1624
|
+
_(y(Re), {
|
|
1625
|
+
list: s.value,
|
|
1626
1626
|
"item-key": "key",
|
|
1627
|
-
class:
|
|
1627
|
+
class: v(p.$style.columnList),
|
|
1628
1628
|
handle: ".table-column-draggable-handle",
|
|
1629
|
-
disabled:
|
|
1630
|
-
onEnd:
|
|
1629
|
+
disabled: s.value.length <= 1,
|
|
1630
|
+
onEnd: f
|
|
1631
1631
|
}, {
|
|
1632
|
-
item:
|
|
1633
|
-
u(
|
|
1632
|
+
item: b(({ element: j }) => [
|
|
1633
|
+
u(j) ? (k(), H("div", {
|
|
1634
1634
|
key: 0,
|
|
1635
|
-
class:
|
|
1636
|
-
style:
|
|
1635
|
+
class: v(p.$style.columnItem),
|
|
1636
|
+
style: te({ background: y(oe).colorBgContainer })
|
|
1637
1637
|
}, [
|
|
1638
|
-
|
|
1638
|
+
_(W, {
|
|
1639
1639
|
type: "text",
|
|
1640
1640
|
size: "small",
|
|
1641
|
-
icon:
|
|
1642
|
-
style:
|
|
1643
|
-
class:
|
|
1641
|
+
icon: U(y(Oe)),
|
|
1642
|
+
style: te({ color: y(oe).colorTextQuaternary }),
|
|
1643
|
+
class: v(["table-column-draggable-handle", p.$style.dragIcon])
|
|
1644
1644
|
}, null, 8, ["icon", "style", "class"]),
|
|
1645
|
-
|
|
1646
|
-
checked:
|
|
1647
|
-
"onUpdate:checked": (
|
|
1648
|
-
onChange:
|
|
1645
|
+
_(J, {
|
|
1646
|
+
checked: j.visible,
|
|
1647
|
+
"onUpdate:checked": (D) => j.visible = D,
|
|
1648
|
+
onChange: f
|
|
1649
1649
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
1650
|
-
|
|
1651
|
-
ellipsis: { tooltip:
|
|
1652
|
-
content:
|
|
1653
|
-
class:
|
|
1650
|
+
_(me, {
|
|
1651
|
+
ellipsis: { tooltip: j.title },
|
|
1652
|
+
content: j.title,
|
|
1653
|
+
class: v([p.$style.columnItemContent, p.$style.dragHandle, "table-column-draggable-handle"]),
|
|
1654
1654
|
onClick: () => {
|
|
1655
|
-
|
|
1655
|
+
j.visible = !j.visible, f();
|
|
1656
1656
|
}
|
|
1657
1657
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
1658
|
-
|
|
1659
|
-
class:
|
|
1658
|
+
Y("div", {
|
|
1659
|
+
class: v(p.$style.fixedActions)
|
|
1660
1660
|
}, [
|
|
1661
|
-
|
|
1662
|
-
default:
|
|
1663
|
-
|
|
1661
|
+
_(ie, { title: "固定在左侧" }, {
|
|
1662
|
+
default: b(() => [
|
|
1663
|
+
_(W, {
|
|
1664
1664
|
type: "text",
|
|
1665
1665
|
size: "small",
|
|
1666
|
-
icon:
|
|
1667
|
-
style:
|
|
1668
|
-
onClick: (
|
|
1666
|
+
icon: U(y(Pt)),
|
|
1667
|
+
style: te({ color: y(oe).colorTextQuaternary }),
|
|
1668
|
+
onClick: (D) => S(j, "left")
|
|
1669
1669
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1670
1670
|
]),
|
|
1671
1671
|
_: 2
|
|
1672
1672
|
}, 1024),
|
|
1673
|
-
|
|
1674
|
-
default:
|
|
1675
|
-
|
|
1673
|
+
_(ie, { title: "固定在右侧" }, {
|
|
1674
|
+
default: b(() => [
|
|
1675
|
+
_(W, {
|
|
1676
1676
|
type: "text",
|
|
1677
1677
|
size: "small",
|
|
1678
|
-
icon:
|
|
1679
|
-
style:
|
|
1680
|
-
onClick: (
|
|
1678
|
+
icon: U(y(xt)),
|
|
1679
|
+
style: te({ color: y(oe).colorTextQuaternary }),
|
|
1680
|
+
onClick: (D) => S(j, "right")
|
|
1681
1681
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1682
1682
|
]),
|
|
1683
1683
|
_: 2
|
|
1684
1684
|
}, 1024)
|
|
1685
1685
|
], 2)
|
|
1686
|
-
], 6)) :
|
|
1686
|
+
], 6)) : B("", !0)
|
|
1687
1687
|
]),
|
|
1688
1688
|
_: 1
|
|
1689
1689
|
}, 8, ["list", "class", "disabled"])
|
|
1690
|
-
], 2)) :
|
|
1691
|
-
d.value.some((
|
|
1690
|
+
], 2)) : B("", !0),
|
|
1691
|
+
d.value.some((j) => u(j)) ? (k(), H("div", {
|
|
1692
1692
|
key: 2,
|
|
1693
|
-
class:
|
|
1693
|
+
class: v(p.$style.columnGroup)
|
|
1694
1694
|
}, [
|
|
1695
|
-
|
|
1696
|
-
class:
|
|
1695
|
+
Y("div", {
|
|
1696
|
+
class: v(p.$style.groupTitle)
|
|
1697
1697
|
}, "固定在右侧", 2),
|
|
1698
|
-
|
|
1698
|
+
_(y(Re), {
|
|
1699
1699
|
list: d.value,
|
|
1700
1700
|
"item-key": "key",
|
|
1701
|
-
class:
|
|
1701
|
+
class: v(p.$style.columnList),
|
|
1702
1702
|
handle: ".table-column-draggable-handle",
|
|
1703
1703
|
disabled: d.value.length <= 1,
|
|
1704
|
-
onEnd:
|
|
1704
|
+
onEnd: f
|
|
1705
1705
|
}, {
|
|
1706
|
-
item:
|
|
1707
|
-
u(
|
|
1706
|
+
item: b(({ element: j }) => [
|
|
1707
|
+
u(j) ? (k(), H("div", {
|
|
1708
1708
|
key: 0,
|
|
1709
|
-
class:
|
|
1710
|
-
style:
|
|
1709
|
+
class: v(p.$style.columnItem),
|
|
1710
|
+
style: te({ background: y(oe).colorBgContainer })
|
|
1711
1711
|
}, [
|
|
1712
|
-
|
|
1712
|
+
_(W, {
|
|
1713
1713
|
type: "text",
|
|
1714
1714
|
size: "small",
|
|
1715
|
-
icon:
|
|
1716
|
-
style:
|
|
1717
|
-
class:
|
|
1715
|
+
icon: U(y(Oe)),
|
|
1716
|
+
style: te({ color: y(oe).colorTextQuaternary }),
|
|
1717
|
+
class: v(["table-column-draggable-handle", p.$style.dragIcon])
|
|
1718
1718
|
}, null, 8, ["icon", "style", "class"]),
|
|
1719
|
-
|
|
1720
|
-
checked:
|
|
1721
|
-
"onUpdate:checked": (
|
|
1722
|
-
onChange:
|
|
1719
|
+
_(J, {
|
|
1720
|
+
checked: j.visible,
|
|
1721
|
+
"onUpdate:checked": (D) => j.visible = D,
|
|
1722
|
+
onChange: f
|
|
1723
1723
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
1724
|
-
|
|
1725
|
-
ellipsis: { tooltip:
|
|
1726
|
-
content:
|
|
1727
|
-
class:
|
|
1724
|
+
_(me, {
|
|
1725
|
+
ellipsis: { tooltip: j.title },
|
|
1726
|
+
content: j.title,
|
|
1727
|
+
class: v([p.$style.columnItemContent, p.$style.dragHandle, "table-column-draggable-handle"]),
|
|
1728
1728
|
onClick: () => {
|
|
1729
|
-
|
|
1729
|
+
j.visible = !j.visible, f();
|
|
1730
1730
|
}
|
|
1731
1731
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
1732
|
-
|
|
1733
|
-
class:
|
|
1732
|
+
Y("div", {
|
|
1733
|
+
class: v(p.$style.fixedActions)
|
|
1734
1734
|
}, [
|
|
1735
|
-
|
|
1736
|
-
default:
|
|
1737
|
-
|
|
1735
|
+
_(ie, { title: "固定在左侧" }, {
|
|
1736
|
+
default: b(() => [
|
|
1737
|
+
_(W, {
|
|
1738
1738
|
type: "text",
|
|
1739
1739
|
size: "small",
|
|
1740
|
-
icon:
|
|
1741
|
-
style:
|
|
1742
|
-
onClick: (
|
|
1740
|
+
icon: U(y(Pt)),
|
|
1741
|
+
style: te({ color: y(oe).colorTextQuaternary }),
|
|
1742
|
+
onClick: (D) => S(j, "left")
|
|
1743
1743
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1744
1744
|
]),
|
|
1745
1745
|
_: 2
|
|
1746
1746
|
}, 1024),
|
|
1747
|
-
|
|
1748
|
-
default:
|
|
1749
|
-
|
|
1747
|
+
_(ie, { title: "取消固定" }, {
|
|
1748
|
+
default: b(() => [
|
|
1749
|
+
_(W, {
|
|
1750
1750
|
type: "text",
|
|
1751
1751
|
size: "small",
|
|
1752
|
-
icon:
|
|
1753
|
-
style:
|
|
1754
|
-
onClick: (
|
|
1752
|
+
icon: U(y(Tt)),
|
|
1753
|
+
style: te({ color: y(oe).colorPrimary }),
|
|
1754
|
+
onClick: (D) => S(j, !1)
|
|
1755
1755
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1756
1756
|
]),
|
|
1757
1757
|
_: 2
|
|
1758
1758
|
}, 1024)
|
|
1759
1759
|
], 2)
|
|
1760
|
-
], 6)) :
|
|
1760
|
+
], 6)) : B("", !0)
|
|
1761
1761
|
]),
|
|
1762
1762
|
_: 1
|
|
1763
1763
|
}, 8, ["list", "class", "disabled"])
|
|
1764
|
-
], 2)) :
|
|
1765
|
-
|
|
1764
|
+
], 2)) : B("", !0),
|
|
1765
|
+
$.value ? (k(), H("div", {
|
|
1766
1766
|
key: 3,
|
|
1767
|
-
class:
|
|
1768
|
-
style:
|
|
1769
|
-
}, " 未找到相关查询项 ", 6)) :
|
|
1767
|
+
class: v(p.$style.emptyText),
|
|
1768
|
+
style: te({ color: y(oe).colorTextSecondary })
|
|
1769
|
+
}, " 未找到相关查询项 ", 6)) : B("", !0)
|
|
1770
1770
|
], 2)
|
|
1771
1771
|
], 2)
|
|
1772
1772
|
]),
|
|
1773
|
-
default:
|
|
1774
|
-
|
|
1773
|
+
default: b(() => [
|
|
1774
|
+
_(W, {
|
|
1775
1775
|
type: "text",
|
|
1776
|
-
icon:
|
|
1777
|
-
class:
|
|
1776
|
+
icon: U(y(Bn)),
|
|
1777
|
+
class: v(p.$style.configBtn)
|
|
1778
1778
|
}, null, 8, ["icon", "class"])
|
|
1779
1779
|
]),
|
|
1780
1780
|
_: 1
|
|
@@ -1784,24 +1784,24 @@ const Aa = (a) => {
|
|
|
1784
1784
|
});
|
|
1785
1785
|
};
|
|
1786
1786
|
}
|
|
1787
|
-
}),
|
|
1788
|
-
configBtn:
|
|
1789
|
-
tableConfig:
|
|
1790
|
-
tableConfigHead:
|
|
1791
|
-
tableConfigActions:
|
|
1792
|
-
tableConfigContent:
|
|
1793
|
-
columnGroup:
|
|
1794
|
-
groupTitle:
|
|
1795
|
-
columnList:
|
|
1796
|
-
columnItem:
|
|
1797
|
-
columnItemContent:
|
|
1798
|
-
dragIcon:
|
|
1799
|
-
dragHandle:
|
|
1800
|
-
fixedActions:
|
|
1801
|
-
emptyText:
|
|
1802
|
-
},
|
|
1803
|
-
$style:
|
|
1804
|
-
},
|
|
1787
|
+
}), uo = "_configBtn_fstz6_1", co = "_tableConfig_fstz6_9", po = "_tableConfigHead_fstz6_12", fo = "_tableConfigActions_fstz6_15", mo = "_tableConfigContent_fstz6_22", yo = "_columnGroup_fstz6_28", go = "_groupTitle_fstz6_28", vo = "_columnList_fstz6_35", ho = "_columnItem_fstz6_39", bo = "_columnItemContent_fstz6_47", _o = "_dragIcon_fstz6_51", Co = "_dragHandle_fstz6_54", $o = "_fixedActions_fstz6_57", wo = "_emptyText_fstz6_65", So = {
|
|
1788
|
+
configBtn: uo,
|
|
1789
|
+
tableConfig: co,
|
|
1790
|
+
tableConfigHead: po,
|
|
1791
|
+
tableConfigActions: fo,
|
|
1792
|
+
tableConfigContent: mo,
|
|
1793
|
+
columnGroup: yo,
|
|
1794
|
+
groupTitle: go,
|
|
1795
|
+
columnList: vo,
|
|
1796
|
+
columnItem: ho,
|
|
1797
|
+
columnItemContent: bo,
|
|
1798
|
+
dragIcon: _o,
|
|
1799
|
+
dragHandle: Co,
|
|
1800
|
+
fixedActions: $o,
|
|
1801
|
+
emptyText: wo
|
|
1802
|
+
}, Io = {
|
|
1803
|
+
$style: So
|
|
1804
|
+
}, ko = /* @__PURE__ */ be(io, [["__cssModules", Io]]), Fo = /* @__PURE__ */ fe({
|
|
1805
1805
|
__name: "DynamicList",
|
|
1806
1806
|
props: {
|
|
1807
1807
|
/**
|
|
@@ -1859,7 +1859,7 @@ const Aa = (a) => {
|
|
|
1859
1859
|
deleteButtonProps: {
|
|
1860
1860
|
type: [Object, Function],
|
|
1861
1861
|
default: () => ({
|
|
1862
|
-
icon:
|
|
1862
|
+
icon: U(Ot)
|
|
1863
1863
|
})
|
|
1864
1864
|
},
|
|
1865
1865
|
/**
|
|
@@ -1877,7 +1877,7 @@ const Aa = (a) => {
|
|
|
1877
1877
|
sortButtonProps: {
|
|
1878
1878
|
type: [Object, Function],
|
|
1879
1879
|
default: () => ({
|
|
1880
|
-
icon:
|
|
1880
|
+
icon: U(Oe)
|
|
1881
1881
|
})
|
|
1882
1882
|
},
|
|
1883
1883
|
/**
|
|
@@ -1909,115 +1909,115 @@ const Aa = (a) => {
|
|
|
1909
1909
|
},
|
|
1910
1910
|
emits: ["update:value", "add", "remove", "change"],
|
|
1911
1911
|
setup(a, { emit: e }) {
|
|
1912
|
-
const n = a, t = e,
|
|
1913
|
-
const
|
|
1914
|
-
return Array.from({ length: 16 }).map(() =>
|
|
1915
|
-
},
|
|
1916
|
-
var
|
|
1917
|
-
if (
|
|
1918
|
-
const
|
|
1919
|
-
id:
|
|
1920
|
-
...((
|
|
1912
|
+
const n = a, t = e, o = Fn.useInjectFormItemContext(), r = ne(n.value), l = () => {
|
|
1913
|
+
const I = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
1914
|
+
return Array.from({ length: 16 }).map(() => I[Math.floor(Math.random() * I.length)]).join("");
|
|
1915
|
+
}, s = (I) => {
|
|
1916
|
+
var F;
|
|
1917
|
+
if (r.value.length < n.maxLength) {
|
|
1918
|
+
const h = {
|
|
1919
|
+
id: l(),
|
|
1920
|
+
...((F = n.getNewItemData) == null ? void 0 : F.call(n)) ?? {}
|
|
1921
1921
|
};
|
|
1922
|
-
|
|
1922
|
+
r.value.splice(I + 1, 0, h), t("add", h, I + 1);
|
|
1923
1923
|
}
|
|
1924
|
-
}, d = (
|
|
1925
|
-
|
|
1924
|
+
}, d = (I) => {
|
|
1925
|
+
r.value.splice(I, 1), t("remove", I);
|
|
1926
1926
|
};
|
|
1927
|
-
return
|
|
1928
|
-
() =>
|
|
1927
|
+
return Ie(
|
|
1928
|
+
() => r.value,
|
|
1929
1929
|
() => {
|
|
1930
|
-
t("update:value",
|
|
1930
|
+
t("update:value", y(r.value)), t("change", y(r.value)), o.onFieldChange();
|
|
1931
1931
|
},
|
|
1932
1932
|
{
|
|
1933
1933
|
deep: !0,
|
|
1934
1934
|
immediate: !0
|
|
1935
1935
|
}
|
|
1936
|
-
),
|
|
1936
|
+
), Ie(
|
|
1937
1937
|
() => n.value,
|
|
1938
1938
|
() => {
|
|
1939
|
-
|
|
1939
|
+
r.value = y(n.value);
|
|
1940
1940
|
},
|
|
1941
1941
|
{
|
|
1942
1942
|
deep: !0,
|
|
1943
1943
|
immediate: !0
|
|
1944
1944
|
}
|
|
1945
|
-
), (
|
|
1946
|
-
const
|
|
1947
|
-
return
|
|
1948
|
-
|
|
1949
|
-
list:
|
|
1945
|
+
), (I, F) => {
|
|
1946
|
+
const h = q("a-button");
|
|
1947
|
+
return k(), H(Pe, null, [
|
|
1948
|
+
_(y(Re), {
|
|
1949
|
+
list: r.value,
|
|
1950
1950
|
"item-key": a.itemKey,
|
|
1951
1951
|
disabled: !a.sortable,
|
|
1952
1952
|
handle: ".draggable-icon",
|
|
1953
|
-
class:
|
|
1953
|
+
class: v([I.$style.dynamicList, a.className])
|
|
1954
1954
|
}, {
|
|
1955
|
-
item:
|
|
1956
|
-
|
|
1957
|
-
class:
|
|
1955
|
+
item: b(({ element: u, index: $ }) => [
|
|
1956
|
+
Y("div", {
|
|
1957
|
+
class: v([I.$style.dynamicListItem, a.itemClassName])
|
|
1958
1958
|
}, [
|
|
1959
|
-
|
|
1960
|
-
class:
|
|
1959
|
+
Y("div", {
|
|
1960
|
+
class: v(I.$style.dynamicListItemContent)
|
|
1961
1961
|
}, [
|
|
1962
|
-
ve(
|
|
1962
|
+
ve(I.$slots, "default", {
|
|
1963
1963
|
item: u,
|
|
1964
|
-
index:
|
|
1964
|
+
index: $
|
|
1965
1965
|
})
|
|
1966
1966
|
], 2),
|
|
1967
|
-
|
|
1968
|
-
class:
|
|
1967
|
+
Y("div", {
|
|
1968
|
+
class: v(I.$style.actionsIcons)
|
|
1969
1969
|
}, [
|
|
1970
|
-
|
|
1970
|
+
_(h, ue({
|
|
1971
1971
|
type: "link",
|
|
1972
1972
|
danger: "",
|
|
1973
1973
|
size: "small",
|
|
1974
|
-
icon:
|
|
1975
|
-
},
|
|
1976
|
-
onClick: (T) => d(
|
|
1974
|
+
icon: U(y(Ot))
|
|
1975
|
+
}, y(ke)(a.deleteButtonProps) ? a.deleteButtonProps(u, $) : a.deleteButtonProps, {
|
|
1976
|
+
onClick: (T) => d($)
|
|
1977
1977
|
}), {
|
|
1978
|
-
default:
|
|
1979
|
-
|
|
1978
|
+
default: b(() => [
|
|
1979
|
+
Z(he(a.deleteButtonText), 1)
|
|
1980
1980
|
]),
|
|
1981
1981
|
_: 2
|
|
1982
1982
|
}, 1040, ["icon", "onClick"]),
|
|
1983
|
-
a.sortable ? (
|
|
1983
|
+
a.sortable ? (k(), R(h, ue({
|
|
1984
1984
|
key: 0,
|
|
1985
|
-
class: ["draggable-icon",
|
|
1985
|
+
class: ["draggable-icon", I.$style.dragIcon],
|
|
1986
1986
|
size: "small",
|
|
1987
1987
|
type: "text",
|
|
1988
|
-
icon:
|
|
1989
|
-
},
|
|
1988
|
+
icon: U(y(Oe))
|
|
1989
|
+
}, y(ke)(a.sortButtonProps) ? a.sortButtonProps(u, $) : a.sortButtonProps), null, 16, ["class", "icon"])) : B("", !0)
|
|
1990
1990
|
], 2)
|
|
1991
1991
|
], 2)
|
|
1992
1992
|
]),
|
|
1993
1993
|
_: 3
|
|
1994
1994
|
}, 8, ["list", "item-key", "disabled", "class"]),
|
|
1995
|
-
|
|
1996
|
-
|
|
1995
|
+
Y("div", null, [
|
|
1996
|
+
r.value.length < a.maxLength ? (k(), R(h, ue({
|
|
1997
1997
|
key: 0,
|
|
1998
1998
|
type: "link",
|
|
1999
|
-
icon:
|
|
2000
|
-
},
|
|
2001
|
-
onClick:
|
|
1999
|
+
icon: U(y(Gt))
|
|
2000
|
+
}, y(ke)(a.addButtonProps) ? a.addButtonProps() : a.addButtonProps, {
|
|
2001
|
+
onClick: F[0] || (F[0] = (u) => s(r.value.length - 1))
|
|
2002
2002
|
}), {
|
|
2003
|
-
default:
|
|
2004
|
-
|
|
2003
|
+
default: b(() => [
|
|
2004
|
+
Z(he(a.addButtonText), 1)
|
|
2005
2005
|
]),
|
|
2006
2006
|
_: 1
|
|
2007
|
-
}, 16, ["icon"])) :
|
|
2007
|
+
}, 16, ["icon"])) : B("", !0)
|
|
2008
2008
|
])
|
|
2009
2009
|
], 64);
|
|
2010
2010
|
};
|
|
2011
2011
|
}
|
|
2012
|
-
}),
|
|
2013
|
-
dynamicList:
|
|
2014
|
-
dynamicListItem:
|
|
2015
|
-
dynamicListItemContent:
|
|
2016
|
-
actionsIcons:
|
|
2017
|
-
dragIcon:
|
|
2018
|
-
},
|
|
2019
|
-
$style:
|
|
2020
|
-
},
|
|
2012
|
+
}), xo = "_dynamicList_1woe5_1", To = "_dynamicListItem_1woe5_6", Po = "_dynamicListItemContent_1woe5_13", Oo = "_actionsIcons_1woe5_17", Ao = "_dragIcon_1woe5_21", qo = {
|
|
2013
|
+
dynamicList: xo,
|
|
2014
|
+
dynamicListItem: To,
|
|
2015
|
+
dynamicListItemContent: Po,
|
|
2016
|
+
actionsIcons: Oo,
|
|
2017
|
+
dragIcon: Ao
|
|
2018
|
+
}, jo = {
|
|
2019
|
+
$style: qo
|
|
2020
|
+
}, Eo = /* @__PURE__ */ be(Fo, [["__cssModules", jo]]), Lo = /* @__PURE__ */ fe({
|
|
2021
2021
|
__name: "InputGroup",
|
|
2022
2022
|
props: {
|
|
2023
2023
|
/**
|
|
@@ -2047,51 +2047,51 @@ const Aa = (a) => {
|
|
|
2047
2047
|
},
|
|
2048
2048
|
emits: ["update:value", "change"],
|
|
2049
2049
|
setup(a, { emit: e }) {
|
|
2050
|
-
const n = a, t = e,
|
|
2050
|
+
const n = a, t = e, o = L({
|
|
2051
2051
|
get() {
|
|
2052
2052
|
return n.value;
|
|
2053
2053
|
},
|
|
2054
|
-
set(
|
|
2055
|
-
t("update:value",
|
|
2054
|
+
set(l) {
|
|
2055
|
+
t("update:value", l), t("change", l);
|
|
2056
2056
|
}
|
|
2057
|
-
}),
|
|
2058
|
-
var
|
|
2059
|
-
const
|
|
2060
|
-
return ((d = (
|
|
2057
|
+
}), r = L(() => {
|
|
2058
|
+
var s, d;
|
|
2059
|
+
const l = n.inModal ? "30%" : "50%";
|
|
2060
|
+
return ((d = (s = n.formItem.addonSelectProps) == null ? void 0 : s.style) == null ? void 0 : d.width) ?? l;
|
|
2061
2061
|
});
|
|
2062
|
-
return (
|
|
2063
|
-
const d =
|
|
2064
|
-
return
|
|
2062
|
+
return (l, s) => {
|
|
2063
|
+
const d = q("a-select"), I = q("a-input"), F = q("a-input-group");
|
|
2064
|
+
return k(), R(F, {
|
|
2065
2065
|
compact: "",
|
|
2066
|
-
class:
|
|
2066
|
+
class: v(l.$style.inputGroup)
|
|
2067
2067
|
}, {
|
|
2068
|
-
default:
|
|
2069
|
-
|
|
2070
|
-
value:
|
|
2071
|
-
"onUpdate:value":
|
|
2068
|
+
default: b(() => [
|
|
2069
|
+
_(d, ue({
|
|
2070
|
+
value: o.value.select,
|
|
2071
|
+
"onUpdate:value": s[0] || (s[0] = (h) => o.value.select = h),
|
|
2072
2072
|
style: {
|
|
2073
|
-
...
|
|
2074
|
-
width:
|
|
2073
|
+
...y(tt)(a.formItem, "addonBeforeProps.style", {}),
|
|
2074
|
+
width: r.value
|
|
2075
2075
|
}
|
|
2076
|
-
},
|
|
2077
|
-
|
|
2078
|
-
value:
|
|
2079
|
-
"onUpdate:value":
|
|
2076
|
+
}, y(Qt)(a.formItem.addonBeforeProps, ["style"])), null, 16, ["value", "style"]),
|
|
2077
|
+
_(I, ue({
|
|
2078
|
+
value: o.value.value,
|
|
2079
|
+
"onUpdate:value": s[1] || (s[1] = (h) => o.value.value = h),
|
|
2080
2080
|
style: {
|
|
2081
|
-
...
|
|
2082
|
-
width: `calc(100% - ${
|
|
2081
|
+
...y(tt)(a.formItem, "props.style", {}),
|
|
2082
|
+
width: `calc(100% - ${r.value})`
|
|
2083
2083
|
}
|
|
2084
|
-
},
|
|
2084
|
+
}, y(Fe)(a.formItem, ["props"])), null, 16, ["value", "style"])
|
|
2085
2085
|
]),
|
|
2086
2086
|
_: 1
|
|
2087
2087
|
}, 8, ["class"]);
|
|
2088
2088
|
};
|
|
2089
2089
|
}
|
|
2090
|
-
}),
|
|
2091
|
-
inputGroup:
|
|
2092
|
-
},
|
|
2093
|
-
$style:
|
|
2094
|
-
},
|
|
2090
|
+
}), Mo = "_inputGroup_eukv3_1", Bo = {
|
|
2091
|
+
inputGroup: Mo
|
|
2092
|
+
}, No = {
|
|
2093
|
+
$style: Bo
|
|
2094
|
+
}, Ro = /* @__PURE__ */ be(Lo, [["__cssModules", No]]), Qe = null, Do = /* @__PURE__ */ fe({
|
|
2095
2095
|
__name: "InputNumberRange",
|
|
2096
2096
|
props: {
|
|
2097
2097
|
/**
|
|
@@ -2113,63 +2113,63 @@ const Aa = (a) => {
|
|
|
2113
2113
|
},
|
|
2114
2114
|
emits: ["update:value"],
|
|
2115
2115
|
setup(a, { emit: e }) {
|
|
2116
|
-
const n = a, t = e,
|
|
2116
|
+
const n = a, t = e, o = L({
|
|
2117
2117
|
get() {
|
|
2118
|
-
var
|
|
2119
|
-
return ((
|
|
2118
|
+
var s;
|
|
2119
|
+
return ((s = n.value) == null ? void 0 : s[0]) ?? Qe;
|
|
2120
2120
|
},
|
|
2121
|
-
set(
|
|
2121
|
+
set(s) {
|
|
2122
2122
|
var d;
|
|
2123
|
-
t("update:value", [
|
|
2123
|
+
t("update:value", [s, ((d = n.value) == null ? void 0 : d[1]) ?? Qe]);
|
|
2124
2124
|
}
|
|
2125
|
-
}),
|
|
2125
|
+
}), r = L({
|
|
2126
2126
|
get() {
|
|
2127
|
-
var
|
|
2128
|
-
return ((
|
|
2127
|
+
var s;
|
|
2128
|
+
return ((s = n.value) == null ? void 0 : s[1]) ?? Qe;
|
|
2129
2129
|
},
|
|
2130
|
-
set(
|
|
2130
|
+
set(s) {
|
|
2131
2131
|
var d;
|
|
2132
|
-
t("update:value", [((d = n.value) == null ? void 0 : d[0]) ??
|
|
2132
|
+
t("update:value", [((d = n.value) == null ? void 0 : d[0]) ?? Qe, s]);
|
|
2133
2133
|
}
|
|
2134
|
-
}),
|
|
2135
|
-
return (
|
|
2136
|
-
var
|
|
2137
|
-
const
|
|
2138
|
-
return
|
|
2139
|
-
class:
|
|
2134
|
+
}), l = L(() => Qt(n.formItem.props, ["placeholder"]));
|
|
2135
|
+
return (s, d) => {
|
|
2136
|
+
var F, h, u, $;
|
|
2137
|
+
const I = q("a-input-number");
|
|
2138
|
+
return k(), H("div", {
|
|
2139
|
+
class: v([s.$style.inputNumberGroup, "input-number-group"])
|
|
2140
2140
|
}, [
|
|
2141
|
-
|
|
2142
|
-
class:
|
|
2141
|
+
Y("div", {
|
|
2142
|
+
class: v(s.$style.inputNumberGroupContent)
|
|
2143
2143
|
}, [
|
|
2144
|
-
|
|
2145
|
-
value:
|
|
2146
|
-
"onUpdate:value": d[0] || (d[0] = (T) =>
|
|
2147
|
-
class: [
|
|
2148
|
-
placeholder: ((
|
|
2144
|
+
_(I, ue(l.value, {
|
|
2145
|
+
value: o.value,
|
|
2146
|
+
"onUpdate:value": d[0] || (d[0] = (T) => o.value = T),
|
|
2147
|
+
class: [s.$style.inputNumber, s.$style.startInputNumber],
|
|
2148
|
+
placeholder: ((h = y(Ee)((F = n.formItem.props) == null ? void 0 : F.placeholder)) == null ? void 0 : h[0]) ?? "请输入"
|
|
2149
2149
|
}), null, 16, ["value", "class", "placeholder"]),
|
|
2150
|
-
|
|
2151
|
-
class:
|
|
2150
|
+
Y("span", {
|
|
2151
|
+
class: v(s.$style.divider)
|
|
2152
2152
|
}, "~", 2),
|
|
2153
|
-
|
|
2154
|
-
value:
|
|
2155
|
-
"onUpdate:value": d[1] || (d[1] = (T) =>
|
|
2156
|
-
class: [
|
|
2157
|
-
placeholder: ((
|
|
2153
|
+
_(I, ue(l.value, {
|
|
2154
|
+
value: r.value,
|
|
2155
|
+
"onUpdate:value": d[1] || (d[1] = (T) => r.value = T),
|
|
2156
|
+
class: [s.$style.inputNumber, s.$style.endInputNumber],
|
|
2157
|
+
placeholder: (($ = y(Ee)((u = n.formItem.props) == null ? void 0 : u.placeholder)) == null ? void 0 : $[1]) ?? "请输入"
|
|
2158
2158
|
}), null, 16, ["value", "class", "placeholder"])
|
|
2159
2159
|
], 2)
|
|
2160
2160
|
], 2);
|
|
2161
2161
|
};
|
|
2162
2162
|
}
|
|
2163
|
-
}),
|
|
2164
|
-
inputNumberGroup:
|
|
2165
|
-
inputNumberGroupContent:
|
|
2166
|
-
inputNumber:
|
|
2167
|
-
startInputNumber:
|
|
2168
|
-
endInputNumber:
|
|
2169
|
-
divider:
|
|
2170
|
-
},
|
|
2171
|
-
$style:
|
|
2172
|
-
},
|
|
2163
|
+
}), Vo = "_inputNumberGroup_149g6_1", zo = "_inputNumberGroupContent_149g6_4", Yo = "_inputNumber_149g6_1", Wo = "_startInputNumber_149g6_13", Ho = "_endInputNumber_149g6_21", Uo = "_divider_149g6_29", Go = {
|
|
2164
|
+
inputNumberGroup: Vo,
|
|
2165
|
+
inputNumberGroupContent: zo,
|
|
2166
|
+
inputNumber: Yo,
|
|
2167
|
+
startInputNumber: Wo,
|
|
2168
|
+
endInputNumber: Ho,
|
|
2169
|
+
divider: Uo
|
|
2170
|
+
}, Qo = {
|
|
2171
|
+
$style: Go
|
|
2172
|
+
}, Jo = /* @__PURE__ */ be(Do, [["__cssModules", Qo]]), Ko = 8, Zo = /* @__PURE__ */ fe({
|
|
2173
2173
|
__name: "FormFieldItem",
|
|
2174
2174
|
props: {
|
|
2175
2175
|
/**
|
|
@@ -2212,31 +2212,31 @@ const Aa = (a) => {
|
|
|
2212
2212
|
emits: ["update:value", "change"],
|
|
2213
2213
|
setup(a, { emit: e }) {
|
|
2214
2214
|
const n = {
|
|
2215
|
-
[K.input]:
|
|
2216
|
-
[K.inputGroup]:
|
|
2217
|
-
[K.inputNumber]:
|
|
2218
|
-
[K.inputNumberRange]:
|
|
2219
|
-
[K.select]:
|
|
2220
|
-
[K.cascader]:
|
|
2221
|
-
[K.treeSelect]:
|
|
2222
|
-
[K.datePicker]:
|
|
2223
|
-
[K.rangePicker]:
|
|
2224
|
-
}, t = a,
|
|
2215
|
+
[K.input]: jn,
|
|
2216
|
+
[K.inputGroup]: Ro,
|
|
2217
|
+
[K.inputNumber]: qn,
|
|
2218
|
+
[K.inputNumberRange]: Jo,
|
|
2219
|
+
[K.select]: An,
|
|
2220
|
+
[K.cascader]: On,
|
|
2221
|
+
[K.treeSelect]: Pn,
|
|
2222
|
+
[K.datePicker]: Tn,
|
|
2223
|
+
[K.rangePicker]: xn
|
|
2224
|
+
}, t = a, o = e, r = gn(), l = L({
|
|
2225
2225
|
get() {
|
|
2226
2226
|
return t.value;
|
|
2227
2227
|
},
|
|
2228
2228
|
set(u) {
|
|
2229
|
-
|
|
2229
|
+
o("update:value", u), o("change", u);
|
|
2230
2230
|
}
|
|
2231
|
-
}),
|
|
2232
|
-
const u =
|
|
2233
|
-
return Math.max(u, 20) +
|
|
2234
|
-
}),
|
|
2235
|
-
const { type: u, component:
|
|
2236
|
-
return u === "component" ?
|
|
2237
|
-
}),
|
|
2238
|
-
var
|
|
2239
|
-
const u = t.formItem,
|
|
2231
|
+
}), s = L(() => !t.inModal && t.formItem.showLabel !== !1), d = L(() => {
|
|
2232
|
+
const u = Ba(t.formItem.label);
|
|
2233
|
+
return Math.max(u, 20) + Ko * 2 + 2;
|
|
2234
|
+
}), I = L(() => {
|
|
2235
|
+
const { type: u, component: $ } = t.formItem;
|
|
2236
|
+
return u === "component" ? $ : n[u];
|
|
2237
|
+
}), F = L(() => {
|
|
2238
|
+
var C;
|
|
2239
|
+
const u = t.formItem, $ = {
|
|
2240
2240
|
[K.input]: {
|
|
2241
2241
|
placeholder: "请输入",
|
|
2242
2242
|
clearable: !0
|
|
@@ -2262,66 +2262,66 @@ const Aa = (a) => {
|
|
|
2262
2262
|
maxTagCount: "responsive"
|
|
2263
2263
|
}
|
|
2264
2264
|
}, T = {
|
|
2265
|
-
...
|
|
2266
|
-
|
|
2265
|
+
...r,
|
|
2266
|
+
...$[u.type] ?? {},
|
|
2267
2267
|
...u.props ?? {},
|
|
2268
2268
|
style: {
|
|
2269
|
-
...((
|
|
2269
|
+
...((C = u.props) == null ? void 0 : C.style) ?? {},
|
|
2270
2270
|
width: u.type !== K.component ? "100%" : void 0
|
|
2271
2271
|
},
|
|
2272
2272
|
inModal: t.inModal
|
|
2273
2273
|
};
|
|
2274
|
-
return t.inModal || (
|
|
2275
|
-
}),
|
|
2276
|
-
return (u,
|
|
2277
|
-
const T =
|
|
2278
|
-
return
|
|
2279
|
-
class:
|
|
2274
|
+
return t.inModal || (s.value && Ve(T, "style.width", `calc(100% - ${d.value}px)`), u.type === K.select && Ve(T, "maxTagCount", "responsive")), T;
|
|
2275
|
+
}), h = L(() => t.formItem.modelPropName ?? "value");
|
|
2276
|
+
return (u, $) => {
|
|
2277
|
+
const T = q("a-input"), C = q("a-input-group");
|
|
2278
|
+
return k(), H("div", {
|
|
2279
|
+
class: v(u.$style.formFieldItem)
|
|
2280
2280
|
}, [
|
|
2281
|
-
|
|
2281
|
+
s.value ? (k(), R(C, {
|
|
2282
2282
|
key: 0,
|
|
2283
2283
|
compact: "",
|
|
2284
|
-
class:
|
|
2284
|
+
class: v([u.$style.inputGroup, "super-table-input-group"])
|
|
2285
2285
|
}, {
|
|
2286
|
-
default:
|
|
2287
|
-
a.inModal ?
|
|
2286
|
+
default: b(() => [
|
|
2287
|
+
a.inModal ? B("", !0) : (k(), R(T, {
|
|
2288
2288
|
key: 0,
|
|
2289
2289
|
value: a.formItem.label,
|
|
2290
2290
|
disabled: "",
|
|
2291
|
-
style:
|
|
2292
|
-
color:
|
|
2291
|
+
style: te({
|
|
2292
|
+
color: y(oe).colorText,
|
|
2293
2293
|
width: `${d.value}px`
|
|
2294
2294
|
}),
|
|
2295
|
-
class:
|
|
2295
|
+
class: v([u.$style.formFieldItemLabel, "super-table-filter-form-item-label"])
|
|
2296
2296
|
}, null, 8, ["value", "style", "class"])),
|
|
2297
|
-
|
|
2297
|
+
I.value ? (k(), R(Xe(I.value), ue({
|
|
2298
2298
|
key: 1,
|
|
2299
|
-
[
|
|
2300
|
-
["onUpdate:" +
|
|
2301
|
-
},
|
|
2299
|
+
[h.value]: l.value,
|
|
2300
|
+
["onUpdate:" + h.value]: $[0] || ($[0] = (f) => l.value = f)
|
|
2301
|
+
}, F.value), null, 16)) : B("", !0)
|
|
2302
2302
|
]),
|
|
2303
2303
|
_: 1
|
|
2304
|
-
}, 8, ["class"])) : (
|
|
2305
|
-
a.formItem.type ===
|
|
2304
|
+
}, 8, ["class"])) : (k(), H(Pe, { key: 1 }, [
|
|
2305
|
+
a.formItem.type === y(K).component && a.formItem.showLabel ? (k(), H("span", {
|
|
2306
2306
|
key: 0,
|
|
2307
|
-
class:
|
|
2308
|
-
},
|
|
2309
|
-
(
|
|
2310
|
-
[
|
|
2311
|
-
["onUpdate:" +
|
|
2312
|
-
},
|
|
2307
|
+
class: v(u.$style.customItemLabel)
|
|
2308
|
+
}, he(a.formItem.label), 3)) : B("", !0),
|
|
2309
|
+
(k(), R(Xe(I.value), ue({
|
|
2310
|
+
[h.value]: l.value,
|
|
2311
|
+
["onUpdate:" + h.value]: $[1] || ($[1] = (f) => l.value = f)
|
|
2312
|
+
}, F.value), null, 16))
|
|
2313
2313
|
], 64))
|
|
2314
2314
|
], 2);
|
|
2315
2315
|
};
|
|
2316
2316
|
}
|
|
2317
|
-
}),
|
|
2318
|
-
formFieldItem:
|
|
2319
|
-
inputGroup:
|
|
2320
|
-
formFieldItemLabel:
|
|
2321
|
-
customItemLabel:
|
|
2322
|
-
},
|
|
2323
|
-
$style:
|
|
2324
|
-
},
|
|
2317
|
+
}), Xo = "_formFieldItem_1imun_1", er = "_inputGroup_1imun_7", tr = "_formFieldItemLabel_1imun_11", nr = "_customItemLabel_1imun_20", ar = {
|
|
2318
|
+
formFieldItem: Xo,
|
|
2319
|
+
inputGroup: er,
|
|
2320
|
+
formFieldItemLabel: tr,
|
|
2321
|
+
customItemLabel: nr
|
|
2322
|
+
}, or = {
|
|
2323
|
+
$style: ar
|
|
2324
|
+
}, nn = /* @__PURE__ */ be(Zo, [["__cssModules", or]]), rr = /* @__PURE__ */ fe({
|
|
2325
2325
|
__name: "SceneConfigModal",
|
|
2326
2326
|
props: {
|
|
2327
2327
|
// 当前编辑的场景
|
|
@@ -2363,30 +2363,30 @@ const Aa = (a) => {
|
|
|
2363
2363
|
},
|
|
2364
2364
|
emits: ["cancel", "search", "form-item-change", "update-form-config"],
|
|
2365
2365
|
setup(a, { expose: e, emit: n }) {
|
|
2366
|
-
var
|
|
2367
|
-
const t = a,
|
|
2368
|
-
Object.values(
|
|
2366
|
+
var We, Ae;
|
|
2367
|
+
const t = a, o = n, r = ne(pt(t.formConfigMap)), l = L(() => yt(
|
|
2368
|
+
Object.values(r.value).filter(({ visible: P }) => P !== !1),
|
|
2369
2369
|
Se.order
|
|
2370
|
-
)),
|
|
2371
|
-
name: ((
|
|
2372
|
-
items: t.actionType === de.search ? d :
|
|
2373
|
-
}),
|
|
2370
|
+
)), s = ["name", "value", "type"], d = l.value.filter((P) => P._selected).map((P) => Fe(P, s)), I = ne(!0), F = ne(!1), h = ne(), u = et({
|
|
2371
|
+
name: ((We = t.currentScene) == null ? void 0 : We.name) ?? "",
|
|
2372
|
+
items: t.actionType === de.search ? d : pt(((Ae = t.currentScene) == null ? void 0 : Ae.items) ?? [])
|
|
2373
|
+
}), $ = L({
|
|
2374
2374
|
get() {
|
|
2375
|
-
const P =
|
|
2376
|
-
return P.length === 0 ? !1 : P.every((
|
|
2375
|
+
const P = l.value.filter((x) => !x.fixed);
|
|
2376
|
+
return P.length === 0 ? !1 : P.every((x) => u.items.some((M) => M.name === x.name));
|
|
2377
2377
|
},
|
|
2378
2378
|
set(P) {
|
|
2379
2379
|
if (P) {
|
|
2380
|
-
const
|
|
2381
|
-
u.items =
|
|
2380
|
+
const x = l.value.map((M) => Fe(M, s));
|
|
2381
|
+
u.items = qt(u.items, x, "name");
|
|
2382
2382
|
} else {
|
|
2383
|
-
const
|
|
2384
|
-
u.items = u.items.filter((M) =>
|
|
2383
|
+
const x = l.value.filter((M) => M.fixed).map((M) => M.name);
|
|
2384
|
+
u.items = u.items.filter((M) => x.includes(M.name));
|
|
2385
2385
|
}
|
|
2386
2386
|
}
|
|
2387
|
-
}), T =
|
|
2388
|
-
(P) => u.items.some((
|
|
2389
|
-
).length),
|
|
2387
|
+
}), T = L(() => l.value.filter(
|
|
2388
|
+
(P) => u.items.some((x) => x.name === P.name)
|
|
2389
|
+
).length), C = L(() => T.value > 0 && T.value < l.value.length), f = et({
|
|
2390
2390
|
name: [
|
|
2391
2391
|
{
|
|
2392
2392
|
required: !0,
|
|
@@ -2405,152 +2405,152 @@ const Aa = (a) => {
|
|
|
2405
2405
|
type: "array"
|
|
2406
2406
|
}
|
|
2407
2407
|
]
|
|
2408
|
-
}),
|
|
2409
|
-
const P =
|
|
2410
|
-
return P ? Fe(
|
|
2411
|
-
},
|
|
2408
|
+
}), m = L(() => u.items.map(({ name: P }) => P)), N = () => {
|
|
2409
|
+
const P = l.value.find((x) => !m.value.includes(x.name));
|
|
2410
|
+
return P ? Fe(pt(P), s) : {};
|
|
2411
|
+
}, g = L(() => ({
|
|
2412
2412
|
[de.create]: "新建场景",
|
|
2413
2413
|
[de.update]: "更新场景",
|
|
2414
2414
|
[de.search]: "高级筛选"
|
|
2415
|
-
})[t.actionType]),
|
|
2416
|
-
const M = t.formConfigMap[
|
|
2417
|
-
M && (
|
|
2418
|
-
},
|
|
2419
|
-
const
|
|
2420
|
-
return [
|
|
2421
|
-
},
|
|
2415
|
+
})[t.actionType]), S = (P, x) => {
|
|
2416
|
+
const M = t.formConfigMap[x.name];
|
|
2417
|
+
M && (x.type = M.type, x.value = M.value, x.label = M.label, E(x.name, x.value));
|
|
2418
|
+
}, p = (P) => {
|
|
2419
|
+
const x = t.formConfigMap[P], M = u.items.map((le) => le.name), X = l.value.filter((le) => !M.includes(le.name));
|
|
2420
|
+
return [x, ...X];
|
|
2421
|
+
}, E = (P, x) => {
|
|
2422
2422
|
const M = u.items.reduce(
|
|
2423
|
-
(
|
|
2423
|
+
(X, le) => (X[le.name] = le.value, X),
|
|
2424
2424
|
{}
|
|
2425
2425
|
);
|
|
2426
|
-
|
|
2427
|
-
},
|
|
2428
|
-
|
|
2429
|
-
},
|
|
2426
|
+
o("form-item-change", P, x, M);
|
|
2427
|
+
}, W = ({ name: P, value: x }) => {
|
|
2428
|
+
E(P, x);
|
|
2429
|
+
}, J = async () => {
|
|
2430
2430
|
var M;
|
|
2431
|
-
const P = u.items.map((
|
|
2432
|
-
const ye =
|
|
2433
|
-
return ye && (ye.value =
|
|
2431
|
+
const P = u.items.map((X, le) => {
|
|
2432
|
+
const ye = r.value[X.name];
|
|
2433
|
+
return ye && (ye.value = X.value, ye[Se.orderInScene] = le, ye[Se.selected] = !0), ye;
|
|
2434
2434
|
}).filter(Boolean);
|
|
2435
|
-
if (t.actionType === de.search && !
|
|
2436
|
-
|
|
2435
|
+
if (t.actionType === de.search && !F.value) {
|
|
2436
|
+
o("update-form-config", P), o("search", u.items, P), o("cancel");
|
|
2437
2437
|
return;
|
|
2438
2438
|
}
|
|
2439
|
-
await ((M =
|
|
2440
|
-
const
|
|
2439
|
+
await ((M = h.value) == null ? void 0 : M.validateFields());
|
|
2440
|
+
const x = ge(u);
|
|
2441
2441
|
t.currentScene ? await t.onUpdate({
|
|
2442
2442
|
...t.currentScene,
|
|
2443
|
-
...
|
|
2444
|
-
}) : await t.onCreate(
|
|
2443
|
+
...x
|
|
2444
|
+
}) : await t.onCreate(x), o("update-form-config", P), o("cancel");
|
|
2445
2445
|
};
|
|
2446
2446
|
(() => {
|
|
2447
2447
|
if (u.items.length) return;
|
|
2448
|
-
const P =
|
|
2449
|
-
|
|
2448
|
+
const P = qt(
|
|
2449
|
+
l.value.filter(({ fixed: M, selected: X }) => M || X),
|
|
2450
2450
|
"name"
|
|
2451
2451
|
);
|
|
2452
2452
|
if (P.length) {
|
|
2453
|
-
u.items = yt(P, "_order").map((M) => Fe(M,
|
|
2453
|
+
u.items = yt(P, "_order").map((M) => Fe(M, s));
|
|
2454
2454
|
return;
|
|
2455
2455
|
}
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2456
|
+
const x = N();
|
|
2457
|
+
x && u.items.push(x);
|
|
2458
2458
|
})();
|
|
2459
2459
|
const me = (P) => {
|
|
2460
|
-
var
|
|
2460
|
+
var x;
|
|
2461
2461
|
return {
|
|
2462
|
-
disabled: (
|
|
2462
|
+
disabled: (x = r.value[P.name]) == null ? void 0 : x.fixed
|
|
2463
2463
|
};
|
|
2464
|
-
}, ie = (P) =>
|
|
2465
|
-
if (
|
|
2464
|
+
}, ie = (P) => r.value[P], re = (P, x, M) => {
|
|
2465
|
+
if (Zt.includes(x))
|
|
2466
2466
|
return xe("setFormItem error,", `form item with prop "${P}" is readonly`);
|
|
2467
2467
|
if (!ie(P))
|
|
2468
2468
|
return xe("setFormItem error,", `Cannot find form item with name "${P}"`);
|
|
2469
|
-
if (
|
|
2469
|
+
if (x === "visible" && r.value[P].fixed)
|
|
2470
2470
|
return xe("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
2471
|
-
|
|
2471
|
+
Ve(r.value, `${P}.${x}`, M), r.value[P].visible || (u.items = u.items.filter((X) => X.name !== P));
|
|
2472
2472
|
}, se = (P) => {
|
|
2473
|
-
var
|
|
2474
|
-
return (
|
|
2475
|
-
},
|
|
2476
|
-
const M = u.items.find((
|
|
2477
|
-
M && (M.value =
|
|
2478
|
-
},
|
|
2479
|
-
Object.entries(P).forEach(([
|
|
2480
|
-
|
|
2473
|
+
var x;
|
|
2474
|
+
return (x = u.items.find((M) => M.name === P)) == null ? void 0 : x.value;
|
|
2475
|
+
}, j = (P, x) => {
|
|
2476
|
+
const M = u.items.find((X) => X.name === P);
|
|
2477
|
+
M && (M.value = x);
|
|
2478
|
+
}, D = (P) => {
|
|
2479
|
+
Object.entries(P).forEach(([x, M]) => {
|
|
2480
|
+
j(x, M);
|
|
2481
2481
|
});
|
|
2482
2482
|
};
|
|
2483
|
-
function
|
|
2484
|
-
return (P ?
|
|
2485
|
-
(M,
|
|
2486
|
-
const
|
|
2487
|
-
return
|
|
2483
|
+
function at(P) {
|
|
2484
|
+
return (P ? Ee(P) : u.items.map((M) => M.name)).reduce(
|
|
2485
|
+
(M, X) => {
|
|
2486
|
+
const le = u.items.find((ye) => ye.name === X);
|
|
2487
|
+
return le && (M[X] = le.value), M;
|
|
2488
2488
|
},
|
|
2489
2489
|
{}
|
|
2490
2490
|
);
|
|
2491
2491
|
}
|
|
2492
2492
|
return e({
|
|
2493
2493
|
getFormItem: ie,
|
|
2494
|
-
setFormItem:
|
|
2495
|
-
getFormValues:
|
|
2496
|
-
setFormValues:
|
|
2494
|
+
setFormItem: re,
|
|
2495
|
+
getFormValues: at,
|
|
2496
|
+
setFormValues: D,
|
|
2497
2497
|
getFormValue: se,
|
|
2498
|
-
setFormValue:
|
|
2499
|
-
}), (P,
|
|
2500
|
-
const M =
|
|
2501
|
-
return
|
|
2502
|
-
open:
|
|
2503
|
-
"onUpdate:open":
|
|
2504
|
-
title:
|
|
2498
|
+
setFormValue: j
|
|
2499
|
+
}), (P, x) => {
|
|
2500
|
+
const M = q("a-input"), X = q("a-form-item"), le = q("a-checkbox"), ye = q("a-space"), qe = q("a-select"), ot = q("a-form"), rt = q("a-modal");
|
|
2501
|
+
return k(), R(rt, {
|
|
2502
|
+
open: I.value,
|
|
2503
|
+
"onUpdate:open": x[4] || (x[4] = (Q) => I.value = Q),
|
|
2504
|
+
title: g.value,
|
|
2505
2505
|
width: 720,
|
|
2506
2506
|
"body-style": {
|
|
2507
2507
|
maxHeight: "70vh",
|
|
2508
2508
|
overflow: "auto"
|
|
2509
2509
|
},
|
|
2510
|
-
onOk:
|
|
2511
|
-
onCancel:
|
|
2510
|
+
onOk: J,
|
|
2511
|
+
onCancel: x[5] || (x[5] = (Q) => o("cancel"))
|
|
2512
2512
|
}, {
|
|
2513
|
-
default:
|
|
2514
|
-
|
|
2513
|
+
default: b(() => [
|
|
2514
|
+
_(ot, {
|
|
2515
2515
|
ref_key: "formRef",
|
|
2516
|
-
ref:
|
|
2516
|
+
ref: h,
|
|
2517
2517
|
model: u,
|
|
2518
|
-
rules:
|
|
2519
|
-
class:
|
|
2518
|
+
rules: f,
|
|
2519
|
+
class: v(P.$style.sceneForm)
|
|
2520
2520
|
}, {
|
|
2521
|
-
default:
|
|
2522
|
-
a.actionType !==
|
|
2521
|
+
default: b(() => [
|
|
2522
|
+
a.actionType !== y(de).search || F.value ? (k(), R(X, {
|
|
2523
2523
|
key: 0,
|
|
2524
2524
|
label: "场景名称",
|
|
2525
2525
|
name: "name",
|
|
2526
2526
|
"label-col": { span: 24 },
|
|
2527
2527
|
"wrapper-col": { span: 12 }
|
|
2528
2528
|
}, {
|
|
2529
|
-
default:
|
|
2530
|
-
|
|
2529
|
+
default: b(() => [
|
|
2530
|
+
_(M, {
|
|
2531
2531
|
value: u.name,
|
|
2532
|
-
"onUpdate:value":
|
|
2532
|
+
"onUpdate:value": x[0] || (x[0] = (Q) => u.name = Q),
|
|
2533
2533
|
placeholder: "请输入"
|
|
2534
2534
|
}, null, 8, ["value"])
|
|
2535
2535
|
]),
|
|
2536
2536
|
_: 1
|
|
2537
|
-
})) :
|
|
2538
|
-
|
|
2537
|
+
})) : B("", !0),
|
|
2538
|
+
_(X, {
|
|
2539
2539
|
name: "items",
|
|
2540
2540
|
"label-col": { span: 24 },
|
|
2541
2541
|
"wrapper-col": { span: 24 }
|
|
2542
2542
|
}, {
|
|
2543
|
-
label:
|
|
2544
|
-
|
|
2545
|
-
default:
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
checked:
|
|
2549
|
-
"onUpdate:checked":
|
|
2550
|
-
indeterminate:
|
|
2543
|
+
label: b(() => [
|
|
2544
|
+
_(ye, null, {
|
|
2545
|
+
default: b(() => [
|
|
2546
|
+
x[6] || (x[6] = Y("span", null, "筛选条件", -1)),
|
|
2547
|
+
_(le, {
|
|
2548
|
+
checked: $.value,
|
|
2549
|
+
"onUpdate:checked": x[1] || (x[1] = (Q) => $.value = Q),
|
|
2550
|
+
indeterminate: C.value
|
|
2551
2551
|
}, {
|
|
2552
|
-
default:
|
|
2553
|
-
|
|
2552
|
+
default: b(() => [
|
|
2553
|
+
Z(" 全选 (" + he(T.value) + "/" + he(l.value.length) + ") ", 1)
|
|
2554
2554
|
]),
|
|
2555
2555
|
_: 1
|
|
2556
2556
|
}, 8, ["checked", "indeterminate"])
|
|
@@ -2558,46 +2558,46 @@ const Aa = (a) => {
|
|
|
2558
2558
|
_: 1
|
|
2559
2559
|
})
|
|
2560
2560
|
]),
|
|
2561
|
-
default:
|
|
2562
|
-
|
|
2561
|
+
default: b(() => [
|
|
2562
|
+
_(Eo, {
|
|
2563
2563
|
value: u.items,
|
|
2564
|
-
"onUpdate:value":
|
|
2564
|
+
"onUpdate:value": x[2] || (x[2] = (Q) => u.items = Q),
|
|
2565
2565
|
"add-button-text": "添加筛选条件",
|
|
2566
|
-
"get-new-item-data":
|
|
2567
|
-
"max-length":
|
|
2566
|
+
"get-new-item-data": N,
|
|
2567
|
+
"max-length": l.value.length,
|
|
2568
2568
|
"delete-button-props": me,
|
|
2569
2569
|
sortButtonProps: me,
|
|
2570
|
-
onAdd:
|
|
2570
|
+
onAdd: W
|
|
2571
2571
|
}, {
|
|
2572
|
-
default:
|
|
2573
|
-
var
|
|
2572
|
+
default: b(({ item: Q }) => {
|
|
2573
|
+
var He;
|
|
2574
2574
|
return [
|
|
2575
|
-
|
|
2576
|
-
class:
|
|
2575
|
+
Y("div", {
|
|
2576
|
+
class: v(P.$style.queryFieldItem)
|
|
2577
2577
|
}, [
|
|
2578
|
-
|
|
2579
|
-
value:
|
|
2580
|
-
"onUpdate:value": (
|
|
2578
|
+
_(qe, {
|
|
2579
|
+
value: Q.name,
|
|
2580
|
+
"onUpdate:value": (Ce) => Q.name = Ce,
|
|
2581
2581
|
"show-search": "",
|
|
2582
|
-
options:
|
|
2582
|
+
options: p(Q.name),
|
|
2583
2583
|
"field-names": { value: "name" },
|
|
2584
2584
|
"option-filter-prop": "label",
|
|
2585
2585
|
placeholder: "请选择要筛选的字段名",
|
|
2586
|
-
disabled: (
|
|
2587
|
-
class:
|
|
2588
|
-
onChange: (
|
|
2586
|
+
disabled: (He = r.value[Q.name]) == null ? void 0 : He.fixed,
|
|
2587
|
+
class: v(P.$style.fieldSelect),
|
|
2588
|
+
onChange: (Ce) => S(Ce, Q)
|
|
2589
2589
|
}, null, 8, ["value", "onUpdate:value", "options", "disabled", "class", "onChange"]),
|
|
2590
|
-
|
|
2591
|
-
class:
|
|
2590
|
+
Y("div", {
|
|
2591
|
+
class: v(P.$style.fieldComponent)
|
|
2592
2592
|
}, [
|
|
2593
|
-
|
|
2593
|
+
Q.name ? (k(), R(nn, {
|
|
2594
2594
|
key: 0,
|
|
2595
|
-
value:
|
|
2596
|
-
"onUpdate:value": (
|
|
2595
|
+
value: Q.value,
|
|
2596
|
+
"onUpdate:value": (Ce) => Q.value = Ce,
|
|
2597
2597
|
"in-modal": "",
|
|
2598
|
-
"form-item":
|
|
2599
|
-
onChange: (
|
|
2600
|
-
}, null, 8, ["value", "onUpdate:value", "form-item", "onChange"])) :
|
|
2598
|
+
"form-item": r.value[Q.name],
|
|
2599
|
+
onChange: (Ce) => E(Q.name, Ce)
|
|
2600
|
+
}, null, 8, ["value", "onUpdate:value", "form-item", "onChange"])) : B("", !0)
|
|
2601
2601
|
], 2)
|
|
2602
2602
|
], 2)
|
|
2603
2603
|
];
|
|
@@ -2610,29 +2610,29 @@ const Aa = (a) => {
|
|
|
2610
2610
|
]),
|
|
2611
2611
|
_: 1
|
|
2612
2612
|
}, 8, ["model", "rules", "class"]),
|
|
2613
|
-
a.actionType ===
|
|
2613
|
+
a.actionType === y(de).search && a.allowCreateScene ? (k(), R(le, {
|
|
2614
2614
|
key: 0,
|
|
2615
|
-
checked:
|
|
2616
|
-
"onUpdate:checked":
|
|
2615
|
+
checked: F.value,
|
|
2616
|
+
"onUpdate:checked": x[3] || (x[3] = (Q) => F.value = Q)
|
|
2617
2617
|
}, {
|
|
2618
|
-
default:
|
|
2619
|
-
|
|
2618
|
+
default: b(() => x[7] || (x[7] = [
|
|
2619
|
+
Z(" 保存为场景 ")
|
|
2620
2620
|
])),
|
|
2621
2621
|
_: 1
|
|
2622
|
-
}, 8, ["checked"])) :
|
|
2622
|
+
}, 8, ["checked"])) : B("", !0)
|
|
2623
2623
|
]),
|
|
2624
2624
|
_: 1
|
|
2625
2625
|
}, 8, ["open", "title"]);
|
|
2626
2626
|
};
|
|
2627
2627
|
}
|
|
2628
|
-
}),
|
|
2629
|
-
sceneForm:
|
|
2630
|
-
queryFieldItem:
|
|
2631
|
-
fieldSelect:
|
|
2632
|
-
fieldComponent:
|
|
2633
|
-
},
|
|
2634
|
-
$style:
|
|
2635
|
-
},
|
|
2628
|
+
}), sr = "_sceneForm_njdgy_1", lr = "_queryFieldItem_njdgy_1", ir = "_fieldSelect_njdgy_7", ur = "_fieldComponent_njdgy_10", cr = {
|
|
2629
|
+
sceneForm: sr,
|
|
2630
|
+
queryFieldItem: lr,
|
|
2631
|
+
fieldSelect: ir,
|
|
2632
|
+
fieldComponent: ur
|
|
2633
|
+
}, dr = {
|
|
2634
|
+
$style: cr
|
|
2635
|
+
}, pr = /* @__PURE__ */ be(rr, [["__cssModules", dr]]), fr = /* @__PURE__ */ fe({
|
|
2636
2636
|
__name: "SceneListModal",
|
|
2637
2637
|
props: {
|
|
2638
2638
|
/**
|
|
@@ -2673,119 +2673,119 @@ const Aa = (a) => {
|
|
|
2673
2673
|
},
|
|
2674
2674
|
emits: ["cancel", "create", "update", "delete", "sort"],
|
|
2675
2675
|
setup(a, { emit: e }) {
|
|
2676
|
-
const n = a, t = e,
|
|
2677
|
-
await n.onDelete(
|
|
2676
|
+
const n = a, t = e, o = ne(n.list), r = ne(!0), l = () => t("cancel"), s = async (h) => {
|
|
2677
|
+
await n.onDelete(h), o.value = o.value.filter((u) => u.code !== h);
|
|
2678
2678
|
}, d = () => {
|
|
2679
|
-
|
|
2680
|
-
},
|
|
2681
|
-
|
|
2682
|
-
},
|
|
2679
|
+
l(), t("create");
|
|
2680
|
+
}, I = (h) => {
|
|
2681
|
+
l(), t("update", h);
|
|
2682
|
+
}, F = () => {
|
|
2683
2683
|
t(
|
|
2684
2684
|
"sort",
|
|
2685
|
-
|
|
2685
|
+
o.value.map(({ code: h }) => h)
|
|
2686
2686
|
);
|
|
2687
2687
|
};
|
|
2688
|
-
return (
|
|
2689
|
-
const
|
|
2690
|
-
return
|
|
2691
|
-
open:
|
|
2692
|
-
"onUpdate:open": u[0] || (u[0] = (
|
|
2688
|
+
return (h, u) => {
|
|
2689
|
+
const $ = q("a-col"), T = q("a-row"), C = q("a-typography-text"), f = q("a-button"), m = q("a-popconfirm"), N = q("a-empty"), g = q("a-modal");
|
|
2690
|
+
return k(), R(g, {
|
|
2691
|
+
open: r.value,
|
|
2692
|
+
"onUpdate:open": u[0] || (u[0] = (S) => r.value = S),
|
|
2693
2693
|
title: "场景管理",
|
|
2694
2694
|
width: 720,
|
|
2695
2695
|
footer: null,
|
|
2696
|
-
onCancel:
|
|
2696
|
+
onCancel: l
|
|
2697
2697
|
}, {
|
|
2698
|
-
default:
|
|
2699
|
-
|
|
2700
|
-
class:
|
|
2698
|
+
default: b(() => [
|
|
2699
|
+
Y("div", {
|
|
2700
|
+
class: v(h.$style.sceneList)
|
|
2701
2701
|
}, [
|
|
2702
|
-
|
|
2703
|
-
class:
|
|
2702
|
+
_(T, {
|
|
2703
|
+
class: v(h.$style.sceneListHead)
|
|
2704
2704
|
}, {
|
|
2705
|
-
default:
|
|
2706
|
-
|
|
2705
|
+
default: b(() => [
|
|
2706
|
+
_($, {
|
|
2707
2707
|
span: 16,
|
|
2708
|
-
class:
|
|
2708
|
+
class: v(h.$style.col)
|
|
2709
2709
|
}, {
|
|
2710
|
-
default:
|
|
2711
|
-
|
|
2710
|
+
default: b(() => u[1] || (u[1] = [
|
|
2711
|
+
Z(" 场景名称 ")
|
|
2712
2712
|
])),
|
|
2713
2713
|
_: 1
|
|
2714
2714
|
}, 8, ["class"]),
|
|
2715
|
-
|
|
2715
|
+
_($, {
|
|
2716
2716
|
span: 8,
|
|
2717
|
-
class:
|
|
2717
|
+
class: v(h.$style.col)
|
|
2718
2718
|
}, {
|
|
2719
|
-
default:
|
|
2720
|
-
|
|
2719
|
+
default: b(() => u[2] || (u[2] = [
|
|
2720
|
+
Z(" 操作 ")
|
|
2721
2721
|
])),
|
|
2722
2722
|
_: 1
|
|
2723
2723
|
}, 8, ["class"])
|
|
2724
2724
|
]),
|
|
2725
2725
|
_: 1
|
|
2726
2726
|
}, 8, ["class"]),
|
|
2727
|
-
|
|
2727
|
+
o.value.length ? (k(), R(y(Re), {
|
|
2728
2728
|
key: 0,
|
|
2729
|
-
list:
|
|
2729
|
+
list: o.value,
|
|
2730
2730
|
"item-key": "id",
|
|
2731
2731
|
handle: ".table-column-draggable-icon",
|
|
2732
|
-
onChange:
|
|
2732
|
+
onChange: F
|
|
2733
2733
|
}, {
|
|
2734
|
-
item:
|
|
2735
|
-
|
|
2736
|
-
class:
|
|
2734
|
+
item: b(({ element: S }) => [
|
|
2735
|
+
_(T, {
|
|
2736
|
+
class: v(h.$style.sceneListItem)
|
|
2737
2737
|
}, {
|
|
2738
|
-
default:
|
|
2739
|
-
|
|
2738
|
+
default: b(() => [
|
|
2739
|
+
_($, {
|
|
2740
2740
|
span: 16,
|
|
2741
|
-
class:
|
|
2741
|
+
class: v(h.$style.col)
|
|
2742
2742
|
}, {
|
|
2743
|
-
default:
|
|
2744
|
-
|
|
2745
|
-
ellipsis: { tooltip:
|
|
2746
|
-
content:
|
|
2743
|
+
default: b(() => [
|
|
2744
|
+
_(C, {
|
|
2745
|
+
ellipsis: { tooltip: S.name },
|
|
2746
|
+
content: S.name
|
|
2747
2747
|
}, null, 8, ["ellipsis", "content"])
|
|
2748
2748
|
]),
|
|
2749
2749
|
_: 2
|
|
2750
2750
|
}, 1032, ["class"]),
|
|
2751
|
-
|
|
2751
|
+
_($, {
|
|
2752
2752
|
span: 8,
|
|
2753
|
-
class:
|
|
2753
|
+
class: v(h.$style.col)
|
|
2754
2754
|
}, {
|
|
2755
|
-
default:
|
|
2756
|
-
|
|
2755
|
+
default: b(() => [
|
|
2756
|
+
_(f, {
|
|
2757
2757
|
type: "link",
|
|
2758
2758
|
size: "small",
|
|
2759
|
-
onClick: (
|
|
2759
|
+
onClick: (p) => I(S)
|
|
2760
2760
|
}, {
|
|
2761
|
-
default:
|
|
2762
|
-
|
|
2761
|
+
default: b(() => u[3] || (u[3] = [
|
|
2762
|
+
Z(" 编辑 ")
|
|
2763
2763
|
])),
|
|
2764
2764
|
_: 2
|
|
2765
2765
|
}, 1032, ["onClick"]),
|
|
2766
|
-
|
|
2766
|
+
_(m, {
|
|
2767
2767
|
title: "确定删除?",
|
|
2768
|
-
onConfirm: (
|
|
2768
|
+
onConfirm: (p) => s(S.code)
|
|
2769
2769
|
}, {
|
|
2770
|
-
default:
|
|
2771
|
-
|
|
2770
|
+
default: b(() => [
|
|
2771
|
+
_(f, {
|
|
2772
2772
|
type: "link",
|
|
2773
2773
|
size: "small",
|
|
2774
2774
|
danger: ""
|
|
2775
2775
|
}, {
|
|
2776
|
-
default:
|
|
2777
|
-
|
|
2776
|
+
default: b(() => u[4] || (u[4] = [
|
|
2777
|
+
Z(" 删除 ")
|
|
2778
2778
|
])),
|
|
2779
2779
|
_: 1
|
|
2780
2780
|
})
|
|
2781
2781
|
]),
|
|
2782
2782
|
_: 2
|
|
2783
2783
|
}, 1032, ["onConfirm"]),
|
|
2784
|
-
|
|
2784
|
+
_(f, {
|
|
2785
2785
|
type: "text",
|
|
2786
2786
|
size: "small",
|
|
2787
|
-
icon:
|
|
2788
|
-
class:
|
|
2787
|
+
icon: U(y(Oe)),
|
|
2788
|
+
class: v(["table-column-draggable-icon", h.$style.dragIcon])
|
|
2789
2789
|
}, null, 8, ["icon", "class"])
|
|
2790
2790
|
]),
|
|
2791
2791
|
_: 2
|
|
@@ -2795,36 +2795,36 @@ const Aa = (a) => {
|
|
|
2795
2795
|
}, 1032, ["class"])
|
|
2796
2796
|
]),
|
|
2797
2797
|
_: 1
|
|
2798
|
-
}, 8, ["list"])) : (
|
|
2798
|
+
}, 8, ["list"])) : (k(), R(N, {
|
|
2799
2799
|
key: 1,
|
|
2800
|
-
image:
|
|
2800
|
+
image: y(En).PRESENTED_IMAGE_SIMPLE
|
|
2801
2801
|
}, null, 8, ["image"]))
|
|
2802
2802
|
], 2),
|
|
2803
|
-
a.allowCreateScene ? (
|
|
2803
|
+
a.allowCreateScene ? (k(), R(f, {
|
|
2804
2804
|
key: 0,
|
|
2805
2805
|
type: "link",
|
|
2806
|
-
icon:
|
|
2806
|
+
icon: U(y(Gt)),
|
|
2807
2807
|
onClick: d
|
|
2808
2808
|
}, {
|
|
2809
|
-
default:
|
|
2810
|
-
|
|
2809
|
+
default: b(() => u[5] || (u[5] = [
|
|
2810
|
+
Z(" 新建场景 ")
|
|
2811
2811
|
])),
|
|
2812
2812
|
_: 1
|
|
2813
|
-
}, 8, ["icon"])) :
|
|
2813
|
+
}, 8, ["icon"])) : B("", !0)
|
|
2814
2814
|
]),
|
|
2815
2815
|
_: 1
|
|
2816
2816
|
}, 8, ["open"]);
|
|
2817
2817
|
};
|
|
2818
2818
|
}
|
|
2819
|
-
}),
|
|
2820
|
-
sceneList:
|
|
2821
|
-
sceneListHead:
|
|
2822
|
-
sceneListItem:
|
|
2823
|
-
col:
|
|
2824
|
-
dragIcon:
|
|
2825
|
-
},
|
|
2826
|
-
$style:
|
|
2827
|
-
},
|
|
2819
|
+
}), mr = "_sceneList_3nrgr_1", yr = "_sceneListHead_3nrgr_5", gr = "_sceneListItem_3nrgr_8", vr = "_col_3nrgr_16", hr = "_dragIcon_3nrgr_20", br = {
|
|
2820
|
+
sceneList: mr,
|
|
2821
|
+
sceneListHead: yr,
|
|
2822
|
+
sceneListItem: gr,
|
|
2823
|
+
col: vr,
|
|
2824
|
+
dragIcon: hr
|
|
2825
|
+
}, _r = {
|
|
2826
|
+
$style: br
|
|
2827
|
+
}, Cr = /* @__PURE__ */ be(fr, [["__cssModules", _r]]), $r = /* @__PURE__ */ fe({
|
|
2828
2828
|
__name: "FormSearchParams",
|
|
2829
2829
|
props: {
|
|
2830
2830
|
/**
|
|
@@ -2841,63 +2841,168 @@ const Aa = (a) => {
|
|
|
2841
2841
|
formItemColSpan: {
|
|
2842
2842
|
type: Number,
|
|
2843
2843
|
default: 6
|
|
2844
|
+
},
|
|
2845
|
+
/** 是否启用场景,不启用场景时显示查询按钮 */
|
|
2846
|
+
enableScene: {
|
|
2847
|
+
type: Boolean,
|
|
2848
|
+
default: !0
|
|
2849
|
+
},
|
|
2850
|
+
/** 表格加载状态 */
|
|
2851
|
+
loading: {
|
|
2852
|
+
type: Boolean,
|
|
2853
|
+
default: !1
|
|
2854
|
+
},
|
|
2855
|
+
/** 是否显示展开/收起按钮 */
|
|
2856
|
+
showExpandButton: {
|
|
2857
|
+
type: Boolean,
|
|
2858
|
+
default: !1
|
|
2859
|
+
},
|
|
2860
|
+
/** 是否显示重置按钮 */
|
|
2861
|
+
showResetButton: {
|
|
2862
|
+
type: Boolean,
|
|
2863
|
+
default: !1
|
|
2864
|
+
},
|
|
2865
|
+
/** 表格唯一标识,用于区分不同表格的展开状态 */
|
|
2866
|
+
superTableID: {
|
|
2867
|
+
type: String,
|
|
2868
|
+
required: !0
|
|
2844
2869
|
}
|
|
2845
2870
|
},
|
|
2846
|
-
emits: ["form-item-change"],
|
|
2871
|
+
emits: ["form-item-change", "search", "reset"],
|
|
2847
2872
|
setup(a, { emit: e }) {
|
|
2848
|
-
const n = a, t = e,
|
|
2849
|
-
|
|
2873
|
+
const n = a, t = e, o = Un(
|
|
2874
|
+
`superTable_formSearch_expanded_${n.superTableID}`,
|
|
2875
|
+
!0
|
|
2876
|
+
), r = L(() => yt(
|
|
2877
|
+
Object.values(n.formConfigMap).filter((f) => f[Se.selected]),
|
|
2850
2878
|
Se.orderInScene
|
|
2851
|
-
)),
|
|
2852
|
-
|
|
2853
|
-
|
|
2879
|
+
)), l = L(() => {
|
|
2880
|
+
const f = [];
|
|
2881
|
+
let m = 0;
|
|
2882
|
+
for (const N of r.value) {
|
|
2883
|
+
const g = (n.formConfigMap[N.name].span ?? 1) * n.formItemColSpan;
|
|
2884
|
+
if (m + g > 24)
|
|
2885
|
+
break;
|
|
2886
|
+
f.push(N), m += g;
|
|
2887
|
+
}
|
|
2888
|
+
return f;
|
|
2889
|
+
}), s = L(() => o.value ? r.value : l.value), d = L(() => n.showExpandButton && r.value.length > l.value.length), I = L(() => {
|
|
2890
|
+
if (!(!n.enableScene || n.showResetButton || d.value)) return 0;
|
|
2891
|
+
const N = 24 - s.value.reduce((S, p) => S + (n.formConfigMap[p.name].span ?? 1) * n.formItemColSpan, 0) % 24, g = n.formItemColSpan;
|
|
2892
|
+
return N >= g ? N : 24;
|
|
2893
|
+
}), F = (f, m) => {
|
|
2894
|
+
t("form-item-change", f, m);
|
|
2895
|
+
}, h = wt(F, 500), u = (f, m) => {
|
|
2854
2896
|
[
|
|
2855
2897
|
K.input,
|
|
2856
2898
|
K.inputNumber,
|
|
2857
2899
|
K.inputGroup,
|
|
2858
2900
|
K.inputNumberRange
|
|
2859
|
-
].includes(n.formConfigMap[
|
|
2901
|
+
].includes(n.formConfigMap[f].type) ? h(f, m) : F(f, m);
|
|
2902
|
+
}, $ = () => {
|
|
2903
|
+
t("search");
|
|
2904
|
+
}, T = () => {
|
|
2905
|
+
t("reset");
|
|
2906
|
+
}, C = () => {
|
|
2907
|
+
o.value = !o.value;
|
|
2860
2908
|
};
|
|
2861
|
-
return (
|
|
2862
|
-
const
|
|
2863
|
-
return
|
|
2864
|
-
|
|
2865
|
-
class:
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2909
|
+
return (f, m) => {
|
|
2910
|
+
const N = q("a-col"), g = q("a-button"), S = q("a-row");
|
|
2911
|
+
return s.value.length ? (k(), H("div", {
|
|
2912
|
+
key: 0,
|
|
2913
|
+
class: v([
|
|
2914
|
+
f.$style.searchParamsWrapper,
|
|
2915
|
+
{
|
|
2916
|
+
[f.$style.hasActions]: !a.enableScene || a.showResetButton || d.value
|
|
2917
|
+
}
|
|
2918
|
+
])
|
|
2919
|
+
}, [
|
|
2920
|
+
_(S, {
|
|
2921
|
+
gutter: [8, 8],
|
|
2922
|
+
class: v(f.$style.searchParams)
|
|
2923
|
+
}, {
|
|
2924
|
+
default: b(() => [
|
|
2925
|
+
(k(!0), H(Pe, null, mt(s.value, (p) => (k(), R(N, {
|
|
2926
|
+
key: p.name,
|
|
2927
|
+
span: (a.formConfigMap[p.name].span ?? 1) * a.formItemColSpan
|
|
2928
|
+
}, {
|
|
2929
|
+
default: b(() => [
|
|
2930
|
+
_(nn, {
|
|
2931
|
+
value: a.formConfigMap[p.name].value,
|
|
2932
|
+
"form-item": a.formConfigMap[p.name],
|
|
2933
|
+
onChange: (E) => u(p.name, E)
|
|
2934
|
+
}, null, 8, ["value", "form-item", "onChange"])
|
|
2935
|
+
]),
|
|
2936
|
+
_: 2
|
|
2937
|
+
}, 1032, ["span"]))), 128)),
|
|
2938
|
+
!a.enableScene || a.showResetButton || d.value ? (k(), R(N, {
|
|
2939
|
+
key: 0,
|
|
2940
|
+
span: I.value,
|
|
2941
|
+
class: v(f.$style.searchActions)
|
|
2942
|
+
}, {
|
|
2943
|
+
default: b(() => [
|
|
2944
|
+
Y("div", {
|
|
2945
|
+
class: v(f.$style.searchActionsWrapper)
|
|
2946
|
+
}, [
|
|
2947
|
+
!a.enableScene && a.showResetButton ? (k(), R(g, {
|
|
2948
|
+
key: 0,
|
|
2949
|
+
onClick: T
|
|
2950
|
+
}, {
|
|
2951
|
+
default: b(() => m[0] || (m[0] = [
|
|
2952
|
+
Z(" 重置 ")
|
|
2953
|
+
])),
|
|
2954
|
+
_: 1
|
|
2955
|
+
})) : B("", !0),
|
|
2956
|
+
a.enableScene ? B("", !0) : (k(), R(g, {
|
|
2957
|
+
key: 1,
|
|
2958
|
+
type: "primary",
|
|
2959
|
+
loading: a.loading,
|
|
2960
|
+
onClick: $
|
|
2961
|
+
}, {
|
|
2962
|
+
default: b(() => m[1] || (m[1] = [
|
|
2963
|
+
Z(" 查询 ")
|
|
2964
|
+
])),
|
|
2965
|
+
_: 1
|
|
2966
|
+
}, 8, ["loading"])),
|
|
2967
|
+
d.value ? (k(), R(g, {
|
|
2968
|
+
key: 2,
|
|
2969
|
+
type: "link",
|
|
2970
|
+
icon: y(o) ? U(y(Nn)) : U(y(Ut)),
|
|
2971
|
+
onClick: C
|
|
2972
|
+
}, {
|
|
2973
|
+
default: b(() => [
|
|
2974
|
+
Z(he(y(o) ? "收起" : "展开"), 1)
|
|
2975
|
+
]),
|
|
2976
|
+
_: 1
|
|
2977
|
+
}, 8, ["icon"])) : B("", !0)
|
|
2978
|
+
], 2)
|
|
2979
|
+
]),
|
|
2980
|
+
_: 1
|
|
2981
|
+
}, 8, ["span", "class"])) : B("", !0)
|
|
2982
|
+
]),
|
|
2983
|
+
_: 1
|
|
2984
|
+
}, 8, ["class"])
|
|
2985
|
+
], 2)) : B("", !0);
|
|
2884
2986
|
};
|
|
2885
2987
|
}
|
|
2886
|
-
}),
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2988
|
+
}), wr = "_searchParamsWrapper_mo3ie_1", Sr = "_hasActions_mo3ie_6", Ir = "_searchParams_mo3ie_1", kr = "_searchActionsWrapper_mo3ie_14", Fr = {
|
|
2989
|
+
searchParamsWrapper: wr,
|
|
2990
|
+
hasActions: Sr,
|
|
2991
|
+
searchParams: Ir,
|
|
2992
|
+
searchActionsWrapper: kr
|
|
2993
|
+
}, xr = {
|
|
2994
|
+
$style: Fr
|
|
2995
|
+
}, Tr = /* @__PURE__ */ be($r, [["__cssModules", xr]]);
|
|
2996
|
+
ze.locale("zh-cn");
|
|
2997
|
+
function Vt(a) {
|
|
2893
2998
|
return Array.from(document.body.children).includes(a);
|
|
2894
2999
|
}
|
|
2895
|
-
class
|
|
3000
|
+
class Pr {
|
|
2896
3001
|
constructor(e = {}) {
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
3002
|
+
Me(this, "currents");
|
|
3003
|
+
Me(this, "dialogs");
|
|
3004
|
+
Me(this, "staticDialogs");
|
|
3005
|
+
Me(this, "rootVm");
|
|
2901
3006
|
this.currents = [], this.dialogs = {}, this.staticDialogs = e, this.rootVm = null;
|
|
2902
3007
|
}
|
|
2903
3008
|
// 设置rootVm
|
|
@@ -2906,7 +3011,7 @@ class So {
|
|
|
2906
3011
|
}
|
|
2907
3012
|
// 注册dialog
|
|
2908
3013
|
register(e, n) {
|
|
2909
|
-
this.dialogs[e] || (this.dialogs[e] =
|
|
3014
|
+
this.dialogs[e] || (this.dialogs[e] = fe(n));
|
|
2910
3015
|
}
|
|
2911
3016
|
// 注销dialog
|
|
2912
3017
|
unregister(e) {
|
|
@@ -2914,46 +3019,46 @@ class So {
|
|
|
2914
3019
|
}
|
|
2915
3020
|
// 打开dialog
|
|
2916
3021
|
open(e, n) {
|
|
2917
|
-
const { props: t, onCreated:
|
|
2918
|
-
if (!
|
|
3022
|
+
const { props: t, onCreated: o, onMounted: r } = n || {}, l = this.staticDialogs[e] || this.dialogs[e] || null;
|
|
3023
|
+
if (!l) {
|
|
2919
3024
|
console.error(`Dialog "${e}" is not existing, please register it firstly.`);
|
|
2920
3025
|
return;
|
|
2921
3026
|
}
|
|
2922
|
-
const
|
|
2923
|
-
|
|
2924
|
-
const
|
|
3027
|
+
const s = document.createElement("div"), d = `dialog_${Wn()}`;
|
|
3028
|
+
s.setAttribute("id", d), document.body.appendChild(s);
|
|
3029
|
+
const I = vn({
|
|
2925
3030
|
data() {
|
|
2926
3031
|
return {
|
|
2927
3032
|
open: !0
|
|
2928
3033
|
};
|
|
2929
3034
|
},
|
|
2930
3035
|
render() {
|
|
2931
|
-
return
|
|
2932
|
-
|
|
3036
|
+
return U(
|
|
3037
|
+
Ln,
|
|
2933
3038
|
{
|
|
2934
3039
|
key: d,
|
|
2935
|
-
locale:
|
|
3040
|
+
locale: Kt
|
|
2936
3041
|
},
|
|
2937
3042
|
() => [
|
|
2938
|
-
|
|
3043
|
+
U(l, {
|
|
2939
3044
|
key: d,
|
|
2940
3045
|
destroyOnClose: !0,
|
|
2941
3046
|
...t,
|
|
2942
3047
|
open: this.open,
|
|
2943
3048
|
onCancel: () => {
|
|
2944
|
-
var
|
|
2945
|
-
this.open = !1, (
|
|
3049
|
+
var h;
|
|
3050
|
+
this.open = !1, (h = t == null ? void 0 : t.onCancel) == null || h.call(t);
|
|
2946
3051
|
}
|
|
2947
3052
|
})
|
|
2948
3053
|
]
|
|
2949
3054
|
);
|
|
2950
3055
|
}
|
|
2951
|
-
}).use(
|
|
2952
|
-
|
|
2953
|
-
const
|
|
2954
|
-
return
|
|
2955
|
-
|
|
2956
|
-
}), this.currents.push(
|
|
3056
|
+
}).use(In);
|
|
3057
|
+
o == null || o(I);
|
|
3058
|
+
const F = I.mount(`#${d}`);
|
|
3059
|
+
return r == null || r(F), F.$watch("open", (h) => {
|
|
3060
|
+
h || this.destroy();
|
|
3061
|
+
}), this.currents.push(I), I;
|
|
2957
3062
|
}
|
|
2958
3063
|
// 关闭dialog
|
|
2959
3064
|
close() {
|
|
@@ -2963,70 +3068,70 @@ class So {
|
|
|
2963
3068
|
}
|
|
2964
3069
|
// 销毁dialog
|
|
2965
3070
|
destroy() {
|
|
2966
|
-
var n, t,
|
|
3071
|
+
var n, t, o;
|
|
2967
3072
|
const e = this.currents.pop();
|
|
2968
3073
|
if (e) {
|
|
2969
|
-
const
|
|
2970
|
-
|
|
3074
|
+
const r = Vt((n = e._instance) == null ? void 0 : n.vnode.el) ? (t = e._instance) == null ? void 0 : t.vnode.el : (o = e._instance) == null ? void 0 : o.vnode.el.parentElement;
|
|
3075
|
+
Vt(r) && document.body.removeChild(r), e.unmount();
|
|
2971
3076
|
}
|
|
2972
3077
|
}
|
|
2973
3078
|
}
|
|
2974
|
-
const
|
|
2975
|
-
function
|
|
3079
|
+
const Be = new Pr();
|
|
3080
|
+
function zt(a, e) {
|
|
2976
3081
|
const n = Symbol("dialog");
|
|
2977
|
-
|
|
3082
|
+
Be.register(n, a);
|
|
2978
3083
|
function t() {
|
|
2979
|
-
|
|
3084
|
+
Be.open(n, y(e));
|
|
2980
3085
|
}
|
|
2981
|
-
function
|
|
2982
|
-
|
|
3086
|
+
function o() {
|
|
3087
|
+
Be.close();
|
|
2983
3088
|
}
|
|
2984
|
-
function
|
|
2985
|
-
|
|
3089
|
+
function r(l) {
|
|
3090
|
+
Be.open(n, l);
|
|
2986
3091
|
}
|
|
2987
|
-
return
|
|
2988
|
-
|
|
3092
|
+
return hn(() => {
|
|
3093
|
+
Be.unregister(n);
|
|
2989
3094
|
}), {
|
|
2990
3095
|
open: t,
|
|
2991
|
-
close:
|
|
2992
|
-
openByConfig:
|
|
3096
|
+
close: o,
|
|
3097
|
+
openByConfig: r
|
|
2993
3098
|
};
|
|
2994
3099
|
}
|
|
2995
|
-
const
|
|
3100
|
+
const Je = 2e3, Or = (a) => {
|
|
2996
3101
|
const { getScenes: e, setScenes: n } = a;
|
|
2997
3102
|
return {
|
|
2998
3103
|
querySceneList: async (t) => {
|
|
2999
|
-
const
|
|
3104
|
+
const o = e(), r = t.type ? o.filter((l) => l.type === t.type) : o;
|
|
3000
3105
|
return {
|
|
3001
|
-
code:
|
|
3002
|
-
data:
|
|
3106
|
+
code: Je,
|
|
3107
|
+
data: r,
|
|
3003
3108
|
msg: "success"
|
|
3004
3109
|
};
|
|
3005
3110
|
},
|
|
3006
3111
|
createScene: async (t) => {
|
|
3007
|
-
const
|
|
3008
|
-
return
|
|
3009
|
-
code:
|
|
3010
|
-
data:
|
|
3112
|
+
const o = e(), r = tn(Math.random().toString());
|
|
3113
|
+
return o.push({ ...t, code: r }), n(o), {
|
|
3114
|
+
code: Je,
|
|
3115
|
+
data: r,
|
|
3011
3116
|
msg: "success"
|
|
3012
3117
|
};
|
|
3013
3118
|
},
|
|
3014
3119
|
updateScene: async (t) => {
|
|
3015
|
-
const
|
|
3016
|
-
return
|
|
3120
|
+
const o = e(), r = o.findIndex((l) => l.code === t.code);
|
|
3121
|
+
return r === -1 ? {
|
|
3017
3122
|
code: 404,
|
|
3018
3123
|
data: null,
|
|
3019
3124
|
msg: "Scene not found"
|
|
3020
|
-
} : (r
|
|
3021
|
-
code:
|
|
3022
|
-
data: r
|
|
3125
|
+
} : (o[r] = { ...o[r], ...t }, n(o), {
|
|
3126
|
+
code: Je,
|
|
3127
|
+
data: o[r],
|
|
3023
3128
|
msg: "success"
|
|
3024
3129
|
});
|
|
3025
3130
|
},
|
|
3026
3131
|
deleteScene: async (t) => {
|
|
3027
|
-
const
|
|
3028
|
-
return n(
|
|
3029
|
-
code:
|
|
3132
|
+
const r = e().filter((l) => !t.includes(l.code));
|
|
3133
|
+
return n(r), {
|
|
3134
|
+
code: Je,
|
|
3030
3135
|
data: null,
|
|
3031
3136
|
msg: "success"
|
|
3032
3137
|
};
|
|
@@ -3044,7 +3149,7 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3044
3149
|
updateScene: async () => a,
|
|
3045
3150
|
deleteScene: async () => a
|
|
3046
3151
|
};
|
|
3047
|
-
},
|
|
3152
|
+
}, Ar = ["innerHTML"], qr = /* @__PURE__ */ fe({
|
|
3048
3153
|
__name: "SuperTable",
|
|
3049
3154
|
props: {
|
|
3050
3155
|
/**
|
|
@@ -3115,6 +3220,11 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3115
3220
|
type: Object,
|
|
3116
3221
|
default: () => ({})
|
|
3117
3222
|
},
|
|
3223
|
+
/** 表格容器样式 */
|
|
3224
|
+
tableWrapperStyle: {
|
|
3225
|
+
type: Object,
|
|
3226
|
+
default: () => ({})
|
|
3227
|
+
},
|
|
3118
3228
|
/** 默认设置的查询条件,适用于url内带查询参数的场景,格式 { [name: string]: value } */
|
|
3119
3229
|
customQueryParams: {
|
|
3120
3230
|
type: Object,
|
|
@@ -3130,6 +3240,24 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3130
3240
|
type: Boolean,
|
|
3131
3241
|
default: !0
|
|
3132
3242
|
},
|
|
3243
|
+
/**
|
|
3244
|
+
* 是否显示展开/收起按钮
|
|
3245
|
+
* 默认 false,可通过开关控制,不受 enableScene 影响
|
|
3246
|
+
* @type {boolean}
|
|
3247
|
+
*/
|
|
3248
|
+
showExpandButton: {
|
|
3249
|
+
type: Boolean,
|
|
3250
|
+
default: !1
|
|
3251
|
+
},
|
|
3252
|
+
/**
|
|
3253
|
+
* 是否显示重置按钮
|
|
3254
|
+
* 默认 false,当 enableScene 为 false 时,如果未显式设置则自动显示
|
|
3255
|
+
* @type {boolean | undefined}
|
|
3256
|
+
*/
|
|
3257
|
+
showResetButton: {
|
|
3258
|
+
type: Boolean,
|
|
3259
|
+
default: void 0
|
|
3260
|
+
},
|
|
3133
3261
|
/** 默认场景 */
|
|
3134
3262
|
defaultScene: {
|
|
3135
3263
|
type: [Object, Array],
|
|
@@ -3153,72 +3281,72 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3153
3281
|
},
|
|
3154
3282
|
emits: ["sort-change", "row-sort-end", "form-item-change", "scene-change"],
|
|
3155
3283
|
setup(a, { expose: e, emit: n }) {
|
|
3156
|
-
var
|
|
3157
|
-
|
|
3158
|
-
const t = a,
|
|
3159
|
-
var c,
|
|
3160
|
-
const i = (c =
|
|
3161
|
-
return !!((O = (
|
|
3162
|
-
}),
|
|
3284
|
+
var It;
|
|
3285
|
+
ze.locale("zh-cn");
|
|
3286
|
+
const t = a, o = n, r = ne(!1), l = L(() => {
|
|
3287
|
+
var c, w, O;
|
|
3288
|
+
const i = (c = bn()) == null ? void 0 : c.appContext.app;
|
|
3289
|
+
return !!((O = (w = i == null ? void 0 : i.config) == null ? void 0 : w.globalProperties) != null && O.$router);
|
|
3290
|
+
}), s = ne(), { openByConfig: d } = zt(pr), { openByConfig: I } = zt(Cr), F = Dt(t.columns).reduce(
|
|
3163
3291
|
(i, c) => (i[c.key] = Fe(c, vt), i),
|
|
3164
3292
|
{}
|
|
3165
|
-
),
|
|
3293
|
+
), h = tn([location.hostname, location.pathname, t.sceneType].join("")), u = Gn(`superTable_${h}`, {
|
|
3166
3294
|
pathname: location.pathname,
|
|
3167
3295
|
sceneCode: null,
|
|
3168
3296
|
sceneSort: [],
|
|
3169
3297
|
sceneList: [],
|
|
3170
|
-
columnConfig:
|
|
3171
|
-
}),
|
|
3298
|
+
columnConfig: F
|
|
3299
|
+
}), $ = L(() => t.enableScene ? t.sceneStorageType === "api" ? t.sceneRequest ? t.sceneRequest : (console.error('SuperTable: sceneStorageType 为 "api" 时,必须提供 sceneRequest 配置'), Yt()) : Or({
|
|
3172
3300
|
getScenes: () => u.value.sceneList,
|
|
3173
3301
|
setScenes: (i) => {
|
|
3174
3302
|
u.value.sceneList = i;
|
|
3175
3303
|
}
|
|
3176
|
-
}) : Yt()), T =
|
|
3304
|
+
}) : Yt()), T = ne(!1), C = L(() => Object.keys(t.customQueryParams).length > 0), f = ne(!1), m = wt(async () => {
|
|
3177
3305
|
try {
|
|
3178
|
-
|
|
3306
|
+
D.loading = !0;
|
|
3179
3307
|
const { total: i, data: c } = await t.request({
|
|
3180
3308
|
params: St(),
|
|
3181
|
-
pageSize:
|
|
3182
|
-
pageNum:
|
|
3309
|
+
pageSize: D.pagination.pageSize,
|
|
3310
|
+
pageNum: D.pagination.current
|
|
3183
3311
|
});
|
|
3184
|
-
|
|
3312
|
+
D.dataSource = c, D.pagination.total = i;
|
|
3185
3313
|
} catch (i) {
|
|
3186
|
-
|
|
3314
|
+
D.dataSource = [], console.error(i);
|
|
3187
3315
|
} finally {
|
|
3188
|
-
|
|
3316
|
+
D.loading = !1;
|
|
3189
3317
|
}
|
|
3190
|
-
}, t.debounceWait),
|
|
3191
|
-
t.enableScene && !
|
|
3192
|
-
},
|
|
3193
|
-
for (const c in
|
|
3194
|
-
const
|
|
3195
|
-
|
|
3318
|
+
}, t.debounceWait), N = () => {
|
|
3319
|
+
t.enableScene && !p.loaded || (D.pagination.current = 1, m());
|
|
3320
|
+
}, g = ne({}), S = (i = []) => {
|
|
3321
|
+
for (const c in g.value) {
|
|
3322
|
+
const w = g.value[c], O = i.find((A) => A.name === c);
|
|
3323
|
+
w.value = O ? O.value : w._defaultValue, w[Se.selected] = !!O, w[Se.orderInScene] = O ? i.findIndex((A) => A.name === (O == null ? void 0 : O.name)) : void 0;
|
|
3196
3324
|
}
|
|
3197
|
-
|
|
3198
|
-
},
|
|
3325
|
+
N();
|
|
3326
|
+
}, p = et({
|
|
3199
3327
|
list: [],
|
|
3200
3328
|
loading: !1,
|
|
3201
3329
|
submiting: !1,
|
|
3202
3330
|
loaded: !1
|
|
3203
|
-
}),
|
|
3331
|
+
}), E = L(() => Ee(ge(t.defaultScene)).filter(Boolean).map(({ name: c = "默认场景", code: w = "default_scene", items: O }) => ({
|
|
3204
3332
|
name: c,
|
|
3205
|
-
code:
|
|
3333
|
+
code: w,
|
|
3206
3334
|
isCustom: !0,
|
|
3207
|
-
items: O.filter((
|
|
3335
|
+
items: O.filter((A) => !!g.value[A.name]).map((A) => {
|
|
3208
3336
|
var z;
|
|
3209
3337
|
return {
|
|
3210
|
-
name:
|
|
3211
|
-
value:
|
|
3212
|
-
type: (z =
|
|
3338
|
+
name: A.name,
|
|
3339
|
+
value: A.value ?? g.value[A.name]._defaultValue,
|
|
3340
|
+
type: (z = g.value[A.name]) == null ? void 0 : z.type
|
|
3213
3341
|
};
|
|
3214
3342
|
})
|
|
3215
3343
|
})));
|
|
3216
|
-
|
|
3344
|
+
Ie(
|
|
3217
3345
|
() => t.formItems,
|
|
3218
3346
|
() => {
|
|
3219
|
-
|
|
3347
|
+
Rt(ge(t.formItems)).forEach((i) => {
|
|
3220
3348
|
const c = { ...i };
|
|
3221
|
-
c.component && (c.component =
|
|
3349
|
+
c.component && (c.component = _n(c.component)), g.value[i.name] = Hn(ge(g.value[i.name]) ?? {}, c);
|
|
3222
3350
|
});
|
|
3223
3351
|
},
|
|
3224
3352
|
{
|
|
@@ -3226,78 +3354,78 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3226
3354
|
deep: !0
|
|
3227
3355
|
}
|
|
3228
3356
|
);
|
|
3229
|
-
const
|
|
3357
|
+
const W = async () => {
|
|
3230
3358
|
try {
|
|
3231
|
-
|
|
3232
|
-
const { code: i, data: c = [], msg:
|
|
3359
|
+
p.loading = !0;
|
|
3360
|
+
const { code: i, data: c = [], msg: w } = await $.value.querySceneList({ type: h });
|
|
3233
3361
|
if (i === 2e3) {
|
|
3234
|
-
const O =
|
|
3235
|
-
|
|
3236
|
-
const
|
|
3237
|
-
if (!
|
|
3238
|
-
u.value.sceneCode = null,
|
|
3239
|
-
const z = Object.entries(t.customQueryParams).map(([
|
|
3240
|
-
var
|
|
3362
|
+
const O = p.list.find((z) => z.code === u.value.sceneCode);
|
|
3363
|
+
p.list = Ea(c, g.value, u.value.sceneSort);
|
|
3364
|
+
const A = p.list.find((z) => z.code === u.value.sceneCode);
|
|
3365
|
+
if (!p.loaded && C.value) {
|
|
3366
|
+
u.value.sceneCode = null, p.loaded = !0;
|
|
3367
|
+
const z = Object.entries(t.customQueryParams).map(([$e, it]) => {
|
|
3368
|
+
var Ue;
|
|
3241
3369
|
return {
|
|
3242
|
-
name:
|
|
3243
|
-
value:
|
|
3244
|
-
type: (
|
|
3370
|
+
name: $e,
|
|
3371
|
+
value: it,
|
|
3372
|
+
type: (Ue = g.value[$e]) == null ? void 0 : Ue.type
|
|
3245
3373
|
};
|
|
3246
3374
|
});
|
|
3247
|
-
|
|
3375
|
+
S(z);
|
|
3248
3376
|
return;
|
|
3249
3377
|
}
|
|
3250
|
-
(!
|
|
3378
|
+
(!p.loaded || O && O.value !== (A == null ? void 0 : A.value)) && S(A == null ? void 0 : A.items), p.loaded = !0;
|
|
3251
3379
|
} else
|
|
3252
|
-
dt.error(
|
|
3380
|
+
dt.error(w);
|
|
3253
3381
|
} finally {
|
|
3254
|
-
|
|
3382
|
+
p.loading = !1;
|
|
3255
3383
|
}
|
|
3256
|
-
},
|
|
3384
|
+
}, J = ({ code: i, msg: c }) => i === 2e3 ? (dt.success("操作成功"), W(), Promise.resolve(c)) : (dt.error(c), Promise.reject(c)), _e = async ({ name: i, items: c }) => {
|
|
3257
3385
|
try {
|
|
3258
|
-
const
|
|
3259
|
-
type:
|
|
3386
|
+
const w = await $.value.createScene({
|
|
3387
|
+
type: h,
|
|
3260
3388
|
name: i,
|
|
3261
3389
|
value: JSON.stringify(c),
|
|
3262
3390
|
asPrivate: !0
|
|
3263
3391
|
});
|
|
3264
|
-
u.value.sceneCode =
|
|
3265
|
-
} catch (
|
|
3266
|
-
return Promise.reject(
|
|
3392
|
+
u.value.sceneCode = w == null ? void 0 : w.data, J(w);
|
|
3393
|
+
} catch (w) {
|
|
3394
|
+
return Promise.reject(w);
|
|
3267
3395
|
}
|
|
3268
3396
|
}, me = async (i) => {
|
|
3269
3397
|
try {
|
|
3270
|
-
const c = await
|
|
3398
|
+
const c = await $.value.updateScene({
|
|
3271
3399
|
code: i.code,
|
|
3272
3400
|
name: i.name,
|
|
3273
3401
|
value: JSON.stringify(i.items)
|
|
3274
3402
|
});
|
|
3275
|
-
return
|
|
3403
|
+
return J(c);
|
|
3276
3404
|
} catch (c) {
|
|
3277
3405
|
return Promise.reject(c);
|
|
3278
3406
|
}
|
|
3279
3407
|
}, ie = async (i) => {
|
|
3280
3408
|
try {
|
|
3281
|
-
const c = await
|
|
3282
|
-
c.code === 2e3 && (u.value.sceneCode = null, i === u.value.sceneCode && (
|
|
3409
|
+
const c = await $.value.deleteScene([i]);
|
|
3410
|
+
c.code === 2e3 && (u.value.sceneCode = null, i === u.value.sceneCode && (S([]), u.value.sceneCode = void 0)), J(c);
|
|
3283
3411
|
} catch (c) {
|
|
3284
3412
|
return Promise.reject(c);
|
|
3285
3413
|
}
|
|
3286
|
-
},
|
|
3287
|
-
|
|
3288
|
-
() => [u.value.sceneCode,
|
|
3414
|
+
}, re = L(() => p.list.length < t.maxSceneCount);
|
|
3415
|
+
Ie(
|
|
3416
|
+
() => [u.value.sceneCode, p.list],
|
|
3289
3417
|
() => {
|
|
3290
|
-
if (
|
|
3291
|
-
|
|
3418
|
+
if (C.value && !f.value) {
|
|
3419
|
+
f.value = !0;
|
|
3292
3420
|
return;
|
|
3293
3421
|
}
|
|
3294
|
-
const i = [...
|
|
3422
|
+
const i = [...E.value, ...p.list].find(
|
|
3295
3423
|
(c) => c.code === u.value.sceneCode
|
|
3296
3424
|
);
|
|
3297
|
-
|
|
3425
|
+
S((i == null ? void 0 : i.items) ?? []);
|
|
3298
3426
|
}
|
|
3299
3427
|
);
|
|
3300
|
-
const se =
|
|
3428
|
+
const se = L(() => `super_table_row_${h}`), j = Cn(), D = et({
|
|
3301
3429
|
...t.tableProps,
|
|
3302
3430
|
dataSource: [],
|
|
3303
3431
|
columns: [],
|
|
@@ -3310,14 +3438,14 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3310
3438
|
showQuickJumper: !0,
|
|
3311
3439
|
showSizeChanger: !0,
|
|
3312
3440
|
showTotal: (i) => `共${i}条数据`,
|
|
3313
|
-
...
|
|
3441
|
+
...tt(t.tableProps, "pagination", {}),
|
|
3314
3442
|
onShowSizeChange: (i, c) => {
|
|
3315
|
-
var
|
|
3316
|
-
((
|
|
3443
|
+
var w, O, A, z;
|
|
3444
|
+
((w = t.tableProps) == null ? void 0 : w.pagination) !== !1 && ((z = (A = (O = t.tableProps) == null ? void 0 : O.pagination) == null ? void 0 : A.onShowSizeChange) == null || z.call(A, 1, c));
|
|
3317
3445
|
},
|
|
3318
3446
|
onChange: (i, c) => {
|
|
3319
|
-
var
|
|
3320
|
-
|
|
3447
|
+
var w, O, A, z;
|
|
3448
|
+
D.pagination.current = c !== D.pagination.pageSize ? 1 : i, D.pagination.pageSize = c, ((w = t.tableProps) == null ? void 0 : w.pagination) !== !1 && ((z = (A = (O = t.tableProps) == null ? void 0 : O.pagination) == null ? void 0 : A.onChange) == null || z.call(A, i, c)), m();
|
|
3321
3449
|
}
|
|
3322
3450
|
},
|
|
3323
3451
|
tableLayout: "fixed",
|
|
@@ -3325,41 +3453,47 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3325
3453
|
x: "100%",
|
|
3326
3454
|
y: Math.max(500, window.innerWidth * 0.8),
|
|
3327
3455
|
scrollToFirstRowOnChange: !0,
|
|
3328
|
-
...((
|
|
3456
|
+
...((It = t.tableProps) == null ? void 0 : It.scroll) ?? {}
|
|
3329
3457
|
},
|
|
3330
|
-
rowClassName: (i, c,
|
|
3458
|
+
rowClassName: (i, c, w) => {
|
|
3331
3459
|
var z;
|
|
3332
3460
|
let O = "";
|
|
3333
|
-
const
|
|
3334
|
-
return
|
|
3461
|
+
const A = (z = t.tableProps) == null ? void 0 : z.rowClassName;
|
|
3462
|
+
return ke(A) ? O = A(i, c, w) : typeof A == "string" && (O = A), [O, se.value].join(" ");
|
|
3335
3463
|
}
|
|
3336
|
-
}),
|
|
3464
|
+
}), at = L(() => {
|
|
3337
3465
|
try {
|
|
3338
|
-
return t.formatDataSource(ge(
|
|
3466
|
+
return t.formatDataSource(ge(D.dataSource));
|
|
3339
3467
|
} catch {
|
|
3340
|
-
return ge(
|
|
3468
|
+
return ge(D.dataSource);
|
|
3341
3469
|
}
|
|
3342
|
-
}),
|
|
3343
|
-
const c =
|
|
3470
|
+
}), We = (i) => {
|
|
3471
|
+
const c = D.rowKey;
|
|
3472
|
+
if (typeof c == "string")
|
|
3473
|
+
return i == null ? void 0 : i[c];
|
|
3474
|
+
if (typeof c == "function")
|
|
3475
|
+
return c(i);
|
|
3476
|
+
}, Ae = L(() => Dt(t.columns).map((i) => {
|
|
3477
|
+
const c = u.value.columnConfig[i.key], w = { ...i };
|
|
3344
3478
|
return vt.forEach((O) => {
|
|
3345
|
-
O !== "key" && (c == null ? void 0 : c[O]) !== void 0 && (
|
|
3346
|
-
}),
|
|
3347
|
-
})),
|
|
3479
|
+
O !== "key" && (c == null ? void 0 : c[O]) !== void 0 && (w[O] = c[O]);
|
|
3480
|
+
}), w;
|
|
3481
|
+
})), P = (i, c) => {
|
|
3348
3482
|
u.value.columnConfig[c.key] = {
|
|
3349
3483
|
...u.value.columnConfig[c.key] ?? {},
|
|
3350
3484
|
width: i
|
|
3351
3485
|
};
|
|
3352
|
-
},
|
|
3486
|
+
}, x = (i) => {
|
|
3353
3487
|
i.length === 0 ? u.value.columnConfig = {} : u.value.columnConfig = i.reduce(
|
|
3354
|
-
(c,
|
|
3355
|
-
...
|
|
3488
|
+
(c, w, O) => (c[w.key] = {
|
|
3489
|
+
...w,
|
|
3356
3490
|
index: O
|
|
3357
3491
|
}, c),
|
|
3358
3492
|
{}
|
|
3359
3493
|
);
|
|
3360
3494
|
};
|
|
3361
|
-
|
|
3362
|
-
() => [
|
|
3495
|
+
Ie(
|
|
3496
|
+
() => [Ae.value, t.sortable],
|
|
3363
3497
|
() => {
|
|
3364
3498
|
const i = {
|
|
3365
3499
|
key: G.sort,
|
|
@@ -3367,12 +3501,12 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3367
3501
|
title: "",
|
|
3368
3502
|
fixed: "left",
|
|
3369
3503
|
width: 60
|
|
3370
|
-
}, c =
|
|
3371
|
-
|
|
3504
|
+
}, c = Ae.value.filter(({ visible: z }) => z), w = c.filter((z) => z.fixed === "left").sort((z, $e) => z.index - $e.index), O = c.filter((z) => !z.fixed).sort((z, $e) => z.index - $e.index), A = c.filter((z) => z.fixed === "right").sort((z, $e) => z.index - $e.index);
|
|
3505
|
+
D.columns = [
|
|
3372
3506
|
...t.sortable ? [i] : [],
|
|
3373
|
-
...
|
|
3507
|
+
...w,
|
|
3374
3508
|
...O,
|
|
3375
|
-
...
|
|
3509
|
+
...A
|
|
3376
3510
|
];
|
|
3377
3511
|
},
|
|
3378
3512
|
{
|
|
@@ -3380,428 +3514,454 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3380
3514
|
immediate: !0
|
|
3381
3515
|
}
|
|
3382
3516
|
);
|
|
3383
|
-
const
|
|
3517
|
+
const M = () => new Promise((i) => {
|
|
3384
3518
|
const c = () => {
|
|
3385
|
-
var O,
|
|
3386
|
-
const
|
|
3387
|
-
if (
|
|
3388
|
-
i(
|
|
3519
|
+
var O, A;
|
|
3520
|
+
const w = (A = (O = j.value) == null ? void 0 : O.$el) == null ? void 0 : A.querySelector(".ant-table-tbody");
|
|
3521
|
+
if (w) {
|
|
3522
|
+
i(w);
|
|
3389
3523
|
return;
|
|
3390
3524
|
}
|
|
3391
3525
|
requestAnimationFrame(c);
|
|
3392
3526
|
};
|
|
3393
3527
|
c();
|
|
3394
|
-
}),
|
|
3395
|
-
const i = await
|
|
3396
|
-
i && new
|
|
3528
|
+
}), X = async () => {
|
|
3529
|
+
const i = await M();
|
|
3530
|
+
i && new Qn(i, {
|
|
3397
3531
|
animation: 150,
|
|
3398
3532
|
handle: ".super-table-column-draggable-handle",
|
|
3399
3533
|
setData: (c) => {
|
|
3400
|
-
const
|
|
3401
|
-
|
|
3534
|
+
const w = new Image();
|
|
3535
|
+
w.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", c.setDragImage(w, 0, 0);
|
|
3402
3536
|
},
|
|
3403
3537
|
onEnd: (c) => {
|
|
3404
|
-
const { oldIndex:
|
|
3405
|
-
if (
|
|
3406
|
-
const
|
|
3407
|
-
|
|
3538
|
+
const { oldIndex: w, newIndex: O } = c;
|
|
3539
|
+
if (w === void 0 || O === void 0) return;
|
|
3540
|
+
const A = ge(D.dataSource), [z] = A.splice(w, 1);
|
|
3541
|
+
A.splice(O, 0, z), o("row-sort-end", A);
|
|
3408
3542
|
}
|
|
3409
3543
|
});
|
|
3410
|
-
},
|
|
3411
|
-
|
|
3412
|
-
},
|
|
3544
|
+
}, le = (i, c) => {
|
|
3545
|
+
g.value[i].value = c, o("form-item-change", i, c, ge(g.value[i]), st, lt), g.value[i].quiet !== !0 && t.enableScene && N();
|
|
3546
|
+
}, ye = () => {
|
|
3547
|
+
for (const i in g.value)
|
|
3548
|
+
g.value[i].value = g.value[i]._defaultValue;
|
|
3549
|
+
N();
|
|
3550
|
+
}, qe = (i, c) => {
|
|
3413
3551
|
T.value = !1;
|
|
3414
|
-
let
|
|
3415
|
-
i === de.create && (
|
|
3552
|
+
let w = ge(g.value);
|
|
3553
|
+
i === de.create && (w = Rt(t.formItems).reduce((O, A) => (O[A.name] = A, O), {})), d({
|
|
3416
3554
|
props: {
|
|
3417
|
-
ref:
|
|
3555
|
+
ref: s,
|
|
3418
3556
|
currentScene: c,
|
|
3419
3557
|
actionType: i,
|
|
3420
|
-
formConfigMap:
|
|
3421
|
-
onCreate:
|
|
3558
|
+
formConfigMap: w,
|
|
3559
|
+
onCreate: _e,
|
|
3422
3560
|
onUpdate: me,
|
|
3423
3561
|
onUpdateFormConfig: (O) => {
|
|
3424
|
-
O.forEach((
|
|
3425
|
-
|
|
3562
|
+
O.forEach((A) => {
|
|
3563
|
+
Ve(g.value, A.name, A);
|
|
3426
3564
|
});
|
|
3427
3565
|
},
|
|
3428
3566
|
onSearch: (O) => {
|
|
3429
|
-
|
|
3567
|
+
S(O);
|
|
3430
3568
|
},
|
|
3431
|
-
onFormItemChange(O,
|
|
3432
|
-
|
|
3569
|
+
onFormItemChange(O, A) {
|
|
3570
|
+
o("form-item-change", O, A, ge(g.value[O]), st, lt);
|
|
3433
3571
|
},
|
|
3434
3572
|
onCancel() {
|
|
3435
|
-
|
|
3573
|
+
s.value = void 0;
|
|
3436
3574
|
}
|
|
3437
3575
|
}
|
|
3438
3576
|
});
|
|
3439
|
-
},
|
|
3440
|
-
T.value = !1,
|
|
3577
|
+
}, ot = () => {
|
|
3578
|
+
T.value = !1, I({
|
|
3441
3579
|
props: {
|
|
3442
|
-
list:
|
|
3443
|
-
allowCreateScene:
|
|
3444
|
-
onCreate: () =>
|
|
3445
|
-
onUpdate: (i) =>
|
|
3580
|
+
list: p.list,
|
|
3581
|
+
allowCreateScene: y(re),
|
|
3582
|
+
onCreate: () => qe(de.create),
|
|
3583
|
+
onUpdate: (i) => qe(de.update, i),
|
|
3446
3584
|
onDelete: (i) => ie(i),
|
|
3447
3585
|
onSort: (i) => {
|
|
3448
|
-
u.value.sceneSort = i,
|
|
3586
|
+
u.value.sceneSort = i, p.list = p.list.sort((c, w) => i.indexOf(c.code) - i.indexOf(w.code));
|
|
3449
3587
|
}
|
|
3450
3588
|
}
|
|
3451
3589
|
});
|
|
3452
|
-
},
|
|
3453
|
-
await
|
|
3454
|
-
const c =
|
|
3455
|
-
|
|
3456
|
-
},
|
|
3457
|
-
|
|
3458
|
-
}, Ge = (i) => b.value[i], J = (i, c, S) => {
|
|
3459
|
-
if (Kt.includes(c))
|
|
3590
|
+
}, rt = async (i) => {
|
|
3591
|
+
await Sn();
|
|
3592
|
+
const c = p.list.find((w) => w.code === i);
|
|
3593
|
+
o("scene-change", c);
|
|
3594
|
+
}, Q = (i) => g.value[i], He = (i, c, w) => {
|
|
3595
|
+
if (Zt.includes(c))
|
|
3460
3596
|
return xe("setFormItem error,", `form item with prop "${i}" is readonly`);
|
|
3461
|
-
if (!
|
|
3597
|
+
if (!Q(i))
|
|
3462
3598
|
return xe("setFormItem error,", `Cannot find form item with name "${i}"`);
|
|
3463
|
-
if (c === "visible" &&
|
|
3599
|
+
if (c === "visible" && g.value[i].fixed)
|
|
3464
3600
|
return xe("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
3465
|
-
|
|
3466
|
-
},
|
|
3467
|
-
if (!
|
|
3601
|
+
Ve(g.value, `${i}.${c}`, w);
|
|
3602
|
+
}, Ce = (i, c) => {
|
|
3603
|
+
if (!g.value[i])
|
|
3468
3604
|
return xe("setFormValue error,", `Cannot find form item with name "${i}"`);
|
|
3469
|
-
|
|
3470
|
-
},
|
|
3471
|
-
Object.entries(i).forEach(([c,
|
|
3472
|
-
|
|
3605
|
+
g.value[i].value = c;
|
|
3606
|
+
}, an = (i) => {
|
|
3607
|
+
Object.entries(i).forEach(([c, w]) => {
|
|
3608
|
+
Ce(c, w);
|
|
3473
3609
|
});
|
|
3474
|
-
},
|
|
3610
|
+
}, on = (i) => {
|
|
3475
3611
|
var c;
|
|
3476
|
-
return (c =
|
|
3612
|
+
return (c = g.value[i]) == null ? void 0 : c.value;
|
|
3477
3613
|
}, St = (i) => {
|
|
3478
|
-
const c = {},
|
|
3479
|
-
for (const O in
|
|
3480
|
-
const
|
|
3481
|
-
|
|
3614
|
+
const c = {}, w = i ? Fe(g.value, Ee(i)) : g.value;
|
|
3615
|
+
for (const O in w) {
|
|
3616
|
+
const A = w[O];
|
|
3617
|
+
A._selected && (c[O] = ge(A.value));
|
|
3482
3618
|
}
|
|
3483
3619
|
return c;
|
|
3484
|
-
},
|
|
3485
|
-
|
|
3486
|
-
},
|
|
3487
|
-
|
|
3620
|
+
}, rn = () => D.dataSource, sn = (i) => {
|
|
3621
|
+
D.dataSource = i;
|
|
3622
|
+
}, ln = (i, c) => {
|
|
3623
|
+
D.dataSource[i] = c;
|
|
3488
3624
|
}, st = {
|
|
3489
3625
|
getFormItem(i) {
|
|
3490
|
-
return
|
|
3626
|
+
return s.value ? s.value.getFormItem(i) : Q(i);
|
|
3491
3627
|
},
|
|
3492
|
-
setFormItem(i, c,
|
|
3493
|
-
|
|
3628
|
+
setFormItem(i, c, w) {
|
|
3629
|
+
s.value ? s.value.setFormItem(i, c, w) : He(i, c, w);
|
|
3494
3630
|
},
|
|
3495
3631
|
getFormValues(i) {
|
|
3496
|
-
return
|
|
3632
|
+
return s.value ? s.value.getFormValues(i) : St(i);
|
|
3497
3633
|
},
|
|
3498
3634
|
setFormValues(i) {
|
|
3499
|
-
|
|
3635
|
+
s.value ? s.value.setFormValues(i) : an(i);
|
|
3500
3636
|
},
|
|
3501
3637
|
getFormValue(i) {
|
|
3502
|
-
return
|
|
3638
|
+
return s.value ? s.value.getFormValue(i) : on(i);
|
|
3503
3639
|
},
|
|
3504
3640
|
setFormValue(i, c) {
|
|
3505
|
-
|
|
3641
|
+
s.value ? s.value.setFormValue(i, c) : Ce(i, c);
|
|
3506
3642
|
}
|
|
3507
|
-
},
|
|
3508
|
-
getTableData:
|
|
3509
|
-
setTableData:
|
|
3510
|
-
setTableDataItem:
|
|
3511
|
-
onRefresh:
|
|
3512
|
-
},
|
|
3643
|
+
}, lt = {
|
|
3644
|
+
getTableData: rn,
|
|
3645
|
+
setTableData: sn,
|
|
3646
|
+
setTableDataItem: ln,
|
|
3647
|
+
onRefresh: N
|
|
3648
|
+
}, un = {
|
|
3513
3649
|
...st,
|
|
3514
|
-
...
|
|
3515
|
-
onRefresh:
|
|
3516
|
-
isInitialized:
|
|
3650
|
+
...lt,
|
|
3651
|
+
onRefresh: N,
|
|
3652
|
+
isInitialized: r
|
|
3517
3653
|
};
|
|
3518
|
-
e(
|
|
3654
|
+
e(un), Ie(() => [...t.refreshDeps], N, {
|
|
3519
3655
|
deep: !0,
|
|
3520
3656
|
immediate: !0
|
|
3521
|
-
}),
|
|
3657
|
+
}), Ie(
|
|
3522
3658
|
() => t.enableScene,
|
|
3523
3659
|
(i) => {
|
|
3524
|
-
|
|
3660
|
+
if (i)
|
|
3661
|
+
W();
|
|
3662
|
+
else {
|
|
3663
|
+
const c = Object.values(g.value).filter((w) => w.visible !== !1).map((w) => ({
|
|
3664
|
+
name: w.name,
|
|
3665
|
+
value: w.value ?? w._defaultValue,
|
|
3666
|
+
type: w.type
|
|
3667
|
+
}));
|
|
3668
|
+
S(c);
|
|
3669
|
+
}
|
|
3670
|
+
},
|
|
3671
|
+
{
|
|
3672
|
+
immediate: !0
|
|
3525
3673
|
}
|
|
3526
|
-
),
|
|
3674
|
+
), Ie(
|
|
3527
3675
|
() => t.sortable,
|
|
3528
3676
|
(i) => {
|
|
3529
|
-
i &&
|
|
3677
|
+
i && X();
|
|
3530
3678
|
},
|
|
3531
3679
|
{
|
|
3532
3680
|
immediate: !0
|
|
3533
3681
|
}
|
|
3534
|
-
),
|
|
3535
|
-
t.enableScene ? await
|
|
3682
|
+
), $n(async () => {
|
|
3683
|
+
t.enableScene ? await W() : m(), r.value = !0;
|
|
3536
3684
|
});
|
|
3537
|
-
const
|
|
3685
|
+
const cn = {
|
|
3538
3686
|
token: {
|
|
3539
3687
|
borderRadius: 2
|
|
3540
3688
|
}
|
|
3541
3689
|
};
|
|
3542
3690
|
return (i, c) => {
|
|
3543
|
-
const
|
|
3544
|
-
return
|
|
3545
|
-
locale:
|
|
3546
|
-
theme:
|
|
3691
|
+
const w = q("a-form-item"), O = q("a-button"), A = q("a-select"), z = q("a-divider"), $e = q("a-space"), it = q("a-form"), Ue = q("a-typography-text"), dn = q("a-tooltip"), pn = q("a-table"), fn = q("a-config-provider");
|
|
3692
|
+
return k(), R(fn, {
|
|
3693
|
+
locale: y(Kt),
|
|
3694
|
+
theme: cn
|
|
3547
3695
|
}, {
|
|
3548
|
-
default:
|
|
3549
|
-
|
|
3550
|
-
class:
|
|
3551
|
-
style:
|
|
3696
|
+
default: b(() => [
|
|
3697
|
+
Y("div", {
|
|
3698
|
+
class: v([i.$style.superTable, "antd-super-table"]),
|
|
3699
|
+
style: te(a.wrapperStyle)
|
|
3552
3700
|
}, [
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
class: m(i.$style.superTableHeader)
|
|
3701
|
+
Y("div", {
|
|
3702
|
+
class: v(i.$style.querySection)
|
|
3556
3703
|
}, [
|
|
3557
|
-
H("div", {
|
|
3558
|
-
|
|
3704
|
+
a.enableScene ? (k(), H("div", {
|
|
3705
|
+
key: 0,
|
|
3706
|
+
class: v(i.$style.sceneHeader)
|
|
3559
3707
|
}, [
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3708
|
+
Y("div", {
|
|
3709
|
+
class: v(i.$style.sceneFormWrapper)
|
|
3710
|
+
}, [
|
|
3711
|
+
_(it, {
|
|
3712
|
+
layout: "inline",
|
|
3713
|
+
class: v(i.$style.sceneForm)
|
|
3714
|
+
}, {
|
|
3715
|
+
default: b(() => [
|
|
3716
|
+
i.$slots.sceneAddonBefore ? (k(), R(w, { key: 0 }, {
|
|
3717
|
+
default: b(() => [
|
|
3718
|
+
ve(i.$slots, "sceneAddonBefore")
|
|
3719
|
+
]),
|
|
3720
|
+
_: 3
|
|
3721
|
+
})) : B("", !0),
|
|
3722
|
+
_(w, { label: "场景选择" }, {
|
|
3723
|
+
default: b(() => [
|
|
3724
|
+
_(A, {
|
|
3725
|
+
value: y(u).sceneCode,
|
|
3726
|
+
"onUpdate:value": c[1] || (c[1] = (ee) => y(u).sceneCode = ee),
|
|
3727
|
+
class: v(i.$style.sceneSelect),
|
|
3728
|
+
placeholder: "请选择",
|
|
3729
|
+
"allow-clear": "",
|
|
3730
|
+
"show-search": "",
|
|
3731
|
+
"option-filter-prop": "name",
|
|
3732
|
+
options: [...E.value, ...p.list],
|
|
3733
|
+
"field-names": { value: "code", label: "name" },
|
|
3734
|
+
open: T.value,
|
|
3735
|
+
loading: p.loading,
|
|
3736
|
+
onChange: rt,
|
|
3737
|
+
onDropdownVisibleChange: c[2] || (c[2] = (ee) => T.value = ee)
|
|
3738
|
+
}, {
|
|
3739
|
+
dropdownRender: b(({ menuNode: ee }) => [
|
|
3740
|
+
_(y(lo), { vnodes: ee }, null, 8, ["vnodes"]),
|
|
3741
|
+
Y("div", {
|
|
3742
|
+
class: v(i.$style.sceneOpBtnWrapper)
|
|
3743
|
+
}, [
|
|
3744
|
+
_(O, {
|
|
3745
|
+
type: "link",
|
|
3746
|
+
block: "",
|
|
3747
|
+
icon: U(y(Rn)),
|
|
3748
|
+
class: v(i.$style.sceneOpBtn),
|
|
3749
|
+
disabled: !re.value,
|
|
3750
|
+
onClick: c[0] || (c[0] = (ut) => qe(y(de).create))
|
|
3751
|
+
}, {
|
|
3752
|
+
default: b(() => c[5] || (c[5] = [
|
|
3753
|
+
Z(" 新建场景 ")
|
|
3754
|
+
])),
|
|
3755
|
+
_: 1
|
|
3756
|
+
}, 8, ["icon", "class", "disabled"]),
|
|
3757
|
+
_(O, {
|
|
3758
|
+
type: "link",
|
|
3759
|
+
block: "",
|
|
3760
|
+
icon: U(y(Dn)),
|
|
3761
|
+
class: v(i.$style.sceneOpBtn),
|
|
3762
|
+
onClick: ot
|
|
3763
|
+
}, {
|
|
3764
|
+
default: b(() => c[6] || (c[6] = [
|
|
3765
|
+
Z(" 场景管理 ")
|
|
3766
|
+
])),
|
|
3767
|
+
_: 1
|
|
3768
|
+
}, 8, ["icon", "class"])
|
|
3769
|
+
], 2)
|
|
3770
|
+
]),
|
|
3771
|
+
_: 1
|
|
3772
|
+
}, 8, ["value", "class", "options", "open", "loading"])
|
|
3773
|
+
]),
|
|
3774
|
+
_: 1
|
|
3775
|
+
}),
|
|
3776
|
+
_(w, null, {
|
|
3777
|
+
default: b(() => [
|
|
3778
|
+
_($e, null, {
|
|
3779
|
+
split: b(() => [
|
|
3780
|
+
_(z, { type: "vertical" })
|
|
3781
|
+
]),
|
|
3782
|
+
default: b(() => [
|
|
3783
|
+
_(O, {
|
|
3784
|
+
type: "primary",
|
|
3785
|
+
icon: U(y(Vn)),
|
|
3786
|
+
onClick: c[3] || (c[3] = (ee) => qe(y(de).search))
|
|
3601
3787
|
}, {
|
|
3602
|
-
default:
|
|
3603
|
-
|
|
3788
|
+
default: b(() => c[7] || (c[7] = [
|
|
3789
|
+
Z(" 高级筛选 ")
|
|
3604
3790
|
])),
|
|
3605
3791
|
_: 1
|
|
3606
|
-
}, 8, ["icon"
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3792
|
+
}, 8, ["icon"]),
|
|
3793
|
+
a.showRefreshButton ? (k(), R(O, {
|
|
3794
|
+
key: 0,
|
|
3795
|
+
type: "primary",
|
|
3796
|
+
ghost: "",
|
|
3797
|
+
icon: U(y(zn)),
|
|
3798
|
+
loading: D.loading,
|
|
3799
|
+
onClick: N
|
|
3613
3800
|
}, {
|
|
3614
|
-
default:
|
|
3615
|
-
|
|
3801
|
+
default: b(() => c[8] || (c[8] = [
|
|
3802
|
+
Z(" 刷新 ")
|
|
3616
3803
|
])),
|
|
3617
3804
|
_: 1
|
|
3618
|
-
}, 8, ["icon", "
|
|
3619
|
-
],
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
})
|
|
3659
|
-
]),
|
|
3660
|
-
_: 1
|
|
3661
|
-
}),
|
|
3662
|
-
i.$slots.sceneAddonAfter ? (x(), B(S, { key: 1 }, {
|
|
3663
|
-
default: _(() => [
|
|
3664
|
-
ve(i.$slots, "sceneAddonAfter")
|
|
3665
|
-
]),
|
|
3666
|
-
_: 3
|
|
3667
|
-
})) : N("", !0)
|
|
3668
|
-
]),
|
|
3669
|
-
_: 3
|
|
3670
|
-
}, 8, ["class"])) : N("", !0)
|
|
3671
|
-
], 2),
|
|
3672
|
-
i.$slots.extra ? (x(), U("div", {
|
|
3673
|
-
key: 0,
|
|
3674
|
-
class: m(i.$style.superTableExtra)
|
|
3675
|
-
}, [
|
|
3676
|
-
ve(i.$slots, "extra")
|
|
3677
|
-
], 2)) : N("", !0)
|
|
3678
|
-
], 2)) : N("", !0),
|
|
3679
|
-
v(wo, {
|
|
3680
|
-
"form-config-map": b.value,
|
|
3681
|
-
"form-item-col-span": a.formItemColSpan,
|
|
3682
|
-
onFormItemChange: Z,
|
|
3683
|
-
onDelete: c[4] || (c[4] = (X) => lt(X))
|
|
3684
|
-
}, null, 8, ["form-config-map", "form-item-col-span"]),
|
|
3685
|
-
H("div", {
|
|
3686
|
-
class: m(i.$style.tableWrapper)
|
|
3805
|
+
}, 8, ["icon", "loading"])) : B("", !0)
|
|
3806
|
+
]),
|
|
3807
|
+
_: 1
|
|
3808
|
+
})
|
|
3809
|
+
]),
|
|
3810
|
+
_: 1
|
|
3811
|
+
}),
|
|
3812
|
+
i.$slots.sceneAddonAfter ? (k(), R(w, { key: 1 }, {
|
|
3813
|
+
default: b(() => [
|
|
3814
|
+
ve(i.$slots, "sceneAddonAfter")
|
|
3815
|
+
]),
|
|
3816
|
+
_: 3
|
|
3817
|
+
})) : B("", !0)
|
|
3818
|
+
]),
|
|
3819
|
+
_: 3
|
|
3820
|
+
}, 8, ["class"])
|
|
3821
|
+
], 2),
|
|
3822
|
+
i.$slots.extra ? (k(), H("div", {
|
|
3823
|
+
key: 0,
|
|
3824
|
+
class: v(i.$style.sceneExtra)
|
|
3825
|
+
}, [
|
|
3826
|
+
ve(i.$slots, "extra")
|
|
3827
|
+
], 2)) : B("", !0)
|
|
3828
|
+
], 2)) : B("", !0),
|
|
3829
|
+
_(Tr, {
|
|
3830
|
+
"form-config-map": g.value,
|
|
3831
|
+
"form-item-col-span": a.formItemColSpan,
|
|
3832
|
+
"enable-scene": a.enableScene,
|
|
3833
|
+
"show-reset-button": a.showResetButton && !a.enableScene,
|
|
3834
|
+
"show-expand-button": a.showExpandButton,
|
|
3835
|
+
loading: !!D.loading,
|
|
3836
|
+
"super-table-i-d": y(h),
|
|
3837
|
+
onFormItemChange: le,
|
|
3838
|
+
onSearch: N,
|
|
3839
|
+
onReset: ye
|
|
3840
|
+
}, null, 8, ["form-config-map", "form-item-col-span", "enable-scene", "show-reset-button", "show-expand-button", "loading", "super-table-i-d"])
|
|
3841
|
+
], 2),
|
|
3842
|
+
Y("div", {
|
|
3843
|
+
class: v(i.$style.tableWrapper),
|
|
3844
|
+
style: te(a.tableWrapperStyle)
|
|
3687
3845
|
}, [
|
|
3688
|
-
i.$slots.tableHead || i.$slots.
|
|
3846
|
+
i.$slots.tableHead || i.$slots.toolBarExtra ? (k(), H("div", {
|
|
3689
3847
|
key: 0,
|
|
3690
|
-
class:
|
|
3848
|
+
class: v(i.$style.toolbar)
|
|
3691
3849
|
}, [
|
|
3692
|
-
|
|
3693
|
-
class:
|
|
3850
|
+
Y("div", {
|
|
3851
|
+
class: v(i.$style.tableHeadWrapper)
|
|
3694
3852
|
}, [
|
|
3695
3853
|
ve(i.$slots, "tableHead")
|
|
3696
3854
|
], 2),
|
|
3697
|
-
i.$slots.toolBarExtra ? (
|
|
3855
|
+
i.$slots.toolBarExtra ? (k(), H("div", {
|
|
3698
3856
|
key: 0,
|
|
3699
|
-
class:
|
|
3857
|
+
class: v(i.$style.actionBtns)
|
|
3700
3858
|
}, [
|
|
3701
3859
|
ve(i.$slots, "toolBarExtra")
|
|
3702
|
-
], 2)) :
|
|
3703
|
-
], 2)) :
|
|
3704
|
-
|
|
3705
|
-
class:
|
|
3860
|
+
], 2)) : B("", !0)
|
|
3861
|
+
], 2)) : B("", !0),
|
|
3862
|
+
Y("div", {
|
|
3863
|
+
class: v(i.$style.tableContent)
|
|
3706
3864
|
}, [
|
|
3707
|
-
a.enableTableConfig ? (
|
|
3865
|
+
a.enableTableConfig ? (k(), R(ko, {
|
|
3708
3866
|
key: 0,
|
|
3709
|
-
columns:
|
|
3710
|
-
onChange:
|
|
3711
|
-
}, null, 8, ["columns"])) :
|
|
3712
|
-
|
|
3867
|
+
columns: Ae.value,
|
|
3868
|
+
onChange: x
|
|
3869
|
+
}, null, 8, ["columns"])) : B("", !0),
|
|
3870
|
+
_(pn, ue({
|
|
3713
3871
|
ref_key: "tableRef",
|
|
3714
|
-
ref:
|
|
3872
|
+
ref: j
|
|
3715
3873
|
}, {
|
|
3716
|
-
...
|
|
3717
|
-
dataSource:
|
|
3718
|
-
}, { onResizeColumn:
|
|
3719
|
-
headerCell:
|
|
3720
|
-
|
|
3874
|
+
...D,
|
|
3875
|
+
dataSource: at.value
|
|
3876
|
+
}, { onResizeColumn: P }), wn({
|
|
3877
|
+
headerCell: b(({ column: ee }) => [
|
|
3878
|
+
ee.class !== "ant-table-row-expand-icon-cell" ? (k(), H("div", {
|
|
3721
3879
|
key: 0,
|
|
3722
|
-
class:
|
|
3880
|
+
class: v(i.$style.headerCell)
|
|
3723
3881
|
}, [
|
|
3724
|
-
|
|
3725
|
-
ellipsis: { tooltip:
|
|
3726
|
-
content:
|
|
3727
|
-
class:
|
|
3882
|
+
_(Ue, {
|
|
3883
|
+
ellipsis: { tooltip: ee.title },
|
|
3884
|
+
content: ee.title,
|
|
3885
|
+
class: v(i.$style.headerCellText)
|
|
3728
3886
|
}, null, 8, ["ellipsis", "content", "class"]),
|
|
3729
|
-
|
|
3730
|
-
title:
|
|
3731
|
-
|
|
3732
|
-
innerHTML:
|
|
3733
|
-
}, null, 8,
|
|
3887
|
+
ee.titleTooltip ? (k(), R(dn, { key: 0 }, {
|
|
3888
|
+
title: b(() => [
|
|
3889
|
+
Y("span", {
|
|
3890
|
+
innerHTML: ee.titleTooltip
|
|
3891
|
+
}, null, 8, Ar)
|
|
3734
3892
|
]),
|
|
3735
|
-
default:
|
|
3736
|
-
|
|
3737
|
-
style:
|
|
3738
|
-
class:
|
|
3893
|
+
default: b(() => [
|
|
3894
|
+
_(y(Yn), {
|
|
3895
|
+
style: te({ color: y(oe).colorTextQuaternary }),
|
|
3896
|
+
class: v(i.$style.headerCellTooltipIcon)
|
|
3739
3897
|
}, null, 8, ["style", "class"])
|
|
3740
3898
|
]),
|
|
3741
3899
|
_: 2
|
|
3742
|
-
}, 1024)) :
|
|
3743
|
-
], 2)) :
|
|
3900
|
+
}, 1024)) : B("", !0)
|
|
3901
|
+
], 2)) : B("", !0)
|
|
3744
3902
|
]),
|
|
3745
|
-
bodyCell:
|
|
3746
|
-
|
|
3747
|
-
column:
|
|
3748
|
-
record:
|
|
3749
|
-
index:
|
|
3750
|
-
hasRouter:
|
|
3751
|
-
}, null, 8, ["column", "record", "index", "hasRouter"]), c,
|
|
3903
|
+
bodyCell: b(({ column: ee, record: ut, index: kt }) => [
|
|
3904
|
+
Ht([We(ut), ee == null ? void 0 : ee.key, kt], () => _(so, {
|
|
3905
|
+
column: ee,
|
|
3906
|
+
record: ut,
|
|
3907
|
+
index: kt,
|
|
3908
|
+
hasRouter: l.value
|
|
3909
|
+
}, null, 8, ["column", "record", "index", "hasRouter"]), c, 4)
|
|
3752
3910
|
]),
|
|
3753
|
-
default:
|
|
3754
|
-
i.$slots.expandColumnTitle ? ve(i.$slots, "expandColumnTitle", { key: 0 }) :
|
|
3911
|
+
default: b(() => [
|
|
3912
|
+
i.$slots.expandColumnTitle ? ve(i.$slots, "expandColumnTitle", { key: 0 }) : B("", !0)
|
|
3755
3913
|
]),
|
|
3756
3914
|
_: 2
|
|
3757
3915
|
}, [
|
|
3758
3916
|
i.$slots.expandedRowRender ? {
|
|
3759
3917
|
name: "expandedRowRender",
|
|
3760
|
-
fn:
|
|
3761
|
-
ve(i.$slots, "expandedRowRender", { record:
|
|
3918
|
+
fn: b(({ record: ee }) => [
|
|
3919
|
+
ve(i.$slots, "expandedRowRender", { record: ee })
|
|
3762
3920
|
]),
|
|
3763
3921
|
key: "0"
|
|
3764
3922
|
} : void 0
|
|
3765
3923
|
]), 1040)
|
|
3766
3924
|
], 2),
|
|
3767
|
-
i.$slots.tableFoot ? (
|
|
3925
|
+
i.$slots.tableFoot ? (k(), H("div", {
|
|
3768
3926
|
key: 1,
|
|
3769
|
-
class:
|
|
3927
|
+
class: v(i.$style.tableFootWrapper)
|
|
3770
3928
|
}, [
|
|
3771
3929
|
ve(i.$slots, "tableFoot")
|
|
3772
|
-
], 2)) :
|
|
3773
|
-
],
|
|
3930
|
+
], 2)) : B("", !0)
|
|
3931
|
+
], 6)
|
|
3774
3932
|
], 6)
|
|
3775
3933
|
]),
|
|
3776
3934
|
_: 3
|
|
3777
3935
|
}, 8, ["locale"]);
|
|
3778
3936
|
};
|
|
3779
3937
|
}
|
|
3780
|
-
}),
|
|
3781
|
-
superTable:
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
},
|
|
3799
|
-
|
|
3800
|
-
|
|
3938
|
+
}), jr = "_superTable_1jyjb_1", Er = "_querySection_1jyjb_1", Lr = "_sceneHeader_1jyjb_1", Mr = "_sceneFormWrapper_1jyjb_7", Br = "_sceneForm_1jyjb_7", Nr = "_sceneSelect_1jyjb_13", Rr = "_sceneExtra_1jyjb_16", Dr = "_tableWrapper_1jyjb_19", Vr = "_toolbar_1jyjb_23", zr = "_actionBtns_1jyjb_30", Yr = "_tableHeadWrapper_1jyjb_35", Wr = "_tableContent_1jyjb_38", Hr = "_headerCell_1jyjb_41", Ur = "_headerCellText_1jyjb_46", Gr = "_headerCellTooltipIcon_1jyjb_49", Qr = "_sceneOpBtnWrapper_1jyjb_53", Jr = "_sceneOpBtn_1jyjb_53", Kr = {
|
|
3939
|
+
superTable: jr,
|
|
3940
|
+
querySection: Er,
|
|
3941
|
+
sceneHeader: Lr,
|
|
3942
|
+
sceneFormWrapper: Mr,
|
|
3943
|
+
sceneForm: Br,
|
|
3944
|
+
sceneSelect: Nr,
|
|
3945
|
+
sceneExtra: Rr,
|
|
3946
|
+
tableWrapper: Dr,
|
|
3947
|
+
toolbar: Vr,
|
|
3948
|
+
actionBtns: zr,
|
|
3949
|
+
tableHeadWrapper: Yr,
|
|
3950
|
+
tableContent: Wr,
|
|
3951
|
+
headerCell: Hr,
|
|
3952
|
+
headerCellText: Ur,
|
|
3953
|
+
headerCellTooltipIcon: Gr,
|
|
3954
|
+
sceneOpBtnWrapper: Qr,
|
|
3955
|
+
sceneOpBtn: Jr
|
|
3956
|
+
}, Zr = {
|
|
3957
|
+
$style: Kr
|
|
3958
|
+
}, Wt = /* @__PURE__ */ be(qr, [["__cssModules", Zr]]);
|
|
3959
|
+
Wt.install = (a) => {
|
|
3960
|
+
a.component("SuperTable", Wt);
|
|
3801
3961
|
};
|
|
3802
3962
|
export {
|
|
3803
|
-
|
|
3963
|
+
Eo as DynamicList,
|
|
3804
3964
|
G as SuperTableColumnTypeEnum,
|
|
3805
3965
|
K as SuperTableFormItemTypeEnum,
|
|
3806
|
-
|
|
3966
|
+
Wt as default
|
|
3807
3967
|
};
|