antvis / antvis.github.io

🔜 AntV 新站点!

Home Page:https://antv.vision

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

一些细节问题

afc163 opened this issue · comments

  • 放在 components 里的不要叫 XxxPage,Page 可以去掉。
  • 大写开头。
  • 所有 bannerSVG() 的函数调用都改成 coverImage={<BannerSVG />} bannerSVG={<BannerSVG />}
  • Quotes 也可以提到主题里,感觉其他网站未来也用得上。不过这个不着急。
  • i18n.options.keySeparator = '>'; 去掉,提过的。#23 (comment)
  let lefttop1Display = 'block';
  let lefttop2Display = 'none';
  if (!props.title) {
    lefttop1Display = 'none';
    lefttop2Display = 'block';
  }
  • 这种用法不要再出现了。
  1. 可以直接 const lefttop1Display = props.title ? 'none' : 'block';
  2. lefttop1Display 这个变量如果不是多处使用,不需要有,直接把 props.title ? 'none' : 'block' 字面量写到用的地方。
  • advantagesPage 就是 Features ?是的话可以删掉,直接用主题组件。
  • companiesPage 同理,没有用到的代码一定要删掉。
  • 这里的 -24px 可能有问题,页面检查一下:
    <div className="home-container" style={{ marginTop: '-24px' }}>
  • proplem problem 都改成 question.