拼板印
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
444 B

function init(Vue, options) {
const route = {
data: null,
id: null
}
function setData(data) {
route.data = data
route.id = String(Date.now())
return route.id
}
function getData(id) {
return id === route.id ? route.data : null
}
Vue.prototype.$wxRouter = {
setData: setData,
getData: getData
}
Vue.prototype.$wxRoute = route
}
const vueWxRouter = {
install: init
}
export default vueWxRouter