qidian-vue-ui 1.2.102 → 1.2.103

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.
@@ -28,7 +28,6 @@ declare const __VLS_component: import("vue").DefineComponent<QdCrudSearchProps,
28
28
  disabled: boolean;
29
29
  readonly: boolean;
30
30
  grid: import("../..").QdGridItemProps;
31
- labelAlign: "left" | "right" | "top";
32
31
  labelWidth: string | number;
33
32
  preventSubmitDefault: boolean;
34
33
  resetType: "empty" | "initial";
@@ -43,6 +43,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
43
43
  statusIcon: { type: Boolean },
44
44
  submitWithWarningMessage: { type: Boolean },
45
45
  onValidate: { type: Function },
46
+ columns: {},
46
47
  gutter: {},
47
48
  grid: {}
48
49
  }, qdCrudSearchProps),
@@ -25,7 +25,6 @@ export declare const qdCrudSearchProps: {
25
25
  readonly data: () => any;
26
26
  readonly disabled: undefined;
27
27
  readonly readonly: undefined;
28
- readonly labelAlign: "top";
29
28
  readonly labelWidth: "auto";
30
29
  readonly requiredMarkPosition: "left";
31
30
  readonly resetType: "initial";
@@ -87,6 +87,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
87
87
  loadingWithData: {
88
88
  type: Boolean
89
89
  },
90
+ disableHorizontalScroll: {
91
+ type: Boolean
92
+ },
90
93
  beforeDragSort: {
91
94
  type: Function
92
95
  },
@@ -190,6 +190,7 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
190
190
  onSortChange?: ((sort: import("tdesign-vue-next").TableSort, options: import("tdesign-vue-next").SortOptions<D>) => void) | undefined;
191
191
  selectType?: "single" | "multiple" | undefined;
192
192
  headerBg?: boolean | undefined;
193
+ disableHorizontalScroll?: boolean | undefined;
193
194
  cacheKey?: string | ((params?: unknown[] | undefined) => string) | undefined;
194
195
  cacheTime?: number | undefined;
195
196
  pollingInterval?: number | import("vue").Ref<number, number> | undefined;
@@ -43,6 +43,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
43
43
  headerBg: { type: Boolean },
44
44
  tree: {},
45
45
  loadingWithData: { type: Boolean },
46
+ disableHorizontalScroll: { type: Boolean },
46
47
  beforeDragSort: { type: Function },
47
48
  defaultExpandedTreeNodes: {},
48
49
  treeExpandAndFoldIcon: {},
@@ -41,6 +41,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
41
41
  submitWithWarningMessage: { type: Boolean },
42
42
  onReset: { type: Function },
43
43
  onValidate: { type: Function },
44
+ columns: {},
44
45
  gutter: {},
45
46
  grid: {},
46
47
  visible: { type: Boolean }
@@ -34,20 +34,10 @@ export declare const qdDialogFormProps: {
34
34
  readonly autoHeight: true;
35
35
  };
36
36
  readonly gutter: () => number[];
37
- readonly grid: () => {
38
- col: {
39
- xs: number;
40
- sm: number;
41
- md: number;
42
- lg: number;
43
- xl: number;
44
- xxl: number;
45
- };
46
- };
37
+ readonly grid: () => {};
47
38
  readonly data: () => any;
48
39
  readonly disabled: undefined;
49
40
  readonly readonly: undefined;
50
- readonly labelAlign: "top";
51
41
  readonly labelWidth: "auto";
52
42
  readonly requiredMarkPosition: "left";
53
43
  readonly resetType: "initial";
@@ -1,26 +1,54 @@
1
- .qd-form--descriptions[data-v-ac7409ce] .qd-grid {
1
+ .qd-form--descriptions[data-v-7b85acc1] .qd-grid {
2
2
  border-top: 1px solid var(--td-component-border);
3
3
  border-left: 1px solid var(--td-component-border);
4
4
  }
5
- .qd-form--descriptions[data-v-ac7409ce] .qd-grid-item {
5
+ .qd-form--descriptions[data-v-7b85acc1] .qd-grid-item {
6
6
  border-right: 1px solid var(--td-component-border);
7
7
  border-bottom: 1px solid var(--td-component-border);
8
8
  }
9
- .qd-form--descriptions[data-v-ac7409ce] .t-form__item {
9
+ .qd-form--descriptions[data-v-7b85acc1] .qd-grid-item:has(.t-form__item > .t-form__label--top) {
10
+ display: grid;
11
+ grid-row: span 2 !important;
12
+ grid-template-rows: subgrid;
13
+ }
14
+ .qd-form--descriptions[data-v-7b85acc1] .t-form__item {
10
15
  display: flex;
11
16
  align-items: stretch;
12
17
  height: 100%;
13
18
  }
14
- .qd-form--descriptions[data-v-ac7409ce] .t-form__label {
19
+ .qd-form--descriptions[data-v-7b85acc1] .t-form__item:has(> .t-form__label--top) {
20
+ display: contents;
21
+ }
22
+ .qd-form--descriptions[data-v-7b85acc1] .t-form__item:has(> .t-form__label--top) .t-form__controls {
23
+ height: auto;
24
+ min-height: min-content;
25
+ }
26
+ .qd-form--descriptions[data-v-7b85acc1] .t-form__item:has(> .t-form__label--top) .t-form__controls-content {
27
+ min-height: min-content;
28
+ white-space: normal;
29
+ }
30
+ .qd-form--descriptions[data-v-7b85acc1] .t-form__label {
15
31
  display: flex;
16
32
  flex-direction: column;
17
33
  justify-content: center;
18
34
  background-color: var(--td-bg-color-secondarycontainer);
19
35
  padding: var(--td-comp-paddingLR-m) var(--td-comp-paddingLR-l);
20
36
  height: 100%;
37
+ }
38
+ .qd-form--descriptions[data-v-7b85acc1] .t-form__label:not(.t-form__label--top):not([style*='width: 100%']) {
21
39
  border-right: 1px solid var(--td-component-border);
22
40
  }
23
- .qd-form--descriptions[data-v-ac7409ce] .t-form__controls {
41
+ .qd-form--descriptions[data-v-7b85acc1] .t-form__label--top {
42
+ border-bottom: 1px solid var(--td-component-border);
43
+ align-items: center;
44
+ height: auto;
45
+ white-space: normal;
46
+ }
47
+ .qd-form--descriptions[data-v-7b85acc1] .t-form__label--top + .t-form__controls > .t-form__controls-content {
48
+ justify-content: center;
49
+ text-align: center;
50
+ }
51
+ .qd-form--descriptions[data-v-7b85acc1] .t-form__controls {
24
52
  flex: 1 1 0;
25
53
  overflow: hidden;
26
54
  display: flex;
@@ -30,3 +58,6 @@
30
58
  margin-left: 0 !important;
31
59
  height: 100%;
32
60
  }
61
+ .qd-form--descriptions[data-v-7b85acc1] .t-form__controls:has(> .t-form__controls-content:empty) {
62
+ padding: 0 !important;
63
+ }
@@ -12,16 +12,8 @@ declare const _default: <FD extends Data = Data>(__VLS_props: NonNullable<Awaite
12
12
  }) => any;
13
13
  } & {
14
14
  default?: (props: {
15
- grid: {
16
- col: {
17
- xs: number;
18
- sm: number;
19
- md: number;
20
- lg: number;
21
- xl: number;
22
- xxl: number;
23
- };
24
- } & import("..").QdGridItemProps;
15
+ columns: number | undefined;
16
+ grid: import("..").QdGridItemProps;
25
17
  gutter: number | import("tdesign-vue-next").GutterObject | (number | import("tdesign-vue-next").GutterObject)[];
26
18
  }) => any;
27
19
  } & {
@@ -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-ac7409ce"]]);
5
+ const QdForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7b85acc1"]]);
6
6
  export {
7
7
  QdForm as default
8
8
  };
@@ -42,6 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
42
  submitWithWarningMessage: { type: Boolean },
43
43
  onReset: { type: Function },
44
44
  onValidate: { type: Function },
45
+ columns: {},
45
46
  gutter: {},
46
47
  grid: {}
47
48
  }, qdFormProps),
@@ -85,6 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
85
86
  let submitResolver;
86
87
  const reProps = computed(() => {
87
88
  const {
89
+ columns,
88
90
  grid,
89
91
  gutter,
90
92
  descriptions,
@@ -105,13 +107,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
105
107
  externalLoad,
106
108
  formOptions: {
107
109
  ...formOptions,
108
- labelAlign: descriptions ? "left" : formOptions.labelAlign,
110
+ labelAlign: !formOptions.labelAlign && descriptions ? "left" : formOptions.labelAlign ?? "top",
109
111
  scrollToFirstError: submitShowErrorMessage.value === false ? "" : submitScrollToFirstError.value ?? scrollToFirstError,
110
112
  onReset: reOnReset
111
113
  },
112
114
  formItems: items,
113
115
  gridOptions: {
114
- grid: merge({}, qdFormGrid, grid),
116
+ columns,
117
+ grid: columns ? grid : merge({}, qdFormGrid, grid),
115
118
  gutter: descriptions ? 0 : gutter
116
119
  },
117
120
  onSubmit,
@@ -236,6 +239,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
236
239
  ref: "form",
237
240
  class: [
238
241
  "qd-form",
242
+ reProps.value.formOptions.labelAlign ? `qd-form--label-${reProps.value.formOptions.labelAlign}` : "",
239
243
  _ctx.$slots.footer ? "qd-form--has-footer" : "",
240
244
  reProps.value.descriptions ? "qd-form--descriptions" : ""
241
245
  ]
@@ -11,20 +11,10 @@ export declare const qdFormGrid: {
11
11
  };
12
12
  export declare const qdFormProps: {
13
13
  readonly gutter: () => number[];
14
- readonly grid: () => {
15
- col: {
16
- xs: number;
17
- sm: number;
18
- md: number;
19
- lg: number;
20
- xl: number;
21
- xxl: number;
22
- };
23
- };
14
+ readonly grid: () => {};
24
15
  readonly data: () => any;
25
16
  readonly disabled: undefined;
26
17
  readonly readonly: undefined;
27
- readonly labelAlign: "top";
28
18
  readonly labelWidth: "auto";
29
19
  readonly requiredMarkPosition: "left";
30
20
  readonly resetType: "initial";
@@ -11,11 +11,11 @@ const qdFormGrid = {
11
11
  };
12
12
  const qdFormProps = {
13
13
  gutter: () => qdFormGutter,
14
- grid: () => qdFormGrid,
14
+ grid: () => ({}),
15
15
  data: () => ({}),
16
16
  disabled: void 0,
17
17
  readonly: void 0,
18
- labelAlign: "top",
18
+ // labelAlign: 'top',
19
19
  labelWidth: "auto",
20
20
  requiredMarkPosition: "left",
21
21
  resetType: "initial",
@@ -11,5 +11,6 @@ export declare const DEFAULT_BREAKPOINTS: {
11
11
  xl: number;
12
12
  xxl: number;
13
13
  };
14
+ export declare const DEFAULT_COLUMNS = 12;
14
15
  export declare const DEFAULT_COL = 1;
15
16
  export declare const DEFAULT_ROW = 1;
@@ -14,11 +14,13 @@ const DEFAULT_BREAKPOINTS = {
14
14
  xxl: 1880
15
15
  // ≥1880px 大尺寸电脑
16
16
  };
17
+ const DEFAULT_COLUMNS = 12;
17
18
  const DEFAULT_COL = 1;
18
19
  const DEFAULT_ROW = 1;
19
20
  export {
20
21
  DEFAULT_BREAKPOINTS,
21
22
  DEFAULT_COL,
23
+ DEFAULT_COLUMNS,
22
24
  DEFAULT_GRID_WIDTH,
23
25
  DEFAULT_ROW,
24
26
  PROVIDE_GRID_ITEM_PROPS_KEY,
@@ -1,4 +1,3 @@
1
- .qd-grid[data-v-8ccab0d1] {
1
+ .qd-grid[data-v-31b0a5de] {
2
2
  display: grid;
3
- grid-template-columns: repeat(12, 1fr);
4
3
  }
@@ -9,7 +9,9 @@ declare var __VLS_1: {
9
9
  type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_1) => any;
11
11
  };
12
- declare const __VLS_component: import("vue").DefineComponent<QdGridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<QdGridProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_component: import("vue").DefineComponent<QdGridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<QdGridProps> & Readonly<{}>, {
13
+ columns: number;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
15
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
14
16
  export default _default;
15
17
  type __VLS_WithSlots<T, S> = T & {
@@ -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 QdGrid = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8ccab0d1"]]);
5
+ const QdGrid = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-31b0a5de"]]);
6
6
  export {
7
7
  QdGrid as default
8
8
  };
@@ -1,13 +1,14 @@
1
1
  import './index.css'
2
2
  import { defineComponent, computed, provide, useTemplateRef, ref, withDirectives, createElementBlock, openBlock, normalizeStyle, renderSlot, unref } from "vue";
3
3
  import { resizeDirective, isEmpty } from "qidian-shared";
4
- import { PROVIDE_GRID_ITEM_PROPS_KEY, DEFAULT_GRID_WIDTH, PROVIDE_GRID_WIDTH_KEY, DEFAULT_BREAKPOINTS } from "./config.mjs";
4
+ import { DEFAULT_COLUMNS, PROVIDE_GRID_ITEM_PROPS_KEY, DEFAULT_GRID_WIDTH, PROVIDE_GRID_WIDTH_KEY, DEFAULT_BREAKPOINTS } from "./config.mjs";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  ...{
7
7
  name: "QdGrid"
8
8
  },
9
9
  __name: "index",
10
10
  props: {
11
+ columns: { default: DEFAULT_COLUMNS },
11
12
  gutter: {},
12
13
  grid: {}
13
14
  },
@@ -41,12 +42,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
41
42
  gap: `${verticalGutter}px ${horizontalGutter}px`
42
43
  };
43
44
  });
45
+ const gridStyle = computed(() => ({
46
+ ...gutterStyle.value,
47
+ gridTemplateColumns: `repeat(${props.columns}, minmax(0, 1fr))`
48
+ }));
44
49
  return (_ctx, _cache) => {
45
50
  return withDirectives((openBlock(), createElementBlock("div", {
46
51
  ref_key: "grid",
47
52
  ref: grid,
48
53
  class: "qd-grid",
49
- style: normalizeStyle(gutterStyle.value)
54
+ style: normalizeStyle(gridStyle.value)
50
55
  }, [
51
56
  renderSlot(_ctx.$slots, "default", { gutterStyle: gutterStyle.value }, void 0, true)
52
57
  ], 4)), [
@@ -3,6 +3,7 @@ export type GridGutterValue = number | (GutterObject & {
3
3
  span?: number;
4
4
  });
5
5
  export interface QdGridProps {
6
+ columns?: number;
6
7
  gutter?: TdRowProps['gutter'];
7
8
  grid?: QdGridItemProps;
8
9
  }
@@ -1,19 +1,22 @@
1
- .qd-service-table[data-v-46eba1ae] {
1
+ .qd-service-table[data-v-6e1b49c2] {
2
2
  height: 100%;
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  }
6
- .qd-service-table[data-v-46eba1ae] > .t-table__content {
6
+ .qd-service-table[data-v-6e1b49c2] > .t-table__content {
7
7
  flex: 1;
8
8
  }
9
- .qd-service-table[data-v-46eba1ae] .t-table__tree-col:not(:has(.t-table__tree-op-icon)) {
9
+ .qd-service-table[data-v-6e1b49c2] .t-table__tree-col:not(:has(.t-table__tree-op-icon)) {
10
10
  margin-left: calc(var(--td-font-size-body-large) + var(--td-comp-margin-s));
11
11
  }
12
- .qd-service-table[data-v-46eba1ae] .t-table__tree-leaf-node .t-table__tree-op-icon:empty {
12
+ .qd-service-table[data-v-6e1b49c2] .t-table__tree-leaf-node .t-table__tree-op-icon:empty {
13
13
  width: calc(var(--td-font-size-body-large) + var(--td-comp-margin-s));
14
14
  }
15
- .qd-service-table--ps-x-fixed[data-v-46eba1ae] .ps__rail-x {
15
+ .qd-service-table--ps-x-fixed[data-v-6e1b49c2] .ps__rail-x {
16
16
  position: fixed;
17
- left: var(--v783492ca) !important;
18
- bottom: var(--c8df1cb2) !important;
17
+ left: var(--v3506f85c) !important;
18
+ bottom: var(--v08176f86) !important;
19
+ }
20
+ .qd-service-table--disable-horizontal-scroll[data-v-6e1b49c2] colgroup > col {
21
+ width: auto !important;
19
22
  }
@@ -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 QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-46eba1ae"]]);
5
+ const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6e1b49c2"]]);
6
6
  export {
7
7
  QdServiceTable as default
8
8
  };
@@ -25,6 +25,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  loadingWithData: {
26
26
  type: Boolean
27
27
  },
28
+ disableHorizontalScroll: {
29
+ type: Boolean
30
+ },
28
31
  beforeDragSort: {
29
32
  type: Function
30
33
  },
@@ -303,8 +306,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
303
306
  emit: __emit
304
307
  }) {
305
308
  useCssVars((_ctx) => ({
306
- "v783492ca": tableContentLeft.value,
307
- "c8df1cb2": outsideBottom.value
309
+ "v3506f85c": tableContentLeft.value,
310
+ "v08176f86": outsideBottom.value
308
311
  }));
309
312
  const props = __props;
310
313
  const emit = __emit;
@@ -836,7 +839,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
836
839
  return (_ctx, _cache) => {
837
840
  return withDirectives((openBlock(), createBlock(resolveDynamicComponent(reProps.value.tableOptions.tree ? unref(EnhancedTable) : unref(Table)), mergeProps({
838
841
  ref: "table",
839
- class: ["qd-service-table", __props.headerBg ? "" : "t-table--header-bg-inherit", unref(isOutsideTableContent) ? "" : "qd-service-table--inside-table-content", tableContentVisible.value && tableHeaderHalfVisible.value && !tableContentFullVisible.value ? "qd-service-table--ps-x-fixed" : ""],
842
+ class: ["qd-service-table", __props.headerBg ? "" : "t-table--header-bg-inherit", unref(isOutsideTableContent) ? "" : "qd-service-table--inside-table-content", tableContentVisible.value && tableHeaderHalfVisible.value && !tableContentFullVisible.value ? "qd-service-table--ps-x-fixed" : "", __props.disableHorizontalScroll ? "qd-service-table--disable-horizontal-scroll" : ""],
840
843
  "selected-row-keys": unref(selectedRowKeys),
841
844
  "onUpdate:selectedRowKeys": _cache[0] || (_cache[0] = ($event) => isRef(selectedRowKeys) ? selectedRowKeys.value = $event : null),
842
845
  "active-row-keys": unref(activeRowKeys),
@@ -25,6 +25,7 @@ export interface QdServiceTableProps<D extends TableRowData = TableRowData, R =
25
25
  delCheckChildren?: boolean | ((context: QdServiceTableDeleteCheckContext<D>) => QdServiceTableDeleteCheckResult | Promise<QdServiceTableDeleteCheckResult>);
26
26
  };
27
27
  loadingWithData?: boolean;
28
+ disableHorizontalScroll?: boolean;
28
29
  }
29
30
  export type QdServiceTableCol<D extends TableRowData = TableRowData> = NonNullable<QdServiceTableProps<D>['columns']>[number];
30
31
  export type QdServiceTableInstanceFunctions<D extends TableRowData = TableRowData, R = unknown, P = ServicePageParams, TP = P, Pag extends ServicePagination = ServicePagination, HasTree extends boolean = boolean> = (HasTree extends true ? EnhancedTableInstanceFunctions<D> : PrimaryTableInstanceFunctions<D> & {
@@ -70,6 +70,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
70
70
  loadingWithData: {
71
71
  type: Boolean
72
72
  },
73
+ disableHorizontalScroll: {
74
+ type: Boolean
75
+ },
73
76
  beforeDragSort: {
74
77
  type: Function
75
78
  },
@@ -60,6 +60,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
60
  loadingWithData: {
61
61
  type: Boolean
62
62
  },
63
+ disableHorizontalScroll: {
64
+ type: Boolean
65
+ },
63
66
  beforeDragSort: {
64
67
  type: Function
65
68
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qidian-vue-ui",
3
- "version": "1.2.102",
3
+ "version": "1.2.103",
4
4
  "description": "基于 TDesign 的 QiDian Vue UI 组件库",
5
5
  "author": "qidian",
6
6
  "license": "MIT",