Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 兼容 1.0 class 组件在 Web 下 transitionEnd 回调失效 #47

Merged
merged 2 commits into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}