Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new record button #16

Closed
wmjie opened this issue Dec 21, 2015 · 2 comments
Closed

add new record button #16

wmjie opened this issue Dec 21, 2015 · 2 comments
Labels

Comments

@wmjie
Copy link

wmjie commented Dec 21, 2015

i want add new record, how i can do ? thx

@matfish2
Copy link
Owner

I suppose you mean the client side component.
Simply push the record to the original array. Vue will do the rest.
e.g:

<button @click="addRecord()">Add Record</button>

in your methods:

addRecord: function() {
    this.tableData.push({id:100, title:"New Record"});
}

@wmjie
Copy link
Author

wmjie commented Dec 22, 2015

thx :+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants