@syhr/sy-threed-graph 1.0.0-bate6 → 1.0.0-bate7

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 CHANGED
@@ -99,13 +99,9 @@ const handleGraphEvent = (errorInfo) => {
99
99
  console.error('Graph error:', errorInfo);
100
100
  };
101
101
 
102
- // 组件方法调用示例
103
- const toggleLevel = () => {
104
- graphRef.value?.changeVisibleByLevel(3, false);
105
- };
106
-
107
- const batchUpdate = (dataList) => {
108
- graphRef.value?.batchUpdatePen(dataList);
102
+ // 获取实例
103
+ const getEditorInstance = () => {
104
+ graphRef.value?.getEditorInstance();
109
105
  };
110
106
  </script>
111
107
  ```
@@ -131,32 +127,26 @@ const batchUpdate = (dataList) => {
131
127
 
132
128
  通过 ref 获取组件实例后可调用以下方法:
133
129
 
134
- - `setValue(pen, render = true)` - 设置图元属性
135
- - `getStage()` - 获取 Meta2D 实例
136
- - `getAllPens()` - 获取所有图元
137
- - `getCustomPenType()` - 获取所有图元类型
138
- - `batchUpdatePen(dataList)` - 批量更新图元
139
- - `handleLineCross()` - 处理线条交叉
140
- - `changeVisibleByLevel(level, isStrict = false)` - 切换显示层级
130
+ - `getEditorInstance()` - 获取编辑器实例
141
131
 
142
132
  ## 使用场景
143
133
 
144
134
  ### 1. 基础三维图纸展示
145
135
 
146
136
  ```vue
147
- <SyThreedGraph :url="'/api/graph/123'" />
137
+ <SyThreedGraph :data="graphData" />
148
138
  ```
149
139
 
150
140
  ### 2. 图纸id
151
141
 
152
142
  ```vue
153
- <SyThreedGraph :id="'111111111'" />
143
+ <SyThreedGraph :url="'https://ip:port/cockpit/threed/xxx.json'" />
154
144
  ```
155
145
 
156
146
  ### 3. 直接传入数据
157
147
 
158
148
  ```vue
159
- <SyThreedGraph :data="graphData" />
149
+ <SyThreedGraph :id="'111111111'" />
160
150
  ```
161
151
 
162
152
  ### 4. 完整配置示例