@zhangqingcq/vgce 0.0.11 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,2 +1,35 @@
1
1
  # VGCE
2
+
2
3
  Vector graphics configure editor. 矢量图组态编辑器。
4
+
5
+ ## Guide
6
+
7
+ 1. `npm i @zhangqingcq/vgce` or `pnpm add @zhangqingcq/vgce`
8
+
9
+ 2. `import '@zhangqingcq/vgce/style'` in main.ts
10
+
11
+ 3. editor
12
+
13
+ ```
14
+ <script setup lang="ts">
15
+ import {SvgEditor} from '@zhangqingcq/vgce'
16
+
17
+ function preview(d: any) {
18
+ //save d and send it to SvgViewer's data
19
+ }
20
+ </script>
21
+ <template>
22
+ <SvgEditor @onPreview="preview"/>
23
+ </template>
24
+ ```
25
+
26
+ 4. viewer
27
+
28
+ ```
29
+ <script setup lang="ts">
30
+ import {SvgViewer} from '@zhangqingcq/vgce'
31
+ </script>
32
+ <template>
33
+ <SvgViewer :data="xxx"/>
34
+ </template>
35
+ ```