mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-11-13 04:18:55 +08:00
feat(manager): 装修右栏按type分发配置面板机制
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
// 新组件配置面板映射:type → 面板组件
|
||||||
|
// 面板契约:props res(整个楼层条目),直接修改 res.options.*,保存链路自动感知
|
||||||
|
export default {};
|
||||||
@@ -26,6 +26,15 @@
|
|||||||
>选择促销活动</el-button
|
>选择促销活动</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 新组件独立配置面板(按 type 分发) -->
|
||||||
|
<component
|
||||||
|
v-if="panelComponent"
|
||||||
|
:is="panelComponent"
|
||||||
|
:res="res"
|
||||||
|
/>
|
||||||
|
<!-- 老组件遗留配置分支 -->
|
||||||
|
<template v-else>
|
||||||
<el-alert
|
<el-alert
|
||||||
v-if="res.name == '商品分类'"
|
v-if="res.name == '商品分类'"
|
||||||
type="warning"
|
type="warning"
|
||||||
@@ -533,6 +542,7 @@
|
|||||||
ref="ossManage"
|
ref="ossManage"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -543,6 +553,7 @@ import hotzone from "@/components/hotzone";
|
|||||||
import ways from "@/components/lili-dialog/wap.js";
|
import ways from "@/components/lili-dialog/wap.js";
|
||||||
import categoryTemplate from "@/components/lili-dialog/template/category";
|
import categoryTemplate from "@/components/lili-dialog/template/category";
|
||||||
import VideoConfig from "./video-config";
|
import VideoConfig from "./video-config";
|
||||||
|
import panelMap from "./config-panel";
|
||||||
import alignTextLeft from "@/assets/align-text-left.png";
|
import alignTextLeft from "@/assets/align-text-left.png";
|
||||||
import alignTextCenter from "@/assets/align-text-center.png";
|
import alignTextCenter from "@/assets/align-text-center.png";
|
||||||
import alignTextRight from "@/assets/align-text-right.png";
|
import alignTextRight from "@/assets/align-text-right.png";
|
||||||
@@ -563,9 +574,10 @@ export default {
|
|||||||
picModelFlag: false, //图片选择器
|
picModelFlag: false, //图片选择器
|
||||||
linkType: "goods", // dialog弹窗口类型
|
linkType: "goods", // dialog弹窗口类型
|
||||||
styleFlag: false, //广告魔方开关
|
styleFlag: false, //广告魔方开关
|
||||||
textAlign: this.res.options.list[0]
|
textAlign:
|
||||||
? this.res.options.list[0].textAlign
|
this.res.options.list && this.res.options.list[0]
|
||||||
: "center", //文字对齐方式
|
? this.res.options.list[0].textAlign
|
||||||
|
: "center", //文字对齐方式
|
||||||
promotionsFlag: false, //广告魔方开关
|
promotionsFlag: false, //广告魔方开关
|
||||||
selectedLinkIndex: "", //选择链接的索引
|
selectedLinkIndex: "", //选择链接的索引
|
||||||
modelData, // 装修数据
|
modelData, // 装修数据
|
||||||
@@ -585,6 +597,12 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
props: ["res"],
|
props: ["res"],
|
||||||
|
computed: {
|
||||||
|
// 新组件按 type 分发到独立配置面板;老组件走下方遗留分支
|
||||||
|
panelComponent() {
|
||||||
|
return (this.res && panelMap[this.res.type]) || null;
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 选择分类(弹窗内暂存,确定后写回)
|
// 选择分类(弹窗内暂存,确定后写回)
|
||||||
onCategorySelected(val) {
|
onCategorySelected(val) {
|
||||||
|
|||||||
Reference in New Issue
Block a user