@done-coding/admin-core 0.31.0 → 0.31.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 (80) hide show
  1. package/es/bridge/config-hook.mjs +3 -0
  2. package/es/bridge/index.mjs +6 -0
  3. package/es/bridge/theme/index.mjs +11 -3
  4. package/es/components/app-layout/AppBody.vue.mjs +1 -1
  5. package/es/components/app-layout/AppBody.vue2.mjs +2 -2
  6. package/es/components/app-layout/AppPage.vue.mjs +1 -1
  7. package/es/components/app-layout/AppPage.vue2.mjs +175 -33
  8. package/es/components/app-layout/AppPageNavBar.vue.mjs +7 -0
  9. package/es/components/app-layout/AppPageNavBar.vue2.mjs +148 -0
  10. package/es/components/app-layout/app-page-geometry.mjs +3 -2
  11. package/es/components/app-layout/app-page-slot-surface.mjs +31 -0
  12. package/es/components/app-layout/use-app-page-title-field.mjs +41 -0
  13. package/es/components/data-view/DataGridView.vue.mjs +1 -1
  14. package/es/components/data-view/DataGridView.vue2.mjs +2 -1
  15. package/es/components/data-view/DataListView.vue.mjs +1 -1
  16. package/es/components/data-view/DataListView.vue2.mjs +14 -9
  17. package/es/components/data-view/DataListViewItem.vue.mjs +1 -1
  18. package/es/components/data-view/DataListViewItem.vue2.mjs +3 -1
  19. package/es/components/data-view/InfiniteListView.vue.mjs +1 -1
  20. package/es/components/data-view/InfiniteListView.vue2.mjs +25 -18
  21. package/es/components/data-view/use-grid-layout.mjs +13 -15
  22. package/es/components/display/TabsMain.vue.mjs +3 -1
  23. package/es/components/display/use-badge.mjs +10 -3
  24. package/es/components/form/FormItem.vue.mjs +1 -1
  25. package/es/components/form/FormMain.vue.mjs +1 -1
  26. package/es/components/form/FormMain.vue2.mjs +11 -4
  27. package/es/components/form/FormSearch.vue.mjs +1 -1
  28. package/es/components/form/FormSearch.vue2.mjs +12 -4
  29. package/es/components/form/FormSubmitPanel.vue.mjs +1 -1
  30. package/es/components/form/FormSubmitPanel.vue2.mjs +2 -0
  31. package/es/components/form/use-ai-fill.mjs +7 -1
  32. package/es/components/list-layout/ListLayout.vue.mjs +1 -1
  33. package/es/components/list-layout/ListLayout.vue2.mjs +19 -10
  34. package/es/components/modal/ModalConfirm.vue.mjs +1 -1
  35. package/es/components/modal/ModalConfirm.vue2.mjs +28 -5
  36. package/es/components/table/TableToolbar.vue.mjs +1 -1
  37. package/es/components/table/TableToolbar.vue2.mjs +15 -1
  38. package/es/components/view-layout/ViewLayout.vue.mjs +1 -1
  39. package/es/components/view-layout/ViewLayout.vue2.mjs +22 -29
  40. package/es/components/view-layout/ViewLayoutToolbar.vue.mjs +1 -1
  41. package/es/components/view-layout/ViewLayoutToolbar.vue2.mjs +16 -129
  42. package/es/config/slot-region.mjs +1 -0
  43. package/es/hooks/use-surface.mjs +5 -0
  44. package/es/hooks/use-theme-apply.mjs +18 -0
  45. package/es/index.mjs +4 -1
  46. package/es/store/app.mjs +26 -11
  47. package/es/style.css +230 -172
  48. package/package.json +2 -2
  49. package/src/bridge/docs/README.md +19 -3
  50. package/src/components/app-layout/docs/README-AppBody.md +25 -1
  51. package/src/components/app-layout/docs/README-AppHeader.md +1 -1
  52. package/src/components/app-layout/docs/README-AppPage.md +172 -3
  53. package/src/components/data-view/docs/README-DataListView.md +40 -1
  54. package/src/components/data-view/docs/README-InfiniteListView.md +68 -4
  55. package/src/components/display/docs/README-BadgeMark.md +18 -10
  56. package/src/components/form/docs/README-FormMain.md +26 -0
  57. package/src/components/list-layout/docs/README-ListLayout.md +12 -1
  58. package/src/components/menu/README.md +1 -1
  59. package/src/components/modal/docs/README-ModalConfirm.md +57 -0
  60. package/src/components/view-layout/docs/README-ViewLayout.md +46 -129
  61. package/types/bridge/config-hook.d.ts +5 -2
  62. package/types/bridge/index.d.ts +22 -0
  63. package/types/components/app-layout/AppPage.vue.d.ts +43 -1
  64. package/types/components/app-layout/AppPageNavBar.vue.d.ts +48 -0
  65. package/types/components/app-layout/app-page-geometry.d.ts +27 -2
  66. package/types/components/app-layout/app-page-slot-surface.d.ts +18 -0
  67. package/types/components/app-layout/index.d.ts +1 -0
  68. package/types/components/app-layout/types.d.ts +37 -1
  69. package/types/components/app-layout/use-app-page-title-field.d.ts +49 -0
  70. package/types/components/data-view/DataListViewItem.vue.d.ts +7 -0
  71. package/types/components/data-view/types.d.ts +26 -3
  72. package/types/components/data-view/use-grid-layout.d.ts +31 -6
  73. package/types/components/form/types.d.ts +8 -2
  74. package/types/components/list-layout/ListLayout.vue.d.ts +23 -2
  75. package/types/components/list-layout/types.d.ts +7 -0
  76. package/types/components/view-layout/ViewLayout.vue.d.ts +4 -16
  77. package/types/components/view-layout/ViewLayoutToolbar.vue.d.ts +3 -9
  78. package/types/components/view-layout/types.d.ts +11 -50
  79. package/types/config/slot-region.d.ts +17 -1
  80. package/types/injectInfo.json.d.ts +1 -1
