|
@@ -86,7 +86,7 @@
|
|
|
" @click.stop="selectComponent(item)" :class="{ selected: selectedComponent === item }" />
|
|
" @click.stop="selectComponent(item)" :class="{ selected: selectedComponent === item }" />
|
|
|
<MediaAssetBoard v-if="item.type === 'mediaAsset'" :width="item.width * canvasScale"
|
|
<MediaAssetBoard v-if="item.type === 'mediaAsset'" :width="item.width * canvasScale"
|
|
|
:height="item.height * canvasScale" :media-id="item.mediaId" :selected="selectedComponent === item"
|
|
:height="item.height * canvasScale" :media-id="item.mediaId" :selected="selectedComponent === item"
|
|
|
- v-model="item.mediaGroup" @resize="
|
|
|
|
|
|
|
+ v-model="item.mediaGroup" :border-radius="item.borderRadius || 0" @resize="
|
|
|
({ width, height }) => {
|
|
({ width, height }) => {
|
|
|
item.width = width / canvasScale;
|
|
item.width = width / canvasScale;
|
|
|
item.height = height / canvasScale;
|
|
item.height = height / canvasScale;
|
|
@@ -94,14 +94,15 @@
|
|
|
" @click.stop="selectComponent(item)" :class="{ selected: selectedComponent === item }" />
|
|
" @click.stop="selectComponent(item)" :class="{ selected: selectedComponent === item }" />
|
|
|
<LiveBoard v-if="item.type === 'live'" :width="item.width * canvasScale"
|
|
<LiveBoard v-if="item.type === 'live'" :width="item.width * canvasScale"
|
|
|
:height="item.height * canvasScale" :live-url="item.liveUrl" :play-audio="item.playAudio"
|
|
:height="item.height * canvasScale" :live-url="item.liveUrl" :play-audio="item.playAudio"
|
|
|
- :selected="selectedComponent === item" @resize="
|
|
|
|
|
|
|
+ :selected="selectedComponent === item" :border-radius="item.borderRadius || 0" @resize="
|
|
|
({ width, height }) => {
|
|
({ width, height }) => {
|
|
|
item.width = width / canvasScale;
|
|
item.width = width / canvasScale;
|
|
|
item.height = height / canvasScale;
|
|
item.height = height / canvasScale;
|
|
|
}
|
|
}
|
|
|
" @click.stop="selectComponent(item)" :class="{ selected: selectedComponent === item }" />
|
|
" @click.stop="selectComponent(item)" :class="{ selected: selectedComponent === item }" />
|
|
|
<WebPageBoard v-if="item.type === 'webPage'" :width="item.width * canvasScale"
|
|
<WebPageBoard v-if="item.type === 'webPage'" :width="item.width * canvasScale"
|
|
|
- :height="item.height * canvasScale" :url="item.url" :selected="selectedComponent === item" @resize="
|
|
|
|
|
|
|
+ :height="item.height * canvasScale" :url="item.url" :selected="selectedComponent === item"
|
|
|
|
|
+ :border-radius="item.borderRadius || 0" @resize="
|
|
|
({ width, height }) => {
|
|
({ width, height }) => {
|
|
|
item.width = width / canvasScale;
|
|
item.width = width / canvasScale;
|
|
|
item.height = height / canvasScale;
|
|
item.height = height / canvasScale;
|
|
@@ -164,6 +165,9 @@
|
|
|
<el-option label="日期+时间 (YYYY-MM-DD HH:mm:ss)" value="date" />
|
|
<el-option label="日期+时间 (YYYY-MM-DD HH:mm:ss)" value="date" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template v-else-if="key === 'borderRadius'">
|
|
|
|
|
+ <el-input-number v-model="selectedComponent[key]" :min="0" :max="100" :step="1" style="width: 100%" />
|
|
|
|
|
+ </template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
<el-input v-model="selectedComponent[key]" />
|
|
<el-input v-model="selectedComponent[key]" />
|
|
|
</template>
|
|
</template>
|
|
@@ -376,8 +380,21 @@ function selectCanvasFromSidebar() {
|
|
|
function showEditableProp(key: string) {
|
|
function showEditableProp(key: string) {
|
|
|
// 明确排除 type 字段,防止被编辑
|
|
// 明确排除 type 字段,防止被编辑
|
|
|
if (!selectedComponent.value) return false;
|
|
if (!selectedComponent.value) return false;
|
|
|
- // 对于文本和滚动文本组件,移除 'fontWeight' 属性
|
|
|
|
|
- if ((selectedComponent.value.type === 'text' || selectedComponent.value.type === 'scrollingText') && (key === 'fontWeight' || key === 'align')) {
|
|
|
|
|
|
|
+ // 对于文本、滚动文本和时钟组件,移除 'fontWeight' 和 'align' 属性
|
|
|
|
|
+ if (
|
|
|
|
|
+ (selectedComponent.value.type === 'text' || selectedComponent.value.type === 'scrollingText' || selectedComponent.value.type === 'clock') &&
|
|
|
|
|
+ (key === 'fontWeight' || key === 'align')
|
|
|
|
|
+ ) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 画布、文本、滚动文本和时钟组件不显示 borderRadius 属性
|
|
|
|
|
+ if (
|
|
|
|
|
+ (selectedComponent.value.type === 'canvas' ||
|
|
|
|
|
+ selectedComponent.value.type === 'text' ||
|
|
|
|
|
+ selectedComponent.value.type === 'scrollingText' ||
|
|
|
|
|
+ selectedComponent.value.type === 'clock') &&
|
|
|
|
|
+ key === 'borderRadius'
|
|
|
|
|
+ ) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
return !['type', 'depth'].includes(key);
|
|
return !['type', 'depth'].includes(key);
|
|
@@ -544,7 +561,8 @@ function onCanvasDrop(e: DragEvent) {
|
|
|
y: y,
|
|
y: y,
|
|
|
width: 200,
|
|
width: 200,
|
|
|
height: 40,
|
|
height: 40,
|
|
|
- depth: getMaxDepth() + 1
|
|
|
|
|
|
|
+ depth: getMaxDepth() + 1,
|
|
|
|
|
+ borderRadius: 0
|
|
|
};
|
|
};
|
|
|
editorContent.value.elements.push(newText);
|
|
editorContent.value.elements.push(newText);
|
|
|
nextTick(() => selectComponent(newText));
|
|
nextTick(() => selectComponent(newText));
|
|
@@ -561,7 +579,8 @@ function onCanvasDrop(e: DragEvent) {
|
|
|
y: y,
|
|
y: y,
|
|
|
width: 300,
|
|
width: 300,
|
|
|
height: 40,
|
|
height: 40,
|
|
|
- depth: getMaxDepth() + 1
|
|
|
|
|
|
|
+ depth: getMaxDepth() + 1,
|
|
|
|
|
+ borderRadius: 0
|
|
|
};
|
|
};
|
|
|
editorContent.value.elements.push(newScrollingText);
|
|
editorContent.value.elements.push(newScrollingText);
|
|
|
nextTick(() => selectComponent(newScrollingText));
|
|
nextTick(() => selectComponent(newScrollingText));
|
|
@@ -573,7 +592,8 @@ function onCanvasDrop(e: DragEvent) {
|
|
|
y: y,
|
|
y: y,
|
|
|
width: 120,
|
|
width: 120,
|
|
|
height: 120,
|
|
height: 120,
|
|
|
- depth: getMaxDepth() + 1
|
|
|
|
|
|
|
+ depth: getMaxDepth() + 1,
|
|
|
|
|
+ borderRadius: 0
|
|
|
};
|
|
};
|
|
|
editorContent.value.elements.push(newMediaAsset);
|
|
editorContent.value.elements.push(newMediaAsset);
|
|
|
nextTick(() => selectComponent(newMediaAsset));
|
|
nextTick(() => selectComponent(newMediaAsset));
|
|
@@ -586,19 +606,21 @@ function onCanvasDrop(e: DragEvent) {
|
|
|
y: y,
|
|
y: y,
|
|
|
width: 200,
|
|
width: 200,
|
|
|
height: 120,
|
|
height: 120,
|
|
|
- depth: getMaxDepth() + 1
|
|
|
|
|
|
|
+ depth: getMaxDepth() + 1,
|
|
|
|
|
+ borderRadius: 0
|
|
|
};
|
|
};
|
|
|
editorContent.value.elements.push(newLive);
|
|
editorContent.value.elements.push(newLive);
|
|
|
nextTick(() => selectComponent(newLive));
|
|
nextTick(() => selectComponent(newLive));
|
|
|
} else if (dragType.value === 'webPage') {
|
|
} else if (dragType.value === 'webPage') {
|
|
|
const newWebPage = {
|
|
const newWebPage = {
|
|
|
type: 'webPage',
|
|
type: 'webPage',
|
|
|
- url: '',
|
|
|
|
|
|
|
+ url: 'https://example.com',
|
|
|
x: x,
|
|
x: x,
|
|
|
y: y,
|
|
y: y,
|
|
|
- width: 120,
|
|
|
|
|
- height: 120,
|
|
|
|
|
- depth: getMaxDepth() + 1
|
|
|
|
|
|
|
+ width: 300,
|
|
|
|
|
+ height: 200,
|
|
|
|
|
+ depth: getMaxDepth() + 1,
|
|
|
|
|
+ borderRadius: 0
|
|
|
};
|
|
};
|
|
|
editorContent.value.elements.push(newWebPage);
|
|
editorContent.value.elements.push(newWebPage);
|
|
|
nextTick(() => selectComponent(newWebPage));
|
|
nextTick(() => selectComponent(newWebPage));
|
|
@@ -755,6 +777,7 @@ const goBack = () => {
|
|
|
margin-bottom: 18px;
|
|
margin-bottom: 18px;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
width: 90%;
|
|
width: 90%;
|
|
|
|
|
+ border-radius: 0 !important;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.sidebar-icon {
|
|
.sidebar-icon {
|
|
@@ -773,7 +796,7 @@ const goBack = () => {
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
font-size: 22px;
|
|
font-size: 22px;
|
|
|
- border-radius: 6px;
|
|
|
|
|
|
|
+ border-radius: 0 !important;
|
|
|
margin-bottom: 4px;
|
|
margin-bottom: 4px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -792,7 +815,7 @@ const goBack = () => {
|
|
|
width: 90%;
|
|
width: 90%;
|
|
|
height: 75%;
|
|
height: 75%;
|
|
|
background: #e9eef3;
|
|
background: #e9eef3;
|
|
|
- border-radius: 10px;
|
|
|
|
|
|
|
+ border-radius: 0px;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
@@ -813,7 +836,7 @@ const goBack = () => {
|
|
|
margin-top: -5%;
|
|
margin-top: -5%;
|
|
|
margin-bottom: 1%;
|
|
margin-bottom: 1%;
|
|
|
background: #fafbfc;
|
|
background: #fafbfc;
|
|
|
- border-radius: 8px;
|
|
|
|
|
|
|
+ border-radius: 0px;
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
|
gap: 16px;
|
|
gap: 16px;
|
|
|
padding: 0 16px;
|
|
padding: 0 16px;
|
|
@@ -823,7 +846,7 @@ const goBack = () => {
|
|
|
user-select: none;
|
|
user-select: none;
|
|
|
cursor: grab;
|
|
cursor: grab;
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
- border-radius: 4px;
|
|
|
|
|
|
|
+ border-radius: 0px;
|
|
|
/* margin: 8px 0 8px 8px; */
|
|
/* margin: 8px 0 8px 8px; */
|
|
|
width: 92px;
|
|
width: 92px;
|
|
|
min-height: 50px;
|
|
min-height: 50px;
|
|
@@ -956,13 +979,13 @@ const goBack = () => {
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
|
color: #aaa;
|
|
color: #aaa;
|
|
|
- border-radius: 12px;
|
|
|
|
|
|
|
+ border-radius: 0px;
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.component-item {
|
|
.component-item {
|
|
|
border: 2px solid #e3e3e3;
|
|
border: 2px solid #e3e3e3;
|
|
|
- border-radius: 10px;
|
|
|
|
|
|
|
+ border-radius: 0px;
|
|
|
background: #fafbfc;
|
|
background: #fafbfc;
|
|
|
margin-bottom: 16px;
|
|
margin-bottom: 16px;
|
|
|
padding: 18px 0;
|
|
padding: 18px 0;
|