import { createApp } from "vue"; import App from "./App.vue"; import dragScroll from "drag-scroll-vue3"; const app = createApp(App); app.directive("drag-scroll", dragScroll); app.mount("#app");<your-component-w
使用element-plus在页面里写一个表格,表格有横向和竖向滚动条,想实现表格可以鼠标拖拽滚动。 可以用vue3-dragscroll来实现,首先需要在css里隐藏掉表格的滚动条,将表格的父级设置固定的宽高,并在父级标签上增加v-dragscroll指令。 <template> <el-table :data="rowData" border :show-header="false" table-layou...
指令代码如下: import Vue from 'vue'Vue.directive('dragscroll', function (el) { el.onmousedown = function (ev) { console.log(el) const disX = ev.clientX const disY = ev.clientY const originalScrollLeft = el.scrollLeft const originalScrollTop = el.scrollTop const originalScrollBehavior = el...
A directive to make a scrollable element scroll by draging to the scroll direction - vue3-dragscroll/index.html at master · Aseisman/vue3-dragscroll
import Vue3Dragscroll from 'vue3-dragscroll' Vue.use(VueDragscroll) ``` ## Usage Add the `v-dragscroll` directive to a scrollable element: ```html Big text goes here... ``` ## Installation ### npm ```sh $ npm install vue3-dragscroll ``` Then, in your JavaScript file: ```...
dragScroll: false, headerToolbar: { left: null, center: 'prev,title,next', right: null }, initialView: 'timeGridWeek',// 默认为那个视图(月:dayGridMonth,周:timeGridWeek,日:timeGridDay) allDaySlot:false,//是否显示日历上方的allDay dayMaxEvents: true,// allow "more" link when too many ev...
a dragscroll directive for vue3; to make a scrollable element scroll by draging to the scroll direction vue vue3 vue-dragscroll vue3-dragscroll scroll drag cargoxda• 1.0.2 • 3 years ago • 2 dependents • MITpublished version 1.0.2, 3 years ago2 dependents licensed under $MIT 759...
dragScroll : true, //是否在拖拽时自动移动容器,默认true eventOverlap : true, //拖拽时是否重叠 eventConstraint : { //限制拖拽拖放的位置(即限制有些地方拖不进去):an event ID, "businessHours", object start: '10:00', // a start time (10am in this example) ...
const onDragScroll = (payload: number) => { if (isShowingScrollbarX.value) { injectedValueFromRoot!.viewport.value!.scrollLeft = getScrollPosition( rootContext!.viewport.value!.scrollLeft = getScrollPosition( payload, injectedValueFromRoot!.dir rootContext!.dir?.value ); } else { injectedValueFro...
Repository files navigation README Vue-portfolio Demo page: https://weichieh123.github.io/Vue-portfolio-v2/AboutVue3個人作品集 Topicsjavascript portfolio vue scss rwd vue3 vue-dragscroll element-plus ResourcesReadme Activity Stars0 stars Watchers...