增加admin管理帐号和项目的界面--初步实现

This commit is contained in:
Cheng Zhou
2025-12-17 20:12:49 +08:00
parent 4f50237f56
commit c074c2b5bc
18933 changed files with 2088454 additions and 63 deletions
@@ -0,0 +1,38 @@
'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.ref({ ...defaultProps, ...props.props });
let cache = { ...props.props };
vue.watch(() => props.props, (val) => {
if (!lodashUnified.isEqual(val, cache)) {
aliasProps.value = { ...defaultProps, ...val };
cache = { ...val };
}
}, { deep: true });
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