Edit in place for VueJS
https://mihnsen.github.io/vue-inline-editable/
npm install vue-inline-editable
or
yarn add vue-inline-editable
import VueInlineEditable from 'vue-inline-editable';
// Use it
VueInlineEditable(
type="text",
v-model="name",
)
// Or list
VueInlineEditable(
type="textarea",
label="Edit me",
resource="user",
field="username",
pk="1",
placement="popup"
v-model="name",
)
// CSS
@import '~vue-inline-editable/src/assets/scss/index'
Props | Required | Default | Description |
---|---|---|---|
v-model | Yes | Null | Vue Model |
type | Yes | text | Field type |
placeholder | Yes | Placeholder text | |
empty-value | Yes | Text when empty | |
label | No | Null | Form label |
resource | No | Null | Resource in data model, ex: user_table |
field | No | Null | Field in data model, ex: username |
pk | No | Null | Primary key in model, ex: user has id = 1 |
placement | No | 'inline' | Show editable as inline or popover |
yarn install
yarn run serve
yarn run build
yarn run test
yarn run lint
yarn run test:unit