feat: 底部导航组件为固定页面底部,无需拖拽调整位置

This commit is contained in:
王奥斯
2022-01-24 11:39:09 +08:00
parent 48ec8024f2
commit b52b5f35ac
2 changed files with 18 additions and 3 deletions
+6 -1
View File
@@ -46,7 +46,7 @@ export default {
top: 0; top: 0;
} }
/* // 页面切换动画 */ // 页面切换动画
.fade-enter-active { .fade-enter-active {
transition: all 1.5s ease; transition: all 1.5s ease;
} }
@@ -64,4 +64,9 @@ export default {
.el-message-box.JSONView { .el-message-box.JSONView {
width: 1100px; width: 1100px;
} }
// 提示样式
.Prompt{
font-size: 12px; color: #969799; margin-bottom: 10px
}
</style> </style>
@@ -2,11 +2,15 @@
<div class="componenManagement"> <div class="componenManagement">
<!-- 标题 --> <!-- 标题 -->
<h2>组件设置</h2> <h2>组件设置</h2>
<p class="Prompt">底部导航组件为固定页面底部无需拖拽调整位置</p>
<!-- 拖拽 --> <!-- 拖拽 -->
<vuedraggable v-model="data" v-bind="dragOptions"> <vuedraggable v-model="data" v-bind="dragOptions">
<transition-group> <transition-group>
<div v-for="(item, ind) in data" :key="item.text + ind" class="item"> <div
v-for="(item, ind) in data"
:key="item.text + ind"
:class="item.text == '底部导航' ? 'item delDragitem' : 'item'"
>
<p> <p>
<i class="el-icon-s-grid" style="margin-right: 15px" />{{ <i class="el-icon-s-grid" style="margin-right: 15px" />{{
item.text item.text
@@ -42,6 +46,8 @@ export default {
data: this.datas, data: this.datas,
dragOptions: { dragOptions: {
animation: 200, animation: 200,
// class是 delDragitem 禁止拖拽
filter: '.delDragitem',
}, },
} }
}, },
@@ -102,5 +108,9 @@ export default {
color: #999; color: #999;
} }
} }
.delDragitem {
background-color: rgba(10, 42, 97, 0.2);
cursor: no-drop;
}
} }
</style> </style>