@dt-frames/ui 1.0.26 → 1.0.27

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/es/index.js CHANGED
@@ -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,
@@ -5368,6 +5359,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
5368
5359
  }
5369
5360
  return (_ctx, _cache) => {
5370
5361
  const _directive_icon = resolveDirective("icon");
5362
+ const _directive_auth = resolveDirective("auth");
5371
5363
  return props.expand ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.btns, (item) => {
5372
5364
  return openBlock(), createElementBlock("span", _hoisted_1$s, [
5373
5365
  item.ifShow ? (openBlock(), createBlock(unref(Tooltip), {
@@ -5397,7 +5389,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
5397
5389
  createVNode(unref(Menu), { class: "dt-action-select" }, {
5398
5390
  default: withCtx(() => [
5399
5391
  (openBlock(true), createElementBlock(Fragment, null, renderList(props.btns, (item) => {
5400
- return openBlock(), createElementBlock(Fragment, null, [
5392
+ return withDirectives((openBlock(), createElementBlock("span", null, [
5401
5393
  item.ifShow ? (openBlock(), createBlock(unref(MenuItem), {
5402
5394
  key: 0,
5403
5395
  onClick: ($event) => handleAction(item)
@@ -5412,7 +5404,9 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
5412
5404
  ]),
5413
5405
  _: 2
5414
5406
  }, 1032, ["onClick"])) : createCommentVNode("", true)
5415
- ], 64);
5407
+ ])), [
5408
+ [_directive_auth, item.auth]
5409
+ ]);
5416
5410
  }), 256))
5417
5411
  ]),
5418
5412
  _: 1
@@ -7207,6 +7201,7 @@ function useCurd(curdOpt) {
7207
7201
  }), null)]));
7208
7202
  };
7209
7203
  function add() {
7204
+ curdOpt.title = `\u65B0\u589E${curdOpt.title}`;
7210
7205
  formsVal.value = null;
7211
7206
  openModal();
7212
7207
  }
@@ -7237,6 +7232,7 @@ function useCurd(curdOpt) {
7237
7232
  primaryKey = "id",
7238
7233
  curd
7239
7234
  } = curdOpt;
7235
+ curdOpt.title = `\u7F16\u8F91${curdOpt.title}`;
7240
7236
  curd.onQueryById(row[primaryKey]).then((rsp) => {
7241
7237
  formsVal.value = rsp;
7242
7238
  nextTick(() => dispatchResize());
@@ -9797,13 +9793,14 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
9797
9793
  __name: "menu-item-content",
9798
9794
  props: contentProps,
9799
9795
  setup(__props) {
9796
+ const { getIsZH } = useHeader();
9800
9797
  return (_ctx, _cache) => {
9801
9798
  const _directive_icon = resolveDirective("icon");
9802
9799
  return openBlock(), createElementBlock("span", _hoisted_1$4, [
9803
9800
  withDirectives(createElementVNode("span", _hoisted_2$2, null, 512), [
9804
9801
  [_directive_icon, _ctx.item.icon]
9805
9802
  ]),
9806
- createTextVNode(" " + toDisplayString(_ctx.item.label), 1)
9803
+ createTextVNode(" " + toDisplayString(unref(getIsZH) ? _ctx.item.label : _ctx.item.enLabel), 1)
9807
9804
  ]);
9808
9805
  };
9809
9806
  }
@@ -10218,10 +10215,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
10218
10215
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
10219
10216
  __name: "drag-bar",
10220
10217
  setup(__props) {
10221
- const { getMiniWidthNumber, getCollapsed, getCanDrag } = useMenu();
10218
+ const { getCollapsed, getCanDrag, getMenuWidth } = useMenu();
10222
10219
  const getDragBarStyle = computed(() => {
10223
- if (unref(getCollapsed)) {
10224
- return { left: `${unref(getMiniWidthNumber)}px` };
10220
+ if (!unref(getCollapsed)) {
10221
+ return { left: `${unref(getMenuWidth)}px` };
10225
10222
  }
10226
10223
  return {};
10227
10224
  });
@@ -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%;
@@ -65,3 +65,7 @@
65
65
  }
66
66
  }
67
67
 
68
+ .ant-menu-dark .ant-menu-submenu-title:focus-visible {
69
+ box-shadow: none;
70
+ }
71
+
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.27",
4
4
  "keywords": [
5
5
  "ui",
6
6
  "dt-ui"