We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
类似这样 this.$isPage,并将之加入 TypeScript 类型定义。
this.$isPage
创建项目级别的基本组件,供公共组件及页面继承扩展,如此可在基本组件里判断是否是页面,并注入相关业务逻辑,譬如登录状态、数据埋点之类。
以上的应用场景在我看来更好的应该是分成基本组件和基本页面两个类,分别去继承,不过,加上 $isPage 可能对其他一些应用场景会更有意义。😀
$isPage
The text was updated successfully, but these errors were encountered:
b35d1bd
文档地址
Sorry, something went wrong.
feat(taro-weapp): 增加 this.$componentType 来判断当前 Taro.Component 是页面还是组件 f…
b4ea834
…ix NervJS#1166
Chen-jj
No branches or pull requests
API
类似这样
this.$isPage
,并将之加入 TypeScript 类型定义。应用场景
创建项目级别的基本组件,供公共组件及页面继承扩展,如此可在基本组件里判断是否是页面,并注入相关业务逻辑,譬如登录状态、数据埋点之类。
补充
以上的应用场景在我看来更好的应该是分成基本组件和基本页面两个类,分别去继承,不过,加上
$isPage
可能对其他一些应用场景会更有意义。😀The text was updated successfully, but these errors were encountered: