From 8b6e71922e81c926601008dd1fd0a5c4d8a3e76c 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: Tue, 9 Aug 2022 17:31:37 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(component):=20=E6=96=B0=E5=A2=9E=20ta?= =?UTF-8?q?ble=20=E7=BB=84=E4=BB=B6=20loading=20=E5=B1=9E=E6=80=A7,=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8A=A0=E8=BD=BD=E8=BF=87=E6=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/src/component/input/index.vue | 8 ++- .../src/component/input/svg/Password.vue | 20 +++++- .../src/component/input/svg/unPassword.vue | 17 ++++- .../component/src/component/table/index.less | 10 +++ .../component/src/component/table/index.vue | 11 ++- .../src/document/zh-CN/components/table.md | 71 +++++++++++++++++++ 6 files changed, 129 insertions(+), 8 deletions(-) diff --git a/package/component/src/component/input/index.vue b/package/component/src/component/input/index.vue index cca33b2e..67ed8b85 100644 --- a/package/component/src/component/input/index.vue +++ b/package/component/src/component/input/index.vue @@ -10,7 +10,7 @@ import { LayIcon } from "@layui/icons-vue"; import { computed, ref, useSlots, watch } from "vue"; import { useI18n } from "../../language"; import PasswordIcon from "./svg/Password.vue"; -import UnPasswordIcon from "./svg/unPassword.vue" +import UnPasswordIcon from "./svg/unPassword.vue"; export interface LayInputProps { name?: string; @@ -159,7 +159,11 @@ const showPassword = () => { class="layui-input-suffix-icon" > - + diff --git a/package/component/src/component/input/svg/Password.vue b/package/component/src/component/input/svg/Password.vue index 4380c6c6..6499c4ed 100644 --- a/package/component/src/component/input/svg/Password.vue +++ b/package/component/src/component/input/svg/Password.vue @@ -1,3 +1,19 @@ \ No newline at end of file + + diff --git a/package/component/src/component/input/svg/unPassword.vue b/package/component/src/component/input/svg/unPassword.vue index bb6b95db..dcda4de1 100644 --- a/package/component/src/component/input/svg/unPassword.vue +++ b/package/component/src/component/input/svg/unPassword.vue @@ -1,3 +1,16 @@ \ No newline at end of file + + diff --git a/package/component/src/component/table/index.less b/package/component/src/component/table/index.less index ec2540ac..149f6b6a 100644 --- a/package/component/src/component/table/index.less +++ b/package/component/src/component/table/index.less @@ -576,4 +576,14 @@ .layui-table-cell-expand { word-break: break-all; +} + +.layui-table-loading { + height: 80px; + text-align: center; + line-height: 70px; +} + +.layui-table-loading .layui-icon { + font-size: 26px; } \ No newline at end of file diff --git a/package/component/src/component/table/index.vue b/package/component/src/component/table/index.vue index b2b6b185..7ef9696f 100644 --- a/package/component/src/component/table/index.vue +++ b/package/component/src/component/table/index.vue @@ -49,6 +49,7 @@ export interface LayTableProps { spanMethod?: Function; defaultExpandAll?: boolean; expandKeys?: Recordable[]; + loading?: boolean; } const props = withDefaults(defineProps(), { @@ -69,6 +70,7 @@ const props = withDefaults(defineProps(), { defaultExpandAll: false, spanMethod: () => {}, expandKeys: () => [], + loading: false }); const tableId = uuidv4(); @@ -708,8 +710,8 @@ const renderTotalRowCell = (column: any) => { ref="tableBody" > {
- + +
diff --git a/package/document-component/src/document/zh-CN/components/table.md b/package/document-component/src/document/zh-CN/components/table.md index 3fb78076..6537e04e 100644 --- a/package/document-component/src/document/zh-CN/components/table.md +++ b/package/document-component/src/document/zh-CN/components/table.md @@ -1223,6 +1223,77 @@ export default { ::: +::: title 复杂表头 +::: + +::: demo 通过 `span-method` 属性, 自定义行列合并的逻辑。 + + + + + +::: + ::: title 完整表格 :::