123456789101112131415161718192021222324 |
- import { ElRate } from 'element-plus'
- import { useFormInput } from '@cip/components/hooks/form-input'
- import { formInputProps } from '../../form-input-props'
- import { useRateConfig } from './use-rate-config'
- import './index.less'
- export default {
- props: formInputProps,
- emits: ['update:modelValue'],
- setup (props, context) {
- const formInput = useFormInput(props, context)
- const { proxyValue, securityConfig } = formInput
- const { allowHalf, max } = useRateConfig(formInput)
- return () => <div class={'cip-rate'}>
- <ElRate
- v-model={proxyValue.value}
- allowHalf={allowHalf.value}
- disabled={props.disabled}
- max={max.value}
- showScore={securityConfig.value.showScore}
- />
- </div>
- }
- }
|