Skip to content

Commit

Permalink
fix: 兼容 1.0 class 组件在 Web 下 transitionEnd 回调失效 (#47)
Browse files Browse the repository at this point in the history
* fix: support class 1.0

* feat: refact build script
  • Loading branch information
balloonzzq authored Apr 15, 2020
1 parent 45d055c commit e2473c7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 32 deletions.
8 changes: 4 additions & 4 deletions packages/transition/build.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"plugins": [
[
"rax-plugin-component",
"build-plugin-rax-component",
{
"enableTypescript": true,
"targets": ["web", "weex"]
"type": "rax",
"targets": ["web"]
}
]
]
}
}
41 changes: 18 additions & 23 deletions packages/transition/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
{
"name": "universal-transition",
"version": "1.0.2",
"version": "1.0.3",
"description": "A universal transition API.",
"license": "BSD-3-Clause",
"main": "lib/index.js",
"files": [
"src",
"lib",
"dist"
],
"scripts": {
"start": "rax-scripts start",
"build": "rax-scripts build",
"test": "rax-scripts test",
"lint": "eslint --ext .js --ext .jsx --ext .ts --ext .tsx ./src",
"prebuild": "npm run lint && npm run test",
"prepublish": "npm run build"
"start": "build-scripts start",
"build": "build-scripts build"
},
"pre-commit": [
"lint"
],
"keywords": [
"universal"
"Rax"
],
"engines": {
"npm": ">=3.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/raxjs/universal-api.git"
Expand All @@ -29,21 +36,9 @@
"universal-env": "^3.0.0"
},
"devDependencies": {
"@types/jest": "^24.0.18",
"@typescript-eslint/eslint-plugin": "^1.7.0",
"@typescript-eslint/parser": "^1.7.0",
"babel-eslint": "^10.0.2",
"eslint": "5.15.1",
"eslint-config-rax": "^0.0.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-react": "^7.12.4",
"pre-commit": "^1.2.2",
"rax": "^1.0.8",
"rax-plugin-component": "^0.1.9",
"rax-scripts": "^2.0.0"
},
"pre-commit": [
"lint",
"test"
]
"build-plugin-rax-component": "^0.1.0",
"@alib/build-scripts": "^0.1.0"
}
}
12 changes: 7 additions & 5 deletions packages/transition/src/web/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ export default function transition(node: any, styles: any, options: any, callbac
node.addEventListener('transitionend', transitionEndHandler);
}

for (const key in styles) {
// TODO add vendor prefix
let value = styles[key];
node.style[key] = value;
}
setTimeout(() => {
for (const key in styles) {
// TODO add vendor prefix
let value = styles[key];
node.style[key] = value;
}
}, 0);
}

0 comments on commit e2473c7

Please sign in to comment.