qidian-vue-ui 2.7.1 → 2.7.3

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,31 +1,31 @@
1
- .qd-columns-controller__title[data-v-ec921dfa] {
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-ec921dfa] {
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-ec921dfa] {
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-ec921dfa] {
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-ec921dfa] {
16
+ .qd-columns-controller__width-input[data-v-579d4a20] {
17
17
  width: 100%;
18
18
  }
19
- .qd-columns-controller__help[data-v-ec921dfa] {
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-ec921dfa] {
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-ec921dfa] {
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-ec921dfa"]]);
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, InputNumber, Button, Tooltip } from "tdesign-vue-next";
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(InputNumber), {
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: 50,
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-5b6139bb] {
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-5b6139bb] {
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-5b6139bb] > .t-loading__parent > .t-card__body {
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-5b6139bb] > .t-loading__parent > .t-card__body > .qd-service-table .t-table__pagination {
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-5b6139bb] {
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-5b6139bb] {
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-5b6139bb] > .t-loading__parent > .t-card__body {
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-5b6139bb] > .t-loading__parent > .t-card__body > .qd-service-table {
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-5b6139bb] {
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-5b6139bb] {
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-5b6139bb] {
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-5b6139bb"]]);
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
- width: calcOperationWidth(reRowActions, data.value, operationSize, operationFontSize)
544
+ // 无可见操作时给表头保底宽度
545
+ width: operationWidth === 0 ? 50 : operationWidth
546
+ // hidden: operationWidth === 0
544
547
  };
545
548
  if (operationIdx > -1) {
546
549
  reColumns[operationIdx] = {
@@ -1,30 +1,30 @@
1
- .qd-form--small[data-v-2e92955e] {
1
+ .qd-form--small[data-v-21fd541b] {
2
2
  font: var(--td-font-body-small);
3
3
  }
4
- .qd-form--small[data-v-2e92955e] .t-form__label--top {
4
+ .qd-form--small[data-v-21fd541b] .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-2e92955e] .t-form__controls,
9
- .qd-form--small[data-v-2e92955e] .t-form__controls-content {
8
+ .qd-form--small[data-v-21fd541b] .t-form__controls,
9
+ .qd-form--small[data-v-21fd541b] .t-form__controls-content {
10
10
  min-height: var(--td-comp-margin-xxl);
11
11
  }
12
- .qd-form--descriptions[data-v-2e92955e] .qd-grid {
12
+ .qd-form--descriptions[data-v-21fd541b] .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-2e92955e] .qd-grid-item {
18
+ .qd-form--descriptions[data-v-21fd541b] .qd-grid-item {
19
19
  background-color: var(--td-bg-color-container);
20
20
  }
21
- .qd-form--descriptions[data-v-2e92955e] .t-form__item {
21
+ .qd-form--descriptions[data-v-21fd541b] .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-2e92955e] .t-form__label {
27
+ .qd-form--descriptions[data-v-21fd541b] .t-form__label {
28
28
  display: flex;
29
29
  flex-direction: column;
30
30
  justify-content: center;
@@ -33,17 +33,17 @@
33
33
  height: 100%;
34
34
  min-height: var(--td-comp-margin-xxl);
35
35
  }
36
- .qd-form--descriptions[data-v-2e92955e] .t-form__label--top {
36
+ .qd-form--descriptions[data-v-21fd541b] .t-form__label--top {
37
37
  border-bottom: 1px solid var(--td-component-border);
38
38
  align-items: center;
39
39
  height: var(--qd-form-description-label-height, auto);
40
40
  white-space: normal;
41
41
  }
42
- .qd-form--descriptions[data-v-2e92955e] .t-form__label--top + .t-form__controls > .t-form__controls-content {
42
+ .qd-form--descriptions[data-v-21fd541b] .t-form__label--top + .t-form__controls > .t-form__controls-content {
43
43
  justify-content: center;
44
44
  text-align: center;
45
45
  }
46
- .qd-form--descriptions[data-v-2e92955e] .t-form__controls {
46
+ .qd-form--descriptions[data-v-21fd541b] .t-form__controls {
47
47
  flex: 1 1 0;
48
48
  overflow: hidden;
49
49
  display: flex;
@@ -54,43 +54,44 @@
54
54
  height: 100%;
55
55
  min-height: var(--td-comp-margin-xxl);
56
56
  }
57
- .qd-form--descriptions[data-v-2e92955e] .t-form__controls-content {
57
+ .qd-form--descriptions[data-v-21fd541b] .t-form__controls-content {
58
58
  min-height: auto;
59
59
  }
60
- .qd-form--descriptions[data-v-2e92955e] .qd-form-item--label-top {
60
+ .qd-form--descriptions[data-v-21fd541b] .qd-form-item--label-top {
61
61
  display: grid;
62
62
  grid-template-rows: auto minmax(min-content, 1fr);
63
63
  grid-row: span 2 !important;
64
64
  }
65
- .qd-form--descriptions[data-v-2e92955e] .qd-form-item--label-top > .t-form__item {
65
+ .qd-form--descriptions[data-v-21fd541b] .qd-form-item--label-top > .t-form__item {
66
66
  display: contents;
67
67
  }
68
- .qd-form--descriptions[data-v-2e92955e] .qd-form-item--label-top .t-form__controls-content {
68
+ .qd-form--descriptions[data-v-21fd541b] .qd-form-item--label-top .t-form__controls-content {
69
69
  white-space: normal;
70
70
  }
71
- .qd-form--descriptions[data-v-2e92955e] .qd-form-item--empty-content .t-form__controls {
71
+ .qd-form--descriptions[data-v-21fd541b] .qd-form-item--empty-content .t-form__controls {
72
72
  padding: 0 !important;
73
73
  min-height: 0;
74
74
  height: 0;
75
75
  overflow: hidden;
76
76
  }
77
- .qd-form--descriptions[data-v-2e92955e] .t-form__item-with-extra .t-form__controls,
78
- .qd-form--descriptions[data-v-2e92955e] .t-form__item-with-help .t-form__controls {
77
+ .qd-form--descriptions[data-v-21fd541b] .t-form__item-with-extra .t-form__controls,
78
+ .qd-form--descriptions[data-v-21fd541b] .t-form__item-with-help .t-form__controls {
79
79
  height: auto;
80
80
  overflow: visible;
81
81
  }
82
- .qd-form--descriptions[data-v-2e92955e] .t-form__item-with-extra .t-input__extra,
83
- .qd-form--descriptions[data-v-2e92955e] .t-form__item-with-help .t-input__extra {
82
+ .qd-form--descriptions[data-v-21fd541b] .t-form__item-with-extra .t-input__extra,
83
+ .qd-form--descriptions[data-v-21fd541b] .t-form__item-with-help .t-input__extra {
84
84
  position: static;
85
85
  }
86
- .qd-form--descriptions[data-v-2e92955e] .qd-form-item:not(.qd-form-item--label-top):not(.qd-form-item--label-width-full) .t-form__label {
86
+ .qd-form--descriptions[data-v-21fd541b] .qd-form-item:not(.qd-form-item--label-top):not(.qd-form-item--label-width-full) .t-form__label {
87
87
  border-right: 1px solid var(--td-component-border);
88
88
  }
89
- .qd-form--descriptions[data-v-2e92955e] .qd-form-item--filler {
89
+ .qd-form--descriptions[data-v-21fd541b] .qd-form-item--filler,
90
+ .qd-form--descriptions[data-v-21fd541b] .qd-grid-item--fill {
90
91
  background-color: var(--td-bg-color-secondarycontainer);
91
92
  }
92
- .qd-form--descriptions-mini[data-v-2e92955e] .t-form__label,
93
- .qd-form--descriptions-mini[data-v-2e92955e] .t-form__controls {
93
+ .qd-form--descriptions-mini[data-v-21fd541b] .t-form__label,
94
+ .qd-form--descriptions-mini[data-v-21fd541b] .t-form__controls {
94
95
  padding: var(--td-comp-paddingTB-xxs) var(--td-comp-paddingLR-xxs);
95
96
  font: var(--td-font-body-small);
96
97
  }
@@ -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-2e92955e"]]);
5
+ const QdForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-21fd541b"]]);
6
6
  export {
7
7
  QdForm as default
8
8
  };
@@ -1,3 +1,3 @@
1
- .qd-grid-item[data-v-7df35ba7] {
1
+ .qd-grid-item[data-v-37280388] {
2
2
  min-width: 0;
3
3
  }
@@ -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 QdGridItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7df35ba7"]]);
5
+ const QdGridItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-37280388"]]);
6
6
  export {
7
7
  QdGridItem as default
8
8
  };
@@ -1,5 +1,5 @@
1
1
  import './item.css'
2
- import { defineComponent, inject, ref, computed, createElementBlock, openBlock, normalizeStyle, renderSlot } from "vue";
2
+ import { defineComponent, inject, ref, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, renderSlot } from "vue";
3
3
  import { useUICsl } from "../../utils/tools.mjs";
4
4
  import { PROVIDE_GRID_ITEM_PROPS_KEY, PROVIDE_GRID_WIDTH_KEY, DEFAULT_GRID_WIDTH, PROVIDE_GRID_COLUMNS_KEY, DEFAULT_COLUMNS, PROVIDE_GRID_REGISTER_ITEM, PROVIDE_GRID_REGISTRY_KEY, DEFAULT_COL, DEFAULT_ROW } from "./config.mjs";
5
5
  import { mergeGridValue, computeFillSpan, resolveGridSpan } from "./utils.mjs";
@@ -27,6 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
27
  col: mergeGridValue(props.col, defaultProps?.value?.col),
28
28
  row: mergeGridValue(props.row, defaultProps?.value?.row)
29
29
  }));
30
+ const isFill = computed(() => reProps.value.col === "fill");
30
31
  const fillColSpan = computed(() => {
31
32
  const index = gridItemRegistry.value.indexOf(entry);
32
33
  if (index === -1) return DEFAULT_COL;
@@ -59,11 +60,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
60
  }
60
61
  return (_ctx, _cache) => {
61
62
  return openBlock(), createElementBlock("div", {
62
- class: "qd-grid-item",
63
+ class: normalizeClass(["qd-grid-item", { "qd-grid-item--fill": isFill.value }]),
63
64
  style: normalizeStyle(itemStyle.value)
64
65
  }, [
65
66
  renderSlot(_ctx.$slots, "default", { itemStyle: itemStyle.value }, void 0, true)
66
- ], 4);
67
+ ], 6);
67
68
  };
68
69
  }
69
70
  });
@@ -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
  }
@@ -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.1",
3
+ "version": "2.7.3",
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.2.7"
140
+ "qidian-shared": "1.3.0"
141
141
  },
142
142
  "scripts": {
143
143
  "clean": "rm -rf dist",