mirror of
https://github.com/BidingCC/BuildingAI.git
synced 2026-09-01 15:48:39 +08:00
ci: 更新全部依赖版本,以及调整 design 装修 stores
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
import { provide } from "vue";
|
||||
|
||||
import { useDesignStore } from "@/common/stores/design";
|
||||
|
||||
// import { WebDesigner } from "@fastbuildai/designer";
|
||||
const WebDesigner = defineAsyncComponent(() => import("@fastbuildai/designer/web-designer"));
|
||||
|
||||
const { query: URLQueryParams } = useRoute();
|
||||
const designId = ref(URLQueryParams.id as string);
|
||||
|
||||
// 提供 design store 给 designer 组件
|
||||
const designStore = useDesignStore();
|
||||
provide("designStore", designStore);
|
||||
|
||||
definePageMeta({ layout: "design" });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<WebDesigner :design-id="designId" terminal="web" />
|
||||
<WebDesigner :design-id="designId" terminal="web" :design-store="designStore" />
|
||||
</template>
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
import { useCanvasMetrics } from "@fastbuildai/designer/composables/useCanvasMetrics";
|
||||
import type {
|
||||
ComponentConfig,
|
||||
ComponentMenuItem,
|
||||
DecorateScene,
|
||||
PageMateConfig,
|
||||
Position,
|
||||
Size,
|
||||
} from "@fastbuildai/designer/types";
|
||||
import { defineStore } from "pinia";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { computed, ref } from "vue";
|
||||
|
||||
import { apiGetMicropageDetail, apiUpdateMicropage } from "@/services/console/decorate";
|
||||
|
||||
import { useCanvasMetrics } from "../composables/useCanvasMetrics";
|
||||
|
||||
/**
|
||||
* 管理设计画布的尺寸计算和动态调整
|
||||
*
|
||||
@@ -93,7 +100,7 @@ export const useDesignStore = defineStore("design", () => {
|
||||
// 页面组件操作部分-----------------------------------------
|
||||
/** 获取当前选择的组件 */
|
||||
const activeComponent = computed(() =>
|
||||
components.value.find((c) => c.id === activeComponentId.value),
|
||||
components.value.find((c: ComponentConfig) => c.id === activeComponentId.value),
|
||||
);
|
||||
|
||||
/** 添加组件 */
|
||||
@@ -122,7 +129,7 @@ export const useDesignStore = defineStore("design", () => {
|
||||
|
||||
/** 更新组件位置 */
|
||||
function updatePosition(id: string, position: Position) {
|
||||
const component = components.value.find((c) => c.id === id);
|
||||
const component = components.value.find((c: ComponentConfig) => c.id === id);
|
||||
if (component) {
|
||||
component.position = position;
|
||||
}
|
||||
@@ -130,7 +137,7 @@ export const useDesignStore = defineStore("design", () => {
|
||||
|
||||
/** 更新组件大小 */
|
||||
function updateSize(id: string, size: Size) {
|
||||
const component = components.value.find((c) => c.id === id);
|
||||
const component = components.value.find((c: ComponentConfig) => c.id === id);
|
||||
if (component) {
|
||||
component.size.width = size.width;
|
||||
component.size.height = size.height;
|
||||
@@ -139,7 +146,7 @@ export const useDesignStore = defineStore("design", () => {
|
||||
|
||||
/** 更新组件属性 */
|
||||
function updateProperties(id: string, props: Record<string, any>) {
|
||||
const component = components.value.find((c) => c.id === id);
|
||||
const component = components.value.find((c: ComponentConfig) => c.id === id);
|
||||
if (component) {
|
||||
component.props = { ...component.props, ...props };
|
||||
} else {
|
||||
@@ -149,7 +156,7 @@ export const useDesignStore = defineStore("design", () => {
|
||||
|
||||
/** 更新组件显示 */
|
||||
function updateVisible(id: string, value: boolean) {
|
||||
const component = components.value.find((c) => c.id === id);
|
||||
const component = components.value.find((c: ComponentConfig) => c.id === id);
|
||||
if (component) {
|
||||
component.isHidden = value;
|
||||
}
|
||||
@@ -162,7 +169,7 @@ export const useDesignStore = defineStore("design", () => {
|
||||
|
||||
/** 删除组件 */
|
||||
function removeComponent(id: string) {
|
||||
components.value = components.value.filter((c) => c.id !== id);
|
||||
components.value = components.value.filter((c: ComponentConfig) => c.id !== id);
|
||||
activeComponentId.value = null;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useDesignStore } from "@fastbuildai/designer/stores";
|
||||
import { useDesignStore } from "@/common/stores/design";
|
||||
import { ProModal, useLockFn, useMessage, useModal } from "@fastbuildai/ui";
|
||||
|
||||
import Logo from "@/public/logo.svg";
|
||||
|
||||
@@ -46,6 +46,9 @@ export default defineNuxtConfig({
|
||||
|
||||
imports: {
|
||||
dirs: ["common/stores", "common/composables/**", "common/utils/**.ts"],
|
||||
// 性能优化:按需导入
|
||||
// scan: true,
|
||||
// global: false, // 禁用全局导入以提升性能
|
||||
},
|
||||
|
||||
devtools: { enabled: false },
|
||||
@@ -136,7 +139,7 @@ export default defineNuxtConfig({
|
||||
|
||||
devServer: {
|
||||
port: 4091,
|
||||
host: "127.0.0.1, 0.0.0.0",
|
||||
host: "0.0.0.0",
|
||||
},
|
||||
|
||||
future: {
|
||||
@@ -147,16 +150,11 @@ export default defineNuxtConfig({
|
||||
// when using generate, payload js assets included in sw precache manifest
|
||||
// but missing on offline, disabling extraction it until fixed
|
||||
payloadExtraction: true,
|
||||
treeshakeClientOnly: true,
|
||||
renderJsonPayloads: true,
|
||||
typedPages: !isProd,
|
||||
asyncContext: true,
|
||||
viewTransition: true,
|
||||
|
||||
compileTemplate: true,
|
||||
templateUtils: true,
|
||||
relativeWatchPaths: true,
|
||||
resetAsyncDataToUndefined: true,
|
||||
defaults: {
|
||||
useAsyncData: {
|
||||
deep: true,
|
||||
@@ -197,15 +195,19 @@ export default defineNuxtConfig({
|
||||
"@tanstack/vue-table",
|
||||
"@iconify-json/lucide",
|
||||
"yup",
|
||||
"@intlify/shared",
|
||||
"@intlify/core-base",
|
||||
"markdown-it-async",
|
||||
"markdown-it-github-alerts",
|
||||
"@shikijs/markdown-it/async",
|
||||
"qrcode.vue",
|
||||
"echarts/charts",
|
||||
"vue-dompurify-html",
|
||||
"echarts/components",
|
||||
"echarts/core",
|
||||
"echarts/features",
|
||||
"echarts/renderers",
|
||||
"tailwindcss/colors",
|
||||
"motion-v",
|
||||
"@lottiefiles/dotlottie-vue",
|
||||
"@fancyapps/ui",
|
||||
@@ -214,7 +216,7 @@ export default defineNuxtConfig({
|
||||
"panzoom",
|
||||
"@shikijs/langs",
|
||||
"libphonenumber-js",
|
||||
"@nuxt/ui/runtime/locale/index.js",
|
||||
"@nuxt/ui/locale",
|
||||
"clsx",
|
||||
"tailwind-merge",
|
||||
"@tiptap/extension-color",
|
||||
|
||||
+27
-28
@@ -22,57 +22,56 @@
|
||||
"@fastbuildai/designer": "workspace:*",
|
||||
"@fastbuildai/ui": "workspace:*",
|
||||
"@iconify-json/heroicons": "^1.2.2",
|
||||
"@iconify-json/lucide": "^1.2.38",
|
||||
"@iconify-json/tabler": "^1.2.17",
|
||||
"@logicflow/core": "^2.0.16",
|
||||
"@iconify-json/lucide": "^1.2.63",
|
||||
"@iconify-json/tabler": "^1.2.22",
|
||||
"@logicflow/core": "^2.1.1",
|
||||
"@lottiefiles/dotlottie-vue": "^0.5.8",
|
||||
"@nuxt/ui": "^3.1.2",
|
||||
"@nuxtjs/i18n": "^9.5.4",
|
||||
"@tailwindcss/vite": "^4.0.13",
|
||||
"@vueuse/core": "^13.1.0",
|
||||
"@nuxt/ui": "^3.3.2",
|
||||
"@nuxtjs/i18n": "^9.5.6",
|
||||
"@tailwindcss/vite": "^4.1.12",
|
||||
"@vueuse/core": "^13.7.0",
|
||||
"@vueuse/motion": "^3.0.3",
|
||||
"chalk": "^5.4.1",
|
||||
"chalk": "^5.6.0",
|
||||
"cli-table3": "^0.6.5",
|
||||
"echarts": "^5.6.0",
|
||||
"katex": "^0.16.22",
|
||||
"libphonenumber-js": "^1.12.8",
|
||||
"libphonenumber-js": "^1.12.13",
|
||||
"markdown-it-github-alerts": "^1.0.0",
|
||||
"motion-v": "^1.0.0-beta.2",
|
||||
"nuxt": "^3.17.3",
|
||||
"motion-v": "^1.7.0",
|
||||
"nuxt": "^4.0.3",
|
||||
"nuxt-svgo": "^4.2.6",
|
||||
"reka-ui": "^2.2.0",
|
||||
"uuid": "^11.1.0",
|
||||
"vue-dompurify-html": "^5.3.0",
|
||||
"yup": "^1.6.1"
|
||||
"yup": "^1.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fastbuildai/config": "workspace:*",
|
||||
"@fastbuildai/http": "workspace:*",
|
||||
"@fastbuildai/utils": "workspace:*",
|
||||
"@nuxt/devtools": "^2.4.0",
|
||||
"@nuxt/eslint": "^1.3.0",
|
||||
"@nuxt/devtools": "^2.6.2",
|
||||
"@nuxt/eslint": "^1.9.0",
|
||||
"@nuxtjs/color-mode": "^3.5.2",
|
||||
"@pinia/nuxt": "^0.10.1",
|
||||
"@shikijs/markdown-it": "^3.7.0",
|
||||
"@pinia/nuxt": "^0.11.2",
|
||||
"@shikijs/markdown-it": "^3.11.0",
|
||||
"@tailwindcss/typography": "^0.5.16",
|
||||
"@types/markdown-it": "^14.1.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
||||
"@typescript-eslint/parser": "^8.30.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.40.0",
|
||||
"@typescript-eslint/parser": "^8.40.0",
|
||||
"@vite-pwa/nuxt": "^0.10.8",
|
||||
"@vueuse/nuxt": "^12.8.2",
|
||||
"clsx": "^2.1.1",
|
||||
"consola": "^3.4.0",
|
||||
"eslint": "^9.25.1",
|
||||
"consola": "^3.4.2",
|
||||
"eslint": "^9.33.0",
|
||||
"eslint-plugin-format": "^1.0.1",
|
||||
"eslint-plugin-vue": "^10.0.0",
|
||||
"eslint-plugin-vue": "^10.4.0",
|
||||
"markdown-it-async": "^2.2.0",
|
||||
"pinia": "^3.0.1",
|
||||
"pinia": "^3.0.3",
|
||||
"sass": "1.78.0",
|
||||
"tailwind-merge": "^3.0.2",
|
||||
"tailwindcss": "^4.0.13",
|
||||
"tailwind-merge": "^3.3.1",
|
||||
"tailwindcss": "^4.1.12",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"typescript": "^5.8.3",
|
||||
"vue-eslint-parser": "^10.1.3",
|
||||
"vue-tsc": "^2.2.8"
|
||||
"typescript": "^5.9.2",
|
||||
"vue-eslint-parser": "^10.2.0",
|
||||
"vue-tsc": "^2.2.12"
|
||||
}
|
||||
}
|
||||
|
||||
+12
-12
@@ -45,13 +45,13 @@
|
||||
"i18n:translate": "node apps/web/libs/translate-i18n.mjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/core": "^1.11.24",
|
||||
"bing-translate-api": "^4.0.2",
|
||||
"chalk": "^5.4.1",
|
||||
"prettier": "^3.5.3",
|
||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||
"@swc/core": "^1.13.4",
|
||||
"bing-translate-api": "^4.1.0",
|
||||
"chalk": "^5.6.0",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier-plugin-tailwindcss": "^0.6.14",
|
||||
"ts-node": "^10.9.2",
|
||||
"turbo": "^2.5.0",
|
||||
"turbo": "^2.5.6",
|
||||
"typescript": "5.8.2"
|
||||
},
|
||||
"packageManager": "pnpm@10.0.0",
|
||||
@@ -78,13 +78,13 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@tiptap/extension-color": "^2.26.1",
|
||||
"@tiptap/extension-image": "^2.10.4",
|
||||
"@tiptap/extension-link": "^2.10.4",
|
||||
"@tiptap/extension-image": "^2.26.1",
|
||||
"@tiptap/extension-link": "^2.26.1",
|
||||
"@tiptap/extension-list-item": "^2.26.1",
|
||||
"@tiptap/extension-placeholder": "^2.10.4",
|
||||
"@tiptap/extension-placeholder": "^2.26.1",
|
||||
"@tiptap/extension-text-style": "^2.26.1",
|
||||
"@tiptap/extension-underline": "^2.10.4",
|
||||
"@tiptap/starter-kit": "^2.10.4",
|
||||
"@tiptap/vue-3": "^2.10.4"
|
||||
"@tiptap/extension-underline": "^2.26.1",
|
||||
"@tiptap/starter-kit": "^2.26.1",
|
||||
"@tiptap/vue-3": "^2.26.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,17 +9,17 @@
|
||||
"./ui/*": "./ui/*.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.24.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
||||
"@typescript-eslint/parser": "^8.30.1",
|
||||
"eslint": "^9.24.0",
|
||||
"eslint-config-prettier": "^10.1.1",
|
||||
"@eslint/js": "^9.33.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.40.0",
|
||||
"@typescript-eslint/parser": "^8.40.0",
|
||||
"eslint": "^9.33.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-only-warn": "^1.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.6",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"eslint-plugin-turbo": "^2.5.0",
|
||||
"globals": "^16.0.0",
|
||||
"typescript": "^5.8.2",
|
||||
"typescript-eslint": "^8.29.0"
|
||||
"eslint-plugin-turbo": "^2.5.6",
|
||||
"globals": "^16.3.0",
|
||||
"typescript": "^5.9.2",
|
||||
"typescript-eslint": "^8.40.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
"module": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"exports": {
|
||||
"./stores": "./src/stores/design.ts",
|
||||
"./stores/design": "./src/stores/design.ts",
|
||||
"./composables/useCanvasMetrics": "./src/composables/useCanvasMetrics.ts",
|
||||
"./types": "./src/types/index.d.ts",
|
||||
"./types/store": "./src/types/store.d.ts",
|
||||
"./web-preview": "./src/components/web-preview.vue",
|
||||
"./web-designer": "./src/components/web-designer.vue"
|
||||
},
|
||||
@@ -19,38 +20,38 @@
|
||||
"@fastbuildai/assets": "workspace:*",
|
||||
"@fastbuildai/config": "workspace:*",
|
||||
"@fastbuildai/ui": "workspace:*",
|
||||
"@tsconfig/node22": "^22.0.1",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitejs/plugin-vue": "^5.2.3",
|
||||
"@tsconfig/node22": "^22.0.2",
|
||||
"@types/node": "^22.17.2",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"@vue/eslint-config-prettier": "^10.2.0",
|
||||
"@vue/eslint-config-typescript": "^14.5.0",
|
||||
"@vue/eslint-config-typescript": "^14.6.0",
|
||||
"@vue/tsconfig": "^0.7.0",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"panzoom": "^9.4.3",
|
||||
"postcss": "^8.5.3",
|
||||
"postcss": "^8.5.6",
|
||||
"prettier": "3.5.3",
|
||||
"qrcode.vue": "^3.6.0",
|
||||
"reka-ui": "^2.2.0",
|
||||
"tailwindcss": "^4.1.4",
|
||||
"typescript": "~5.8.0",
|
||||
"vite": "^6.2.4",
|
||||
"vue": "^3.5.13",
|
||||
"reka-ui": "^2.4.1",
|
||||
"tailwindcss": "^4.1.12",
|
||||
"typescript": "~5.8.3",
|
||||
"vite": "^6.3.5",
|
||||
"vue": "^3.5.19",
|
||||
"vue-drag-resize": "^2.0.3",
|
||||
"vuedraggable": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/ui": "^3.1.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
||||
"@typescript-eslint/parser": "^8.30.1",
|
||||
"@vueuse/core": "^13.1.0",
|
||||
"eslint": "^9.28.0",
|
||||
"@nuxt/ui": "^3.3.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.40.0",
|
||||
"@typescript-eslint/parser": "^8.40.0",
|
||||
"@vueuse/core": "^13.7.0",
|
||||
"eslint": "^9.33.0",
|
||||
"eslint-plugin-format": "^1.0.1",
|
||||
"eslint-plugin-vue": "^10.0.0",
|
||||
"vue-eslint-parser": "^10.1.3",
|
||||
"vue-tsc": "^2.2.8"
|
||||
"eslint-plugin-vue": "^10.4.0",
|
||||
"vue-eslint-parser": "^10.2.0",
|
||||
"vue-tsc": "^2.2.12"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"pinia": "^3.0.1",
|
||||
"pinia": "^3.0.3",
|
||||
"vue-router": "^4.5.1"
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import { computed, onMounted, onUnmounted, useTemplateRef } from "vue";
|
||||
import { useCanvasMetrics } from "../../composables/useCanvasMetrics";
|
||||
import { useDesignSystem } from "../../composables/useDesignSystem";
|
||||
import { DESIGN_CONFIG } from "../../config/design";
|
||||
import { useDesignStore } from "../../stores/design";
|
||||
import ComponentContainer from "./component-viewport.vue";
|
||||
import GuideLines from "./guide-lines.vue";
|
||||
import HighlightArea from "./highlight-area.vue";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { type Component, defineAsyncComponent } from "vue";
|
||||
|
||||
import { useDesignStore } from "../../stores/design";
|
||||
// 避免一次性注册全部组件,按需加载 content 组件
|
||||
const contentModules = import.meta.glob("../../components/widgets/**/content.vue", {
|
||||
eager: false,
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
import ProScrollArea from "@fastbuildai/ui/components/pro-scroll-area.vue";
|
||||
import { computed, ref } from "vue";
|
||||
|
||||
import { useDesignStore } from "../../stores/design";
|
||||
import {
|
||||
getCategories,
|
||||
getCategoryComponents,
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
import { computed, ref } from "vue";
|
||||
import Draggable from "vuedraggable";
|
||||
|
||||
import { useDesignStore } from "../../stores/design";
|
||||
|
||||
const design = useDesignStore();
|
||||
|
||||
// 是否处于重命名状态
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
import { computed, defineAsyncComponent, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { useDesignStore } from "../../stores/design";
|
||||
import WidgetsBasePage from "../widgets/base/widgets-base-page.vue";
|
||||
import LayersPanel from "./layers-panel.vue";
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import { defineAsyncComponent, onMounted, ref } from "vue";
|
||||
|
||||
import { setDesignConfig } from "../config/design";
|
||||
import { useDesignStore } from "../stores/design";
|
||||
import DesignerSkeleton from "./designer-skeleton.vue";
|
||||
const ComponentPanel = defineAsyncComponent(() => import("./panels/component-panel.vue"));
|
||||
const PropertyPanel = defineAsyncComponent(() => import("./panels/property-panel.vue"));
|
||||
|
||||
@@ -8,7 +8,6 @@ import { type Component, computed, defineAsyncComponent, onMounted, onUnmounted,
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { DESIGN_CONFIG } from "../config/design";
|
||||
import { useDesignStore } from "../stores/design";
|
||||
// 避免一次性注册所有组件,按需加载
|
||||
const contentModules = import.meta.glob("../components/widgets/**/content.vue", { eager: false });
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ import ProUploader from "@fastbuildai/ui/components/pro-uploader.vue";
|
||||
import { computed } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
import { useDesignStore } from "../../../stores/design";
|
||||
|
||||
const { t } = useI18n();
|
||||
const designStore = useDesignStore();
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { CSSProperties } from "vue";
|
||||
import { computed, getCurrentInstance, onUnmounted, type Ref, ref, watch } from "vue";
|
||||
import { computed, getCurrentInstance, type Ref, ref, watch } from "vue";
|
||||
|
||||
import { DESIGN_CONFIG } from "../config/design";
|
||||
import { useDesignStore } from "../stores/design";
|
||||
import { useDesignStore } from "@/common/stores/design";
|
||||
|
||||
// 当前画布尺寸
|
||||
const designWidth = ref<number>(DESIGN_CONFIG.value.DEFAULT_WIDTH);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Ref } from "vue";
|
||||
|
||||
import { useDesignStore } from "../stores/design";
|
||||
import { useDesignStore } from "@/common/stores/design";
|
||||
import type { DesignGuidesType } from "./useDesignGuides";
|
||||
import type { DesignCoreType } from "./useDesignState";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { computed, ref } from "vue";
|
||||
|
||||
import { useDesignStore } from "../stores/design";
|
||||
import { useDesignStore } from "@/common/stores/design";
|
||||
|
||||
/**
|
||||
* 设计核心 Hook
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 设计 Store 接口定义
|
||||
* 定义外部应用需要提供的 store 接口
|
||||
*/
|
||||
export interface DesignStoreInterface {
|
||||
// 状态
|
||||
components: ComponentConfig[];
|
||||
activeComponent: ComponentConfig | undefined;
|
||||
draggedComponent: ComponentMenuItem | null;
|
||||
configs: PageMateConfig;
|
||||
projectName: string;
|
||||
showSafeArea: boolean;
|
||||
isCanvasSelected: boolean;
|
||||
isDirty: boolean;
|
||||
|
||||
// 方法
|
||||
addComponent(config: {
|
||||
type: string;
|
||||
title: string;
|
||||
position: Position;
|
||||
isHidden: boolean;
|
||||
size: Size;
|
||||
props: Record<string, any>;
|
||||
}): ComponentConfig;
|
||||
updatePosition(id: string, position: Position): void;
|
||||
updateSize(id: string, size: Size): void;
|
||||
updateProperties(id: string, props: Record<string, any>): void;
|
||||
updateVisible(id: string, value: boolean): void;
|
||||
setActiveComponent(id: string | null): void;
|
||||
removeComponent(id: string): void;
|
||||
setDraggedComponent(component: ComponentMenuItem | null): void;
|
||||
resetState(): void;
|
||||
getPages(id: string): Promise<any>;
|
||||
savePages(): Promise<any>;
|
||||
}
|
||||
@@ -17,11 +17,11 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@fastbuildai/config": "workspace:*",
|
||||
"@tsconfig/node22": "^22.0.1",
|
||||
"@types/node": "^22.14.0",
|
||||
"eslint": "^9.22.0",
|
||||
"@tsconfig/node22": "^22.0.2",
|
||||
"@types/node": "^22.17.2",
|
||||
"eslint": "^9.33.0",
|
||||
"prettier": "3.5.3",
|
||||
"typescript": "~5.8.0"
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fastbuildai/ui": "workspace:*",
|
||||
|
||||
+16
-16
@@ -18,25 +18,25 @@
|
||||
"devDependencies": {
|
||||
"@fastbuildai/assets": "workspace:*",
|
||||
"@fastbuildai/config": "workspace:*",
|
||||
"@tsconfig/node22": "^22.0.1",
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitejs/plugin-vue": "^5.2.3",
|
||||
"@tsconfig/node22": "^22.0.2",
|
||||
"@types/node": "^22.17.2",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"@vue/eslint-config-prettier": "^10.2.0",
|
||||
"@vue/eslint-config-typescript": "^14.5.0",
|
||||
"@vue/eslint-config-typescript": "^14.6.0",
|
||||
"@vue/tsconfig": "^0.7.0",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"eslint": "^9.28.0",
|
||||
"eslint-plugin-vue": "~10.0.0",
|
||||
"postcss": "^8.5.3",
|
||||
"eslint": "^9.33.0",
|
||||
"eslint-plugin-vue": "~10.0.1",
|
||||
"postcss": "^8.5.6",
|
||||
"prettier": "3.5.3",
|
||||
"tailwindcss": "^4.1.4",
|
||||
"typescript": "~5.8.0",
|
||||
"vite": "^6.2.4",
|
||||
"vue-tsc": "^2.2.8"
|
||||
"tailwindcss": "^4.1.12",
|
||||
"typescript": "~5.8.3",
|
||||
"vite": "^6.3.5",
|
||||
"vue-tsc": "^2.2.12"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fancyapps/ui": "^6.0.5",
|
||||
"@nuxt/ui": "^3.1.2",
|
||||
"@fancyapps/ui": "^6.0.23",
|
||||
"@nuxt/ui": "^3.3.2",
|
||||
"@tiptap/extension-color": "^2.26.1",
|
||||
"@tiptap/extension-image": "^2.26.1",
|
||||
"@tiptap/extension-link": "^2.26.1",
|
||||
@@ -46,9 +46,9 @@
|
||||
"@tiptap/extension-underline": "^2.26.1",
|
||||
"@tiptap/starter-kit": "^2.26.1",
|
||||
"@tiptap/vue-3": "^2.26.1",
|
||||
"@vueuse/core": "^13.1.0",
|
||||
"reka-ui": "^2.2.0",
|
||||
"@vueuse/core": "^13.7.0",
|
||||
"reka-ui": "^2.4.1",
|
||||
"tiptap-markdown": "^0.8.10",
|
||||
"vue": "^3.5.13"
|
||||
"vue": "^3.5.19"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+1472
-1451
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user