A Vue.js Directive to set a default value for editable elements with no affect to the model state.
Install the package
$ npm install vue-default-value
and require it in the code
var Vue = require('vue');
var VueDefaultValue = require('vue-default-value');
Vue.use(VueDefaultValue);
Install the package
$ bower install vue-default-value
add script on page
<script src="/bower_components/vue-default-value/dist/vue-default-value.js"></script>
<script>Vue.use(VueDefaultValue);</script>
or you can do it with RequireJS or any similar tool.
The directive can be used with any element that has value attribute.
Username: <input v-model="username" v-default-value="'Guest'" />
MIT © Stanislav Termosa