- Vue 3 + TypeScript + Element Plus 前端界面 - Pinia 状态管理 - Vue Router 4 路由管理 - Axios HTTP 客户端 - MSW (Mock Service Worker) 开发环境模拟 - 账户管理界面 (列表、详情、三科目余额展示) - 交易管理界面 (列表、详情) - 对账管理界面 (三账校验) - 完善的 API 客户端封装 - Docker 容器化配置 - Nginx 配置用于生产环境
91 lines
1.9 KiB
JavaScript
91 lines
1.9 KiB
JavaScript
import { StarFilled, Star } from '@element-plus/icons-vue';
|
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
import { mutable } from '../../../utils/typescript.mjs';
|
|
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
|
|
import { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
import { isNumber } from '../../../utils/types.mjs';
|
|
|
|
const rateProps = buildProps({
|
|
modelValue: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
id: {
|
|
type: String,
|
|
default: void 0
|
|
},
|
|
lowThreshold: {
|
|
type: Number,
|
|
default: 2
|
|
},
|
|
highThreshold: {
|
|
type: Number,
|
|
default: 4
|
|
},
|
|
max: {
|
|
type: Number,
|
|
default: 5
|
|
},
|
|
colors: {
|
|
type: definePropType([Array, Object]),
|
|
default: () => mutable(["", "", ""])
|
|
},
|
|
voidColor: {
|
|
type: String,
|
|
default: ""
|
|
},
|
|
disabledVoidColor: {
|
|
type: String,
|
|
default: ""
|
|
},
|
|
icons: {
|
|
type: definePropType([Array, Object]),
|
|
default: () => [StarFilled, StarFilled, StarFilled]
|
|
},
|
|
voidIcon: {
|
|
type: iconPropType,
|
|
default: () => Star
|
|
},
|
|
disabledVoidIcon: {
|
|
type: iconPropType,
|
|
default: () => StarFilled
|
|
},
|
|
disabled: {
|
|
type: Boolean,
|
|
default: void 0
|
|
},
|
|
allowHalf: Boolean,
|
|
showText: Boolean,
|
|
showScore: Boolean,
|
|
textColor: {
|
|
type: String,
|
|
default: ""
|
|
},
|
|
texts: {
|
|
type: definePropType(Array),
|
|
default: () => mutable([
|
|
"Extremely bad",
|
|
"Disappointed",
|
|
"Fair",
|
|
"Satisfied",
|
|
"Surprise"
|
|
])
|
|
},
|
|
scoreTemplate: {
|
|
type: String,
|
|
default: "{value}"
|
|
},
|
|
size: useSizeProp,
|
|
clearable: Boolean,
|
|
...useAriaProps(["ariaLabel"])
|
|
});
|
|
const rateEmits = {
|
|
[CHANGE_EVENT]: (value) => isNumber(value),
|
|
[UPDATE_MODEL_EVENT]: (value) => isNumber(value)
|
|
};
|
|
|
|
export { rateEmits, rateProps };
|
|
//# sourceMappingURL=rate2.mjs.map
|