pic-viewer
Advanced tools
Comparing version 0.8.3 to 0.8.4
@@ -82,2 +82,2 @@ export default _sfc_main; | ||
} | ||
import { pascalCasedName as name } from "../package.json"; | ||
import { PascalCasedName as name } from "../package.json"; |
export declare function isBase64WithScheme(str?: string, mediaType?: string): any; | ||
export declare function tryParsingJSONArray(str: any): any; | ||
export declare function At<V = any>(value: V, path?: string | ((value: V) => any) | symbol): any; | ||
export declare function isObject(value: any): boolean; | ||
export declare function unwrap<V = any>(value: V, path?: string | ((value: V) => any) | symbol): any; |
{ | ||
"name": "pic-viewer", | ||
"pascalCasedName": "PicViewer", | ||
"version": "0.8.3", | ||
"PascalCasedName": "PicViewer", | ||
"version": "0.8.4", | ||
"private": false, | ||
"packageManager": "pnpm@7.18.2", | ||
"description": "Picture viewer.", | ||
@@ -55,29 +56,29 @@ "author": "cloydlau", | ||
"dependencies": { | ||
"@vueuse/core": "latest", | ||
"lodash-es": "latest", | ||
"qrcode": "latest", | ||
"swiper": "latest", | ||
"validator": "latest", | ||
"viewerjs": "latest", | ||
"vue-global-config": "latest" | ||
"@vueuse/core": "^9.6.0", | ||
"lodash-es": "^4.17.21", | ||
"qrcode": "^1.5.1", | ||
"swiper": "^8.4.5", | ||
"validator": "^13.7.0", | ||
"viewerjs": "^1.11.1", | ||
"vue-global-config": "^0.3.0" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "latest", | ||
"@commitlint/cli": "latest", | ||
"@commitlint/config-conventional": "latest", | ||
"@types/lodash-es": "latest", | ||
"@types/node": "latest", | ||
"@vitejs/plugin-vue2": "latest", | ||
"case-police": "latest", | ||
"element-ui": "latest", | ||
"eslint": "latest", | ||
"husky": "latest", | ||
"lint-staged": "latest", | ||
"sass": "latest", | ||
"typescript": "latest", | ||
"unocss": "latest", | ||
"unplugin-auto-import": "latest", | ||
"vite": "latest", | ||
"vite-plugin-css-injected-by-js": "latest", | ||
"vite-plugin-dts": "latest", | ||
"@antfu/eslint-config": "^0.34.0", | ||
"@commitlint/cli": "^17.3.0", | ||
"@commitlint/config-conventional": "^17.3.0", | ||
"@types/lodash-es": "^4.17.6", | ||
"@types/node": "^18.11.15", | ||
"@vitejs/plugin-vue2": "^2.2.0", | ||
"case-police": "^0.5.10", | ||
"element-ui": "^2.15.12", | ||
"eslint": "^8.29.0", | ||
"husky": "^8.0.2", | ||
"lint-staged": "^13.1.0", | ||
"sass": "^1.56.2", | ||
"typescript": "^4.9.4", | ||
"unocss": "^0.47.6", | ||
"unplugin-auto-import": "^0.12.1", | ||
"vite": "^4.0.1", | ||
"vite-plugin-css-injected-by-js": "^2.1.1", | ||
"vite-plugin-dts": "^1.7.1", | ||
"vue": "^2.7.14" | ||
@@ -84,0 +85,0 @@ }, |
@@ -8,3 +8,3 @@ <h1 align="center"> | ||
<p align="center"> | ||
图片画廊 | ||
图片画廊。 | ||
</p> | ||
@@ -23,5 +23,5 @@ | ||
- [viewerjs](https://github.com/fengyuanchen/viewerjs) + [swiper](https://swiperjs.com) + [qrcode](https://github.com/soldair/node-qrcode) 组合拳 | ||
- 展示形式: 支持 文档流、自适应瀑布流、轮播图、嵌套在表格内 | ||
- 数据格式: 支持 URL、Base64、二维码、object URL | ||
- 数据类型: 支持 string、JSON string、object、any[] | ||
- 多样的展示形式: 文档流 / 瀑布流 / 轮播图 / 表格嵌套 | ||
- 灵活的数据类型: URL / Base64 / 二维码 / object URL | ||
- 任意绑定值类型 | ||
- 局部注册 + 局部传参,也可以全局注册 + 全局传参([vue-global-config](https://github.com/cloydlau/vue-global-config) 提供技术支持) | ||
@@ -142,20 +142,20 @@ | ||
| 名称 | 说明 | 类型 | 默认值 | | ||
| ------------- | ------------------------------------------------- | -------------------------- | ------------------------------------------------------------------- | | ||
| value | 绑定值 | string, string[], object[] | | | ||
| pattern | 展示模式(`waterfall`, `swiper` 或 `table-cell`) | string | `undefined`(即文档流) | | ||
| srcAt | 图片 src 的位置 | string, function, symbol | | | ||
| viewerjs | 是否启用 `viewerjs` | boolean | `true` | | ||
| viewerjsProps | `viewerjs` 的参数 | object | `{ zIndex: 5000, zoomRatio: 0.4 }` | | ||
| swiperProps | `swiper` 的参数 | object | `{ observer: true }` | | ||
| qrcode | 是否将 `value` 转换为二维码 | boolean, `'auto'` | `false` | | ||
| qrcodeProps | `qrcode` 的参数 | object | `{ margin: 0, errorCorrectionLevel: 'L', width: 444, height: 444 }` | | ||
| 名称 | 说明 | 类型 | 默认值 | | ||
| ------------- | ------------------------------------------------------- | ------------------------------------- | ------------------------------------------------------------------- | | ||
| value | 绑定值 | any | | | ||
| pattern | 展示模式(`'waterfall'`, `'swiper'` 或 `'table-cell'`) | string | `undefined`(即文档流) | | ||
| srcAt | 图片 src 的位置 | string / symbol / (value: any) => any | | | ||
| viewerjs | 是否启用 `viewerjs` | boolean | `true` | | ||
| viewerjsProps | `viewerjs` 的参数 | object | `{ zIndex: 5000, zoomRatio: 0.4 }` | | ||
| swiperProps | `swiper` 的参数 | object | `{ observer: true }` | | ||
| qrcode | 是否将 value 转换为二维码 | boolean / `'auto'` | `false` | | ||
| qrcodeProps | `qrcode` 的参数 | object | `{ margin: 0, errorCorrectionLevel: 'L', width: 444, height: 444 }` | | ||
### qrcode | ||
如果将 `qrcode` 设为 `'auto'`,`pic-viewer` 会自动判断是否需要转换(`value` 为 Base64 或 URL 时不会转换) | ||
如果将 qrcode 设为 `'auto'`,`pic-viewer` 会自动判断是否需要转换(value 为 Base64 或 URL 时不会转换) | ||
### srcAt | ||
当 `value` 是对象或数组类型,需要指定图片 src 的位置 | ||
用于定位 value 中的图片 src,适用于绑定值非 src 本身的情况 | ||
@@ -165,3 +165,3 @@ - 支持属性名,如 `'url'` | ||
- 支持 symbol 类型的属性名 | ||
- 支持 function,如 `({ url }) => url` | ||
- 支持 Function,如 `({ url }) => url` | ||
@@ -172,5 +172,5 @@ <br> | ||
| 名称 | 说明 | 回调参数 | | ||
| ----- | -------------- | ------------------------------ | | ||
| click | 点击图片后触发 | `(src: string, index: number)` | | ||
| 名称 | 说明 | 回调参数 | | ||
| ----- | -------------- | ---------------------------- | | ||
| click | 点击图片后触发 | (src: string, index: number) | | ||
@@ -198,5 +198,5 @@ <br> | ||
| 名称 | 说明 | 参数 | | ||
| ------- | -------- | --------------------- | | ||
| preview | 手动预览 | 数组下标,默认值为`0` | | ||
| 名称 | 说明 | 参数 | | ||
| ------- | -------- | ----------------------- | | ||
| preview | 手动预览 | (index: number) => void | | ||
@@ -223,5 +223,5 @@ <br> | ||
默认的图片 CSS 高度为148px(与 `el-upload` 保持一致),默认的二维码分辨率为444×444(三倍图),如果你增大了图片的 CSS 尺寸,将导致图片变模糊 | ||
默认的图片 CSS 高度为148px(与 `el-upload` 保持一致),默认的二维码分辨率为 444 × 444(三倍图),如果你增大了图片的 CSS 尺寸,将导致图片变模糊 | ||
解决: 将二维码分辨率设置为展示尺寸的三倍 | ||
解决方式: 将二维码分辨率设置为展示尺寸的三倍 | ||
@@ -288,4 +288,4 @@ ```vue | ||
各版本详细改动请参考 [release notes](https://github.com/cloydlau/pic-viewer/releases) 。 | ||
各版本详细改动请参考 [release notes](https://github.com/cloydlau/pic-viewer/releases) | ||
<br> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
2434004
8231
2
+ Added@types/web-bluetooth@0.0.16(transitive)
+ Added@vueuse/core@9.13.0(transitive)
+ Added@vueuse/metadata@9.13.0(transitive)
+ Added@vueuse/shared@9.13.0(transitive)
+ Addedcamel-case@4.1.2(transitive)
+ Addedcapital-case@1.0.4(transitive)
+ Addedchange-case@4.1.2(transitive)
+ Addedconstant-case@3.0.4(transitive)
+ Addeddom7@4.0.6(transitive)
+ Addeddot-case@3.0.4(transitive)
+ Addedheader-case@2.0.4(transitive)
+ Addedlower-case@2.0.2(transitive)
+ Addedno-case@3.0.4(transitive)
+ Addedparam-case@3.0.4(transitive)
+ Addedpascal-case@3.1.2(transitive)
+ Addedpath-case@3.0.4(transitive)
+ Addedsentence-case@3.0.4(transitive)
+ Addedsnake-case@3.0.4(transitive)
+ Addedssr-window@4.0.2(transitive)
+ Addedswiper@8.4.7(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addedupper-case@2.0.2(transitive)
+ Addedupper-case-first@2.0.2(transitive)
+ Addedvue-demi@0.13.11(transitive)
+ Addedvue-global-config@0.3.1(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@types/web-bluetooth@0.0.20(transitive)
- Removed@vue/compiler-core@3.5.13(transitive)
- Removed@vue/compiler-dom@3.5.13(transitive)
- Removed@vue/compiler-sfc@3.5.13(transitive)
- Removed@vue/compiler-ssr@3.5.13(transitive)
- Removed@vue/reactivity@3.5.13(transitive)
- Removed@vue/runtime-core@3.5.13(transitive)
- Removed@vue/runtime-dom@3.5.13(transitive)
- Removed@vue/server-renderer@3.5.13(transitive)
- Removed@vue/shared@3.5.13(transitive)
- Removed@vueuse/core@12.7.0(transitive)
- Removed@vueuse/metadata@12.7.0(transitive)
- Removed@vueuse/shared@12.7.0(transitive)
- Removedentities@4.5.0(transitive)
- Removedestree-walker@2.0.2(transitive)
- Removedmagic-string@0.30.17(transitive)
- Removedswiper@11.2.4(transitive)
- Removedvue@3.5.13(transitive)
- Removedvue-global-config@0.6.3(transitive)
Updated@vueuse/core@^9.6.0
Updatedlodash-es@^4.17.21
Updatedqrcode@^1.5.1
Updatedswiper@^8.4.5
Updatedvalidator@^13.7.0
Updatedviewerjs@^1.11.1
Updatedvue-global-config@^0.3.0