From 5ee7e6cde5d728745c9f3571218fff298ff21d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=99=8C?= Date: Tue, 9 Jan 2024 13:56:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96table=20=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E4=B8=8E=E7=BC=96=E8=BE=91,=E7=BB=9F=E8=AE=A1=E7=9A=84?= =?UTF-8?q?=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/xAvatar/index.vue | 7 +++++-- src/components/xTable/columnItem.vue | 10 +++------- src/components/xTable/index.vue | 12 +++++------- src/components/xUpdate/index.vue | 23 ++++++++++------------- src/views/table/1/index.vue | 17 +++-------------- src/views/table/2/index.vue | 14 +++----------- 6 files changed, 29 insertions(+), 54 deletions(-) diff --git a/src/components/xAvatar/index.vue b/src/components/xAvatar/index.vue index 47b5154..aa77c77 100644 --- a/src/components/xAvatar/index.vue +++ b/src/components/xAvatar/index.vue @@ -22,12 +22,15 @@ export default { props: { data: { type: Object, default: () => { } }, - options: { type: Object, default: () => { } }, + options: { + type: Object, default: () => ({ + subfield: 'nickname' + }) + }, name: { type: String, default: "avatar" }, }, data() { return { - // data: this.modelValue, copiedData: this.data, visible: false, } diff --git a/src/components/xTable/columnItem.vue b/src/components/xTable/columnItem.vue index a7a6a11..27e051e 100644 --- a/src/components/xTable/columnItem.vue +++ b/src/components/xTable/columnItem.vue @@ -58,13 +58,12 @@ export default { // 打开新窗口链接 if (item.open && item.open.name && row[item.open.name]?.trim()) { - window.open(row[item.open.name], "_blank"); + window.open(row[item.open.name], item.open.target || "_blank"); return; } // 打开编辑层 else if (item.update && (item.update.url || item.update.name)) { - var options = Object.assign({ name: item.update.name || item.label, remoteurl: item.update.url || 'table/getUpdate?name=' + item.update.name }, item.update); - this.$emit('xtablehandleClick', row, options, 'update'); + this.$emit('xtablehandleClick', row, Object.assign({ name: item.update.name || item.label, remoteurl: item.update.url || 'table/getUpdate?name=' + item.update.name }, item.update), 'update'); return; } // 统计 @@ -74,10 +73,7 @@ export default { } // 打开表格 else if (item.table && (item.table.url || item.table.name)) { - this.$emit('xtablehandleClick', row, { - name: item.table.name || item.name, - remoteurl: item.table.url || 'table/get?name=' + item.table.name - }, item.table.type || 'dialog', 'table'); + this.$emit('xtablehandleClick', row, Object.assign({ name: item.table.name || item.label, remoteurl: item.table.url || 'table/get?name=' + item.table.name }, item.table), 'table'); return; } else if (item.http && item.http.url && item.http.key && String(row[item.http.key])?.trim()) { diff --git a/src/components/xTable/index.vue b/src/components/xTable/index.vue index fd38061..54369d5 100644 --- a/src/components/xTable/index.vue +++ b/src/components/xTable/index.vue @@ -34,9 +34,9 @@ - + - +