fix loading and apply issue
This commit is contained in:
1 parent
b55ace7c8e
commit
64678264bb
14 files changed
+104
-62
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-if="loading">
|
||||
<el-skeleton />
|
||||
<el-skeleton animated />
|
||||
</div>
|
||||
<div v-else-if="documents" class="wrapper">
|
||||
<document-list-item
|
||||
@@ -64,9 +64,3 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.wrapper {
|
||||
padding: 20px 0;
|
||||
}
|
||||
</style>
|
||||
@@ -1,10 +1,14 @@
|
||||
<template>
|
||||
<div v-if="document.type === documentType.TEXT" class="item" @click="onClick">
|
||||
<div v-if="document.type === documentType.TEXT" :class="{ item: true, active: id === document?.id }" @click="onClick">
|
||||
<el-link type="primary" class="link" :underline="false">
|
||||
<span class="name">{{ document?.title }}</span>
|
||||
</el-link>
|
||||
</div>
|
||||
<div v-else-if="document.type === documentType.API" class="item" @click="onClick">
|
||||
<div
|
||||
v-else-if="document.type === documentType.API"
|
||||
:class="{ item: true, active: id === document?.id }"
|
||||
@click="onClick"
|
||||
>
|
||||
<el-link type="primary" class="link" :underline="false">
|
||||
<span class="name">{{ document?.title || document?.api?.title }}</span>
|
||||
</el-link>
|
||||
@@ -37,6 +41,11 @@ export default defineComponent({
|
||||
documentType: IDocumentType
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
id() {
|
||||
return this.$route.params?.id?.toString();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
this.$router.push({
|
||||
@@ -55,16 +64,23 @@ $height: 35px;
|
||||
.item {
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
padding-left: 5px;
|
||||
padding-left: 10px;
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
border-left: 3px solid transparent;
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
&.active {
|
||||
border-left: 3px solid var(--el-color-primary);
|
||||
}
|
||||
|
||||
.link {
|
||||
color: #333;
|
||||
.name {
|
||||
|
||||
Reference in new issue
Block a user