This commit is contained in:
2025-09-24 20:35:15 +08:00
parent 39679f7330
commit 8a458ff0a4
12033 changed files with 1537546 additions and 13292 deletions

View File

@@ -0,0 +1,26 @@
import { computed } from 'vue';
import { get } from 'lodash-unified';
const defaultProps = {
label: "label",
value: "value",
disabled: "disabled",
options: "options"
};
function useProps(props) {
const aliasProps = computed(() => ({ ...defaultProps, ...props.props }));
const getLabel = (option) => get(option, aliasProps.value.label);
const getValue = (option) => get(option, aliasProps.value.value);
const getDisabled = (option) => get(option, aliasProps.value.disabled);
const getOptions = (option) => get(option, aliasProps.value.options);
return {
aliasProps,
getLabel,
getValue,
getDisabled,
getOptions
};
}
export { defaultProps, useProps };
//# sourceMappingURL=useProps.mjs.map