An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# vue-default-value

A Vue.js Directive to set a default value for editable elements with no affect to the model state.

[![NPM version](https://img.shields.io/npm/v/vue-default-value.svg?style=flat-square)](https://www.npmjs.com/package/vue-default-value)
![Bower version](https://img.shields.io/bower/v/vue-default-value.svg?style=flat-square)

## 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)