diff --git a/sql/fastbee-report.sql b/sql/fastbee-report.sql index fd3c45bd..7b1cf251 100644 --- a/sql/fastbee-report.sql +++ b/sql/fastbee-report.sql @@ -158,7 +158,7 @@ INSERT INTO `oss_config` (tenant_id, tenant_name, config_key, access_key, secret_key, bucket_name, prefix, endpoint, domain, is_https, region, access_policy, status, del_flag, create_by, create_time, update_by, update_time, remark) VALUES -(1, 'admin', 'minio', 'yack-superme', 'yack-minio20260816', 'fastbee', 'report', +(1, 'admin', 'minio', 'supermeminio', 'minio20260909', 'fastbee', 'report', 'http://47.121.180.229:9000', '', 'N', '', '0', '0', '0', 'admin', NOW(), 'admin', NOW(), 'MinIO默认存储'); -- ------------------------------------------------------------ diff --git a/yack-web/src/layout/components/TagsView/ScrollPane.vue b/yack-web/src/layout/components/TagsView/ScrollPane.vue index 72324a79..211a172b 100644 --- a/yack-web/src/layout/components/TagsView/ScrollPane.vue +++ b/yack-web/src/layout/components/TagsView/ScrollPane.vue @@ -38,7 +38,11 @@ export default { const $container = this.$refs.scrollContainer.$el const $containerWidth = $container.offsetWidth const $scrollWrapper = this.scrollWrapper - const tagList = this.$parent.$refs.tag + // $refs.tag 的下标是「首次注册顺序」,ref 只在 create/destroy 时增删; + // 标签拖拽排序只移动 DOM,不会更新这个数组,所以直接按数组顺序取首/尾和 + // 相邻标签会取错。改为按标签在栏上的实际横坐标重排后再取。 + // [].concat 同时兼容 refs 为单个元素(v-for 只剩 1 个时不一定是数组)的情况 + const tagList = [].concat(this.$parent.$refs.tag || []).sort((a, b) => a.$el.offsetLeft - b.$el.offsetLeft) let firstTag = null let lastTag = null diff --git a/yack-web/src/layout/components/TagsView/index.vue b/yack-web/src/layout/components/TagsView/index.vue index 8ea0f23e..4b33af48 100644 --- a/yack-web/src/layout/components/TagsView/index.vue +++ b/yack-web/src/layout/components/TagsView/index.vue @@ -1,5 +1,10 @@