tm-table 1.0.93 → 1.0.95
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-0979131f]{text-align:left;display:inline-flex;vertical-align:top}.ellipsis-text-container .toolbar[data-v-0979131f]{display:none;max-width:30px}.ellipsis-text-container .toolbar .icon-item[data-v-0979131f]{cursor:pointer;margin-left:2px}.ellipsis-text-container .toolbar .icon-item[data-v-0979131f]:hover{opacity:.8}.ellipsis-text-container:hover .toolbar[data-v-0979131f]{display:flex;align-items:center;gap:2px}.ellipsis-text-container:hover .toolbar.multiline[data-v-0979131f]{display:block}.ellipsis-text-container:hover .toolbar .icon-item[data-v-0979131f]: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-bf91c6ef]{display:flex;align-items:center;font-weight:700;color:#000;height:32px;padding-left:10px;padding-top:10px}.container[data-v-bf91c6ef]{height:500px;width:100%;display:flex;flex-direction:column;overflow:hidden}.container .main-container[data-v-bf91c6ef]{display:flex;flex:1;overflow:hidden;border-bottom:1px solid #dcdfe9}.container .main-container .left-content[data-v-bf91c6ef]{flex:2;border-right:1px solid #dcdfe9;display:flex;flex-direction:column}.container .main-container .left-content .option-list[data-v-bf91c6ef]{flex:1;overflow-y:auto}.container .main-container .right-content[data-v-bf91c6ef]{flex:1;overflow-y:auto;display:flex;flex-direction:column;overflow:hidden}.container .main-container .right-content .search-box[data-v-bf91c6ef]{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-bf91c6ef] .el-input__inner{box-shadow:none;border:none}.container .main-container .right-content .search-box[data-v-bf91c6ef] .el-input__wrapper{box-shadow:none}.container .main-container .right-content .sort-list[data-v-bf91c6ef]{flex:1;overflow-y:auto}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-bf91c6ef]{position:relative;transition:background-color .2s}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-bf91c6ef]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item-wrapper:hover .delete-button[data-v-bf91c6ef],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .top-button[data-v-bf91c6ef],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .left-fixed-btn[data-v-bf91c6ef]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item-wrapper:hover .right-fixed-btn[data-v-bf91c6ef]:not(.active-fixed){display:inline-block!important}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-bf91c6ef]{position:relative}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-bf91c6ef]: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-bf91c6ef]:hover,.container .main-container .right-content .sort-list .sort-item-wrapper.frozenRight[data-v-bf91c6ef]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item[data-v-bf91c6ef]{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-bf91c6ef]{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-bf91c6ef]{display:flex;align-items:center}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont-button[data-v-bf91c6ef]{margin-left:3px;padding:0}.container .main-container .right-content .sort-list .sort-item .operation-btns .delete-button[data-v-bf91c6ef],.container .main-container .right-content .sort-list .sort-item .operation-btns .top-button[data-v-bf91c6ef],.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn[data-v-bf91c6ef]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn[data-v-bf91c6ef]:not(.active-fixed){display:none}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn.active-fixed[data-v-bf91c6ef],.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn.active-fixed[data-v-bf91c6ef]{display:inline-block;color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-bf91c6ef]{color:#aaa;font-size:14px}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-bf91c6ef]: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-bf91c6ef]{transform:rotate(-90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn:hover .el-icon-position[data-v-bf91c6ef]{color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn .el-icon-position[data-v-bf91c6ef]{transform:rotate(90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn:hover .el-icon-position[data-v-bf91c6ef]{color:var(--el-color-primary)}.container .footer[data-v-bf91c6ef]{padding:10px;box-sizing:border-box;display:flex;justify-content:space-between}.el-checkbox[data-v-bf91c6ef]{white-space:wrap;min-height:14px;height:auto;margin-top:10px;margin-left:10px;font-weight:400}.el-checkbox[data-v-bf91c6ef] .el-checkbox__label{width:70px;vertical-align:top}.blue-background-class[data-v-bf91c6ef]{background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a;z-index:1000}.sortable-drag[data-v-bf91c6ef]{opacity:.9;background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a}.tips[data-v-bf91c6ef]{color:#999;line-height:16px;font-size:12px;padding:8px}.tips span[data-v-bf91c6ef],.tips span span[data-v-bf91c6ef]{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}
|
|
1
|
+
@charset "UTF-8";.advanced-select[data-v-467dcdd3]{display:flex;max-width:305px}.advanced-select.hasField .select[data-v-467dcdd3]{width:206px;position:relative}.advanced-select.hasField .select[data-v-467dcdd3]:hover{z-index:1!important}.advanced-select.hasField[data-v-467dcdd3] .select--v2 .el-input__inner,.advanced-select.hasField[data-v-467dcdd3] .select--v3 .el-select__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.advanced-select .field-select[data-v-467dcdd3]{margin-right:-1px;width:100px;position:relative}.advanced-select .field-select[data-v-467dcdd3]:hover{z-index:1!important}.advanced-select[data-v-467dcdd3] .field-select--v2 .el-input__inner,.advanced-select[data-v-467dcdd3] .field-select--v3 .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0}.advanced-select .select[data-v-467dcdd3]{width:200px;flex-shrink:0}.advanced-select .select[data-v-467dcdd3] .el-tag--info{max-width:52%}.check-all-option[data-v-467dcdd3]{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-0979131f]{text-align:left;display:inline-flex;vertical-align:top}.ellipsis-text-container .toolbar[data-v-0979131f]{display:none;max-width:30px}.ellipsis-text-container .toolbar .icon-item[data-v-0979131f]{cursor:pointer;margin-left:2px}.ellipsis-text-container .toolbar .icon-item[data-v-0979131f]:hover{opacity:.8}.ellipsis-text-container:hover .toolbar[data-v-0979131f]{display:flex;align-items:center;gap:2px}.ellipsis-text-container:hover .toolbar.multiline[data-v-0979131f]{display:block}.ellipsis-text-container:hover .toolbar .icon-item[data-v-0979131f]: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-bf91c6ef]{display:flex;align-items:center;font-weight:700;color:#000;height:32px;padding-left:10px;padding-top:10px}.container[data-v-bf91c6ef]{height:500px;width:100%;display:flex;flex-direction:column;overflow:hidden}.container .main-container[data-v-bf91c6ef]{display:flex;flex:1;overflow:hidden;border-bottom:1px solid #dcdfe9}.container .main-container .left-content[data-v-bf91c6ef]{flex:2;border-right:1px solid #dcdfe9;display:flex;flex-direction:column}.container .main-container .left-content .option-list[data-v-bf91c6ef]{flex:1;overflow-y:auto}.container .main-container .right-content[data-v-bf91c6ef]{flex:1;overflow-y:auto;display:flex;flex-direction:column;overflow:hidden}.container .main-container .right-content .search-box[data-v-bf91c6ef]{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-bf91c6ef] .el-input__inner{box-shadow:none;border:none}.container .main-container .right-content .search-box[data-v-bf91c6ef] .el-input__wrapper{box-shadow:none}.container .main-container .right-content .sort-list[data-v-bf91c6ef]{flex:1;overflow-y:auto}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-bf91c6ef]{position:relative;transition:background-color .2s}.container .main-container .right-content .sort-list .sort-item-wrapper[data-v-bf91c6ef]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item-wrapper:hover .delete-button[data-v-bf91c6ef],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .top-button[data-v-bf91c6ef],.container .main-container .right-content .sort-list .sort-item-wrapper:hover .left-fixed-btn[data-v-bf91c6ef]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item-wrapper:hover .right-fixed-btn[data-v-bf91c6ef]:not(.active-fixed){display:inline-block!important}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-bf91c6ef]{position:relative}.container .main-container .right-content .sort-list .sort-item-wrapper.no-drop-zone[data-v-bf91c6ef]: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-bf91c6ef]:hover,.container .main-container .right-content .sort-list .sort-item-wrapper.frozenRight[data-v-bf91c6ef]:hover{background-color:#e0eeff}.container .main-container .right-content .sort-list .sort-item[data-v-bf91c6ef]{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-bf91c6ef]{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-bf91c6ef]{display:flex;align-items:center}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont-button[data-v-bf91c6ef]{margin-left:3px;padding:0}.container .main-container .right-content .sort-list .sort-item .operation-btns .delete-button[data-v-bf91c6ef],.container .main-container .right-content .sort-list .sort-item .operation-btns .top-button[data-v-bf91c6ef],.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn[data-v-bf91c6ef]:not(.active-fixed),.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn[data-v-bf91c6ef]:not(.active-fixed){display:none}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn.active-fixed[data-v-bf91c6ef],.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn.active-fixed[data-v-bf91c6ef]{display:inline-block;color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-bf91c6ef]{color:#aaa;font-size:14px}.container .main-container .right-content .sort-list .sort-item .operation-btns .iconfont[data-v-bf91c6ef]: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-bf91c6ef]{transform:rotate(-90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .left-fixed-btn:hover .el-icon-position[data-v-bf91c6ef]{color:var(--el-color-primary)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn .el-icon-position[data-v-bf91c6ef]{transform:rotate(90deg)}.container .main-container .right-content .sort-list .sort-item .operation-btns .right-fixed-btn:hover .el-icon-position[data-v-bf91c6ef]{color:var(--el-color-primary)}.container .footer[data-v-bf91c6ef]{padding:10px;box-sizing:border-box;display:flex;justify-content:space-between}.el-checkbox[data-v-bf91c6ef]{white-space:wrap;min-height:14px;height:auto;margin-top:10px;margin-left:10px;font-weight:400}.el-checkbox[data-v-bf91c6ef] .el-checkbox__label{width:70px;vertical-align:top}.blue-background-class[data-v-bf91c6ef]{background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a;z-index:1000}.sortable-drag[data-v-bf91c6ef]{opacity:.9;background-color:#e0eeff!important;box-shadow:0 2px 8px #0000001a}.tips[data-v-bf91c6ef]{color:#999;line-height:16px;font-size:12px;padding:8px}.tips span[data-v-bf91c6ef],.tips span span[data-v-bf91c6ef]{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
|
@@ -83,10 +83,10 @@ const y = (t) => t, f = () => "mini", N = {
|
|
|
83
83
|
"en-US": B
|
|
84
84
|
};
|
|
85
85
|
let v = { value: "zh-CN" };
|
|
86
|
-
var
|
|
86
|
+
var F;
|
|
87
87
|
{
|
|
88
88
|
const t = require("vue");
|
|
89
|
-
t.observable || (
|
|
89
|
+
t.observable || (F = t.default) != null && F.observable ? v = t.default.observable(v) : v = new t({
|
|
90
90
|
data() {
|
|
91
91
|
return { currentLang: v };
|
|
92
92
|
}
|
|
@@ -95,11 +95,11 @@ var V;
|
|
|
95
95
|
const j = (t) => {
|
|
96
96
|
var e;
|
|
97
97
|
return ((e = U[v.value]) == null ? void 0 : e[t]) || t;
|
|
98
|
-
},
|
|
98
|
+
}, V = (t) => {
|
|
99
99
|
v.value = t;
|
|
100
100
|
}, g = () => ({
|
|
101
101
|
t: j,
|
|
102
|
-
setLang:
|
|
102
|
+
setLang: V,
|
|
103
103
|
currentLang: v
|
|
104
104
|
});
|
|
105
105
|
function c(t, e, i, s, a, l, n, r) {
|
|
@@ -257,12 +257,10 @@ var G = function() {
|
|
|
257
257
|
loading: e.loading
|
|
258
258
|
}, !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) {
|
|
259
259
|
e.checkAll = s;
|
|
260
|
-
}, expression: "checkAll" } }, [e._v(e._s(e.t("all")))])], 1) : e._e(), e.
|
|
261
|
-
return e.
|
|
262
|
-
return
|
|
263
|
-
|
|
264
|
-
}, { item: s })], 2);
|
|
265
|
-
});
|
|
260
|
+
}, expression: "checkAll" } }, [e._v(e._s(e.t("all")))])], 1) : e._e(), e._l(e.optionsList, function(s) {
|
|
261
|
+
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() {
|
|
262
|
+
return [e._v(e._s(s[e.propMap.label]))];
|
|
263
|
+
}, { item: s })], 2);
|
|
266
264
|
})], 2)], 1);
|
|
267
265
|
}, Y = [], X = /* @__PURE__ */ c(
|
|
268
266
|
q,
|
|
@@ -270,7 +268,7 @@ var G = function() {
|
|
|
270
268
|
Y,
|
|
271
269
|
!1,
|
|
272
270
|
null,
|
|
273
|
-
"
|
|
271
|
+
"467dcdd3"
|
|
274
272
|
);
|
|
275
273
|
const z = X.exports, Z = {
|
|
276
274
|
name: "BaseIcon",
|
|
@@ -2648,7 +2646,7 @@ var Kt = function() {
|
|
|
2648
2646
|
);
|
|
2649
2647
|
const W = Gt.exports, Yt = {
|
|
2650
2648
|
install(t, e = {}) {
|
|
2651
|
-
[E, I, x, W].forEach((i) => t.component(i.name, i)), e.tableConfigProvider && Tt(e.tableConfigProvider);
|
|
2649
|
+
[E, I, x, W].forEach((i) => t.component(i.name, i)), e.tableConfigProvider && Tt(e.tableConfigProvider), e.lang && V(e.lang || "zh-CN");
|
|
2652
2650
|
}
|
|
2653
2651
|
}, ei = {
|
|
2654
2652
|
install: Yt.install,
|
|
@@ -2664,7 +2662,7 @@ const W = Gt.exports, Yt = {
|
|
|
2664
2662
|
Switch: D,
|
|
2665
2663
|
EllipsisText: x,
|
|
2666
2664
|
AdvancedEllipsisText: W,
|
|
2667
|
-
setLang:
|
|
2665
|
+
setLang: V,
|
|
2668
2666
|
useLocale: g
|
|
2669
2667
|
};
|
|
2670
2668
|
export {
|
|
@@ -2681,6 +2679,6 @@ export {
|
|
|
2681
2679
|
D as Switch,
|
|
2682
2680
|
E as Table,
|
|
2683
2681
|
ei as default,
|
|
2684
|
-
|
|
2682
|
+
V as setLang,
|
|
2685
2683
|
g as useLocale
|
|
2686
2684
|
};
|
|
@@ -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,"0979131f");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:{width:"80px",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,"bf91c6ef");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"}})});
|
|
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},S=t=>{v.value=t},g=()=>({t:j,setLang:S,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._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,"467dcdd3");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,"0979131f");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))},$={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=>$.getTableConfig(t.key),yt=t=>$.setTableConfig(t),Ct=t=>{t&&(typeof t.getTableConfig=="function"&&($.getTableConfig=t.getTableConfig),typeof t.setTableConfig=="function"&&($.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:{width:"80px",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,"bf91c6ef");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),e.lang&&S(e.lang||"zh-CN")}}.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:S,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=S,o.useLocale=g,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|