@fecp/mobile 1.1.3 → 1.1.5
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/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/composables/use-route.mjs +1 -0
- package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/grid/Grid.mjs +1 -0
- 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 +1 -0
- 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 +1 -0
- package/es/packages/mobile/src/components/feedback/floatingBubble/FloatingBubble.vue.mjs +47 -18
- package/es/packages/mobile/src/components/feedback/floatingBubble/index.mjs +2 -2
- package/es/packages/mobile/src/utils/use-route.mjs +23 -0
- 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 +1 -0
- package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/grid/Grid.js +1 -0
- 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 +1 -0
- 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 +1 -0
- package/lib/packages/mobile/src/components/feedback/floatingBubble/FloatingBubble.vue.js +46 -17
- package/lib/packages/mobile/src/utils/use-route.js +23 -0
- package/package.json +1 -1
|
@@ -2,24 +2,53 @@
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { createBlock, openBlock,
|
|
6
|
-
import
|
|
5
|
+
import { computed, createBlock, openBlock, mergeProps, unref, createSlots, renderList, withCtx, renderSlot } from "vue";
|
|
6
|
+
import { routeProps, useRoute } from "../../../utils/use-route.mjs";
|
|
7
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
|
-
const _sfc_main = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
const _sfc_main = {
|
|
9
|
+
__name: "FloatingBubble",
|
|
10
|
+
props: {
|
|
11
|
+
axis: {
|
|
12
|
+
//拖拽的方向,xy 代表自由拖拽,lock 代表禁止拖拽
|
|
13
|
+
type: String,
|
|
14
|
+
default: "xy"
|
|
15
|
+
},
|
|
16
|
+
magnetic: {
|
|
17
|
+
//自动磁吸的方向 'x' | 'y'
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
...routeProps
|
|
22
|
+
},
|
|
23
|
+
setup(__props) {
|
|
24
|
+
const route = useRoute();
|
|
25
|
+
const props = __props;
|
|
26
|
+
const compMagnetic = computed(() => {
|
|
27
|
+
if (props.axis == "xy") {
|
|
28
|
+
return props.magnetic;
|
|
29
|
+
} else {
|
|
30
|
+
return "";
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
const _component_van_floating_bubble = FloatingBubble;
|
|
35
|
+
return openBlock(), createBlock(_component_van_floating_bubble, mergeProps(_ctx.$attrs, {
|
|
36
|
+
axis: __props.axis,
|
|
37
|
+
magnetic: compMagnetic.value,
|
|
38
|
+
onClick: unref(route)
|
|
39
|
+
}), createSlots({ _: 2 }, [
|
|
40
|
+
renderList(_ctx.$slots, (item, key) => {
|
|
41
|
+
return {
|
|
42
|
+
name: key,
|
|
43
|
+
fn: withCtx(() => [
|
|
44
|
+
renderSlot(_ctx.$slots, key)
|
|
45
|
+
])
|
|
46
|
+
};
|
|
47
|
+
})
|
|
48
|
+
]), 1040, ["axis", "magnetic", "onClick"]);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
};
|
|
23
52
|
export {
|
|
24
|
-
|
|
53
|
+
_sfc_main as default
|
|
25
54
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _sfc_main from "./FloatingBubble.vue.mjs";
|
|
2
2
|
import install from "../../../utils/install.mjs";
|
|
3
3
|
const MobileFloatingBubble = install.withInstall(
|
|
4
4
|
"MobileFloatingBubble",
|
|
5
|
-
|
|
5
|
+
_sfc_main
|
|
6
6
|
);
|
|
7
7
|
export {
|
|
8
8
|
MobileFloatingBubble,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getCurrentInstance } from "vue";
|
|
2
|
+
const routeProps = {
|
|
3
|
+
to: [String, Object],
|
|
4
|
+
url: String,
|
|
5
|
+
replace: Boolean
|
|
6
|
+
};
|
|
7
|
+
function route({ to, url, replace, $router: router }) {
|
|
8
|
+
debugger;
|
|
9
|
+
if (to && router) {
|
|
10
|
+
router[replace ? "replace" : "push"](to);
|
|
11
|
+
} else if (url) {
|
|
12
|
+
replace ? location.replace(url) : location.href = url;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function useRoute() {
|
|
16
|
+
const vm = getCurrentInstance().proxy;
|
|
17
|
+
return () => route(vm);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
route,
|
|
21
|
+
routeProps,
|
|
22
|
+
useRoute
|
|
23
|
+
};
|
|
@@ -3,5 +3,6 @@ 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;
|
|
6
7
|
exports.gridItemProps = GridItem$1.gridItemProps;
|
|
7
8
|
exports.GridItem = GridItem;
|
|
@@ -5,21 +5,50 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
5
5
|
;/* empty css */
|
|
6
6
|
;/* empty css */
|
|
7
7
|
const vue = require("vue");
|
|
8
|
-
const
|
|
8
|
+
const useRoute = require("../../../utils/use-route.js");
|
|
9
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
|
-
const _sfc_main = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
const _sfc_main = {
|
|
11
|
+
__name: "FloatingBubble",
|
|
12
|
+
props: {
|
|
13
|
+
axis: {
|
|
14
|
+
//拖拽的方向,xy 代表自由拖拽,lock 代表禁止拖拽
|
|
15
|
+
type: String,
|
|
16
|
+
default: "xy"
|
|
17
|
+
},
|
|
18
|
+
magnetic: {
|
|
19
|
+
//自动磁吸的方向 'x' | 'y'
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
...useRoute.routeProps
|
|
24
|
+
},
|
|
25
|
+
setup(__props) {
|
|
26
|
+
const route = useRoute.useRoute();
|
|
27
|
+
const props = __props;
|
|
28
|
+
const compMagnetic = vue.computed(() => {
|
|
29
|
+
if (props.axis == "xy") {
|
|
30
|
+
return props.magnetic;
|
|
31
|
+
} else {
|
|
32
|
+
return "";
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
const _component_van_floating_bubble = index.FloatingBubble;
|
|
37
|
+
return vue.openBlock(), vue.createBlock(_component_van_floating_bubble, vue.mergeProps(_ctx.$attrs, {
|
|
38
|
+
axis: __props.axis,
|
|
39
|
+
magnetic: compMagnetic.value,
|
|
40
|
+
onClick: vue.unref(route)
|
|
41
|
+
}), vue.createSlots({ _: 2 }, [
|
|
42
|
+
vue.renderList(_ctx.$slots, (item, key) => {
|
|
43
|
+
return {
|
|
44
|
+
name: key,
|
|
45
|
+
fn: vue.withCtx(() => [
|
|
46
|
+
vue.renderSlot(_ctx.$slots, key)
|
|
47
|
+
])
|
|
48
|
+
};
|
|
49
|
+
})
|
|
50
|
+
]), 1040, ["axis", "magnetic", "onClick"]);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const routeProps = {
|
|
5
|
+
to: [String, Object],
|
|
6
|
+
url: String,
|
|
7
|
+
replace: Boolean
|
|
8
|
+
};
|
|
9
|
+
function route({ to, url, replace, $router: router }) {
|
|
10
|
+
debugger;
|
|
11
|
+
if (to && router) {
|
|
12
|
+
router[replace ? "replace" : "push"](to);
|
|
13
|
+
} else if (url) {
|
|
14
|
+
replace ? location.replace(url) : location.href = url;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function useRoute() {
|
|
18
|
+
const vm = vue.getCurrentInstance().proxy;
|
|
19
|
+
return () => route(vm);
|
|
20
|
+
}
|
|
21
|
+
exports.route = route;
|
|
22
|
+
exports.routeProps = routeProps;
|
|
23
|
+
exports.useRoute = useRoute;
|