ele-admin-plus 1.2.2-beta.1 → 1.2.2-beta.2

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.
@@ -1,9 +1,9 @@
1
- import { defineComponent, provide } from "vue";
2
- import { formItemContextKey } from "element-plus";
1
+ import { defineComponent } from "vue";
2
+ import { useFormItemRest } from "../../utils/hook";
3
3
  const formItemRest = defineComponent({
4
4
  name: "FormItemRest",
5
5
  setup(_props, { slots }) {
6
- provide(formItemContextKey, null);
6
+ useFormItemRest();
7
7
  return () => {
8
8
  var _a;
9
9
  return (_a = slots.default) == null ? void 0 : _a.call(slots);
@@ -168,7 +168,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
168
168
  accept: _ctx.accept,
169
169
  showFileList: false,
170
170
  beforeUpload: _ctx.handleUpload,
171
- style: { "display": "inline-block", "line-height": "0" }
171
+ class: "ele-cropper-tool-upload"
172
172
  }, {
173
173
  default: withCtx(() => [
174
174
  createVNode(_component_ElButton, {
@@ -68,12 +68,21 @@
68
68
  }
69
69
 
70
70
  .ele-cropper-tool-item {
71
- margin: 10px 14px 0 0;
71
+ margin: 10px 10px 0 0;
72
72
  vertical-align: top;
73
73
 
74
74
  &:last-child {
75
75
  margin-right: 0;
76
76
  }
77
+
78
+ & > .ele-cropper-tool-upload {
79
+ float: left;
80
+ }
81
+
82
+ .ele-cropper-tool-upload {
83
+ line-height: 0;
84
+ display: inline-block;
85
+ }
77
86
  }
78
87
 
79
88
  .ele-cropper-tool {
@@ -52,7 +52,7 @@ const _hoisted_1 = {
52
52
  key: 0,
53
53
  class: "ele-menu-title"
54
54
  };
55
- const _hoisted_2 = ["href"];
55
+ const _hoisted_2 = ["href", "target"];
56
56
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
57
57
  const _component_ElIcon = resolveComponent("ElIcon");
58
58
  const _component_ElBadge = resolveComponent("ElBadge");
@@ -89,15 +89,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
89
89
  _ctx.isExternalLink(_ctx.item.path) ? (openBlock(), createElementBlock("a", {
90
90
  key: 0,
91
91
  href: _ctx.item.path,
92
- target: "_blank",
92
+ target: _ctx.item.pathTarget || "_blank",
93
93
  class: "ele-menu-link",
94
94
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {
95
95
  }, ["stop"]))
96
96
  }, null, 8, _hoisted_2)) : _ctx.item.path ? (openBlock(), createBlock(_component_RouterLink, {
97
97
  key: 1,
98
98
  to: _ctx.item.path,
99
+ target: _ctx.item.pathTarget,
99
100
  class: "ele-menu-link"
100
- }, null, 8, ["to"])) : createCommentVNode("", true)
101
+ }, null, 8, ["to", "target"])) : createCommentVNode("", true)
101
102
  ], 64)) : createCommentVNode("", true)
102
103
  ], 32)
103
104
  ], 64);
@@ -28,6 +28,8 @@ export interface MenuItem
28
28
  iconStyle?: StyleValue;
29
29
  /** 菜单链接地址 */
30
30
  path?: string;
31
+ /** 菜单的打开位置 */
32
+ pathTarget?: string;
31
33
  /** 是否展示为分组菜单 */
32
34
  group?: boolean;
33
35
  /** 徽章 */