@@ -0,0 +1,41 @@
1
+ import { shallowRef, readonly } from "vue";
2
+ import { useIsDev } from "../../hooks/use-is-dev.mjs";
3
+ import injectInfo from "../../injectInfo.json.mjs";
4
+ const APP_PAGE_TITLE_FIELD_CLAIM = Symbol.for(
5
+ `${injectInfo.name}:APP_PAGE_TITLE_FIELD_CLAIM`
6
+ );
7
+ const useAppPageTitleField = () => {
8
+ const isDev = useIsDev();
9
+ const box = shallowRef();
10
+ let write;
11
+ const field = {
12
+ changeTitle: (title) => {
13
+ if (!write) {
14
+ if (isDev()) {
15
+ console.warn(
16
+ `[dc-page] useAppPageTitleField 的句柄没有被任何 AppPage 认领,changeTitle(${JSON.stringify(
17
+ title
18
+ )}) 没有写到任何地方。出口:把**同一个**句柄传给页面 —— <AppPage :title-field="titleField">;标题要看得见还需 show-nav-bar(不开时值照改、只是没有显示位)。`
19
+ );
20
+ }
21
+ return;
22
+ }
23
+ write(title);
24
+ },
25
+ titleBoxRef: readonly(box),
26
+ [APP_PAGE_TITLE_FIELD_CLAIM]: {
27
+ claimWrite: (w) => {
28
+ write = w;
29
+ },
30
+ claimBox: (el) => {
31
+ box.value = el;
32
+ },
33
+ isClaimed: () => !!write
34
+ }
35
+ };
36
+ return field;
37
+ };
38
+ export {
39
+ APP_PAGE_TITLE_FIELD_CLAIM,
40
+ useAppPageTitleField
41
+ };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./DataGridView.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const DataGridView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b4c213bc"]]);
4
+ const DataGridView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-55ae2fc9"]]);
5
5
  export {
6
6
  DataGridView as default
7
7
  };
@@ -67,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
67
67
  emits: /* @__PURE__ */ mergeModels(["pageChange", "pageSizeChange", "dataChange", "selectionChange", "loadingChange", "pageInfoChange"], ["update:isAutoRefresh", "update:refreshInterval", "update:activeId", "update:activeData"]),
68
68
  setup(__props, { expose: __expose, emit: __emit }) {
69
69
  useCssVars((_ctx) => ({
70
- "v081d8ea3": unref(surfacePadCss)
70
+ "v5a6e24ce": unref(surfacePadCss)
71
71
  }));
72
72
  const props = __props;
73
73
  const emits = __emit;
@@ -102,6 +102,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
102
102
  if (p[k] !== void 0) picked[k] = p[k];
103
103
  });
104
104
  picked.itemCard = itemCardFinal.value;
105
+ picked.card = false;
105
106
  return picked;
106
107
  });
