From 472611134c6520d6a4b5a208389d94d12b971def Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期二, 24 九月 2024 09:28:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
admin/src/components/base/BaseTable.vue | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/admin/src/components/base/BaseTable.vue b/admin/src/components/base/BaseTable.vue
index e738f2d..7aea229 100644
--- a/admin/src/components/base/BaseTable.vue
+++ b/admin/src/components/base/BaseTable.vue
@@ -51,7 +51,13 @@
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)
+ }
+ // this.api = require('@/api' + extParams.api)
extParams.module && (this.module = extParams.module)
extParams['field.id'] && (this.configData['field.id'] = extParams['field.id'])
extParams['field.main'] && (this.configData['field.main'] = extParams['field.main'])
@@ -126,7 +132,7 @@
this.tableData.pagination.total = data.total
})
.catch(e => {
- this.$tip.apiFailed(e)
+ // this.$tip.apiFailed(e)
})
.finally(() => {
this.isWorking.search = false
@@ -135,9 +141,11 @@
// 鍒犻櫎
deleteById (row, childConfirm = true) {
this.__checkApi()
- let message = `纭鍒犻櫎${this.module}銆�${row[this.configData['field.main']]}銆戝悧?`
+ // let message = `纭鍒犻櫎${this.module}銆�${row[this.configData['field.main']]}銆戝悧?`
+ let message = `纭鍒犻櫎璇ヨ褰曞悧?`
if (childConfirm && row.children != null && row.children.length > 0) {
- message = `纭鍒犻櫎${this.module}銆�${row[this.configData['field.main']]}銆戝強鍏跺瓙${this.module}鍚�?`
+ // message = `纭鍒犻櫎${this.module}銆�${row[this.configData['field.main']]}銆戝強鍏跺瓙${this.module}鍚�?`
+ message = `纭鍒犻櫎璇ヨ褰曞強鍏跺瓙鏁版嵁鍚�?`
}
this.$dialog.deleteConfirm(message)
.then(() => {
@@ -148,7 +156,7 @@
this.__afterDelete()
})
.catch(e => {
- this.$tip.apiFailed(e)
+ // this.$tip.apiFailed(e)
})
.finally(() => {
this.isWorking.delete = false
@@ -175,7 +183,7 @@
}
}
if (containChildrenRows.length > 0) {
- message = `鏈灏嗗垹闄�${this.module}銆�${containChildrenRows.join('銆�')}銆戝強鍏跺瓙${this.module}璁板綍锛岀‘璁ゅ垹闄ゅ悧锛焋
+ message = '鏈灏嗗垹闄よ鏁版嵁鍙婂叾瀛愭暟鎹紝纭鍒犻櫎鍚楋紵'
}
}
this.$dialog.deleteConfirm(message)
@@ -187,7 +195,7 @@
this.__afterDelete(this.tableData.selectedRows.length)
})
.catch(e => {
- this.$tip.apiFailed(e)
+ // this.$tip.apiFailed(e)
})
.finally(() => {
this.isWorking.delete = false
--
Gitblit v1.9.3