All Projects → cmllr → vue-editable

cmllr / vue-editable

Licence: MIT, Unknown licenses found Licenses found MIT LICENSE Unknown LICENSE_HEADER.txt
In-place editing for Vue.js 2.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to vue-editable

lavas-cnode
A PWA for cnodejs.org written by Baidu-Lavas.
Stars: ✭ 13 (-18.75%)
Mutual labels:  vue2
ember-x-editable
X-editable like library for Ember
Stars: ✭ 21 (+31.25%)
Mutual labels:  x-editable
there-are-lots-of-people-in-Baiyun-airport
挑战杯 - 广州白云机场人流量时空分布预测系统 - 前端
Stars: ✭ 14 (-12.5%)
Mutual labels:  vue2
vue-unstated
A tiny state management library for Vue Composition API.
Stars: ✭ 30 (+87.5%)
Mutual labels:  vue2
vue-split-carousel
a carousel component for vue, meanwhile display several carousel item
Stars: ✭ 37 (+131.25%)
Mutual labels:  vue2
vue-ckeditor
✏️ Vue2.0 Ckeditor component.
Stars: ✭ 17 (+6.25%)
Mutual labels:  vue2
vue-flag-icon
a vue compoment for flag-icon-css
Stars: ✭ 64 (+300%)
Mutual labels:  vue2
vue-identify-network
⚡ Identify what kinda internet your users are using!
Stars: ✭ 60 (+275%)
Mutual labels:  vue2
vue-code-view
A Vue 2 component like Vue SFC REPL `@vue/repl` : u can edit, run and preview the code effect display in real time on the web page.
Stars: ✭ 67 (+318.75%)
Mutual labels:  vue2
vue-music
基于Laravel5.3+Vue2.0的网易云音乐的SPA应用
Stars: ✭ 85 (+431.25%)
Mutual labels:  vue2
ic-firebase-uploader
This component is a multi-file uploader for firebase
Stars: ✭ 21 (+31.25%)
Mutual labels:  vue2
element-ui-demo
A element-ui admin base on vue2
Stars: ✭ 18 (+12.5%)
Mutual labels:  vue2
vue-taobao
基于 vue2 + vuex + mint-ui 构建一个单页面应用
Stars: ✭ 19 (+18.75%)
Mutual labels:  vue2
element-schema-form
A schema-based element-ui form component for Vue2.x.
Stars: ✭ 31 (+93.75%)
Mutual labels:  vue2
vue2-loading
vue-loading presented in Vue2
Stars: ✭ 15 (-6.25%)
Mutual labels:  vue2
icmpmon
A simple ICMP monitor with web interface.
Stars: ✭ 33 (+106.25%)
Mutual labels:  vue2
firefly
Firefly is a mobile wallet for Stellar ecosystem
Stars: ✭ 54 (+237.5%)
Mutual labels:  vue2
vue-methods-promise
Let Vue methods support return Promise
Stars: ✭ 35 (+118.75%)
Mutual labels:  vue2
glue
Glue是一个基于web component构建的组件库,可以在react,vue2,vue3,angular和html等前端框架中运行
Stars: ✭ 63 (+293.75%)
Mutual labels:  vue2
mobile
Go语言中文网移动端版本,使用 Vue.js(2.x) 构建
Stars: ✭ 35 (+118.75%)
Mutual labels:  vue2

vue-editable

Build Status

In-place editing for Vue.js 2.

This plugin is still under active development. Do not use in production projects.

Bootstrap

  1. Include vue-editable.min.js and vue-editable.min.css from https://github.com/cmllr/vue-editable/releases
  2. Include the plugin via Vue.use(editable)

Core features

The directive v-editable=dataMember is the main directive. The attribute value is a existing property. If dataMember is a nested structure, simply use a foo.bar.barz-like syntax.

<label v-editable="message">{{ message }}</label> 

Danger ahead: Iterated edit

If you want to edit objects out of an loop, e. g. v-for, you have to inform the library what the given index of the object is.

For this purpose, you can use the data-index attribute. Note the : just before the attribute's name!

:data-index="key"

If your array does contain objects, not scalar types (like number or string), you also have to attribute the property which should be edited. For this purpose, you can use the attribute data-property=name. Please note: There is no : before the attribute name.

data-property="customerName"

Attributes

If you want to control the display of the displayed input, e. g. with input type='number', you can do this with the suffix data-. E. g. type becomes data-type, the content remains the same.

Events

vm.$on(name,function(e){
    //do something
});

Event-Name e
editable-changed An object with members newValue and oldValue (dereferenced)
editable-opened the element which is currently edited
editable-aborted the element which should be edited

Type keeping

The library tries to guess the old value type and converts the new value according to the determined type. There is currently not settings for turning this on or off or in case of switching types, e. g. form int to float.

Problems

  • v-for expression do not work overall
  • not pretty at all
  • kinda buggy
  • no tests
  • options missing
  • ES6 compalibity unknown

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].