![](/img/trans.png)
[英]How can we make the user to edit and save the details in the profile page in vue.js + Laravel?
[英]How to make the profile page editable for users and i want to save those data after editing (vue.js + laravel)
我正在為一家公司制作一個 Web 應用程序,在個人資料頁面中,我希望用戶編輯詳細信息並添加更多詳細信息並保存它們。 我嘗試了很多方法,但它們不起作用
我希望用戶編輯這些我們在登錄后從數據庫中獲得的名字和姓氏
<v-dialog v-model="dialog">
<v-card>
<v-card-title>
<span class="headline">Edit User</span>
</v-card-title>
<v-card-text>
<v-container grid-list-md>
<v-layout wrap>
<v-flex xs12 sm6 md4>
<v-text-field v-model="user.firstName" label="First Name"></v-text-field>
</v-flex>
<v-flex xs12 sm6 md4>
<v-text-field v-model="user.lastName" label="Last Name"></v-text-field>
</v-flex>
</v-layout>
</v-container>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue darken-1" flat>Cancel</v-btn>
<v-btn color="blue darken-1" flat>Save</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
創建一個向某個端點發送 POST 請求並根據用戶編寫的內容更新數據的表單。
我們必須向后端發送一個 http 請求並使用響應保存數據。 有關更多詳細信息,請參閱本教程。 vuejs.org/v2/cookbook/using-axios-to-consume-apis.html
我已經使用這種方法
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.