Skip to content

Commit

Permalink
fix(rate): fix wrong style in form component
Browse files Browse the repository at this point in the history
  • Loading branch information
BeADre committed Sep 18, 2022
1 parent 3439993 commit 4cae7e0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
4 changes: 1 addition & 3 deletions packages/varlet-ui/src/rate/Rate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ export default defineComponent({
const { errorMessage, validateWithTrigger: vt, validate: v, resetValidation } = useValidation()
const getStyle = (val: number) => {
const { count, size, gap } = props
const { count, gap } = props
return {
color: getCurrentState(val).color,
marginRight: val !== toNumber(count) ? toSizeUnit(gap) : 0,
width: toSizeUnit(size),
height: toSizeUnit(size),
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/rate/docs/en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ const score = ref(3)
</script>

<template>
<var-rate v-model="score" :gap="1"/>
<var-rate v-model="score"/>
<var-rate v-model="score" :gap="2"/>
<var-rate v-model="score" :gap="4"/>
<var-rate v-model="score" :gap="8"/>
</template>
Expand Down
4 changes: 2 additions & 2 deletions packages/varlet-ui/src/rate/docs/zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ const score = ref(3)
</script>

<template>
<var-rate v-model="score" :gap="1"/>
<var-rate v-model="score"/>
<var-rate v-model="score" />
<var-rate v-model="score" :gap="2"/>
<var-rate v-model="score" :gap="4"/>
<var-rate v-model="score" :gap="8"/>
</template>
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/rate/example/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ watchDarkMode(dark)
empty-icon="heart-outline"
color="red"
half
style="margin-top: 4px"
/>

<app-type>{{ pack.disableTheRating }}</app-type>
Expand Down
5 changes: 0 additions & 5 deletions packages/varlet-ui/src/rate/rate.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@

&__content {
padding: var(--rate-action-padding);
box-sizing: unset;
cursor: pointer;
display: flex;
width: 24px;
height: 24px;
margin-right: 2px;
border-radius: 50%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);

Expand Down

0 comments on commit 4cae7e0

Please sign in to comment.