增加了readme说明

This commit is contained in:
猴赛雷 2024-05-24 14:40:42 +08:00
parent ebd3ced774
commit e6d5e7c2fc
4 changed files with 68 additions and 35 deletions

View File

@ -1,40 +1,74 @@
# ddei-editor
# DDei-在线设计器简介
This template should help get you started developing with Vue 3 in Vite.
## 概述
## Recommended IDE Setup
  DDei是一个遵循Apache2.0开源协议开发的设计器组件,允许用户通过拖拉拽等方式创建和编辑图形。
使用者可以通过组件引用的方式,将其嵌入到应用的任意位置,使之拥有在线绘图的能力。
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
## Type Support for `.vue` Imports in TS
## 功能特性
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
  DDei以组件的方式提供使用功能强大且易于集成大多数功能都可以通过初始化配置和引入插件完成无需复杂编码。以下是DDei的功能特性
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
**画布大小**
1. Disable the built-in TypeScript Extension
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
  支持设置设计器的大小。
## Customize configuration
**背景**
See [Vite Configuration Reference](https://vitejs.dev/config/).
  支持空白、图片、纯色以及透明度设置。
## Project Setup
**纸张**
```sh
npm install
```
  开启后会在背景上显示纸张。允许设置纸张的大小A4、A5、自定义以及方向横向、纵向
### Compile and Hot-Reload for Development
**标尺**
```sh
npm run dev
```
  开启后会在绘图区域的周围显示标尺,同时会影响辅助网格的尺寸。支持毫米、厘米、米、英寸、像素等单位。
### Type-Check, Compile and Minify for Production
**辅助对齐**
```sh
npm run build
```
  开启后拖拽时会显示对齐辅助线。
**辅助网格**
  开启后会在背景上绘制用于对齐的辅助网格线。支持点阵和网格两种类型。
**水印**
  开启后图形上方显示水印。支持文字、图像两种水印类型,可以调整水印的字体、文本、图片、方向、颜色和透明度。
**无限画布**
  开启后在操作超出画布大小时会自动扩展画布。可以限制扩展方向(横向或纵向)。
**权限控制**
  可以配置操作权限。支持全局只读设置,或到图形实例级的创建、修改、选择、删除、连线等权限。
**多文件**
  可以配置插件实现多文件编辑。
**多页签**
  可以配置插件实现多页签编辑。
**多图层**
  开启后可以创建多个图层,并在不同图层之间切换、锁定或删除图层。
**数据驱动**
  DDei采用数据驱动图形的绘制与JSON模型绑定图形操作和模型数据会相互同步。可以通过API获取图形的JSON数据或通过已有的JSON数据显示加载画布。
**插件机制**
  DDei提供了插件机制使用者可以通过扩展插件对设计器功能进行装载或卸载。也可以通过自定义插件扩展个性化功能从而满足使用需求。
## 安装、示例与API
  作者提供了完整的安装指南和示例,请进入[DDei官网]https://www.ddei.top查看最新文档。
## 技术支持
<center>QQ:3697355039 &emsp;&emsp;&emsp;&emsp;邮箱3697355039@qq.com</center>

13
package-lock.json generated
View File

@ -1,15 +1,15 @@
{
"name": "ddei-editor",
"version": "1.2.11-64",
"version": "1.2.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ddei-editor",
"version": "1.2.11-64",
"version": "1.2.12",
"license": "Apache License 2.0",
"dependencies": {
"ddei-framework": "file:../ddei-framework/ddei-framework-1.2.35-47.tgz"
"ddei-framework": "^1.2.36"
},
"devDependencies": {
"@tsconfig/node18": "^18.2.0",
@ -518,10 +518,9 @@
"integrity": "sha512-tdMuLdcJyreope1BWfnYqTQaIkSIrU/KtY9yX5mNGd+tYeJ0Y99ARHDuYnEABPX/8yh/r0Kl169v5ODg2vr98g=="
},
"node_modules/ddei-framework": {
"version": "1.2.35-47",
"resolved": "file:../ddei-framework/ddei-framework-1.2.35-47.tgz",
"integrity": "sha512-Jjw/9lxJN8DaSuGpAGsjKshwbxXvxanIYJ5pQPB6fR0C4Zu+Xw2rv8fgCk2/cfRaeC1srs33ubaON1CNu2ct4A==",
"license": "Apache License 2.0",
"version": "1.2.36",
"resolved": "https://registry.npmjs.org/ddei-framework/-/ddei-framework-1.2.36.tgz",
"integrity": "sha512-7euA9krnm9DffBEjSTVVkKCAm3InHhZWS48ALGxT+6xP3atyMOVXFJ55fxgh56G80/a9XErnPcc9uQqwZEZU/Q==",
"dependencies": {
"ddei-autolink": "^1.1.1",
"lodash": "^4.17.21",

View File

@ -1,6 +1,6 @@
{
"name": "ddei-editor",
"version": "1.2.11-64",
"version": "1.2.12",
"private": false,
"type": "module",
"author": "hoslay <3697355039@qq.com>",
@ -49,7 +49,7 @@
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false"
},
"dependencies": {
"ddei-framework": "file:../ddei-framework/ddei-framework-1.2.35-47.tgz"
"ddei-framework": "^1.2.36"
},
"devDependencies": {
"@tsconfig/node18": "^18.2.0",

View File

@ -13,7 +13,7 @@ export default defineConfig({
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'@ddei': fileURLToPath(new URL('./plugins', import.meta.url)),
'ddei-framework': fileURLToPath(new URL('/Users/hoslay/work/ddei/ddei-framework/dist/ddei-framework.js', import.meta.url)),
// 'ddei-framework': fileURLToPath(new URL('/Users/hoslay/work/ddei/ddei-framework/dist/ddei-framework.js', import.meta.url)),
}
},