@done-coding/admin-core 0.20.1-alpha.0 → 0.21.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/es/components/app-layout/AppLayout.vue.mjs +1 -1
  2. package/es/components/app-layout/AppLayout.vue2.mjs +51 -6
  3. package/es/components/app-layout/AppPage.vue.mjs +1 -1
  4. package/es/components/app-layout/AppPage.vue2.mjs +16 -9
  5. package/es/components/display/ShadowClone.vue.mjs +32 -0
  6. package/es/components/display/ShadowClone.vue2.mjs +4 -0
  7. package/es/components/display/use-shadow-target.mjs +76 -0
  8. package/es/components/form/FormActiveFilter.vue.mjs +7 -0
  9. package/es/components/form/FormActiveFilter.vue2.mjs +62 -0
  10. package/es/components/form/FormInput.vue.mjs +27 -0
  11. package/es/components/form/FormInput.vue2.mjs +4 -0
  12. package/es/components/form/FormInputShadowClone.vue.mjs +47 -0
  13. package/es/components/form/FormInputShadowClone.vue2.mjs +4 -0
  14. package/es/components/form/FormMain.vue.mjs +1 -1
  15. package/es/components/form/FormMain.vue2.mjs +5 -25
  16. package/es/components/form/FormSelectShadowClone.vue.mjs +57 -0
  17. package/es/components/form/FormSelectShadowClone.vue2.mjs +4 -0
  18. package/es/components/form/FormShadowCloneDispatch.vue.mjs +7 -0
  19. package/es/components/form/FormShadowCloneDispatch.vue2.mjs +74 -0
  20. package/es/components/form/FormSortSwitch.vue.mjs +7 -0
  21. package/es/components/form/FormSortSwitch.vue2.mjs +188 -0
  22. package/es/components/form/FormSortSwitchGroup.vue.mjs +7 -0
  23. package/es/components/form/FormSortSwitchGroup.vue2.mjs +68 -0
  24. package/es/components/form/FormUpload.vue.mjs +8 -0
  25. package/es/components/form/FormUpload.vue2.mjs +112 -0
  26. package/es/components/form/FormUploadAudio.vue.mjs +7 -0
  27. package/es/components/form/FormUploadAudio.vue2.mjs +88 -0
  28. package/es/components/form/FormUploadCard.vue.mjs +7 -0
  29. package/es/components/form/FormUploadCard.vue2.mjs +56 -0
  30. package/es/components/form/FormUploadFileInfo.vue.mjs +7 -0
  31. package/es/components/form/FormUploadFileInfo.vue2.mjs +36 -0
  32. package/es/components/form/FormUploadImage.vue.mjs +7 -0
  33. package/es/components/form/FormUploadImage.vue2.mjs +77 -0
  34. package/es/components/form/FormUploadTrigger.vue.mjs +7 -0
  35. package/es/components/form/FormUploadTrigger.vue2.mjs +34 -0
  36. package/es/components/form/FormUploadVideo.vue.mjs +7 -0
  37. package/es/components/form/FormUploadVideo.vue2.mjs +74 -0
  38. package/es/components/form/use-password-autofill.mjs +34 -0
  39. package/es/components/form/use-upload-state.mjs +98 -0
  40. package/es/components/list-layout/ListLayout.vue.mjs +1 -1
  41. package/es/components/list-layout/ListLayout.vue2.mjs +36 -9
  42. package/es/components/list-layout/use-active-filter.mjs +133 -0
  43. package/es/components/modal/ImagePreviewTrigger.vue.mjs +34 -0
  44. package/es/components/modal/ImagePreviewTrigger.vue2.mjs +4 -0
  45. package/es/components/modal/ModalImagePreview.vue.mjs +52 -0
  46. package/es/components/modal/ModalImagePreview.vue2.mjs +4 -0
  47. package/es/components/modal/ModalPorter.vue.mjs +49 -2
  48. package/es/components/modal/ModalShelf.vue.mjs +13 -4
  49. package/es/components/modal/ModalVideoPreview.vue.mjs +8 -0
  50. package/es/components/modal/ModalVideoPreview.vue2.mjs +93 -0
  51. package/es/components/modal/VideoPreviewTrigger.vue.mjs +7 -0
  52. package/es/components/modal/VideoPreviewTrigger.vue2.mjs +96 -0
  53. package/es/components/modal/modal-global-keys.mjs +11 -0
  54. package/es/components/modal/modal-global-symbol.mjs +6 -0
  55. package/es/components/modal/modal-shelf-core.mjs +53 -4
  56. package/es/components/table/TableEmpty.vue.mjs +36 -0
  57. package/es/components/table/TableEmpty.vue2.mjs +4 -0
  58. package/es/components/table/TableMain.vue.mjs +1 -1
  59. package/es/components/table/TableMain.vue2.mjs +21 -8
  60. package/es/components/view-layout/ViewLayout.vue.mjs +1 -1
  61. package/es/components/view-layout/ViewLayout.vue2.mjs +1 -1
  62. package/es/hooks/menus-dispatch.mjs +8 -3
  63. package/es/index.mjs +127 -91
  64. package/es/style.css +412 -33
  65. package/package.json +2 -2
  66. package/src/components/app-layout/docs/README-AppLayout.md +48 -0
  67. package/src/components/app-layout/docs/README-AppPage.md +40 -2
  68. package/src/components/display/README.md +9 -3
  69. package/src/components/display/docs/README-ShadowClone.md +75 -0
  70. package/src/components/form/README.md +15 -2
  71. package/src/components/form/docs/README-FormActiveFilter.md +57 -0
  72. package/src/components/form/docs/README-FormInput.md +66 -0
  73. package/src/components/form/docs/README-FormSelect.md +77 -0
  74. package/src/components/form/docs/README-FormShadowCloneDispatch.md +65 -0
  75. package/src/components/form/docs/README-FormSortSwitchGroup.md +131 -0
  76. package/src/components/form/docs/README-FormUpload.md +108 -0
  77. package/src/components/form/docs/README-FormUploadAudio.md +80 -0
  78. package/src/components/form/docs/README-FormUploadImage.md +83 -0
  79. package/src/components/form/docs/README-FormUploadVideo.md +82 -0
  80. package/src/components/list-layout/README.md +6 -2
  81. package/src/components/list-layout/docs/README-ListLayout.md +1 -0
  82. package/src/components/modal/README.md +7 -2
  83. package/src/components/modal/docs/README-ImagePreviewTrigger.md +78 -0
  84. package/src/components/modal/docs/README-ModalImagePreview.md +78 -0
  85. package/src/components/modal/docs/README-ModalPorter.md +10 -0
  86. package/src/components/modal/docs/README-ModalShelf.md +11 -2
  87. package/src/components/modal/docs/README-ModalVideoPreview.md +89 -0
  88. package/src/components/modal/docs/README-VideoPreviewTrigger.md +91 -0
  89. package/src/components/table/docs/README-TableMain.md +3 -0
  90. package/types/components/app-layout/AppLayout.vue.d.ts +31 -1
  91. package/types/components/app-layout/AppPage.vue.d.ts +7 -2
  92. package/types/components/app-layout/types.d.ts +25 -0
  93. package/types/components/display/ShadowClone.vue.d.ts +20 -0
  94. package/types/components/display/TabsTile.vue.d.ts +2 -2
  95. package/types/components/display/index.d.ts +8 -1
  96. package/types/components/display/types.d.ts +7 -0
  97. package/types/components/display/use-shadow-target.d.ts +9 -0
  98. package/types/components/form/FormActiveFilter.vue.d.ts +9 -0
  99. package/types/components/form/FormInput.vue.d.ts +3 -0
  100. package/types/components/form/FormInputShadowClone.vue.d.ts +7 -0
  101. package/types/components/form/FormSearch.vue.d.ts +1 -1
  102. package/types/components/form/FormSelectShadowClone.vue.d.ts +39 -0
  103. package/types/components/form/FormShadowCloneDispatch.vue.d.ts +44 -0
  104. package/types/components/form/FormSortSwitch.vue.d.ts +17 -0
  105. package/types/components/form/FormSortSwitchGroup.vue.d.ts +15 -0
  106. package/types/components/form/FormUpload.vue.d.ts +57 -0
  107. package/types/components/form/FormUploadAudio.vue.d.ts +30 -0
  108. package/types/components/form/FormUploadCard.vue.d.ts +24 -0
  109. package/types/components/form/FormUploadFileInfo.vue.d.ts +10 -0
  110. package/types/components/form/FormUploadImage.vue.d.ts +34 -0
  111. package/types/components/form/FormUploadTrigger.vue.d.ts +11 -0
  112. package/types/components/form/FormUploadVideo.vue.d.ts +34 -0
  113. package/types/components/form/index.d.ts +12 -1
  114. package/types/components/form/types.d.ts +158 -0
  115. package/types/components/form/use-password-autofill.d.ts +11 -0
  116. package/types/components/form/use-upload-state.d.ts +29 -0
  117. package/types/components/list-layout/ListLayout.vue.d.ts +3 -0
  118. package/types/components/list-layout/types.d.ts +16 -0
  119. package/types/components/list-layout/use-active-filter.d.ts +27 -0
  120. package/types/components/modal/ImagePreviewTrigger.vue.d.ts +41 -0
  121. package/types/components/modal/ModalConfirm.vue.d.ts +1 -1
  122. package/types/components/modal/ModalImagePreview.vue.d.ts +31 -0
  123. package/types/components/modal/ModalPorter.vue.d.ts +7 -0
  124. package/types/components/modal/ModalShelf.vue.d.ts +12 -3
  125. package/types/components/modal/ModalVideoPreview.vue.d.ts +40 -0
  126. package/types/components/modal/VideoPreviewTrigger.vue.d.ts +43 -0
  127. package/types/components/modal/index.d.ts +6 -1
  128. package/types/components/modal/modal-global-keys.d.ts +25 -0
  129. package/types/components/modal/modal-global-symbol.d.ts +8 -0
  130. package/types/components/modal/modal-shelf-core.d.ts +11 -3
  131. package/types/components/modal/modal-shelf-types.d.ts +50 -0
  132. package/types/components/table/TableEmpty.vue.d.ts +11 -0
  133. package/types/components/table/types.d.ts +11 -0
  134. package/types/components/view-layout/types.d.ts +1 -1
  135. package/types/injectInfo.json.d.ts +1 -1
  136. package/types/store/app.d.ts +1 -1
