If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).
Example below explains implications for different implementations.
| <template> | |
| <div id="demo"> | |
| <h1>Latest Vue.js Commits</h1> | |
| <template v-for="branch in branches"> | |
| <input type="radio" | |
| :id="branch" | |
| :value="branch" | |
| name="branch" | |
| v-model="currentBranch"> | |
| <label :for="branch">{{ branch }}</label> |
| import { line, curve, curveCatmullRom } from "d3-shape"; | |
| import { scaleTime, scaleLinear } from "d3-scale"; | |
| import { axisBottom, axisLeft } from 'd3-axis'; | |
| import { timeParse, isoFormat } from "d3-time-format"; | |
| import { select } from "d3-selection"; | |
| import { extent, max, min } from "d3-array"; | |
| export default { | |
| line: line, | |
| scaleTime: scaleTime, |
| // Inspired by this post from CSS-Tricks. | |
| // http://css-tricks.com/snippets/css/less-mixin-for-rem-font-sizing/ | |
| // | |
| // Plays nice with compass/typography/vertical_rhythm | |
| // http://compass-style.org/reference/compass/typography/vertical_rhythm/ | |
| // | |
| // Calculates font size in `rem` (root em). | |
| // | |
| // Relative values depends on $base-font-size. Pixle value for font-size depends | |
| // on $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 |
| # ~/.osx — http://mths.be/osx | |
| ############################################################################### | |
| # General UI/UX # | |
| ############################################################################### | |
| # Menu bar: disable transparency | |
| defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false | |
| # Disable the “Are you sure you want to open this application?” dialog |