|
@@ -86,8 +86,26 @@
|
|
|
:touch-start-threshold="50" :fallback-tolerance="50" :sort="false">
|
|
|
<template #item="{ element }">
|
|
|
<div class="card_Base_component" v-if="element.displayPicture">
|
|
|
- <el-image class="images_Base_component" :src="getComponentPicture(element.type)" fit="contain" />
|
|
|
- <span>{{ element.name }}</span>
|
|
|
+ <div class="pict_base" v-if="!element.popoverTip">
|
|
|
+ <el-image class="images_Base_component" :src="getComponentPicture(element.type)" fit="contain" />
|
|
|
+ <span>{{ element.name }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="element.popoverTip">
|
|
|
+ <el-popover placement="right" :width="230" trigger="hover">
|
|
|
+ <template #reference>
|
|
|
+ <div class="card_Base_componentil">
|
|
|
+ <el-image class="images_Base_component" :src="getComponentPicture(element.type)"
|
|
|
+ fit="contain" />
|
|
|
+ <span>{{ element.name }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="card_rectangle">
|
|
|
+ <el-image style="width: 60px;height: 60px" :src="motionGraph(element.type)" fit="contain" />
|
|
|
+ <span>{{ element.name }}</span>
|
|
|
+ <div class="tipTitle">{{ element.popoverTipTitle }}</div>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="item_module_left move" v-else>
|
|
|
<component :is="getWidget(element.type)" :config="element"></component>
|
|
@@ -121,14 +139,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="card_home" :style="{ width: (viewName == '卡片' ? cardWidth + 'px' : '375px') }">
|
|
|
- <img class="head_image_url" :src="imageUrl" v-if="viewName != '卡片'" />
|
|
|
- <div class="card_title_bar" v-if="viewName != '卡片'">
|
|
|
- <div class="left_back">
|
|
|
- <el-icon size="24">
|
|
|
- <ArrowLeft />
|
|
|
- </el-icon>
|
|
|
+ <div style="background-color: #fff;">
|
|
|
+ <img class="head_image_url" :src="imageUrl" v-if="viewName != '卡片'" />
|
|
|
+ <div class="card_title_bar" v-if="viewName != '卡片'">
|
|
|
+ <div class="left_back">
|
|
|
+ <el-icon size="24">
|
|
|
+ <ArrowLeft />
|
|
|
+ </el-icon>
|
|
|
+ </div>
|
|
|
+ <span class="title_headline_head">头部栏标题</span>
|
|
|
</div>
|
|
|
- <span class="title_headline_head">头部栏标题</span>
|
|
|
</div>
|
|
|
<div class="Bzu"
|
|
|
:style="{ width: (viewName == '卡片' ? cardWidth + 'px' : '375px'), height: (viewName == '卡片' ? cardHeight + 'px' : '603px') }">
|
|
@@ -210,7 +230,7 @@ import VueDrag from '../components/drag/resizable.vue'
|
|
|
import iconLibrary from '../components/iconLibrary.vue'
|
|
|
import maskedbox from './maskedbox.vue'
|
|
|
import additionPage from './additionPage.vue'
|
|
|
-import { baseComponent, attributeValue, layout } from '../module/index';
|
|
|
+import { baseComponent, layoutValue, layout, general } from '../module/index';
|
|
|
import { classify } from '../module/classification';
|
|
|
import { ref, watch, computed } from "vue";
|
|
|
import { useRouter } from 'vue-router'
|
|
@@ -407,6 +427,10 @@ function getAssetsImages(name) {
|
|
|
function getComponentPicture(name) {
|
|
|
return new URL(`/src/assets/componentIcon/${name}.png`, import.meta.url).href;
|
|
|
}
|
|
|
+// 组件图片
|
|
|
+function motionGraph(name) {
|
|
|
+ return new URL(`/src/assets/componentIcon/${name}.gif`, import.meta.url).href;
|
|
|
+}
|
|
|
|
|
|
//拖拽开始的事件
|
|
|
const onStart = () => {
|
|
@@ -457,11 +481,13 @@ const handleReceivedData = (num: any) => {
|
|
|
if (num == 1) {
|
|
|
extraImgs.value = baseComponent
|
|
|
} else if (num == 2) {
|
|
|
- extraImgs.value = attributeValue
|
|
|
+ extraImgs.value = layoutValue
|
|
|
} else if (num == 4) {
|
|
|
extraImgs.value = layout
|
|
|
} else if (num == 5) {
|
|
|
extraImgs.value = layout
|
|
|
+ } else if (num == 7) {
|
|
|
+ extraImgs.value = general
|
|
|
}
|
|
|
componentLibrary.value = JSON.parse(JSON.stringify(extraImgs.value))
|
|
|
}
|
|
@@ -907,11 +933,45 @@ function getIconSelection(params: any) {
|
|
|
flex-direction: column;
|
|
|
}
|
|
|
|
|
|
+.pict_base {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
+
|
|
|
+.card_Base_componentil {
|
|
|
+ cursor: grab;
|
|
|
+ width: calc(100%);
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
+
|
|
|
.images_Base_component {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
+.card_rectangle {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ width: 100%;
|
|
|
+ height: 185px;
|
|
|
+
|
|
|
+ span {
|
|
|
+ font-size: 15px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-top: 15px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.tipTitle {
|
|
|
+ margin-top: 10px;
|
|
|
+ text-align: center;
|
|
|
+ width: 96%;
|
|
|
+ font-size: 12px;
|
|
|
+}
|
|
|
+
|
|
|
.card_Base_component span {
|
|
|
width: 100%;
|
|
|
display: block;
|
|
@@ -1007,8 +1067,7 @@ function getIconSelection(params: any) {
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
height: 44px;
|
|
|
- margin-right: 6px;
|
|
|
- margin-left: 6px;
|
|
|
+ padding: 0px 6px;
|
|
|
}
|
|
|
|
|
|
.left_back {
|