diff --git a/docs/docs/zh-CN/components/switch.md b/docs/docs/zh-CN/components/switch.md index 0d2c37e7..e90d9122 100644 --- a/docs/docs/zh-CN/components/switch.md +++ b/docs/docs/zh-CN/components/switch.md @@ -3,6 +3,29 @@ ::: demo + + + + +::: + +::: title 基础使用 +::: + +::: demo + diff --git a/docs/docs/zh-CN/guide/norms.md b/docs/docs/zh-CN/guide/norms.md index 1c7a3f8e..2531f05a 100644 --- a/docs/docs/zh-CN/guide/norms.md +++ b/docs/docs/zh-CN/guide/norms.md @@ -1,2 +1,2 @@ ::: title 开发规范 -::: +::: \ No newline at end of file diff --git a/docs/src/view/guide.vue b/docs/src/view/guide.vue index c38796b5..47d02483 100644 --- a/docs/src/view/guide.vue +++ b/docs/src/view/guide.vue @@ -86,6 +86,12 @@ export default { subTitle: 'change log', path: '/zh-CN/guide/changelog', }, + { + id: 4, + title: '规范', + subTitle: 'norms', + path: '/zh-CN/guide/norms' + } ], }, ] diff --git a/src/module/button/index.vue b/src/module/button/index.vue index d91e8fa5..64803050 100644 --- a/src/module/button/index.vue +++ b/src/module/button/index.vue @@ -11,19 +11,19 @@ import { computed } from "vue"; export interface LayButtonProps { type?: "primary" | "normal" | "warm" | "danger"; size?: "lg" | "sm" | "xs"; - fluid?: boolean; - radius?: boolean; + fluid?: boolean | string; + radius?: boolean | string; border?: "green" | "blue" | "orange" | "red" | "black"; - disabled?: boolean; - loading?: boolean; + disabled?: boolean | string; + loading?: boolean | string; nativeType?: "button" | "submit" | "reset"; } const props = withDefaults(defineProps(), { fluid: false, radius: false, - disabled: false, loading: false, + disabled: false, nativeType: "button", }); @@ -43,7 +43,7 @@ const classes = computed(() => { { 'layui-btn-fluid': fluid, 'layui-btn-radius': radius, - 'layui-btn-disabled': disabled + 'layui-btn-disabled': disabled, }, classes, ]" diff --git a/src/module/layer/index.vue b/src/module/layer/index.vue index a8505836..2136ab06 100644 --- a/src/module/layer/index.vue +++ b/src/module/layer/index.vue @@ -83,129 +83,128 @@ diff --git a/src/module/switch/index.vue b/src/module/switch/index.vue index 4becd107..00faa687 100644 --- a/src/module/switch/index.vue +++ b/src/module/switch/index.vue @@ -5,27 +5,37 @@ export default { @@ -35,11 +45,12 @@ const handleClick = function () {
- {{ modelValue == true ? activeText : inactiveText }} + {{ isActive == true ? activeText : inactiveText }}