vfit 2.0.4 → 2.0.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.
Files changed (2) hide show
  1. package/README.md +3 -2
  2. package/package.json +4 -2
package/README.md CHANGED
@@ -17,7 +17,8 @@ npm i vfit
17
17
  ```ts
18
18
  // main.ts
19
19
  import { createFitScale } from 'vfit'
20
- import 'vfit/style.css'
20
+ import 'vfit/style.css' // 必须引入样式文件
21
+
21
22
 
22
23
  app.use(createFitScale({ target: '#app', designHeight: 1080, designWidth: 1920, scaleMode: 'auto' }))
23
24
  ```
@@ -88,9 +89,9 @@ app.use(createFitScale({ target: '#app', designHeight: 1080, designWidth: 1920,
88
89
 
89
90
  ## 小贴士
90
91
 
92
+ - **重要**:首次使用时必须在入口文件引入样式:`import 'vfit/style.css'`
91
93
  - 使用 `unit='px'` 时,`top/left` 随缩放变化,`right/bottom` 保持实际像素距离不变
92
94
  - 使用 `right` 时,缩放原点为右上角;同时设置 `bottom` 与 `right` 时为右下角
93
- - 首次接入时,务必引入样式:`import 'vfit/style.css'`
94
95
 
95
96
  ## React 支持
96
97
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vfit",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "A tiny Vue 3 plugin to auto-fit UI scale based on container size, plus a FitContainer component for easy positioning.",
5
5
  "keywords": [
6
6
  "vue3",
@@ -48,7 +48,8 @@
48
48
  "types": "./dist/index.d.ts",
49
49
  "import": "./dist/fitscale.es.js",
50
50
  "require": "./dist/fitscale.umd.js"
51
- }
51
+ },
52
+ "./style.css": "./dist/style.css"
52
53
  },
53
54
  "files": [
54
55
  "dist",
@@ -68,6 +69,7 @@
68
69
  },
69
70
  "devDependencies": {
70
71
  "@vitejs/plugin-vue": "^5.0.4",
72
+ "echarts": "^6.0.0",
71
73
  "terser": "^5.31.0",
72
74
  "typescript": "^5.6.3",
73
75
  "vite": "^5.4.0",