vue3-auto-scale 1.0.7 → 1.0.8

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/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { shallowRef, onMounted, onBeforeUnmount } from "vue";
2
- function createAutoScale$1(options = {}) {
2
+ function createAutoScale(options = {}) {
3
3
  const {
4
4
  designWidth = 1920,
5
5
  designHeight = 1080,
@@ -66,12 +66,12 @@ function createAutoScale$1(options = {}) {
66
66
  getScale
67
67
  };
68
68
  }
69
- function useAutoScale$1(options = {}) {
69
+ function useAutoScale(options = {}) {
70
70
  const instance = shallowRef(null);
71
71
  const scale = shallowRef(1);
72
72
  onMounted(() => {
73
73
  requestAnimationFrame(() => {
74
- instance.value = createAutoScale$1({
74
+ instance.value = createAutoScale({
75
75
  ...options,
76
76
  debug: options.debug ?? false
77
77
  });
@@ -103,10 +103,10 @@ function useAutoScale$1(options = {}) {
103
103
  instance
104
104
  };
105
105
  }
106
- const vAutoScale$1 = {
106
+ const vAutoScale = {
107
107
  mounted(el, binding) {
108
108
  const options = binding.value || {};
109
- const instance = createAutoScale$1({
109
+ const instance = createAutoScale({
110
110
  ...options,
111
111
  rootId: el.id || void 0
112
112
  });
@@ -126,8 +126,8 @@ const index = {
126
126
  createAutoScale
127
127
  };
128
128
  export {
129
- createAutoScale$1 as createAutoScale,
129
+ createAutoScale,
130
130
  index as default,
131
- useAutoScale$1 as useAutoScale,
132
- vAutoScale$1 as vAutoScale
131
+ useAutoScale,
132
+ vAutoScale
133
133
  };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- function createAutoScale$1(options = {}) {
4
+ function createAutoScale(options = {}) {
5
5
  const {
6
6
  designWidth = 1920,
7
7
  designHeight = 1080,
@@ -68,12 +68,12 @@ function createAutoScale$1(options = {}) {
68
68
  getScale
69
69
  };
70
70
  }
71
- function useAutoScale$1(options = {}) {
71
+ function useAutoScale(options = {}) {
72
72
  const instance = vue.shallowRef(null);
73
73
  const scale = vue.shallowRef(1);
74
74
  vue.onMounted(() => {
75
75
  requestAnimationFrame(() => {
76
- instance.value = createAutoScale$1({
76
+ instance.value = createAutoScale({
77
77
  ...options,
78
78
  debug: options.debug ?? false
79
79
  });
@@ -105,10 +105,10 @@ function useAutoScale$1(options = {}) {
105
105
  instance
106
106
  };
107
107
  }
108
- const vAutoScale$1 = {
108
+ const vAutoScale = {
109
109
  mounted(el, binding) {
110
110
  const options = binding.value || {};
111
- const instance = createAutoScale$1({
111
+ const instance = createAutoScale({
112
112
  ...options,
113
113
  rootId: el.id || void 0
114
114
  });
@@ -127,7 +127,7 @@ const index = {
127
127
  vAutoScale,
128
128
  createAutoScale
129
129
  };
130
- exports.createAutoScale = createAutoScale$1;
130
+ exports.createAutoScale = createAutoScale;
131
131
  exports.default = index;
132
- exports.useAutoScale = useAutoScale$1;
133
- exports.vAutoScale = vAutoScale$1;
132
+ exports.useAutoScale = useAutoScale;
133
+ exports.vAutoScale = vAutoScale;
package/dist/index.umd.js CHANGED
@@ -2,7 +2,7 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue")) : typeof define === "function" && define.amd ? define(["exports", "vue"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.Vue3AutoScale = {}, global.Vue));
3
3
  })(this, function(exports2, vue) {
4
4
  "use strict";
5
- function createAutoScale$1(options = {}) {
5
+ function createAutoScale(options = {}) {
6
6
  const {
7
7
  designWidth = 1920,
8
8
  designHeight = 1080,
@@ -69,12 +69,12 @@
69
69
  getScale
70
70
  };
71
71
  }
72
- function useAutoScale$1(options = {}) {
72
+ function useAutoScale(options = {}) {
73
73
  const instance = vue.shallowRef(null);
74
74
  const scale = vue.shallowRef(1);
75
75
  vue.onMounted(() => {
76
76
  requestAnimationFrame(() => {
77
- instance.value = createAutoScale$1({
77
+ instance.value = createAutoScale({
78
78
  ...options,
79
79
  debug: options.debug ?? false
80
80
  });
@@ -106,10 +106,10 @@
106
106
  instance
107
107
  };
108
108
  }
109
- const vAutoScale$1 = {
109
+ const vAutoScale = {
110
110
  mounted(el, binding) {
111
111
  const options = binding.value || {};
112
- const instance = createAutoScale$1({
112
+ const instance = createAutoScale({
113
113
  ...options,
114
114
  rootId: el.id || void 0
115
115
  });
@@ -128,9 +128,9 @@
128
128
  vAutoScale,
129
129
  createAutoScale
130
130
  };
131
- exports2.createAutoScale = createAutoScale$1;
131
+ exports2.createAutoScale = createAutoScale;
132
132
  exports2.default = index;
133
- exports2.useAutoScale = useAutoScale$1;
134
- exports2.vAutoScale = vAutoScale$1;
133
+ exports2.useAutoScale = useAutoScale;
134
+ exports2.vAutoScale = vAutoScale;
135
135
  Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
136
136
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue3-auto-scale",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Vue 3 大屏自适应缩放工具,基于 transform: scale 实现像素级还原",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",