tm-table 1.2.4 → 1.2.5

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 CHANGED
@@ -807,7 +807,7 @@ options: async () => {
807
807
  ```
808
808
 
809
809
  ## 📝 更新日志
810
- ### 1.2.4
810
+ ### 1.2.5
811
811
  - 🐛 **修复列显示控制问题**
812
812
  - 修复 `tm-table-column` 组件上 `v-if` 指令不生效的问题
813
813
  - 支持 `v-show` 指令动态控制列的显示和隐藏
@@ -1 +1 @@
1
- @charset "UTF-8";.tm-icon[data-v-1c30ca93]{font-size:inherit;display:inline-block;height:1em;justify-content:center;line-height:1;position:relative;width:1em;fill:currentColor;color:inherit}.el-button .tm-icon{vertical-align:top}.el-table__row:hover .ellipsis-text-container .toolbar{display:flex;align-items:center;gap:2px}.el-table__row:hover .ellipsis-text-container .toolbar.multiline{display:block}.el-table__row:hover .ellipsis-text-container .toolbar .icon-item{flex-shrink:0}.el-table__row:hover .ellipsis-text-container .toolbar .icon-item:hover{color:var(--color-primary)!important}.ellipsis-text-container[data-v-70ba8157]{text-align:left;display:inline-flex;vertical-align:top}.ellipsis-text-container .toolbar[data-v-70ba8157]{display:none;max-width:30px}.ellipsis-text-container .toolbar .icon-item[data-v-70ba8157]{cursor:pointer;margin-left:2px}.ellipsis-text-container .toolbar .icon-item[data-v-70ba8157]:hover{opacity:.8}.ellipsis-text-container:hover .toolbar[data-v-70ba8157]{display:flex;align-items:center;gap:2px}.ellipsis-text-container:hover .toolbar.multiline[data-v-70ba8157]{display:block}.ellipsis-text-container:hover .toolbar .icon-item[data-v-70ba8157]:hover{color:var(--color-primary)!important}.form-item-layout[data-v-57a7088a]{display:flex;align-items:center}.form-item-layout.form-item-layout--horizontal[data-v-57a7088a]{flex-direction:row}.form-item-layout.form-item-layout--vertical[data-v-57a7088a]{flex-direction:column;align-items:stretch}.form-item-label[data-v-57a7088a]{flex-shrink:0;font-size:12px;box-sizing:border-box;display:flex;align-items:center;line-height:14px}.form-item-layout--horizontal .form-item-label[data-v-57a7088a]{justify-content:flex-end;padding-right:4px;height:28px;color:#606266}.form-item-layout--vertical .form-item-label[data-v-57a7088a]{justify-content:flex-start;margin-bottom:2px;height:28px;color:#606266}.form-item-input[data-v-57a7088a]{flex-shrink:0}.form-item-input[data-v-57a7088a]>.el-input,.form-item-input[data-v-57a7088a]>.el-select,.form-item-input[data-v-57a7088a]>.el-date-editor,.form-item-input[data-v-57a7088a]>.el-cascader,.form-item-input[data-v-57a7088a]>.el-checkbox-group,.form-item-input[data-v-57a7088a]>.el-radio-group,.form-item-input[data-v-57a7088a]>.cascader,.form-item-input[data-v-57a7088a]>.checkbox-content,.form-item-input[data-v-57a7088a]>.radio-group,.form-item-input[data-v-57a7088a]>.select,.form-item-input[data-v-57a7088a]>.date-picker,.form-item-input[data-v-57a7088a]>.switch-content{width:100%!important}.label-select[data-v-57a7088a]{width:100%!important}.form-item-layout--vertical .label-select[data-v-57a7088a]{width:100px!important}.label-text[data-v-57a7088a]{width:100%;text-align:right}.form-item-layout--vertical .label-text[data-v-57a7088a]{text-align:left}.label-render[data-v-57a7088a]{width:100%;display:flex;justify-content:flex-end}.form-item-layout--vertical .label-render[data-v-57a7088a]{justify-content:flex-start}.select[data-v-ef8f7987]{width:200px}.select[data-v-ef8f7987] .el-tag--info{max-width:52%}.check-all-option[data-v-ef8f7987]{margin-top:-6px;padding:6px 20px;border-bottom:1px solid #ebeef5;cursor:default;position:sticky;top:0;z-index:1;background-color:#fff}.popover-content .popover-title[data-v-28e573ff]{font-weight:700;margin-bottom:5px}.popover-content .popover-subtitle[data-v-28e573ff]{font-size:12px;color:#909399;margin-top:0;margin-bottom:10px}.popover-content .popover-footer[data-v-28e573ff]{margin-top:10px;text-align:right}.date-picker[data-v-2de48d4b]{width:200px}.cascader[data-v-be6225d9] .el-cascader{width:100%}.cascader[data-v-be6225d9] .el-cascader .el-input__inner{height:28px!important}.cascader[data-v-be6225d9] .el-cascader__tags .el-tag{margin:4px 0 4px 6px}.cascader[data-v-be6225d9] .el-cascader__tags .el-tag:first-child{max-width:90px}.cascader[data-v-be6225d9] .el-cascader__tags .el-tag:nth-child(2){max-width:48px}.cascader[data-v-be6225d9] .el-cascader__tags input{font-size:12px!important}.cascader[data-v-be6225d9] .el-cascader__tags .el-cascader__search-input{min-width:16px}.el-cascader__collapse-tags[data-v-be6225d9]{max-height:400px;max-width:400px;margin:0 -11px;padding:0 11px;overflow-y:auto;display:flex;flex-wrap:wrap;gap:4px}.radio-group[data-v-49789913]{width:200px;display:inline-flex}.radio-group[data-v-49789913] .el-radio-button{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.radio-group[data-v-49789913] .el-radio-button .el-radio-button__inner{font-weight:400;width:100%;padding:0 4px!important;display:inline-block;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;text-align:center;height:28px;line-height:28px;padding:7px 5px}.checkbox-content[data-v-c1549ec0]{width:200px;display:flex;flex-direction:column}.checkbox-content[data-v-c1549ec0] .el-checkbox-group{display:flex;width:100%}.checkbox-content[data-v-c1549ec0] .el-checkbox-group .el-checkbox-button{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.checkbox-content[data-v-c1549ec0] .el-checkbox-group .el-checkbox-button .el-checkbox-button__inner{font-weight:400;width:100%;display:inline-block;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;text-align:center;padding:0 4px;height:28px;line-height:28px}.switch-content[data-v-7455db21]{display:flex;align-items:center}.switch-content[data-v-7455db21] .el-switch .el-switch__core{flex-shrink:0}.textarea[data-v-e903b851]{width:100%;position:relative}.textarea .textarea-input[data-v-e903b851]{width:100%}.textarea[data-v-e903b851] .el-textarea__inner{min-height:28px!important;padding:4px 11px}.textarea .textarea-clear-icon[data-v-e903b851]{position:absolute;top:50%;right:8px;transform:translateY(-50%);cursor:pointer;color:#c0c4cc;transition:color .2s;z-index:1;display:flex;align-items:center;justify-content:center}.textarea .textarea-clear-icon.el-icon-circle-close[data-v-e903b851]{font-size:14px}.textarea .textarea-clear-icon.el-icon-circle-close[data-v-e903b851]:hover{color:#909399}.table-search[data-v-be7a7198]{--el-font-size-base: 12px}.table-search[data-v-be7a7198] .el-select__wrapper,.table-search[data-v-be7a7198] .el-switch__label{font-size:var(--el-font-size-base);font-weight:400}.table-search[data-v-be7a7198] .el-radio-button__inner,.table-search[data-v-be7a7198] .el-checkbox-button__inner{padding:9px 10px}.table-search[data-v-be7a7198]{margin-bottom:10px;display:flex;flex-wrap:wrap;align-items:center}.table-search .search-content[data-v-be7a7198]{flex:1;display:flex;align-items:center;flex-wrap:wrap;gap:10px}.table-search .search-actions[data-v-be7a7198]{display:flex}.table-search .search-error-message[data-v-be7a7198]{color:#f56c6c;font-size:12px;margin:5px 0}.table-search--v2 .search-form-item[data-v-be7a7198]{height:28px}.table-search--v3 .search-form-item[data-v-be7a7198]{height:24px}.tm-pagination[data-v-36e6bd1d]{padding:10px 0;text-align:right;display:flex;flex-direction:row-reverse}.tm-table-menu[data-v-579dd2c3]{display:flex;justify-content:space-between;margin-bottom:10px}.tm-table-menu .left[data-v-579dd2c3]{flex:1;margin-right:10px;display:flex;flex-wrap:wrap;gap:4px 0}.tm-table-menu .right[data-v-579dd2c3]{flex-shrink:0}.column-config-popover{padding:0!important}.title[data-v-fc286487]{display:flex;align-items:center;font-weight:700;color:#000;height:32px;padding-left:10px;padding-top:10px}.container[data-v-fc286487]{height:500px;width:100%;display:flex;flex-direction:column;overflow:hidden}.container .main-container[data-v-fc286487]{display:flex;flex:1;overflow:hidden;border-bottom:1px solid #dcdfe9}.container .main-container .left-content[data-v-fc286487]{flex:2;border-right:1px solid #dcdfe9;display:flex;flex-direction:column}.container .main-container .left-content .option-list[data-v-fc286487]{flex:1;overflow-y:auto}.container .main-container .right-content[data-v-fc286487]{flex:1;overflow-y:auto;display:flex;flex-direction:column;overflow:hidden}.container .main-container .right-content .search-box[data-v-fc286487]{display:flex;align-items:center;height:33px;border-bottom:1px solid #dcdfe9;box-sizing:border-box}.container .main-container .right-content .search-box[data-v-fc286487] .el-input__inner{box-shadow:none;border:none}.container .main-container .right-content .search-box[data-v-fc286487] .el-input__wrapper{box-shadow:none}.container .main-container .right-content .sort-list[data-v-fc286487]{flex:1;overflow-y:auto}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-fc286487]{position:relative;transition:background-color .2s}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-fc286487]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item-wrapper:hover .delete-button[data-v-fc286487],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .top-button[data-v-fc286487],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .left-fixed-btn[data-v-fc286487]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item-wrapper:hover .right-fixed-btn[data-v-fc286487]:not(.active-fixed){display:inline-block!important}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-fc286487]{position:relative}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-fc286487]:after{content:"";position:absolute;inset:0;background:#ff00001a;border:1px dashed #f56c6c;pointer-events:none}.container .main-container .right-content .sort-list .sort-item-wrapper.frozen[data-v-fc286487]:hover,.container .main-container .right-content .sort-list .sort-item-wrapper.frozenRight[data-v-fc286487]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item[data-v-fc286487]{display:flex;align-items:center;width:100%;height:32px;box-sizing:border-box;padding:0 8px;transition:.2s;user-select:none}.container .main-container .right-content .sort-list .sort-item .row-title[data-v-fc286487]{cursor:grab;flex:1;margin-right:8px;display:flex;align-items:center;gap:4px}.container .main-container .right-content .sort-list .sort-item .operation-btns[data-v-fc286487]{display:flex;align-items:center}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont-button[data-v-fc286487]{margin-left:3px;padding:0}.container .main-container .right-content .sort-list .sort-item .operation-btns .delete-button[data-v-fc286487],.container .main-container .right-content .sort-list .sort-item .operation-btns .top-button[data-v-fc286487],.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn[data-v-fc286487]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn[data-v-fc286487]:not(.active-fixed){display:none}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn.active-fixed[data-v-fc286487],.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn.active-fixed[data-v-fc286487]{display:inline-block;color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-fc286487]{color:#aaa;font-size:14px}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-fc286487]:hover{color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn .el-icon-position[data-v-fc286487]{transform:rotate(-90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn:hover .el-icon-position[data-v-fc286487]{color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn .el-icon-position[data-v-fc286487]{transform:rotate(90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn:hover .el-icon-position[data-v-fc286487]{color:var(--el-color-primary)}.container .footer[data-v-fc286487]{padding:10px;box-sizing:border-box;display:flex;justify-content:space-between}.el-checkbox[data-v-fc286487]{white-space:wrap;min-height:14px;height:auto;margin-top:10px;margin-left:10px;font-weight:400}.el-checkbox[data-v-fc286487] .el-checkbox__label{width:70px;vertical-align:top}.blue-background-class[data-v-fc286487]{background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a;z-index:1000}.sortable-drag[data-v-fc286487]{opacity:.9;background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a}.tips[data-v-fc286487]{color:#999;line-height:16px;font-size:12px;padding:8px}.tips span[data-v-fc286487],.tips span span[data-v-fc286487]{color:#999}.tm-table[data-v-732947c2] .el-table .cell{word-break:keep-all;word-wrap:break-word}.icon-item[data-v-14f27c2e]{cursor:pointer}.icon-item[data-v-14f27c2e]:hover{opacity:.6}.tm-ellipsis-text[data-v-14f27c2e]{position:relative;overflow:hidden}.tm-ellipsis-text .tm-ellipsis-text-wrapper[data-v-14f27c2e]{width:100%}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-line[data-v-14f27c2e]{line-height:inherit;word-break:break-all;white-space:normal}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-last-line[data-v-14f27c2e]{display:flex;align-items:center;line-height:inherit}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-last-line .tm-ellipsis-text-part[data-v-14f27c2e]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-last-line .tm-ellipsis-toolbar-part[data-v-14f27c2e]{flex-shrink:0;margin-left:4px;display:flex;align-items:center;line-height:inherit;font-size:inherit}.tm-ellipsis-measure[data-v-14f27c2e]{position:absolute;left:-9999px;top:-9999px;visibility:hidden;pointer-events:none;z-index:-1}
1
+ @charset "UTF-8";.tm-icon[data-v-1c30ca93]{font-size:inherit;display:inline-block;height:1em;justify-content:center;line-height:1;position:relative;width:1em;fill:currentColor;color:inherit}.el-button .tm-icon{vertical-align:top}.el-table__row:hover .ellipsis-text-container .toolbar{display:flex;align-items:center;gap:2px}.el-table__row:hover .ellipsis-text-container .toolbar.multiline{display:block}.el-table__row:hover .ellipsis-text-container .toolbar .icon-item{flex-shrink:0}.el-table__row:hover .ellipsis-text-container .toolbar .icon-item:hover{color:var(--color-primary)!important}.ellipsis-text-container[data-v-70ba8157]{text-align:left;display:inline-flex;vertical-align:top}.ellipsis-text-container .toolbar[data-v-70ba8157]{display:none;max-width:30px}.ellipsis-text-container .toolbar .icon-item[data-v-70ba8157]{cursor:pointer;margin-left:2px}.ellipsis-text-container .toolbar .icon-item[data-v-70ba8157]:hover{opacity:.8}.ellipsis-text-container:hover .toolbar[data-v-70ba8157]{display:flex;align-items:center;gap:2px}.ellipsis-text-container:hover .toolbar.multiline[data-v-70ba8157]{display:block}.ellipsis-text-container:hover .toolbar .icon-item[data-v-70ba8157]:hover{color:var(--color-primary)!important}.form-item-layout[data-v-57a7088a]{display:flex;align-items:center}.form-item-layout.form-item-layout--horizontal[data-v-57a7088a]{flex-direction:row}.form-item-layout.form-item-layout--vertical[data-v-57a7088a]{flex-direction:column;align-items:stretch}.form-item-label[data-v-57a7088a]{flex-shrink:0;font-size:12px;box-sizing:border-box;display:flex;align-items:center;line-height:14px}.form-item-layout--horizontal .form-item-label[data-v-57a7088a]{justify-content:flex-end;padding-right:4px;height:28px;color:#606266}.form-item-layout--vertical .form-item-label[data-v-57a7088a]{justify-content:flex-start;margin-bottom:2px;height:28px;color:#606266}.form-item-input[data-v-57a7088a]{flex-shrink:0}.form-item-input[data-v-57a7088a]>.el-input,.form-item-input[data-v-57a7088a]>.el-select,.form-item-input[data-v-57a7088a]>.el-date-editor,.form-item-input[data-v-57a7088a]>.el-cascader,.form-item-input[data-v-57a7088a]>.el-checkbox-group,.form-item-input[data-v-57a7088a]>.el-radio-group,.form-item-input[data-v-57a7088a]>.cascader,.form-item-input[data-v-57a7088a]>.checkbox-content,.form-item-input[data-v-57a7088a]>.radio-group,.form-item-input[data-v-57a7088a]>.select,.form-item-input[data-v-57a7088a]>.date-picker,.form-item-input[data-v-57a7088a]>.switch-content{width:100%!important}.label-select[data-v-57a7088a]{width:100%!important}.form-item-layout--vertical .label-select[data-v-57a7088a]{width:100px!important}.label-text[data-v-57a7088a]{width:100%;text-align:right}.form-item-layout--vertical .label-text[data-v-57a7088a]{text-align:left}.label-render[data-v-57a7088a]{width:100%;display:flex;justify-content:flex-end}.form-item-layout--vertical .label-render[data-v-57a7088a]{justify-content:flex-start}.select[data-v-ef8f7987]{width:200px}.select[data-v-ef8f7987] .el-tag--info{max-width:52%}.check-all-option[data-v-ef8f7987]{margin-top:-6px;padding:6px 20px;border-bottom:1px solid #ebeef5;cursor:default;position:sticky;top:0;z-index:1;background-color:#fff}.popover-content .popover-title[data-v-28e573ff]{font-weight:700;margin-bottom:5px}.popover-content .popover-subtitle[data-v-28e573ff]{font-size:12px;color:#909399;margin-top:0;margin-bottom:10px}.popover-content .popover-footer[data-v-28e573ff]{margin-top:10px;text-align:right}.date-picker[data-v-2de48d4b]{width:200px}.cascader[data-v-be6225d9] .el-cascader{width:100%}.cascader[data-v-be6225d9] .el-cascader .el-input__inner{height:28px!important}.cascader[data-v-be6225d9] .el-cascader__tags .el-tag{margin:4px 0 4px 6px}.cascader[data-v-be6225d9] .el-cascader__tags .el-tag:first-child{max-width:90px}.cascader[data-v-be6225d9] .el-cascader__tags .el-tag:nth-child(2){max-width:48px}.cascader[data-v-be6225d9] .el-cascader__tags input{font-size:12px!important}.cascader[data-v-be6225d9] .el-cascader__tags .el-cascader__search-input{min-width:16px}.el-cascader__collapse-tags[data-v-be6225d9]{max-height:400px;max-width:400px;margin:0 -11px;padding:0 11px;overflow-y:auto;display:flex;flex-wrap:wrap;gap:4px}.radio-group[data-v-49789913]{width:200px;display:inline-flex}.radio-group[data-v-49789913] .el-radio-button{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.radio-group[data-v-49789913] .el-radio-button .el-radio-button__inner{font-weight:400;width:100%;padding:0 4px!important;display:inline-block;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;text-align:center;height:28px;line-height:28px;padding:7px 5px}.checkbox-content[data-v-c1549ec0]{width:200px;display:flex;flex-direction:column}.checkbox-content[data-v-c1549ec0] .el-checkbox-group{display:flex;width:100%}.checkbox-content[data-v-c1549ec0] .el-checkbox-group .el-checkbox-button{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.checkbox-content[data-v-c1549ec0] .el-checkbox-group .el-checkbox-button .el-checkbox-button__inner{font-weight:400;width:100%;display:inline-block;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;text-align:center;padding:0 4px;height:28px;line-height:28px}.switch-content[data-v-7455db21]{display:flex;align-items:center}.switch-content[data-v-7455db21] .el-switch .el-switch__core{flex-shrink:0}.textarea[data-v-e903b851]{width:100%;position:relative}.textarea .textarea-input[data-v-e903b851]{width:100%}.textarea[data-v-e903b851] .el-textarea__inner{min-height:28px!important;padding:4px 11px}.textarea .textarea-clear-icon[data-v-e903b851]{position:absolute;top:50%;right:8px;transform:translateY(-50%);cursor:pointer;color:#c0c4cc;transition:color .2s;z-index:1;display:flex;align-items:center;justify-content:center}.textarea .textarea-clear-icon.el-icon-circle-close[data-v-e903b851]{font-size:14px}.textarea .textarea-clear-icon.el-icon-circle-close[data-v-e903b851]:hover{color:#909399}.table-search[data-v-be7a7198]{--el-font-size-base: 12px}.table-search[data-v-be7a7198] .el-select__wrapper,.table-search[data-v-be7a7198] .el-switch__label{font-size:var(--el-font-size-base);font-weight:400}.table-search[data-v-be7a7198] .el-radio-button__inner,.table-search[data-v-be7a7198] .el-checkbox-button__inner{padding:9px 10px}.table-search[data-v-be7a7198]{margin-bottom:10px;display:flex;flex-wrap:wrap;align-items:center}.table-search .search-content[data-v-be7a7198]{flex:1;display:flex;align-items:center;flex-wrap:wrap;gap:10px}.table-search .search-actions[data-v-be7a7198]{display:flex}.table-search .search-error-message[data-v-be7a7198]{color:#f56c6c;font-size:12px;margin:5px 0}.table-search--v2 .search-form-item[data-v-be7a7198]{height:28px}.table-search--v3 .search-form-item[data-v-be7a7198]{height:24px}.tm-pagination[data-v-ee768f31]{padding:10px 0;display:flex;justify-content:space-between;align-items:center}.tm-table-menu[data-v-579dd2c3]{display:flex;justify-content:space-between;margin-bottom:10px}.tm-table-menu .left[data-v-579dd2c3]{flex:1;margin-right:10px;display:flex;flex-wrap:wrap;gap:4px 0}.tm-table-menu .right[data-v-579dd2c3]{flex-shrink:0}.column-config-popover{padding:0!important}.title[data-v-fc286487]{display:flex;align-items:center;font-weight:700;color:#000;height:32px;padding-left:10px;padding-top:10px}.container[data-v-fc286487]{height:500px;width:100%;display:flex;flex-direction:column;overflow:hidden}.container .main-container[data-v-fc286487]{display:flex;flex:1;overflow:hidden;border-bottom:1px solid #dcdfe9}.container .main-container .left-content[data-v-fc286487]{flex:2;border-right:1px solid #dcdfe9;display:flex;flex-direction:column}.container .main-container .left-content .option-list[data-v-fc286487]{flex:1;overflow-y:auto}.container .main-container .right-content[data-v-fc286487]{flex:1;overflow-y:auto;display:flex;flex-direction:column;overflow:hidden}.container .main-container .right-content .search-box[data-v-fc286487]{display:flex;align-items:center;height:33px;border-bottom:1px solid #dcdfe9;box-sizing:border-box}.container .main-container .right-content .search-box[data-v-fc286487] .el-input__inner{box-shadow:none;border:none}.container .main-container .right-content .search-box[data-v-fc286487] .el-input__wrapper{box-shadow:none}.container .main-container .right-content .sort-list[data-v-fc286487]{flex:1;overflow-y:auto}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-fc286487]{position:relative;transition:background-color .2s}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-fc286487]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item-wrapper:hover .delete-button[data-v-fc286487],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .top-button[data-v-fc286487],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .left-fixed-btn[data-v-fc286487]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item-wrapper:hover .right-fixed-btn[data-v-fc286487]:not(.active-fixed){display:inline-block!important}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-fc286487]{position:relative}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-fc286487]:after{content:"";position:absolute;inset:0;background:#ff00001a;border:1px dashed #f56c6c;pointer-events:none}.container .main-container .right-content .sort-list .sort-item-wrapper.frozen[data-v-fc286487]:hover,.container .main-container .right-content .sort-list .sort-item-wrapper.frozenRight[data-v-fc286487]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item[data-v-fc286487]{display:flex;align-items:center;width:100%;height:32px;box-sizing:border-box;padding:0 8px;transition:.2s;user-select:none}.container .main-container .right-content .sort-list .sort-item .row-title[data-v-fc286487]{cursor:grab;flex:1;margin-right:8px;display:flex;align-items:center;gap:4px}.container .main-container .right-content .sort-list .sort-item .operation-btns[data-v-fc286487]{display:flex;align-items:center}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont-button[data-v-fc286487]{margin-left:3px;padding:0}.container .main-container .right-content .sort-list .sort-item .operation-btns .delete-button[data-v-fc286487],.container .main-container .right-content .sort-list .sort-item .operation-btns .top-button[data-v-fc286487],.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn[data-v-fc286487]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn[data-v-fc286487]:not(.active-fixed){display:none}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn.active-fixed[data-v-fc286487],.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn.active-fixed[data-v-fc286487]{display:inline-block;color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-fc286487]{color:#aaa;font-size:14px}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-fc286487]:hover{color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn .el-icon-position[data-v-fc286487]{transform:rotate(-90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn:hover .el-icon-position[data-v-fc286487]{color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn .el-icon-position[data-v-fc286487]{transform:rotate(90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn:hover .el-icon-position[data-v-fc286487]{color:var(--el-color-primary)}.container .footer[data-v-fc286487]{padding:10px;box-sizing:border-box;display:flex;justify-content:space-between}.el-checkbox[data-v-fc286487]{white-space:wrap;min-height:14px;height:auto;margin-top:10px;margin-left:10px;font-weight:400}.el-checkbox[data-v-fc286487] .el-checkbox__label{width:70px;vertical-align:top}.blue-background-class[data-v-fc286487]{background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a;z-index:1000}.sortable-drag[data-v-fc286487]{opacity:.9;background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a}.tips[data-v-fc286487]{color:#999;line-height:16px;font-size:12px;padding:8px}.tips span[data-v-fc286487],.tips span span[data-v-fc286487]{color:#999}.tm-table[data-v-732947c2] .el-table .cell{word-break:keep-all;word-wrap:break-word}.icon-item[data-v-14f27c2e]{cursor:pointer}.icon-item[data-v-14f27c2e]:hover{opacity:.6}.tm-ellipsis-text[data-v-14f27c2e]{position:relative;overflow:hidden}.tm-ellipsis-text .tm-ellipsis-text-wrapper[data-v-14f27c2e]{width:100%}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-line[data-v-14f27c2e]{line-height:inherit;word-break:break-all;white-space:normal}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-last-line[data-v-14f27c2e]{display:flex;align-items:center;line-height:inherit}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-last-line .tm-ellipsis-text-part[data-v-14f27c2e]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-last-line .tm-ellipsis-toolbar-part[data-v-14f27c2e]{flex-shrink:0;margin-left:4px;display:flex;align-items:center;line-height:inherit;font-size:inherit}.tm-ellipsis-measure[data-v-14f27c2e]{position:absolute;left:-9999px;top:-9999px;visibility:hidden;pointer-events:none;z-index:-1}
@@ -2155,18 +2155,18 @@ const G = jt.exports, Ut = !0, Jt = {
2155
2155
  };
2156
2156
  var Kt = function() {
2157
2157
  var e = this, i = e._self._c;
2158
- return i("div", { staticClass: "tm-pagination" }, [e._t("pagination-left"), i("el-pagination", e._g(e._b({ staticStyle: { "text-align": "right" }, attrs: { "current-page": e.current, "page-size": e.pageSize, total: e.total, "page-sizes": [10, 20, 50, 100, 300, 500, 1e3, 2e3], size: e.getCompatSize("mini"), layout: "total, sizes, prev, pager, next, jumper" }, on: { "size-change": e.handleSizeChange, "update:current-page": function(s) {
2158
+ return i("div", { staticClass: "tm-pagination" }, [i("div", [e._t("pagination-left")], 2), i("el-pagination", e._g(e._b({ staticStyle: { "text-align": "right" }, attrs: { "current-page": e.current, "page-size": e.pageSize, total: e.total, "page-sizes": [10, 20, 50, 100, 300, 500, 1e3, 2e3], size: e.getCompatSize("mini"), layout: "total, sizes, prev, pager, next, jumper" }, on: { "size-change": e.handleSizeChange, "update:current-page": function(s) {
2159
2159
  return e.$emit("update:current", s);
2160
2160
  }, "update:page-size": function(s) {
2161
2161
  return e.$emit("update:pageSize", s);
2162
- }, "current-change": e.handleCurrentChange } }, "el-pagination", e.$attrs, !1), e.isVue2 ? e.$listeners : {}))], 2);
2162
+ }, "current-change": e.handleCurrentChange } }, "el-pagination", e.$attrs, !1), e.isVue2 ? e.$listeners : {}))], 1);
2163
2163
  }, qt = [], Qt = /* @__PURE__ */ d(
2164
2164
  Jt,
2165
2165
  Kt,
2166
2166
  qt,
2167
2167
  !1,
2168
2168
  null,
2169
- "36e6bd1d"
2169
+ "ee768f31"
2170
2170
  );
2171
2171
  const Gt = Qt.exports, Yt = {
2172
2172
  name: "TmTableMenu",
@@ -1 +1 @@
1
- (function(r,h){typeof exports=="object"&&typeof module!="undefined"?h(exports,require("vue"),require("sortablejs")):typeof define=="function"&&define.amd?define(["exports","vue","sortablejs"],h):(r=typeof globalThis!="undefined"?globalThis:r||self,h(r.TmTable={},r.Vue,r.Sortable))})(this,function(r,h,d){"use strict";var _i=Object.defineProperty,xi=Object.defineProperties;var Si=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var Z=(r,h,d)=>h in r?_i(r,h,{enumerable:!0,configurable:!0,writable:!0,value:d}):r[h]=d,c=(r,h)=>{for(var d in h||(h={}))ee.call(h,d)&&Z(r,d,h[d]);if(L)for(var d of L(h))te.call(h,d)&&Z(r,d,h[d]);return r},_=(r,h)=>xi(r,Si(h));var ie=(r,h)=>{var d={};for(var m in r)ee.call(r,m)&&h.indexOf(m)<0&&(d[m]=r[m]);if(r!=null&&L)for(var m of L(r))h.indexOf(m)<0&&te.call(r,m)&&(d[m]=r[m]);return d};const m=t=>t,y=()=>"mini",se={today:"今天",yesterday:"昨天",last7days:"最近7天",last30days:"最近30天",thisMonth:"本月",lastMonth:"上月",checkAll:"全选",search:"搜索",query:"查询",reset:"重置",columnSetting:"列设置",refresh:"刷新",cancel:"取消",fixedLeft:"固定在左侧",fixedRight:"固定在右侧",top:"置顶",restoreDefault:"恢复默认",saveAndApply:"保存并应用",startDate:"开始日期",endDate:"结束日期",all:"全选",SelectableFields:"可选择字段",fixedColumns:"固定列",leftmost:"左侧最多",rightmost:"右侧最多",items:"项",accurateSearchTips:"每行一个,支持多个值",accurateSearchPlaceholder:"精确搜索,一行一项",selectPlaceholder:"请选择",clear:"清空",saveSuccess:"保存成功",cancelRightFixed:"取消右侧固定",rightFixed:"固定到右侧",cancelLeftFixed:"取消左侧固定",leftFixed:"固定到左侧",cancelTop:"取消置顶",copySuccess:"复制成功",copyFailed:"复制失败"},ae={today:"Today",yesterday:"Yesterday",last7days:"Last 7 days",last30days:"Last 30 days",thisMonth:"This month",lastMonth:"Last month",checkAll:"Check all",search:"Search",query:"Search",reset:"Reset",columnSetting:"Column Setting",refresh:"Refresh",cancel:"Cancel",fixedLeft:"Fixed left",fixedRight:"Fixed right",top:"Top",restoreDefault:"Restore default",saveAndApply:"Save and apply",startDate:"Start date",endDate:"End date",all:"All",SelectableFields:"Fields",fixedColumns:"Fixed columns",leftmost:"Leftmost",rightmost:"Rightmost",items:"item(s)",accurateSearchTips:"One per line, supporting multiple values",accurateSearchPlaceholder:"Accurate search, one per line",selectPlaceholder:"Please select",clear:"Clear",saveSuccess:"Successfully saved",cancelRightFixed:"Cancel right fixed",rightFixed:"Fixed to right",cancelLeftFixed:"Cancel left fixed",leftFixed:"Fixed to left",cancelTop:"Cancel top",copySuccess:"Copy successfully",copyFailed:"Copy failed"};var q;const le={"zh-CN":se,"en-US":ae};let S={value:"zh-CN"};{const t=require("vue");t.observable||(q=t.default)!=null&&q.observable?S=t.default.observable(S):S=new t({data(){return{currentLang:S}}}).$data.currentLang}const ne=t=>{var e;return((e=le[S.value])==null?void 0:e[t])||t},w=t=>{S.value=t},v=()=>({t:ne,setLang:w,currentLang:S});function p(t,e,i,s,a,l,n,o){var u=typeof t=="function"?t.options:t;return e&&(u.render=e,u.staticRenderFns=i,u._compiled=!0),l&&(u._scopeId="data-v-"+l),{exports:t,options:u}}const re={name:"BaseIcon",props:{path:{type:String},size:{type:[String,Number]},color:{type:String}},methods:{handleClick(){this.$emit("click")}}};var oe=function(){var e=this,i=e._self._c;return i("i",{staticClass:"tm-icon",on:{click:e.handleClick}},[i("svg",{style:{color:e.color},attrs:{width:e.size,height:e.size,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:e.path}})])])},ue=[],de=p(re,oe,ue,!1,null,"1c30ca93");const ce=de.exports,C=Object.entries({menu:"M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z",more:"M76.92892277 192.94787572h864.34120754c23.20379058 0 46.40758118-17.40284367 46.40758118-46.40758118s-23.20379058-46.40758118-46.40758118-46.40758116H76.92892277c-29.00473897 0-46.40758264 17.40284367-46.40758264 46.40758116s23.20379058 46.40758118 46.40758264 46.40758118zM941.27013031 465.59241882H76.92892277c-29.00473897 0-46.40758264 17.40284367-46.40758264 46.40758118s23.20379058 46.40758118 46.40758264 46.40758118h864.34120754c23.20379058 0 46.40758118-17.40284367 46.40758118-46.40758118s-23.20379058-46.40758118-46.40758118-46.40758118zM941.27013031 825.25117589H76.92892277c-29.00473897 0-46.40758264 17.40284367-46.40758264 46.40758118s23.20379058 46.40758118 46.40758264 46.40758264h864.34120754c23.20379058 0 46.40758118-17.40284367 46.40758118-46.40758264s-23.20379058-46.40758118-46.40758118-46.40758118z",refresh:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z",move:"M238.93333333 102.4a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0z m409.6 0a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0zM238.93333333 375.46666667a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0z m409.6 0a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0z m-409.6 273.06666666a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0z m409.6 0a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0z m-341.33333333 204.8a68.26666667 68.26666667 0 1 0 0 136.53333334 68.26666667 68.26666667 0 0 0 0-136.53333334z m341.33333333 68.26666667a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0z","column-setting":"M436.05333334 18.36373333a109.22666667 109.22666667 0 0 1 109.22666666 0l345.56586667 199.54346667c33.792 19.52426667 54.61333333 55.56906667 54.61333333 94.54933333V580.26666667h-81.92V312.45653333a27.30666667 27.30666667 0 0 0-13.65333333-23.62026666L504.32 89.2928a27.30666667 27.30666667 0 0 0-27.30666666 0L131.44746667 288.83626667a27.30666667 27.30666667 0 0 0-13.65333333 23.62026666v399.08693334a27.30666667 27.30666667 0 0 0 13.65333333 23.62026666L477.01333334 934.7072a27.30666667 27.30666667 0 0 0 27.30666666 0l54.61333334-31.5392v94.54933333l-13.65333334 7.91893334a109.22666667 109.22666667 0 0 1-109.22666666 0l-345.56586667-199.54346667a109.22666667 109.22666667 0 0 1-54.61333333-94.54933333V312.45653333c0-38.98026667 20.82133333-75.09333333 54.61333333-94.54933333L436.05333334 18.36373333z","fixed-left":"M843.36363653 311.54545478l-53.18181827 1e-8-20.45454521 28.63636347-163.63636435 204.54545479-24.54545391 28.63636347 12.27272695 36.81818175c8.18181826 28.63636347 12.27272695 57.27272695 12.27272696 85.90909042 0 32.72727305-4.09090869 61.36363652-16.36363565 90-4.09090869 16.36363653-12.27272695 32.72727306-24.54545479 49.09090957l-163.63636347-163.63636347-40.90909131-40.90909132-12.27272695-12.27272695-163.63636348-163.63636347c28.63636347-16.36363653 61.36363652-28.63636347 94.09090869-32.72727305 45-8.18181826 90-4.09090869 134.99999999 8.18181826l36.81818175 12.27272695 28.63636347-24.54545391 204.54545479-163.63636435 28.63636347-16.36363564 0-32.72727305L712.45454521 184.72727305l130.90909132 126.81818173zM941.54545479 327.90909131c0-8.18181826-4.09090869-16.36363653-8.18181826-24.54545478L720.63636348 94.72727305c-12.27272695-16.36363653-36.81818174-12.27272695-49.09090869 4.0909087-20.45454521 28.63636347-28.63636347 65.45454521-28.63636348 98.18181825l0 4.09090869-204.54545478 163.63636436c-110.45454521-36.81818174-233.18181826-16.36363653-327.27272784 61.36363564-8.18181826 8.18181826-12.27272695 16.36363653-12.27272694 24.54545478 0 8.18181826 4.09090869 16.36363653 8.18181825 24.5454548l196.36363653 196.36363652-212.72727305 212.72727216c-4.09090869 4.09090869-8.18181826 12.27272695-8.18181826 20.4545461s4.09090869 16.36363653 8.18181826 20.4545452c12.27272695 12.27272695 32.72727306 12.27272695 45 1e-8L352.45454522 716.54545479l196.36363652 196.36363652c12.27272695 12.27272695 36.81818174 12.27272695 49.09090957-4.09090957C651.09090869 847.45454521 675.63636347 773.81818174 675.63636346 696.09090869c0-36.81818173-4.09090869-73.63636348-16.36363651-106.36363564l163.63636436-204.54545479c36.81818173 0 73.63636348-8.18181826 106.36363564-28.63636347C937.45454519 348.36363653 941.54545478 336.09090869 941.54545479 327.90909131z","fixed-right":"M311.54545479 180.63636347v53.18181827l28.63636347 20.45454521 204.54545479 163.63636436 28.63636347 24.5454539 36.81818174-12.27272695c28.63636347-8.18181826 57.27272695-12.27272695 85.90909043-12.27272695 32.72727305 0 61.36363652 4.09090869 90 16.36363564 16.36363653 4.09090869 32.72727305 12.27272695 49.09090957 24.54545479l-163.63636347 163.63636347-40.90909132 40.90909131-12.27272695 12.27272695-163.63636347 163.63636348c-16.36363653-28.63636347-28.63636347-61.36363652-32.72727305-94.09090869-8.18181826-45-4.09090869-90 8.18181826-135l12.27272695-36.81818174-24.5454539-28.63636347-163.63636436-204.54545479-16.36363564-28.63636347h-32.72727305H184.72727305l126.81818174-130.90909132zM327.90909131 82.45454521c-8.18181826 0-16.36363653 4.09090869-24.54545478 8.18181826L94.72727305 303.36363652c-16.36363653 12.27272695-12.27272695 36.81818174 4.09090869 49.09090869 28.63636347 20.45454521 65.45454521 28.63636347 98.18181826 28.63636348h4.09090869l163.63636436 204.54545478c-36.81818174 110.45454521-16.36363653 233.18181826 61.36363564 327.27272784 8.18181826 8.18181826 16.36363653 12.27272695 24.54545478 12.27272695 8.18181826 0 16.36363653-4.09090869 24.54545479-8.18181826l196.36363653-196.36363653 212.72727216 212.72727305c4.09090869 4.09090869 12.27272695 8.18181826 20.4545461 8.18181827s16.36363653-4.09090869 20.45454521-8.18181827c12.27272695-12.27272695 12.27272695-32.72727305 0-45L716.54545479 671.54545479l196.36363652-196.36363653c12.27272695-12.27272695 12.27272695-36.81818174-4.09090957-49.09090957C847.45454521 372.90909131 773.81818174 348.36363653 696.09090869 348.36363653c-36.81818174 0-73.63636348 4.09090869-106.36363564 16.36363652l-204.54545479-163.63636436c0-36.81818174-8.18181826-73.63636348-28.63636347-106.36363564C348.36363653 86.54545479 336.09090869 82.45454521 327.90909131 82.45454521z",upload:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248z",download:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z",delete:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32",copy:"M128 320v576h576V320zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32M960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32M256 672h320v64H256zm0-192h320v64H256z"}).reduce((t,[e,i])=>{const s=`${e}Icon`,a={name:s,props:{path:{type:String,default:i},size:{type:[String,Number]},color:{type:String}},render(l){return l(ce,{props:this.$props,on:{click:()=>this.$emit("click")}})}};return a.install=l=>{l.component(s,a)},t[e]=a,t},{}),he=C.menu,pe=C.refresh,fe=C.move;C["column-setting"];const me=C.more,ge=C["fixed-left"],be=C["fixed-right"],ye=C.upload,ve=C.download,Ce=C.delete,K=C.copy,{t:k}=v(),_e=!0,xe=!1,Se={name:"TmEllipsisText",components:{CopyIcon:K},props:{text:{type:String,required:!0},width:{type:[String,Number],default:"auto"},maxWidth:{type:[String,Number],default:"100%"},lines:{type:Number,default:1},showTooltip:{type:Boolean,default:!0},lineHeight:{type:[String,Number]},copyable:{type:Boolean,default:!1},textAlign:{type:String,default:"left"}},data(){return{isVue2:_e,isVue3:xe,isOverflow:!1,currentLines:1,resizeObserver:null}},computed:{tooltipDisabled(){return!this.showTooltip||!this.isOverflow},textStyle(){const t=typeof this.width=="number"?`${this.width}px`:this.width,e=typeof this.maxWidth=="number"?`${this.maxWidth}px`:this.maxWidth;return{width:t,maxWidth:e,lineHeight:this.lineHeight,display:"-webkit-inline-box",overflow:"hidden",WebkitBoxOrient:"vertical",WebkitLineClamp:this.lines,textAlign:this.textAlign}}},mounted(){this.checkOverflow(),this.setupResizeObserver()},beforeDestroy(){this.cleanupResizeObserver()},beforeUnmount(){this.cleanupResizeObserver()},watch:{text(){this.$nextTick(this.checkOverflow)}},methods:{checkOverflow(){this.$refs.textEl&&this.$nextTick(()=>{this.$nextTick(()=>{this.performOverflowCheck()})})},performOverflowCheck(){var f;const t=this.$refs.textEl;if(!t)return;const e=getComputedStyle(t);if(!e.width||e.width==="0px"){this.$nextTick(()=>{this.performOverflowCheck()});return}const i=t.scrollHeight,s=t.scrollWidth,a=t.clientHeight,l=t.clientWidth,n=1,o=i>a+n,u=s>l+n;if(o||u){this.isOverflow=!0;const b=parseFloat(e.lineHeight)||16;this.currentLines=Math.ceil(i/b)}else{const b=t.getBoundingClientRect(),T=(f=t.parentElement)==null?void 0:f.getBoundingClientRect();if(T){const Ci=b.height>T.height||b.width>T.width;this.isOverflow=Ci}else this.isOverflow=!1;this.currentLines=1}},setupResizeObserver(){window.ResizeObserver&&this.$nextTick(()=>{try{this.resizeObserver=new ResizeObserver(()=>{this.checkOverflow()});const t=this.$el;t&&t instanceof Element&&this.resizeObserver.observe(t)}catch(t){console.warn("Failed to setup ResizeObserver:",t)}})},cleanupResizeObserver(){if(this.resizeObserver)try{this.resizeObserver.disconnect()}catch(t){console.warn("Failed to disconnect ResizeObserver:",t)}finally{this.resizeObserver=null}},handleCopy(){navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(this.text).then(()=>{this.$message.success(k("copySuccess"))}).catch(()=>{this.fallbackCopy()}):this.fallbackCopy()},fallbackCopy(){const t=document.createElement("textarea");t.value=this.text,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),this.$message.success(k("copySuccess"))}catch(e){this.$message.error(k("copyFailed"))}document.body.removeChild(t)}}};var $e=function(){var e=this,i=e._self._c;return i("el-tooltip",e._b({attrs:{disabled:e.tooltipDisabled,content:e.text,effect:"dark",placement:"top"}},"el-tooltip",{[e.isVue2?"open-delay":"show-after"]:300},!1),[i("div",{staticClass:"ellipsis-text-container"},[i("div",{ref:"textEl",staticClass:"ellipsis-text",style:e.textStyle},[e._v(" "+e._s(e.text)+" ")]),i("div",{staticClass:"toolbar",class:{multiline:e.currentLines>1&&e.lines>1}},[e.copyable?i("CopyIcon",{staticClass:"icon-item",on:{click:e.handleCopy}}):e._e()],1)])])},Te=[],we=p(Se,$e,Te,!1,null,"70ba8157");const $=we.exports;var Fe=p({name:"RenderVue2",inheritAttrs:!1,props:{renderFn:{type:Function,required:!0},data:{type:[Object,Array,String,Number,Boolean],default:void 0}},render(t){try{if(!this.renderFn||typeof this.renderFn!="function")return console.warn("[RenderComponent] renderFn must be a function"),null;const e=_(c({},this.data||{}),{$attrs:this.$attrs,$listeners:this.$listeners}),i=this.renderFn.toString(),s=/\(\s*h\s*[,)]/.test(i)||this.renderFn.length>=1;process.env.NODE_ENV;let a;return s?a=this.renderFn(t,e):a=this.renderFn(_(c({},e),{h:t})),a}catch(e){return console.error("[RenderComponent] Error in render function:",e),process.env.NODE_ENV==="development"?t("div",{style:{color:"red",border:"1px solid red",padding:"8px",borderRadius:"4px",fontSize:"12px"}},`RenderComponent Error: ${e.message}`):null}}},null,null,!1,null,null);const Ve=Fe.exports,ze=!0,Le=!1,ke={name:"FormItemLayout",components:{EllipsisText:$,RenderComponent:Ve},props:{direction:{type:String,default:"horizontal",validator:t=>["horizontal","vertical"].includes(t)},labelWidth:{type:[String,Number],default:120},inputWidth:{type:[String,Number],default:240},label:{type:[String,Function,Object,Array],default:""},labelOptions:{type:Array,default:()=>[]},field:{type:[String,Number],default:""},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{t:v().t,isVue2:ze,isVue3:Le,getDefaultSize:y}},computed:{hasLabel(){return this.labelOptions&&this.labelOptions.length||this.label},containerStyle(){const t={};if(this.direction==="horizontal"){const e=this.hasLabel?this.parsedLabelWidth+this.parsedInputWidth:this.parsedInputWidth;t.width=`${e}px`}else t.width=`${this.parsedInputWidth}px`;return t},labelStyle(){const t={};return this.direction==="horizontal"?t.width=`${this.parsedLabelWidth}px`:t.width=`${this.parsedInputWidth}px`,t},inputStyle(){return{width:`${this.parsedInputWidth}px`}},parsedLabelWidth(){return typeof this.labelWidth=="string"?parseInt(this.labelWidth):this.labelWidth},parsedInputWidth(){return typeof this.inputWidth=="string"?parseInt(this.inputWidth):this.inputWidth},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}}},watch:{labelOptions:{handler(t){t&&t.length>0&&!this.field&&this.$emit("field-change",t[0].value)},deep:!0,immediate:!0}},methods:{handleFieldChange(t){this.$emit("field-change",t)}}};var Oe=function(){var e=this,i=e._self._c;return i("div",{staticClass:"form-item-layout",class:{"form-item-layout--horizontal":e.direction==="horizontal","form-item-layout--vertical":e.direction==="vertical"},style:e.containerStyle},[e.hasLabel?i("div",{staticClass:"form-item-label",style:e.labelStyle},[e.labelOptions&&e.labelOptions.length?i("el-select",{staticClass:"label-select",attrs:{placeholder:e.t("selectPlaceholder"),size:e.getDefaultSize()},on:{change:e.handleFieldChange},model:{value:e.fieldValue,callback:function(s){e.fieldValue=s},expression:"fieldValue"}},e._l(e.labelOptions,function(s){return i("el-option",{key:s.value,attrs:{label:s.label,value:s.value}})}),1):e.label?[typeof e.label=="string"?i("div",{staticClass:"label-text"},[i("EllipsisText",{attrs:{text:e.label,lines:2,width:e.labelWidth-4,"text-align":e.labelAlign}})],1):typeof e.label=="function"?i("div",{staticClass:"label-render"},[i("RenderComponent",{attrs:{"render-fn":e.label}})],1):e._e()]:e._e()],2):e._e(),i("div",{staticClass:"form-item-input",style:e.inputStyle},[e._t("default")],2)])},Ae=[],De=p(ke,Oe,Ae,!1,null,"57a7088a");const x=De.exports,Re=!0,Me=!1,F="value",He="input",Ee={name:"TmSelectFilter",components:{FormItemLayout:x},props:{[F]:{type:[String,Number,Array],default:""},field:{type:[String,Number],default:""},options:{type:[Array,Function],default:()=>[]},labelOptions:{type:Array,default:()=>[]},label:{type:[String,Function,Object,Array],default:null},props:{type:Object,default:()=>({label:"label",value:"value"})},filterable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},collapseTags:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},showCheckAll:{type:Boolean,default:!0},placeholder:{type:String,default:""},valueOnClear:{type:[String,Number,Boolean,Array,Function],default:void 0},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{t:v().t,isVue2:Re,isVue3:Me,getDefaultSize:y,optionsList:[],loading:!1,indeterminate:!1,checkAll:!1}},computed:{computedValue:{get(){return this[F]},set(t){let e=t;if(this.multiple&&Array.isArray(t)&&t.length===0&&this.valueOnClear!==void 0){const i=this[F];Array.isArray(i)&&i.length>0&&(e=typeof this.valueOnClear=="function"?this.valueOnClear():this.valueOnClear)}this.$emit(He,e),this.$emit("change",e)}},propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}}},watch:{[F](t){!this.multiple||!this.showCheckAll||(t.length===0?(this.checkAll=!1,this.indeterminate=!1):t.length===this.optionsList.length?(this.checkAll=!0,this.indeterminate=!1):this.indeterminate=!0)}},created(){this.initOptions()},methods:{handleFieldChange(t){this.$emit("field-change",t)},async initOptions(){if(Array.isArray(this.options))this.optionsList=this.options;else if(typeof this.options=="function")try{this.loading=!0;const t=await this.options();Array.isArray(t)&&(this.optionsList=t)}catch(t){console.error(t)}finally{this.loading=!1}},handleCheckAll(t){this.indeterminate=!1;let e=[];t&&(e=this.optionsList.map(i=>i[this.propMap.value])),this.computedValue=e},handleClear(){if(this.valueOnClear!==void 0){const t=typeof this.valueOnClear=="function"?this.valueOnClear():this.valueOnClear;this.$nextTick(()=>{this.computedValue=t})}}}};var We=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-options":e.labelOptions,field:e.field,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign},on:{"field-change":e.handleFieldChange}},[i("el-select",e._g(e._b({ref:"select",staticClass:"select",attrs:{loading:e.loading},on:{clear:e.handleClear},scopedSlots:e._u([{key:"header",fn:function(){return[e.isVue3&&e.multiple&&e.showCheckAll?i("el-checkbox",{staticStyle:{width:"100%",height:"20px","padding-left":"10px"},attrs:{indeterminate:e.indeterminate,size:e.getDefaultSize()},on:{change:e.handleCheckAll},model:{value:e.checkAll,callback:function(s){e.checkAll=s},expression:"checkAll"}},[e._v(e._s(e.t("all")))]):e._e()]},proxy:!0}]),model:{value:e.computedValue,callback:function(s){e.computedValue=s},expression:"computedValue"}},"el-select",_(c({},e.$attrs),{size:e.getDefaultSize(),filterable:e.filterable,clearable:e.clearable,collapseTags:e.collapseTags,multiple:e.multiple,placeholder:e.placeholder,loading:e.loading}),!1),e.isVue2?e.$listeners:{}),[e.isVue2&&e.multiple&&e.showCheckAll?i("div",{staticClass:"check-all-option"},[i("el-checkbox",{staticStyle:{width:"100%"},attrs:{indeterminate:e.indeterminate,size:e.getDefaultSize()},on:{change:e.handleCheckAll},model:{value:e.checkAll,callback:function(s){e.checkAll=s},expression:"checkAll"}},[e._v(e._s(e.t("all")))])],1):e._e(),e._l(e.optionsList,function(s){return i("el-option",{key:s[e.propMap.value],attrs:{label:s[e.propMap.label],value:s[e.propMap.value],disabled:s.disabled}},[e._t("option",function(){return[e._v(e._s(s[e.propMap.label]))]},{item:s})],2)})],2)],1)},Ie=[],Ne=p(Ee,We,Ie,!1,null,"ef8f7987");const O=Ne.exports,Pe={name:"TmInputFilter",components:{MoreIcon:me,FormItemLayout:x},props:{label:{type:[String,Function,Object,Array],default:""},value:{type:String,default:""},field:{type:[String,Number],default:""},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},labelOptions:{type:Array,default:()=>[]},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{t:v().t,getDefaultSize:y,getCompatSize:m,exactValue:"",inputValue:"",isExactMode:!1,currentOptionMultiple:!1}},computed:{shouldShowMultiple(){return this.currentOptionMultiple!==null?this.currentOptionMultiple:this.multiple},selectedOption(){return!this.labelOptions||!this.labelOptions.length||!this.field?null:this.labelOptions.find(t=>t.value===this.field)}},watch:{isExactMode(t){t?this.$emit("value-change",this.exactValue):this.$emit("value-change",this.inputValue)},exactValue(t){this.$emit("value-change",t)},inputValue(t){this.$emit("value-change",t)},value:{handler(t){this.isExactMode?this.exactValue=t:this.inputValue=t},immediate:!0}},methods:{handlePopoverClose(){document.activeElement&&document.activeElement.blur(),this.isExactMode=!1},handleVisibleChange(t){this.isExactMode=t},handlefieldChange(t){this.$emit("field-change",t),this.updateCurrentOptionMultiple()},updateCurrentOptionMultiple(){const t=this.selectedOption;t&&"multiple"in t?this.currentOptionMultiple=t.multiple:this.currentOptionMultiple=this.multiple},handleExactSearch(){this.$emit("value-change",this.exactValue),this.$emit("search",this.exactValue)},handleClear(){this.exactValue="",this.$emit("value-change","")},handleEnter(){this.$emit("search")}},created(){this.updateCurrentOptionMultiple()}};var Be=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-options":e.labelOptions,field:e.field,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign},on:{"field-change":e.handlefieldChange}},[i("el-input",{staticClass:"tm-input",attrs:{size:e.getDefaultSize(),placeholder:e.placeholder,clearable:""},nativeOn:{keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.handleEnter.apply(null,arguments)}},model:{value:e.inputValue,callback:function(s){e.inputValue=s},expression:"inputValue"}},[e.shouldShowMultiple?i("el-popover",{attrs:{slot:"append",value:e.isExactMode,placement:"bottom-end",width:260,trigger:"click"},on:{input:e.handleVisibleChange},slot:"append"},[i("div",{staticClass:"popover-content"},[i("p",{staticClass:"popover-subtitle"},[e._v(e._s(e.t("accurateSearchTips")))]),i("el-input",{staticStyle:{"font-size":"12px"},attrs:{size:e.getDefaultSize(),type:"textarea",rows:8,placeholder:e.t("accurateSearchPlaceholder")},model:{value:e.exactValue,callback:function(s){e.exactValue=s},expression:"exactValue"}}),i("div",{staticClass:"popover-footer"},[i("el-button",{staticStyle:{float:"left"},attrs:{size:e.getCompatSize("mini")},on:{click:e.handleClear}},[e._v(e._s(e.t("clear")))]),i("el-button",{attrs:{size:e.getCompatSize("mini")},on:{click:e.handlePopoverClose}},[e._v(e._s(e.t("cancel")))]),i("el-button",{attrs:{type:"primary",size:e.getCompatSize("mini")},on:{click:e.handleExactSearch}},[e._v(e._s(e.t("search")))])],1)],1),i("template",{slot:"reference"},[i("MoreIcon",{staticStyle:{cursor:"pointer"}})],1)],2):e._e()],1)],1)},je=[],Ue=p(Pe,Be,je,!1,null,"28e573ff");const A=Ue.exports,{t:g}=v(),Je=!0,qe=!1,Ke="value",Qe={name:"TmDateFilter",components:{FormItemLayout:x},props:{value:{type:[Array,String,Date],default:()=>null},field:{type:[String,Number],default:""},start:{type:[String,Number],default:""},end:{type:[String,Number],default:""},size:{type:String,default:"mini"},labelOptions:{type:Array,default:()=>[]},label:{type:[String,Function,Object,Array],default:""},type:{type:String,default:"daterange",validator:t=>["date","daterange","datetime","datetimerange","year","month","dates","months","years","week","monthrange"].includes(t)},format:{type:String,default:""},startPlaceholder:{type:String,default:void 0},endPlaceholder:{type:String,default:void 0},placeholder:{type:String,default:void 0},rangeSeparator:{type:String,default:"-"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},align:{type:String,default:"left"},popperClass:{type:String,default:""},defaultValue:{type:[Date,Array],default:null},defaultTime:{type:[Date,String,Array],default:null},shortcuts:{type:Array,default:()=>[]},pastOnly:{type:Boolean,default:!1},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},computed:{isRangeType(){return["daterange","datetimerange","monthrange"].includes(this.type)},computedStartPlaceholder(){if(this.isRangeType)return this.startPlaceholder!==void 0?this.startPlaceholder:g("startDate")},computedEndPlaceholder(){if(this.isRangeType)return this.endPlaceholder!==void 0?this.endPlaceholder:g("endDate")},computedFormat(){const t="yyyy";return this.format?this.format:this.type==="year"?t:this.type==="month"?`${t}-MM`:this.type==="date"?`${t}-MM-dd`:this.type==="dates"?`${t}-MM-dd`:this.type==="months"?`${t}-MM`:this.type==="years"?t:this.type==="week"?`${t}-MM-WW`:this.type==="datetime"?`${t}-MM-dd HH:mm:ss`:this.type==="datetimerange"?`${t}-MM-dd HH:mm:ss`:this.type==="daterange"?`${t}-MM-dd`:this.type==="monthrange"?`${t}-MM`:""},computedPickerOptions(){const t={};if(this.pastOnly&&(t.disabledDate=e=>e.getTime()>Date.now()),["daterange","datetimerange"].includes(this.type)){const e=this.type==="datetimerange";t.shortcuts=this.shortcuts.length>0?this.shortcuts:[{text:g("today"),onClick(i){const s=new Date,a=new Date;e&&(a.setHours(0,0,0,0),s.setHours(23,59,59,999)),i.$emit("pick",[a,s])}},{text:g("yesterday"),onClick(i){const s=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24),s.setTime(s.getTime()-3600*1e3*24),e&&(a.setHours(0,0,0,0),s.setHours(23,59,59,999)),i.$emit("pick",[a,s])}},{text:g("last7days"),onClick(i){const s=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*7),e&&(a.setHours(0,0,0,0),s.setHours(23,59,59,999)),i.$emit("pick",[a,s])}},{text:g("last30days"),onClick(i){const s=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*30),e&&(a.setHours(0,0,0,0),s.setHours(23,59,59,999)),i.$emit("pick",[a,s])}},{text:g("thisMonth"),onClick(i){const s=new Date,a=new Date;a.setDate(1),e&&(a.setHours(0,0,0,0),s.setHours(23,59,59,999)),i.$emit("pick",[a,s])}},{text:g("lastMonth"),onClick(i){const s=new Date,a=new Date;a.setMonth(a.getMonth()-1),a.setDate(1),s.setDate(0),e&&(a.setHours(0,0,0,0),s.setHours(23,59,59,999)),i.$emit("pick",[a,s])}}]}return t},computedShortcuts(){if(!["daterange","datetimerange"].includes(this.type))return[];if(this.shortcuts&&this.shortcuts.length>0)return this.shortcuts;const t=this.type==="datetimerange";return[{text:g("today"),value:()=>{const e=new Date,i=new Date;return t&&(i.setHours(0,0,0,0),e.setHours(23,59,59,999)),[i,e]}},{text:g("yesterday"),value:()=>{const e=new Date,i=new Date;return i.setTime(i.getTime()-3600*1e3*24),e.setTime(e.getTime()-3600*1e3*24),t&&(i.setHours(0,0,0,0),e.setHours(23,59,59,999)),[i,e]}},{text:g("last7days"),value:()=>{const e=new Date,i=new Date;return i.setTime(i.getTime()-3600*1e3*24*7),t&&(i.setHours(0,0,0,0),e.setHours(23,59,59,999)),[i,e]}},{text:g("last30days"),value:()=>{const e=new Date,i=new Date;return i.setTime(i.getTime()-3600*1e3*24*30),t&&(i.setHours(0,0,0,0),e.setHours(23,59,59,999)),[i,e]}},{text:g("thisMonth"),value:()=>{const e=new Date,i=new Date;return i.setDate(1),t&&(i.setHours(0,0,0,0),e.setHours(23,59,59,999)),[i,e]}},{text:g("lastMonth"),value:()=>{const e=new Date,i=new Date;return i.setMonth(i.getMonth()-1),i.setDate(1),e.setDate(0),t&&(i.setHours(0,0,0,0),e.setHours(23,59,59,999)),[i,e]}}]},computedDisabledDate(){return this.pastOnly?t=>t.getTime()>Date.now():null},computedDefaultTime(){let t=this.defaultTime;if(this.type==="datetimerange"&&!this.defaultTime&&(t=["00:00:00","23:59:59"]),this.isVue2)return t;if(t){if(this.type==="datetimerange"&&Array.isArray(t))return t.map(e=>{if(typeof e=="string"){const i=new Date,[s,a,l]=e.split(":").map(Number);return new Date(i.getFullYear(),i.getMonth(),i.getDate(),s,a,l||0)}return e});if(this.type==="datetime"&&typeof t=="string"){const e=new Date,[i,s,a]=t.split(":").map(Number);return new Date(e.getFullYear(),e.getMonth(),e.getDate(),i,s,a||0)}return t}},dateValue(){return this.isRangeType?this.start||this.end?[this.start,this.end]:this.value:this.value}},data(){return{t:g,isVue2:Je,isVue3:qe,getDefaultSize:y,valueField:Ke}},methods:{handleFieldChange(t){this.$emit("field-change",t)},handleDateChange(t){this.isRangeType?(this.$emit("value-change",t),t&&Array.isArray(t)&&t.length===2?(this.$emit("start-change",t),this.$emit("end-change",t)):(this.$emit("start-change",[]),this.$emit("end-change",[]))):this.$emit("value-change",t)},handleBlur(t){this.$emit("blur",t)},handleFocus(t){this.$emit("focus",t)}}};var Ge=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-options":e.labelOptions,field:e.field,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign},on:{"field-change":e.handleFieldChange}},[i("el-date-picker",{staticClass:"date-picker",attrs:{value:e.dateValue,type:e.type,size:e.getDefaultSize(),"range-separator":e.rangeSeparator,"start-placeholder":e.computedStartPlaceholder,"end-placeholder":e.computedEndPlaceholder,placeholder:e.placeholder,"picker-options":e.computedPickerOptions,format:e.computedFormat,"value-format":e.computedFormat,disabled:e.disabled,clearable:e.clearable,readonly:e.readonly,editable:e.editable,align:e.align,"popper-class":e.popperClass,"default-value":e.defaultValue,"default-time":e.computedDefaultTime},on:{input:e.handleDateChange,change:e.handleDateChange,blur:e.handleBlur,focus:e.handleFocus}})],1)},Ye=[],Xe=p(Qe,Ge,Ye,!1,null,"2de48d4b");const D=Xe.exports,Ze=!0,et={name:"TmCascaderFilter",components:{FormItemLayout:x},props:{value:{type:[String,Number,Array],default:""},options:{type:[Array,Function],default:()=>[]},label:{type:[String,Function,Object,Array],default:null},props:{type:Object,default:()=>({label:"label",value:"value",children:"children",expandTrigger:"hover"})},filterable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},collapseTags:{type:Boolean,default:!0},collapseTagsTooltip:{type:Boolean,default:!0},placeholder:{type:String,default:""},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{isVue2:Ze,getDefaultSize:y,selectedValue:this.value,optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value",children:this.props.children||"children"}},cascaderProps(){return _(c({},this.props),{expandTrigger:this.props.expandTrigger||"hover"})}},watch:{value:{immediate:!0,handler(t){this.selectedValue=t}},options:{immediate:!0,handler(t){this.initOptions(t)}},selectedValue(t){this.$emit("input",t),this.$emit("change",t)}},methods:{async initOptions(t){if(typeof t=="function")try{this.loading=!0;const e=await t();Array.isArray(e)&&(this.optionsList=e)}catch(e){console.error(e)}finally{this.loading=!1}else Array.isArray(t)&&(this.optionsList=t)}}};var tt=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign}},[i("div",{staticClass:"cascader"},[i("el-cascader",e._g(e._b({ref:"cascader",scopedSlots:e._u([{key:"default",fn:function({node:s,data:a}){return[e._t("default",function(){return[i("span",[e._v(e._s(a[e.propMap.label]))])]},{node:s,data:a})]}}],null,!0),model:{value:e.selectedValue,callback:function(s){e.selectedValue=s},expression:"selectedValue"}},"el-cascader",_(c({},e.$attrs),{size:e.getDefaultSize(),filterable:e.filterable,clearable:e.clearable,collapseTags:e.collapseTags,collapseTagsTooltip:e.collapseTagsTooltip,props:e.cascaderProps,placeholder:e.placeholder,options:e.optionsList,loading:e.loading}),!1),e.isVue2?e.$listeners:{}))],1)])},it=[],st=p(et,tt,it,!1,null,"be6225d9");const R=st.exports,at=!0,lt=!1,nt={name:"TmRadioFilter",components:{FormItemLayout:x},props:{value:{type:[String,Number],default:""},options:{type:[Array,Function],default:()=>[]},props:{type:Object,default:()=>({label:"label",value:"value"})},size:{type:String,default:"mini"},width:{type:[String,Number],default:200},label:{type:[String,Function,Object,Array],default:null},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{isVue2:at,isVue3:lt,getDefaultSize:y,selectedValue:this.value,optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}}},watch:{value:{immediate:!0,handler(t){this.selectedValue=t}},options:{immediate:!0,handler(t){this.$slots.default||this.initOptions(t)}},selectedValue(t){this.$emit("input",t),this.$emit("change",t)}},methods:{async initOptions(t){if(typeof t=="function")try{this.loading=!0;const e=await t();Array.isArray(e)&&(this.optionsList=e)}catch(e){console.error(e)}finally{this.loading=!1}else Array.isArray(t)&&(this.optionsList=t)}}};var rt=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign}},[i("el-radio-group",e._g(e._b({ref:"radioGroup",staticClass:"radio-group",model:{value:e.selectedValue,callback:function(s){e.selectedValue=s},expression:"selectedValue"}},"el-radio-group",_(c({},e.$attrs),{size:e.getDefaultSize()}),!1),e.isVue2?e.$listeners:{}),[e.$slots.default?[e._t("default")]:e._l(e.optionsList,function(s){return i("el-radio-button",e._b({key:s[e.propMap.value],staticStyle:{flex:"1"}},"el-radio-button",{[e.isVue3?"value":"label"]:s[e.propMap.value],disabled:s.disabled},!1),[e._t("option",function(){return[e._v(e._s(s[e.propMap.label]))]},{item:s})],2)})],2)],1)},ot=[],ut=p(nt,rt,ot,!1,null,"49789913");const M=ut.exports,dt=!0,ct=!1,ht={name:"TmCheckboxFilter",components:{FormItemLayout:x},props:{value:{type:Array,default:()=>[]},options:{type:[Array,Function],default:()=>[]},props:{type:Object,default:()=>({label:"label",value:"value"})},size:{type:String,default:"mini"},label:{type:[String,Function,Object,Array],default:null},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{isVue2:dt,isVue3:ct,getDefaultSize:y,selectedValue:this.value||[],optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}}},watch:{value:{immediate:!0,handler(t){this.selectedValue=t||[]}},options:{immediate:!0,handler(t){this.$slots.default||this.initOptions(t)}},selectedValue(t){this.$emit("input",t),this.$emit("change",t)}},methods:{async initOptions(t){if(typeof t=="function")try{this.loading=!0;const e=await t();Array.isArray(e)&&(this.optionsList=e)}catch(e){console.error(e)}finally{this.loading=!1}else Array.isArray(t)&&(this.optionsList=t)}}};var pt=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign}},[i("div",{staticClass:"checkbox-content"},[i("el-checkbox-group",e._g(e._b({ref:"checkboxGroup",model:{value:e.selectedValue,callback:function(s){e.selectedValue=s},expression:"selectedValue"}},"el-checkbox-group",_(c({},e.$attrs),{size:e.getDefaultSize()}),!1),e.isVue2?e.$listeners:{}),[e.$slots.default?[e._t("default")]:e._l(e.optionsList,function(s){return i("el-checkbox-button",e._b({key:s[e.propMap.value],staticStyle:{flex:"1"}},"el-checkbox-button",{[e.isVue3?"value":"label"]:s[e.propMap.value],disabled:s.disabled},!1),[e._t("option",function(){return[e._v(e._s(s[e.propMap.label]))]},{item:s})],2)})],2)],1)])},ft=[],mt=p(ht,pt,ft,!1,null,"c1549ec0");const H=mt.exports,gt=!0,bt={name:"TmSwitchFilter",components:{FormItemLayout:x},props:{value:{type:Boolean,default:!1},label:{type:[String,Function,Object,Array],default:""},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{isVue2:gt,getDefaultSize:y,switchValue:this.value}},watch:{value:{immediate:!0,handler(t){this.switchValue=t}},switchValue(t){this.$emit("input",t),this.$emit("change",t)}}};var yt=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign}},[i("div",{staticClass:"switch-content"},[i("el-switch",e._g(e._b({ref:"switch",attrs:{size:e.getDefaultSize()},model:{value:e.switchValue,callback:function(s){e.switchValue=s},expression:"switchValue"}},"el-switch",e.$attrs,!1),e.isVue2?e.$listeners:{}))],1)])},vt=[],Ct=p(bt,yt,vt,!1,null,"7455db21");const E=Ct.exports,_t=!0,xt=!1,Q="value",W="input",St={name:"TmTextareaFilter",components:{FormItemLayout:x},props:{label:{type:[String,Function,Object,Array],default:""},[Q]:{type:String,default:""},field:{type:[String,Number],default:""},placeholder:{type:String,default:""},labelOptions:{type:Array,default:()=>[]},autosize:{type:[Boolean,Object],default:()=>({minRows:1,maxRows:10})},maxlength:{type:[String,Number],default:""},minlength:{type:[String,Number],default:""},showWordLimit:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},resize:{type:String,default:"vertical",validator:t=>["none","both","horizontal","vertical"].includes(t)},tabindex:{type:[String,Number],default:""},validateEvent:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{isVue2:_t,isVue3:xt,getDefaultSize:y,inputValue:this.value}},computed:{selectedOption(){return!this.labelOptions||!this.labelOptions.length||!this.field?null:this.labelOptions.find(t=>t.value===this.field)}},watch:{[Q]:{immediate:!0,handler(t){this.inputValue=t}},inputValue(t){this.$emit(W,t)}},methods:{handleInput(t){this.inputValue=t,this.$emit(W,t)},handleChange(t){this.$emit("change",t)},handleFocus(t){this.$emit("focus",t)},handleBlur(t){this.$emit("blur",t)},handleClear(){this.inputValue="",this.$emit(W,""),this.$emit("clear")},handleFieldChange(t){this.$emit("field-change",t)},focus(){this.$refs.textarea.focus()},blur(){this.$refs.textarea.blur()},select(){this.$refs.textarea.select()}}};var $t=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-options":e.labelOptions,field:e.field,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign},on:{"field-change":e.handleFieldChange}},[i("div",{staticClass:"textarea"},[i("el-input",e._g(e._b({ref:"textarea",staticClass:"textarea-input",attrs:{size:e.getDefaultSize(),placeholder:e.placeholder,type:"textarea",autosize:e.autosize,maxlength:e.maxlength,minlength:e.minlength,"show-word-limit":e.showWordLimit,readonly:e.readonly,disabled:e.disabled,resize:e.resize,tabindex:e.tabindex,"validate-event":e.validateEvent},on:{input:e.handleInput,change:e.handleChange,focus:e.handleFocus,blur:e.handleBlur,clear:e.handleClear},model:{value:e.inputValue,callback:function(s){e.inputValue=s},expression:"inputValue"}},"el-input",e.$attrs,!1),e.isVue2?e.$listeners:{})),e.clearable&&e.inputValue?i("i",{staticClass:"textarea-clear-icon el-input__icon el-icon-circle-close",on:{click:e.handleClear}}):e._e()],1)])},Tt=[],wt=p(St,$t,Tt,!1,null,"e903b851");const I=wt.exports;var Ft=p({name:"DynamicSlot",props:{name:{type:String,required:!0},slotProps:{type:Object,default:()=>({})}},render(t){var a;const e=l=>{var n,o;if(!l)return null;{let u=(n=l.$scopedSlots)==null?void 0:n[this.name];if(!u&&((o=l.$slots)!=null&&o[this.name])){const f=l.$slots[this.name];u=()=>f}return u}},i=l=>{var n;return l?((n=l.$options)==null?void 0:n.name)==="TmTable":!1};let s=e(this.$parent);if(!s){let l=(a=this.$parent)==null?void 0:a.$parent;for(;l&&!s;){if(i(l)){s=e(l);break}l=l.$parent}}if(s){const l=typeof s=="function"?s(this.slotProps):s;{if(!l)return null;if(Array.isArray(l)){const n=l.filter(o=>{var u;return o&&!o.isComment&&(o.tag||((u=o.text)==null?void 0:u.trim()))});return n.length===0?null:n.length===1?n[0]:t("div",{style:{display:"contents"}},n)}return l}}return null}},null,null,!1,null,null);const Vt=Ft.exports,{t:zt}=v(),Lt=!0,kt=!1,Ot=["date","daterange","datetime","datetimerange","year","month","dates","months","years","week","monthrange"],At={name:"TmTableSearch",components:{TmSelect:O,TmInput:A,TmDate:D,TmCascader:R,TmRadio:M,TmCheckbox:H,TmSwitch:E,TmTextarea:I,DynamicSlot:Vt},props:{disabled:{type:Boolean,default:!1},searchColumns:{type:Array,default:null},searchForm:{type:Object,default:()=>({})},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{t:zt,isVue2:Lt,isVue3:kt,getCompatSize:m,getDefaultSize:y,DATE_TYPES:Ot,defaultValues:{}}},computed:{computedSearchForm:{get(){return this.searchForm},set(t){this.$emit("update:search-form",t)}},getLayoutProps(){return t=>{const e={};return t.labelWidth!==void 0?e.labelWidth=t.labelWidth:this.labelWidth!==void 0&&(e.labelWidth=this.labelWidth),t.inputWidth!==void 0?e.inputWidth=t.inputWidth:this.inputWidth!==void 0&&(e.inputWidth=this.inputWidth),t.direction!==void 0?e.direction=t.direction:this.direction!==void 0&&(e.direction=this.direction),t.labelAlign!==void 0?e.labelAlign=t.labelAlign:this.labelAlign!==void 0&&(e.labelAlign=this.labelAlign),e}}},mounted(){this.initDefaultValues()},methods:{isDateType(t){return this.DATE_TYPES.includes(t)},hasDefaultSlot(){const t=this.$slots.default;return t?this.isVue2?!!t:t()[0].children.length>0:!1},handleUpdate(t,e,i){const s=this.getFieldValue(t,i);s&&this.$emit("update:search-form",_(c({},this.computedSearchForm),{[s]:e}))},handleUpdateDate(t,e){const i=e||[],s=this.getFieldValue(t,"start"),a=this.getFieldValue(t,"end"),l=this.getFieldValue(t,"value"),n={};s&&(n[s]=i[0]),a&&(n[a]=i[1]),l&&(n[l]=i),this.$emit("update:search-form",c(c({},this.computedSearchForm),n))},getFieldValue(t,e){if(typeof t=="string")return t;if(t.fields&&e in t.fields){const i=t.fields[e];if(typeof i=="string")return i;if(Array.isArray(i))return i[0];if(i&&typeof i=="object")return i.name}},getFieldDefault(t,e){if(t.fields&&e in t.fields){const i=t.fields[e];if(Array.isArray(i)&&i.length>1)return i[1];if(i&&typeof i=="object"&&"default"in i)return i.default}},hasSearchSlot(t){const e="$scopedSlots";if(this[e][t])return!0;let s=this.$parent;for(;s;){const a=s[e];if(s.$options.name==="TmTable"&&(a!=null&&a[t]))return!0;s=s.$parent}return!1},initDefaultValues(){if(!this.searchColumns||!this.searchColumns.length)return;const t={};this.searchColumns.forEach(e=>{if(typeof e=="string"||!e.fields)return;const i=this.getFieldValue(e,"value"),s=this.getFieldValue(e,"label");if(e.type==="input"&&e.labelOptions&&e.labelOptions.length>0){const l=e.labelOptions[0];if(s)if(s in this.computedSearchForm)t[s]=this.computedSearchForm[s];else{const n=this.getFieldDefault(e,"label");n!==void 0?t[s]=n:l&&l.value!==void 0&&(t[s]=l.value)}i&&!(i in this.computedSearchForm)&&(t[i]="")}else if(this.isDateType(e.type)&&e.labelOptions&&e.labelOptions.length>0){const l=e.labelOptions[0];if(i&&!(i in this.computedSearchForm)&&(t[i]=[]),s)if(s in this.computedSearchForm)t[s]=this.computedSearchForm[s];else{const n=this.getFieldDefault(e,"label");n!==void 0?t[s]=n:l&&l.value!==void 0&&(t[s]=l.value)}}else if(e.type==="select"&&e.labelOptions&&e.labelOptions.length>0){const l=e.labelOptions[0];if(i&&!(i in this.computedSearchForm)&&(t[i]=e.multiple?[]:""),s)if(s in this.computedSearchForm)t[s]=this.computedSearchForm[s];else{const n=this.getFieldDefault(e,"label");n!==void 0?t[s]=n:l&&l.value!==void 0&&(t[s]=l.value)}}const a=this.getFieldDefault(e,"value");if(i&&a!==void 0&&!(i in this.computedSearchForm)?this.isDateType(e.type)&&!Array.isArray(a)?t[i]=[]:e.type==="checkbox"&&!Array.isArray(a)?t[i]=a?[a]:[]:e.type==="switch"&&typeof a!="boolean"?t[i]=!!a:t[i]=a:i&&!(i in this.computedSearchForm)&&(e.type==="checkbox"?t[i]=[]:e.type==="switch"&&(t[i]=!1)),this.isDateType(e.type)){const l=this.getFieldValue(e,"start"),n=this.getFieldValue(e,"end"),o=this.getFieldDefault(e,"start"),u=this.getFieldDefault(e,"end");l&&o!==void 0&&!(l in this.computedSearchForm)&&(t[l]=o),n&&u!==void 0&&!(n in this.computedSearchForm)&&(t[n]=u)}}),this.defaultValues=t,this.$emit("update:search-form",c(c({},t),this.computedSearchForm))},getSearchForm(){return this.computedSearchForm},handleSearch(){setTimeout(()=>{this.$emit("search",this.computedSearchForm)})},handleReset(){this.$emit("update:search-form",c({},this.defaultValues)),this.$emit("reset")}}};var Dt=function(){var e=this,i=e._self._c;return i("div",{staticClass:"table-search",class:`table-search--${e.isVue2?"v2":"v3"}`},[i("div",{staticClass:"search-content"},[e.hasDefaultSlot()?e._t("default"):e.searchColumns&&e.searchColumns.length?[e._l(e.searchColumns,function(s,a){return[typeof s=="string"?i("div",{key:`str-${s}-${a}`,staticClass:"search-item"},[i("dynamic-slot",{key:s,attrs:{name:`search-${s}`,"slot-props":{searchForm:e.searchForm}}})],1):i("div",{key:`obj-${a}`,staticClass:"search-item"},[s.fields?[e.hasSearchSlot(`search-${e.getFieldValue(s,"value")}`)?[i("dynamic-slot",{key:e.getFieldValue(s,"value"),attrs:{name:`search-${e.getFieldValue(s,"value")}`,"slot-props":{searchForm:e.searchForm,col:s}}})]:[i("div",{key:e.getFieldValue(s,"value")||`col-${a}`,staticStyle:{display:"flex"}},[s.type==="input"?i("tm-Input",e._b({attrs:{label:s.label,value:e.computedSearchForm[e.getFieldValue(s,"value")],field:e.computedSearchForm[e.getFieldValue(s,"label")],multiple:s.multiple,labelOptions:s.labelOptions,placeholder:s.placeholder},on:{"value-change":l=>e.handleUpdate(s,l,"value"),"field-change":l=>e.handleUpdate(s,l,"label"),search:e.handleSearch}},"tm-Input",e.getLayoutProps(s),!1)):e._e(),e.isDateType(s.type)?i("tm-date",e._b({attrs:{type:s.type,label:s.label,value:e.computedSearchForm[e.getFieldValue(s,"value")],field:e.computedSearchForm[e.getFieldValue(s,"label")],start:e.computedSearchForm[e.getFieldValue(s,"start")],end:e.computedSearchForm[e.getFieldValue(s,"end")],labelOptions:s.labelOptions,"start-placeholder":s.startPlaceholder,"end-placeholder":s.endPlaceholder,placeholder:s.placeholder,"range-separator":s.rangeSeparator,disabled:s.disabled,clearable:s.clearable,readonly:s.readonly,editable:s.editable,align:s.align,"popper-class":s.popperClass,"default-value":s.defaultValue,"default-time":s.defaultTime,shortcuts:s.shortcuts,"past-only":s.pastOnly,format:s.format},on:{"field-change":l=>e.handleUpdate(s,l,"label"),"value-change":l=>e.handleUpdateDate(s,l),"start-change":l=>e.handleUpdateDate(s,l),"end-change":l=>e.handleUpdateDate(s,l)}},"tm-date",e.getLayoutProps(s),!1)):e._e(),s.type==="select"?i("tm-select",e._b({attrs:{label:s.label,field:e.computedSearchForm[e.getFieldValue(s,"label")],options:s.options,labelOptions:s.labelOptions,placeholder:s.placeholder,multiple:s.multiple,"show-check-all":s.checkAll,"value-on-clear":s.valueOnClear,clearable:s.clearable},on:{"field-change":l=>e.handleUpdate(s,l,"label")},model:{value:e.computedSearchForm[e.getFieldValue(s,"value")],callback:function(l){e.$set(e.computedSearchForm,e.getFieldValue(s,"value"),l)},expression:"computedSearchForm[getFieldValue(col, 'value')]"}},"tm-select",e.getLayoutProps(s),!1)):e._e(),s.type==="cascader"?i("tm-cascader",e._b({attrs:{label:s.label,options:s.options,labelOptions:s.labelOptions,props:s.props,placeholder:s.placeholder,"show-check-all":s.checkAll},model:{value:e.computedSearchForm[e.getFieldValue(s,"value")],callback:function(l){e.$set(e.computedSearchForm,e.getFieldValue(s,"value"),l)},expression:"computedSearchForm[getFieldValue(col, 'value')]"}},"tm-cascader",e.getLayoutProps(s),!1)):e._e(),s.type==="radio"?i("tm-radio",e._b({attrs:{label:s.label,options:s.options,props:s.props},model:{value:e.computedSearchForm[e.getFieldValue(s,"value")],callback:function(l){e.$set(e.computedSearchForm,e.getFieldValue(s,"value"),l)},expression:"computedSearchForm[getFieldValue(col, 'value')]"}},"tm-radio",e.getLayoutProps(s),!1)):e._e(),s.type==="checkbox"?i("tm-checkbox",e._b({attrs:{label:s.label,options:s.options,props:s.props},model:{value:e.computedSearchForm[e.getFieldValue(s,"value")],callback:function(l){e.$set(e.computedSearchForm,e.getFieldValue(s,"value"),l)},expression:"computedSearchForm[getFieldValue(col, 'value')]"}},"tm-checkbox",e.getLayoutProps(s),!1)):e._e(),s.type==="switch"?i("tm-switch",e._b({attrs:{"active-text":s.activeText,"inactive-text":s.inactiveText,label:s.label,"active-color":s.activeColor,"inactive-color":s.inactiveColor},model:{value:e.computedSearchForm[e.getFieldValue(s,"value")],callback:function(l){e.$set(e.computedSearchForm,e.getFieldValue(s,"value"),l)},expression:"computedSearchForm[getFieldValue(col, 'value')]"}},"tm-switch",e.getLayoutProps(s),!1)):e._e(),s.type==="textarea"?i("tm-textarea",e._b({attrs:{field:e.computedSearchForm[e.getFieldValue(s,"label")],label:s.label,labelOptions:s.labelOptions,placeholder:s.placeholder,autosize:s.autosize,maxlength:s.maxlength,minlength:s.minlength,"show-word-limit":s.showWordLimit,readonly:s.readonly,disabled:s.disabled,resize:s.resize,clearable:s.clearable},on:{"field-change":l=>e.handleUpdate(s,l,"label")},model:{value:e.computedSearchForm[e.getFieldValue(s,"value")],callback:function(l){e.$set(e.computedSearchForm,e.getFieldValue(s,"value"),l)},expression:"computedSearchForm[getFieldValue(col, 'value')]"}},"tm-textarea",e.getLayoutProps(s),!1)):e._e()],1)]]:[i("div",{key:`error-${a}`,staticClass:"search-error-message"},[e._v(" 缺少 fields 配置,无法渲染此组件 ")])]],2)]})]:e._e(),i("div",{staticClass:"search-actions"},[i("el-button",{attrs:{type:"primary",size:e.getDefaultSize()},on:{click:e.handleSearch}},[e._v(e._s(e.t("query")))]),i("el-button",{attrs:{size:e.getDefaultSize()},on:{click:e.handleReset}},[e._v(e._s(e.t("reset")))])],1)],2)])},Rt=[],Mt=p(At,Dt,Rt,!1,null,"be7a7198");const N=Mt.exports,Ht=!0,Et={name:"TablePagination",props:{current:{type:Number,default:1},small:{type:Boolean,default:!0},pageSize:{type:Number,default:20},total:{type:Number,default:0}},data(){return{isVue2:Ht,getCompatSize:m}},methods:{handleSizeChange(t){this.$emit("size-change",t)},handleCurrentChange(t){this.$emit("current-change",t)}}};var Wt=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-pagination"},[e._t("pagination-left"),i("el-pagination",e._g(e._b({staticStyle:{"text-align":"right"},attrs:{"current-page":e.current,"page-size":e.pageSize,total:e.total,"page-sizes":[10,20,50,100,300,500,1e3,2e3],size:e.getCompatSize("mini"),layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.handleSizeChange,"update:current-page":function(s){return e.$emit("update:current",s)},"update:page-size":function(s){return e.$emit("update:pageSize",s)},"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1),e.isVue2?e.$listeners:{}))],2)},It=[],Nt=p(Et,Wt,It,!1,null,"36e6bd1d");const Pt=Nt.exports,Bt={name:"TmTableMenu",props:{size:{type:String,default:"mini"}}};var jt=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-table-menu",attrs:{size:"small",inline:""}},[i("div",{staticClass:"left"},[e._t("left")],2),i("div",{staticClass:"right"},[e._t("right")],2)])},Ut=[],Jt=p(Bt,jt,Ut,!1,null,"579dd2c3");const qt=Jt.exports,V=t=>t?t.data&&t.data.attrs||{}:{},P=(t,e)=>{t&&(t.data||(t.data={}),t.data.attrs||(t.data.attrs={}),typeof e=="object"&&Object.assign(t.data.attrs,e))},z={getTableConfig(t){try{const e=localStorage.getItem(`tm-table-config-${t}`);return Promise.resolve({data:{code:200,data:e}})}catch(e){return Promise.reject(e)}},setTableConfig(t){try{return localStorage.setItem(`tm-table-config-${t.key}`,t.info),Promise.resolve({data:{code:200,message:"success"}})}catch(e){return Promise.reject(e)}}},Kt=t=>z.getTableConfig(t.key),Qt=t=>z.setTableConfig(t),Gt=t=>{t&&(typeof t.getTableConfig=="function"&&(z.getTableConfig=t.getTableConfig),typeof t.setTableConfig=="function"&&(z.setTableConfig=t.setTableConfig))},{t:Yt}=v(),Xt=!0,Zt=!1,ei={formatter:(t,e,i,s)=>[void 0,null,""].includes(i)?"-":i},ti={name:"TmColumnConfig",components:{MoveIcon:fe,FixedLeftIcon:ge,FixedRightIcon:be,UploadIcon:ye,DownloadIcon:ve,DeleteIcon:Ce,MenuIcon:he,tmEllipsisText:$},props:{columns:{type:Array,default:()=>[]},tableKey:{type:String,default:"",required:!0},defaultColumns:{type:Array,default:()=>[]},maxFixedLeftQuantity:{type:[Number,String],default:void 0},maxFixedRightQuantity:{type:[Number,String],default:void 0},ignoredColumnConfigTypes:{type:Array,default:()=>["selection"]}},data(){return{t:Yt,isVue2:Xt,isVue3:Zt,getDefaultSize:y,getCompatSize:m,buttonType:{type:"text"},afterOpenDelay:{"open-delay":300},popoverVisible:!1,keyWord:"",sortedTableColumns:[],tableColumns:[],defaultColumnsConfig:[],columnMap:{},processedColumns:[],placement:"bottom",isDraggingFrozen:!1,isDraggingFrozenRight:!1,sortable:null,isConfigLoaded:!1,columnsCopy:[]}},computed:{filteredSortedTableColumns(){return this.keyWord?this.sortedTableColumns.filter(t=>this.getColumnLabel(t.prop).includes(this.keyWord)):this.sortedTableColumns},showFixedLimitTips(){return this.maxFixedLeftQuantity!==void 0||this.maxFixedRightQuantity!==void 0},isThanMaxFrozen(){return this.maxFixedLeftQuantity===void 0?!1:this.sortedTableColumns.filter(t=>t.fixed==="left").length>=this.maxFixedLeftQuantity},isThanMaxRightFrozen(){return this.maxFixedRightQuantity===void 0?!1:this.sortedTableColumns.filter(t=>t.fixed==="right").length>=this.maxFixedRightQuantity},computedTableKey(){if(this.tableKey)return this.tableKey;if(this.$route&&this.$route.path)return this.$route.path.slice(1).replace(/\//g,"-");throw new Error("tableKey is required")}},watch:{popoverVisible(t){t||this.handlePopoverHide()},columns:{handler(t){t&&t.length>0&&!this.isConfigLoaded&&this.initializeColumnConfig()},immediate:!0},tableColumns:{handler(t){t!=null&&t.length&&(this.initSortedTableColumns(),this.crateSortable(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)))},deep:!0}},methods:{findLastIndex(t,e){for(let i=t.length-1;i>=0;i--)if(e(t[i],i,t))return i;return-1},getColumnLabel(t){return!t||!this.columnMap[t]?t||"":V(this.columnMap[t]).label||t},initializeColumnConfig(){this.defaultColumns&&this.defaultColumns.length>0?this.defaultColumnsConfig=this.defaultColumns:this.processOriginalColumns(),this.loadColumnConfig()},processOriginalColumns(){const t=this.columns||[];let e={};this.defaultColumnsConfig=t.filter(i=>{const s=V(i);return!(!s.prop||this.ignoredColumnConfigTypes.includes(s.type))}).map((i,s)=>{const a=V(i),l=c(c({},ei),a);P(i,l),a.prop&&(e[a.prop]=i);const n=a.hasOwnProperty("visible")?a.visible!==!1:!0;return{prop:a.prop,fixed:a.fixed||"",sort:s,cancellable:a.hasOwnProperty("cancellable")?a.cancellable:!0,visible:n}}),this.columnMap=e},loadColumnConfig(){Kt({key:this.computedTableKey}).then(t=>{var i;if(t.data.code!==200)return;let e=JSON.parse(((i=t.data)==null?void 0:i.data)||null)||{};e.columnsConfig&&JSON.stringify(this.defaultColumnsConfig)===JSON.stringify(e.defaultColumnsConfig)?this.tableColumns=e.columnsConfig.map(s=>c({},s)):this.tableColumns=this.defaultColumnsConfig.map(s=>c({},s)),this.processedColumns=this.applyColumnConfig(this.tableColumns),this.isConfigLoaded=!0,this.$emit("complete",{columns:this.processedColumns,config:this.tableColumns,isInitialLoad:!0})}).catch(()=>{this.tableColumns=this.defaultColumnsConfig.map(t=>c({},t)),this.processedColumns=this.applyColumnConfig(this.tableColumns),this.isConfigLoaded=!0,this.$emit("complete",{columns:this.processedColumns,isInitialLoad:!0})})},applyColumnConfig(t,e=!1){let i=this.columns.filter(a=>{const l=V(a);return this.ignoredColumnConfigTypes.includes(l.type)}),s=[];return[...t].sort((a,l)=>{const n=a.sort!==void 0?a.sort:1/0,o=l.sort!==void 0?l.sort:1/0;return n-o}).forEach(a=>{if(a.prop){let l=this.columnMap[a.prop];l&&(P(l,{fixed:a.fixed||void 0,visible:a.visible}),(!e&&a.visible||e)&&s.push(l))}}),i.forEach(a=>{P(a,{visible:!0})}),[...i,...s]},crateSortable(){const t=this.$refs.sortListRef;if(!t)return;this.sortable&&(this.sortable.destroy(),this.sortable=null);const e=new d(t,{ghostClass:"blue-background-class",animation:150,easing:"cubic-bezier(1, 0, 0, 1)",handle:".row-title",draggable:".sort-item-wrapper",fallbackOnBody:!1,preventOnFilter:!0,removeCloneOnHide:!0,group:"columns",dragClass:"sortable-drag",onStart:({item:i})=>{const s=i.getAttribute("data-prop"),a=this.sortedTableColumns.find(l=>l.prop===s);this.isDraggingFrozen=a&&a.fixed==="left",this.isDraggingFrozenRight=a&&a.fixed==="right",this.draggedItemIndex=Array.from(t.children).indexOf(i),i.classList.add("sortable-drag")},onMove:i=>{const{target:s,related:a}=i;if(!s||!a)return!1;const l=a?a.getAttribute("data-prop"):null,n=l?this.sortedTableColumns.find(f=>f.prop===l):null,o=n&&n.fixed==="left",u=n&&n.fixed==="right";return this.isDraggingFrozen&&!o||this.isDraggingFrozenRight&&!u||!this.isDraggingFrozen&&!this.isDraggingFrozenRight&&(o||u)?(s.classList.add("no-drop-zone"),!1):(document.querySelectorAll(".no-drop-zone").forEach(f=>{f.classList.remove("no-drop-zone")}),!0)},onEnd:({item:i,newIndex:s,oldIndex:a})=>{if(s===void 0||a===void 0||s<0||a<0||s>=this.sortedTableColumns.length||a>=this.sortedTableColumns.length)return;document.querySelectorAll(".no-drop-zone").forEach(T=>{T.classList.remove("no-drop-zone")}),i.classList.remove("sortable-drag");const l=this.sortedTableColumns[a],n=l.fixed==="left",o=l.fixed==="right",u=s>0?this.sortedTableColumns[s-1]:null,f=s<this.sortedTableColumns.length-1?this.sortedTableColumns[s+1]:null;let b=!1;if(n?(u&&u.fixed!=="left"||f&&f.fixed==="right")&&(b=!0):o?(u&&u.fixed!=="right"||f&&f.fixed!=="right")&&(b=!0):(u&&u.fixed==="right"||f&&f.fixed==="left")&&(b=!0),b){this.rollbackSort();return}this.updateSortAfterDrag()}});this.sortable=e},rollbackSort(){this.sortedTableColumns=JSON.parse(JSON.stringify(this.columnsCopy))},updateSortAfterDrag(){const t=this.$refs.sortListRef;if(!t)return;Array.from(t.children||[]).filter(i=>i&&i.dataset&&i.dataset.prop).map(i=>i.dataset.prop).forEach((i,s)=>{this.sortedTableColumns.some(a=>a.prop===i?(a.sort=s,!0):!1)}),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns)},init(){this.tableColumns=Array.isArray(this.tableColumns)?[...this.tableColumns]:Array.isArray(this.defaultColumnsConfig)?[...this.defaultColumnsConfig]:[],this.initSortedTableColumns()},initSortedTableColumns(){this.tableColumns.forEach((t,e)=>{t.sort===void 0&&(t.sort=e)}),this.sortedTableColumns=[...this.tableColumns].sort((t,e)=>t.fixed==="left"&&e.fixed!=="left"?-1:t.fixed!=="left"&&e.fixed==="left"||t.fixed==="right"&&e.fixed!=="right"?1:t.fixed!=="right"&&e.fixed==="right"?-1:t.sort-e.sort)},setPlacement(){const e=this.$refs.operationRef.$el.getBoundingClientRect();(window.innerHeight||document.documentElement.clientHeight)-(e.bottom-window.scrollY)>512?this.placement="bottom":this.placement="left"},handleVisibleChange(t){this.popoverVisible=t},handlePopoverShow(){this.setPlacement(),this.init(),(()=>{try{document.removeEventListener("mouseup",window.sortableGlobalMouseUp),document.removeEventListener("mousemove",window.sortableGlobalMouseMove)}catch(e){}})(),this.$nextTick(()=>{this.crateSortable()})},handlePopoverHide(){this.sortable&&(this.sortable.destroy(),this.sortable=null);try{document.removeEventListener("mouseup",window.sortableGlobalMouseUp),document.removeEventListener("mousemove",window.sortableGlobalMouseMove),typeof d!="undefined"&&d.utils&&(document.removeEventListener("mousemove",d.utils.throttleCall),document.removeEventListener("mouseup",d.utils.throttleCall))}catch(t){}},handleSelectAll(){const t=this.tableColumns.some(e=>!e.visible);this.tableColumns.forEach(e=>{e.cancellable&&(e.visible=t)})},handleRestoreDefault(){this.tableColumns=JSON.parse(JSON.stringify(this.defaultColumnsConfig)),this.sortedTableColumns=[...this.tableColumns].sort((t,e)=>t.sort-e.sort)},canMoveTop(t,e){if(e===0)return!1;if(t.fixed==="left"){const i=this.sortedTableColumns[e-1];return i&&i.fixed==="left"}if(!t.fixed){const i=this.sortedTableColumns[e-1];return i&&i.fixed==="left"?!1:i&&!i.fixed}return t.fixed==="right"},moveTop(t,e){const i=this.sortedTableColumns,s=t.prop;if(t.fixed==="right"&&(t.fixed=""),t.fixed==="left")i.unshift(i.splice(e,1)[0]);else{const a=this.findLastIndex(this.sortedTableColumns,l=>l.fixed==="left");i.splice(a+1,0,i.splice(e,1)[0])}this.updateSortValues(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns),this.$nextTick(()=>{const a=this.$refs.sortListRef;if(a){const l=Array.from(a.children).find(n=>n.dataset&&n.dataset.prop===s);l&&l.scrollIntoView({behavior:"smooth",block:"nearest"})}})},frozenLeftHandle(t){const e=this.sortedTableColumns,i=e.splice(t,1)[0];if(i.fixed=i.fixed==="left"?"":"left",i.fixed==="left"){const s=this.findLastIndex(this.sortedTableColumns,a=>a.fixed==="left");e.splice(s+1,0,i)}else{const s=this.findLastIndex(this.sortedTableColumns,a=>a.fixed==="left");e.splice(s+1,0,i)}this.updateSortValues(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns)},frozenRightHandle(t){const e=this.sortedTableColumns,i=e.splice(t,1)[0];if(i.fixed=i.fixed==="right"?"":"right",i.fixed==="right"){const s=e.findIndex(a=>a.fixed==="right");s===-1?e.push(i):e.splice(s,0,i)}else{const s=e.findIndex(a=>a.fixed==="right");s===-1?e.push(i):e.splice(s,0,i)}this.updateSortValues(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns)},onSave(){var e;this.updateSortValues();const t=(e=this.tableColumns)==null?void 0:e.map(i=>{const s=this.sortedTableColumns.find(o=>o.prop===i.prop);s&&(i.sort=s.sort,i.fixed=s.fixed,i.visible=s.visible);const n=i,{label:a}=n;return ie(n,["label"])});Qt({key:this.computedTableKey,info:JSON.stringify({columnsConfig:t,defaultColumnsConfig:this.defaultColumnsConfig})}).then(i=>{i.data.code===200&&(this.processedColumns=this.applyColumnConfig(t,!0),this.$emit("complete",{columns:this.processedColumns,config:t,isInitialLoad:!1}),this.$message.success(this.t("saveSuccess")),this.popoverVisible=!1)})},updateSortValues(){this.sortedTableColumns.forEach((t,e)=>{t.sort=e})}},mounted(){var t;(t=this.tableColumns)!=null&&t.length&&(this.initSortedTableColumns(),this.crateSortable(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)))},beforeDestroy(){this.sortable&&(this.sortable.destroy(),this.sortable=null);try{document.removeEventListener("mouseup",window.sortableGlobalMouseUp),document.removeEventListener("mousemove",window.sortableGlobalMouseMove),typeof d!="undefined"&&d.utils&&(document.removeEventListener("mousemove",d.utils.throttleCall),document.removeEventListener("mouseup",d.utils.throttleCall))}catch(t){}}};var ii=function(){var e=this,i=e._self._c;return i("el-popover",e._g(e._b({attrs:{"popper-class":"column-config-popover",width:680,"show-arrow":!1,placement:e.placement,trigger:"click"},on:{show:e.handlePopoverShow,hide:e.handlePopoverHide},scopedSlots:e._u([{key:"reference",fn:function(){return[i("div",{staticStyle:{display:"inline-block","margin-left":"10px"}},[i("el-tooltip",e._b({attrs:{content:e.t("columnSetting"),placement:"top"}},"el-tooltip",e.afterOpenDelay,!1),[i("el-button",{ref:"operationRef",attrs:{size:e.getDefaultSize(),circle:""}},[i("MenuIcon")],1)],1)],1)]},proxy:!0}])},"el-popover",{[e.isVue3?"visible":"value"]:e.popoverVisible},!1),{[e.isVue3?"update:visible":"input"]:e.handleVisibleChange}),[e.popoverVisible?i("div",{staticClass:"container"},[i("div",{staticClass:"main-container"},[i("div",{staticClass:"left-content"},[i("div",{staticClass:"title"},[i("span",[e._v(e._s(e.t("SelectableFields"))+"("+e._s(e.tableColumns.length)+")")]),i("el-button",e._b({staticStyle:{"margin-left":"10px"},on:{click:e.handleSelectAll}},"el-button",e.buttonType,!1),[e._v(e._s(e.t("all")))])],1),i("div",{staticClass:"option-list"},[i("div",{staticStyle:{height:"100%","overflow-y":"auto"}},[e._l(e.tableColumns,function(s,a){return[s.prop?i("div",{key:a+s.prop,staticStyle:{width:"110px",display:"inline-block"}},[i("el-checkbox",{staticClass:"el-checkbox",attrs:{disabled:!s.cancellable,label:s.prop,value:s.prop},model:{value:s.visible,callback:function(l){e.$set(s,"visible",l)},expression:"col.visible"}},[i("TmEllipsisText",{attrs:{width:"80px",text:e.getColumnLabel(s.prop)}})],1)],1):e._e()]})],2)])]),i("div",{staticClass:"right-content"},[i("div",{staticClass:"search-box"},[i("el-input",{staticClass:"search-input",attrs:{size:e.getCompatSize("small"),clearable:"",placeholder:e.t("search")},model:{value:e.keyWord,callback:function(s){e.keyWord=s},expression:"keyWord"}})],1),e.showFixedLimitTips?i("div",{staticClass:"tips"}):e._e(),i("div",{ref:"sortListRef",staticClass:"sort-list"},e._l(e.filteredSortedTableColumns,function(s,a){return i("div",{key:s.prop,staticClass:"sort-item-wrapper",class:[s.fixed==="left"?"frozen":"",s.fixed==="right"?"frozenRight":"",s.fixed?"":"noFrozen"],attrs:{"data-prop":s.prop}},[s.visible?i("div",{staticClass:"sort-item"},[i("div",{staticClass:"row-title"},[i("MoveIcon",{staticStyle:{"flex-shrink":"0"}}),i("TmEllipsisText",{attrs:{text:e.getColumnLabel(s.prop)}})],1),i("div",{staticClass:"operation-btns"},[s.cancellable?i("el-tooltip",e._b({attrs:{content:e.t("cancel"),placement:"top"}},"el-tooltip",e.afterOpenDelay,!1),[i("el-button",e._b({staticClass:"iconfont-button delete-button",attrs:{size:e.getCompatSize("mini")},on:{click:function(l){s.visible=!1}}},"el-button",e.buttonType,!1),[i("DeleteIcon")],1)],1):e._e(),e.canMoveTop(s,a)?i("el-tooltip",e._b({attrs:{content:e.t("top"),placement:"top"}},"el-tooltip",e.afterOpenDelay,!1),[i("el-button",e._b({staticClass:"iconfont-button top-button",attrs:{size:e.getCompatSize("mini")},on:{click:function(l){return e.moveTop(s,a)}}},"el-button",e.buttonType,!1),[i("UploadIcon")],1)],1):e._e(),s.fixed!=="right"?i("el-tooltip",e._b({attrs:{content:s.fixed==="left"?e.t("cancelLeftFixed"):e.t("leftFixed"),placement:"top"}},"el-tooltip",e.afterOpenDelay,!1),[i("el-button",e._b({staticClass:"iconfont-button left-fixed-btn",class:{"active-fixed":s.fixed==="left"},attrs:{size:e.getCompatSize("mini"),disabled:s.fixed!=="left"&&e.isThanMaxFrozen},on:{click:function(l){return e.frozenLeftHandle(a)}}},"el-button",e.buttonType,!1),[i("FixedLeftIcon")],1)],1):e._e(),s.fixed!=="left"?i("el-tooltip",e._b({attrs:{content:s.fixed==="right"?e.t("cancelRightFixed"):e.t("rightFixed"),placement:"top"}},"el-tooltip",e.afterOpenDelay,!1),[i("el-button",e._b({staticClass:"iconfont-button right-fixed-btn",class:{"active-fixed":s.fixed==="right"},attrs:{size:e.getCompatSize("mini"),disabled:s.fixed!=="right"&&e.isThanMaxRightFrozen},on:{click:function(l){return e.frozenRightHandle(a)}}},"el-button",e.buttonType,!1),[i("FixedRightIcon")],1)],1):e._e()],1)]):e._e()])}),0)])]),i("div",{staticClass:"footer"},[i("div",{staticClass:"footer-left"},[i("el-button",{attrs:{size:e.getCompatSize("mini")},on:{click:e.handleRestoreDefault}},[e._v(e._s(e.t("restoreDefault")))])],1),i("div",{staticClass:"footer-right"},[i("el-button",{attrs:{size:e.getCompatSize("mini")},on:{click:function(s){e.popoverVisible=!1}}},[e._v(e._s(e.t("cancel")))]),i("el-button",{attrs:{size:e.getCompatSize("mini"),type:"primary"},on:{click:e.onSave}},[e._v(e._s(e.t("saveAndApply")))])],1)])]):e._e()])},si=[],ai=p(ti,ii,si,!1,null,"fc286487");const li=ai.exports,G=!0,Y=!1;function ki(t){return t}const ni={name:"TmTable",components:{TableSearch:N,TablePagination:Pt,TableMenu:qt,ColumnConfig:li,RefreshIcon:pe,ColumnRenderer:{props:["vnode"],render(){return this.$createElement(this.vnode.componentOptions.tag,this.vnode.data,this.vnode.children)}}},inheritAttrs:!1,props:{data:{type:[Array,Function],default:()=>[]},showSearch:{type:Boolean,default:!0},showMenu:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},pagination:{type:Object,default:()=>({})},height:{type:[String,Number]},calcHeight:{type:Number,default:0},dataAdapter:{type:Function,default:null},columnSettingButton:{type:Boolean,default:!0},refreshButton:{type:Boolean,default:!0},tableKey:{type:String,default:""},firstLoad:{type:Boolean,default:!0},maxFixedLeftQuantity:{type:Number},maxFixedRightQuantity:{type:Number},border:{type:Boolean,default:!0},searchColumns:{type:Array,default:null},searchForm:{type:Object,default:()=>({})},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{getDefaultSize:y,getCompatSize:m,isVue3:Y,isVue2:G,t:v().t,tableData:[],tableLoading:!1,columnsLoading:!1,tableReload:1,tableHeight:null,selectedRows:[],paginationInfo:{current:1,pageSize:20,total:void 0},originalColumns:[],displayColumns:[],isColumnConfigLoaded:!1,savedColumnConfig:null,slotsUpdateTrigger:0,lastSlotsHash:null,afterOpenDelay:{"open-delay":300}}},computed:{pageLoading(){return this.tableLoading||this.columnsLoading},computedTableKey(){if(this.tableKey)return this.tableKey;if(this.$route&&this.$route.path)return this.$route.path.slice(1).replace(/\//g,"-");throw new Error("tableKey is required")},computedShowPagination(){return this.showPagination&&typeof this.data=="function"},slotsHash(){return""}},watch:{data:{immediate:!0,handler(t){typeof t=="function"?!this.columnSettingButton||this.isColumnConfigLoaded&&!this.firstLoad?this.loadData():Array.isArray(t)&&(this.tableData=t):this.tableData=t}},height:{immediate:!0,handler(){this.getTableHeight()}},slotsHash:{handler(t,e){}}},created(){this.updateColumns()},mounted(){this.getTableHeight(),window.addEventListener("resize",this.getTableHeight)},beforeUpdate(){},updated(){this.$nextTick(()=>{this.checkAndUpdateColumns()})},beforeDestroy(){window.removeEventListener("resize",this.getTableHeight)},methods:{updateColumns(){this.originalColumns=this.$slots.default||[],this.columnSettingButton?this.isColumnConfigLoaded||(this.columnsLoading=!0):(this.displayColumns=this.originalColumns,this.isColumnConfigLoaded=!0)},getColumnsHash(t){return t.map((e,i)=>{var s,a,l,n,o;return e?e.key||((a=(s=e.data)==null?void 0:s.attrs)==null?void 0:a.prop)||((n=(l=e.componentOptions)==null?void 0:l.propsData)==null?void 0:n.prop)||((o=e.props)==null?void 0:o.prop)||`index-${i}`:`null-${i}`}).join(",")},checkAndUpdateColumns(){var t,e;try{const i=G?this.$slots.default||[]:((e=(t=this.$slots).default)==null?void 0:e.call(t))||[],s=this.getColumnsHash(i),a=this.lastSlotsHash||this.getColumnsHash(this.originalColumns);s!==a&&(this.lastSlotsHash=s,this.originalColumns=i,!this.columnSettingButton||!this.isColumnConfigLoaded?this.displayColumns=this.originalColumns:this.reapplyColumnConfig(),this.$nextTick(()=>{this.$refs.table&&this.$refs.table.doLayout(),this.$forceUpdate()}))}catch(i){}},handleUpdateSearchForm(t){this.$emit("update:search-form",t)},handleColumnConfigComplete(t){Array.isArray(t.columns)?(this.displayColumns=[...t.columns],this.savedColumnConfig=t.config||null):(this.displayColumns=[...this.originalColumns],this.savedColumnConfig=null),t.isInitialLoad?(this.isColumnConfigLoaded=!0,this.columnsLoading=!1,this.firstLoad&&typeof this.data=="function"&&this.loadData()):this.reloadTable()},reapplyColumnConfig(){if(!this.columnSettingButton||!this.isColumnConfigLoaded||!this.savedColumnConfig)return;const t=a=>{var l;return((l=a.data)==null?void 0:l.attrs)||{}},e={};this.originalColumns.forEach(a=>{const l=t(a);l.prop&&(e[l.prop]=a)});const i=[];this.originalColumns.forEach(a=>{t(a).type==="selection"&&i.push(a)}),[...this.savedColumnConfig].sort((a,l)=>{const n=a.sort!==void 0?a.sort:1/0,o=l.sort!==void 0?l.sort:1/0;return n-o}).forEach(a=>{a.prop&&e[a.prop]&&a.visible!==!1&&i.push(e[a.prop])}),this.originalColumns.forEach(a=>{const l=t(a),n=l.prop,o=l.type;if(n&&o!=="selection"){const u=this.savedColumnConfig.some(b=>b.prop===n),f=i.find(b=>t(b).prop===n);!u&&!f&&i.push(a)}}),this.displayColumns=i},isAutoHeight(){return this.height==="auto"},handleRefresh(){this.loadData()},async loadData(){if(Array.isArray(this.data))this.tableData=this.data;else if(typeof this.data=="function"){if(this.tableLoading)return;this.tableLoading=!0;try{const t=await this.data({paginationInfo:{pageSize:this.paginationInfo.pageSize,current:this.paginationInfo.current},params:this.searchForm}),{list:e,total:i,pageSize:s,current:a}=t;this.tableData=e;let l=c({},this.paginationInfo);i!==void 0&&(l.total=i),a!==void 0&&(l.current=a),s!==void 0&&(l.pageSize=s),this.paginationInfo=l}catch(t){}finally{this.tableLoading=!1}}},getTableHeight(){this.isAutoHeight()?this.$nextTick(()=>{const t=this.$refs.table,e=this.$refs.tmPagination;if(!t)return;const i=t.$el,s=e&&e.$el&&e.$el.offsetHeight||0;this.tableHeight=document.documentElement.clientHeight-i.offsetTop-s-this.calcHeight}):this.tableHeight=this.height,this.refreshTable()},search(){this.paginationInfo.current=1,this.loadData()},reset(){this.paginationInfo.current=1,this.$nextTick(()=>{this.loadData()})},handleSelectionChange(t){this.selectedRows=t,this.$emit("selection-change",t)},handleSizeChange(t){this.paginationInfo.pageSize=t,this.loadData(),this.$emit("size-change",t)},handleCurrentChange(t){this.paginationInfo.current=t,this.loadData(),this.$emit("current-change",t)},refreshTable(){this.$refs.table&&this.$refs.table.doLayout()},reloadTable(){this.tableReload++}}};var ri=function(){var e=this,i=e._self._c;return i("div",{ref:"tablePage",staticClass:"tm-table"},[e.searchColumns&&e.searchColumns.length>0?i("table-search",{ref:"search",attrs:{disabled:e.pageLoading,"search-columns":e.searchColumns,"search-form":e.searchForm,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign},on:{search:e.search,reset:e.reset,"update:search-form":e.handleUpdateSearchForm}},[e._t("search")],2):e._e(),e._t("between-search-menu"),e.showMenu?i("table-menu",{scopedSlots:e._u([{key:"left",fn:function(){return[e._t("menu-left")]},proxy:!0},{key:"right",fn:function(){return[e._t("menu-right"),e.refreshButton&&typeof e.data=="function"?i("el-tooltip",e._b({attrs:{content:e.t("refresh"),placement:"top"}},"el-tooltip",e.afterOpenDelay,!1),[i("el-button",{attrs:{circle:"",size:e.getDefaultSize()},on:{click:e.handleRefresh}},[i("RefreshIcon")],1)],1):e._e(),e.columnSettingButton?i("ColumnConfig",{attrs:{maxFixedLeftQuantity:e.maxFixedLeftQuantity,maxFixedRightQuantity:e.maxFixedRightQuantity,tableKey:e.computedTableKey,columns:e.originalColumns},on:{complete:e.handleColumnConfigComplete}}):e._e()]},proxy:!0}],null,!0)}):e._e(),e._t("between-menu-table"),i("el-table",e._g(e._b({directives:[{name:"loading",rawName:"v-loading",value:e.pageLoading,expression:"pageLoading"}],key:e.tableReload,ref:"table",attrs:{data:e.tableData,height:e.tableHeight,size:e.getCompatSize("mini")},on:{"selection-change":e.handleSelectionChange}},"el-table",_(c({},e.$attrs),{border:e.border}),!1),e.isVue2?e.$listeners:{}),e._l(e.displayColumns,function(s){return i("columnRenderer",{key:`${e.isVue3?s.id:s.data.attrs.prop}-${e.slotsUpdateTrigger}`,attrs:{vnode:s}})}),1),e._t("between-table-pagination"),e.computedShowPagination?i("table-pagination",{ref:"tmPagination",attrs:{"page-size":e.paginationInfo.pageSize,current:e.paginationInfo.current,total:e.paginationInfo.total,disabled:e.tableLoading},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange},scopedSlots:e._u([{key:"pagination-left",fn:function(){return[e._t("pagination-left")]},proxy:!0}],null,!0)}):e._e(),e._t("after-pagination")],2)},oi=[],ui=p(ni,ri,oi,!1,null,"732947c2");const B=ui.exports,di=!0,ci=!1,hi={name:"TmTableColumn",inheritAttrs:!1,computed:{isVisible(){return this.$attrs.visible!==!1},slots(){return this.$scopedSlots}},data(){return{isVue2:di,isVue3:ci}},created(){this.$parent&&this.$parent.$emit&&this.$parent.$emit("column-initialized",{prop:this.$attrs.prop,visible:this.$attrs.visible!==!1})}};var pi=function(){var e=this,i=e._self._c;return e.isVisible?i("el-table-column",e._g(e._b({scopedSlots:e._u([e._l(e.slots,function(s,a){return{key:a,fn:function(l){return[e._t(a,null,null,l)]}}})],null,!0)},"el-table-column",e.$attrs,!1),e.isVue2?e.$listeners:{})):e._e()},fi=[],mi=p(hi,pi,fi,!1,null,null);const j=mi.exports,{t:U}=v(),gi={name:"TmAdvancedEllipsisText",components:{CopyIcon:K},props:{rows:{type:Number,default:1},width:{type:String,default:"100%"},maxWidth:{type:String,default:""},showToolbar:{type:Boolean,default:!1},text:{type:String,default:""},showTooltip:{type:Boolean,default:!0},copyable:{type:Boolean,default:!1}},data(){return{isVue2:!0,originalText:"",isHovered:!1,lineHeight:0,containerWidth:0,resizeObserver:null,isCalculating:!1,frontLines:[],lastLineText:"",isLastLineEllipsis:!1,tableRowElement:null}},computed:{containerStyle(){const t={};return this.maxWidth?(t.maxWidth=this.maxWidth,t.width=this.width):t.width=this.width,t},hasToolbarSlot(){return this.$slots.toolbar?this.$slots.toolbar&&this.$slots.toolbar.length>0:!1},hasToolbarContent(){return this.copyable||this.hasToolbarSlot},shouldShowToolbar(){return this.showToolbar||this.isHovered&&this.hasToolbarContent}},mounted(){this.initComponent(),this.setupResizeObserver(),this.setupTableRowHover()},updated(){const t=this.getTextContent();t!==this.originalText&&(this.originalText=t,this.$nextTick(()=>{this.calculateLayout()}))},beforeDestroy(){this.cleanupResizeObserver(),this.cleanupTableRowHover()},beforeUnmount(){this.cleanupResizeObserver(),this.cleanupTableRowHover()},watch:{text:{handler(){this.$nextTick(()=>{this.originalText=this.getTextContent(),this.calculateLayout()})},immediate:!0},rows(){this.$nextTick(()=>{this.calculateLayout()})},shouldShowToolbar(){this.$nextTick(()=>{this.calculateLayout()})},"$slots.default":{handler(){this.$nextTick(()=>{this.originalText=this.getTextContent(),this.calculateLayout()})},deep:!0}},methods:{initComponent(){this.$nextTick(()=>{this.originalText=this.getTextContent(),this.calculateLineHeight(),this.$nextTick(()=>{this.calculateLayout()})})},handleCopy(){navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(this.originalText).then(()=>{this.$message.success(U("copySuccess"))}).catch(()=>{this.fallbackCopy()}):this.fallbackCopy()},fallbackCopy(){const t=document.createElement("textarea");t.value=this.originalText,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),this.$message.success(U("copySuccess"))}catch(e){this.$message.error(U("copyFailed"))}document.body.removeChild(t)},getTextContent(){return this.$slots.default?this.$slots.default.map(e=>e.text?e.text:e.children&&typeof e.children=="string"?e.children:e.children&&Array.isArray(e.children)?e.children.map(i=>i.text||"").join(""):"").join(""):this.text||""},calculateLineHeight(){const t=this.$refs.containerRef;if(!t)return;const e=window.getComputedStyle(t);this.containerWidth=t.offsetWidth;const i=this.$refs.measureRef;if(i){this.setMeasureElementStyle(i,{width:this.containerWidth+"px",wordBreak:"break-all",whiteSpace:"normal"}),i.textContent="测",i.offsetHeight;const s=i.offsetHeight;i.innerHTML="",this.lineHeight=s}else{const s=e.lineHeight;if(s&&s!=="normal")this.lineHeight=parseInt(s);else{const a=parseInt(e.fontSize);this.lineHeight=a*1.2}}},calculateLayout(){if(!this.isCalculating){if(!this.originalText||this.rows<=0){this.frontLines=[],this.lastLineText=this.originalText||"",this.isLastLineEllipsis=!1;return}this.isCalculating=!0,this.$nextTick(()=>{requestAnimationFrame(()=>{this.performLayoutCalculation()})})}},performLayoutCalculation(){const t=this.originalText;if(this.rows===1)this.frontLines=[],this.lastLineText=t,this.isLastLineEllipsis=this.checkIfTextOverflows(t);else{const e=this.lineHeight;if(this.getTextHeight(t)<=e)this.frontLines=[],this.lastLineText=t,this.isLastLineEllipsis=this.checkIfTextOverflows(t);else{const s=this.lineHeight*(this.rows-1),a=this.findTextForHeight(t,s);this.frontLines=this.splitTextToLines(a);const l=t.substring(a.length);this.lastLineText=l,this.isLastLineEllipsis=l.length>0&&this.checkIfTextOverflows(l)}}this.isCalculating=!1},findTextForHeight(t,e){if(this.getTextHeight(t)<=e)return t;let i=0,s=t.length,a="";for(;i<=s;){const l=Math.floor((i+s)/2),n=t.substring(0,l);this.getTextHeight(n)<=e?(a=n,i=l+1):s=l-1}return a},splitTextToLines(t){if(!t)return[];const e=[];let i=t;for(;i.length>0;){const s=this.findTextForHeight(i,this.lineHeight);if(s.length===0)break;e.push(s),i=i.substring(s.length)}return e},checkIfTextOverflows(t){if(!t)return!1;const e=this.getTextWidth(t),i=this.shouldShowToolbar&&this.hasToolbarContent?this.getToolbarWidth():0,s=this.containerWidth-i-5;return e>s},getToolbarWidth(){let t=0;return this.copyable&&(t+=20),this.hasToolbarSlot&&(t+=40),t},getTextHeight(t){return this.measureText(t,{width:this.containerWidth+"px",wordBreak:"break-all",whiteSpace:"normal"})},getTextWidth(t){return this.measureText(t,{whiteSpace:"nowrap"})},measureText(t,e={}){if(!this.$refs.containerRef||!this.$refs.measureRef)return 0;const i=this.$refs.measureRef,s=i.style.cssText;this.setMeasureElementStyle(i,e),i.textContent=t,i.offsetHeight;const a=e.whiteSpace==="nowrap"?i.offsetWidth:i.offsetHeight;return i.style.cssText=s,i.innerHTML="",a},setMeasureElementStyle(t,e={}){const i=window.getComputedStyle(this.$refs.containerRef);t.style.cssText="",t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.visibility="hidden",t.style.pointerEvents="none",t.style.zIndex="-1",t.style.fontSize=i.fontSize,t.style.fontFamily=i.fontFamily,t.style.fontWeight=i.fontWeight,t.style.lineHeight=i.lineHeight,t.style.letterSpacing=i.letterSpacing,t.style.wordSpacing=i.wordSpacing,t.style.padding="0",t.style.margin="0",t.style.border="none",t.style.boxSizing="border-box",Object.entries(e).forEach(([s,a])=>{t.style[s]=a})},handleMouseEnter(){this.isHovered=!0},handleMouseLeave(){this.isHovered=!1},setupResizeObserver(){typeof ResizeObserver!="undefined"&&(this.resizeObserver=new ResizeObserver(t=>{const e=t[0];if(e){const i=e.contentRect.width;Math.abs(i-this.containerWidth)>1&&requestAnimationFrame(()=>{this.calculateLineHeight(),this.calculateLayout()})}}),this.$refs.containerRef&&this.resizeObserver.observe(this.$refs.containerRef))},cleanupResizeObserver(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)},setupTableRowHover(){let t=this.$el;for(;t&&t!==document.body;){if(t.classList&&t.classList.contains("el-table__row")){this.tableRowElement=t;break}t=t.parentElement}this.tableRowElement&&(this.tableRowElement.addEventListener("mouseenter",this.handleMouseEnter),this.tableRowElement.addEventListener("mouseleave",this.handleMouseLeave))},cleanupTableRowHover(){this.tableRowElement&&(this.tableRowElement.removeEventListener("mouseenter",this.handleMouseEnter),this.tableRowElement.removeEventListener("mouseleave",this.handleMouseLeave),this.tableRowElement=null)}}};var bi=function(){var e=this,i=e._self._c;return i("div",{ref:"containerRef",staticClass:"tm-ellipsis-text",style:e.containerStyle,on:{mouseenter:e.handleMouseEnter,mouseleave:e.handleMouseLeave}},[e.showTooltip&&e.isLastLineEllipsis?i("el-tooltip",e._b({attrs:{content:e.originalText,disabled:!e.showTooltip||!e.isLastLineEllipsis,placement:"top"}},"el-tooltip",{[e.isVue2?"open-delay":"show-after"]:300},!1),[i("div",{staticClass:"tm-ellipsis-text-wrapper"},[e._l(e.frontLines,function(s,a){return i("div",{key:"front-"+a,staticClass:"tm-ellipsis-line",domProps:{innerHTML:e._s(s)}})}),i("div",{staticClass:"tm-ellipsis-last-line"},[i("div",{staticClass:"tm-ellipsis-text-part",domProps:{innerHTML:e._s(e.lastLineText)}}),e.shouldShowToolbar&&e.hasToolbarContent?i("div",{staticClass:"tm-ellipsis-toolbar-part"},[e.copyable?i("CopyIcon",{staticClass:"icon-item",on:{click:e.handleCopy}}):e._e(),e._t("toolbar")],2):e._e()])],2)]):i("div",{staticClass:"tm-ellipsis-text-wrapper"},[e._l(e.frontLines,function(s,a){return i("div",{key:"front-"+a,staticClass:"tm-ellipsis-line",domProps:{innerHTML:e._s(s)}})}),i("div",{staticClass:"tm-ellipsis-last-line"},[i("div",{staticClass:"tm-ellipsis-text-part",domProps:{innerHTML:e._s(e.lastLineText)}}),e.shouldShowToolbar&&e.hasToolbarContent?i("div",{staticClass:"tm-ellipsis-toolbar-part"},[e.copyable?i("CopyIcon",{staticClass:"icon-item",on:{click:e.handleCopy}}):e._e(),e._t("toolbar")],2):e._e()])],2),i("div",{ref:"measureRef",staticClass:"tm-ellipsis-measure"})],1)},yi=[],vi=p(gi,bi,yi,!1,null,"14f27c2e");const J=vi.exports,X={install:{install(t,e={}){[B,j,$,J].forEach(i=>t.component(i.name,i)),e.tableConfigProvider&&Gt(e.tableConfigProvider),e.lang&&w(e.lang||"zh-CN")}}.install,Table:B,Column:j,Search:N,Select:O,Input:A,Date:D,Cascader:R,Radio:M,Checkbox:H,Switch:E,Textarea:I,EllipsisText:$,AdvancedEllipsisText:J,setLang:w,useLocale:v};typeof window!="undefined"&&window.Vue&&X.install(window.Vue),r.AdvancedEllipsisText=J,r.Cascader=R,r.Checkbox=H,r.Column=j,r.Date=D,r.EllipsisText=$,r.Input=A,r.Radio=M,r.Search=N,r.Select=O,r.Switch=E,r.Table=B,r.Textarea=I,r.default=X,r.setLang=w,r.useLocale=v,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(r,h){typeof exports=="object"&&typeof module!="undefined"?h(exports,require("vue"),require("sortablejs")):typeof define=="function"&&define.amd?define(["exports","vue","sortablejs"],h):(r=typeof globalThis!="undefined"?globalThis:r||self,h(r.TmTable={},r.Vue,r.Sortable))})(this,function(r,h,d){"use strict";var _i=Object.defineProperty,xi=Object.defineProperties;var Si=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var Z=(r,h,d)=>h in r?_i(r,h,{enumerable:!0,configurable:!0,writable:!0,value:d}):r[h]=d,c=(r,h)=>{for(var d in h||(h={}))ee.call(h,d)&&Z(r,d,h[d]);if(L)for(var d of L(h))te.call(h,d)&&Z(r,d,h[d]);return r},_=(r,h)=>xi(r,Si(h));var ie=(r,h)=>{var d={};for(var m in r)ee.call(r,m)&&h.indexOf(m)<0&&(d[m]=r[m]);if(r!=null&&L)for(var m of L(r))h.indexOf(m)<0&&te.call(r,m)&&(d[m]=r[m]);return d};const m=t=>t,y=()=>"mini",se={today:"今天",yesterday:"昨天",last7days:"最近7天",last30days:"最近30天",thisMonth:"本月",lastMonth:"上月",checkAll:"全选",search:"搜索",query:"查询",reset:"重置",columnSetting:"列设置",refresh:"刷新",cancel:"取消",fixedLeft:"固定在左侧",fixedRight:"固定在右侧",top:"置顶",restoreDefault:"恢复默认",saveAndApply:"保存并应用",startDate:"开始日期",endDate:"结束日期",all:"全选",SelectableFields:"可选择字段",fixedColumns:"固定列",leftmost:"左侧最多",rightmost:"右侧最多",items:"项",accurateSearchTips:"每行一个,支持多个值",accurateSearchPlaceholder:"精确搜索,一行一项",selectPlaceholder:"请选择",clear:"清空",saveSuccess:"保存成功",cancelRightFixed:"取消右侧固定",rightFixed:"固定到右侧",cancelLeftFixed:"取消左侧固定",leftFixed:"固定到左侧",cancelTop:"取消置顶",copySuccess:"复制成功",copyFailed:"复制失败"},ae={today:"Today",yesterday:"Yesterday",last7days:"Last 7 days",last30days:"Last 30 days",thisMonth:"This month",lastMonth:"Last month",checkAll:"Check all",search:"Search",query:"Search",reset:"Reset",columnSetting:"Column Setting",refresh:"Refresh",cancel:"Cancel",fixedLeft:"Fixed left",fixedRight:"Fixed right",top:"Top",restoreDefault:"Restore default",saveAndApply:"Save and apply",startDate:"Start date",endDate:"End date",all:"All",SelectableFields:"Fields",fixedColumns:"Fixed columns",leftmost:"Leftmost",rightmost:"Rightmost",items:"item(s)",accurateSearchTips:"One per line, supporting multiple values",accurateSearchPlaceholder:"Accurate search, one per line",selectPlaceholder:"Please select",clear:"Clear",saveSuccess:"Successfully saved",cancelRightFixed:"Cancel right fixed",rightFixed:"Fixed to right",cancelLeftFixed:"Cancel left fixed",leftFixed:"Fixed to left",cancelTop:"Cancel top",copySuccess:"Copy successfully",copyFailed:"Copy failed"};var q;const le={"zh-CN":se,"en-US":ae};let S={value:"zh-CN"};{const t=require("vue");t.observable||(q=t.default)!=null&&q.observable?S=t.default.observable(S):S=new t({data(){return{currentLang:S}}}).$data.currentLang}const ne=t=>{var e;return((e=le[S.value])==null?void 0:e[t])||t},w=t=>{S.value=t},v=()=>({t:ne,setLang:w,currentLang:S});function p(t,e,i,s,a,l,n,o){var u=typeof t=="function"?t.options:t;return e&&(u.render=e,u.staticRenderFns=i,u._compiled=!0),l&&(u._scopeId="data-v-"+l),{exports:t,options:u}}const re={name:"BaseIcon",props:{path:{type:String},size:{type:[String,Number]},color:{type:String}},methods:{handleClick(){this.$emit("click")}}};var oe=function(){var e=this,i=e._self._c;return i("i",{staticClass:"tm-icon",on:{click:e.handleClick}},[i("svg",{style:{color:e.color},attrs:{width:e.size,height:e.size,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:e.path}})])])},ue=[],de=p(re,oe,ue,!1,null,"1c30ca93");const ce=de.exports,C=Object.entries({menu:"M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z",more:"M76.92892277 192.94787572h864.34120754c23.20379058 0 46.40758118-17.40284367 46.40758118-46.40758118s-23.20379058-46.40758118-46.40758118-46.40758116H76.92892277c-29.00473897 0-46.40758264 17.40284367-46.40758264 46.40758116s23.20379058 46.40758118 46.40758264 46.40758118zM941.27013031 465.59241882H76.92892277c-29.00473897 0-46.40758264 17.40284367-46.40758264 46.40758118s23.20379058 46.40758118 46.40758264 46.40758118h864.34120754c23.20379058 0 46.40758118-17.40284367 46.40758118-46.40758118s-23.20379058-46.40758118-46.40758118-46.40758118zM941.27013031 825.25117589H76.92892277c-29.00473897 0-46.40758264 17.40284367-46.40758264 46.40758118s23.20379058 46.40758118 46.40758264 46.40758264h864.34120754c23.20379058 0 46.40758118-17.40284367 46.40758118-46.40758264s-23.20379058-46.40758118-46.40758118-46.40758118z",refresh:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z",move:"M238.93333333 102.4a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0z m409.6 0a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0zM238.93333333 375.46666667a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0z m409.6 0a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0z m-409.6 273.06666666a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0z m409.6 0a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0z m-341.33333333 204.8a68.26666667 68.26666667 0 1 0 0 136.53333334 68.26666667 68.26666667 0 0 0 0-136.53333334z m341.33333333 68.26666667a68.26666667 68.26666667 0 1 1 136.53333334 0 68.26666667 68.26666667 0 0 1-136.53333334 0z","column-setting":"M436.05333334 18.36373333a109.22666667 109.22666667 0 0 1 109.22666666 0l345.56586667 199.54346667c33.792 19.52426667 54.61333333 55.56906667 54.61333333 94.54933333V580.26666667h-81.92V312.45653333a27.30666667 27.30666667 0 0 0-13.65333333-23.62026666L504.32 89.2928a27.30666667 27.30666667 0 0 0-27.30666666 0L131.44746667 288.83626667a27.30666667 27.30666667 0 0 0-13.65333333 23.62026666v399.08693334a27.30666667 27.30666667 0 0 0 13.65333333 23.62026666L477.01333334 934.7072a27.30666667 27.30666667 0 0 0 27.30666666 0l54.61333334-31.5392v94.54933333l-13.65333334 7.91893334a109.22666667 109.22666667 0 0 1-109.22666666 0l-345.56586667-199.54346667a109.22666667 109.22666667 0 0 1-54.61333333-94.54933333V312.45653333c0-38.98026667 20.82133333-75.09333333 54.61333333-94.54933333L436.05333334 18.36373333z","fixed-left":"M843.36363653 311.54545478l-53.18181827 1e-8-20.45454521 28.63636347-163.63636435 204.54545479-24.54545391 28.63636347 12.27272695 36.81818175c8.18181826 28.63636347 12.27272695 57.27272695 12.27272696 85.90909042 0 32.72727305-4.09090869 61.36363652-16.36363565 90-4.09090869 16.36363653-12.27272695 32.72727306-24.54545479 49.09090957l-163.63636347-163.63636347-40.90909131-40.90909132-12.27272695-12.27272695-163.63636348-163.63636347c28.63636347-16.36363653 61.36363652-28.63636347 94.09090869-32.72727305 45-8.18181826 90-4.09090869 134.99999999 8.18181826l36.81818175 12.27272695 28.63636347-24.54545391 204.54545479-163.63636435 28.63636347-16.36363564 0-32.72727305L712.45454521 184.72727305l130.90909132 126.81818173zM941.54545479 327.90909131c0-8.18181826-4.09090869-16.36363653-8.18181826-24.54545478L720.63636348 94.72727305c-12.27272695-16.36363653-36.81818174-12.27272695-49.09090869 4.0909087-20.45454521 28.63636347-28.63636347 65.45454521-28.63636348 98.18181825l0 4.09090869-204.54545478 163.63636436c-110.45454521-36.81818174-233.18181826-16.36363653-327.27272784 61.36363564-8.18181826 8.18181826-12.27272695 16.36363653-12.27272694 24.54545478 0 8.18181826 4.09090869 16.36363653 8.18181825 24.5454548l196.36363653 196.36363652-212.72727305 212.72727216c-4.09090869 4.09090869-8.18181826 12.27272695-8.18181826 20.4545461s4.09090869 16.36363653 8.18181826 20.4545452c12.27272695 12.27272695 32.72727306 12.27272695 45 1e-8L352.45454522 716.54545479l196.36363652 196.36363652c12.27272695 12.27272695 36.81818174 12.27272695 49.09090957-4.09090957C651.09090869 847.45454521 675.63636347 773.81818174 675.63636346 696.09090869c0-36.81818173-4.09090869-73.63636348-16.36363651-106.36363564l163.63636436-204.54545479c36.81818173 0 73.63636348-8.18181826 106.36363564-28.63636347C937.45454519 348.36363653 941.54545478 336.09090869 941.54545479 327.90909131z","fixed-right":"M311.54545479 180.63636347v53.18181827l28.63636347 20.45454521 204.54545479 163.63636436 28.63636347 24.5454539 36.81818174-12.27272695c28.63636347-8.18181826 57.27272695-12.27272695 85.90909043-12.27272695 32.72727305 0 61.36363652 4.09090869 90 16.36363564 16.36363653 4.09090869 32.72727305 12.27272695 49.09090957 24.54545479l-163.63636347 163.63636347-40.90909132 40.90909131-12.27272695 12.27272695-163.63636347 163.63636348c-16.36363653-28.63636347-28.63636347-61.36363652-32.72727305-94.09090869-8.18181826-45-4.09090869-90 8.18181826-135l12.27272695-36.81818174-24.5454539-28.63636347-163.63636436-204.54545479-16.36363564-28.63636347h-32.72727305H184.72727305l126.81818174-130.90909132zM327.90909131 82.45454521c-8.18181826 0-16.36363653 4.09090869-24.54545478 8.18181826L94.72727305 303.36363652c-16.36363653 12.27272695-12.27272695 36.81818174 4.09090869 49.09090869 28.63636347 20.45454521 65.45454521 28.63636347 98.18181826 28.63636348h4.09090869l163.63636436 204.54545478c-36.81818174 110.45454521-16.36363653 233.18181826 61.36363564 327.27272784 8.18181826 8.18181826 16.36363653 12.27272695 24.54545478 12.27272695 8.18181826 0 16.36363653-4.09090869 24.54545479-8.18181826l196.36363653-196.36363653 212.72727216 212.72727305c4.09090869 4.09090869 12.27272695 8.18181826 20.4545461 8.18181827s16.36363653-4.09090869 20.45454521-8.18181827c12.27272695-12.27272695 12.27272695-32.72727305 0-45L716.54545479 671.54545479l196.36363652-196.36363653c12.27272695-12.27272695 12.27272695-36.81818174-4.09090957-49.09090957C847.45454521 372.90909131 773.81818174 348.36363653 696.09090869 348.36363653c-36.81818174 0-73.63636348 4.09090869-106.36363564 16.36363652l-204.54545479-163.63636436c0-36.81818174-8.18181826-73.63636348-28.63636347-106.36363564C348.36363653 86.54545479 336.09090869 82.45454521 327.90909131 82.45454521z",upload:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248z",download:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z",delete:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32",copy:"M128 320v576h576V320zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32M960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32M256 672h320v64H256zm0-192h320v64H256z"}).reduce((t,[e,i])=>{const s=`${e}Icon`,a={name:s,props:{path:{type:String,default:i},size:{type:[String,Number]},color:{type:String}},render(l){return l(ce,{props:this.$props,on:{click:()=>this.$emit("click")}})}};return a.install=l=>{l.component(s,a)},t[e]=a,t},{}),he=C.menu,pe=C.refresh,fe=C.move;C["column-setting"];const me=C.more,ge=C["fixed-left"],be=C["fixed-right"],ye=C.upload,ve=C.download,Ce=C.delete,K=C.copy,{t:k}=v(),_e=!0,xe=!1,Se={name:"TmEllipsisText",components:{CopyIcon:K},props:{text:{type:String,required:!0},width:{type:[String,Number],default:"auto"},maxWidth:{type:[String,Number],default:"100%"},lines:{type:Number,default:1},showTooltip:{type:Boolean,default:!0},lineHeight:{type:[String,Number]},copyable:{type:Boolean,default:!1},textAlign:{type:String,default:"left"}},data(){return{isVue2:_e,isVue3:xe,isOverflow:!1,currentLines:1,resizeObserver:null}},computed:{tooltipDisabled(){return!this.showTooltip||!this.isOverflow},textStyle(){const t=typeof this.width=="number"?`${this.width}px`:this.width,e=typeof this.maxWidth=="number"?`${this.maxWidth}px`:this.maxWidth;return{width:t,maxWidth:e,lineHeight:this.lineHeight,display:"-webkit-inline-box",overflow:"hidden",WebkitBoxOrient:"vertical",WebkitLineClamp:this.lines,textAlign:this.textAlign}}},mounted(){this.checkOverflow(),this.setupResizeObserver()},beforeDestroy(){this.cleanupResizeObserver()},beforeUnmount(){this.cleanupResizeObserver()},watch:{text(){this.$nextTick(this.checkOverflow)}},methods:{checkOverflow(){this.$refs.textEl&&this.$nextTick(()=>{this.$nextTick(()=>{this.performOverflowCheck()})})},performOverflowCheck(){var f;const t=this.$refs.textEl;if(!t)return;const e=getComputedStyle(t);if(!e.width||e.width==="0px"){this.$nextTick(()=>{this.performOverflowCheck()});return}const i=t.scrollHeight,s=t.scrollWidth,a=t.clientHeight,l=t.clientWidth,n=1,o=i>a+n,u=s>l+n;if(o||u){this.isOverflow=!0;const b=parseFloat(e.lineHeight)||16;this.currentLines=Math.ceil(i/b)}else{const b=t.getBoundingClientRect(),T=(f=t.parentElement)==null?void 0:f.getBoundingClientRect();if(T){const Ci=b.height>T.height||b.width>T.width;this.isOverflow=Ci}else this.isOverflow=!1;this.currentLines=1}},setupResizeObserver(){window.ResizeObserver&&this.$nextTick(()=>{try{this.resizeObserver=new ResizeObserver(()=>{this.checkOverflow()});const t=this.$el;t&&t instanceof Element&&this.resizeObserver.observe(t)}catch(t){console.warn("Failed to setup ResizeObserver:",t)}})},cleanupResizeObserver(){if(this.resizeObserver)try{this.resizeObserver.disconnect()}catch(t){console.warn("Failed to disconnect ResizeObserver:",t)}finally{this.resizeObserver=null}},handleCopy(){navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(this.text).then(()=>{this.$message.success(k("copySuccess"))}).catch(()=>{this.fallbackCopy()}):this.fallbackCopy()},fallbackCopy(){const t=document.createElement("textarea");t.value=this.text,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),this.$message.success(k("copySuccess"))}catch(e){this.$message.error(k("copyFailed"))}document.body.removeChild(t)}}};var $e=function(){var e=this,i=e._self._c;return i("el-tooltip",e._b({attrs:{disabled:e.tooltipDisabled,content:e.text,effect:"dark",placement:"top"}},"el-tooltip",{[e.isVue2?"open-delay":"show-after"]:300},!1),[i("div",{staticClass:"ellipsis-text-container"},[i("div",{ref:"textEl",staticClass:"ellipsis-text",style:e.textStyle},[e._v(" "+e._s(e.text)+" ")]),i("div",{staticClass:"toolbar",class:{multiline:e.currentLines>1&&e.lines>1}},[e.copyable?i("CopyIcon",{staticClass:"icon-item",on:{click:e.handleCopy}}):e._e()],1)])])},Te=[],we=p(Se,$e,Te,!1,null,"70ba8157");const $=we.exports;var Fe=p({name:"RenderVue2",inheritAttrs:!1,props:{renderFn:{type:Function,required:!0},data:{type:[Object,Array,String,Number,Boolean],default:void 0}},render(t){try{if(!this.renderFn||typeof this.renderFn!="function")return console.warn("[RenderComponent] renderFn must be a function"),null;const e=_(c({},this.data||{}),{$attrs:this.$attrs,$listeners:this.$listeners}),i=this.renderFn.toString(),s=/\(\s*h\s*[,)]/.test(i)||this.renderFn.length>=1;process.env.NODE_ENV;let a;return s?a=this.renderFn(t,e):a=this.renderFn(_(c({},e),{h:t})),a}catch(e){return console.error("[RenderComponent] Error in render function:",e),process.env.NODE_ENV==="development"?t("div",{style:{color:"red",border:"1px solid red",padding:"8px",borderRadius:"4px",fontSize:"12px"}},`RenderComponent Error: ${e.message}`):null}}},null,null,!1,null,null);const Ve=Fe.exports,ze=!0,Le=!1,ke={name:"FormItemLayout",components:{EllipsisText:$,RenderComponent:Ve},props:{direction:{type:String,default:"horizontal",validator:t=>["horizontal","vertical"].includes(t)},labelWidth:{type:[String,Number],default:120},inputWidth:{type:[String,Number],default:240},label:{type:[String,Function,Object,Array],default:""},labelOptions:{type:Array,default:()=>[]},field:{type:[String,Number],default:""},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{t:v().t,isVue2:ze,isVue3:Le,getDefaultSize:y}},computed:{hasLabel(){return this.labelOptions&&this.labelOptions.length||this.label},containerStyle(){const t={};if(this.direction==="horizontal"){const e=this.hasLabel?this.parsedLabelWidth+this.parsedInputWidth:this.parsedInputWidth;t.width=`${e}px`}else t.width=`${this.parsedInputWidth}px`;return t},labelStyle(){const t={};return this.direction==="horizontal"?t.width=`${this.parsedLabelWidth}px`:t.width=`${this.parsedInputWidth}px`,t},inputStyle(){return{width:`${this.parsedInputWidth}px`}},parsedLabelWidth(){return typeof this.labelWidth=="string"?parseInt(this.labelWidth):this.labelWidth},parsedInputWidth(){return typeof this.inputWidth=="string"?parseInt(this.inputWidth):this.inputWidth},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}}},watch:{labelOptions:{handler(t){t&&t.length>0&&!this.field&&this.$emit("field-change",t[0].value)},deep:!0,immediate:!0}},methods:{handleFieldChange(t){this.$emit("field-change",t)}}};var Oe=function(){var e=this,i=e._self._c;return i("div",{staticClass:"form-item-layout",class:{"form-item-layout--horizontal":e.direction==="horizontal","form-item-layout--vertical":e.direction==="vertical"},style:e.containerStyle},[e.hasLabel?i("div",{staticClass:"form-item-label",style:e.labelStyle},[e.labelOptions&&e.labelOptions.length?i("el-select",{staticClass:"label-select",attrs:{placeholder:e.t("selectPlaceholder"),size:e.getDefaultSize()},on:{change:e.handleFieldChange},model:{value:e.fieldValue,callback:function(s){e.fieldValue=s},expression:"fieldValue"}},e._l(e.labelOptions,function(s){return i("el-option",{key:s.value,attrs:{label:s.label,value:s.value}})}),1):e.label?[typeof e.label=="string"?i("div",{staticClass:"label-text"},[i("EllipsisText",{attrs:{text:e.label,lines:2,width:e.labelWidth-4,"text-align":e.labelAlign}})],1):typeof e.label=="function"?i("div",{staticClass:"label-render"},[i("RenderComponent",{attrs:{"render-fn":e.label}})],1):e._e()]:e._e()],2):e._e(),i("div",{staticClass:"form-item-input",style:e.inputStyle},[e._t("default")],2)])},Ae=[],De=p(ke,Oe,Ae,!1,null,"57a7088a");const x=De.exports,Re=!0,Me=!1,F="value",He="input",Ee={name:"TmSelectFilter",components:{FormItemLayout:x},props:{[F]:{type:[String,Number,Array],default:""},field:{type:[String,Number],default:""},options:{type:[Array,Function],default:()=>[]},labelOptions:{type:Array,default:()=>[]},label:{type:[String,Function,Object,Array],default:null},props:{type:Object,default:()=>({label:"label",value:"value"})},filterable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},collapseTags:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},showCheckAll:{type:Boolean,default:!0},placeholder:{type:String,default:""},valueOnClear:{type:[String,Number,Boolean,Array,Function],default:void 0},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{t:v().t,isVue2:Re,isVue3:Me,getDefaultSize:y,optionsList:[],loading:!1,indeterminate:!1,checkAll:!1}},computed:{computedValue:{get(){return this[F]},set(t){let e=t;if(this.multiple&&Array.isArray(t)&&t.length===0&&this.valueOnClear!==void 0){const i=this[F];Array.isArray(i)&&i.length>0&&(e=typeof this.valueOnClear=="function"?this.valueOnClear():this.valueOnClear)}this.$emit(He,e),this.$emit("change",e)}},propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}}},watch:{[F](t){!this.multiple||!this.showCheckAll||(t.length===0?(this.checkAll=!1,this.indeterminate=!1):t.length===this.optionsList.length?(this.checkAll=!0,this.indeterminate=!1):this.indeterminate=!0)}},created(){this.initOptions()},methods:{handleFieldChange(t){this.$emit("field-change",t)},async initOptions(){if(Array.isArray(this.options))this.optionsList=this.options;else if(typeof this.options=="function")try{this.loading=!0;const t=await this.options();Array.isArray(t)&&(this.optionsList=t)}catch(t){console.error(t)}finally{this.loading=!1}},handleCheckAll(t){this.indeterminate=!1;let e=[];t&&(e=this.optionsList.map(i=>i[this.propMap.value])),this.computedValue=e},handleClear(){if(this.valueOnClear!==void 0){const t=typeof this.valueOnClear=="function"?this.valueOnClear():this.valueOnClear;this.$nextTick(()=>{this.computedValue=t})}}}};var We=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-options":e.labelOptions,field:e.field,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign},on:{"field-change":e.handleFieldChange}},[i("el-select",e._g(e._b({ref:"select",staticClass:"select",attrs:{loading:e.loading},on:{clear:e.handleClear},scopedSlots:e._u([{key:"header",fn:function(){return[e.isVue3&&e.multiple&&e.showCheckAll?i("el-checkbox",{staticStyle:{width:"100%",height:"20px","padding-left":"10px"},attrs:{indeterminate:e.indeterminate,size:e.getDefaultSize()},on:{change:e.handleCheckAll},model:{value:e.checkAll,callback:function(s){e.checkAll=s},expression:"checkAll"}},[e._v(e._s(e.t("all")))]):e._e()]},proxy:!0}]),model:{value:e.computedValue,callback:function(s){e.computedValue=s},expression:"computedValue"}},"el-select",_(c({},e.$attrs),{size:e.getDefaultSize(),filterable:e.filterable,clearable:e.clearable,collapseTags:e.collapseTags,multiple:e.multiple,placeholder:e.placeholder,loading:e.loading}),!1),e.isVue2?e.$listeners:{}),[e.isVue2&&e.multiple&&e.showCheckAll?i("div",{staticClass:"check-all-option"},[i("el-checkbox",{staticStyle:{width:"100%"},attrs:{indeterminate:e.indeterminate,size:e.getDefaultSize()},on:{change:e.handleCheckAll},model:{value:e.checkAll,callback:function(s){e.checkAll=s},expression:"checkAll"}},[e._v(e._s(e.t("all")))])],1):e._e(),e._l(e.optionsList,function(s){return i("el-option",{key:s[e.propMap.value],attrs:{label:s[e.propMap.label],value:s[e.propMap.value],disabled:s.disabled}},[e._t("option",function(){return[e._v(e._s(s[e.propMap.label]))]},{item:s})],2)})],2)],1)},Ie=[],Ne=p(Ee,We,Ie,!1,null,"ef8f7987");const O=Ne.exports,Pe={name:"TmInputFilter",components:{MoreIcon:me,FormItemLayout:x},props:{label:{type:[String,Function,Object,Array],default:""},value:{type:String,default:""},field:{type:[String,Number],default:""},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},labelOptions:{type:Array,default:()=>[]},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{t:v().t,getDefaultSize:y,getCompatSize:m,exactValue:"",inputValue:"",isExactMode:!1,currentOptionMultiple:!1}},computed:{shouldShowMultiple(){return this.currentOptionMultiple!==null?this.currentOptionMultiple:this.multiple},selectedOption(){return!this.labelOptions||!this.labelOptions.length||!this.field?null:this.labelOptions.find(t=>t.value===this.field)}},watch:{isExactMode(t){t?this.$emit("value-change",this.exactValue):this.$emit("value-change",this.inputValue)},exactValue(t){this.$emit("value-change",t)},inputValue(t){this.$emit("value-change",t)},value:{handler(t){this.isExactMode?this.exactValue=t:this.inputValue=t},immediate:!0}},methods:{handlePopoverClose(){document.activeElement&&document.activeElement.blur(),this.isExactMode=!1},handleVisibleChange(t){this.isExactMode=t},handlefieldChange(t){this.$emit("field-change",t),this.updateCurrentOptionMultiple()},updateCurrentOptionMultiple(){const t=this.selectedOption;t&&"multiple"in t?this.currentOptionMultiple=t.multiple:this.currentOptionMultiple=this.multiple},handleExactSearch(){this.$emit("value-change",this.exactValue),this.$emit("search",this.exactValue)},handleClear(){this.exactValue="",this.$emit("value-change","")},handleEnter(){this.$emit("search")}},created(){this.updateCurrentOptionMultiple()}};var Be=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-options":e.labelOptions,field:e.field,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign},on:{"field-change":e.handlefieldChange}},[i("el-input",{staticClass:"tm-input",attrs:{size:e.getDefaultSize(),placeholder:e.placeholder,clearable:""},nativeOn:{keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.handleEnter.apply(null,arguments)}},model:{value:e.inputValue,callback:function(s){e.inputValue=s},expression:"inputValue"}},[e.shouldShowMultiple?i("el-popover",{attrs:{slot:"append",value:e.isExactMode,placement:"bottom-end",width:260,trigger:"click"},on:{input:e.handleVisibleChange},slot:"append"},[i("div",{staticClass:"popover-content"},[i("p",{staticClass:"popover-subtitle"},[e._v(e._s(e.t("accurateSearchTips")))]),i("el-input",{staticStyle:{"font-size":"12px"},attrs:{size:e.getDefaultSize(),type:"textarea",rows:8,placeholder:e.t("accurateSearchPlaceholder")},model:{value:e.exactValue,callback:function(s){e.exactValue=s},expression:"exactValue"}}),i("div",{staticClass:"popover-footer"},[i("el-button",{staticStyle:{float:"left"},attrs:{size:e.getCompatSize("mini")},on:{click:e.handleClear}},[e._v(e._s(e.t("clear")))]),i("el-button",{attrs:{size:e.getCompatSize("mini")},on:{click:e.handlePopoverClose}},[e._v(e._s(e.t("cancel")))]),i("el-button",{attrs:{type:"primary",size:e.getCompatSize("mini")},on:{click:e.handleExactSearch}},[e._v(e._s(e.t("search")))])],1)],1),i("template",{slot:"reference"},[i("MoreIcon",{staticStyle:{cursor:"pointer"}})],1)],2):e._e()],1)],1)},je=[],Ue=p(Pe,Be,je,!1,null,"28e573ff");const A=Ue.exports,{t:g}=v(),Je=!0,qe=!1,Ke="value",Qe={name:"TmDateFilter",components:{FormItemLayout:x},props:{value:{type:[Array,String,Date],default:()=>null},field:{type:[String,Number],default:""},start:{type:[String,Number],default:""},end:{type:[String,Number],default:""},size:{type:String,default:"mini"},labelOptions:{type:Array,default:()=>[]},label:{type:[String,Function,Object,Array],default:""},type:{type:String,default:"daterange",validator:t=>["date","daterange","datetime","datetimerange","year","month","dates","months","years","week","monthrange"].includes(t)},format:{type:String,default:""},startPlaceholder:{type:String,default:void 0},endPlaceholder:{type:String,default:void 0},placeholder:{type:String,default:void 0},rangeSeparator:{type:String,default:"-"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},align:{type:String,default:"left"},popperClass:{type:String,default:""},defaultValue:{type:[Date,Array],default:null},defaultTime:{type:[Date,String,Array],default:null},shortcuts:{type:Array,default:()=>[]},pastOnly:{type:Boolean,default:!1},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},computed:{isRangeType(){return["daterange","datetimerange","monthrange"].includes(this.type)},computedStartPlaceholder(){if(this.isRangeType)return this.startPlaceholder!==void 0?this.startPlaceholder:g("startDate")},computedEndPlaceholder(){if(this.isRangeType)return this.endPlaceholder!==void 0?this.endPlaceholder:g("endDate")},computedFormat(){const t="yyyy";return this.format?this.format:this.type==="year"?t:this.type==="month"?`${t}-MM`:this.type==="date"?`${t}-MM-dd`:this.type==="dates"?`${t}-MM-dd`:this.type==="months"?`${t}-MM`:this.type==="years"?t:this.type==="week"?`${t}-MM-WW`:this.type==="datetime"?`${t}-MM-dd HH:mm:ss`:this.type==="datetimerange"?`${t}-MM-dd HH:mm:ss`:this.type==="daterange"?`${t}-MM-dd`:this.type==="monthrange"?`${t}-MM`:""},computedPickerOptions(){const t={};if(this.pastOnly&&(t.disabledDate=e=>e.getTime()>Date.now()),["daterange","datetimerange"].includes(this.type)){const e=this.type==="datetimerange";t.shortcuts=this.shortcuts.length>0?this.shortcuts:[{text:g("today"),onClick(i){const s=new Date,a=new Date;e&&(a.setHours(0,0,0,0),s.setHours(23,59,59,999)),i.$emit("pick",[a,s])}},{text:g("yesterday"),onClick(i){const s=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24),s.setTime(s.getTime()-3600*1e3*24),e&&(a.setHours(0,0,0,0),s.setHours(23,59,59,999)),i.$emit("pick",[a,s])}},{text:g("last7days"),onClick(i){const s=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*7),e&&(a.setHours(0,0,0,0),s.setHours(23,59,59,999)),i.$emit("pick",[a,s])}},{text:g("last30days"),onClick(i){const s=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*30),e&&(a.setHours(0,0,0,0),s.setHours(23,59,59,999)),i.$emit("pick",[a,s])}},{text:g("thisMonth"),onClick(i){const s=new Date,a=new Date;a.setDate(1),e&&(a.setHours(0,0,0,0),s.setHours(23,59,59,999)),i.$emit("pick",[a,s])}},{text:g("lastMonth"),onClick(i){const s=new Date,a=new Date;a.setMonth(a.getMonth()-1),a.setDate(1),s.setDate(0),e&&(a.setHours(0,0,0,0),s.setHours(23,59,59,999)),i.$emit("pick",[a,s])}}]}return t},computedShortcuts(){if(!["daterange","datetimerange"].includes(this.type))return[];if(this.shortcuts&&this.shortcuts.length>0)return this.shortcuts;const t=this.type==="datetimerange";return[{text:g("today"),value:()=>{const e=new Date,i=new Date;return t&&(i.setHours(0,0,0,0),e.setHours(23,59,59,999)),[i,e]}},{text:g("yesterday"),value:()=>{const e=new Date,i=new Date;return i.setTime(i.getTime()-3600*1e3*24),e.setTime(e.getTime()-3600*1e3*24),t&&(i.setHours(0,0,0,0),e.setHours(23,59,59,999)),[i,e]}},{text:g("last7days"),value:()=>{const e=new Date,i=new Date;return i.setTime(i.getTime()-3600*1e3*24*7),t&&(i.setHours(0,0,0,0),e.setHours(23,59,59,999)),[i,e]}},{text:g("last30days"),value:()=>{const e=new Date,i=new Date;return i.setTime(i.getTime()-3600*1e3*24*30),t&&(i.setHours(0,0,0,0),e.setHours(23,59,59,999)),[i,e]}},{text:g("thisMonth"),value:()=>{const e=new Date,i=new Date;return i.setDate(1),t&&(i.setHours(0,0,0,0),e.setHours(23,59,59,999)),[i,e]}},{text:g("lastMonth"),value:()=>{const e=new Date,i=new Date;return i.setMonth(i.getMonth()-1),i.setDate(1),e.setDate(0),t&&(i.setHours(0,0,0,0),e.setHours(23,59,59,999)),[i,e]}}]},computedDisabledDate(){return this.pastOnly?t=>t.getTime()>Date.now():null},computedDefaultTime(){let t=this.defaultTime;if(this.type==="datetimerange"&&!this.defaultTime&&(t=["00:00:00","23:59:59"]),this.isVue2)return t;if(t){if(this.type==="datetimerange"&&Array.isArray(t))return t.map(e=>{if(typeof e=="string"){const i=new Date,[s,a,l]=e.split(":").map(Number);return new Date(i.getFullYear(),i.getMonth(),i.getDate(),s,a,l||0)}return e});if(this.type==="datetime"&&typeof t=="string"){const e=new Date,[i,s,a]=t.split(":").map(Number);return new Date(e.getFullYear(),e.getMonth(),e.getDate(),i,s,a||0)}return t}},dateValue(){return this.isRangeType?this.start||this.end?[this.start,this.end]:this.value:this.value}},data(){return{t:g,isVue2:Je,isVue3:qe,getDefaultSize:y,valueField:Ke}},methods:{handleFieldChange(t){this.$emit("field-change",t)},handleDateChange(t){this.isRangeType?(this.$emit("value-change",t),t&&Array.isArray(t)&&t.length===2?(this.$emit("start-change",t),this.$emit("end-change",t)):(this.$emit("start-change",[]),this.$emit("end-change",[]))):this.$emit("value-change",t)},handleBlur(t){this.$emit("blur",t)},handleFocus(t){this.$emit("focus",t)}}};var Ge=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-options":e.labelOptions,field:e.field,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign},on:{"field-change":e.handleFieldChange}},[i("el-date-picker",{staticClass:"date-picker",attrs:{value:e.dateValue,type:e.type,size:e.getDefaultSize(),"range-separator":e.rangeSeparator,"start-placeholder":e.computedStartPlaceholder,"end-placeholder":e.computedEndPlaceholder,placeholder:e.placeholder,"picker-options":e.computedPickerOptions,format:e.computedFormat,"value-format":e.computedFormat,disabled:e.disabled,clearable:e.clearable,readonly:e.readonly,editable:e.editable,align:e.align,"popper-class":e.popperClass,"default-value":e.defaultValue,"default-time":e.computedDefaultTime},on:{input:e.handleDateChange,change:e.handleDateChange,blur:e.handleBlur,focus:e.handleFocus}})],1)},Ye=[],Xe=p(Qe,Ge,Ye,!1,null,"2de48d4b");const D=Xe.exports,Ze=!0,et={name:"TmCascaderFilter",components:{FormItemLayout:x},props:{value:{type:[String,Number,Array],default:""},options:{type:[Array,Function],default:()=>[]},label:{type:[String,Function,Object,Array],default:null},props:{type:Object,default:()=>({label:"label",value:"value",children:"children",expandTrigger:"hover"})},filterable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},collapseTags:{type:Boolean,default:!0},collapseTagsTooltip:{type:Boolean,default:!0},placeholder:{type:String,default:""},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{isVue2:Ze,getDefaultSize:y,selectedValue:this.value,optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value",children:this.props.children||"children"}},cascaderProps(){return _(c({},this.props),{expandTrigger:this.props.expandTrigger||"hover"})}},watch:{value:{immediate:!0,handler(t){this.selectedValue=t}},options:{immediate:!0,handler(t){this.initOptions(t)}},selectedValue(t){this.$emit("input",t),this.$emit("change",t)}},methods:{async initOptions(t){if(typeof t=="function")try{this.loading=!0;const e=await t();Array.isArray(e)&&(this.optionsList=e)}catch(e){console.error(e)}finally{this.loading=!1}else Array.isArray(t)&&(this.optionsList=t)}}};var tt=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign}},[i("div",{staticClass:"cascader"},[i("el-cascader",e._g(e._b({ref:"cascader",scopedSlots:e._u([{key:"default",fn:function({node:s,data:a}){return[e._t("default",function(){return[i("span",[e._v(e._s(a[e.propMap.label]))])]},{node:s,data:a})]}}],null,!0),model:{value:e.selectedValue,callback:function(s){e.selectedValue=s},expression:"selectedValue"}},"el-cascader",_(c({},e.$attrs),{size:e.getDefaultSize(),filterable:e.filterable,clearable:e.clearable,collapseTags:e.collapseTags,collapseTagsTooltip:e.collapseTagsTooltip,props:e.cascaderProps,placeholder:e.placeholder,options:e.optionsList,loading:e.loading}),!1),e.isVue2?e.$listeners:{}))],1)])},it=[],st=p(et,tt,it,!1,null,"be6225d9");const R=st.exports,at=!0,lt=!1,nt={name:"TmRadioFilter",components:{FormItemLayout:x},props:{value:{type:[String,Number],default:""},options:{type:[Array,Function],default:()=>[]},props:{type:Object,default:()=>({label:"label",value:"value"})},size:{type:String,default:"mini"},width:{type:[String,Number],default:200},label:{type:[String,Function,Object,Array],default:null},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{isVue2:at,isVue3:lt,getDefaultSize:y,selectedValue:this.value,optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}}},watch:{value:{immediate:!0,handler(t){this.selectedValue=t}},options:{immediate:!0,handler(t){this.$slots.default||this.initOptions(t)}},selectedValue(t){this.$emit("input",t),this.$emit("change",t)}},methods:{async initOptions(t){if(typeof t=="function")try{this.loading=!0;const e=await t();Array.isArray(e)&&(this.optionsList=e)}catch(e){console.error(e)}finally{this.loading=!1}else Array.isArray(t)&&(this.optionsList=t)}}};var rt=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign}},[i("el-radio-group",e._g(e._b({ref:"radioGroup",staticClass:"radio-group",model:{value:e.selectedValue,callback:function(s){e.selectedValue=s},expression:"selectedValue"}},"el-radio-group",_(c({},e.$attrs),{size:e.getDefaultSize()}),!1),e.isVue2?e.$listeners:{}),[e.$slots.default?[e._t("default")]:e._l(e.optionsList,function(s){return i("el-radio-button",e._b({key:s[e.propMap.value],staticStyle:{flex:"1"}},"el-radio-button",{[e.isVue3?"value":"label"]:s[e.propMap.value],disabled:s.disabled},!1),[e._t("option",function(){return[e._v(e._s(s[e.propMap.label]))]},{item:s})],2)})],2)],1)},ot=[],ut=p(nt,rt,ot,!1,null,"49789913");const M=ut.exports,dt=!0,ct=!1,ht={name:"TmCheckboxFilter",components:{FormItemLayout:x},props:{value:{type:Array,default:()=>[]},options:{type:[Array,Function],default:()=>[]},props:{type:Object,default:()=>({label:"label",value:"value"})},size:{type:String,default:"mini"},label:{type:[String,Function,Object,Array],default:null},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{isVue2:dt,isVue3:ct,getDefaultSize:y,selectedValue:this.value||[],optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}}},watch:{value:{immediate:!0,handler(t){this.selectedValue=t||[]}},options:{immediate:!0,handler(t){this.$slots.default||this.initOptions(t)}},selectedValue(t){this.$emit("input",t),this.$emit("change",t)}},methods:{async initOptions(t){if(typeof t=="function")try{this.loading=!0;const e=await t();Array.isArray(e)&&(this.optionsList=e)}catch(e){console.error(e)}finally{this.loading=!1}else Array.isArray(t)&&(this.optionsList=t)}}};var pt=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign}},[i("div",{staticClass:"checkbox-content"},[i("el-checkbox-group",e._g(e._b({ref:"checkboxGroup",model:{value:e.selectedValue,callback:function(s){e.selectedValue=s},expression:"selectedValue"}},"el-checkbox-group",_(c({},e.$attrs),{size:e.getDefaultSize()}),!1),e.isVue2?e.$listeners:{}),[e.$slots.default?[e._t("default")]:e._l(e.optionsList,function(s){return i("el-checkbox-button",e._b({key:s[e.propMap.value],staticStyle:{flex:"1"}},"el-checkbox-button",{[e.isVue3?"value":"label"]:s[e.propMap.value],disabled:s.disabled},!1),[e._t("option",function(){return[e._v(e._s(s[e.propMap.label]))]},{item:s})],2)})],2)],1)])},ft=[],mt=p(ht,pt,ft,!1,null,"c1549ec0");const H=mt.exports,gt=!0,bt={name:"TmSwitchFilter",components:{FormItemLayout:x},props:{value:{type:Boolean,default:!1},label:{type:[String,Function,Object,Array],default:""},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{isVue2:gt,getDefaultSize:y,switchValue:this.value}},watch:{value:{immediate:!0,handler(t){this.switchValue=t}},switchValue(t){this.$emit("input",t),this.$emit("change",t)}}};var yt=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign}},[i("div",{staticClass:"switch-content"},[i("el-switch",e._g(e._b({ref:"switch",attrs:{size:e.getDefaultSize()},model:{value:e.switchValue,callback:function(s){e.switchValue=s},expression:"switchValue"}},"el-switch",e.$attrs,!1),e.isVue2?e.$listeners:{}))],1)])},vt=[],Ct=p(bt,yt,vt,!1,null,"7455db21");const E=Ct.exports,_t=!0,xt=!1,Q="value",W="input",St={name:"TmTextareaFilter",components:{FormItemLayout:x},props:{label:{type:[String,Function,Object,Array],default:""},[Q]:{type:String,default:""},field:{type:[String,Number],default:""},placeholder:{type:String,default:""},labelOptions:{type:Array,default:()=>[]},autosize:{type:[Boolean,Object],default:()=>({minRows:1,maxRows:10})},maxlength:{type:[String,Number],default:""},minlength:{type:[String,Number],default:""},showWordLimit:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},resize:{type:String,default:"vertical",validator:t=>["none","both","horizontal","vertical"].includes(t)},tabindex:{type:[String,Number],default:""},validateEvent:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{isVue2:_t,isVue3:xt,getDefaultSize:y,inputValue:this.value}},computed:{selectedOption(){return!this.labelOptions||!this.labelOptions.length||!this.field?null:this.labelOptions.find(t=>t.value===this.field)}},watch:{[Q]:{immediate:!0,handler(t){this.inputValue=t}},inputValue(t){this.$emit(W,t)}},methods:{handleInput(t){this.inputValue=t,this.$emit(W,t)},handleChange(t){this.$emit("change",t)},handleFocus(t){this.$emit("focus",t)},handleBlur(t){this.$emit("blur",t)},handleClear(){this.inputValue="",this.$emit(W,""),this.$emit("clear")},handleFieldChange(t){this.$emit("field-change",t)},focus(){this.$refs.textarea.focus()},blur(){this.$refs.textarea.blur()},select(){this.$refs.textarea.select()}}};var $t=function(){var e=this,i=e._self._c;return i("FormItemLayout",{attrs:{label:e.label,"label-options":e.labelOptions,field:e.field,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign},on:{"field-change":e.handleFieldChange}},[i("div",{staticClass:"textarea"},[i("el-input",e._g(e._b({ref:"textarea",staticClass:"textarea-input",attrs:{size:e.getDefaultSize(),placeholder:e.placeholder,type:"textarea",autosize:e.autosize,maxlength:e.maxlength,minlength:e.minlength,"show-word-limit":e.showWordLimit,readonly:e.readonly,disabled:e.disabled,resize:e.resize,tabindex:e.tabindex,"validate-event":e.validateEvent},on:{input:e.handleInput,change:e.handleChange,focus:e.handleFocus,blur:e.handleBlur,clear:e.handleClear},model:{value:e.inputValue,callback:function(s){e.inputValue=s},expression:"inputValue"}},"el-input",e.$attrs,!1),e.isVue2?e.$listeners:{})),e.clearable&&e.inputValue?i("i",{staticClass:"textarea-clear-icon el-input__icon el-icon-circle-close",on:{click:e.handleClear}}):e._e()],1)])},Tt=[],wt=p(St,$t,Tt,!1,null,"e903b851");const I=wt.exports;var Ft=p({name:"DynamicSlot",props:{name:{type:String,required:!0},slotProps:{type:Object,default:()=>({})}},render(t){var a;const e=l=>{var n,o;if(!l)return null;{let u=(n=l.$scopedSlots)==null?void 0:n[this.name];if(!u&&((o=l.$slots)!=null&&o[this.name])){const f=l.$slots[this.name];u=()=>f}return u}},i=l=>{var n;return l?((n=l.$options)==null?void 0:n.name)==="TmTable":!1};let s=e(this.$parent);if(!s){let l=(a=this.$parent)==null?void 0:a.$parent;for(;l&&!s;){if(i(l)){s=e(l);break}l=l.$parent}}if(s){const l=typeof s=="function"?s(this.slotProps):s;{if(!l)return null;if(Array.isArray(l)){const n=l.filter(o=>{var u;return o&&!o.isComment&&(o.tag||((u=o.text)==null?void 0:u.trim()))});return n.length===0?null:n.length===1?n[0]:t("div",{style:{display:"contents"}},n)}return l}}return null}},null,null,!1,null,null);const Vt=Ft.exports,{t:zt}=v(),Lt=!0,kt=!1,Ot=["date","daterange","datetime","datetimerange","year","month","dates","months","years","week","monthrange"],At={name:"TmTableSearch",components:{TmSelect:O,TmInput:A,TmDate:D,TmCascader:R,TmRadio:M,TmCheckbox:H,TmSwitch:E,TmTextarea:I,DynamicSlot:Vt},props:{disabled:{type:Boolean,default:!1},searchColumns:{type:Array,default:null},searchForm:{type:Object,default:()=>({})},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{t:zt,isVue2:Lt,isVue3:kt,getCompatSize:m,getDefaultSize:y,DATE_TYPES:Ot,defaultValues:{}}},computed:{computedSearchForm:{get(){return this.searchForm},set(t){this.$emit("update:search-form",t)}},getLayoutProps(){return t=>{const e={};return t.labelWidth!==void 0?e.labelWidth=t.labelWidth:this.labelWidth!==void 0&&(e.labelWidth=this.labelWidth),t.inputWidth!==void 0?e.inputWidth=t.inputWidth:this.inputWidth!==void 0&&(e.inputWidth=this.inputWidth),t.direction!==void 0?e.direction=t.direction:this.direction!==void 0&&(e.direction=this.direction),t.labelAlign!==void 0?e.labelAlign=t.labelAlign:this.labelAlign!==void 0&&(e.labelAlign=this.labelAlign),e}}},mounted(){this.initDefaultValues()},methods:{isDateType(t){return this.DATE_TYPES.includes(t)},hasDefaultSlot(){const t=this.$slots.default;return t?this.isVue2?!!t:t()[0].children.length>0:!1},handleUpdate(t,e,i){const s=this.getFieldValue(t,i);s&&this.$emit("update:search-form",_(c({},this.computedSearchForm),{[s]:e}))},handleUpdateDate(t,e){const i=e||[],s=this.getFieldValue(t,"start"),a=this.getFieldValue(t,"end"),l=this.getFieldValue(t,"value"),n={};s&&(n[s]=i[0]),a&&(n[a]=i[1]),l&&(n[l]=i),this.$emit("update:search-form",c(c({},this.computedSearchForm),n))},getFieldValue(t,e){if(typeof t=="string")return t;if(t.fields&&e in t.fields){const i=t.fields[e];if(typeof i=="string")return i;if(Array.isArray(i))return i[0];if(i&&typeof i=="object")return i.name}},getFieldDefault(t,e){if(t.fields&&e in t.fields){const i=t.fields[e];if(Array.isArray(i)&&i.length>1)return i[1];if(i&&typeof i=="object"&&"default"in i)return i.default}},hasSearchSlot(t){const e="$scopedSlots";if(this[e][t])return!0;let s=this.$parent;for(;s;){const a=s[e];if(s.$options.name==="TmTable"&&(a!=null&&a[t]))return!0;s=s.$parent}return!1},initDefaultValues(){if(!this.searchColumns||!this.searchColumns.length)return;const t={};this.searchColumns.forEach(e=>{if(typeof e=="string"||!e.fields)return;const i=this.getFieldValue(e,"value"),s=this.getFieldValue(e,"label");if(e.type==="input"&&e.labelOptions&&e.labelOptions.length>0){const l=e.labelOptions[0];if(s)if(s in this.computedSearchForm)t[s]=this.computedSearchForm[s];else{const n=this.getFieldDefault(e,"label");n!==void 0?t[s]=n:l&&l.value!==void 0&&(t[s]=l.value)}i&&!(i in this.computedSearchForm)&&(t[i]="")}else if(this.isDateType(e.type)&&e.labelOptions&&e.labelOptions.length>0){const l=e.labelOptions[0];if(i&&!(i in this.computedSearchForm)&&(t[i]=[]),s)if(s in this.computedSearchForm)t[s]=this.computedSearchForm[s];else{const n=this.getFieldDefault(e,"label");n!==void 0?t[s]=n:l&&l.value!==void 0&&(t[s]=l.value)}}else if(e.type==="select"&&e.labelOptions&&e.labelOptions.length>0){const l=e.labelOptions[0];if(i&&!(i in this.computedSearchForm)&&(t[i]=e.multiple?[]:""),s)if(s in this.computedSearchForm)t[s]=this.computedSearchForm[s];else{const n=this.getFieldDefault(e,"label");n!==void 0?t[s]=n:l&&l.value!==void 0&&(t[s]=l.value)}}const a=this.getFieldDefault(e,"value");if(i&&a!==void 0&&!(i in this.computedSearchForm)?this.isDateType(e.type)&&!Array.isArray(a)?t[i]=[]:e.type==="checkbox"&&!Array.isArray(a)?t[i]=a?[a]:[]:e.type==="switch"&&typeof a!="boolean"?t[i]=!!a:t[i]=a:i&&!(i in this.computedSearchForm)&&(e.type==="checkbox"?t[i]=[]:e.type==="switch"&&(t[i]=!1)),this.isDateType(e.type)){const l=this.getFieldValue(e,"start"),n=this.getFieldValue(e,"end"),o=this.getFieldDefault(e,"start"),u=this.getFieldDefault(e,"end");l&&o!==void 0&&!(l in this.computedSearchForm)&&(t[l]=o),n&&u!==void 0&&!(n in this.computedSearchForm)&&(t[n]=u)}}),this.defaultValues=t,this.$emit("update:search-form",c(c({},t),this.computedSearchForm))},getSearchForm(){return this.computedSearchForm},handleSearch(){setTimeout(()=>{this.$emit("search",this.computedSearchForm)})},handleReset(){this.$emit("update:search-form",c({},this.defaultValues)),this.$emit("reset")}}};var Dt=function(){var e=this,i=e._self._c;return i("div",{staticClass:"table-search",class:`table-search--${e.isVue2?"v2":"v3"}`},[i("div",{staticClass:"search-content"},[e.hasDefaultSlot()?e._t("default"):e.searchColumns&&e.searchColumns.length?[e._l(e.searchColumns,function(s,a){return[typeof s=="string"?i("div",{key:`str-${s}-${a}`,staticClass:"search-item"},[i("dynamic-slot",{key:s,attrs:{name:`search-${s}`,"slot-props":{searchForm:e.searchForm}}})],1):i("div",{key:`obj-${a}`,staticClass:"search-item"},[s.fields?[e.hasSearchSlot(`search-${e.getFieldValue(s,"value")}`)?[i("dynamic-slot",{key:e.getFieldValue(s,"value"),attrs:{name:`search-${e.getFieldValue(s,"value")}`,"slot-props":{searchForm:e.searchForm,col:s}}})]:[i("div",{key:e.getFieldValue(s,"value")||`col-${a}`,staticStyle:{display:"flex"}},[s.type==="input"?i("tm-Input",e._b({attrs:{label:s.label,value:e.computedSearchForm[e.getFieldValue(s,"value")],field:e.computedSearchForm[e.getFieldValue(s,"label")],multiple:s.multiple,labelOptions:s.labelOptions,placeholder:s.placeholder},on:{"value-change":l=>e.handleUpdate(s,l,"value"),"field-change":l=>e.handleUpdate(s,l,"label"),search:e.handleSearch}},"tm-Input",e.getLayoutProps(s),!1)):e._e(),e.isDateType(s.type)?i("tm-date",e._b({attrs:{type:s.type,label:s.label,value:e.computedSearchForm[e.getFieldValue(s,"value")],field:e.computedSearchForm[e.getFieldValue(s,"label")],start:e.computedSearchForm[e.getFieldValue(s,"start")],end:e.computedSearchForm[e.getFieldValue(s,"end")],labelOptions:s.labelOptions,"start-placeholder":s.startPlaceholder,"end-placeholder":s.endPlaceholder,placeholder:s.placeholder,"range-separator":s.rangeSeparator,disabled:s.disabled,clearable:s.clearable,readonly:s.readonly,editable:s.editable,align:s.align,"popper-class":s.popperClass,"default-value":s.defaultValue,"default-time":s.defaultTime,shortcuts:s.shortcuts,"past-only":s.pastOnly,format:s.format},on:{"field-change":l=>e.handleUpdate(s,l,"label"),"value-change":l=>e.handleUpdateDate(s,l),"start-change":l=>e.handleUpdateDate(s,l),"end-change":l=>e.handleUpdateDate(s,l)}},"tm-date",e.getLayoutProps(s),!1)):e._e(),s.type==="select"?i("tm-select",e._b({attrs:{label:s.label,field:e.computedSearchForm[e.getFieldValue(s,"label")],options:s.options,labelOptions:s.labelOptions,placeholder:s.placeholder,multiple:s.multiple,"show-check-all":s.checkAll,"value-on-clear":s.valueOnClear,clearable:s.clearable},on:{"field-change":l=>e.handleUpdate(s,l,"label")},model:{value:e.computedSearchForm[e.getFieldValue(s,"value")],callback:function(l){e.$set(e.computedSearchForm,e.getFieldValue(s,"value"),l)},expression:"computedSearchForm[getFieldValue(col, 'value')]"}},"tm-select",e.getLayoutProps(s),!1)):e._e(),s.type==="cascader"?i("tm-cascader",e._b({attrs:{label:s.label,options:s.options,labelOptions:s.labelOptions,props:s.props,placeholder:s.placeholder,"show-check-all":s.checkAll},model:{value:e.computedSearchForm[e.getFieldValue(s,"value")],callback:function(l){e.$set(e.computedSearchForm,e.getFieldValue(s,"value"),l)},expression:"computedSearchForm[getFieldValue(col, 'value')]"}},"tm-cascader",e.getLayoutProps(s),!1)):e._e(),s.type==="radio"?i("tm-radio",e._b({attrs:{label:s.label,options:s.options,props:s.props},model:{value:e.computedSearchForm[e.getFieldValue(s,"value")],callback:function(l){e.$set(e.computedSearchForm,e.getFieldValue(s,"value"),l)},expression:"computedSearchForm[getFieldValue(col, 'value')]"}},"tm-radio",e.getLayoutProps(s),!1)):e._e(),s.type==="checkbox"?i("tm-checkbox",e._b({attrs:{label:s.label,options:s.options,props:s.props},model:{value:e.computedSearchForm[e.getFieldValue(s,"value")],callback:function(l){e.$set(e.computedSearchForm,e.getFieldValue(s,"value"),l)},expression:"computedSearchForm[getFieldValue(col, 'value')]"}},"tm-checkbox",e.getLayoutProps(s),!1)):e._e(),s.type==="switch"?i("tm-switch",e._b({attrs:{"active-text":s.activeText,"inactive-text":s.inactiveText,label:s.label,"active-color":s.activeColor,"inactive-color":s.inactiveColor},model:{value:e.computedSearchForm[e.getFieldValue(s,"value")],callback:function(l){e.$set(e.computedSearchForm,e.getFieldValue(s,"value"),l)},expression:"computedSearchForm[getFieldValue(col, 'value')]"}},"tm-switch",e.getLayoutProps(s),!1)):e._e(),s.type==="textarea"?i("tm-textarea",e._b({attrs:{field:e.computedSearchForm[e.getFieldValue(s,"label")],label:s.label,labelOptions:s.labelOptions,placeholder:s.placeholder,autosize:s.autosize,maxlength:s.maxlength,minlength:s.minlength,"show-word-limit":s.showWordLimit,readonly:s.readonly,disabled:s.disabled,resize:s.resize,clearable:s.clearable},on:{"field-change":l=>e.handleUpdate(s,l,"label")},model:{value:e.computedSearchForm[e.getFieldValue(s,"value")],callback:function(l){e.$set(e.computedSearchForm,e.getFieldValue(s,"value"),l)},expression:"computedSearchForm[getFieldValue(col, 'value')]"}},"tm-textarea",e.getLayoutProps(s),!1)):e._e()],1)]]:[i("div",{key:`error-${a}`,staticClass:"search-error-message"},[e._v(" 缺少 fields 配置,无法渲染此组件 ")])]],2)]})]:e._e(),i("div",{staticClass:"search-actions"},[i("el-button",{attrs:{type:"primary",size:e.getDefaultSize()},on:{click:e.handleSearch}},[e._v(e._s(e.t("query")))]),i("el-button",{attrs:{size:e.getDefaultSize()},on:{click:e.handleReset}},[e._v(e._s(e.t("reset")))])],1)],2)])},Rt=[],Mt=p(At,Dt,Rt,!1,null,"be7a7198");const N=Mt.exports,Ht=!0,Et={name:"TablePagination",props:{current:{type:Number,default:1},small:{type:Boolean,default:!0},pageSize:{type:Number,default:20},total:{type:Number,default:0}},data(){return{isVue2:Ht,getCompatSize:m}},methods:{handleSizeChange(t){this.$emit("size-change",t)},handleCurrentChange(t){this.$emit("current-change",t)}}};var Wt=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-pagination"},[i("div",[e._t("pagination-left")],2),i("el-pagination",e._g(e._b({staticStyle:{"text-align":"right"},attrs:{"current-page":e.current,"page-size":e.pageSize,total:e.total,"page-sizes":[10,20,50,100,300,500,1e3,2e3],size:e.getCompatSize("mini"),layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.handleSizeChange,"update:current-page":function(s){return e.$emit("update:current",s)},"update:page-size":function(s){return e.$emit("update:pageSize",s)},"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1),e.isVue2?e.$listeners:{}))],1)},It=[],Nt=p(Et,Wt,It,!1,null,"ee768f31");const Pt=Nt.exports,Bt={name:"TmTableMenu",props:{size:{type:String,default:"mini"}}};var jt=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-table-menu",attrs:{size:"small",inline:""}},[i("div",{staticClass:"left"},[e._t("left")],2),i("div",{staticClass:"right"},[e._t("right")],2)])},Ut=[],Jt=p(Bt,jt,Ut,!1,null,"579dd2c3");const qt=Jt.exports,V=t=>t?t.data&&t.data.attrs||{}:{},P=(t,e)=>{t&&(t.data||(t.data={}),t.data.attrs||(t.data.attrs={}),typeof e=="object"&&Object.assign(t.data.attrs,e))},z={getTableConfig(t){try{const e=localStorage.getItem(`tm-table-config-${t}`);return Promise.resolve({data:{code:200,data:e}})}catch(e){return Promise.reject(e)}},setTableConfig(t){try{return localStorage.setItem(`tm-table-config-${t.key}`,t.info),Promise.resolve({data:{code:200,message:"success"}})}catch(e){return Promise.reject(e)}}},Kt=t=>z.getTableConfig(t.key),Qt=t=>z.setTableConfig(t),Gt=t=>{t&&(typeof t.getTableConfig=="function"&&(z.getTableConfig=t.getTableConfig),typeof t.setTableConfig=="function"&&(z.setTableConfig=t.setTableConfig))},{t:Yt}=v(),Xt=!0,Zt=!1,ei={formatter:(t,e,i,s)=>[void 0,null,""].includes(i)?"-":i},ti={name:"TmColumnConfig",components:{MoveIcon:fe,FixedLeftIcon:ge,FixedRightIcon:be,UploadIcon:ye,DownloadIcon:ve,DeleteIcon:Ce,MenuIcon:he,tmEllipsisText:$},props:{columns:{type:Array,default:()=>[]},tableKey:{type:String,default:"",required:!0},defaultColumns:{type:Array,default:()=>[]},maxFixedLeftQuantity:{type:[Number,String],default:void 0},maxFixedRightQuantity:{type:[Number,String],default:void 0},ignoredColumnConfigTypes:{type:Array,default:()=>["selection"]}},data(){return{t:Yt,isVue2:Xt,isVue3:Zt,getDefaultSize:y,getCompatSize:m,buttonType:{type:"text"},afterOpenDelay:{"open-delay":300},popoverVisible:!1,keyWord:"",sortedTableColumns:[],tableColumns:[],defaultColumnsConfig:[],columnMap:{},processedColumns:[],placement:"bottom",isDraggingFrozen:!1,isDraggingFrozenRight:!1,sortable:null,isConfigLoaded:!1,columnsCopy:[]}},computed:{filteredSortedTableColumns(){return this.keyWord?this.sortedTableColumns.filter(t=>this.getColumnLabel(t.prop).includes(this.keyWord)):this.sortedTableColumns},showFixedLimitTips(){return this.maxFixedLeftQuantity!==void 0||this.maxFixedRightQuantity!==void 0},isThanMaxFrozen(){return this.maxFixedLeftQuantity===void 0?!1:this.sortedTableColumns.filter(t=>t.fixed==="left").length>=this.maxFixedLeftQuantity},isThanMaxRightFrozen(){return this.maxFixedRightQuantity===void 0?!1:this.sortedTableColumns.filter(t=>t.fixed==="right").length>=this.maxFixedRightQuantity},computedTableKey(){if(this.tableKey)return this.tableKey;if(this.$route&&this.$route.path)return this.$route.path.slice(1).replace(/\//g,"-");throw new Error("tableKey is required")}},watch:{popoverVisible(t){t||this.handlePopoverHide()},columns:{handler(t){t&&t.length>0&&!this.isConfigLoaded&&this.initializeColumnConfig()},immediate:!0},tableColumns:{handler(t){t!=null&&t.length&&(this.initSortedTableColumns(),this.crateSortable(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)))},deep:!0}},methods:{findLastIndex(t,e){for(let i=t.length-1;i>=0;i--)if(e(t[i],i,t))return i;return-1},getColumnLabel(t){return!t||!this.columnMap[t]?t||"":V(this.columnMap[t]).label||t},initializeColumnConfig(){this.defaultColumns&&this.defaultColumns.length>0?this.defaultColumnsConfig=this.defaultColumns:this.processOriginalColumns(),this.loadColumnConfig()},processOriginalColumns(){const t=this.columns||[];let e={};this.defaultColumnsConfig=t.filter(i=>{const s=V(i);return!(!s.prop||this.ignoredColumnConfigTypes.includes(s.type))}).map((i,s)=>{const a=V(i),l=c(c({},ei),a);P(i,l),a.prop&&(e[a.prop]=i);const n=a.hasOwnProperty("visible")?a.visible!==!1:!0;return{prop:a.prop,fixed:a.fixed||"",sort:s,cancellable:a.hasOwnProperty("cancellable")?a.cancellable:!0,visible:n}}),this.columnMap=e},loadColumnConfig(){Kt({key:this.computedTableKey}).then(t=>{var i;if(t.data.code!==200)return;let e=JSON.parse(((i=t.data)==null?void 0:i.data)||null)||{};e.columnsConfig&&JSON.stringify(this.defaultColumnsConfig)===JSON.stringify(e.defaultColumnsConfig)?this.tableColumns=e.columnsConfig.map(s=>c({},s)):this.tableColumns=this.defaultColumnsConfig.map(s=>c({},s)),this.processedColumns=this.applyColumnConfig(this.tableColumns),this.isConfigLoaded=!0,this.$emit("complete",{columns:this.processedColumns,config:this.tableColumns,isInitialLoad:!0})}).catch(()=>{this.tableColumns=this.defaultColumnsConfig.map(t=>c({},t)),this.processedColumns=this.applyColumnConfig(this.tableColumns),this.isConfigLoaded=!0,this.$emit("complete",{columns:this.processedColumns,isInitialLoad:!0})})},applyColumnConfig(t,e=!1){let i=this.columns.filter(a=>{const l=V(a);return this.ignoredColumnConfigTypes.includes(l.type)}),s=[];return[...t].sort((a,l)=>{const n=a.sort!==void 0?a.sort:1/0,o=l.sort!==void 0?l.sort:1/0;return n-o}).forEach(a=>{if(a.prop){let l=this.columnMap[a.prop];l&&(P(l,{fixed:a.fixed||void 0,visible:a.visible}),(!e&&a.visible||e)&&s.push(l))}}),i.forEach(a=>{P(a,{visible:!0})}),[...i,...s]},crateSortable(){const t=this.$refs.sortListRef;if(!t)return;this.sortable&&(this.sortable.destroy(),this.sortable=null);const e=new d(t,{ghostClass:"blue-background-class",animation:150,easing:"cubic-bezier(1, 0, 0, 1)",handle:".row-title",draggable:".sort-item-wrapper",fallbackOnBody:!1,preventOnFilter:!0,removeCloneOnHide:!0,group:"columns",dragClass:"sortable-drag",onStart:({item:i})=>{const s=i.getAttribute("data-prop"),a=this.sortedTableColumns.find(l=>l.prop===s);this.isDraggingFrozen=a&&a.fixed==="left",this.isDraggingFrozenRight=a&&a.fixed==="right",this.draggedItemIndex=Array.from(t.children).indexOf(i),i.classList.add("sortable-drag")},onMove:i=>{const{target:s,related:a}=i;if(!s||!a)return!1;const l=a?a.getAttribute("data-prop"):null,n=l?this.sortedTableColumns.find(f=>f.prop===l):null,o=n&&n.fixed==="left",u=n&&n.fixed==="right";return this.isDraggingFrozen&&!o||this.isDraggingFrozenRight&&!u||!this.isDraggingFrozen&&!this.isDraggingFrozenRight&&(o||u)?(s.classList.add("no-drop-zone"),!1):(document.querySelectorAll(".no-drop-zone").forEach(f=>{f.classList.remove("no-drop-zone")}),!0)},onEnd:({item:i,newIndex:s,oldIndex:a})=>{if(s===void 0||a===void 0||s<0||a<0||s>=this.sortedTableColumns.length||a>=this.sortedTableColumns.length)return;document.querySelectorAll(".no-drop-zone").forEach(T=>{T.classList.remove("no-drop-zone")}),i.classList.remove("sortable-drag");const l=this.sortedTableColumns[a],n=l.fixed==="left",o=l.fixed==="right",u=s>0?this.sortedTableColumns[s-1]:null,f=s<this.sortedTableColumns.length-1?this.sortedTableColumns[s+1]:null;let b=!1;if(n?(u&&u.fixed!=="left"||f&&f.fixed==="right")&&(b=!0):o?(u&&u.fixed!=="right"||f&&f.fixed!=="right")&&(b=!0):(u&&u.fixed==="right"||f&&f.fixed==="left")&&(b=!0),b){this.rollbackSort();return}this.updateSortAfterDrag()}});this.sortable=e},rollbackSort(){this.sortedTableColumns=JSON.parse(JSON.stringify(this.columnsCopy))},updateSortAfterDrag(){const t=this.$refs.sortListRef;if(!t)return;Array.from(t.children||[]).filter(i=>i&&i.dataset&&i.dataset.prop).map(i=>i.dataset.prop).forEach((i,s)=>{this.sortedTableColumns.some(a=>a.prop===i?(a.sort=s,!0):!1)}),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns)},init(){this.tableColumns=Array.isArray(this.tableColumns)?[...this.tableColumns]:Array.isArray(this.defaultColumnsConfig)?[...this.defaultColumnsConfig]:[],this.initSortedTableColumns()},initSortedTableColumns(){this.tableColumns.forEach((t,e)=>{t.sort===void 0&&(t.sort=e)}),this.sortedTableColumns=[...this.tableColumns].sort((t,e)=>t.fixed==="left"&&e.fixed!=="left"?-1:t.fixed!=="left"&&e.fixed==="left"||t.fixed==="right"&&e.fixed!=="right"?1:t.fixed!=="right"&&e.fixed==="right"?-1:t.sort-e.sort)},setPlacement(){const e=this.$refs.operationRef.$el.getBoundingClientRect();(window.innerHeight||document.documentElement.clientHeight)-(e.bottom-window.scrollY)>512?this.placement="bottom":this.placement="left"},handleVisibleChange(t){this.popoverVisible=t},handlePopoverShow(){this.setPlacement(),this.init(),(()=>{try{document.removeEventListener("mouseup",window.sortableGlobalMouseUp),document.removeEventListener("mousemove",window.sortableGlobalMouseMove)}catch(e){}})(),this.$nextTick(()=>{this.crateSortable()})},handlePopoverHide(){this.sortable&&(this.sortable.destroy(),this.sortable=null);try{document.removeEventListener("mouseup",window.sortableGlobalMouseUp),document.removeEventListener("mousemove",window.sortableGlobalMouseMove),typeof d!="undefined"&&d.utils&&(document.removeEventListener("mousemove",d.utils.throttleCall),document.removeEventListener("mouseup",d.utils.throttleCall))}catch(t){}},handleSelectAll(){const t=this.tableColumns.some(e=>!e.visible);this.tableColumns.forEach(e=>{e.cancellable&&(e.visible=t)})},handleRestoreDefault(){this.tableColumns=JSON.parse(JSON.stringify(this.defaultColumnsConfig)),this.sortedTableColumns=[...this.tableColumns].sort((t,e)=>t.sort-e.sort)},canMoveTop(t,e){if(e===0)return!1;if(t.fixed==="left"){const i=this.sortedTableColumns[e-1];return i&&i.fixed==="left"}if(!t.fixed){const i=this.sortedTableColumns[e-1];return i&&i.fixed==="left"?!1:i&&!i.fixed}return t.fixed==="right"},moveTop(t,e){const i=this.sortedTableColumns,s=t.prop;if(t.fixed==="right"&&(t.fixed=""),t.fixed==="left")i.unshift(i.splice(e,1)[0]);else{const a=this.findLastIndex(this.sortedTableColumns,l=>l.fixed==="left");i.splice(a+1,0,i.splice(e,1)[0])}this.updateSortValues(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns),this.$nextTick(()=>{const a=this.$refs.sortListRef;if(a){const l=Array.from(a.children).find(n=>n.dataset&&n.dataset.prop===s);l&&l.scrollIntoView({behavior:"smooth",block:"nearest"})}})},frozenLeftHandle(t){const e=this.sortedTableColumns,i=e.splice(t,1)[0];if(i.fixed=i.fixed==="left"?"":"left",i.fixed==="left"){const s=this.findLastIndex(this.sortedTableColumns,a=>a.fixed==="left");e.splice(s+1,0,i)}else{const s=this.findLastIndex(this.sortedTableColumns,a=>a.fixed==="left");e.splice(s+1,0,i)}this.updateSortValues(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns)},frozenRightHandle(t){const e=this.sortedTableColumns,i=e.splice(t,1)[0];if(i.fixed=i.fixed==="right"?"":"right",i.fixed==="right"){const s=e.findIndex(a=>a.fixed==="right");s===-1?e.push(i):e.splice(s,0,i)}else{const s=e.findIndex(a=>a.fixed==="right");s===-1?e.push(i):e.splice(s,0,i)}this.updateSortValues(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns)},onSave(){var e;this.updateSortValues();const t=(e=this.tableColumns)==null?void 0:e.map(i=>{const s=this.sortedTableColumns.find(o=>o.prop===i.prop);s&&(i.sort=s.sort,i.fixed=s.fixed,i.visible=s.visible);const n=i,{label:a}=n;return ie(n,["label"])});Qt({key:this.computedTableKey,info:JSON.stringify({columnsConfig:t,defaultColumnsConfig:this.defaultColumnsConfig})}).then(i=>{i.data.code===200&&(this.processedColumns=this.applyColumnConfig(t,!0),this.$emit("complete",{columns:this.processedColumns,config:t,isInitialLoad:!1}),this.$message.success(this.t("saveSuccess")),this.popoverVisible=!1)})},updateSortValues(){this.sortedTableColumns.forEach((t,e)=>{t.sort=e})}},mounted(){var t;(t=this.tableColumns)!=null&&t.length&&(this.initSortedTableColumns(),this.crateSortable(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)))},beforeDestroy(){this.sortable&&(this.sortable.destroy(),this.sortable=null);try{document.removeEventListener("mouseup",window.sortableGlobalMouseUp),document.removeEventListener("mousemove",window.sortableGlobalMouseMove),typeof d!="undefined"&&d.utils&&(document.removeEventListener("mousemove",d.utils.throttleCall),document.removeEventListener("mouseup",d.utils.throttleCall))}catch(t){}}};var ii=function(){var e=this,i=e._self._c;return i("el-popover",e._g(e._b({attrs:{"popper-class":"column-config-popover",width:680,"show-arrow":!1,placement:e.placement,trigger:"click"},on:{show:e.handlePopoverShow,hide:e.handlePopoverHide},scopedSlots:e._u([{key:"reference",fn:function(){return[i("div",{staticStyle:{display:"inline-block","margin-left":"10px"}},[i("el-tooltip",e._b({attrs:{content:e.t("columnSetting"),placement:"top"}},"el-tooltip",e.afterOpenDelay,!1),[i("el-button",{ref:"operationRef",attrs:{size:e.getDefaultSize(),circle:""}},[i("MenuIcon")],1)],1)],1)]},proxy:!0}])},"el-popover",{[e.isVue3?"visible":"value"]:e.popoverVisible},!1),{[e.isVue3?"update:visible":"input"]:e.handleVisibleChange}),[e.popoverVisible?i("div",{staticClass:"container"},[i("div",{staticClass:"main-container"},[i("div",{staticClass:"left-content"},[i("div",{staticClass:"title"},[i("span",[e._v(e._s(e.t("SelectableFields"))+"("+e._s(e.tableColumns.length)+")")]),i("el-button",e._b({staticStyle:{"margin-left":"10px"},on:{click:e.handleSelectAll}},"el-button",e.buttonType,!1),[e._v(e._s(e.t("all")))])],1),i("div",{staticClass:"option-list"},[i("div",{staticStyle:{height:"100%","overflow-y":"auto"}},[e._l(e.tableColumns,function(s,a){return[s.prop?i("div",{key:a+s.prop,staticStyle:{width:"110px",display:"inline-block"}},[i("el-checkbox",{staticClass:"el-checkbox",attrs:{disabled:!s.cancellable,label:s.prop,value:s.prop},model:{value:s.visible,callback:function(l){e.$set(s,"visible",l)},expression:"col.visible"}},[i("TmEllipsisText",{attrs:{width:"80px",text:e.getColumnLabel(s.prop)}})],1)],1):e._e()]})],2)])]),i("div",{staticClass:"right-content"},[i("div",{staticClass:"search-box"},[i("el-input",{staticClass:"search-input",attrs:{size:e.getCompatSize("small"),clearable:"",placeholder:e.t("search")},model:{value:e.keyWord,callback:function(s){e.keyWord=s},expression:"keyWord"}})],1),e.showFixedLimitTips?i("div",{staticClass:"tips"}):e._e(),i("div",{ref:"sortListRef",staticClass:"sort-list"},e._l(e.filteredSortedTableColumns,function(s,a){return i("div",{key:s.prop,staticClass:"sort-item-wrapper",class:[s.fixed==="left"?"frozen":"",s.fixed==="right"?"frozenRight":"",s.fixed?"":"noFrozen"],attrs:{"data-prop":s.prop}},[s.visible?i("div",{staticClass:"sort-item"},[i("div",{staticClass:"row-title"},[i("MoveIcon",{staticStyle:{"flex-shrink":"0"}}),i("TmEllipsisText",{attrs:{text:e.getColumnLabel(s.prop)}})],1),i("div",{staticClass:"operation-btns"},[s.cancellable?i("el-tooltip",e._b({attrs:{content:e.t("cancel"),placement:"top"}},"el-tooltip",e.afterOpenDelay,!1),[i("el-button",e._b({staticClass:"iconfont-button delete-button",attrs:{size:e.getCompatSize("mini")},on:{click:function(l){s.visible=!1}}},"el-button",e.buttonType,!1),[i("DeleteIcon")],1)],1):e._e(),e.canMoveTop(s,a)?i("el-tooltip",e._b({attrs:{content:e.t("top"),placement:"top"}},"el-tooltip",e.afterOpenDelay,!1),[i("el-button",e._b({staticClass:"iconfont-button top-button",attrs:{size:e.getCompatSize("mini")},on:{click:function(l){return e.moveTop(s,a)}}},"el-button",e.buttonType,!1),[i("UploadIcon")],1)],1):e._e(),s.fixed!=="right"?i("el-tooltip",e._b({attrs:{content:s.fixed==="left"?e.t("cancelLeftFixed"):e.t("leftFixed"),placement:"top"}},"el-tooltip",e.afterOpenDelay,!1),[i("el-button",e._b({staticClass:"iconfont-button left-fixed-btn",class:{"active-fixed":s.fixed==="left"},attrs:{size:e.getCompatSize("mini"),disabled:s.fixed!=="left"&&e.isThanMaxFrozen},on:{click:function(l){return e.frozenLeftHandle(a)}}},"el-button",e.buttonType,!1),[i("FixedLeftIcon")],1)],1):e._e(),s.fixed!=="left"?i("el-tooltip",e._b({attrs:{content:s.fixed==="right"?e.t("cancelRightFixed"):e.t("rightFixed"),placement:"top"}},"el-tooltip",e.afterOpenDelay,!1),[i("el-button",e._b({staticClass:"iconfont-button right-fixed-btn",class:{"active-fixed":s.fixed==="right"},attrs:{size:e.getCompatSize("mini"),disabled:s.fixed!=="right"&&e.isThanMaxRightFrozen},on:{click:function(l){return e.frozenRightHandle(a)}}},"el-button",e.buttonType,!1),[i("FixedRightIcon")],1)],1):e._e()],1)]):e._e()])}),0)])]),i("div",{staticClass:"footer"},[i("div",{staticClass:"footer-left"},[i("el-button",{attrs:{size:e.getCompatSize("mini")},on:{click:e.handleRestoreDefault}},[e._v(e._s(e.t("restoreDefault")))])],1),i("div",{staticClass:"footer-right"},[i("el-button",{attrs:{size:e.getCompatSize("mini")},on:{click:function(s){e.popoverVisible=!1}}},[e._v(e._s(e.t("cancel")))]),i("el-button",{attrs:{size:e.getCompatSize("mini"),type:"primary"},on:{click:e.onSave}},[e._v(e._s(e.t("saveAndApply")))])],1)])]):e._e()])},si=[],ai=p(ti,ii,si,!1,null,"fc286487");const li=ai.exports,G=!0,Y=!1;function ki(t){return t}const ni={name:"TmTable",components:{TableSearch:N,TablePagination:Pt,TableMenu:qt,ColumnConfig:li,RefreshIcon:pe,ColumnRenderer:{props:["vnode"],render(){return this.$createElement(this.vnode.componentOptions.tag,this.vnode.data,this.vnode.children)}}},inheritAttrs:!1,props:{data:{type:[Array,Function],default:()=>[]},showSearch:{type:Boolean,default:!0},showMenu:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},pagination:{type:Object,default:()=>({})},height:{type:[String,Number]},calcHeight:{type:Number,default:0},dataAdapter:{type:Function,default:null},columnSettingButton:{type:Boolean,default:!0},refreshButton:{type:Boolean,default:!0},tableKey:{type:String,default:""},firstLoad:{type:Boolean,default:!0},maxFixedLeftQuantity:{type:Number},maxFixedRightQuantity:{type:Number},border:{type:Boolean,default:!0},searchColumns:{type:Array,default:null},searchForm:{type:Object,default:()=>({})},labelWidth:{type:[String,Number],default:void 0},inputWidth:{type:[String,Number],default:void 0},direction:{type:String,default:void 0,validator:t=>!t||["horizontal","vertical"].includes(t)},labelAlign:{type:String,default:"right",validator:t=>["left","right","center"].includes(t)}},data(){return{getDefaultSize:y,getCompatSize:m,isVue3:Y,isVue2:G,t:v().t,tableData:[],tableLoading:!1,columnsLoading:!1,tableReload:1,tableHeight:null,selectedRows:[],paginationInfo:{current:1,pageSize:20,total:void 0},originalColumns:[],displayColumns:[],isColumnConfigLoaded:!1,savedColumnConfig:null,slotsUpdateTrigger:0,lastSlotsHash:null,afterOpenDelay:{"open-delay":300}}},computed:{pageLoading(){return this.tableLoading||this.columnsLoading},computedTableKey(){if(this.tableKey)return this.tableKey;if(this.$route&&this.$route.path)return this.$route.path.slice(1).replace(/\//g,"-");throw new Error("tableKey is required")},computedShowPagination(){return this.showPagination&&typeof this.data=="function"},slotsHash(){return""}},watch:{data:{immediate:!0,handler(t){typeof t=="function"?!this.columnSettingButton||this.isColumnConfigLoaded&&!this.firstLoad?this.loadData():Array.isArray(t)&&(this.tableData=t):this.tableData=t}},height:{immediate:!0,handler(){this.getTableHeight()}},slotsHash:{handler(t,e){}}},created(){this.updateColumns()},mounted(){this.getTableHeight(),window.addEventListener("resize",this.getTableHeight)},beforeUpdate(){},updated(){this.$nextTick(()=>{this.checkAndUpdateColumns()})},beforeDestroy(){window.removeEventListener("resize",this.getTableHeight)},methods:{updateColumns(){this.originalColumns=this.$slots.default||[],this.columnSettingButton?this.isColumnConfigLoaded||(this.columnsLoading=!0):(this.displayColumns=this.originalColumns,this.isColumnConfigLoaded=!0)},getColumnsHash(t){return t.map((e,i)=>{var s,a,l,n,o;return e?e.key||((a=(s=e.data)==null?void 0:s.attrs)==null?void 0:a.prop)||((n=(l=e.componentOptions)==null?void 0:l.propsData)==null?void 0:n.prop)||((o=e.props)==null?void 0:o.prop)||`index-${i}`:`null-${i}`}).join(",")},checkAndUpdateColumns(){var t,e;try{const i=G?this.$slots.default||[]:((e=(t=this.$slots).default)==null?void 0:e.call(t))||[],s=this.getColumnsHash(i),a=this.lastSlotsHash||this.getColumnsHash(this.originalColumns);s!==a&&(this.lastSlotsHash=s,this.originalColumns=i,!this.columnSettingButton||!this.isColumnConfigLoaded?this.displayColumns=this.originalColumns:this.reapplyColumnConfig(),this.$nextTick(()=>{this.$refs.table&&this.$refs.table.doLayout(),this.$forceUpdate()}))}catch(i){}},handleUpdateSearchForm(t){this.$emit("update:search-form",t)},handleColumnConfigComplete(t){Array.isArray(t.columns)?(this.displayColumns=[...t.columns],this.savedColumnConfig=t.config||null):(this.displayColumns=[...this.originalColumns],this.savedColumnConfig=null),t.isInitialLoad?(this.isColumnConfigLoaded=!0,this.columnsLoading=!1,this.firstLoad&&typeof this.data=="function"&&this.loadData()):this.reloadTable()},reapplyColumnConfig(){if(!this.columnSettingButton||!this.isColumnConfigLoaded||!this.savedColumnConfig)return;const t=a=>{var l;return((l=a.data)==null?void 0:l.attrs)||{}},e={};this.originalColumns.forEach(a=>{const l=t(a);l.prop&&(e[l.prop]=a)});const i=[];this.originalColumns.forEach(a=>{t(a).type==="selection"&&i.push(a)}),[...this.savedColumnConfig].sort((a,l)=>{const n=a.sort!==void 0?a.sort:1/0,o=l.sort!==void 0?l.sort:1/0;return n-o}).forEach(a=>{a.prop&&e[a.prop]&&a.visible!==!1&&i.push(e[a.prop])}),this.originalColumns.forEach(a=>{const l=t(a),n=l.prop,o=l.type;if(n&&o!=="selection"){const u=this.savedColumnConfig.some(b=>b.prop===n),f=i.find(b=>t(b).prop===n);!u&&!f&&i.push(a)}}),this.displayColumns=i},isAutoHeight(){return this.height==="auto"},handleRefresh(){this.loadData()},async loadData(){if(Array.isArray(this.data))this.tableData=this.data;else if(typeof this.data=="function"){if(this.tableLoading)return;this.tableLoading=!0;try{const t=await this.data({paginationInfo:{pageSize:this.paginationInfo.pageSize,current:this.paginationInfo.current},params:this.searchForm}),{list:e,total:i,pageSize:s,current:a}=t;this.tableData=e;let l=c({},this.paginationInfo);i!==void 0&&(l.total=i),a!==void 0&&(l.current=a),s!==void 0&&(l.pageSize=s),this.paginationInfo=l}catch(t){}finally{this.tableLoading=!1}}},getTableHeight(){this.isAutoHeight()?this.$nextTick(()=>{const t=this.$refs.table,e=this.$refs.tmPagination;if(!t)return;const i=t.$el,s=e&&e.$el&&e.$el.offsetHeight||0;this.tableHeight=document.documentElement.clientHeight-i.offsetTop-s-this.calcHeight}):this.tableHeight=this.height,this.refreshTable()},search(){this.paginationInfo.current=1,this.loadData()},reset(){this.paginationInfo.current=1,this.$nextTick(()=>{this.loadData()})},handleSelectionChange(t){this.selectedRows=t,this.$emit("selection-change",t)},handleSizeChange(t){this.paginationInfo.pageSize=t,this.loadData(),this.$emit("size-change",t)},handleCurrentChange(t){this.paginationInfo.current=t,this.loadData(),this.$emit("current-change",t)},refreshTable(){this.$refs.table&&this.$refs.table.doLayout()},reloadTable(){this.tableReload++}}};var ri=function(){var e=this,i=e._self._c;return i("div",{ref:"tablePage",staticClass:"tm-table"},[e.searchColumns&&e.searchColumns.length>0?i("table-search",{ref:"search",attrs:{disabled:e.pageLoading,"search-columns":e.searchColumns,"search-form":e.searchForm,"label-width":e.labelWidth,"input-width":e.inputWidth,direction:e.direction,"label-align":e.labelAlign},on:{search:e.search,reset:e.reset,"update:search-form":e.handleUpdateSearchForm}},[e._t("search")],2):e._e(),e._t("between-search-menu"),e.showMenu?i("table-menu",{scopedSlots:e._u([{key:"left",fn:function(){return[e._t("menu-left")]},proxy:!0},{key:"right",fn:function(){return[e._t("menu-right"),e.refreshButton&&typeof e.data=="function"?i("el-tooltip",e._b({attrs:{content:e.t("refresh"),placement:"top"}},"el-tooltip",e.afterOpenDelay,!1),[i("el-button",{attrs:{circle:"",size:e.getDefaultSize()},on:{click:e.handleRefresh}},[i("RefreshIcon")],1)],1):e._e(),e.columnSettingButton?i("ColumnConfig",{attrs:{maxFixedLeftQuantity:e.maxFixedLeftQuantity,maxFixedRightQuantity:e.maxFixedRightQuantity,tableKey:e.computedTableKey,columns:e.originalColumns},on:{complete:e.handleColumnConfigComplete}}):e._e()]},proxy:!0}],null,!0)}):e._e(),e._t("between-menu-table"),i("el-table",e._g(e._b({directives:[{name:"loading",rawName:"v-loading",value:e.pageLoading,expression:"pageLoading"}],key:e.tableReload,ref:"table",attrs:{data:e.tableData,height:e.tableHeight,size:e.getCompatSize("mini")},on:{"selection-change":e.handleSelectionChange}},"el-table",_(c({},e.$attrs),{border:e.border}),!1),e.isVue2?e.$listeners:{}),e._l(e.displayColumns,function(s){return i("columnRenderer",{key:`${e.isVue3?s.id:s.data.attrs.prop}-${e.slotsUpdateTrigger}`,attrs:{vnode:s}})}),1),e._t("between-table-pagination"),e.computedShowPagination?i("table-pagination",{ref:"tmPagination",attrs:{"page-size":e.paginationInfo.pageSize,current:e.paginationInfo.current,total:e.paginationInfo.total,disabled:e.tableLoading},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange},scopedSlots:e._u([{key:"pagination-left",fn:function(){return[e._t("pagination-left")]},proxy:!0}],null,!0)}):e._e(),e._t("after-pagination")],2)},oi=[],ui=p(ni,ri,oi,!1,null,"732947c2");const B=ui.exports,di=!0,ci=!1,hi={name:"TmTableColumn",inheritAttrs:!1,computed:{isVisible(){return this.$attrs.visible!==!1},slots(){return this.$scopedSlots}},data(){return{isVue2:di,isVue3:ci}},created(){this.$parent&&this.$parent.$emit&&this.$parent.$emit("column-initialized",{prop:this.$attrs.prop,visible:this.$attrs.visible!==!1})}};var pi=function(){var e=this,i=e._self._c;return e.isVisible?i("el-table-column",e._g(e._b({scopedSlots:e._u([e._l(e.slots,function(s,a){return{key:a,fn:function(l){return[e._t(a,null,null,l)]}}})],null,!0)},"el-table-column",e.$attrs,!1),e.isVue2?e.$listeners:{})):e._e()},fi=[],mi=p(hi,pi,fi,!1,null,null);const j=mi.exports,{t:U}=v(),gi={name:"TmAdvancedEllipsisText",components:{CopyIcon:K},props:{rows:{type:Number,default:1},width:{type:String,default:"100%"},maxWidth:{type:String,default:""},showToolbar:{type:Boolean,default:!1},text:{type:String,default:""},showTooltip:{type:Boolean,default:!0},copyable:{type:Boolean,default:!1}},data(){return{isVue2:!0,originalText:"",isHovered:!1,lineHeight:0,containerWidth:0,resizeObserver:null,isCalculating:!1,frontLines:[],lastLineText:"",isLastLineEllipsis:!1,tableRowElement:null}},computed:{containerStyle(){const t={};return this.maxWidth?(t.maxWidth=this.maxWidth,t.width=this.width):t.width=this.width,t},hasToolbarSlot(){return this.$slots.toolbar?this.$slots.toolbar&&this.$slots.toolbar.length>0:!1},hasToolbarContent(){return this.copyable||this.hasToolbarSlot},shouldShowToolbar(){return this.showToolbar||this.isHovered&&this.hasToolbarContent}},mounted(){this.initComponent(),this.setupResizeObserver(),this.setupTableRowHover()},updated(){const t=this.getTextContent();t!==this.originalText&&(this.originalText=t,this.$nextTick(()=>{this.calculateLayout()}))},beforeDestroy(){this.cleanupResizeObserver(),this.cleanupTableRowHover()},beforeUnmount(){this.cleanupResizeObserver(),this.cleanupTableRowHover()},watch:{text:{handler(){this.$nextTick(()=>{this.originalText=this.getTextContent(),this.calculateLayout()})},immediate:!0},rows(){this.$nextTick(()=>{this.calculateLayout()})},shouldShowToolbar(){this.$nextTick(()=>{this.calculateLayout()})},"$slots.default":{handler(){this.$nextTick(()=>{this.originalText=this.getTextContent(),this.calculateLayout()})},deep:!0}},methods:{initComponent(){this.$nextTick(()=>{this.originalText=this.getTextContent(),this.calculateLineHeight(),this.$nextTick(()=>{this.calculateLayout()})})},handleCopy(){navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(this.originalText).then(()=>{this.$message.success(U("copySuccess"))}).catch(()=>{this.fallbackCopy()}):this.fallbackCopy()},fallbackCopy(){const t=document.createElement("textarea");t.value=this.originalText,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),this.$message.success(U("copySuccess"))}catch(e){this.$message.error(U("copyFailed"))}document.body.removeChild(t)},getTextContent(){return this.$slots.default?this.$slots.default.map(e=>e.text?e.text:e.children&&typeof e.children=="string"?e.children:e.children&&Array.isArray(e.children)?e.children.map(i=>i.text||"").join(""):"").join(""):this.text||""},calculateLineHeight(){const t=this.$refs.containerRef;if(!t)return;const e=window.getComputedStyle(t);this.containerWidth=t.offsetWidth;const i=this.$refs.measureRef;if(i){this.setMeasureElementStyle(i,{width:this.containerWidth+"px",wordBreak:"break-all",whiteSpace:"normal"}),i.textContent="测",i.offsetHeight;const s=i.offsetHeight;i.innerHTML="",this.lineHeight=s}else{const s=e.lineHeight;if(s&&s!=="normal")this.lineHeight=parseInt(s);else{const a=parseInt(e.fontSize);this.lineHeight=a*1.2}}},calculateLayout(){if(!this.isCalculating){if(!this.originalText||this.rows<=0){this.frontLines=[],this.lastLineText=this.originalText||"",this.isLastLineEllipsis=!1;return}this.isCalculating=!0,this.$nextTick(()=>{requestAnimationFrame(()=>{this.performLayoutCalculation()})})}},performLayoutCalculation(){const t=this.originalText;if(this.rows===1)this.frontLines=[],this.lastLineText=t,this.isLastLineEllipsis=this.checkIfTextOverflows(t);else{const e=this.lineHeight;if(this.getTextHeight(t)<=e)this.frontLines=[],this.lastLineText=t,this.isLastLineEllipsis=this.checkIfTextOverflows(t);else{const s=this.lineHeight*(this.rows-1),a=this.findTextForHeight(t,s);this.frontLines=this.splitTextToLines(a);const l=t.substring(a.length);this.lastLineText=l,this.isLastLineEllipsis=l.length>0&&this.checkIfTextOverflows(l)}}this.isCalculating=!1},findTextForHeight(t,e){if(this.getTextHeight(t)<=e)return t;let i=0,s=t.length,a="";for(;i<=s;){const l=Math.floor((i+s)/2),n=t.substring(0,l);this.getTextHeight(n)<=e?(a=n,i=l+1):s=l-1}return a},splitTextToLines(t){if(!t)return[];const e=[];let i=t;for(;i.length>0;){const s=this.findTextForHeight(i,this.lineHeight);if(s.length===0)break;e.push(s),i=i.substring(s.length)}return e},checkIfTextOverflows(t){if(!t)return!1;const e=this.getTextWidth(t),i=this.shouldShowToolbar&&this.hasToolbarContent?this.getToolbarWidth():0,s=this.containerWidth-i-5;return e>s},getToolbarWidth(){let t=0;return this.copyable&&(t+=20),this.hasToolbarSlot&&(t+=40),t},getTextHeight(t){return this.measureText(t,{width:this.containerWidth+"px",wordBreak:"break-all",whiteSpace:"normal"})},getTextWidth(t){return this.measureText(t,{whiteSpace:"nowrap"})},measureText(t,e={}){if(!this.$refs.containerRef||!this.$refs.measureRef)return 0;const i=this.$refs.measureRef,s=i.style.cssText;this.setMeasureElementStyle(i,e),i.textContent=t,i.offsetHeight;const a=e.whiteSpace==="nowrap"?i.offsetWidth:i.offsetHeight;return i.style.cssText=s,i.innerHTML="",a},setMeasureElementStyle(t,e={}){const i=window.getComputedStyle(this.$refs.containerRef);t.style.cssText="",t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.visibility="hidden",t.style.pointerEvents="none",t.style.zIndex="-1",t.style.fontSize=i.fontSize,t.style.fontFamily=i.fontFamily,t.style.fontWeight=i.fontWeight,t.style.lineHeight=i.lineHeight,t.style.letterSpacing=i.letterSpacing,t.style.wordSpacing=i.wordSpacing,t.style.padding="0",t.style.margin="0",t.style.border="none",t.style.boxSizing="border-box",Object.entries(e).forEach(([s,a])=>{t.style[s]=a})},handleMouseEnter(){this.isHovered=!0},handleMouseLeave(){this.isHovered=!1},setupResizeObserver(){typeof ResizeObserver!="undefined"&&(this.resizeObserver=new ResizeObserver(t=>{const e=t[0];if(e){const i=e.contentRect.width;Math.abs(i-this.containerWidth)>1&&requestAnimationFrame(()=>{this.calculateLineHeight(),this.calculateLayout()})}}),this.$refs.containerRef&&this.resizeObserver.observe(this.$refs.containerRef))},cleanupResizeObserver(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)},setupTableRowHover(){let t=this.$el;for(;t&&t!==document.body;){if(t.classList&&t.classList.contains("el-table__row")){this.tableRowElement=t;break}t=t.parentElement}this.tableRowElement&&(this.tableRowElement.addEventListener("mouseenter",this.handleMouseEnter),this.tableRowElement.addEventListener("mouseleave",this.handleMouseLeave))},cleanupTableRowHover(){this.tableRowElement&&(this.tableRowElement.removeEventListener("mouseenter",this.handleMouseEnter),this.tableRowElement.removeEventListener("mouseleave",this.handleMouseLeave),this.tableRowElement=null)}}};var bi=function(){var e=this,i=e._self._c;return i("div",{ref:"containerRef",staticClass:"tm-ellipsis-text",style:e.containerStyle,on:{mouseenter:e.handleMouseEnter,mouseleave:e.handleMouseLeave}},[e.showTooltip&&e.isLastLineEllipsis?i("el-tooltip",e._b({attrs:{content:e.originalText,disabled:!e.showTooltip||!e.isLastLineEllipsis,placement:"top"}},"el-tooltip",{[e.isVue2?"open-delay":"show-after"]:300},!1),[i("div",{staticClass:"tm-ellipsis-text-wrapper"},[e._l(e.frontLines,function(s,a){return i("div",{key:"front-"+a,staticClass:"tm-ellipsis-line",domProps:{innerHTML:e._s(s)}})}),i("div",{staticClass:"tm-ellipsis-last-line"},[i("div",{staticClass:"tm-ellipsis-text-part",domProps:{innerHTML:e._s(e.lastLineText)}}),e.shouldShowToolbar&&e.hasToolbarContent?i("div",{staticClass:"tm-ellipsis-toolbar-part"},[e.copyable?i("CopyIcon",{staticClass:"icon-item",on:{click:e.handleCopy}}):e._e(),e._t("toolbar")],2):e._e()])],2)]):i("div",{staticClass:"tm-ellipsis-text-wrapper"},[e._l(e.frontLines,function(s,a){return i("div",{key:"front-"+a,staticClass:"tm-ellipsis-line",domProps:{innerHTML:e._s(s)}})}),i("div",{staticClass:"tm-ellipsis-last-line"},[i("div",{staticClass:"tm-ellipsis-text-part",domProps:{innerHTML:e._s(e.lastLineText)}}),e.shouldShowToolbar&&e.hasToolbarContent?i("div",{staticClass:"tm-ellipsis-toolbar-part"},[e.copyable?i("CopyIcon",{staticClass:"icon-item",on:{click:e.handleCopy}}):e._e(),e._t("toolbar")],2):e._e()])],2),i("div",{ref:"measureRef",staticClass:"tm-ellipsis-measure"})],1)},yi=[],vi=p(gi,bi,yi,!1,null,"14f27c2e");const J=vi.exports,X={install:{install(t,e={}){[B,j,$,J].forEach(i=>t.component(i.name,i)),e.tableConfigProvider&&Gt(e.tableConfigProvider),e.lang&&w(e.lang||"zh-CN")}}.install,Table:B,Column:j,Search:N,Select:O,Input:A,Date:D,Cascader:R,Radio:M,Checkbox:H,Switch:E,Textarea:I,EllipsisText:$,AdvancedEllipsisText:J,setLang:w,useLocale:v};typeof window!="undefined"&&window.Vue&&X.install(window.Vue),r.AdvancedEllipsisText=J,r.Cascader=R,r.Checkbox=H,r.Column=j,r.Date=D,r.EllipsisText=$,r.Input=A,r.Radio=M,r.Search=N,r.Select=O,r.Switch=E,r.Table=B,r.Textarea=I,r.default=X,r.setLang=w,r.useLocale=v,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});