Skip to content
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

插件模式下 mixin 失效 #29

Open
baranwang opened this issue Mar 1, 2019 · 0 comments
Open

插件模式下 mixin 失效 #29

baranwang opened this issue Mar 1, 2019 · 0 comments

Comments

@baranwang
Copy link
Contributor

baranwang commented Mar 1, 2019

在开发小程序插件中,使用全局 mixin 方法失效

plugin.mina
pages
- index.main

plugin.mina

<config>
{
  "pages":{
    "index": "pages/index.mina",
  },
  "main": "plugin.js"
}
</config>

<script>
import { Page, Component } from '@tinajs/tina'

const isx = /iphone10|iphone11|iphone x/i.test(wx.getSystemInfoSync().model)
const data = { isx }

Page.mixin({ data })
Component.mixin({ data })
</script>
@imyelo imyelo pinned this issue Mar 1, 2019
@imyelo imyelo unpinned this issue Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant