基本完善前端框架,发现后端bug

This commit is contained in:
橙子
2021-10-15 20:33:08 +08:00
parent 141987893e
commit cbfb19ade8
24 changed files with 352 additions and 318 deletions

View File

@@ -14,7 +14,6 @@
<v-row>
<v-col cols="12">
<v-combobox
v-model="select"
:items="items"
label="请点击选择"
@@ -30,7 +29,7 @@
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue darken-1" text @click="dialog = false"> 关闭 </v-btn>
<v-btn color="blue darken-1" text @click="dialog = false"> 保存 </v-btn>
<div @click="dialog = false"> <slot name="save" ></slot> </div>
</v-card-actions>
</v-card>
</v-dialog>

View File

@@ -86,6 +86,9 @@
<!-- 表格中的删除和修改 -->
<template v-slot:item.actions="{ item }">
<slot name="action" :item="item"></slot>
<v-icon
v-if="axiosUrls.hasOwnProperty('update')"
small
@@ -101,6 +104,8 @@
>
mdi-delete
</v-icon>
</template>
<!-- 初始化 -->
@@ -113,6 +118,7 @@
<script>
import itemApi from "./TableApi.js";
export default {
name: "ccTable",
props: {
defaultItem: {
@@ -125,7 +131,6 @@ export default {
type: Object,
},
},
data: () => ({
page: 1,
selected: [],
@@ -143,6 +148,12 @@ export default {
},
watch: {
selected:{
handler(val, oldVal){
this.$emit("selected",val);
},
deep:true
},
dialog(val) {
val || this.close();
}
@@ -200,7 +211,6 @@ export default {
itemApi
.delItemList(this.axiosUrls.del, Ids)
.then(() => this.initialize());
this.closeDelete();
},
close() {
this.dialog = false;

View File

@@ -7,13 +7,17 @@
return-object
open-all
hoverable
item-text="menu_name"
item-text="menu_name"
>
<template v-slot:append="{ item }">
<v-btn>{{ item.id }}</v-btn>
<v-btn>设置接口权限</v-btn>
</template>
<template v-slot:append="{ item }">
<v-btn>编号:{{ item.id }}</v-btn>
<v-btn>图标:{{ item.icon }}</v-btn>
<v-btn>路由:{{ item.router }}</v-btn>
<v-btn>设置接口权限</v-btn>
<v-btn>编辑</v-btn>
<v-btn>删除</v-btn>
<v-btn>添加子菜单</v-btn>
</template>
</v-treeview>
</template>
<script>
@@ -28,16 +32,15 @@ export default {
selectionType: "leaf",
selection: [],
}),
watch:{
selection:{//深度监听,可监听到对象、数组的变化
handler(val, oldVal){
this.$emit("selection",val);
},
deep:true
}
watch: {
selection: {
//深度监听,可监听到对象、数组的变化
handler(val, oldVal) {
this.$emit("selection", val);
},
deep: true,
},
},
methods:{
}
methods: {},
};
</script>