@dt-frames/ui 1.0.26 → 1.0.28

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.
Files changed (33) hide show
  1. package/es/components/curd/src/components/dialog.d.ts +4 -7
  2. package/es/components/curd/src/types/curd.type.d.ts +2 -2
  3. package/es/components/forms/src/components/formIcon.d.ts +23 -23
  4. package/es/components/forms/src/components/formInputUseDialog.d.ts +18 -18
  5. package/es/components/forms/src/types/form.type.d.ts +1 -0
  6. package/es/components/icons/src/pick-icon.d.ts +5 -5
  7. package/es/components/source/src/hooks/useDownload.d.ts +2 -1
  8. package/es/components/source/src/types/source.type.d.ts +2 -1
  9. package/es/components/table/index.less +4 -0
  10. package/es/components/table/src/components/TableActions.d.ts +1 -0
  11. package/es/components/table/src/components/setting/Column.d.ts +1 -0
  12. package/es/components/table/src/components/setting/Download.d.ts +1 -0
  13. package/es/components/table/src/components/setting/Fullscreen.d.ts +1 -0
  14. package/es/components/table/src/components/setting/Size.d.ts +1 -0
  15. package/es/components/table/src/hooks/useColumns.d.ts +4 -2
  16. package/es/components/table/src/hooks/useLoading.d.ts +12 -1
  17. package/es/components/table/src/hooks/useTableInstance.d.ts +1 -0
  18. package/es/components/table/src/hooks/useTableScroll.d.ts +2 -2
  19. package/es/components/table/src/index.d.ts +96 -7
  20. package/es/components/table/src/types/table.type.d.ts +2 -1
  21. package/es/components/upload/src/props.d.ts +4 -0
  22. package/es/components/upload/src/upload.d.ts +109 -7
  23. package/es/index.js +95 -52
  24. package/es/theme/sider/components/basic-menu/basic-menu-item.d.ts +1 -0
  25. package/es/theme/sider/components/basic-menu/basic-menu.d.ts +2 -0
  26. package/es/theme/sider/components/basic-menu/basic-sub-menu-item.d.ts +2 -0
  27. package/es/theme/sider/components/basic-menu/menu-item-content.d.ts +1 -0
  28. package/es/theme/sider/components/drag-bar.d.ts +1 -1
  29. package/es/theme/sider/index.d.ts +1 -1
  30. package/es/theme/sider/index.less +2 -2
  31. package/es/theme/theme.less +6 -0
  32. package/es/theme/transition.less +6 -0
  33. package/package.json +2 -2
