添加vue-canvas-poster
This commit is contained in:
45
src/widgetView.vue
Normal file
45
src/widgetView.vue
Normal file
@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div
|
||||
class="widgetView-comp-ct"
|
||||
:style="{
|
||||
background: `${background.color} url(${background.img})`
|
||||
}"
|
||||
>
|
||||
<widget
|
||||
:show-wrapper="false"
|
||||
v-for="item in widgetList"
|
||||
:widget-data="item"
|
||||
:d-zoom="0.25"
|
||||
:key="item.uuid"
|
||||
></widget>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import widget from '@/components/poster-editor/widget';
|
||||
export default {
|
||||
name: 'widgetView',
|
||||
props: {
|
||||
background: {
|
||||
type: Object
|
||||
},
|
||||
widgetList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
widget
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.widgetView-comp-ct {
|
||||
position: relative;
|
||||
width: 240px;
|
||||
height: 180px;
|
||||
background-size: 100% 100% !important;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user