@done-coding/admin-core 0.27.0 → 0.27.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.
- package/es/bridge/index.mjs +11 -3
- package/es/components/app-layout/AppBody.vue.mjs +1 -1
- package/es/components/app-layout/AppBody.vue2.mjs +14 -5
- package/es/components/app-layout/AppHeader.vue.mjs +1 -1
- package/es/components/app-layout/AppHeader.vue2.mjs +7 -5
- package/es/components/app-layout/AppLayout.vue.mjs +1 -1
- package/es/components/app-layout/AppLayout.vue2.mjs +2 -1
- package/es/components/app-layout/AppPage.vue.mjs +1 -1
- package/es/components/app-layout/AppPage.vue2.mjs +35 -32
- package/es/components/app-layout/app-page-geometry.mjs +16 -16
- package/es/components/app-layout/app-page-recommended.mjs +10 -0
- package/es/components/data-view/DataGridView.vue.mjs +1 -1
- package/es/components/data-view/DataGridView.vue2.mjs +29 -17
- package/es/components/data-view/DataListView.vue.mjs +1 -1
- package/es/components/data-view/DataListView.vue2.mjs +10 -0
- package/es/components/data-view/InfiniteListView.vue.mjs +1 -1
- package/es/components/data-view/InfiniteListView.vue2.mjs +9 -3
- package/es/components/data-view/use-active-scroll.mjs +15 -0
- package/es/components/display/DragFloat.vue.mjs +7 -0
- package/es/components/display/DragFloat.vue2.mjs +109 -0
- package/es/components/display/TabsHeader.vue.mjs +1 -1
- package/es/components/display/TabsHeader.vue2.mjs +9 -10
- package/es/components/display/TabsMain.vue.mjs +22 -7
- package/es/components/display/tabs-variant.mjs +14 -0
- package/es/components/form/FormDivider.vue.mjs +7 -0
- package/es/components/form/FormDivider.vue2.mjs +14 -0
- package/es/components/form/FormGroupTitle.vue.mjs +7 -0
- package/es/components/form/FormGroupTitle.vue2.mjs +59 -0
- package/es/components/form/FormItemNestForm.vue.mjs +1 -1
- package/es/components/form/FormItemNestFormList.vue.mjs +1 -1
- package/es/components/form/FormMain.vue.mjs +1 -1
- package/es/components/form/FormMain.vue2.mjs +69 -9
- package/es/components/form/FormSearch.vue.mjs +1 -1
- package/es/components/form/FormSearch.vue2.mjs +15 -3
- package/es/components/form/FormSubmitPanel.vue.mjs +1 -1
- package/es/components/form/FormSubmitPanel.vue2.mjs +14 -1
- package/es/components/form/ai-schema.mjs +139 -0
- package/es/components/form/group.mjs +81 -0
- package/es/components/form/use-ai-fill.mjs +71 -0
- package/es/components/form/utils.mjs +15 -4
- package/es/components/list-layout/ListLayout.vue.mjs +1 -1
- package/es/components/list-layout/ListLayout.vue2.mjs +103 -62
- package/es/components/modal/ImagePreviewTrigger.vue.mjs +5 -1
- package/es/components/modal/ModalConfirm.vue.mjs +1 -1
- package/es/components/modal/ModalConfirm.vue2.mjs +8 -5
- package/es/components/modal/VideoPreviewTrigger.vue.mjs +1 -1
- package/es/components/modal/VideoPreviewTrigger.vue2.mjs +2 -1
- package/es/components/page-layout/AppPageDetail.vue.mjs +1 -1
- package/es/components/page-layout/AppPageDetail.vue2.mjs +17 -13
- package/es/components/page-layout/AppPageListDetailLayout.vue.mjs +7 -4
- package/es/components/page-layout/AppPageListDetailSheet.vue.mjs +12 -4
- package/es/components/page-layout/AppPageListDetailSplit.vue.mjs +1 -1
- package/es/components/page-layout/AppPageListDetailSplit.vue2.mjs +10 -3
- package/es/components/table/TableMain.vue.mjs +1 -1
- package/es/components/table/TableMain.vue2.mjs +45 -25
- package/es/components/view-layout/ViewLayout.vue.mjs +1 -1
- package/es/components/view-layout/ViewLayout.vue2.mjs +46 -15
- package/es/config/slot-region.mjs +1 -0
- package/es/hooks/use-active-record.mjs +5 -1
- package/es/hooks/use-surface.mjs +27 -0
- package/es/hooks/use-theme-apply.mjs +52 -18
- package/es/index.mjs +81 -59
- package/es/inject/key.mjs +4 -0
- package/es/store/app.mjs +51 -17
- package/es/style.css +361 -184
- package/es/utils/dom.mjs +7 -1
- package/es/utils/gap-scale.mjs +25 -0
- package/es/utils/theme-scale.mjs +27 -0
- package/package.json +2 -2
- package/src/bridge/docs/README.md +30 -0
- package/src/components/app-layout/docs/README-AppBody.md +21 -0
- package/src/components/app-layout/docs/README-AppPage.md +20 -3
- package/src/components/data-view/docs/README-DataGridView.md +15 -0
- package/src/components/data-view/docs/README-DataListView.md +13 -0
- package/src/components/data-view/docs/README-InfiniteListView.md +15 -0
- package/src/components/display/README.md +1 -0
- package/src/components/display/docs/README-DragFloat.md +68 -0
- package/src/components/form/README.md +4 -2
- package/src/components/form/docs/README-FormItemNestForm.md +5 -3
- package/src/components/form/docs/README-FormItemNestFormList.md +7 -1
- package/src/components/form/docs/README-FormMain.md +102 -1
- package/src/components/form/docs/README-FormSearch.md +5 -0
- package/src/components/list-layout/docs/README-ListLayout.md +61 -1
- package/src/components/modal/docs/README-ImagePreviewTrigger.md +2 -0
- package/src/components/modal/docs/README-VideoPreviewTrigger.md +4 -1
- package/src/components/page-layout/docs/README-AppPageDetail.md +11 -1
- package/src/components/page-layout/docs/README-AppPageListDetailLayout.md +64 -6
- package/src/components/table/docs/README-TableMain.md +22 -0
- package/src/components/view-layout/docs/README-ViewLayout.md +27 -2
- package/src/hooks/docs/README.md +30 -1
- package/types/bridge/index.d.ts +69 -10
- package/types/components/app-layout/AppPage.vue.d.ts +15 -7
- package/types/components/app-layout/app-page-geometry.d.ts +19 -10
- package/types/components/app-layout/app-page-recommended.d.ts +12 -0
- package/types/components/app-layout/index.d.ts +1 -0
- package/types/components/data-view/types.d.ts +18 -0
- package/types/components/data-view/use-active-scroll.d.ts +30 -0
- package/types/components/display/BadgeMark.vue.d.ts +2 -2
- package/types/components/display/DragFloat.vue.d.ts +35 -0
- package/types/components/display/TabsHeader.vue.d.ts +7 -0
- package/types/components/display/index.d.ts +8 -1
- package/types/components/display/tabs-variant.d.ts +17 -0
- package/types/components/display/types.d.ts +6 -0
- package/types/components/form/FormDivider.vue.d.ts +2 -0
- package/types/components/form/FormGroupTitle.vue.d.ts +22 -0
- package/types/components/form/FormItemNestForm.vue.d.ts +2 -0
- package/types/components/form/ai-schema.d.ts +24 -0
- package/types/components/form/group.d.ts +36 -0
- package/types/components/form/index.d.ts +2 -0
- package/types/components/form/types.d.ts +94 -3
- package/types/components/form/use-ai-fill.d.ts +59 -0
- package/types/components/form/utils.d.ts +19 -0
- package/types/components/list-layout/ListLayout.vue.d.ts +3 -0
- package/types/components/list-layout/types.d.ts +28 -0
- package/types/components/modal/ModalConfirm.vue.d.ts +1 -1
- package/types/components/modal/VideoPreviewTrigger.vue.d.ts +1 -1
- package/types/components/page-layout/AppPageDetail.vue.d.ts +2 -2
- package/types/components/page-layout/AppPageListDetailLayout.vue.d.ts +3 -7
- package/types/components/page-layout/AppPageListDetailSheet.vue.d.ts +4 -8
- package/types/components/page-layout/AppPageListDetailSplit.vue.d.ts +4 -8
- package/types/components/page-layout/types.d.ts +42 -0
- package/types/components/panel/PanelItemNestForm.vue.d.ts +2 -0
- package/types/components/table/types.d.ts +9 -0
- package/types/components/view-layout/ViewLayout.vue.d.ts +18 -0
- package/types/components/view-layout/types.d.ts +15 -0
- package/types/config/slot-region.d.ts +10 -1
- package/types/hooks/use-surface.d.ts +34 -0
- package/types/inject/key.d.ts +10 -0
- package/types/injectInfo.json.d.ts +1 -1
- package/types/store/app.d.ts +3 -0
- package/types/utils/dom.d.ts +31 -0
- package/types/utils/gap-scale.d.ts +46 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/theme-scale.d.ts +33 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, unref, useSlots, computed, useModel, ref, shallowRef, watch, withDirectives, openBlock, createBlock, normalizeClass, withCtx, mergeProps, createSlots, renderSlot, normalizeProps, guardReactiveProps, renderList, createCommentVNode, createVNode, mergeModels } from "vue";
|
|
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";
|
|
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";
|
|
@@ -13,13 +13,22 @@ import { resolveGridColumnsByBreakpoint } from "../data-view/utils.mjs";
|
|
|
13
13
|
import SlotLayoutFlowAside from "../slot-layout/SlotLayoutFlowAside.vue.mjs";
|
|
14
14
|
import _pick from "lodash/pick";
|
|
15
15
|
import _cloneDeep from "lodash/cloneDeep";
|
|
16
|
+
import { APP_LAYOUT_BRIDGE_KEY } from "../../inject/key.mjs";
|
|
16
17
|
import { useChannelViewportHeight } from "../../hooks/use-channel-viewport-height.mjs";
|
|
17
18
|
import { useBreakpoint } from "../../hooks/use-breakpoint.mjs";
|
|
19
|
+
import { APP_PAGE_LIST_LAYOUT_RECOMMENDED } from "../app-layout/app-page-recommended.mjs";
|
|
18
20
|
import { SlotRegion } from "../../config/slot-region.mjs";
|
|
21
|
+
import { gapScaleValue } from "../../utils/gap-scale.mjs";
|
|
22
|
+
const _hoisted_1 = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "list-layout-operation"
|
|
25
|
+
};
|
|
26
|
+
const DEFAULT_MODULE_GAP = 8;
|
|
19
27
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
28
|
__name: "ListLayout",
|
|
21
29
|
props: /* @__PURE__ */ mergeModels({
|
|
22
30
|
staticQuery: { default: () => ({}) },
|
|
31
|
+
title: {},
|
|
23
32
|
formSearchProps: {},
|
|
24
33
|
columns: {},
|
|
25
34
|
rowKey: {},
|
|
@@ -36,6 +45,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
45
|
injectInfo: {},
|
|
37
46
|
beforeSearch: {},
|
|
38
47
|
clearTableFilterOnReset: { type: Boolean },
|
|
48
|
+
gap: {},
|
|
49
|
+
moduleBg: { type: [Boolean, String], default: false },
|
|
39
50
|
initialSearch: { type: Boolean, default: true },
|
|
40
51
|
separateSearch: { type: Boolean, default: false },
|
|
41
52
|
separateSearchConfig: {},
|
|
@@ -65,22 +76,57 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
76
|
emits: /* @__PURE__ */ mergeModels(["dataChange", "pageInfoChange"], ["update:isAutoRefresh", "update:refreshInterval", "update:customView", "update:activeId", "update:activeData"]),
|
|
66
77
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
67
78
|
useCssVars((_ctx) => ({
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
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)
|
|
72
87
|
}));
|
|
73
88
|
const props = __props;
|
|
74
89
|
const listLayoutEmits = __emit;
|
|
75
90
|
const slots = useSlots();
|
|
76
|
-
const { ctxTableMainProps } = useContextDefaults({
|
|
91
|
+
const { ctxTableMainProps, ctxFormSearchProps } = useContextDefaults({
|
|
77
92
|
getProps: () => props,
|
|
78
93
|
defaults: {
|
|
79
|
-
tableMainProps: ({ parentInfo, props: rawProps }) => rawProps.tableMainProps ?? (parentInfo === SlotRegion.AppPage_Left || parentInfo === SlotRegion.AppPage_Right ?
|
|
94
|
+
tableMainProps: ({ parentInfo, props: rawProps }) => rawProps.tableMainProps ?? (parentInfo === SlotRegion.AppPage_Left || parentInfo === SlotRegion.AppPage_Right ? APP_PAGE_LIST_LAYOUT_RECOMMENDED.tableMainProps : void 0),
|
|
95
|
+
// 窄栏搜索表单按**容器**断点定档:窄栏里 ElCol 的响应式 span 仍按 window 宽解析
|
|
96
|
+
// (window 是 lg、容器只有 sm 宽 → `lg:6` 仍生效 → 单行挤爆),这是结构性的、不是口味。
|
|
97
|
+
// ⚠️ 与上面 `??` 整袋择一不同,这里 [MUST] **逐键合并**:`formSearchProps` 是个透传袋,
|
|
98
|
+
// 整袋覆盖会让「传了任意一个键」= 悄悄关掉容器断点。显式写 layoutByContainer 仍优先(后展开)。
|
|
99
|
+
// ⚠️ `maxRows` [MUST NOT] 一并给默认——它是**内容量**的函数(含操作区所在行),不是容器宽的
|
|
100
|
+
// 函数;窄栏下 maxRows:1 会把整块搜索区折叠塌成 0(实测)。该值归消费方判。
|
|
101
|
+
formSearchProps: ({ parentInfo, props: rawProps }) => parentInfo === SlotRegion.AppPage_Left || parentInfo === SlotRegion.AppPage_Right ? { layoutByContainer: true, ...rawProps.formSearchProps } : rawProps.formSearchProps
|
|
80
102
|
}
|
|
81
103
|
});
|
|
82
|
-
const
|
|
104
|
+
const moduleBgValue = computed(
|
|
105
|
+
() => typeof props.moduleBg === "string" ? props.moduleBg : "var(--dc-core-surface, var(--el-bg-color))"
|
|
106
|
+
);
|
|
107
|
+
const layoutBridge = inject(APP_LAYOUT_BRIDGE_KEY, void 0);
|
|
108
|
+
const gapBase = computed(
|
|
109
|
+
() => props.gap ?? (layoutBridge == null ? void 0 : layoutBridge.APP_LAYOUT_GAP_CONFIG.size) ?? DEFAULT_MODULE_GAP
|
|
110
|
+
);
|
|
111
|
+
const gapPx = (rung) => computed(
|
|
112
|
+
() => `${gapScaleValue(
|
|
113
|
+
gapBase.value,
|
|
114
|
+
rung,
|
|
115
|
+
layoutBridge == null ? void 0 : layoutBridge.themeDensity.value
|
|
116
|
+
)}px`
|
|
117
|
+
);
|
|
118
|
+
const gapNum = (rung) => computed(
|
|
119
|
+
() => gapScaleValue(gapBase.value, rung, layoutBridge == null ? void 0 : layoutBridge.themeDensity.value)
|
|
120
|
+
);
|
|
121
|
+
const moduleGap = gapPx("module");
|
|
122
|
+
const moduleGapNum = gapNum("module");
|
|
123
|
+
const breathGap = gapPx("breath");
|
|
124
|
+
const sectionGap = gapPx("section");
|
|
125
|
+
const hasHeader = computed(() => !!slots.header || !!props.title);
|
|
83
126
|
const hasOperation = computed(() => !!slots.operation);
|
|
127
|
+
const hasChromeContent = computed(
|
|
128
|
+
() => showSearch.value || hasOperation.value || props.formActiveFilter
|
|
129
|
+
);
|
|
84
130
|
const isAutoRefresh = useModel(__props, "isAutoRefresh");
|
|
85
131
|
const refreshInterval = useModel(__props, "refreshInterval");
|
|
86
132
|
const customView = useModel(__props, "customView");
|
|
@@ -96,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
96
142
|
const tableMain = shallowRef();
|
|
97
143
|
const { viewportHeightFinal } = useChannelViewportHeight(props);
|
|
98
144
|
const searchHeight = ref(0);
|
|
99
|
-
const
|
|
145
|
+
const chromeHeight = ref(0);
|
|
100
146
|
const headerHeight = ref(0);
|
|
101
147
|
const queryMerge = computed(() => {
|
|
102
148
|
return {
|
|
@@ -109,13 +155,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
109
155
|
() => resolveGridColumnsByBreakpoint(props.gridColumns, activeBreakpoint.value)
|
|
110
156
|
);
|
|
111
157
|
const showSearch = ref(false);
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
} else {
|
|
116
|
-
return searchHeight.value + 10;
|
|
117
|
-
}
|
|
118
|
-
});
|
|
158
|
+
const chromeHeightAdjust = computed(
|
|
159
|
+
() => chromeHeight.value ? chromeHeight.value + moduleGapNum.value : 0
|
|
160
|
+
);
|
|
119
161
|
const {
|
|
120
162
|
layoutRoot,
|
|
121
163
|
searchStickyActive,
|
|
@@ -144,18 +186,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
144
186
|
}
|
|
145
187
|
});
|
|
146
188
|
const activeFilters = activeFilterApi.activeFilters;
|
|
147
|
-
const operationHeightAdjust = computed(() => {
|
|
148
|
-
if (!hasOperation.value) {
|
|
149
|
-
return 0;
|
|
150
|
-
} else {
|
|
151
|
-
return operationHeight.value + 10;
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
189
|
const headerHeightAdjust = computed(() => {
|
|
155
190
|
if (!hasHeader.value) {
|
|
156
191
|
return 0;
|
|
157
192
|
} else {
|
|
158
|
-
return headerHeight.value +
|
|
193
|
+
return headerHeight.value + moduleGapNum.value;
|
|
159
194
|
}
|
|
160
195
|
});
|
|
161
196
|
const listPageMinHeight = computed(() => {
|
|
@@ -171,7 +206,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
171
206
|
if (props.separateSearch) {
|
|
172
207
|
return listPageMinHeight.value;
|
|
173
208
|
}
|
|
174
|
-
return listPageMinHeight.value -
|
|
209
|
+
return listPageMinHeight.value - chromeHeightAdjust.value - headerHeightAdjust.value;
|
|
175
210
|
});
|
|
176
211
|
const searchAsideMaxHeight = computed(
|
|
177
212
|
() => props.refine ? `${listPageMinHeight.value}px` : "100vh"
|
|
@@ -211,8 +246,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
211
246
|
const onFormSearchHeightChange = (height) => {
|
|
212
247
|
searchHeight.value = height;
|
|
213
248
|
};
|
|
214
|
-
const
|
|
215
|
-
|
|
249
|
+
const onChromeHeightChange = (height) => {
|
|
250
|
+
chromeHeight.value = height;
|
|
216
251
|
};
|
|
217
252
|
const onHeaderHeightChange = (height) => {
|
|
218
253
|
headerHeight.value = height;
|
|
@@ -326,6 +361,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
326
361
|
ref_key: "layoutRoot",
|
|
327
362
|
ref: layoutRoot,
|
|
328
363
|
class: normalizeClass(["dc-list-page list-page list-layout", {
|
|
364
|
+
"list-layout_module-bg": !!__props.moduleBg,
|
|
329
365
|
"list-layout_search-sticky": unref(searchStickyActive),
|
|
330
366
|
"list-layout_toolbar-sticky": unref(toolbarStickyActive),
|
|
331
367
|
"list-layout_pager-sticky": unref(pagerStickyActive)
|
|
@@ -339,53 +375,58 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
339
375
|
aside: withCtx(() => [
|
|
340
376
|
hasHeader.value ? (openBlock(), createBlock(unref(_sfc_main$1), {
|
|
341
377
|
key: 0,
|
|
342
|
-
class: "list-layout-header",
|
|
378
|
+
class: "dc-list-layout__header list-layout-header",
|
|
343
379
|
"observe-resize": __props.headerObserveResize,
|
|
344
380
|
onHeightChange: onHeaderHeightChange
|
|
345
381
|
}, {
|
|
346
382
|
default: withCtx(() => [
|
|
347
|
-
renderSlot(_ctx.$slots, "header", {},
|
|
383
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
384
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
385
|
+
], true)
|
|
348
386
|
]),
|
|
349
387
|
_: 3
|
|
350
388
|
}, 8, ["observe-resize"])) : createCommentVNode("", true),
|
|
351
|
-
createVNode(unref(
|
|
352
|
-
|
|
353
|
-
ref: formSearch,
|
|
354
|
-
list: assertList.value,
|
|
355
|
-
data: assertData.value
|
|
356
|
-
}, __props.formSearchProps, {
|
|
357
|
-
compact: __props.separateSearch,
|
|
358
|
-
onSearch,
|
|
359
|
-
onHeightChange: onFormSearchHeightChange,
|
|
360
|
-
onVisibleChange
|
|
361
|
-
}), createSlots({ _: 2 }, [
|
|
362
|
-
renderList(__props.list, (config) => {
|
|
363
|
-
return {
|
|
364
|
-
name: config.key,
|
|
365
|
-
fn: withCtx((scope) => [
|
|
366
|
-
renderSlot(_ctx.$slots, `form-${config.key}`, normalizeProps(guardReactiveProps(scope)), void 0, true)
|
|
367
|
-
])
|
|
368
|
-
};
|
|
369
|
-
})
|
|
370
|
-
]), 1040, ["list", "data", "compact"]),
|
|
371
|
-
hasOperation.value || __props.formActiveFilter ? (openBlock(), createBlock(unref(_sfc_main$1), {
|
|
372
|
-
key: 1,
|
|
373
|
-
class: "list-layout-operation",
|
|
389
|
+
withDirectives(createVNode(unref(_sfc_main$1), {
|
|
390
|
+
class: "list-layout-chrome",
|
|
374
391
|
"observe-resize": __props.operationObserveResize,
|
|
375
|
-
onHeightChange:
|
|
392
|
+
onHeightChange: onChromeHeightChange
|
|
376
393
|
}, {
|
|
377
394
|
default: withCtx(() => [
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
395
|
+
createVNode(unref(FormSearch), mergeProps({
|
|
396
|
+
ref_key: "formSearch",
|
|
397
|
+
ref: formSearch,
|
|
398
|
+
list: assertList.value,
|
|
399
|
+
data: assertData.value
|
|
400
|
+
}, unref(ctxFormSearchProps), {
|
|
401
|
+
compact: __props.separateSearch,
|
|
402
|
+
onSearch,
|
|
403
|
+
onHeightChange: onFormSearchHeightChange,
|
|
404
|
+
onVisibleChange
|
|
405
|
+
}), createSlots({ _: 2 }, [
|
|
406
|
+
renderList(__props.list, (config) => {
|
|
407
|
+
return {
|
|
408
|
+
name: config.key,
|
|
409
|
+
fn: withCtx((scope) => [
|
|
410
|
+
renderSlot(_ctx.$slots, `form-${config.key}`, normalizeProps(guardReactiveProps(scope)), void 0, true)
|
|
411
|
+
])
|
|
412
|
+
};
|
|
413
|
+
})
|
|
414
|
+
]), 1040, ["list", "data", "compact"]),
|
|
415
|
+
hasOperation.value || __props.formActiveFilter ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
416
|
+
__props.formActiveFilter ? (openBlock(), createBlock(unref(FormActiveFilter), {
|
|
417
|
+
key: 0,
|
|
418
|
+
filters: unref(activeFilters),
|
|
419
|
+
"allow-clear": __props.allowClear,
|
|
420
|
+
onRemove: unref(activeFilterApi).remove,
|
|
421
|
+
onClear: unref(activeFilterApi).clearAll
|
|
422
|
+
}, null, 8, ["filters", "allow-clear", "onRemove", "onClear"])) : createCommentVNode("", true),
|
|
423
|
+
hasOperation.value ? renderSlot(_ctx.$slots, "operation", { key: 1 }, void 0, true) : createCommentVNode("", true)
|
|
424
|
+
])) : createCommentVNode("", true)
|
|
386
425
|
]),
|
|
387
426
|
_: 3
|
|
388
|
-
}, 8, ["observe-resize"])
|
|
427
|
+
}, 8, ["observe-resize"]), [
|
|
428
|
+
[vShow, hasChromeContent.value]
|
|
429
|
+
])
|
|
389
430
|
]),
|
|
390
431
|
default: withCtx(() => [
|
|
391
432
|
__props.viewMode === "table" ? (openBlock(), createBlock(unref(TableMain), mergeProps({
|
|
@@ -10,6 +10,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10
10
|
preview: { type: Boolean, default: true }
|
|
11
11
|
},
|
|
12
12
|
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const onTriggerClick = (event) => {
|
|
15
|
+
if (props.preview) event.stopPropagation();
|
|
16
|
+
};
|
|
13
17
|
return (_ctx, _cache) => {
|
|
14
18
|
return openBlock(), createBlock(unref(ElImage), mergeProps({
|
|
15
19
|
class: "dc-image-preview-trigger image-preview-trigger",
|
|
@@ -17,7 +21,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
21
|
lazy: __props.lazy,
|
|
18
22
|
"preview-src-list": __props.preview ? [__props.previewSrc ?? __props.src] : void 0,
|
|
19
23
|
"preview-teleported": __props.preview
|
|
20
|
-
}, _ctx.$attrs), {
|
|
24
|
+
}, _ctx.$attrs, { onClick: onTriggerClick }), {
|
|
21
25
|
placeholder: withCtx(() => [
|
|
22
26
|
renderSlot(_ctx.$slots, "placeholder")
|
|
23
27
|
]),
|
|
@@ -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-
|
|
5
|
+
const ModalConfirm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6277d32b"]]);
|
|
6
6
|
export {
|
|
7
7
|
ModalConfirm as default
|
|
8
8
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { defineComponent, computed, shallowRef, ref, inject, provide, openBlock, createBlock, resolveDynamicComponent, mergeProps, createSlots, withCtx, createElementVNode, normalizeClass, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString,
|
|
1
|
+
import { defineComponent, computed, shallowRef, ref, inject, provide, openBlock, createBlock, resolveDynamicComponent, mergeProps, createSlots, withCtx, createElementVNode, unref, normalizeClass, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
2
2
|
import { ElDrawer, ElDialog, ElButton } from "element-plus";
|
|
3
3
|
import { BODY_CONTENT_VIEWPORT_HEIGHT, SCOPE_VIEWPORT_MAX_HEIGHT } from "../../inject/key.mjs";
|
|
4
4
|
import { useActivated } from "../../hooks/activated.mjs";
|
|
5
5
|
import { useObserveSize } from "../../hooks/use-observe-size.mjs";
|
|
6
|
+
import { SlotRegion } from "../../config/slot-region.mjs";
|
|
6
7
|
const _hoisted_1 = { class: "confirm-modal__title" };
|
|
7
|
-
const _hoisted_2 = ["
|
|
8
|
+
const _hoisted_2 = ["data-dc-slot"];
|
|
9
|
+
const _hoisted_3 = ["reverse"];
|
|
8
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
11
|
...{
|
|
10
12
|
inheritAttrs: false
|
|
@@ -144,7 +146,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
144
146
|
createElementVNode("div", {
|
|
145
147
|
ref_key: "contentRef",
|
|
146
148
|
ref: contentRef,
|
|
147
|
-
class: normalizeClass(["confirm-modal__content", { "confirm-modal__content_drawer": isDrawer.value }])
|
|
149
|
+
class: normalizeClass(["confirm-modal__content", { "confirm-modal__content_drawer": isDrawer.value }]),
|
|
150
|
+
"data-dc-slot": unref(SlotRegion).ModalConfirm_Body
|
|
148
151
|
}, [
|
|
149
152
|
renderSlot(_ctx.$slots, "main-header", {}, void 0, true),
|
|
150
153
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
@@ -153,7 +156,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
153
156
|
], 64))
|
|
154
157
|
], true),
|
|
155
158
|
renderSlot(_ctx.$slots, "main-footer", {}, void 0, true)
|
|
156
|
-
],
|
|
159
|
+
], 10, _hoisted_2)
|
|
157
160
|
]),
|
|
158
161
|
_: 2
|
|
159
162
|
}, [
|
|
@@ -204,7 +207,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
204
207
|
_: 1
|
|
205
208
|
}, 8, ["type", "loading"])
|
|
206
209
|
], true)
|
|
207
|
-
], 8,
|
|
210
|
+
], 8, _hoisted_3)
|
|
208
211
|
]),
|
|
209
212
|
key: "1"
|
|
210
213
|
} : void 0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./VideoPreviewTrigger.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const VideoPreviewTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const VideoPreviewTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-581daee5"]]);
|
|
5
5
|
export {
|
|
6
6
|
VideoPreviewTrigger as default
|
|
7
7
|
};
|
|
@@ -27,9 +27,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
const remote = inject(GLOBAL_MODAL_REMOTE_KEY);
|
|
28
28
|
const localShow = ref(false);
|
|
29
29
|
const frameCoverSrc = computed(() => `${props.url}#t=0.01`);
|
|
30
|
-
const openPreview = () => {
|
|
30
|
+
const openPreview = (event) => {
|
|
31
31
|
var _a, _b;
|
|
32
32
|
if (!props.preview) return;
|
|
33
|
+
event == null ? void 0 : event.stopPropagation();
|
|
33
34
|
if ((_b = (_a = remote == null ? void 0 : remote.value) == null ? void 0 : _a.modalKey) == null ? void 0 : _b.includes(APP_GLOBAL_VIDEO_PREVIEW_KEY)) {
|
|
34
35
|
remote.value[APP_GLOBAL_VIDEO_PREVIEW_KEY].evoke({
|
|
35
36
|
url: props.url,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./AppPageDetail.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const AppPageDetail = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const AppPageDetail = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4426d26a"]]);
|
|
5
5
|
export {
|
|
6
6
|
AppPageDetail as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementBlock, toDisplayString, createCommentVNode, mergeProps, renderSlot, normalizeProps, guardReactiveProps, createVNode } from "vue";
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementBlock, toDisplayString, createCommentVNode, mergeProps, createSlots, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, createVNode } from "vue";
|
|
2
2
|
import { ElEmpty } from "element-plus";
|
|
3
3
|
import AppPage from "../app-layout/AppPage.vue.mjs";
|
|
4
4
|
import _sfc_main$1 from "../slot-layout/SlotLayoutTemplate.vue.mjs";
|
|
@@ -7,10 +7,6 @@ const _hoisted_1 = {
|
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "dc-app-page-detail__title"
|
|
9
9
|
};
|
|
10
|
-
const _hoisted_2 = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "dc-app-page-detail__title"
|
|
13
|
-
};
|
|
14
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
11
|
...{ name: "AppPageDetail" },
|
|
16
12
|
__name: "AppPageDetail",
|
|
@@ -49,10 +45,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
45
|
const detailParams = computed(() => ({
|
|
50
46
|
id: ctxFinal.value.id
|
|
51
47
|
}));
|
|
52
|
-
const detailScope = (data, loading = false) => ({
|
|
48
|
+
const detailScope = (data, loading = false, fetchSeq = 0) => ({
|
|
53
49
|
...ctxFinal.value,
|
|
54
50
|
data,
|
|
55
|
-
loading
|
|
51
|
+
loading,
|
|
52
|
+
fetchSeq
|
|
56
53
|
});
|
|
57
54
|
return (_ctx, _cache) => {
|
|
58
55
|
return openBlock(), createBlock(unref(_sfc_main$1), {
|
|
@@ -66,13 +63,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
66
63
|
api: __props.detailApi,
|
|
67
64
|
params: detailParams.value,
|
|
68
65
|
refreshToken: ctxFinal.value.id
|
|
69
|
-
}), {
|
|
70
|
-
default: withCtx(({ data, loading }) => [
|
|
71
|
-
|
|
72
|
-
renderSlot(_ctx.$slots, "detail", normalizeProps(guardReactiveProps(detailScope(data, loading))), void 0, true)
|
|
66
|
+
}), createSlots({
|
|
67
|
+
default: withCtx(({ data, loading, fetchSeq }) => [
|
|
68
|
+
renderSlot(_ctx.$slots, "detail", normalizeProps(guardReactiveProps(detailScope(data, loading, fetchSeq))), void 0, true)
|
|
73
69
|
]),
|
|
74
|
-
_:
|
|
75
|
-
},
|
|
70
|
+
_: 2
|
|
71
|
+
}, [
|
|
72
|
+
__props.detailTitle ? {
|
|
73
|
+
name: "header",
|
|
74
|
+
fn: withCtx(({ data }) => [
|
|
75
|
+
createTextVNode(toDisplayString(titleOf(data)), 1)
|
|
76
|
+
]),
|
|
77
|
+
key: "0"
|
|
78
|
+
} : void 0
|
|
79
|
+
]), 1040, ["api", "params", "refreshToken"])) : ctxFinal.value.id !== void 0 ? renderSlot(_ctx.$slots, "detail", normalizeProps(mergeProps({ key: 2 }, detailScope())), void 0, true) : renderSlot(_ctx.$slots, "empty", {
|
|
76
80
|
key: 3,
|
|
77
81
|
listEmpty: __props.listEmpty
|
|
78
82
|
}, () => [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useModel, computed, shallowRef, provide, readonly, openBlock, createBlock, resolveDynamicComponent, createSlots, withCtx, renderSlot,
|
|
1
|
+
import { defineComponent, useModel, computed, shallowRef, provide, readonly, openBlock, createBlock, resolveDynamicComponent, createSlots, withCtx, renderSlot, mergeProps, mergeModels } from "vue";
|
|
2
2
|
import AppPageListDetailSplit from "./AppPageListDetailSplit.vue.mjs";
|
|
3
3
|
import _sfc_main$1 from "./AppPageListDetailSheet.vue.mjs";
|
|
4
4
|
import { useAppPageListDetailMode, useAppPageListDetailSequence, useAppPageListDetailQuerySync } from "./use-list-detail.mjs";
|
|
@@ -35,6 +35,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
const formComponent = computed(
|
|
36
36
|
() => isSplit.value ? AppPageListDetailSplit : _sfc_main$1
|
|
37
37
|
);
|
|
38
|
+
const resolvedMode = computed(
|
|
39
|
+
() => isSplit.value ? "split" : "sheet"
|
|
40
|
+
);
|
|
38
41
|
const autoActiveFirst = computed(() => props.autoActiveFirst ?? isSplit.value);
|
|
39
42
|
const sequence = useAppPageListDetailSequence({
|
|
40
43
|
activeId,
|
|
@@ -107,21 +110,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
107
110
|
_ctx.$slots.list ? {
|
|
108
111
|
name: "list",
|
|
109
112
|
fn: withCtx((scope) => [
|
|
110
|
-
renderSlot(_ctx.$slots, "list",
|
|
113
|
+
renderSlot(_ctx.$slots, "list", mergeProps(scope, { resolvedMode: resolvedMode.value }))
|
|
111
114
|
]),
|
|
112
115
|
key: "0"
|
|
113
116
|
} : void 0,
|
|
114
117
|
_ctx.$slots.detail ? {
|
|
115
118
|
name: "detail",
|
|
116
119
|
fn: withCtx((scope) => [
|
|
117
|
-
renderSlot(_ctx.$slots, "detail",
|
|
120
|
+
renderSlot(_ctx.$slots, "detail", mergeProps(scope, { resolvedMode: resolvedMode.value }))
|
|
118
121
|
]),
|
|
119
122
|
key: "1"
|
|
120
123
|
} : void 0,
|
|
121
124
|
_ctx.$slots.empty ? {
|
|
122
125
|
name: "empty",
|
|
123
126
|
fn: withCtx((scope) => [
|
|
124
|
-
renderSlot(_ctx.$slots, "empty",
|
|
127
|
+
renderSlot(_ctx.$slots, "empty", mergeProps(scope, { resolvedMode: resolvedMode.value }))
|
|
125
128
|
]),
|
|
126
129
|
key: "2"
|
|
127
130
|
} : void 0,
|
|
@@ -20,6 +20,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
setup(__props, { emit: __emit }) {
|
|
21
21
|
const props = __props;
|
|
22
22
|
const emit = __emit;
|
|
23
|
+
const sheetTitle = computed(() => {
|
|
24
|
+
const t = props.detailTitle;
|
|
25
|
+
if (!t) return void 0;
|
|
26
|
+
return typeof t === "function" ? t(void 0, props.ctx.record) : t;
|
|
27
|
+
});
|
|
23
28
|
const drawerOpen = computed(() => props.ctx.id !== void 0);
|
|
24
29
|
const onDrawerShowChange = (visible) => {
|
|
25
30
|
if (!visible) emit("close");
|
|
@@ -27,9 +32,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
32
|
return (_ctx, _cache) => {
|
|
28
33
|
return openBlock(), createBlock(unref(AppPage), { class: "dc-app-page-list-detail dc-app-page-list-detail_sheet" }, createSlots({
|
|
29
34
|
default: withCtx(() => [
|
|
30
|
-
renderSlot(_ctx.$slots, "list", {
|
|
35
|
+
renderSlot(_ctx.$slots, "list", {
|
|
36
|
+
listProps: __props.listProps,
|
|
37
|
+
listLayoutRecommended: void 0
|
|
38
|
+
}),
|
|
31
39
|
createVNode(unref(ModalConfirm), {
|
|
32
40
|
class: "dc-app-page-list-detail-sheet__drawer",
|
|
41
|
+
title: sheetTitle.value,
|
|
33
42
|
layerType: __props.sheetLayerType,
|
|
34
43
|
direction: "rtl",
|
|
35
44
|
show: drawerOpen.value,
|
|
@@ -44,7 +53,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
53
|
ctx: __props.ctx,
|
|
45
54
|
listEmpty: __props.listEmpty,
|
|
46
55
|
detailApi: __props.detailApi,
|
|
47
|
-
detailTitle: __props.detailTitle,
|
|
48
56
|
viewLayoutProps: __props.viewLayoutProps
|
|
49
57
|
}, createSlots({ _: 2 }, [
|
|
50
58
|
_ctx.$slots.detail ? {
|
|
@@ -61,10 +69,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
69
|
]),
|
|
62
70
|
key: "1"
|
|
63
71
|
} : void 0
|
|
64
|
-
]), 1032, ["ctx", "listEmpty", "detailApi", "
|
|
72
|
+
]), 1032, ["ctx", "listEmpty", "detailApi", "viewLayoutProps"])
|
|
65
73
|
]),
|
|
66
74
|
_: 3
|
|
67
|
-
}, 8, ["layerType", "show", "width"])
|
|
75
|
+
}, 8, ["title", "layerType", "show", "width"])
|
|
68
76
|
]),
|
|
69
77
|
_: 2
|
|
70
78
|
}, [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./AppPageListDetailSplit.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const AppPageListDetailSplit = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const AppPageListDetailSplit = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e97ba16e"]]);
|
|
5
5
|
export {
|
|
6
6
|
AppPageListDetailSplit as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, createSlots, withCtx, createVNode, renderSlot, normalizeProps, guardReactiveProps, createElementVNode, normalizeStyle } from "vue";
|
|
2
2
|
import AppPage from "../app-layout/AppPage.vue.mjs";
|
|
3
|
+
import { APP_PAGE_LIST_LAYOUT_RECOMMENDED } from "../app-layout/app-page-recommended.mjs";
|
|
3
4
|
import AppPageDetail from "./AppPageDetail.vue.mjs";
|
|
5
|
+
import { SlotRegion } from "../../config/slot-region.mjs";
|
|
6
|
+
const _hoisted_1 = ["data-dc-slot"];
|
|
4
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
8
|
...{ name: "AppPageListDetailSplit" },
|
|
6
9
|
__name: "AppPageListDetailSplit",
|
|
@@ -23,10 +26,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
26
|
left: withCtx(() => [
|
|
24
27
|
createElementVNode("div", {
|
|
25
28
|
class: "dc-app-page-list-detail-split__list",
|
|
26
|
-
style: normalizeStyle(listStyle.value)
|
|
29
|
+
style: normalizeStyle(listStyle.value),
|
|
30
|
+
"data-dc-slot": unref(SlotRegion).AppPage_Left
|
|
27
31
|
}, [
|
|
28
|
-
renderSlot(_ctx.$slots, "list", {
|
|
29
|
-
|
|
32
|
+
renderSlot(_ctx.$slots, "list", {
|
|
33
|
+
listProps: __props.listProps,
|
|
34
|
+
listLayoutRecommended: unref(APP_PAGE_LIST_LAYOUT_RECOMMENDED)
|
|
35
|
+
}, void 0, true)
|
|
36
|
+
], 12, _hoisted_1)
|
|
30
37
|
]),
|
|
31
38
|
default: withCtx(() => [
|
|
32
39
|
createVNode(AppPageDetail, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./TableMain.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const TableMain = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const TableMain = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-431aac71"]]);
|
|
5
5
|
export {
|
|
6
6
|
TableMain as default
|
|
7
7
|
};
|