@fecp/mobile 1.1.2 → 1.1.4

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.
Files changed (16) hide show
  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 +1 -0
  2. 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
  3. 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
  4. 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
  5. package/es/packages/mobile/src/components/feedback/floatingBubble/FloatingBubble.vue.mjs +39 -18
  6. package/es/packages/mobile/src/components/feedback/floatingBubble/index.mjs +2 -2
  7. package/es/packages/mobile/src/components/form/formItem/FormItem.vue.mjs +4 -3
  8. package/es/packages/mobile/src/utils/use-route.mjs +23 -0
  9. 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
  10. 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
  11. 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
  12. 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
  13. package/lib/packages/mobile/src/components/feedback/floatingBubble/FloatingBubble.vue.js +38 -17
  14. package/lib/packages/mobile/src/components/form/formItem/FormItem.vue.js +4 -3
  15. package/lib/packages/mobile/src/utils/use-route.js +23 -0
  16. package/package.json +1 -1
@@ -17,6 +17,7 @@ function route({
17
17
  }
18
18
  }
19
19
  function useRoute() {
20
+ debugger;
20
21
  const vm = getCurrentInstance().proxy;
21
22
  return () => route(vm);
22
23
  }
@@ -23,6 +23,7 @@ var stdin_default = defineComponent({
23
23
  setup(props, {
24
24
  slots
25
25
  }) {
26
+ debugger;
26
27
  const {
27
28
  linkChildren
28
29
  } = useChildren(GRID_KEY);
@@ -30,6 +30,7 @@ var stdin_default = defineComponent({
30
30
  index
31
31
  } = useParent(GRID_KEY);
32
32
  const route = useRoute();
33
+ debugger;
33
34
  if (!parent) {
34
35
  return;
35
36
  }
@@ -2,6 +2,7 @@ import stdin_default from "./GridItem.mjs";
2
2
  import { gridItemProps } from "./GridItem.mjs";
3
3
  import { withInstall } from "../utils/with-install.mjs";
4
4
  const GridItem = withInstall(stdin_default);
5
+ debugger;
5
6
  export {
6
7
  GridItem,
7
8
  gridItemProps
@@ -2,24 +2,45 @@
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  /* empty css */
5
- import { createBlock, openBlock, normalizeProps, guardReactiveProps, createSlots, renderList, withCtx, renderSlot } from "vue";
6
- import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
5
+ import { 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
- function _sfc_render(_ctx, _cache) {
10
- const _component_van_floating_bubble = FloatingBubble;
11
- return openBlock(), createBlock(_component_van_floating_bubble, normalizeProps(guardReactiveProps(_ctx.$attrs)), createSlots({ _: 2 }, [
12
- renderList(_ctx.$slots, (item, key) => {
13
- return {
14
- name: key,
15
- fn: withCtx(() => [
16
- renderSlot(_ctx.$slots, key)
17
- ])
18
- };
19
- })
20
- ]), 1040);
21
- }
22
- const _FloatingBubble = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
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
+ return (_ctx, _cache) => {
26
+ const _component_van_floating_bubble = FloatingBubble;
27
+ return openBlock(), createBlock(_component_van_floating_bubble, mergeProps(_ctx.$attrs, {
28
+ axis: __props.axis,
29
+ magnetic: "x",
30
+ onClick: unref(route)
31
+ }), createSlots({ _: 2 }, [
32
+ renderList(_ctx.$slots, (item, key) => {
33
+ return {
34
+ name: key,
35
+ fn: withCtx(() => [
36
+ renderSlot(_ctx.$slots, key)
37
+ ])
38
+ };
39
+ })
40
+ ]), 1040, ["axis", "onClick"]);
41
+ };
42
+ }
43
+ };
23
44
  export {
24
- _FloatingBubble as default
45
+ _sfc_main as default
25
46
  };
@@ -1,8 +1,8 @@
1
- import _FloatingBubble from "./FloatingBubble.vue.mjs";
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
- _FloatingBubble
5
+ _sfc_main
6
6
  );
7
7
  export {
8
8
  MobileFloatingBubble,
@@ -51,13 +51,13 @@ const _sfc_main = {
51
51
  const formReadonly = inject("formReadonly");
52
52
  const dicListMap = inject("dicListMap");
53
53
  const formItemDisabled = computed(() => {
54
- if (formDisabled.value) {
54
+ if (formDisabled == null ? void 0 : formDisabled.value) {
55
55
  return formDisabled.value;
56
56
  }
57
57
  return props.disabled;
58
58
  });
59
59
  const formItemReadonly = computed(() => {
60
- if (formReadonly.value) {
60
+ if (formReadonly == null ? void 0 : formReadonly.value) {
61
61
  return formReadonly.value;
62
62
  }
63
63
  return props.readonly;
@@ -84,6 +84,7 @@ const _sfc_main = {
84
84
  return parseRule(props.fieldType, attrs);
85
85
  });
86
86
  return (_ctx, _cache) => {
87
+ var _a;
87
88
  return openBlock(), createBlock(resolveDynamicComponent(unref(formItem)), mergeProps(_ctx.$attrs, {
88
89
  modelValue: unref(compValue),
89
90
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(compValue) ? compValue.value = $event : null),
@@ -92,7 +93,7 @@ const _sfc_main = {
92
93
  disabled: unref(formItemDisabled),
93
94
  readonly: unref(formItemReadonly),
94
95
  placeholder: unref(formItemReadonly) ? "" : __props.placeholder,
95
- dicList: unref(dicListMap)[unref(attrs).dicKey]
96
+ dicList: (_a = unref(dicListMap)) == null ? void 0 : _a[unref(attrs).dicKey]
96
97
  }), null, 16, ["modelValue", "rules", "required", "disabled", "readonly", "placeholder", "dicList"]);
97
98
  };
98
99
  }
@@ -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
+ };
@@ -19,6 +19,7 @@ function route({
19
19
  }
20
20
  }
21
21
  function useRoute() {
22
+ debugger;
22
23
  const vm = vue.getCurrentInstance().proxy;
23
24
  return () => route(vm);
24
25
  }
@@ -25,6 +25,7 @@ var stdin_default = vue.defineComponent({
25
25
  setup(props2, {
26
26
  slots
27
27
  }) {
28
+ debugger;
28
29
  const {
29
30
  linkChildren
30
31
  } = index_esm.useChildren(GRID_KEY);
@@ -32,6 +32,7 @@ var stdin_default = vue.defineComponent({
32
32
  index: index$2
33
33
  } = index_esm.useParent(Grid.GRID_KEY);
34
34
  const route = useRoute.useRoute();
35
+ debugger;
35
36
  if (!parent) {
36
37
  return;
37
38
  }
@@ -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,42 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
5
5
  ;/* empty css */
6
6
  ;/* empty css */
7
7
  const vue = require("vue");
8
- const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
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
- function _sfc_render(_ctx, _cache) {
12
- const _component_van_floating_bubble = index.FloatingBubble;
13
- return vue.openBlock(), vue.createBlock(_component_van_floating_bubble, vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), vue.createSlots({ _: 2 }, [
14
- vue.renderList(_ctx.$slots, (item, key) => {
15
- return {
16
- name: key,
17
- fn: vue.withCtx(() => [
18
- vue.renderSlot(_ctx.$slots, key)
19
- ])
20
- };
21
- })
22
- ]), 1040);
23
- }
24
- const _FloatingBubble = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
25
- exports.default = _FloatingBubble;
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
+ return (_ctx, _cache) => {
28
+ const _component_van_floating_bubble = index.FloatingBubble;
29
+ return vue.openBlock(), vue.createBlock(_component_van_floating_bubble, vue.mergeProps(_ctx.$attrs, {
30
+ axis: __props.axis,
31
+ magnetic: "x",
32
+ onClick: vue.unref(route)
33
+ }), vue.createSlots({ _: 2 }, [
34
+ vue.renderList(_ctx.$slots, (item, key) => {
35
+ return {
36
+ name: key,
37
+ fn: vue.withCtx(() => [
38
+ vue.renderSlot(_ctx.$slots, key)
39
+ ])
40
+ };
41
+ })
42
+ ]), 1040, ["axis", "onClick"]);
43
+ };
44
+ }
45
+ };
46
+ exports.default = _sfc_main;
@@ -53,13 +53,13 @@ const _sfc_main = {
53
53
  const formReadonly = vue.inject("formReadonly");
54
54
  const dicListMap = vue.inject("dicListMap");
55
55
  const formItemDisabled = vue.computed(() => {
56
- if (formDisabled.value) {
56
+ if (formDisabled == null ? void 0 : formDisabled.value) {
57
57
  return formDisabled.value;
58
58
  }
59
59
  return props.disabled;
60
60
  });
61
61
  const formItemReadonly = vue.computed(() => {
62
- if (formReadonly.value) {
62
+ if (formReadonly == null ? void 0 : formReadonly.value) {
63
63
  return formReadonly.value;
64
64
  }
65
65
  return props.readonly;
@@ -86,6 +86,7 @@ const _sfc_main = {
86
86
  return formRule.parseRule(props.fieldType, attrs);
87
87
  });
88
88
  return (_ctx, _cache) => {
89
+ var _a;
89
90
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(formItem)), vue.mergeProps(_ctx.$attrs, {
90
91
  modelValue: vue.unref(compValue),
91
92
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(compValue) ? compValue.value = $event : null),
@@ -94,7 +95,7 @@ const _sfc_main = {
94
95
  disabled: vue.unref(formItemDisabled),
95
96
  readonly: vue.unref(formItemReadonly),
96
97
  placeholder: vue.unref(formItemReadonly) ? "" : __props.placeholder,
97
- dicList: vue.unref(dicListMap)[vue.unref(attrs).dicKey]
98
+ dicList: (_a = vue.unref(dicListMap)) == null ? void 0 : _a[vue.unref(attrs).dicKey]
98
99
  }), null, 16, ["modelValue", "rules", "required", "disabled", "readonly", "placeholder", "dicList"]);
99
100
  };
100
101
  }
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/mobile",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "main": "lib/packages/mobile/index.js",
5
5
  "module": "es/packages/mobile/index.mjs",
6
6
  "files": [