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
无法获得 static get data() 中的属性值 #115
Comments
要加这个才能编译通过吧? 具体看下这个相关的 issues #107 tag name的必须包含中画线,这是 webcomponents 规范规定的 |
https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#Parameters
|
https://github.com/Tencent/omi/blob/master/packages/omi-cli/template/app-ts/src/index.tsx#L17-L23 interface MyAppData {
abc: string;
passToChild: string;
}
@tag('my-app')
class MyApp extends WeElement<MyAppProps, MyAppData> { 需要创建一个 为什么要删掉自动生成的 index.tsx 和 hello-omi.tsx 文件呢? |
@xcatliu 嗯, 知道, 但是 为什么 快速入手中的 代码 copy过来 跑不动呢? 这让人很伤心. 还是说 那些 代码 不支持 ts 版? |
好的, 刚弄ts, 不太懂,谢谢大佬 解答. |
https://github.com/Tencent/omi/blob/master/README.CN.md
当我按照该文档进行的时候,出现了如下的错误:
当我将 4 中的 this.data.abc = ' by ' + evt.detail.name 注释之后, 则可以编译通过. 显示正常.
另外, 当我给tag 命名成单个单词, 如 hello 而非 hello-element 或 hello-world 时, 会出现如下错误:
请问, 是我哪里的 打开方式不对么? 求解答.谢谢
The text was updated successfully, but these errors were encountered: