Skip to content

Commit

Permalink
Merge pull request #7 from lixianbin1/Next
Browse files Browse the repository at this point in the history
update:更新版本v0.9.5
  • Loading branch information
lixianbin1 authored Apr 1, 2024
2 parents 3ae5ed0 + 8f516cb commit a7f260e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/imgZoom.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "imgzoom-li",
"version": "0.9.4",
"version": "0.9.5",
"description": "一个可以查看图片(可以缩放,拖拽)的JS插件",
"main": "./src/imgZoom.min.js",
"types": "./dist/imgZoom.d.ts",
Expand Down
13 changes: 8 additions & 5 deletions src/imgZoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,13 @@ function bing(){
//判断class字符串是否存在imgzoom
function inStr(str, string) {
var isin = false;
var arr = str.split(' ');
for (var i in arr) {
if (arr[i] == string) {
isin = true;
if (typeof str === "string") {
var arr = str.split(' ');
for (var i in arr) {
if (arr[i] === string) {
isin = true;
break;
}
}
}
return isin;
Expand Down Expand Up @@ -411,4 +414,4 @@ var imgZoom = function(){
};
}();

export default imgZoom
export default imgZoom
2 changes: 1 addition & 1 deletion src/imgZoom.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a7f260e

Please sign in to comment.