* 替换当前 document 的 schema,并触发渲染器的 render * @param schema
(schema?: IPublicTypeProjectSchema)
| 194 | * @param schema |
| 195 | */ |
| 196 | setSchema(schema?: IPublicTypeProjectSchema) { |
| 197 | // FIXME: 这里的行为和 getSchema 并不对等,感觉不太对 |
| 198 | const doc = this.documents.find((doc) => doc.active); |
| 199 | doc && schema?.componentsTree[0] && doc.import(schema?.componentsTree[0]); |
| 200 | this.simulator?.rerender(); |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * 整体设置项目 schema |
no test coverage detected