@dt-frames/ui 1.0.25 → 1.0.26

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.
@@ -208,6 +208,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
208
208
  }>>;
209
209
  setFormModel: (key: string, value: any) => void;
210
210
  handleMethod: (params: boolean | import("@dt-frames/core").ButtonProps) => void;
211
+ handleEnterPress: () => void;
211
212
  getActionsProps: import("vue").ComputedRef<Recordable<any>>;
212
213
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("register" | "reset")[], "register" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
213
214
  mode: {
@@ -117,6 +117,7 @@ declare const _default: import("vue").DefineComponent<{
117
117
  }>>;
118
118
  setFormModel: (key: string, value: any) => void;
119
119
  handleMethod: (params: boolean | ButtonProps) => void;
120
+ handleEnterPress: () => void;
120
121
  getActionsProps: import("vue").ComputedRef<Recordable<any>>;
121
122
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("register" | "reset")[], "register" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
122
123
  mode: {
package/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent, resolveComponent, openBlock, createBlock, computed, unref, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, ref, watch, Fragment, renderList, createTextVNode, toDisplayString, KeepAlive, createVNode, withCtx, reactive, toRaw, getCurrentInstance, watchEffect, nextTick, toRefs, isVNode, inject, onUnmounted, h, provide, onMounted, onBeforeUnmount, resolveDynamicComponent, renderSlot, createCommentVNode, mergeProps, readonly, isRef, useAttrs as useAttrs$1, normalizeProps, guardReactiveProps, withDirectives, resolveDirective, render, createSlots, useSlots as useSlots$1, withModifiers, vShow, toRef, Transition } from "vue";
1
+ import { defineComponent, resolveComponent, openBlock, createBlock, computed, unref, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, ref, watch, Fragment, renderList, createTextVNode, toDisplayString, KeepAlive, createVNode, withCtx, reactive, toRaw, getCurrentInstance, watchEffect, nextTick, toRefs, isVNode, inject, onUnmounted, h, provide, onMounted, onBeforeUnmount, resolveDynamicComponent, renderSlot, createCommentVNode, mergeProps, readonly, isRef, useAttrs as useAttrs$1, normalizeProps, guardReactiveProps, withDirectives, resolveDirective, render, withKeys, createSlots, useSlots as useSlots$1, withModifiers, vShow, toRef, Transition } from "vue";
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";
@@ -3101,7 +3101,7 @@ var _sfc_main$Q = defineComponent({
3101
3101
  default: () => [createVNode("div", {
3102
3102
  "style": "display:flex"
3103
3103
  }, [createVNode("div", {
3104
- "style": "flex:1;"
3104
+ "style": "flex:1; width: 100%;"
3105
3105
  }, [getContent()]), !!suffix && createVNode("span", {
3106
3106
  "class": "suffix"
3107
3107
  }, [getSuffix()])])]
@@ -3466,6 +3466,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
3466
3466
  const _component_FormItem = resolveComponent("FormItem");
3467
3467
  const _component_Col = resolveComponent("Col");
3468
3468
  const _directive_icon = resolveDirective("icon");
3469
+ const _directive_auth = resolveDirective("auth");
3469
3470
  return _ctx.show ? (openBlock(), createBlock(_component_Col, normalizeProps(mergeProps({ key: 0 }, _ctx.colOpt)), {
3470
3471
  default: withCtx(() => [
3471
3472
  createVNode(_component_FormItem, {
@@ -3477,12 +3478,12 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
3477
3478
  default: withCtx(() => [
3478
3479
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.buttonList, (button) => {
3479
3480
  return openBlock(), createElementBlock(Fragment, null, [
3480
- (button.show === void 0 ? true : button.show) ? (openBlock(), createBlock(_component_Button, {
3481
+ createTextVNode(toDisplayString(button.auth) + " ", 1),
3482
+ (button.show === void 0 ? true : button.show) ? withDirectives((openBlock(), createBlock(_component_Button, {
3481
3483
  key: 0,
3482
3484
  type: button.type,
3483
3485
  class: normalizeClass(button.class),
3484
3486
  disabled: button.disabled,
3485
- permission: button.auth,
3486
3487
  loading: button.loading,
3487
3488
  onClick: ($event) => _ctx.handleBtnClick(button)
3488
3489
  }, {
@@ -3498,7 +3499,9 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
3498
3499
  ]) : createCommentVNode("", true)
3499
3500
  ]),
3500
3501
  _: 2
3501
- }, 1032, ["type", "class", "disabled", "permission", "loading", "onClick"])) : createCommentVNode("", true)
3502
+ }, 1032, ["type", "class", "disabled", "loading", "onClick"])), [
3503
+ [_directive_auth, button.auth]
3504
+ ]) : createCommentVNode("", true)
3502
3505
  ], 64);
3503
3506
  }), 256)),
3504
3507
  _ctx.showAdvanceRef ? (openBlock(), createBlock(_component_Button, {
@@ -3968,6 +3971,11 @@ const _sfc_main$O = defineComponent({
3968
3971
  });
3969
3972
  }
3970
3973
  }
3974
+ function handleEnterPress() {
3975
+ if (unref(getProps).mode === "search") {
3976
+ handleMethod(SEARCH_BTNS.filter((it) => it.name === SEARCH_BTN_NAME)[0]);
3977
+ }
3978
+ }
3971
3979
  const {
3972
3980
  updateSchema,
3973
3981
  resetSchema,
@@ -4079,6 +4087,7 @@ const _sfc_main$O = defineComponent({
4079
4087
  props,
4080
4088
  setFormModel,
4081
4089
  handleMethod,
4090
+ handleEnterPress,
4082
4091
  getActionsProps
4083
4092
  };
4084
4093
  }
@@ -4092,7 +4101,8 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
4092
4101
  ref: "formElRef",
4093
4102
  class: _ctx.getFormClass,
4094
4103
  model: _ctx.formModel,
4095
- layout: _ctx.getLayout
4104
+ layout: _ctx.getLayout,
4105
+ onKeypress: withKeys(_ctx.handleEnterPress, ["enter"])
4096
4106
  }), {
4097
4107
  default: withCtx(() => [
4098
4108
  createVNode(_component_Row, normalizeProps(guardReactiveProps(_ctx.getProps.rowProps)), {
@@ -4126,7 +4136,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
4126
4136
  }, 16)
4127
4137
  ]),
4128
4138
  _: 3
4129
- }, 16, ["class", "model", "layout"]);
4139
+ }, 16, ["class", "model", "layout", "onKeypress"]);
4130
4140
  }
4131
4141
  var DtForm = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$4]]);
4132
4142
  function useForm(props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dt-frames/ui",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "keywords": [
5
5
  "ui",
6
6
  "dt-ui"