https://github.com/termosa/vue-default-value
Vue.js 2.x directive to set a default value for editable elements with no affect to the model state
https://github.com/termosa/vue-default-value
Last synced: 3 months ago
JSON representation
Vue.js 2.x directive to set a default value for editable elements with no affect to the model state
- Host: GitHub
- URL: https://github.com/termosa/vue-default-value
- Owner: termosa
- License: mit
- Created: 2017-01-31T23:14:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-16T16:03:20.000Z (over 8 years ago)
- Last Synced: 2024-04-24T00:02:09.965Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 16
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-vue - vue-default-value - Vue.js 2.x directive to set a default value for editable elements with no affect to the model state (Components & Libraries / UI Components)
- awesome-vue-refactor - vue-default-value
- awesome-vue-zh - Vue默认值 - Vue.js 2.x指令,用于为可编辑元素设置默认值,而不影响模型状态 (UI组件 / 形成)
- awesome-vue - vue-default-value - Vue.js 2.x directive to set a default value for editable elements with no affect to the model state (UI Components / Form)
README
# vue-default-value
A Vue.js Directive to set a default value for editable elements with no affect to the model state.
[](https://www.npmjs.com/package/vue-default-value)

## Installation
### Via NPM
Install the package
```bash
$ npm install vue-default-value
```
and require it in the code
```js
var Vue = require('vue');
var VueDefaultValue = require('vue-default-value');
Vue.use(VueDefaultValue);
```
### Via Bower
Install the package
```bash
$ bower install vue-default-value
```
add script on page
```html
Vue.use(VueDefaultValue);
```
or you can do it with [RequireJS](http://requirejs.org/) or any similar tool.
## Usage
The directive can be used with any element that has value attribute.
```js
Username:
```
## License
MIT © [Stanislav Termosa](https://github.com/termosa)