diff --git a/src/layout/components/TagsView/src/TagsView.vue b/src/layout/components/TagsView/src/TagsView.vue
index af492ba2..69f94bfb 100644
--- a/src/layout/components/TagsView/src/TagsView.vue
+++ b/src/layout/components/TagsView/src/TagsView.vue
@@ -255,6 +255,15 @@ const canShowIcon = (item: RouteLocationNormalizedLoaded) => {
return false
}
+const closeTabOnMouseMidClick = (e: MouseEvent, item) => {
+ // 中键:button === 1
+ if (e.button === 1) {
+ e.preventDefault()
+ e.stopPropagation()
+ closeSelectedTag(item)
+ }
+}
+
onBeforeMount(() => {
initTags()
addTags()
@@ -293,6 +302,7 @@ watch(
v-for="item in visitedViews"
:key="item.fullPath"
:ref="itemRefs.set"
+ @auxclick="closeTabOnMouseMidClick($event, item)"
:class="[
`${prefixCls}__item`,
tagsViewImmerse ? `${prefixCls}__item--immerse` : '',
diff --git a/src/views/mall/product/spu/form/InfoForm.vue b/src/views/mall/product/spu/form/InfoForm.vue
index 52a1f5ca..77e8c8e0 100644
--- a/src/views/mall/product/spu/form/InfoForm.vue
+++ b/src/views/mall/product/spu/form/InfoForm.vue
@@ -23,6 +23,7 @@
filterable
placeholder="请选择商品分类"
/>
+
@@ -33,6 +34,7 @@
:value="item.id as number"
/>
+
@@ -67,6 +69,7 @@ import * as ProductCategoryApi from '@/api/mall/product/category'
import { CategoryVO } from '@/api/mall/product/category'
import * as ProductBrandApi from '@/api/mall/product/brand'
import { BrandVO } from '@/api/mall/product/brand'
+import { RefreshRight } from '@element-plus/icons-vue'
defineOptions({ name: 'ProductSpuInfoForm' })
const props = defineProps({
@@ -132,11 +135,19 @@ defineExpose({ validate })
/** 初始化 */
const brandList = ref([]) // 商品品牌列表
const categoryList = ref([]) // 商品分类树
-onMounted(async () => {
+async function refreshCategoryList() {
// 获得分类树
const data = await ProductCategoryApi.getCategoryList({})
categoryList.value = handleTree(data, 'id')
- // 获取商品品牌列表
+}
+
+async function refreshBrandList() {
brandList.value = await ProductBrandApi.getSimpleBrandList()
+}
+
+onMounted(async () => {
+ await refreshCategoryList()
+ // 获取商品品牌列表
+ await refreshBrandList()
})