@fecp/mobile 1.1.4 → 1.1.6
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/es/mobile.css +39 -1
- package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/composables/use-route.mjs +0 -1
- package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/grid/Grid.mjs +0 -1
- package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/grid-item/GridItem.mjs +0 -1
- package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/grid-item/index.mjs +0 -1
- package/es/packages/mobile/src/components/feedback/floatingBubble/FloatingBubble.mjs +207 -0
- package/es/packages/mobile/src/components/feedback/floatingBubble/FloatingBubble.vue.mjs +14 -10
- package/lib/mobile.css +39 -1
- package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/composables/use-route.js +0 -1
- package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/grid/Grid.js +0 -1
- package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/grid-item/GridItem.js +0 -1
- package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/grid-item/index.js +0 -1
- package/lib/packages/mobile/src/components/feedback/floatingBubble/FloatingBubble.js +207 -0
- package/lib/packages/mobile/src/components/feedback/floatingBubble/FloatingBubble.vue.js +13 -9
- package/package.json +1 -1
package/es/mobile.css
CHANGED
|
@@ -56,7 +56,45 @@
|
|
|
56
56
|
:root,:host{--van-dropdown-menu-height: 48px;--van-dropdown-menu-background: var(--van-background-2);--van-dropdown-menu-shadow: 0 2px 12px rgba(100, 101, 102, .12);--van-dropdown-menu-title-font-size: 15px;--van-dropdown-menu-title-text-color: var(--van-text-color);--van-dropdown-menu-title-active-text-color: var(--van-primary-color);--van-dropdown-menu-title-disabled-text-color: var(--van-text-color-2);--van-dropdown-menu-title-padding: 0 var(--van-padding-xs);--van-dropdown-menu-title-line-height: var(--van-line-height-lg);--van-dropdown-menu-option-active-color: var(--van-primary-color);--van-dropdown-menu-option-disabled-color: var(--van-text-color-3);--van-dropdown-menu-content-max-height: 80%}.van-dropdown-menu{-webkit-user-select:none;user-select:none}.van-dropdown-menu__bar{position:relative;display:flex;height:var(--van-dropdown-menu-height);background:var(--van-dropdown-menu-background);box-shadow:var(--van-dropdown-menu-shadow)}.van-dropdown-menu__bar--opened{z-index:calc(var(--van-dropdown-item-z-index) + 1)}.van-dropdown-menu__bar--scrollable{padding-left:var(--van-padding-base);padding-right:var(--van-padding-xs);overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.van-dropdown-menu__bar--scrollable::-webkit-scrollbar{display:none}.van-dropdown-menu__item{display:flex;flex:1;align-items:center;justify-content:center;min-width:0}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:var(--van-dropdown-menu-title-disabled-text-color)}.van-dropdown-menu__item--grow{flex:1 0 auto;padding-left:var(--van-padding-base);padding-right:var(--van-padding-sm)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:var(--van-dropdown-menu-title-padding);color:var(--van-dropdown-menu-title-text-color);font-size:var(--van-dropdown-menu-title-font-size);line-height:var(--van-dropdown-menu-title-line-height)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border:3px solid;border-color:transparent transparent var(--van-gray-4) var(--van-gray-4);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:var(--van-dropdown-menu-title-active-text-color)}.van-dropdown-menu__title--active:after{border-color:transparent transparent currentColor currentColor}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}
|
|
57
57
|
:root,:host{--van-dropdown-item-z-index: 10}.van-dropdown-item{position:fixed;right:0;left:0;z-index:var(--van-dropdown-item-z-index);overflow:hidden}.van-dropdown-item__icon{display:block;line-height:inherit}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active,.van-dropdown-item__option--active .van-dropdown-item__icon{color:var(--van-dropdown-menu-option-active-color)}.van-dropdown-item__option--disabled,.van-dropdown-item__option--disabled .van-dropdown-item__icon{color:var(--van-dropdown-menu-option-disabled-color)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__content{position:absolute;max-height:var(--van-dropdown-menu-content-max-height)}
|
|
58
58
|
:root,:host{--van-floating-panel-border-radius: 16px;--van-floating-panel-header-height: 30px;--van-floating-panel-z-index: 999;--van-floating-panel-background: var(--van-background-2);--van-floating-panel-bar-width: 20px;--van-floating-panel-bar-height: 3px;--van-floating-panel-bar-color: var(--van-gray-5)}.van-floating-panel{position:fixed;left:0;bottom:0;width:100vw;z-index:var(--van-floating-panel-z-index);display:flex;flex-direction:column;touch-action:none;border-top-left-radius:var(--van-floating-panel-border-radius);border-top-right-radius:var(--van-floating-panel-border-radius);background:var(--van-floating-panel-background);will-change:transform}.van-floating-panel:after{content:"";display:block;position:absolute;bottom:-100vh;height:100vh;width:100vw;background-color:inherit}.van-floating-panel__header{height:var(--van-floating-panel-header-height);display:flex;justify-content:center;align-items:center;cursor:-webkit-grab;cursor:grab;-webkit-user-select:none;user-select:none}.van-floating-panel__header-bar{height:var(--van-floating-panel-bar-height);width:var(--van-floating-panel-bar-width);border-radius:var(--van-radius-md);background:var(--van-floating-panel-bar-color)}.van-floating-panel__content{flex:1;overflow-y:auto;background-color:var(--van-floating-panel-background)}
|
|
59
|
-
:root
|
|
59
|
+
:root,
|
|
60
|
+
:host {
|
|
61
|
+
--van-floating-bubble-size: 48px;
|
|
62
|
+
--van-floating-bubble-initial-gap: 24px;
|
|
63
|
+
--van-floating-bubble-icon-size: 28px;
|
|
64
|
+
--van-floating-bubble-background: var(--van-primary-color);
|
|
65
|
+
--van-floating-bubble-color: var(--van-background-2);
|
|
66
|
+
--van-floating-bubble-z-index: 999;
|
|
67
|
+
--van-floating-bubble-border-radius: var(--van-radius-max);
|
|
68
|
+
}
|
|
69
|
+
.van-floating-bubble {
|
|
70
|
+
position: fixed;
|
|
71
|
+
left: 0;
|
|
72
|
+
top: 0;
|
|
73
|
+
right: var(--van-floating-bubble-initial-gap);
|
|
74
|
+
bottom: var(--van-floating-bubble-initial-gap);
|
|
75
|
+
width: var(--van-floating-bubble-size);
|
|
76
|
+
height: var(--van-floating-bubble-size);
|
|
77
|
+
box-sizing: border-box;
|
|
78
|
+
display: flex;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
align-items: center;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
-webkit-user-select: none;
|
|
84
|
+
user-select: none;
|
|
85
|
+
touch-action: none;
|
|
86
|
+
background: var(--van-floating-bubble-background);
|
|
87
|
+
color: var(--van-floating-bubble-color);
|
|
88
|
+
border-radius: var(--van-floating-bubble-border-radius);
|
|
89
|
+
z-index: var(--van-floating-bubble-z-index);
|
|
90
|
+
transition: transform var(--van-duration-base);
|
|
91
|
+
}
|
|
92
|
+
.van-floating-bubble:active {
|
|
93
|
+
opacity: 0.8;
|
|
94
|
+
}
|
|
95
|
+
.van-floating-bubble__icon {
|
|
96
|
+
font-size: var(--van-floating-bubble-icon-size);
|
|
97
|
+
}
|
|
60
98
|
:root,:host{--van-pull-refresh-head-height: 50px;--van-pull-refresh-head-font-size: var(--van-font-size-md);--van-pull-refresh-head-text-color: var(--van-text-color-2);--van-pull-refresh-loading-icon-size: 16px}.van-pull-refresh{overflow:hidden}.van-pull-refresh__track{position:relative;height:100%;transition-property:transform}.van-pull-refresh__head{position:absolute;left:0;width:100%;height:var(--van-pull-refresh-head-height);overflow:hidden;color:var(--van-pull-refresh-head-text-color);font-size:var(--van-pull-refresh-head-font-size);line-height:var(--van-pull-refresh-head-height);text-align:center;transform:translateY(-100%)}.van-pull-refresh__loading .van-loading__spinner{width:var(--van-pull-refresh-loading-icon-size);height:var(--van-pull-refresh-loading-icon-size)}
|
|
61
99
|
.van-swipe-cell{position:relative;overflow:hidden;cursor:-webkit-grab;cursor:grab}.van-swipe-cell__wrapper{transition-timing-function:cubic-bezier(.18,.89,.32,1);transition-property:transform}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;transform:translate3d(100%,0,0)}
|
|
62
100
|
.van-checkbox-group--horizontal{display:flex;flex-wrap:wrap}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, nextTick, watch, onActivated, onDeactivated, withDirectives, createVNode, mergeProps, vShow, Teleport } from "vue";
|
|
2
|
+
import { useEventListener, useRect } from "../../../../../../node_modules/.pnpm/@vant_use@1.6.0_vue@3.5.13_typescript@5.7.3_/node_modules/@vant/use/dist/index.esm.mjs";
|
|
3
|
+
import { useTouch } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/composables/use-touch.mjs";
|
|
4
|
+
import stdin_default$1 from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/icon/index.mjs";
|
|
5
|
+
import { createNamespace } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/utils/create.mjs";
|
|
6
|
+
import { makeStringProp, makeNumberProp } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/utils/props.mjs";
|
|
7
|
+
import { windowHeight, windowWidth } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/utils/dom.mjs";
|
|
8
|
+
import { addUnit } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/utils/format.mjs";
|
|
9
|
+
import { pick } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/utils/basic.mjs";
|
|
10
|
+
import { closest } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/utils/closest.mjs";
|
|
11
|
+
const floatingBubbleProps = {
|
|
12
|
+
gapX: makeNumberProp(24),
|
|
13
|
+
gapY: makeNumberProp(24),
|
|
14
|
+
icon: String,
|
|
15
|
+
axis: makeStringProp("y"),
|
|
16
|
+
magnetic: String,
|
|
17
|
+
offset: {
|
|
18
|
+
type: Object,
|
|
19
|
+
default: () => ({
|
|
20
|
+
x: -1,
|
|
21
|
+
y: -1
|
|
22
|
+
})
|
|
23
|
+
},
|
|
24
|
+
teleport: {
|
|
25
|
+
type: [String, Object],
|
|
26
|
+
default: "body"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const [name, bem] = createNamespace("floating-bubble");
|
|
30
|
+
var stdin_default = defineComponent({
|
|
31
|
+
name,
|
|
32
|
+
inheritAttrs: false,
|
|
33
|
+
props: floatingBubbleProps,
|
|
34
|
+
emits: ["click", "update:offset", "offsetChange"],
|
|
35
|
+
setup(props, { slots, emit, attrs }) {
|
|
36
|
+
const rootRef = ref();
|
|
37
|
+
const state = ref({
|
|
38
|
+
x: 0,
|
|
39
|
+
y: 0,
|
|
40
|
+
width: 0,
|
|
41
|
+
height: 0
|
|
42
|
+
});
|
|
43
|
+
const boundary = computed(() => ({
|
|
44
|
+
top: props.gapY,
|
|
45
|
+
right: windowWidth.value - state.value.width - props.gapX,
|
|
46
|
+
bottom: windowHeight.value - state.value.height - props.gapY,
|
|
47
|
+
left: props.gapX
|
|
48
|
+
}));
|
|
49
|
+
const dragging = ref(false);
|
|
50
|
+
let initialized = false;
|
|
51
|
+
const rootStyle = computed(() => {
|
|
52
|
+
const style = {};
|
|
53
|
+
const x = addUnit(state.value.x);
|
|
54
|
+
const y = addUnit(state.value.y);
|
|
55
|
+
style.transform = `translate3d(${x}, ${y}, 0)`;
|
|
56
|
+
if (dragging.value || !initialized) {
|
|
57
|
+
style.transition = "none";
|
|
58
|
+
}
|
|
59
|
+
return style;
|
|
60
|
+
});
|
|
61
|
+
const updateState = () => {
|
|
62
|
+
if (!show.value) return;
|
|
63
|
+
const { width, height } = useRect(rootRef.value);
|
|
64
|
+
const { offset } = props;
|
|
65
|
+
state.value = {
|
|
66
|
+
x: offset.x > -1 ? offset.x : windowWidth.value - width - props.gapX,
|
|
67
|
+
y: offset.y > -1 ? offset.y : windowHeight.value - height - props.gapY,
|
|
68
|
+
width,
|
|
69
|
+
height
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
const touch = useTouch();
|
|
73
|
+
let prevX = 0;
|
|
74
|
+
let prevY = 0;
|
|
75
|
+
const onTouchStart = (e) => {
|
|
76
|
+
touch.start(e);
|
|
77
|
+
dragging.value = true;
|
|
78
|
+
prevX = state.value.x;
|
|
79
|
+
prevY = state.value.y;
|
|
80
|
+
};
|
|
81
|
+
const onTouchMove = (e) => {
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
touch.move(e);
|
|
84
|
+
if (props.axis === "lock") return;
|
|
85
|
+
if (!touch.isTap.value) {
|
|
86
|
+
if (props.axis === "x" || props.axis === "xy") {
|
|
87
|
+
let nextX = prevX + touch.deltaX.value;
|
|
88
|
+
if (nextX < boundary.value.left) nextX = boundary.value.left;
|
|
89
|
+
if (nextX > boundary.value.right) nextX = boundary.value.right;
|
|
90
|
+
state.value.x = nextX;
|
|
91
|
+
}
|
|
92
|
+
if (props.axis === "y" || props.axis === "xy") {
|
|
93
|
+
let nextY = prevY + touch.deltaY.value;
|
|
94
|
+
if (nextY < boundary.value.top) nextY = boundary.value.top;
|
|
95
|
+
if (nextY > boundary.value.bottom) nextY = boundary.value.bottom;
|
|
96
|
+
state.value.y = nextY;
|
|
97
|
+
}
|
|
98
|
+
const offset = pick(state.value, ["x", "y"]);
|
|
99
|
+
emit("update:offset", offset);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
useEventListener("touchmove", onTouchMove, {
|
|
103
|
+
target: rootRef
|
|
104
|
+
});
|
|
105
|
+
const onTouchEnd = () => {
|
|
106
|
+
dragging.value = false;
|
|
107
|
+
nextTick(() => {
|
|
108
|
+
if (props.magnetic === "x") {
|
|
109
|
+
const nextX = closest(
|
|
110
|
+
[boundary.value.left, boundary.value.right],
|
|
111
|
+
state.value.x
|
|
112
|
+
);
|
|
113
|
+
state.value.x = nextX;
|
|
114
|
+
}
|
|
115
|
+
if (props.magnetic === "y") {
|
|
116
|
+
const nextY = closest(
|
|
117
|
+
[boundary.value.top, boundary.value.bottom],
|
|
118
|
+
state.value.y
|
|
119
|
+
);
|
|
120
|
+
state.value.y = nextY;
|
|
121
|
+
}
|
|
122
|
+
if (!touch.isTap.value) {
|
|
123
|
+
const offset = pick(state.value, ["x", "y"]);
|
|
124
|
+
emit("update:offset", offset);
|
|
125
|
+
if (prevX !== offset.x || prevY !== offset.y) {
|
|
126
|
+
emit("offsetChange", offset);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
const onClick = (e) => {
|
|
132
|
+
if (touch.isTap.value) emit("click", e);
|
|
133
|
+
else e.stopPropagation();
|
|
134
|
+
};
|
|
135
|
+
onMounted(() => {
|
|
136
|
+
updateState();
|
|
137
|
+
nextTick(() => {
|
|
138
|
+
initialized = true;
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
watch(
|
|
142
|
+
[
|
|
143
|
+
windowWidth,
|
|
144
|
+
windowHeight,
|
|
145
|
+
() => props.gapX,
|
|
146
|
+
() => props.gapY,
|
|
147
|
+
() => props.offset
|
|
148
|
+
],
|
|
149
|
+
updateState,
|
|
150
|
+
{
|
|
151
|
+
deep: true
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
const show = ref(true);
|
|
155
|
+
onActivated(() => {
|
|
156
|
+
show.value = true;
|
|
157
|
+
});
|
|
158
|
+
onDeactivated(() => {
|
|
159
|
+
if (props.teleport) {
|
|
160
|
+
show.value = false;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
return () => {
|
|
164
|
+
const Content = withDirectives(
|
|
165
|
+
createVNode(
|
|
166
|
+
"div",
|
|
167
|
+
mergeProps(
|
|
168
|
+
{
|
|
169
|
+
class: bem(),
|
|
170
|
+
ref: rootRef,
|
|
171
|
+
onTouchstartPassive: onTouchStart,
|
|
172
|
+
onTouchend: onTouchEnd,
|
|
173
|
+
onTouchcancel: onTouchEnd,
|
|
174
|
+
onClickCapture: onClick,
|
|
175
|
+
style: rootStyle.value
|
|
176
|
+
},
|
|
177
|
+
attrs
|
|
178
|
+
),
|
|
179
|
+
[
|
|
180
|
+
slots.default ? slots.default() : createVNode(
|
|
181
|
+
stdin_default$1,
|
|
182
|
+
{
|
|
183
|
+
name: props.icon,
|
|
184
|
+
class: bem("icon")
|
|
185
|
+
},
|
|
186
|
+
null
|
|
187
|
+
)
|
|
188
|
+
]
|
|
189
|
+
),
|
|
190
|
+
[[vShow, show.value]]
|
|
191
|
+
);
|
|
192
|
+
return props.teleport ? createVNode(
|
|
193
|
+
Teleport,
|
|
194
|
+
{
|
|
195
|
+
to: props.teleport
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
default: () => [Content]
|
|
199
|
+
}
|
|
200
|
+
) : Content;
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
export {
|
|
205
|
+
stdin_default as default,
|
|
206
|
+
floatingBubbleProps
|
|
207
|
+
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* empty css
|
|
4
|
-
/* empty css */
|
|
5
|
-
import { createBlock, openBlock, mergeProps, unref, createSlots, renderList, withCtx, renderSlot } from "vue";
|
|
1
|
+
import { computed, createBlock, openBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot } from "vue";
|
|
2
|
+
import stdin_default from "./FloatingBubble.mjs";
|
|
3
|
+
/* empty css */
|
|
6
4
|
import { routeProps, useRoute } from "../../../utils/use-route.mjs";
|
|
7
|
-
import { FloatingBubble } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/floating-bubble/index.mjs";
|
|
8
5
|
const _sfc_main = {
|
|
9
6
|
__name: "FloatingBubble",
|
|
10
7
|
props: {
|
|
@@ -22,11 +19,18 @@ const _sfc_main = {
|
|
|
22
19
|
},
|
|
23
20
|
setup(__props) {
|
|
24
21
|
const route = useRoute();
|
|
22
|
+
const props = __props;
|
|
23
|
+
const compMagnetic = computed(() => {
|
|
24
|
+
if (props.axis == "xy") {
|
|
25
|
+
return props.magnetic;
|
|
26
|
+
} else {
|
|
27
|
+
return "";
|
|
28
|
+
}
|
|
29
|
+
});
|
|
25
30
|
return (_ctx, _cache) => {
|
|
26
|
-
|
|
27
|
-
return openBlock(), createBlock(_component_van_floating_bubble, mergeProps(_ctx.$attrs, {
|
|
31
|
+
return openBlock(), createBlock(unref(stdin_default), mergeProps(_ctx.$attrs, {
|
|
28
32
|
axis: __props.axis,
|
|
29
|
-
magnetic:
|
|
33
|
+
magnetic: compMagnetic.value,
|
|
30
34
|
onClick: unref(route)
|
|
31
35
|
}), createSlots({ _: 2 }, [
|
|
32
36
|
renderList(_ctx.$slots, (item, key) => {
|
|
@@ -37,7 +41,7 @@ const _sfc_main = {
|
|
|
37
41
|
])
|
|
38
42
|
};
|
|
39
43
|
})
|
|
40
|
-
]), 1040, ["axis", "onClick"]);
|
|
44
|
+
]), 1040, ["axis", "magnetic", "onClick"]);
|
|
41
45
|
};
|
|
42
46
|
}
|
|
43
47
|
};
|
package/lib/mobile.css
CHANGED
|
@@ -56,7 +56,45 @@
|
|
|
56
56
|
:root,:host{--van-dropdown-menu-height: 48px;--van-dropdown-menu-background: var(--van-background-2);--van-dropdown-menu-shadow: 0 2px 12px rgba(100, 101, 102, .12);--van-dropdown-menu-title-font-size: 15px;--van-dropdown-menu-title-text-color: var(--van-text-color);--van-dropdown-menu-title-active-text-color: var(--van-primary-color);--van-dropdown-menu-title-disabled-text-color: var(--van-text-color-2);--van-dropdown-menu-title-padding: 0 var(--van-padding-xs);--van-dropdown-menu-title-line-height: var(--van-line-height-lg);--van-dropdown-menu-option-active-color: var(--van-primary-color);--van-dropdown-menu-option-disabled-color: var(--van-text-color-3);--van-dropdown-menu-content-max-height: 80%}.van-dropdown-menu{-webkit-user-select:none;user-select:none}.van-dropdown-menu__bar{position:relative;display:flex;height:var(--van-dropdown-menu-height);background:var(--van-dropdown-menu-background);box-shadow:var(--van-dropdown-menu-shadow)}.van-dropdown-menu__bar--opened{z-index:calc(var(--van-dropdown-item-z-index) + 1)}.van-dropdown-menu__bar--scrollable{padding-left:var(--van-padding-base);padding-right:var(--van-padding-xs);overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.van-dropdown-menu__bar--scrollable::-webkit-scrollbar{display:none}.van-dropdown-menu__item{display:flex;flex:1;align-items:center;justify-content:center;min-width:0}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:var(--van-dropdown-menu-title-disabled-text-color)}.van-dropdown-menu__item--grow{flex:1 0 auto;padding-left:var(--van-padding-base);padding-right:var(--van-padding-sm)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:var(--van-dropdown-menu-title-padding);color:var(--van-dropdown-menu-title-text-color);font-size:var(--van-dropdown-menu-title-font-size);line-height:var(--van-dropdown-menu-title-line-height)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border:3px solid;border-color:transparent transparent var(--van-gray-4) var(--van-gray-4);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:var(--van-dropdown-menu-title-active-text-color)}.van-dropdown-menu__title--active:after{border-color:transparent transparent currentColor currentColor}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}
|
|
57
57
|
:root,:host{--van-dropdown-item-z-index: 10}.van-dropdown-item{position:fixed;right:0;left:0;z-index:var(--van-dropdown-item-z-index);overflow:hidden}.van-dropdown-item__icon{display:block;line-height:inherit}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active,.van-dropdown-item__option--active .van-dropdown-item__icon{color:var(--van-dropdown-menu-option-active-color)}.van-dropdown-item__option--disabled,.van-dropdown-item__option--disabled .van-dropdown-item__icon{color:var(--van-dropdown-menu-option-disabled-color)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__content{position:absolute;max-height:var(--van-dropdown-menu-content-max-height)}
|
|
58
58
|
:root,:host{--van-floating-panel-border-radius: 16px;--van-floating-panel-header-height: 30px;--van-floating-panel-z-index: 999;--van-floating-panel-background: var(--van-background-2);--van-floating-panel-bar-width: 20px;--van-floating-panel-bar-height: 3px;--van-floating-panel-bar-color: var(--van-gray-5)}.van-floating-panel{position:fixed;left:0;bottom:0;width:100vw;z-index:var(--van-floating-panel-z-index);display:flex;flex-direction:column;touch-action:none;border-top-left-radius:var(--van-floating-panel-border-radius);border-top-right-radius:var(--van-floating-panel-border-radius);background:var(--van-floating-panel-background);will-change:transform}.van-floating-panel:after{content:"";display:block;position:absolute;bottom:-100vh;height:100vh;width:100vw;background-color:inherit}.van-floating-panel__header{height:var(--van-floating-panel-header-height);display:flex;justify-content:center;align-items:center;cursor:-webkit-grab;cursor:grab;-webkit-user-select:none;user-select:none}.van-floating-panel__header-bar{height:var(--van-floating-panel-bar-height);width:var(--van-floating-panel-bar-width);border-radius:var(--van-radius-md);background:var(--van-floating-panel-bar-color)}.van-floating-panel__content{flex:1;overflow-y:auto;background-color:var(--van-floating-panel-background)}
|
|
59
|
-
:root
|
|
59
|
+
:root,
|
|
60
|
+
:host {
|
|
61
|
+
--van-floating-bubble-size: 48px;
|
|
62
|
+
--van-floating-bubble-initial-gap: 24px;
|
|
63
|
+
--van-floating-bubble-icon-size: 28px;
|
|
64
|
+
--van-floating-bubble-background: var(--van-primary-color);
|
|
65
|
+
--van-floating-bubble-color: var(--van-background-2);
|
|
66
|
+
--van-floating-bubble-z-index: 999;
|
|
67
|
+
--van-floating-bubble-border-radius: var(--van-radius-max);
|
|
68
|
+
}
|
|
69
|
+
.van-floating-bubble {
|
|
70
|
+
position: fixed;
|
|
71
|
+
left: 0;
|
|
72
|
+
top: 0;
|
|
73
|
+
right: var(--van-floating-bubble-initial-gap);
|
|
74
|
+
bottom: var(--van-floating-bubble-initial-gap);
|
|
75
|
+
width: var(--van-floating-bubble-size);
|
|
76
|
+
height: var(--van-floating-bubble-size);
|
|
77
|
+
box-sizing: border-box;
|
|
78
|
+
display: flex;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
align-items: center;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
-webkit-user-select: none;
|
|
84
|
+
user-select: none;
|
|
85
|
+
touch-action: none;
|
|
86
|
+
background: var(--van-floating-bubble-background);
|
|
87
|
+
color: var(--van-floating-bubble-color);
|
|
88
|
+
border-radius: var(--van-floating-bubble-border-radius);
|
|
89
|
+
z-index: var(--van-floating-bubble-z-index);
|
|
90
|
+
transition: transform var(--van-duration-base);
|
|
91
|
+
}
|
|
92
|
+
.van-floating-bubble:active {
|
|
93
|
+
opacity: 0.8;
|
|
94
|
+
}
|
|
95
|
+
.van-floating-bubble__icon {
|
|
96
|
+
font-size: var(--van-floating-bubble-icon-size);
|
|
97
|
+
}
|
|
60
98
|
:root,:host{--van-pull-refresh-head-height: 50px;--van-pull-refresh-head-font-size: var(--van-font-size-md);--van-pull-refresh-head-text-color: var(--van-text-color-2);--van-pull-refresh-loading-icon-size: 16px}.van-pull-refresh{overflow:hidden}.van-pull-refresh__track{position:relative;height:100%;transition-property:transform}.van-pull-refresh__head{position:absolute;left:0;width:100%;height:var(--van-pull-refresh-head-height);overflow:hidden;color:var(--van-pull-refresh-head-text-color);font-size:var(--van-pull-refresh-head-font-size);line-height:var(--van-pull-refresh-head-height);text-align:center;transform:translateY(-100%)}.van-pull-refresh__loading .van-loading__spinner{width:var(--van-pull-refresh-loading-icon-size);height:var(--van-pull-refresh-loading-icon-size)}
|
|
61
99
|
.van-swipe-cell{position:relative;overflow:hidden;cursor:-webkit-grab;cursor:grab}.van-swipe-cell__wrapper{transition-timing-function:cubic-bezier(.18,.89,.32,1);transition-property:transform}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;transform:translate3d(100%,0,0)}
|
|
62
100
|
.van-checkbox-group--horizontal{display:flex;flex-wrap:wrap}
|
|
@@ -3,6 +3,5 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const GridItem$1 = require("./GridItem.js");
|
|
4
4
|
const withInstall = require("../utils/with-install.js");
|
|
5
5
|
const GridItem = withInstall.withInstall(GridItem$1.default);
|
|
6
|
-
debugger;
|
|
7
6
|
exports.gridItemProps = GridItem$1.gridItemProps;
|
|
8
7
|
exports.GridItem = GridItem;
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const index_esm = require("../../../../../../node_modules/.pnpm/@vant_use@1.6.0_vue@3.5.13_typescript@5.7.3_/node_modules/@vant/use/dist/index.esm.js");
|
|
5
|
+
const useTouch = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/composables/use-touch.js");
|
|
6
|
+
const index = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/icon/index.js");
|
|
7
|
+
const create = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/utils/create.js");
|
|
8
|
+
const props = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/utils/props.js");
|
|
9
|
+
const dom = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/utils/dom.js");
|
|
10
|
+
const format = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/utils/format.js");
|
|
11
|
+
const basic = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/utils/basic.js");
|
|
12
|
+
const closest = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/utils/closest.js");
|
|
13
|
+
const floatingBubbleProps = {
|
|
14
|
+
gapX: props.makeNumberProp(24),
|
|
15
|
+
gapY: props.makeNumberProp(24),
|
|
16
|
+
icon: String,
|
|
17
|
+
axis: props.makeStringProp("y"),
|
|
18
|
+
magnetic: String,
|
|
19
|
+
offset: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => ({
|
|
22
|
+
x: -1,
|
|
23
|
+
y: -1
|
|
24
|
+
})
|
|
25
|
+
},
|
|
26
|
+
teleport: {
|
|
27
|
+
type: [String, Object],
|
|
28
|
+
default: "body"
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const [name, bem] = create.createNamespace("floating-bubble");
|
|
32
|
+
var stdin_default = vue.defineComponent({
|
|
33
|
+
name,
|
|
34
|
+
inheritAttrs: false,
|
|
35
|
+
props: floatingBubbleProps,
|
|
36
|
+
emits: ["click", "update:offset", "offsetChange"],
|
|
37
|
+
setup(props2, { slots, emit, attrs }) {
|
|
38
|
+
const rootRef = vue.ref();
|
|
39
|
+
const state = vue.ref({
|
|
40
|
+
x: 0,
|
|
41
|
+
y: 0,
|
|
42
|
+
width: 0,
|
|
43
|
+
height: 0
|
|
44
|
+
});
|
|
45
|
+
const boundary = vue.computed(() => ({
|
|
46
|
+
top: props2.gapY,
|
|
47
|
+
right: dom.windowWidth.value - state.value.width - props2.gapX,
|
|
48
|
+
bottom: dom.windowHeight.value - state.value.height - props2.gapY,
|
|
49
|
+
left: props2.gapX
|
|
50
|
+
}));
|
|
51
|
+
const dragging = vue.ref(false);
|
|
52
|
+
let initialized = false;
|
|
53
|
+
const rootStyle = vue.computed(() => {
|
|
54
|
+
const style = {};
|
|
55
|
+
const x = format.addUnit(state.value.x);
|
|
56
|
+
const y = format.addUnit(state.value.y);
|
|
57
|
+
style.transform = `translate3d(${x}, ${y}, 0)`;
|
|
58
|
+
if (dragging.value || !initialized) {
|
|
59
|
+
style.transition = "none";
|
|
60
|
+
}
|
|
61
|
+
return style;
|
|
62
|
+
});
|
|
63
|
+
const updateState = () => {
|
|
64
|
+
if (!show.value) return;
|
|
65
|
+
const { width, height } = index_esm.useRect(rootRef.value);
|
|
66
|
+
const { offset } = props2;
|
|
67
|
+
state.value = {
|
|
68
|
+
x: offset.x > -1 ? offset.x : dom.windowWidth.value - width - props2.gapX,
|
|
69
|
+
y: offset.y > -1 ? offset.y : dom.windowHeight.value - height - props2.gapY,
|
|
70
|
+
width,
|
|
71
|
+
height
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
const touch = useTouch.useTouch();
|
|
75
|
+
let prevX = 0;
|
|
76
|
+
let prevY = 0;
|
|
77
|
+
const onTouchStart = (e) => {
|
|
78
|
+
touch.start(e);
|
|
79
|
+
dragging.value = true;
|
|
80
|
+
prevX = state.value.x;
|
|
81
|
+
prevY = state.value.y;
|
|
82
|
+
};
|
|
83
|
+
const onTouchMove = (e) => {
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
touch.move(e);
|
|
86
|
+
if (props2.axis === "lock") return;
|
|
87
|
+
if (!touch.isTap.value) {
|
|
88
|
+
if (props2.axis === "x" || props2.axis === "xy") {
|
|
89
|
+
let nextX = prevX + touch.deltaX.value;
|
|
90
|
+
if (nextX < boundary.value.left) nextX = boundary.value.left;
|
|
91
|
+
if (nextX > boundary.value.right) nextX = boundary.value.right;
|
|
92
|
+
state.value.x = nextX;
|
|
93
|
+
}
|
|
94
|
+
if (props2.axis === "y" || props2.axis === "xy") {
|
|
95
|
+
let nextY = prevY + touch.deltaY.value;
|
|
96
|
+
if (nextY < boundary.value.top) nextY = boundary.value.top;
|
|
97
|
+
if (nextY > boundary.value.bottom) nextY = boundary.value.bottom;
|
|
98
|
+
state.value.y = nextY;
|
|
99
|
+
}
|
|
100
|
+
const offset = basic.pick(state.value, ["x", "y"]);
|
|
101
|
+
emit("update:offset", offset);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
index_esm.useEventListener("touchmove", onTouchMove, {
|
|
105
|
+
target: rootRef
|
|
106
|
+
});
|
|
107
|
+
const onTouchEnd = () => {
|
|
108
|
+
dragging.value = false;
|
|
109
|
+
vue.nextTick(() => {
|
|
110
|
+
if (props2.magnetic === "x") {
|
|
111
|
+
const nextX = closest.closest(
|
|
112
|
+
[boundary.value.left, boundary.value.right],
|
|
113
|
+
state.value.x
|
|
114
|
+
);
|
|
115
|
+
state.value.x = nextX;
|
|
116
|
+
}
|
|
117
|
+
if (props2.magnetic === "y") {
|
|
118
|
+
const nextY = closest.closest(
|
|
119
|
+
[boundary.value.top, boundary.value.bottom],
|
|
120
|
+
state.value.y
|
|
121
|
+
);
|
|
122
|
+
state.value.y = nextY;
|
|
123
|
+
}
|
|
124
|
+
if (!touch.isTap.value) {
|
|
125
|
+
const offset = basic.pick(state.value, ["x", "y"]);
|
|
126
|
+
emit("update:offset", offset);
|
|
127
|
+
if (prevX !== offset.x || prevY !== offset.y) {
|
|
128
|
+
emit("offsetChange", offset);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
const onClick = (e) => {
|
|
134
|
+
if (touch.isTap.value) emit("click", e);
|
|
135
|
+
else e.stopPropagation();
|
|
136
|
+
};
|
|
137
|
+
vue.onMounted(() => {
|
|
138
|
+
updateState();
|
|
139
|
+
vue.nextTick(() => {
|
|
140
|
+
initialized = true;
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
vue.watch(
|
|
144
|
+
[
|
|
145
|
+
dom.windowWidth,
|
|
146
|
+
dom.windowHeight,
|
|
147
|
+
() => props2.gapX,
|
|
148
|
+
() => props2.gapY,
|
|
149
|
+
() => props2.offset
|
|
150
|
+
],
|
|
151
|
+
updateState,
|
|
152
|
+
{
|
|
153
|
+
deep: true
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
const show = vue.ref(true);
|
|
157
|
+
vue.onActivated(() => {
|
|
158
|
+
show.value = true;
|
|
159
|
+
});
|
|
160
|
+
vue.onDeactivated(() => {
|
|
161
|
+
if (props2.teleport) {
|
|
162
|
+
show.value = false;
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
return () => {
|
|
166
|
+
const Content = vue.withDirectives(
|
|
167
|
+
vue.createVNode(
|
|
168
|
+
"div",
|
|
169
|
+
vue.mergeProps(
|
|
170
|
+
{
|
|
171
|
+
class: bem(),
|
|
172
|
+
ref: rootRef,
|
|
173
|
+
onTouchstartPassive: onTouchStart,
|
|
174
|
+
onTouchend: onTouchEnd,
|
|
175
|
+
onTouchcancel: onTouchEnd,
|
|
176
|
+
onClickCapture: onClick,
|
|
177
|
+
style: rootStyle.value
|
|
178
|
+
},
|
|
179
|
+
attrs
|
|
180
|
+
),
|
|
181
|
+
[
|
|
182
|
+
slots.default ? slots.default() : vue.createVNode(
|
|
183
|
+
index.default,
|
|
184
|
+
{
|
|
185
|
+
name: props2.icon,
|
|
186
|
+
class: bem("icon")
|
|
187
|
+
},
|
|
188
|
+
null
|
|
189
|
+
)
|
|
190
|
+
]
|
|
191
|
+
),
|
|
192
|
+
[[vue.vShow, show.value]]
|
|
193
|
+
);
|
|
194
|
+
return props2.teleport ? vue.createVNode(
|
|
195
|
+
vue.Teleport,
|
|
196
|
+
{
|
|
197
|
+
to: props2.teleport
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
default: () => [Content]
|
|
201
|
+
}
|
|
202
|
+
) : Content;
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
exports.default = stdin_default;
|
|
207
|
+
exports.floatingBubbleProps = floatingBubbleProps;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
;/* empty css */
|
|
4
|
-
;/* empty css */
|
|
5
|
-
;/* empty css */
|
|
6
|
-
;/* empty css */
|
|
7
3
|
const vue = require("vue");
|
|
4
|
+
const FloatingBubble = require("./FloatingBubble.js");
|
|
5
|
+
;/* empty css */
|
|
8
6
|
const useRoute = require("../../../utils/use-route.js");
|
|
9
|
-
const index = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/floating-bubble/index.js");
|
|
10
7
|
const _sfc_main = {
|
|
11
8
|
__name: "FloatingBubble",
|
|
12
9
|
props: {
|
|
@@ -24,11 +21,18 @@ const _sfc_main = {
|
|
|
24
21
|
},
|
|
25
22
|
setup(__props) {
|
|
26
23
|
const route = useRoute.useRoute();
|
|
24
|
+
const props = __props;
|
|
25
|
+
const compMagnetic = vue.computed(() => {
|
|
26
|
+
if (props.axis == "xy") {
|
|
27
|
+
return props.magnetic;
|
|
28
|
+
} else {
|
|
29
|
+
return "";
|
|
30
|
+
}
|
|
31
|
+
});
|
|
27
32
|
return (_ctx, _cache) => {
|
|
28
|
-
|
|
29
|
-
return vue.openBlock(), vue.createBlock(_component_van_floating_bubble, vue.mergeProps(_ctx.$attrs, {
|
|
33
|
+
return vue.openBlock(), vue.createBlock(vue.unref(FloatingBubble.default), vue.mergeProps(_ctx.$attrs, {
|
|
30
34
|
axis: __props.axis,
|
|
31
|
-
magnetic:
|
|
35
|
+
magnetic: compMagnetic.value,
|
|
32
36
|
onClick: vue.unref(route)
|
|
33
37
|
}), vue.createSlots({ _: 2 }, [
|
|
34
38
|
vue.renderList(_ctx.$slots, (item, key) => {
|
|
@@ -39,7 +43,7 @@ const _sfc_main = {
|
|
|
39
43
|
])
|
|
40
44
|
};
|
|
41
45
|
})
|
|
42
|
-
]), 1040, ["axis", "onClick"]);
|
|
46
|
+
]), 1040, ["axis", "magnetic", "onClick"]);
|
|
43
47
|
};
|
|
44
48
|
}
|
|
45
49
|
};
|