JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q55450F
  • License MIT

easy tabs component

Package Exports

  • vue-tab-component

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-tab-component) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vue-tab-component

VersionDownloadsLicense

A Vue2.0 tab component which can control DOM render number

Feature

  • Custom DOM render number
  • provide goBegin/goEnd Function
  • suppord left、right Position
  • suppord slot to change tab content

EN || 如果它对你有帮助的话,请Star支持!!! exemple project

预览


demo

快速开始


Install

npm install vue-tab-component --save

Usage

A simple project use vue-tab-component

main.js

import Vue from 'vue'
import tabs from 'vue-tab-component'

Vue.use(tabs)

API


Attribute

Name Description Type Default
data data of tab {id:'id',text:'word'} Array []
tabPosition tab' position, one of ['top','bottom','left','right'] String bottom
type css type, one of ['card','line'] String line
closable if tab can delete Boolean false
activeName active tab's id String ''
maxnum max number of DOM render tab at once Number 20
stretch (todo) if tab stretchable because of content Boolean false

Method

Name Description Param
goBegin jump to tab's begin -
goEnd jump to tab's end -
scrollPrev slip to after part -
scrollNext slip to next part -
scrollToActiveTab slip to active tab -

Event

Name Description Param
on-click when tab on clicking, return tab's id id tab's id
on-tab-remove when tab on deleting, return tab's id id tab's id

License


The 996ICU License (996ICU)