-
router.js
導入路由模塊 vue-router
import VueRouter form 'vue-router'導入組件
import index form './components/inde.vue'讓vue使用vue-router當做自己的路由
Vue.use(VueRouter)創(chuàng)建一個路由對象并輸出
export default newVueRouter({
????router:[
????????{path: '/index', component: index}
????]})
app.js
導入一個根組件
import foo form './src/router.vue'導入一個路由文件
import router form './src/router.js'給根組件設置一個id
foo.el = '#root'給根組件設置路由
foo.router = router創(chuàng)建一個vue對象
export default new Vue(foo)指定一個路由入口
router.push('index')router.vue
js: this.$router.push(e); //更新指定路由入口
查看全部 -
......查看全部
-
.....查看全部
-
......查看全部
-
......查看全部
-
......查看全部
-
......查看全部
-
......查看全部
-
......查看全部
-
......查看全部
-
......查看全部
-
......查看全部
-
......查看全部
-
......查看全部
-
......查看全部
-
......查看全部
-
環(huán)境搭建:
1. 安裝Node.js
2. 安裝weex: npm install -g weex-toolkit
創(chuàng)建和執(zhí)行項目:
weex create porject //weex init porject不適用了
npm install
npm run dev
npm run serve
查看全部 -
1.weex的優(yōu)勢:
①支持ES6規(guī)范,
②性能優(yōu)異,開發(fā)簡潔標準,體積小巧
③跨平臺
2,.weex的調(diào)試工具
①weex playground
②下載地址:https://weex.apache.org/zh/guide/playground.html
③使用方法:在手機中下載weex playground APP,用weex playground APP掃描網(wǎng)頁項目中的二維碼。
查看全部 -
npm node.js的管理包工具
查看全部 -
weex 一套跨平臺移動開發(fā)工具
查看全部 -
weex - HBuilder
查看全部 -
webview示例
查看全部 -
webview模塊
查看全部 -
Web組件示例
查看全部 -
Web組件
查看全部
舉報