已合并
解决关闭其他标签时打开新的标签的问题,修改应用数据库连接为batchMode off #373
AtomGit-Bot创建于 2023年8月17日
解决关闭其他标签时打开新的标签的问题,修改应用数据库连接为batchMode off #373
已合并
共 3 个文件变更+17-12
| @@ -20,7 +20,7 @@ spring: | |||
| 20 | datasource: | 20 | datasource: |
| 21 | type: com.alibaba.druid.pool.DruidDataSource | 21 | type: com.alibaba.druid.pool.DruidDataSource |
| 22 | driver-class-name: org.opengauss.Driver | 22 | driver-class-name: org.opengauss.Driver |
| 23 | url: jdbc:opengauss://ip:port/database?currentSchema=public | 23 | url: jdbc:opengauss://ip:port/database?currentSchema=public&batchMode=off |
| 24 | username: dbuser | 24 | username: dbuser |
| 25 | password: dbpassword | 25 | password: dbpassword |
| 26 | druid: | 26 | druid: |
| @@ -13,7 +13,7 @@ spring: | |||
| 13 | datasource: | 13 | datasource: |
| 14 | type: com.alibaba.druid.pool.DruidDataSource | 14 | type: com.alibaba.druid.pool.DruidDataSource |
| 15 | driver-class-name: org.opengauss.Driver | 15 | driver-class-name: org.opengauss.Driver |
| 16 | url: jdbc:opengauss://127.0.0.1:5432/databasename?currentSchema=public | 16 | url: jdbc:opengauss://127.0.0.1:5432/databasename?currentSchema=public&batchMode=off |
| 17 | username: username | 17 | username: username |
| 18 | password: password | 18 | password: password |
| 19 | druid: | 19 | druid: |
| @@ -1,12 +1,17 @@ | |||
| 1 | <template> | 1 | <template> |
| 2 | <a-dropdown trigger="contextMenu" @select="actionSelect"> | 2 | <a-dropdown trigger="contextMenu" @select="actionSelect"> |
| 3 | <span class="arco-tag arco-tag-size-medium arco-tag-checked" | 3 | <span |
| 4 | :class="{ 'link-activated': itemData.fullPath === route.fullPath }" @click="goto(itemData)"> | 4 | class="arco-tag arco-tag-size-medium arco-tag-checked" |
| 5 | :class="{ 'link-activated': itemData.fullPath === route.fullPath }" | ||
| 6 | @click="goto(itemData)" | ||
| 7 | > | ||
| 5 | <span class="tag-link"> | 8 | <span class="tag-link"> |
| 6 | {{ itemData.title }} | 9 | {{ itemData.title }} |
| 7 | </span> | 10 | </span> |
| 8 | <span class="arco-icon-hover arco-tag-icon-hover arco-icon-hover-size-medium arco-tag-close-btn" | 11 | <span |
| 9 | @click.stop="tagClose(itemData, index)"> | 12 | class="arco-icon-hover arco-tag-icon-hover arco-icon-hover-size-medium arco-tag-close-btn" |
| 13 | @click.stop="tagClose(itemData, index)" | ||
| 14 | > | ||
| 10 | <icon-close /> | 15 | <icon-close /> |
| 11 | </span> | 16 | </span> |
| 12 | </span> | 17 | </span> |
| @@ -51,13 +56,13 @@ enum Eaction { | |||
| 51 | left = 'left', | 56 | left = 'left', |
| 52 | right = 'right', | 57 | right = 'right', |
| 53 | others = 'others', | 58 | others = 'others', |
| 54 | all = 'all', | 59 | all = 'all' |
| 55 | } | 60 | } |
| 56 | 61 | ||
| 57 | const props = defineProps({ | 62 | const props = defineProps({ |
| 58 | itemData: { | 63 | itemData: { |
| 59 | type: Object as PropType<TagProps>, | 64 | type: Object as PropType<TagProps>, |
| 60 | default () { | 65 | default() { |
| 61 | return [] | 66 | return [] |
| 62 | } | 67 | } |
| 63 | }, | 68 | }, |
| @@ -119,7 +124,7 @@ const actionSelect = (value: any) => { | |||
| 119 | } | 124 | } |
| 120 | tabBarStore.freshTabList(copyTagList) | 125 | tabBarStore.freshTabList(copyTagList) |
| 121 | if (currentRouteIdx < index) { | 126 | if (currentRouteIdx < index) { |
| 122 | router.push({ name: itemData.name }) | 127 | router.push({ path: itemData.fullPath, query: itemData.query }) |
| 123 | } | 128 | } |
| 124 | } else if (value === Eaction.right) { | 129 | } else if (value === Eaction.right) { |
| 125 | const currentRouteIdx = findCurrentRouteIndex() | 130 | const currentRouteIdx = findCurrentRouteIndex() |
| @@ -129,7 +134,7 @@ const actionSelect = (value: any) => { | |||
| 129 | } | 134 | } |
| 130 | tabBarStore.freshTabList(copyTagList) | 135 | tabBarStore.freshTabList(copyTagList) |
| 131 | if (currentRouteIdx > index) { | 136 | if (currentRouteIdx > index) { |
| 132 | router.push({ name: itemData.name }) | 137 | router.push({ path: itemData.fullPath, query: itemData.query }) |
| 133 | } | 138 | } |
| 134 | } else if (value === Eaction.others) { | 139 | } else if (value === Eaction.others) { |
| 135 | const filterList = tagList.value.filter((el, idx) => { | 140 | const filterList = tagList.value.filter((el, idx) => { |
| @@ -142,7 +147,7 @@ const actionSelect = (value: any) => { | |||
| 142 | return | 147 | return |
| 143 | } | 148 | } |
| 144 | tabBarStore.freshTabList(filterList) | 149 | tabBarStore.freshTabList(filterList) |
| 145 | router.push({ name: itemData.name }) | 150 | router.push({ path: itemData.fullPath, query: itemData.query }) |
| 146 | } else { | 151 | } else { |
| 147 | const removeTagList = tagList.value.filter((el, idx) => { | 152 | const removeTagList = tagList.value.filter((el, idx) => { |
| 148 | return idx !== 0 | 153 | return idx !== 0 |
| @@ -185,7 +190,7 @@ const hasSpecialTag = (removeTags: TagProps[]) => { | |||
| 185 | color: rgb(var(--link-6)); | 190 | color: rgb(var(--link-6)); |
| 186 | } | 191 | } |
| 187 | 192 | ||
| 188 | &+.arco-tag-close-btn { | 193 | & + .arco-tag-close-btn { |
| 189 | color: rgb(var(--link-6)); | 194 | color: rgb(var(--link-6)); |
| 190 | } | 195 | } |
| 191 | } | 196 | } |