Skip to content

Commit

Permalink
[release] bump to 0.8.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
杨宇亮 committed Mar 20, 2019
1 parent 605a332 commit 680a5cb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/image-preview.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/picker.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/scroller.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wdui",
"version": "0.8.0",
"version": "0.8.1",
"description": "Mobile UI Components Library based on Vue 2.0",
"main": "lib/index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue)
}

const version = '0.8.0'
const version = '0.8.1'

export {
install,
Expand Down
8 changes: 4 additions & 4 deletions src/utils/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ if (helperElem.style[perspectiveProperty] !== undefined) {

let getTranslate = function(element) {
let result = {left: 0, top: 0}
if (element === null || element.style === null) {
if (element === null || (element && element.style === null)) {
return result
}

let transform = element.style[transformProperty]
let matches = transform.match(/translate(3d)?\(\s*(-?\d+\.?\d*)px,\s*(-?\d+\.?\d*)px.*\)/)
let transform = element && element.style[transformProperty]
let matches = transform && transform.match(/translate(3d)?\(\s*(-?\d+\.?\d*)px,\s*(-?\d+\.?\d*)px.*\)/)
if(matches) {
result.left = +matches[2]
result.top = +matches[3]
Expand All @@ -49,7 +49,7 @@ let getTranslate = function(element) {
}

let cancelTranslateElement = function(element) {
if (element === null || element.style === null) {
if (element === null || (element && element.style === null)) {
return
}
let transformValue = element.style[transformProperty]
Expand Down

0 comments on commit 680a5cb

Please sign in to comment.