feat:【mall】diy editor 的告警修复
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
|||||||
ElText,
|
ElText,
|
||||||
ElTooltip,
|
ElTooltip,
|
||||||
} from 'element-plus';
|
} from 'element-plus';
|
||||||
|
import draggable from 'vuedraggable';
|
||||||
|
|
||||||
import statusBarImg from '#/assets/imgs/diy/statusBar.png';
|
import statusBarImg from '#/assets/imgs/diy/statusBar.png';
|
||||||
|
|
||||||
@@ -77,17 +78,20 @@ watch(
|
|||||||
isString(props.modelValue) && !isEmpty(props.modelValue)
|
isString(props.modelValue) && !isEmpty(props.modelValue)
|
||||||
? (JSON.parse(props.modelValue) as PageConfig)
|
? (JSON.parse(props.modelValue) as PageConfig)
|
||||||
: props.modelValue;
|
: props.modelValue;
|
||||||
// TODO @AI:这里可以简化么?idea 提示 Invalid 'typeof' check: 'modelValue' cannot have type 'string'
|
// noinspection SuspiciousTypeOfGuard
|
||||||
pageConfigComponent.value.property =
|
pageConfigComponent.value.property =
|
||||||
(typeof modelValue !== 'string' && modelValue?.page) ||
|
(typeof modelValue !== 'string' && modelValue?.page) ||
|
||||||
PAGE_CONFIG_COMPONENT.property;
|
PAGE_CONFIG_COMPONENT.property;
|
||||||
|
// noinspection SuspiciousTypeOfGuard
|
||||||
navigationBarComponent.value.property =
|
navigationBarComponent.value.property =
|
||||||
(typeof modelValue !== 'string' && modelValue?.navigationBar) ||
|
(typeof modelValue !== 'string' && modelValue?.navigationBar) ||
|
||||||
NAVIGATION_BAR_COMPONENT.property;
|
NAVIGATION_BAR_COMPONENT.property;
|
||||||
|
// noinspection SuspiciousTypeOfGuard
|
||||||
tabBarComponent.value.property =
|
tabBarComponent.value.property =
|
||||||
(typeof modelValue !== 'string' && modelValue?.tabBar) ||
|
(typeof modelValue !== 'string' && modelValue?.tabBar) ||
|
||||||
TAB_BAR_COMPONENT.property;
|
TAB_BAR_COMPONENT.property;
|
||||||
// 查找对应的页面组件
|
// 查找对应的页面组件
|
||||||
|
// noinspection SuspiciousTypeOfGuard
|
||||||
pageComponents.value = (
|
pageComponents.value = (
|
||||||
(typeof modelValue !== 'string' && modelValue?.components) ||
|
(typeof modelValue !== 'string' && modelValue?.components) ||
|
||||||
[]
|
[]
|
||||||
@@ -233,7 +237,6 @@ function handleCopyComponent(index: number) {
|
|||||||
|
|
||||||
/** 删除组件 */
|
/** 删除组件 */
|
||||||
function handleDeleteComponent(index: number) {
|
function handleDeleteComponent(index: number) {
|
||||||
// 删除组件
|
|
||||||
pageComponents.value.splice(index, 1);
|
pageComponents.value.splice(index, 1);
|
||||||
if (index < pageComponents.value.length) {
|
if (index < pageComponents.value.length) {
|
||||||
// 1. 不是最后一个组件时,删除后选中下面的组件
|
// 1. 不是最后一个组件时,删除后选中下面的组件
|
||||||
@@ -481,10 +484,10 @@ onMounted(() => {
|
|||||||
<!-- 预览弹框 -->
|
<!-- 预览弹框 -->
|
||||||
<PreviewModal title="预览" class="w-700px">
|
<PreviewModal title="预览" class="w-700px">
|
||||||
<div class="flex justify-around">
|
<div class="flex justify-around">
|
||||||
<IFrame
|
<iframe
|
||||||
:src="previewUrl"
|
:src="previewUrl"
|
||||||
class="h-[667px] w-[375px] rounded-lg border-4 border-solid p-0.5"
|
class="h-[667px] w-[375px] rounded-lg border-4 border-solid p-0.5"
|
||||||
/>
|
></iframe>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<ElText>手机扫码预览</ElText>
|
<ElText>手机扫码预览</ElText>
|
||||||
<ElImage :src="qrcode" alt="qrcode" />
|
<ElImage :src="qrcode" alt="qrcode" />
|
||||||
|
|||||||
Reference in New Issue
Block a user