Timi bdaee75b81 feat(master-detail): add cover sub-mode and providePane
- MasterDetail / MasterDetailPage: add `sub-mode` ("shift" | "cover", default
  "shift", so existing callers are unaffected). `cover` leaves the master pane
  untouched and puts the sub pane over the detail column: the case where the
  list must stay visible while drilling into another module. The detail pane
  fades out in place instead of sliding into the master column, so it stays
  mounted and keeps its scroll position and internal state.
- use-master-detail: export `providePane(context)` and return `close` from
  useMasterDetailPane. A page can now hand a derived pane context to its whole
  subtree, which is how a host rewrites sub view ids (prefixing them with the
  owning record). The alternative - a wrapper component - breaks the
  `.detail > .tui-page-layout` selectors in page-layout.less and sends the
  in-pane navbar back to `position: fixed`.
- docs: cover vs shift, and how to prefix sub view ids without a wrapper.
2026-11-18 15:08:44 +08:00
2026-11-06 16:53:10 +08:00
2026-10-28 17:04:08 +08:00
2025-07-08 16:33:11 +08:00
2025-07-08 16:33:11 +08:00
2025-07-08 16:33:11 +08:00
2026-11-10 17:30:10 +08:00
2025-07-08 03:24:24 +00:00
2026-11-16 17:47:09 +08:00
2026-09-21 16:05:14 +08:00
2026-04-03 01:03:22 +08:00
2025-07-08 16:33:11 +08:00

timi-tdesign-mobile

Vue 3 移动端通用组件库,依赖 timi-web 提供基础组件和编辑器能力。

本包不依赖 timi-web-api。业务项目可以只安装本包使用通用组件;需要业务接口、领域类型或用户状态时,再单独安装 timi-web-api。

文章和通知组件

ArticleEditor、ArticleView、NotifyEditor、NotifyView 只约束对象的最小字段。Article、Attachment 和 NotifyDetail 支持携带业务自定义字段,不要求对象来自 timi-web-api。

上传和附件地址由业务项目通过回调注入:

<article-editor
  :model-value="article"
  :upload-image="uploadImage"
  :upload-video="uploadVideo"
  :resolve-attachment-url="resolveAttachmentUrl"
  @update:model-value="article = $event"
/>
<article-view
  :article="article"
  :resolve-attachment-url="resolveAttachmentUrl"
/>

通知组件使用同样的 uploadImage、uploadVideo 和 resolveAttachmentUrl 回调。没有附件上传需求时,可以不传上传回调。

文档与演示

组件演示与 API 文档由 VitePress 驱动,源码位于 docs/。它作为独立子包维护,依赖版本与根项目隔离(根项目用 Vite 7,文档站需要 VitePress 自带的 Vite 5)。

首次使用先安装文档站依赖:

pnpm -C docs install

启动演示站(默认 http://localhost:3004):

pnpm run dev

构建静态站点:

pnpm run build:doc

演示直接引用 src 源码,改动组件即可热更新;API 表格由 vue-docgen-api 在构建期解析组件源码生成,无需手写。演示统一渲染在手机宽度的视口里——这是移动端组件库,按桌面宽度铺开会失去真实形态。新增组件的完整步骤见文档站的「演示与文档约定」页面。

开发

pnpm install
pnpm run build
S
Description
移动端前端组件库
Readme MIT
611 KiB
v2.1.1
Latest
2026-11-26 08:00:07 +00:00
Languages
Vue 62.2%
TypeScript 31.3%
Less 6.5%