0.1.13 • Published 1 year ago

vue-formatted-number-input v0.1.13

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 year ago

vue-formatted-number-input

Public repository maintained by SurrealityCheck.org

Example project (my stand in for real documentation)

Created with help from "Program With Erik's" excellent demostrations.

Version History...

VersionProject State
0.0._Efforts to learn how to deploy a plugin
0.1.0M.V.P. works as a plug-in!
0.1.3Plug-in v-model binding fixed. Props no longer an interface.
0.1._Document current state & refactor goals
0.1.8Begin major refactor
0.1.9Test major refactor in the wild
0.1.9_Iron out bugs (work in progress)
0.2.0Add test suite (not yet begun)

Usage...

Note: As of 0.1.8, some items in the proposed refactor goals are being incorporated.

Current Usage...

PropTypeDefaultNote
initialNumberNumberundefinedInitial value of new input
placeholderStringundefinedText displayed when there is no value. Compatible with Prime Face's floating labels.
prefixStringundefinedUseful for currency symbols, such as $ or ¥
maxNumber999,999.00Upper limit allowed. Inputs exceed this will be rounded down.
allowedDecimalPlacesNumber0Allows decimals, and maintains set decimal places on blur.
allowEmptyBooleantrueIf false, empty input will default to 0 on blur
diagnosticModeBooleanfalseExposes realtime model data in the UI and dev console.

Intended Expansion of Functionality (the to-do list)...

PropTypeDefaultNote
initialNumberNumber || Refv-modelIf there is no pre-existing model value, use this to initiate one. If there is a model value, but you'd rather not show it until the user interacts, assign initialNumber="null"
defaultTo (was allowEmpty)Number (was Boolean)nullIf a parameter exists, an empty field will default to this value on blur.
allowNegativeBooleanfalseAllow minus symbol (-) for negative number evaluation
minNumber-999,999.00Lowest limit allowed (presently, no negative number is permitted)
disabledBooleanfalseInput disabled attribute.
allowFractionBooleanfalseAllow slash sign (/) for factional evaluation.
enableUnicodeBooleanfalseEvaluate prefix and suffix as Unicode (bug fix).
suffixString''Useful for clarification in-line, such as "__ days since this village wrongfully accused someone of being a werewolf. or "__ per customer"
allowCalculationBooleanfalseAllow leading equal sign (=) to trigger formula evaluation.

Bug notes...

  • Model B is displaying 0 when empty, despite :allowEmpty = "true".
  • Inputs are allowing spacebar to enter an empty char after a decimal.
  • Entering only a . does not return 0.
  • Unicode prefixes are being displayed as suffix.
0.1.13

1 year ago

0.0.403

2 years ago

0.0.402

2 years ago

0.0.401

2 years ago

0.1.11

1 year ago

0.1.12

1 year ago

0.0.406

2 years ago

0.0.405

2 years ago

0.0.404

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.0.3

2 years ago

0.1.1

2 years ago

0.1.7

2 years ago

0.1.9

1 year ago

0.1.4

2 years ago

0.1.3

2 years ago

0.0.4

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago