Skip to content

Commit

Permalink
fix(space): fix space undifined (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rickon-DAFEI authored Mar 22, 2024
1 parent dcd884e commit 743931f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
7 changes: 2 additions & 5 deletions packages/yike-design-demo/src/components/Snippet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function onCopy() {
<div class="demo-block">
<slot name="demo"></slot>
</div>
<yk-space class="flex-end" :size="8">
<yk-space class="snippet-icon" justify="end" :size="8">
<div class="icon" @click="onCopy"><icon-copy-outline /></div>
<div
class="icon"
Expand Down Expand Up @@ -94,10 +94,7 @@ function onCopy() {
transition: all @animats;
}

.flex-end {
display: flex;
justify-content: flex-end;

.snippet-icon {
.icon {
display: flex;
justify-content: center;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<yk-space
v-if="type === 'radio'"
:direction="direction"
:dir="direction"
:size="mergedSize"
:type="type"
:class="bem([type, mergedSize, direction])"
Expand Down
6 changes: 4 additions & 2 deletions packages/yike-design-ui/components/space/src/space.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const props = withDefaults(
defineProps<SpaceProps>(),
{
size: 'l',
align: 'start',
justify: 'start',
dir: 'horizontal',
overflow: 'visible',
wrap: false,
Expand Down Expand Up @@ -60,8 +62,8 @@ const classList = computed(() => {
classes.push(`overflow-${overflow.value}`)
}
classes.push(`align-${align?.value}`)
classes.push(`justify-${justify?.value}`)
classes.push(`align-${align.value}`)
classes.push(`justify-${justify.value}`)
return classes
})
Expand Down

0 comments on commit 743931f

Please # to comment.