Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Tencent/omi
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.1.0
Choose a base ref
...
head repository: Tencent/omi
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf32597a8308ed847e26a57713bf32b54713f355
Choose a head ref
  • 1 commit
  • 8 files changed
  • 1 contributor

Commits on Oct 17, 2023

  1. Copy the full SHA
    cf32597 View commit details
Showing with 45 additions and 21,754 deletions.
  1. +2 −0 README.CN.md
  2. +2 −0 README.md
  3. +2 −0 packages/omi/README.md
  4. +3 −0 packages/omi/examples/main.tsx
  5. +31 −0 packages/omi/examples/tdesign-icons-omi.tsx
  6. +0 −21,754 packages/omi/package-lock.json
  7. +1 −0 packages/omi/package.json
  8. +4 −0 packages/omi/vite.config.ts
2 changes: 2 additions & 0 deletions README.CN.md
Original file line number Diff line number Diff line change
@@ -54,6 +54,8 @@ npm i omi
- 入门套件 (未发布到 npm)
- [`omi-starter-ts`](https://github.com/Tencent/omi/tree/master/packages/omi-starter-ts) - 基于Vite + Omi + TypeScript 的模板。
- [`omi-starter-js`](https://github.com/Tencent/omi/tree/master/packages/omi-starter-js) - 基于Vite + Omi + JavaScript 的模板。
- Components
- [`tdesign-icons-omi`](https://github.com/omijs/tdesign-icons) - 基于 TDesign 和 Omi 的跨框架 icon 集合。
- 综合性例子 (未发布到 npm)
- [`snake-game-2tier`](https://github.com/Tencent/omi/tree/master/packages/snake-game-2tier) - 基于 Omi `Signal` class 两层架构的贪吃蛇游戏。
- [`snake-game-3tier`](https://github.com/Tencent/omi/tree/master/packages/snake-game-3tier) - 基于 Omi 响应是函数三层架构的贪吃蛇游戏。
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -53,6 +53,8 @@ npm i omi
- Starter kits (not published to npm)
- [`omi-starter-ts`](https://github.com/Tencent/omi/tree/master/packages/omi-starter-ts) - A starter repo for building web app or reusable components using Omi in TypeScript base on Vite.
- [`omi-starter-js`](https://github.com/Tencent/omi/tree/master/packages/omi-starter-js) - A starter repo for building web app or reusable components using Omi in JavaScript base on Vite.
- Components
- [`tdesign-icons-omi`](https://github.com/omijs/tdesign-icons) - Cross framework icon collection based on tdesign design architecture and omi.
- Examples (not published to npm)
- [`snake-game-2tier`](https://github.com/Tencent/omi/tree/master/packages/snake-game-2tier) - SNake Game with `Signal` class
- [`snake-game-3tier`](https://github.com/Tencent/omi/tree/master/packages/snake-game-3tier) - SNake Game with reactivity functions
2 changes: 2 additions & 0 deletions packages/omi/README.md
Original file line number Diff line number Diff line change
@@ -51,6 +51,8 @@ npm i omi
- Starter kits (not published to npm)
- [`omi-starter-ts`](https://github.com/Tencent/omi/tree/master/packages/omi-starter-ts) - A starter repo for building web app or reusable components using Omi in TypeScript base on Vite.
- [`omi-starter-js`](https://github.com/Tencent/omi/tree/master/packages/omi-starter-js) - A starter repo for building web app or reusable components using Omi in JavaScript base on Vite.
- Components
- [`tdesign-icons-omi`](https://github.com/omijs/tdesign-icons) - Cross framework icon collection based on tdesign design architecture and omi.
- Examples (not published to npm)
- [`snake-game-2tier`](https://github.com/Tencent/omi/tree/master/packages/snake-game-2tier) - SNake Game with `Signal` class
- [`snake-game-3tier`](https://github.com/Tencent/omi/tree/master/packages/snake-game-3tier) - SNake Game with reactivity functions
3 changes: 3 additions & 0 deletions packages/omi/examples/main.tsx
Original file line number Diff line number Diff line change
@@ -2,6 +2,9 @@ switch (location.hash) {
case '#base':
import('./base')
break
case '#tdesign-icons-omi':
import('./tdesign-icons-omi')
break
case '#signal':
import('./signal')
break
31 changes: 31 additions & 0 deletions packages/omi/examples/tdesign-icons-omi.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { render, signal, tag, Component, h } from '@/index'

import 'tdesign-icons-omi/add-rectangle'
import 'tdesign-icons-omi/minus-rectangle'

const count = signal(0)

function add() {
count.value++
}

function sub() {
count.value--
}

@tag('counter-demo')
class CounterDemo extends Component {
static css = 'span { color: red; }'

render() {
return (
<>
<t-icon-minus-rectangle onClick={sub} />
<span>{count.value}</span>
<t-icon-add-rectangle onClick={add} />
</>
)
}
}

render(<counter-demo />, document.body)
Loading