This commit is contained in:
2025-09-19 14:25:20 +08:00
parent 269893a435
commit fbf3f77229
24949 changed files with 2839404 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var lodashUnified = require('lodash-unified');
const defaultProps = {
label: "label",
value: "value",
disabled: "disabled",
options: "options"
};
function useProps(props) {
const aliasProps = vue.computed(() => ({ ...defaultProps, ...props.props }));
const getLabel = (option) => lodashUnified.get(option, aliasProps.value.label);
const getValue = (option) => lodashUnified.get(option, aliasProps.value.value);
const getDisabled = (option) => lodashUnified.get(option, aliasProps.value.disabled);
const getOptions = (option) => lodashUnified.get(option, aliasProps.value.options);
return {
aliasProps,
getLabel,
getValue,
getDisabled,
getOptions
};
}
exports.defaultProps = defaultProps;
exports.useProps = useProps;
//# sourceMappingURL=useProps.js.map