From 06d109dcef7d4628b13b7333e070c9134e9d2e68 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: Sun, 7 Aug 2022 02:32:47 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(button):=20=E6=96=B0=E5=A2=9E=20loadi?= =?UTF-8?q?ng-icon=20=E5=B1=9E=E6=80=A7,=20=E5=85=81=E8=AE=B8=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=8A=A0=E8=BD=BD=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/src/component/button/index.vue | 5 +++- .../component/src/component/page/index.vue | 7 ++--- .../component/src/component/table/index.vue | 2 +- .../src/document/zh-CN/components/button.md | 30 ++++++++++--------- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/package/component/src/component/button/index.vue b/package/component/src/component/button/index.vue index 47d71af8..0cb259f5 100644 --- a/package/component/src/component/button/index.vue +++ b/package/component/src/component/button/index.vue @@ -22,6 +22,7 @@ export interface LayButtonProps { size?: ButtonSize; prefixIcon?: String; suffixIcon?: String; + loadingIcon?: String; border?: ButtonBorder; fluid?: BooleanOrString; radius?: BooleanOrString; @@ -36,6 +37,7 @@ const props = withDefaults(defineProps(), { radius: false, loading: false, disabled: false, + loadingIcon: "layui-icon-loading-one", nativeType: "button", borderStyle: "soild", }); @@ -79,7 +81,8 @@ const classes = computed(() => { diff --git a/package/component/src/component/page/index.vue b/package/component/src/component/page/index.vue index c11da399..fe22069f 100644 --- a/package/component/src/component/page/index.vue +++ b/package/component/src/component/page/index.vue @@ -24,10 +24,6 @@ export interface LayPageProps { limits?: number[]; } -const slots = useSlots(); - -const { t } = useI18n(); - const props = withDefaults(defineProps(), { limit: 10, theme: "green", @@ -42,6 +38,9 @@ const props = withDefaults(defineProps(), { limits: () => [10, 20, 30, 40, 50], }); +const { t } = useI18n(); +const slots = useSlots(); + const limits = ref(props.limits); const pages = Math.floor(props.pages / 2); diff --git a/package/component/src/component/table/index.vue b/package/component/src/component/table/index.vue index 231a5a33..88ba9b07 100644 --- a/package/component/src/component/table/index.vue +++ b/package/component/src/component/table/index.vue @@ -58,7 +58,7 @@ const props = withDefaults(defineProps(), { childrenColumnName: "children", dataSource: () => [], selectedKeys: () => [], - selectedKey: '', + selectedKey: "", maxHeight: "auto", even: false, rowClassName: "", diff --git a/package/document-component/src/document/zh-CN/components/button.md b/package/document-component/src/document/zh-CN/components/button.md index 6ba6cea1..65eadf56 100644 --- a/package/document-component/src/document/zh-CN/components/button.md +++ b/package/document-component/src/document/zh-CN/components/button.md @@ -119,7 +119,7 @@ export default { ::: title 流式按钮 ::: -::: demo 使用 `fluid` 属性, 创建最大化按钮 +::: demo 使用 `fluid` 属性, 使其适合父最大宽度