Skip to content

Commit

Permalink
fix: 空态图的背景颜色不符合设计稿
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyiqi committed Jul 25, 2023
1 parent eba46de commit f2547c5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src-vusion/components/absolute-layout/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div :class="$style.root" v-on="$listeners" vusion-slot-name="default">
<div :class="[$style.root, {[$style.empty]: isEmpty}]" v-on="$listeners" vusion-slot-name="default">
<slot></slot>
<template v-if="(!$slots.default) && $env.VUE_APP_DESIGNER && !!$attrs['vusion-node-path']">
<template v-if="isEmpty">
<div :class="$style.emptyTip">拖入组件放至任意位置</div>
</template>
</div>
Expand All @@ -11,6 +11,11 @@
export default {
name: 'van-absolute-layout',
computed: {
isEmpty() {
return !this.$slots.default && this.$env.VUE_APP_DESIGNER && !!this.$attrs['vusion-node-path'];
},
},
};
</script>

Expand All @@ -21,6 +26,9 @@ export default {
height: 300px;
min-height: 100px;
}
.root.empty{
background: #F7F8FA;
}
.root>* {
position: absolute !important;
Expand Down

0 comments on commit f2547c5

Please sign in to comment.