diff --git a/package.json b/package.json index b35220e..9305954 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bd/core", - "version": "1.8.3", + "version": "1.8.4", "type": "module", "description": "百搭UI组件库的核心", "main": "dist/index.js", diff --git a/src/anim.js b/src/anim.js index bf05e40..9aa746c 100644 --- a/src/anim.js +++ b/src/anim.js @@ -29,9 +29,18 @@ export function animate(duration = 200, fromto = [], out = false) { export const MODES = { fade: [{ opacity: 0 }, { opacity: 1 }], scale: [{ transform: 'scale(0)' }, { transform: 'scale(1)' }], + 'micro-bounce': [ + { opacity: 0, transform: 'scale(0.8)' }, + { transform: 'scale(1.05)', opacity: 1 }, + { transform: 'scale(1)' } + ], + slide: [ + { opacity: 0, transform: 'translateY(-50px)' }, + { opacity: 1, transform: 'translateY(0)' } + ], bounce: [ { transform: 'scale(0)' }, - { transform: 'scale(1.25)' }, + { transform: 'scale(1.2)' }, { transform: 'scale(1)' } ], rotate: [{ transform: 'rotate(0)' }, { transform: 'rotate(360deg)' }] diff --git a/src/html.js b/src/html.js index 7ea81a2..3557309 100644 --- a/src/html.js +++ b/src/html.js @@ -625,7 +625,7 @@ class AnimPart extends AttributePart { } commitValue({ type = 'fade', duration, custom } = {}) { - let fromto = MODES[type] + let fromto = MODES[type] || MODES.fade if (custom) { fromto = custom