安装命令“
cnpm install –save isomorphic-fetch es6-promise
由于ie不支持Promise,所以需要安装promise-polyfill;
cnpm install promise-polyfill –save-exact
需要在index.js中引用
import Vue from 'vue'
import Router from 'vue-router'
import Promise from "promise-polyfill";
if(!window.Promise){
window.Promise = Promise;
}
使用
<template>
<div class="hello">
<h1 @click="getUrl">{
{ msg }}</h1>
<router-link to="/test/one">testlinks</router-link>
<router-link to="/test/two" exact>testlinks1</router-link>
<