我使用的是余烬液体-Teather-http://pzuraq.github.io/liquid-tether/#/examples?a=animation-with-context
我使用的代码来自“动画上下文”下的示例。
这个模式可以工作,但是没有很好的转换,因为在控制台中transitions.js文件中出现了一个错误。
请参见下面的过渡代码:
export default function(){
this.transition(
target('modal-dialog'),
this.toValue(({ index: newIndex }, { index: oldIndex }) => newIndex > oldIndex),
this.use('tether', ['to-left', options]),
this.reverse('tether', ['to-right', options])
);
this.transition(
target('modal-dialog'),
this.toValue(({ index }) => index === 1),
this.use('tether', 'fade', 'fade')
);
this.transition(
target('modal-dialog'),
this.toValue(({ index }) => !index),
this.use('tether', 'fade', 'fade')
);
}错误是:未定义目标。
我该如何定义目标?
先谢谢各位:)
发布于 2016-06-06 20:40:36
您可以在这里检查选项允许的值。http://tether.io/在选项下搜索:)。
发布于 2016-06-06 20:30:20
抓那个!我已经解决了我自己的问题。我只需要在transitions.js文件的顶部声明这一点。
import { target } from 'liquid-tether';但现在我得到的问题是“选项没有定义”。...Any有什么想法吗?
发布于 2016-06-08 16:23:24
未定义的options指的是要传递给动画的选项。从文档中看不太清楚,但希望这里有一个选项散列。例如:
this.use('tether', ['to-left', {duration: 500}]),
检查液体火场的所有可用的动画选项。
https://stackoverflow.com/questions/37666260
复制相似问题