vue拖拽样式记录

拖拽通用样式记录

html 复制代码
   <draggable
      :list="fields"
      :animation="300"
      :delay="10"
      :force-fallback="true"
      drag-class="dragClass"
      fallback-class="fallbackClass"
      chosen-class="chosenClass"
      ghost-class="ghostClass"
      class="flex flex-1 w-full"
    ></draggable>
css 复制代码
<style scoped>
.drag-icon,
.delete-icon {
  cursor: pointer;
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-position: center;
}

.drag-icon {
  background-image: url('./images/drag-icon.png');
  background-size: 100% 100%;
}

.delete-icon {
  background-image: url('./images/close.png');
  background-size: 100% 100%;
}

/* 拖动排序样式 */
.dragClass {
  opacity: 1;
}

.fallbackClass {
  opacity: 1;
}

.chosenClass {
  opacity: 0.96 !important;
}

.ghostClass {
  opacity: 0.7 !important;
}
</style>
相关推荐
哆啦A梦15881 小时前
搜索页面布局
前端·vue.js·node.js
_院长大人_2 小时前
el-table-column show-overflow-tooltip 只能显示纯文本,无法渲染 <p> 标签
前端·javascript·vue.js
SevgiliD2 小时前
el-table中控制单列内容多行超出省略及tooltip
javascript·vue.js·elementui
要加油哦~2 小时前
JS | 知识点总结 - 原型链
开发语言·javascript·原型模式
哆啦A梦15883 小时前
axios 的二次封装
前端·vue.js·node.js
阿珊和她的猫3 小时前
深入理解与手写发布订阅模式
开发语言·前端·javascript·vue.js·ecmascript·状态模式
yinuo3 小时前
一行 CSS 就能搞定!用 writing-mode 轻松实现文字竖排
前端
snow@li4 小时前
html5:拖放 / demo / 拖放事件(Drag Events)/ DataTransfer 对象方法
前端·html·拖放
爱看书的小沐4 小时前
【小沐杂货铺】基于Three.js渲染三维风力发电机(WebGL、vue、react、WindTurbine)
javascript·vue.js·webgl·three.js·opengl·风力发电机·windturbine
qq_398586544 小时前
Threejs入门学习笔记
javascript·笔记·学习