Commit 8b2d2354 by 杨明

fixed

1 parent 05ad9835
......@@ -33,9 +33,9 @@
</div>
</div>
</div>
<GLDialog @onOk="savePoster" @onCancel="dialogVisible = false" v-loading="loadingDrag" title="创建活码海报" :visible.sync="dialogVisible">
<el-dialog title="创建活码海报" :visible.sync="dialogVisible">
<div class="poster-draggable-title">拖动活码可调整活码位置</div>
<div class="poster-draggable">
<div class="poster-draggable" v-loading="loadingDrag">
<div
class="poster-image"
v-if="dragHeight"
......@@ -55,7 +55,7 @@
:style="{
'background-image': 'url(' + codeUrl + ')'
}"
:parent="true"
parent=".poster-image"
@dragging="onDrag"
@resizing="onResize"
:customId="index"
......@@ -63,11 +63,11 @@
></vue-draggable-resizable>
</div>
</div>
<!-- <span slot="footer" class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="savePoster">确 定</el-button>
</span> -->
</GLDialog>
</span>
</el-dialog>
</div>
</template>
......@@ -252,11 +252,10 @@ export default {
getDraggable(img_url) {
let img = new Image()
img.src = img_url
let self = this
img.onload = function() {
self.dragHeight = (img.height * 375) / img.width
self.dialogVisible = true
self.loading = false
img.onload = () => {
this.dragHeight = (img.height * 375) / img.width
this.dialogVisible = true
this.loading = false
}
}
},
......@@ -300,6 +299,8 @@ export default {
.poster-draggable {
display: flex;
justify-content: center;
// height: 500px;
// overflow: auto;
.poster-image {
background-size: 100% 100%;
width: 375px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!