From 2ae9ff51984ab305f81e8e7e24829ac3093c6af1 Mon Sep 17 00:00:00 2001 From: ColorWhiteDeveloper <2632970487@qq.com> Date: 星期一, 19 九月 2022 13:35:42 +0800 Subject: [PATCH] 封装axios请求 --- src/views/systemSetting/baseSetting/user/index.vue | 44 ++++++++++++++++++++++++++++++++++++++------ 1 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/views/systemSetting/baseSetting/user/userList/index.vue b/src/views/systemSetting/baseSetting/user/index.vue similarity index 76% rename from src/views/systemSetting/baseSetting/user/userList/index.vue rename to src/views/systemSetting/baseSetting/user/index.vue index 1a3b79f..f559c55 100644 --- a/src/views/systemSetting/baseSetting/user/userList/index.vue +++ b/src/views/systemSetting/baseSetting/user/index.vue @@ -8,7 +8,10 @@ <el-input placeholder="璇疯緭鍏ュ唴瀹�"></el-input> </div> <div class="addUser"> - <el-button type="primary">娣诲姞鐢ㄦ埛</el-button> + <el-button type="primary" @click="dialogVisible = true">娣诲姞鐢ㄦ埛</el-button> + <el-dialog :visible.sync="dialogVisible" width="45%"> + <createUser /> + </el-dialog> </div> </div> </header> @@ -45,8 +48,13 @@ </el-table-column> <el-table-column prop="operation" label="鎿嶄綔" width="246"> <template slot-scope="scope"> - <el-button size="mini">缂栬緫</el-button> - <el-button size="mini" type="danger">鍒犻櫎</el-button> + <div class="operation"> + <span>淇敼瑙掕壊</span> + <span>鏌ョ湅</span> + <span>淇敼瀵嗙爜</span> + <span>鍒犻櫎</span> + <span>淇敼閮ㄩ棬</span> + </div> </template> </el-table-column> </el-table> @@ -55,7 +63,11 @@ </div> </template> <script> +import createUser from "./createUser" export default { + components:{ + createUser + }, data() { return { tableData: [ @@ -66,9 +78,18 @@ role: '瓒呯骇绠$悊鍛�', is_open: true, } - ] + ], + dialogVisible:false, } }, + created(){ + // 鑾峰彇褰撳墠鐢ㄦ埛鐧诲綍淇℃伅 + this.$axios.get( + 'sccg/admin/info' + ).then(res=>{ + console.log(res); + }) + } } </script> <style lang="scss" scoped> @@ -112,12 +133,23 @@ background-color: #fff; margin-top: 20px; padding: 0 10px; - + padding-bottom: 50px; .mainTitle { line-height: 60px; } - .el-table{ + + .el-table { font-size: 10px; + + .operation { + display: flex; + justify-content: space-around; + color: #0079fe; + + span:hover { + cursor: pointer; + } + } } } } -- Gitblit v1.8.0