2017-05-28 80 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