Skip to content

Commit 1db9869

Browse files
committed
优化商品属性的编辑按钮
1 parent be485cc commit 1db9869

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/views/mall/product/property/index.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@
7373
>
7474
编辑
7575
</el-button>
76-
<el-button link type="primary">
77-
<router-link :to="'/property/value/' + scope.row.id">属性值</router-link>
78-
</el-button>
76+
<el-button link type="primary" @click="goValueList(scope.row.id)">属性值</el-button>
7977
<el-button
8078
v-hasPermi="['product:property:delete']"
8179
link
@@ -103,6 +101,7 @@
103101
import { dateFormatter } from '@/utils/formatTime'
104102
import * as PropertyApi from '@/api/mall/product/property'
105103
import PropertyForm from './PropertyForm.vue'
104+
const { push } = useRouter()
106105
107106
defineOptions({ name: 'ProductProperty' })
108107
@@ -163,6 +162,11 @@ const handleDelete = async (id: number) => {
163162
} catch {}
164163
}
165164
165+
/** 跳转商品属性列表 */
166+
const goValueList = (id: number) => {
167+
push({ path: '/property/value/' + id })
168+
}
169+
166170
/** 初始化 **/
167171
onMounted(() => {
168172
getList()

0 commit comments

Comments
 (0)