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: b5c1c3941341a0d16a63e799ac0ffea78c7b5b80
Choose a base ref
...
head repository: Tencent/omi
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 59968a45a242fc09dd22780739780da7f6fef9b0
Choose a head ref
  • 14 commits
  • 26 files changed
  • 4 contributors

Commits on Apr 1, 2024

  1. feat(omi-templates): breadcrumb & icon & switch

    dntzhang committed Apr 1, 2024
    Copy the full SHA
    1474e14 View commit details
  2. feat(omi-templates): fix scroll style

    dntzhang committed Apr 1, 2024
    Copy the full SHA
    459fd15 View commit details
  3. fix(omi-templates): fix ts error

    dntzhang committed Apr 1, 2024
    Copy the full SHA
    d032875 View commit details

Commits on May 8, 2024

  1. fix(omi-templates): add docs

    dntzhang committed May 8, 2024
    Copy the full SHA
    b74fff9 View commit details

Commits on May 18, 2024

  1. chore(reactivity-signal): more test cases and comments

    dntzhang committed May 18, 2024
    Copy the full SHA
    4164d73 View commit details

Commits on May 21, 2024

  1. feat(omi-router): history mode supported

    dntzhang committed May 21, 2024
    Copy the full SHA
    6ee597e View commit details

Commits on Jun 28, 2024

  1. docs: readme

    dntzhang committed Jun 28, 2024
    Copy the full SHA
    241f2c8 View commit details
  2. docs: readme

    dntzhang committed Jun 28, 2024
    Copy the full SHA
    02ecd40 View commit details

Commits on Jul 1, 2024

  1. feat(transition): add dom param for enter funcs

    novlan1 committed Jul 1, 2024
    Copy the full SHA
    b895660 View commit details
  2. docs(transition): update interface docs

    novlan1 committed Jul 1, 2024
    Copy the full SHA
    07552ec View commit details
  3. docs(transition): update interface docs

    novlan1 committed Jul 1, 2024
    Copy the full SHA
    ca7831f View commit details

Commits on Jul 2, 2024

  1. add fire param<options>,support bubbles and composed

    为fire添一个options参数,支持传入bubbles and composed两个事件触发参数
    zhangfisher authored Jul 2, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a2923a9 View commit details
  2. Merge pull request #891 from novlan1/feature/transition

    feat(transition): add dom param for enter funcs
    dntzhang authored Jul 2, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7c9a014 View commit details
  3. Merge pull request #892 from zhangfisher/master

    add fire param<options>,support bubbles and composed
    dntzhang authored Jul 2, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    59968a4 View commit details
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -20,6 +20,5 @@ dist
*.sln
*.sw?
build
docs
coverage
package.lock.json
1 change: 1 addition & 0 deletions README.CN.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
<h2 align="center">Omi - Web Components 框架</h2>