107
108
  const errorText = computed(
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./DataListView.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const DataListView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f900ae4e"]]);
4
+ const DataListView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5fc6baea"]]);
5
5
  export {
6
6
  DataListView as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, useModel, ref, computed, watch, openBlock, createElementBlock, normalizeStyle, Fragment, renderList, createBlock, unref, withCtx, renderSlot, createVNode, mergeModels } from "vue";
1
+ import { defineComponent, useCssVars, useModel, ref, computed, watch, openBlock, createElementBlock, normalizeStyle, Fragment, renderList, createBlock, unref, withCtx, renderSlot, normalizeClass, createVNode, mergeModels } from "vue";
2
2
  import { ElEmpty } from "element-plus";
3
3
  import DataListViewItem from "./DataListViewItem.vue.mjs";
4
4
  import { createDataListViewInstance } from "./utils.mjs";
@@ -7,11 +7,6 @@ import { useActiveRecord, activeRecordValueOf } from "../../hooks/use-active-rec
7
7
  import { useActiveScroll } from "./use-active-scroll.mjs";
8
8
  import { useDataViewGridLayout } from "./use-grid-layout.mjs";
9
9
  import { useDataViewMasonry } from "./use-masonry.mjs";
10
- const _hoisted_1 = {
11
- key: 1,
12
- class: "data-list-view-empty",
13
- "data-masonry-skip": ""
14
- };
15
10
  const _sfc_main = /* @__PURE__ */ defineComponent({
16
11
  __name: "DataListView",
17
12
  props: /* @__PURE__ */ mergeModels({
@@ -35,6 +30,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35
30
  }),
36
31
  emits: /* @__PURE__ */ mergeModels(["selectionChange"], ["update:activeId", "update:activeData"]),
37
32
  setup(__props, { expose: __expose, emit: __emit }) {
33
+ useCssVars((_ctx) => ({
34
+ "v19364596": cardPadCss.value
35
+ }));
38
36
  const props = __props;
39
37
  const emits = __emit;
40
38
  const keyOf = (row) => {
@@ -56,12 +54,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
56
54
  gridColumns: () => props.gridColumns,
57
55
  gap: () => props.gap
58
56
  });
57
+ const cardPadCss = computed(() => `${cardPad.value}px`);
59
58
  const { masonrySpans, masonryContainerStyle } = useDataViewMasonry({
60
59
  enabled: () => props.masonry,
61
60
  container: () => listRoot.value,
62
61
  gap: () => gridGap.value,
63
62
  data: () => props.data
64
63
  });
64
+ const flowGapOf = (index) => gridStyle.value || index === props.data.length - 1 ? 0 : gridGap.value;
65
65
  const containerStyle = computed(() => {
66
66
  const style = {
67
67
  ...gridStyle.value,
@@ -140,6 +140,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
140
140
  cardPad: unref(cardPad),
141
141
  masonry: __props.masonry,
142
142
  spanRows: unref(masonrySpans)[index],
143
+ flowGap: flowGapOf(index),
143
144
  onClick: ($event) => unref(setActive)(row)
144
145
  }, {
145
146
  default: withCtx(() => [
@@ -154,12 +155,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
154
155
  }, void 0, true)
155
156
  ]),
156
157
  _: 2
157
- }, 1032, ["selected", "active", "card", "cardPad", "masonry", "spanRows", "onClick"]);
158
- }), 128)) : (openBlock(), createElementBlock("div", _hoisted_1, [
158
+ }, 1032, ["selected", "active", "card", "cardPad", "masonry", "spanRows", "flowGap", "onClick"]);
159
+ }), 128)) : (openBlock(), createElementBlock("div", {
160
+ key: 1,
161
+ class: normalizeClass(["data-list-view-empty", { "is-card": __props.card }]),
162
+ "data-masonry-skip": ""
163
+ }, [
159
164
  renderSlot(_ctx.$slots, "empty", {}, () => [
160
165
  createVNode(unref(ElEmpty))
161
166
  ], true)
162
- ]))
167
+ ], 2))
163
168
  ], 4);
164
169
  };
165
170
  }
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./DataListViewItem.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const DataListViewItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4b05138c"]]);
4
+ const DataListViewItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-af6923e4"]]);
5
5
  export {
6
6
  DataListViewItem as default
7
7
  };
@@ -7,7 +7,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  card: { type: Boolean },
8
8
  cardPad: {},
9
9
  masonry: { type: Boolean },
10
- spanRows: {}
10
+ spanRows: {},
11
+ flowGap: {}
11
12
  },
12
13
  setup(__props) {
13
14
  const props = __props;
@@ -17,6 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
18
  if (props.card && props.cardPad !== void 0) {
18
19
  style.padding = `${props.cardPad}px`;
19
20
  }
21
+ if (props.flowGap) style.marginBottom = `${props.flowGap}px`;
20
22
  return Object.keys(style).length ? style : void 0;
21
23
  });
