qidian-vue-ui 2.1.0 → 2.1.1
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.
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
.qd-crud-table[data-v-
|
|
1
|
+
.qd-crud-table[data-v-27ca87c9] {
|
|
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-27ca87c9] {
|
|
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-27ca87c9] > .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-27ca87c9] > .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-27ca87c9] {
|
|
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-27ca87c9] {
|
|
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-27ca87c9] > .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-27ca87c9] > .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-27ca87c9] {
|
|
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-27ca87c9] {
|
|
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-27ca87c9] {
|
|
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-27ca87c9"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdCrudTable as default
|
|
8
8
|
};
|
|
@@ -410,7 +410,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
410
410
|
passive: true
|
|
411
411
|
});
|
|
412
412
|
const {
|
|
413
|
-
t
|
|
413
|
+
t,
|
|
414
|
+
size: globalComponentSize
|
|
414
415
|
} = useConfig("crud");
|
|
415
416
|
const {
|
|
416
417
|
global: tableGlobalConfig
|
|
@@ -421,14 +422,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
421
422
|
alertWarning,
|
|
422
423
|
confirm
|
|
423
424
|
} = useModal();
|
|
424
|
-
const
|
|
425
|
+
const COMPONENT_FONT_MAP = {
|
|
425
426
|
large: 16,
|
|
426
427
|
medium: 14,
|
|
427
|
-
small:
|
|
428
|
-
mini: 12
|
|
428
|
+
small: 12
|
|
429
429
|
};
|
|
430
430
|
const SIZE_PADDING_MAP = {
|
|
431
|
-
large:
|
|
431
|
+
large: 48,
|
|
432
432
|
medium: 32,
|
|
433
433
|
small: 16,
|
|
434
434
|
mini: 12
|
|
@@ -540,13 +540,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
540
540
|
const operationLength = reRowActions.length;
|
|
541
541
|
if (operationLength) {
|
|
542
542
|
const operationSize = serviceTableOptions.size ?? tableGlobalConfig.value?.size ?? "medium";
|
|
543
|
+
const operationFontSize = COMPONENT_FONT_MAP[globalComponentSize.value ?? "medium"] ?? 14;
|
|
543
544
|
const operationIdx = reColumns.findIndex((item) => item.colKey === "operation");
|
|
544
545
|
const defaultOperation = {
|
|
545
546
|
title: t("operationText"),
|
|
546
547
|
colKey: "operation",
|
|
547
548
|
align: "center",
|
|
548
549
|
fixed: "right",
|
|
549
|
-
width: calcOperationWidth(reRowActions, data.value, operationSize)
|
|
550
|
+
width: calcOperationWidth(reRowActions, data.value, operationSize, operationFontSize)
|
|
550
551
|
};
|
|
551
552
|
if (operationIdx > -1) {
|
|
552
553
|
reColumns[operationIdx] = {
|
|
@@ -795,12 +796,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
795
796
|
}
|
|
796
797
|
return ifRender !== false;
|
|
797
798
|
}
|
|
798
|
-
function calcOperationWidth(rowActions, rows, size = "medium") {
|
|
799
|
+
function calcOperationWidth(rowActions, rows, size = "medium", fontSize = 14) {
|
|
799
800
|
const permittedActions = rowActions.filter((action) => hasPermiOr(action.permi, false));
|
|
800
801
|
if (!permittedActions.length) return 0;
|
|
801
|
-
const fontSize = SIZE_FONT_MAP[size] ?? 14;
|
|
802
802
|
const cellPadding = SIZE_PADDING_MAP[size] ?? 32;
|
|
803
|
-
const sumWidth = (actions, row) => actions.reduce((width, action) => width + getActionWidth(action, row, fontSize), 0) + (actions.length - 1) * 25 + cellPadding +
|
|
803
|
+
const sumWidth = (actions, row) => actions.reduce((width, action) => width + getActionWidth(action, row, fontSize), 0) + (actions.length - 1) * 25 + cellPadding + 8;
|
|
804
804
|
if (!rows?.length) {
|
|
805
805
|
return sumWidth(permittedActions);
|
|
806
806
|
}
|