@touchvue/ui 1.0.0-beta.45 → 1.0.0-beta.47

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 (36) hide show
  1. package/es/components/button/src/button.vue.d.ts +2 -0
  2. package/es/components/float/index.d.ts +15 -0
  3. package/es/components/float/src/Float.vue.d.ts +9 -0
  4. package/es/components/float/src/float.d.ts +4 -0
  5. package/es/components/grid/src/grid-item.vue.d.ts +2 -9
  6. package/es/components/scroll/index.d.ts +3 -3
  7. package/es/components/scroll/src/Scroll.vue.d.ts +1 -1
  8. package/es/packages/components/button/src/button.vue2.mjs +8 -2
  9. package/es/packages/components/button/src/button.vue2.mjs.map +1 -1
  10. package/es/packages/components/float/src/Float.vue2.mjs +84 -72
  11. package/es/packages/components/float/src/Float.vue2.mjs.map +1 -1
  12. package/es/packages/components/float/src/float.mjs +2 -1
  13. package/es/packages/components/float/src/float.mjs.map +1 -1
  14. package/es/packages/components/grid/src/grid-item.vue2.mjs +9 -52
  15. package/es/packages/components/grid/src/grid-item.vue2.mjs.map +1 -1
  16. package/es/packages/hooks/useDevice.mjs.map +1 -1
  17. package/lib/components/button/src/button.vue.d.ts +2 -0
  18. package/lib/components/float/index.d.ts +15 -0
  19. package/lib/components/float/src/Float.vue.d.ts +9 -0
  20. package/lib/components/float/src/float.d.ts +4 -0
  21. package/lib/components/grid/src/grid-item.vue.d.ts +2 -9
  22. package/lib/components/scroll/index.d.ts +3 -3
  23. package/lib/components/scroll/src/Scroll.vue.d.ts +1 -1
  24. package/lib/packages/components/button/src/button.vue2.js +7 -1
  25. package/lib/packages/components/button/src/button.vue2.js.map +1 -1
  26. package/lib/packages/components/float/src/Float.vue2.js +84 -72
  27. package/lib/packages/components/float/src/Float.vue2.js.map +1 -1
  28. package/lib/packages/components/float/src/float.js +2 -1
  29. package/lib/packages/components/float/src/float.js.map +1 -1
  30. package/lib/packages/components/grid/src/grid-item.vue2.js +8 -51
  31. package/lib/packages/components/grid/src/grid-item.vue2.js.map +1 -1
  32. package/lib/packages/hooks/useDevice.js.map +1 -1
  33. package/package.json +1 -1
  34. package/theme/components/index.css +29 -3
  35. package/theme/index.css +29 -3
  36. package/theme/skin/default.css +29 -3
@@ -11,6 +11,7 @@ interface Props {
11
11
  progress?: string | number;
12
12
  desc?: string;
13
13
  flex?: boolean;
14
+ text?: string;
14
15
  }
