增加 新建资料库
This commit is contained in:
parent
7ad7251b53
commit
56aff9312d
@ -4,10 +4,6 @@
|
|||||||
<div v-else>
|
<div v-else>
|
||||||
<h1>资料库</h1>
|
<h1>资料库</h1>
|
||||||
|
|
||||||
<!-- <div>
|
|
||||||
{{ selected_ids }}
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<v-btn
|
<v-btn
|
||||||
@click="selectAll"
|
@click="selectAll"
|
||||||
:color="selected_ids.length > 0 ? 'primary' : ''"
|
:color="selected_ids.length > 0 ? 'primary' : ''"
|
||||||
@ -37,6 +33,37 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
|
<v-btn :loading="creatingLibrary" class="ml-2"
|
||||||
|
>新建资料库
|
||||||
|
|
||||||
|
<v-dialog
|
||||||
|
v-model="showCreateLibraryDialog"
|
||||||
|
activator="parent"
|
||||||
|
width="auto"
|
||||||
|
>
|
||||||
|
<v-card>
|
||||||
|
<v-text-field
|
||||||
|
v-model="newLibraryName"
|
||||||
|
label="资料库名称"
|
||||||
|
required
|
||||||
|
hide-details
|
||||||
|
></v-text-field>
|
||||||
|
|
||||||
|
<v-card-actions>
|
||||||
|
<v-btn @click="showCreateLibraryDialog = false">取消</v-btn>
|
||||||
|
|
||||||
|
<v-btn
|
||||||
|
color="primary"
|
||||||
|
@click="newLibrary"
|
||||||
|
:loading="creatingLibrary"
|
||||||
|
>新建</v-btn
|
||||||
|
>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card>
|
||||||
|
</v-dialog>
|
||||||
|
</v-btn>
|
||||||
|
|
||||||
<v-card class="mt-3">
|
<v-card class="mt-3">
|
||||||
<v-list>
|
<v-list>
|
||||||
<v-list-item
|
<v-list-item
|
||||||
@ -195,11 +222,27 @@ function deleteSelected() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const creatingLibrary = ref(false)
|
const showCreateLibraryDialog = ref(false);
|
||||||
|
const creatingLibrary = ref(false);
|
||||||
|
const newLibraryName = ref("");
|
||||||
|
|
||||||
// function newLibrary(name) {
|
function newLibrary() {
|
||||||
// creatingLibrary.value = true
|
if (newLibraryName.value == "") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// library.librariesPost(name).then
|
creatingLibrary.value = true;
|
||||||
// }
|
|
||||||
|
library
|
||||||
|
.librariesPost(newLibraryName.value)
|
||||||
|
.then(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
showCreateLibraryDialog.value = false;
|
||||||
|
creatingLibrary.value = false;
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
load();
|
||||||
|
}, 250);
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user