22
24
  return (_ctx, _cache) => {
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./InfiniteListView.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const InfiniteListView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4f0267ce"]]);
4
+ const InfiniteListView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0dd69aa5"]]);
5
5
  export {
6
6
  InfiniteListView as default
7
7
  };
@@ -3,19 +3,12 @@ import { ElEmpty } from "element-plus";
3
3
  import { useVirtualizer } from "@tanstack/vue-virtual";
4
4
  import { useSurface } from "../../hooks/use-surface.mjs";
5
5
  import { usePullRefresh } from "./use-pull-refresh.mjs";
6
+ import { useDataViewGap } from "./use-grid-layout.mjs";
6
7
  import { useActivated } from "../../hooks/activated.mjs";
7
8
  const _hoisted_1 = ["data-index"];
8
9
  const _hoisted_2 = { class: "infinite-list-view__json" };
9
10
  const _hoisted_3 = { class: "infinite-list-view__footer" };
10
11
  const _hoisted_4 = { class: "infinite-list-view__tip" };
11
- const _hoisted_5 = {
12
- key: 2,
13
- class: "infinite-list-view__empty"
14
- };
15
- const _hoisted_6 = {
16
- key: 3,
17
- class: "infinite-list-view__empty"
18
- };
19
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
20
13
  __name: "InfiniteListView",
21
14
  props: {
@@ -31,25 +24,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
24
  estimateSize: { default: 200 },
32
25
  overscan: { default: 5 },
33
26
  surface: { type: Boolean, default: void 0 },
34
- itemCard: { type: Boolean },
27
+ itemCard: { type: Boolean, default: void 0 },
28
+ card: { type: Boolean, default: true },
35
29
  maxHeight: { default: void 0 },
36
30
  pullRefresh: { type: Boolean, default: false },
37
31
  lanes: { default: 1 },
38
32
  estimateSizeAt: {},
39
33
  laneGap: { default: 0 },
40
- itemGap: { default: 0 }
34
+ itemGap: { default: void 0 }
41
35
  },
42
36
  emits: ["loadMore", "retry", "refresh"],
43
37
  setup(__props, { expose: __expose, emit: __emit }) {
44
38
  useCssVars((_ctx) => ({
45
- "v407ba190": unref(surfacePadCss)
39
+ "v03523e76": unref(surfacePadCss),
40
+ "v7a2efb58": cardPadCss.value
46
41
  }));
47
42
  const props = __props;
48
43
  const emits = __emit;
49
44
  const scrollContainer = ref();
50
45
  const sentinel = ref();
51
- const { surfaceActive, surfaceBgActive, surfacePadCss } = useSurface(
52
- () => props
46
+ const { gapValue: itemGapFinal, cardPad } = useDataViewGap(() => props.itemGap);
47
+ const cardPadCss = computed(() => `${cardPad.value}px`);
48
+ const itemCardFinal = computed(() => props.itemCard ?? props.card);
49
+ const { surfaceActive, surfaceBgActive, surfacePad, surfacePadCss } = useSurface(() => ({ ...props, itemCard: itemCardFinal.value }));
50
+ const placeholderStyle = computed(
51
+ () => surfacePad.value ? void 0 : { maxWidth: `calc(100% - ${itemGapFinal.value * 2}px)` }
53
52
  );
54
53
  const containerStyle = computed(
55
54
  () => props.maxHeight ? {
@@ -72,7 +71,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
72
71
  lanes: props.lanes,
73
72
  // 同列相邻项的纵向间距(virtual-core 把它算进 measurements,总高与位置都正确;
74
73
  // [MUST NOT] 改用项自身的 margin —— measureElement 量的是 borderBox、吃不到 margin)
75
- gap: props.itemGap,
74
+ gap: itemGapFinal.value,
76
75
  // `"estimate"`(默认)= **列归属按估值定下来就缓存**,卡片不会在量准后跳到另一列。
77
76
  // 🔴 [MUST NOT] 改 `"measured"`:那会让首屏卡片换列,比一点留白刺眼得多。
78
77
  laneAssignmentMode: "estimate"
@@ -196,7 +195,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
196
195
  key: String(item.key),
197
196
  ref_for: true,
198
197
  ref: measureElementRef,
199
- class: "infinite-list-view__row",
198
+ class: normalizeClass(["infinite-list-view__row", { "is-card": __props.card }]),
200
199
  "data-index": item.index,
201
200
  style: normalizeStyle(rowStyle(item))
202
201
  }, [
@@ -206,7 +205,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
206
205
  }, () => [
207
206
  createElementVNode("pre", _hoisted_2, toDisplayString(JSON.stringify(__props.data[item.index], null, 2)), 1)
208
207
  ], true)
209
- ], 12, _hoisted_1);
208
+ ], 14, _hoisted_1);
210
209
  }), 128))
211
210
  ], 4),
212
211
  createElementVNode("div", {
@@ -230,11 +229,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
230
229
  createElementVNode("span", _hoisted_4, toDisplayString(__props.endText), 1)
231
230
  ], true) : createCommentVNode("", true)
232
231
  ])
233
- ], 64)) : __props.loading ? (openBlock(), createElementBlock("div", _hoisted_5, "加载中…")) : (openBlock(), createElementBlock("div", _hoisted_6, [
232
+ ], 64)) : __props.loading ? (openBlock(), createElementBlock("div", {
233
+ key: 2,
234
+ class: normalizeClass(["infinite-list-view__empty", { "is-card": __props.card }]),
235
+ style: normalizeStyle(placeholderStyle.value)
236
+ }, " 加载中… ", 6)) : (openBlock(), createElementBlock("div", {
237
+ key: 3,
238
+ class: normalizeClass(["infinite-list-view__empty", { "is-card": __props.card }]),
239
+ style: normalizeStyle(placeholderStyle.value)
240
+ }, [
234
241
  renderSlot(_ctx.$slots, "empty", {}, () => [
235
242
  createVNode(unref(ElEmpty))
236
243
  ], true)
237
- ]))
244
+ ], 6))
238
245
  ], 38);