@@ -6,6 +6,7 @@ declare const _default: import('vue').DefineComponent<{
6
6
  maxSize: NumberConstructor;
7
7
  space: StringConstructor;
8
8
  customStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
9
+ customWrapStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
9
10
  bodyStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
10
11
  allowCollapse: BooleanConstructor;
11
12
  collapseStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
@@ -37,6 +38,7 @@ declare const _default: import('vue').DefineComponent<{
37
38
  maxSize: NumberConstructor;
38
39
  space: StringConstructor;
39
40
  customStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
41
+ customWrapStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
40
42
  bodyStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
41
43
  allowCollapse: BooleanConstructor;
42
44
  collapseStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
@@ -122,11 +122,7 @@ const _export_sfc = (sfc, props) => {
122
122
  }
123
123
  return target;
124
124
  };
125
- const _hoisted_1 = {
126
- ref: "wrapRef",
127
- class: "ele-split-panel-wrap"
128
- };
129
- const _hoisted_2 = { class: "ele-split-panel-space" };
125
+ const _hoisted_1 = { class: "ele-split-panel-space" };
130
126
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
131
127
  const _component_ArrowUp = resolveComponent("ArrowUp");
132
128
  const _component_ArrowLeft = resolveComponent("ArrowLeft");
@@ -149,7 +145,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
149
145
  })
