vue-devui 1.6.10 → 1.6.12

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/vue-devui.es.js CHANGED
@@ -12564,8 +12564,7 @@ const commonProps$2 = {
12564
12564
  default: void 0
12565
12565
  },
12566
12566
  size: {
12567
- type: String,
12568
- default: "md"
12567
+ type: String
12569
12568
  },
12570
12569
  showGlowStyle: {
12571
12570
  type: Boolean,
@@ -12765,7 +12764,7 @@ function useCheckboxGroup(props, ctx2) {
12765
12764
  formItemContext == null ? void 0 : formItemContext.validate("change").catch(() => {
12766
12765
  });
12767
12766
  }, { deep: true });
12768
- const checkboxGroupSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "");
12767
+ const checkboxGroupSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "md");
12769
12768
  provide(checkboxGroupInjectionKey, {
12770
12769
  disabled: toRef(props, "disabled"),
12771
12770
  isShowTitle: toRef(props, "isShowTitle"),
@@ -17132,13 +17131,13 @@ var CategorySearch = defineComponent({
17132
17131
  onSearch
17133
17132
  } = useCategorySearch(props, ctx2);
17134
17133
  return () => {
17135
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
17134
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
17136
17135
  return createVNode("div", {
17137
17136
  "ref": rootRef,
17138
17137
  "class": containerClasses.value,
17139
17138
  "onMouseenter": () => isHover.value = true,
17140
17139
  "onMouseleave": () => isHover.value = false
17141
- }, [createVNode("div", {
17140
+ }, [(_c = (_b = (_a2 = ctx2.slots).searchIcon) == null ? void 0 : _b.call(_a2)) != null ? _c : createVNode("div", {
17142
17141
  "class": "dp-category-search-icon",
17143
17142
  "onClick": onSearch
17144
17143
  }, [createVNode(SearchIcon, null, null)]), createVNode("div", {
@@ -17153,13 +17152,13 @@ var CategorySearch = defineComponent({
17153
17152
  "ref": inputRef
17154
17153
  }, null)])]), showExtendedConfig.value && createVNode("div", {
17155
17154
  "class": "dp-category-search-extended-container"
17156
- }, [((_a2 = operationConfig.clear) == null ? void 0 : _a2.show) && createVNode(Fragment, null, [(_e = (_c = (_b = ctx2.slots).clear) == null ? void 0 : _c.call(_b)) != null ? _e : createVNode(CategorySearchClear, {
17157
- "disabled": (_d = operationConfig.clear) == null ? void 0 : _d.disabled
17158
- }, null)]), ((_f = operationConfig.save) == null ? void 0 : _f.show) && createVNode(Fragment, null, [(_j = (_h = (_g = ctx2.slots).save) == null ? void 0 : _h.call(_g)) != null ? _j : createVNode(CategorySearchSave, {
17159
- "disabled": (_i = operationConfig.save) == null ? void 0 : _i.disabled
17160
- }, null)]), ((_k = operationConfig.more) == null ? void 0 : _k.show) && createVNode(Fragment, null, [(_o = (_m = (_l = ctx2.slots).more) == null ? void 0 : _m.call(_l)) != null ? _o : createVNode(CategorySearchMore, {
17161
- "disabled": (_n = operationConfig.more) == null ? void 0 : _n.disabled
17162
- }, null)]), (_q = (_p = ctx2.slots).operation) == null ? void 0 : _q.call(_p)])]);
17155
+ }, [((_d = operationConfig.clear) == null ? void 0 : _d.show) && createVNode(Fragment, null, [(_h = (_f = (_e = ctx2.slots).clear) == null ? void 0 : _f.call(_e)) != null ? _h : createVNode(CategorySearchClear, {
17156
+ "disabled": (_g = operationConfig.clear) == null ? void 0 : _g.disabled
17157
+ }, null)]), ((_i = operationConfig.save) == null ? void 0 : _i.show) && createVNode(Fragment, null, [(_m = (_k = (_j = ctx2.slots).save) == null ? void 0 : _k.call(_j)) != null ? _m : createVNode(CategorySearchSave, {
17158
+ "disabled": (_l = operationConfig.save) == null ? void 0 : _l.disabled
17159
+ }, null)]), ((_n = operationConfig.more) == null ? void 0 : _n.show) && createVNode(Fragment, null, [(_r = (_p = (_o = ctx2.slots).more) == null ? void 0 : _p.call(_o)) != null ? _r : createVNode(CategorySearchMore, {
17160
+ "disabled": (_q = operationConfig.more) == null ? void 0 : _q.disabled
17161
+ }, null)]), (_t = (_s = ctx2.slots).operation) == null ? void 0 : _t.call(_s)])]);
17163
17162
  };
