From 48cacb8d91f02ddc2714e6a3ec49bca93f9624bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Fri, 5 Aug 2022 15:29:08 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(button):=20=E4=BC=98=E5=8C=96=20index?= =?UTF-8?q?.less?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/src/component/button/index.less | 16 +- .../src/component/table/TableRow.vue | 4 +- .../component/src/component/table/index.vue | 199 +++++++++++++----- 3 files changed, 153 insertions(+), 66 deletions(-) diff --git a/package/component/src/component/button/index.less b/package/component/src/component/button/index.less index ded28f19..7b88c9b6 100644 --- a/package/component/src/component/button/index.less +++ b/package/component/src/component/button/index.less @@ -33,13 +33,6 @@ cursor: pointer; } -.layui-btn:not(.layui-btn-disabled){ - :hover, - :active { - color: #333; - } -} - .layui-btn-primary { color: var(--button-primary-text-color); background-color: var(--button-primary-background-color); @@ -64,12 +57,17 @@ border-color: var(--button-danger-border-color); } -.layui-btn-primary:hover, -.layui-btn-normal:hover, +.layui-btn:hover { + color: #333; +} + .layui-btn-warm:hover, +.layui-btn-normal:hover, +.layui-btn-primary:hover, .layui-btn-danger:hover { opacity: 0.8; filter: alpha(opacity=80); + color: white; } .layui-btn-lg { diff --git a/package/component/src/component/table/TableRow.vue b/package/component/src/component/table/TableRow.vue index f2ff3217..9cc74fe5 100644 --- a/package/component/src/component/table/TableRow.vue +++ b/package/component/src/component/table/TableRow.vue @@ -84,7 +84,9 @@ const tableSelectedKey: WritableComputedRef = computed({ const isExpand: WritableComputedRef = computed({ get() { - return tableExpandAll.value ? true : tableExpandKeys.value.includes(props.data[props.id]); + return tableExpandAll.value + ? true + : tableExpandKeys.value.includes(props.data[props.id]); }, set(val) { let newTableExpandKeys = [...tableExpandKeys.value]; diff --git a/package/component/src/component/table/index.vue b/package/component/src/component/table/index.vue index b7812640..7b3c5127 100644 --- a/package/component/src/component/table/index.vue +++ b/package/component/src/component/table/index.vue @@ -65,7 +65,7 @@ const props = withDefaults(defineProps(), { rowStyle: "", cellStyle: "", defaultExpandAll: false, - spanMethod: () => { }, + spanMethod: () => {}, expandKeys: () => [], }); @@ -164,11 +164,13 @@ watch( { deep: true, immediate: true } ); -watch(tableExpandKeys, () => { - emit("update:expandKeys", tableExpandKeys.value); -}, +watch( + tableExpandKeys, + () => { + emit("update:expandKeys", tableExpandKeys.value); + }, { deep: true, immediate: true } -) +); const change = function (page: any) { emit("change", page); @@ -207,7 +209,7 @@ const exportData = () => { throw new Error("exception"); } }); - } catch (e) { } + } catch (e) {} }); tableDataSource.value.forEach((item) => { let obj: any = []; @@ -439,15 +441,31 @@ const renderTotalRowCell = (column: any) => { -
+
-
+
@@ -455,40 +473,59 @@ const renderTotalRowCell = (column: any) => {
-
+
-