1.0.0 • Published 2 years ago

@j-xushijie/j-ui-library v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

toc

j-ui-library

Introduction

A vue ui component library

Install

    npm i j-ui-library

Import

    import Vue from 'vue';
    import JUI from 'j-ui-library'
    import 'j-ui-library/lib/j-ui-library.css'
    
    Vue.use(JUI)
    
    new Vue({
      el: '#app',
      render: h => h(App)
    });

Components

Tag

Attributes

ParamDescriptionTypeDefaultOptional value
closableWhether with delete buttonBooleanfalsetrue/false
sizetag sizestringmiddlesmall/large
disabletag is disabledBooleanfalsetrue/false
activetag is enabledBooleanfalsetrue/false

Events

EventNameDescription
mouseoverEvent triggered when the mouse moves into the tag
mouseoutEvent triggered when the mouse moves out of the tag
clickEvent triggered when tag is clicked
closeEvent triggered when tag is clicked close btn

slots

NameDescription
iconCustom close button

Button

Attributes

ParamDescriptionTypeDefaultOptional value
sizeButton sizeStringmiddlesmall/large
roundWhether the button is roundedBooleanfalsetrue/false
borderButton without background colorBooleanfalsetrue/false
disabledButton is disabledBooleanfalsetrue/false

Events

EventNameDescription
clickEvent triggered when button is clicked

Bubble

Attribute

ParamDescriptionTypeDefaultOptional value
sizeBubble sizeStringmiddlesmall/large
placementWhere the bubble popsstringbottom(top | botton | left | right)(-start | -end)
visibleArrowWhether to show arrowBooleantruetrue | false
appendToBodyWhether to add to domBooleantruetrue | false

Methods

MethodNameDescription
openopen bubble
closeclose bubble

slots

NameDescription
contentbubble content

Card

Attributes

ParamDescriptionTypeDefaultOptional value
sizecard sizeStringmiddlesmall/large
rolecurrent roleStringpatientdoctor/patient
directioncard directionStringverticalvertical/horizontal
textText to displayString

Events

EventNameDescription
mouseupTriggered when the mouse up
mousedownTriggered when the mouse down

slots

NameDescription
prefixCustom icon
appendCustom icon
avatarCustom avatar icon

Input

Attributes

ParamDescriptionTypeDefaultOptional value
sizeInput sizeStringmiddlesmall/large
roundWhether the input box is roundedBooleanfalsetrue/false
typeInput typeStringtextType value of native input
tabindexInput tabindexString
showPasswordWhether to display the switch password iconBooleanfalsetrue/false
clearableCan be emptiedBooleanfalsetrue/false
disabledinput disabledBooleanfalsetrue/false
readonlyinput readonlyBooleanfalsetrue/false
valueinput valueString/Number''

Events

EventNameDescription
focusTriggered when input gets focus
blurTriggered when input loses focus
inputTriggered when the Input value changes
changeOnly triggered when the input box loses focus
clearTriggered when the clear button is clicked

Methods

MethodNameDescription
focusinput gets focus
blurinput loses focus

slots

NameDescription
prependFront content of input box
appendContent behind the input box
prefixHeader content of input box
suffixEnd of input box

Autocomplete

Attributes

ParamDescriptionTypeDefaultOptional value
sizeautocomplete sizeStringmiddlesmall/large
valueautocomplete valueString | Number
fetchSuggestEnter the suggested methodFunction
debounceDebounce delayNumber300
valueKeyData field value displayedStringvalue
placementEnter suggested pop-up locationStringbotoom(top | botton | left | right)(-start | -end)
visibleArrowWhether to show arrowBooleantruetrue/false
appendToBodyWhether to insert input suggestions into the body elementBooleantruetrue | false
roundWhether roundedBooleanfalsetrue | false
readonlyWhether readonlyBooleanfalsetrue | false
disabledWhether disabledBooleanfalsetrue | false

Events

EventNameDescription
focusTriggered when input gets focus
blurTriggered when input loses focus
inputTriggered when the Input value changes
selectTriggered when a suggestion is selected

slots

NameDescription
prependFront content of input box
appendContent behind the input box
prefixHeader content of input box
suffixEnd of input box

Select

Attributes

ParamDescriptionTypeDefaultOptional value
sizeSelect sizeStringmiddlesmall/large
disabledWhether disabledBooleanfalsetrue | false
valueSelect valueString | Array
multipleWhether to select multipleBooleanfalsetrue | false
popperClasscustomize popper element classString
clearableWhether to bring a clear buttonBooleanfalsetrue | false
allowCreateWhether to allow creation of optionsBooleanfalsetrue | false
filterableWhether to SearchableBooleanfalsetrue | false
placeholderplaceholderString请选择
remoteWhether to search remotelyBooleanfalsetrue | false
remoteMethodremote methodFunction

Events

EventNameDescription
focusTriggered when input gets focus
blurTriggered when input loses focus
inputTriggered when the Input value changes
changeTriggered when the selected value changes
visible-changeTriggered when the drop-down box appears/hidden
remove-tagTriggered when multiple selection options are deleted
clearTriggered when click clear btn

slots

NameDescription
prefixHeader content of select box
suffixEnd of select box

Option

Attributes

ParamDescriptionTypeDefaultOptional value
sizeoption sizeStringmiddlesmall/large
labeloption labelString | Number
valueoption valueString