150
146
  }, {
151
147
  default: withCtx(() => [
152
- createElementVNode("div", _hoisted_1, [
148
+ createElementVNode("div", {
149
+ ref: "wrapRef",
150
+ class: "ele-split-panel-wrap",
151
+ style: normalizeStyle(_ctx.customWrapStyle)
152
+ }, [
153
153
  createElementVNode("div", {
154
154
  ref: "sideRef",
155
155
  class: "ele-split-panel-side",
@@ -157,14 +157,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
157
157
  }, [
158
158
  renderSlot(_ctx.$slots, "default")
159
159
  ], 4),
160
- createElementVNode("div", _hoisted_2, [
160
+ createElementVNode("div", _hoisted_1, [
161
161
  _ctx.resizable ? (openBlock(), createElementBlock("div", {
162
162
  key: 0,
163
163
  class: "ele-split-resize-line",
164
164
  onMousedown: _cache[0] || (_cache[0] = (...args) => _ctx.handleResize && _ctx.handleResize(...args))
165
165
  }, null, 32)) : createCommentVNode("", true)
166
166
  ])
167
- ], 512),
167
+ ], 4),
168
168
  createElementVNode("div", {
169
169
  class: "ele-split-panel-body",
170
170
  style: normalizeStyle(_ctx.bodyStyle)
@@ -13,8 +13,10 @@ export declare const splitPanelProps: {
13
13
  maxSize: NumberConstructor;
14
14
  /** 间距 */
15
15
  space: StringConstructor;
16
- /** 自定义样式 */
16
+ /** 自定义边栏样式 */
17
17
  customStyle: PropType<StyleValue>;
18
+ /** 自定义边栏容器样式 */
19
+ customWrapStyle: PropType<StyleValue>;
18
20
  /** 自定义内容样式 */
19
21
  bodyStyle: PropType<StyleValue>;
20
22
  /** 是否可折叠 */
@@ -7,8 +7,10 @@ const splitPanelProps = {
7
7
  maxSize: Number,
8
8
  /** 间距 */
9
9
  space: String,
10
- /** 自定义样式 */
10
+ /** 自定义边栏样式 */
11
11
  customStyle: Object,
12
+ /** 自定义边栏容器样式 */
13
+ customWrapStyle: Object,
12
14
  /** 自定义内容样式 */
13
15
  bodyStyle: Object,
14
16
  /** 是否可折叠 */
@@ -1043,8 +1043,6 @@
1043
1043
  /* 内部表格高度铺满 */
1044
1044
  .ele-tabs.is-flex-table {
1045
1045
  flex: 1;
1046
- display: flex;
1047
- flex-direction: column;
1048
1046
  overflow: auto;
1049
1047
 
1050
1048
  & > .el-tabs__content {
@@ -1056,6 +1054,7 @@
1056
1054
  display: flex;
1057
1055
  flex-direction: column;
1058
1056
  box-sizing: border-box;
1057
+ overflow: auto;
1059
1058
 
1060
1059
  & > .ele-pro-table {
1061
1060
  flex: 1;
@@ -1,5 +1,10 @@
1
1
  import { Ref } from 'vue';
2
+ import { default as SortableJs } from 'sortablejs';
2
3
 
4
+ /**
5
+ * 重置组件表单验证
6
+ */
7
+ export declare function useFormItemRest(): void;
3
8
  /**
4
9
  * useTimer 返回结果
5
10
  */
@@ -111,3 +116,14 @@ export declare function useMoveEvent(option?: UseTouchEventOption<MoveEvent>): {
111
116
  handleMousedown: (e: MouseEvent) => void;
112
117
  handleTouchstart: (e: TouchEvent) => void;
113
118
  };
119
+ /**
120
+ * 拖拽排序
121
+ * @param getEl 获取容器方法
122
+ * @param getData 获取数据方法
123
+ * @param updateData 更新数据方法
124
+ * @param options 自定义参数
125
+ */
126
+ export declare function useSortable<T>(getEl: () => HTMLElement | undefined | null, getData: () => T[] | undefined | null, updateData: (data: T[]) => void, options?: SortableJs.Options): {
127
+ initSortable: () => void;
128
+ destroySortable: () => void;
129
+ };
package/es/utils/hook.js CHANGED
@@ -1,4 +1,9 @@
1
- import { ref, onBeforeUnmount } from "vue";
1
+ import { provide, ref, onBeforeUnmount, onMounted } from "vue";
2
+ import { formItemContextKey } from "element-plus";
3
+ import SortableJs from "sortablejs";
4
+ function useFormItemRest() {
5
+ provide(formItemContextKey, null);
6
+ }
2
7
  function useTimer(ms, cb) {
3
8
  let timer = null;
4
9
  const waiting = ref(false);
@@ -31,10 +36,18 @@ function useMediaQuery(query, onChange) {
31
36
  };
32
37
  const startWatch = () => {
33
38
  stopWatch();
34
- mediaQuery.addEventListener("change", handleChange);
39
+ if ("addEventListener" in mediaQuery) {
40
+ mediaQuery.addEventListener("change", handleChange);
41
+ } else {
42
+ mediaQuery.addListener(handleChange);
43
+ }
35
44
  };
36
45
  const stopWatch = () => {
37
- mediaQuery.removeEventListener("change", handleChange);
46
+ if ("removeEventListener" in mediaQuery) {
47
+ mediaQuery.removeEventListener("change", handleChange);
48
+ } else {
49
+ mediaQuery.removeListener(handleChange);
50
+ }
38
51
  handleChange();
39
52
  };
40
53
  onBeforeUnmount(() => {
@@ -253,11 +266,52 @@ function useMoveEvent(option) {
253
266
  handleTouchstart
254
267
  };
255
268
  }
269
+ function useSortable(getEl, getData, updateData, options) {
270
+ let sortableIns = null;
271
+ const destroySortable = () => {
272
+ if (sortableIns != null) {
273
+ sortableIns.destroy();
274
+ }
275
+ sortableIns = null;
276
+ };
277
+ const initSortable = () => {
278
+ destroySortable();
279
+ const el = getEl();
280
+ if (el == null) {
281
+ return;
282
+ }
283
+ sortableIns = new SortableJs(el, {
284
+ onUpdate: ({ oldDraggableIndex, newDraggableIndex }) => {
285
+ if (typeof oldDraggableIndex === "number" && typeof newDraggableIndex === "number") {
286
+ const data = [...getData() || []];
287
+ data.splice(
288
+ newDraggableIndex,
289
+ 0,
290
+ data.splice(oldDraggableIndex, 1)[0]
291
+ );
292
+ updateData(data);
293
+ }
294
+ },
295
+ setData: () => {
296
+ },
297
+ ...options || {}
298
+ });
299
+ };
300
+ onMounted(() => {
301
+ initSortable();
302
+ });
303
+ onBeforeUnmount(() => {
304
+ destroySortable();
305
+ });
306
+ return { initSortable, destroySortable };
307
+ }
256
308
  export {
257
309
  useCollapseAnim,
310
+ useFormItemRest,
258
311
  useMediaQuery,
259
312
  useMousewheel,
260
313
  useMoveEvent,
314
+ useSortable,
261
315
  useTimer,
262
316
  useTouchEvent,
263
317
  useWindowListener
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  const vue = require("vue");
3
- const elementPlus = require("element-plus");
3
+ const hook = require("../../utils/hook");
4
4
  const formItemRest = vue.defineComponent({
5
5
  name: "FormItemRest",
6
6
  setup(_props, { slots }) {
7
- vue.provide(elementPlus.formItemContextKey, null);
7
+ hook.useFormItemRest();
8
8
  return () => {
9
9
  var _a;
10
10
  return (_a = slots.default) == null ? void 0 : _a.call(slots);
@@ -169,7 +169,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
169
169
  accept: _ctx.accept,
170
170
  showFileList: false,
171
171
  beforeUpload: _ctx.handleUpload,
172
- style: { "display": "inline-block", "line-height": "0" }
172
+ class: "ele-cropper-tool-upload"
173
173
  }, {
174
174
  default: vue.withCtx(() => [
175
175
  vue.createVNode(_component_ElButton, {
@@ -68,12 +68,21 @@
68
68
  }
69
69
 
70
70
  .ele-cropper-tool-item {
71
- margin: 10px 14px 0 0;
71
+ margin: 10px 10px 0 0;
72
72
  vertical-align: top;
73
73
 
74
74
  &:last-child {
75
75
  margin-right: 0;
76
76
  }
77
+
78
+ & > .ele-cropper-tool-upload {
79
+ float: left;
80
+ }
81
+
82
+ .ele-cropper-tool-upload {
83
+ line-height: 0;
84
+ display: inline-block;
85
+ }
77
86
  }
78
87
 
79
88
  .ele-cropper-tool {
@@ -53,7 +53,7 @@ const _hoisted_1 = {
53
53
  key: 0,
54
54
  class: "ele-menu-title"
55
55
  };
56
- const _hoisted_2 = ["href"];
56
+ const _hoisted_2 = ["href", "target"];
57
57
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
58
58
  const _component_ElIcon = vue.resolveComponent("ElIcon");
59
59
  const _component_ElBadge = vue.resolveComponent("ElBadge");
@@ -90,15 +90,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
90
90
  _ctx.isExternalLink(_ctx.item.path) ? (vue.openBlock(), vue.createElementBlock("a", {
91
91
  key: 0,
92
92
  href: _ctx.item.path,
93
- target: "_blank",
93
+ target: _ctx.item.pathTarget || "_blank",
94
94
  class: "ele-menu-link",
95
95
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
96
96
  }, ["stop"]))
97
97
  }, null, 8, _hoisted_2)) : _ctx.item.path ? (vue.openBlock(), vue.createBlock(_component_RouterLink, {
98
98
  key: 1,
99
99
  to: _ctx.item.path,
100
+ target: _ctx.item.pathTarget,
100
101
  class: "ele-menu-link"
101
- }, null, 8, ["to"])) : vue.createCommentVNode("", true)
102
+ }, null, 8, ["to", "target"])) : vue.createCommentVNode("", true)
102
103
  ], 64)) : vue.createCommentVNode("", true)
103
104
  ], 32)
104
105
  ], 64);
@@ -28,6 +28,8 @@ export interface MenuItem
28
28
  iconStyle?: StyleValue;
29
29
  /** 菜单链接地址 */
30
30
  path?: string;
31
+ /** 菜单的打开位置 */
32
+ pathTarget?: string;
31
33
  /** 是否展示为分组菜单 */
32
34
  group?: boolean;
33
35
  /** 徽章 */
@@ -123,11 +123,7 @@ const _export_sfc = (sfc, props2) => {
123
123
  }
124
124
  return target;
125
125
  };
126
- const _hoisted_1 = {
127
- ref: "wrapRef",
128
- class: "ele-split-panel-wrap"
129
- };
130
- const _hoisted_2 = { class: "ele-split-panel-space" };
126
+ const _hoisted_1 = { class: "ele-split-panel-space" };
131
127
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
132
128
  const _component_ArrowUp = vue.resolveComponent("ArrowUp");
133
129
  const _component_ArrowLeft = vue.resolveComponent("ArrowLeft");
@@ -150,7 +146,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
150
146
  })
151
147
  }, {
152
148
  default: vue.withCtx(() => [
153
- vue.createElementVNode("div", _hoisted_1, [
149
+ vue.createElementVNode("div", {
150
+ ref: "wrapRef",
151
+ class: "ele-split-panel-wrap",
152
+ style: vue.normalizeStyle(_ctx.customWrapStyle)
153
+ }, [
154
154
  vue.createElementVNode("div", {
155
155
  ref: "sideRef",
156
156
  class: "ele-split-panel-side",
@@ -158,14 +158,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
158
158
  }, [
159
159
  vue.renderSlot(_ctx.$slots, "default")
160
160
  ], 4),
161
- vue.createElementVNode("div", _hoisted_2, [
161
+ vue.createElementVNode("div", _hoisted_1, [
162
162
  _ctx.resizable ? (vue.openBlock(), vue.createElementBlock("div", {
163
163
  key: 0,
164
164
  class: "ele-split-resize-line",
165
165
  onMousedown: _cache[0] || (_cache[0] = (...args) => _ctx.handleResize && _ctx.handleResize(...args))
166
166
  }, null, 32)) : vue.createCommentVNode("", true)
167
167
  ])
168
- ], 512),
168
+ ], 4),
169
169
  vue.createElementVNode("div", {
170
170
  class: "ele-split-panel-body",
171
171
  style: vue.normalizeStyle(_ctx.bodyStyle)
@@ -6,6 +6,7 @@ declare const _default: import('vue').DefineComponent<{
6
6
  maxSize: NumberConstructor;
7
7
  space: StringConstructor;
8
8
  customStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
9
+ customWrapStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
9
10
  bodyStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
10
11
  allowCollapse: BooleanConstructor;
11
12
  collapseStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
@@ -37,6 +38,7 @@ declare const _default: import('vue').DefineComponent<{
37
38
  maxSize: NumberConstructor;
38
39
  space: StringConstructor;
39
40
  customStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
41
+ customWrapStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
40
42
  bodyStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
41
43
  allowCollapse: BooleanConstructor;
42
44
  collapseStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
@@ -9,8 +9,10 @@ const splitPanelProps = {
9
9
  maxSize: Number,
10
10
  /** 间距 */
11
11
  space: String,
12
- /** 自定义样式 */
12
+ /** 自定义边栏样式 */
13
13
  customStyle: Object,
14
+ /** 自定义边栏容器样式 */
15
+ customWrapStyle: Object,
14
16
  /** 自定义内容样式 */
15
17
  bodyStyle: Object,
16
18
  /** 是否可折叠 */
@@ -13,8 +13,10 @@ export declare const splitPanelProps: {
13
13
  maxSize: NumberConstructor;
14
14
  /** 间距 */
15
15
  space: StringConstructor;
16
- /** 自定义样式 */
16
+ /** 自定义边栏样式 */
17
17
  customStyle: PropType<StyleValue>;
18
+ /** 自定义边栏容器样式 */
19
+ customWrapStyle: PropType<StyleValue>;
18
20
  /** 自定义内容样式 */
19
21
  bodyStyle: PropType<StyleValue>;
20
22
  /** 是否可折叠 */
@@ -1043,8 +1043,6 @@
1043
1043
  /* 内部表格高度铺满 */
1044
1044
  .ele-tabs.is-flex-table {
1045
1045
  flex: 1;
1046
- display: flex;
1047
- flex-direction: column;
1048
1046
  overflow: auto;
1049
1047
 
1050
1048
  & > .el-tabs__content {
@@ -1056,6 +1054,7 @@
1056
1054
  display: flex;
1057
1055
  flex-direction: column;
1058
1056
  box-sizing: border-box;
1057
+ overflow: auto;
1059
1058
 
1060
1059
  & > .ele-pro-table {
1061
1060
  flex: 1;
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("vue");
4
+ const elementPlus = require("element-plus");
5
+ const SortableJs = require("sortablejs");
6
+ function useFormItemRest() {
7
+ vue.provide(elementPlus.formItemContextKey, null);
8
+ }
4
9
  function useTimer(ms, cb) {
5
10
  let timer = null;
6
11
  const waiting = vue.ref(false);
@@ -33,10 +38,18 @@ function useMediaQuery(query, onChange) {
33
38
  };
34
39
  const startWatch = () => {
35
40
  stopWatch();
36
- mediaQuery.addEventListener("change", handleChange);
41
+ if ("addEventListener" in mediaQuery) {
42
+ mediaQuery.addEventListener("change", handleChange);
43
+ } else {
44
+ mediaQuery.addListener(handleChange);
45
+ }
37
46
  };
38
47
  const stopWatch = () => {
39
- mediaQuery.removeEventListener("change", handleChange);
48
+ if ("removeEventListener" in mediaQuery) {
49
+ mediaQuery.removeEventListener("change", handleChange);
50
+ } else {
51
+ mediaQuery.removeListener(handleChange);
52
+ }
40
53
  handleChange();
41
54
  };
42
55
  vue.onBeforeUnmount(() => {
@@ -255,10 +268,51 @@ function useMoveEvent(option) {
255
268
  handleTouchstart
256
269
  };
257
270
  }
271
+ function useSortable(getEl, getData, updateData, options) {
272
+ let sortableIns = null;
273
+ const destroySortable = () => {
274
+ if (sortableIns != null) {
275
+ sortableIns.destroy();
276
+ }
277
+ sortableIns = null;
278
+ };
279
+ const initSortable = () => {
280
+ destroySortable();
281
+ const el = getEl();
282
+ if (el == null) {
283
+ return;
284
+ }
285
+ sortableIns = new SortableJs(el, {
286
+ onUpdate: ({ oldDraggableIndex, newDraggableIndex }) => {
287
+ if (typeof oldDraggableIndex === "number" && typeof newDraggableIndex === "number") {
288
+ const data = [...getData() || []];
289
+ data.splice(
290
+ newDraggableIndex,
291
+ 0,
292
+ data.splice(oldDraggableIndex, 1)[0]
293
+ );
294
+ updateData(data);
295
+ }
296
+ },
297
+ setData: () => {
298
+ },
299
+ ...options || {}
300
+ });
301
+ };
302
+ vue.onMounted(() => {
303
+ initSortable();
304
+ });
305
+ vue.onBeforeUnmount(() => {
306
+ destroySortable();
307
+ });
308
+ return { initSortable, destroySortable };
309
+ }
258
310
  exports.useCollapseAnim = useCollapseAnim;
311
+ exports.useFormItemRest = useFormItemRest;
259
312
  exports.useMediaQuery = useMediaQuery;
260
313
  exports.useMousewheel = useMousewheel;
261
314
  exports.useMoveEvent = useMoveEvent;
315
+ exports.useSortable = useSortable;
262
316
  exports.useTimer = useTimer;
263
317
  exports.useTouchEvent = useTouchEvent;
264
318
  exports.useWindowListener = useWindowListener;
@@ -1,5 +1,10 @@
1
1
  import { Ref } from 'vue';
2
+ import { default as SortableJs } from 'sortablejs';
2
3
 
4
+ /**
5
+ * 重置组件表单验证
6
+ */
7
+ export declare function useFormItemRest(): void;
3
8
  /**
4
9
  * useTimer 返回结果
5
10
  */
@@ -111,3 +116,14 @@ export declare function useMoveEvent(option?: UseTouchEventOption<MoveEvent>): {
111
116
  handleMousedown: (e: MouseEvent) => void;
112
117
  handleTouchstart: (e: TouchEvent) => void;
113
118
  };
119
+ /**
120
+ * 拖拽排序
121
+ * @param getEl 获取容器方法
122
+ * @param getData 获取数据方法
123
+ * @param updateData 更新数据方法
124
+ * @param options 自定义参数
125
+ */
126
+ export declare function useSortable<T>(getEl: () => HTMLElement | undefined | null, getData: () => T[] | undefined | null, updateData: (data: T[]) => void, options?: SortableJs.Options): {
127
+ initSortable: () => void;
128
+ destroySortable: () => void;
129
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ele-admin-plus",
3
- "version": "1.2.2-beta.1",
3
+ "version": "1.2.2-beta.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite --host --config vite.global.ts",