鍒濆鎻愪氦锛氱墰鍙暟鎹鐞嗙郴缁?- 鍖呭惈鍚庣Spring Boot鍜屽墠绔疺ue3椤圭洰
This commit is contained in:
77
admin-system/node_modules/element-plus/es/components/switch/src/switch.mjs
generated
vendored
Normal file
77
admin-system/node_modules/element-plus/es/components/switch/src/switch.mjs
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
import { isValidComponentSize } from '../../../utils/vue/validator.mjs';
|
||||
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
||||
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
||||
import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
|
||||
import { UPDATE_MODEL_EVENT, CHANGE_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
|
||||
import { isBoolean, isNumber } from '../../../utils/types.mjs';
|
||||
import { isString } from '@vue/shared';
|
||||
|
||||
const switchProps = buildProps({
|
||||
modelValue: {
|
||||
type: [Boolean, String, Number],
|
||||
default: false
|
||||
},
|
||||
disabled: Boolean,
|
||||
loading: Boolean,
|
||||
size: {
|
||||
type: String,
|
||||
validator: isValidComponentSize
|
||||
},
|
||||
width: {
|
||||
type: [String, Number],
|
||||
default: ""
|
||||
},
|
||||
inlinePrompt: Boolean,
|
||||
inactiveActionIcon: {
|
||||
type: iconPropType
|
||||
},
|
||||
activeActionIcon: {
|
||||
type: iconPropType
|
||||
},
|
||||
activeIcon: {
|
||||
type: iconPropType
|
||||
},
|
||||
inactiveIcon: {
|
||||
type: iconPropType
|
||||
},
|
||||
activeText: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
inactiveText: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
activeValue: {
|
||||
type: [Boolean, String, Number],
|
||||
default: true
|
||||
},
|
||||
inactiveValue: {
|
||||
type: [Boolean, String, Number],
|
||||
default: false
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
validateEvent: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
beforeChange: {
|
||||
type: definePropType(Function)
|
||||
},
|
||||
id: String,
|
||||
tabindex: {
|
||||
type: [String, Number]
|
||||
},
|
||||
...useAriaProps(["ariaLabel"])
|
||||
});
|
||||
const switchEmits = {
|
||||
[UPDATE_MODEL_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
|
||||
[CHANGE_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
|
||||
[INPUT_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val)
|
||||
};
|
||||
|
||||
export { switchEmits, switchProps };
|
||||
//# sourceMappingURL=switch.mjs.map
|
||||
Reference in New Issue
Block a user