|
@@ -51,7 +51,7 @@
|
|
<div class="part">
|
|
<div class="part">
|
|
<!-- 左侧 -->
|
|
<!-- 左侧 -->
|
|
<div class="panel_left">
|
|
<div class="panel_left">
|
|
- <div class="left_tabs_switch">
|
|
|
|
|
|
+ <!-- <div class="left_tabs_switch">
|
|
<div class="card_tabs_view center_in" :class="tabsType == 'module' ? 'tabs_active' : ''"
|
|
<div class="card_tabs_view center_in" :class="tabsType == 'module' ? 'tabs_active' : ''"
|
|
@click="getTabs('module')">
|
|
@click="getTabs('module')">
|
|
<span class="iconfont tabs_icon_img icon-zujian" :color="tabsType == 'module' ? '#409EFF' : '#606266'"></span>
|
|
<span class="iconfont tabs_icon_img icon-zujian" :color="tabsType == 'module' ? '#409EFF' : '#606266'"></span>
|
|
@@ -61,7 +61,7 @@
|
|
<span class="iconfont tabs_icon_img icon-page" :color="tabsType == 'page' ? '#409EFF' : '#606266'"></span>
|
|
<span class="iconfont tabs_icon_img icon-page" :color="tabsType == 'page' ? '#409EFF' : '#606266'"></span>
|
|
<span>页面</span>
|
|
<span>页面</span>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
<div class="left_paneLeft"
|
|
<div class="left_paneLeft"
|
|
:style="{ boxShadow: (tabsType == 'module' ? 'rgba(0, 0, 0, 0.05) 3px 0px 5px' : '') }">
|
|
:style="{ boxShadow: (tabsType == 'module' ? 'rgba(0, 0, 0, 0.05) 3px 0px 5px' : '') }">
|
|
<div class="pane_tabs" v-if="tabsType == 'module'">
|
|
<div class="pane_tabs" v-if="tabsType == 'module'">
|
|
@@ -74,9 +74,9 @@
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</div>
|
|
</div>
|
|
- <div v-else>
|
|
|
|
|
|
+ <!-- <div v-else>
|
|
<additionPage @switchPage="switchPage"></additionPage>
|
|
<additionPage @switchPage="switchPage"></additionPage>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
</div>
|
|
</div>
|
|
<div class="left_paneRight" v-if="tabsType == 'module'">
|
|
<div class="left_paneRight" v-if="tabsType == 'module'">
|
|
<el-scrollbar style="width: 100%; height: 100%" class="component-list scrollbar-wrapper">
|
|
<el-scrollbar style="width: 100%; height: 100%" class="component-list scrollbar-wrapper">
|
|
@@ -98,22 +98,25 @@
|
|
</div>
|
|
</div>
|
|
<!-- 中间 -->
|
|
<!-- 中间 -->
|
|
<div class="panel_center">
|
|
<div class="panel_center">
|
|
|
|
+ <div class="head_page_view">
|
|
|
|
+ <additionPage @switchPage="switchPage"></additionPage>
|
|
|
|
+ </div>
|
|
<div class="card_selectSize" :style="{ width: (viewName == '卡片' ? cardWidth + 'px' : '375px') }">
|
|
<div class="card_selectSize" :style="{ width: (viewName == '卡片' ? cardWidth + 'px' : '375px') }">
|
|
<div style="display: flex;" v-if="viewName == '卡片'">
|
|
<div style="display: flex;" v-if="viewName == '卡片'">
|
|
- <el-popover :visible="cardSizeVisible" popper-style="padding: 10px 0px;" :width="80" trigger="click">
|
|
|
|
- <template #reference>
|
|
|
|
- <div class="card_size_select" @click="cardSizeVisible = true">
|
|
|
|
- <span>选择卡片尺寸:</span>
|
|
|
|
|
|
+ <div class="card_size_select" @click="cardSizeVisible = true">
|
|
|
|
+ <span>选择卡片尺寸:</span>
|
|
|
|
+ <el-popover :visible="cardSizeVisible" popper-style="padding: 10px 0px;" :width="80" trigger="click">
|
|
|
|
+ <template #reference>
|
|
<div class="size_title_select">{{ currentCardName }}</div>
|
|
<div class="size_title_select">{{ currentCardName }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ <div style="display: flex;flex-direction: column;" v-click-outside="onClickOutside">
|
|
|
|
+ <div class="card_size_item" v-for="(item, index) in cardSizeData" :key="index"
|
|
|
|
+ @click="changeCardSize(item)">
|
|
|
|
+ <span :style="{ color: (item.flag ? '#409EFF' : '') }">{{ item.title }}</span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </template>
|
|
|
|
- <div style="display: flex;flex-direction: column;" v-click-outside="onClickOutside">
|
|
|
|
- <div class="card_size_item" v-for="(item, index) in cardSizeData" :key="index"
|
|
|
|
- @click="changeCardSize(item)">
|
|
|
|
- <span :style="{ color: (item.flag ? '#409EFF' : '') }">{{ item.title }}</span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </el-popover>
|
|
|
|
|
|
+ </el-popover>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card_home" :style="{ width: (viewName == '卡片' ? cardWidth + 'px' : '375px') }">
|
|
<div class="card_home" :style="{ width: (viewName == '卡片' ? cardWidth + 'px' : '375px') }">
|
|
@@ -210,10 +213,14 @@ import { ref, computed } from "vue";
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
import { ElMessageBox, ClickOutside as vClickOutside } from 'element-plus'
|
|
import { ElMessageBox, ClickOutside as vClickOutside } from 'element-plus'
|
|
// 存储
|
|
// 存储
|
|
-import { useUserStore } from '../stores/index'
|
|
|
|
|
|
+import { useUserStore, moduleStore } from '../stores/index'
|
|
import { storeToRefs } from 'pinia';
|
|
import { storeToRefs } from 'pinia';
|
|
const storeUser = useUserStore()
|
|
const storeUser = useUserStore()
|
|
const { viewList } = storeToRefs(storeUser)
|
|
const { viewList } = storeToRefs(storeUser)
|
|
|
|
+// 组件存储数据
|
|
|
|
+const storeModule = moduleStore()
|
|
|
|
+const { moduleList } = storeToRefs(storeModule)
|
|
|
|
+const listmodule: any = ref(moduleList)
|
|
|
|
|
|
//module、page、切换组件页面
|
|
//module、page、切换组件页面
|
|
const tabsType = ref('module')
|
|
const tabsType = ref('module')
|
|
@@ -237,6 +244,8 @@ viewList.value.forEach(item => {
|
|
extraImgs1.value = item.viewData
|
|
extraImgs1.value = item.viewData
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+listmodule.value = extraImgs1.value
|
|
// 选择页面
|
|
// 选择页面
|
|
function switchPage() {
|
|
function switchPage() {
|
|
viewList.value.forEach(item => {
|
|
viewList.value.forEach(item => {
|
|
@@ -447,9 +456,9 @@ const handleReceivedData = (num: any) => {
|
|
componentLibrary.value = JSON.parse(JSON.stringify(extraImgs.value))
|
|
componentLibrary.value = JSON.parse(JSON.stringify(extraImgs.value))
|
|
}
|
|
}
|
|
// 切换组件页面
|
|
// 切换组件页面
|
|
-function getTabs(params: any) {
|
|
|
|
- tabsType.value = params
|
|
|
|
-}
|
|
|
|
|
|
+// function getTabs(params: any) {
|
|
|
|
+// tabsType.value = params
|
|
|
|
+// }
|
|
// 切换tabs
|
|
// 切换tabs
|
|
function handleClick(): void {
|
|
function handleClick(): void {
|
|
console.log(24);
|
|
console.log(24);
|
|
@@ -525,6 +534,10 @@ function announce() {
|
|
// 预览
|
|
// 预览
|
|
function preview() {
|
|
function preview() {
|
|
console.log(extraImgs1.value, '预览');
|
|
console.log(extraImgs1.value, '预览');
|
|
|
|
+ const { href }: any = router.resolve({
|
|
|
|
+ path: '/dimensionsView'
|
|
|
|
+ });
|
|
|
|
+ window.open(href, '_blank');
|
|
}
|
|
}
|
|
// 激活项索引
|
|
// 激活项索引
|
|
function getId(params: any) {
|
|
function getId(params: any) {
|
|
@@ -894,6 +907,14 @@ function getIconSelection(params: any) {
|
|
width: calc(100% - 380px);
|
|
width: calc(100% - 380px);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+.head_page_view {
|
|
|
|
+ // margin-left: 448px;
|
|
|
|
+ margin-left: 380px;
|
|
|
|
+ margin-right: 354px;
|
|
|
|
+ height: 50px;
|
|
|
|
+ border-bottom: 1px solid var(--el-border-color);
|
|
|
|
+}
|
|
|
|
+
|
|
.card_selectSize {
|
|
.card_selectSize {
|
|
position: relative;
|
|
position: relative;
|
|
// width: 375px;
|
|
// width: 375px;
|
|
@@ -918,6 +939,9 @@ function getIconSelection(params: any) {
|
|
font-size: 17px;
|
|
font-size: 17px;
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
margin-right: 10px;
|
|
margin-right: 10px;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ padding: 2px 10px;
|
|
|
|
+ border: 1px solid var(--el-border-color);
|
|
}
|
|
}
|
|
|
|
|
|
.card_size_item {
|
|
.card_size_item {
|