alexqdjay / vue-tabs Goto Github PK
View Code? Open in Web Editor NEW多tab页框架替代router支持vue2.0
License: Apache License 2.0
多tab页框架替代router支持vue2.0
License: Apache License 2.0
Tabs.vue中,有下面类似的代码
let next = function (target) {
if (target == null) {
hocks[++i].call(_this, tab, next)
} else if (target === false) {
return
} else {
if (isString(target) && target === tab.name) {
hocks[++i].call(_this, tab, next)
} else if (isObject(target) && target.name === tab.name) {
hocks[++i].call(_this, tab, next)
} else {
_this.$taber.open(target)
}
}
}
hocks.push(() => {
this.tabs.push(tab)
this.appendContent(tab)
this.select(tab)
const id = tabIdGen(tab.name, tab.key)
this.tabMap[id] = tab
next = null
hocks = null
})
hocks[0].call(this, tab, next)
这个next函数好像并没有用到
就是我打开的tab页面是一个components
我在tab里想写些参数,比如id,type,xxx之类的,最终想在页面components里获取到这些值
我想要实现的就是vue-router在页面里通过this.$route.query.xxx可以获取到属性的功能
function getData() {
let arr = []
http({
url: 'api/getMenu'
})
.then(res => {
arr = res.data
arr.map(res => {
res.component = (resolve) => {
require([`view/${res.name}.vue`], resolve)
}
})
})
return arr
}
https://github.com/linusok/vuespa1
#6 接上一次请教动态加载的问题,帮忙看下是哪里问题。不好意思拖了这么久。
主要帮忙看下左侧菜单【库存管理】为啥异步加载不了组件
0.2.0
IE 11
对象不支持“remove”属性或方法
<!--put your code here-->
0.2.1
<!--put your code here-->
我曾经在vue官方论坛上问过,但没有解决方案:
https://forum.vuejs.org/t/topic/18991
这里我在补充描述下:
我看到vue-tabs组件,跟我目前开发的产品应用场景非常契合,但对于菜单全部是后台表自定义的,与页面组件间关系也是自定义的,所以想请教这个菜单点击后如何动态通过axios.get从服务器上读取一个page1.vue来展示在页签里?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.