1.0.7 • Published 4 years ago

@wtfcode/vue-byte-converter v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

vue-byte-converter

Vue Components for use Byte Converter libary easily within vue

import the component and use Vue.use() for register the components there are a named view for all components in kebapcase es = VDataFormatConverter there is another one named view: ByteConverter that expose the original library class packaged in the dist file in case you need

the component register an instance property: $byteConverter for use byte-converter Library in any other part of the application

COMPONENTS

namedescriptionpropertyslot
v-data-format-converterconvert value across dataFormats use the default scope for override the default functionalitydefault scope={...$props,converted,convertedText,toAsName}
value in the dataFormat specified by fromvalue:Number required
show the to dataFormat nameviewName:Boolean=false
show the to dataFormatviewDataFormat:Boolean=false
show value as speed B/sspeed:Boolean=false
the current value dataFormatfrom:String='B'
the wanted value dataFormatto:String='MiB'
if you want to localize valuelocalize:Boolean=false
the locale to use if localize is truelocale:String='en'
the minimum number of digit after decimal pointminimumFractionDigits:Number=-1
the maximum number of digit after decimal pointmaximumFractionDigits:Number=-1
v-data-format-auto-converterconvert value across dataFormats automatically use the default scope for override the default functionalitydefault scope={...$props,converted,convertedText,to,toAsName}
value in the dataFormat specified by fromvalue:Number required
show the to dataFormat nameviewName:Boolean=false
show the to dataFormatviewDataFormat:Boolean=false
show value as speed B/sspeed:Boolean=false
the current value dataFormatfrom:String='B'
if you want to localize valuelocalize:Boolean=false
the locale to use if localize is truelocale:String='en'
the minimum number of digit after decimal pointminimumFractionDigits:Number=-1
the maximum number of digit after decimal pointmaximumFractionDigits:Number=-1
the option for scale algorithmscaleOptions:Object = {
have to prefer Byte unitpreferByte:Boolean=false,
or have to prefer Bit unitpreferBit:Boolean=false,
or have to prefer same unitpreferSameUnit:Boolean=true,
or have to prefer opposite unitpreferOppositeUnit:Boolean=false,
have to prefer Binary basepreferBinary:Boolean=false,
or to prefer Decimal basepreferDecimal:Boolean=false,
or to prefer same basepreferSameBase:Boolean=true,
or to prefer opposite basepreferOppositeBase:Boolean=false,
an handler function for custom filtering dataFormats return true to pass or false to filterhandler:Function->Boolean }