Skip to content

Commit

Permalink
refactor(rate): change content to context
Browse files Browse the repository at this point in the history
  • Loading branch information
1379255913 committed May 28, 2024
1 parent d41d523 commit d04d4c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rate/rate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ const name = `${prefix}-rate`;
export default defineComponent({
name,
props: rateProps,
setup(props, content) {
setup(props, context) {
const rateClass = usePrefixClass('rate');
const { t, globalConfig } = useConfig('rate');
const disabled = useFormDisabled();

const rateWrapper = ref<HTMLElement | null>(null);
const [actualVal] = useDefault<number, TdRateProps>(props, content.emit, 'value', 'change');
const [actualVal] = useDefault<number, TdRateProps>(props, context.emit, 'value', 'change');
const rateText = computed(() => {
if (Array.isArray(props.texts) && props.texts.length > 0) {
return props.texts[actualVal.value - 1];
Expand Down

0 comments on commit d04d4c8

Please sign in to comment.