日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

vue 封装dialog_element-dialog封装成子组件

發布時間:2023/11/27 生活经验 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 vue 封装dialog_element-dialog封装成子组件 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

移除

{{Edit}}

import UserEditfrom "./UserEdit-dialog.vue";

import updatefrom ‘./Update.vue‘exportdefault{

methods: {

deleteRow(index, rows) {

rows.splice(index,1);

}

},

data() {return{

Edit:"編輯",

pagesize:5, //每頁的數據條數

currentPage: 1, //默認開始頁面

show: false,

shows:false,

mydata:{},

SkipCount:5,

MaxResultCount:10,

actions: [

[

{

id:"New",

type:"primary",

text:"New",

icon:"fa fa-plus"},

{

id:"Refresh",

type:"success",

text:"Refresh",

icon:"fa fa-refresh"}

]

],

tableData4: []

};

},

components: {

UserEdit,

datatablepaging,

update

},

methods: {

open() {this.show = true;

},

opens(){this.shows = true;

},

created: function() {this.total = this.tableData4.length;

},

current_change: function(currentPage) {this.currentPage =currentPage;

},

handleClick(id) {switch(id) {case "New":this.AddUser();break;case "Refresh":this.Refresh();break;default:break;

}

},

AddUser() {this.open();

},

Refresh() {this.getuser();

},

getuser() {this.$http

.get("/api/services/app/Userinfro/GetUserinofor?MaxResultCount=" +

this.MaxResultCount

)

.then(result=>{this.tableData4 =result.data.result.items;//console.log(result.data.result.items);

})

.catch(err =>{

console.log(err);

});

},

sexTypes(row, column) {if (row.sexType == 1) {return "男";

}else{return "女";

}

},

Getlevel(row, column) {if (row.integral >= 300 && row.integral < 600) {return "白銀";

}if (row.integral >= 600 && row.integral < 900) {return "黃金";

}if (row.integral >= 900 && row.integral < 1200) {return "鉑金";

}if (row.integral >= 1200) {return "鉆石";

}

},

deleteRow(row) {this.$confirm("此操作將永久刪除該用戶, 是否繼續?", "提示", {

confirmButtonText:"確定",

cancelButtonText:"取消",

type:"warning"}).then(()=>{

console.log(row.id);this.$http

.delete("/api/services/app/Userinfro/DeleteUserByid?Id=" +row.id)

.then(result=>{this.$message({

type:"success",

message:"刪除成功!"});this.getuser();

})

.catch(err =>{

console.log(err);

});

});

},

EditClick(data) {this.opens();//console.log(data)

this.mydata=data;

},

handleSizeChange(size){this.pagesize=size;

},

handleCurrentChange(currentPage)

{this.currentPage=currentPage;

}

},

created() {this.getuser();

}

};

padding-top: 12px;

}

總結

以上是生活随笔為你收集整理的vue 封装dialog_element-dialog封装成子组件的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。