From 8675da453fc3cc5f12251d0d44ea03c45cfdf3f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Mon, 6 Feb 2023 15:36:02 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96table=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=BB=98=E8=AE=A4=E7=9A=84=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../compenents/el-data-table/el-data-table.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/DataTable/compenents/el-data-table/el-data-table.vue b/src/components/DataTable/compenents/el-data-table/el-data-table.vue index 227403eb9..cbbecb158 100644 --- a/src/components/DataTable/compenents/el-data-table/el-data-table.vue +++ b/src/components/DataTable/compenents/el-data-table/el-data-table.vue @@ -361,28 +361,36 @@ export default { */ newText: { type: String, - default: this.$t('ops.Add') + default: function() { + return this.$t('ops.Add') + } }, /** * 修改按钮文案 */ editText: { type: String, - default: this.$t('ops.Modify') + default: function() { + return this.$t('ops.Modify') + } }, /** * 查看按钮文案 */ viewText: { type: String, - default: this.$t('ops.View') + default: function() { + return this.$t('ops.View') + } }, /** * 删除按钮文案 */ deleteText: { type: String, - default: this.$t('ops.Delete') + default: function() { + return this.$t('ops.Delete') + } }, /** * 删除提示语。接受要删除的数据(单个对象或数组);返回字符串