医生站-患者列表

This commit is contained in:
Zhang.YC
2025-03-28 17:47:45 +08:00
parent 485c649686
commit 06fd548447
19 changed files with 1896 additions and 20 deletions

View File

@@ -0,0 +1,20 @@
// 表格上滑滚轮滚动条横向滚动,在只有横向滚动条时使用
export default {
mounted: (el) => {
const container = el.querySelector('.el-scrollbar__wrap')
if (!container) return
const handleWheel = (e) => {
// 组织默认事件
e.preventDefault()
const delta = e.deltaY || e.detail || (-e.wheelDelta)
container.scrollLeft += delta * 0.6
}
container.addEventListener('wheel', handleWheel, { passive: false })
el._horizontalScrollCleanup = () => container.removeEventListener('wheel', handleWheel)
},
unmounted: (el) => {
el._horizontalScrollCleanup?.()
}
}

View File

@@ -1,9 +1,11 @@
import hasRole from './permission/hasRole'
import hasPermi from './permission/hasPermi'
import copyText from './common/copyText'
import horizontalScroll from './common/horizontalScroll'
export default function directive(app){
app.directive('hasRole', hasRole)
app.directive('hasPermi', hasPermi)
app.directive('copyText', copyText)
app.directive('horizontal-scroll', horizontalScroll)
}