refactor: (web-ele)优化移动端组件代码结构
-调整组件内元素的排列顺序 - 修复部分组件的样式问题 - 优化代码结构,提高可维护性pull/194/head
parent
b8c66b23f9
commit
218f28f35c
|
@ -6,13 +6,13 @@ import type {
|
||||||
|
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { ElButton, ElTooltip } from 'element-plus';
|
import { ElButton, ElTooltip } from 'element-plus';
|
||||||
|
|
||||||
import { components } from '#/components/diy-editor/components/mobile';
|
import { components } from '#/components/diy-editor/components/mobile';
|
||||||
import VerticalButtonGroup from '#/components/vertical-button-group/index.vue';
|
import VerticalButtonGroup from '#/components/vertical-button-group/index.vue';
|
||||||
|
|
||||||
import { IconifyIcon } from '@vben/icons';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组件容器:目前在中间部分
|
* 组件容器:目前在中间部分
|
||||||
* 用于包裹组件,为组件提供 背景、外边距、内边距、边框等样式
|
* 用于包裹组件,为组件提供 背景、外边距、内边距、边框等样式
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DividerProperty } from './config';
|
import type { DividerProperty } from './config';
|
||||||
|
|
||||||
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import {
|
import {
|
||||||
ElForm,
|
ElForm,
|
||||||
|
@ -10,7 +12,6 @@ import {
|
||||||
ElSlider,
|
ElSlider,
|
||||||
ElTooltip,
|
ElTooltip,
|
||||||
} from 'element-plus';
|
} from 'element-plus';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
|
||||||
|
|
||||||
import ColorInput from '#/components/input-with-color/index.vue';
|
import ColorInput from '#/components/input-with-color/index.vue';
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PopoverProperty } from './config';
|
import type { PopoverProperty } from './config';
|
||||||
|
|
||||||
import { ElImage } from 'element-plus';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { ref } from 'vue';
|
import { ElImage } from 'element-plus';
|
||||||
|
|
||||||
/** 弹窗广告 */
|
/** 弹窗广告 */
|
||||||
defineOptions({ name: 'Popover' });
|
defineOptions({ name: 'Popover' });
|
||||||
|
|
|
@ -9,9 +9,10 @@ import {
|
||||||
ElRadioGroup,
|
ElRadioGroup,
|
||||||
ElTooltip,
|
ElTooltip,
|
||||||
} from 'element-plus';
|
} from 'element-plus';
|
||||||
|
|
||||||
|
import AppLinkInput from '#/components/app-link-input/index.vue';
|
||||||
import Draggable from '#/components/draggable/index.vue';
|
import Draggable from '#/components/draggable/index.vue';
|
||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
import AppLinkInput from '#/components/app-link-input/index.vue';
|
|
||||||
|
|
||||||
// 弹窗广告属性面板
|
// 弹窗广告属性面板
|
||||||
defineOptions({ name: 'PopoverProperty' });
|
defineOptions({ name: 'PopoverProperty' });
|
||||||
|
|
|
@ -21,8 +21,8 @@ import {
|
||||||
|
|
||||||
import * as CouponTemplateApi from '#/api/mall/promotion/coupon/couponTemplate';
|
import * as CouponTemplateApi from '#/api/mall/promotion/coupon/couponTemplate';
|
||||||
import ColorInput from '#/components/color-input/index.vue';
|
import ColorInput from '#/components/color-input/index.vue';
|
||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
import {
|
import {
|
||||||
CouponTemplateTakeTypeEnum,
|
CouponTemplateTakeTypeEnum,
|
||||||
PromotionDiscountTypeEnum,
|
PromotionDiscountTypeEnum,
|
||||||
|
|
|
@ -4,7 +4,8 @@ import type { HotZoneProperty } from './config';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { ElForm, ElFormItem, ElText, ElButton } from 'element-plus';
|
import { ElButton, ElForm, ElFormItem, ElText } from 'element-plus';
|
||||||
|
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import type { ImageBarProperty } from './config';
|
import type { ImageBarProperty } from './config';
|
||||||
|
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { ElImage } from 'element-plus';
|
import { ElImage } from 'element-plus';
|
||||||
|
|
||||||
/** 图片展示 */
|
/** 图片展示 */
|
||||||
|
|
|
@ -3,9 +3,10 @@ import type { ImageBarProperty } from './config';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { ElForm, ElFormItem } from 'element-plus';
|
import { ElForm, ElFormItem } from 'element-plus';
|
||||||
|
|
||||||
|
import AppLinkInput from '#/components/app-link-input/index.vue';
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
import AppLinkInput from '#/components/app-link-input/index.vue';
|
|
||||||
|
|
||||||
// 图片展示属性面板
|
// 图片展示属性面板
|
||||||
defineOptions({ name: 'ImageBarProperty' });
|
defineOptions({ name: 'ImageBarProperty' });
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { MagicCubeProperty } from './config';
|
import type { MagicCubeProperty } from './config';
|
||||||
|
|
||||||
import { ElImage } from 'element-plus';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { computed } from 'vue';
|
import { ElImage } from 'element-plus';
|
||||||
|
|
||||||
/** 广告魔方 */
|
/** 广告魔方 */
|
||||||
defineOptions({ name: 'MagicCube' });
|
defineOptions({ name: 'MagicCube' });
|
||||||
|
|
|
@ -5,10 +5,11 @@ import { ref } from 'vue';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { ElForm, ElFormItem, ElSlider, ElText } from 'element-plus';
|
import { ElForm, ElFormItem, ElSlider, ElText } from 'element-plus';
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
|
||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
|
||||||
import AppLinkInput from '#/components/app-link-input/index.vue';
|
import AppLinkInput from '#/components/app-link-input/index.vue';
|
||||||
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
import MagicCubeEditor from '#/components/magic-cube-editor/index.vue';
|
import MagicCubeEditor from '#/components/magic-cube-editor/index.vue';
|
||||||
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
|
|
||||||
/** 广告魔方属性面板 */
|
/** 广告魔方属性面板 */
|
||||||
defineOptions({ name: 'MagicCubeProperty' });
|
defineOptions({ name: 'MagicCubeProperty' });
|
||||||
|
|
|
@ -11,23 +11,19 @@ defineProps<{ property: MenuListProperty }>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="min-h-[42px] flex flex-col">
|
<div class="flex min-h-[42px] flex-col">
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in property.list"
|
v-for="(item, index) in property.list"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="item h-[42px] gap-1 px-3 flex flex-row items-center justify-between"
|
class="item flex h-[42px] flex-row items-center justify-between gap-1 px-3"
|
||||||
>
|
>
|
||||||
<div class="gap-2 flex flex-1 flex-row items-center">
|
<div class="flex flex-1 flex-row items-center gap-2">
|
||||||
<ElImage
|
<ElImage v-if="item.iconUrl" class="h-4 w-4" :src="item.iconUrl" />
|
||||||
v-if="item.iconUrl"
|
|
||||||
class="h-4 w-4"
|
|
||||||
:src="item.iconUrl"
|
|
||||||
/>
|
|
||||||
<span class="text-base" :style="{ color: item.titleColor }">{{
|
<span class="text-base" :style="{ color: item.titleColor }">{{
|
||||||
item.title
|
item.title
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-center gap-1 flex flex-row justify-center">
|
<div class="item-center flex flex-row justify-center gap-1">
|
||||||
<span class="text-xs" :style="{ color: item.subtitleColor }">{{
|
<span class="text-xs" :style="{ color: item.subtitleColor }">{{
|
||||||
item.subtitle
|
item.subtitle
|
||||||
}}</span>
|
}}</span>
|
||||||
|
|
|
@ -4,12 +4,13 @@ import type { MenuListProperty } from './config';
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { ElForm, ElFormItem, ElText } from 'element-plus';
|
import { ElForm, ElFormItem, ElText } from 'element-plus';
|
||||||
|
|
||||||
import { EMPTY_MENU_LIST_ITEM_PROPERTY } from './config';
|
import AppLinkInput from '#/components/app-link-input/index.vue';
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
import Draggable from '#/components/draggable/index.vue';
|
import Draggable from '#/components/draggable/index.vue';
|
||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
|
||||||
import InputWithColor from '#/components/input-with-color/index.vue';
|
import InputWithColor from '#/components/input-with-color/index.vue';
|
||||||
import AppLinkInput from '#/components/app-link-input/index.vue';
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
|
|
||||||
|
import { EMPTY_MENU_LIST_ITEM_PROPERTY } from './config';
|
||||||
|
|
||||||
/** 列表导航属性面板 */
|
/** 列表导航属性面板 */
|
||||||
defineOptions({ name: 'MenuListProperty' });
|
defineOptions({ name: 'MenuListProperty' });
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { MenuSwiperItemProperty, MenuSwiperProperty } from './config';
|
import type { MenuSwiperItemProperty, MenuSwiperProperty } from './config';
|
||||||
|
|
||||||
import { ElCarousel, ElCarouselItem, ElImage } from 'element-plus';
|
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
|
||||||
|
import { ElCarousel, ElCarouselItem, ElImage } from 'element-plus';
|
||||||
|
|
||||||
/** 菜单导航 */
|
/** 菜单导航 */
|
||||||
defineOptions({ name: 'MenuSwiper' });
|
defineOptions({ name: 'MenuSwiper' });
|
||||||
const props = defineProps<{ property: MenuSwiperProperty }>();
|
const props = defineProps<{ property: MenuSwiperProperty }>();
|
||||||
|
|
|
@ -3,6 +3,7 @@ import type { MenuSwiperProperty } from './config';
|
||||||
|
|
||||||
import { cloneDeep } from '@vben/utils';
|
import { cloneDeep } from '@vben/utils';
|
||||||
|
|
||||||
|
import { useVModel } from '@vueuse/core';
|
||||||
import {
|
import {
|
||||||
ElCard,
|
ElCard,
|
||||||
ElForm,
|
ElForm,
|
||||||
|
@ -12,15 +13,14 @@ import {
|
||||||
ElSwitch,
|
ElSwitch,
|
||||||
} from 'element-plus';
|
} from 'element-plus';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
|
||||||
|
|
||||||
import { EMPTY_MENU_SWIPER_ITEM_PROPERTY } from './config';
|
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
|
||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
|
||||||
import Draggable from '#/components/draggable/index.vue';
|
|
||||||
import InputWithColor from '#/components/input-with-color/index.vue';
|
|
||||||
import AppLinkInput from '#/components/app-link-input/index.vue';
|
import AppLinkInput from '#/components/app-link-input/index.vue';
|
||||||
import ColorInput from '#/components/color-input/index.vue';
|
import ColorInput from '#/components/color-input/index.vue';
|
||||||
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
|
import Draggable from '#/components/draggable/index.vue';
|
||||||
|
import InputWithColor from '#/components/input-with-color/index.vue';
|
||||||
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
|
|
||||||
|
import { EMPTY_MENU_SWIPER_ITEM_PROPERTY } from './config';
|
||||||
|
|
||||||
/** 菜单导航属性面板 */
|
/** 菜单导航属性面板 */
|
||||||
defineOptions({ name: 'MenuSwiperProperty' });
|
defineOptions({ name: 'MenuSwiperProperty' });
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { NoticeBarProperty } from './config';
|
import type { NoticeBarProperty } from './config';
|
||||||
|
|
||||||
import { ElCarousel, ElCarouselItem, ElImage, ElDivider } from 'element-plus';
|
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
|
import { ElCarousel, ElCarouselItem, ElDivider, ElImage } from 'element-plus';
|
||||||
|
|
||||||
/** 公告栏 */
|
/** 公告栏 */
|
||||||
defineOptions({ name: 'NoticeBar' });
|
defineOptions({ name: 'NoticeBar' });
|
||||||
|
|
||||||
|
@ -12,7 +13,7 @@ defineProps<{ property: NoticeBarProperty }>();
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="py-1 text-xs flex items-center"
|
class="flex items-center py-1 text-xs"
|
||||||
:style="{
|
:style="{
|
||||||
backgroundColor: property.backgroundColor,
|
backgroundColor: property.backgroundColor,
|
||||||
color: property.textColor,
|
color: property.textColor,
|
||||||
|
@ -24,10 +25,10 @@ defineProps<{ property: NoticeBarProperty }>();
|
||||||
height="24px"
|
height="24px"
|
||||||
direction="vertical"
|
direction="vertical"
|
||||||
:autoplay="true"
|
:autoplay="true"
|
||||||
class="pr-2 flex-1"
|
class="flex-1 pr-2"
|
||||||
>
|
>
|
||||||
<ElCarouselItem v-for="(item, index) in property.contents" :key="index">
|
<ElCarouselItem v-for="(item, index) in property.contents" :key="index">
|
||||||
<div class="h-6 leading-6 truncate">{{ item.text }}</div>
|
<div class="h-6 truncate leading-6">{{ item.text }}</div>
|
||||||
</ElCarouselItem>
|
</ElCarouselItem>
|
||||||
</ElCarousel>
|
</ElCarousel>
|
||||||
<IconifyIcon icon="ep:arrow-right" />
|
<IconifyIcon icon="ep:arrow-right" />
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { NoticeBarProperty } from './config';
|
import type { NoticeBarProperty } from './config';
|
||||||
|
|
||||||
|
import { useVModel } from '@vueuse/core';
|
||||||
import { ElCard, ElForm, ElFormItem, ElInput } from 'element-plus';
|
import { ElCard, ElForm, ElFormItem, ElInput } from 'element-plus';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import AppLinkInput from '#/components/app-link-input/index.vue';
|
||||||
|
import ColorInput from '#/components/color-input/index.vue';
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
import Draggable from '#/components/draggable/index.vue';
|
import Draggable from '#/components/draggable/index.vue';
|
||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
import AppLinkInput from '#/components/app-link-input/index.vue';
|
|
||||||
import ColorInput from '#/components/color-input/index.vue';
|
|
||||||
|
|
||||||
// 通知栏属性面板
|
// 通知栏属性面板
|
||||||
defineOptions({ name: 'NoticeBarProperty' });
|
defineOptions({ name: 'NoticeBarProperty' });
|
||||||
|
|
|
@ -3,6 +3,7 @@ import type { PageConfigProperty } from './config';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { ElForm, ElFormItem, ElInput } from 'element-plus';
|
import { ElForm, ElFormItem, ElInput } from 'element-plus';
|
||||||
|
|
||||||
import ColorInput from '#/components/input-with-color/index.vue';
|
import ColorInput from '#/components/input-with-color/index.vue';
|
||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
|
|
||||||
|
|
|
@ -56,37 +56,37 @@ const formData = useVModel(props, 'modelValue', emit);
|
||||||
</ElRadioGroup>
|
</ElRadioGroup>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="商品名称" prop="fields.name.show">
|
<ElFormItem label="商品名称" prop="fields.name.show">
|
||||||
<div class="gap-2 flex">
|
<div class="flex gap-2">
|
||||||
<ColorInput v-model="formData.fields.name.color" />
|
<ColorInput v-model="formData.fields.name.color" />
|
||||||
<ElCheckbox v-model="formData.fields.name.show" />
|
<ElCheckbox v-model="formData.fields.name.show" />
|
||||||
</div>
|
</div>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="商品简介" prop="fields.introduction.show">
|
<ElFormItem label="商品简介" prop="fields.introduction.show">
|
||||||
<div class="gap-2 flex">
|
<div class="flex gap-2">
|
||||||
<ColorInput v-model="formData.fields.introduction.color" />
|
<ColorInput v-model="formData.fields.introduction.color" />
|
||||||
<ElCheckbox v-model="formData.fields.introduction.show" />
|
<ElCheckbox v-model="formData.fields.introduction.show" />
|
||||||
</div>
|
</div>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="商品价格" prop="fields.price.show">
|
<ElFormItem label="商品价格" prop="fields.price.show">
|
||||||
<div class="gap-2 flex">
|
<div class="flex gap-2">
|
||||||
<ColorInput v-model="formData.fields.price.color" />
|
<ColorInput v-model="formData.fields.price.color" />
|
||||||
<ElCheckbox v-model="formData.fields.price.show" />
|
<ElCheckbox v-model="formData.fields.price.show" />
|
||||||
</div>
|
</div>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="市场价" prop="fields.marketPrice.show">
|
<ElFormItem label="市场价" prop="fields.marketPrice.show">
|
||||||
<div class="gap-2 flex">
|
<div class="flex gap-2">
|
||||||
<ColorInput v-model="formData.fields.marketPrice.color" />
|
<ColorInput v-model="formData.fields.marketPrice.color" />
|
||||||
<ElCheckbox v-model="formData.fields.marketPrice.show" />
|
<ElCheckbox v-model="formData.fields.marketPrice.show" />
|
||||||
</div>
|
</div>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="商品销量" prop="fields.salesCount.show">
|
<ElFormItem label="商品销量" prop="fields.salesCount.show">
|
||||||
<div class="gap-2 flex">
|
<div class="flex gap-2">
|
||||||
<ColorInput v-model="formData.fields.salesCount.color" />
|
<ColorInput v-model="formData.fields.salesCount.color" />
|
||||||
<ElCheckbox v-model="formData.fields.salesCount.show" />
|
<ElCheckbox v-model="formData.fields.salesCount.show" />
|
||||||
</div>
|
</div>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="商品库存" prop="fields.stock.show">
|
<ElFormItem label="商品库存" prop="fields.stock.show">
|
||||||
<div class="gap-2 flex">
|
<div class="flex gap-2">
|
||||||
<ColorInput v-model="formData.fields.stock.color" />
|
<ColorInput v-model="formData.fields.stock.color" />
|
||||||
<ElCheckbox v-model="formData.fields.stock.show" />
|
<ElCheckbox v-model="formData.fields.stock.show" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,6 +6,7 @@ import type { MallSpuApi } from '#/api/mall/product/spu';
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { fenToYuan } from '@vben/utils';
|
import { fenToYuan } from '@vben/utils';
|
||||||
|
|
||||||
import { ElImage, ElScrollbar } from 'element-plus';
|
import { ElImage, ElScrollbar } from 'element-plus';
|
||||||
|
|
||||||
import * as ProductSpuApi from '#/api/mall/product/spu';
|
import * as ProductSpuApi from '#/api/mall/product/spu';
|
||||||
|
|
|
@ -3,19 +3,19 @@ import type { ProductListProperty } from './config';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import {
|
import {
|
||||||
|
ElCard,
|
||||||
ElForm,
|
ElForm,
|
||||||
ElFormItem,
|
ElFormItem,
|
||||||
ElCard,
|
|
||||||
ElRadioGroup,
|
|
||||||
ElRadioButton,
|
ElRadioButton,
|
||||||
|
ElRadioGroup,
|
||||||
ElSlider,
|
ElSlider,
|
||||||
ElSwitch,
|
ElSwitch,
|
||||||
ElTooltip,
|
ElTooltip,
|
||||||
} from 'element-plus';
|
} from 'element-plus';
|
||||||
|
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
import ColorInput from '#/components/input-with-color/index.vue';
|
import ColorInput from '#/components/input-with-color/index.vue';
|
||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
|
|
||||||
import SpuShowcase from '#/views/mall/product/spu/components/spu-showcase.vue';
|
import SpuShowcase from '#/views/mall/product/spu/components/spu-showcase.vue';
|
||||||
|
|
||||||
// 商品栏属性面板
|
// 商品栏属性面板
|
||||||
|
@ -67,7 +67,7 @@ const formData = useVModel(props, 'modelValue', emit);
|
||||||
</ElCard>
|
</ElCard>
|
||||||
<ElCard header="角标" class="property-group" shadow="never">
|
<ElCard header="角标" class="property-group" shadow="never">
|
||||||
<ElFormItem label="角标" prop="badge.show">
|
<ElFormItem label="角标" prop="badge.show">
|
||||||
<el-switch v-model="formData.badge.show" />
|
<ElSwitch v-model="formData.badge.show" />
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="角标" prop="badge.imgUrl" v-if="formData.badge.show">
|
<ElFormItem label="角标" prop="badge.imgUrl" v-if="formData.badge.show">
|
||||||
<UploadImg
|
<UploadImg
|
||||||
|
|
|
@ -6,9 +6,10 @@ import type { MallArticleApi } from '#/api/mall/promotion/article';
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { ElForm, ElFormItem, ElSelect, ElOption } from 'element-plus';
|
import { ElForm, ElFormItem, ElOption, ElSelect } from 'element-plus';
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
|
||||||
import * as ArticleApi from '#/api/mall/promotion/article/index';
|
import * as ArticleApi from '#/api/mall/promotion/article/index';
|
||||||
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
|
|
||||||
// 营销文章属性面板
|
// 营销文章属性面板
|
||||||
defineOptions({ name: 'PromotionArticleProperty' });
|
defineOptions({ name: 'PromotionArticleProperty' });
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { TitleBarProperty } from './config';
|
import type { TitleBarProperty } from './config';
|
||||||
|
|
||||||
import { ElImage } from 'element-plus';
|
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
|
import { ElImage } from 'element-plus';
|
||||||
|
|
||||||
/** 标题栏 */
|
/** 标题栏 */
|
||||||
defineOptions({ name: 'TitleBar' });
|
defineOptions({ name: 'TitleBar' });
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,25 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { TitleBarProperty } from './config';
|
import type { TitleBarProperty } from './config';
|
||||||
|
|
||||||
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import {
|
import {
|
||||||
|
ElCard,
|
||||||
|
ElCheckbox,
|
||||||
ElForm,
|
ElForm,
|
||||||
ElFormItem,
|
ElFormItem,
|
||||||
|
ElInput,
|
||||||
ElRadioButton,
|
ElRadioButton,
|
||||||
ElRadioGroup,
|
ElRadioGroup,
|
||||||
ElSlider,
|
ElSlider,
|
||||||
ElTooltip,
|
ElTooltip,
|
||||||
ElInput,
|
|
||||||
ElCheckbox,
|
|
||||||
ElCard,
|
|
||||||
} from 'element-plus';
|
} from 'element-plus';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
|
||||||
|
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
|
||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
|
||||||
import InputWithColor from '#/components/input-with-color/index.vue';
|
|
||||||
import AppLinkInput from '#/components/app-link-input/index.vue';
|
import AppLinkInput from '#/components/app-link-input/index.vue';
|
||||||
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
|
import InputWithColor from '#/components/input-with-color/index.vue';
|
||||||
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
|
|
||||||
// 导航栏属性面板
|
// 导航栏属性面板
|
||||||
defineOptions({ name: 'TitleBarProperty' });
|
defineOptions({ name: 'TitleBarProperty' });
|
||||||
|
@ -59,7 +60,7 @@ const rules = {};
|
||||||
</ElRadioGroup>
|
</ElRadioGroup>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="偏移量" prop="marginLeft" label-width="70px">
|
<ElFormItem label="偏移量" prop="marginLeft" label-width="70px">
|
||||||
<el-slider
|
<ElSlider
|
||||||
v-model="formData.marginLeft"
|
v-model="formData.marginLeft"
|
||||||
:max="100"
|
:max="100"
|
||||||
:min="0"
|
:min="0"
|
||||||
|
@ -68,7 +69,7 @@ const rules = {};
|
||||||
/>
|
/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem label="高度" prop="height" label-width="70px">
|
<ElFormItem label="高度" prop="height" label-width="70px">
|
||||||
<el-slider
|
<ElSlider
|
||||||
v-model="formData.height"
|
v-model="formData.height"
|
||||||
:max="200"
|
:max="200"
|
||||||
:min="20"
|
:min="20"
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { UserCardProperty } from './config';
|
import type { UserCardProperty } from './config';
|
||||||
|
|
||||||
import { ElAvatar } from 'element-plus';
|
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
|
import { ElAvatar } from 'element-plus';
|
||||||
|
|
||||||
/** 用户卡片 */
|
/** 用户卡片 */
|
||||||
defineOptions({ name: 'UserCard' });
|
defineOptions({ name: 'UserCard' });
|
||||||
// 定义属性
|
// 定义属性
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import type { UserCardProperty } from './config';
|
import type { UserCardProperty } from './config';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
|
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
|
|
||||||
// 用户卡片属性面板
|
// 用户卡片属性面板
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import type { UserCouponProperty } from './config';
|
import type { UserCouponProperty } from './config';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
|
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
|
|
||||||
// 用户卡券属性面板
|
// 用户卡券属性面板
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import type { UserOrderProperty } from './config';
|
import type { UserOrderProperty } from './config';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
|
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
|
|
||||||
// 用户订单属性面板
|
// 用户订单属性面板
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import type { UserWalletProperty } from './config';
|
import type { UserWalletProperty } from './config';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
|
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
|
|
||||||
// 用户资产属性面板
|
// 用户资产属性面板
|
||||||
|
|
|
@ -3,6 +3,7 @@ import type { VideoPlayerProperty } from './config';
|
||||||
|
|
||||||
import { useVModel } from '@vueuse/core';
|
import { useVModel } from '@vueuse/core';
|
||||||
import { ElForm, ElFormItem, ElSlider, ElSwitch } from 'element-plus';
|
import { ElForm, ElFormItem, ElSlider, ElSwitch } from 'element-plus';
|
||||||
|
|
||||||
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
|
||||||
import UploadFile from '#/components/upload/file-upload.vue';
|
import UploadFile from '#/components/upload/file-upload.vue';
|
||||||
import UploadImg from '#/components/upload/image-upload.vue';
|
import UploadImg from '#/components/upload/image-upload.vue';
|
||||||
|
|
Loading…
Reference in New Issue