ant-motion / ant-motion-dva-cli-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ant-motion-dva-cli-example

ant motion 的首页在 dva-cli0.8.0 里运行的例子

请参照documentation里的步骤。。

2.0 的改动

2.0 里的改动是依据 dva 2.x 脚手架的改动而改动,如果不是 dva-cli 脚手架,去除 index.js 里的 show 相关代码:

  1. stage 里的 show;
  2. didMount 里的 if 处理
    // dva 2.0 样式在组件渲染之后动态加载,导致滚动组件不生效;线上不影响;
    if (location.port) {
      // 样式 build 时间在 200-300ms 之间;
      setTimeout(() => {
        this.setState({
          show: true,
        });
      }, 500);
    }
  1. return 里 children 的处理, 替换为 {children}

0.7.8 例子请切回 master

About


Languages

Language:JavaScript 55.2%Language:CSS 43.9%Language:HTML 0.8%