|
@@ -14,50 +14,20 @@ export default {
|
|
|
mixins: [ viewMixins,actionsMixins,layerMixins,colorMixins,editMixins],
|
|
mixins: [ viewMixins,actionsMixins,layerMixins,colorMixins,editMixins],
|
|
|
|
|
|
|
|
props: {
|
|
props: {
|
|
|
- scene: {
|
|
|
|
|
|
|
+ width: {
|
|
|
type: String,
|
|
type: String,
|
|
|
- default: ''
|
|
|
|
|
|
|
+ default: '1024px'
|
|
|
},
|
|
},
|
|
|
- autoUpload:{
|
|
|
|
|
|
|
+ height:{
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
- default: true
|
|
|
|
|
|
|
+ default: '1024px'
|
|
|
},
|
|
},
|
|
|
- image: {
|
|
|
|
|
- type: String,
|
|
|
|
|
- default: ''
|
|
|
|
|
- },
|
|
|
|
|
- resultImage:{
|
|
|
|
|
- type: String,
|
|
|
|
|
- default: ''
|
|
|
|
|
- },
|
|
|
|
|
- template:{
|
|
|
|
|
- type:Object,
|
|
|
|
|
- default:()=>{
|
|
|
|
|
- return {}
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- seniorEditor:{
|
|
|
|
|
- type: Boolean,
|
|
|
|
|
- default: false
|
|
|
|
|
- },
|
|
|
|
|
- disabled:{
|
|
|
|
|
- type: Boolean,
|
|
|
|
|
- default: false
|
|
|
|
|
- },
|
|
|
|
|
- //xy
|
|
|
|
|
- padding:{
|
|
|
|
|
- type:Object,
|
|
|
|
|
- default:()=>{
|
|
|
|
|
- return {
|
|
|
|
|
- x:0,
|
|
|
|
|
- y:0
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ disabled:false,
|
|
|
|
|
+
|
|
|
fcanvas: {},
|
|
fcanvas: {},
|
|
|
scale: 1,
|
|
scale: 1,
|
|
|
sceneTplImg:"",//生成的时候记录下来,用户重做
|
|
sceneTplImg:"",//生成的时候记录下来,用户重做
|
|
@@ -82,23 +52,23 @@ export default {
|
|
|
await this.viewInit()
|
|
await this.viewInit()
|
|
|
await this.$nextTick()
|
|
await this.$nextTick()
|
|
|
this.fcanvas = new fabric.Canvas('marketing-canvas', {
|
|
this.fcanvas = new fabric.Canvas('marketing-canvas', {
|
|
|
|
|
+ backgroundColor:"#ffffff",
|
|
|
containerClass:"fcanvas",
|
|
containerClass:"fcanvas",
|
|
|
// 元素对象被选中时保持在当前z轴,不会跳到最顶层
|
|
// 元素对象被选中时保持在当前z轴,不会跳到最顶层
|
|
|
preserveObjectStacking:true,
|
|
preserveObjectStacking:true,
|
|
|
- width: this.canvas.width,
|
|
|
|
|
- height: this.canvas.height
|
|
|
|
|
|
|
+ width: this.canvasStyle.width,
|
|
|
|
|
+ height: this.canvasStyle.height
|
|
|
})
|
|
})
|
|
|
|
|
+ //保留最初的状态
|
|
|
|
|
+ this.updateCanvasState()
|
|
|
|
|
+ // this.minimapInit()
|
|
|
this.actionInit()
|
|
this.actionInit()
|
|
|
this.layerInit();
|
|
this.layerInit();
|
|
|
- console.log(this)
|
|
|
|
|
- console.log(this.template)
|
|
|
|
|
- console.log(tpl())
|
|
|
|
|
-/* if(this.template?.fcanvas) await this.setTpl()
|
|
|
|
|
- if(this.scene) await this.setScene()*/
|
|
|
|
|
-/// await this.setImage()
|
|
|
|
|
- await this.$nextTick()
|
|
|
|
|
|
|
+ await this.$nextTick()
|
|
|
this.$emit('init')
|
|
this.$emit('init')
|
|
|
|
|
|
|
|
|
|
+ this.addMaps('https://ossimg.valimart.net/uploads/vali_ai/20250606/174919236960718.png')
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -114,17 +84,14 @@ export default {
|
|
|
top:0;
|
|
top:0;
|
|
|
right: 0;
|
|
right: 0;
|
|
|
bottom:0;
|
|
bottom:0;
|
|
|
|
|
+ background: #efefef;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
|
|
|
.picture-editor-wrap_canvas {
|
|
.picture-editor-wrap_canvas {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
- border: 1px #e1e1e1 dashed;
|
|
|
|
|
- width: calc(100% - 400px) !important;
|
|
|
|
|
- height: calc(100%) !important;
|
|
|
|
|
- border-radius: 10px;
|
|
|
|
|
|
|
+ margin-top: 30px;
|
|
|
.picture-editor-canvas {
|
|
.picture-editor-canvas {
|
|
|
- height: 100%;
|
|
|
|
|
- border-radius: 5px;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
|
|
+ height: calc(100vh - 40px);
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
@@ -146,18 +113,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.add-action-wrap {
|
|
.add-action-wrap {
|
|
|
- position: absolute;
|
|
|
|
|
- top:0px;
|
|
|
|
|
- right: -95px;
|
|
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ top:30px;
|
|
|
|
|
+ left: 0px;
|
|
|
bottom: 0;
|
|
bottom: 0;
|
|
|
- width: 81px;
|
|
|
|
|
|
|
+ width: 200px;
|
|
|
|
|
|
|
|
- background: rgba(169,176,255,0.1);
|
|
|
|
|
|
|
+ background:#fff;
|
|
|
box-shadow: 0px 2px 4px 0px rgba(170,177,255,0.54);
|
|
box-shadow: 0px 2px 4px 0px rgba(170,177,255,0.54);
|
|
|
- border-radius: 8px;
|
|
|
|
|
- .add-action_title {
|
|
|
|
|
- padding: 10px 0;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
.el-button {
|
|
.el-button {
|
|
|
display: block;
|
|
display: block;
|
|
@@ -168,7 +131,8 @@ export default {
|
|
|
background: none;
|
|
background: none;
|
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
|
border: none;
|
|
border: none;
|
|
|
- text-align: center;
|
|
|
|
|
|
|
+ margin-left: 20px;
|
|
|
|
|
+ text-align: left;
|
|
|
&.el-button--primary {
|
|
&.el-button--primary {
|
|
|
background: none;
|
|
background: none;
|
|
|
color: #000;
|
|
color: #000;
|
|
@@ -182,6 +146,7 @@ export default {
|
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
|
font-size: 28px;
|
|
font-size: 28px;
|
|
|
color: #000;
|
|
color: #000;
|
|
|
|
|
+ margin-right: 10px;
|
|
|
background: #E2E5FC;
|
|
background: #E2E5FC;
|
|
|
}
|
|
}
|
|
|
|
|
|