|
@@ -1,4 +1,3 @@
|
|
|
-import router from '@/router'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
|
|
|
export const useTable = (props: any, emits: any) => {
|
|
@@ -49,6 +48,7 @@ export const useTable = (props: any, emits: any) => {
|
|
|
const doCreate = () => {
|
|
|
emits('click-create')
|
|
|
if (formRoute.value) {
|
|
|
+ const router = useRouter()
|
|
|
router.push(formRoute.value)
|
|
|
} else {
|
|
|
formData.value = {}
|
|
@@ -79,6 +79,7 @@ export const useTable = (props: any, emits: any) => {
|
|
|
const useRecordData = (row: any, disabled: boolean) => {
|
|
|
|
|
|
if (formRoute.value) {
|
|
|
+ const router = useRouter()
|
|
|
router.push(formRoute.value)
|
|
|
} else {
|
|
|
if (props.crud?.getRecord) {
|