|
@@ -2,10 +2,10 @@
|
|
|
<div class="side-catalog-wrap">
|
|
|
<el-scrollbar class="side-catalog-box">
|
|
|
<div
|
|
|
- v-for="(com,index) in componentList"
|
|
|
+ v-for="(com, index) in componentList"
|
|
|
:key="index"
|
|
|
class="component-item-box"
|
|
|
- :class="{'active-catalog':activeType === com.type}"
|
|
|
+ :class="{ 'active-catalog': activeType === com.type }"
|
|
|
@click="componentHandle(com)"
|
|
|
>
|
|
|
{{ com.name }}
|
|
@@ -16,7 +16,7 @@
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
- components: { },
|
|
|
+ components: {},
|
|
|
data () {
|
|
|
return {
|
|
|
componentList: [
|
|
@@ -40,7 +40,9 @@ export default {
|
|
|
const type = this.$route?.query?.type
|
|
|
if (type) {
|
|
|
this.activeType = type
|
|
|
- this.$emit('getPageInfo', type)
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$emit('getPageInfo', type)
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -53,9 +55,38 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
- @import '~packages/assets/style/bsTheme.scss';
|
|
|
- .side-catalog-wrap {
|
|
|
- .component-item-box {
|
|
|
+@import '~packages/assets/style/bsTheme.scss';
|
|
|
+
|
|
|
+.side-catalog-wrap {
|
|
|
+ .component-item-box {
|
|
|
+ width: 100%;
|
|
|
+ padding: 8px 16px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.side-catalog-wrap {
|
|
|
+ padding-top: 16px;
|
|
|
+ width: 220px;
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ color: var(--bs-el-title);
|
|
|
+ background-color: var(--bs-background-2);
|
|
|
+
|
|
|
+ .side-catalog-box {
|
|
|
+ height: calc(100% - 50px);
|
|
|
+ overflow-y: auto;
|
|
|
+
|
|
|
+ .side-catalog-all {
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .side-catalog-item {
|
|
|
width: 100%;
|
|
|
padding: 8px 16px;
|
|
|
display: flex;
|
|
@@ -64,87 +95,76 @@ export default {
|
|
|
&:hover {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
- .side-catalog-wrap{
|
|
|
- padding-top: 16px;
|
|
|
- width: 220px;
|
|
|
- height: 100%;
|
|
|
- box-sizing: border-box;
|
|
|
- color: var(--bs-el-title);
|
|
|
- background-color: var(--bs-background-2);
|
|
|
- .side-catalog-box{
|
|
|
- height: calc(100% - 50px);
|
|
|
- overflow-y: auto;
|
|
|
- .side-catalog-all{
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
- .side-catalog-item{
|
|
|
- width: 100%;
|
|
|
- padding: 8px 16px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- &:hover{
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- .el-icon-more{
|
|
|
- transform: rotate(90deg);
|
|
|
- color: var(--bs-el-title);
|
|
|
- font-weight: 400;
|
|
|
- }
|
|
|
- .active-icon-more{
|
|
|
- color:var(--bs-el-text);
|
|
|
- }
|
|
|
- .catalog-name{
|
|
|
- overflow:hidden;
|
|
|
- white-space: nowrap;
|
|
|
- text-overflow: ellipsis;
|
|
|
- -o-text-overflow:ellipsis;
|
|
|
- }
|
|
|
- .page-list-dropdown{
|
|
|
- opacity: 0;
|
|
|
- }
|
|
|
- .dropdown-show{
|
|
|
- opacity: 1;
|
|
|
- }
|
|
|
+
|
|
|
+ .el-icon-more {
|
|
|
+ transform: rotate(90deg);
|
|
|
+ color: var(--bs-el-title);
|
|
|
+ font-weight: 400;
|
|
|
}
|
|
|
- /*菜单激活时的样式*/
|
|
|
- .active-catalog{
|
|
|
- background-image: linear-gradient(to right , var(--bs-el-color-primary), var(--bs-background-2));
|
|
|
- background-repeat: round;
|
|
|
+
|
|
|
+ .active-icon-more {
|
|
|
color: var(--bs-el-text);
|
|
|
}
|
|
|
- }
|
|
|
- .add-catalog-box{
|
|
|
- padding: 10px 0;
|
|
|
- box-sizing: border-box;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- border-radius: 10px;
|
|
|
- margin: 0 8px;
|
|
|
- &:hover{
|
|
|
- background-color: var(--bs-background-1);
|
|
|
- cursor: pointer;
|
|
|
- color: var(--bs-el-text);;
|
|
|
+
|
|
|
+ .catalog-name {
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ -o-text-overflow: ellipsis;
|
|
|
}
|
|
|
- .el-icon-plus{
|
|
|
- padding: 0 5px;
|
|
|
+
|
|
|
+ .page-list-dropdown {
|
|
|
+ opacity: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .dropdown-show {
|
|
|
+ opacity: 1;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /*菜单激活时的样式*/
|
|
|
+ .active-catalog {
|
|
|
+ background-image: linear-gradient(to right, var(--bs-el-color-primary), var(--bs-background-2));
|
|
|
+ background-repeat: round;
|
|
|
+ color: var(--bs-el-text);
|
|
|
+ }
|
|
|
}
|
|
|
- .dropdown-menu-box{
|
|
|
- left: 50%;
|
|
|
- transform: translateX(-40%);
|
|
|
- width: 100px!important;
|
|
|
- /deep/.el-dropdown-menu__item{
|
|
|
- text-align: center;
|
|
|
- padding: 5px;
|
|
|
+
|
|
|
+ .add-catalog-box {
|
|
|
+ padding: 10px 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ border-radius: 10px;
|
|
|
+ margin: 0 8px;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background-color: var(--bs-background-1);
|
|
|
+ cursor: pointer;
|
|
|
+ color: var(--bs-el-text);
|
|
|
+ ;
|
|
|
}
|
|
|
- /deep/.popper__arrow{
|
|
|
- left: 50% !important;
|
|
|
- transform: translateX(-50%) !important;
|
|
|
+
|
|
|
+ .el-icon-plus {
|
|
|
+ padding: 0 5px;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.dropdown-menu-box {
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-40%);
|
|
|
+ width: 100px !important;
|
|
|
+
|
|
|
+ /deep/.el-dropdown-menu__item {
|
|
|
+ text-align: center;
|
|
|
+ padding: 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.popper__arrow {
|
|
|
+ left: 50% !important;
|
|
|
+ transform: translateX(-50%) !important;
|
|
|
+ }
|
|
|
+}</style>
|