From f3c59a17062fb0a89b5f89b7845341386952a6b1 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期三, 24 九月 2025 16:01:06 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
admin/src/components/base/BaseOpera.vue | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/admin/src/components/base/BaseOpera.vue b/admin/src/components/base/BaseOpera.vue
index 70681bd..697e7f5 100644
--- a/admin/src/components/base/BaseOpera.vue
+++ b/admin/src/components/base/BaseOpera.vue
@@ -1,6 +1,5 @@
<script>
export default {
- name: 'BaseOpera',
data () {
return {
title: '',
@@ -14,6 +13,16 @@
}
}
},
+ // watch: {
+ // visible() {
+ // console.log(this.visible);
+ // }
+ // },
+ watch: {
+ $route (to, from) {
+ this.close()
+ }
+ },
methods: {
// 閰嶇疆
config (extParams = {}) {
@@ -23,7 +32,11 @@
if (extParams.api == null) {
throw new Error('Missing config option \'api\'.')
}
- this.api = require('@/api' + extParams.api)
+ if(extParams.api.indexOf('@/',0) === 0){
+ this.api = require(extParams.api)
+ }else {
+ this.api = require('@/api' + extParams.api)
+ }
extParams['field.id'] && (this.configData['field.id'] = extParams['field.id'])
},
/**
@@ -49,6 +62,9 @@
}
})
},
+ close () {
+ this.visible = false
+ },
// 纭鏂板缓/淇敼
confirm () {
if (this.form.id == null || this.form.id === '') {
@@ -60,9 +76,12 @@
// 纭鏂板缓
__confirmCreate () {
this.$refs.form.validate((valid) => {
+ // debugger
if (!valid) {
return
}
+ // console.log(this.form);
+ // debugger
// 璋冪敤鏂板缓鎺ュ彛
this.isWorking = true
this.api.create(this.form)
@@ -72,7 +91,7 @@
this.$emit('success')
})
.catch(e => {
- this.$tip.apiFailed(e)
+ // this.$tip.apiFailed(e)
})
.finally(() => {
this.isWorking = false
@@ -94,7 +113,7 @@
this.$emit('success')
})
.catch(e => {
- this.$tip.apiFailed(e)
+ // this.$tip.apiFailed(e)
})
.finally(() => {
this.isWorking = false
--
Gitblit v1.9.3