17164
17163
  }
17165
17164
  });
@@ -21274,6 +21273,9 @@ const dataGridProps = {
21274
21273
  type: Boolean,
21275
21274
  default: false
21276
21275
  },
21276
+ columnVirtualScroll: {
21277
+ type: Boolean
21278
+ },
21277
21279
  reserveCheck: {
21278
21280
  type: Boolean,
21279
21281
  default: false
@@ -21709,6 +21711,7 @@ var GridTh = defineComponent({
21709
21711
  allChecked,
21710
21712
  halfAllChecked,
21711
21713
  virtualScroll,
21714
+ columnVirtualScroll,
21712
21715
  resizable,
21713
21716
  addGridThContextToMap,
21714
21717
  toggleAllRowChecked
@@ -21730,7 +21733,7 @@ var GridTh = defineComponent({
21730
21733
  onFilterChange
21731
21734
  } = useGridThFilter(columnConfig);
21732
21735
  const classes = computed(() => {
21733
- var _a2;
21736
+ var _a2, _b;
21734
21737
  return {
21735
21738
  [ns2.e("th")]: true,
21736
21739
  [ns2.m(columnConfig.value.align)]: true,
@@ -21738,7 +21741,7 @@ var GridTh = defineComponent({
21738
21741
  [ns2.em("th", size.value)]: true,
21739
21742
  [ns2.em("th", "filter-active")]: filterActive.value,
21740
21743
  [ns2.em("th", "sort-active")]: Boolean(direction.value),
21741
- [ns2.em("th", "operable")]: columnConfig.value.filterable || columnConfig.value.sortable || !virtualScroll.value && ((_a2 = columnConfig.value.resizable) != null ? _a2 : resizable.value)
21744
+ [ns2.em("th", "operable")]: columnConfig.value.filterable || columnConfig.value.sortable || !((_a2 = columnVirtualScroll.value) != null ? _a2 : virtualScroll.value) && ((_b = columnConfig.value.resizable) != null ? _b : resizable.value)
21742
21745
  };
21743
21746
  });
21744
21747
  const {
@@ -21765,7 +21768,7 @@ var GridTh = defineComponent({
21765
21768
  }, [columnConfig.value.header])
21766
21769
  };
21767
21770
  return () => {
21768
- var _a2;
21771
+ var _a2, _b;
21769
21772
  return createVNode("div", {
21770
21773
  "ref": thRef,
21771
21774
  "class": classes.value,
@@ -21789,7 +21792,7 @@ var GridTh = defineComponent({
21789
21792
  "filterMenu": columnConfig.value.filterMenu,
21790
21793
  "setFilterStatus": setFilterStatus,
21791
21794
  "onFilterChange": onFilterChange
21792
- }, null), !virtualScroll.value && ((_a2 = columnConfig.value.resizable) != null ? _a2 : resizable.value) && createVNode("span", {
21795
+ }, null), !((_a2 = columnVirtualScroll.value) != null ? _a2 : virtualScroll.value) && ((_b = columnConfig.value.resizable) != null ? _b : resizable.value) && createVNode("span", {
21793
21796
  "class": "resize-handle"
21794
21797
  }, null)]);
21795
21798
  };
@@ -22867,7 +22870,7 @@ function useDataGridColumnDrag(bodyContentWidth, scrollRef, renderFixedLeftColum
22867
22870
  return { afterColumnDragend };
22868
22871
  }
22869
22872
  function useDataGrid(props, ctx2) {
22870
- const { data, columns, size, virtualScroll } = toRefs(props);
22873
+ const { data, columns, size, virtualScroll, columnVirtualScroll } = toRefs(props);
22871
22874
  const scrollRef = ref();
22872
22875
  const headBoxRef = ref();
22873
22876
  const bodyContentWidth = ref(0);
@@ -22939,7 +22942,7 @@ function useDataGrid(props, ctx2) {
22939
22942
  calcVirtualRowData(scrollYParams);
22940
22943
  };
22941
22944
  const initOriginColumnData = () => {
22942
- var _a2, _b, _c;
22945
+ var _a2, _b, _c, _d;
22943
22946
  let bodyTotalWidth = 0;
22944
22947
  let columnId = 0;
22945
22948
  const scrollViewWidth = ((_a2 = scrollRef.value) == null ? void 0 : _a2.clientWidth) || 0;
@@ -22972,9 +22975,9 @@ function useDataGrid(props, ctx2) {
22972
22975
  }
22973
22976
  bodyTotalWidth += itemColumn.width;
22974
22977
  }
22975
- if (!virtualScroll.value) {
22978
+ if (!((_b = columnVirtualScroll.value) != null ? _b : virtualScroll.value)) {
22976
22979
  renderColumnData.value = scrollXParams.originColumnData;
22977
- translateX.value = (_c = (_b = renderColumnData.value[0]) == null ? void 0 : _b.offsetLeft) != null ? _c : 0;
22980
+ translateX.value = (_d = (_c = renderColumnData.value[0]) == null ? void 0 : _c.offsetLeft) != null ? _d : 0;
22978
22981
  }
22979
22982
  bodyContentWidth.value = bodyTotalWidth;
22980
22983
  };
@@ -23021,8 +23024,9 @@ function useDataGrid(props, ctx2) {
23021
23024
  }
23022
23025
  let distance = 0;
23023
23026
  nextTick(() => {
23027
+ var _a2;
23024
23028
  initOriginColumnData();
23025
- if (virtualScroll.value && scrollRef.value) {
23029
+ if (((_a2 = columnVirtualScroll.value) != null ? _a2 : virtualScroll.value) && scrollRef.value) {
23026
23030
  distance = scrollRef.value.scrollLeft;
23027
23031
  initVirtualColumnData(distance, scrollRef.value.clientWidth);
23028
23032
  }
@@ -23034,11 +23038,13 @@ function useDataGrid(props, ctx2) {
23034
23038
  }
23035
23039
  }, { immediate: true });
23036
23040
  watch(virtualColumnData, (val) => {
23037
- if (virtualScroll.value) {
23041
+ var _a2;
23042
+ if ((_a2 = columnVirtualScroll.value) != null ? _a2 : virtualScroll.value) {
23038
23043
  renderColumnData.value = val;
23039
23044
  }
23040
23045
  }, { immediate: true });
23041
23046
  const onScroll2 = (e) => {
23047
+ var _a2;
23042
23048
  if (tick) {
23043
23049
  return;
23044
23050
  }
@@ -23055,7 +23061,7 @@ function useDataGrid(props, ctx2) {
23055
23061
  return;
23056
23062
  }
23057
23063
  scrollXParams.distance = scrollLeft;
23058
- virtualScroll.value && calcVirtualColumnData(scrollXParams);
23064
+ ((_a2 = columnVirtualScroll.value) != null ? _a2 : virtualScroll.value) && calcVirtualColumnData(scrollXParams);
23059
23065
  } else if (scrollTop !== scrollYParams.distance) {
23060
23066
  if (scrollYParams.originRowData.length === 0) {
23061
23067
  return;
@@ -23069,11 +23075,12 @@ function useDataGrid(props, ctx2) {
23069
23075
  (_a2 = scrollRef.value) == null ? void 0 : _a2.addEventListener("scroll", onScroll2);
23070
23076
  if (typeof window !== "undefined" && scrollRef.value) {
23071
23077
  resizeObserver = new ResizeObserver(() => {
23078
+ var _a3;
23072
23079
  if (scrollRef.value && sliceColumns.value.length) {
23073
23080
  let distance = 0;
23074
23081
  initOriginColumnData();
23075
23082
  distance = scrollRef.value.scrollLeft;
23076
- virtualScroll.value && initVirtualColumnData(distance, scrollRef.value.clientWidth);
23083
+ ((_a3 = columnVirtualScroll.value) != null ? _a3 : virtualScroll.value) && initVirtualColumnData(distance, scrollRef.value.clientWidth);
23077
23084
  }
23078
23085
  });
23079
23086
  resizeObserver.observe(scrollRef.value);
@@ -23172,6 +23179,7 @@ var DataGrid = defineComponent({
23172
23179
  size,
23173
23180
  indent,
23174
23181
  virtualScroll,
23182
+ columnVirtualScroll,
23175
23183
  resizable
23176
23184
  } = toRefs(props);
23177
23185
  const rootRef = ref();
@@ -23214,6 +23222,7 @@ var DataGrid = defineComponent({
23214
23222
  lazy,
23215
23223
  indent,
23216
23224
  virtualScroll,
23225
+ columnVirtualScroll,
23217
23226
  resizable,
23218
23227
  bodyContentWidth,
23219
23228
  bodyContentHeight,
@@ -24239,6 +24248,10 @@ const datePickerProCommonProps = {
24239
24248
  showGlowStyle: {
24240
24249
  type: Boolean,
24241
24250
  default: true
24251
+ },
24252
+ position: {
24253
+ type: Array,
24254
+ default: () => ["bottom-start", "top-start"]
24242
24255
  }
24243
24256
  };
24244
24257
  const datePickerProProps = __spreadValues({
@@ -27316,7 +27329,8 @@ var DatePickerPro = defineComponent({
27316
27329
  const app = getCurrentInstance();
27317
27330
  const t = createI18nTranslate("DDatePickerPro", app);
27318
27331
  const {
27319
- showGlowStyle
27332
+ showGlowStyle,
27333
+ position
27320
27334
  } = toRefs(props);
27321
27335
  const ns2 = useNamespace$1("date-picker-pro");
27322
27336
  const {
@@ -27337,7 +27351,6 @@ var DatePickerPro = defineComponent({
27337
27351
  onSelectedDate,
27338
27352
  handlerClearTime
27339
27353
  } = usePickerPro(props, ctx2, t);
27340
- const position = ref(["bottom-start", "top-start"]);
27341
27354
  const currentPosition = ref("bottom");
27342
27355
  const handlePositionChange = (pos) => {
27343
27356
  currentPosition.value = pos.split("-")[0] === "top" ? "top" : "bottom";
@@ -27346,6 +27359,15 @@ var DatePickerPro = defineComponent({
27346
27359
  transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%",
27347
27360
  "z-index": "var(--devui-z-index-dropdown, 1052)"
27348
27361
  }));
27362
+ const align = computed(() => {
27363
+ if (position.value.some((item) => item.includes("start"))) {
27364
+ return "start";
27365
+ }
27366
+ if (position.value.some((item) => item.includes("end"))) {
27367
+ return "end";
27368
+ }
27369
+ return void 0;
27370
+ });
27349
27371
  return () => {
27350
27372
  var _a2, _b;
27351
27373
  const vSlots = {
@@ -27387,7 +27409,7 @@ var DatePickerPro = defineComponent({
27387
27409
  "onUpdate:modelValue": ($event) => isPanelShow.value = $event,
27388
27410
  "ref": overlayRef,
27389
27411
  "origin": originRef.value,
27390
- "align": "start",
27412
+ "align": align.value,
27391
27413
  "position": position.value,
27392
27414
  "style": styles.value,
27393
27415
  "onPositionChange": handlePositionChange
@@ -27553,7 +27575,8 @@ var DRangeDatePickerPro = defineComponent({
27553
27575
  const app = getCurrentInstance();
27554
27576
  const t = createI18nTranslate("DDatePickerPro", app);
27555
27577
  const {
27556
- showGlowStyle
27578
+ showGlowStyle,
27579
+ position
27557
27580
  } = toRefs(props);
27558
27581
  const ns2 = useNamespace$1("range-date-picker-pro");
27559
27582
  const {
@@ -27578,7 +27601,6 @@ var DRangeDatePickerPro = defineComponent({
27578
27601
  handlerClearTime,
27579
27602
  onChangeRangeFocusType
27580
27603
  } = useRangePickerPro(props, ctx2);
27581
- const position = ref(["bottom-start", "top-start"]);
27582
27604
  const currentPosition = ref("bottom");
27583
27605
  const handlePositionChange = (pos) => {
27584
27606
  currentPosition.value = pos.split("-")[0] === "top" ? "top" : "bottom";
@@ -27587,6 +27609,15 @@ var DRangeDatePickerPro = defineComponent({
27587
27609
  transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%",
27588
27610
  "z-index": "var(--devui-z-index-dropdown, 1052)"
27589
27611
  }));
27612
+ const align = computed(() => {
27613
+ if (position.value.some((item) => item.includes("start"))) {
27614
+ return "start";
27615
+ }
27616
+ if (position.value.some((item) => item.includes("end"))) {
27617
+ return "end";
27618
+ }
27619
+ return void 0;
27620
+ });
27590
27621
  return () => {
27591
27622
  var _a2, _b;
27592
27623
  const vSlots = {
@@ -27648,7 +27679,7 @@ var DRangeDatePickerPro = defineComponent({
27648
27679
  "onUpdate:modelValue": ($event) => isPanelShow.value = $event,
27649
27680
  "ref": overlayRef,
27650
27681
  "origin": originRef.value,
27651
- "align": "start",
27682
+ "align": align.value,
27652
27683
  "position": position.value,
27653
27684
  "style": styles.value,
27654
27685
  "onPositionChange": handlePositionChange
@@ -40690,9 +40721,13 @@ var SubMenu = defineComponent({
40690
40721
  "class": `${ns$6.b()}-icon`
40691
40722
  }, [(_b = (_a2 = ctx2.slots) == null ? void 0 : _a2.icon) == null ? void 0 : _b.call(_a2)]), withDirectives(createVNode("span", {
40692
40723
  "class": `${subMenuClass}-title-content`
40693
- }, [props.title]), [[vShow, !isCollapsed.value]]), withDirectives(createVNode("i", {
40724
+ }, [props.title]), [[vShow, !isCollapsed.value]]), withDirectives(createVNode(SelectArrowIcon, {
40725
+ "class": [ns$6.e("arrow-icon"), {
40726
+ "is-opened": isOpen.value
40727
+ }]
40728
+ }, null), [[vShow, !isCollapsed.value && key !== "overflowContainer" && class_layer.value !== `layer_${subMenuClass}`]]), withDirectives(createVNode("i", {
40694
40729
  "class": {
40695
- "icon icon-chevron-up": class_layer.value !== `layer_${subMenuClass}`,
40730
+ "icon icon-chevron-up": false,
40696
40731
  "icon icon-chevron-right": class_layer.value === `layer_${subMenuClass}`,
40697
40732
  "is-opened": isOpen.value
40698
40733
  }
@@ -42364,7 +42399,7 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
42364
42399
  return label.toString().toLocaleLowerCase().includes(filterQuery.value.toLocaleLowerCase().trim());
42365
42400
  }).length;
42366
42401
  if (isLoading.value) {
42367
- return props.loadingText || t("loadingText");
42402
+ return "";
42368
42403
  }
42369
42404
  if (isSupportFilter.value && filterQuery.value && injectOptionsArray.value.length > 0 && visibleOptionsCount === 0) {
42370
42405
  return props.noMatchText || t("noMatchText");
@@ -42856,6 +42891,9 @@ function useSelectFunction(props, selectRef) {
42856
42891
  var select = "";
42857
42892
  var Select = defineComponent({
42858
42893
  name: "DSelect",
42894
+ directives: {
42895
+ dLoading: LoadingDirective
42896
+ },
42859
42897
  props: selectProps,
42860
42898
  emits: ["toggle-change", "value-change", "update:modelValue", "focus", "blur", "remove-tag", "clear", "input-change"],
42861
42899
  setup(props, ctx2) {
@@ -42985,7 +43023,7 @@ var Select = defineComponent({
42985
43023
  }, {
42986
43024
  default: () => {
42987
43025
  var _a2, _b, _c, _d;
42988
- return [createVNode("div", {
43026
+ return [withDirectives(createVNode("div", {
42989
43027
  "class": dropdownCls,
42990
43028
  "style": {
42991
43029
  width: `${dropdownWidth.value}`
@@ -43013,9 +43051,9 @@ var Select = defineComponent({
43013
43051
  "label": item.name,
43014
43052
  "disabled": isDisabled(item)
43015
43053
  }, null) : item.name || item.value]
43016
- }))]), [[vShow, !isLoading.value]]), isShowEmptyText.value && createVNode("div", null, [((_c = ctx2.slots) == null ? void 0 : _c.empty) && ctx2.slots.empty(), !((_d = ctx2.slots) == null ? void 0 : _d.empty) && createVNode("p", {
43054
+ }))]), [[vShow, !isLoading.value]]), (isLoading.value || isShowEmptyText.value) && createVNode("div", null, [((_c = ctx2.slots) == null ? void 0 : _c.empty) && ctx2.slots.empty(), !((_d = ctx2.slots) == null ? void 0 : _d.empty) && createVNode("p", {
43017
43055
  "class": dropdownEmptyCls
43018
- }, [emptyText.value])])])];
43056
+ }, [emptyText.value])])]), [[resolveDirective("dLoading"), isLoading.value]])];
43019
43057
  }
43020
43058
  }), [[vShow, isOpen.value]])]
43021
43059
  })]
@@ -47711,7 +47749,7 @@ function useTable(props, tableWidth) {
47711
47749
  maxHeight: props.maxHeight,
47712
47750
  maxWidth: props.maxWidth,
47713
47751
  height: props.tableHeight,
47714
- width: tableWidth.value ? `${tableWidth.value}px` : props.tableWidth
47752
+ width: props.tableWidth
47715
47753
  }));
47716
47754
  return { classes, styles };
47717
47755
  }
@@ -49245,7 +49283,7 @@ var Table = defineComponent({
49245
49283
  const {
49246
49284
  classes,
49247
49285
  styles
49248
- } = useTable(props, tableWidth);
49286
+ } = useTable(props);
49249
49287
  const {
49250
49288
  onTableScroll
49251
49289
  } = useHorizontalScroll(table2);
@@ -54332,7 +54370,7 @@ const installs = [
54332
54370
  VirtualListInstall
54333
54371
  ];
54334
54372
  var vueDevui = {
54335
- version: "1.6.10",
54373
+ version: "1.6.12",
54336
54374
  install(app) {
54337
54375
  installs.forEach((p) => app.use(p));
54338
54376
  }