@@ -42,6 +42,7 @@
42
42
  | name | type | 默认 | 语义 |
43
43
  | --- | --- | --- | --- |
44
44
  | `level` | `ModalLevel = "app"\|"page"\|"custom"`(必传) | — | 架子结构性身份,挂载后不变(setup 期快照非响应式) |
45
+ | `v-model:remote` | `GlobalModalRemote`(可选) | 无默认 | 全局弹窗遥控器挂载面(**仅 app 级架子使用**):架子把已注册的 app 级弹窗句柄(key → `{evoke, close, update}`)挂进该对象,`modalKey`(已注册 key 清单)同步维护;配置移除时同步移除对应 key 与清单项;AppLayout 内置 app 架子经它对接 `v-model:globalModalRemote`(page/custom 架子不传) |
45
46
 
46
47
  ### Slots
47
48
 
@@ -60,6 +61,8 @@
60
61
 
61
62
  > ⚠️ expose 实际另含 `items: Ref<ShelfItem[]>`(内部渲染用活跃实例列表;公开类型 `ShelfController` 不含——按公开类型使用)
62
63
 
64
+ > **expose 与 `v-model:remote` 分工**:expose 的 `ShelfController` = **架子管理面**(程序员直接操作架子:evoke/remove/close/items);`v-model:remote` = **应用根遥控面**(App.vue 拿在手里按 key 遥控弹窗)——一个管架子、一个遥控弹窗,勿混。
65
+
63
66
  ## 机制
64
67
 
65
68
  ### level 层级与合法性断言