package/es/index.js CHANGED
@@ -2,7 +2,7 @@ import { defineComponent, resolveComponent, openBlock, createBlock, computed, un
2
2
  import { isString, isArray as isArray$1, isObject, isFunction, error, useTimeoutFn, useAttrs, useSlots, dispatchResize, BAR_MAP, off, renderThumbStyle, on, useAppStore, addResizeListener, removeResizeListener, windowResizeFn, isNumber, isBoolean, isNull, DtCache, CacheKey, deepMerge, http, getDynamicProps, getDictValueByCode, formatNumber, isVnode, getPopupContainer, isNullAndUnDef, useMessage, isEmpty, useTheme, useMenu, useHeader, useGo, Pages, localeList, changeLocale, Theme, MenuMode, MenuType, useThemeStore, ContentMode, useMultipleTab, copyText, MenuSplitTye, isUrl, openWindow, RouteReuseStore, menuList2Map, useApp } from "@dt-frames/core";
3
3
  import { InputSearch, Tooltip, Modal as Modal$1, RadioGroup, RadioButton, InputGroup, Input, Button, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Form, FormItem, Row, Popover, Spin, Dropdown, Menu, MenuItem, CheckboxGroup, Table, Upload, Image, MenuDivider, Tree, Empty, BackTop, Breadcrumb, Avatar, Drawer, SubMenu, LayoutHeader, LayoutSider, Tabs, TabPane, LayoutFooter, LayoutContent, ConfigProvider, Layout } from "ant-design-vue";
4
4
  import { isEqual, omit, cloneDeep, upperFirst, set, uniqBy, difference, get, trim } from "lodash-es";
5
- import { tryOnUnmounted, isFunction as isFunction$1, useFullscreen, useDebounceFn, useThrottleFn } from "@vueuse/core";
5
+ import { tryOnUnmounted, isFunction as isFunction$1, useDebounceFn, useFullscreen, useThrottleFn } from "@vueuse/core";
6
6
  import dayjs from "dayjs";
7
7
  import Sortablejs from "sortablejs";
8
8
  import * as xlsx from "xlsx";
@@ -2034,22 +2034,21 @@ function useModalOut() {
2034
2034
  (_a = getInstance()) == null ? void 0 : _a.setModalProps({
2035
2035
  visible: true
2036
2036
  });
2037
- const { data, afterClose } = params || {};
2037
+ const { data = null, afterClose } = params || {};
2038
2038
  const id = unref(uid);
2039
2039
  cbTransfer[unref(uid)] = (rsp) => {
2040
2040
  if (afterClose && isFunction(afterClose)) {
2041
2041
  afterClose(rsp);
2042
2042
  }
2043
2043
  };
2044
- if (!data)
2045
- return;
2044
+ let dataToRaw = isObject(data) ? { ...toRaw(data) } : data;
2046
2045
  if (openOnSet) {
2047
- dataTransfer[id] = { ...toRaw(data) };
2046
+ dataTransfer[id] = dataToRaw;
2048
2047
  return;
2049
2048
  }
2050
- const equal = isEqual(toRaw(dataTransfer[id]), toRaw(data));
2049
+ const equal = isEqual(toRaw(dataTransfer[id]), dataToRaw);
2051
2050
  if (!equal) {
2052
- dataTransfer[id] = toRaw(data);
2051
+ dataTransfer[id] = dataToRaw;
2053
2052
  }
2054
2053
  },
2055
2054
  closeModal: () => {
@@ -3188,19 +3187,12 @@ var _sfc_main$Q = defineComponent({
3188
3187
  disabled = dynamicDisabled(unref(getValues));
3189
3188
  return disabled;
3190
3189
  });
3191
- const {
3192
- enterToSearch = appConf.ui.form.enterToSearch,
3193
- onSearch,
3194
- mode
3195
- } = props.formProps;
3196
3190
  const itemProps = {
3197
3191
  allowClear: appConf.ui.form.allowClear,
3198
3192
  getPopupContainer: (trigger) => trigger.parentNode,
3199
3193
  size: size || appConf.ui.form.size,
3200
3194
  ...unref(getComponentProps),
3201
- disabled: unref(getDisable),
3202
- onPressEnter: mode === "search" && enterToSearch ? onSearch : () => {
3203
- }
3195
+ disabled: unref(getDisable)
3204
3196
  };
3205
3197
  if (!itemProps.disabled && component !== "RangePicker") {
3206
3198
  itemProps.placeholder = ((_a = unref(getComponentProps)) == null ? void 0 : _a.placeholder) || createPlaceholder(component);
@@ -3478,7 +3470,6 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
3478
3470
  default: withCtx(() => [
3479
3471
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.buttonList, (button) => {
3480
3472
  return openBlock(), createElementBlock(Fragment, null, [
3481
- createTextVNode(toDisplayString(button.auth) + " ", 1),
3482
3473
  (button.show === void 0 ? true : button.show) ? withDirectives((openBlock(), createBlock(_component_Button, {
3483
3474
  key: 0,
3484
3475
  type: button.type,
@@ -3972,7 +3963,7 @@ const _sfc_main$O = defineComponent({
3972
3963
  }
3973
3964
  }
3974
3965
  function handleEnterPress() {
3975
- if (unref(getProps).mode === "search") {
3966
+ if (appConf.ui.form.enterToSearch && unref(getProps).mode === "search") {
3976
3967
  handleMethod(SEARCH_BTNS.filter((it) => it.name === SEARCH_BTN_NAME)[0]);
3977
3968
  }
3978
3969
  }
@@ -4784,7 +4775,7 @@ function usePagination(props) {
4784
4775
  pageSize: defaultPageSize,
4785
4776
  size: size === "small" ? "small" : "default",
4786
4777
  defaultPageSize,
4787
- showTotal: (total, range) => `\u603B\u5171${Math.ceil(total / unref(props).pagination.pageSize)}\u9875`,
4778
+ showTotal: (total, range) => `\u603B\u5171${total}\u6761`,
4788
4779
  showSizeChanger: true,
4789
4780
  pageSizeOptions,
4790
4781
  showQuickJumper: true,
@@ -5347,9 +5338,13 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
5347
5338
  },
5348
5339
  setup(__props) {
5349
5340
  const props = __props;
5341
+ const actionBtns = ref([]);
5350
5342
  watch(() => props.btns, (btns) => {
5351
- btns.map((it) => {
5352
- it.ifShow = isBoolean(it.ifShow) ? it.ifShow : isFunction(it.ifShow) ? it.ifShow(props.record) : true;
5343
+ actionBtns.value = [...btns].map((it) => {
5344
+ return {
5345
+ ...it,
5346
+ ifShow: isBoolean(it.ifShow) ? it.ifShow : isFunction(it.ifShow) ? it.ifShow(props.record) : true
5347
+ };
5353
5348
  });
5354
5349
  }, {
5355
5350
  immediate: true
@@ -5368,6 +5363,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
5368
5363
  }
5369
5364
  return (_ctx, _cache) => {
5370
5365
  const _directive_icon = resolveDirective("icon");
5366
+ const _directive_auth = resolveDirective("auth");
5371
5367
  return props.expand ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.btns, (item) => {
5372
5368
  return openBlock(), createElementBlock("span", _hoisted_1$s, [
5373
5369
  item.ifShow ? (openBlock(), createBlock(unref(Tooltip), {
@@ -5396,8 +5392,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
5396
5392
  overlay: withCtx(() => [
5397
5393
  createVNode(unref(Menu), { class: "dt-action-select" }, {
5398
5394
  default: withCtx(() => [
5399
- (openBlock(true), createElementBlock(Fragment, null, renderList(props.btns, (item) => {
5400
- return openBlock(), createElementBlock(Fragment, null, [
5395
+ (openBlock(true), createElementBlock(Fragment, null, renderList(actionBtns.value, (item) => {
5396
+ return withDirectives((openBlock(), createElementBlock("span", null, [
5401
5397
  item.ifShow ? (openBlock(), createBlock(unref(MenuItem), {
5402
5398
  key: 0,
5403
5399
  onClick: ($event) => handleAction(item)
@@ -5412,7 +5408,9 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
5412
5408
  ]),
5413
5409
  _: 2
5414
5410
  }, 1032, ["onClick"])) : createCommentVNode("", true)
5415
- ], 64);
5411
+ ])), [
5412
+ [_directive_auth, item.auth]
5413
+ ]);
5416
5414
  }), 256))
5417
5415
  ]),
5418
5416
  _: 1
@@ -5548,22 +5546,18 @@ function handleActionColumn(propsRef, columns) {
5548
5546
  });
5549
5547
  }
5550
5548
  }
5551
- function useColumns(propsRef, getPaginationRef) {
5549
+ function useColumns(propsRef, getPaginationRef, tableElRef) {
5552
5550
  const columnsRef = ref(unref(propsRef).columns);
5553
5551
  let cacheColumns = unref(propsRef).columns;
5554
5552
  const getColumnsRef = computed(() => {
5555
5553
  const columns = cloneDeep(unref(columnsRef));
5556
5554
  if (!columns)
5557
5555
  return [];
5558
- const { ellipsis, resizable, minWidth = 50, maxWidth = 700 } = unref(propsRef);
5556
+ const { ellipsis } = unref(propsRef);
5559
5557
  columns.forEach((it, index) => {
5558
+ var _a;
5559
+ it.class = `${(_a = it.class) != null ? _a : ""} __column`;
5560
5560
  const { slots } = it;
5561
- it.width = it.width || (index === columns.length - 1 ? 119.9 : 120);
5562
- if (Reflect.has(it, "resizable") ? !!it.resizable : resizable) {
5563
- it.resizable = true;
5564
- it.minWidth = it.minWidth || minWidth;
5565
- it.maxWidth = it.maxWidth || maxWidth;
5566
- }
5567
5561
  if (it.sorter) {
5568
5562
  it.sorter = {
5569
5563
  multiple: Number(it.sorter)
@@ -5589,10 +5583,41 @@ function useColumns(propsRef, getPaginationRef) {
5589
5583
  const ifShow = column.ifShow;
5590
5584
  return isBoolean(ifShow) ? ifShow : isFunction(ifShow) ? ifShow(column) : true;
5591
5585
  }
5586
+ function addResize() {
5587
+ const { resizable, minWidth = 50, maxWidth = 700 } = unref(propsRef);
5588
+ useDebounceFn(() => {
5589
+ var _a, _b;
5590
+ let els = (_a = unref(tableElRef)) == null ? void 0 : _a.$el.querySelectorAll(".__column");
5591
+ let allWidth = 0;
5592
+ for (let i = 0; i < els.length; i++) {
5593
+ allWidth += (_b = els[i].offsetWidth) != null ? _b : 0;
5594
+ }
5595
+ let columnAllWidth = 0, noWidthNum = 0;
5596
+ columnsRef.value.forEach((it) => {
5597
+ if (it.ifShow) {
5598
+ if (it.width) {
5599
+ columnAllWidth += parseInt(`${it.width}`);
5600
+ } else {
5601
+ noWidthNum++;
5602
+ }
5603
+ }
5604
+ });
5605
+ let avgWidth = (allWidth - columnAllWidth) / noWidthNum;
5606
+ columnsRef.value.forEach((it) => {
5607
+ it.width = it.width || avgWidth - 1;
5608
+ if (Reflect.has(it, "resizable") ? !!it.resizable : resizable) {
5609
+ it.resizable = true;
5610
+ it.minWidth = it.minWidth || minWidth;
5611
+ it.maxWidth = it.maxWidth || maxWidth;
5612
+ }
5613
+ });
5614
+ }, 100)();
5615
+ }
5592
5616
  watch(() => unref(propsRef).columns, (columns) => {
5593
5617
  var _a;
5594
5618
  columnsRef.value = columns;
5595
5619
  cacheColumns = (_a = columns.filter((it) => !it.flag)) != null ? _a : [];
5620
+ nextTick(() => addResize());
5596
5621
  });
5597
5622
  function getColumns(opt) {
5598
5623
  const { ignoreIndex, ignoreAction, sort } = opt || {};
@@ -5662,7 +5687,7 @@ const _hoisted_1$r = /* @__PURE__ */ createElementVNode("span", null, "\u5217\u6
5662
5687
  const _hoisted_2$i = /* @__PURE__ */ createTextVNode(" \u5217\u5C55\u793A ");
5663
5688
  const _hoisted_3$b = /* @__PURE__ */ createTextVNode(" \u5E8F\u5217\u53F7 ");
5664
5689
  const _hoisted_4$8 = /* @__PURE__ */ createTextVNode(" \u590D\u9009\u6846 ");
5665
- const _hoisted_5$5 = /* @__PURE__ */ createTextVNode("\u91CD\u7F6E");
5690
+ const _hoisted_5$4 = /* @__PURE__ */ createTextVNode("\u91CD\u7F6E");
5666
5691
  const _hoisted_6$2 = {
5667
5692
  size: 16,
5668
5693
  className: "drag-icon"
@@ -5900,7 +5925,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5900
5925
  onClick: reset
5901
5926
  }, {
5902
5927
  default: withCtx(() => [
5903
- _hoisted_5$5
5928
+ _hoisted_5$4
5904
5929
  ]),
5905
5930
  _: 1
5906
5931
  })
@@ -6381,7 +6406,7 @@ const _hoisted_4$5 = {
6381
6406
  key: 0,
6382
6407
  class: "dt-table-header-actions__right"
6383
6408
  };
6384
- const _hoisted_5$4 = {
6409
+ const _hoisted_5$3 = {
6385
6410
  key: 0,
6386
6411
  style: { "margin": "5px" }
6387
6412
  };
@@ -6401,7 +6426,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
6401
6426
  }, null, 8, ["setting", "onColumnsChange"])
6402
6427
  ])) : createCommentVNode("", true)
6403
6428
  ]),
6404
- _ctx.$slots.headerTop ? (openBlock(), createElementBlock("div", _hoisted_5$4, [
6429
+ _ctx.$slots.headerTop ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
6405
6430
  renderSlot(_ctx.$slots, "headerTop")
6406
6431
  ])) : createCommentVNode("", true)
6407
6432
  ]);
@@ -6438,9 +6463,10 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef) {
6438
6463
  watch(() => propsRef.value.dataSource, (v) => {
6439
6464
  debounceRedoHeight();
6440
6465
  }, {
6466
+ deep: true,
6441
6467
  flush: "post"
6442
6468
  });
6443
- windowResizeFn(calcTableHeight, 280);
6469
+ windowResizeFn(calcTableHeight, 10);
6444
6470
  function redoHeight() {
6445
6471
  nextTick(() => {
6446
6472
  calcTableHeight();
@@ -6690,7 +6716,7 @@ const _sfc_main$A = defineComponent({
6690
6716
  setColumns,
6691
6717
  setCacheColumnsByField,
6692
6718
  getCacheColumns
6693
- } = useColumns(getProps, getPaginationInfo);
6719
+ } = useColumns(getProps, getPaginationInfo, tableElRef);
6694
6720
  const {
6695
6721
  getRowSelectionRef,
6696
6722
  clearSelectedRowKeys,
@@ -6847,14 +6873,14 @@ function useDownload(exportUrl, exportName) {
6847
6873
  case "all":
6848
6874
  http.exportFile(exportUrl, {
6849
6875
  fields: setDownloadAllHeaders(columns),
6850
- tableName: exportName,
6876
+ tableName: unref(exportName),
6851
6877
  fileType: "xlsx",
6852
6878
  searchDTO
6853
- }, `${exportName}.xlsx`);
6879
+ }, `${unref(exportName)}.xlsx`);
6854
6880
  break;
6855
6881
  case "current":
6856
6882
  case "select":
6857
- handleDownloadPage(excelData, exportName);
6883
+ handleDownloadPage(excelData, unref(exportName));
6858
6884
  break;
6859
6885
  }
6860
6886
  }
@@ -7128,6 +7154,9 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
7128
7154
  __name: "dialog",
7129
7155
  props: {
7130
7156
  ...basicProps,
7157
+ title: {
7158
+ type: Object
7159
+ },
7131
7160
  ...{
7132
7161
  onRegister: { type: Function },
7133
7162
  formProps: {
@@ -7141,7 +7170,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
7141
7170
  },
7142
7171
  setup(__props) {
7143
7172
  const props = __props;
7144
- const [registerDialog, { closeModal }] = useModal({
7173
+ const [registerDialog, { closeModal, setModalProps }] = useModal({
7145
7174
  ...omit(toRaw(props), [
7146
7175
  "curd",
7147
7176
  "formProps",
@@ -7195,18 +7224,23 @@ function useCurd(curdOpt) {
7195
7224
  closeModal
7196
7225
  }] = useModalOut();
7197
7226
  const {
7198
- confirm
7227
+ confirm,
7228
+ message
7199
7229
  } = useMessage();
7230
+ const actType = ref(null);
7231
+ const title = computed(() => unref(actType) + unref(curdOpt.title));
7200
7232
  const DtCurdModal = () => {
7201
7233
  return h(createVNode("div", {
7202
7234
  "class": "curdModal"
7203
7235
  }, [createVNode(_sfc_main$z, mergeProps(curdOpt, {
7236
+ "title": title,
7204
7237
  "formsVal": formsVal,
7205
7238
  "formProps": curdOpt.formProps,
7206
7239
  "onRegister": register
7207
7240
  }), null)]));
7208
7241
  };
7209
7242
  function add() {
7243
+ actType.value = "\u65B0\u589E";
7210
7244
  formsVal.value = null;
7211
7245
  openModal();
7212
7246
  }
@@ -7237,6 +7271,7 @@ function useCurd(curdOpt) {
7237
7271
  primaryKey = "id",
7238
7272
  curd
7239
7273
  } = curdOpt;
7274
+ actType.value = "\u7F16\u8F91";
7240
7275
  curd.onQueryById(row[primaryKey]).then((rsp) => {
7241
7276
  formsVal.value = rsp;
7242
7277
  nextTick(() => dispatchResize());
@@ -7244,6 +7279,10 @@ function useCurd(curdOpt) {
7244
7279
  openModal();
7245
7280
  }
7246
7281
  function dels(ids = []) {
7282
+ if (!ids.length) {
7283
+ message.error("\u6682\u65E0\u9009\u4E2D\u7684\u6570\u636E!");
7284
+ return;
7285
+ }
7247
7286
  const {
7248
7287
  curd
7249
7288
  } = curdOpt;
@@ -7322,6 +7361,10 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
7322
7361
  }
7323
7362
  });
7324
7363
  const basicUploadProps = {
7364
+ uploadText: {
7365
+ type: String,
7366
+ default: "\u6587\u4EF6\u4E0A\u4F20"
7367
+ },
7325
7368
  showTemplateDownload: {
7326
7369
  type: Boolean,
7327
7370
  default: false
@@ -7811,9 +7854,8 @@ var sparkMd5 = { exports: {} };
7811
7854
  })(sparkMd5);
7812
7855
  const _hoisted_1$j = { class: "dt-file" };
7813
7856
  const _hoisted_2$b = { class: "file-header" };
7814
- const _hoisted_3$6 = /* @__PURE__ */ createTextVNode(" \u6587\u4EF6\u4E0A\u4F20 ");
7815
- const _hoisted_4$4 = /* @__PURE__ */ createTextVNode(" \u6A21\u677F\u4E0B\u8F7D ");
7816
- const _hoisted_5$3 = { class: "file-type-tips ant-alert-info" };
7857
+ const _hoisted_3$6 = /* @__PURE__ */ createTextVNode(" \u6A21\u677F\u4E0B\u8F7D ");
7858
+ const _hoisted_4$4 = { class: "file-type-tips ant-alert-info" };
7817
7859
  const _sfc_main$x = /* @__PURE__ */ defineComponent({
7818
7860
  __name: "upload",
7819
7861
  props: basicUploadProps,
@@ -7944,7 +7986,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
7944
7986
  withDirectives(createElementVNode("span", null, null, 512), [
7945
7987
  [_directive_icon, "ic:baseline-file-upload"]
7946
7988
  ]),
7947
- _hoisted_3$6
7989
+ createTextVNode(" " + toDisplayString(_ctx.uploadText), 1)
7948
7990
  ]),
7949
7991
  _: 1
7950
7992
  })
@@ -7960,14 +8002,14 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
7960
8002
  withDirectives(createElementVNode("span", null, null, 512), [
7961
8003
  [_directive_icon, "ic:baseline-file-download"]
7962
8004
  ]),
7963
- _hoisted_4$4
8005
+ _hoisted_3$6
7964
8006
  ]),
7965
8007
  _: 1
7966
8008
  }, 8, ["onClick"])) : createCommentVNode("", true)
7967
8009
  ]),
7968
8010
  renderSlot(_ctx.$slots, "default")
7969
8011
  ]),
7970
- createElementVNode("div", _hoisted_5$3, [
8012
+ createElementVNode("div", _hoisted_4$4, [
7971
8013
  withDirectives(createElementVNode("span", null, null, 512), [
7972
8014
  [_directive_icon, "ant-design:info-circle-outlined"]
7973
8015
  ]),
@@ -9797,13 +9839,14 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
9797
9839
  __name: "menu-item-content",
9798
9840
  props: contentProps,
9799
9841
  setup(__props) {
9842
+ const { getIsZH } = useHeader();
9800
9843
  return (_ctx, _cache) => {
9801
9844
  const _directive_icon = resolveDirective("icon");
9802
9845
  return openBlock(), createElementBlock("span", _hoisted_1$4, [
9803
9846
  withDirectives(createElementVNode("span", _hoisted_2$2, null, 512), [
9804
9847
  [_directive_icon, _ctx.item.icon]
9805
9848
  ]),
9806
- createTextVNode(" " + toDisplayString(_ctx.item.label), 1)
9849
+ createTextVNode(" " + toDisplayString(unref(getIsZH) ? _ctx.item.label : _ctx.item.enLabel), 1)
9807
9850
  ]);
9808
9851
  };
9809
9852
  }
@@ -10218,10 +10261,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
10218
10261
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
10219
10262
  __name: "drag-bar",
10220
10263
  setup(__props) {
10221
- const { getMiniWidthNumber, getCollapsed, getCanDrag } = useMenu();
10264
+ const { getCollapsed, getCanDrag, getMenuWidth } = useMenu();
10222
10265
  const getDragBarStyle = computed(() => {
10223
- if (unref(getCollapsed)) {
10224
- return { left: `${unref(getMiniWidthNumber)}px` };
10266
+ if (!unref(getCollapsed)) {
10267
+ return { left: `${unref(getMenuWidth)}px` };
10225
10268
  }
10226
10269
  return {};
10227
10270
  });
@@ -85,6 +85,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
85
85
  }>> & {
86
86
  [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any);
87
87
  }>>;
88
+ getIsZH: import("vue").ComputedRef<boolean>;
88
89
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
89
90
  item: {
90
91
  type: ObjectConstructor;
@@ -626,6 +626,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
626
626
  }>> & {
627
627
  [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any);
628
628
  }>>;
629
+ getIsZH: import("vue").ComputedRef<boolean>;
629
630
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
630
631
  item: {
631
632
  type: ObjectConstructor;
@@ -679,6 +680,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
679
680
  }>> & {
680
681
  [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any);
681
682
  }>>;
683
+ getIsZH: import("vue").ComputedRef<boolean>;
682
684
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
683
685
  item: {
684
686
  type: ObjectConstructor;
@@ -161,6 +161,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
161
161
  }>> & {
162
162
  [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any);
163
163
  }>>;
164
+ getIsZH: import("vue").ComputedRef<boolean>;
164
165
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
165
166
  item: {
166
167
  type: ObjectConstructor;
@@ -214,6 +215,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
214
215
  }>> & {
215
216
  [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any);
216
217
  }>>;
218
+ getIsZH: import("vue").ComputedRef<boolean>;
217
219
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
218
220
  item: {
219
221
  type: ObjectConstructor;
@@ -18,6 +18,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
18
18
  }>> & {
19
19
  [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any);
20
20
  }>>;
21
+ getIsZH: import("vue").ComputedRef<boolean>;
21
22
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
23
  item: {
23
24
  type: ObjectConstructor;
@@ -1,7 +1,7 @@
1
1
  declare const _sfc_main: import("vue").DefineComponent<{}, {
2
- getMiniWidthNumber: import("vue").ComputedRef<48 | 80>;
3
2
  getCollapsed: import("vue").ComputedRef<boolean>;
4
3
  getCanDrag: import("vue").ComputedRef<boolean>;
4
+ getMenuWidth: import("vue").ComputedRef<string | number>;
5
5
  getDragBarStyle: import("vue").ComputedRef<{
6
6
  left: string;
7
7
  } | {
@@ -136,9 +136,9 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
136
136
  isHorizontal: boolean;
137
137
  }>;
138
138
  DragBar: import("vue").DefineComponent<{}, {
139
- getMiniWidthNumber: import("vue").ComputedRef<48 | 80>;
140
139
  getCollapsed: import("vue").ComputedRef<boolean>;
141
140
  getCanDrag: import("vue").ComputedRef<boolean>;
141
+ getMenuWidth: import("vue").ComputedRef<string | number>;
142
142
  getDragBarStyle: import("vue").ComputedRef<{
143
143
  left: string;
144
144
  } | {
@@ -131,6 +131,7 @@
131
131
  margin-right: 12px;
132
132
  height: 40px !important;
133
133
  width: 28px;
134
+ flex: 0 0 28px;
134
135
  text-align: center;
135
136
  }
136
137
 
@@ -182,9 +183,8 @@
182
183
  }
183
184
 
184
185
  .dt-darg-bar{
185
- position: absolute;
186
+ position: fixed;
186
187
  top: 0;
187
- right: 0;
188
188
  z-index: @side-drag-z-index;
189
189
  width: 2px;
190
190
  height: 100%;
@@ -38,6 +38,8 @@
38
38
  flex-direction: column;
39
39
  padding: 12px;
40
40
  background: @page-bg-color;
41
+ max-height: 100%;
42
+ overflow: hidden;
41
43
  .basic-form--search{
42
44
  background: #fff;
43
45
  padding: 15px 30px 0;
@@ -65,3 +67,7 @@
65
67
  }
66
68
  }
67
69
 
70
+ .ant-menu-dark .ant-menu-submenu-title:focus-visible {
71
+ box-shadow: none;
72
+ }
73
+
@@ -39,6 +39,12 @@
39
39
  opacity: 0;
40
40
  }
41
41
  }
42
+
43
+ .fade-leave-active {
44
+ position: absolute;
45
+ left: 0;
46
+ top: 0;
47
+ }
42
48
 
43
49
  .fade-enter-active,
44
50
  .fade-leave-active {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dt-frames/ui",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "keywords": [
5
5
  "ui",
6
6
  "dt-ui"
@@ -10,7 +10,7 @@
10
10
  "registry": "https://registry.npmjs.org/"
11
11
  },
12
12
  "scripts": {
13
- "dev": "yarn build -w",
13
+ "dev": "vite dev",
14
14
  "build": "vite build"
15
15
  },
16
16
  "exports": {