qidian-vue-ui 2.8.7 → 2.8.9
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/form/index.css +24 -25
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/form/index.vue.mjs +1 -1
- package/dist/components/form/index.vue2.mjs +4 -3
- package/dist/components/form/item.css +9 -6
- package/dist/components/form/item.vue.mjs +1 -1
- package/dist/components/form/item.vue2.mjs +6 -1
- package/dist/components/form/types.d.ts +1 -1
- package/dist/styles/index.css +1 -0
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
.qd-form--small[data-v-
|
|
1
|
+
.qd-form--small[data-v-13cb7428] {
|
|
2
2
|
font: var(--td-font-body-small);
|
|
3
3
|
}
|
|
4
|
-
.qd-form--small[data-v-
|
|
4
|
+
.qd-form--small[data-v-13cb7428] .t-form__label--top {
|
|
5
5
|
min-height: var(--td-comp-margin-xxl);
|
|
6
6
|
line-height: var(--td-comp-margin-xxl);
|
|
7
7
|
}
|
|
8
|
-
.qd-form--small[data-v-
|
|
9
|
-
.qd-form--small[data-v-
|
|
8
|
+
.qd-form--small[data-v-13cb7428] .t-form__controls,
|
|
9
|
+
.qd-form--small[data-v-13cb7428] .t-form__controls-content {
|
|
10
10
|
min-height: var(--td-comp-margin-xxl);
|
|
11
11
|
}
|
|
12
|
-
.qd-form--descriptions[data-v-
|
|
12
|
+
.qd-form--descriptions[data-v-13cb7428] .qd-grid {
|
|
13
13
|
border: 1px solid var(--td-component-border);
|
|
14
14
|
background-color: var(--td-component-border);
|
|
15
15
|
gap: 1px !important;
|
|
16
16
|
overflow: hidden;
|
|
17
17
|
}
|
|
18
|
-
.qd-form--descriptions[data-v-
|
|
18
|
+
.qd-form--descriptions[data-v-13cb7428] .qd-grid-item {
|
|
19
19
|
background-color: var(--td-bg-color-container);
|
|
20
20
|
}
|
|
21
|
-
.qd-form--descriptions[data-v-
|
|
21
|
+
.qd-form--descriptions[data-v-13cb7428] .t-form__item {
|
|
22
22
|
display: flex;
|
|
23
23
|
align-items: stretch;
|
|
24
24
|
height: 100%;
|
|
25
25
|
margin-bottom: 0 !important;
|
|
26
26
|
}
|
|
27
|
-
.qd-form--descriptions[data-v-
|
|
27
|
+
.qd-form--descriptions[data-v-13cb7428] .t-form__label {
|
|
28
28
|
display: flex;
|
|
29
29
|
flex-direction: column;
|
|
30
30
|
justify-content: center;
|
|
@@ -33,60 +33,59 @@
|
|
|
33
33
|
height: 100%;
|
|
34
34
|
min-height: var(--td-comp-margin-xxl);
|
|
35
35
|
}
|
|
36
|
-
.qd-form--descriptions[data-v-
|
|
36
|
+
.qd-form--descriptions[data-v-13cb7428] .t-form__label--top {
|
|
37
37
|
border-bottom: 1px solid var(--td-component-border);
|
|
38
38
|
height: var(--qd-form-description-label-height, auto);
|
|
39
39
|
white-space: normal;
|
|
40
40
|
}
|
|
41
|
-
.qd-form--descriptions[data-v-
|
|
41
|
+
.qd-form--descriptions[data-v-13cb7428] .t-form__controls {
|
|
42
42
|
flex: 1 1 0;
|
|
43
43
|
overflow: hidden;
|
|
44
44
|
display: flex;
|
|
45
45
|
flex-direction: column;
|
|
46
|
-
justify-content: flex-start;
|
|
47
46
|
padding: var(--td-comp-paddingLR-m) var(--td-comp-paddingLR-l);
|
|
48
47
|
margin-left: 0 !important;
|
|
49
48
|
height: 100%;
|
|
50
49
|
min-height: var(--td-comp-margin-xxl);
|
|
51
50
|
}
|
|
52
|
-
.qd-form--descriptions[data-v-
|
|
51
|
+
.qd-form--descriptions[data-v-13cb7428] .t-form__controls-content {
|
|
53
52
|
min-height: auto;
|
|
54
53
|
}
|
|
55
|
-
.qd-form--descriptions[data-v-
|
|
54
|
+
.qd-form--descriptions[data-v-13cb7428] .qd-form-item--label-top {
|
|
56
55
|
display: grid;
|
|
57
56
|
grid-template-rows: auto minmax(min-content, 1fr);
|
|
58
57
|
grid-row: span 2 !important;
|
|
59
58
|
}
|
|
60
|
-
.qd-form--descriptions[data-v-
|
|
59
|
+
.qd-form--descriptions[data-v-13cb7428] .qd-form-item--label-top > .t-form__item {
|
|
61
60
|
display: contents;
|
|
62
61
|
}
|
|
63
|
-
.qd-form--descriptions[data-v-
|
|
62
|
+
.qd-form--descriptions[data-v-13cb7428] .qd-form-item--label-top .t-form__controls-content {
|
|
64
63
|
white-space: normal;
|
|
65
64
|
}
|
|
66
|
-
.qd-form--descriptions[data-v-
|
|
65
|
+
.qd-form--descriptions[data-v-13cb7428] .qd-form-item--empty-content .t-form__controls {
|
|
67
66
|
padding: 0 !important;
|
|
68
67
|
min-height: 0;
|
|
69
68
|
height: 0;
|
|
70
69
|
overflow: hidden;
|
|
71
70
|
}
|
|
72
|
-
.qd-form--descriptions[data-v-
|
|
73
|
-
.qd-form--descriptions[data-v-
|
|
71
|
+
.qd-form--descriptions[data-v-13cb7428] .t-form__item-with-extra .t-form__controls,
|
|
72
|
+
.qd-form--descriptions[data-v-13cb7428] .t-form__item-with-help .t-form__controls {
|
|
74
73
|
height: auto;
|
|
75
74
|
overflow: visible;
|
|
76
75
|
}
|
|
77
|
-
.qd-form--descriptions[data-v-
|
|
78
|
-
.qd-form--descriptions[data-v-
|
|
76
|
+
.qd-form--descriptions[data-v-13cb7428] .t-form__item-with-extra .t-input__extra,
|
|
77
|
+
.qd-form--descriptions[data-v-13cb7428] .t-form__item-with-help .t-input__extra {
|
|
79
78
|
position: static;
|
|
80
79
|
}
|
|
81
|
-
.qd-form--descriptions[data-v-
|
|
80
|
+
.qd-form--descriptions[data-v-13cb7428] .qd-form-item:not(.qd-form-item--label-top):not(.qd-form-item--label-width-full) .t-form__label {
|
|
82
81
|
border-right: 1px solid var(--td-component-border);
|
|
83
82
|
}
|
|
84
|
-
.qd-form--descriptions[data-v-
|
|
85
|
-
.qd-form--descriptions[data-v-
|
|
83
|
+
.qd-form--descriptions[data-v-13cb7428] .qd-form-item--filler,
|
|
84
|
+
.qd-form--descriptions[data-v-13cb7428] .qd-grid-item--fill {
|
|
86
85
|
background-color: var(--td-bg-color-secondarycontainer);
|
|
87
86
|
}
|
|
88
|
-
.qd-form--descriptions-mini[data-v-
|
|
89
|
-
.qd-form--descriptions-mini[data-v-
|
|
87
|
+
.qd-form--descriptions-mini[data-v-13cb7428] .t-form__label,
|
|
88
|
+
.qd-form--descriptions-mini[data-v-13cb7428] .t-form__controls {
|
|
90
89
|
padding: var(--td-comp-paddingTB-xxs) var(--td-comp-paddingLR-xxs);
|
|
91
90
|
font: var(--td-font-body-small);
|
|
92
91
|
}
|
|
@@ -2,4 +2,4 @@ export { PROVIDE_FORM_ADD_AFTER_SUBMIT_QUEUE, PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUE
|
|
|
2
2
|
export { default as QdForm } from './index.vue';
|
|
3
3
|
export { default as QdFormItem } from './item.vue';
|
|
4
4
|
export { qdFormGrid, qdFormGutter } from './props';
|
|
5
|
-
export type { QdFormBeforeSubmitQueueItem, QdFormBeforeSubmitQueueResult,
|
|
5
|
+
export type { QdFormBeforeSubmitQueueItem, QdFormBeforeSubmitQueueResult, QdFormInstanceFunctions, QdFormItemProps, QdFormProps, QdFormSubmitContext } from './types';
|
|
@@ -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-13cb7428"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdForm as default
|
|
8
8
|
};
|
|
@@ -143,7 +143,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
143
143
|
small: componentSize === "small" && !(descriptions && mini),
|
|
144
144
|
itemSize,
|
|
145
145
|
labelAlignClass: !formOptions.labelAlign && descriptions ? "left" : formOptions.labelAlign ?? "top",
|
|
146
|
-
contentAlign: formOptions.contentAlign,
|
|
146
|
+
contentAlign: formOptions.contentAlign ?? (formOptions.labelAlign === "top" ? "left" : formOptions.labelAlign === "top-center" ? "center" : "left-center"),
|
|
147
147
|
formOptions: {
|
|
148
148
|
...formOptions,
|
|
149
149
|
size: componentSize,
|
|
@@ -393,11 +393,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
393
393
|
"crud-mode": __props.crudMode,
|
|
394
394
|
context: unref(data),
|
|
395
395
|
"default-clearable": __props.defaultClearable,
|
|
396
|
-
"label-align": reProps.value.formItems?.[node.index].labelAlign ?? reProps.value.labelAlignClass
|
|
396
|
+
"label-align": reProps.value.formItems?.[node.index].labelAlign ?? reProps.value.labelAlignClass,
|
|
397
|
+
"content-align": reProps.value.formItems?.[node.index].contentAlign ?? reProps.value.contentAlign
|
|
397
398
|
}, { ref_for: true }, reProps.value.formItems?.[node.index], {
|
|
398
399
|
"grid-index": node.index,
|
|
399
400
|
size: reProps.value.formItems?.[node.index].size ?? reProps.value.itemSize
|
|
400
|
-
}), null, 16, ["crud-mode", "context", "default-clearable", "label-align", "grid-index", "size"])) : (openBlock(), createBlock(unref(QdGridItem), {
|
|
401
|
+
}), null, 16, ["crud-mode", "context", "default-clearable", "label-align", "content-align", "grid-index", "size"])) : (openBlock(), createBlock(unref(QdGridItem), {
|
|
401
402
|
key: 1,
|
|
402
403
|
class: "qd-form-item--filler",
|
|
403
404
|
col: node.span,
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
.qd-form-item--content-center[data-v-
|
|
1
|
+
.qd-form-item--content-center[data-v-f071ba7b] .t-form__controls {
|
|
2
2
|
text-align: center;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
}
|
|
5
|
-
.qd-form-item--content-center[data-v-
|
|
5
|
+
.qd-form-item--content-center[data-v-f071ba7b] .t-form__controls-content {
|
|
6
6
|
text-align: center;
|
|
7
7
|
justify-content: center;
|
|
8
8
|
}
|
|
9
|
-
.qd-form-item--content-center-top[data-v-
|
|
9
|
+
.qd-form-item--content-center-top[data-v-f071ba7b] .t-form__controls-content {
|
|
10
10
|
text-align: center;
|
|
11
11
|
justify-content: center;
|
|
12
12
|
}
|
|
13
|
-
.qd-form-item--
|
|
13
|
+
.qd-form-item--content-left-center[data-v-f071ba7b] .t-form__controls {
|
|
14
|
+
justify-content: center;
|
|
15
|
+
}
|
|
16
|
+
.qd-form-item--label-top-center[data-v-f071ba7b] .t-form__label {
|
|
14
17
|
text-align: center;
|
|
15
18
|
align-items: center;
|
|
16
19
|
}
|
|
17
|
-
.qd-form-item[data-v-
|
|
20
|
+
.qd-form-item[data-v-f071ba7b] > .t-form__item > .t-form__controls > .t-form__controls-content > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
|
|
18
21
|
width: 100%;
|
|
19
22
|
}
|
|
20
|
-
.qd-form-item__component[data-v-
|
|
23
|
+
.qd-form-item__component[data-v-f071ba7b]:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
|
|
21
24
|
width: 100%;
|
|
22
25
|
}
|
|
@@ -2,7 +2,7 @@ import './item.css'
|
|
|
2
2
|
import _sfc_main from "./item.vue2.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const QdFormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdFormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f071ba7b"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdFormItem as default
|
|
8
8
|
};
|
|
@@ -57,6 +57,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
57
|
const effectiveContentAlign = computed(
|
|
58
58
|
() => props.contentAlign ?? injectedContentAlign?.value
|
|
59
59
|
);
|
|
60
|
+
const effectiveDefaultContentAlign = computed(() => {
|
|
61
|
+
if (effectiveLabelAlign.value === "top-center") return "center";
|
|
62
|
+
if (effectiveLabelAlign.value === "top") return "left";
|
|
63
|
+
return "left-center";
|
|
64
|
+
});
|
|
60
65
|
const reIfRender = computed(() => {
|
|
61
66
|
const ifRender = props.ifRender;
|
|
62
67
|
if (isEmpty(ifRender)) return true;
|
|
@@ -124,7 +129,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
124
129
|
});
|
|
125
130
|
return {
|
|
126
131
|
labelAlignClass: effectiveLabelAlign.value === "top-center" ? "qd-form-item--label-top qd-form-item--label-top-center" : effectiveLabelAlign.value === "top" ? "qd-form-item--label-top" : "",
|
|
127
|
-
contentAlignClass: effectiveContentAlign.value === "center-top" ? "qd-form-item--content-center-top" : effectiveContentAlign.value === "center" ? "qd-form-item--content-center" : "",
|
|
132
|
+
contentAlignClass: (effectiveContentAlign.value ?? effectiveDefaultContentAlign.value) === "center-top" ? "qd-form-item--content-center-top" : (effectiveContentAlign.value ?? effectiveDefaultContentAlign.value) === "center" ? "qd-form-item--content-center" : (effectiveContentAlign.value ?? effectiveDefaultContentAlign.value) === "left-center" ? "qd-form-item--content-left-center" : "qd-form-item--content-left",
|
|
128
133
|
formItemOptions: {
|
|
129
134
|
...formItemOptions,
|
|
130
135
|
labelAlign: effectiveLabelAlign.value === "top-center" ? "top" : effectiveLabelAlign.value,
|
|
@@ -3,7 +3,7 @@ import type { AllowedComponentProps } from 'vue';
|
|
|
3
3
|
import type { QdComputeFunction, QdConfigRendererProps, QdConfigValue } from '../config-renderer';
|
|
4
4
|
import type { QdGridItemProps, QdGridProps } from '../grid';
|
|
5
5
|
export type QdFormLabelAlign = TdFormProps['labelAlign'] | 'top-center';
|
|
6
|
-
export type QdFormContentAlign = 'left' | 'center' | 'center-top';
|
|
6
|
+
export type QdFormContentAlign = 'left' | 'center' | 'center-top' | 'left-center';
|
|
7
7
|
export interface QdFormRule<FD extends Data = Data> extends Omit<FormRule, 'validator'> {
|
|
8
8
|
validator?: (val: ValueType, data: FD) => CustomValidateResolveType | Promise<CustomValidateResolveType>;
|
|
9
9
|
}
|
package/dist/styles/index.css
CHANGED