15
16
  declare function __VLS_template(): {
16
17
  default?(_: {}): any;
@@ -38,6 +39,7 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {
38
39
  disabled: boolean;
39
40
  desc: string;
40
41
  expand: boolean;
42
+ text: string;
41
43
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
42
44
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
43
45
  export default _default;
@@ -76,6 +76,10 @@ export declare const ToFloat: import("@touchvue/ui/es/utils").SFCWithInstall<{
76
76
  type: BooleanConstructor;
77
77
  default: boolean;
78
78
  };
79
+ speed: {
80
+ type: (NumberConstructor | StringConstructor)[];
81
+ default: number;
82
+ };
79
83
  }>> & Readonly<{}>, {
80
84
  open: (by?: any) => void;
81
85
  close: (e?: Event) => void;
@@ -101,6 +105,7 @@ export declare const ToFloat: import("@touchvue/ui/es/utils").SFCWithInstall<{
101
105
  mask: boolean;
102
106
  dx: string | number;
103
107
  dy: string | number;
108
+ speed: string | number;
104
109
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
105
110
  P: {};
106
111
  B: {};
@@ -185,6 +190,10 @@ export declare const ToFloat: import("@touchvue/ui/es/utils").SFCWithInstall<{
185
190
  type: BooleanConstructor;
186
191
  default: boolean;
187
192
  };
193
+ speed: {
194
+ type: (NumberConstructor | StringConstructor)[];
195
+ default: number;
196
+ };
188
197
  }>> & Readonly<{}>, {
189
198
  open: (by?: any) => void;
190
199
  close: (e?: Event) => void;
@@ -210,6 +219,7 @@ export declare const ToFloat: import("@touchvue/ui/es/utils").SFCWithInstall<{
210
219
  mask: boolean;
211
220
  dx: string | number;
212
221
  dy: string | number;
222
+ speed: string | number;
213
223
  }>;
214
224
  __isFragment?: never;
215
225
  __isTeleport?: never;
@@ -291,6 +301,10 @@ export declare const ToFloat: import("@touchvue/ui/es/utils").SFCWithInstall<{
291
301
  type: BooleanConstructor;
292
302
  default: boolean;
293
303
  };
304
+ speed: {
305
+ type: (NumberConstructor | StringConstructor)[];
306
+ default: number;
307
+ };
294
308
  }>> & Readonly<{}>, {
295
309
  open: (by?: any) => void;
296
310
  close: (e?: Event) => void;
@@ -316,6 +330,7 @@ export declare const ToFloat: import("@touchvue/ui/es/utils").SFCWithInstall<{
316
330
  mask: boolean;
317
331
  dx: string | number;
318
332
  dy: string | number;
333
+ speed: string | number;
319
334
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
320
335
  $slots: {
321
336
  default?(_: {}): any;
@@ -82,6 +82,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
82
82
  type: BooleanConstructor;
83
83
  default: boolean;
84
84
  };
85
+ speed: {
86
+ type: (NumberConstructor | StringConstructor)[];
87
+ default: number;
88
+ };
85
89
  }>, {
86
90
  open: typeof open;
87
91
  close: typeof close;
@@ -164,6 +168,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
164
168
  type: BooleanConstructor;
165
169
  default: boolean;
166
170
  };
171
+ speed: {
172
+ type: (NumberConstructor | StringConstructor)[];
173
+ default: number;
174
+ };
167
175
  }>> & Readonly<{}>, {
168
176
  mode: string;
169
177
  left: string | number;
@@ -184,6 +192,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
184
192
  mask: boolean;
185
193
  dx: string | number;
186
194
  dy: string | number;
195
+ speed: string | number;
187
196
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
188
197
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
189
198
  export default _default;
@@ -76,6 +76,10 @@ export declare const floatProps: {
76
76
  type: BooleanConstructor;
77
77
  default: boolean;
78
78
  };
79
+ speed: {
80
+ type: (NumberConstructor | StringConstructor)[];
81
+ default: number;
82
+ };
79
83
  };
80
84
  export type FloatProps = ExtractPropTypes<typeof floatProps>;
81
85
  export declare const floatEmits: string[];
@@ -1,20 +1,13 @@
1
- export interface GridProps {
2
- space?: number | string;
3
- spaceX?: number | string;
4
- spaceY?: number | string;
5
- }
6
1
  export interface Props {
7
- merge?: number | string;
8
2
  width?: number | string;
9
- side?: boolean;
3
+ flex?: boolean;
10
4
  }
11
5
  declare function __VLS_template(): {
12
6
  default?(_: {}): any;
13
7
  };
14
8
  declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
9
+ flex: boolean;
15
10
  width: number | string;
16
- merge: number | string;
17
- side: boolean;
18
11
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
19
12
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
20
13
  export default _default;
@@ -88,8 +88,8 @@ export declare const ToScroll: import("@touchvue/ui/es/utils").SFCWithInstall<{
88
88
  modelValue: string | number;
89
89
  bottom: string | number;
90
90
  top: string | number;
91
- virtual: boolean;
92
91
  speed: number;
92
+ virtual: boolean;
93
93
  barDisplay: string;
94
94
  except: string;
95
95
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
@@ -180,8 +180,8 @@ export declare const ToScroll: import("@touchvue/ui/es/utils").SFCWithInstall<{
180
180
  modelValue: string | number;
181
181
  bottom: string | number;
182
182
  top: string | number;
183
- virtual: boolean;
184
183
  speed: number;
184
+ virtual: boolean;
185
185
  barDisplay: string;
186
186
  except: string;
187
187
  }>;
@@ -277,8 +277,8 @@ export declare const ToScroll: import("@touchvue/ui/es/utils").SFCWithInstall<{
277
277
  modelValue: string | number;
278
278
  bottom: string | number;
279
279
  top: string | number;
280
- virtual: boolean;
281
280
  speed: number;
281
+ virtual: boolean;
282
282
  barDisplay: string;
283
283
  except: string;
284
284
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
@@ -145,8 +145,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
145
145
  modelValue: string | number;
146
146
  bottom: string | number;
147
147
  top: string | number;
148
- virtual: boolean;
149
148
  speed: number;
149
+ virtual: boolean;
150
150
  barDisplay: string;
151
151
  except: string;
152
152
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, createCommentVNode, createElementVNode, renderSlot } from 'vue';
1
+ import { defineComponent, ref, computed, resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, createCommentVNode, createElementVNode, createTextVNode, toDisplayString, renderSlot } from 'vue';
2
2
  import { commitTouchReport } from '../../../utils/ratio.mjs';
3
3
 
4
4
  const __default__ = defineComponent({
@@ -18,7 +18,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  iconPosition: { default: "" },
19
19
  progress: { default: 0 },
20
20
  desc: { default: "" },
21
- flex: { type: Boolean, default: false }
21
+ flex: { type: Boolean, default: false },
22
+ text: { default: "" }
22
23
  },
23
24
  emits: ["click", "dblclick", "contextmenu"],
24
25
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -102,6 +103,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
102
103
  value: props.loading ? "loading" : _ctx.icon.split("|")[0].trim()
103
104
  }, null, 8, ["value"])) : createCommentVNode("v-if", true),
104
105
  createElementVNode("span", { class: "to-button-text" }, [
106
+ createTextVNode(
107
+ toDisplayString(props.text),
108
+ 1
109
+ /* TEXT */
110
+ ),
105
111
  renderSlot(_ctx.$slots, "default")
106
112
  ]),
107
113
  _ctx.expand ? (openBlock(), createBlock(_component_ToIcon, {
@@ -1 +1 @@
1
- {"version":3,"file":"button.vue2.mjs","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({\n\tname: 'ToButton'\n});\n</script>\n<template>\n\t<button ref=\"el\" v-dis=\"loading || disabled\" :flex=\"flex ? flex : null\" class=\"to-button\" :class=\"setClass\" :style=\"setStyle\" :desc=\"desc\" @click=\"handleClick\" @dblclick=\"handleDblClick\" @contextmenu=\"handleContextMenu\">\n\t\t<ToIcon v-if=\"icon || loading\" class=\"to-button-icon\" :value=\"props.loading ? 'loading' : icon.split('|')[0].trim()\"></ToIcon>\n\t\t<span class=\"to-button-text\">\n\t\t\t<slot></slot>\n\t\t</span>\n\t\t<ToIcon v-if=\"expand\" value=\"expand\" class=\"to-button-expand\"></ToIcon>\n\t\t<span v-if=\"Number(progress) > 0\" class=\"to-button-progress\">\n\t\t\t<span ref=\"progress\" class=\"to-button-bar\" :class=\"{ 'is-completed': Number(progress) === 100 }\" :style=\"{ width: progress + '%' }\"></span>\n\t\t</span>\n\t</button>\n</template>\n<script setup lang=\"ts\">\nimport { ref, computed } from 'vue'\nimport { commitTouchReport } from '@touchvue/utils'\n\n\n\nconst el = ref(null)\nconst emit = defineEmits(['click', 'dblclick', 'contextmenu'])\n\ninterface Props {\n\tdisabled?: boolean\n\texpand?: boolean\n\tloading?: boolean\n\ticon?: string\n\tsize?: string\n\tmode?: string\n\tcolor?: string\n\twidth?: string | number\n\ticonPosition?: string\n\tprogress?: string | number\n\tdesc?: string\n\tflex?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n\tmode: 'default',\n\tcolor: '',\n\tsize: '',\n\ticon: '',\n\twidth: '',\n\ticonPosition: '',\n\tloading: false,\n\tdisabled: false,\n\tprogress: 0,\n\tdesc: '',\n\texpand: false,\n\tflex: false\n})\n\nconst setStyle = computed(() => {\n\tconst style: Record<string, string> = {}\n\tif (props.width && props.width !== 'full') {\n\t\tstyle.width = `${props.width}em`\n\t}\n\treturn style\n})\n\nconst setClass = computed(() => {\n\tlet arr: string[] = []\n\tif (props.width === 'full') {\n\t\tarr.push(`width-full`)\n\t}\n\tif (props.mode) {\n\t\tfor (let i = 0; i < props.mode.split(' ').length; i++) {\n\t\t\tconst element = props.mode.split(' ')[i]\n\t\t\tarr.push(`mode-${element}`)\n\t\t}\n\t}\n\tif (props.size) {\n\t\tarr.push(`size-${props.size}`)\n\t}\n\tif (props.color) {\n\t\tarr.push(`color-${props.color}`)\n\t}\n\tif (props.iconPosition) {\n\t\tarr.push(`icon-position-${props.iconPosition}`)\n\t}\n\tif (props.icon.includes('|')) {\n\t\tconst iconArr = props.icon.split('|')\n\t\tif (iconArr[1].includes('top') || iconArr[1].includes('right') || iconArr[1].includes('bottom')) {\n\t\t\tarr.push(`icon-position-${iconArr[1].trim()}`)\n\t\t}\n\t}\n\treturn arr\n})\n\nconst exportDetail = () => {\n\tconst detail = {\n\t\tname: 'ToButton',\n\t\tdesc: props.desc,\n\t\tvalue: props.desc\n\t}\n\tcommitTouchReport(detail)\n}\n\nconst handleClick = evt => {\n\temit('click', evt)\n\texportDetail()\n}\n\nconst handleDblClick = evt => {\n\temit('dblclick', evt)\n\texportDetail()\n}\n\nconst handleContextMenu = evt => {\n\tevt.preventDefault()\n\temit('contextmenu', evt)\n\texportDetail()\n}\n\ndefineExpose({ el })\n</script>\n"],"names":["DO_defineComponent","_createElementBlock","flex","_normalize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,CAAa,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA;QAEAC,IAAM,CAAA,MAAA,iBAApBH,YAAuE,iBAAA,EAAA;AAAA;UAAjD,KAAM,EAAA,QAAA;AAAA,UAAS,KAAM,EAAA,kBAAA;AAAA;QAC/B,MAAA,CAAOI,KAAQ,QAAA,CAAA,GAAA,kBAA3BV,mBAEO,MAAA,EAAA;AAAA;UAF2B,KAAM,EAAA,oBAAA;AAAA;UACvCO,kBAAA;AAAA,YAA2I,MAAA;AAAA,YAAA;AAAA,cAArI,GAAI,EAAA,UAAA;AAAA,cAAW,KAAM,EAAAL,cAAA,CAAA,CAAA,eAAA,EAA0C,EAAA,cAAA,EAAA,MAAOQ,CAAAA,IAAAA,CAAQ,QAAA,CAAA,KAAA,GAAA,EAAA,CAAA,CAAA;AAAA,cAAc,+BAAgBA,IAAQ,CAAA,QAAA,GAAA,KAAA,CAAA;AAAA;;;;;;;QAPpGL,CAAAA,cAAAA,EAAAA,IAAAA,CAAAA,OAAAA,IAAWM,KAAQ,QAAA,CAAA;AAAA;;;;;;;"}
1
+ {"version":3,"file":"button.vue2.mjs","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({\n\tname: 'ToButton'\n});\n</script>\n<template>\n\t<button ref=\"el\" v-dis=\"loading || disabled\" :flex=\"flex ? flex : null\" class=\"to-button\" :class=\"setClass\" :style=\"setStyle\" :desc=\"desc\" @click=\"handleClick\" @dblclick=\"handleDblClick\" @contextmenu=\"handleContextMenu\">\n\t\t<ToIcon v-if=\"icon || loading\" class=\"to-button-icon\" :value=\"props.loading ? 'loading' : icon.split('|')[0].trim()\"></ToIcon>\n\t\t<span class=\"to-button-text\"> {{ props.text }}<slot></slot> </span>\n\t\t<ToIcon v-if=\"expand\" value=\"expand\" class=\"to-button-expand\"></ToIcon>\n\t\t<span v-if=\"Number(progress) > 0\" class=\"to-button-progress\">\n\t\t\t<span ref=\"progress\" class=\"to-button-bar\" :class=\"{ 'is-completed': Number(progress) === 100 }\" :style=\"{ width: progress + '%' }\"></span>\n\t\t</span>\n\t</button>\n</template>\n<script setup lang=\"ts\">\nimport { ref, computed } from 'vue'\nimport { commitTouchReport } from '@touchvue/utils'\n\n\n\nconst el = ref(null)\nconst emit = defineEmits(['click', 'dblclick', 'contextmenu'])\n\ninterface Props {\n\tdisabled?: boolean\n\texpand?: boolean\n\tloading?: boolean\n\ticon?: string\n\tsize?: string\n\tmode?: string\n\tcolor?: string\n\twidth?: string | number\n\ticonPosition?: string\n\tprogress?: string | number\n\tdesc?: string\n\tflex?: boolean\n\ttext?: string\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n\tmode: 'default',\n\tcolor: '',\n\tsize: '',\n\ticon: '',\n\twidth: '',\n\ticonPosition: '',\n\tloading: false,\n\tdisabled: false,\n\tprogress: 0,\n\tdesc: '',\n\texpand: false,\n\tflex: false,\n\ttext: ''\n})\n\nconst setStyle = computed(() => {\n\tconst style: Record<string, string> = {}\n\tif (props.width && props.width !== 'full') {\n\t\tstyle.width = `${props.width}em`\n\t}\n\treturn style\n})\n\nconst setClass = computed(() => {\n\tlet arr: string[] = []\n\tif (props.width === 'full') {\n\t\tarr.push(`width-full`)\n\t}\n\tif (props.mode) {\n\t\tfor (let i = 0; i < props.mode.split(' ').length; i++) {\n\t\t\tconst element = props.mode.split(' ')[i]\n\t\t\tarr.push(`mode-${element}`)\n\t\t}\n\t}\n\tif (props.size) {\n\t\tarr.push(`size-${props.size}`)\n\t}\n\tif (props.color) {\n\t\tarr.push(`color-${props.color}`)\n\t}\n\tif (props.iconPosition) {\n\t\tarr.push(`icon-position-${props.iconPosition}`)\n\t}\n\tif (props.icon.includes('|')) {\n\t\tconst iconArr = props.icon.split('|')\n\t\tif (iconArr[1].includes('top') || iconArr[1].includes('right') || iconArr[1].includes('bottom')) {\n\t\t\tarr.push(`icon-position-${iconArr[1].trim()}`)\n\t\t}\n\t}\n\treturn arr\n})\n\nconst exportDetail = () => {\n\tconst detail = {\n\t\tname: 'ToButton',\n\t\tdesc: props.desc,\n\t\tvalue: props.desc\n\t}\n\tcommitTouchReport(detail)\n}\n\nconst handleClick = evt => {\n\temit('click', evt)\n\texportDetail()\n}\n\nconst handleDblClick = evt => {\n\temit('dblclick', evt)\n\texportDetail()\n}\n\nconst handleContextMenu = evt => {\n\tevt.preventDefault()\n\temit('contextmenu', evt)\n\texportDetail()\n}\n\ndefineExpose({ el })\n</script>\n"],"names":["DO_defineComponent","_createElementBlock","flex","_normalizeClass","desc","icon","loading","_createBlock","_createElementVNode","_createTextVNode","_toDisplayString","_renderSlot","expand","progress","disabled"],"mappings":";;;AAEA,MAAA,cAA6BA,eAAmB,CAAA;AAAA,EAC/C,IAAM,EAAA,UAAA;AACP,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;AAkBD,IAAM,MAAA,EAAA,GAAK,IAAI,IAAI,CAAA,CAAA;AACnB,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAkBb,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAgBd,IAAM,MAAA,QAAA,GAAW,SAAS,MAAM;AAC/B,MAAA,MAAM,QAAgC,EAAC,CAAA;AACvC,MAAA,IAAI,KAAM,CAAA,KAAA,IAAS,KAAM,CAAA,KAAA,KAAU,MAAQ,EAAA;AAC1C,QAAM,KAAA,CAAA,KAAA,GAAQ,GAAG,KAAM,CAAA,KAAA,CAAA,EAAA,CAAA,CAAA;AAAA,OACxB;AACA,MAAO,OAAA,KAAA,CAAA;AAAA,KACP,CAAA,CAAA;AAED,IAAM,MAAA,QAAA,GAAW,SAAS,MAAM;AAC/B,MAAA,IAAI,MAAgB,EAAC,CAAA;AACrB,MAAI,IAAA,KAAA,CAAM,UAAU,MAAQ,EAAA;AAC3B,QAAA,GAAA,CAAI,KAAK,CAAY,UAAA,CAAA,CAAA,CAAA;AAAA,OACtB;AACA,MA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
  arr.push("is-mask");
60
60
  return arr;
61
61
  });
62
+ const transitionTransform = computed(() => `transform ${props.speed}ms ease-out`);
62
63
  const setStyle = computed(() => {
63
64
  var _a;
64
65
  const obj = {};
@@ -147,6 +148,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
147
148
  } else if (link2) {
148
149
  if (wrapper.value)
149
150
  wrapper.value.style.height = "";
151
+ if (el.value) {
152
+ el.value.style.transition = "none";
153
+ el.value.style.transform = "";
154
+ }
150
155
  nextTick(() => {
151
156
  var _a, _b;
152
157
  if (!props.width && el.value) {
@@ -209,71 +214,77 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
209
214
  }
210
215
  }
211
216
  }
212
- if (el.value === null)
213
- return;
214
- if (iposition.value === "top") {
215
- el.value.style.top = "";
216
- el.value.style.bottom = bottomSpace + linkHeight - 1 - dy + "px";
217
- }
218
- if (iposition.value === "bottom") {
219
- el.value.style.top = topSpace + linkHeight - 1 + dy + "px";
220
- el.value.style.bottom = "";
221
- }
222
- if (iposition.value === "top" || iposition.value === "bottom") {
223
- if (ialign.value === "left") {
224
- el.value.style.left = leftSpace + dx + "px";
225
- el.value.style.right = "";
226
- } else if (ialign.value === "center") {
227
- el.value.style.left = leftSpace - wrapperWidth / 2 + linkWidth / 2 + "px";
228
- el.value.style.right = "";
229
- } else {
230
- el.value.style.right = rightSpace - dx + "px";
231
- el.value.style.left = "";
232
- }
233
- }
234
- if (iposition.value === "left") {
235
- el.value.style.right = rightSpace + linkWidth - dx - 1 + "px";
236
- el.value.style.left = "";
237
- }
238
- if (iposition.value === "right") {
239
- el.value.style.left = leftSpace + linkWidth + dx - 1 + "px";
240
- el.value.style.right = "";
241
- }
242
- if (iposition.value === "left" || iposition.value === "right") {
243
- if (ialign.value === "bottom") {
217
+ if (el.value) {
218
+ if (iposition.value === "top") {
244
219
  el.value.style.top = "";
245
- el.value.style.bottom = bottomSpace - dy + "px";
246
- } else {
247
- el.value.style.top = topSpace + dy + "px";
220
+ el.value.style.bottom = bottomSpace + linkHeight - 1 - dy + "px";
221
+ }
222
+ if (iposition.value === "bottom") {
223
+ el.value.style.top = topSpace + linkHeight - 1 + dy + "px";
248
224
  el.value.style.bottom = "";
249
225
  }
250
- }
251
- if (iposition.value === "bottom") {
252
- useSpace = bottomSpace;
253
- origin.value = "top";
254
- } else if (iposition.value === "top") {
255
- useSpace = topSpace;
256
- origin.value = "bottom";
257
- } else {
258
- if (ialign.value === "bottom") {
259
- useSpace = topSpace + linkHeight;
260
- origin.value = "bottom";
261
- } else if (ialign.value === "top") {
262
- useSpace = bottomSpace + linkHeight;
226
+ if (iposition.value === "top" || iposition.value === "bottom") {
227
+ if (ialign.value === "left") {
228
+ el.value.style.left = leftSpace + dx + "px";
229
+ el.value.style.right = "";
230
+ } else if (ialign.value === "center") {
231
+ el.value.style.left = leftSpace - wrapperWidth / 2 + linkWidth / 2 + "px";
232
+ el.value.style.right = "";
233
+ } else {
234
+ el.value.style.right = rightSpace - dx + "px";
235
+ el.value.style.left = "";
236
+ }
237
+ }
238
+ if (iposition.value === "left") {
239
+ el.value.style.right = rightSpace + linkWidth - dx - 1 + "px";
240
+ el.value.style.left = "";
241
+ }
242
+ if (iposition.value === "right") {
243
+ el.value.style.left = leftSpace + linkWidth + dx - 1 + "px";
244
+ el.value.style.right = "";
245
+ }
246
+ if (iposition.value === "left" || iposition.value === "right") {
247
+ if (ialign.value === "bottom") {
248
+ el.value.style.top = "";
249
+ el.value.style.bottom = bottomSpace - dy + "px";
250
+ } else {
251
+ el.value.style.top = topSpace + dy + "px";
252
+ el.value.style.bottom = "";
253
+ }
254
+ }
255
+ if (iposition.value === "bottom") {
256
+ useSpace = bottomSpace;
263
257
  origin.value = "top";
258
+ } else if (iposition.value === "top") {
259
+ useSpace = topSpace;
260
+ origin.value = "bottom";
264
261
  } else {
265
- console.error("[ToFloat] \u6D6E\u5C42\u5BF9\u9F50\u65B9\u5F0F\u8BBE\u7F6E\u9519\u8BEF\uFF01position \u5728\u5DE6\u53F3\u4E24\u4FA7\u65F6\uFF0C\u5BF9\u9F50\u65B9\u5F0F\u5E94\u662F\u9876\u90E8\u6216\u5E95\u90E8");
262
+ if (ialign.value === "bottom") {
263
+ useSpace = topSpace + linkHeight;
264
+ origin.value = "bottom";
265
+ } else if (ialign.value === "top") {
266
+ useSpace = bottomSpace + linkHeight;
267
+ origin.value = "top";
268
+ } else {
269
+ console.error("[ToFloat] \u6D6E\u5C42\u5BF9\u9F50\u65B9\u5F0F\u8BBE\u7F6E\u9519\u8BEF\uFF01position \u5728\u5DE6\u53F3\u4E24\u4FA7\u65F6\uFF0C\u5BF9\u9F50\u65B9\u5F0F\u5E94\u662F\u9876\u90E8\u6216\u5E95\u90E8");
270
+ }
271
+ }
272
+ if (useSpace < wrapperHeight && wrapper.value) {
273
+ isOver.value = true;
274
+ wrapper.value.style.height = useSpace + "px";
275
+ }
276
+ if (link2) {
277
+ const ratio = link2.getBoundingClientRect().width / link2.offsetWidth;
278
+ const ratio2 = Number(getComputedStyle(link2).fontSize.trim().toLowerCase().replace(/px$/, "")) / Number(getComputedStyle(document.body).fontSize.trim().toLowerCase().replace(/px$/, ""));
279
+ size.value = ratio * ratio2;
266
280
  }
267
281
  }
268
- if (useSpace < wrapperHeight && wrapper.value) {
269
- isOver.value = true;
270
- wrapper.value.style.height = useSpace + "px";
271
- }
272
- if (link2) {
273
- const ratio = link2.getBoundingClientRect().width / link2.offsetWidth;
274
- const ratio2 = Number(getComputedStyle(link2).fontSize.trim().toLowerCase().replace(/px$/, "")) / Number(getComputedStyle(document.body).fontSize.trim().toLowerCase().replace(/px$/, ""));
275
- size.value = ratio * ratio2;
276
- }
282
+ }
283
+ if (el.value) {
284
+ setOpenStyle();
285
+ }
286
+ if (link2 && !("x" in link2) && !("touches" in link2)) {
287
+ setScrollStatus();
277
288
  }
278
289
  });
279
290
  }
@@ -314,7 +325,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
314
325
  emit("opened");
315
326
  clearTimeout(timer);
316
327
  timer = null;
317
- }, 100);
328
+ }, Number(props.speed));
318
329
  isOpen.value = true;
