feat:【ele】【mall】diy-editor 调整目录到 promotion 更聚焦

This commit is contained in:
YunaiV
2025-10-25 17:26:32 +08:00
parent a624307532
commit 6d3afd8ccf
99 changed files with 65 additions and 64 deletions

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import type { ComponentStyle } from '#/components/diy-editor/util';
import type { ComponentStyle } from '../util';
import { useVModel } from '@vueuse/core';
import {

View File

@@ -2,7 +2,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../util';
import { computed } from 'vue';
@@ -10,7 +10,7 @@ import { IconifyIcon } from '@vben/icons';
import { ElButton, ElTooltip } from 'element-plus';
import { components } from '#/components/diy-editor/components/mobile';
import { components } from './mobile';
import { VerticalButtonGroup } from '#/views/mall/promotion/components';
/**

View File

@@ -2,7 +2,7 @@
import type {
DiyComponent,
DiyComponentLibrary,
} from '#/components/diy-editor/util';
} from '../util';
import { reactive, watch } from 'vue';

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 轮播图属性 */
export interface CarouselProperty {

View File

@@ -16,7 +16,7 @@ import {
ElTooltip,
} from 'element-plus';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import UploadFile from '#/components/upload/file-upload.vue';
import UploadImg from '#/components/upload/image-upload.vue';
import { AppLinkInput, Draggable } from '#/views/mall/promotion/components';

View File

@@ -1,4 +1,4 @@
import type { DiyComponent } from '#/components/diy-editor/util';
import type { DiyComponent } from '../../../util';
/** 分割线属性 */
export interface DividerProperty {

View File

@@ -1,4 +1,4 @@
import type { DiyComponent } from '#/components/diy-editor/util';
import type { DiyComponent } from '../../../util';
/** 弹窗广告属性 */
export interface PopoverProperty {

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 商品卡片属性 */
export interface CouponCardProperty {

View File

@@ -24,7 +24,7 @@ import {
} from 'element-plus';
import * as CouponTemplateApi from '#/api/mall/promotion/coupon/couponTemplate';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import UploadImg from '#/components/upload/image-upload.vue';
import { ColorInput } from '#/views/mall/promotion/components';
// TODO:

View File

@@ -1,4 +1,4 @@
import type { DiyComponent } from '#/components/diy-editor/util';
import type { DiyComponent } from '../../../util';
// 悬浮按钮属性
export interface FloatingActionButtonProperty {

View File

@@ -1,6 +1,6 @@
import type { StyleValue } from 'vue';
import type { HotZoneItemProperty } from '#/components/diy-editor/components/mobile/HotZone/config';
import type { HotZoneItemProperty } from '../../config';
// 热区的最小宽高
export const HOT_ZONE_MIN_SIZE = 100;

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import type { ControlDot } from './controller';
import type { HotZoneItemProperty } from '#/components/diy-editor/components/mobile/HotZone/config';
import type { HotZoneItemProperty } from '../../config';
import type { AppLink } from '#/views/mall/promotion/components/app-link-input/data';
import { ref } from 'vue';

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 热区属性 */
export interface HotZoneProperty {

View File

@@ -6,7 +6,7 @@ import { ref } from 'vue';
import { useVModel } from '@vueuse/core';
import { ElButton, ElForm, ElFormItem, ElText } from 'element-plus';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import UploadImg from '#/components/upload/image-upload.vue';
import HotZoneEditDialog from './components/hot-zone-edit-dialog/index.vue';

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 图片展示属性 */
export interface ImageBarProperty {

View File

@@ -4,7 +4,7 @@ import type { ImageBarProperty } from './config';
import { useVModel } from '@vueuse/core';
import { ElForm, ElFormItem } from 'element-plus';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import UploadImg from '#/components/upload/image-upload.vue';
import { AppLinkInput } from '#/views/mall/promotion/components';

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 广告魔方属性 */
export interface MagicCubeProperty {

View File

@@ -6,7 +6,7 @@ import { ref } from 'vue';
import { useVModel } from '@vueuse/core';
import { ElForm, ElFormItem, ElSlider, ElText } from 'element-plus';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import UploadImg from '#/components/upload/image-upload.vue';
import {
AppLinkInput,

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
import { cloneDeep } from '@vben/utils';

View File

@@ -11,7 +11,7 @@ import {
ElSwitch,
} from 'element-plus';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import UploadImg from '#/components/upload/image-upload.vue';
import { AppLinkInput, Draggable } from '#/views/mall/promotion/components';

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
import { cloneDeep } from '@vben/utils';

View File

@@ -4,7 +4,7 @@ import type { MenuListProperty } from './config';
import { useVModel } from '@vueuse/core';
import { ElForm, ElFormItem, ElText } from 'element-plus';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import UploadImg from '#/components/upload/image-upload.vue';
import {
AppLinkInput,

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
import { cloneDeep } from '@vben/utils';

View File

@@ -13,7 +13,7 @@ import {
ElSwitch,
} from 'element-plus';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import UploadImg from '#/components/upload/image-upload.vue';
import {
AppLinkInput,

View File

@@ -1,4 +1,4 @@
import type { DiyComponent } from '#/components/diy-editor/util';
import type { DiyComponent } from '../../../util';
/** 顶部导航栏属性 */
export interface NavigationBarProperty {

View File

@@ -6,12 +6,12 @@ import type {
NavigationBarProperty,
} from './config';
import type { SearchProperty } from '#/components/diy-editor/components/mobile/search-bar/config';
import type { SearchProperty } from '../search-bar/config';
import { computed } from 'vue';
import appNavbarMp from '#/assets/imgs/diy/app-nav-bar-mp.png';
import SearchBar from '#/components/diy-editor/components/mobile/search-bar/index.vue';
import SearchBar from '../search-bar/index.vue';
/** 页面顶部导航栏 */
defineOptions({ name: 'NavigationBar' });

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 公告栏属性 */
export interface NoticeBarProperty {

View File

@@ -4,7 +4,7 @@ import type { NoticeBarProperty } from './config';
import { useVModel } from '@vueuse/core';
import { ElCard, ElForm, ElFormItem, ElInput } from 'element-plus';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import UploadImg from '#/components/upload/image-upload.vue';
import {
AppLinkInput,

View File

@@ -1,4 +1,4 @@
import type { DiyComponent } from '#/components/diy-editor/util';
import type { DiyComponent } from '../../../util';
/** 页面设置属性 */
export interface PageConfigProperty {

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 商品卡片属性 */
export interface ProductCardProperty {

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 商品栏属性 */
export interface ProductListProperty {

View File

@@ -15,7 +15,7 @@ import {
ElTooltip,
} from 'element-plus';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import UploadImg from '#/components/upload/image-upload.vue';
import { InputWithColor as ColorInput } from '#/views/mall/promotion/components';
// TODO:

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 营销文章属性 */
export interface PromotionArticleProperty {

View File

@@ -9,7 +9,7 @@ import { useVModel } from '@vueuse/core';
import { ElForm, ElFormItem, ElOption, ElSelect } from 'element-plus';
import * as ArticleApi from '#/api/mall/promotion/article/index';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
//
defineOptions({ name: 'PromotionArticleProperty' });

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 拼团属性 */
export interface PromotionCombinationProperty {

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 积分商城属性 */
export interface PromotionPointProperty {

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 秒杀属性 */
export interface PromotionSeckillProperty {

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 搜索框属性 */
export interface SearchProperty {

View File

@@ -18,7 +18,7 @@ import {
ElTooltip,
} from 'element-plus';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import { Draggable } from '#/views/mall/promotion/components';
/** 搜索框属性面板 */

View File

@@ -1,4 +1,4 @@
import type { DiyComponent } from '#/components/diy-editor/util';
import type { DiyComponent } from '../../../util';
/** 底部导航菜单属性 */
export interface TabBarProperty {

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 标题栏属性 */
export interface TitleBarProperty {

View File

@@ -16,7 +16,7 @@ import {
ElTooltip,
} from 'element-plus';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import UploadImg from '#/components/upload/image-upload.vue';
import {
AppLinkInput,

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 用户卡片属性 */
export interface UserCardProperty {

View File

@@ -3,7 +3,7 @@ import type { UserCardProperty } from './config';
import { useVModel } from '@vueuse/core';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
//
defineOptions({ name: 'UserCardProperty' });

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 用户卡券属性 */
export interface UserCouponProperty {

View File

@@ -3,7 +3,7 @@ import type { UserCouponProperty } from './config';
import { useVModel } from '@vueuse/core';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
//
defineOptions({ name: 'UserCouponProperty' });

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 用户订单属性 */
export interface UserOrderProperty {

View File

@@ -3,7 +3,7 @@ import type { UserOrderProperty } from './config';
import { useVModel } from '@vueuse/core';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
//
defineOptions({ name: 'UserOrderProperty' });

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 用户资产属性 */
export interface UserWalletProperty {

View File

@@ -3,7 +3,7 @@ import type { UserWalletProperty } from './config';
import { useVModel } from '@vueuse/core';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
//
defineOptions({ name: 'UserWalletProperty' });

View File

@@ -1,7 +1,7 @@
import type {
ComponentStyle,
DiyComponent,
} from '#/components/diy-editor/util';
} from '../../../util';
/** 视频播放属性 */
export interface VideoPlayerProperty {

View File

@@ -4,7 +4,7 @@ import type { VideoPlayerProperty } from './config';
import { useVModel } from '@vueuse/core';
import { ElForm, ElFormItem, ElSlider, ElSwitch } from 'element-plus';
import ComponentContainerProperty from '#/components/diy-editor/components/component-container-property.vue';
import ComponentContainerProperty from '../../component-container-property.vue';
import UploadFile from '#/components/upload/file-upload.vue';
import UploadImg from '#/components/upload/image-upload.vue';

View File

@@ -26,8 +26,8 @@ import statusBarImg from '#/assets/imgs/diy/statusBar.png';
import {
componentConfigs,
components,
} from '#/components/diy-editor/components/mobile';
import { component as PAGE_CONFIG_COMPONENT } from '#/components/diy-editor/components/mobile/page-config/config';
} from './components/mobile';
import { component as PAGE_CONFIG_COMPONENT } from './components/mobile/page-config/config';
import ComponentContainer from './components/component-container.vue';
import ComponentLibrary from './components/component-library.vue';

View File

@@ -1,6 +1,6 @@
import type { NavigationBarProperty } from '#/components/diy-editor/components/mobile/NavigationBar/config';
import type { PageConfigProperty } from '#/components/diy-editor/components/mobile/PageConfig/config';
import type { TabBarProperty } from '#/components/diy-editor/components/mobile/TabBar/config';
import type { NavigationBarProperty } from './components/mobile/navigation-bar/config';
import type { PageConfigProperty } from './components/mobile/page-config/config';
import type { TabBarProperty } from './components/mobile/tab-bar/config';
// 页面装修组件
export interface DiyComponent<T> {

View File

@@ -1,6 +1,9 @@
export { default as AppLinkInput } from './app-link-input/index.vue';
export { default as ColorInput } from './color-input/index.vue';
export { default as DiyEditor } from './diy-editor/index.vue';
export { type DiyComponentLibrary, PAGE_LIBS } from './diy-editor/util';
export { default as Draggable } from './draggable/index.vue';
export { default as InputWithColor } from './input-with-color/index.vue';
export { default as MagicCubeEditor } from './magic-cube-editor/index.vue';
export { default as VerticalButtonGroup } from './vertical-button-group/index.vue';

View File

@@ -7,8 +7,7 @@ import { useRoute } from 'vue-router';
import { ElMessage } from 'element-plus';
import * as DiyPageApi from '#/api/mall/promotion/diy/page';
import DiyEditor from '#/components/diy-editor/index.vue';
import { PAGE_LIBS } from '#/components/diy-editor/util';
import { DiyEditor, PAGE_LIBS } from '#/views/mall/promotion/components';
/** 装修页面表单 */
defineOptions({ name: 'DiyPageDecorate' });

View File

@@ -1,7 +1,7 @@
<script lang="ts" setup>
import type { MallDiyPageApi } from '#/api/mall/promotion/diy/page';
import type { MallDiyTemplateApi } from '#/api/mall/promotion/diy/template';
import type { DiyComponentLibrary } from '#/components/diy-editor/util'; // 商城的 DIY 组件,在 DiyEditor 目录下
import type { DiyComponentLibrary } from '#/views/mall/promotion/components'; // 商城的 DIY 组件,在 DiyEditor 目录下
import { onMounted, reactive, ref, unref } from 'vue';
import { useRouter } from 'vue-router';
@@ -15,8 +15,7 @@ import { ElMessage } from 'element-plus';
import * as DiyPageApi from '#/api/mall/promotion/diy/page';
// TODO @疯狂:要不要建个 decorate 目录,然后挪进去,改成 index.vue这样可以更明确看到是个独立界面哈更好找
import * as DiyTemplateApi from '#/api/mall/promotion/diy/template';
import DiyEditor from '#/components/diy-editor/index.vue';
import { PAGE_LIBS } from '#/components/diy-editor/util';
import { DiyEditor, PAGE_LIBS } from '#/views/mall/promotion/components';
/** 装修模板表单 */
defineOptions({ name: 'DiyTemplateDecorate' });