Skip to content

Commit

Permalink
fix(ui/chip): 修复chip样式引入问题
Browse files Browse the repository at this point in the history
affects: @varlet/ui
  • Loading branch information
haoziqaq committed Apr 15, 2021
1 parent a0933ce commit 1e85fa4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/varlet-ui/src/chip/Chip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<slot name="right" />

<span v-if="closable" class="var-chip--close" @click="onClose">
<var-icon :name="`${iconName ? iconName : 'close-circle'}`"></var-icon>
<var-icon :name="`${iconName ? iconName : 'close-circle'}`" />
</span>
</span>
</transition>
Expand Down Expand Up @@ -48,9 +48,9 @@ export default defineComponent({
const contentClass: ComputedRef<Array<string | false | undefined>> = computed(() => {
const { size, block, type, plain, round } = props
const blockClass = block ? `var--flex` : 'var--inline-flex'
const blockClass = block ? 'var--flex' : 'var--inline-flex'
const plainTypeClass = plain ? `var-chip--plain var-chip--plain-${type}` : `var-chip--${type}`
const roundClass = round && `var-chip--round`
const roundClass = round && 'var-chip--round'
return [`var-chip--${size}`, blockClass, plainTypeClass, roundClass]
})
Expand All @@ -64,5 +64,6 @@ export default defineComponent({
</script>

<style lang="less">
@import '../icon/icon';
@import './chip';
</style>

0 comments on commit 1e85fa4

Please sign in to comment.