tm-table 1.0.90 → 1.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vue2/tm-table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.advanced-select[data-v-7a60f352]{display:flex;max-width:305px}.advanced-select.hasField .select[data-v-7a60f352]{width:206px;position:relative}.advanced-select.hasField .select[data-v-7a60f352]:hover{z-index:1!important}.advanced-select.hasField[data-v-7a60f352] .select--v2 .el-input__inner,.advanced-select.hasField[data-v-7a60f352] .select--v3 .el-select__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.advanced-select .field-select[data-v-7a60f352]{margin-right:-1px;width:100px;position:relative}.advanced-select .field-select[data-v-7a60f352]:hover{z-index:1!important}.advanced-select[data-v-7a60f352] .field-select--v2 .el-input__inner,.advanced-select[data-v-7a60f352] .field-select--v3 .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0}.advanced-select .select[data-v-7a60f352]{width:200px;flex-shrink:0}.advanced-select .select[data-v-7a60f352] .el-tag--info{max-width:52%}.check-all-option[data-v-7a60f352]{margin-top:-6px;padding:6px 20px;border-bottom:1px solid #ebeef5;cursor:default;position:sticky;top:0;z-index:1;background-color:#fff}.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-aefedcde]{display:inline-flex;vertical-align:top}.ellipsis-text-container .toolbar[data-v-aefedcde]{display:none;max-width:30px}.ellipsis-text-container .toolbar .icon-item[data-v-aefedcde]{cursor:pointer;margin-left:2px}.ellipsis-text-container .toolbar .icon-item[data-v-aefedcde]:hover{opacity:.8}.ellipsis-text-container:hover .toolbar[data-v-aefedcde]{display:flex;align-items:center;gap:2px}.ellipsis-text-container:hover .toolbar.multiline[data-v-aefedcde]{display:block}.ellipsis-text-container:hover .toolbar .icon-item[data-v-aefedcde]:hover{color:var(--color-primary)!important}.tm-advanced-input[data-v-e5c28c62]{display:flex;align-items:center}.tm-advanced-input .left-select[data-v-e5c28c62]{margin-right:-1px}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .left-select.el-select{margin-right:-1px;position:relative;z-index:2}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .left-select.el-select .el-input__inner{transition:0s;border-top-right-radius:0;border-bottom-right-radius:0}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input{position:relative;z-index:1}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input:focus-within,.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input:hover,.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input:focus{z-index:3}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input.has-label .el-input__inner{transition:0s;border-top-left-radius:0;border-bottom-left-radius:0}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .left-select.el-select .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0;position:relative;z-index:2;transition:0s}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper{position:relative;z-index:1;transition:0s}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper:focus-within,.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper:hover,.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper:focus{z-index:3}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input.has-label .el-input__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.popover-content .popover-title[data-v-e5c28c62]{font-weight:700;margin-bottom:5px}.popover-content .popover-subtitle[data-v-e5c28c62]{font-size:12px;color:#909399;margin-top:0;margin-bottom:10px}.popover-content .popover-footer[data-v-e5c28c62]{margin-top:10px;text-align:right}.tm-advanced-input--v3 .input-label[data-v-e5c28c62]{border-right:none;color:var(--el-input-text-color, var(--el-text-color-regular))}.tm-advanced-input--v2 .input-label[data-v-e5c28c62]{border-right:none;color:#606266}.input-label[data-v-e5c28c62]{height:100%;flex-shrink:0;width:100px;font-size:12px;box-sizing:border-box;display:flex;align-items:center;line-height:12px;border-right:none;border-top-left-radius:4px;border-bottom-left-radius:4px;justify-content:flex-end;padding-right:4px}.tm-date-picker--v2[data-v-3cd3ede3]{display:flex;align-items:center}.tm-date-picker--v2[data-v-3cd3ede3] .el-select{margin-right:-1px;z-index:1}.tm-date-picker--v2[data-v-3cd3ede3] .el-select .el-input__inner{border-top-right-radius:0;border-bottom-right-radius:0;transition:0s}.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor.el-input__inner{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor{transition:0s}.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor.is-active,.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor:hover{z-index:2}.tm-date-picker--v3[data-v-3cd3ede3] .el-select{margin-right:-1px}.tm-date-picker--v3[data-v-3cd3ede3] .el-select .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0;position:relative;z-index:2;transition:0s}.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor{position:relative;border-top-left-radius:0!important;border-bottom-left-radius:0!important;z-index:1;transition:0s}.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor.focus-within,.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor.focus,.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor.is-active,.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor:hover{z-index:2}.tm-cascader--v2 .el-input--mini input{height:28px!important}.tm-cascader--v2 .el-cascader__tags .el-tag{margin:4px 0 4px 6px}.tm-cascader--v2 .el-cascader__tags .el-tag:first-child{max-width:90px}.tm-cascader--v2 .el-cascader__tags .el-tag:nth-child(2){max-width:48px}.tm-cascader--v2 .el-cascader__tags input{font-size:12px!important}.tm-cascader--v2 .el-cascader__tags .el-cascader__search-input{min-width:16px}.tm-cascader--v3 .el-cascader__tags{font-size:12px;flex-wrap:nowrap;align-items:center}.tm-cascader--v3 .el-cascader__tags .el-tag{padding:0 4px}.tm-cascader--v3 .el-cascader__tags .el-tag:first-child{max-width:90px}.tm-cascader--v3 .el-cascader__tags .el-tag:nth-child(2){max-width:48px}.tm-cascader--v3 .el-cascader__tags .el-cascader__search-input{min-width:16px}.el-cascader__collapse-tags{max-height:400px;max-width:400px;margin:0 -11px;padding:0 11px;overflow-y:auto;display:flex;flex-wrap:wrap;gap:4px}[data-v-61fed13d] .el-radio-button__inner{font-weight:400}.tm-radio[data-v-61fed13d]{width:200px;display:flex;width:100%}.tm-radio.wide-mode[data-v-61fed13d]{width:305px}.tm-radio--v2[data-v-61fed13d] .el-radio-group .el-radio-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tm-radio--v2[data-v-61fed13d] .el-radio-group .el-radio-button .el-radio-button__inner{padding:7px 5px;width:100%;display:inline-block;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;text-align:center}.tm-radio--v3[data-v-61fed13d] .el-radio-group .el-radio-button .el-radio-button__inner{width:100%}.tm-checkbox[data-v-b44866b1]{width:200px;display:flex;flex-direction:column}.tm-checkbox.wide-mode[data-v-b44866b1]{width:305px}.tm-checkbox--v2[data-v-b44866b1] .el-checkbox-group{display:flex;width:100%}.tm-checkbox--v2[data-v-b44866b1] .el-checkbox-group .el-checkbox-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tm-checkbox--v2[data-v-b44866b1] .el-checkbox-group .el-checkbox-button .el-checkbox-button__inner{padding:7px 5px;width:100%;display:inline-block;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;text-align:center}.tm-checkbox--v3[data-v-b44866b1] .el-checkbox-group .el-checkbox-button .el-checkbox-button__inner{width:100%}.tm-switch[data-v-9e7a342f]{display:flex;align-items:center}.tm-switch.narrow-container[data-v-9e7a342f]{width:95px}.tm-switch.medium-container[data-v-9e7a342f]{width:200px}.tm-switch.wide-container[data-v-9e7a342f]{width:305px}.tm-switch[data-v-9e7a342f] .el-switch .el-switch__core{flex-shrink:0}.table-search[data-v-572f884b]{--el-font-size-base: 12px}.table-search[data-v-572f884b] .el-select__wrapper,.table-search[data-v-572f884b] .el-switch__label{font-size:var(--el-font-size-base);font-weight:400}.table-search[data-v-572f884b] .el-radio-button__inner,.table-search[data-v-572f884b] .el-checkbox-button__inner{padding:9px 10px}.table-search[data-v-572f884b]{margin-bottom:10px;display:flex;flex-wrap:wrap;align-items:center}.table-search .search-content[data-v-572f884b]{flex:1;display:flex;align-items:center;flex-wrap:wrap;gap:10px}.table-search .search-actions[data-v-572f884b]{display:flex}.table-search .search-error-message[data-v-572f884b]{color:#f56c6c;font-size:12px;margin:5px 0}.table-search--v2 .search-form-item[data-v-572f884b]{height:28px}.table-search--v3 .search-form-item[data-v-572f884b]{height:24px}.tm-pagination[data-v-4dbdf6e7]{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-92bf8b2f]{display:flex;align-items:center;font-weight:700;color:#000;height:32px;padding-left:10px;padding-top:10px}.container[data-v-92bf8b2f]{height:500px;width:100%;display:flex;flex-direction:column}.container .main-container[data-v-92bf8b2f]{display:flex;flex:1;overflow:hidden;border-bottom:1px solid #dcdfe9}.container .main-container .left-content[data-v-92bf8b2f]{flex:2;border-right:1px solid #dcdfe9;display:flex;flex-direction:column}.container .main-container .left-content .option-list[data-v-92bf8b2f]{flex:1;overflow-y:auto}.container .main-container .right-content[data-v-92bf8b2f]{flex:1;overflow-y:auto;display:flex;flex-direction:column;overflow:hidden}.container .main-container .right-content .search-box[data-v-92bf8b2f]{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-92bf8b2f] .el-input__inner{box-shadow:none;border:none}.container .main-container .right-content .search-box[data-v-92bf8b2f] .el-input__wrapper{box-shadow:none}.container .main-container .right-content .sort-list[data-v-92bf8b2f]{flex:1;overflow-y:auto}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-92bf8b2f]{position:relative;transition:background-color .2s}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-92bf8b2f]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item-wrapper:hover .delete-button[data-v-92bf8b2f],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .top-button[data-v-92bf8b2f],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .left-fixed-btn[data-v-92bf8b2f]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item-wrapper:hover .right-fixed-btn[data-v-92bf8b2f]:not(.active-fixed){display:inline-block!important}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-92bf8b2f]{position:relative}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-92bf8b2f]:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:#ff00001a;border:1px dashed #f56c6c;pointer-events:none}.container .main-container .right-content .sort-list .sort-item-wrapper.frozen[data-v-92bf8b2f]:hover,.container .main-container .right-content .sort-list .sort-item-wrapper.frozenRight[data-v-92bf8b2f]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item[data-v-92bf8b2f]{display:flex;align-items:center;width:100%;height:32px;box-sizing:border-box;padding:0 8px;transition:.2s;-webkit-user-select:none;user-select:none}.container .main-container .right-content .sort-list .sort-item .row-title[data-v-92bf8b2f]{cursor:grab;flex:1;margin-right:8px;display:flex;align-items:center;gap:4px;text-align:left}.container .main-container .right-content .sort-list .sort-item .operation-btns[data-v-92bf8b2f]{display:flex;align-items:center}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont-button[data-v-92bf8b2f]{margin-left:3px;padding:0}.container .main-container .right-content .sort-list .sort-item .operation-btns .delete-button[data-v-92bf8b2f],.container .main-container .right-content .sort-list .sort-item .operation-btns .top-button[data-v-92bf8b2f],.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn[data-v-92bf8b2f]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn[data-v-92bf8b2f]:not(.active-fixed){display:none}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn.active-fixed[data-v-92bf8b2f],.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn.active-fixed[data-v-92bf8b2f]{display:inline-block;color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-92bf8b2f]{color:#aaa;font-size:14px}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-92bf8b2f]: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-92bf8b2f]{transform:rotate(-90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn:hover .el-icon-position[data-v-92bf8b2f]{color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn .el-icon-position[data-v-92bf8b2f]{transform:rotate(90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn:hover .el-icon-position[data-v-92bf8b2f]{color:var(--el-color-primary)}.container .footer[data-v-92bf8b2f]{padding:10px;box-sizing:border-box;display:flex;justify-content:space-between}.el-checkbox[data-v-92bf8b2f]{white-space:wrap;min-height:14px;height:auto;margin-top:10px;margin-left:10px;font-weight:400}.el-checkbox[data-v-92bf8b2f] .el-checkbox__label{width:70px;vertical-align:top}.blue-background-class[data-v-92bf8b2f]{background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a;z-index:1000}.sortable-drag[data-v-92bf8b2f]{opacity:.9;background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a}.tips[data-v-92bf8b2f]{color:#999;line-height:16px;font-size:12px;padding:8px}.tips span[data-v-92bf8b2f],.tips span span[data-v-92bf8b2f]{color:#999}.icon-item[data-v-16643222]{cursor:pointer}.icon-item[data-v-16643222]:hover{opacity:.6}.tm-ellipsis-text[data-v-16643222]{position:relative;overflow:hidden}.tm-ellipsis-text .tm-ellipsis-text-wrapper[data-v-16643222]{width:100%}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-line[data-v-16643222]{line-height:inherit;word-break:break-all;white-space:normal}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-last-line[data-v-16643222]{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-16643222]{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-16643222]{flex-shrink:0;margin-left:4px;display:flex;align-items:center;line-height:inherit;font-size:inherit}.tm-ellipsis-measure[data-v-16643222]{position:absolute;left:-9999px;top:-9999px;visibility:hidden;pointer-events:none;z-index:-1}
|
|
1
|
+
@charset "UTF-8";.advanced-select[data-v-7a60f352]{display:flex;max-width:305px}.advanced-select.hasField .select[data-v-7a60f352]{width:206px;position:relative}.advanced-select.hasField .select[data-v-7a60f352]:hover{z-index:1!important}.advanced-select.hasField[data-v-7a60f352] .select--v2 .el-input__inner,.advanced-select.hasField[data-v-7a60f352] .select--v3 .el-select__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.advanced-select .field-select[data-v-7a60f352]{margin-right:-1px;width:100px;position:relative}.advanced-select .field-select[data-v-7a60f352]:hover{z-index:1!important}.advanced-select[data-v-7a60f352] .field-select--v2 .el-input__inner,.advanced-select[data-v-7a60f352] .field-select--v3 .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0}.advanced-select .select[data-v-7a60f352]{width:200px;flex-shrink:0}.advanced-select .select[data-v-7a60f352] .el-tag--info{max-width:52%}.check-all-option[data-v-7a60f352]{margin-top:-6px;padding:6px 20px;border-bottom:1px solid #ebeef5;cursor:default;position:sticky;top:0;z-index:1;background-color:#fff}.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{text-align:left}.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-a2647731]{display:inline-flex;vertical-align:top}.ellipsis-text-container .toolbar[data-v-a2647731]{display:none;max-width:30px}.ellipsis-text-container .toolbar .icon-item[data-v-a2647731]{cursor:pointer;margin-left:2px}.ellipsis-text-container .toolbar .icon-item[data-v-a2647731]:hover{opacity:.8}.ellipsis-text-container:hover .toolbar[data-v-a2647731]{display:flex;align-items:center;gap:2px}.ellipsis-text-container:hover .toolbar.multiline[data-v-a2647731]{display:block}.ellipsis-text-container:hover .toolbar .icon-item[data-v-a2647731]:hover{color:var(--color-primary)!important}.tm-advanced-input[data-v-e5c28c62]{display:flex;align-items:center}.tm-advanced-input .left-select[data-v-e5c28c62]{margin-right:-1px}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .left-select.el-select{margin-right:-1px;position:relative;z-index:2}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .left-select.el-select .el-input__inner{transition:0s;border-top-right-radius:0;border-bottom-right-radius:0}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input{position:relative;z-index:1}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input:focus-within,.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input:hover,.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input:focus{z-index:3}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input.has-label .el-input__inner{transition:0s;border-top-left-radius:0;border-bottom-left-radius:0}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .left-select.el-select .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0;position:relative;z-index:2;transition:0s}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper{position:relative;z-index:1;transition:0s}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper:focus-within,.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper:hover,.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper:focus{z-index:3}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input.has-label .el-input__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.popover-content .popover-title[data-v-e5c28c62]{font-weight:700;margin-bottom:5px}.popover-content .popover-subtitle[data-v-e5c28c62]{font-size:12px;color:#909399;margin-top:0;margin-bottom:10px}.popover-content .popover-footer[data-v-e5c28c62]{margin-top:10px;text-align:right}.tm-advanced-input--v3 .input-label[data-v-e5c28c62]{border-right:none;color:var(--el-input-text-color, var(--el-text-color-regular))}.tm-advanced-input--v2 .input-label[data-v-e5c28c62]{border-right:none;color:#606266}.input-label[data-v-e5c28c62]{height:100%;flex-shrink:0;width:100px;font-size:12px;box-sizing:border-box;display:flex;align-items:center;line-height:12px;border-right:none;border-top-left-radius:4px;border-bottom-left-radius:4px;justify-content:flex-end;padding-right:4px}.tm-date-picker--v2[data-v-3cd3ede3]{display:flex;align-items:center}.tm-date-picker--v2[data-v-3cd3ede3] .el-select{margin-right:-1px;z-index:1}.tm-date-picker--v2[data-v-3cd3ede3] .el-select .el-input__inner{border-top-right-radius:0;border-bottom-right-radius:0;transition:0s}.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor.el-input__inner{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor{transition:0s}.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor.is-active,.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor:hover{z-index:2}.tm-date-picker--v3[data-v-3cd3ede3] .el-select{margin-right:-1px}.tm-date-picker--v3[data-v-3cd3ede3] .el-select .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0;position:relative;z-index:2;transition:0s}.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor{position:relative;border-top-left-radius:0!important;border-bottom-left-radius:0!important;z-index:1;transition:0s}.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor.focus-within,.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor.focus,.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor.is-active,.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor:hover{z-index:2}.tm-cascader--v2 .el-input--mini input{height:28px!important}.tm-cascader--v2 .el-cascader__tags .el-tag{margin:4px 0 4px 6px}.tm-cascader--v2 .el-cascader__tags .el-tag:first-child{max-width:90px}.tm-cascader--v2 .el-cascader__tags .el-tag:nth-child(2){max-width:48px}.tm-cascader--v2 .el-cascader__tags input{font-size:12px!important}.tm-cascader--v2 .el-cascader__tags .el-cascader__search-input{min-width:16px}.tm-cascader--v3 .el-cascader__tags{font-size:12px;flex-wrap:nowrap;align-items:center}.tm-cascader--v3 .el-cascader__tags .el-tag{padding:0 4px}.tm-cascader--v3 .el-cascader__tags .el-tag:first-child{max-width:90px}.tm-cascader--v3 .el-cascader__tags .el-tag:nth-child(2){max-width:48px}.tm-cascader--v3 .el-cascader__tags .el-cascader__search-input{min-width:16px}.el-cascader__collapse-tags{max-height:400px;max-width:400px;margin:0 -11px;padding:0 11px;overflow-y:auto;display:flex;flex-wrap:wrap;gap:4px}[data-v-61fed13d] .el-radio-button__inner{font-weight:400}.tm-radio[data-v-61fed13d]{width:200px;display:flex;width:100%}.tm-radio.wide-mode[data-v-61fed13d]{width:305px}.tm-radio--v2[data-v-61fed13d] .el-radio-group .el-radio-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tm-radio--v2[data-v-61fed13d] .el-radio-group .el-radio-button .el-radio-button__inner{padding:7px 5px;width:100%;display:inline-block;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;text-align:center}.tm-radio--v3[data-v-61fed13d] .el-radio-group .el-radio-button .el-radio-button__inner{width:100%}.tm-checkbox[data-v-b44866b1]{width:200px;display:flex;flex-direction:column}.tm-checkbox.wide-mode[data-v-b44866b1]{width:305px}.tm-checkbox--v2[data-v-b44866b1] .el-checkbox-group{display:flex;width:100%}.tm-checkbox--v2[data-v-b44866b1] .el-checkbox-group .el-checkbox-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tm-checkbox--v2[data-v-b44866b1] .el-checkbox-group .el-checkbox-button .el-checkbox-button__inner{padding:7px 5px;width:100%;display:inline-block;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;text-align:center}.tm-checkbox--v3[data-v-b44866b1] .el-checkbox-group .el-checkbox-button .el-checkbox-button__inner{width:100%}.tm-switch[data-v-9e7a342f]{display:flex;align-items:center}.tm-switch.narrow-container[data-v-9e7a342f]{width:95px}.tm-switch.medium-container[data-v-9e7a342f]{width:200px}.tm-switch.wide-container[data-v-9e7a342f]{width:305px}.tm-switch[data-v-9e7a342f] .el-switch .el-switch__core{flex-shrink:0}.table-search[data-v-572f884b]{--el-font-size-base: 12px}.table-search[data-v-572f884b] .el-select__wrapper,.table-search[data-v-572f884b] .el-switch__label{font-size:var(--el-font-size-base);font-weight:400}.table-search[data-v-572f884b] .el-radio-button__inner,.table-search[data-v-572f884b] .el-checkbox-button__inner{padding:9px 10px}.table-search[data-v-572f884b]{margin-bottom:10px;display:flex;flex-wrap:wrap;align-items:center}.table-search .search-content[data-v-572f884b]{flex:1;display:flex;align-items:center;flex-wrap:wrap;gap:10px}.table-search .search-actions[data-v-572f884b]{display:flex}.table-search .search-error-message[data-v-572f884b]{color:#f56c6c;font-size:12px;margin:5px 0}.table-search--v2 .search-form-item[data-v-572f884b]{height:28px}.table-search--v3 .search-form-item[data-v-572f884b]{height:24px}.tm-pagination[data-v-4dbdf6e7]{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-59c02213]{display:flex;align-items:center;font-weight:700;color:#000;height:32px;padding-left:10px;padding-top:10px}.container[data-v-59c02213]{height:500px;width:100%;display:flex;flex-direction:column;overflow:hidden}.container .main-container[data-v-59c02213]{display:flex;flex:1;overflow:hidden;border-bottom:1px solid #dcdfe9}.container .main-container .left-content[data-v-59c02213]{flex:2;border-right:1px solid #dcdfe9;display:flex;flex-direction:column}.container .main-container .left-content .option-list[data-v-59c02213]{flex:1;overflow-y:auto}.container .main-container .right-content[data-v-59c02213]{flex:1;overflow-y:auto;display:flex;flex-direction:column;overflow:hidden}.container .main-container .right-content .search-box[data-v-59c02213]{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-59c02213] .el-input__inner{box-shadow:none;border:none}.container .main-container .right-content .search-box[data-v-59c02213] .el-input__wrapper{box-shadow:none}.container .main-container .right-content .sort-list[data-v-59c02213]{flex:1;overflow-y:auto}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-59c02213]{position:relative;transition:background-color .2s}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-59c02213]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item-wrapper:hover .delete-button[data-v-59c02213],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .top-button[data-v-59c02213],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .left-fixed-btn[data-v-59c02213]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item-wrapper:hover .right-fixed-btn[data-v-59c02213]:not(.active-fixed){display:inline-block!important}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-59c02213]{position:relative}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-59c02213]:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:#ff00001a;border:1px dashed #f56c6c;pointer-events:none}.container .main-container .right-content .sort-list .sort-item-wrapper.frozen[data-v-59c02213]:hover,.container .main-container .right-content .sort-list .sort-item-wrapper.frozenRight[data-v-59c02213]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item[data-v-59c02213]{display:flex;align-items:center;width:100%;height:32px;box-sizing:border-box;padding:0 8px;transition:.2s;-webkit-user-select:none;user-select:none}.container .main-container .right-content .sort-list .sort-item .row-title[data-v-59c02213]{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-59c02213]{display:flex;align-items:center}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont-button[data-v-59c02213]{margin-left:3px;padding:0}.container .main-container .right-content .sort-list .sort-item .operation-btns .delete-button[data-v-59c02213],.container .main-container .right-content .sort-list .sort-item .operation-btns .top-button[data-v-59c02213],.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn[data-v-59c02213]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn[data-v-59c02213]:not(.active-fixed){display:none}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn.active-fixed[data-v-59c02213],.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn.active-fixed[data-v-59c02213]{display:inline-block;color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-59c02213]{color:#aaa;font-size:14px}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-59c02213]: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-59c02213]{transform:rotate(-90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn:hover .el-icon-position[data-v-59c02213]{color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn .el-icon-position[data-v-59c02213]{transform:rotate(90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn:hover .el-icon-position[data-v-59c02213]{color:var(--el-color-primary)}.container .footer[data-v-59c02213]{padding:10px;box-sizing:border-box;display:flex;justify-content:space-between}.el-checkbox[data-v-59c02213]{white-space:wrap;min-height:14px;height:auto;margin-top:10px;margin-left:10px;font-weight:400}.el-checkbox[data-v-59c02213] .el-checkbox__label{width:70px;vertical-align:top}.blue-background-class[data-v-59c02213]{background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a;z-index:1000}.sortable-drag[data-v-59c02213]{opacity:.9;background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a}.tips[data-v-59c02213]{color:#999;line-height:16px;font-size:12px;padding:8px}.tips span[data-v-59c02213],.tips span span[data-v-59c02213]{color:#999}.tm-table[data-v-3a76baf8]{overflow:hidden}.icon-item[data-v-16643222]{cursor:pointer}.icon-item[data-v-16643222]:hover{opacity:.6}.tm-ellipsis-text[data-v-16643222]{position:relative;overflow:hidden}.tm-ellipsis-text .tm-ellipsis-text-wrapper[data-v-16643222]{width:100%}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-line[data-v-16643222]{line-height:inherit;word-break:break-all;white-space:normal}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-last-line[data-v-16643222]{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-16643222]{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-16643222]{flex-shrink:0;margin-left:4px;display:flex;align-items:center;line-height:inherit;font-size:inherit}.tm-ellipsis-measure[data-v-16643222]{position:absolute;left:-9999px;top:-9999px;visibility:hidden;pointer-events:none;z-index:-1}
|
package/dist/vue2/tm-table.es.js
CHANGED
|
@@ -506,7 +506,7 @@ var be = function() {
|
|
|
506
506
|
ve,
|
|
507
507
|
!1,
|
|
508
508
|
null,
|
|
509
|
-
"
|
|
509
|
+
"a2647731"
|
|
510
510
|
);
|
|
511
511
|
const x = ye.exports, Ce = !0, xe = !1, _e = {
|
|
512
512
|
name: "TmAdvancedInputFilter",
|
|
@@ -2049,7 +2049,7 @@ var Lt = function() {
|
|
|
2049
2049
|
Ot,
|
|
2050
2050
|
!1,
|
|
2051
2051
|
null,
|
|
2052
|
-
"
|
|
2052
|
+
"59c02213"
|
|
2053
2053
|
);
|
|
2054
2054
|
const Rt = Mt.exports, At = !0, Dt = !1, Ht = {
|
|
2055
2055
|
name: "TmTable",
|
|
@@ -2306,7 +2306,7 @@ var Et = function() {
|
|
|
2306
2306
|
It,
|
|
2307
2307
|
!1,
|
|
2308
2308
|
null,
|
|
2309
|
-
|
|
2309
|
+
"3a76baf8"
|
|
2310
2310
|
);
|
|
2311
2311
|
const E = Wt.exports, Pt = !0, Nt = !1, Bt = {
|
|
2312
2312
|
name: "TmTableColumn",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(o,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("vue"),require("sortablejs")):typeof define=="function"&&define.amd?define(["exports","vue","sortablejs"],x):(o=typeof globalThis<"u"?globalThis:o||self,x(o.TmTable={},o.Vue,o.Sortable))})(this,function(o,x,b){"use strict";var N;const C=t=>t,m=()=>"mini",B={"zh-CN":{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:"复制失败"},"en-US":{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"}};let v={value:"zh-CN"};{const t=require("vue");t.observable||(N=t.default)!=null&&N.observable?v=t.default.observable(v):v=new t({data(){return{currentLang:v}}}).$data.currentLang}const j=t=>{var e;return((e=B[v.value])==null?void 0:e[t])||t},$=t=>{v.value=t},g=()=>({t:j,setLang:$,currentLang:v});function u(t,e,i,s,a,l,n,c){var r=typeof t=="function"?t.options:t;return e&&(r.render=e,r.staticRenderFns=i,r._compiled=!0),l&&(r._scopeId="data-v-"+l),{exports:t,options:r}}const U=!0,J=!1,T="value",Q="input",q={name:"TmSelectFilter",props:{[T]:{type:[String,Number,Array],default:""},field:{type:[String,Number],default:""},options:{type:[Array,Function],default:()=>[]},labelOptions:{type:Array,default:()=>[]},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:""}},data(){return{t:g().t,isVue2:U,isVue3:J,getDefaultSize:m,optionsList:[],loading:!1,indeterminate:!1,checkAll:!1,activedSelect:""}},computed:{computedValue:{get(){return this[T]},set(t){this.$emit(Q,t),this.$emit("change",t)}},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}},propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}}},watch:{[T](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:{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},setActivedSelect(t){this.activedSelect=t}}};var K=function(){var e=this,i=e._self._c;return i("div",{staticClass:"advanced-select",class:{hasField:e.labelOptions&&e.labelOptions.length>0}},[e.labelOptions&&e.labelOptions.length>0?i("el-select",{staticClass:"field-select",class:`field-select--${e.isVue2?"v2":"v3"}`,style:`z-index:${e.activedSelect==="left"?2:0}`,attrs:{size:e.getDefaultSize()},on:{focus:function(s){return e.setActivedSelect("left")}},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._e(),i("el-select",e._g(e._b({ref:"select",staticClass:"select",class:`select--${e.isVue3?"v3":"v2"}`,style:`z-index:${e.activedSelect==="right"?2:0}`,attrs:{loading:e.loading},on:{focus:function(s){return e.setActivedSelect("right")}},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",{...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._t("default",function(){return 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)},G=[],Y=u(q,K,G,!1,null,"7a60f352");const w=Y.exports,X={name:"BaseIcon",props:{path:{type:String},size:{type:[String,Number]},color:{type:String}},methods:{handleClick(){this.$emit("click")}}};var Z=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}})])])},ee=[],te=u(X,Z,ee,!1,null,"1c30ca93");const ie=te.exports,p=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(ie,{props:this.$props,on:{click:()=>this.$emit("click")}})}};return a.install=l=>{l.component(s,a)},t[e]=a,t},{}),se=p.menu,ae=p.refresh,le=p.move;p["column-setting"];const ne=p.more,oe=p["fixed-left"],re=p["fixed-right"],ce=p.upload,ue=p.download,de=p.delete,P=p.copy,{t:V}=g(),he=!0,pe=!1,fe={name:"TmEllipsisText",components:{CopyIcon:P},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}},data(){return{isVue2:he,isVue3:pe,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}}},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 d;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,c=i>a+n,r=s>l+n;if(c||r){this.isOverflow=!0;const h=parseFloat(e.lineHeight)||16;this.currentLines=Math.ceil(i/h)}else{const h=t.getBoundingClientRect(),f=(d=t.parentElement)==null?void 0:d.getBoundingClientRect();if(f){const Qt=h.height>f.height||h.width>f.width;this.isOverflow=Qt}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(V("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(V("copySuccess"))}catch{this.$message.error(V("copyFailed"))}document.body.removeChild(t)}}};var me=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)])])},ge=[],be=u(fe,me,ge,!1,null,"aefedcde");const _=be.exports,ve=!0,ye=!1,Ce={name:"TmAdvancedInputFilter",components:{MoreIcon:ne,EllipsisText:_},props:{label:{type:String,default:""},value:{type:String,default:""},field:{type:[String,Number],default:""},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},labelOptions:{type:Array,default:()=>[]}},data(){return{t:g().t,isVue3:ye,isVue2:ve,getDefaultSize:m,getCompatSize:C,exactValue:"",inputValue:"",isExactMode:!1,currentOptionMultiple:!1}},computed:{width(){return this.labelOptions&&this.labelOptions.length||this.label?"305px":"200px"},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}},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:{labelOptions:{handler(t){t&&t.length>0&&(this.field||this.$emit("field-change",t[0].value),this.updateCurrentOptionMultiple())},deep:!0,immediate:!0},field:{handler(){this.updateCurrentOptionMultiple()},immediate:!0},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 _e=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-advanced-input",class:`tm-advanced-input--${e.isVue3?"v3":"v2"}`,style:{width:e.width}},[e.labelOptions&&e.labelOptions.length?i("el-select",{staticClass:"left-select",staticStyle:{width:"100px","flex-shrink":"0"},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?i("div",{staticClass:"input-label"},[i("EllipsisText",{attrs:{text:e.label,lines:2}})],1):e._e(),i("el-input",{staticClass:"right-input",class:{"has-label":e.labelOptions&&e.labelOptions.length},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",e._g(e._b({attrs:{slot:"append"},slot:"append",scopedSlots:e._u([{key:"reference",fn:function(){return[i("MoreIcon",{staticStyle:{cursor:"pointer"}})]},proxy:!0}],null,!1,1001141487)},"el-popover",{[e.isVue3?"visible":"value"]:e.isExactMode,placement:"bottom-end",width:240,trigger:"click"},!1),{[e.isVue3?"update:visible":"input"]:e.handleVisibleChange}),[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)]):e._e()],1)],1)},xe=[],Se=u(Ce,_e,xe,!1,null,"e5c28c62");const F=Se.exports,{t:y}=g(),$e=!0,Te=!1,we={name:"TmAdvancedDateFilter",props:{value:{type:Array,default:()=>[]},field:{type:[String,Number],default:""},start:{type:[String,Number],default:""},end:{type:[String,Number],default:""},size:{type:String,default:"mini"},labelOptions:{type:Array,default:()=>[]},type:{type:String,default:"daterange"},format:{type:String,default:""},startPlaceholder:{type:String,default:void 0},endPlaceholder:{type:String,default:void 0},disabledDate:{type:Function,default:t=>t.getTime()>Date.now()}},computed:{computedFormat(){const t="yyyy",e="dd";return this.format?this.format:this.type==="year"?t:this.type==="month"?`${t}-MM`:this.type==="date"?`${t}-MM-${e}`:this.type==="dates"?`${t}-MM-${e}`:this.type==="months"?`${t}-MM`:this.type==="years"?t:this.type==="week"?`${t}-MM-WW`:this.type==="datetime"?`${t}-MM-${e} HH:mm:ss`:this.type==="datetimerange"?`${t}-MM-${e} HH:mm:ss`:this.type==="daterange"?`${t}-MM-${e}`:this.type==="monthrange"?`${t}-MM`:""},computedPickerOptions(){return{shortcuts:[{text:y("today"),onClick(t){const e=new Date,i=new Date;t.$emit("pick",[i,e])}},{text:y("yesterday"),onClick(t){const e=new Date,i=new Date;i.setTime(i.getTime()-3600*1e3*24),e.setTime(e.getTime()-3600*1e3*24),t.$emit("pick",[i,e])}},{text:y("last7days"),onClick(t){const e=new Date,i=new Date;i.setTime(i.getTime()-3600*1e3*24*7),t.$emit("pick",[i,e])}},{text:y("last30days"),onClick(t){const e=new Date,i=new Date;i.setTime(i.getTime()-3600*1e3*24*30),t.$emit("pick",[i,e])}},{text:y("thisMonth"),onClick(t){const e=new Date,i=new Date;i.setDate(1),t.$emit("pick",[i,e])}},{text:y("lastMonth"),onClick(t){const e=new Date,i=new Date;i.setMonth(i.getMonth()-1),i.setDate(1),e.setDate(0),t.$emit("pick",[i,e])}}]}},dateValue:{get(){return this.start||this.end?[this.start,this.end]:this.value},set(t){this.$emit("value-change",t),this.$emit("start-change",t),this.$emit("end-change",t)}},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}}},data(){return{t:y,isVue2:$e,isVue3:Te,getDefaultSize:m}},watch:{labelOptions:{handler(t){t.length>0&&!this.field&&this.$emit("field-change",t[0].value)},deep:!0,immediate:!0}}};var Ve=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-date-picker",class:`tm-date-picker--${e.isVue3?"v3":"v2"}`},[i("el-select",{staticStyle:{width:"100px"},attrs:{size:e.getDefaultSize()},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),i("el-date-picker",{staticStyle:{width:"206px"},attrs:{type:"daterange",size:e.getDefaultSize(),"range-separator":"-","start-placeholder":e.startPlaceholder===void 0?e.t("startDate"):e.startPlaceholder,"end-placeholder":e.endPlaceholder===void 0?e.t("endDate"):e.endPlaceholder,"picker-options":e.computedPickerOptions,format:e.computedFormat,"value-format":e.computedFormat},model:{value:e.dateValue,callback:function(s){e.dateValue=s},expression:"dateValue"}})],1)},Fe=[],ze=u(we,Ve,Fe,!1,null,"3cd3ede3");const z=ze.exports,ke=!0,Le={name:"TmCascaderFilter",props:{value:{type:[String,Number,Array],default:""},options:{type:[Array,Function],default:()=>[]},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:""}},data(){return{isVue2:ke,getDefaultSize:m,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{...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 Oe=function(){var e=this,i=e._self._c;return i("el-cascader",e._g(e._b({ref:"cascader",staticClass:"tm-cascader",class:`tm-cascader--${e.isVue2?"v2":"v3"}`,staticStyle:{width:"200px"},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",{...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:{}))},Me=[],Ae=u(Le,Oe,Me,!1,null,null);const k=Ae.exports,Re=!0,De=!1,He={name:"TmRadioFilter",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}},data(){return{isVue2:Re,isVue3:De,getDefaultSize:m,selectedValue:this.value,optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}},hasWideOptions(){return this.optionsList.length>4},calculateItemWidth(){if(!this.optionsList.length)return{};const e=`${(this.hasWideOptions?305:200)/this.optionsList.length}px`;return{width:e,flex:`0 0 ${e}`}}},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 Ee=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-radio",class:{"wide-mode":e.hasWideOptions,"tm-radio--v3":e.isVue3,"tm-radio--v2":e.isVue2}},[i("el-radio-group",e._g(e._b({ref:"radioGroup",model:{value:e.selectedValue,callback:function(s){e.selectedValue=s},expression:"selectedValue"}},"el-radio-group",{...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]},"el-radio-button",{[e.isVue3?"value":"label"]:s[e.propMap.value],disabled:s.disabled,style:e.calculateItemWidth},!1),[e._t("option",function(){return[e._v(e._s(s[e.propMap.label]))]},{item:s})],2)})],2)],1)},Ie=[],We=u(He,Ee,Ie,!1,null,"61fed13d");const L=We.exports,Pe=!0,Ne=!1,Be={name:"TmCheckboxFilter",props:{value:{type:Array,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}},data(){return{isVue2:Pe,isVue3:Ne,getDefaultSize:m,selectedValue:this.value||[],optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}},hasWideOptions(){return this.optionsList.length>4},calculateItemWidth(){if(!this.optionsList.length)return{};const t=Math.ceil(this.optionsList.length/(this.hasWideOptions?6:4)),e=Math.ceil(this.optionsList.length/t),s=`${(this.hasWideOptions?305:200)/e}px`;return{width:s,flex:`0 0 ${s}`}}},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 je=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-checkbox",class:{"wide-mode":e.hasWideOptions,"tm-checkbox--v3":e.isVue3,"tm-checkbox--v2":e.isVue2}},[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",{...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]},"el-checkbox-button",{[e.isVue3?"value":"label"]:s[e.propMap.value],disabled:s.disabled,style:e.calculateItemWidth},!1),[e._t("option",function(){return[e._v(e._s(s[e.propMap.label]))]},{item:s})],2)})],2)],1)},Ue=[],Je=u(Be,je,Ue,!1,null,"b44866b1");const O=Je.exports,Qe=!0,qe={name:"TmSwitchFilter",props:{value:{type:Boolean,default:!1},label:{type:String,default:""}},data(){return{isVue2:Qe,getDefaultSize:m,switchValue:this.value}},computed:{containerWidthClass(){const t=l=>{if(!l)return 0;let n=0;for(let c=0;c<l.length;c++){const r=l.charAt(c);n+=/[\u4e00-\u9fa5]/.test(r)?2:1}return n},e=t(this.$attrs["active-text"]),i=t(this.$attrs["inactive-text"]),s=t(this.$attrs.label),a=e+i+s;return a>20?"wide-container":a>6?"medium-container":"narrow-container"}},watch:{value:{immediate:!0,handler(t){this.switchValue=t}},switchValue(t){this.$emit("input",t),this.$emit("change",t)}}};var Ke=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-switch",class:e.containerWidthClass},[e.label?i("span",{staticClass:"switch-label"},[e._v(e._s(e.label))]):e._e(),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)},Ge=[],Ye=u(qe,Ke,Ge,!1,null,"9e7a342f");const M=Ye.exports;var Xe=u({name:"DynamicSlot",functional:!0,props:{name:{type:String,required:!0},slotProps:{type:Object,default:()=>({})}},render(t,e){const{props:i,parent:s}=e;let a=s.$scopedSlots[i.name];if(!a){let l=s.$parent;for(;l&&!a;){if(l.$options.name==="TmTable"){a=l.$scopedSlots[i.name];break}l=l.$parent}}return a?a(i.slotProps):t()}},null,null,!1,null,null);const Ze=Xe.exports,{t:et}=g(),tt=!0,it=!1,st={name:"TmTableSearch",components:{TmSelect:w,TmAdvancedInput:F,TmAdvancedDate:z,TmCascader:k,TmRadio:L,TmCheckbox:O,TmSwitch:M,DynamicSlot:Ze},props:{disabled:{type:Boolean,default:!1},searchColumns:{type:Array,default:null},searchForm:{type:Object,default:()=>({})}},data(){return{t:et,isVue2:tt,isVue3:it,getCompatSize:C,getDefaultSize:m,defaultValues:{}}},computed:{computedSearchForm:{get(){return this.searchForm},set(t){this.$emit("update:search-form",t)}}},mounted(){this.initDefaultValues()},methods:{hasDefaultSlot(){const t=this.$slots.default;return this.isVue2?!!t:t()[0].children.length>0},handleUpdate(t,e,i){const s=this.getFieldValue(t,i);s&&this.$emit("update:search-form",{...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",{...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;const a=s[e];for(;s;){if(s.$options.name==="TmTable"&&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(e.type==="date"&&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)?e.type==="date"&&!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)),e.type==="date"){const l=this.getFieldValue(e,"start"),n=this.getFieldValue(e,"end"),c=this.getFieldDefault(e,"start"),r=this.getFieldDefault(e,"end");l&&c!==void 0&&!(l in this.computedSearchForm)&&(t[l]=c),n&&r!==void 0&&!(n in this.computedSearchForm)&&(t[n]=r)}}),this.defaultValues=t,this.$emit("update:search-form",{...t,...this.computedSearchForm})},getSearchForm(){return this.computedSearchForm},handleSearch(){setTimeout(()=>{this.$emit("search",this.computedSearchForm)})},handleReset(){this.$emit("update:search-form",{...this.defaultValues}),this.$emit("reset")}}};var at=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-advanced-input",{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}}):e._e(),s.type==="date"?i("tm-advanced-date",{attrs:{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},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)}}):e._e(),s.type==="select"?i("tm-select",{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},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')]"}}):e._e(),s.type==="cascader"?i("tm-cascader",{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')]"}}):e._e(),s.type==="radio"?i("tm-radio",{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')]"}}):e._e(),s.type==="checkbox"?i("tm-checkbox",{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')]"}}):e._e(),s.type==="switch"?i("tm-switch",{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')]"}}):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)])},lt=[],nt=u(st,at,lt,!1,null,"572f884b");const A=nt.exports,ot=!0,rt={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:ot,getCompatSize:C}},methods:{handleSizeChange(t){this.$emit("size-change",t)},handleCurrentChange(t){this.$emit("current-change",t)}}};var ct=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-pagination"},[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)},ut=[],dt=u(rt,ct,ut,!1,null,"4dbdf6e7");const ht=dt.exports,pt={name:"TmTableMenu",props:{size:{type:String,default:"mini"}}};var ft=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)])},mt=[],gt=u(pt,ft,mt,!1,null,"579dd2c3");const bt=gt.exports,R=t=>t?t.data&&t.data.attrs||{}:{},D=(t,e)=>{t&&(t.data||(t.data={}),t.data.attrs||(t.data.attrs={}),typeof e=="object"&&Object.assign(t.data.attrs,e))},S={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)}}},vt=t=>S.getTableConfig(t.key),yt=t=>S.setTableConfig(t),Ct=t=>{t&&(typeof t.getTableConfig=="function"&&(S.getTableConfig=t.getTableConfig),typeof t.setTableConfig=="function"&&(S.setTableConfig=t.setTableConfig))},{t:_t}=g(),xt=!0,St=!1,$t={formatter:(t,e,i,s)=>[void 0,null,""].includes(i)?"-":i},Tt={name:"TmColumnConfig",components:{MoveIcon:le,FixedLeftIcon:oe,FixedRightIcon:re,UploadIcon:ce,DownloadIcon:ue,DeleteIcon:de,MenuIcon:se,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:_t,isVue2:xt,isVue3:St,getDefaultSize:m,getCompatSize:C,buttonType:{type:"text"},afterOpenDelay:{"open-delay":300},popoverVisible:!1,keyWord:"",sortedTableColumns:[],tableColumns:[],defaultColumnsConfig:[],columnMap:{},processedColumns:[],placement:"bottom",searchTimer:null,isDraggingFrozen:!1,isDraggingFrozenRight:!1,sortable:null,isConfigLoaded:!1,columnsCopy:[]}},computed:{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(){return this.tableKey?this.tableKey:this.$route.path.slice(1).replace(/\//g,"-")}},watch:{keyWord:{handler(){this.handleSearch()},immediate:!0},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},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=R(i);return!(!s.prop||this.ignoredColumnConfigTypes.includes(s.type))}).map((i,s)=>{const a=R(i),l={...$t,...a};D(i,l),a.prop&&(e[a.prop]=i);const n=a.prop==="operation"||a.label&&a.label.includes("操作"),c=a.hasOwnProperty("visible")?a.visible!==!1:!0;return{prop:a.prop,label:a.label,fixed:a.fixed||"",isOperation:n,sort:s,cancellable:a.hasOwnProperty("cancellable")?a.cancellable:!0,visible:c}}),this.columnMap=e},loadColumnConfig(){vt({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=>({...s})):this.tableColumns=this.defaultColumnsConfig.map(s=>({...s})),this.processedColumns=this.applyColumnConfig(this.tableColumns),this.isConfigLoaded=!0,this.$emit("complete",{columns:this.processedColumns,isInitialLoad:!0})}).catch(()=>{this.tableColumns=this.defaultColumnsConfig.map(t=>({...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=R(a);return this.ignoredColumnConfigTypes.includes(l.type)}),s=[];return[...t].sort((a,l)=>{const n=a.sort!==void 0?a.sort:1/0,c=l.sort!==void 0?l.sort:1/0;return n-c}).forEach(a=>{if(a.prop){let l=this.columnMap[a.prop];l&&(D(l,{fixed:a.fixed||void 0,visible:a.visible}),(!e&&a.visible||e)&&s.push(l))}}),i.forEach(a=>{D(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 b(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,c=s.getAttribute("data-prop"),r=c?this.sortedTableColumns.find(f=>f.prop===c):null;if(r&&r.isOperation&&n&&n.fixed==="left")return s.classList.add("no-drop-zone"),!1;const d=n&&n.fixed==="left",h=n&&n.fixed==="right";return this.isDraggingFrozen&&!d||this.isDraggingFrozenRight&&!h||!this.isDraggingFrozen&&!this.isDraggingFrozenRight&&(d||h)?(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(f=>{f.classList.remove("no-drop-zone")}),i.classList.remove("sortable-drag");const l=this.sortedTableColumns[a],n=l.fixed==="left",c=l.fixed==="right",r=s>0?this.sortedTableColumns[s-1]:null,d=s<this.sortedTableColumns.length-1?this.sortedTableColumns[s+1]:null;let h=!1;if(n?(r&&r.fixed!=="left"||d&&d.fixed==="right")&&(h=!0):c?(r&&r.fixed!=="right"||d&&d.fixed!=="right")&&(h=!0):(r&&r.fixed==="right"||d&&d.fixed==="left")&&(h=!0),h){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)},handleSearch(){clearTimeout(this.searchTimer),this.searchTimer=setTimeout(()=>{const t=this.keyWord;this.sortedTableColumns.forEach(e=>{e.searchShow=e.label.includes(t)})},500)},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{}})(),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 b<"u"&&b.utils&&(document.removeEventListener("mousemove",b.utils.throttleCall),document.removeEventListener("mouseup",b.utils.throttleCall))}catch{}},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=>{i.searchShow=!0;const s=this.sortedTableColumns.find(a=>a.prop===i.prop);return s&&(i.sort=s.sort,i.fixed=s.fixed,i.visible=s.visible),i});yt({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,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 b<"u"&&b.utils&&(document.removeEventListener("mousemove",b.utils.throttleCall),document.removeEventListener("mouseup",b.utils.throttleCall))}catch{}}};var wt=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:{text:s.label}})],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.sortedTableColumns,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&&s.searchShow!==!1?i("div",{staticClass:"sort-item"},[i("div",{staticClass:"row-title"},[i("MoveIcon",{staticStyle:{"flex-shrink":"0"}}),i("TmEllipsisText",{attrs:{text:s.label}})],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()])},Vt=[],Ft=u(Tt,wt,Vt,!1,null,"92bf8b2f");const zt=Ft.exports,kt=!0,Lt=!1,Ot={name:"TmTable",components:{TableSearch:A,TablePagination:ht,TableMenu:bt,ColumnConfig:zt,RefreshIcon:ae,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:()=>({})}},data(){return{getDefaultSize:m,getCompatSize:C,isVue3:Lt,isVue2:kt,t:g().t,tableData:[],tableLoading:!1,columnsLoading:!1,tableReload:1,tableHeight:null,selectedRows:[],paginationInfo:{current:1,pageSize:20,total:void 0},originalColumns:[],displayColumns:[],isColumnConfigLoaded:!1,afterOpenDelay:{"open-delay":300}}},computed:{pageLoading(){return this.tableLoading||this.columnsLoading},computedTableKey(){return this.tableKey?this.tableKey:this.$route.path.slice(1).replace(/\//g,"-")},computedShowPagination(){return this.showPagination&&typeof this.data=="function"}},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()}}},created(){this.originalColumns=this.$slots.default||[],this.columnSettingButton?this.columnsLoading=!0:(this.displayColumns=this.originalColumns,this.isColumnConfigLoaded=!0)},mounted(){this.getTableHeight(),window.addEventListener("resize",this.getTableHeight)},beforeDestroy(){window.removeEventListener("resize",this.getTableHeight)},methods:{handleUpdateSearchForm(t){this.$emit("update:search-form",t)},handleColumnConfigComplete(t){Array.isArray(t.columns)?this.displayColumns=[...t.columns]:this.displayColumns=[...this.originalColumns],t.isInitialLoad?(this.isColumnConfigLoaded=!0,this.columnsLoading=!1,this.firstLoad&&typeof this.data=="function"&&this.loadData()):this.reloadTable()},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,i!==void 0&&(this.paginationInfo.total=i),a!==void 0&&(this.paginationInfo.current=a),s!==void 0&&(this.paginationInfo.pageSize=s)}catch{}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 Mt=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},on:{search:e.search,reset:e.reset,"update:search-form":e.handleUpdateSearchForm}},[e._t("search")],2):e._e(),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(),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",{...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,attrs:{vnode:s}})}),1),e.computedShowPagination?i("table-pagination",{ref:"tmPagination",attrs:{"page-size":e.paginationInfo.pageSize,"current-page":e.paginationInfo.current,total:e.paginationInfo.total,disabled:e.tableLoading},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}):e._e()],1)},At=[],Rt=u(Ot,Mt,At,!1,null,null);const H=Rt.exports,Dt=!0,Ht=!1,Et={name:"TmTableColumn",inheritAttrs:!1,computed:{isVisible(){return this.$attrs.visible!==!1},slots(){return this.$scopedSlots}},data(){return{isVue2:Dt,isVue3:Ht}},created(){this.$parent&&this.$parent.$emit&&this.$parent.$emit("column-initialized",{prop:this.$attrs.prop,visible:this.$attrs.visible!==!1})}};var It=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()},Wt=[],Pt=u(Et,It,Wt,!1,null,null);const E=Pt.exports,{t:I}=g(),Nt={name:"TmAdvancedEllipsisText",components:{CopyIcon:P},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(I("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(I("copySuccess"))}catch{this.$message.error(I("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<"u"&&(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 Bt=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)},jt=[],Ut=u(Nt,Bt,jt,!1,null,"16643222");const W=Ut.exports,Jt={install:{install(t,e={}){[H,E,_,W].forEach(i=>t.component(i.name,i)),e.tableConfigProvider&&Ct(e.tableConfigProvider)}}.install,Table:H,Column:E,Search:A,Select:w,AdvancedInput:F,AdvancedDate:z,Cascader:k,Radio:L,Checkbox:O,Switch:M,EllipsisText:_,AdvancedEllipsisText:W,setLang:$,useLocale:g};o.AdvancedDate=z,o.AdvancedEllipsisText=W,o.AdvancedInput=F,o.Cascader=k,o.Checkbox=O,o.Column=E,o.EllipsisText=_,o.Radio=L,o.Search=A,o.Select=w,o.Switch=M,o.Table=H,o.default=Jt,o.setLang=$,o.useLocale=g,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(o,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("vue"),require("sortablejs")):typeof define=="function"&&define.amd?define(["exports","vue","sortablejs"],x):(o=typeof globalThis<"u"?globalThis:o||self,x(o.TmTable={},o.Vue,o.Sortable))})(this,function(o,x,b){"use strict";var N;const C=t=>t,m=()=>"mini",B={"zh-CN":{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:"复制失败"},"en-US":{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"}};let v={value:"zh-CN"};{const t=require("vue");t.observable||(N=t.default)!=null&&N.observable?v=t.default.observable(v):v=new t({data(){return{currentLang:v}}}).$data.currentLang}const j=t=>{var e;return((e=B[v.value])==null?void 0:e[t])||t},$=t=>{v.value=t},g=()=>({t:j,setLang:$,currentLang:v});function u(t,e,i,s,a,l,n,c){var r=typeof t=="function"?t.options:t;return e&&(r.render=e,r.staticRenderFns=i,r._compiled=!0),l&&(r._scopeId="data-v-"+l),{exports:t,options:r}}const U=!0,J=!1,T="value",Q="input",q={name:"TmSelectFilter",props:{[T]:{type:[String,Number,Array],default:""},field:{type:[String,Number],default:""},options:{type:[Array,Function],default:()=>[]},labelOptions:{type:Array,default:()=>[]},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:""}},data(){return{t:g().t,isVue2:U,isVue3:J,getDefaultSize:m,optionsList:[],loading:!1,indeterminate:!1,checkAll:!1,activedSelect:""}},computed:{computedValue:{get(){return this[T]},set(t){this.$emit(Q,t),this.$emit("change",t)}},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}},propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}}},watch:{[T](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:{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},setActivedSelect(t){this.activedSelect=t}}};var K=function(){var e=this,i=e._self._c;return i("div",{staticClass:"advanced-select",class:{hasField:e.labelOptions&&e.labelOptions.length>0}},[e.labelOptions&&e.labelOptions.length>0?i("el-select",{staticClass:"field-select",class:`field-select--${e.isVue2?"v2":"v3"}`,style:`z-index:${e.activedSelect==="left"?2:0}`,attrs:{size:e.getDefaultSize()},on:{focus:function(s){return e.setActivedSelect("left")}},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._e(),i("el-select",e._g(e._b({ref:"select",staticClass:"select",class:`select--${e.isVue3?"v3":"v2"}`,style:`z-index:${e.activedSelect==="right"?2:0}`,attrs:{loading:e.loading},on:{focus:function(s){return e.setActivedSelect("right")}},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",{...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._t("default",function(){return 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)},G=[],Y=u(q,K,G,!1,null,"7a60f352");const w=Y.exports,X={name:"BaseIcon",props:{path:{type:String},size:{type:[String,Number]},color:{type:String}},methods:{handleClick(){this.$emit("click")}}};var Z=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}})])])},ee=[],te=u(X,Z,ee,!1,null,"1c30ca93");const ie=te.exports,p=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(ie,{props:this.$props,on:{click:()=>this.$emit("click")}})}};return a.install=l=>{l.component(s,a)},t[e]=a,t},{}),se=p.menu,ae=p.refresh,le=p.move;p["column-setting"];const ne=p.more,oe=p["fixed-left"],re=p["fixed-right"],ce=p.upload,ue=p.download,de=p.delete,P=p.copy,{t:V}=g(),he=!0,pe=!1,fe={name:"TmEllipsisText",components:{CopyIcon:P},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}},data(){return{isVue2:he,isVue3:pe,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}}},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 d;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,c=i>a+n,r=s>l+n;if(c||r){this.isOverflow=!0;const h=parseFloat(e.lineHeight)||16;this.currentLines=Math.ceil(i/h)}else{const h=t.getBoundingClientRect(),f=(d=t.parentElement)==null?void 0:d.getBoundingClientRect();if(f){const Qt=h.height>f.height||h.width>f.width;this.isOverflow=Qt}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(V("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(V("copySuccess"))}catch{this.$message.error(V("copyFailed"))}document.body.removeChild(t)}}};var me=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)])])},ge=[],be=u(fe,me,ge,!1,null,"a2647731");const _=be.exports,ve=!0,ye=!1,Ce={name:"TmAdvancedInputFilter",components:{MoreIcon:ne,EllipsisText:_},props:{label:{type:String,default:""},value:{type:String,default:""},field:{type:[String,Number],default:""},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},labelOptions:{type:Array,default:()=>[]}},data(){return{t:g().t,isVue3:ye,isVue2:ve,getDefaultSize:m,getCompatSize:C,exactValue:"",inputValue:"",isExactMode:!1,currentOptionMultiple:!1}},computed:{width(){return this.labelOptions&&this.labelOptions.length||this.label?"305px":"200px"},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}},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:{labelOptions:{handler(t){t&&t.length>0&&(this.field||this.$emit("field-change",t[0].value),this.updateCurrentOptionMultiple())},deep:!0,immediate:!0},field:{handler(){this.updateCurrentOptionMultiple()},immediate:!0},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 _e=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-advanced-input",class:`tm-advanced-input--${e.isVue3?"v3":"v2"}`,style:{width:e.width}},[e.labelOptions&&e.labelOptions.length?i("el-select",{staticClass:"left-select",staticStyle:{width:"100px","flex-shrink":"0"},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?i("div",{staticClass:"input-label"},[i("EllipsisText",{attrs:{text:e.label,lines:2}})],1):e._e(),i("el-input",{staticClass:"right-input",class:{"has-label":e.labelOptions&&e.labelOptions.length},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",e._g(e._b({attrs:{slot:"append"},slot:"append",scopedSlots:e._u([{key:"reference",fn:function(){return[i("MoreIcon",{staticStyle:{cursor:"pointer"}})]},proxy:!0}],null,!1,1001141487)},"el-popover",{[e.isVue3?"visible":"value"]:e.isExactMode,placement:"bottom-end",width:240,trigger:"click"},!1),{[e.isVue3?"update:visible":"input"]:e.handleVisibleChange}),[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)]):e._e()],1)],1)},xe=[],Se=u(Ce,_e,xe,!1,null,"e5c28c62");const F=Se.exports,{t:y}=g(),$e=!0,Te=!1,we={name:"TmAdvancedDateFilter",props:{value:{type:Array,default:()=>[]},field:{type:[String,Number],default:""},start:{type:[String,Number],default:""},end:{type:[String,Number],default:""},size:{type:String,default:"mini"},labelOptions:{type:Array,default:()=>[]},type:{type:String,default:"daterange"},format:{type:String,default:""},startPlaceholder:{type:String,default:void 0},endPlaceholder:{type:String,default:void 0},disabledDate:{type:Function,default:t=>t.getTime()>Date.now()}},computed:{computedFormat(){const t="yyyy",e="dd";return this.format?this.format:this.type==="year"?t:this.type==="month"?`${t}-MM`:this.type==="date"?`${t}-MM-${e}`:this.type==="dates"?`${t}-MM-${e}`:this.type==="months"?`${t}-MM`:this.type==="years"?t:this.type==="week"?`${t}-MM-WW`:this.type==="datetime"?`${t}-MM-${e} HH:mm:ss`:this.type==="datetimerange"?`${t}-MM-${e} HH:mm:ss`:this.type==="daterange"?`${t}-MM-${e}`:this.type==="monthrange"?`${t}-MM`:""},computedPickerOptions(){return{shortcuts:[{text:y("today"),onClick(t){const e=new Date,i=new Date;t.$emit("pick",[i,e])}},{text:y("yesterday"),onClick(t){const e=new Date,i=new Date;i.setTime(i.getTime()-3600*1e3*24),e.setTime(e.getTime()-3600*1e3*24),t.$emit("pick",[i,e])}},{text:y("last7days"),onClick(t){const e=new Date,i=new Date;i.setTime(i.getTime()-3600*1e3*24*7),t.$emit("pick",[i,e])}},{text:y("last30days"),onClick(t){const e=new Date,i=new Date;i.setTime(i.getTime()-3600*1e3*24*30),t.$emit("pick",[i,e])}},{text:y("thisMonth"),onClick(t){const e=new Date,i=new Date;i.setDate(1),t.$emit("pick",[i,e])}},{text:y("lastMonth"),onClick(t){const e=new Date,i=new Date;i.setMonth(i.getMonth()-1),i.setDate(1),e.setDate(0),t.$emit("pick",[i,e])}}]}},dateValue:{get(){return this.start||this.end?[this.start,this.end]:this.value},set(t){this.$emit("value-change",t),this.$emit("start-change",t),this.$emit("end-change",t)}},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}}},data(){return{t:y,isVue2:$e,isVue3:Te,getDefaultSize:m}},watch:{labelOptions:{handler(t){t.length>0&&!this.field&&this.$emit("field-change",t[0].value)},deep:!0,immediate:!0}}};var Ve=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-date-picker",class:`tm-date-picker--${e.isVue3?"v3":"v2"}`},[i("el-select",{staticStyle:{width:"100px"},attrs:{size:e.getDefaultSize()},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),i("el-date-picker",{staticStyle:{width:"206px"},attrs:{type:"daterange",size:e.getDefaultSize(),"range-separator":"-","start-placeholder":e.startPlaceholder===void 0?e.t("startDate"):e.startPlaceholder,"end-placeholder":e.endPlaceholder===void 0?e.t("endDate"):e.endPlaceholder,"picker-options":e.computedPickerOptions,format:e.computedFormat,"value-format":e.computedFormat},model:{value:e.dateValue,callback:function(s){e.dateValue=s},expression:"dateValue"}})],1)},Fe=[],ze=u(we,Ve,Fe,!1,null,"3cd3ede3");const z=ze.exports,ke=!0,Le={name:"TmCascaderFilter",props:{value:{type:[String,Number,Array],default:""},options:{type:[Array,Function],default:()=>[]},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:""}},data(){return{isVue2:ke,getDefaultSize:m,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{...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 Oe=function(){var e=this,i=e._self._c;return i("el-cascader",e._g(e._b({ref:"cascader",staticClass:"tm-cascader",class:`tm-cascader--${e.isVue2?"v2":"v3"}`,staticStyle:{width:"200px"},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",{...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:{}))},Me=[],Ae=u(Le,Oe,Me,!1,null,null);const k=Ae.exports,Re=!0,De=!1,He={name:"TmRadioFilter",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}},data(){return{isVue2:Re,isVue3:De,getDefaultSize:m,selectedValue:this.value,optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}},hasWideOptions(){return this.optionsList.length>4},calculateItemWidth(){if(!this.optionsList.length)return{};const e=`${(this.hasWideOptions?305:200)/this.optionsList.length}px`;return{width:e,flex:`0 0 ${e}`}}},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 Ee=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-radio",class:{"wide-mode":e.hasWideOptions,"tm-radio--v3":e.isVue3,"tm-radio--v2":e.isVue2}},[i("el-radio-group",e._g(e._b({ref:"radioGroup",model:{value:e.selectedValue,callback:function(s){e.selectedValue=s},expression:"selectedValue"}},"el-radio-group",{...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]},"el-radio-button",{[e.isVue3?"value":"label"]:s[e.propMap.value],disabled:s.disabled,style:e.calculateItemWidth},!1),[e._t("option",function(){return[e._v(e._s(s[e.propMap.label]))]},{item:s})],2)})],2)],1)},Ie=[],We=u(He,Ee,Ie,!1,null,"61fed13d");const L=We.exports,Pe=!0,Ne=!1,Be={name:"TmCheckboxFilter",props:{value:{type:Array,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}},data(){return{isVue2:Pe,isVue3:Ne,getDefaultSize:m,selectedValue:this.value||[],optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}},hasWideOptions(){return this.optionsList.length>4},calculateItemWidth(){if(!this.optionsList.length)return{};const t=Math.ceil(this.optionsList.length/(this.hasWideOptions?6:4)),e=Math.ceil(this.optionsList.length/t),s=`${(this.hasWideOptions?305:200)/e}px`;return{width:s,flex:`0 0 ${s}`}}},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 je=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-checkbox",class:{"wide-mode":e.hasWideOptions,"tm-checkbox--v3":e.isVue3,"tm-checkbox--v2":e.isVue2}},[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",{...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]},"el-checkbox-button",{[e.isVue3?"value":"label"]:s[e.propMap.value],disabled:s.disabled,style:e.calculateItemWidth},!1),[e._t("option",function(){return[e._v(e._s(s[e.propMap.label]))]},{item:s})],2)})],2)],1)},Ue=[],Je=u(Be,je,Ue,!1,null,"b44866b1");const O=Je.exports,Qe=!0,qe={name:"TmSwitchFilter",props:{value:{type:Boolean,default:!1},label:{type:String,default:""}},data(){return{isVue2:Qe,getDefaultSize:m,switchValue:this.value}},computed:{containerWidthClass(){const t=l=>{if(!l)return 0;let n=0;for(let c=0;c<l.length;c++){const r=l.charAt(c);n+=/[\u4e00-\u9fa5]/.test(r)?2:1}return n},e=t(this.$attrs["active-text"]),i=t(this.$attrs["inactive-text"]),s=t(this.$attrs.label),a=e+i+s;return a>20?"wide-container":a>6?"medium-container":"narrow-container"}},watch:{value:{immediate:!0,handler(t){this.switchValue=t}},switchValue(t){this.$emit("input",t),this.$emit("change",t)}}};var Ke=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-switch",class:e.containerWidthClass},[e.label?i("span",{staticClass:"switch-label"},[e._v(e._s(e.label))]):e._e(),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)},Ge=[],Ye=u(qe,Ke,Ge,!1,null,"9e7a342f");const M=Ye.exports;var Xe=u({name:"DynamicSlot",functional:!0,props:{name:{type:String,required:!0},slotProps:{type:Object,default:()=>({})}},render(t,e){const{props:i,parent:s}=e;let a=s.$scopedSlots[i.name];if(!a){let l=s.$parent;for(;l&&!a;){if(l.$options.name==="TmTable"){a=l.$scopedSlots[i.name];break}l=l.$parent}}return a?a(i.slotProps):t()}},null,null,!1,null,null);const Ze=Xe.exports,{t:et}=g(),tt=!0,it=!1,st={name:"TmTableSearch",components:{TmSelect:w,TmAdvancedInput:F,TmAdvancedDate:z,TmCascader:k,TmRadio:L,TmCheckbox:O,TmSwitch:M,DynamicSlot:Ze},props:{disabled:{type:Boolean,default:!1},searchColumns:{type:Array,default:null},searchForm:{type:Object,default:()=>({})}},data(){return{t:et,isVue2:tt,isVue3:it,getCompatSize:C,getDefaultSize:m,defaultValues:{}}},computed:{computedSearchForm:{get(){return this.searchForm},set(t){this.$emit("update:search-form",t)}}},mounted(){this.initDefaultValues()},methods:{hasDefaultSlot(){const t=this.$slots.default;return this.isVue2?!!t:t()[0].children.length>0},handleUpdate(t,e,i){const s=this.getFieldValue(t,i);s&&this.$emit("update:search-form",{...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",{...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;const a=s[e];for(;s;){if(s.$options.name==="TmTable"&&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(e.type==="date"&&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)?e.type==="date"&&!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)),e.type==="date"){const l=this.getFieldValue(e,"start"),n=this.getFieldValue(e,"end"),c=this.getFieldDefault(e,"start"),r=this.getFieldDefault(e,"end");l&&c!==void 0&&!(l in this.computedSearchForm)&&(t[l]=c),n&&r!==void 0&&!(n in this.computedSearchForm)&&(t[n]=r)}}),this.defaultValues=t,this.$emit("update:search-form",{...t,...this.computedSearchForm})},getSearchForm(){return this.computedSearchForm},handleSearch(){setTimeout(()=>{this.$emit("search",this.computedSearchForm)})},handleReset(){this.$emit("update:search-form",{...this.defaultValues}),this.$emit("reset")}}};var at=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-advanced-input",{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}}):e._e(),s.type==="date"?i("tm-advanced-date",{attrs:{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},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)}}):e._e(),s.type==="select"?i("tm-select",{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},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')]"}}):e._e(),s.type==="cascader"?i("tm-cascader",{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')]"}}):e._e(),s.type==="radio"?i("tm-radio",{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')]"}}):e._e(),s.type==="checkbox"?i("tm-checkbox",{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')]"}}):e._e(),s.type==="switch"?i("tm-switch",{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')]"}}):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)])},lt=[],nt=u(st,at,lt,!1,null,"572f884b");const A=nt.exports,ot=!0,rt={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:ot,getCompatSize:C}},methods:{handleSizeChange(t){this.$emit("size-change",t)},handleCurrentChange(t){this.$emit("current-change",t)}}};var ct=function(){var e=this,i=e._self._c;return i("div",{staticClass:"tm-pagination"},[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)},ut=[],dt=u(rt,ct,ut,!1,null,"4dbdf6e7");const ht=dt.exports,pt={name:"TmTableMenu",props:{size:{type:String,default:"mini"}}};var ft=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)])},mt=[],gt=u(pt,ft,mt,!1,null,"579dd2c3");const bt=gt.exports,R=t=>t?t.data&&t.data.attrs||{}:{},D=(t,e)=>{t&&(t.data||(t.data={}),t.data.attrs||(t.data.attrs={}),typeof e=="object"&&Object.assign(t.data.attrs,e))},S={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)}}},vt=t=>S.getTableConfig(t.key),yt=t=>S.setTableConfig(t),Ct=t=>{t&&(typeof t.getTableConfig=="function"&&(S.getTableConfig=t.getTableConfig),typeof t.setTableConfig=="function"&&(S.setTableConfig=t.setTableConfig))},{t:_t}=g(),xt=!0,St=!1,$t={formatter:(t,e,i,s)=>[void 0,null,""].includes(i)?"-":i},Tt={name:"TmColumnConfig",components:{MoveIcon:le,FixedLeftIcon:oe,FixedRightIcon:re,UploadIcon:ce,DownloadIcon:ue,DeleteIcon:de,MenuIcon:se,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:_t,isVue2:xt,isVue3:St,getDefaultSize:m,getCompatSize:C,buttonType:{type:"text"},afterOpenDelay:{"open-delay":300},popoverVisible:!1,keyWord:"",sortedTableColumns:[],tableColumns:[],defaultColumnsConfig:[],columnMap:{},processedColumns:[],placement:"bottom",searchTimer:null,isDraggingFrozen:!1,isDraggingFrozenRight:!1,sortable:null,isConfigLoaded:!1,columnsCopy:[]}},computed:{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(){return this.tableKey?this.tableKey:this.$route.path.slice(1).replace(/\//g,"-")}},watch:{keyWord:{handler(){this.handleSearch()},immediate:!0},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},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=R(i);return!(!s.prop||this.ignoredColumnConfigTypes.includes(s.type))}).map((i,s)=>{const a=R(i),l={...$t,...a};D(i,l),a.prop&&(e[a.prop]=i);const n=a.prop==="operation"||a.label&&a.label.includes("操作"),c=a.hasOwnProperty("visible")?a.visible!==!1:!0;return{prop:a.prop,label:a.label,fixed:a.fixed||"",isOperation:n,sort:s,cancellable:a.hasOwnProperty("cancellable")?a.cancellable:!0,visible:c}}),this.columnMap=e},loadColumnConfig(){vt({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=>({...s})):this.tableColumns=this.defaultColumnsConfig.map(s=>({...s})),this.processedColumns=this.applyColumnConfig(this.tableColumns),this.isConfigLoaded=!0,this.$emit("complete",{columns:this.processedColumns,isInitialLoad:!0})}).catch(()=>{this.tableColumns=this.defaultColumnsConfig.map(t=>({...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=R(a);return this.ignoredColumnConfigTypes.includes(l.type)}),s=[];return[...t].sort((a,l)=>{const n=a.sort!==void 0?a.sort:1/0,c=l.sort!==void 0?l.sort:1/0;return n-c}).forEach(a=>{if(a.prop){let l=this.columnMap[a.prop];l&&(D(l,{fixed:a.fixed||void 0,visible:a.visible}),(!e&&a.visible||e)&&s.push(l))}}),i.forEach(a=>{D(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 b(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,c=s.getAttribute("data-prop"),r=c?this.sortedTableColumns.find(f=>f.prop===c):null;if(r&&r.isOperation&&n&&n.fixed==="left")return s.classList.add("no-drop-zone"),!1;const d=n&&n.fixed==="left",h=n&&n.fixed==="right";return this.isDraggingFrozen&&!d||this.isDraggingFrozenRight&&!h||!this.isDraggingFrozen&&!this.isDraggingFrozenRight&&(d||h)?(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(f=>{f.classList.remove("no-drop-zone")}),i.classList.remove("sortable-drag");const l=this.sortedTableColumns[a],n=l.fixed==="left",c=l.fixed==="right",r=s>0?this.sortedTableColumns[s-1]:null,d=s<this.sortedTableColumns.length-1?this.sortedTableColumns[s+1]:null;let h=!1;if(n?(r&&r.fixed!=="left"||d&&d.fixed==="right")&&(h=!0):c?(r&&r.fixed!=="right"||d&&d.fixed!=="right")&&(h=!0):(r&&r.fixed==="right"||d&&d.fixed==="left")&&(h=!0),h){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)},handleSearch(){clearTimeout(this.searchTimer),this.searchTimer=setTimeout(()=>{const t=this.keyWord;this.sortedTableColumns.forEach(e=>{e.searchShow=e.label.includes(t)})},500)},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{}})(),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 b<"u"&&b.utils&&(document.removeEventListener("mousemove",b.utils.throttleCall),document.removeEventListener("mouseup",b.utils.throttleCall))}catch{}},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=>{i.searchShow=!0;const s=this.sortedTableColumns.find(a=>a.prop===i.prop);return s&&(i.sort=s.sort,i.fixed=s.fixed,i.visible=s.visible),i});yt({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,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 b<"u"&&b.utils&&(document.removeEventListener("mousemove",b.utils.throttleCall),document.removeEventListener("mouseup",b.utils.throttleCall))}catch{}}};var wt=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:{text:s.label}})],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.sortedTableColumns,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&&s.searchShow!==!1?i("div",{staticClass:"sort-item"},[i("div",{staticClass:"row-title"},[i("MoveIcon",{staticStyle:{"flex-shrink":"0"}}),i("TmEllipsisText",{attrs:{text:s.label}})],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()])},Vt=[],Ft=u(Tt,wt,Vt,!1,null,"59c02213");const zt=Ft.exports,kt=!0,Lt=!1,Ot={name:"TmTable",components:{TableSearch:A,TablePagination:ht,TableMenu:bt,ColumnConfig:zt,RefreshIcon:ae,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:()=>({})}},data(){return{getDefaultSize:m,getCompatSize:C,isVue3:Lt,isVue2:kt,t:g().t,tableData:[],tableLoading:!1,columnsLoading:!1,tableReload:1,tableHeight:null,selectedRows:[],paginationInfo:{current:1,pageSize:20,total:void 0},originalColumns:[],displayColumns:[],isColumnConfigLoaded:!1,afterOpenDelay:{"open-delay":300}}},computed:{pageLoading(){return this.tableLoading||this.columnsLoading},computedTableKey(){return this.tableKey?this.tableKey:this.$route.path.slice(1).replace(/\//g,"-")},computedShowPagination(){return this.showPagination&&typeof this.data=="function"}},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()}}},created(){this.originalColumns=this.$slots.default||[],this.columnSettingButton?this.columnsLoading=!0:(this.displayColumns=this.originalColumns,this.isColumnConfigLoaded=!0)},mounted(){this.getTableHeight(),window.addEventListener("resize",this.getTableHeight)},beforeDestroy(){window.removeEventListener("resize",this.getTableHeight)},methods:{handleUpdateSearchForm(t){this.$emit("update:search-form",t)},handleColumnConfigComplete(t){Array.isArray(t.columns)?this.displayColumns=[...t.columns]:this.displayColumns=[...this.originalColumns],t.isInitialLoad?(this.isColumnConfigLoaded=!0,this.columnsLoading=!1,this.firstLoad&&typeof this.data=="function"&&this.loadData()):this.reloadTable()},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,i!==void 0&&(this.paginationInfo.total=i),a!==void 0&&(this.paginationInfo.current=a),s!==void 0&&(this.paginationInfo.pageSize=s)}catch{}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 Mt=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},on:{search:e.search,reset:e.reset,"update:search-form":e.handleUpdateSearchForm}},[e._t("search")],2):e._e(),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(),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",{...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,attrs:{vnode:s}})}),1),e.computedShowPagination?i("table-pagination",{ref:"tmPagination",attrs:{"page-size":e.paginationInfo.pageSize,"current-page":e.paginationInfo.current,total:e.paginationInfo.total,disabled:e.tableLoading},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}):e._e()],1)},At=[],Rt=u(Ot,Mt,At,!1,null,"3a76baf8");const H=Rt.exports,Dt=!0,Ht=!1,Et={name:"TmTableColumn",inheritAttrs:!1,computed:{isVisible(){return this.$attrs.visible!==!1},slots(){return this.$scopedSlots}},data(){return{isVue2:Dt,isVue3:Ht}},created(){this.$parent&&this.$parent.$emit&&this.$parent.$emit("column-initialized",{prop:this.$attrs.prop,visible:this.$attrs.visible!==!1})}};var It=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()},Wt=[],Pt=u(Et,It,Wt,!1,null,null);const E=Pt.exports,{t:I}=g(),Nt={name:"TmAdvancedEllipsisText",components:{CopyIcon:P},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(I("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(I("copySuccess"))}catch{this.$message.error(I("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<"u"&&(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 Bt=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)},jt=[],Ut=u(Nt,Bt,jt,!1,null,"16643222");const W=Ut.exports,Jt={install:{install(t,e={}){[H,E,_,W].forEach(i=>t.component(i.name,i)),e.tableConfigProvider&&Ct(e.tableConfigProvider)}}.install,Table:H,Column:E,Search:A,Select:w,AdvancedInput:F,AdvancedDate:z,Cascader:k,Radio:L,Checkbox:O,Switch:M,EllipsisText:_,AdvancedEllipsisText:W,setLang:$,useLocale:g};o.AdvancedDate=z,o.AdvancedEllipsisText=W,o.AdvancedInput=F,o.Cascader=k,o.Checkbox=O,o.Column=E,o.EllipsisText=_,o.Radio=L,o.Search=A,o.Select=w,o.Switch=M,o.Table=H,o.default=Jt,o.setLang=$,o.useLocale=g,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/vue3/tm-table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.advanced-select[data-v-7a60f352]{display:flex;max-width:305px}.advanced-select.hasField .select[data-v-7a60f352]{width:206px;position:relative}.advanced-select.hasField .select[data-v-7a60f352]:hover{z-index:1!important}.advanced-select.hasField[data-v-7a60f352] .select--v2 .el-input__inner,.advanced-select.hasField[data-v-7a60f352] .select--v3 .el-select__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.advanced-select .field-select[data-v-7a60f352]{margin-right:-1px;width:100px;position:relative}.advanced-select .field-select[data-v-7a60f352]:hover{z-index:1!important}.advanced-select[data-v-7a60f352] .field-select--v2 .el-input__inner,.advanced-select[data-v-7a60f352] .field-select--v3 .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0}.advanced-select .select[data-v-7a60f352]{width:200px;flex-shrink:0}.advanced-select .select[data-v-7a60f352] .el-tag--info{max-width:52%}.check-all-option[data-v-7a60f352]{margin-top:-6px;padding:6px 20px;border-bottom:1px solid #ebeef5;cursor:default;position:sticky;top:0;z-index:1;background-color:#fff}.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-aefedcde]{display:inline-flex;vertical-align:top}.ellipsis-text-container .toolbar[data-v-aefedcde]{display:none;max-width:30px}.ellipsis-text-container .toolbar .icon-item[data-v-aefedcde]{cursor:pointer;margin-left:2px}.ellipsis-text-container .toolbar .icon-item[data-v-aefedcde]:hover{opacity:.8}.ellipsis-text-container:hover .toolbar[data-v-aefedcde]{display:flex;align-items:center;gap:2px}.ellipsis-text-container:hover .toolbar.multiline[data-v-aefedcde]{display:block}.ellipsis-text-container:hover .toolbar .icon-item[data-v-aefedcde]:hover{color:var(--color-primary)!important}.tm-advanced-input[data-v-e5c28c62]{display:flex;align-items:center}.tm-advanced-input .left-select[data-v-e5c28c62]{margin-right:-1px}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .left-select.el-select{margin-right:-1px;position:relative;z-index:2}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .left-select.el-select .el-input__inner{transition:0s;border-top-right-radius:0;border-bottom-right-radius:0}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input{position:relative;z-index:1}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input:focus-within,.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input:hover,.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input:focus{z-index:3}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input.has-label .el-input__inner{transition:0s;border-top-left-radius:0;border-bottom-left-radius:0}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .left-select.el-select .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0;position:relative;z-index:2;transition:0s}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper{position:relative;z-index:1;transition:0s}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper:focus-within,.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper:hover,.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper:focus{z-index:3}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input.has-label .el-input__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.popover-content .popover-title[data-v-e5c28c62]{font-weight:700;margin-bottom:5px}.popover-content .popover-subtitle[data-v-e5c28c62]{font-size:12px;color:#909399;margin-top:0;margin-bottom:10px}.popover-content .popover-footer[data-v-e5c28c62]{margin-top:10px;text-align:right}.tm-advanced-input--v3 .input-label[data-v-e5c28c62]{border-right:none;color:var(--el-input-text-color, var(--el-text-color-regular))}.tm-advanced-input--v2 .input-label[data-v-e5c28c62]{border-right:none;color:#606266}.input-label[data-v-e5c28c62]{height:100%;flex-shrink:0;width:100px;font-size:12px;box-sizing:border-box;display:flex;align-items:center;line-height:12px;border-right:none;border-top-left-radius:4px;border-bottom-left-radius:4px;justify-content:flex-end;padding-right:4px}.tm-date-picker--v2[data-v-3cd3ede3]{display:flex;align-items:center}.tm-date-picker--v2[data-v-3cd3ede3] .el-select{margin-right:-1px;z-index:1}.tm-date-picker--v2[data-v-3cd3ede3] .el-select .el-input__inner{border-top-right-radius:0;border-bottom-right-radius:0;transition:0s}.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor.el-input__inner{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor{transition:0s}.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor.is-active,.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor:hover{z-index:2}.tm-date-picker--v3[data-v-3cd3ede3] .el-select{margin-right:-1px}.tm-date-picker--v3[data-v-3cd3ede3] .el-select .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0;position:relative;z-index:2;transition:0s}.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor{position:relative;border-top-left-radius:0!important;border-bottom-left-radius:0!important;z-index:1;transition:0s}.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor.focus-within,.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor.focus,.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor.is-active,.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor:hover{z-index:2}.tm-cascader--v2 .el-input--mini input{height:28px!important}.tm-cascader--v2 .el-cascader__tags .el-tag{margin:4px 0 4px 6px}.tm-cascader--v2 .el-cascader__tags .el-tag:first-child{max-width:90px}.tm-cascader--v2 .el-cascader__tags .el-tag:nth-child(2){max-width:48px}.tm-cascader--v2 .el-cascader__tags input{font-size:12px!important}.tm-cascader--v2 .el-cascader__tags .el-cascader__search-input{min-width:16px}.tm-cascader--v3 .el-cascader__tags{font-size:12px;flex-wrap:nowrap;align-items:center}.tm-cascader--v3 .el-cascader__tags .el-tag{padding:0 4px}.tm-cascader--v3 .el-cascader__tags .el-tag:first-child{max-width:90px}.tm-cascader--v3 .el-cascader__tags .el-tag:nth-child(2){max-width:48px}.tm-cascader--v3 .el-cascader__tags .el-cascader__search-input{min-width:16px}.el-cascader__collapse-tags{max-height:400px;max-width:400px;margin:0 -11px;padding:0 11px;overflow-y:auto;display:flex;flex-wrap:wrap;gap:4px}[data-v-61fed13d] .el-radio-button__inner{font-weight:400}.tm-radio[data-v-61fed13d]{width:200px;display:flex;width:100%}.tm-radio.wide-mode[data-v-61fed13d]{width:305px}.tm-radio--v2[data-v-61fed13d] .el-radio-group .el-radio-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tm-radio--v2[data-v-61fed13d] .el-radio-group .el-radio-button .el-radio-button__inner{padding:7px 5px;width:100%;display:inline-block;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;text-align:center}.tm-radio--v3[data-v-61fed13d] .el-radio-group .el-radio-button .el-radio-button__inner{width:100%}.tm-checkbox[data-v-b44866b1]{width:200px;display:flex;flex-direction:column}.tm-checkbox.wide-mode[data-v-b44866b1]{width:305px}.tm-checkbox--v2[data-v-b44866b1] .el-checkbox-group{display:flex;width:100%}.tm-checkbox--v2[data-v-b44866b1] .el-checkbox-group .el-checkbox-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tm-checkbox--v2[data-v-b44866b1] .el-checkbox-group .el-checkbox-button .el-checkbox-button__inner{padding:7px 5px;width:100%;display:inline-block;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;text-align:center}.tm-checkbox--v3[data-v-b44866b1] .el-checkbox-group .el-checkbox-button .el-checkbox-button__inner{width:100%}.tm-switch[data-v-9e7a342f]{display:flex;align-items:center}.tm-switch.narrow-container[data-v-9e7a342f]{width:95px}.tm-switch.medium-container[data-v-9e7a342f]{width:200px}.tm-switch.wide-container[data-v-9e7a342f]{width:305px}.tm-switch[data-v-9e7a342f] .el-switch .el-switch__core{flex-shrink:0}.table-search[data-v-572f884b]{--el-font-size-base: 12px}.table-search[data-v-572f884b] .el-select__wrapper,.table-search[data-v-572f884b] .el-switch__label{font-size:var(--el-font-size-base);font-weight:400}.table-search[data-v-572f884b] .el-radio-button__inner,.table-search[data-v-572f884b] .el-checkbox-button__inner{padding:9px 10px}.table-search[data-v-572f884b]{margin-bottom:10px;display:flex;flex-wrap:wrap;align-items:center}.table-search .search-content[data-v-572f884b]{flex:1;display:flex;align-items:center;flex-wrap:wrap;gap:10px}.table-search .search-actions[data-v-572f884b]{display:flex}.table-search .search-error-message[data-v-572f884b]{color:#f56c6c;font-size:12px;margin:5px 0}.table-search--v2 .search-form-item[data-v-572f884b]{height:28px}.table-search--v3 .search-form-item[data-v-572f884b]{height:24px}.tm-pagination[data-v-4dbdf6e7]{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-92bf8b2f]{display:flex;align-items:center;font-weight:700;color:#000;height:32px;padding-left:10px;padding-top:10px}.container[data-v-92bf8b2f]{height:500px;width:100%;display:flex;flex-direction:column}.container .main-container[data-v-92bf8b2f]{display:flex;flex:1;overflow:hidden;border-bottom:1px solid #dcdfe9}.container .main-container .left-content[data-v-92bf8b2f]{flex:2;border-right:1px solid #dcdfe9;display:flex;flex-direction:column}.container .main-container .left-content .option-list[data-v-92bf8b2f]{flex:1;overflow-y:auto}.container .main-container .right-content[data-v-92bf8b2f]{flex:1;overflow-y:auto;display:flex;flex-direction:column;overflow:hidden}.container .main-container .right-content .search-box[data-v-92bf8b2f]{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-92bf8b2f] .el-input__inner{box-shadow:none;border:none}.container .main-container .right-content .search-box[data-v-92bf8b2f] .el-input__wrapper{box-shadow:none}.container .main-container .right-content .sort-list[data-v-92bf8b2f]{flex:1;overflow-y:auto}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-92bf8b2f]{position:relative;transition:background-color .2s}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-92bf8b2f]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item-wrapper:hover .delete-button[data-v-92bf8b2f],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .top-button[data-v-92bf8b2f],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .left-fixed-btn[data-v-92bf8b2f]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item-wrapper:hover .right-fixed-btn[data-v-92bf8b2f]:not(.active-fixed){display:inline-block!important}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-92bf8b2f]{position:relative}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-92bf8b2f]:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:#ff00001a;border:1px dashed #f56c6c;pointer-events:none}.container .main-container .right-content .sort-list .sort-item-wrapper.frozen[data-v-92bf8b2f]:hover,.container .main-container .right-content .sort-list .sort-item-wrapper.frozenRight[data-v-92bf8b2f]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item[data-v-92bf8b2f]{display:flex;align-items:center;width:100%;height:32px;box-sizing:border-box;padding:0 8px;transition:.2s;-webkit-user-select:none;user-select:none}.container .main-container .right-content .sort-list .sort-item .row-title[data-v-92bf8b2f]{cursor:grab;flex:1;margin-right:8px;display:flex;align-items:center;gap:4px;text-align:left}.container .main-container .right-content .sort-list .sort-item .operation-btns[data-v-92bf8b2f]{display:flex;align-items:center}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont-button[data-v-92bf8b2f]{margin-left:3px;padding:0}.container .main-container .right-content .sort-list .sort-item .operation-btns .delete-button[data-v-92bf8b2f],.container .main-container .right-content .sort-list .sort-item .operation-btns .top-button[data-v-92bf8b2f],.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn[data-v-92bf8b2f]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn[data-v-92bf8b2f]:not(.active-fixed){display:none}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn.active-fixed[data-v-92bf8b2f],.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn.active-fixed[data-v-92bf8b2f]{display:inline-block;color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-92bf8b2f]{color:#aaa;font-size:14px}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-92bf8b2f]: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-92bf8b2f]{transform:rotate(-90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn:hover .el-icon-position[data-v-92bf8b2f]{color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn .el-icon-position[data-v-92bf8b2f]{transform:rotate(90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn:hover .el-icon-position[data-v-92bf8b2f]{color:var(--el-color-primary)}.container .footer[data-v-92bf8b2f]{padding:10px;box-sizing:border-box;display:flex;justify-content:space-between}.el-checkbox[data-v-92bf8b2f]{white-space:wrap;min-height:14px;height:auto;margin-top:10px;margin-left:10px;font-weight:400}.el-checkbox[data-v-92bf8b2f] .el-checkbox__label{width:70px;vertical-align:top}.blue-background-class[data-v-92bf8b2f]{background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a;z-index:1000}.sortable-drag[data-v-92bf8b2f]{opacity:.9;background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a}.tips[data-v-92bf8b2f]{color:#999;line-height:16px;font-size:12px;padding:8px}.tips span[data-v-92bf8b2f],.tips span span[data-v-92bf8b2f]{color:#999}.icon-item[data-v-16643222]{cursor:pointer}.icon-item[data-v-16643222]:hover{opacity:.6}.tm-ellipsis-text[data-v-16643222]{position:relative;overflow:hidden}.tm-ellipsis-text .tm-ellipsis-text-wrapper[data-v-16643222]{width:100%}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-line[data-v-16643222]{line-height:inherit;word-break:break-all;white-space:normal}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-last-line[data-v-16643222]{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-16643222]{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-16643222]{flex-shrink:0;margin-left:4px;display:flex;align-items:center;line-height:inherit;font-size:inherit}.tm-ellipsis-measure[data-v-16643222]{position:absolute;left:-9999px;top:-9999px;visibility:hidden;pointer-events:none;z-index:-1}
|
|
1
|
+
@charset "UTF-8";.advanced-select[data-v-7a60f352]{display:flex;max-width:305px}.advanced-select.hasField .select[data-v-7a60f352]{width:206px;position:relative}.advanced-select.hasField .select[data-v-7a60f352]:hover{z-index:1!important}.advanced-select.hasField[data-v-7a60f352] .select--v2 .el-input__inner,.advanced-select.hasField[data-v-7a60f352] .select--v3 .el-select__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.advanced-select .field-select[data-v-7a60f352]{margin-right:-1px;width:100px;position:relative}.advanced-select .field-select[data-v-7a60f352]:hover{z-index:1!important}.advanced-select[data-v-7a60f352] .field-select--v2 .el-input__inner,.advanced-select[data-v-7a60f352] .field-select--v3 .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0}.advanced-select .select[data-v-7a60f352]{width:200px;flex-shrink:0}.advanced-select .select[data-v-7a60f352] .el-tag--info{max-width:52%}.check-all-option[data-v-7a60f352]{margin-top:-6px;padding:6px 20px;border-bottom:1px solid #ebeef5;cursor:default;position:sticky;top:0;z-index:1;background-color:#fff}.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{text-align:left}.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-a2647731]{display:inline-flex;vertical-align:top}.ellipsis-text-container .toolbar[data-v-a2647731]{display:none;max-width:30px}.ellipsis-text-container .toolbar .icon-item[data-v-a2647731]{cursor:pointer;margin-left:2px}.ellipsis-text-container .toolbar .icon-item[data-v-a2647731]:hover{opacity:.8}.ellipsis-text-container:hover .toolbar[data-v-a2647731]{display:flex;align-items:center;gap:2px}.ellipsis-text-container:hover .toolbar.multiline[data-v-a2647731]{display:block}.ellipsis-text-container:hover .toolbar .icon-item[data-v-a2647731]:hover{color:var(--color-primary)!important}.tm-advanced-input[data-v-e5c28c62]{display:flex;align-items:center}.tm-advanced-input .left-select[data-v-e5c28c62]{margin-right:-1px}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .left-select.el-select{margin-right:-1px;position:relative;z-index:2}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .left-select.el-select .el-input__inner{transition:0s;border-top-right-radius:0;border-bottom-right-radius:0}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input{position:relative;z-index:1}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input:focus-within,.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input:hover,.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input:focus{z-index:3}.tm-advanced-input.tm-advanced-input--v2[data-v-e5c28c62] .right-input.el-input.has-label .el-input__inner{transition:0s;border-top-left-radius:0;border-bottom-left-radius:0}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .left-select.el-select .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0;position:relative;z-index:2;transition:0s}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper{position:relative;z-index:1;transition:0s}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper:focus-within,.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper:hover,.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input .el-input__wrapper:focus{z-index:3}.tm-advanced-input.tm-advanced-input--v3[data-v-e5c28c62] .right-input.el-input.has-label .el-input__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.popover-content .popover-title[data-v-e5c28c62]{font-weight:700;margin-bottom:5px}.popover-content .popover-subtitle[data-v-e5c28c62]{font-size:12px;color:#909399;margin-top:0;margin-bottom:10px}.popover-content .popover-footer[data-v-e5c28c62]{margin-top:10px;text-align:right}.tm-advanced-input--v3 .input-label[data-v-e5c28c62]{border-right:none;color:var(--el-input-text-color, var(--el-text-color-regular))}.tm-advanced-input--v2 .input-label[data-v-e5c28c62]{border-right:none;color:#606266}.input-label[data-v-e5c28c62]{height:100%;flex-shrink:0;width:100px;font-size:12px;box-sizing:border-box;display:flex;align-items:center;line-height:12px;border-right:none;border-top-left-radius:4px;border-bottom-left-radius:4px;justify-content:flex-end;padding-right:4px}.tm-date-picker--v2[data-v-3cd3ede3]{display:flex;align-items:center}.tm-date-picker--v2[data-v-3cd3ede3] .el-select{margin-right:-1px;z-index:1}.tm-date-picker--v2[data-v-3cd3ede3] .el-select .el-input__inner{border-top-right-radius:0;border-bottom-right-radius:0;transition:0s}.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor.el-input__inner{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor{transition:0s}.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor.is-active,.tm-date-picker--v2[data-v-3cd3ede3] .el-date-editor:hover{z-index:2}.tm-date-picker--v3[data-v-3cd3ede3] .el-select{margin-right:-1px}.tm-date-picker--v3[data-v-3cd3ede3] .el-select .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0;position:relative;z-index:2;transition:0s}.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor{position:relative;border-top-left-radius:0!important;border-bottom-left-radius:0!important;z-index:1;transition:0s}.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor.focus-within,.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor.focus,.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor.is-active,.tm-date-picker--v3[data-v-3cd3ede3] .el-date-editor:hover{z-index:2}.tm-cascader--v2 .el-input--mini input{height:28px!important}.tm-cascader--v2 .el-cascader__tags .el-tag{margin:4px 0 4px 6px}.tm-cascader--v2 .el-cascader__tags .el-tag:first-child{max-width:90px}.tm-cascader--v2 .el-cascader__tags .el-tag:nth-child(2){max-width:48px}.tm-cascader--v2 .el-cascader__tags input{font-size:12px!important}.tm-cascader--v2 .el-cascader__tags .el-cascader__search-input{min-width:16px}.tm-cascader--v3 .el-cascader__tags{font-size:12px;flex-wrap:nowrap;align-items:center}.tm-cascader--v3 .el-cascader__tags .el-tag{padding:0 4px}.tm-cascader--v3 .el-cascader__tags .el-tag:first-child{max-width:90px}.tm-cascader--v3 .el-cascader__tags .el-tag:nth-child(2){max-width:48px}.tm-cascader--v3 .el-cascader__tags .el-cascader__search-input{min-width:16px}.el-cascader__collapse-tags{max-height:400px;max-width:400px;margin:0 -11px;padding:0 11px;overflow-y:auto;display:flex;flex-wrap:wrap;gap:4px}[data-v-61fed13d] .el-radio-button__inner{font-weight:400}.tm-radio[data-v-61fed13d]{width:200px;display:flex;width:100%}.tm-radio.wide-mode[data-v-61fed13d]{width:305px}.tm-radio--v2[data-v-61fed13d] .el-radio-group .el-radio-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tm-radio--v2[data-v-61fed13d] .el-radio-group .el-radio-button .el-radio-button__inner{padding:7px 5px;width:100%;display:inline-block;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;text-align:center}.tm-radio--v3[data-v-61fed13d] .el-radio-group .el-radio-button .el-radio-button__inner{width:100%}.tm-checkbox[data-v-b44866b1]{width:200px;display:flex;flex-direction:column}.tm-checkbox.wide-mode[data-v-b44866b1]{width:305px}.tm-checkbox--v2[data-v-b44866b1] .el-checkbox-group{display:flex;width:100%}.tm-checkbox--v2[data-v-b44866b1] .el-checkbox-group .el-checkbox-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tm-checkbox--v2[data-v-b44866b1] .el-checkbox-group .el-checkbox-button .el-checkbox-button__inner{padding:7px 5px;width:100%;display:inline-block;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;text-align:center}.tm-checkbox--v3[data-v-b44866b1] .el-checkbox-group .el-checkbox-button .el-checkbox-button__inner{width:100%}.tm-switch[data-v-9e7a342f]{display:flex;align-items:center}.tm-switch.narrow-container[data-v-9e7a342f]{width:95px}.tm-switch.medium-container[data-v-9e7a342f]{width:200px}.tm-switch.wide-container[data-v-9e7a342f]{width:305px}.tm-switch[data-v-9e7a342f] .el-switch .el-switch__core{flex-shrink:0}.table-search[data-v-572f884b]{--el-font-size-base: 12px}.table-search[data-v-572f884b] .el-select__wrapper,.table-search[data-v-572f884b] .el-switch__label{font-size:var(--el-font-size-base);font-weight:400}.table-search[data-v-572f884b] .el-radio-button__inner,.table-search[data-v-572f884b] .el-checkbox-button__inner{padding:9px 10px}.table-search[data-v-572f884b]{margin-bottom:10px;display:flex;flex-wrap:wrap;align-items:center}.table-search .search-content[data-v-572f884b]{flex:1;display:flex;align-items:center;flex-wrap:wrap;gap:10px}.table-search .search-actions[data-v-572f884b]{display:flex}.table-search .search-error-message[data-v-572f884b]{color:#f56c6c;font-size:12px;margin:5px 0}.table-search--v2 .search-form-item[data-v-572f884b]{height:28px}.table-search--v3 .search-form-item[data-v-572f884b]{height:24px}.tm-pagination[data-v-4dbdf6e7]{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-59c02213]{display:flex;align-items:center;font-weight:700;color:#000;height:32px;padding-left:10px;padding-top:10px}.container[data-v-59c02213]{height:500px;width:100%;display:flex;flex-direction:column;overflow:hidden}.container .main-container[data-v-59c02213]{display:flex;flex:1;overflow:hidden;border-bottom:1px solid #dcdfe9}.container .main-container .left-content[data-v-59c02213]{flex:2;border-right:1px solid #dcdfe9;display:flex;flex-direction:column}.container .main-container .left-content .option-list[data-v-59c02213]{flex:1;overflow-y:auto}.container .main-container .right-content[data-v-59c02213]{flex:1;overflow-y:auto;display:flex;flex-direction:column;overflow:hidden}.container .main-container .right-content .search-box[data-v-59c02213]{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-59c02213] .el-input__inner{box-shadow:none;border:none}.container .main-container .right-content .search-box[data-v-59c02213] .el-input__wrapper{box-shadow:none}.container .main-container .right-content .sort-list[data-v-59c02213]{flex:1;overflow-y:auto}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-59c02213]{position:relative;transition:background-color .2s}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-59c02213]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item-wrapper:hover .delete-button[data-v-59c02213],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .top-button[data-v-59c02213],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .left-fixed-btn[data-v-59c02213]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item-wrapper:hover .right-fixed-btn[data-v-59c02213]:not(.active-fixed){display:inline-block!important}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-59c02213]{position:relative}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-59c02213]:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:#ff00001a;border:1px dashed #f56c6c;pointer-events:none}.container .main-container .right-content .sort-list .sort-item-wrapper.frozen[data-v-59c02213]:hover,.container .main-container .right-content .sort-list .sort-item-wrapper.frozenRight[data-v-59c02213]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item[data-v-59c02213]{display:flex;align-items:center;width:100%;height:32px;box-sizing:border-box;padding:0 8px;transition:.2s;-webkit-user-select:none;user-select:none}.container .main-container .right-content .sort-list .sort-item .row-title[data-v-59c02213]{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-59c02213]{display:flex;align-items:center}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont-button[data-v-59c02213]{margin-left:3px;padding:0}.container .main-container .right-content .sort-list .sort-item .operation-btns .delete-button[data-v-59c02213],.container .main-container .right-content .sort-list .sort-item .operation-btns .top-button[data-v-59c02213],.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn[data-v-59c02213]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn[data-v-59c02213]:not(.active-fixed){display:none}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn.active-fixed[data-v-59c02213],.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn.active-fixed[data-v-59c02213]{display:inline-block;color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-59c02213]{color:#aaa;font-size:14px}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-59c02213]: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-59c02213]{transform:rotate(-90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn:hover .el-icon-position[data-v-59c02213]{color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn .el-icon-position[data-v-59c02213]{transform:rotate(90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn:hover .el-icon-position[data-v-59c02213]{color:var(--el-color-primary)}.container .footer[data-v-59c02213]{padding:10px;box-sizing:border-box;display:flex;justify-content:space-between}.el-checkbox[data-v-59c02213]{white-space:wrap;min-height:14px;height:auto;margin-top:10px;margin-left:10px;font-weight:400}.el-checkbox[data-v-59c02213] .el-checkbox__label{width:70px;vertical-align:top}.blue-background-class[data-v-59c02213]{background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a;z-index:1000}.sortable-drag[data-v-59c02213]{opacity:.9;background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a}.tips[data-v-59c02213]{color:#999;line-height:16px;font-size:12px;padding:8px}.tips span[data-v-59c02213],.tips span span[data-v-59c02213]{color:#999}.tm-table[data-v-3a76baf8]{overflow:hidden}.icon-item[data-v-16643222]{cursor:pointer}.icon-item[data-v-16643222]:hover{opacity:.6}.tm-ellipsis-text[data-v-16643222]{position:relative;overflow:hidden}.tm-ellipsis-text .tm-ellipsis-text-wrapper[data-v-16643222]{width:100%}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-line[data-v-16643222]{line-height:inherit;word-break:break-all;white-space:normal}.tm-ellipsis-text .tm-ellipsis-text-wrapper .tm-ellipsis-last-line[data-v-16643222]{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-16643222]{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-16643222]{flex-shrink:0;margin-left:4px;display:flex;align-items:center;line-height:inherit;font-size:inherit}.tm-ellipsis-measure[data-v-16643222]{position:absolute;left:-9999px;top:-9999px;visibility:hidden;pointer-events:none;z-index:-1}
|
package/dist/vue3/tm-table.es.js
CHANGED
|
@@ -572,7 +572,7 @@ function Ge(e, i, t, n, l, s) {
|
|
|
572
572
|
_: 1
|
|
573
573
|
}, 16, ["disabled", "content"]);
|
|
574
574
|
}
|
|
575
|
-
const Q = /* @__PURE__ */ z($e, [["render", Ge], ["__scopeId", "data-v-
|
|
575
|
+
const Q = /* @__PURE__ */ z($e, [["render", Ge], ["__scopeId", "data-v-a2647731"]]), Ye = !1, Xe = !0, Ze = {
|
|
576
576
|
name: "TmAdvancedInputFilter",
|
|
577
577
|
components: {
|
|
578
578
|
MoreIcon: Pe,
|
|
@@ -2550,7 +2550,7 @@ function mi(e, i, t, n, l, s) {
|
|
|
2550
2550
|
_: 1
|
|
2551
2551
|
}, 16, ["placement", "onShow", "onHide"]);
|
|
2552
2552
|
}
|
|
2553
|
-
const gi = /* @__PURE__ */ z(Gt, [["render", mi], ["__scopeId", "data-v-
|
|
2553
|
+
const gi = /* @__PURE__ */ z(Gt, [["render", mi], ["__scopeId", "data-v-59c02213"]]), bi = !1, yi = !0, vi = {
|
|
2554
2554
|
name: "TmTable",
|
|
2555
2555
|
components: {
|
|
2556
2556
|
TableSearch: ue,
|
|
@@ -2803,16 +2803,16 @@ function _i(e, i, t, n, l, s) {
|
|
|
2803
2803
|
"search-form": t.searchForm
|
|
2804
2804
|
}, {
|
|
2805
2805
|
default: f(() => [
|
|
2806
|
-
V(e.$slots, "search")
|
|
2806
|
+
V(e.$slots, "search", {}, void 0, !0)
|
|
2807
2807
|
]),
|
|
2808
2808
|
_: 3
|
|
2809
2809
|
}, 8, ["onSearch", "onReset", "onUpdate:searchForm", "disabled", "search-columns", "search-form"])) : y("", !0),
|
|
2810
2810
|
t.showMenu ? (o(), g(T, { key: 1 }, {
|
|
2811
2811
|
left: f(() => [
|
|
2812
|
-
V(e.$slots, "menu-left")
|
|
2812
|
+
V(e.$slots, "menu-left", {}, void 0, !0)
|
|
2813
2813
|
]),
|
|
2814
2814
|
right: f(() => [
|
|
2815
|
-
V(e.$slots, "menu-right"),
|
|
2815
|
+
V(e.$slots, "menu-right", {}, void 0, !0),
|
|
2816
2816
|
t.refreshButton && typeof t.data == "function" ? (o(), g(c, _({
|
|
2817
2817
|
key: 0,
|
|
2818
2818
|
content: l.t("refresh"),
|
|
@@ -2872,7 +2872,7 @@ function _i(e, i, t, n, l, s) {
|
|
|
2872
2872
|
}, null, 8, ["page-size", "current-page", "total", "disabled", "onSizeChange", "onCurrentChange"])) : y("", !0)
|
|
2873
2873
|
], 512);
|
|
2874
2874
|
}
|
|
2875
|
-
const ce = /* @__PURE__ */ z(vi, [["render", _i]]), xi = !1, Si = !0, Ti = {
|
|
2875
|
+
const ce = /* @__PURE__ */ z(vi, [["render", _i], ["__scopeId", "data-v-3a76baf8"]]), xi = !1, Si = !0, Ti = {
|
|
2876
2876
|
name: "TmTableColumn",
|
|
2877
2877
|
inheritAttrs: !1,
|
|
2878
2878
|
computed: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(u,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("sortablejs")):typeof define=="function"&&define.amd?define(["exports","vue","sortablejs"],e):(u=typeof globalThis<"u"?globalThis:u||self,e(u.TmTable={},u.Vue,u.Sortable))})(this,function(u,e,S){"use strict";const G={mini:"small",small:"small",default:"default",large:"large"},F=t=>G[t]||G.default,V=()=>"default",X={"zh-CN":{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:"复制失败"},"en-US":{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"}};let E={value:"zh-CN"};E=e.ref("zh-CN");const Z=t=>{var i;return((i=X[E.value])==null?void 0:i[t])||t},N=t=>{E.value=t},x=()=>({t:Z,setLang:N,currentLang:E}),b=(t,i)=>{const l=t.__vccOpts||t;for(const[n,s]of i)l[n]=s;return l},ee=!1,te=!0,M="modelValue",le="update:modelValue",ie={name:"TmSelectFilter",props:{[M]:{type:[String,Number,Array],default:""},field:{type:[String,Number],default:""},options:{type:[Array,Function],default:()=>[]},labelOptions:{type:Array,default:()=>[]},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:""}},data(){return{t:x().t,isVue2:ee,isVue3:te,getDefaultSize:V,optionsList:[],loading:!1,indeterminate:!1,checkAll:!1,activedSelect:""}},computed:{computedValue:{get(){return this[M]},set(t){this.$emit(le,t),this.$emit("change",t)}},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}},propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}}},watch:{[M](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:{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 i=[];t&&(i=this.optionsList.map(l=>l[this.propMap.value])),this.computedValue=i},setActivedSelect(t){this.activedSelect=t}}},se={key:0,class:"check-all-option"};function oe(t,i,l,n,s,o){const a=e.resolveComponent("el-option"),h=e.resolveComponent("el-select"),c=e.resolveComponent("el-checkbox");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["advanced-select",{hasField:l.labelOptions&&l.labelOptions.length>0}])},[l.labelOptions&&l.labelOptions.length>0?(e.openBlock(),e.createBlock(h,{key:0,size:s.getDefaultSize(),class:e.normalizeClass(["field-select",`field-select--${s.isVue2?"v2":"v3"}`]),modelValue:o.fieldValue,"onUpdate:modelValue":i[0]||(i[0]=d=>o.fieldValue=d),onFocus:i[1]||(i[1]=d=>o.setActivedSelect("left")),style:e.normalizeStyle(`z-index:${s.activedSelect==="left"?2:0}`)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.labelOptions,d=>(e.openBlock(),e.createBlock(a,{key:d.value,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["size","class","modelValue","style"])):e.createCommentVNode("",!0),e.createVNode(h,e.mergeProps({ref:"select",class:["select",`select--${s.isVue3?"v3":"v2"}`],onFocus:i[4]||(i[4]=d=>o.setActivedSelect("right")),style:`z-index:${s.activedSelect==="right"?2:0}`,modelValue:o.computedValue,"onUpdate:modelValue":i[5]||(i[5]=d=>o.computedValue=d)},{...t.$attrs,size:s.getDefaultSize(),filterable:l.filterable,clearable:l.clearable,collapseTags:l.collapseTags,multiple:l.multiple,placeholder:l.placeholder,loading:s.loading},e.toHandlers(s.isVue2?t.$listeners:{}),{loading:s.loading}),{header:e.withCtx(()=>[s.isVue3&&l.multiple&&l.showCheckAll?(e.openBlock(),e.createBlock(c,{key:0,modelValue:s.checkAll,"onUpdate:modelValue":i[3]||(i[3]=d=>s.checkAll=d),indeterminate:s.indeterminate,size:s.getDefaultSize(),onChange:o.handleCheckAll,style:{width:"100%",height:"20px","padding-left":"10px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("all")),1)]),_:1},8,["modelValue","indeterminate","size","onChange"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[s.isVue2&&l.multiple&&l.showCheckAll?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(c,{style:{width:"100%"},modelValue:s.checkAll,"onUpdate:modelValue":i[2]||(i[2]=d=>s.checkAll=d),indeterminate:s.indeterminate,size:s.getDefaultSize(),onChange:o.handleCheckAll},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("all")),1)]),_:1},8,["modelValue","indeterminate","size","onChange"])])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.optionsList,d=>(e.openBlock(),e.createBlock(a,{key:d[o.propMap.value],label:d[o.propMap.label],value:d[o.propMap.value],disabled:d.disabled},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"option",{item:d},()=>[e.createTextVNode(e.toDisplayString(d[o.propMap.label]),1)],!0)]),_:2},1032,["label","value","disabled"]))),128))],!0)]),_:3},16,["class","style","modelValue","loading"])],2)}const D=b(ie,[["render",oe],["__scopeId","data-v-7a60f352"]]),ne={name:"BaseIcon",props:{path:{type:String},size:{type:[String,Number]},color:{type:String}},methods:{handleClick(){}}},ae=["width","height"],re=["d"];function ce(t,i,l,n,s,o){return e.openBlock(),e.createElementBlock("i",{class:"tm-icon",onClick:i[0]||(i[0]=(...a)=>o.handleClick&&o.handleClick(...a))},[(e.openBlock(),e.createElementBlock("svg",{width:l.size,height:l.size,style:e.normalizeStyle({color:l.color}),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:l.path},null,8,re)],12,ae))])}const de=b(ne,[["render",ce],["__scopeId","data-v-1c30ca93"]]),k=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,[i,l])=>{const n=`${i}Icon`,s={name:n,props:{path:{type:String,default:l},size:{type:[String,Number]},color:{type:String}},render(o){return e.h(de,this.$props)}};return s.install=o=>{o.component(n,s)},t[i]=s,t},{}),he=k.menu,pe=k.refresh,me=k.move;k["column-setting"];const ue=k.more,fe=k["fixed-left"],ge=k["fixed-right"],be=k.upload,ye=k.download,Ce=k.delete,Y=k.copy,{t:A}=x(),ke=!1,Ve=!0,xe={name:"TmEllipsisText",components:{CopyIcon:Y},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}},data(){return{isVue2:ke,isVue3:Ve,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,i=typeof this.maxWidth=="number"?`${this.maxWidth}px`:this.maxWidth;return{width:t,maxWidth:i,lineHeight:this.lineHeight,display:"-webkit-inline-box",overflow:"hidden",WebkitBoxOrient:"vertical",WebkitLineClamp:this.lines}}},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 d;const t=this.$refs.textEl;if(!t)return;const i=getComputedStyle(t);if(!i.width||i.width==="0px"){this.$nextTick(()=>{this.performOverflowCheck()});return}const l=t.scrollHeight,n=t.scrollWidth,s=t.clientHeight,o=t.clientWidth,a=1,h=l>s+a,c=n>o+a;if(h||c){this.isOverflow=!0;const f=parseFloat(i.lineHeight)||16;this.currentLines=Math.ceil(l/f)}else{const f=t.getBoundingClientRect(),g=(d=t.parentElement)==null?void 0:d.getBoundingClientRect();if(g){const C=f.height>g.height||f.width>g.width;this.isOverflow=C}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(A("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(A("copySuccess"))}catch{this.$message.error(A("copyFailed"))}document.body.removeChild(t)}}},_e={class:"ellipsis-text-container"};function Se(t,i,l,n,s,o){const a=e.resolveComponent("CopyIcon"),h=e.resolveComponent("el-tooltip");return e.openBlock(),e.createBlock(h,e.mergeProps({disabled:o.tooltipDisabled,content:l.text,effect:"dark",placement:"top"},{[s.isVue2?"open-delay":"show-after"]:300}),{default:e.withCtx(()=>[e.createElementVNode("div",_e,[e.createElementVNode("div",{ref:"textEl",class:"ellipsis-text",style:e.normalizeStyle(o.textStyle)},e.toDisplayString(l.text),5),e.createElementVNode("div",{class:e.normalizeClass(["toolbar",{multiline:s.currentLines>1&&l.lines>1}])},[l.copyable?(e.openBlock(),e.createBlock(a,{key:0,class:"icon-item",onClick:o.handleCopy},null,8,["onClick"])):e.createCommentVNode("",!0)],2)])]),_:1},16,["disabled","content"])}const L=b(xe,[["render",Se],["__scopeId","data-v-aefedcde"]]),Te=!1,we=!0,ze={name:"TmAdvancedInputFilter",components:{MoreIcon:ue,EllipsisText:L},props:{label:{type:String,default:""},value:{type:String,default:""},field:{type:[String,Number],default:""},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},labelOptions:{type:Array,default:()=>[]}},data(){return{t:x().t,isVue3:we,isVue2:Te,getDefaultSize:V,getCompatSize:F,exactValue:"",inputValue:"",isExactMode:!1,currentOptionMultiple:!1}},computed:{width(){return this.labelOptions&&this.labelOptions.length||this.label?"305px":"200px"},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}},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:{labelOptions:{handler(t){t&&t.length>0&&(this.field||this.$emit("field-change",t[0].value),this.updateCurrentOptionMultiple())},deep:!0,immediate:!0},field:{handler(){this.updateCurrentOptionMultiple()},immediate:!0},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()}},Fe={key:1,class:"input-label"},Le={class:"popover-content"},Be={class:"popover-subtitle"},Ee={class:"popover-footer"};function Oe(t,i,l,n,s,o){const a=e.resolveComponent("el-option"),h=e.resolveComponent("el-select"),c=e.resolveComponent("EllipsisText"),d=e.resolveComponent("el-input"),f=e.resolveComponent("el-button"),g=e.resolveComponent("MoreIcon"),C=e.resolveComponent("el-popover");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tm-advanced-input",`tm-advanced-input--${s.isVue3?"v3":"v2"}`]),style:e.normalizeStyle({width:o.width})},[l.labelOptions&&l.labelOptions.length?(e.openBlock(),e.createBlock(h,{key:0,modelValue:o.fieldValue,"onUpdate:modelValue":i[0]||(i[0]=y=>o.fieldValue=y),placeholder:s.t("selectPlaceholder"),style:{width:"100px","flex-shrink":"0"},size:s.getDefaultSize(),class:"left-select",onChange:o.handlefieldChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.labelOptions,y=>(e.openBlock(),e.createBlock(a,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","size","onChange"])):l.label?(e.openBlock(),e.createElementBlock("div",Fe,[e.createVNode(c,{text:l.label,lines:2},null,8,["text"])])):e.createCommentVNode("",!0),e.createVNode(d,{modelValue:s.inputValue,"onUpdate:modelValue":i[2]||(i[2]=y=>s.inputValue=y),size:s.getDefaultSize(),placeholder:l.placeholder,onKeyup:e.withKeys(o.handleEnter,["enter","native"]),clearable:"",class:e.normalizeClass(["right-input",{"has-label":l.labelOptions&&l.labelOptions.length}])},{default:e.withCtx(()=>[o.shouldShowMultiple?(e.openBlock(),e.createBlock(C,e.mergeProps({key:0,slot:"append"},{[s.isVue3?"visible":"value"]:s.isExactMode,placement:"bottom-end",width:240,trigger:"click"},e.toHandlers({[s.isVue3?"update:visible":"input"]:o.handleVisibleChange})),{reference:e.withCtx(()=>[e.createVNode(g,{style:{cursor:"pointer"}})]),default:e.withCtx(()=>[e.createElementVNode("div",Le,[e.createElementVNode("p",Be,e.toDisplayString(s.t("accurateSearchTips")),1),e.createVNode(d,{size:s.getDefaultSize(),type:"textarea",rows:8,modelValue:s.exactValue,"onUpdate:modelValue":i[1]||(i[1]=y=>s.exactValue=y),placeholder:s.t("accurateSearchPlaceholder"),style:{"font-size":"12px"}},null,8,["size","modelValue","placeholder"]),e.createElementVNode("div",Ee,[e.createVNode(f,{style:{float:"left"},size:s.getCompatSize("mini"),onClick:o.handleClear},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("clear")),1)]),_:1},8,["size","onClick"]),e.createVNode(f,{size:s.getCompatSize("mini"),onClick:o.handlePopoverClose},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("cancel")),1)]),_:1},8,["size","onClick"]),e.createVNode(f,{type:"primary",size:s.getCompatSize("mini"),onClick:o.handleExactSearch},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("search")),1)]),_:1},8,["size","onClick"])])])]),_:1},16)):e.createCommentVNode("",!0)]),_:1},8,["modelValue","size","placeholder","onKeyup","class"])],6)}const H=b(ze,[["render",Oe],["__scopeId","data-v-e5c28c62"]]),{t:T}=x(),Ne=!1,Me=!0,De={name:"TmAdvancedDateFilter",props:{value:{type:Array,default:()=>[]},field:{type:[String,Number],default:""},start:{type:[String,Number],default:""},end:{type:[String,Number],default:""},size:{type:String,default:"mini"},labelOptions:{type:Array,default:()=>[]},type:{type:String,default:"daterange"},format:{type:String,default:""},startPlaceholder:{type:String,default:void 0},endPlaceholder:{type:String,default:void 0},disabledDate:{type:Function,default:t=>t.getTime()>Date.now()}},computed:{computedFormat(){const t="YYYY",i="DD";return this.format?this.format:this.type==="year"?t:this.type==="month"?`${t}-MM`:this.type==="date"?`${t}-MM-${i}`:this.type==="dates"?`${t}-MM-${i}`:this.type==="months"?`${t}-MM`:this.type==="years"?t:this.type==="week"?`${t}-MM-WW`:this.type==="datetime"?`${t}-MM-${i} HH:mm:ss`:this.type==="datetimerange"?`${t}-MM-${i} HH:mm:ss`:this.type==="daterange"?`${t}-MM-${i}`:this.type==="monthrange"?`${t}-MM`:""},computedPickerOptions(){return{shortcuts:[{text:T("today"),onClick(t){const i=new Date,l=new Date;t.$emit("pick",[l,i])}},{text:T("yesterday"),onClick(t){const i=new Date,l=new Date;l.setTime(l.getTime()-3600*1e3*24),i.setTime(i.getTime()-3600*1e3*24),t.$emit("pick",[l,i])}},{text:T("last7days"),onClick(t){const i=new Date,l=new Date;l.setTime(l.getTime()-3600*1e3*24*7),t.$emit("pick",[l,i])}},{text:T("last30days"),onClick(t){const i=new Date,l=new Date;l.setTime(l.getTime()-3600*1e3*24*30),t.$emit("pick",[l,i])}},{text:T("thisMonth"),onClick(t){const i=new Date,l=new Date;l.setDate(1),t.$emit("pick",[l,i])}},{text:T("lastMonth"),onClick(t){const i=new Date,l=new Date;l.setMonth(l.getMonth()-1),l.setDate(1),i.setDate(0),t.$emit("pick",[l,i])}}]}},dateValue:{get(){return this.start||this.end?[this.start,this.end]:this.value},set(t){this.$emit("value-change",t),this.$emit("start-change",t),this.$emit("end-change",t)}},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}}},data(){return{t:T,isVue2:Ne,isVue3:Me,getDefaultSize:V}},watch:{labelOptions:{handler(t){t.length>0&&!this.field&&this.$emit("field-change",t[0].value)},deep:!0,immediate:!0}}};function Ae(t,i,l,n,s,o){const a=e.resolveComponent("el-option"),h=e.resolveComponent("el-select"),c=e.resolveComponent("el-date-picker");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tm-date-picker",`tm-date-picker--${s.isVue3?"v3":"v2"}`])},[e.createVNode(h,{modelValue:o.fieldValue,"onUpdate:modelValue":i[0]||(i[0]=d=>o.fieldValue=d),size:s.getDefaultSize(),style:{width:"100px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.labelOptions,d=>(e.openBlock(),e.createBlock(a,{key:d.value,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"]),e.createVNode(c,{modelValue:o.dateValue,"onUpdate:modelValue":i[1]||(i[1]=d=>o.dateValue=d),type:"daterange",size:s.getDefaultSize(),"range-separator":"-","start-placeholder":l.startPlaceholder===void 0?s.t("startDate"):l.startPlaceholder,"end-placeholder":l.endPlaceholder===void 0?s.t("endDate"):l.endPlaceholder,"picker-options":o.computedPickerOptions,style:{width:"206px"},format:o.computedFormat,"value-format":o.computedFormat},null,8,["modelValue","size","start-placeholder","end-placeholder","picker-options","format","value-format"])],2)}const R=b(De,[["render",Ae],["__scopeId","data-v-3cd3ede3"]]),He=!1,Re={name:"TmCascaderFilter",props:{value:{type:[String,Number,Array],default:""},options:{type:[Array,Function],default:()=>[]},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:""}},data(){return{isVue2:He,getDefaultSize:V,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{...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 i=await t();Array.isArray(i)&&(this.optionsList=i)}catch(i){console.error(i)}finally{this.loading=!1}else Array.isArray(t)&&(this.optionsList=t)}}};function Ie(t,i,l,n,s,o){const a=e.resolveComponent("el-cascader");return e.openBlock(),e.createBlock(a,e.mergeProps({ref:"cascader",class:["tm-cascader",`tm-cascader--${s.isVue2?"v2":"v3"}`],modelValue:s.selectedValue,"onUpdate:modelValue":i[0]||(i[0]=h=>s.selectedValue=h),style:{width:"200px"}},{...t.$attrs,size:s.getDefaultSize(),filterable:l.filterable,clearable:l.clearable,collapseTags:l.collapseTags,collapseTagsTooltip:l.collapseTagsTooltip,props:o.cascaderProps,placeholder:l.placeholder,options:s.optionsList,loading:s.loading},e.toHandlers(s.isVue2?t.$listeners:{})),{default:e.withCtx(({node:h,data:c})=>[e.renderSlot(t.$slots,"default",{node:h,data:c},()=>[e.createElementVNode("span",null,e.toDisplayString(c[o.propMap.label]),1)])]),_:3},16,["class","modelValue"])}const I=b(Re,[["render",Ie]]),Pe=!1,We=!0,ve={name:"TmRadioFilter",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}},data(){return{isVue2:Pe,isVue3:We,getDefaultSize:V,selectedValue:this.value,optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}},hasWideOptions(){return this.optionsList.length>4},calculateItemWidth(){if(!this.optionsList.length)return{};const i=`${(this.hasWideOptions?305:200)/this.optionsList.length}px`;return{width:i,flex:`0 0 ${i}`}}},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 i=await t();Array.isArray(i)&&(this.optionsList=i)}catch(i){console.error(i)}finally{this.loading=!1}else Array.isArray(t)&&(this.optionsList=t)}}};function Ue(t,i,l,n,s,o){const a=e.resolveComponent("el-radio-button"),h=e.resolveComponent("el-radio-group");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tm-radio",{"wide-mode":o.hasWideOptions,"tm-radio--v3":s.isVue3,"tm-radio--v2":s.isVue2}])},[e.createVNode(h,e.mergeProps({ref:"radioGroup",modelValue:s.selectedValue,"onUpdate:modelValue":i[0]||(i[0]=c=>s.selectedValue=c)},{...t.$attrs,size:s.getDefaultSize()},e.toHandlers(s.isVue2?t.$listeners:{})),{default:e.withCtx(()=>[t.$slots.default?e.renderSlot(t.$slots,"default",{key:0},void 0,!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(s.optionsList,c=>(e.openBlock(),e.createBlock(a,e.mergeProps({ref_for:!0},{[s.isVue3?"value":"label"]:c[o.propMap.value],disabled:c.disabled,style:o.calculateItemWidth},{key:c[o.propMap.value]}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"option",{item:c},()=>[e.createTextVNode(e.toDisplayString(c[o.propMap.label]),1)],!0)]),_:2},1040))),128))]),_:3},16,["modelValue"])],2)}const P=b(ve,[["render",Ue],["__scopeId","data-v-61fed13d"]]),je=!1,Je=!0,Ke={name:"TmCheckboxFilter",props:{value:{type:Array,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}},data(){return{isVue2:je,isVue3:Je,getDefaultSize:V,selectedValue:this.value||[],optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}},hasWideOptions(){return this.optionsList.length>4},calculateItemWidth(){if(!this.optionsList.length)return{};const t=Math.ceil(this.optionsList.length/(this.hasWideOptions?6:4)),i=Math.ceil(this.optionsList.length/t),n=`${(this.hasWideOptions?305:200)/i}px`;return{width:n,flex:`0 0 ${n}`}}},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 i=await t();Array.isArray(i)&&(this.optionsList=i)}catch(i){console.error(i)}finally{this.loading=!1}else Array.isArray(t)&&(this.optionsList=t)}}};function Qe(t,i,l,n,s,o){const a=e.resolveComponent("el-checkbox-button"),h=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tm-checkbox",{"wide-mode":o.hasWideOptions,"tm-checkbox--v3":s.isVue3,"tm-checkbox--v2":s.isVue2}])},[e.createVNode(h,e.mergeProps({ref:"checkboxGroup",modelValue:s.selectedValue,"onUpdate:modelValue":i[0]||(i[0]=c=>s.selectedValue=c)},{...t.$attrs,size:s.getDefaultSize()},e.toHandlers(s.isVue2?t.$listeners:{})),{default:e.withCtx(()=>[t.$slots.default?e.renderSlot(t.$slots,"default",{key:0},void 0,!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(s.optionsList,c=>(e.openBlock(),e.createBlock(a,e.mergeProps({key:c[o.propMap.value]},{ref_for:!0},{[s.isVue3?"value":"label"]:c[o.propMap.value],disabled:c.disabled,style:o.calculateItemWidth}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"option",{item:c},()=>[e.createTextVNode(e.toDisplayString(c[o.propMap.label]),1)],!0)]),_:2},1040))),128))]),_:3},16,["modelValue"])],2)}const W=b(Ke,[["render",Qe],["__scopeId","data-v-b44866b1"]]),$e=!1,qe={name:"TmSwitchFilter",props:{value:{type:Boolean,default:!1},label:{type:String,default:""}},data(){return{isVue2:$e,getDefaultSize:V,switchValue:this.value}},computed:{containerWidthClass(){const t=o=>{if(!o)return 0;let a=0;for(let h=0;h<o.length;h++){const c=o.charAt(h);a+=/[\u4e00-\u9fa5]/.test(c)?2:1}return a},i=t(this.$attrs["active-text"]),l=t(this.$attrs["inactive-text"]),n=t(this.$attrs.label),s=i+l+n;return s>20?"wide-container":s>6?"medium-container":"narrow-container"}},watch:{value:{immediate:!0,handler(t){this.switchValue=t}},switchValue(t){this.$emit("input",t),this.$emit("change",t)}}},Ge={key:0,class:"switch-label"};function Ye(t,i,l,n,s,o){const a=e.resolveComponent("el-switch");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tm-switch",o.containerWidthClass])},[l.label?(e.openBlock(),e.createElementBlock("span",Ge,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createVNode(a,e.mergeProps({ref:"switch",modelValue:s.switchValue,"onUpdate:modelValue":i[0]||(i[0]=h=>s.switchValue=h)},t.$attrs,e.toHandlers(s.isVue2?t.$listeners:{}),{size:s.getDefaultSize()}),null,16,["modelValue","size"])],2)}const v=b(qe,[["render",Ye],["__scopeId","data-v-9e7a342f"]]),Xe={name:"DynamicSlot",functional:!0,props:{name:{type:String,required:!0},slotProps:{type:Object,default:()=>({})}},render(t,i){const{props:l,parent:n}=i;let s=n.$scopedSlots[l.name];if(!s){let o=n.$parent;for(;o&&!s;){if(o.$options.name==="TmTable"){s=o.$scopedSlots[l.name];break}o=o.$parent}}return s?s(l.slotProps):t()}},{t:Ze}=x(),et=!1,tt=!0,lt={name:"TmTableSearch",components:{TmSelect:D,TmAdvancedInput:H,TmAdvancedDate:R,TmCascader:I,TmRadio:P,TmCheckbox:W,TmSwitch:v,DynamicSlot:Xe},props:{disabled:{type:Boolean,default:!1},searchColumns:{type:Array,default:null},searchForm:{type:Object,default:()=>({})}},data(){return{t:Ze,isVue2:et,isVue3:tt,getCompatSize:F,getDefaultSize:V,defaultValues:{}}},computed:{computedSearchForm:{get(){return this.searchForm},set(t){this.$emit("update:search-form",t)}}},mounted(){this.initDefaultValues()},methods:{hasDefaultSlot(){const t=this.$slots.default;return this.isVue2?!!t:t()[0].children.length>0},handleUpdate(t,i,l){const n=this.getFieldValue(t,l);n&&this.$emit("update:search-form",{...this.computedSearchForm,[n]:i})},handleUpdateDate(t,i){const l=i||[],n=this.getFieldValue(t,"start"),s=this.getFieldValue(t,"end"),o=this.getFieldValue(t,"value"),a={};n&&(a[n]=l[0]),s&&(a[s]=l[1]),o&&(a[o]=l),this.$emit("update:search-form",{...this.computedSearchForm,...a})},getFieldValue(t,i){if(typeof t=="string")return t;if(t.fields&&i in t.fields){const l=t.fields[i];if(typeof l=="string")return l;if(Array.isArray(l))return l[0];if(l&&typeof l=="object")return l.name}},getFieldDefault(t,i){if(t.fields&&i in t.fields){const l=t.fields[i];if(Array.isArray(l)&&l.length>1)return l[1];if(l&&typeof l=="object"&&"default"in l)return l.default}},hasSearchSlot(t){const i="$slots";if(this[i][t])return!0;let n=this.$parent;const s=n[i];for(;n;){if(n.$options.name==="TmTable"&&s[t])return!0;n=n.$parent}return!1},initDefaultValues(){if(!this.searchColumns||!this.searchColumns.length)return;const t={};this.searchColumns.forEach(i=>{if(typeof i=="string"||!i.fields)return;const l=this.getFieldValue(i,"value"),n=this.getFieldValue(i,"label");if(i.type==="input"&&i.labelOptions&&i.labelOptions.length>0){const o=i.labelOptions[0];if(n)if(n in this.computedSearchForm)t[n]=this.computedSearchForm[n];else{const a=this.getFieldDefault(i,"label");a!==void 0?t[n]=a:o&&o.value!==void 0&&(t[n]=o.value)}l&&!(l in this.computedSearchForm)&&(t[l]="")}else if(i.type==="date"&&i.labelOptions&&i.labelOptions.length>0){const o=i.labelOptions[0];if(l&&!(l in this.computedSearchForm)&&(t[l]=[]),n)if(n in this.computedSearchForm)t[n]=this.computedSearchForm[n];else{const a=this.getFieldDefault(i,"label");a!==void 0?t[n]=a:o&&o.value!==void 0&&(t[n]=o.value)}}else if(i.type==="select"&&i.labelOptions&&i.labelOptions.length>0){const o=i.labelOptions[0];if(l&&!(l in this.computedSearchForm)&&(t[l]=i.multiple?[]:""),n)if(n in this.computedSearchForm)t[n]=this.computedSearchForm[n];else{const a=this.getFieldDefault(i,"label");a!==void 0?t[n]=a:o&&o.value!==void 0&&(t[n]=o.value)}}const s=this.getFieldDefault(i,"value");if(l&&s!==void 0&&!(l in this.computedSearchForm)?i.type==="date"&&!Array.isArray(s)?t[l]=[]:i.type==="checkbox"&&!Array.isArray(s)?t[l]=s?[s]:[]:i.type==="switch"&&typeof s!="boolean"?t[l]=!!s:t[l]=s:l&&!(l in this.computedSearchForm)&&(i.type==="checkbox"?t[l]=[]:i.type==="switch"&&(t[l]=!1)),i.type==="date"){const o=this.getFieldValue(i,"start"),a=this.getFieldValue(i,"end"),h=this.getFieldDefault(i,"start"),c=this.getFieldDefault(i,"end");o&&h!==void 0&&!(o in this.computedSearchForm)&&(t[o]=h),a&&c!==void 0&&!(a in this.computedSearchForm)&&(t[a]=c)}}),this.defaultValues=t,this.$emit("update:search-form",{...t,...this.computedSearchForm})},getSearchForm(){return this.computedSearchForm},handleSearch(){setTimeout(()=>{this.$emit("search",this.computedSearchForm)})},handleReset(){this.$emit("update:search-form",{...this.defaultValues}),this.$emit("reset")}}},it={class:"search-content"},st={class:"search-actions"};function ot(t,i,l,n,s,o){const a=e.resolveComponent("dynamic-slot"),h=e.resolveComponent("tm-advanced-input"),c=e.resolveComponent("tm-advanced-date"),d=e.resolveComponent("tm-select"),f=e.resolveComponent("tm-cascader"),g=e.resolveComponent("tm-radio"),C=e.resolveComponent("tm-checkbox"),y=e.resolveComponent("tm-switch"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["table-search",`table-search--${s.isVue2?"v2":"v3"}`])},[e.createElementVNode("div",it,[o.hasDefaultSlot()?e.renderSlot(t.$slots,"default",{key:0},void 0,!0):l.searchColumns&&l.searchColumns.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(l.searchColumns,(r,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[typeof r=="string"?(e.openBlock(),e.createElementBlock("div",{key:`str-${r}-${_}`,class:"search-item"},[(e.openBlock(),e.createBlock(a,{name:`search-${r}`,"slot-props":{searchForm:l.searchForm},key:r},null,8,["name","slot-props"]))])):(e.openBlock(),e.createElementBlock("div",{key:`obj-${_}`,class:"search-item"},[r.fields?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.hasSearchSlot(`search-${o.getFieldValue(r,"value")}`)?(e.openBlock(),e.createBlock(a,{name:`search-${o.getFieldValue(r,"value")}`,"slot-props":{searchForm:l.searchForm,col:r},key:o.getFieldValue(r,"value")},null,8,["name","slot-props"])):(e.openBlock(),e.createElementBlock("div",{style:{display:"flex"},key:o.getFieldValue(r,"value")||`col-${_}`},[r.type==="input"?(e.openBlock(),e.createBlock(h,{key:0,label:r.label,value:o.computedSearchForm[o.getFieldValue(r,"value")],field:o.computedSearchForm[o.getFieldValue(r,"label")],onValueChange:m=>o.handleUpdate(r,m,"value"),onFieldChange:m=>o.handleUpdate(r,m,"label"),multiple:r.multiple,labelOptions:r.labelOptions,placeholder:r.placeholder,onSearch:o.handleSearch},null,8,["label","value","field","onValueChange","onFieldChange","multiple","labelOptions","placeholder","onSearch"])):e.createCommentVNode("",!0),r.type==="date"?(e.openBlock(),e.createBlock(c,{key:1,label:r.label,value:o.computedSearchForm[o.getFieldValue(r,"value")],field:o.computedSearchForm[o.getFieldValue(r,"label")],start:o.computedSearchForm[o.getFieldValue(r,"start")],end:o.computedSearchForm[o.getFieldValue(r,"end")],onFieldChange:m=>o.handleUpdate(r,m,"label"),onValueChange:m=>o.handleUpdateDate(r,m),onStartChange:m=>o.handleUpdateDate(r,m),onEndChange:m=>o.handleUpdateDate(r,m),labelOptions:r.labelOptions,"start-placeholder":r.startPlaceholder,"end-placeholder":r.endPlaceholder},null,8,["label","value","field","start","end","onFieldChange","onValueChange","onStartChange","onEndChange","labelOptions","start-placeholder","end-placeholder"])):e.createCommentVNode("",!0),r.type==="select"?(e.openBlock(),e.createBlock(d,{key:2,label:r.label,modelValue:o.computedSearchForm[o.getFieldValue(r,"value")],"onUpdate:modelValue":m=>o.computedSearchForm[o.getFieldValue(r,"value")]=m,field:o.computedSearchForm[o.getFieldValue(r,"label")],options:r.options,labelOptions:r.labelOptions,placeholder:r.placeholder,multiple:r.multiple,"show-check-all":r.checkAll,onFieldChange:m=>o.handleUpdate(r,m,"label")},null,8,["label","modelValue","onUpdate:modelValue","field","options","labelOptions","placeholder","multiple","show-check-all","onFieldChange"])):e.createCommentVNode("",!0),r.type==="cascader"?(e.openBlock(),e.createBlock(f,{key:3,modelValue:o.computedSearchForm[o.getFieldValue(r,"value")],"onUpdate:modelValue":m=>o.computedSearchForm[o.getFieldValue(r,"value")]=m,label:r.label,options:r.options,labelOptions:r.labelOptions,props:r.props,placeholder:r.placeholder,"show-check-all":r.checkAll},null,8,["modelValue","onUpdate:modelValue","label","options","labelOptions","props","placeholder","show-check-all"])):e.createCommentVNode("",!0),r.type==="radio"?(e.openBlock(),e.createBlock(g,{key:4,modelValue:o.computedSearchForm[o.getFieldValue(r,"value")],"onUpdate:modelValue":m=>o.computedSearchForm[o.getFieldValue(r,"value")]=m,label:r.label,options:r.options,props:r.props},null,8,["modelValue","onUpdate:modelValue","label","options","props"])):e.createCommentVNode("",!0),r.type==="checkbox"?(e.openBlock(),e.createBlock(C,{key:5,modelValue:o.computedSearchForm[o.getFieldValue(r,"value")],"onUpdate:modelValue":m=>o.computedSearchForm[o.getFieldValue(r,"value")]=m,label:r.label,options:r.options,props:r.props},null,8,["modelValue","onUpdate:modelValue","label","options","props"])):e.createCommentVNode("",!0),r.type==="switch"?(e.openBlock(),e.createBlock(y,{key:6,modelValue:o.computedSearchForm[o.getFieldValue(r,"value")],"onUpdate:modelValue":m=>o.computedSearchForm[o.getFieldValue(r,"value")]=m,"active-text":r.activeText,"inactive-text":r.inactiveText,label:r.label,"active-color":r.activeColor,"inactive-color":r.inactiveColor},null,8,["modelValue","onUpdate:modelValue","active-text","inactive-text","label","active-color","inactive-color"])):e.createCommentVNode("",!0)]))],64)):(e.openBlock(),e.createElementBlock("div",{key:`error-${_}`,class:"search-error-message"}," 缺少 fields 配置,无法渲染此组件 "))]))],64))),256)):e.createCommentVNode("",!0),e.createElementVNode("div",st,[e.createVNode(w,{type:"primary",size:s.getDefaultSize(),onClick:o.handleSearch},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("query")),1)]),_:1},8,["size","onClick"]),e.createVNode(w,{size:s.getDefaultSize(),onClick:o.handleReset},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("reset")),1)]),_:1},8,["size","onClick"])])])],2)}const U=b(lt,[["render",ot],["__scopeId","data-v-572f884b"]]),nt=!1,at={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:nt,getCompatSize:F}},methods:{handleSizeChange(t){this.$emit("size-change",t)},handleCurrentChange(t){this.$emit("current-change",t)}}},rt={class:"tm-pagination"};function ct(t,i,l,n,s,o){const a=e.resolveComponent("el-pagination");return e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(a,e.mergeProps(t.$attrs,e.toHandlers(s.isVue2?t.$listeners:{}),{style:{"text-align":"right"},"current-page":l.current,"page-size":l.pageSize,total:l.total,"page-sizes":[10,20,50,100,300,500,1e3,2e3],size:s.getCompatSize("mini"),layout:"total, sizes, prev, pager, next, jumper",onSizeChange:o.handleSizeChange,"onUpdate:currentPage":i[0]||(i[0]=h=>t.$emit("update:current",h)),"onUpdate:pageSize":i[1]||(i[1]=h=>t.$emit("update:pageSize",h)),onCurrentChange:o.handleCurrentChange}),null,16,["current-page","page-size","total","size","onSizeChange","onCurrentChange"])])}const dt=b(at,[["render",ct],["__scopeId","data-v-4dbdf6e7"]]),ht={name:"TmTableMenu",props:{size:{type:String,default:"mini"}}},pt={size:"small",class:"tm-table-menu",inline:""},mt={class:"left"},ut={class:"right"};function ft(t,i,l,n,s,o){return e.openBlock(),e.createElementBlock("div",pt,[e.createElementVNode("div",mt,[e.renderSlot(t.$slots,"left",{},void 0,!0)]),e.createElementVNode("div",ut,[e.renderSlot(t.$slots,"right",{},void 0,!0)])])}const gt=b(ht,[["render",ft],["__scopeId","data-v-579dd2c3"]]),j=t=>t?t.props||{}:{},J=(t,i)=>{t&&(t.props||(t.props={}),typeof i=="object"&&Object.assign(t.props,i))},O={getTableConfig(t){try{const i=localStorage.getItem(`tm-table-config-${t}`);return Promise.resolve({data:{code:200,data:i}})}catch(i){return Promise.reject(i)}},setTableConfig(t){try{return localStorage.setItem(`tm-table-config-${t.key}`,t.info),Promise.resolve({data:{code:200,message:"success"}})}catch(i){return Promise.reject(i)}}},bt=t=>O.getTableConfig(t.key),yt=t=>O.setTableConfig(t),Ct=t=>{t&&(typeof t.getTableConfig=="function"&&(O.getTableConfig=t.getTableConfig),typeof t.setTableConfig=="function"&&(O.setTableConfig=t.setTableConfig))},{t:kt}=x(),Vt=!1,xt=!0,_t={formatter:(t,i,l,n)=>[void 0,null,""].includes(l)?"-":l},St={name:"TmColumnConfig",components:{MoveIcon:me,FixedLeftIcon:fe,FixedRightIcon:ge,UploadIcon:be,DownloadIcon:ye,DeleteIcon:Ce,MenuIcon:he,tmEllipsisText:L},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:kt,isVue2:Vt,isVue3:xt,getDefaultSize:V,getCompatSize:F,buttonType:{link:!0,type:"primary"},afterOpenDelay:{"show-after":300},popoverVisible:!1,keyWord:"",sortedTableColumns:[],tableColumns:[],defaultColumnsConfig:[],columnMap:{},processedColumns:[],placement:"bottom",searchTimer:null,isDraggingFrozen:!1,isDraggingFrozenRight:!1,sortable:null,isConfigLoaded:!1,columnsCopy:[]}},computed:{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(){return this.tableKey?this.tableKey:this.$route.path.slice(1).replace(/\//g,"-")}},watch:{keyWord:{handler(){this.handleSearch()},immediate:!0},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,i){for(let l=t.length-1;l>=0;l--)if(i(t[l],l,t))return l;return-1},initializeColumnConfig(){this.defaultColumns&&this.defaultColumns.length>0?this.defaultColumnsConfig=this.defaultColumns:this.processOriginalColumns(),this.loadColumnConfig()},processOriginalColumns(){const t=this.columns||[];let i={};this.defaultColumnsConfig=t.filter(l=>{const n=j(l);return!(!n.prop||this.ignoredColumnConfigTypes.includes(n.type))}).map((l,n)=>{const s=j(l),o={..._t,...s};J(l,o),s.prop&&(i[s.prop]=l);const a=s.prop==="operation"||s.label&&s.label.includes("操作"),h=s.hasOwnProperty("visible")?s.visible!==!1:!0;return{prop:s.prop,label:s.label,fixed:s.fixed||"",isOperation:a,sort:n,cancellable:s.hasOwnProperty("cancellable")?s.cancellable:!0,visible:h}}),this.columnMap=i},loadColumnConfig(){bt({key:this.computedTableKey}).then(t=>{var l;if(t.data.code!==200)return;let i=JSON.parse(((l=t.data)==null?void 0:l.data)||null)||{};i.columnsConfig&&JSON.stringify(this.defaultColumnsConfig)===JSON.stringify(i.defaultColumnsConfig)?this.tableColumns=i.columnsConfig.map(n=>({...n})):this.tableColumns=this.defaultColumnsConfig.map(n=>({...n})),this.processedColumns=this.applyColumnConfig(this.tableColumns),this.isConfigLoaded=!0,this.$emit("complete",{columns:this.processedColumns,isInitialLoad:!0})}).catch(()=>{this.tableColumns=this.defaultColumnsConfig.map(t=>({...t})),this.processedColumns=this.applyColumnConfig(this.tableColumns),this.isConfigLoaded=!0,this.$emit("complete",{columns:this.processedColumns,isInitialLoad:!0})})},applyColumnConfig(t,i=!1){let l=this.columns.filter(s=>{const o=j(s);return this.ignoredColumnConfigTypes.includes(o.type)}),n=[];return[...t].sort((s,o)=>{const a=s.sort!==void 0?s.sort:1/0,h=o.sort!==void 0?o.sort:1/0;return a-h}).forEach(s=>{if(s.prop){let o=this.columnMap[s.prop];o&&(J(o,{fixed:s.fixed||void 0,visible:s.visible}),(!i&&s.visible||i)&&n.push(o))}}),l.forEach(s=>{J(s,{visible:!0})}),[...l,...n]},crateSortable(){const t=this.$refs.sortListRef;if(!t)return;this.sortable&&(this.sortable.destroy(),this.sortable=null);const i=new S(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:l})=>{const n=l.getAttribute("data-prop"),s=this.sortedTableColumns.find(o=>o.prop===n);this.isDraggingFrozen=s&&s.fixed==="left",this.isDraggingFrozenRight=s&&s.fixed==="right",this.draggedItemIndex=Array.from(t.children).indexOf(l),l.classList.add("sortable-drag")},onMove:l=>{const{target:n,related:s}=l;if(!n||!s)return!1;const o=s?s.getAttribute("data-prop"):null,a=o?this.sortedTableColumns.find(g=>g.prop===o):null,h=n.getAttribute("data-prop"),c=h?this.sortedTableColumns.find(g=>g.prop===h):null;if(c&&c.isOperation&&a&&a.fixed==="left")return n.classList.add("no-drop-zone"),!1;const d=a&&a.fixed==="left",f=a&&a.fixed==="right";return this.isDraggingFrozen&&!d||this.isDraggingFrozenRight&&!f||!this.isDraggingFrozen&&!this.isDraggingFrozenRight&&(d||f)?(n.classList.add("no-drop-zone"),!1):(document.querySelectorAll(".no-drop-zone").forEach(g=>{g.classList.remove("no-drop-zone")}),!0)},onEnd:({item:l,newIndex:n,oldIndex:s})=>{if(n===void 0||s===void 0||n<0||s<0||n>=this.sortedTableColumns.length||s>=this.sortedTableColumns.length)return;document.querySelectorAll(".no-drop-zone").forEach(g=>{g.classList.remove("no-drop-zone")}),l.classList.remove("sortable-drag");const o=this.sortedTableColumns[s],a=o.fixed==="left",h=o.fixed==="right",c=n>0?this.sortedTableColumns[n-1]:null,d=n<this.sortedTableColumns.length-1?this.sortedTableColumns[n+1]:null;let f=!1;if(a?(c&&c.fixed!=="left"||d&&d.fixed==="right")&&(f=!0):h?(c&&c.fixed!=="right"||d&&d.fixed!=="right")&&(f=!0):(c&&c.fixed==="right"||d&&d.fixed==="left")&&(f=!0),f){this.rollbackSort();return}this.updateSortAfterDrag()}});this.sortable=i},rollbackSort(){this.sortedTableColumns=JSON.parse(JSON.stringify(this.columnsCopy))},updateSortAfterDrag(){const t=this.$refs.sortListRef;if(!t)return;Array.from(t.children||[]).filter(l=>l&&l.dataset&&l.dataset.prop).map(l=>l.dataset.prop).forEach((l,n)=>{this.sortedTableColumns.some(s=>s.prop===l?(s.sort=n,!0):!1)}),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns)},handleSearch(){clearTimeout(this.searchTimer),this.searchTimer=setTimeout(()=>{const t=this.keyWord;this.sortedTableColumns.forEach(i=>{i.searchShow=i.label.includes(t)})},500)},init(){this.tableColumns=Array.isArray(this.tableColumns)?[...this.tableColumns]:Array.isArray(this.defaultColumnsConfig)?[...this.defaultColumnsConfig]:[],this.initSortedTableColumns()},initSortedTableColumns(){this.tableColumns.forEach((t,i)=>{t.sort===void 0&&(t.sort=i)}),this.sortedTableColumns=[...this.tableColumns].sort((t,i)=>t.fixed==="left"&&i.fixed!=="left"?-1:t.fixed!=="left"&&i.fixed==="left"||t.fixed==="right"&&i.fixed!=="right"?1:t.fixed!=="right"&&i.fixed==="right"?-1:t.sort-i.sort)},setPlacement(){const i=this.$refs.operationRef.$el.getBoundingClientRect();(window.innerHeight||document.documentElement.clientHeight)-(i.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{}})(),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 S<"u"&&S.utils&&(document.removeEventListener("mousemove",S.utils.throttleCall),document.removeEventListener("mouseup",S.utils.throttleCall))}catch{}},handleSelectAll(){const t=this.tableColumns.some(i=>!i.visible);this.tableColumns.forEach(i=>{i.cancellable&&(i.visible=t)})},handleRestoreDefault(){this.tableColumns=JSON.parse(JSON.stringify(this.defaultColumnsConfig)),this.sortedTableColumns=[...this.tableColumns].sort((t,i)=>t.sort-i.sort)},canMoveTop(t,i){if(i===0)return!1;if(t.fixed==="left"){const l=this.sortedTableColumns[i-1];return l&&l.fixed==="left"}if(!t.fixed){const l=this.sortedTableColumns[i-1];return l&&l.fixed==="left"?!1:l&&!l.fixed}return t.fixed==="right"},moveTop(t,i){const l=this.sortedTableColumns,n=t.prop;if(t.fixed==="right"&&(t.fixed=""),t.fixed==="left")l.unshift(l.splice(i,1)[0]);else{const s=this.findLastIndex(this.sortedTableColumns,o=>o.fixed==="left");l.splice(s+1,0,l.splice(i,1)[0])}this.updateSortValues(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns),this.$nextTick(()=>{const s=this.$refs.sortListRef;if(s){const o=Array.from(s.children).find(a=>a.dataset&&a.dataset.prop===n);o&&o.scrollIntoView({behavior:"smooth",block:"nearest"})}})},frozenLeftHandle(t){const i=this.sortedTableColumns,l=i.splice(t,1)[0];if(l.fixed=l.fixed==="left"?"":"left",l.fixed==="left"){const n=this.findLastIndex(this.sortedTableColumns,s=>s.fixed==="left");i.splice(n+1,0,l)}else{const n=this.findLastIndex(this.sortedTableColumns,s=>s.fixed==="left");i.splice(n+1,0,l)}this.updateSortValues(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns)},frozenRightHandle(t){const i=this.sortedTableColumns,l=i.splice(t,1)[0];if(l.fixed=l.fixed==="right"?"":"right",l.fixed==="right"){const n=i.findIndex(s=>s.fixed==="right");n===-1?i.push(l):i.splice(n,0,l)}else{const n=i.findIndex(s=>s.fixed==="right");n===-1?i.push(l):i.splice(n,0,l)}this.updateSortValues(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns)},onSave(){var i;this.updateSortValues();const t=(i=this.tableColumns)==null?void 0:i.map(l=>{l.searchShow=!0;const n=this.sortedTableColumns.find(s=>s.prop===l.prop);return n&&(l.sort=n.sort,l.fixed=n.fixed,l.visible=n.visible),l});yt({key:this.computedTableKey,info:JSON.stringify({columnsConfig:t,defaultColumnsConfig:this.defaultColumnsConfig})}).then(l=>{l.data.code===200&&(this.processedColumns=this.applyColumnConfig(t,!0),this.$emit("complete",{columns:this.processedColumns,isInitialLoad:!1}),this.$message.success(this.t("saveSuccess")),this.popoverVisible=!1)})},updateSortValues(){this.sortedTableColumns.forEach((t,i)=>{t.sort=i})}},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 S<"u"&&S.utils&&(document.removeEventListener("mousemove",S.utils.throttleCall),document.removeEventListener("mouseup",S.utils.throttleCall))}catch{}}},Tt={key:0,class:"container"},wt={class:"main-container"},zt={class:"left-content"},Ft={class:"title"},Lt={class:"option-list"},Bt={style:{height:"100%","overflow-y":"auto"}},Et={class:"right-content"},Ot={class:"search-box"},Nt={key:0,class:"tips"},Mt={class:"sort-list",ref:"sortListRef"},Dt=["data-prop"],At={key:0,class:"sort-item"},Ht={class:"row-title"},Rt={class:"operation-btns"},It={class:"footer"},Pt={class:"footer-left"},Wt={class:"footer-right"},vt={style:{display:"inline-block","margin-left":"10px"}};function Ut(t,i,l,n,s,o){const a=e.resolveComponent("el-button"),h=e.resolveComponent("TmEllipsisText"),c=e.resolveComponent("el-checkbox"),d=e.resolveComponent("el-input"),f=e.resolveComponent("MoveIcon"),g=e.resolveComponent("DeleteIcon"),C=e.resolveComponent("el-tooltip"),y=e.resolveComponent("UploadIcon"),w=e.resolveComponent("FixedLeftIcon"),r=e.resolveComponent("FixedRightIcon"),_=e.resolveComponent("MenuIcon"),m=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(m,e.mergeProps({"popper-class":"column-config-popover"},{[s.isVue3?"visible":"value"]:s.popoverVisible},e.toHandlers({[s.isVue3?"update:visible":"input"]:o.handleVisibleChange}),{width:680,"show-arrow":!1,placement:s.placement,trigger:"click",onShow:o.handlePopoverShow,onHide:o.handlePopoverHide}),{reference:e.withCtx(()=>[e.createElementVNode("div",vt,[e.createVNode(C,e.mergeProps({content:s.t("columnSetting")},s.afterOpenDelay,{placement:"top"}),{default:e.withCtx(()=>[e.createVNode(a,{size:s.getDefaultSize(),ref:"operationRef",circle:""},{default:e.withCtx(()=>[e.createVNode(_)]),_:1},8,["size"])]),_:1},16,["content"])])]),default:e.withCtx(()=>[s.popoverVisible?(e.openBlock(),e.createElementBlock("div",Tt,[e.createElementVNode("div",wt,[e.createElementVNode("div",zt,[e.createElementVNode("div",Ft,[e.createElementVNode("span",null,e.toDisplayString(s.t("SelectableFields"))+"("+e.toDisplayString(s.tableColumns.length)+")",1),e.createVNode(a,e.mergeProps({style:{"margin-left":"10px"}},s.buttonType,{onClick:o.handleSelectAll}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("all")),1)]),_:1},16,["onClick"])]),e.createElementVNode("div",Lt,[e.createElementVNode("div",Bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tableColumns,(p,z)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.prop?(e.openBlock(),e.createElementBlock("div",{style:{width:"110px",display:"inline-block"},key:z+p.prop},[e.createVNode(c,{disabled:!p.cancellable,class:"el-checkbox",modelValue:p.visible,"onUpdate:modelValue":B=>p.visible=B,label:p.prop,value:p.prop},{default:e.withCtx(()=>[e.createVNode(h,{text:p.label},null,8,["text"])]),_:2},1032,["disabled","modelValue","onUpdate:modelValue","label","value"])])):e.createCommentVNode("",!0)],64))),256))])])]),e.createElementVNode("div",Et,[e.createElementVNode("div",Ot,[e.createVNode(d,{size:s.getCompatSize("small"),class:"search-input",clearable:"",placeholder:s.t("search"),modelValue:s.keyWord,"onUpdate:modelValue":i[0]||(i[0]=p=>s.keyWord=p)},null,8,["size","placeholder","modelValue"])]),o.showFixedLimitTips?(e.openBlock(),e.createElementBlock("div",Nt)):e.createCommentVNode("",!0),e.createElementVNode("div",Mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.sortedTableColumns,(p,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sort-item-wrapper",[p.fixed==="left"?"frozen":"",p.fixed==="right"?"frozenRight":"",p.fixed?"":"noFrozen"]]),"data-prop":p.prop,key:p.prop},[p.visible&&p.searchShow!==!1?(e.openBlock(),e.createElementBlock("div",At,[e.createElementVNode("div",Ht,[e.createVNode(f,{style:{"flex-shrink":"0"}}),e.createVNode(h,{text:p.label},null,8,["text"])]),e.createElementVNode("div",Rt,[p.cancellable?(e.openBlock(),e.createBlock(C,e.mergeProps({key:0,content:s.t("cancel"),placement:"top"},{ref_for:!0},s.afterOpenDelay),{default:e.withCtx(()=>[e.createVNode(a,e.mergeProps({ref_for:!0},s.buttonType,{size:s.getCompatSize("mini"),class:"iconfont-button delete-button",onClick:B=>p.visible=!1}),{default:e.withCtx(()=>[e.createVNode(g)]),_:2},1040,["size","onClick"])]),_:2},1040,["content"])):e.createCommentVNode("",!0),o.canMoveTop(p,z)?(e.openBlock(),e.createBlock(C,e.mergeProps({key:1,content:s.t("top"),placement:"top"},{ref_for:!0},s.afterOpenDelay),{default:e.withCtx(()=>[e.createVNode(a,e.mergeProps({ref_for:!0},s.buttonType,{size:s.getCompatSize("mini"),class:"iconfont-button top-button",onClick:B=>o.moveTop(p,z)}),{default:e.withCtx(()=>[e.createVNode(y)]),_:2},1040,["size","onClick"])]),_:2},1040,["content"])):e.createCommentVNode("",!0),p.fixed!=="right"?(e.openBlock(),e.createBlock(C,e.mergeProps({key:2,content:p.fixed==="left"?s.t("cancelLeftFixed"):s.t("leftFixed"),placement:"top"},{ref_for:!0},s.afterOpenDelay),{default:e.withCtx(()=>[e.createVNode(a,e.mergeProps({ref_for:!0},s.buttonType,{size:s.getCompatSize("mini"),class:["iconfont-button left-fixed-btn",{"active-fixed":p.fixed==="left"}],onClick:B=>o.frozenLeftHandle(z),disabled:p.fixed!=="left"&&o.isThanMaxFrozen}),{default:e.withCtx(()=>[e.createVNode(w)]),_:2},1040,["size","class","onClick","disabled"])]),_:2},1040,["content"])):e.createCommentVNode("",!0),p.fixed!=="left"?(e.openBlock(),e.createBlock(C,e.mergeProps({key:3,content:p.fixed==="right"?s.t("cancelRightFixed"):s.t("rightFixed"),placement:"top"},{ref_for:!0},s.afterOpenDelay),{default:e.withCtx(()=>[e.createVNode(a,e.mergeProps({ref_for:!0},s.buttonType,{size:s.getCompatSize("mini"),class:["iconfont-button right-fixed-btn",{"active-fixed":p.fixed==="right"}],onClick:B=>o.frozenRightHandle(z),disabled:p.fixed!=="right"&&o.isThanMaxRightFrozen}),{default:e.withCtx(()=>[e.createVNode(r)]),_:2},1040,["size","class","onClick","disabled"])]),_:2},1040,["content"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],10,Dt))),128))],512)])]),e.createElementVNode("div",It,[e.createElementVNode("div",Pt,[e.createVNode(a,{size:s.getCompatSize("mini"),onClick:o.handleRestoreDefault},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("restoreDefault")),1)]),_:1},8,["size","onClick"])]),e.createElementVNode("div",Wt,[e.createVNode(a,{size:s.getCompatSize("mini"),onClick:i[1]||(i[1]=p=>s.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("cancel")),1)]),_:1},8,["size"]),e.createVNode(a,{size:s.getCompatSize("mini"),type:"primary",onClick:o.onSave},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("saveAndApply")),1)]),_:1},8,["size","onClick"])])])])):e.createCommentVNode("",!0)]),_:1},16,["placement","onShow","onHide"])}const jt=b(St,[["render",Ut],["__scopeId","data-v-92bf8b2f"]]),Jt=!1,Kt=!0,Qt={name:"TmTable",components:{TableSearch:U,TablePagination:dt,TableMenu:gt,ColumnConfig:jt,RefreshIcon:pe,ColumnRenderer:{props:["vnode"],render(){return this.vnode}}},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:()=>({})}},data(){return{getDefaultSize:V,getCompatSize:F,isVue3:Kt,isVue2:Jt,t:x().t,tableData:[],tableLoading:!1,columnsLoading:!1,tableReload:1,tableHeight:null,selectedRows:[],paginationInfo:{current:1,pageSize:20,total:void 0},originalColumns:[],displayColumns:[],isColumnConfigLoaded:!1,afterOpenDelay:{"show-after":300}}},computed:{pageLoading(){return this.tableLoading||this.columnsLoading},computedTableKey(){return this.tableKey?this.tableKey:this.$route.path.slice(1).replace(/\//g,"-")},computedShowPagination(){return this.showPagination&&typeof this.data=="function"}},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()}}},created(){this.originalColumns=this.$slots.default(),this.columnSettingButton?this.columnsLoading=!0:(this.displayColumns=this.originalColumns,this.isColumnConfigLoaded=!0)},mounted(){this.getTableHeight(),window.addEventListener("resize",this.getTableHeight)},beforeDestroy(){window.removeEventListener("resize",this.getTableHeight)},methods:{handleUpdateSearchForm(t){this.$emit("update:search-form",t)},handleColumnConfigComplete(t){Array.isArray(t.columns)?this.displayColumns=[...t.columns]:this.displayColumns=[...this.originalColumns],t.isInitialLoad?(this.isColumnConfigLoaded=!0,this.columnsLoading=!1,this.firstLoad&&typeof this.data=="function"&&this.loadData()):this.reloadTable()},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:i,total:l,pageSize:n,current:s}=t;this.tableData=i,l!==void 0&&(this.paginationInfo.total=l),s!==void 0&&(this.paginationInfo.current=s),n!==void 0&&(this.paginationInfo.pageSize=n)}catch{}finally{this.tableLoading=!1}}},getTableHeight(){this.isAutoHeight()?this.$nextTick(()=>{const t=this.$refs.table,i=this.$refs.tmPagination;if(!t)return;const l=t.$el,n=i&&i.$el&&i.$el.offsetHeight||0;this.tableHeight=document.documentElement.clientHeight-l.offsetTop-n-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++}}},$t={class:"tm-table",ref:"tablePage"};function qt(t,i,l,n,s,o){const a=e.resolveComponent("table-search"),h=e.resolveComponent("RefreshIcon"),c=e.resolveComponent("el-button"),d=e.resolveComponent("el-tooltip"),f=e.resolveComponent("ColumnConfig"),g=e.resolveComponent("table-menu"),C=e.resolveComponent("columnRenderer"),y=e.resolveComponent("el-table"),w=e.resolveComponent("table-pagination"),r=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",$t,[l.searchColumns&&l.searchColumns.length>0?(e.openBlock(),e.createBlock(a,{key:0,ref:"search",onSearch:o.search,onReset:o.reset,"onUpdate:searchForm":o.handleUpdateSearchForm,disabled:o.pageLoading,"search-columns":l.searchColumns,"search-form":l.searchForm},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"search")]),_:3},8,["onSearch","onReset","onUpdate:searchForm","disabled","search-columns","search-form"])):e.createCommentVNode("",!0),l.showMenu?(e.openBlock(),e.createBlock(g,{key:1},{left:e.withCtx(()=>[e.renderSlot(t.$slots,"menu-left")]),right:e.withCtx(()=>[e.renderSlot(t.$slots,"menu-right"),l.refreshButton&&typeof l.data=="function"?(e.openBlock(),e.createBlock(d,e.mergeProps({key:0,content:s.t("refresh"),placement:"top"},s.afterOpenDelay),{default:e.withCtx(()=>[e.createVNode(c,{onClick:o.handleRefresh,circle:"",size:s.getDefaultSize()},{default:e.withCtx(()=>[e.createVNode(h)]),_:1},8,["onClick","size"])]),_:1},16,["content"])):e.createCommentVNode("",!0),l.columnSettingButton?(e.openBlock(),e.createBlock(f,{key:1,maxFixedLeftQuantity:l.maxFixedLeftQuantity,maxFixedRightQuantity:l.maxFixedRightQuantity,tableKey:o.computedTableKey,columns:s.originalColumns,onComplete:o.handleColumnConfigComplete},null,8,["maxFixedLeftQuantity","maxFixedRightQuantity","tableKey","columns","onComplete"])):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(y,e.mergeProps({ref:"table"},{...t.$attrs,border:l.border},e.toHandlers(s.isVue2?t.$listeners:{}),{data:s.tableData,height:s.tableHeight,size:s.getCompatSize("mini"),onSelectionChange:o.handleSelectionChange,key:s.tableReload}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.displayColumns,_=>(e.openBlock(),e.createBlock(C,{vnode:_,key:s.isVue3?_.id:_.data.attrs.prop},null,8,["vnode"]))),128))]),_:1},16,["data","height","size","onSelectionChange"])),[[r,o.pageLoading]]),o.computedShowPagination?(e.openBlock(),e.createBlock(w,{key:2,ref:"tmPagination","page-size":s.paginationInfo.pageSize,"current-page":s.paginationInfo.current,total:s.paginationInfo.total,disabled:s.tableLoading,onSizeChange:o.handleSizeChange,onCurrentChange:o.handleCurrentChange},null,8,["page-size","current-page","total","disabled","onSizeChange","onCurrentChange"])):e.createCommentVNode("",!0)],512)}const K=b(Qt,[["render",qt]]),Gt=!1,Yt=!0,Xt={name:"TmTableColumn",inheritAttrs:!1,computed:{isVisible(){return this.$attrs.visible!==!1},slots(){return this.$slots}},data(){return{isVue2:Gt,isVue3:Yt}},created(){this.$parent&&this.$parent.$emit&&this.$parent.$emit("column-initialized",{prop:this.$attrs.prop,visible:this.$attrs.visible!==!1})}};function Zt(t,i,l,n,s,o){const a=e.resolveComponent("el-table-column");return o.isVisible?(e.openBlock(),e.createBlock(a,e.mergeProps({key:0},t.$attrs,e.toHandlers(s.isVue2?t.$listeners:{})),e.createSlots({_:2},[e.renderList(o.slots,(h,c)=>({name:c,fn:e.withCtx(d=>[e.renderSlot(t.$slots,c,e.normalizeProps(e.guardReactiveProps(d)))])}))]),1040)):e.createCommentVNode("",!0)}const Q=b(Xt,[["render",Zt]]),{t:$}=x(),el={name:"TmAdvancedEllipsisText",components:{CopyIcon:Y},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:!1,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($("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($("copySuccess"))}catch{this.$message.error($("copyFailed"))}document.body.removeChild(t)},getTextContent(){if(this.$slots.default){const t=this.$slots.default;return t().map(i=>typeof i.children=="string"?i.children:Array.isArray(i.children)?i.children.map(l=>l.children||"").join(""):"").join("")}return this.text||""},calculateLineHeight(){const t=this.$refs.containerRef;if(!t)return;const i=window.getComputedStyle(t);this.containerWidth=t.offsetWidth;const l=this.$refs.measureRef;if(l){this.setMeasureElementStyle(l,{width:this.containerWidth+"px",wordBreak:"break-all",whiteSpace:"normal"}),l.textContent="测",l.offsetHeight;const n=l.offsetHeight;l.innerHTML="",this.lineHeight=n}else{const n=i.lineHeight;if(n&&n!=="normal")this.lineHeight=parseInt(n);else{const s=parseInt(i.fontSize);this.lineHeight=s*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 i=this.lineHeight;if(this.getTextHeight(t)<=i)this.frontLines=[],this.lastLineText=t,this.isLastLineEllipsis=this.checkIfTextOverflows(t);else{const n=this.lineHeight*(this.rows-1),s=this.findTextForHeight(t,n);this.frontLines=this.splitTextToLines(s);const o=t.substring(s.length);this.lastLineText=o,this.isLastLineEllipsis=o.length>0&&this.checkIfTextOverflows(o)}}this.isCalculating=!1},findTextForHeight(t,i){if(this.getTextHeight(t)<=i)return t;let l=0,n=t.length,s="";for(;l<=n;){const o=Math.floor((l+n)/2),a=t.substring(0,o);this.getTextHeight(a)<=i?(s=a,l=o+1):n=o-1}return s},splitTextToLines(t){if(!t)return[];const i=[];let l=t;for(;l.length>0;){const n=this.findTextForHeight(l,this.lineHeight);if(n.length===0)break;i.push(n),l=l.substring(n.length)}return i},checkIfTextOverflows(t){if(!t)return!1;const i=this.getTextWidth(t),l=this.shouldShowToolbar&&this.hasToolbarContent?this.getToolbarWidth():0,n=this.containerWidth-l-5;return i>n},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,i={}){if(!this.$refs.containerRef||!this.$refs.measureRef)return 0;const l=this.$refs.measureRef,n=l.style.cssText;this.setMeasureElementStyle(l,i),l.textContent=t,l.offsetHeight;const s=i.whiteSpace==="nowrap"?l.offsetWidth:l.offsetHeight;return l.style.cssText=n,l.innerHTML="",s},setMeasureElementStyle(t,i={}){const l=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=l.fontSize,t.style.fontFamily=l.fontFamily,t.style.fontWeight=l.fontWeight,t.style.lineHeight=l.lineHeight,t.style.letterSpacing=l.letterSpacing,t.style.wordSpacing=l.wordSpacing,t.style.padding="0",t.style.margin="0",t.style.border="none",t.style.boxSizing="border-box",Object.entries(i).forEach(([n,s])=>{t.style[n]=s})},handleMouseEnter(){this.isHovered=!0},handleMouseLeave(){this.isHovered=!1},setupResizeObserver(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(t=>{const i=t[0];if(i){const l=i.contentRect.width;Math.abs(l-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)}}},tl={class:"tm-ellipsis-text-wrapper"},ll=["innerHTML"],il={class:"tm-ellipsis-last-line"},sl=["innerHTML"],ol={key:0,class:"tm-ellipsis-toolbar-part"},nl={key:1,class:"tm-ellipsis-text-wrapper"},al=["innerHTML"],rl={class:"tm-ellipsis-last-line"},cl=["innerHTML"],dl={key:0,class:"tm-ellipsis-toolbar-part"},hl={ref:"measureRef",class:"tm-ellipsis-measure"};function pl(t,i,l,n,s,o){const a=e.resolveComponent("CopyIcon"),h=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("div",{ref:"containerRef",style:e.normalizeStyle(o.containerStyle),class:"tm-ellipsis-text",onMouseenter:i[0]||(i[0]=(...c)=>o.handleMouseEnter&&o.handleMouseEnter(...c)),onMouseleave:i[1]||(i[1]=(...c)=>o.handleMouseLeave&&o.handleMouseLeave(...c))},[l.showTooltip&&s.isLastLineEllipsis?(e.openBlock(),e.createBlock(h,e.mergeProps({key:0,content:s.originalText,disabled:!l.showTooltip||!s.isLastLineEllipsis},{[s.isVue2?"open-delay":"show-after"]:300},{placement:"top"}),{default:e.withCtx(()=>[e.createElementVNode("div",tl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.frontLines,(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:"front-"+d,class:"tm-ellipsis-line",innerHTML:c},null,8,ll))),128)),e.createElementVNode("div",il,[e.createElementVNode("div",{class:"tm-ellipsis-text-part",innerHTML:s.lastLineText},null,8,sl),o.shouldShowToolbar&&o.hasToolbarContent?(e.openBlock(),e.createElementBlock("div",ol,[l.copyable?(e.openBlock(),e.createBlock(a,{key:0,class:"icon-item",onClick:o.handleCopy},null,8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"toolbar",{},void 0,!0)])):e.createCommentVNode("",!0)])])]),_:3},16,["content","disabled"])):(e.openBlock(),e.createElementBlock("div",nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.frontLines,(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:"front-"+d,class:"tm-ellipsis-line",innerHTML:c},null,8,al))),128)),e.createElementVNode("div",rl,[e.createElementVNode("div",{class:"tm-ellipsis-text-part",innerHTML:s.lastLineText},null,8,cl),o.shouldShowToolbar&&o.hasToolbarContent?(e.openBlock(),e.createElementBlock("div",dl,[l.copyable?(e.openBlock(),e.createBlock(a,{key:0,class:"icon-item",onClick:o.handleCopy},null,8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"toolbar",{},void 0,!0)])):e.createCommentVNode("",!0)])])),e.createElementVNode("div",hl,null,512)],36)}const q=b(el,[["render",pl],["__scopeId","data-v-16643222"]]),ml={install:{install(t,i={}){[K,Q,L,q].forEach(l=>t.component(l.name,l)),i.tableConfigProvider&&Ct(i.tableConfigProvider)}}.install,Table:K,Column:Q,Search:U,Select:D,AdvancedInput:H,AdvancedDate:R,Cascader:I,Radio:P,Checkbox:W,Switch:v,EllipsisText:L,AdvancedEllipsisText:q,setLang:N,useLocale:x};u.AdvancedDate=R,u.AdvancedEllipsisText=q,u.AdvancedInput=H,u.Cascader=I,u.Checkbox=W,u.Column=Q,u.EllipsisText=L,u.Radio=P,u.Search=U,u.Select=D,u.Switch=v,u.Table=K,u.default=ml,u.setLang=N,u.useLocale=x,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(u,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("sortablejs")):typeof define=="function"&&define.amd?define(["exports","vue","sortablejs"],e):(u=typeof globalThis<"u"?globalThis:u||self,e(u.TmTable={},u.Vue,u.Sortable))})(this,function(u,e,S){"use strict";const G={mini:"small",small:"small",default:"default",large:"large"},F=t=>G[t]||G.default,V=()=>"default",X={"zh-CN":{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:"复制失败"},"en-US":{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"}};let E={value:"zh-CN"};E=e.ref("zh-CN");const Z=t=>{var i;return((i=X[E.value])==null?void 0:i[t])||t},N=t=>{E.value=t},x=()=>({t:Z,setLang:N,currentLang:E}),b=(t,i)=>{const l=t.__vccOpts||t;for(const[n,s]of i)l[n]=s;return l},ee=!1,te=!0,M="modelValue",le="update:modelValue",ie={name:"TmSelectFilter",props:{[M]:{type:[String,Number,Array],default:""},field:{type:[String,Number],default:""},options:{type:[Array,Function],default:()=>[]},labelOptions:{type:Array,default:()=>[]},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:""}},data(){return{t:x().t,isVue2:ee,isVue3:te,getDefaultSize:V,optionsList:[],loading:!1,indeterminate:!1,checkAll:!1,activedSelect:""}},computed:{computedValue:{get(){return this[M]},set(t){this.$emit(le,t),this.$emit("change",t)}},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}},propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}}},watch:{[M](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:{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 i=[];t&&(i=this.optionsList.map(l=>l[this.propMap.value])),this.computedValue=i},setActivedSelect(t){this.activedSelect=t}}},se={key:0,class:"check-all-option"};function oe(t,i,l,n,s,o){const a=e.resolveComponent("el-option"),h=e.resolveComponent("el-select"),c=e.resolveComponent("el-checkbox");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["advanced-select",{hasField:l.labelOptions&&l.labelOptions.length>0}])},[l.labelOptions&&l.labelOptions.length>0?(e.openBlock(),e.createBlock(h,{key:0,size:s.getDefaultSize(),class:e.normalizeClass(["field-select",`field-select--${s.isVue2?"v2":"v3"}`]),modelValue:o.fieldValue,"onUpdate:modelValue":i[0]||(i[0]=d=>o.fieldValue=d),onFocus:i[1]||(i[1]=d=>o.setActivedSelect("left")),style:e.normalizeStyle(`z-index:${s.activedSelect==="left"?2:0}`)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.labelOptions,d=>(e.openBlock(),e.createBlock(a,{key:d.value,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["size","class","modelValue","style"])):e.createCommentVNode("",!0),e.createVNode(h,e.mergeProps({ref:"select",class:["select",`select--${s.isVue3?"v3":"v2"}`],onFocus:i[4]||(i[4]=d=>o.setActivedSelect("right")),style:`z-index:${s.activedSelect==="right"?2:0}`,modelValue:o.computedValue,"onUpdate:modelValue":i[5]||(i[5]=d=>o.computedValue=d)},{...t.$attrs,size:s.getDefaultSize(),filterable:l.filterable,clearable:l.clearable,collapseTags:l.collapseTags,multiple:l.multiple,placeholder:l.placeholder,loading:s.loading},e.toHandlers(s.isVue2?t.$listeners:{}),{loading:s.loading}),{header:e.withCtx(()=>[s.isVue3&&l.multiple&&l.showCheckAll?(e.openBlock(),e.createBlock(c,{key:0,modelValue:s.checkAll,"onUpdate:modelValue":i[3]||(i[3]=d=>s.checkAll=d),indeterminate:s.indeterminate,size:s.getDefaultSize(),onChange:o.handleCheckAll,style:{width:"100%",height:"20px","padding-left":"10px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("all")),1)]),_:1},8,["modelValue","indeterminate","size","onChange"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[s.isVue2&&l.multiple&&l.showCheckAll?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(c,{style:{width:"100%"},modelValue:s.checkAll,"onUpdate:modelValue":i[2]||(i[2]=d=>s.checkAll=d),indeterminate:s.indeterminate,size:s.getDefaultSize(),onChange:o.handleCheckAll},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("all")),1)]),_:1},8,["modelValue","indeterminate","size","onChange"])])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.optionsList,d=>(e.openBlock(),e.createBlock(a,{key:d[o.propMap.value],label:d[o.propMap.label],value:d[o.propMap.value],disabled:d.disabled},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"option",{item:d},()=>[e.createTextVNode(e.toDisplayString(d[o.propMap.label]),1)],!0)]),_:2},1032,["label","value","disabled"]))),128))],!0)]),_:3},16,["class","style","modelValue","loading"])],2)}const D=b(ie,[["render",oe],["__scopeId","data-v-7a60f352"]]),ne={name:"BaseIcon",props:{path:{type:String},size:{type:[String,Number]},color:{type:String}},methods:{handleClick(){}}},ae=["width","height"],re=["d"];function ce(t,i,l,n,s,o){return e.openBlock(),e.createElementBlock("i",{class:"tm-icon",onClick:i[0]||(i[0]=(...a)=>o.handleClick&&o.handleClick(...a))},[(e.openBlock(),e.createElementBlock("svg",{width:l.size,height:l.size,style:e.normalizeStyle({color:l.color}),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:l.path},null,8,re)],12,ae))])}const de=b(ne,[["render",ce],["__scopeId","data-v-1c30ca93"]]),k=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,[i,l])=>{const n=`${i}Icon`,s={name:n,props:{path:{type:String,default:l},size:{type:[String,Number]},color:{type:String}},render(o){return e.h(de,this.$props)}};return s.install=o=>{o.component(n,s)},t[i]=s,t},{}),he=k.menu,pe=k.refresh,me=k.move;k["column-setting"];const ue=k.more,fe=k["fixed-left"],ge=k["fixed-right"],be=k.upload,ye=k.download,Ce=k.delete,Y=k.copy,{t:A}=x(),ke=!1,Ve=!0,xe={name:"TmEllipsisText",components:{CopyIcon:Y},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}},data(){return{isVue2:ke,isVue3:Ve,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,i=typeof this.maxWidth=="number"?`${this.maxWidth}px`:this.maxWidth;return{width:t,maxWidth:i,lineHeight:this.lineHeight,display:"-webkit-inline-box",overflow:"hidden",WebkitBoxOrient:"vertical",WebkitLineClamp:this.lines}}},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 d;const t=this.$refs.textEl;if(!t)return;const i=getComputedStyle(t);if(!i.width||i.width==="0px"){this.$nextTick(()=>{this.performOverflowCheck()});return}const l=t.scrollHeight,n=t.scrollWidth,s=t.clientHeight,o=t.clientWidth,a=1,h=l>s+a,c=n>o+a;if(h||c){this.isOverflow=!0;const f=parseFloat(i.lineHeight)||16;this.currentLines=Math.ceil(l/f)}else{const f=t.getBoundingClientRect(),g=(d=t.parentElement)==null?void 0:d.getBoundingClientRect();if(g){const C=f.height>g.height||f.width>g.width;this.isOverflow=C}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(A("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(A("copySuccess"))}catch{this.$message.error(A("copyFailed"))}document.body.removeChild(t)}}},_e={class:"ellipsis-text-container"};function Se(t,i,l,n,s,o){const a=e.resolveComponent("CopyIcon"),h=e.resolveComponent("el-tooltip");return e.openBlock(),e.createBlock(h,e.mergeProps({disabled:o.tooltipDisabled,content:l.text,effect:"dark",placement:"top"},{[s.isVue2?"open-delay":"show-after"]:300}),{default:e.withCtx(()=>[e.createElementVNode("div",_e,[e.createElementVNode("div",{ref:"textEl",class:"ellipsis-text",style:e.normalizeStyle(o.textStyle)},e.toDisplayString(l.text),5),e.createElementVNode("div",{class:e.normalizeClass(["toolbar",{multiline:s.currentLines>1&&l.lines>1}])},[l.copyable?(e.openBlock(),e.createBlock(a,{key:0,class:"icon-item",onClick:o.handleCopy},null,8,["onClick"])):e.createCommentVNode("",!0)],2)])]),_:1},16,["disabled","content"])}const L=b(xe,[["render",Se],["__scopeId","data-v-a2647731"]]),Te=!1,we=!0,ze={name:"TmAdvancedInputFilter",components:{MoreIcon:ue,EllipsisText:L},props:{label:{type:String,default:""},value:{type:String,default:""},field:{type:[String,Number],default:""},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},labelOptions:{type:Array,default:()=>[]}},data(){return{t:x().t,isVue3:we,isVue2:Te,getDefaultSize:V,getCompatSize:F,exactValue:"",inputValue:"",isExactMode:!1,currentOptionMultiple:!1}},computed:{width(){return this.labelOptions&&this.labelOptions.length||this.label?"305px":"200px"},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}},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:{labelOptions:{handler(t){t&&t.length>0&&(this.field||this.$emit("field-change",t[0].value),this.updateCurrentOptionMultiple())},deep:!0,immediate:!0},field:{handler(){this.updateCurrentOptionMultiple()},immediate:!0},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()}},Fe={key:1,class:"input-label"},Le={class:"popover-content"},Be={class:"popover-subtitle"},Ee={class:"popover-footer"};function Oe(t,i,l,n,s,o){const a=e.resolveComponent("el-option"),h=e.resolveComponent("el-select"),c=e.resolveComponent("EllipsisText"),d=e.resolveComponent("el-input"),f=e.resolveComponent("el-button"),g=e.resolveComponent("MoreIcon"),C=e.resolveComponent("el-popover");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tm-advanced-input",`tm-advanced-input--${s.isVue3?"v3":"v2"}`]),style:e.normalizeStyle({width:o.width})},[l.labelOptions&&l.labelOptions.length?(e.openBlock(),e.createBlock(h,{key:0,modelValue:o.fieldValue,"onUpdate:modelValue":i[0]||(i[0]=y=>o.fieldValue=y),placeholder:s.t("selectPlaceholder"),style:{width:"100px","flex-shrink":"0"},size:s.getDefaultSize(),class:"left-select",onChange:o.handlefieldChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.labelOptions,y=>(e.openBlock(),e.createBlock(a,{key:y.value,label:y.label,value:y.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","size","onChange"])):l.label?(e.openBlock(),e.createElementBlock("div",Fe,[e.createVNode(c,{text:l.label,lines:2},null,8,["text"])])):e.createCommentVNode("",!0),e.createVNode(d,{modelValue:s.inputValue,"onUpdate:modelValue":i[2]||(i[2]=y=>s.inputValue=y),size:s.getDefaultSize(),placeholder:l.placeholder,onKeyup:e.withKeys(o.handleEnter,["enter","native"]),clearable:"",class:e.normalizeClass(["right-input",{"has-label":l.labelOptions&&l.labelOptions.length}])},{default:e.withCtx(()=>[o.shouldShowMultiple?(e.openBlock(),e.createBlock(C,e.mergeProps({key:0,slot:"append"},{[s.isVue3?"visible":"value"]:s.isExactMode,placement:"bottom-end",width:240,trigger:"click"},e.toHandlers({[s.isVue3?"update:visible":"input"]:o.handleVisibleChange})),{reference:e.withCtx(()=>[e.createVNode(g,{style:{cursor:"pointer"}})]),default:e.withCtx(()=>[e.createElementVNode("div",Le,[e.createElementVNode("p",Be,e.toDisplayString(s.t("accurateSearchTips")),1),e.createVNode(d,{size:s.getDefaultSize(),type:"textarea",rows:8,modelValue:s.exactValue,"onUpdate:modelValue":i[1]||(i[1]=y=>s.exactValue=y),placeholder:s.t("accurateSearchPlaceholder"),style:{"font-size":"12px"}},null,8,["size","modelValue","placeholder"]),e.createElementVNode("div",Ee,[e.createVNode(f,{style:{float:"left"},size:s.getCompatSize("mini"),onClick:o.handleClear},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("clear")),1)]),_:1},8,["size","onClick"]),e.createVNode(f,{size:s.getCompatSize("mini"),onClick:o.handlePopoverClose},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("cancel")),1)]),_:1},8,["size","onClick"]),e.createVNode(f,{type:"primary",size:s.getCompatSize("mini"),onClick:o.handleExactSearch},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("search")),1)]),_:1},8,["size","onClick"])])])]),_:1},16)):e.createCommentVNode("",!0)]),_:1},8,["modelValue","size","placeholder","onKeyup","class"])],6)}const H=b(ze,[["render",Oe],["__scopeId","data-v-e5c28c62"]]),{t:T}=x(),Ne=!1,Me=!0,De={name:"TmAdvancedDateFilter",props:{value:{type:Array,default:()=>[]},field:{type:[String,Number],default:""},start:{type:[String,Number],default:""},end:{type:[String,Number],default:""},size:{type:String,default:"mini"},labelOptions:{type:Array,default:()=>[]},type:{type:String,default:"daterange"},format:{type:String,default:""},startPlaceholder:{type:String,default:void 0},endPlaceholder:{type:String,default:void 0},disabledDate:{type:Function,default:t=>t.getTime()>Date.now()}},computed:{computedFormat(){const t="YYYY",i="DD";return this.format?this.format:this.type==="year"?t:this.type==="month"?`${t}-MM`:this.type==="date"?`${t}-MM-${i}`:this.type==="dates"?`${t}-MM-${i}`:this.type==="months"?`${t}-MM`:this.type==="years"?t:this.type==="week"?`${t}-MM-WW`:this.type==="datetime"?`${t}-MM-${i} HH:mm:ss`:this.type==="datetimerange"?`${t}-MM-${i} HH:mm:ss`:this.type==="daterange"?`${t}-MM-${i}`:this.type==="monthrange"?`${t}-MM`:""},computedPickerOptions(){return{shortcuts:[{text:T("today"),onClick(t){const i=new Date,l=new Date;t.$emit("pick",[l,i])}},{text:T("yesterday"),onClick(t){const i=new Date,l=new Date;l.setTime(l.getTime()-3600*1e3*24),i.setTime(i.getTime()-3600*1e3*24),t.$emit("pick",[l,i])}},{text:T("last7days"),onClick(t){const i=new Date,l=new Date;l.setTime(l.getTime()-3600*1e3*24*7),t.$emit("pick",[l,i])}},{text:T("last30days"),onClick(t){const i=new Date,l=new Date;l.setTime(l.getTime()-3600*1e3*24*30),t.$emit("pick",[l,i])}},{text:T("thisMonth"),onClick(t){const i=new Date,l=new Date;l.setDate(1),t.$emit("pick",[l,i])}},{text:T("lastMonth"),onClick(t){const i=new Date,l=new Date;l.setMonth(l.getMonth()-1),l.setDate(1),i.setDate(0),t.$emit("pick",[l,i])}}]}},dateValue:{get(){return this.start||this.end?[this.start,this.end]:this.value},set(t){this.$emit("value-change",t),this.$emit("start-change",t),this.$emit("end-change",t)}},fieldValue:{get(){return this.field},set(t){this.$emit("field-change",t)}}},data(){return{t:T,isVue2:Ne,isVue3:Me,getDefaultSize:V}},watch:{labelOptions:{handler(t){t.length>0&&!this.field&&this.$emit("field-change",t[0].value)},deep:!0,immediate:!0}}};function Ae(t,i,l,n,s,o){const a=e.resolveComponent("el-option"),h=e.resolveComponent("el-select"),c=e.resolveComponent("el-date-picker");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tm-date-picker",`tm-date-picker--${s.isVue3?"v3":"v2"}`])},[e.createVNode(h,{modelValue:o.fieldValue,"onUpdate:modelValue":i[0]||(i[0]=d=>o.fieldValue=d),size:s.getDefaultSize(),style:{width:"100px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.labelOptions,d=>(e.openBlock(),e.createBlock(a,{key:d.value,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"]),e.createVNode(c,{modelValue:o.dateValue,"onUpdate:modelValue":i[1]||(i[1]=d=>o.dateValue=d),type:"daterange",size:s.getDefaultSize(),"range-separator":"-","start-placeholder":l.startPlaceholder===void 0?s.t("startDate"):l.startPlaceholder,"end-placeholder":l.endPlaceholder===void 0?s.t("endDate"):l.endPlaceholder,"picker-options":o.computedPickerOptions,style:{width:"206px"},format:o.computedFormat,"value-format":o.computedFormat},null,8,["modelValue","size","start-placeholder","end-placeholder","picker-options","format","value-format"])],2)}const R=b(De,[["render",Ae],["__scopeId","data-v-3cd3ede3"]]),He=!1,Re={name:"TmCascaderFilter",props:{value:{type:[String,Number,Array],default:""},options:{type:[Array,Function],default:()=>[]},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:""}},data(){return{isVue2:He,getDefaultSize:V,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{...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 i=await t();Array.isArray(i)&&(this.optionsList=i)}catch(i){console.error(i)}finally{this.loading=!1}else Array.isArray(t)&&(this.optionsList=t)}}};function Ie(t,i,l,n,s,o){const a=e.resolveComponent("el-cascader");return e.openBlock(),e.createBlock(a,e.mergeProps({ref:"cascader",class:["tm-cascader",`tm-cascader--${s.isVue2?"v2":"v3"}`],modelValue:s.selectedValue,"onUpdate:modelValue":i[0]||(i[0]=h=>s.selectedValue=h),style:{width:"200px"}},{...t.$attrs,size:s.getDefaultSize(),filterable:l.filterable,clearable:l.clearable,collapseTags:l.collapseTags,collapseTagsTooltip:l.collapseTagsTooltip,props:o.cascaderProps,placeholder:l.placeholder,options:s.optionsList,loading:s.loading},e.toHandlers(s.isVue2?t.$listeners:{})),{default:e.withCtx(({node:h,data:c})=>[e.renderSlot(t.$slots,"default",{node:h,data:c},()=>[e.createElementVNode("span",null,e.toDisplayString(c[o.propMap.label]),1)])]),_:3},16,["class","modelValue"])}const I=b(Re,[["render",Ie]]),Pe=!1,We=!0,ve={name:"TmRadioFilter",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}},data(){return{isVue2:Pe,isVue3:We,getDefaultSize:V,selectedValue:this.value,optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}},hasWideOptions(){return this.optionsList.length>4},calculateItemWidth(){if(!this.optionsList.length)return{};const i=`${(this.hasWideOptions?305:200)/this.optionsList.length}px`;return{width:i,flex:`0 0 ${i}`}}},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 i=await t();Array.isArray(i)&&(this.optionsList=i)}catch(i){console.error(i)}finally{this.loading=!1}else Array.isArray(t)&&(this.optionsList=t)}}};function Ue(t,i,l,n,s,o){const a=e.resolveComponent("el-radio-button"),h=e.resolveComponent("el-radio-group");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tm-radio",{"wide-mode":o.hasWideOptions,"tm-radio--v3":s.isVue3,"tm-radio--v2":s.isVue2}])},[e.createVNode(h,e.mergeProps({ref:"radioGroup",modelValue:s.selectedValue,"onUpdate:modelValue":i[0]||(i[0]=c=>s.selectedValue=c)},{...t.$attrs,size:s.getDefaultSize()},e.toHandlers(s.isVue2?t.$listeners:{})),{default:e.withCtx(()=>[t.$slots.default?e.renderSlot(t.$slots,"default",{key:0},void 0,!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(s.optionsList,c=>(e.openBlock(),e.createBlock(a,e.mergeProps({ref_for:!0},{[s.isVue3?"value":"label"]:c[o.propMap.value],disabled:c.disabled,style:o.calculateItemWidth},{key:c[o.propMap.value]}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"option",{item:c},()=>[e.createTextVNode(e.toDisplayString(c[o.propMap.label]),1)],!0)]),_:2},1040))),128))]),_:3},16,["modelValue"])],2)}const P=b(ve,[["render",Ue],["__scopeId","data-v-61fed13d"]]),je=!1,Je=!0,Ke={name:"TmCheckboxFilter",props:{value:{type:Array,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}},data(){return{isVue2:je,isVue3:Je,getDefaultSize:V,selectedValue:this.value||[],optionsList:[],loading:!1}},computed:{propMap(){return{label:this.props.label||"label",value:this.props.value||"value"}},hasWideOptions(){return this.optionsList.length>4},calculateItemWidth(){if(!this.optionsList.length)return{};const t=Math.ceil(this.optionsList.length/(this.hasWideOptions?6:4)),i=Math.ceil(this.optionsList.length/t),n=`${(this.hasWideOptions?305:200)/i}px`;return{width:n,flex:`0 0 ${n}`}}},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 i=await t();Array.isArray(i)&&(this.optionsList=i)}catch(i){console.error(i)}finally{this.loading=!1}else Array.isArray(t)&&(this.optionsList=t)}}};function Qe(t,i,l,n,s,o){const a=e.resolveComponent("el-checkbox-button"),h=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tm-checkbox",{"wide-mode":o.hasWideOptions,"tm-checkbox--v3":s.isVue3,"tm-checkbox--v2":s.isVue2}])},[e.createVNode(h,e.mergeProps({ref:"checkboxGroup",modelValue:s.selectedValue,"onUpdate:modelValue":i[0]||(i[0]=c=>s.selectedValue=c)},{...t.$attrs,size:s.getDefaultSize()},e.toHandlers(s.isVue2?t.$listeners:{})),{default:e.withCtx(()=>[t.$slots.default?e.renderSlot(t.$slots,"default",{key:0},void 0,!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(s.optionsList,c=>(e.openBlock(),e.createBlock(a,e.mergeProps({key:c[o.propMap.value]},{ref_for:!0},{[s.isVue3?"value":"label"]:c[o.propMap.value],disabled:c.disabled,style:o.calculateItemWidth}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"option",{item:c},()=>[e.createTextVNode(e.toDisplayString(c[o.propMap.label]),1)],!0)]),_:2},1040))),128))]),_:3},16,["modelValue"])],2)}const W=b(Ke,[["render",Qe],["__scopeId","data-v-b44866b1"]]),$e=!1,qe={name:"TmSwitchFilter",props:{value:{type:Boolean,default:!1},label:{type:String,default:""}},data(){return{isVue2:$e,getDefaultSize:V,switchValue:this.value}},computed:{containerWidthClass(){const t=o=>{if(!o)return 0;let a=0;for(let h=0;h<o.length;h++){const c=o.charAt(h);a+=/[\u4e00-\u9fa5]/.test(c)?2:1}return a},i=t(this.$attrs["active-text"]),l=t(this.$attrs["inactive-text"]),n=t(this.$attrs.label),s=i+l+n;return s>20?"wide-container":s>6?"medium-container":"narrow-container"}},watch:{value:{immediate:!0,handler(t){this.switchValue=t}},switchValue(t){this.$emit("input",t),this.$emit("change",t)}}},Ge={key:0,class:"switch-label"};function Ye(t,i,l,n,s,o){const a=e.resolveComponent("el-switch");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tm-switch",o.containerWidthClass])},[l.label?(e.openBlock(),e.createElementBlock("span",Ge,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createVNode(a,e.mergeProps({ref:"switch",modelValue:s.switchValue,"onUpdate:modelValue":i[0]||(i[0]=h=>s.switchValue=h)},t.$attrs,e.toHandlers(s.isVue2?t.$listeners:{}),{size:s.getDefaultSize()}),null,16,["modelValue","size"])],2)}const v=b(qe,[["render",Ye],["__scopeId","data-v-9e7a342f"]]),Xe={name:"DynamicSlot",functional:!0,props:{name:{type:String,required:!0},slotProps:{type:Object,default:()=>({})}},render(t,i){const{props:l,parent:n}=i;let s=n.$scopedSlots[l.name];if(!s){let o=n.$parent;for(;o&&!s;){if(o.$options.name==="TmTable"){s=o.$scopedSlots[l.name];break}o=o.$parent}}return s?s(l.slotProps):t()}},{t:Ze}=x(),et=!1,tt=!0,lt={name:"TmTableSearch",components:{TmSelect:D,TmAdvancedInput:H,TmAdvancedDate:R,TmCascader:I,TmRadio:P,TmCheckbox:W,TmSwitch:v,DynamicSlot:Xe},props:{disabled:{type:Boolean,default:!1},searchColumns:{type:Array,default:null},searchForm:{type:Object,default:()=>({})}},data(){return{t:Ze,isVue2:et,isVue3:tt,getCompatSize:F,getDefaultSize:V,defaultValues:{}}},computed:{computedSearchForm:{get(){return this.searchForm},set(t){this.$emit("update:search-form",t)}}},mounted(){this.initDefaultValues()},methods:{hasDefaultSlot(){const t=this.$slots.default;return this.isVue2?!!t:t()[0].children.length>0},handleUpdate(t,i,l){const n=this.getFieldValue(t,l);n&&this.$emit("update:search-form",{...this.computedSearchForm,[n]:i})},handleUpdateDate(t,i){const l=i||[],n=this.getFieldValue(t,"start"),s=this.getFieldValue(t,"end"),o=this.getFieldValue(t,"value"),a={};n&&(a[n]=l[0]),s&&(a[s]=l[1]),o&&(a[o]=l),this.$emit("update:search-form",{...this.computedSearchForm,...a})},getFieldValue(t,i){if(typeof t=="string")return t;if(t.fields&&i in t.fields){const l=t.fields[i];if(typeof l=="string")return l;if(Array.isArray(l))return l[0];if(l&&typeof l=="object")return l.name}},getFieldDefault(t,i){if(t.fields&&i in t.fields){const l=t.fields[i];if(Array.isArray(l)&&l.length>1)return l[1];if(l&&typeof l=="object"&&"default"in l)return l.default}},hasSearchSlot(t){const i="$slots";if(this[i][t])return!0;let n=this.$parent;const s=n[i];for(;n;){if(n.$options.name==="TmTable"&&s[t])return!0;n=n.$parent}return!1},initDefaultValues(){if(!this.searchColumns||!this.searchColumns.length)return;const t={};this.searchColumns.forEach(i=>{if(typeof i=="string"||!i.fields)return;const l=this.getFieldValue(i,"value"),n=this.getFieldValue(i,"label");if(i.type==="input"&&i.labelOptions&&i.labelOptions.length>0){const o=i.labelOptions[0];if(n)if(n in this.computedSearchForm)t[n]=this.computedSearchForm[n];else{const a=this.getFieldDefault(i,"label");a!==void 0?t[n]=a:o&&o.value!==void 0&&(t[n]=o.value)}l&&!(l in this.computedSearchForm)&&(t[l]="")}else if(i.type==="date"&&i.labelOptions&&i.labelOptions.length>0){const o=i.labelOptions[0];if(l&&!(l in this.computedSearchForm)&&(t[l]=[]),n)if(n in this.computedSearchForm)t[n]=this.computedSearchForm[n];else{const a=this.getFieldDefault(i,"label");a!==void 0?t[n]=a:o&&o.value!==void 0&&(t[n]=o.value)}}else if(i.type==="select"&&i.labelOptions&&i.labelOptions.length>0){const o=i.labelOptions[0];if(l&&!(l in this.computedSearchForm)&&(t[l]=i.multiple?[]:""),n)if(n in this.computedSearchForm)t[n]=this.computedSearchForm[n];else{const a=this.getFieldDefault(i,"label");a!==void 0?t[n]=a:o&&o.value!==void 0&&(t[n]=o.value)}}const s=this.getFieldDefault(i,"value");if(l&&s!==void 0&&!(l in this.computedSearchForm)?i.type==="date"&&!Array.isArray(s)?t[l]=[]:i.type==="checkbox"&&!Array.isArray(s)?t[l]=s?[s]:[]:i.type==="switch"&&typeof s!="boolean"?t[l]=!!s:t[l]=s:l&&!(l in this.computedSearchForm)&&(i.type==="checkbox"?t[l]=[]:i.type==="switch"&&(t[l]=!1)),i.type==="date"){const o=this.getFieldValue(i,"start"),a=this.getFieldValue(i,"end"),h=this.getFieldDefault(i,"start"),c=this.getFieldDefault(i,"end");o&&h!==void 0&&!(o in this.computedSearchForm)&&(t[o]=h),a&&c!==void 0&&!(a in this.computedSearchForm)&&(t[a]=c)}}),this.defaultValues=t,this.$emit("update:search-form",{...t,...this.computedSearchForm})},getSearchForm(){return this.computedSearchForm},handleSearch(){setTimeout(()=>{this.$emit("search",this.computedSearchForm)})},handleReset(){this.$emit("update:search-form",{...this.defaultValues}),this.$emit("reset")}}},it={class:"search-content"},st={class:"search-actions"};function ot(t,i,l,n,s,o){const a=e.resolveComponent("dynamic-slot"),h=e.resolveComponent("tm-advanced-input"),c=e.resolveComponent("tm-advanced-date"),d=e.resolveComponent("tm-select"),f=e.resolveComponent("tm-cascader"),g=e.resolveComponent("tm-radio"),C=e.resolveComponent("tm-checkbox"),y=e.resolveComponent("tm-switch"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["table-search",`table-search--${s.isVue2?"v2":"v3"}`])},[e.createElementVNode("div",it,[o.hasDefaultSlot()?e.renderSlot(t.$slots,"default",{key:0},void 0,!0):l.searchColumns&&l.searchColumns.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(l.searchColumns,(r,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[typeof r=="string"?(e.openBlock(),e.createElementBlock("div",{key:`str-${r}-${_}`,class:"search-item"},[(e.openBlock(),e.createBlock(a,{name:`search-${r}`,"slot-props":{searchForm:l.searchForm},key:r},null,8,["name","slot-props"]))])):(e.openBlock(),e.createElementBlock("div",{key:`obj-${_}`,class:"search-item"},[r.fields?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.hasSearchSlot(`search-${o.getFieldValue(r,"value")}`)?(e.openBlock(),e.createBlock(a,{name:`search-${o.getFieldValue(r,"value")}`,"slot-props":{searchForm:l.searchForm,col:r},key:o.getFieldValue(r,"value")},null,8,["name","slot-props"])):(e.openBlock(),e.createElementBlock("div",{style:{display:"flex"},key:o.getFieldValue(r,"value")||`col-${_}`},[r.type==="input"?(e.openBlock(),e.createBlock(h,{key:0,label:r.label,value:o.computedSearchForm[o.getFieldValue(r,"value")],field:o.computedSearchForm[o.getFieldValue(r,"label")],onValueChange:m=>o.handleUpdate(r,m,"value"),onFieldChange:m=>o.handleUpdate(r,m,"label"),multiple:r.multiple,labelOptions:r.labelOptions,placeholder:r.placeholder,onSearch:o.handleSearch},null,8,["label","value","field","onValueChange","onFieldChange","multiple","labelOptions","placeholder","onSearch"])):e.createCommentVNode("",!0),r.type==="date"?(e.openBlock(),e.createBlock(c,{key:1,label:r.label,value:o.computedSearchForm[o.getFieldValue(r,"value")],field:o.computedSearchForm[o.getFieldValue(r,"label")],start:o.computedSearchForm[o.getFieldValue(r,"start")],end:o.computedSearchForm[o.getFieldValue(r,"end")],onFieldChange:m=>o.handleUpdate(r,m,"label"),onValueChange:m=>o.handleUpdateDate(r,m),onStartChange:m=>o.handleUpdateDate(r,m),onEndChange:m=>o.handleUpdateDate(r,m),labelOptions:r.labelOptions,"start-placeholder":r.startPlaceholder,"end-placeholder":r.endPlaceholder},null,8,["label","value","field","start","end","onFieldChange","onValueChange","onStartChange","onEndChange","labelOptions","start-placeholder","end-placeholder"])):e.createCommentVNode("",!0),r.type==="select"?(e.openBlock(),e.createBlock(d,{key:2,label:r.label,modelValue:o.computedSearchForm[o.getFieldValue(r,"value")],"onUpdate:modelValue":m=>o.computedSearchForm[o.getFieldValue(r,"value")]=m,field:o.computedSearchForm[o.getFieldValue(r,"label")],options:r.options,labelOptions:r.labelOptions,placeholder:r.placeholder,multiple:r.multiple,"show-check-all":r.checkAll,onFieldChange:m=>o.handleUpdate(r,m,"label")},null,8,["label","modelValue","onUpdate:modelValue","field","options","labelOptions","placeholder","multiple","show-check-all","onFieldChange"])):e.createCommentVNode("",!0),r.type==="cascader"?(e.openBlock(),e.createBlock(f,{key:3,modelValue:o.computedSearchForm[o.getFieldValue(r,"value")],"onUpdate:modelValue":m=>o.computedSearchForm[o.getFieldValue(r,"value")]=m,label:r.label,options:r.options,labelOptions:r.labelOptions,props:r.props,placeholder:r.placeholder,"show-check-all":r.checkAll},null,8,["modelValue","onUpdate:modelValue","label","options","labelOptions","props","placeholder","show-check-all"])):e.createCommentVNode("",!0),r.type==="radio"?(e.openBlock(),e.createBlock(g,{key:4,modelValue:o.computedSearchForm[o.getFieldValue(r,"value")],"onUpdate:modelValue":m=>o.computedSearchForm[o.getFieldValue(r,"value")]=m,label:r.label,options:r.options,props:r.props},null,8,["modelValue","onUpdate:modelValue","label","options","props"])):e.createCommentVNode("",!0),r.type==="checkbox"?(e.openBlock(),e.createBlock(C,{key:5,modelValue:o.computedSearchForm[o.getFieldValue(r,"value")],"onUpdate:modelValue":m=>o.computedSearchForm[o.getFieldValue(r,"value")]=m,label:r.label,options:r.options,props:r.props},null,8,["modelValue","onUpdate:modelValue","label","options","props"])):e.createCommentVNode("",!0),r.type==="switch"?(e.openBlock(),e.createBlock(y,{key:6,modelValue:o.computedSearchForm[o.getFieldValue(r,"value")],"onUpdate:modelValue":m=>o.computedSearchForm[o.getFieldValue(r,"value")]=m,"active-text":r.activeText,"inactive-text":r.inactiveText,label:r.label,"active-color":r.activeColor,"inactive-color":r.inactiveColor},null,8,["modelValue","onUpdate:modelValue","active-text","inactive-text","label","active-color","inactive-color"])):e.createCommentVNode("",!0)]))],64)):(e.openBlock(),e.createElementBlock("div",{key:`error-${_}`,class:"search-error-message"}," 缺少 fields 配置,无法渲染此组件 "))]))],64))),256)):e.createCommentVNode("",!0),e.createElementVNode("div",st,[e.createVNode(w,{type:"primary",size:s.getDefaultSize(),onClick:o.handleSearch},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("query")),1)]),_:1},8,["size","onClick"]),e.createVNode(w,{size:s.getDefaultSize(),onClick:o.handleReset},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("reset")),1)]),_:1},8,["size","onClick"])])])],2)}const U=b(lt,[["render",ot],["__scopeId","data-v-572f884b"]]),nt=!1,at={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:nt,getCompatSize:F}},methods:{handleSizeChange(t){this.$emit("size-change",t)},handleCurrentChange(t){this.$emit("current-change",t)}}},rt={class:"tm-pagination"};function ct(t,i,l,n,s,o){const a=e.resolveComponent("el-pagination");return e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(a,e.mergeProps(t.$attrs,e.toHandlers(s.isVue2?t.$listeners:{}),{style:{"text-align":"right"},"current-page":l.current,"page-size":l.pageSize,total:l.total,"page-sizes":[10,20,50,100,300,500,1e3,2e3],size:s.getCompatSize("mini"),layout:"total, sizes, prev, pager, next, jumper",onSizeChange:o.handleSizeChange,"onUpdate:currentPage":i[0]||(i[0]=h=>t.$emit("update:current",h)),"onUpdate:pageSize":i[1]||(i[1]=h=>t.$emit("update:pageSize",h)),onCurrentChange:o.handleCurrentChange}),null,16,["current-page","page-size","total","size","onSizeChange","onCurrentChange"])])}const dt=b(at,[["render",ct],["__scopeId","data-v-4dbdf6e7"]]),ht={name:"TmTableMenu",props:{size:{type:String,default:"mini"}}},pt={size:"small",class:"tm-table-menu",inline:""},mt={class:"left"},ut={class:"right"};function ft(t,i,l,n,s,o){return e.openBlock(),e.createElementBlock("div",pt,[e.createElementVNode("div",mt,[e.renderSlot(t.$slots,"left",{},void 0,!0)]),e.createElementVNode("div",ut,[e.renderSlot(t.$slots,"right",{},void 0,!0)])])}const gt=b(ht,[["render",ft],["__scopeId","data-v-579dd2c3"]]),j=t=>t?t.props||{}:{},J=(t,i)=>{t&&(t.props||(t.props={}),typeof i=="object"&&Object.assign(t.props,i))},O={getTableConfig(t){try{const i=localStorage.getItem(`tm-table-config-${t}`);return Promise.resolve({data:{code:200,data:i}})}catch(i){return Promise.reject(i)}},setTableConfig(t){try{return localStorage.setItem(`tm-table-config-${t.key}`,t.info),Promise.resolve({data:{code:200,message:"success"}})}catch(i){return Promise.reject(i)}}},bt=t=>O.getTableConfig(t.key),yt=t=>O.setTableConfig(t),Ct=t=>{t&&(typeof t.getTableConfig=="function"&&(O.getTableConfig=t.getTableConfig),typeof t.setTableConfig=="function"&&(O.setTableConfig=t.setTableConfig))},{t:kt}=x(),Vt=!1,xt=!0,_t={formatter:(t,i,l,n)=>[void 0,null,""].includes(l)?"-":l},St={name:"TmColumnConfig",components:{MoveIcon:me,FixedLeftIcon:fe,FixedRightIcon:ge,UploadIcon:be,DownloadIcon:ye,DeleteIcon:Ce,MenuIcon:he,tmEllipsisText:L},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:kt,isVue2:Vt,isVue3:xt,getDefaultSize:V,getCompatSize:F,buttonType:{link:!0,type:"primary"},afterOpenDelay:{"show-after":300},popoverVisible:!1,keyWord:"",sortedTableColumns:[],tableColumns:[],defaultColumnsConfig:[],columnMap:{},processedColumns:[],placement:"bottom",searchTimer:null,isDraggingFrozen:!1,isDraggingFrozenRight:!1,sortable:null,isConfigLoaded:!1,columnsCopy:[]}},computed:{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(){return this.tableKey?this.tableKey:this.$route.path.slice(1).replace(/\//g,"-")}},watch:{keyWord:{handler(){this.handleSearch()},immediate:!0},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,i){for(let l=t.length-1;l>=0;l--)if(i(t[l],l,t))return l;return-1},initializeColumnConfig(){this.defaultColumns&&this.defaultColumns.length>0?this.defaultColumnsConfig=this.defaultColumns:this.processOriginalColumns(),this.loadColumnConfig()},processOriginalColumns(){const t=this.columns||[];let i={};this.defaultColumnsConfig=t.filter(l=>{const n=j(l);return!(!n.prop||this.ignoredColumnConfigTypes.includes(n.type))}).map((l,n)=>{const s=j(l),o={..._t,...s};J(l,o),s.prop&&(i[s.prop]=l);const a=s.prop==="operation"||s.label&&s.label.includes("操作"),h=s.hasOwnProperty("visible")?s.visible!==!1:!0;return{prop:s.prop,label:s.label,fixed:s.fixed||"",isOperation:a,sort:n,cancellable:s.hasOwnProperty("cancellable")?s.cancellable:!0,visible:h}}),this.columnMap=i},loadColumnConfig(){bt({key:this.computedTableKey}).then(t=>{var l;if(t.data.code!==200)return;let i=JSON.parse(((l=t.data)==null?void 0:l.data)||null)||{};i.columnsConfig&&JSON.stringify(this.defaultColumnsConfig)===JSON.stringify(i.defaultColumnsConfig)?this.tableColumns=i.columnsConfig.map(n=>({...n})):this.tableColumns=this.defaultColumnsConfig.map(n=>({...n})),this.processedColumns=this.applyColumnConfig(this.tableColumns),this.isConfigLoaded=!0,this.$emit("complete",{columns:this.processedColumns,isInitialLoad:!0})}).catch(()=>{this.tableColumns=this.defaultColumnsConfig.map(t=>({...t})),this.processedColumns=this.applyColumnConfig(this.tableColumns),this.isConfigLoaded=!0,this.$emit("complete",{columns:this.processedColumns,isInitialLoad:!0})})},applyColumnConfig(t,i=!1){let l=this.columns.filter(s=>{const o=j(s);return this.ignoredColumnConfigTypes.includes(o.type)}),n=[];return[...t].sort((s,o)=>{const a=s.sort!==void 0?s.sort:1/0,h=o.sort!==void 0?o.sort:1/0;return a-h}).forEach(s=>{if(s.prop){let o=this.columnMap[s.prop];o&&(J(o,{fixed:s.fixed||void 0,visible:s.visible}),(!i&&s.visible||i)&&n.push(o))}}),l.forEach(s=>{J(s,{visible:!0})}),[...l,...n]},crateSortable(){const t=this.$refs.sortListRef;if(!t)return;this.sortable&&(this.sortable.destroy(),this.sortable=null);const i=new S(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:l})=>{const n=l.getAttribute("data-prop"),s=this.sortedTableColumns.find(o=>o.prop===n);this.isDraggingFrozen=s&&s.fixed==="left",this.isDraggingFrozenRight=s&&s.fixed==="right",this.draggedItemIndex=Array.from(t.children).indexOf(l),l.classList.add("sortable-drag")},onMove:l=>{const{target:n,related:s}=l;if(!n||!s)return!1;const o=s?s.getAttribute("data-prop"):null,a=o?this.sortedTableColumns.find(g=>g.prop===o):null,h=n.getAttribute("data-prop"),c=h?this.sortedTableColumns.find(g=>g.prop===h):null;if(c&&c.isOperation&&a&&a.fixed==="left")return n.classList.add("no-drop-zone"),!1;const d=a&&a.fixed==="left",f=a&&a.fixed==="right";return this.isDraggingFrozen&&!d||this.isDraggingFrozenRight&&!f||!this.isDraggingFrozen&&!this.isDraggingFrozenRight&&(d||f)?(n.classList.add("no-drop-zone"),!1):(document.querySelectorAll(".no-drop-zone").forEach(g=>{g.classList.remove("no-drop-zone")}),!0)},onEnd:({item:l,newIndex:n,oldIndex:s})=>{if(n===void 0||s===void 0||n<0||s<0||n>=this.sortedTableColumns.length||s>=this.sortedTableColumns.length)return;document.querySelectorAll(".no-drop-zone").forEach(g=>{g.classList.remove("no-drop-zone")}),l.classList.remove("sortable-drag");const o=this.sortedTableColumns[s],a=o.fixed==="left",h=o.fixed==="right",c=n>0?this.sortedTableColumns[n-1]:null,d=n<this.sortedTableColumns.length-1?this.sortedTableColumns[n+1]:null;let f=!1;if(a?(c&&c.fixed!=="left"||d&&d.fixed==="right")&&(f=!0):h?(c&&c.fixed!=="right"||d&&d.fixed!=="right")&&(f=!0):(c&&c.fixed==="right"||d&&d.fixed==="left")&&(f=!0),f){this.rollbackSort();return}this.updateSortAfterDrag()}});this.sortable=i},rollbackSort(){this.sortedTableColumns=JSON.parse(JSON.stringify(this.columnsCopy))},updateSortAfterDrag(){const t=this.$refs.sortListRef;if(!t)return;Array.from(t.children||[]).filter(l=>l&&l.dataset&&l.dataset.prop).map(l=>l.dataset.prop).forEach((l,n)=>{this.sortedTableColumns.some(s=>s.prop===l?(s.sort=n,!0):!1)}),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns)},handleSearch(){clearTimeout(this.searchTimer),this.searchTimer=setTimeout(()=>{const t=this.keyWord;this.sortedTableColumns.forEach(i=>{i.searchShow=i.label.includes(t)})},500)},init(){this.tableColumns=Array.isArray(this.tableColumns)?[...this.tableColumns]:Array.isArray(this.defaultColumnsConfig)?[...this.defaultColumnsConfig]:[],this.initSortedTableColumns()},initSortedTableColumns(){this.tableColumns.forEach((t,i)=>{t.sort===void 0&&(t.sort=i)}),this.sortedTableColumns=[...this.tableColumns].sort((t,i)=>t.fixed==="left"&&i.fixed!=="left"?-1:t.fixed!=="left"&&i.fixed==="left"||t.fixed==="right"&&i.fixed!=="right"?1:t.fixed!=="right"&&i.fixed==="right"?-1:t.sort-i.sort)},setPlacement(){const i=this.$refs.operationRef.$el.getBoundingClientRect();(window.innerHeight||document.documentElement.clientHeight)-(i.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{}})(),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 S<"u"&&S.utils&&(document.removeEventListener("mousemove",S.utils.throttleCall),document.removeEventListener("mouseup",S.utils.throttleCall))}catch{}},handleSelectAll(){const t=this.tableColumns.some(i=>!i.visible);this.tableColumns.forEach(i=>{i.cancellable&&(i.visible=t)})},handleRestoreDefault(){this.tableColumns=JSON.parse(JSON.stringify(this.defaultColumnsConfig)),this.sortedTableColumns=[...this.tableColumns].sort((t,i)=>t.sort-i.sort)},canMoveTop(t,i){if(i===0)return!1;if(t.fixed==="left"){const l=this.sortedTableColumns[i-1];return l&&l.fixed==="left"}if(!t.fixed){const l=this.sortedTableColumns[i-1];return l&&l.fixed==="left"?!1:l&&!l.fixed}return t.fixed==="right"},moveTop(t,i){const l=this.sortedTableColumns,n=t.prop;if(t.fixed==="right"&&(t.fixed=""),t.fixed==="left")l.unshift(l.splice(i,1)[0]);else{const s=this.findLastIndex(this.sortedTableColumns,o=>o.fixed==="left");l.splice(s+1,0,l.splice(i,1)[0])}this.updateSortValues(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns),this.$nextTick(()=>{const s=this.$refs.sortListRef;if(s){const o=Array.from(s.children).find(a=>a.dataset&&a.dataset.prop===n);o&&o.scrollIntoView({behavior:"smooth",block:"nearest"})}})},frozenLeftHandle(t){const i=this.sortedTableColumns,l=i.splice(t,1)[0];if(l.fixed=l.fixed==="left"?"":"left",l.fixed==="left"){const n=this.findLastIndex(this.sortedTableColumns,s=>s.fixed==="left");i.splice(n+1,0,l)}else{const n=this.findLastIndex(this.sortedTableColumns,s=>s.fixed==="left");i.splice(n+1,0,l)}this.updateSortValues(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns)},frozenRightHandle(t){const i=this.sortedTableColumns,l=i.splice(t,1)[0];if(l.fixed=l.fixed==="right"?"":"right",l.fixed==="right"){const n=i.findIndex(s=>s.fixed==="right");n===-1?i.push(l):i.splice(n,0,l)}else{const n=i.findIndex(s=>s.fixed==="right");n===-1?i.push(l):i.splice(n,0,l)}this.updateSortValues(),this.columnsCopy=JSON.parse(JSON.stringify(this.sortedTableColumns)),this.$emit("on-sort-change",this.sortedTableColumns)},onSave(){var i;this.updateSortValues();const t=(i=this.tableColumns)==null?void 0:i.map(l=>{l.searchShow=!0;const n=this.sortedTableColumns.find(s=>s.prop===l.prop);return n&&(l.sort=n.sort,l.fixed=n.fixed,l.visible=n.visible),l});yt({key:this.computedTableKey,info:JSON.stringify({columnsConfig:t,defaultColumnsConfig:this.defaultColumnsConfig})}).then(l=>{l.data.code===200&&(this.processedColumns=this.applyColumnConfig(t,!0),this.$emit("complete",{columns:this.processedColumns,isInitialLoad:!1}),this.$message.success(this.t("saveSuccess")),this.popoverVisible=!1)})},updateSortValues(){this.sortedTableColumns.forEach((t,i)=>{t.sort=i})}},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 S<"u"&&S.utils&&(document.removeEventListener("mousemove",S.utils.throttleCall),document.removeEventListener("mouseup",S.utils.throttleCall))}catch{}}},Tt={key:0,class:"container"},wt={class:"main-container"},zt={class:"left-content"},Ft={class:"title"},Lt={class:"option-list"},Bt={style:{height:"100%","overflow-y":"auto"}},Et={class:"right-content"},Ot={class:"search-box"},Nt={key:0,class:"tips"},Mt={class:"sort-list",ref:"sortListRef"},Dt=["data-prop"],At={key:0,class:"sort-item"},Ht={class:"row-title"},Rt={class:"operation-btns"},It={class:"footer"},Pt={class:"footer-left"},Wt={class:"footer-right"},vt={style:{display:"inline-block","margin-left":"10px"}};function Ut(t,i,l,n,s,o){const a=e.resolveComponent("el-button"),h=e.resolveComponent("TmEllipsisText"),c=e.resolveComponent("el-checkbox"),d=e.resolveComponent("el-input"),f=e.resolveComponent("MoveIcon"),g=e.resolveComponent("DeleteIcon"),C=e.resolveComponent("el-tooltip"),y=e.resolveComponent("UploadIcon"),w=e.resolveComponent("FixedLeftIcon"),r=e.resolveComponent("FixedRightIcon"),_=e.resolveComponent("MenuIcon"),m=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(m,e.mergeProps({"popper-class":"column-config-popover"},{[s.isVue3?"visible":"value"]:s.popoverVisible},e.toHandlers({[s.isVue3?"update:visible":"input"]:o.handleVisibleChange}),{width:680,"show-arrow":!1,placement:s.placement,trigger:"click",onShow:o.handlePopoverShow,onHide:o.handlePopoverHide}),{reference:e.withCtx(()=>[e.createElementVNode("div",vt,[e.createVNode(C,e.mergeProps({content:s.t("columnSetting")},s.afterOpenDelay,{placement:"top"}),{default:e.withCtx(()=>[e.createVNode(a,{size:s.getDefaultSize(),ref:"operationRef",circle:""},{default:e.withCtx(()=>[e.createVNode(_)]),_:1},8,["size"])]),_:1},16,["content"])])]),default:e.withCtx(()=>[s.popoverVisible?(e.openBlock(),e.createElementBlock("div",Tt,[e.createElementVNode("div",wt,[e.createElementVNode("div",zt,[e.createElementVNode("div",Ft,[e.createElementVNode("span",null,e.toDisplayString(s.t("SelectableFields"))+"("+e.toDisplayString(s.tableColumns.length)+")",1),e.createVNode(a,e.mergeProps({style:{"margin-left":"10px"}},s.buttonType,{onClick:o.handleSelectAll}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("all")),1)]),_:1},16,["onClick"])]),e.createElementVNode("div",Lt,[e.createElementVNode("div",Bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tableColumns,(p,z)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.prop?(e.openBlock(),e.createElementBlock("div",{style:{width:"110px",display:"inline-block"},key:z+p.prop},[e.createVNode(c,{disabled:!p.cancellable,class:"el-checkbox",modelValue:p.visible,"onUpdate:modelValue":B=>p.visible=B,label:p.prop,value:p.prop},{default:e.withCtx(()=>[e.createVNode(h,{text:p.label},null,8,["text"])]),_:2},1032,["disabled","modelValue","onUpdate:modelValue","label","value"])])):e.createCommentVNode("",!0)],64))),256))])])]),e.createElementVNode("div",Et,[e.createElementVNode("div",Ot,[e.createVNode(d,{size:s.getCompatSize("small"),class:"search-input",clearable:"",placeholder:s.t("search"),modelValue:s.keyWord,"onUpdate:modelValue":i[0]||(i[0]=p=>s.keyWord=p)},null,8,["size","placeholder","modelValue"])]),o.showFixedLimitTips?(e.openBlock(),e.createElementBlock("div",Nt)):e.createCommentVNode("",!0),e.createElementVNode("div",Mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.sortedTableColumns,(p,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sort-item-wrapper",[p.fixed==="left"?"frozen":"",p.fixed==="right"?"frozenRight":"",p.fixed?"":"noFrozen"]]),"data-prop":p.prop,key:p.prop},[p.visible&&p.searchShow!==!1?(e.openBlock(),e.createElementBlock("div",At,[e.createElementVNode("div",Ht,[e.createVNode(f,{style:{"flex-shrink":"0"}}),e.createVNode(h,{text:p.label},null,8,["text"])]),e.createElementVNode("div",Rt,[p.cancellable?(e.openBlock(),e.createBlock(C,e.mergeProps({key:0,content:s.t("cancel"),placement:"top"},{ref_for:!0},s.afterOpenDelay),{default:e.withCtx(()=>[e.createVNode(a,e.mergeProps({ref_for:!0},s.buttonType,{size:s.getCompatSize("mini"),class:"iconfont-button delete-button",onClick:B=>p.visible=!1}),{default:e.withCtx(()=>[e.createVNode(g)]),_:2},1040,["size","onClick"])]),_:2},1040,["content"])):e.createCommentVNode("",!0),o.canMoveTop(p,z)?(e.openBlock(),e.createBlock(C,e.mergeProps({key:1,content:s.t("top"),placement:"top"},{ref_for:!0},s.afterOpenDelay),{default:e.withCtx(()=>[e.createVNode(a,e.mergeProps({ref_for:!0},s.buttonType,{size:s.getCompatSize("mini"),class:"iconfont-button top-button",onClick:B=>o.moveTop(p,z)}),{default:e.withCtx(()=>[e.createVNode(y)]),_:2},1040,["size","onClick"])]),_:2},1040,["content"])):e.createCommentVNode("",!0),p.fixed!=="right"?(e.openBlock(),e.createBlock(C,e.mergeProps({key:2,content:p.fixed==="left"?s.t("cancelLeftFixed"):s.t("leftFixed"),placement:"top"},{ref_for:!0},s.afterOpenDelay),{default:e.withCtx(()=>[e.createVNode(a,e.mergeProps({ref_for:!0},s.buttonType,{size:s.getCompatSize("mini"),class:["iconfont-button left-fixed-btn",{"active-fixed":p.fixed==="left"}],onClick:B=>o.frozenLeftHandle(z),disabled:p.fixed!=="left"&&o.isThanMaxFrozen}),{default:e.withCtx(()=>[e.createVNode(w)]),_:2},1040,["size","class","onClick","disabled"])]),_:2},1040,["content"])):e.createCommentVNode("",!0),p.fixed!=="left"?(e.openBlock(),e.createBlock(C,e.mergeProps({key:3,content:p.fixed==="right"?s.t("cancelRightFixed"):s.t("rightFixed"),placement:"top"},{ref_for:!0},s.afterOpenDelay),{default:e.withCtx(()=>[e.createVNode(a,e.mergeProps({ref_for:!0},s.buttonType,{size:s.getCompatSize("mini"),class:["iconfont-button right-fixed-btn",{"active-fixed":p.fixed==="right"}],onClick:B=>o.frozenRightHandle(z),disabled:p.fixed!=="right"&&o.isThanMaxRightFrozen}),{default:e.withCtx(()=>[e.createVNode(r)]),_:2},1040,["size","class","onClick","disabled"])]),_:2},1040,["content"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],10,Dt))),128))],512)])]),e.createElementVNode("div",It,[e.createElementVNode("div",Pt,[e.createVNode(a,{size:s.getCompatSize("mini"),onClick:o.handleRestoreDefault},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("restoreDefault")),1)]),_:1},8,["size","onClick"])]),e.createElementVNode("div",Wt,[e.createVNode(a,{size:s.getCompatSize("mini"),onClick:i[1]||(i[1]=p=>s.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("cancel")),1)]),_:1},8,["size"]),e.createVNode(a,{size:s.getCompatSize("mini"),type:"primary",onClick:o.onSave},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.t("saveAndApply")),1)]),_:1},8,["size","onClick"])])])])):e.createCommentVNode("",!0)]),_:1},16,["placement","onShow","onHide"])}const jt=b(St,[["render",Ut],["__scopeId","data-v-59c02213"]]),Jt=!1,Kt=!0,Qt={name:"TmTable",components:{TableSearch:U,TablePagination:dt,TableMenu:gt,ColumnConfig:jt,RefreshIcon:pe,ColumnRenderer:{props:["vnode"],render(){return this.vnode}}},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:()=>({})}},data(){return{getDefaultSize:V,getCompatSize:F,isVue3:Kt,isVue2:Jt,t:x().t,tableData:[],tableLoading:!1,columnsLoading:!1,tableReload:1,tableHeight:null,selectedRows:[],paginationInfo:{current:1,pageSize:20,total:void 0},originalColumns:[],displayColumns:[],isColumnConfigLoaded:!1,afterOpenDelay:{"show-after":300}}},computed:{pageLoading(){return this.tableLoading||this.columnsLoading},computedTableKey(){return this.tableKey?this.tableKey:this.$route.path.slice(1).replace(/\//g,"-")},computedShowPagination(){return this.showPagination&&typeof this.data=="function"}},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()}}},created(){this.originalColumns=this.$slots.default(),this.columnSettingButton?this.columnsLoading=!0:(this.displayColumns=this.originalColumns,this.isColumnConfigLoaded=!0)},mounted(){this.getTableHeight(),window.addEventListener("resize",this.getTableHeight)},beforeDestroy(){window.removeEventListener("resize",this.getTableHeight)},methods:{handleUpdateSearchForm(t){this.$emit("update:search-form",t)},handleColumnConfigComplete(t){Array.isArray(t.columns)?this.displayColumns=[...t.columns]:this.displayColumns=[...this.originalColumns],t.isInitialLoad?(this.isColumnConfigLoaded=!0,this.columnsLoading=!1,this.firstLoad&&typeof this.data=="function"&&this.loadData()):this.reloadTable()},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:i,total:l,pageSize:n,current:s}=t;this.tableData=i,l!==void 0&&(this.paginationInfo.total=l),s!==void 0&&(this.paginationInfo.current=s),n!==void 0&&(this.paginationInfo.pageSize=n)}catch{}finally{this.tableLoading=!1}}},getTableHeight(){this.isAutoHeight()?this.$nextTick(()=>{const t=this.$refs.table,i=this.$refs.tmPagination;if(!t)return;const l=t.$el,n=i&&i.$el&&i.$el.offsetHeight||0;this.tableHeight=document.documentElement.clientHeight-l.offsetTop-n-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++}}},$t={class:"tm-table",ref:"tablePage"};function qt(t,i,l,n,s,o){const a=e.resolveComponent("table-search"),h=e.resolveComponent("RefreshIcon"),c=e.resolveComponent("el-button"),d=e.resolveComponent("el-tooltip"),f=e.resolveComponent("ColumnConfig"),g=e.resolveComponent("table-menu"),C=e.resolveComponent("columnRenderer"),y=e.resolveComponent("el-table"),w=e.resolveComponent("table-pagination"),r=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",$t,[l.searchColumns&&l.searchColumns.length>0?(e.openBlock(),e.createBlock(a,{key:0,ref:"search",onSearch:o.search,onReset:o.reset,"onUpdate:searchForm":o.handleUpdateSearchForm,disabled:o.pageLoading,"search-columns":l.searchColumns,"search-form":l.searchForm},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"search",{},void 0,!0)]),_:3},8,["onSearch","onReset","onUpdate:searchForm","disabled","search-columns","search-form"])):e.createCommentVNode("",!0),l.showMenu?(e.openBlock(),e.createBlock(g,{key:1},{left:e.withCtx(()=>[e.renderSlot(t.$slots,"menu-left",{},void 0,!0)]),right:e.withCtx(()=>[e.renderSlot(t.$slots,"menu-right",{},void 0,!0),l.refreshButton&&typeof l.data=="function"?(e.openBlock(),e.createBlock(d,e.mergeProps({key:0,content:s.t("refresh"),placement:"top"},s.afterOpenDelay),{default:e.withCtx(()=>[e.createVNode(c,{onClick:o.handleRefresh,circle:"",size:s.getDefaultSize()},{default:e.withCtx(()=>[e.createVNode(h)]),_:1},8,["onClick","size"])]),_:1},16,["content"])):e.createCommentVNode("",!0),l.columnSettingButton?(e.openBlock(),e.createBlock(f,{key:1,maxFixedLeftQuantity:l.maxFixedLeftQuantity,maxFixedRightQuantity:l.maxFixedRightQuantity,tableKey:o.computedTableKey,columns:s.originalColumns,onComplete:o.handleColumnConfigComplete},null,8,["maxFixedLeftQuantity","maxFixedRightQuantity","tableKey","columns","onComplete"])):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(y,e.mergeProps({ref:"table"},{...t.$attrs,border:l.border},e.toHandlers(s.isVue2?t.$listeners:{}),{data:s.tableData,height:s.tableHeight,size:s.getCompatSize("mini"),onSelectionChange:o.handleSelectionChange,key:s.tableReload}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.displayColumns,_=>(e.openBlock(),e.createBlock(C,{vnode:_,key:s.isVue3?_.id:_.data.attrs.prop},null,8,["vnode"]))),128))]),_:1},16,["data","height","size","onSelectionChange"])),[[r,o.pageLoading]]),o.computedShowPagination?(e.openBlock(),e.createBlock(w,{key:2,ref:"tmPagination","page-size":s.paginationInfo.pageSize,"current-page":s.paginationInfo.current,total:s.paginationInfo.total,disabled:s.tableLoading,onSizeChange:o.handleSizeChange,onCurrentChange:o.handleCurrentChange},null,8,["page-size","current-page","total","disabled","onSizeChange","onCurrentChange"])):e.createCommentVNode("",!0)],512)}const K=b(Qt,[["render",qt],["__scopeId","data-v-3a76baf8"]]),Gt=!1,Yt=!0,Xt={name:"TmTableColumn",inheritAttrs:!1,computed:{isVisible(){return this.$attrs.visible!==!1},slots(){return this.$slots}},data(){return{isVue2:Gt,isVue3:Yt}},created(){this.$parent&&this.$parent.$emit&&this.$parent.$emit("column-initialized",{prop:this.$attrs.prop,visible:this.$attrs.visible!==!1})}};function Zt(t,i,l,n,s,o){const a=e.resolveComponent("el-table-column");return o.isVisible?(e.openBlock(),e.createBlock(a,e.mergeProps({key:0},t.$attrs,e.toHandlers(s.isVue2?t.$listeners:{})),e.createSlots({_:2},[e.renderList(o.slots,(h,c)=>({name:c,fn:e.withCtx(d=>[e.renderSlot(t.$slots,c,e.normalizeProps(e.guardReactiveProps(d)))])}))]),1040)):e.createCommentVNode("",!0)}const Q=b(Xt,[["render",Zt]]),{t:$}=x(),el={name:"TmAdvancedEllipsisText",components:{CopyIcon:Y},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:!1,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($("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($("copySuccess"))}catch{this.$message.error($("copyFailed"))}document.body.removeChild(t)},getTextContent(){if(this.$slots.default){const t=this.$slots.default;return t().map(i=>typeof i.children=="string"?i.children:Array.isArray(i.children)?i.children.map(l=>l.children||"").join(""):"").join("")}return this.text||""},calculateLineHeight(){const t=this.$refs.containerRef;if(!t)return;const i=window.getComputedStyle(t);this.containerWidth=t.offsetWidth;const l=this.$refs.measureRef;if(l){this.setMeasureElementStyle(l,{width:this.containerWidth+"px",wordBreak:"break-all",whiteSpace:"normal"}),l.textContent="测",l.offsetHeight;const n=l.offsetHeight;l.innerHTML="",this.lineHeight=n}else{const n=i.lineHeight;if(n&&n!=="normal")this.lineHeight=parseInt(n);else{const s=parseInt(i.fontSize);this.lineHeight=s*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 i=this.lineHeight;if(this.getTextHeight(t)<=i)this.frontLines=[],this.lastLineText=t,this.isLastLineEllipsis=this.checkIfTextOverflows(t);else{const n=this.lineHeight*(this.rows-1),s=this.findTextForHeight(t,n);this.frontLines=this.splitTextToLines(s);const o=t.substring(s.length);this.lastLineText=o,this.isLastLineEllipsis=o.length>0&&this.checkIfTextOverflows(o)}}this.isCalculating=!1},findTextForHeight(t,i){if(this.getTextHeight(t)<=i)return t;let l=0,n=t.length,s="";for(;l<=n;){const o=Math.floor((l+n)/2),a=t.substring(0,o);this.getTextHeight(a)<=i?(s=a,l=o+1):n=o-1}return s},splitTextToLines(t){if(!t)return[];const i=[];let l=t;for(;l.length>0;){const n=this.findTextForHeight(l,this.lineHeight);if(n.length===0)break;i.push(n),l=l.substring(n.length)}return i},checkIfTextOverflows(t){if(!t)return!1;const i=this.getTextWidth(t),l=this.shouldShowToolbar&&this.hasToolbarContent?this.getToolbarWidth():0,n=this.containerWidth-l-5;return i>n},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,i={}){if(!this.$refs.containerRef||!this.$refs.measureRef)return 0;const l=this.$refs.measureRef,n=l.style.cssText;this.setMeasureElementStyle(l,i),l.textContent=t,l.offsetHeight;const s=i.whiteSpace==="nowrap"?l.offsetWidth:l.offsetHeight;return l.style.cssText=n,l.innerHTML="",s},setMeasureElementStyle(t,i={}){const l=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=l.fontSize,t.style.fontFamily=l.fontFamily,t.style.fontWeight=l.fontWeight,t.style.lineHeight=l.lineHeight,t.style.letterSpacing=l.letterSpacing,t.style.wordSpacing=l.wordSpacing,t.style.padding="0",t.style.margin="0",t.style.border="none",t.style.boxSizing="border-box",Object.entries(i).forEach(([n,s])=>{t.style[n]=s})},handleMouseEnter(){this.isHovered=!0},handleMouseLeave(){this.isHovered=!1},setupResizeObserver(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(t=>{const i=t[0];if(i){const l=i.contentRect.width;Math.abs(l-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)}}},tl={class:"tm-ellipsis-text-wrapper"},ll=["innerHTML"],il={class:"tm-ellipsis-last-line"},sl=["innerHTML"],ol={key:0,class:"tm-ellipsis-toolbar-part"},nl={key:1,class:"tm-ellipsis-text-wrapper"},al=["innerHTML"],rl={class:"tm-ellipsis-last-line"},cl=["innerHTML"],dl={key:0,class:"tm-ellipsis-toolbar-part"},hl={ref:"measureRef",class:"tm-ellipsis-measure"};function pl(t,i,l,n,s,o){const a=e.resolveComponent("CopyIcon"),h=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("div",{ref:"containerRef",style:e.normalizeStyle(o.containerStyle),class:"tm-ellipsis-text",onMouseenter:i[0]||(i[0]=(...c)=>o.handleMouseEnter&&o.handleMouseEnter(...c)),onMouseleave:i[1]||(i[1]=(...c)=>o.handleMouseLeave&&o.handleMouseLeave(...c))},[l.showTooltip&&s.isLastLineEllipsis?(e.openBlock(),e.createBlock(h,e.mergeProps({key:0,content:s.originalText,disabled:!l.showTooltip||!s.isLastLineEllipsis},{[s.isVue2?"open-delay":"show-after"]:300},{placement:"top"}),{default:e.withCtx(()=>[e.createElementVNode("div",tl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.frontLines,(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:"front-"+d,class:"tm-ellipsis-line",innerHTML:c},null,8,ll))),128)),e.createElementVNode("div",il,[e.createElementVNode("div",{class:"tm-ellipsis-text-part",innerHTML:s.lastLineText},null,8,sl),o.shouldShowToolbar&&o.hasToolbarContent?(e.openBlock(),e.createElementBlock("div",ol,[l.copyable?(e.openBlock(),e.createBlock(a,{key:0,class:"icon-item",onClick:o.handleCopy},null,8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"toolbar",{},void 0,!0)])):e.createCommentVNode("",!0)])])]),_:3},16,["content","disabled"])):(e.openBlock(),e.createElementBlock("div",nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.frontLines,(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:"front-"+d,class:"tm-ellipsis-line",innerHTML:c},null,8,al))),128)),e.createElementVNode("div",rl,[e.createElementVNode("div",{class:"tm-ellipsis-text-part",innerHTML:s.lastLineText},null,8,cl),o.shouldShowToolbar&&o.hasToolbarContent?(e.openBlock(),e.createElementBlock("div",dl,[l.copyable?(e.openBlock(),e.createBlock(a,{key:0,class:"icon-item",onClick:o.handleCopy},null,8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"toolbar",{},void 0,!0)])):e.createCommentVNode("",!0)])])),e.createElementVNode("div",hl,null,512)],36)}const q=b(el,[["render",pl],["__scopeId","data-v-16643222"]]),ml={install:{install(t,i={}){[K,Q,L,q].forEach(l=>t.component(l.name,l)),i.tableConfigProvider&&Ct(i.tableConfigProvider)}}.install,Table:K,Column:Q,Search:U,Select:D,AdvancedInput:H,AdvancedDate:R,Cascader:I,Radio:P,Checkbox:W,Switch:v,EllipsisText:L,AdvancedEllipsisText:q,setLang:N,useLocale:x};u.AdvancedDate=R,u.AdvancedEllipsisText=q,u.AdvancedInput=H,u.Cascader=I,u.Checkbox=W,u.Column=Q,u.EllipsisText=L,u.Radio=P,u.Search=U,u.Select=D,u.Switch=v,u.Table=K,u.default=ml,u.setLang=N,u.useLocale=x,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|