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", "pinia": "^2.2.4",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"vue": "^3.2.25", "vue": "^3.2.25",
"vue-draggable-plus": "^0.5.3", "vue-draggable-plus": "^0.5.4",
"vue-router": "^4.4.5" "vue-router": "^4.4.5"
}, },
"devDependencies": { "devDependencies": {

View File

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

View File

@ -1,5 +1,5 @@
import {defineStore} from 'pinia' import {defineStore} from 'pinia'
import {IPageComponent} from '../type/IPageComponent'; import {IPageComponent} from '@/type/IPageComponent';
import {ref} from 'vue'; import {ref} from 'vue';
function findObjectById(obj, targetId) { function findObjectById(obj, targetId) {

View File

@ -8,6 +8,7 @@ export interface IComponent {
style: string; style: string;
class: string; class: string;
events:JSON; events:JSON;
slots:IComponent[];
orchestrations:JSON; orchestrations:JSON;
version:string; version:string;
loop:JSON 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 */ /* Bundler mode */
"moduleResolution": "bundler", "module": "esnext",
"allowImportingTsExtensions": true, "moduleResolution": "node",
"sourceMap": true,
"declaration": false,
"emitDecoratorMetadata": true,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "skipLibCheck": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "preserve",
/* Linting */ /* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"compilerOptions": { "compilerOptions": {
"allowSyntheticDefaultImports": true,
"jsx": "preserve",
"experimentalDecorators": true,
"target": "ES2020",
"moduleResolution": "Node",
"module": "ESNext", "module": "ESNext",
"baseUrl": "./", "baseUrl": "./",
"paths": { "paths": {