tangweijie 5099f2e87e Initial commit: Vue3 + TypeScript 前端项目
- Vue 3 + TypeScript + Element Plus 前端界面
- Pinia 状态管理
- Vue Router 4 路由管理
- Axios HTTP 客户端
- MSW (Mock Service Worker) 开发环境模拟
- 账户管理界面 (列表、详情、三科目余额展示)
- 交易管理界面 (列表、详情)
- 对账管理界面 (三账校验)
- 完善的 API 客户端封装
- Docker 容器化配置
- Nginx 配置用于生产环境
2026-01-05 17:57:11 +08:00

61 lines
1.8 KiB
JavaScript

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var lodashUnified = require('lodash-unified');
var shared = require('@vue/shared');
const epPropKey = "__epPropKey";
const definePropType = (val) => val;
const isEpProp = (val) => shared.isObject(val) && !!val[epPropKey];
const buildProp = (prop, key) => {
if (!shared.isObject(prop) || isEpProp(prop))
return prop;
const { values, required, default: defaultValue, type, validator } = prop;
const _validator = values || validator ? (val) => {
let valid = false;
let allowedValues = [];
if (values) {
allowedValues = Array.from(values);
if (shared.hasOwn(prop, "default")) {
allowedValues.push(defaultValue);
}
valid || (valid = allowedValues.includes(val));
}
if (validator)
valid || (valid = validator(val));
if (!valid && allowedValues.length > 0) {
const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
vue.warn(
`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(
val
)}.`
);
}
return valid;
} : void 0;
const epProp = {
type,
required: !!required,
validator: _validator,
[epPropKey]: true
};
if (shared.hasOwn(prop, "default"))
epProp.default = defaultValue;
return epProp;
};
const buildProps = (props) => lodashUnified.fromPairs(
Object.entries(props).map(([key, option]) => [
key,
buildProp(option, key)
])
);
exports.buildProp = buildProp;
exports.buildProps = buildProps;
exports.definePropType = definePropType;
exports.epPropKey = epPropKey;
exports.isEpProp = isEpProp;
//# sourceMappingURL=runtime.js.map