71 lines
1.4 KiB
JavaScript
71 lines
1.4 KiB
JavaScript
import { Loading } from '@element-plus/icons-vue';
|
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
|
|
const buttonTypes = [
|
|
"default",
|
|
"primary",
|
|
"success",
|
|
"warning",
|
|
"info",
|
|
"danger",
|
|
"text",
|
|
""
|
|
];
|
|
const buttonNativeTypes = ["button", "submit", "reset"];
|
|
const buttonProps = buildProps({
|
|
size: useSizeProp,
|
|
disabled: Boolean,
|
|
type: {
|
|
type: String,
|
|
values: buttonTypes,
|
|
default: ""
|
|
},
|
|
icon: {
|
|
type: iconPropType
|
|
},
|
|
nativeType: {
|
|
type: String,
|
|
values: buttonNativeTypes,
|
|
default: "button"
|
|
},
|
|
loading: Boolean,
|
|
loadingIcon: {
|
|
type: iconPropType,
|
|
default: () => Loading
|
|
},
|
|
plain: {
|
|
type: Boolean,
|
|
default: void 0
|
|
},
|
|
text: {
|
|
type: Boolean,
|
|
default: void 0
|
|
},
|
|
link: Boolean,
|
|
bg: Boolean,
|
|
autofocus: Boolean,
|
|
round: {
|
|
type: Boolean,
|
|
default: void 0
|
|
},
|
|
circle: Boolean,
|
|
color: String,
|
|
dark: Boolean,
|
|
autoInsertSpace: {
|
|
type: Boolean,
|
|
default: void 0
|
|
},
|
|
tag: {
|
|
type: definePropType([String, Object]),
|
|
default: "button"
|
|
}
|
|
});
|
|
const buttonEmits = {
|
|
click: (evt) => evt instanceof MouseEvent
|
|
};
|
|
|
|
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes };
|
|
//# sourceMappingURL=button2.mjs.map
|