2017-05-28 82 views

回答

2

如果使用weex的工具包,你应该自己创建一些文件,并显示目录,其中包括:

迪尔斯:

  • 网络
  • 平台
  • 插件

文件:

  • android.config.json
  • ios.config.json
  • config.xml中

编辑​​3210:

<?xml version='1.0' encoding='utf-8'?> 
<widget id="com.alibaba.weex" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> 
    <name>MyApp1</name> 
    <description> 
     A sample Apache Cordova application that responds to the deviceready event. 
    </description> 
    <author email="[email protected]" href="http://cordova.io"> 
     Apache Cordova Team 
    </author> 
    <content src="index.html" /> 
    <plugin name="cordova-plugin-whitelist" spec="1" /> 
    <access origin="*" /> 
    <allow-intent href="http://*/*" /> 
    <allow-intent href="https://*/*" /> 
    <allow-intent href="tel:*" /> 
    <allow-intent href="sms:*" /> 
    <allow-intent href="mailto:*" /> 
    <allow-intent href="geo:*" /> 
    <platform name="android"> 
     <allow-intent href="market:*" /> 
    </platform> 
    <platform name="ios"> 
     <allow-intent href="itms:*" /> 
     <allow-intent href="itms-apps:*" /> 
    </platform> 
</widget> 

在当前版本中,您还可以使用weex create创建weexpack项目。

和当然,一个入门套件,也许还有助于您:https://github.com/elemefe/weex-vue-starter-kit

+0

感谢答案,并感谢初学者工具包。 但现在又有一个关于插件的问题:我如何运行Natjs插件。 在weex-pack项目中,这些插件仅在* .we文件中运行... 在您的入门套件中,我只看到* .vue文件和* .we未编译。 –

+0

@AndreyBosonchenko看来插件太旧了。目前的weex版本已将'.we'改为'.vue',不再维护'.we'。但幸运的是,从'.we'文件迁移到'.vue'语法很容易 – SkyAo