commit
52595132ad
@ -17,6 +17,7 @@ export interface LayButtonProps {
|
|||||||
disabled?: boolean | string;
|
disabled?: boolean | string;
|
||||||
loading?: boolean | string;
|
loading?: boolean | string;
|
||||||
nativeType?: "button" | "submit" | "reset";
|
nativeType?: "button" | "submit" | "reset";
|
||||||
|
icon?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<LayButtonProps>(), {
|
const props = withDefaults(defineProps<LayButtonProps>(), {
|
||||||
@ -25,6 +26,7 @@ const props = withDefaults(defineProps<LayButtonProps>(), {
|
|||||||
loading: false,
|
loading: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
nativeType: "button",
|
nativeType: "button",
|
||||||
|
icon: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(["click"]);
|
const emit = defineEmits(["click"]);
|
||||||
@ -58,6 +60,7 @@ const classes = computed(() => {
|
|||||||
:type="nativeType"
|
:type="nativeType"
|
||||||
@click="onClick"
|
@click="onClick"
|
||||||
>
|
>
|
||||||
|
<i v-if="icon" :class="'layui-icon ' + icon"></i>
|
||||||
<i
|
<i
|
||||||
v-if="loading"
|
v-if="loading"
|
||||||
class="layui-icon layui-icon-loading-one layui-anim layui-anim-rotate layui-anim-loop"
|
class="layui-icon layui-icon-loading-one layui-anim layui-anim-rotate layui-anim-loop"
|
||||||
|
Loading…
Reference in New Issue
Block a user