@fangzhongya/fang-ui 0.0.32 → 0.0.34
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/components/dates/index.css +1 -0
- package/dist/components/dates/index.scss +1 -0
- package/dist/components/forms/src/data.cjs +12 -12
- package/dist/components/forms/src/data.d.ts +17 -17
- package/dist/components/forms/src/data.js +12 -12
- package/dist/components/forms/src/index.cjs +5 -5
- package/dist/components/forms/src/index.d.ts +5 -5
- package/dist/components/forms/src/index.js +5 -5
- package/dist/components/index.cjs +98 -96
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.scss +1 -0
- package/dist/components/page/style/index2.scss +1 -1
- package/dist/components/seamless-scroll/index.cjs +8 -0
- package/dist/components/seamless-scroll/index.css +30 -0
- package/dist/components/seamless-scroll/index.d.ts +118 -0
- package/dist/components/seamless-scroll/index.js +8 -0
- package/dist/components/seamless-scroll/index.scss +19 -0
- package/dist/components/seamless-scroll/src/data.cjs +34 -0
- package/dist/components/seamless-scroll/src/data.d.ts +44 -0
- package/dist/components/seamless-scroll/src/data.js +34 -0
- package/dist/components/seamless-scroll/src/index.cjs +148 -0
- package/dist/components/seamless-scroll/src/index.d.ts +80 -0
- package/dist/components/seamless-scroll/src/index.js +148 -0
- package/dist/components/seamless-scroll/src/index2.cjs +4 -0
- package/dist/components/seamless-scroll/src/index2.js +4 -0
- package/dist/expand/{chunk-XJ2UIJNI.js → chunk-IMQMZ66E.js} +1 -0
- package/dist/expand/{chunk-JOH5MZT3.cjs → chunk-KYVOOBKQ.cjs} +1 -0
- package/dist/expand/components.cjs +5 -5
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/index.cjs +116 -114
- package/dist/index.css +18 -0
- package/dist/index.js +2 -0
- package/dist/type.d.ts +2 -0
- package/package.json +8 -7
- /package/dist/components/{form → pagination}/index.css +0 -0
package/dist/components/index.js
CHANGED
|
@@ -63,6 +63,7 @@ import { BoxTitle } from "./box-title/index.js";
|
|
|
63
63
|
import { Box } from "./box/index.js";
|
|
64
64
|
import { Popup } from "./popup/index.js";
|
|
65
65
|
import { RightKey } from "./right-key/index.js";
|
|
66
|
+
import { SeamlessScroll } from "./seamless-scroll/index.js";
|
|
66
67
|
import { StickDiv } from "./stick-div/index.js";
|
|
67
68
|
import { StickEdge } from "./stick-edge/index.js";
|
|
68
69
|
import { StickWindow } from "./stick-window/index.js";
|
|
@@ -196,6 +197,7 @@ export {
|
|
|
196
197
|
Retract,
|
|
197
198
|
RightKey,
|
|
198
199
|
RoleSelect,
|
|
200
|
+
SeamlessScroll,
|
|
199
201
|
Select,
|
|
200
202
|
SelectDialog,
|
|
201
203
|
SelectPopover,
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
@use './box/index.scss' as *;
|
|
50
50
|
@use './popup/index.scss' as *;
|
|
51
51
|
@use './right-key/index.scss' as *;
|
|
52
|
+
@use './seamless-scroll/index.scss' as *;
|
|
52
53
|
@use './window/index.scss' as *;
|
|
53
54
|
@use './global-config/index.scss' as *;
|
|
54
55
|
@use './icon/index.scss' as *;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@use 'element-plus/theme-chalk/src/message-box.scss' as *;
|
|
4
4
|
|
|
5
5
|
@use '../../forms/style/index2.scss' as *;
|
|
6
|
-
@use '../../lists/style/index2.scss' as *;
|
|
6
|
+
// @use '../../lists/style/index2.scss' as *;
|
|
7
7
|
@use '../../dialog/style/index2.scss' as *;
|
|
8
8
|
@use '../../tablesp/style/index2.scss' as *;
|
|
9
9
|
@use '../index.scss' as *;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
;/* empty css */
|
|
4
|
+
const withInstall = require("../../utils/vues/withInstall.cjs");
|
|
5
|
+
const index_vue_vue_type_script_setup_true_lang = require("./src/index.cjs");
|
|
6
|
+
const SeamlessScroll = withInstall.withInstall(index_vue_vue_type_script_setup_true_lang.default, "SeamlessScroll");
|
|
7
|
+
exports.SeamlessScroll = SeamlessScroll;
|
|
8
|
+
exports.default = SeamlessScroll;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--on: rgb(91, 189, 246);
|
|
3
|
+
--color-primary: #409eff;
|
|
4
|
+
--bag-primary: #409eff;
|
|
5
|
+
--bag-primary-text: #fff;
|
|
6
|
+
--border: #eee;
|
|
7
|
+
--layout-panel-gap: 10px;
|
|
8
|
+
--layout-panel-padding: 20px;
|
|
9
|
+
--layout-form-item-padding-right: var(
|
|
10
|
+
--layout-panel-gap
|
|
11
|
+
);
|
|
12
|
+
--g-main-bg: var(--bg-color-page);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.seamless-scroll {
|
|
16
|
+
position: relative;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
padding: 0;
|
|
19
|
+
margin: 0;
|
|
20
|
+
transition: 0s;
|
|
21
|
+
}
|
|
22
|
+
.seamless-scroll .seamless-scroll-warp-line,
|
|
23
|
+
.seamless-scroll .seamless-scroll-warp {
|
|
24
|
+
padding: 0;
|
|
25
|
+
margin: 0;
|
|
26
|
+
transition: 0s;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
/*border-bottom: transparent 1px solid; !* key code *!*/
|
|
29
|
+
/*box-sizing: border-box;*/
|
|
30
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { SFCWithInstall } from '../../utils/vues';
|
|
2
|
+
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
|
|
3
|
+
declare const SeamlessScroll: SFCWithInstall<{
|
|
4
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
|
|
5
|
+
stepLength: {
|
|
6
|
+
type: NumberConstructor;
|
|
7
|
+
default: number;
|
|
8
|
+
validator: (value: number) => boolean;
|
|
9
|
+
};
|
|
10
|
+
reverse: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
debug: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
limitFps: {
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
default: number;
|
|
21
|
+
};
|
|
22
|
+
pauseOnHover: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
}>> & Readonly<{
|
|
27
|
+
onChange?: ((evt: string | string[]) => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
29
|
+
change: (evt: string | string[]) => void;
|
|
30
|
+
}, PublicProps, {
|
|
31
|
+
reverse: boolean;
|
|
32
|
+
stepLength: number;
|
|
33
|
+
debug: boolean;
|
|
34
|
+
limitFps: number;
|
|
35
|
+
pauseOnHover: boolean;
|
|
36
|
+
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
37
|
+
refDom: HTMLDivElement;
|
|
38
|
+
refWarp: HTMLDivElement;
|
|
39
|
+
refLine: HTMLDivElement;
|
|
40
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
41
|
+
P: {};
|
|
42
|
+
B: {};
|
|
43
|
+
D: {};
|
|
44
|
+
C: {};
|
|
45
|
+
M: {};
|
|
46
|
+
Defaults: {};
|
|
47
|
+
}, Readonly< ExtractPropTypes<{
|
|
48
|
+
stepLength: {
|
|
49
|
+
type: NumberConstructor;
|
|
50
|
+
default: number;
|
|
51
|
+
validator: (value: number) => boolean;
|
|
52
|
+
};
|
|
53
|
+
reverse: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
debug: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
limitFps: {
|
|
62
|
+
type: NumberConstructor;
|
|
63
|
+
default: number;
|
|
64
|
+
};
|
|
65
|
+
pauseOnHover: {
|
|
66
|
+
type: BooleanConstructor;
|
|
67
|
+
default: boolean;
|
|
68
|
+
};
|
|
69
|
+
}>> & Readonly<{
|
|
70
|
+
onChange?: ((evt: string | string[]) => any) | undefined;
|
|
71
|
+
}>, {}, {}, {}, {}, {
|
|
72
|
+
reverse: boolean;
|
|
73
|
+
stepLength: number;
|
|
74
|
+
debug: boolean;
|
|
75
|
+
limitFps: number;
|
|
76
|
+
pauseOnHover: boolean;
|
|
77
|
+
}>;
|
|
78
|
+
__isFragment?: never;
|
|
79
|
+
__isTeleport?: never;
|
|
80
|
+
__isSuspense?: never;
|
|
81
|
+
} & ComponentOptionsBase<Readonly< ExtractPropTypes<{
|
|
82
|
+
stepLength: {
|
|
83
|
+
type: NumberConstructor;
|
|
84
|
+
default: number;
|
|
85
|
+
validator: (value: number) => boolean;
|
|
86
|
+
};
|
|
87
|
+
reverse: {
|
|
88
|
+
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
debug: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
95
|
+
limitFps: {
|
|
96
|
+
type: NumberConstructor;
|
|
97
|
+
default: number;
|
|
98
|
+
};
|
|
99
|
+
pauseOnHover: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
}>> & Readonly<{
|
|
104
|
+
onChange?: ((evt: string | string[]) => any) | undefined;
|
|
105
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
106
|
+
change: (evt: string | string[]) => void;
|
|
107
|
+
}, string, {
|
|
108
|
+
reverse: boolean;
|
|
109
|
+
stepLength: number;
|
|
110
|
+
debug: boolean;
|
|
111
|
+
limitFps: number;
|
|
112
|
+
pauseOnHover: boolean;
|
|
113
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
114
|
+
$slots: {
|
|
115
|
+
default?(_: {}): any;
|
|
116
|
+
};
|
|
117
|
+
})>;
|
|
118
|
+
export { SeamlessScroll, SeamlessScroll as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use '../css/common.scss' as *;
|
|
2
|
+
|
|
3
|
+
$seamless-scroll: 'seamless-scroll';
|
|
4
|
+
@include b($seamless-scroll) {
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
padding: 0;
|
|
8
|
+
margin: 0;
|
|
9
|
+
transition: 0s;
|
|
10
|
+
.#{z($seamless-scroll, 'warp-line')},
|
|
11
|
+
.#{z($seamless-scroll, 'warp')} {
|
|
12
|
+
padding: 0;
|
|
13
|
+
margin: 0;
|
|
14
|
+
transition: 0s;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
/*border-bottom: transparent 1px solid; !* key code *!*/
|
|
17
|
+
/*box-sizing: border-box;*/
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const buildProps = require("../../../utils/vues/buildProps.cjs");
|
|
4
|
+
const dataProps = buildProps.buildProps({
|
|
5
|
+
stepLength: {
|
|
6
|
+
type: Number,
|
|
7
|
+
default: 60,
|
|
8
|
+
validator: (value) => value >= 0
|
|
9
|
+
},
|
|
10
|
+
reverse: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false
|
|
13
|
+
},
|
|
14
|
+
debug: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
},
|
|
18
|
+
limitFps: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 32
|
|
21
|
+
},
|
|
22
|
+
pauseOnHover: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: true
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const dataEmits = {
|
|
28
|
+
change: (evt) => {
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const dataExpose = {};
|
|
32
|
+
exports.dataEmits = dataEmits;
|
|
33
|
+
exports.dataExpose = dataExpose;
|
|
34
|
+
exports.dataProps = dataProps;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
export declare const dataProps: {
|
|
3
|
+
stepLength: {
|
|
4
|
+
type: NumberConstructor;
|
|
5
|
+
default: number;
|
|
6
|
+
validator: (value: number) => boolean;
|
|
7
|
+
};
|
|
8
|
+
reverse: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
debug: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
limitFps: {
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
pauseOnHover: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type DataProps = ExtractPublicPropTypes<typeof dataProps>;
|
|
26
|
+
/**
|
|
27
|
+
* @emits change (val:[String, Array])
|
|
28
|
+
* 选择的时间
|
|
29
|
+
*/
|
|
30
|
+
export declare const dataEmits: {
|
|
31
|
+
change: (evt: string | string[]) => void;
|
|
32
|
+
};
|
|
33
|
+
export type DataEmits = typeof dataEmits;
|
|
34
|
+
/**
|
|
35
|
+
* @slot default 默认插槽
|
|
36
|
+
*/
|
|
37
|
+
export declare const dataSlot: {
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* expose setValue (val:<string>设置的数据 )
|
|
42
|
+
* 设置值
|
|
43
|
+
*/
|
|
44
|
+
export declare const dataExpose: {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { buildProps } from "../../../utils/vues/buildProps.js";
|
|
2
|
+
const dataProps = buildProps({
|
|
3
|
+
stepLength: {
|
|
4
|
+
type: Number,
|
|
5
|
+
default: 60,
|
|
6
|
+
validator: (value) => value >= 0
|
|
7
|
+
},
|
|
8
|
+
reverse: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: false
|
|
11
|
+
},
|
|
12
|
+
debug: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
limitFps: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: 32
|
|
19
|
+
},
|
|
20
|
+
pauseOnHover: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: true
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const dataEmits = {
|
|
26
|
+
change: (evt) => {
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const dataExpose = {};
|
|
30
|
+
export {
|
|
31
|
+
dataEmits,
|
|
32
|
+
dataExpose,
|
|
33
|
+
dataProps
|
|
34
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const data = require("./data.cjs");
|
|
5
|
+
const index = require("../../../hooks/cssname/index.cjs");
|
|
6
|
+
const d3Timer = require("d3-timer");
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: data.dataProps,
|
|
10
|
+
emits: data.dataEmits,
|
|
11
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
12
|
+
const cs = index.useCssName("seamless-scroll");
|
|
13
|
+
const props = __props;
|
|
14
|
+
const loopCount = vue.ref(new Array(5));
|
|
15
|
+
let ties = null;
|
|
16
|
+
let tWatch = null;
|
|
17
|
+
const refDom = vue.ref();
|
|
18
|
+
const refLine = vue.ref();
|
|
19
|
+
const refWarp = vue.ref();
|
|
20
|
+
let parentHeight = vue.ref(0);
|
|
21
|
+
const createTimer = (handle, fps = 32) => new Promise((resolve, reject) => {
|
|
22
|
+
resolve(
|
|
23
|
+
d3Timer.timer(() => {
|
|
24
|
+
try {
|
|
25
|
+
handle();
|
|
26
|
+
} catch (err) {
|
|
27
|
+
reject(err);
|
|
28
|
+
}
|
|
29
|
+
}, 1e3 / fps)
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
const getTime = () => (/* @__PURE__ */ new Date()).getTime();
|
|
33
|
+
const val = vue.ref();
|
|
34
|
+
const currentFps = vue.ref(60);
|
|
35
|
+
let animation = true;
|
|
36
|
+
let lastTime = getTime();
|
|
37
|
+
const onStop = () => animation = false;
|
|
38
|
+
const onPlay = () => {
|
|
39
|
+
animation = true;
|
|
40
|
+
lastTime = getTime();
|
|
41
|
+
};
|
|
42
|
+
const hideItemsIndex = vue.ref([]);
|
|
43
|
+
vue.onMounted(() => {
|
|
44
|
+
vue.nextTick(() => {
|
|
45
|
+
refDom.value.addEventListener("mouseover", onStop);
|
|
46
|
+
refDom.value.addEventListener("mouseout", onPlay);
|
|
47
|
+
const parentElementRect = refDom.value.parentElement.getBoundingClientRect();
|
|
48
|
+
parentHeight.value = parentElementRect.height;
|
|
49
|
+
let warpLineHeight = refLine.value[0].getBoundingClientRect().height;
|
|
50
|
+
let lastY = -warpLineHeight;
|
|
51
|
+
let translateY = -warpLineHeight;
|
|
52
|
+
loopCount.value = new Array(
|
|
53
|
+
Math.ceil(parentHeight.value / warpLineHeight) * 3
|
|
54
|
+
);
|
|
55
|
+
createTimer(() => {
|
|
56
|
+
if (!animation && props.pauseOnHover) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const limitHeight = props.reverse ? -warpLineHeight * (loopCount.value.length / 3) : -warpLineHeight * (loopCount.value.length / 3 * 2);
|
|
60
|
+
const currentTime = getTime();
|
|
61
|
+
currentFps.value = Math.ceil(1e3 / (currentTime - lastTime));
|
|
62
|
+
const len = (currentTime - lastTime) * (props.stepLength / 1e3);
|
|
63
|
+
lastTime = currentTime;
|
|
64
|
+
translateY += (props.reverse ? 1 : -1) * len;
|
|
65
|
+
if (props.reverse) {
|
|
66
|
+
translateY = translateY > limitHeight ? -(warpLineHeight + Math.abs(translateY % warpLineHeight)) : translateY;
|
|
67
|
+
} else {
|
|
68
|
+
translateY = translateY < limitHeight ? Math.sign(translateY) * (Math.abs(translateY % warpLineHeight) + warpLineHeight) : translateY;
|
|
69
|
+
}
|
|
70
|
+
val.value = translateY;
|
|
71
|
+
refWarp.value.style.setProperty(
|
|
72
|
+
"transform",
|
|
73
|
+
`translate3d(0px ,${translateY}px,0px)`
|
|
74
|
+
);
|
|
75
|
+
lastY = translateY;
|
|
76
|
+
const indexs = [];
|
|
77
|
+
refLine.value.forEach((item, i) => {
|
|
78
|
+
let currenRect = refLine.value[i].getBoundingClientRect();
|
|
79
|
+
let parentElementRect2 = refDom.value.parentElement.getBoundingClientRect();
|
|
80
|
+
if (currenRect.y + currenRect.height < parentElementRect2.y || currenRect.y > parentElementRect2.y + parentElementRect2.height) {
|
|
81
|
+
indexs.push(i);
|
|
82
|
+
} else {
|
|
83
|
+
indexs.splice(hideItemsIndex.value.indexOf(i), 1);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
hideItemsIndex.value = indexs;
|
|
87
|
+
}).then((timer2) => {
|
|
88
|
+
ties = timer2;
|
|
89
|
+
}).catch((err) => {
|
|
90
|
+
console.error(err);
|
|
91
|
+
});
|
|
92
|
+
createTimer(() => {
|
|
93
|
+
parentHeight.value = refDom.value.parentElement.getBoundingClientRect().height;
|
|
94
|
+
warpLineHeight = refLine.value[0].getBoundingClientRect().height;
|
|
95
|
+
loopCount.value = new Array(
|
|
96
|
+
Math.ceil(parentHeight.value / warpLineHeight) * 3
|
|
97
|
+
);
|
|
98
|
+
}).then((timer2) => {
|
|
99
|
+
tWatch = timer2;
|
|
100
|
+
}).catch((err) => {
|
|
101
|
+
console.error(err);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
vue.onUnmounted(() => {
|
|
106
|
+
ties?.stop();
|
|
107
|
+
tWatch?.stop();
|
|
108
|
+
if (refDom.value) {
|
|
109
|
+
refDom.value.removeEventListener("mouseover", onStop);
|
|
110
|
+
refDom.value.removeEventListener("mouseout", onPlay);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
__expose({
|
|
114
|
+
...data.dataExpose
|
|
115
|
+
});
|
|
116
|
+
return (_ctx, _cache) => {
|
|
117
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
118
|
+
ref_key: "refDom",
|
|
119
|
+
ref: refDom,
|
|
120
|
+
class: vue.normalizeClass(vue.unref(cs).z()),
|
|
121
|
+
style: vue.normalizeStyle({ height: vue.unref(parentHeight) + "px" })
|
|
122
|
+
}, [
|
|
123
|
+
vue.createElementVNode("div", {
|
|
124
|
+
ref_key: "refWarp",
|
|
125
|
+
ref: refWarp,
|
|
126
|
+
class: vue.normalizeClass(vue.unref(cs).z("warp"))
|
|
127
|
+
}, [
|
|
128
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(loopCount.value.length, (i) => {
|
|
129
|
+
return vue.openBlock(), vue.createBlock(vue.KeepAlive, {
|
|
130
|
+
key: "ss_" + i
|
|
131
|
+
}, [
|
|
132
|
+
!hideItemsIndex.value.includes(i) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
133
|
+
key: 0,
|
|
134
|
+
ref_for: true,
|
|
135
|
+
ref_key: "refLine",
|
|
136
|
+
ref: refLine,
|
|
137
|
+
class: vue.normalizeClass(vue.unref(cs).z("warp-line"))
|
|
138
|
+
}, [
|
|
139
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
140
|
+
], 2)) : vue.createCommentVNode("", true)
|
|
141
|
+
], 1024);
|
|
142
|
+
}), 128))
|
|
143
|
+
], 2)
|
|
144
|
+
], 6);
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {
|
|
8
|
+
refDom: HTMLDivElement;
|
|
9
|
+
refWarp: HTMLDivElement;
|
|
10
|
+
refLine: HTMLDivElement;
|
|
11
|
+
};
|
|
12
|
+
rootEl: HTMLDivElement;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
16
|
+
stepLength: {
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
default: number;
|
|
19
|
+
validator: (value: number) => boolean;
|
|
20
|
+
};
|
|
21
|
+
reverse: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
debug: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
limitFps: {
|
|
30
|
+
type: NumberConstructor;
|
|
31
|
+
default: number;
|
|
32
|
+
};
|
|
33
|
+
pauseOnHover: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
38
|
+
change: (evt: string | string[]) => void;
|
|
39
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
40
|
+
stepLength: {
|
|
41
|
+
type: NumberConstructor;
|
|
42
|
+
default: number;
|
|
43
|
+
validator: (value: number) => boolean;
|
|
44
|
+
};
|
|
45
|
+
reverse: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
debug: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
limitFps: {
|
|
54
|
+
type: NumberConstructor;
|
|
55
|
+
default: number;
|
|
56
|
+
};
|
|
57
|
+
pauseOnHover: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
}>> & Readonly<{
|
|
62
|
+
onChange?: ((evt: string | string[]) => any) | undefined;
|
|
63
|
+
}>, {
|
|
64
|
+
reverse: boolean;
|
|
65
|
+
stepLength: number;
|
|
66
|
+
debug: boolean;
|
|
67
|
+
limitFps: number;
|
|
68
|
+
pauseOnHover: boolean;
|
|
69
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
70
|
+
refDom: HTMLDivElement;
|
|
71
|
+
refWarp: HTMLDivElement;
|
|
72
|
+
refLine: HTMLDivElement;
|
|
73
|
+
}, HTMLDivElement>;
|
|
74
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
75
|
+
export default _default;
|
|
76
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
77
|
+
new (): {
|
|
78
|
+
$slots: S;
|
|
79
|
+
};
|
|
80
|
+
};
|