- 📶 信号 **Signal** 驱动的响应式编程,[reactive-signal](https://github.com/Tencent/omi/tree/master/packages/reactive-signal)强力驱动
- 🧱 [TDesign Web 组件](https://github.com/TDesignOteam/tdesign-web-components)
-**微小的**尺寸,**极速的**性能
- 💗 [目标 100+ 模板](https://omi.cdn-go.cn/templates/latest/) & [OMI 模板源码](https://github.com/Tencent/omi/tree/master/packages/omi-templates)
- 🐲 [OMI Form](https://omi.cdn-go.cn/form/latest/docs/) & [OMI Form 游乐场](https://omi.cdn-go.cn/form/latest/play/) & [Lucide Omi 图标](https://github.com/omijs/lucide-omi)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ English | [简体中文](./README.CN.md)
<h2 align="center">Omi - Web Components Framework</h2>

- 📶 **Signal**-driven reactive programming by [reactive-signal](https://github.com/Tencent/omi/tree/master/packages/reactive-signal)
- 🧱 [TDesign Web Components](https://github.com/TDesignOteam/tdesign-web-components)
- 💗 [100+ OMI Templates](https://omi.cdn-go.cn/templates/latest/) & [OMI Templates Source Code](https://github.com/Tencent/omi/tree/master/packages/omi-templates)
- 🐲 [OMI Form](https://omi.cdn-go.cn/form/latest/docs/) & [OMI Form Playground](https://omi.cdn-go.cn/form/latest/play/) & [Lucide Omi Icons](https://github.com/omijs/lucide-omi)
-**Tiny** size, **Fast** performance
3 changes: 2 additions & 1 deletion packages/omi-router/README.md
Original file line number Diff line number Diff line change
@@ -151,7 +151,8 @@ import '../tailwind'

const router = new Router({
routes,
renderTo: 'body'
renderTo: 'body',
hash: false
})
```

1 change: 1 addition & 0 deletions packages/omi-router/examples/simple/main.tsx
Original file line number Diff line number Diff line change
@@ -5,4 +5,5 @@ import '../tailwind'
const router = new Router({
routes,
renderTo: 'body',
// hash: false,
})
2 changes: 1 addition & 1 deletion packages/omi-router/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "omi-router",
"version": "4.1.7",
"version": "4.1.8",
"type": "module",
"description": "Router for Omi",
"main": "dist/index.es.js",
2 changes: 2 additions & 0 deletions packages/omi-router/src/router-view.tsx
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ export interface Route {
interface Props {
routes: Route[]
base?: string
hash?: boolean
}

@tag('router-view')
@@ -41,6 +42,7 @@ export class RouterView extends Component<Props> {
router: this,
})
this.base = this.props.base || ''
this.isHashMode = this.props.hash === false ? false : true

this.routes = this.props.routes.map((route) => {
const keys: Key[] = []
3 changes: 2 additions & 1 deletion packages/omi-router/src/router.tsx
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ type CSSItem = CSSStyleSheet | Module | string
export class Router {
el: RouterView

constructor(options: { routes: Route[]; renderTo: string; css?: CSSItem[]; base?: string }) {
constructor(options: { routes: Route[]; renderTo: string; css?: CSSItem[]; base?: string, hash?: boolean}) {
this.el = render(
<router-view
onInstall={(evt: CustomEvent) => {
@@ -17,6 +17,7 @@ export class Router {
}}
routes={options.routes}
base={options.base}
hash={options.hash}
/>,
options.renderTo,
)
30 changes: 15 additions & 15 deletions packages/omi-templates/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/omi-templates/package.json
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
"copy-to-clipboard": "^3.3.3",
"echarts": "^5.5.0",
"markdown-it": "^14.0.0",
"omi": "7.6.5",
"omi": "7.6.7",
"omi-router": "latest",
"omi-suspense": "latest",
"prismjs": "^1.29.0",
79 changes: 63 additions & 16 deletions packages/omi-templates/src/components/component-layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, VNode, tag } from 'omi'
import { Component, VNode, classNames, tag } from 'omi'
import './navbar.tsx'
import { navbarItems, activeMenuItem } from '../store.ts'
import { CustomizeButton } from './customize-button.tsx'
@@ -24,28 +24,75 @@ export function ComponentLayout(props: { hideFooter?: boolean; current?: string;
</div>

<div class="flex items-center">
<NavbarWrapper.tagName />
<NavbarWrapper />
</div>
</div>
</header>

<div class="flex gap-6">
<div class="w-64 text-[#00000066] py-4 px-2 border-r">
<div class="text-xs uppercase px-2 py-1 mb-2">基础</div>
<div class="w-64 text-[#00000066] py-4 px-2 border-r h-[calc(100vh-60px)] overflow-auto">
<div>
<div class="text-xs uppercase px-2 py-1 my-2">基础</div>

<nav class="text-sm text-[#00000099]">
<a href="#" class="block px-2 py-3 mb-1 rounded bg-primary text-white transition-colors duration-200">
Button 按钮
</a>
<a href="#" class="block px-2 py-3 mb-1 rounded hover:bg-zinc-100 hover:text-black/90 transition-colors duration-200">
Icon 图标
</a>
<a href="#" class="block px-2 py-3 mb-1 rounded hover:bg-zinc-100 hover:text-black/90 transition-colors duration-200">
Link 链接
</a>
</nav>
<nav class="text-sm text-[#00000099]">
<a
href="#/components/button"
class={classNames({
'block px-2 py-3 mb-1 rounded transition-colors duration-200': true,
'bg-primary text-white': props.current === '/components/button',
'hover:bg-zinc-100 hover:text-black/90': props.current !== '/components/button',
})}
>
Button 按钮
</a>
<a
href="#/components/icon"
class={classNames({
'block px-2 py-3 mb-1 rounded transition-colors duration-200': true,
'bg-primary text-white': props.current === '/components/icon',
'hover:bg-zinc-100 hover:text-black/90': props.current !== '/components/icon',
})}
>
Icon 图标
</a>
</nav>
</div>

<div>
<div class="text-xs uppercase px-2 py-1 my-2">导航</div>

<nav class="text-sm text-[#00000099]">
<a
href="#/components/breadcrumb"
class={classNames({
'block px-2 py-3 mb-1 rounded transition-colors duration-200': true,
'bg-primary text-white': props.current === '/components/breadcrumb',
'hover:bg-zinc-100 hover:text-black/90': props.current !== '/components/breadcrumb',
})}
>
Breadcrumb 面包屑
</a>
</nav>
</div>

<div>
<div class="text-xs uppercase px-2 py-1 my-2">输入</div>

<nav class="text-sm text-[#00000099]">
<a
href="#/components/switch"
class={classNames({
'block px-2 py-3 mb-1 rounded transition-colors duration-200': true,
'bg-primary text-white': props.current === '/components/switch',
'hover:bg-zinc-100 hover:text-black/90': props.current !== '/components/switch',
})}
>
Switch 开关
</a>
</nav>
</div>
</div>
<div class='w-full'>{props.children}</div>
<div class="w-full h-[calc(100vh-60px)] overflow-auto">{props.children}</div>
</div>

{!props.hideFooter && (
59 changes: 59 additions & 0 deletions packages/omi-templates/src/docs/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
export const docsConfig = {
zh: {
sidebar: [
{
text: '介绍',
children: [
{
text: '开始',
path: '#/product-docs/zh/getting-started',
value: 'getting-started',
},
{
text: '响应式',
path: '#/product-docs/zh/reactivity',
value: 'reactivity',
},
],
},
{
text: '核心概念',
children: [
{
text: '属性',
path: '#/product-docs/zh/props',
value: 'props',
},
],
},
],
},
en: {
sidebar: [
{
text: 'Guide',
items: [
{ text: 'Introduction', link: '/introduction' },
{ text: 'Reactivity', link: '/reactivity' },
{ text: 'OOP & DOP', link: '/oop-dop' },
],
},
{
text: 'Core API',
items: [
{ text: 'Props', link: '/props' },
{ text: 'CSS', link: '/css' },
{ text: 'Event', link: '/event' },
{ text: 'Ref', link: '/ref' },
{ text: 'Slot', link: '/slot' },
{ text: 'Provide-Inject', link: '/provide-inject' },
{ text: 'Lifecycle', link: '/lifecycle' },
{ text: 'Directive', link: 'directive' },
{ text: 'Mixin', link: 'mixin' },
{ text: 'Update', link: '/update' },
{ text: 'Cross Frameworks', link: '/cross-frameworks' },
],
},
],
},
}
Loading