239
246
  };
240
247
  }
@@ -1,26 +1,23 @@
1
- import { inject, computed } from "vue";
1
+ import { computed, inject } from "vue";
2
2
  import { resolveGridColumnsByBreakpoint } from "./utils.mjs";
3
- import { APP_LAYOUT_BRIDGE_KEY } from "../../inject/key.mjs";
4
3
  import { useBreakpoint } from "../../hooks/use-breakpoint.mjs";
4
+ import { APP_LAYOUT_BRIDGE_KEY } from "../../inject/key.mjs";
5
5
  import { gapScaleValue } from "../../utils/gap-scale.mjs";
6
6
  const DEFAULT_GAP_BASE = 8;
7
- const useDataViewGridLayout = (options) => {
7
+ const useDataViewGap = (gap) => {
8
8
  const layoutBridge = inject(APP_LAYOUT_BRIDGE_KEY, void 0);
9
- const { activeBreakpoint } = useBreakpoint();
10
- const gridGap = computed(
11
- () => options.gap() ?? gapScaleValue(
12
- (layoutBridge == null ? void 0 : layoutBridge.APP_LAYOUT_GAP_CONFIG.size) ?? DEFAULT_GAP_BASE,
13
- "module",
14
- layoutBridge == null ? void 0 : layoutBridge.themeDensity.value
15
- )
9
+ const gapBase = () => (layoutBridge == null ? void 0 : layoutBridge.APP_LAYOUT_GAP_CONFIG.size) ?? DEFAULT_GAP_BASE;
10
+ const gapValue = computed(
11
+ () => gap() ?? gapScaleValue(gapBase(), "module", layoutBridge == null ? void 0 : layoutBridge.themeDensity.value)
16
12
  );
17
13
  const cardPad = computed(
18
- () => gapScaleValue(
19
- (layoutBridge == null ? void 0 : layoutBridge.APP_LAYOUT_GAP_CONFIG.size) ?? DEFAULT_GAP_BASE,
20
- "breath",
21
- layoutBridge == null ? void 0 : layoutBridge.themeDensity.value
22
- )
14
+ () => gapScaleValue(gapBase(), "breath", layoutBridge == null ? void 0 : layoutBridge.themeDensity.value)
23
15
  );
16
+ return { gapValue, cardPad };
17
+ };
18
+ const useDataViewGridLayout = (options) => {
19
+ const { activeBreakpoint } = useBreakpoint();
20
+ const { gapValue: gridGap, cardPad } = useDataViewGap(options.gap);
24
21
  const gridTemplateColumns = computed(() => {
25
22
  const cfg = options.gridColumns();
26
23
  if (cfg === void 0) return void 0;
@@ -42,5 +39,6 @@ const useDataViewGridLayout = (options) => {
42
39
  return { gridGap, gridTemplateColumns, gridStyle, cardPad };
43
40
  };
44
41
  export {
42
+ useDataViewGap,
45
43
  useDataViewGridLayout
46
44
  };
@@ -39,7 +39,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
39
39
  const { ctxRefine } = useContextDefaults({
40
40
  getProps: () => props,
41
41
  defaults: {
42
- refine: ({ parentInfo, props: rawProps }) => rawProps.refine ?? (parentInfo === SlotRegion.AppPage_Default || parentInfo === SlotRegion.ModalConfirm_Body ? true : void 0)
42
+ refine: ({ parentInfo, props: rawProps }) => rawProps.refine ?? (parentInfo === SlotRegion.AppPage_Default || parentInfo === SlotRegion.ModalConfirm_Body || // 🔴 抽屉档 [MUST] 一起列上:两档都 provide 有界可用高,
43
+ // 漏它就是「抽屉里掉回自然流」(k2vnfp 换标时的连带)
44
+ parentInfo === SlotRegion.ModalConfirm_DrawerBody ? true : void 0)
43
45
  }
44
46
  });
45
47
  const parentVisualLevel = inject(TABS_MAIN_VISUAL_LEVEL, 0);
@@ -2,9 +2,16 @@ import { inject, computed, onScopeDispose, ref } from "vue";
2
2
  import { CORE_BRIDGE_KEY } from "../../inject/key.mjs";
3
3
  import { BADGE_MASK_KINDS } from "../../bridge/badge.mjs";
4
4
  const BADGE_BUILTIN_PRESET = {
5
- new: { text: "新上线", type: "success" },
6
- updated: { text: "已更新", type: "primary" },
7
- beta: { text: "内测中", type: "warning" },
5
+ // 🔴 **资讯三档回短**(b9tmkc,甲方 2026-09-20):`15vsrv` 撤回图标时,把 v0.30
6
+ // **悬浮气泡**用的 `label`(新上线 / 已更新 / 内测中)当成 `text` 搬了回来 —— 而甲方
7
+ // 当轮只要求「撤掉图标改回文字」、**没要求改文案**。是一次夹带,现回正为 ≤v0.29 的原文案。
8
+ // ⚠️ 未变的四档恰好都是三字 ⇒ 混在一起看不出来,直到甲方逐个看才发现。
9
+ // [MUST NOT] 再把气泡文案当正文搬。
10
+ new: { text: "新", type: "success" },
11
+ updated: { text: "更新", type: "primary" },
12
+ beta: { text: "内测", type: "warning" },
13
+ // 状态四档**就是三字**,那是甲方要的(见上文「不用关心太长」)——
14
+ // [MUST NOT] 拿资讯三档回短这件事去把它们一起改短。
8
15
  wip: { text: "开发中", type: "info" },
9
16
  // 规划中:比 wip 更靠前(还没开工)。与 wip 同为 info 档,靠文案区分。
10
17
  planned: { text: "规划中", type: "info" },
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./FormItem.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-940abdf9"]]);
4
+ const FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-191f1c05"]]);
5
5
  export {
6
6
  FormItem as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./FormMain.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const FormMain = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ba043bbe"]]);
4
+ const FormMain = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-096c744b"]]);
5
5
  export {
6
6
  FormMain as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, shallowRef, provide, ref, readonly, computed, watch, openBlock, createBlock, unref, withModifiers, withCtx, createVNode, createElementBlock, Fragment, renderList, withDirectives, mergeProps, renderSlot, vShow, resolveDynamicComponent, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
1
+ import { defineComponent, shallowRef, inject, computed, provide, ref, readonly, watch, openBlock, createBlock, unref, withModifiers, withCtx, createVNode, createElementBlock, Fragment, renderList, withDirectives, mergeProps, renderSlot, vShow, resolveDynamicComponent, normalizeProps, guardReactiveProps, createCommentVNode } from "vue";
2
2
  import { useFormLayoutByContainer } from "./use-layout-by-container.mjs";
3
3
  import { ElForm, ElRow, ElCol } from "element-plus";
4
4
  import FormItem from "./FormItem.vue.mjs";
@@ -7,7 +7,7 @@ import DragFloat from "../display/DragFloat.vue.mjs";
7
7
  import { FORM_ITEM_CHANGE_LOADING, patchFormData, stringifyFormData, parseFormData, generateFormData, resolveFormLayout } from "./utils.mjs";
8
8
  import { getFormAiSchema } from "./ai-schema.mjs";
9
9
  import { createNestFormExposeMap } from "./nest-registry.mjs";
10
- import { FORM_NEST_REGISTRY_KEY, FORM_VALIDATE_ERROR_KEYS, NEST_LAYOUT_SCALE_KEY } from "../../inject/key.mjs";
10
+ import { CORE_BRIDGE_KEY, FORM_NEST_REGISTRY_KEY, FORM_VALIDATE_ERROR_KEYS, NEST_LAYOUT_SCALE_KEY } from "../../inject/key.mjs";
11
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
12
12
  ...{
13
13
  name: "FormMain",
@@ -20,7 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  layout: {},
21
21
  rowGutter: { default: 8 },
22
22
  layoutScale: { default: 1 },
23
- layoutByContainer: { type: Boolean, default: false },
23
+ layoutByContainer: { type: Boolean, default: void 0 },
24
24
  aiFill: { type: Boolean, default: void 0 },
25
25
  aiFillTrigger: {},
26
26
  description: {}
@@ -30,8 +30,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
30
  const props = __props;
31
31
  const emits = __emit;
32
32
  const elForm = shallowRef();
33
+ const coreBridge = inject(CORE_BRIDGE_KEY, void 0);
34
+ const layoutByContainerFinal = computed(
35
+ () => {
36
+ var _a;
37
+ return props.layoutByContainer ?? ((_a = coreBridge == null ? void 0 : coreBridge.APP_FORM_CONFIG) == null ? void 0 : _a.layoutByContainer) ?? true;
38
+ }
39
+ );
33
40
  const { resolveLayoutByContainer } = useFormLayoutByContainer({
34
- enabled: () => props.layoutByContainer,
41
+ enabled: () => layoutByContainerFinal.value,
35
42
  getForm: () => elForm.value
36
43
  });
37
44
  const nestExposeMap = createNestFormExposeMap();
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./FormSearch.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const FormSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e52f9711"]]);
4
+ const FormSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2a461deb"]]);
5
5
  export {
6
6
  FormSearch as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, useAttrs, ref, shallowRef, openBlock, createBlock, normalizeClass, withCtx, withDirectives, createVNode, mergeProps, unref, createSlots, normalizeProps, guardReactiveProps, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, renderList, renderSlot, vShow } from "vue";
1
+ import { defineComponent, computed, useAttrs, ref, inject, shallowRef, openBlock, createBlock, normalizeClass, withCtx, withDirectives, createVNode, mergeProps, unref, createSlots, normalizeProps, guardReactiveProps, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, renderList, renderSlot, vShow } from "vue";
2
2
  import { resolveFormLayout, stringifyFormData } from "./utils.mjs";
3
3
  import { resolveFormAiFormDescription } from "./ai-schema.mjs";
4
4
  import { resolveSearchLayout, resolveSearchLabelPosition, resolveSearchItemOccupancy, computeSearchGeometry, getCurrentSpan, packSearchFormList } from "./form-search-utils.mjs";
@@ -8,6 +8,7 @@ import FormMain from "./FormMain.vue.mjs";
8
8
  import _sfc_main$1 from "../display/WatchSize.vue.mjs";
9
9
  import { useBreakpoint } from "../../hooks/use-breakpoint.mjs";
10
10
  import { useCustomBreakpoint } from "../../hooks/use-custom-breakpoint.mjs";
11
+ import { CORE_BRIDGE_KEY } from "../../inject/key.mjs";
11
12
  const _hoisted_1 = { class: "btn-box" };
12
13
  const FORM_SEARCH_AI_ROLE_DESC = "这是一个列表筛选/搜索条件表单:把用户意图映射为筛选条件字段,未提及的条件留空";
13
14
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -33,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
34
  }) },
34
35
  rowGutter: { default: 14 },
35
36
  layoutScale: {},
36
- layoutByContainer: { type: Boolean, default: false },
37
+ layoutByContainer: { type: Boolean, default: void 0 },
37
38
  aiFill: { type: Boolean, default: void 0 },
38
39
  aiFillTrigger: {},
39
40
  description: {}
@@ -50,8 +51,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
51
  const showForm = ref(false);
51
52
  const { activeBreakpoint: windowBreakpoint } = useBreakpoint();
52
53
  const { elRef: breakpointEl, activeBreakpoint: containerBreakpoint } = useCustomBreakpoint();
54
+ const coreBridge = inject(CORE_BRIDGE_KEY, void 0);
55
+ const layoutByContainerFinal = computed(
56
+ () => {
57
+ var _a;
58
+ return props.layoutByContainer ?? ((_a = coreBridge == null ? void 0 : coreBridge.APP_FORM_CONFIG) == null ? void 0 : _a.layoutByContainer) ?? true;
59
+ }
60
+ );
53
61
  const activeBreakpoint = computed(
54
- () => props.compact || props.layoutByContainer ? containerBreakpoint.value : windowBreakpoint.value
62
+ () => props.compact || layoutByContainerFinal.value ? containerBreakpoint.value : windowBreakpoint.value
55
63
  );
56
64
  const isCollapsed = ref(true);
57
65
  const assertData = computed(() => {
@@ -166,7 +174,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
166
174
  "row-gutter": __props.rowGutter
167
175
  }, unref(attrs), {
168
176
  layout: effectiveLayout.value,
169
- "layout-by-container": __props.layoutByContainer,
177
+ "layout-by-container": layoutByContainerFinal.value,
170
178
  labelPosition: effectiveLabelPosition.value,
171
179
  labelWidth: __props.labelWidth,
172
180
  "ai-fill": __props.aiFill,
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./FormSubmitPanel.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const FormSubmitPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b89f8f9f"]]);
4
+ const FormSubmitPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b3ea2e8e"]]);
5
5
  export {
6
6
  FormSubmitPanel as default
7
7
  };
@@ -55,6 +55,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
55
  const { ctxSurface } = useContextDefaults({
56
56
  getProps: () => props,
57
57
  defaults: {
58
+ // 判据是「脚下是不是一块面」:modal 正文是(⇒ 关面),
59
+ // **抽屉正文自 v0.32.0 起是底色**(`ModalConfirm_DrawerBody`)⇒ 自持面恢复。
58
60
  surface: ({ parentInfo, props: rawProps }) => rawProps.surface ?? parentInfo !== SlotRegion.ModalConfirm_Body
59
61
  }
60
62
  });
@@ -8,7 +8,13 @@ const useFormAiFill = (options) => {
8
8
  const aiFillIsNested = parentRegistry !== null;
9
9
  const aiFillSnapshot = ref(null);
10
10
  const aiFillTriggerComponent = computed(
11
- () => options.getTrigger() ?? (bridge == null ? void 0 : bridge.aiFillTrigger.value)
11
+ // 🔴 [MUST] 双层可选链:bridge **存在但字段缺失**(单测替身 / 下游自造实现 /
12
+ // 旧版 bridge)时,只护外层会直接抛。本仓在 `bridge?.APP_ENV_INFO.isDev`
13
+ // 上栽过一次,下一行的 `aiFillRequireDescription?.` 已是修正后的写法。
14
+ () => {
15
+ var _a;
16
+ return options.getTrigger() ?? ((_a = bridge == null ? void 0 : bridge.aiFillTrigger) == null ? void 0 : _a.value);
17
+ }
12
18
  );
13
19
  const aiFillHasDescription = computed(
14
20
  () => resolveFormAiFormDescription(options.getDescription()) !== void 0
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./ListLayout.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const ListLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-abf3c131"]]);
4
+ const ListLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-17f9622b"]]);
5
5
  export {
6
6
  ListLayout as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, useCssVars, unref, useSlots, computed, inject, useModel, ref, shallowRef, watch, withDirectives, openBlock, createBlock, normalizeClass, withCtx, mergeProps, createSlots, renderSlot, normalizeProps, guardReactiveProps, renderList, createTextVNode, toDisplayString, createCommentVNode, createVNode, createElementBlock, vShow, mergeModels } from "vue";
1
+ import { defineComponent, useCssVars, unref, useSlots, computed, inject, watch, useModel, ref, shallowRef, withDirectives, openBlock, createBlock, normalizeClass, withCtx, mergeProps, createSlots, renderSlot, normalizeProps, guardReactiveProps, renderList, createTextVNode, toDisplayString, createCommentVNode, createVNode, createElementBlock, vShow, mergeModels } from "vue";
2
2
  import { vLoading } from "element-plus";
3
3
  import FormActiveFilter from "../form/FormActiveFilter.vue.mjs";
4
4
  import FormSearch from "../form/FormSearch.vue.mjs";
@@ -25,10 +25,14 @@ const _hoisted_1 = {
25
25
  };
26
26
  const DEFAULT_MODULE_GAP = 8;
27
27
  const _sfc_main = /* @__PURE__ */ defineComponent({
28
+ ...{
29
+ name: "ListLayout"
30
+ },
28
31
  __name: "ListLayout",
29
32
  props: /* @__PURE__ */ mergeModels({
30
33
  staticQuery: { default: () => ({}) },
31
34
  title: {},
35
+ titleField: {},
32
36
  formSearchProps: {},
33
37
  columns: {},
34
38
  rowKey: {},
@@ -76,14 +80,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76
80
  emits: /* @__PURE__ */ mergeModels(["dataChange", "pageInfoChange"], ["update:isAutoRefresh", "update:refreshInterval", "update:customView", "update:activeId", "update:activeData"]),
77
81
  setup(__props, { expose: __expose, emit: __emit }) {
78
82
  useCssVars((_ctx) => ({
79
- "v4ab2374c": unref(moduleGap),
80
- "v72dde434": unref(breathGap),
81
- "v700b6fbe": unref(sectionGap),
82
- "v2f33b9a9": minHeight.value,
83
- "abf328a0": moduleBgValue.value,
84
- "v58372974": unref(searchStickyTop),
85
- "v4c91183e": unref(toolbarStickyTop),
86
- "ac71af32": unref(pagerStickyBottom)
83
+ "v6a532e4f": unref(moduleGap),
84
+ "v563d57db": unref(breathGap),
85
+ "v2dd73ccc": unref(sectionGap),
86
+ "v823ff8c4": minHeight.value,
87
+ "d43a99b6": moduleBgValue.value,
88
+ "v83c130ae": unref(searchStickyTop),
89
+ "v30d6fc4c": unref(toolbarStickyTop),
90
+ "v3698ad5c": unref(pagerStickyBottom)
87
91
  }));
88
92
  const props = __props;
89
93
  const listLayoutEmits = __emit;
@@ -122,6 +126,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
122
126
  const moduleGapNum = gapNum("module");
123
127
  const breathGap = gapPx("breath");
124
128
  const sectionGap = gapPx("section");
129
+ watch(
130
+ () => [props.titleField, props.title],
131
+ ([field, t]) => field == null ? void 0 : field.changeTitle(t),
132
+ { immediate: true }
133
+ );
125
134
  const hasHeader = computed(() => !!slots.header || !!props.title);
126
135
  const hasOperation = computed(() => !!slots.operation);
127
136
  const hasChromeContent = computed(
@@ -380,7 +389,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
380
389
  onHeightChange: onHeaderHeightChange
381
390
  }, {
382
391
  default: withCtx(() => [
383
- renderSlot(_ctx.$slots, "header", {}, () => [
392
+ renderSlot(_ctx.$slots, "header", { title: __props.title }, () => [
384
393
  createTextVNode(toDisplayString(__props.title), 1)
385
394
  ], true)
386
395
  ]),
@@ -2,7 +2,7 @@ import _sfc_main from "./ModalConfirm.vue2.mjs";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
5
- const ModalConfirm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6277d32b"]]);
5
+ const ModalConfirm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-60cc7374"]]);
6
6
  export {
7
7
  ModalConfirm as default
8
8
  };