Unverified 提交 d1558aa4 authored 作者: 王嘉豪's avatar 王嘉豪 提交者: GitHub

Merge pull request #1997 from dataease/pr@dev@fix_panel-inner

fix: 画布区组件边框角度未生效问题
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
['de-drag-active-inner']:enabled, ['de-drag-active-inner']:enabled,
[classNameMouseOn]: mouseOn || active [classNameMouseOn]: mouseOn || active
}, },
className, className
'main-background'
]" ]"
:style="mainSlotStyle" :style="mainSlotStyle"
> >
...@@ -44,9 +43,11 @@ ...@@ -44,9 +43,11 @@
> >
<slot :name="handlei" /> <slot :name="handlei" />
</div> </div>
<div :style="mainSlotStyleInner" class="main-background">
<slot /> <slot />
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -533,6 +534,10 @@ export default { ...@@ -533,6 +534,10 @@ export default {
width: this.computedMainSlotWidth, width: this.computedMainSlotWidth,
height: this.computedMainSlotHeight height: this.computedMainSlotHeight
} }
return style
},
mainSlotStyleInner() {
const style = {}
if (this.element.commonBackground) { if (this.element.commonBackground) {
style['padding'] = (this.element.commonBackground.innerPadding || 0) + 'px' style['padding'] = (this.element.commonBackground.innerPadding || 0) + 'px'
style['border-radius'] = (this.element.commonBackground.borderRadius || 0) + 'px' style['border-radius'] = (this.element.commonBackground.borderRadius || 0) + 'px'
...@@ -1865,6 +1870,8 @@ export default { ...@@ -1865,6 +1870,8 @@ export default {
outline: 1px solid #70c0ff; outline: 1px solid #70c0ff;
} }
.main-background{ .main-background{
width: 100%;
height: 100%;
background-size: 100% 100% !important; background-size: 100% 100% !important;
} }
</style> </style>
...@@ -18,8 +18,8 @@ export const BASE_MOBILE_STYLE = { ...@@ -18,8 +18,8 @@ export const BASE_MOBILE_STYLE = {
// 组件仪表板样式 // 组件仪表板样式
export const COMMON_BACKGROUND = { export const COMMON_BACKGROUND = {
enable: false, enable: true,
backgroundType: 'innerImage', backgroundType: 'color',
color: '#FFFFFF', color: '#FFFFFF',
innerImage: null, innerImage: null,
outerImage: null, outerImage: null,
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<span class="params-title">{{ $t('panel.inner_padding') }}</span> <span class="params-title">{{ $t('panel.inner_padding') }}</span>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="15">
<el-slider v-model="curComponent.commonBackground.innerPadding" show-input :show-input-controls="false" input-size="mini" /> <el-slider v-model="curComponent.commonBackground.innerPadding" show-input :show-input-controls="false" input-size="mini" :max="15" />
</el-col> </el-col>
</el-row> </el-row>
<el-row style="height: 50px;overflow: hidden"> <el-row style="height: 50px;overflow: hidden">
......
...@@ -225,8 +225,8 @@ export const DEFAULT_YAXIS_EXT_STYLE = { ...@@ -225,8 +225,8 @@ export const DEFAULT_YAXIS_EXT_STYLE = {
} }
export const DEFAULT_BACKGROUND_COLOR = { export const DEFAULT_BACKGROUND_COLOR = {
color: '#ffffff', color: '#ffffff',
alpha: 100, alpha: 0,
borderRadius: 5 borderRadius: 0
} }
export const DEFAULT_SPLIT = { export const DEFAULT_SPLIT = {
name: { name: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论