diff --git a/package.json b/package.json
index 10342db..34f5750 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
"pinia": "^2.2.4",
"ts-node": "^10.9.2",
"vue": "^3.2.25",
- "vue-draggable-plus": "^0.5.3",
+ "vue-draggable-plus": "^0.5.4",
"vue-router": "^4.4.5"
},
"devDependencies": {
diff --git a/preview/views/MainView.vue b/preview/views/MainView.vue
index c08f277..0c3f8a4 100644
--- a/preview/views/MainView.vue
+++ b/preview/views/MainView.vue
@@ -11,7 +11,7 @@
组件
-
+
{
- localStorage.setItem("lowcode", JSON.stringify(store.preview));
+ localStorage.setItem("lowcode", JSON.stringify(store.previewScheme));
window.open(location.href.replace("/#/", "/preview/#/"));
};
diff --git a/src/stores/useSchemeStore.ts b/src/stores/useSchemeStore.ts
index d143796..2c05db5 100644
--- a/src/stores/useSchemeStore.ts
+++ b/src/stores/useSchemeStore.ts
@@ -1,5 +1,5 @@
import {defineStore} from 'pinia'
-import {IPageComponent} from '../type/IPageComponent';
+import {IPageComponent} from '@/type/IPageComponent';
import {ref} from 'vue';
function findObjectById(obj, targetId) {
diff --git a/src/type/IComponent.ts b/src/type/IComponent.ts
index b1fd449..fcc4f8a 100644
--- a/src/type/IComponent.ts
+++ b/src/type/IComponent.ts
@@ -8,6 +8,7 @@ export interface IComponent {
style: string;
class: string;
events:JSON;
+ slots:IComponent[];
orchestrations:JSON;
version:string;
loop:JSON
diff --git a/src/type/IMaterial.ts b/src/type/IMaterial.ts
deleted file mode 100644
index a5b9cff..0000000
--- a/src/type/IMaterial.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-interface IMaterial {
- version: string;
- componentName: string;
- title: string;
- icon?: string;
- group?: string;
- npm?: {
- componentName?: string;
- package: string;
- version?: string;
- };
- props?: Array<{
- name: string;
- propType: string;
- description: string;
- defaultValue?: any;
- }>;
- style?: {
- width?: string;
- height?: string;
- [key: string]: string | number | undefined; // 允许其他样式属性,可以是 string | number | undefined 类型
- };
- events?: Array<{
- name: string;
- description: string;
- }>;
- slots: {
- default: string; // 默认插槽必须有值
- [key: string]: string | undefined; // 其他插槽可以是 string | undefined 类型
- };
- loop?: {
- propName: string;
- description: string;
- };
- }
-
-
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
index ed8ac11..f5f9cbe 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,19 +1,27 @@
{
- "files": [],
+ "lib": [
+ "dom",
+ "es5",
+ "es2015",
+ "es2020",
+ "es2015.promise"
+ ],
/* Bundler mode */
- "moduleResolution": "bundler",
- "allowImportingTsExtensions": true,
+ "module": "esnext",
+ "moduleResolution": "node",
+ "sourceMap": true,
+ "declaration": false,
+ "emitDecoratorMetadata": true,
+ "allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
- "isolatedModules": true,
- "moduleDetection": "force",
- "noEmit": true,
- "jsx": "preserve",
+ "skipLibCheck": true,
/* Linting */
- "strict": true,
- "noUnusedLocals": true,
- "noUnusedParameters": true,
- "noFallthroughCasesInSwitch": true,
"compilerOptions": {
+ "allowSyntheticDefaultImports": true,
+ "jsx": "preserve",
+ "experimentalDecorators": true,
+ "target": "ES2020",
+ "moduleResolution": "Node",
"module": "ESNext",
"baseUrl": "./",
"paths": {