319
330
  } else {
320
331
  document.body.addEventListener("mousedown", blur);
@@ -343,10 +354,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
343
354
  }
344
355
  setTimeout(() => {
345
356
  set(link.value);
346
- setOpenStyle();
347
- if (link.value && !("x" in link.value) && !("touches" in link.value)) {
348
- setScrollStatus();
349
- }
350
357
  }, 0);
351
358
  if (props.afterOpen && Object.prototype.toString.call(props.afterOpen) === "[object Function]") {
352
359
  props.afterOpen();
@@ -357,6 +364,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
357
364
  }
358
365
  }
359
366
  function setOpenStyle() {
367
+ var _a;
360
368
  if (props.slide) {
361
369
  if (iposition.value === "top") {
362
370
  wrapper.value.style.transform = "translateY(-100%)";
@@ -371,26 +379,29 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
371
379
  wrapper.value.style.transform = "translateX(-100%)";
372
380
  }
373
381
  setTimeout(() => {
374
- wrapper.value.style.transition = "transform 100ms ease-out";
382
+ wrapper.value.style.transition = transitionTransform.value;
375
383
  wrapper.value.style.transform = "translateY(0)";
376
384
  setTimeout(() => {
377
385
  wrapper.value.style.transform = "";
378
- }, 100);
386
+ }, Number(props.speed));
379
387
  }, 0);