@@ -97,6 +100,12 @@ declare module "@done-coding/admin-core" {
97
100
 
98
101
  `evoke` 返回 `EvokeHandle`:`close()` 关闭、`update(partialPayload)` 增量合并更新 payload(不 remount)。
99
102
 
103
+ ### remote 挂载(app 级全局遥控器)
104
+
105
+ `v-model:remote` 是 **app 级架子**的全局遥控器挂载面(page/custom 不传):架子收到专用 ModalPorter(`globalOnly` Symbol 模式)推送的 app 级弹窗配置后,把 **key → `{evoke, close, update}`** 句柄挂进 remote 对象,并同步维护 **`modalKey: string[]`**(已注册 key 清单——调用方以 `modalKey.includes(key)` 显式判断「该 key 是否已注册」,`evoke` 无返回值,未注册直接调会 TypeError);配置移除(Porter 卸载)时同步移除对应 key 与清单项。`evoke` 不带 key——key 即 remote 对象上的键;重复 evoke 的行为由配置期 `sameKeyStrategy` 决定。**close 是关键能力**:全局弹窗不能只靠用户点击关闭(可能无关闭按钮 / 需外部编排),外部(App.vue)经 remote 按 key 关闭。
106
+
107
+ **core 预置全局 key**:core 定义全局预览弹窗 key 常量 `APP_GLOBAL_IMAGE_PREVIEW_KEY` / `APP_GLOBAL_VIDEO_PREVIEW_KEY`(值即 remote 键与 `modalKey` 条目)——AppLayout `enableGlobalImagePreview` / `enableGlobalVideoPreview` 开启后以 `ModalImagePreview` / `ModalVideoPreview` 组件注册进 app 架子(拼接进 `globalModalConfig`),触发组件 `ImagePreviewTrigger` / `VideoPreviewTrigger` 经遥控器按此 key 唤起。
108
+
100
109
  ## 反模式 / 注意
101
110
 
102
111
  - **业务 [MUST NOT] 自声明 app/page 架子**:AppLayout/AppPage 已内置,重复挂载是层级污染
@@ -111,5 +120,5 @@ declare module "@done-coding/admin-core" {
111
120
  - 注册表入口:`ModalPorter`(modalList 注册表,内部自动对接 app/page 控制器并缓存)
112
121
  - 层级机制:`modal-shelf-hierarchy.ts`(assertLevelHierarchy 合法挂法断言)、`modal-shelf-core.ts`(实例注册表)、`modal-shelf-types.ts`(ModalLevel / ModalSameKeyStrategy / ShelfController / ShelfItem / ShelfInstance / EvokeHandle / RegisterEntry)
113
122
  - 内置挂载点:`AppLayout.vue`(level="app")、`AppPage.vue`(level="page")
114
- - 弹窗组件族:`ModalConfirm` / `ModalForm` / `ModalDetail`(可作架子注入的弹窗组件)
115
- - 范式页:`apps/reference/src/pages/modal/porter/showcase/`、`apps/reference/src/pages/modal/guide/`
123
+ - 弹窗组件族:`ModalConfirm` / `ModalForm` / `ModalDetail`(可作架子注入的弹窗组件);预览族 `ModalImagePreview` / `ModalVideoPreview` + 触发端 `ImagePreviewTrigger` / `VideoPreviewTrigger`(全局 key 常量 `APP_GLOBAL_*_PREVIEW_KEY` 预置,AppLayout 开关开启即注册)
124
+ - 范式页:`apps/reference/src/pages/modal/porter/showcase/`、`apps/reference/src/pages/modal/guide/`、`apps/reference/src/pages/modal/preview/showcase/`
@@ -0,0 +1,89 @@
1
+ # ModalVideoPreview(视频预览弹窗·lightbox 形态)
2
+
3
+ > 视频预览原语:**ElDialog 直配黑底 lightbox**(业界 Video Lightbox 模式)+ 原生 `<video controls>` + 弹窗配置化契约。
4
+ > 注册 key 建议 `modalVideoPreview`(ModalShelf/Porter 注册项);全局预置 key = `APP_GLOBAL_VIDEO_PREVIEW_KEY`。
5
+ > 范式页:`apps/reference/src/pages/modal/preview/showcase/`
6
+
7
+ ## 定位
8
+
9
+ - **何时用**:任意「弹窗 + 视频播放」场景——上传文件预览、附件查看、素材核对;命令式 / 配置化唤起(全局遥控器 `evoke`、ModalPorter 注册)
10
+ - **何时不用**:操作确认用 `ModalConfirm`;图片预览用 `ModalImagePreview`(ElImageViewer 薄适配);需要播放器增强(倍速/字幕/流媒体协议)时——`<video>` 原生能力不足,接第三方播放器(Plyr / video.js),本组件不内置
11
+ - **形态依据(业界)**:视频预览弹窗主流 = **Video Lightbox**——黑底沉浸遮罩 + 视频居中播放 + 遮罩/ESC/关闭按钮三通道关闭 + 打开即播、关闭暂停(图片 lightbox 的视频镜像);组件库无通用视频 lightbox 组件,用 EP 弹层基座(ElDialog)配置出该形态是成本最低路径(**滚动锁 / ESC / 焦点管理 / 遮罩关闭 EP 内置白拿**,只覆盖样式层)
12
+ - **底座 = ElDialog 直配**([MUST NOT] 用 `ModalConfirm`——确认/表单弹窗体系(白底 + title + footer 按钮)与沉浸预览形态错配,已废弃):遮罩深色压暗 + dialog 无卡片背景 + 无 header/footer + 居中 16:9 视频(`dc-modal-video-preview` 非 scoped 锚,照 ModalConfirm 先例)
13
+ - **全宽弹窗 + 视频有界**:弹窗 `width: 100vw`(+ `align-center` 清 EP 默认 margin-top,dialog 恰为全屏——定位/滚动锁/ESC/焦点全归 ElDialog,不自造 fixed 定位);body 内 `__stage`(`height: 100vh` 沉浸黑底 flex 居中)> `__shim`(**`width: min(960px, 100%)`** + 16:9)> video——视频固定 960px 宽(16:9 → 540 高)居中、四周黑边,小屏 `max-width: 100%` 收缩,**不直接撑满全屏容器**;关闭按钮 44px 圆灰底白叉 `top/right: 40px`(dialog 全宽后相对定位即视口角位,与 el-image-viewer 同位同款)
14
+ - **封面兜底**:`coverUrl` 传则作为 `poster` 封面;**不传则 src 自动追加 `#t=0.01`**(Media Fragments URI)——浏览器加载时定位到 0.01s 渲染出视频首帧当封面,配合 `preload="metadata"` 只拉元数据不拉全片
15
+ - `inheritAttrs: false` + 全量 `$attrs` 定向透传 **`<video>`**:未声明原生属性(`autoplay` / `muted` / `loop` / `playsinline` 等)直达 video 元素
16
+ - **注册形态(ModalShelf/Porter)**:架子渲染只传 `show`/`payload`/`closeFn`/`removeFn`——业务值走 payload,双输入源:`url`/`coverUrl` = `props.url ?? payload.url` / `props.coverUrl ?? payload.coverUrl`
17
+ - **全局预置**:core 预置 `APP_GLOBAL_VIDEO_PREVIEW_KEY`——AppLayout `enableGlobalVideoPreview` 开启后自动注册进全局弹窗(见 README-AppLayout);触发端 `VideoPreviewTrigger` 经遥控器按此 key 唤起
18
+
19
+ ## 快速上手(最小可用)
20
+
21
+ ```vue
22
+ <ModalVideoPreview
23
+ v-model:show="show"
24
+ url="https://example.com/a.mp4"
25
+ />
26
+ ```
27
+
28
+ **要点**:
29
+
30
+ - `show` 必传(`v-model:show`);`url` 必传(视频地址)
31
+ - 不传 `coverUrl` 也能出画面——`#t=0.01` 首帧兜底,无需单独准备封面图
32
+ - 打开即黑底沉浸播放(业界 lightbox:遮罩压暗、视频是唯一焦点);关闭走 ESC / 遮罩 / 关闭按钮
33
+ - 打开自动播放(`autoPlay` 默认开,业界行为;关闭即暂停)——`autoPlay=false` 关闭
34
+
35
+ ## 能力边界 / 按需使用
36
+
37
+ - **默认即够用:黑底 lightbox + controls 播放条 + 打开即播**——绝大多数预览只传 `show`/`url`。
38
+ - `coverUrl`:仅当需要自定义封面(非首帧)时传;业务侧「上传带封面」场景传此值可省 `#t=0.01` 的一次 seek。
39
+ - `autoPlay`:默认开(打开弹窗即播);仅当需要「打开先看封面、手动点播」时关。
40
+ - 第三方播放器增强(倍速/字幕/流媒体):`<video>` 原生不足的场景不塞进本组件——消费方自拼(ElDialog 黑底 + 第三方播放器)。
41
+ - **完整能力演示**:`apps/reference/src/pages/modal/preview/showcase/`——能力展示,非推荐默认。
42
+
43
+ ## API
44
+ > ⚠️ API 以 types.ts 与组件源码为真相源;与文档冲突时以源码为准。
45
+
46
+ ### Props(内联 defineProps,无 types.ts)
47
+
48
+ | name | type | 默认 | 语义 |
49
+ | --- | --- | --- | --- |
50
+ | `show` | `boolean`(必传) | — | 可见性(v-model:show) |
51
+ | `url` | `string`(必传) | — | 视频地址(`<video src>`) |
52
+ | `coverUrl` | `string` | — | 封面图地址(`<video poster>`);**空 → src 自动追加 `#t=0.01` + `preload="metadata"` 首帧兜底** |
53
+ | `autoPlay` | `boolean` | `true` | 打开弹窗即自动播放(业界 lightbox 行为);关闭即暂停 |
54
+ | `payload` | `{ url?: string; coverUrl?: string }` | — | 注册形态注入(架子渲染只传 payload;原语用法无需传) |
55
+ | `closeFn` / `removeFn` | `() => void` | — | 注册形态注入的关闭/移除出口(声明避免泄漏进 `$attrs`) |
56
+ | `onClose` | `(status?: boolean) => void` | — | 关闭回调(ElDialog @close 触发) |
57
+
58
+ > **video 原生属性全量透传**:除 `url` 外未声明属性(`autoplay` / `muted` / `loop` / `playsinline` / `preload` 等)经 `$attrs` 直达 `<video>`。**`controls` 内部固定 `true`**(预览必须可控制播放),外部不可关。
59
+
60
+ ### Emits
61
+
62
+ | 事件 | 载荷 | 语义 |
63
+ | --- | --- | --- |
64
+ | `update:show` | `boolean` | 可见性同步(v-model) |
65
+
66
+ ### Slots
67
+
68
+ 无(lightbox 沉浸形态无标题/操作区语义——需要「弹窗 + 视频 + 操作按钮」的形态用 `ModalConfirm` + `<video>` 消费方自拼)
69
+
70
+ ### Expose
71
+
72
+
73
+
74
+ ## 反模式 / 注意
75
+
76
+ - **[MUST NOT] 用 `ModalConfirm` 底座**:白底确认/表单弹窗体系与沉浸预览形态错配(已废弃)——本组件 = ElDialog 直配黑底 lightbox + 契约
77
+ - **无标题 / 无 footer 语义**:lightbox 不配 title/footer/确认取消——需要操作按钮的形态消费方自拼
78
+ - **封面兜底的 `#t=0.01` 只处理「无封面」**:传了 `coverUrl` 就 [MUST NOT] 再追加(追加会覆盖 poster 显示)
79
+ - **`$attrs` 只落 `<video>`**:弹层级 attrs(`draggable` / `destroy-on-close`)[MUST NOT] 混进 `$attrs` 直传——需弹层级能力显式扩展 props
80
+ - **`controls` 不可关**:预览无操作语义但播放控制是基本人权,外部传 `controls=false` 无效(内部固定)
81
+ - **播放器增强不塞本组件**:倍速/字幕/流媒体等原生不足能力——消费方自拼,本组件保持「ElDialog lightbox + 原生 video」薄壳
82
+
83
+ ## 关联
84
+
85
+ - 弹层族:`ModalConfirm`(确认/表单弹窗体系——视频预览不再用它做底座)、`ModalForm`、`ModalDetail`
86
+ - 预览族:`ModalImagePreview`(图片预览,同为 lightbox 形态;ElImageViewer 薄适配)
87
+ - 触发端:`VideoPreviewTrigger`(封面/占位 + 播放图标两形态统一,点击经全局遥控/自带弹窗唤起本组件)
88
+ - 命令式弹窗体系:`ModalShelf`(架子 + level 层级)+ `ModalPorter`(modalList 注册表)+ 全局遥控器(`globalModalRemote.evoke(APP_GLOBAL_VIDEO_PREVIEW_KEY, { url, coverUrl })`)
89
+ - 范式页:`apps/reference/src/pages/modal/preview/showcase/`
@@ -0,0 +1,91 @@
1
+ # VideoPreviewTrigger(视频预览触发组件)
2
+
3
+ > 视频触发原语:封面图(`ElImage` 吃原生懒加载)或深色占位,**两形态统一叠加播放图标**(标识可播放);**默认插槽可整体自定义**(吐 `open` fn 复用唤起逻辑);点击经全局遥控器唤起 `ModalVideoPreview`,无全局则自带弹窗兜底。
4
+ > 与 `ImagePreviewTrigger` 对等成对(图片触发端点击直达 ElImage 原生预览;视频无 el 原生预览,仍需弹窗决策链)。
5
+ > 范式页:`apps/reference/src/pages/modal/preview/showcase/`
6
+
7
+ ## 定位
8
+
9
+ - **何时用**:任意「视频卡片/缩略图可点开播放」场景——上传文件列表、视频素材库;与 `ModalVideoPreview` 成对(触发端 + 播放端)
10
+ - **何时不用**:页面内直接播放 → 用 `<video>` 原生/第三方播放器;仅展示封面不点击 → `ElImage`
11
+ - 关键机制:**核心 = 唤起预览弹窗的逻辑(决策链 + 自带弹窗兜底)内置**;**默认插槽 = 封面按有无分流 + 播放图标两形态统一**,并吐 `open` 供自定义内容复用——
12
+ - **有 `coverUrl`** → 落地 **`ElImage`**(`src=coverUrl`)→ **原生 `loading="lazy"` 直接可用** + `#placeholder`/`#error` 占位兜底,**封面图上叠加播放图标**(有播放按钮就知道是啥——两形态统一标识可播放);
13
+ - **无 `coverUrl`** → **深色占位底 + 播放图标**——**不强行 `#t=0.01` 抠首帧**(业界结论:Safari/iOS 不可靠、blob: URL 失效、播放从偏移处开始、且 video 无原生 lazy——占位方案零请求零副作用,比抠帧省)
14
+ - **默认插槽可整体自定义**:`#default="{ open }"` 接自定义内容(如按钮「播放」)——`open` = 唤起预览的 fn(内部决策链 + 自带弹窗兜底不变),组件不关心自定义内容形态;缺省用内置封面/占位 + 播放图标
15
+ - **点击决策链(全局优先,自带兜底)**:
16
+ ```
17
+ if (remote?.value?.modalKey?.includes(APP_GLOBAL_VIDEO_PREVIEW_KEY)) {
18
+ remote.value[APP_GLOBAL_VIDEO_PREVIEW_KEY].evoke({ url, coverUrl }); // 全局遥控唤起
19
+ } else {
20
+ localShow = true; // 自带 ModalVideoPreview 兜底(v-if)
21
+ }
22
+ ```
23
+ `remote` = `inject(GLOBAL_MODAL_REMOTE_KEY)`(core 导出注入 key,消费方 App 根 provide 同一对象;未注入/未注册 → 静默回退自带弹窗,任何环境可用)
24
+ - **`modalKey` 存在性判断**:遥控器对象上的 `modalKey: string[]`(架子 `registerConfig` 同步维护)——`includes(全局 key)` 显式判断,不依赖 `evoke` 返回值(evoke 无返回值,未注册直接调会 TypeError)
25
+
26
+ ## 快速上手(最小可用)
27
+
28
+ ```vue
29
+ <VideoPreviewTrigger url="https://example.com/a.mp4" />
30
+ ```
31
+
32
+ **要点**:
33
+
34
+ - `url` 必传(视频地址);无封面时深色占位 + 播放图标,**零请求**(连 metadata 都不拉)
35
+ - 有封面:`coverUrl` 传封面图 → 缩略图吃原生懒加载
36
+ - 点击后:AppLayout 开了 `enableGlobalVideoPreview`(全局 key 已注册)→ 全局遥控唤起;否则组件自带 `ModalVideoPreview` 本地弹窗
37
+
38
+ ## 能力边界 / 按需使用
39
+
40
+ - **默认即够用:封面/占位 + 播放图标 + 点击弹播放**——绝大多数场景只传 `url`。
41
+ - `coverUrl`:仅当业务有封面图(如上传时单独传了封面)时传——有封面走 img 路径白拿懒加载 + 图标叠加;无封面走占位路径更省(不抠首帧)。
42
+ - **`#default="{ open }"`**:整体自定义触发 UI(按钮 / 卡片 / 列表行)——`open` 即「打开预览弹窗」,核心决策链与兜底不变;`placeholder` / `error` 插槽仅内置封面内容使用。
43
+ - 弹窗端行为(`coverUrl` 为空时 `#t=0.01` 首帧兜底等)在 `ModalVideoPreview` 上,见 README-ModalVideoPreview——**触发组件不做首帧**。
44
+ - **完整能力演示**:`apps/reference/src/pages/modal/preview/showcase/`——能力展示,非推荐默认。
45
+
46
+ ## API
47
+ > ⚠️ API 以 types.ts 与组件源码为真相源;与文档冲突时以源码为准。
48
+
49
+ ### Props(内联 defineProps,无 types.ts)
50
+
51
+ | name | type | 默认 | 语义 |
52
+ | --- | --- | --- | --- |
53
+ | `url` | `string`(必传) | — | 视频地址(点击唤起预览弹窗的视频) |
54
+ | `coverUrl` | `string` | — | 封面图地址;**空 → 深色占位 + 播放图标(零请求)**;有 → ElImage 封面(原生懒加载) |
55
+ | `lazy` | `boolean` | `true` | 封面图懒加载(仅 `coverUrl` 有值时生效) |
56
+ | `preview` | `boolean` | `true` | 是否可点击唤起预览(false = 纯展示封面/占位) |
57
+
58
+ > **img 原生属性全量透传**:`$attrs` 直达自身 ElImage(`coverUrl` 路径)——`alt` / `fit` / `loading` 等均可用。
59
+ > ⚠ **`width` / `height` 无效**:EP 2.13 的 ElImage 未声明 width/height props,透传会落根 div 的 HTML attribute(对 div 无渲染效果)。尺寸控制请用外层 CSS / `style`(配合 `fit="cover"` 居中裁切)。
60
+
61
+ ### Emits
62
+
63
+
64
+
65
+ ### Slots
66
+
67
+ | 槽 | scope | 语义 |
68
+ | --- | --- | --- |
69
+ | `#default` | `{ open: () => void }` | **可整体自定义触发 UI**(按钮「播放」/卡片/列表行):`open` = 打开预览弹窗(内部决策链 + 自带兜底不变);缺省 = 封面图/占位 + 播放图标(两形态统一),自带点击唤起 |
70
+ | `#placeholder` | 无 | 封面加载中占位(透传 ElImage;仅内置封面内容) |
71
+ | `#error` | 无 | 封面加载失败兜底图(透传 ElImage;仅内置封面内容) |
72
+
73
+ ### Expose
74
+
75
+
76
+
77
+ ## 反模式 / 注意
78
+
79
+ - **触发组件不做 `#t=0.01`**:无封面就占位 + 播放图标(业界主流,播放按钮即语义)——首帧兜底只存在于弹窗端 `ModalVideoPreview`(播放器场景才需要「不黑屏」)
80
+ - **`$attrs` 只落封面层**:想配「弹窗端视频」(`autoplay` / `muted` 等)[MUST NOT] 经触发组件透传——去 `ModalVideoPreview` 上配
81
+ - **无封面零请求是硬行为**:不预加载、不拉 metadata——触发组件在列表里挂几十个也不产生视频流量
82
+ - **决策链静默回退是硬行为**:任何环境(无遥控器/未注册/未开启全局)都不许报错——自带弹窗兜底保证触发组件永远可用
83
+ - **`preview=false` 只关点击**:仍渲染封面/占位——「展示」能力不随「预览」关掉
84
+
85
+ ## 关联
86
+
87
+ - 播放端:`ModalVideoPreview`(视频预览弹窗,ModalConfirm 为底 + url/coverUrl,封面空 `#t=0.01` 首帧兜底)
88
+ - 对等组件:`ImagePreviewTrigger`(图片触发端,同一决策链;ElImage 落地 + previewSrc 原图)
89
+ - 全局遥控:`GlobalModalRemote` / `GlobalModalControl` / `modalKey`(modal-shelf-types)+ 注入 key `GLOBAL_MODAL_REMOTE_KEY`(core 导出)+ 全局 key 常量 `APP_GLOBAL_VIDEO_PREVIEW_KEY`
90
+ - AppLayout 开关:`enableGlobalVideoPreview`(开启后自动注册全局视频预览弹窗,见 README-AppLayout)
91
+ - 范式页:`apps/reference/src/pages/modal/preview/showcase/`
@@ -45,6 +45,8 @@ const toolbarConfig: TableToolbarConfig<Row> = {
45
45
  - **默认即够用:分页 + 骨架屏 + refine 布局 + 工具栏全开**——只传 `api`/`columns`/`rowKey` 即得标准数据表格。
46
46
  - **高度链三选一(判据)**:`refine` 默认开(按 viewport 高减 toolbar/pager 得出数据区高)即够用;`maxHeight` 显式定高仅当表格嵌定高容器(如固定高度卡片)时配;`viewportHeight` 显式指定视口可用高仅当 refine 计算不满足(嵌套弹层内消费外层 scope,优先级最高)时配。
47
47
  - `fillHeight`:默认关;仅当数据稀疏/为空时需要数据区撑满、分页器贴底(视觉稳定)时开——需已有 `maxHeight` 或 refine+viewportHeight 基准。
48
+ - **空态双态**:非加载态空数据按「api 是否至少被调用过一次」区分——**从未调用过**(如 ListLayout 关 `initialSearch` 首屏)→ ElEmpty 自定义「欢迎触发查询」+ Search 图标;**已调用过但无数据** → 默认 ElEmpty「暂无数据」。
49
+ - **激活刷新条件化**:`onActivated` 的自动 refresh 仅「已发生过查询」后生效(`hasRequested` 自判)——初始化查询关闭/从未查询时 KeepAlive 激活不自动刷新;手动查询过后恢复(有数据心智后保持刷新语义)。
48
50
  - `skeleton`:默认开(冷启行数自适应 3~8);热刷不出骨架属设计语义(外层遮罩盖旧数据),勿改。
49
51
  - `customView`(v-model):默认关;仅当需要网格/卡片视图替代表格(DataListView)时开,且 [MUST] 配 `#custom-view-item` 插槽。
50
52
  - `query`:仅当有静态查询参数(固定过滤条件)时传;变化自动重置第 1 页重拉。
@@ -105,6 +107,7 @@ const toolbarConfig: TableToolbarConfig<Row> = {
105
107
  | `#<column.prop>` | `TableColumnDefaultScope`:`{row, column, $index, injectInfo, exposeInfo}` | 覆盖列单元格 |
106
108
  | `#header-<column.prop>` | `TableColumnHeaderScope`:`{column, $index, injectInfo, exposeInfo}` | 覆盖列表头 |
107
109
  | `#custom-view-item` | `DataListViewItemScope<T>` | customView 模式单项渲染 |
110
+ | `empty`(内部默认) | 无 | 空数据插槽——默认按 `hasRequested` 双态:未调用过 api →「欢迎触发查询」+ Search 图标;已调用无数据 → ElEmpty「暂无数据」 |
108
111
 
109
112
  ### Expose(`TableMainInstance`)
110
113
 
@@ -1,4 +1,5 @@
1
1
  import { AppShellContentAnchor, AppLayoutAppStoreSlice, AppLayoutUserStoreSlice, AppLayoutBridgeSlice } from './types';
2
+ import { GlobalModalRemote, RegisterEntry } from '../modal';
2
3
  import { WatermarkProps } from 'element-plus';
3
4
  type __VLS_Props = {
4
5
  /**
@@ -18,7 +19,30 @@ type __VLS_Props = {
18
19
  * 需要覆盖 header 区域的场景(如悬浮 logo/搜索框)。
19
20
  */
20
21
  sidebarAboveHeader?: boolean;
22
+ /**
23
+ * 全局弹窗配置数组(非必需;shelf 限定 "app")——全局登录 / 配置等通用弹窗的
24
+ * 注册入口,直接传给 AppLayout 内部专用 ModalPorter(globalOnly Symbol 模式,
25
+ * 只收 app 级)。配置变化(增删条目)自动全量重推。
26
+ */
27
+ globalModalConfig?: RegisterEntry[];
28
+ /**
29
+ * 是否开启全局图片预览弹窗(默认 false)。开启后内部给 `globalModalConfig`
30
+ * **拼接**内置配置项 `{ key: APP_GLOBAL_IMAGE_PREVIEW_KEY, component:
31
+ * ModalImagePreview, shelf: "app" }`——消费方零配置拿全局图片预览,
32
+ * 触发端 `ImagePreviewTrigger` 经遥控器按此 key 唤起(见 README-AppLayout)。
33
+ */
34
+ enableGlobalImagePreview?: boolean;
35
+ /**
36
+ * 是否开启全局视频预览弹窗(默认 false)。开启后内部给 `globalModalConfig`
37
+ * **拼接**内置配置项 `{ key: APP_GLOBAL_VIDEO_PREVIEW_KEY, component:
38
+ * ModalVideoPreview, shelf: "app" }`——消费方零配置拿全局视频预览,
39
+ * 触发端 `VideoPreviewTrigger` 经遥控器按此 key 唤起(见 README-AppLayout)。
40
+ */
41
+ enableGlobalVideoPreview?: boolean;
21
42
  };
43
+ type __VLS_PublicProps = {
44
+ "globalModalRemote"?: GlobalModalRemote;
45
+ } & __VLS_Props;
22
46
  declare function __VLS_template(): {
23
47
  attrs: Partial<{}>;
24
48
  slots: Partial<Record<NonNullable<AppShellContentAnchor>, (_: {}) => any>>;
@@ -26,8 +50,14 @@ declare function __VLS_template(): {
26
50
  rootEl: HTMLDivElement;
27
51
  };
28
52
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
29
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
53
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
54
+ "update:globalModalRemote": (value: GlobalModalRemote) => any;
55
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
56
+ "onUpdate:globalModalRemote"?: ((value: GlobalModalRemote) => any) | undefined;
57
+ }>, {
30
58
  sidebarAboveHeader: boolean;
59
+ enableGlobalImagePreview: boolean;
60
+ enableGlobalVideoPreview: boolean;
31
61
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
32
62
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
33
63
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { AppPageListLayoutRecommended } from './types';
1
2
  type __VLS_Props = {
2
3
  /** 充满视口 */
3
4
  fullViewport?: boolean;
@@ -36,8 +37,12 @@ declare function __VLS_template(): {
36
37
  default?(_: {}): any;
37
38
  top?(_: {}): any;
38
39
  bottom?(_: {}): any;
39
- left?(_: {}): any;
40
- right?(_: {}): any;
40
+ left?(_: {
41
+ listLayoutRecommended: AppPageListLayoutRecommended;
42
+ }): any;
43
+ right?(_: {
44
+ listLayoutRecommended: AppPageListLayoutRecommended;
45
+ }): any;
41
46
  };
42
47
  refs: {
43
48
  appPageRef: HTMLDivElement;
@@ -156,3 +156,28 @@ export type AppShellSlots = {
156
156
  } & {
157
157
  [K in AppShellContentAnchor]?: (scope: AppShellAnchorScope) => VNode[];
158
158
  };
159
+ /**
160
+ * AppPage `#left`/`#right` 插槽 scope 导出的窄栏 ListLayout 推荐配置。
161
+ *
162
+ * **性质**:固定内置推荐值(写死、非运行时开关、不做响应式探测),仅经
163
+ * `#left`/`#right` 插槽 scoped 带出。面向「列表放进 left/right 窄栏」的展示
164
+ * 形态推荐;消费者拿到后直接 `v-bind` 展开进 ListLayout,可按需 spread 覆盖
165
+ * (`v-bind="{ ...listLayoutRecommended, customView: false }"`)。
166
+ *
167
+ * **定向耦合**:AppPage 持有 ListLayout prop 形状的平铺子集(非泛型,与
168
+ * ListLayout 泛型 props 无关)——本能力设计使然(README 已声明);该子集
169
+ * breaking 时 [MUST] 同步更新本类型与 README-AppPage.md。
170
+ */
171
+ export interface AppPageListLayoutRecommended {
172
+ /** 开启自定义视图(DataListView 卡片形态替代 ElTable——窄栏过窄表格必崩)。需配套 ListLayout `#custom-view-item` 定义单项 */
173
+ customView: true;
174
+ /**
175
+ * 分页器最简形态(窄栏少占地):
176
+ * - `pageLayout` 去掉 total/sizes/jumper,仅页码(`"prev, pager, next"`)
177
+ * - `paginationBackground: false` 页码不带背景框(EP 纯数字链接形态)
178
+ */
179
+ tableMainProps: {
180
+ pageLayout: "prev, pager, next";
181
+ paginationBackground: false;
182
+ };
183
+ }
@@ -0,0 +1,20 @@
1
+ import { ShadowCloneProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ default?(_: {}): any;
7
+ clone?(_: {}): any;
8
+ };
9
+ refs: {};
10
+ rootEl: any;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<ShadowCloneProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ShadowCloneProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
+ export default _default;
16
+ type __VLS_WithTemplateSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -198,7 +198,7 @@ declare function __VLS_template(): {
198
198
  * 无单一"可用视口高度"语义)。
199
199
  */
200
200
  ?: string | undefined) => any) | undefined;
201
- }>, "type" | "marker" | "offset" | "bound" | "duration" | "direction" | "scrollTo"> & {
201
+ }>, "offset" | "type" | "marker" | "scrollTo" | "direction" | "bound" | "duration"> & {
202
202
  scrollTo: (href
203
203
  /**
204
204
  * TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
@@ -407,7 +407,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
407
407
  * 无单一"可用视口高度"语义)。
408
408
  */
409
409
  ?: string | undefined) => any) | undefined;
410
- }>, "type" | "marker" | "offset" | "bound" | "duration" | "direction" | "scrollTo"> & {
410
+ }>, "offset" | "type" | "marker" | "scrollTo" | "direction" | "bound" | "duration"> & {
411
411
  scrollTo: (href
412
412
  /**
413
413
  * TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
@@ -1,3 +1,4 @@
1
+ import { default as ShadowClone } from './ShadowClone.vue';
1
2
  import { default as WatchSize } from './WatchSize.vue';
2
3
  import { default as TabsMain } from './TabsMain.vue';
3
4
  import { default as HeightProvider } from './HeightProvider.vue';
@@ -41,5 +42,11 @@ ActionBtnGroup,
41
42
  * boolean 只读展示为彩色标签(纯展示,无交互):`value` → active/inactive 文本 + ElTag 色彩。
42
43
  * 编辑布尔用 ElSwitch;[MUST NOT] 给展示标签挂 onClick toggle 改数据(展示≠编辑,详见 paradigm §9)。
43
44
  */
44
- BooleanTag, };
45
+ BooleanTag,
46
+ /**
47
+ * 影分身:零 DOM 输出双渲染位原语——同一插槽内容渲染两处(本体就地 + 分身 teleport 到 `to`,
48
+ * `disabled` 关闭分身仅就地)。两份 vnode 树 = 两个独立实例,只适合无内部状态的受控组件
49
+ * (v-model 绑同一 ref 即同源同步);静态固定 id 双份会撞,消费方负责。
50
+ */
51
+ ShadowClone, };
45
52
  export * from './types';
@@ -239,3 +239,10 @@ export interface BooleanTagProps {
239
239
  /** false 时标签色彩,默认 info */
240
240
  inactiveTagType?: BooleanTagType;
241
241
  }
242
+ /** ShadowClone 影分身 props——零 DOM 输出双渲染位原语(本体就地 + 分身 teleport) */
243
+ export interface ShadowCloneProps {
244
+ /** 分身 teleport 目标(Vue Teleport to:CSS 选择器 / DOM 元素) */
245
+ to: string | Element;
246
+ /** 关闭分身(仅就地渲染单处);目标容器晚渲染时先关、就绪后开 */
247
+ disabled?: boolean;
248
+ }
@@ -0,0 +1,9 @@
1
+ export interface UseShadowTargetOptions {
2
+ /** 分身目标 getter(string selector / Element;空 = 无分身) */
3
+ to: () => string | Element | undefined;
4
+ /** 分身开关 getter(disabled 时不观察不激活) */
5
+ disabled: () => boolean;
6
+ }
7
+ export declare function useShadowTarget(options: UseShadowTargetOptions): {
8
+ targetValid: import('vue').Ref<boolean, boolean>;
9
+ };
@@ -0,0 +1,9 @@
1
+ import { FormActiveFilterEntry, FormActiveFilterProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<FormActiveFilterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ clear: () => any;
4
+ remove: (entry: FormActiveFilterEntry) => any;
5
+ }, string, import('vue').PublicProps, Readonly<FormActiveFilterProps> & Readonly<{
6
+ onClear?: (() => any) | undefined;
7
+ onRemove?: ((entry: FormActiveFilterEntry) => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { FormInputProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<FormInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FormInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { FormInputShadowCloneProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<FormInputShadowCloneProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ "update:modelValue": (value: string | number) => any;
4
+ }, string, import('vue').PublicProps, Readonly<FormInputShadowCloneProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -4,7 +4,7 @@ declare const _default: <PO extends Record<string, any>, SO extends Record<strin
4
4
  readonly onSearch?: ((data: import('./types').ExcludeNeverProperties<import('./types').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, type: FormSearchSearchType) => any) | undefined;
5
5
  readonly onHeightChange?: ((height: number) => any) | undefined;
6
6
  readonly onVisibleChange?: ((status: boolean) => any) | undefined;
7
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onHeightChange" | "onSearch" | "onVisibleChange"> & FormSearchProps<PO, SO, SQ> & Partial<{}>> & import('vue').PublicProps;
7
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onSearch" | "onHeightChange" | "onVisibleChange"> & FormSearchProps<PO, SO, SQ> & Partial<{}>> & import('vue').PublicProps;
8
8
  expose(exposed: import('vue').ShallowUnwrapRef<FormSearchInstance<PO, SO>>): void;
9
9
  attrs: any;
10
10
  slots: Partial<Record<NonNullable<Extract<keyof PO, string>>, (_: any) => any>>;
@@ -0,0 +1,39 @@
1
+ import { OptionItem } from './types';
2
+ type __VLS_Props = {
3
+ /** v-model(透传 FormSelect;本体与分身弹层同源) */
4
+ modelValue: OptionItem["value"];
5
+ /** 影分身开关(本体 + 表头漏斗分身双渲染位,点击漏斗 popover 弹选择器,同一 v-model 同源同步) */
6
+ shadowClone?: boolean;
7
+ /** 分身目标容器(表头预埋唯一选择器;shadowClone 时生效,未配置不分身) */
8
+ teleportTo?: string | Element;
9
+ /** 分身位字段文字(表头列名;label + 漏斗整块展示、高亮整块——表格 headerRender 只需留 teleportTo 容器) */
10
+ label?: string;
11
+ /** 分身高亮判定方法(非必传),入参 modelValue;默认 = 非 null/undefined/空字符串 → 高亮(label + 漏斗整块) */
12
+ isHighlighted?: (value: unknown) => boolean;
13
+ };
14
+ declare function __VLS_template(): {
15
+ attrs: Partial<{}>;
16
+ slots: {
17
+ option?(_: {
18
+ data: OptionItem;
19
+ }): any;
20
+ option?(_: {
21
+ data: OptionItem;
22
+ }): any;
23
+ };
24
+ refs: {};
25
+ rootEl: any;
26
+ };
27
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
28
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
29
+ "update:modelValue": (value: string | number) => any;
30
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
31
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
32
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
34
+ export default _default;
35
+ type __VLS_WithTemplateSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -0,0 +1,44 @@
1
+ type __VLS_Props = {
2
+ /** 影分身开关(分身位 = label + 漏斗整块,点击漏斗 popover 弹层内渲染 clone 槽内容) */
3
+ shadowClone?: boolean;
4
+ /** 分身目标容器(表头预埋唯一选择器;未配置不分身) */
5
+ teleportTo?: string | Element;
6
+ /** 分身位字段文字(表头列名;label + 漏斗整块展示、高亮整块——不传仅漏斗,向后兼容) */
7
+ label?: string;
8
+ /** 分身整块高亮标识(外部判定后传入,如筛选有值;插槽作用域同步暴露) */
9
+ highlighted?: boolean;
10
+ /** popover 浮层宽度(表头空间内弹层,默认 220 容纳输入框/选择器) */
11
+ popoverWidth?: number | string;
12
+ };
13
+ declare function __VLS_template(): {
14
+ attrs: Partial<{}>;
15
+ slots: {
16
+ default?(_: {
17
+ highlighted: boolean;
18
+ }): any;
19
+ default?(_: {
20
+ highlighted: boolean;
21
+ }): any;
22
+ default?(_: {
23
+ highlighted: boolean;
24
+ }): any;
25
+ clone?(_: {
26
+ highlighted: boolean;
27
+ }): any;
28
+ };
29
+ refs: {};
30
+ rootEl: any;
31
+ };
32
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
33
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
34
+ shadowClone: boolean;
35
+ highlighted: boolean;
36
+ popoverWidth: number | string;
37
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
38
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
39
+ export default _default;
40
+ type __VLS_WithTemplateSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };
@@ -0,0 +1,17 @@
1
+ import { FormSortMode, FormSortSwitchModelValue, FormSortSwitchProps } from './types';
2
+ type __VLS_Props = FormSortSwitchProps;
3
+ type __VLS_PublicProps = {
4
+ modelValue?: FormSortSwitchModelValue;
5
+ } & __VLS_Props;
6
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ "update:modelValue": (value: FormSortSwitchModelValue) => any;
8
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
9
+ "onUpdate:modelValue"?: ((value: FormSortSwitchModelValue) => any) | undefined;
10
+ }>, {
11
+ mode: FormSortMode;
12
+ shadowClone: boolean;
13
+ textType: import('./types').FormSortTextType;
14
+ showOrder: boolean;
15
+ teleportMode: FormSortMode;
16
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { FormSortRule, FormSortSwitchGroupProps } from './types';
2
+ type __VLS_Props = FormSortSwitchGroupProps;
3
+ type __VLS_PublicProps = {
4
+ modelValue?: FormSortRule[];
5
+ } & __VLS_Props;
6
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ "update:modelValue": (value: FormSortRule[]) => any;
8
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
9
+ "onUpdate:modelValue"?: ((value: FormSortRule[]) => any) | undefined;
10
+ }>, {
11
+ mode: import('./types').FormSortMode;
12
+ shadowClone: boolean;
13
+ teleportMode: import('./types').FormSortMode;
14
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
+ export default _default;