qidian-vue-ui 2.0.4 → 2.0.6
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/dist/components/config-provider/useConfig.d.ts +1 -0
- package/dist/components/config-provider/useConfig.mjs +5 -1
- package/dist/components/crud/tabs-table/index.vue.d.ts +1 -1
- package/dist/components/form/index.css +21 -14
- package/dist/components/form/index.vue.mjs +1 -1
- package/dist/components/form/index.vue2.mjs +5 -3
- package/dist/styles/index.css +7 -3
- package/package.json +1 -1
|
@@ -6,6 +6,9 @@ import get from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-
|
|
|
6
6
|
function useConfig(key, componentLocale) {
|
|
7
7
|
const injectGlobalConfig = getCurrentInstance?.() ? inject(PROVIDE_GLOBAL_CONFIG, void 0) : computed(() => window.__QIDIAN_GLOBAL_CONFIG__);
|
|
8
8
|
const mergedGlobalConfig = computed(() => injectGlobalConfig?.value || zhCN);
|
|
9
|
+
const size = computed(
|
|
10
|
+
() => mergedGlobalConfig.value.size
|
|
11
|
+
);
|
|
9
12
|
const globalConfig = computed(
|
|
10
13
|
() => merge(
|
|
11
14
|
{},
|
|
@@ -18,7 +21,8 @@ function useConfig(key, componentLocale) {
|
|
|
18
21
|
};
|
|
19
22
|
return {
|
|
20
23
|
t,
|
|
21
|
-
global: globalConfig
|
|
24
|
+
global: globalConfig,
|
|
25
|
+
size
|
|
22
26
|
};
|
|
23
27
|
}
|
|
24
28
|
export {
|
|
@@ -41,6 +41,7 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
|
|
|
41
41
|
columns?: import("..").QdCrudTableCol<D>[] | undefined;
|
|
42
42
|
data?: D[] | undefined;
|
|
43
43
|
sort?: import("tdesign-vue-next").TableSort | undefined;
|
|
44
|
+
size?: import("tdesign-vue-next").SizeEnum | "mini" | undefined;
|
|
44
45
|
empty?: (string | import("tdesign-vue-next").TNode) | undefined;
|
|
45
46
|
loading?: (boolean | import("tdesign-vue-next").TNode) | undefined;
|
|
46
47
|
pagination?: (Pag extends ServicePagination ? false | Pag : Pag) | undefined;
|
|
@@ -51,7 +52,6 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
|
|
|
51
52
|
maxLevel?: number;
|
|
52
53
|
delCheckChildren?: boolean | ((context: import("../../service/table/types").QdServiceTableDeleteCheckContext<D>) => import("../../service/table/types").QdServiceTableDeleteCheckResult | Promise<import("../../service/table/types").QdServiceTableDeleteCheckResult>) | undefined;
|
|
53
54
|
}) | undefined;
|
|
54
|
-
size?: import("tdesign-vue-next").SizeEnum | "mini" | undefined;
|
|
55
55
|
expandIcon?: boolean | ((h: typeof import("vue").h, props: import("tdesign-vue-next").ExpandArrowRenderParams<D>) => import("tdesign-vue-next").TNodeReturnValue) | undefined;
|
|
56
56
|
filterIcon?: ((h: typeof import("vue").h, props: {
|
|
57
57
|
col: import("tdesign-vue-next").PrimaryTableCol<D>;
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
.qd-form--
|
|
1
|
+
.qd-form--small[data-v-8ce97fd3] {
|
|
2
|
+
font: var(--td-font-body-medium);
|
|
3
|
+
}
|
|
4
|
+
.qd-form--small[data-v-8ce97fd3] .t-form__label--top {
|
|
5
|
+
min-height: var(--td-comp-margin-xxl);
|
|
6
|
+
line-height: var(--td-comp-margin-xxl);
|
|
7
|
+
}
|
|
8
|
+
.qd-form--descriptions[data-v-8ce97fd3] .qd-grid {
|
|
2
9
|
border-top: 1px solid var(--td-component-border);
|
|
3
10
|
border-left: 1px solid var(--td-component-border);
|
|
4
11
|
}
|
|
5
|
-
.qd-form--descriptions[data-v-
|
|
12
|
+
.qd-form--descriptions[data-v-8ce97fd3] .qd-grid-item {
|
|
6
13
|
border-right: 1px solid var(--td-component-border);
|
|
7
14
|
border-bottom: 1px solid var(--td-component-border);
|
|
8
15
|
}
|
|
9
|
-
.qd-form--descriptions[data-v-
|
|
16
|
+
.qd-form--descriptions[data-v-8ce97fd3] .t-form__item {
|
|
10
17
|
display: flex;
|
|
11
18
|
align-items: stretch;
|
|
12
19
|
height: 100%;
|
|
13
20
|
}
|
|
14
|
-
.qd-form--descriptions[data-v-
|
|
21
|
+
.qd-form--descriptions[data-v-8ce97fd3] .t-form__label {
|
|
15
22
|
display: flex;
|
|
16
23
|
flex-direction: column;
|
|
17
24
|
justify-content: center;
|
|
@@ -19,17 +26,17 @@
|
|
|
19
26
|
padding: var(--td-comp-paddingLR-m) var(--td-comp-paddingLR-l);
|
|
20
27
|
height: 100%;
|
|
21
28
|
}
|
|
22
|
-
.qd-form--descriptions[data-v-
|
|
29
|
+
.qd-form--descriptions[data-v-8ce97fd3] .t-form__label--top {
|
|
23
30
|
border-bottom: 1px solid var(--td-component-border);
|
|
24
31
|
align-items: center;
|
|
25
32
|
height: var(--qd-form-description-label-height, auto);
|
|
26
33
|
white-space: normal;
|
|
27
34
|
}
|
|
28
|
-
.qd-form--descriptions[data-v-
|
|
35
|
+
.qd-form--descriptions[data-v-8ce97fd3] .t-form__label--top + .t-form__controls > .t-form__controls-content {
|
|
29
36
|
justify-content: center;
|
|
30
37
|
text-align: center;
|
|
31
38
|
}
|
|
32
|
-
.qd-form--descriptions[data-v-
|
|
39
|
+
.qd-form--descriptions[data-v-8ce97fd3] .t-form__controls {
|
|
33
40
|
flex: 1 1 0;
|
|
34
41
|
overflow: hidden;
|
|
35
42
|
display: flex;
|
|
@@ -39,28 +46,28 @@
|
|
|
39
46
|
margin-left: 0 !important;
|
|
40
47
|
height: 100%;
|
|
41
48
|
}
|
|
42
|
-
.qd-form--descriptions[data-v-
|
|
49
|
+
.qd-form--descriptions[data-v-8ce97fd3] .qd-form-item--label-top {
|
|
43
50
|
display: grid;
|
|
44
51
|
grid-template-rows: auto minmax(min-content, auto);
|
|
45
52
|
grid-row: span 2 !important;
|
|
46
53
|
}
|
|
47
|
-
.qd-form--descriptions[data-v-
|
|
54
|
+
.qd-form--descriptions[data-v-8ce97fd3] .qd-form-item--label-top > .t-form__item {
|
|
48
55
|
display: contents;
|
|
49
56
|
}
|
|
50
|
-
.qd-form--descriptions[data-v-
|
|
57
|
+
.qd-form--descriptions[data-v-8ce97fd3] .qd-form-item--label-top .t-form__controls-content {
|
|
51
58
|
white-space: normal;
|
|
52
59
|
}
|
|
53
|
-
.qd-form--descriptions[data-v-
|
|
60
|
+
.qd-form--descriptions[data-v-8ce97fd3] .qd-form-item--empty-content .t-form__controls {
|
|
54
61
|
padding: 0 !important;
|
|
55
62
|
min-height: 0;
|
|
56
63
|
height: 0;
|
|
57
64
|
overflow: hidden;
|
|
58
65
|
}
|
|
59
|
-
.qd-form--descriptions[data-v-
|
|
66
|
+
.qd-form--descriptions[data-v-8ce97fd3] .qd-form-item:not(.qd-form-item--label-top):not(.qd-form-item--label-width-full) .t-form__label {
|
|
60
67
|
border-right: 1px solid var(--td-component-border);
|
|
61
68
|
}
|
|
62
|
-
.qd-form--descriptions-mini[data-v-
|
|
63
|
-
.qd-form--descriptions-mini[data-v-
|
|
69
|
+
.qd-form--descriptions-mini[data-v-8ce97fd3] .t-form__label,
|
|
70
|
+
.qd-form--descriptions-mini[data-v-8ce97fd3] .t-form__controls {
|
|
64
71
|
padding: var(--td-comp-paddingTB-xxs) var(--td-comp-paddingLR-xxs);
|
|
65
72
|
font: var(--td-font-body-small);
|
|
66
73
|
}
|
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import _sfc_main from "./index.vue2.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const QdForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8ce97fd3"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdForm as default
|
|
8
8
|
};
|
|
@@ -54,7 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
54
|
const props = __props;
|
|
55
55
|
const emit = __emit;
|
|
56
56
|
const { data } = useVModels(props, emit, { passive: true });
|
|
57
|
-
const { t, global: formConfig } = useConfig("form");
|
|
57
|
+
const { t, global: formConfig, size: globalSize } = useConfig("form");
|
|
58
58
|
const { global: tableConfig } = useConfig("table");
|
|
59
59
|
const { msgError } = useModal();
|
|
60
60
|
const beforeSubmitQueue = [];
|
|
@@ -103,7 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
103
103
|
onReset,
|
|
104
104
|
...formOptions
|
|
105
105
|
} = props;
|
|
106
|
-
const reSize = size ?? formConfig.value.size ?? (descriptions ? tableConfig.value.size : void 0);
|
|
106
|
+
const reSize = size ?? formConfig.value.size ?? (descriptions ? tableConfig.value.size : void 0) ?? globalSize.value;
|
|
107
107
|
const mini = reSize === "mini";
|
|
108
108
|
const componentSize = mini ? "small" : reSize;
|
|
109
109
|
const reOnReset = (context) => {
|
|
@@ -114,6 +114,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
114
114
|
descriptions,
|
|
115
115
|
externalLoad,
|
|
116
116
|
mini,
|
|
117
|
+
small: componentSize === "small" && !(descriptions && mini),
|
|
117
118
|
size: componentSize,
|
|
118
119
|
formOptions: {
|
|
119
120
|
...formOptions,
|
|
@@ -301,7 +302,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
301
302
|
reProps.value.formOptions.labelAlign ? `qd-form--label-${reProps.value.formOptions.labelAlign}` : "",
|
|
302
303
|
_ctx.$slots.footer ? "qd-form--has-footer" : "",
|
|
303
304
|
reProps.value.descriptions ? "qd-form--descriptions" : "",
|
|
304
|
-
reProps.value.descriptions && reProps.value.mini ? "qd-form--descriptions-mini" : ""
|
|
305
|
+
reProps.value.descriptions && reProps.value.mini ? "qd-form--descriptions-mini" : "",
|
|
306
|
+
reProps.value.small ? "qd-form--small" : ""
|
|
305
307
|
]
|
|
306
308
|
}, reProps.value.formOptions, {
|
|
307
309
|
data: unref(data),
|
package/dist/styles/index.css
CHANGED
|
@@ -213,6 +213,7 @@ p {
|
|
|
213
213
|
align-items: center;
|
|
214
214
|
}
|
|
215
215
|
.t-card {
|
|
216
|
+
--td-card-padding: var(--td-comp-paddingTB-l) var(--td-comp-paddingLR-l);
|
|
216
217
|
display: flex;
|
|
217
218
|
flex-direction: column;
|
|
218
219
|
}
|
|
@@ -222,14 +223,17 @@ p {
|
|
|
222
223
|
flex-direction: column;
|
|
223
224
|
}
|
|
224
225
|
.t-card__header {
|
|
225
|
-
padding: var(--td-
|
|
226
|
+
padding: var(--td-card-padding) !important;
|
|
226
227
|
}
|
|
227
228
|
.t-card__body {
|
|
228
229
|
flex: auto;
|
|
229
|
-
padding: var(--td-
|
|
230
|
+
padding: var(--td-card-padding) !important;
|
|
230
231
|
}
|
|
231
232
|
.t-card__footer {
|
|
232
|
-
padding: var(--td-
|
|
233
|
+
padding: var(--td-card-padding) !important;
|
|
234
|
+
}
|
|
235
|
+
.t-card.t-size-s {
|
|
236
|
+
--td-card-padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s);
|
|
233
237
|
}
|
|
234
238
|
.t-upload__card-name {
|
|
235
239
|
display: inline-flex;
|