fix:更新ts配置文件

This commit is contained in:
lhj
2024-11-06 23:07:51 +08:00
parent c1b60a7042
commit 6fc1097a34
6 changed files with 25 additions and 53 deletions

View File

@ -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": {

View File

@ -11,7 +11,7 @@
<div class="left">
<div class="title">组件</div>
<VueDraggable
v-model="store.component"
v-model="store.components"
:animation="150"
:group="{ name: 'people', pull: 'clone', put: false }"
:sort="false"
@ -31,7 +31,7 @@
ghost-class="ghost"
class="canvas"
>
<template v-for="item in store.preview" :key="item.id">
<template v-for="item in store.previewScheme" :key="item.id">
<component
:is="componentsList[item?.code]"
:data="item"
@ -141,7 +141,7 @@ const onStart = function () {
}
const view = () => {
localStorage.setItem("lowcode", JSON.stringify(store.preview));
localStorage.setItem("lowcode", JSON.stringify(store.previewScheme));
window.open(location.href.replace("/#/", "/preview/#/"));
};
</script>

View File

@ -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) {

View File

@ -8,6 +8,7 @@ export interface IComponent {
style: string;
class: string;
events:JSON;
slots:IComponent[];
orchestrations:JSON;
version:string;
loop:JSON

View File

@ -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;
};
}

View File

@ -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": {