|
3 | 3 | <div class="fixed top-0 w-100 z-1 flex-none flex flex-row items-center pv3 ph4 white headerToolbar"> |
4 | 4 | <div class="flex-fill"> |
5 | 5 | <a :href="`https://github.com/autoNumeric/vue-autoNumeric/releases/tag/v${version}`" class="white no-underline underline-hover">vue-autoNumeric v{{ version }}</a> |
6 | | - <span class="with">with <a :href="`https://github.com/autoNumeric/autoNumeric/releases/tag/v${autoNumericVersion}`" class="white no-underline underline-hover">autoNumeric {{ autoNumericVersion }}</a></span> |
| 6 | + <span class="with">with <a :href="`https://github.com/autoNumeric/autoNumeric/releases/tag/${autoNumericVersion}`" class="white no-underline underline-hover">autoNumeric {{ autoNumericVersion }}</a></span> |
7 | 7 | </div> |
8 | 8 | <div class="flex-none"> |
9 | 9 | <a href="https://github.com/autoNumeric/vue-autoNumeric" rel="noopener" target="_blank" title="View on Github"> |
|
114 | 114 | v-model="autoNumericModel" |
115 | 115 | /> |
116 | 116 | </div> |
| 117 | + |
| 118 | + <div :class="boxClasses" :style="boxStyle"> |
| 119 | + <div :class="labelClasses">The `options` attribute can be modified <i>on the fly</i>. Click <span class="repoLink" @click="optionsToggle = !optionsToggle">here</span> to toggle it.</div> |
| 120 | + <vue-autonumeric |
| 121 | + :options="options" |
| 122 | + placeholder="This is the placeholder" |
| 123 | + v-model="autoNumericModel" |
| 124 | + /> |
| 125 | + </div> |
117 | 126 | </div> |
118 | 127 | </div> |
119 | 128 | </div> |
|
132 | 141 |
|
133 | 142 | data() { |
134 | 143 | return { |
135 | | - autoNumericModel : 221456.72, // Default value for the examples |
136 | | - anModel : 42.01, |
| 144 | + autoNumericModel: 221456.72, // Default value for the examples |
| 145 | + anModel : 42.01, |
| 146 | + optionsToggle : true, |
137 | 147 | }; |
138 | 148 | }, |
139 | 149 |
|
|
172 | 182 | autoNumericVersion() { |
173 | 183 | return `v${AutoNumeric.version()}`; |
174 | 184 | }, |
| 185 | +
|
| 186 | + options() { |
| 187 | + if (this.optionsToggle) { |
| 188 | + return 'euro'; |
| 189 | + } |
| 190 | +
|
| 191 | + return 'dollar'; |
| 192 | + }, |
175 | 193 | }, |
176 | 194 | }; |
177 | 195 | </script> |
178 | 196 |
|
179 | 197 | <style lang="scss"> |
180 | 198 | $transitionShortDuration : 0.3s; |
| 199 | + $linkColor : #0094ff; |
| 200 | + $linkColorHover: #0068B7; |
181 | 201 |
|
182 | 202 | html, body { |
183 | 203 | font-family : 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; |
|
196 | 216 | } |
197 | 217 |
|
198 | 218 | .headerToolbar { |
199 | | - background-color: #0094ff; |
| 219 | + background-color: $linkColor; |
200 | 220 | } |
201 | 221 |
|
202 | 222 | .flex-fill { |
|
246 | 266 |
|
247 | 267 | .repoLink { |
248 | 268 | text-decoration: none; |
249 | | - color : #0094ff; |
| 269 | + color : $linkColor; |
| 270 | + cursor : pointer; |
250 | 271 |
|
251 | 272 | &:hover { |
252 | 273 | text-decoration: underline; |
253 | | - color : #0068B7; |
| 274 | + color : $linkColorHover; |
254 | 275 | } |
255 | 276 | } |
256 | 277 | </style> |
0 commit comments