diff --git a/src/components.d.ts b/src/components.d.ts index 2f2bdb0d..79249e52 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -49,20 +49,15 @@ declare module '@vue/runtime-core' { ElPopover: typeof import('element-plus/es')['ElPopover']; ElProgress: typeof import('element-plus/es')['ElProgress']; ElRadio: typeof import('element-plus/es')['ElRadio']; - ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']; ElScrollbar: typeof import('element-plus/es')['ElScrollbar']; ElSelect: typeof import('element-plus/es')['ElSelect']; - ElSelectV2: typeof import('element-plus/es')['ElSelectV2']; ElSkeleton: typeof import('element-plus/es')['ElSkeleton']; ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']; ElSlider: typeof import('element-plus/es')['ElSlider']; ElSubMenu: typeof import('element-plus/es')['ElSubMenu']; ElSwitch: typeof import('element-plus/es')['ElSwitch']; - ElTable: typeof import('element-plus/es')['ElTable']; - ElTableColumn: typeof import('element-plus/es')['ElTableColumn']; ElTabPane: typeof import('element-plus/es')['ElTabPane']; ElTabs: typeof import('element-plus/es')['ElTabs']; - ElTag: typeof import('element-plus/es')['ElTag']; ElTooltip: typeof import('element-plus/es')['ElTooltip']; ElUpload: typeof import('element-plus/es')['ElUpload']; Emoji: typeof import('./components/packages/components/emoji/emoji.vue')['default']; diff --git a/src/views/LegoDesigner/components/RightSetter.vue b/src/views/LegoDesigner/components/RightSetter.vue index 0b2252f4..c69bb082 100644 --- a/src/views/LegoDesigner/components/RightSetter.vue +++ b/src/views/LegoDesigner/components/RightSetter.vue @@ -23,19 +23,30 @@ - + -
- +
+ +
+ +
+
@@ -114,7 +125,7 @@ .el-tabs__content { display: flex; // justify-content: center; - padding: 30px 30px 10px 30px; + padding: 30px 20px 10px 20px; box-sizing: border-box; // height: calc(100vh - 170px); overflow: auto; diff --git a/src/views/LegoDesigner/components/WidgetList/WidgetList.vue b/src/views/LegoDesigner/components/WidgetList/WidgetList.vue index 3e26ffc1..a59b42de 100644 --- a/src/views/LegoDesigner/components/WidgetList/WidgetList.vue +++ b/src/views/LegoDesigner/components/WidgetList/WidgetList.vue @@ -23,6 +23,8 @@ v-if="item.category === 'icon'" :widget-data="itemCom" > + +
@@ -37,8 +39,11 @@ import { IWidget, IWidgetTab } from '../../types'; import { getAssetsFile } from '../../utils/common'; import LegoDesignIcon from '../../widgets/icon/LegoDesignIconList.vue'; + import LegoLiList from '../../widgets/li/LegoLiList.vue'; import { useIconfontItem } from '../../widgets/icon/useIconfontItem'; import { iconfontList } from '../../widgets/icon/iconfont'; + import { ListStyleTypeList } from '../../widgets/li/liList'; + import { useLiListItem } from '../../widgets/li/useLiListItem'; const emit = defineEmits(['addWidget']); @@ -71,6 +76,18 @@ }); }; initIconfontList(); + + // 初始化列表组件 + const initLiList = () => { + WIDGET_CONFIG_LIST.forEach((cptList) => { + if (cptList.category === 'li') { + ListStyleTypeList.forEach((listStyleTypeItem) => + cptList.list.push(useLiListItem(listStyleTypeItem)) + ); + } + }); + }; + initLiList(); diff --git a/src/views/LegoDesigner/setters/markerColorEditor.vue b/src/views/LegoDesigner/setters/markerColorEditor.vue new file mode 100644 index 00000000..17880184 --- /dev/null +++ b/src/views/LegoDesigner/setters/markerColorEditor.vue @@ -0,0 +1,19 @@ + + diff --git a/src/views/LegoDesigner/setters/markerPositionEditor.vue b/src/views/LegoDesigner/setters/markerPositionEditor.vue new file mode 100644 index 00000000..4b75d9ae --- /dev/null +++ b/src/views/LegoDesigner/setters/markerPositionEditor.vue @@ -0,0 +1,73 @@ + + + diff --git a/src/views/LegoDesigner/setters/markerSizeEditor.vue b/src/views/LegoDesigner/setters/markerSizeEditor.vue new file mode 100644 index 00000000..de71f419 --- /dev/null +++ b/src/views/LegoDesigner/setters/markerSizeEditor.vue @@ -0,0 +1,28 @@ + + + diff --git a/src/views/LegoDesigner/setters/settersMap.ts b/src/views/LegoDesigner/setters/settersMap.ts index 6596ae2e..fd276d82 100644 --- a/src/views/LegoDesigner/setters/settersMap.ts +++ b/src/views/LegoDesigner/setters/settersMap.ts @@ -11,16 +11,22 @@ import paddingEditor from './paddingEditor.vue'; import rotateEditor from './rotateEditor.vue'; import leftEditorVue from './leftEditor.vue'; import topEditor from './topEditor.vue'; -import avatarUploadEditor from './dataSetters/avatarUploadEditor.vue'; import fontColorEditor from './fontColorEditor.vue'; import fontFamilyEditor from './fontFamilyEditor.vue'; import fontWeightEditor from './fontWeightEditor.vue'; import fontSizeEditor from './fontSizeEditor.vue'; import lineHeightEditor from './lineHeightEditor.vue'; import textAlignEditor from './textAlignEditor.vue'; -import textEditEditor from './dataSetters/textEditEditor.vue'; import iconColorEditor from './iconColorEditor.vue'; import iconSizeEditor from './iconSizeEditor.vue'; +import markerSizeEditor from './markerSizeEditor.vue'; +import markerColorEditor from './markerColorEditor.vue'; +import markerPositionEditor from './markerPositionEditor.vue'; + +// 数据设置组件 +import textEditEditor from './dataSetters/textEditEditor.vue'; +import avatarUploadEditor from './dataSetters/avatarUploadEditor.vue'; +import liListEditor from './dataSetters/liListEditor.vue'; // 属性设置组件对应关系 export const SETTERS_MAP: ISetterMap = { @@ -43,11 +49,15 @@ export const SETTERS_MAP: ISetterMap = { lineHeight: lineHeightEditor, textAlign: textAlignEditor, iconColor: iconColorEditor, - iconSize: iconSizeEditor + iconSize: iconSizeEditor, + markerSize: markerSizeEditor, + markerColor: markerColorEditor, + markerPosition: markerPositionEditor }; // 数据设置组件对应关系 export const DATA_SETTERS_MAP: ISetterMap = { avatarSrc: avatarUploadEditor, - text: textEditEditor + text: textEditEditor, + liList: liListEditor }; diff --git a/src/views/LegoDesigner/utils/common.ts b/src/views/LegoDesigner/utils/common.ts index f209c273..a5d8a331 100644 --- a/src/views/LegoDesigner/utils/common.ts +++ b/src/views/LegoDesigner/utils/common.ts @@ -8,6 +8,11 @@ export const getAssetsImagesFile = (url: string) => { return new URL(`../assets/images/${url}`, import.meta.url).href; }; +// 获取列表静态资源 +export const getListStyleImageFile = (url: string) => { + return new URL(`../widgets/li/listStyleImg/${url}`, import.meta.url).href; +}; + // 重新计算每个组件的top值 export const computeWidgetTop = (HJSchemaJsonStore: any) => { for (let i = 0; i < HJSchemaJsonStore.value.componentsTree.length; i++) { diff --git a/src/views/LegoDesigner/widgets/index.ts b/src/views/LegoDesigner/widgets/index.ts index c5ac2b94..5408edcb 100644 --- a/src/views/LegoDesigner/widgets/index.ts +++ b/src/views/LegoDesigner/widgets/index.ts @@ -16,6 +16,7 @@ import Text_8 from './text/text-8/text-8.vue'; import Text_9 from './text/text-9/text-9.vue'; import Text_10 from './text/text-10/text-10.vue'; import Icon from './icon/LegoDesignIconRender.vue'; +import Li from './li/LegoLiListRender.vue'; export const WIDGET_MAP: IWidgetMap = { 'hj-avatar-1': Avatar_1, @@ -34,5 +35,6 @@ export const WIDGET_MAP: IWidgetMap = { 'hj-text-8': Text_8, 'hj-text-9': Text_9, 'hj-text-10': Text_10, - 'hj-icon': Icon + 'hj-icon': Icon, + 'hj-li': Li }; diff --git a/src/views/LegoDesigner/widgets/li/LegoLiList.vue b/src/views/LegoDesigner/widgets/li/LegoLiList.vue new file mode 100644 index 00000000..7320bd6d --- /dev/null +++ b/src/views/LegoDesigner/widgets/li/LegoLiList.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/views/LegoDesigner/widgets/li/LegoLiListRender.vue b/src/views/LegoDesigner/widgets/li/LegoLiListRender.vue new file mode 100644 index 00000000..b7a99150 --- /dev/null +++ b/src/views/LegoDesigner/widgets/li/LegoLiListRender.vue @@ -0,0 +1,44 @@ + + + diff --git a/src/views/LegoDesigner/widgets/li/liList.ts b/src/views/LegoDesigner/widgets/li/liList.ts new file mode 100644 index 00000000..c8ed0a85 --- /dev/null +++ b/src/views/LegoDesigner/widgets/li/liList.ts @@ -0,0 +1,78 @@ +export const ListStyleTypeList = [ + { + listStyleType: 'disc', + description: '实心圆' + }, + { + listStyleType: 'circle', + description: '空心圆' + }, + { + listStyleType: 'square', + description: '实心方块' + }, + { + listStyleType: 'decimal', + description: '数字' + }, + { + listStyleType: 'decimal-leading-zero', + description: '数字标记' + }, + { + listStyleType: 'lower-roman', + description: '小写罗马数字' + }, + { + listStyleType: 'upper-roman', + description: '大写罗马数字' + }, + { + listStyleType: 'lower-greek', + description: '小写希腊字母' + }, + { + listStyleType: 'lower-latin', + description: '小写拉丁字母' + }, + { + listStyleType: 'upper-latin', + description: '大写拉丁字母' + }, + { + listStyleType: 'hebrew', + description: '希伯来编号' + }, + { + listStyleType: 'armenian', + description: '亚美尼亚编号' + }, + { + listStyleType: 'georgian', + description: '乔治亚编号' + }, + { + listStyleType: 'cjk-ideographic', + description: '中文数字' + }, + { + listStyleType: 'hiragana', + description: '日文平假名字符' + }, + { + listStyleType: 'katakana', + description: '日文片假名字符' + }, + { + listStyleType: 'hiragana-iroha', + description: '日文平假名序号' + }, + { + listStyleType: 'katakana-iroha', + description: '日文片假名序号' + } + // { + // listStyleImage: '招聘求职.svg', + // description: '招聘求职' + // } +]; diff --git "a/src/views/LegoDesigner/widgets/li/listStyleImg/\346\213\233\350\201\230\346\261\202\350\201\214.svg" "b/src/views/LegoDesigner/widgets/li/listStyleImg/\346\213\233\350\201\230\346\261\202\350\201\214.svg" new file mode 100644 index 00000000..b01dc247 --- /dev/null +++ "b/src/views/LegoDesigner/widgets/li/listStyleImg/\346\213\233\350\201\230\346\261\202\350\201\214.svg" @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/LegoDesigner/widgets/li/useLiListItem.ts b/src/views/LegoDesigner/widgets/li/useLiListItem.ts new file mode 100644 index 00000000..72ce4840 --- /dev/null +++ b/src/views/LegoDesigner/widgets/li/useLiListItem.ts @@ -0,0 +1,60 @@ +import { IWidget } from '../../types'; + +/** + * @description 返回图标对象 + */ +export const useLiListItem = (iconItem: { + listStyleType: any; + description: any; + listStyleImage?: any; +}): IWidget => { + return { + id: '', // 组件唯一性id + componentName: 'hj-li', // 组件名 + commentType: '', // 组件类型 + icon: '', // 组件icon + title: '', // 组件中文名称 + description: iconItem.description, // 组件描述信息 + screenShot: { + src: '', + width: '', + height: '', + borderRadius: '' + }, // 组件快照 + keywords: '头像', // 组件关键词,用于搜索 + category: 'li', // 组件分类 + props: { + listStyleType: iconItem.listStyleType, + listStyleImage: iconItem.listStyleImage + }, // 组件属性 + css: { + left: 0, + top: 0, + zIndex: 1, + width: 80, + height: 40, + rotate: 0, // 旋转角度 + fontSize: 14, + lineHeight: 1.5, + fontFamily: '方正黑体简体', + fontColor: '#333333', + fontWeight: 500, + textAlign: 'justify', + markerPosition: 'inside', + padding: { + top: 0, + right: 0, + bottom: 0, + left: 3 + }, + borderWidth: 0, + borderRadius: 10, + borderColor: '#eee', + backgroundColor: '#fff', + borderStyle: 'solid' + }, // 组件样式 + dataSource: { + liList: ['91化简', '91化简'] // 内容列表 + } // 组件单独数据 + }; +}; diff --git a/src/views/webCode/components/PriceTable.vue b/src/views/webCode/components/PriceTable.vue index e5cce0bd..c50ad685 100644 --- a/src/views/webCode/components/PriceTable.vue +++ b/src/views/webCode/components/PriceTable.vue @@ -98,13 +98,6 @@ CNY399: '✓', CNY699: '✓' }, - { - rights: '部署服务', - free: 'X', - CNY99: 'X', - CNY399: '(替您部署网站)✓', - CNY699: '✓' - }, { rights: '一对一技术咨询', free: 'X',