diff --git a/README.CN.md b/README.CN.md index 9725e1699..2b03fac19 100644 --- a/README.CN.md +++ b/README.CN.md @@ -54,7 +54,6 @@ render(, 'body', new Store) | ------------------------------- | ----------------------------------- | | [omi-docs](https://tencent.github.io/omi/site/docs/cn.html) 和 [例子](https://codepen.io/collection/DrMYgV/) 和 [wcd demos](https://webcomponents.dev/demos/omi)| Omi 官方文档 | | [omim![](https://raw.githubusercontent.com/dntzhang/cax/master/asset/hot.png)](https://github.com/Tencent/omi/tree/master/packages/omim)| Omi 打造的跨框架 Material Design UI 组件库, 任意框架可以使用,([DOCS & REPL](https://tencent.github.io/omi/packages/omim/docs/build/cn.html) && [加入我们](https://github.com/Tencent/omi/tree/master/packages/omim#contribution)!)| -| [omis![](https://raw.githubusercontent.com/dntzhang/cax/master/asset/hot.png) ](https://github.com/Tencent/omi/tree/master/packages/omis) 和 [例子](https://codepen.io/collection/XjLaRo/) 和 [文档](https://tencent.github.io/omi/site/omis/cn.html)| Functional Component + Store + Scoped Style + Web Components in tiny size| | [omi-kbone![](https://raw.githubusercontent.com/dntzhang/cax/master/asset/hot.png) ](https://github.com/Tencent/omi/tree/master/packages/omi-kbone)| 直接使用 Omis 开发小程序或 Web,基于 [kbone](https://github.com/wechat-miniprogram/kbone)| | [omio](https://github.com/Tencent/omi/tree/master/packages/omio)| 兼容老浏览器的 Omi 版本(支持到 IE8+) | | [omi-ssr](https://github.com/Tencent/omi/tree/master/packages/omi-ssr)| 服务端同构渲染解决方案(目前只能用 omio) | diff --git a/README.md b/README.md index 39484c85c..9b55420dd 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,6 @@ render(, 'body', new Store) | ------------------------------- | ----------------------------------- | | [omi-docs](https://tencent.github.io/omi/site/docs/index.html) and [codepen](https://codepen.io/collection/DrMYgV/) and [wcd demos](https://webcomponents.dev/demos/omi)| Omi official documents | | [omim![](https://raw.githubusercontent.com/dntzhang/cax/master/asset/hot.png)](https://github.com/Tencent/omi/tree/master/packages/omim)| Cross **frameworks** and **themes** components.([DOCS & REPL](https://tencent.github.io/omi/packages/omim/docs/build/index.html) && [JOIN US!](https://github.com/Tencent/omi/tree/master/packages/omim#contribution))| -| [omis![](https://raw.githubusercontent.com/dntzhang/cax/master/asset/hot.png) ](https://github.com/Tencent/omi/tree/master/packages/omis) and [codepen](https://codepen.io/collection/XjLaRo/) and [docs](https://tencent.github.io/omi/site/omis/index.html)| Functional Component + Store + Scoped Style + Web Components in tiny size| | [omi-kbone![](https://raw.githubusercontent.com/dntzhang/cax/master/asset/hot.png) ](https://github.com/Tencent/omi/tree/master/packages/omi-kbone)| 直接使用 Omis 开发小程序或 Web,基于 [kbone](https://github.com/wechat-miniprogram/kbone)| | [omio](https://github.com/Tencent/omi/tree/master/packages/omio)| Omi for old browsers with same api(IE8+)| | [omi-ssr](https://github.com/Tencent/omi/tree/master/packages/omi-ssr)| Server-side rendering(support omio only)| diff --git a/index.html b/index.html index 017472aea..8d3f1d74d 100644 --- a/index.html +++ b/index.html @@ -230,15 +230,7 @@ Omim Docs - - - - - - Omis Docs - + { - return ( -
- - {store.count} - +define('my-index', ['paused'], ({ store }) => ( +
+

OMI SNAKE

-
跳转
+ + +
+
Up
+
Down
+
Left
+
Right
+
加速/减速
+
Reset
+
{store.data.paused ? 'Play' : 'Pause'}
- ) -} +
-Counter.store = _ => { - return { - count: 1, - add() { - this.count++ - _.update() - }, - sub() { - this.count-- - _.update() - }, - clickHandle() { - if ("undefined" != typeof wx && wx.getSystemInfoSync) { - wx.navigateTo({ - url: '../log/index?id=1' - }) - } else { - location.href = 'log.html' - } - } - } -} - -export default Counter +), "undefined" != typeof wx && wx.getSystemInfoSync || rpx(require('./_index.css'))) ``` -注意这里 css 在小程序和web里都是全局作用,小程序没法做到 scoped style,在 web 里是可以做到 scoped,只需要这样: - -```js -Counter.css = require('./_index.css') -``` - -使用下划线前缀并且赋值便可。 ## 快速开始 @@ -102,7 +78,7 @@ npm run build //发布 web * 不要使用 bindtap,使用 onClick * 图片请使用 cdn 地址或者 base64 -* 如果要兼容 web,请用 HTML 和 CSS 标签,比如用 div,不用 view,不用 rpx 单位等 +* 如果要兼容 web,请用 HTML 和 CSS 标签,比如用 div,不用 view 等 ## Todo