预埋弹窗设置点

This commit is contained in:
aixianling
2024-01-24 16:34:57 +08:00
parent 7232b894f7
commit a42aa166d1
7 changed files with 85 additions and 30 deletions

View File

@@ -7,6 +7,7 @@
<h2>{{ dashboard.title }}</h2>
</div>
<div class="layout-header__right">
<span type="text" @click="preview">预览</span>
<span type="text" @click="isShowImg = true">素材</span>
<span type="text" @click="back()">退出</span>
<span type="text" @click="save">保存</span>
@@ -233,9 +234,15 @@ import 'vue-draggable-resizable/dist/VueDraggableResizable.css'
import DataConfig from './components/DataConfig.vue'
import ComponentConfig from "./components/componentConfig.vue";
import {mapActions} from "vuex"
import Vue from "vue";
export default {
name: "designDashboard",
provide() {
return {
setCurLayer: this.setCurLayer
}
},
props: {
instance: Function,
dict: Object,
@@ -284,22 +291,19 @@ export default {
resizeWrapper: true
}
},
components: {
ComponentConfig,
DataConfig,
VueRulerTool,
VueDraggableResizable,
},
computed: {
workbenchTransform() {
return `scale(${this.heightScale})`
},
currLayout: {
set(v) {
console.log(v)
this.componentList.splice(this.activeIndex, 1, v)
this.setCurLayer(v)
},
get() {
return this.activeIndex > -1 ? this.componentList[this.activeIndex] : {}
@@ -313,7 +317,6 @@ export default {
return []
}
},
mounted() {
this.dict.load("yesOrNo")
this.getInfo(this.$route.query.did)
@@ -500,7 +503,22 @@ export default {
let widthScale = (this.middleWidth - this.widthPaddingTools) / this.bigscreenWidth
let heightScale = (this.middleHeight - this.widthPaddingTools) / this.bigscreenHeight
this.heightScale = Math.min(widthScale, heightScale)
},
preview() {
const {origin, pathname} = location
window.open(origin + pathname + '?id=' + this.$route.query.did + "#preview")
},
setCurLayer(v) {
console.log(v)
this.componentList.splice(this.activeIndex, 1, v)
}
},
created() {
Vue.use(window.AVUE, {
size: 'mini',
tableSize: 'mini',
calcHeight: 36,
})
}
}
</script>