@bikariya/image-viewer 0.0.1 → 0.0.3
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/README.md +23 -0
- package/dist/module.json +1 -1
- package/dist/runtime/image-viewer.vue +1 -1
- package/package.json +3 -4
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# @bikariya/image-viewer
|
|
2
|
+
|
|
3
|
+
无头图片查看器,基于 [@bikariya/modals](/packages/modals)。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm i -D @bikariya/image-viewer
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 使用方式
|
|
12
|
+
|
|
13
|
+
1. 在 `nuxt.config.ts` 中添加模块:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
export default defineNuxtConfig({
|
|
17
|
+
modules: [
|
|
18
|
+
"@bikariya/image-viewer",
|
|
19
|
+
],
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
2. 参照[集成示例](/playground/app/components/simple-image.vue)。
|
package/dist/module.json
CHANGED
|
@@ -32,7 +32,7 @@ function getCenter(mode) {
|
|
|
32
32
|
}
|
|
33
33
|
function getDistance(mode) {
|
|
34
34
|
const [finger1, finger2] = fingers.value;
|
|
35
|
-
return
|
|
35
|
+
return finger2 ? Math.hypot(
|
|
36
36
|
finger1[`${mode}X`] - finger2[`${mode}X`],
|
|
37
37
|
finger1[`${mode}Y`] - finger2[`${mode}Y`]
|
|
38
38
|
) : 0;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bikariya/image-viewer",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"description": "",
|
|
4
|
+
"version": "0.0.3",
|
|
5
|
+
"description": "Bikariya image viewer for Nuxt",
|
|
6
6
|
"author": "KazariEX",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": "KazariEX/bikariya",
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"exports": {
|
|
11
11
|
".": "./dist/module.mjs"
|
|
12
12
|
},
|
|
13
|
-
"main": "./dist/module.mjs",
|
|
14
13
|
"types": "./dist/module.d.mts",
|
|
15
14
|
"files": [
|
|
16
15
|
"dist"
|
|
17
16
|
],
|
|
18
17
|
"dependencies": {
|
|
19
18
|
"@bikariya/modals": "",
|
|
20
|
-
"@nuxt/kit": "^4.
|
|
19
|
+
"@nuxt/kit": "^4.3.0"
|
|
21
20
|
},
|
|
22
21
|
"scripts": {
|
|
23
22
|
"build": "nuxt-module-build build",
|