-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在leafer-ui/worker,无法使用 json 创建元素 #362
Comments
请给出具体复现代码 |
// Custom.ts export interface ICustomInputData extends IRectInputData { } export interface ICustomData extends IRectData { } export class CustomData extends RectData implements ICustomData { } @registerui() public get __tag() { return 'Custom' } @dataprocessor(CustomData) // 1. 添加普通属性,不用进json,只是辅助逻辑判断 // constructor(data: ICustomInputData) { // 2. 添加自定义方法, 动画开关 // stopAnimate(): void { rotateAnimate(): void { } // worker.ts const leafer = new Leafer({ width: 800, height: 600 }) const start = (value) => { |
worker中引入 import './Custom.ts' 导致引入了 leafer-ui包,需要把 leafer-ui替换成 '@leafer-ui/core'就能跨平台 |
错误:Uncaught ReferenceError: CanvasRenderingContext2D is not defined
The text was updated successfully, but these errors were encountered: