修改前端组件、后端添加jwt
This commit is contained in:
68
Yi.Vue/src/components/ccCombobox.vue
Normal file
68
Yi.Vue/src/components/ccCombobox.vue
Normal 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>
|
||||
@@ -113,7 +113,7 @@
|
||||
<script>
|
||||
import itemApi from "./TableApi.js";
|
||||
export default {
|
||||
name: "Tables",
|
||||
name: "ccTable",
|
||||
props: {
|
||||
defaultItem: {
|
||||
type: Object,
|
||||
43
Yi.Vue/src/components/ccTreeview.vue
Normal file
43
Yi.Vue/src/components/ccTreeview.vue
Normal 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>
|
||||
Reference in New Issue
Block a user