@jnrs/lingshu-smart 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# @jnrs/lingshu-smart
|
|
2
2
|
|
|
3
3
|
## ✨ 介绍
|
|
4
|
-
|
|
4
|
+
巨能前端 2D 数字孪生库,灵枢智造。
|
|
5
5
|
- 2D 数字孪生编辑器、运行看板
|
|
6
|
-
- 3D 数字孪生编辑器、运行看板
|
|
7
6
|
|
|
8
7
|
## 💻 技术栈
|
|
9
|
-
TypeScript、Vue3 生态、LeaferJs
|
|
8
|
+
TypeScript、Vue3 生态、LeaferJs
|
|
10
9
|
|
|
11
10
|
## 🧩 安装教程
|
|
12
11
|
```shell
|
|
@@ -16,13 +15,40 @@ pnpm add @jnrs/lingshu-smart
|
|
|
16
15
|
## 🔍 使用示例
|
|
17
16
|
```typescript
|
|
18
17
|
import type { *** } from '@jnrs/lingshu-smart'
|
|
18
|
+
import { LingshuSmartEditor } from '@jnrs/lingshu-smart/components'
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## 📋 API
|
|
22
22
|
|
|
23
|
-
#### @jnrs/lingshu-smart 模块
|
|
24
|
-
|
|
25
|
-
-
|
|
23
|
+
#### @jnrs/lingshu-smart/components 模块
|
|
24
|
+
Vue 组件
|
|
25
|
+
- LingshuSmartEditor 编辑器组件
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
| 属性名 | 描述 | 类型 | 默认值 |
|
|
28
|
+
|--------|------|------|--------|
|
|
29
|
+
| actions | 事件处理 | `CaseActions` | {} |
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
interface CaseActions {
|
|
33
|
+
/**
|
|
34
|
+
* 加载案例列表
|
|
35
|
+
* @returns Promise<ICase[]>
|
|
36
|
+
*/
|
|
37
|
+
loadCases?: (id?: string) => Promise<ICase[]>
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 保存方案列表
|
|
41
|
+
*/
|
|
42
|
+
saveCases?: (cases?: ICase[]) => void
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 跳转到预览页面
|
|
46
|
+
*/
|
|
47
|
+
goPreview?: (currentCase?: ICase) => void
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 退出当前页面
|
|
51
|
+
*/
|
|
52
|
+
goExit?: () => void
|
|
53
|
+
}
|
|
54
|
+
```
|