qidian-vue-ui 2.7.2 → 2.7.4
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/columns-controller/index.css +8 -8
- package/dist/components/columns-controller/index.vue.mjs +1 -1
- package/dist/components/columns-controller/index.vue2.mjs +5 -3
- 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 +4 -1
- package/dist/components/dict/select/index.vue.mjs +2 -1
- package/dist/components/service-select/index.css +1 -1
- package/dist/components/service-select/index.vue.mjs +1 -1
- package/dist/components/service-select/index.vue2.mjs +2 -1
- package/dist/hooks/useDict/index.mjs +1 -1
- package/dist/hooks/useDict/types.d.ts +1 -0
- package/dist/styles/index.css +4 -0
- package/package.json +2 -2
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
.qd-columns-controller__title[data-v-
|
|
1
|
+
.qd-columns-controller__title[data-v-579d4a20] {
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
}
|
|
5
|
-
.qd-columns-controller__drag[data-v-
|
|
5
|
+
.qd-columns-controller__drag[data-v-579d4a20] {
|
|
6
6
|
cursor: move;
|
|
7
7
|
margin-right: var(--td-comp-margin-m);
|
|
8
8
|
}
|
|
9
|
-
.qd-columns-controller__ghost[data-v-
|
|
9
|
+
.qd-columns-controller__ghost[data-v-579d4a20] {
|
|
10
10
|
opacity: 0.5;
|
|
11
11
|
background: var(--td-brand-color-light);
|
|
12
12
|
}
|
|
13
|
-
.qd-columns-controller__chosen[data-v-
|
|
13
|
+
.qd-columns-controller__chosen[data-v-579d4a20] {
|
|
14
14
|
background: var(--td-brand-color-light-hover);
|
|
15
15
|
}
|
|
16
|
-
.qd-columns-controller__width-input[data-v-
|
|
16
|
+
.qd-columns-controller__width-input[data-v-579d4a20] {
|
|
17
17
|
width: 100%;
|
|
18
18
|
}
|
|
19
|
-
.qd-columns-controller__help[data-v-
|
|
19
|
+
.qd-columns-controller__help[data-v-579d4a20] {
|
|
20
20
|
font-size: var(--td-font-size-title-large);
|
|
21
21
|
}
|
|
22
|
-
.qd-columns-controller__footer[data-v-
|
|
22
|
+
.qd-columns-controller__footer[data-v-579d4a20] {
|
|
23
23
|
width: 100%;
|
|
24
24
|
display: flex;
|
|
25
25
|
justify-content: space-between;
|
|
26
26
|
align-items: center;
|
|
27
27
|
}
|
|
28
|
-
.qd-columns-controller__footer-actions[data-v-
|
|
28
|
+
.qd-columns-controller__footer-actions[data-v-579d4a20] {
|
|
29
29
|
flex: 1 1 0;
|
|
30
30
|
overflow: hidden;
|
|
31
31
|
}
|
|
@@ -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 QdColumnsController = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdColumnsController = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-579d4a20"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdColumnsController as default
|
|
8
8
|
};
|
|
@@ -4,13 +4,14 @@ import { useVModels } from "../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5
|
|
|
4
4
|
import { createExposeProxy, isEmpty } from "qidian-shared";
|
|
5
5
|
import Sortable from "../../node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.mjs";
|
|
6
6
|
import { MoveIcon, HelpCircleIcon } from "tdesign-icons-vue-next";
|
|
7
|
-
import { Space, Link, Divider,
|
|
7
|
+
import { Space, Link, Divider, Button, Tooltip } from "tdesign-vue-next";
|
|
8
8
|
import { useConfig } from "../config-provider/useConfig.mjs";
|
|
9
9
|
import { COMPONENT_FONT_MAP, compensateWidth, calcOperationLinksWidth } from "../service/table/columnsCompensation.mjs";
|
|
10
10
|
import { qdColumnsControllerProps } from "./props.mjs";
|
|
11
11
|
import _sfc_main$1 from "../dialog/index.vue.mjs";
|
|
12
12
|
/* empty css */
|
|
13
13
|
import QdServiceTable from "../service/table/index.vue.mjs";
|
|
14
|
+
import _sfc_main$2 from "../input-number/index.vue.mjs";
|
|
14
15
|
import cloneDeep from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/cloneDeep.mjs";
|
|
15
16
|
const _hoisted_1 = {
|
|
16
17
|
class: "qd-columns-controller__title"
|
|
@@ -249,12 +250,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
249
250
|
}, 8, ["data-col-key"]), createElementVNode("span", _hoisted_2, toDisplayString(row.title), 1)])]),
|
|
250
251
|
width: withCtx(({
|
|
251
252
|
row
|
|
252
|
-
}) => [createVNode(unref(
|
|
253
|
+
}) => [createVNode(unref(_sfc_main$2), {
|
|
253
254
|
class: "qd-columns-controller__width-input",
|
|
254
255
|
modelValue: row.width,
|
|
255
256
|
"onUpdate:modelValue": ($event) => row.width = $event,
|
|
256
|
-
min:
|
|
257
|
+
min: 0,
|
|
257
258
|
step: 10,
|
|
259
|
+
theme: "row",
|
|
258
260
|
suffix: "px",
|
|
259
261
|
placeholder: "auto"
|
|
260
262
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])]),
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
.qd-crud-table[data-v-
|
|
1
|
+
.qd-crud-table[data-v-d112be81] {
|
|
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-d112be81] {
|
|
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-d112be81] > .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-d112be81] > .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-d112be81] {
|
|
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-d112be81] {
|
|
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-d112be81] > .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-d112be81] > .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-d112be81] {
|
|
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-d112be81] {
|
|
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-d112be81] {
|
|
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-d112be81"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdCrudTable as default
|
|
8
8
|
};
|
|
@@ -535,12 +535,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
535
535
|
const operationSize = serviceTableOptions.size ?? tableGlobalConfig.value?.size ?? "small";
|
|
536
536
|
const operationFontSize = COMPONENT_FONT_MAP[globalComponentSize.value ?? "medium"] ?? COMPONENT_FONT_MAP.medium;
|
|
537
537
|
const operationIdx = reColumns.findIndex((item) => item.colKey === "operation");
|
|
538
|
+
const operationWidth = calcOperationWidth(reRowActions, data.value, operationSize, operationFontSize);
|
|
538
539
|
const defaultOperation = {
|
|
539
540
|
title: t("operationText"),
|
|
540
541
|
colKey: "operation",
|
|
541
542
|
align: "center",
|
|
542
543
|
fixed: "right",
|
|
543
|
-
|
|
544
|
+
// 无可见操作时给表头保底宽度
|
|
545
|
+
width: operationWidth === 0 ? 50 : operationWidth
|
|
546
|
+
// hidden: operationWidth === 0
|
|
544
547
|
};
|
|
545
548
|
if (operationIdx > -1) {
|
|
546
549
|
reColumns[operationIdx] = {
|
|
@@ -239,7 +239,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
239
239
|
}
|
|
240
240
|
function setDefaultSelectFirst(data) {
|
|
241
241
|
if (!hasAutoSelected && reProps.value.defaultSelectFirst && isEmpty(reModelValue.value) && data.length) {
|
|
242
|
-
const firstOption = data
|
|
242
|
+
const firstOption = data.find((option) => !option.disabled);
|
|
243
|
+
if (!firstOption) return;
|
|
243
244
|
const { multiple, valueType } = reProps.value.selectOptions;
|
|
244
245
|
const firstValue = valueType === "object" ? firstOption : firstOption.value;
|
|
245
246
|
const value = multiple ? [firstValue] : firstValue;
|
|
@@ -4,7 +4,7 @@ import _sfc_main from "./index.vue2.mjs";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
7
|
-
const QdServiceSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
7
|
+
const QdServiceSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-893f4675"]]);
|
|
8
8
|
export {
|
|
9
9
|
QdServiceSelect as default
|
|
10
10
|
};
|
|
@@ -404,7 +404,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
404
404
|
}
|
|
405
405
|
function setDefaultSelectFirst(data2) {
|
|
406
406
|
if (!hasAutoSelected && reProps.value.defaultSelectFirst && isEmpty(reModelValue.value) && data2.length) {
|
|
407
|
-
const firstOption = data2
|
|
407
|
+
const firstOption = data2.find((option) => !option.disabled);
|
|
408
|
+
if (!firstOption) return;
|
|
408
409
|
const { keys, multiple, valueType } = reProps.value.selectOptions;
|
|
409
410
|
const firstValue = valueType === "object" ? firstOption : firstOption[keys?.value || qdServiceSelectKeys.value];
|
|
410
411
|
reModelValue.value = multiple ? [firstValue] : firstValue;
|
|
@@ -156,7 +156,7 @@ async function useDictBatch(data, fieldDictMap, options) {
|
|
|
156
156
|
for (const [field, dictType] of Object.entries(fieldDictMap)) {
|
|
157
157
|
const opts = optionsMap[dictType];
|
|
158
158
|
if (!opts || isEmpty(data[field])) continue;
|
|
159
|
-
data[field] = findEnum(opts, data[field], find)?.[valueKey];
|
|
159
|
+
data[field] = findEnum(opts, data[field], { key: find })?.[valueKey];
|
|
160
160
|
}
|
|
161
161
|
return data;
|
|
162
162
|
}
|
package/dist/styles/index.css
CHANGED
|
@@ -213,6 +213,10 @@ p {
|
|
|
213
213
|
position: initial;
|
|
214
214
|
bottom: auto;
|
|
215
215
|
}
|
|
216
|
+
.t-table__body > tr > td > .t-form__item .t-form__controls > .t-input__extra {
|
|
217
|
+
text-overflow: clip;
|
|
218
|
+
white-space: normal;
|
|
219
|
+
}
|
|
216
220
|
.t-table__content tbody > tr:last-child:not(.t-table__empty-row) > td,
|
|
217
221
|
.t-table__content tfoot > tr:last-child > td {
|
|
218
222
|
border-bottom: 1px solid var(--td-component-border);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qidian-vue-ui",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.4",
|
|
4
4
|
"description": "基于 TDesign 的 QiDian Vue UI 组件库",
|
|
5
5
|
"author": "qidian",
|
|
6
6
|
"license": "MIT",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"vue-codemirror": "^6.1.1",
|
|
138
138
|
"vue-echarts": "^8.0.1",
|
|
139
139
|
"vue-stream-markdown": "1.0.1-beta.1",
|
|
140
|
-
"qidian-shared": "1.
|
|
140
|
+
"qidian-shared": "1.3.0"
|
|
141
141
|
},
|
|
142
142
|
"scripts": {
|
|
143
143
|
"clean": "rm -rf dist",
|