File tree Expand file tree Collapse file tree 6 files changed +86
-14
lines changed Expand file tree Collapse file tree 6 files changed +86
-14
lines changed Original file line number Diff line number Diff line change 88 "lint" : " vue-cli-service lint"
99 },
1010 "dependencies" : {
11+ "bootstrap" : " ^5.2.3" ,
1112 "core-js" : " ^3.8.3" ,
1213 "vue" : " ^2.6.14"
1314 },
Original file line number Diff line number Diff line change 11<template >
2- <div >
3- <vue-number v-bind =" config" v-model =" price" />
4- {{ price }}
2+ <div class =" container py-5" >
3+ <div class =" row" >
4+ <div class =" col-xs-12 col-sm-6" >
5+ <ComponentBased />
6+ </div >
7+ <div class =" col-xs-12 col-sm-6" >
8+ <DirectiveBased />
9+ </div >
10+ </div >
511 </div >
612</template >
713
814<script >
15+ import ComponentBased from ' ./components/ComponentBased.vue'
16+ import DirectiveBased from ' ./components/DirectiveBased.vue'
17+
918export default {
10- data () {
11- return {
12- price: 123456.86 ,
13- config: {
14- prefix: ' $' ,
15- // min: 0,
16- reverseFill: true
17- }
18- }
19- },
19+ components: {
20+ DirectiveBased,
21+ ComponentBased
22+ }
2023}
2124 </script >
Original file line number Diff line number Diff line change 1+ <template >
2+ <div class =" component-based" >
3+ <div class =" title" >Component</div >
4+ <VueNumber v-bind =" config" v-model =" price" />
5+ <div >Price: {{ price }}</div >
6+ <div >Calculated: {{ calculated }}</div >
7+ </div >
8+ </template >
9+
10+ <script >
11+ export default {
12+ data () {
13+ return {
14+ price: 123456.86 ,
15+ config: {
16+ min: 0 ,
17+ },
18+ };
19+ },
20+ watch: {
21+ price (val ) {
22+ console .log (" components/ComponentBased.watch:price" , val);
23+ },
24+ },
25+ computed: {
26+ calculated () {
27+ return this .price * 10 ;
28+ },
29+ },
30+ };
31+ </script >
Original file line number Diff line number Diff line change 1+ <template >
2+ <div class =" directive-based" >
3+ <div class =" title" >Directive</div >
4+ <input v-number =" config" v-model =" price" />
5+ <div >Price: {{ price }}</div >
6+ <div >Calculated: {{ calculated }}</div >
7+ </div >
8+ </template >
9+
10+ <script >
11+ export default {
12+ data () {
13+ return {
14+ price: 123456.86 ,
15+ config: {
16+ min: 0 ,
17+ },
18+ };
19+ },
20+ watch: {
21+ price (val ) {
22+ console .log (" components/DirectiveBased.watch:price" , val);
23+ },
24+ },
25+ computed: {
26+ calculated () {
27+ return this .price * 10 ;
28+ },
29+ },
30+ };
31+ </script >
Original file line number Diff line number Diff line change 11import Vue from 'vue'
22import App from './App.vue'
3-
43import VueNumberFormat from '../../'
54
5+ import 'bootstrap/dist/css/bootstrap.min.css'
6+
67Vue . config . productionTip = false
78Vue . use ( VueNumberFormat )
89
Original file line number Diff line number Diff line change @@ -2020,6 +2020,11 @@ boolbase@^1.0.0:
20202020 resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
20212021 integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==
20222022
2023+ bootstrap@^5.2.3 :
2024+ version "5.2.3"
2025+ resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.2.3.tgz#54739f4414de121b9785c5da3c87b37ff008322b"
2026+ integrity sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==
2027+
20232028brace-expansion@^1.1.7 :
20242029 version "1.1.11"
20252030 resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
You can’t perform that action at this time.
0 commit comments