vue-img-viewr
Advanced tools
Comparing version 1.0.6 to 1.0.8
# 更新日志 | ||
#### 1.0.8 (2022-08-23) | ||
* 修复引入报错的bug | ||
#### 1.0.7 (2022-08-22) | ||
* 分离打包方式,增加cdn支持 | ||
* 增加 style min css | ||
#### 1.0.6 (2021-09-23) | ||
@@ -4,0 +13,0 @@ |
{ | ||
"name": "vue-img-viewr", | ||
"version": "1.0.6", | ||
"version": "1.0.8", | ||
"description": "vue图片查看组件(vue image viewer component)", | ||
"author": "jekorx", | ||
"main": "lib/vue-img-viewr.js", | ||
"main": "lib/vue-img-viewr.umd.js", | ||
"private": false, | ||
@@ -11,6 +11,6 @@ "scripts": { | ||
"start": "npm run dev", | ||
"build": "webpack --config build/webpack.prod.conf.js", | ||
"build": "webpack --config build/webpack.prod.umd.conf.js && webpack --config build/webpack.prod.min.conf.js", | ||
"build:show": "webpack --config build/webpack.show.conf.js" | ||
}, | ||
"dependencies": { | ||
"peerDependencies": { | ||
"vue": "^2.6.12" | ||
@@ -17,0 +17,0 @@ }, |
# vue-img-viewr | ||
[![npm package](https://img.shields.io/badge/npm-v1.0.6-blue)](https://www.npmjs.com/package/vue-img-viewr/v/1.0.6) | ||
[![npm package](https://img.shields.io/badge/npm-v1.0.7-blue)](https://www.npmjs.com/package/vue-img-viewr/v/1.0.7) | ||
@@ -21,5 +21,5 @@ > ❗ vue图片查看组件(vue image viewer component),```1.x```版本为```vue@2.x```组件 | ||
# 安装依赖 | ||
yarn add vue-img-viewr@^1.0.5 | ||
yarn add vue-img-viewr@^1.0.7 | ||
# or | ||
npm i vue-img-viewr@^1.0.5 -S | ||
npm i vue-img-viewr@^1.0.7 -S | ||
``` | ||
@@ -74,2 +74,5 @@ | ||
}, | ||
changeHandle (i) { | ||
console.log(`current image index: ${i}`) | ||
}, | ||
showImagesByJs (index) { | ||
@@ -80,3 +83,7 @@ // 通过js方式显示 | ||
index, | ||
onShow: this.onShow | ||
onShow: this.onShow, | ||
onClose: () => { | ||
console.log('close with js') | ||
return true | ||
}, | ||
}) | ||
@@ -135,2 +142,5 @@ } | ||
}, | ||
changeHandle (i) { | ||
console.log(`current image index: ${i}`) | ||
}, | ||
showImagesByJs (index) { | ||
@@ -141,3 +151,7 @@ // 通过js方式显示 | ||
index, | ||
onShow: this.onShow | ||
onShow: this.onShow, | ||
onClose: () => { | ||
console.log('close with js') | ||
return true | ||
}, | ||
}) | ||
@@ -160,3 +174,3 @@ } | ||
</div> | ||
<ImgViewr :visible="visible" :urls="urls" :initialIndex="index" :on-show="onShow" :on-close="() => (visible = false)" /> | ||
<ImgViewr :visible="visible" :urls="urls" :initialIndex="index" :on-show="onShow" :on-switch="changeHandle" :on-close="() => (visible = false)" /> | ||
<h3>通过js方法调用</h3> | ||
@@ -163,0 +177,0 @@ <div class="imgs"> |
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
77241
8
218
- Removedvue@^2.6.12