380
388
  } else {
389
+ el.value.style.transition = "none";
381
390
  el.value.style.transform = "scale(1, 0)";
382
391
  el.value.style.visibility = "visible";
383
- setTimeout(() => {
384
- el.value.style.transition = "transform 100ms ease-out";
392
+ requestAnimationFrame(() => {
393
+ el.value.style.transition = transitionTransform.value;
385
394
  el.value.style.transform = "scale(1)";
386
395
  setTimeout(() => {
387
396
  el.value.style.transform = "";
388
- }, 100);
389
- }, 0);
397
+ el.value.style.transition = "";
398
+ }, Number(props.speed));
399
+ });
390
400
  }
401
+ el.value.style.zIndex = (_a = window.$TouchUI) == null ? void 0 : _a.zIndex;
391
402
  }
392
403
  function close(e) {
393
- if (e && el.value && e.target && el.value.contains(e.target)) {
404
+ if (e && el.value && e.target && typeof Node !== "undefined" && e.target instanceof Node && el.value.contains(e.target)) {
394
405
  return;
395
406
  }
396
407
  if (isOpen.value) {
@@ -435,7 +446,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
435
446
  if (props.afterClose && Object.prototype.toString.call(props.afterClose) === "[object Function]") {
436
447
  props.afterClose();
437
448
  }
438
- }, 100);
449
+ }, Number(props.speed));
439
450
  }
440
451
  function setCloseStyle() {
441
452
  if (props.slide) {
@@ -452,7 +463,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
452
463
  wrapper.value.style.transform = "translateX(-100%)";
453
464
  }
454
465
  } else {
455
- el.value.style.transform = "scale(1,0)";
466
+ el.value.style.transition = transitionTransform.value;
467
+ el.value.style.transform = "scale(1, 0)";
456
468
  }
457
469
  }
458
470
  function toggle(by) {