qidian-vue-ui 2.0.41 → 2.0.42
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/crud/table/index.css +11 -11
- package/dist/components/crud/table/index.vue.mjs +1 -1
- package/dist/components/crud/table/index.vue2.mjs +11 -2
- package/dist/components/form/index.css +18 -18
- package/dist/components/form/index.vue.mjs +1 -1
- package/dist/components/form/index.vue2.mjs +7 -4
- package/package.json +1 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
.qd-crud-table[data-v-
|
|
1
|
+
.qd-crud-table[data-v-336e27b9] {
|
|
2
2
|
width: 100%;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
}
|
|
6
|
-
.qd-crud-table > .qd-crud-search:not(.qd-crud-search--hide) + .qd-crud-table__body[data-v-
|
|
6
|
+
.qd-crud-table > .qd-crud-search:not(.qd-crud-search--hide) + .qd-crud-table__body[data-v-336e27b9] {
|
|
7
7
|
margin-top: var(--td-comp-margin-l);
|
|
8
8
|
}
|
|
9
|
-
.qd-crud-table__body[data-v-
|
|
9
|
+
.qd-crud-table__body[data-v-336e27b9] > .t-loading__parent > .t-card__body {
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
}
|
|
13
|
-
.qd-crud-table__body[data-v-
|
|
13
|
+
.qd-crud-table__body[data-v-336e27b9] > .t-loading__parent > .t-card__body > .qd-service-table .t-table__pagination {
|
|
14
14
|
padding-bottom: 0;
|
|
15
15
|
}
|
|
16
|
-
.qd-crud-table--fit-parent-height[data-v-
|
|
16
|
+
.qd-crud-table--fit-parent-height[data-v-336e27b9] {
|
|
17
17
|
height: 100%;
|
|
18
18
|
}
|
|
19
|
-
.qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-
|
|
19
|
+
.qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-336e27b9] {
|
|
20
20
|
flex: auto;
|
|
21
21
|
}
|
|
22
|
-
.qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-
|
|
22
|
+
.qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-336e27b9] > .t-loading__parent > .t-card__body {
|
|
23
23
|
height: 100%;
|
|
24
24
|
min-height: 443px;
|
|
25
25
|
}
|
|
26
|
-
.qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-
|
|
26
|
+
.qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-336e27b9] > .t-loading__parent > .t-card__body > .qd-service-table {
|
|
27
27
|
flex: 1 1 0;
|
|
28
28
|
overflow: hidden;
|
|
29
29
|
}
|
|
30
|
-
.qd-crud-table__toolbar[data-v-
|
|
30
|
+
.qd-crud-table__toolbar[data-v-336e27b9] {
|
|
31
31
|
display: flex;
|
|
32
32
|
justify-content: space-between;
|
|
33
33
|
}
|
|
34
|
-
.qd-crud-table__toolbar--has-space-item + .qd-service-table[data-v-
|
|
34
|
+
.qd-crud-table__toolbar--has-space-item + .qd-service-table[data-v-336e27b9] {
|
|
35
35
|
margin-top: var(--td-comp-margin-l);
|
|
36
36
|
}
|
|
37
|
-
.qd-crud-table__toolbar-separator[data-v-
|
|
37
|
+
.qd-crud-table__toolbar-separator[data-v-336e27b9] {
|
|
38
38
|
display: inline-block;
|
|
39
39
|
padding-left: var(--td-comp-paddingLR-s);
|
|
40
40
|
}
|
|
@@ -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 QdCrudTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdCrudTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-336e27b9"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdCrudTable as default
|
|
8
8
|
};
|
|
@@ -402,6 +402,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
402
402
|
const dialogFormMap = reactive({});
|
|
403
403
|
const ifRenderMap = reactive({});
|
|
404
404
|
const tableRef = useTemplateRef("table");
|
|
405
|
+
const shouldValidateInitialSearch = computed(() => !!props.service && props.manual !== true && !!props.search?.items?.length);
|
|
405
406
|
const reProps = computed(() => {
|
|
406
407
|
const {
|
|
407
408
|
data: data2,
|
|
@@ -546,6 +547,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
546
547
|
},
|
|
547
548
|
serviceTableOptions: {
|
|
548
549
|
...serviceTableOptions,
|
|
550
|
+
manual: shouldValidateInitialSearch.value || serviceTableOptions.manual,
|
|
549
551
|
maxHeight: fitParentHeight ? serviceTableOptions.maxHeight : void 0,
|
|
550
552
|
selectType: void 0,
|
|
551
553
|
transformParams
|
|
@@ -625,11 +627,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
625
627
|
function handleSearch() {
|
|
626
628
|
searchMode = "changeCurrent";
|
|
627
629
|
}
|
|
628
|
-
async function validateSearch() {
|
|
630
|
+
async function validateSearch(showErrorMessage = true) {
|
|
629
631
|
if (!reProps.value.searchOptions?.items?.length) return true;
|
|
630
|
-
const result = await searchRef.value?.validate(
|
|
632
|
+
const result = await searchRef.value?.validate({
|
|
633
|
+
showErrorMessage
|
|
634
|
+
});
|
|
631
635
|
return result === true;
|
|
632
636
|
}
|
|
637
|
+
async function loadInitialData() {
|
|
638
|
+
if (!shouldValidateInitialSearch.value || !await validateSearch(false)) return;
|
|
639
|
+
tableRef.value?.refresh();
|
|
640
|
+
}
|
|
633
641
|
function runAfterSearchValidate(callback) {
|
|
634
642
|
if (!reProps.value.searchOptions?.items?.length) {
|
|
635
643
|
callback();
|
|
@@ -1063,6 +1071,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1063
1071
|
immediate: true
|
|
1064
1072
|
});
|
|
1065
1073
|
onMounted(() => {
|
|
1074
|
+
void loadInitialData();
|
|
1066
1075
|
syncToolbarHasSpaceItem();
|
|
1067
1076
|
const toolbarEl = toolbarRef.value;
|
|
1068
1077
|
if (!toolbarEl) return;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
.qd-form--small[data-v-
|
|
1
|
+
.qd-form--small[data-v-10c3d73e] {
|
|
2
2
|
font: var(--td-font-body-small);
|
|
3
3
|
}
|
|
4
|
-
.qd-form--small[data-v-
|
|
4
|
+
.qd-form--small[data-v-10c3d73e] .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-10c3d73e] .t-form__controls,
|
|
9
|
+
.qd-form--small[data-v-10c3d73e] .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-10c3d73e] .qd-grid {
|
|
13
13
|
border-top: 1px solid var(--td-component-border);
|
|
14
14
|
border-left: 1px solid var(--td-component-border);
|
|
15
15
|
}
|
|
16
|
-
.qd-form--descriptions[data-v-
|
|
16
|
+
.qd-form--descriptions[data-v-10c3d73e] .qd-grid-item {
|
|
17
17
|
border-right: 1px solid var(--td-component-border);
|
|
18
18
|
border-bottom: 1px solid var(--td-component-border);
|
|
19
19
|
}
|
|
20
|
-
.qd-form--descriptions[data-v-
|
|
20
|
+
.qd-form--descriptions[data-v-10c3d73e] .t-form__item {
|
|
21
21
|
display: flex;
|
|
22
22
|
align-items: stretch;
|
|
23
23
|
height: 100%;
|
|
24
24
|
}
|
|
25
|
-
.qd-form--descriptions[data-v-
|
|
25
|
+
.qd-form--descriptions[data-v-10c3d73e] .t-form__label {
|
|
26
26
|
display: flex;
|
|
27
27
|
flex-direction: column;
|
|
28
28
|
justify-content: center;
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
padding: var(--td-comp-paddingLR-m) var(--td-comp-paddingLR-l);
|
|
31
31
|
height: 100%;
|
|
32
32
|
}
|
|
33
|
-
.qd-form--descriptions[data-v-
|
|
33
|
+
.qd-form--descriptions[data-v-10c3d73e] .t-form__label--top {
|
|
34
34
|
border-bottom: 1px solid var(--td-component-border);
|
|
35
35
|
align-items: center;
|
|
36
36
|
height: var(--qd-form-description-label-height, auto);
|
|
37
37
|
white-space: normal;
|
|
38
38
|
}
|
|
39
|
-
.qd-form--descriptions[data-v-
|
|
39
|
+
.qd-form--descriptions[data-v-10c3d73e] .t-form__label--top + .t-form__controls > .t-form__controls-content {
|
|
40
40
|
justify-content: center;
|
|
41
41
|
text-align: center;
|
|
42
42
|
}
|
|
43
|
-
.qd-form--descriptions[data-v-
|
|
43
|
+
.qd-form--descriptions[data-v-10c3d73e] .t-form__controls {
|
|
44
44
|
flex: 1 1 0;
|
|
45
45
|
overflow: hidden;
|
|
46
46
|
display: flex;
|
|
@@ -50,28 +50,28 @@
|
|
|
50
50
|
margin-left: 0 !important;
|
|
51
51
|
height: 100%;
|
|
52
52
|
}
|
|
53
|
-
.qd-form--descriptions[data-v-
|
|
53
|
+
.qd-form--descriptions[data-v-10c3d73e] .qd-form-item--label-top {
|
|
54
54
|
display: grid;
|
|
55
55
|
grid-template-rows: auto minmax(min-content, auto);
|
|
56
56
|
grid-row: span 2 !important;
|
|
57
57
|
}
|
|
58
|
-
.qd-form--descriptions[data-v-
|
|
58
|
+
.qd-form--descriptions[data-v-10c3d73e] .qd-form-item--label-top > .t-form__item {
|
|
59
59
|
display: contents;
|
|
60
60
|
}
|
|
61
|
-
.qd-form--descriptions[data-v-
|
|
61
|
+
.qd-form--descriptions[data-v-10c3d73e] .qd-form-item--label-top .t-form__controls-content {
|
|
62
62
|
white-space: normal;
|
|
63
63
|
}
|
|
64
|
-
.qd-form--descriptions[data-v-
|
|
64
|
+
.qd-form--descriptions[data-v-10c3d73e] .qd-form-item--empty-content .t-form__controls {
|
|
65
65
|
padding: 0 !important;
|
|
66
66
|
min-height: 0;
|
|
67
67
|
height: 0;
|
|
68
68
|
overflow: hidden;
|
|
69
69
|
}
|
|
70
|
-
.qd-form--descriptions[data-v-
|
|
70
|
+
.qd-form--descriptions[data-v-10c3d73e] .qd-form-item:not(.qd-form-item--label-top):not(.qd-form-item--label-width-full) .t-form__label {
|
|
71
71
|
border-right: 1px solid var(--td-component-border);
|
|
72
72
|
}
|
|
73
|
-
.qd-form--descriptions-mini[data-v-
|
|
74
|
-
.qd-form--descriptions-mini[data-v-
|
|
73
|
+
.qd-form--descriptions-mini[data-v-10c3d73e] .t-form__label,
|
|
74
|
+
.qd-form--descriptions-mini[data-v-10c3d73e] .t-form__controls {
|
|
75
75
|
padding: var(--td-comp-paddingTB-xxs) var(--td-comp-paddingLR-xxs);
|
|
76
76
|
font: var(--td-font-body-small);
|
|
77
77
|
}
|
|
@@ -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-10c3d73e"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdForm as default
|
|
8
8
|
};
|
|
@@ -103,9 +103,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
103
103
|
onReset,
|
|
104
104
|
...formOptions
|
|
105
105
|
} = props;
|
|
106
|
-
const
|
|
106
|
+
const configuredSize = size ?? formConfig.value.size ?? (descriptions ? tableConfig.value.size : void 0);
|
|
107
|
+
const reSize = configuredSize ?? globalSize.value;
|
|
107
108
|
const mini = reSize === "mini";
|
|
108
109
|
const componentSize = mini ? "small" : reSize;
|
|
110
|
+
const itemSize = configuredSize === "mini" ? "small" : configuredSize;
|
|
109
111
|
const reOnReset = (context) => {
|
|
110
112
|
resetQueue.forEach((item) => item());
|
|
111
113
|
onReset?.(context);
|
|
@@ -115,7 +117,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
115
117
|
externalLoad,
|
|
116
118
|
mini,
|
|
117
119
|
small: componentSize === "small" && !(descriptions && mini),
|
|
118
|
-
|
|
120
|
+
itemSize,
|
|
119
121
|
formOptions: {
|
|
120
122
|
...formOptions,
|
|
121
123
|
size: componentSize,
|
|
@@ -320,9 +322,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
320
322
|
"crud-mode": __props.crudMode,
|
|
321
323
|
context: unref(data),
|
|
322
324
|
"default-clearable": __props.defaultClearable,
|
|
323
|
-
size: reProps.value.size,
|
|
324
325
|
"label-align": item.labelAlign ?? reProps.value.formOptions.labelAlign
|
|
325
|
-
}, { ref_for: true }, item
|
|
326
|
+
}, { ref_for: true }, item, {
|
|
327
|
+
size: item.size ?? reProps.value.itemSize
|
|
328
|
+
}), null, 16, ["crud-mode", "context", "default-clearable", "label-align", "size"]);
|
|
326
329
|
}), 128))
|
|
327
330
|
]),
|
|
328
331
|
_: 1
|