优化商品属性的编辑按钮

This commit is contained in:
YunaiV 2023-08-21 10:34:10 +08:00
parent be485cc4ab
commit 1db98698bd

View File

@ -73,9 +73,7 @@
> >
编辑 编辑
</el-button> </el-button>
<el-button link type="primary"> <el-button link type="primary" @click="goValueList(scope.row.id)">属性值</el-button>
<router-link :to="'/property/value/' + scope.row.id">属性值</router-link>
</el-button>
<el-button <el-button
v-hasPermi="['product:property:delete']" v-hasPermi="['product:property:delete']"
link link
@ -103,6 +101,7 @@
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as PropertyApi from '@/api/mall/product/property' import * as PropertyApi from '@/api/mall/product/property'
import PropertyForm from './PropertyForm.vue' import PropertyForm from './PropertyForm.vue'
const { push } = useRouter()
defineOptions({ name: 'ProductProperty' }) defineOptions({ name: 'ProductProperty' })
@ -163,6 +162,11 @@ const handleDelete = async (id: number) => {
} catch {} } catch {}
} }
/** 跳转商品属性列表 */
const goValueList = (id: number) => {
push({ path: '/property/value/' + id })
}
/** 初始化 **/ /** 初始化 **/
onMounted(() => { onMounted(() => {
getList() getList()