vary-ui 3.21.42 → 3.21.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Loading-nxycvq_H.js → Loading-XwEhXCeF.js} +2 -2
- package/dist/{Wrap-CEMfsKoC.js → Wrap-C1bQRaFZ.js} +1 -1
- package/dist/lib/Button/Button.js +2 -2
- package/dist/lib/Card/Card.js +2 -2
- package/dist/lib/Checkbox/Checkbox.js +2 -2
- package/dist/lib/CheckboxGroup/CheckboxGroup.js +3 -3
- package/dist/lib/Confirm/Confirm.js +2 -2
- package/dist/lib/Date/Date.js +4 -4
- package/dist/lib/Dialog/Dialog.js +2 -2
- package/dist/lib/Divider/Divider.js +1 -1
- package/dist/lib/Field/Field.js +2 -2
- package/dist/lib/Form/Form.js +1 -1
- package/dist/lib/Input/Input.js +3 -3
- package/dist/lib/Link/Link.js +2 -2
- package/dist/lib/Loading/Loading.js +3 -3
- package/dist/lib/Menu/Menu.js +2 -2
- package/dist/lib/Message/Message.js +2 -2
- package/dist/lib/Pagination/Pagination.js +5 -5
- package/dist/lib/Popover/Popover.js +2 -2
- package/dist/lib/Radio/Radio.js +2 -2
- package/dist/lib/RadioGroup/RadioGroup.js +2 -2
- package/dist/lib/Scene/Scene.js +1 -1
- package/dist/lib/Scroll/Scroll.js +49 -50
- package/dist/lib/Select/Select.js +5 -5
- package/dist/lib/Skeleton/Skeleton.js +1 -1
- package/dist/lib/Tab/Tab.js +2 -2
- package/dist/lib/TabPanel/TabPanel.js +1 -1
- package/dist/lib/Table/Table.js +492 -234
- package/dist/lib/TableColumn/TableColumn.js +1 -1
- package/dist/vary-ui.css +1 -1
- package/dist/vary-ui.js +5 -5
- package/package.json +7 -2
- package/readme.md +21 -0
- /package/dist/{_plugin-vue_export-helper-D1CQUKz4.js → _plugin-vue_export-helper-BJcySfil.js} +0 -0
- /package/dist/{config-DGbx1IsI.js → config-DXP8G3TY.js} +0 -0
- /package/dist/{utils-U36LWLBY.js → utils-C1YOXhjB.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, onMounted, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from './config-
|
|
3
|
-
import { _ as _export_sfc } from './_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from './config-DXP8G3TY.js';
|
|
3
|
+
import { _ as _export_sfc } from './_plugin-vue_export-helper-BJcySfil.js';
|
|
4
4
|
|
|
5
5
|
var _a;
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from './_plugin-vue_export-helper-
|
|
2
|
+
import { _ as _export_sfc } from './_plugin-vue_export-helper-BJcySfil.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-DXP8G3TY.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
4
4
|
|
|
5
5
|
console.log(config);
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
package/dist/lib/Card/Card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, createVNode, createTextVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-DXP8G3TY.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, inject, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-DXP8G3TY.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, provide, createVNode } from 'vue';
|
|
2
|
-
import { i as isArray } from '../../utils-
|
|
2
|
+
import { i as isArray } from '../../utils-C1YOXhjB.js';
|
|
3
3
|
import Checkbox from '../Checkbox/Checkbox.js';
|
|
4
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
5
|
-
import '../../config-
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
5
|
+
import '../../config-DXP8G3TY.js';
|
|
6
6
|
|
|
7
7
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
props: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, createVNode, createApp, h } from 'vue';
|
|
2
2
|
import Button from '../Button/Button.js';
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
4
|
-
import '../../config-
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
4
|
+
import '../../config-DXP8G3TY.js';
|
|
5
5
|
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
props: {
|
package/dist/lib/Date/Date.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent, shallowRef, ref, reactive, watch, createVNode, createTextVNode } from 'vue';
|
|
2
|
-
import { n as now, e as isTime, g as isYear, h as isMonth, d as isDate, f as isDateTime } from '../../utils-
|
|
2
|
+
import { n as now, e as isTime, g as isYear, h as isMonth, d as isDate, f as isDateTime } from '../../utils-C1YOXhjB.js';
|
|
3
3
|
import Popover from '../Popover/Popover.js';
|
|
4
4
|
import Scroll from '../Scroll/Scroll.js';
|
|
5
5
|
import Link from '../Link/Link.js';
|
|
6
|
-
import { W as Wrap } from '../../Wrap-
|
|
7
|
-
import { c as config } from '../../config-
|
|
8
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
6
|
+
import { W as Wrap } from '../../Wrap-C1bQRaFZ.js';
|
|
7
|
+
import { c as config } from '../../config-DXP8G3TY.js';
|
|
8
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
9
9
|
|
|
10
10
|
const weeks = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
|
|
11
11
|
const months = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"].map((r, i) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, onMounted, onBeforeUnmount, createVNode, createTextVNode } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
props: {
|
|
@@ -47,7 +47,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
open.value = v;
|
|
48
48
|
_emit(v ? "open" : "close");
|
|
49
49
|
_emit("change", v);
|
|
50
|
-
if (_props.lockScroll) {
|
|
50
|
+
if (_props.lockScroll && typeof window === "object") {
|
|
51
51
|
document.documentElement.style.width = v ? "100vw" : "";
|
|
52
52
|
document.documentElement.style.height = v ? "100vh" : "";
|
|
53
53
|
document.documentElement.style.overflow = v ? "hidden" : "";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
props: {
|
package/dist/lib/Field/Field.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, inject, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-DXP8G3TY.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
package/dist/lib/Form/Form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, provide, createVNode } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
props: {
|
package/dist/lib/Input/Input.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, createVNode, mergeProps } from 'vue';
|
|
2
|
-
import { W as Wrap } from '../../Wrap-
|
|
3
|
-
import { c as isFun } from '../../utils-
|
|
4
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { W as Wrap } from '../../Wrap-C1bQRaFZ.js';
|
|
3
|
+
import { c as isFun } from '../../utils-C1YOXhjB.js';
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
5
5
|
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
inheritAttrs: false,
|
package/dist/lib/Link/Link.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-DXP8G3TY.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { shallowRef, createApp, h } from 'vue';
|
|
2
|
-
import { L as Loading } from '../../Loading-
|
|
3
|
-
import { c as config } from '../../config-
|
|
4
|
-
import '../../_plugin-vue_export-helper-
|
|
2
|
+
import { L as Loading } from '../../Loading-XwEhXCeF.js';
|
|
3
|
+
import { c as config } from '../../config-DXP8G3TY.js';
|
|
4
|
+
import '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
5
5
|
|
|
6
6
|
const defaultOptions = {
|
|
7
7
|
lock: false,
|
package/dist/lib/Menu/Menu.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, createVNode } from 'vue';
|
|
2
|
-
import { k as debounce } from '../../utils-
|
|
2
|
+
import { k as debounce } from '../../utils-C1YOXhjB.js';
|
|
3
3
|
import Scroll from '../Scroll/Scroll.js';
|
|
4
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
5
5
|
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, onMounted, h, createApp } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-DXP8G3TY.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = defineComponent({
|
|
6
6
|
props: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, createVNode, createTextVNode } from 'vue';
|
|
2
2
|
import Select from '../Select/Select.js';
|
|
3
|
-
import { c as config } from '../../config-
|
|
4
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
5
|
-
import '../../utils-
|
|
3
|
+
import { c as config } from '../../config-DXP8G3TY.js';
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
5
|
+
import '../../utils-C1YOXhjB.js';
|
|
6
6
|
import '../Popover/Popover.js';
|
|
7
|
-
import '../../Wrap-
|
|
7
|
+
import '../../Wrap-C1bQRaFZ.js';
|
|
8
8
|
import '../Input/Input.js';
|
|
9
9
|
import '../Checkbox/Checkbox.js';
|
|
10
10
|
import '../Scroll/Scroll.js';
|
|
11
|
-
import '../../Loading-
|
|
11
|
+
import '../../Loading-XwEhXCeF.js';
|
|
12
12
|
|
|
13
13
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
14
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, shallowRef, ref, watch, onMounted, onBeforeUnmount, createVNode, nextTick } from 'vue';
|
|
2
|
-
import { t as throttle } from '../../utils-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { t as throttle } from '../../utils-C1YOXhjB.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
package/dist/lib/Radio/Radio.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, createVNode, inject } from 'vue';
|
|
2
|
-
import { c as config } from '../../config-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { c as config } from '../../config-DXP8G3TY.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
props: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, provide, createVNode } from 'vue';
|
|
2
2
|
import Radio from '../Radio/Radio.js';
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
4
|
-
import '../../config-
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
4
|
+
import '../../config-DXP8G3TY.js';
|
|
5
5
|
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
props: {
|
package/dist/lib/Scene/Scene.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, renderSlot } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /*@__PURE__*/ defineComponent({
|
|
5
5
|
__name: 'Scene',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, shallowRef, ref, onMounted, onBeforeUnmount, createVNode } from 'vue';
|
|
2
|
-
import { k as debounce } from '../../utils-
|
|
3
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
1
|
+
import { defineComponent, shallowRef, ref, onMounted, nextTick, onBeforeUnmount, createVNode } from 'vue';
|
|
2
|
+
import { k as debounce } from '../../utils-C1YOXhjB.js';
|
|
3
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* note:
|
|
@@ -40,9 +40,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
40
|
lockPrevent: {
|
|
41
41
|
type: Boolean,
|
|
42
42
|
default: false
|
|
43
|
+
},
|
|
44
|
+
showScrollX: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: true
|
|
47
|
+
},
|
|
48
|
+
showScrollY: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: true
|
|
43
51
|
}
|
|
44
52
|
},
|
|
45
|
-
emits: ["scroll", "reach-top", "reach-bottom", "reach-left", "reach-right"],
|
|
53
|
+
emits: ["scroll", "reach-top", "reach-bottom", "reach-left", "reach-right", "scroll-top", "scroll-left", "scroll-right", "scroll-bottom"],
|
|
46
54
|
setup(_props, {
|
|
47
55
|
slots: _slots,
|
|
48
56
|
emit: _emit,
|
|
@@ -77,8 +85,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
85
|
}) : null;
|
|
78
86
|
onMounted(() => {
|
|
79
87
|
// 组件挂在后对元素进行监控
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
nextTick(() => {
|
|
89
|
+
ro.observe(bodyRef.value);
|
|
90
|
+
ro.observe(rootRef.value);
|
|
91
|
+
});
|
|
82
92
|
});
|
|
83
93
|
onBeforeUnmount(() => {
|
|
84
94
|
// 组件卸载前取消监控
|
|
@@ -96,18 +106,21 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
96
106
|
bodyTop = -y;
|
|
97
107
|
thumbTop = Math.abs(bodyTop) / ratioY;
|
|
98
108
|
}
|
|
109
|
+
// console.log(bodyLeft, bodyTop)
|
|
99
110
|
bodyRef.value.style.transform = `matrix(1,0,0,1,${bodyLeft},${bodyTop})`;
|
|
100
111
|
thumbYRef.value.style.transform = `translateY(${thumbTop}px)`;
|
|
101
112
|
thumbXRef.value.style.transform = `translateX(${thumbLeft}px)`;
|
|
102
113
|
}
|
|
103
114
|
function rect() {
|
|
115
|
+
const rootRect = rootRef.value.getBoundingClientRect();
|
|
116
|
+
const bodyRect = bodyRef.value.getBoundingClientRect();
|
|
104
117
|
return {
|
|
105
118
|
top: Math.abs(bodyTop),
|
|
106
119
|
left: Math.abs(bodyLeft),
|
|
107
|
-
innerWidth: Math.abs(
|
|
108
|
-
innerHeight: Math.abs(
|
|
109
|
-
width: Math.abs(
|
|
110
|
-
height: Math.abs(
|
|
120
|
+
innerWidth: Math.abs(bodyRect.width),
|
|
121
|
+
innerHeight: Math.abs(bodyRect.height),
|
|
122
|
+
width: Math.abs(rootRect.width),
|
|
123
|
+
height: Math.abs(rootRect.height)
|
|
111
124
|
};
|
|
112
125
|
}
|
|
113
126
|
_expose({
|
|
@@ -124,7 +137,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
124
137
|
if (bodyHeight > rootHeight) {
|
|
125
138
|
// 如果内容高度 > 容器高度, 计算滑块高度
|
|
126
139
|
showScrollY.value = true; // 显示Y方向的滚动条
|
|
140
|
+
// console.log(bodyHeight, rootHeight)
|
|
127
141
|
// 计算出来thumb_bar的高度
|
|
142
|
+
// 滚动条高度计算公式: 容器高度 - (内容高度 - 容器高度)
|
|
143
|
+
// 例如: 容器高度100px, 内容高度150px
|
|
144
|
+
// 滚动条高度 = 100 - (150 - 100) = 50px
|
|
145
|
+
// 这样滚动条高度会随着内容高度增加而减小,保持滚动比例
|
|
146
|
+
// 设置最小高度20px保证可以拖动
|
|
128
147
|
thumbBarHeight = rootHeight - Math.abs(bodyHeight - rootHeight);
|
|
129
148
|
thumbBarHeight = thumbBarHeight > 20 ? thumbBarHeight : 20;
|
|
130
149
|
// 计算body与滚动条距离的比率
|
|
@@ -283,6 +302,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
283
302
|
// 翻转模式, 竖向滚轮, 改变水平位置
|
|
284
303
|
if (showScrollY.value && e.deltaX > 0) {
|
|
285
304
|
// 内容向上滚动
|
|
305
|
+
_emit('scroll-top');
|
|
286
306
|
currentTop = bodyTop - moveX;
|
|
287
307
|
// 如果内容向上移动距离超过了最大距离, 就设为最大距离
|
|
288
308
|
if (currentTop <= maxTop) {
|
|
@@ -291,14 +311,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
291
311
|
} else {
|
|
292
312
|
// 如果在正常范围内, 就阻止document随着滚动
|
|
293
313
|
e.preventDefault();
|
|
294
|
-
_emit("scroll", {
|
|
295
|
-
top: Math.abs(bodyTop),
|
|
296
|
-
left: Math.abs(bodyLeft)
|
|
297
|
-
});
|
|
298
314
|
}
|
|
299
315
|
}
|
|
300
316
|
if (showScrollY.value && e.deltaX < 0) {
|
|
301
317
|
// 内容向下滚动
|
|
318
|
+
_emit('scroll-bottom');
|
|
302
319
|
currentTop = bodyTop + moveX;
|
|
303
320
|
// 如果内容向下滚动距离超过了最小距离, 就设为0
|
|
304
321
|
if (currentTop >= 0) {
|
|
@@ -307,45 +324,34 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
307
324
|
} else {
|
|
308
325
|
// 如果在正常范围内, 就阻止document随着滚动
|
|
309
326
|
e.preventDefault();
|
|
310
|
-
_emit("scroll", {
|
|
311
|
-
top: Math.abs(bodyTop),
|
|
312
|
-
left: Math.abs(bodyLeft)
|
|
313
|
-
});
|
|
314
327
|
}
|
|
315
328
|
}
|
|
316
329
|
if (showScrollX.value && e.deltaY > 0) {
|
|
317
330
|
e.preventDefault();
|
|
318
331
|
// 内容向左滚动
|
|
332
|
+
_emit('scroll-left');
|
|
319
333
|
currentLeft = bodyLeft - moveY;
|
|
320
334
|
// 如果body向左移动距离超过了最大距离, 就设为最大距离, 这里的currentLeft与maxLeft都是负值
|
|
321
335
|
if (currentLeft <= maxLeft) {
|
|
322
336
|
currentLeft = maxLeft;
|
|
323
337
|
reachRight();
|
|
324
|
-
} else {
|
|
325
|
-
_emit("scroll", {
|
|
326
|
-
top: Math.abs(bodyTop),
|
|
327
|
-
left: Math.abs(bodyLeft)
|
|
328
|
-
});
|
|
329
338
|
}
|
|
330
339
|
}
|
|
331
340
|
if (showScrollX.value && e.deltaY < 0) {
|
|
332
341
|
e.preventDefault();
|
|
333
342
|
// 内容向右滚动
|
|
343
|
+
_emit('scroll-right');
|
|
334
344
|
currentLeft = bodyLeft + moveY;
|
|
335
345
|
// 如果body向右移动距离超过0, 就设为0
|
|
336
346
|
if (currentLeft >= 0) {
|
|
337
347
|
currentLeft = 0;
|
|
338
348
|
reachLeft();
|
|
339
|
-
} else {
|
|
340
|
-
_emit("scroll", {
|
|
341
|
-
top: Math.abs(bodyTop),
|
|
342
|
-
left: Math.abs(bodyLeft)
|
|
343
|
-
});
|
|
344
349
|
}
|
|
345
350
|
}
|
|
346
351
|
} else {
|
|
347
352
|
if (showScrollY.value && e.deltaY > 0) {
|
|
348
353
|
// 内容向上滚动
|
|
354
|
+
_emit('scroll-top');
|
|
349
355
|
currentTop = bodyTop - moveY;
|
|
350
356
|
// 如果内容向上移动距离超过了最大距离, 就设为最大距离
|
|
351
357
|
if (currentTop <= maxTop) {
|
|
@@ -354,14 +360,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
354
360
|
} else {
|
|
355
361
|
// 如果在正常范围内, 就阻止document随着滚动
|
|
356
362
|
e.preventDefault();
|
|
357
|
-
_emit("scroll", {
|
|
358
|
-
top: Math.abs(bodyTop),
|
|
359
|
-
left: Math.abs(bodyLeft)
|
|
360
|
-
});
|
|
361
363
|
}
|
|
362
364
|
}
|
|
363
365
|
if (showScrollY.value && e.deltaY < 0) {
|
|
364
366
|
// 内容向下滚动
|
|
367
|
+
_emit('scroll-bottom');
|
|
365
368
|
currentTop = bodyTop + moveY;
|
|
366
369
|
// 如果内容向下滚动距离超过了最小距离, 就设为0
|
|
367
370
|
if (currentTop >= 0) {
|
|
@@ -370,40 +373,28 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
370
373
|
} else {
|
|
371
374
|
// 如果在正常范围内, 就阻止document随着滚动
|
|
372
375
|
e.preventDefault();
|
|
373
|
-
_emit("scroll", {
|
|
374
|
-
top: Math.abs(bodyTop),
|
|
375
|
-
left: Math.abs(bodyLeft)
|
|
376
|
-
});
|
|
377
376
|
}
|
|
378
377
|
}
|
|
379
378
|
if (showScrollX.value && e.deltaX > 0) {
|
|
380
|
-
e.preventDefault();
|
|
381
379
|
// 内容向左滚动
|
|
380
|
+
_emit('scroll-left');
|
|
381
|
+
e.preventDefault();
|
|
382
382
|
currentLeft = bodyLeft - moveX;
|
|
383
383
|
// 如果body向左移动距离超过了最大距离, 就设为最大距离, 这里的currentLeft与maxLeft都是负值
|
|
384
384
|
if (currentLeft <= maxLeft) {
|
|
385
385
|
currentLeft = maxLeft;
|
|
386
386
|
reachRight();
|
|
387
|
-
} else {
|
|
388
|
-
_emit("scroll", {
|
|
389
|
-
top: Math.abs(bodyTop),
|
|
390
|
-
left: Math.abs(bodyLeft)
|
|
391
|
-
});
|
|
392
387
|
}
|
|
393
388
|
}
|
|
394
389
|
if (showScrollX.value && e.deltaX < 0) {
|
|
395
|
-
e.preventDefault();
|
|
396
390
|
// 内容向右滚动
|
|
391
|
+
_emit('scroll-right');
|
|
392
|
+
e.preventDefault();
|
|
397
393
|
currentLeft = bodyLeft + moveX;
|
|
398
394
|
// 如果body向右移动距离超过0, 就设为0
|
|
399
395
|
if (currentLeft >= 0) {
|
|
400
396
|
currentLeft = 0;
|
|
401
397
|
reachLeft();
|
|
402
|
-
} else {
|
|
403
|
-
_emit("scroll", {
|
|
404
|
-
top: Math.abs(bodyTop),
|
|
405
|
-
left: Math.abs(bodyLeft)
|
|
406
|
-
});
|
|
407
398
|
}
|
|
408
399
|
}
|
|
409
400
|
}
|
|
@@ -416,12 +407,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
416
407
|
thumbYRef.value.style.transform = `translateY(${thumbTop}px)`;
|
|
417
408
|
thumbLeft = Math.abs(currentLeft) / ratioX;
|
|
418
409
|
thumbXRef.value.style.transform = `translateX(${thumbLeft}px)`;
|
|
410
|
+
_emit("scroll", {
|
|
411
|
+
top: Math.abs(bodyTop),
|
|
412
|
+
left: Math.abs(bodyLeft)
|
|
413
|
+
});
|
|
419
414
|
}
|
|
420
415
|
}, [createVNode("div", {
|
|
421
416
|
"ref": bodyRef,
|
|
422
417
|
"class": "v_scroll_body"
|
|
423
418
|
}, [_slots.default && _slots.default()]), _slots.append && _slots.append(), createVNode("div", {
|
|
424
|
-
"class": "v_scroll_thumb_y"
|
|
419
|
+
"class": ["v_scroll_thumb_y", {
|
|
420
|
+
"v_scroll_thumb_y--show": _props.showScrollY && showScrollY.value
|
|
421
|
+
}]
|
|
425
422
|
}, [createVNode("div", {
|
|
426
423
|
"ref": thumbYRef,
|
|
427
424
|
"class": "v_scroll_thumb_bar",
|
|
@@ -442,7 +439,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
442
439
|
});
|
|
443
440
|
}
|
|
444
441
|
}, null)]), createVNode("div", {
|
|
445
|
-
"class": "v_scroll_thumb_x"
|
|
442
|
+
"class": ["v_scroll_thumb_x", {
|
|
443
|
+
"v_scroll_thumb_x--show": _props.showScrollX && showScrollX.value
|
|
444
|
+
}]
|
|
446
445
|
}, [createVNode("div", {
|
|
447
446
|
"ref": thumbXRef,
|
|
448
447
|
"class": "v_scroll_thumb_bar",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent, ref, shallowRef, reactive, watch, createVNode, createTextVNode, isVNode, nextTick } from 'vue';
|
|
2
|
-
import { k as debounce } from '../../utils-
|
|
2
|
+
import { k as debounce } from '../../utils-C1YOXhjB.js';
|
|
3
3
|
import Popover from '../Popover/Popover.js';
|
|
4
|
-
import { W as Wrap } from '../../Wrap-
|
|
4
|
+
import { W as Wrap } from '../../Wrap-C1bQRaFZ.js';
|
|
5
5
|
import Input from '../Input/Input.js';
|
|
6
6
|
import Checkbox from '../Checkbox/Checkbox.js';
|
|
7
7
|
import Scroll from '../Scroll/Scroll.js';
|
|
8
|
-
import { c as config } from '../../config-
|
|
9
|
-
import { L as Loading } from '../../Loading-
|
|
10
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
8
|
+
import { c as config } from '../../config-DXP8G3TY.js';
|
|
9
|
+
import { L as Loading } from '../../Loading-XwEhXCeF.js';
|
|
10
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
11
11
|
|
|
12
12
|
/******************************************************************************
|
|
13
13
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
props: {
|
package/dist/lib/Tab/Tab.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, onBeforeUnmount, createVNode } from 'vue';
|
|
2
|
-
import { m as matchChildrenCoponent } from '../../utils-
|
|
2
|
+
import { m as matchChildrenCoponent } from '../../utils-C1YOXhjB.js';
|
|
3
3
|
import TabPanel from '../TabPanel/TabPanel.js';
|
|
4
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
4
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
5
5
|
|
|
6
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-
|
|
2
|
+
import { _ as _export_sfc } from '../../_plugin-vue_export-helper-BJcySfil.js';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
setup(_props, {
|