target/classes/static/plugins/element-ui/packages/tabs/src/tabs.vue
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<script>
import TabNav from './tab-nav';
export default {
name: 'ElTabs',
components: {
TabNav
},
props: {
type: String,
activeName: String,
closable: Boolean,
addable: Boolean,
value: {},
editable: Boolean,
tabPosition: {
type: String,
default: 'top'
},
beforeLeave: Function,
stretch: Boolean
},
provide() {
return {
rootTabs: this
};
},
data() {
return {
currentName: this.value || this.activeName,
panes: []
};
},
watch: {
activeName(value) {
this.setCurrentName(value);
},
value(value) {
this.setCurrentName(value);
},
currentName(value) {
if (this.$refs.nav) {
this.$nextTick(() => {
this.$refs.nav.$nextTick(_ => {
this.$refs.nav.scrollToActiveTab();
});
});
}
}
},
methods: {
calcPaneInstances(isForceUpdate = false) {
if (this.$slots.default) {
const paneSlots = this.$slots.default.filter(vnode => vnode.tag &&
后面还有 131 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
