修改前端组件、后端添加jwt

This commit is contained in:
橙子
2021-10-14 20:29:07 +08:00
parent 40f34618a2
commit 9ce9d4ed98
17 changed files with 407 additions and 208 deletions

View File

@@ -0,0 +1,68 @@
<template>
<v-dialog v-model="dialog" persistent max-width="600px">
<template v-slot:activator="{ on, attrs }">
<v-btn color="primary" dark v-bind="attrs" v-on="on">
{{ headers }}
</v-btn>
</template>
<v-card>
<v-card-title>
<span class="text-h5">{{ headers }}</span>
</v-card-title>
<v-card-text>
<v-container>
<v-row>
<v-col cols="12">
<v-combobox
v-model="select"
:items="items"
label="请点击选择"
multiple
chips
:item-text="itemText"
></v-combobox>
</v-col>
</v-row>
</v-container>
<small>*可多选</small>
</v-card-text>
<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>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
export default {
props: {
headers: {
type: String
},
items:{
type:Array
},
itemText:{
type: String
}
},
name: "ccCombobox",
data() {
return {
dialog: false,
select: [],
};
},
watch:{
select:{//深度监听,可监听到对象、数组的变化
handler(val, oldVal){
this.$emit("select",val);
},
deep:true
}
},
};
</script>

View File

@@ -113,7 +113,7 @@
<script>
import itemApi from "./TableApi.js";
export default {
name: "Tables",
name: "ccTable",
props: {
defaultItem: {
type: Object,

View File

@@ -0,0 +1,43 @@
<template>
<v-treeview
selectable
:items="items"
:selection-type="selectionType"
v-model="selection"
return-object
open-all
hoverable
item-text="menu_name"
>
<template v-slot:append="{ item }">
<v-btn>{{ item.id }}</v-btn>
<v-btn>设置接口权限</v-btn>
</template>
</v-treeview>
</template>
<script>
export default {
name: "ccTreeview",
props: {
items: {
type: Array,
},
},
data: () => ({
selectionType: "leaf",
selection: [],
}),
watch:{
selection:{//深度监听,可监听到对象、数组的变化
handler(val, oldVal){
this.$emit("selection",val);
},
deep:true
}
},
methods:{
}
};
</script>