表格跳转处理

This commit is contained in:
gary.fu
2024-01-04 11:06:38 +08:00
parent f64ad3573c
commit 5355e4fd3e
6 changed files with 90 additions and 22 deletions

View File

@@ -119,10 +119,10 @@ defineExpose({
{{ $t('common.label.reset') }}
</el-button>
<el-button
v-if="showBack"
v-if="showBack||backUrl"
@click="backUrl?$router.push(backUrl):$router.go(-1)"
>
{{ $t('common.label.reset') }}
{{ $t('common.label.back') }}
</el-button>
<slot
:form="form"

View File

@@ -10,7 +10,6 @@
* @property {string} slot 自定义插槽
* @property [ButtonProps] buttons 自定义按钮
* @property {Object} attrs 其他属性
* @property {string} link 链接地址
* @property {Object} linkAttrs 链接配置
* @method click 点击事件
* @method formatter 格式化
@@ -47,15 +46,14 @@ const props = defineProps({
:formatter="column.formatter"
>
<template
v-if="column.slot||column.link||column.click"
v-if="column.slot||column.click"
#default="scope"
>
<el-link
v-if="column.link||column.click"
:href="column.link"
v-if="column.click"
type="primary"
v-bind="column.linkAttrs"
@click="column.click&&column.click(scope.row, scope)"
@click="column.click(scope.row, scope)"
>
{{ scope.row[column.property] }}
</el-link>