ele-admin-plus 1.4.1-beta.1 → 1.4.1

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 (224) hide show
  1. package/es/core-components.d.ts +2 -0
  2. package/es/core-components.js +104 -100
  3. package/es/ele-app/plus.d.ts +9 -1
  4. package/es/ele-app/plusx.d.ts +26 -13
  5. package/es/ele-backtop/index.js +7 -1
  6. package/es/ele-basic-select/components/select-view.d.ts +53 -22
  7. package/es/ele-basic-select/components/select-view.js +57 -20
  8. package/es/ele-basic-select/index.d.ts +39 -19
  9. package/es/ele-basic-select/index.js +62 -13
  10. package/es/ele-basic-select/props.d.ts +33 -21
  11. package/es/ele-basic-select/props.js +33 -21
  12. package/es/ele-basic-select/style/index.js +2 -0
  13. package/es/ele-basic-select/types.d.ts +1 -1
  14. package/es/ele-config-provider/components/receiver-view.d.ts +2 -0
  15. package/es/ele-config-provider/components/receiver-view.js +74 -72
  16. package/es/ele-config-provider/receiver.d.ts +2 -2
  17. package/es/ele-config-provider/receiver.js +5 -1
  18. package/es/ele-config-provider/types.d.ts +10 -1
  19. package/es/ele-copyable/index.d.ts +2 -4
  20. package/es/ele-cron-builder/index.d.ts +24 -0
  21. package/es/ele-cron-builder/index.js +81 -0
  22. package/es/ele-cron-builder/props.d.ts +31 -0
  23. package/es/ele-cron-builder/props.js +24 -0
  24. package/es/ele-cron-builder/style/index.d.ts +1 -0
  25. package/es/ele-cron-builder/style/index.js +4 -0
  26. package/es/ele-cron-builder/style/index.scss +6 -0
  27. package/es/ele-cron-builder/types.d.ts +8 -0
  28. package/es/ele-cron-panel/components/cron-day.d.ts +25 -0
  29. package/es/ele-cron-panel/components/cron-day.js +232 -0
  30. package/es/ele-cron-panel/components/cron-hour.d.ts +25 -0
  31. package/es/ele-cron-panel/components/cron-hour.js +174 -0
  32. package/es/ele-cron-panel/components/cron-minute.d.ts +25 -0
  33. package/es/ele-cron-panel/components/cron-minute.js +174 -0
  34. package/es/ele-cron-panel/components/cron-month.d.ts +25 -0
  35. package/es/ele-cron-panel/components/cron-month.js +174 -0
  36. package/es/ele-cron-panel/components/cron-second.d.ts +25 -0
  37. package/es/ele-cron-panel/components/cron-second.js +174 -0
  38. package/es/ele-cron-panel/components/cron-week.d.ts +25 -0
  39. package/es/ele-cron-panel/components/cron-week.js +229 -0
  40. package/es/ele-cron-panel/components/cron-year.d.ts +25 -0
  41. package/es/ele-cron-panel/components/cron-year.js +186 -0
  42. package/es/ele-cron-panel/index.d.ts +14 -0
  43. package/es/ele-cron-panel/index.js +348 -0
  44. package/es/ele-cron-panel/props.d.ts +20 -0
  45. package/es/ele-cron-panel/props.js +14 -0
  46. package/es/ele-cron-panel/style/index.d.ts +1 -0
  47. package/es/ele-cron-panel/style/index.js +7 -0
  48. package/es/ele-cron-panel/style/index.scss +282 -0
  49. package/es/ele-cron-panel/types.d.ts +118 -0
  50. package/es/ele-cron-panel/util.d.ts +23 -0
  51. package/es/ele-cron-panel/util.js +542 -0
  52. package/es/ele-cropper/components/cropper-tools.d.ts +2 -2
  53. package/es/ele-cropper-modal/index.d.ts +2 -4
  54. package/es/ele-crud/index.d.ts +3 -3
  55. package/es/ele-drawer/index.d.ts +9 -0
  56. package/es/ele-drawer/index.js +5 -1
  57. package/es/ele-drawer/props.d.ts +5 -0
  58. package/es/ele-drawer/props.js +6 -1
  59. package/es/ele-drawer/style/index.scss +11 -0
  60. package/es/ele-file-list/index.d.ts +3 -3
  61. package/es/ele-icon-select/components/icon-grid.d.ts +8 -3
  62. package/es/ele-icon-select/components/icon-grid.js +20 -12
  63. package/es/ele-icon-select/index.d.ts +58 -59
  64. package/es/ele-icon-select/index.js +92 -86
  65. package/es/ele-icon-select/props.d.ts +35 -35
  66. package/es/ele-icon-select/props.js +34 -34
  67. package/es/ele-icon-select/style/css-var.scss +1 -1
  68. package/es/ele-icon-select/style/index.scss +50 -18
  69. package/es/ele-icon-select/types.d.ts +13 -0
  70. package/es/ele-map-picker/index.d.ts +3 -3
  71. package/es/ele-modal/index.d.ts +4 -2
  72. package/es/ele-modal/index.js +9 -3
  73. package/es/ele-modal/props.d.ts +2 -0
  74. package/es/ele-modal/props.js +2 -0
  75. package/es/ele-modal/style/index.scss +16 -0
  76. package/es/ele-pro-form/components/item-type-data.js +39 -64
  77. package/es/ele-pro-form/index.d.ts +3 -3
  78. package/es/ele-pro-table/components/table-tools.d.ts +12 -97
  79. package/es/ele-pro-table/components/table-tools.js +118 -248
  80. package/es/ele-pro-table/components/tool-export.d.ts +5 -1
  81. package/es/ele-pro-table/components/tool-export.js +32 -20
  82. package/es/ele-pro-table/components/tool-print.d.ts +5 -1
  83. package/es/ele-pro-table/components/tool-print.js +37 -25
  84. package/es/ele-pro-table/exceljs-plugin.d.ts +12 -0
  85. package/es/ele-pro-table/exceljs-plugin.js +81 -0
  86. package/es/ele-pro-table/index.d.ts +6 -7
  87. package/es/ele-pro-table/index.js +117 -46
  88. package/es/ele-pro-table/types.d.ts +11 -0
  89. package/es/ele-split-panel/style/index.scss +1 -1
  90. package/es/ele-table-select/index.d.ts +2 -0
  91. package/es/ele-table-select/props.d.ts +2 -0
  92. package/es/ele-table-select/props.js +3 -1
  93. package/es/ele-tour/index.d.ts +3 -3
  94. package/es/ele-tree-select/index.d.ts +2 -0
  95. package/es/ele-upload-list/index.d.ts +3 -3
  96. package/es/ele-upload-list/index.js +25 -8
  97. package/es/ele-virtual-table/components/body-cell.d.ts +1 -1
  98. package/es/ele-watermark/index.d.ts +20 -7
  99. package/es/ele-watermark/index.js +253 -94
  100. package/es/ele-watermark/props.d.ts +10 -3
  101. package/es/ele-watermark/props.js +10 -3
  102. package/es/ele-watermark/types.d.ts +12 -0
  103. package/es/ele-watermark/util.d.ts +2 -9
  104. package/es/ele-watermark/util.js +10 -19
  105. package/es/lang/en_US.js +116 -0
  106. package/es/lang/zh_CN.js +116 -0
  107. package/es/lang/zh_TW.js +116 -0
  108. package/es/style/plus.scss +3 -1
  109. package/es/style/themes/default.scss +12 -3
  110. package/es/style/themes/rounded.scss +2 -1
  111. package/es/utils/theme-util.d.ts +1 -1
  112. package/lib/core-components.cjs +104 -100
  113. package/lib/core-components.d.ts +2 -0
  114. package/lib/ele-app/plus.d.ts +9 -1
  115. package/lib/ele-app/plusx.d.ts +26 -13
  116. package/lib/ele-backtop/index.cjs +6 -0
  117. package/lib/ele-basic-select/components/select-view.cjs +56 -19
  118. package/lib/ele-basic-select/components/select-view.d.ts +53 -22
  119. package/lib/ele-basic-select/index.cjs +61 -12
  120. package/lib/ele-basic-select/index.d.ts +39 -19
  121. package/lib/ele-basic-select/props.cjs +33 -21
  122. package/lib/ele-basic-select/props.d.ts +33 -21
  123. package/lib/ele-basic-select/style/index.cjs +2 -0
  124. package/lib/ele-basic-select/types.d.ts +1 -1
  125. package/lib/ele-config-provider/components/receiver-view.cjs +2 -2
  126. package/lib/ele-config-provider/components/receiver-view.d.ts +2 -0
  127. package/lib/ele-config-provider/receiver.cjs +5 -1
  128. package/lib/ele-config-provider/receiver.d.ts +2 -2
  129. package/lib/ele-config-provider/types.d.ts +10 -1
  130. package/lib/ele-copyable/index.d.ts +2 -4
  131. package/lib/ele-cron-builder/index.cjs +80 -0
  132. package/lib/ele-cron-builder/index.d.ts +24 -0
  133. package/lib/ele-cron-builder/props.cjs +24 -0
  134. package/lib/ele-cron-builder/props.d.ts +31 -0
  135. package/lib/ele-cron-builder/style/index.cjs +5 -0
  136. package/lib/ele-cron-builder/style/index.d.ts +1 -0
  137. package/lib/ele-cron-builder/style/index.scss +6 -0
  138. package/lib/ele-cron-builder/types.d.ts +8 -0
  139. package/lib/ele-cron-panel/components/cron-day.cjs +231 -0
  140. package/lib/ele-cron-panel/components/cron-day.d.ts +25 -0
  141. package/lib/ele-cron-panel/components/cron-hour.cjs +173 -0
  142. package/lib/ele-cron-panel/components/cron-hour.d.ts +25 -0
  143. package/lib/ele-cron-panel/components/cron-minute.cjs +173 -0
  144. package/lib/ele-cron-panel/components/cron-minute.d.ts +25 -0
  145. package/lib/ele-cron-panel/components/cron-month.cjs +173 -0
  146. package/lib/ele-cron-panel/components/cron-month.d.ts +25 -0
  147. package/lib/ele-cron-panel/components/cron-second.cjs +173 -0
  148. package/lib/ele-cron-panel/components/cron-second.d.ts +25 -0
  149. package/lib/ele-cron-panel/components/cron-week.cjs +228 -0
  150. package/lib/ele-cron-panel/components/cron-week.d.ts +25 -0
  151. package/lib/ele-cron-panel/components/cron-year.cjs +185 -0
  152. package/lib/ele-cron-panel/components/cron-year.d.ts +25 -0
  153. package/lib/ele-cron-panel/index.cjs +347 -0
  154. package/lib/ele-cron-panel/index.d.ts +14 -0
  155. package/lib/ele-cron-panel/props.cjs +14 -0
  156. package/lib/ele-cron-panel/props.d.ts +20 -0
  157. package/lib/ele-cron-panel/style/index.cjs +8 -0
  158. package/lib/ele-cron-panel/style/index.d.ts +1 -0
  159. package/lib/ele-cron-panel/style/index.scss +282 -0
  160. package/lib/ele-cron-panel/types.d.ts +118 -0
  161. package/lib/ele-cron-panel/util.cjs +542 -0
  162. package/lib/ele-cron-panel/util.d.ts +23 -0
  163. package/lib/ele-cropper/components/cropper-tools.d.ts +2 -2
  164. package/lib/ele-cropper-modal/index.d.ts +2 -4
  165. package/lib/ele-crud/index.d.ts +3 -3
  166. package/lib/ele-drawer/index.cjs +4 -0
  167. package/lib/ele-drawer/index.d.ts +9 -0
  168. package/lib/ele-drawer/props.cjs +6 -1
  169. package/lib/ele-drawer/props.d.ts +5 -0
  170. package/lib/ele-drawer/style/index.scss +11 -0
  171. package/lib/ele-file-list/index.d.ts +3 -3
  172. package/lib/ele-icon-select/components/icon-grid.cjs +19 -11
  173. package/lib/ele-icon-select/components/icon-grid.d.ts +8 -3
  174. package/lib/ele-icon-select/index.cjs +91 -85
  175. package/lib/ele-icon-select/index.d.ts +58 -59
  176. package/lib/ele-icon-select/props.cjs +34 -34
  177. package/lib/ele-icon-select/props.d.ts +35 -35
  178. package/lib/ele-icon-select/style/css-var.scss +1 -1
  179. package/lib/ele-icon-select/style/index.scss +50 -18
  180. package/lib/ele-icon-select/types.d.ts +13 -0
  181. package/lib/ele-map-picker/index.d.ts +3 -3
  182. package/lib/ele-modal/index.cjs +9 -3
  183. package/lib/ele-modal/index.d.ts +4 -2
  184. package/lib/ele-modal/props.cjs +2 -0
  185. package/lib/ele-modal/props.d.ts +2 -0
  186. package/lib/ele-modal/style/index.scss +16 -0
  187. package/lib/ele-pro-form/components/item-type-data.cjs +39 -64
  188. package/lib/ele-pro-form/index.d.ts +3 -3
  189. package/lib/ele-pro-table/components/table-tools.cjs +117 -247
  190. package/lib/ele-pro-table/components/table-tools.d.ts +12 -97
  191. package/lib/ele-pro-table/components/tool-export.cjs +32 -20
  192. package/lib/ele-pro-table/components/tool-export.d.ts +5 -1
  193. package/lib/ele-pro-table/components/tool-print.cjs +37 -25
  194. package/lib/ele-pro-table/components/tool-print.d.ts +5 -1
  195. package/lib/ele-pro-table/exceljs-plugin.cjs +81 -0
  196. package/lib/ele-pro-table/exceljs-plugin.d.ts +12 -0
  197. package/lib/ele-pro-table/index.cjs +143 -72
  198. package/lib/ele-pro-table/index.d.ts +6 -7
  199. package/lib/ele-pro-table/types.d.ts +11 -0
  200. package/lib/ele-split-panel/style/index.scss +1 -1
  201. package/lib/ele-table-select/index.d.ts +2 -0
  202. package/lib/ele-table-select/props.cjs +3 -1
  203. package/lib/ele-table-select/props.d.ts +2 -0
  204. package/lib/ele-tour/index.d.ts +3 -3
  205. package/lib/ele-tree-select/index.d.ts +2 -0
  206. package/lib/ele-upload-list/index.cjs +25 -8
  207. package/lib/ele-upload-list/index.d.ts +3 -3
  208. package/lib/ele-virtual-table/components/body-cell.d.ts +1 -1
  209. package/lib/ele-watermark/index.cjs +251 -92
  210. package/lib/ele-watermark/index.d.ts +20 -7
  211. package/lib/ele-watermark/props.cjs +10 -3
  212. package/lib/ele-watermark/props.d.ts +10 -3
  213. package/lib/ele-watermark/types.d.ts +12 -0
  214. package/lib/ele-watermark/util.cjs +10 -19
  215. package/lib/ele-watermark/util.d.ts +2 -9
  216. package/lib/lang/en_US.cjs +116 -0
  217. package/lib/lang/zh_CN.cjs +116 -0
  218. package/lib/lang/zh_TW.cjs +116 -0
  219. package/lib/style/plus.scss +3 -1
  220. package/lib/style/themes/default.scss +12 -3
  221. package/lib/style/themes/rounded.scss +2 -1
  222. package/lib/utils/theme-util.d.ts +1 -1
  223. package/package.json +1 -1
  224. package/typings/global.d.ts +2 -0
@@ -12,7 +12,12 @@ const drawerProps = {
12
12
  /** 自定义关闭按钮样式 */
13
13
  closeBtnStyle: Object,
14
14
  /** 是否限制在主体内部 */
15
- inner: Boolean
15
+ inner: Boolean,
16
+ /** 是否开启响应式 */
17
+ responsive: {
18
+ type: Boolean,
19
+ default: null
20
+ }
16
21
  };
17
22
  const elDrawerPropKeys = Object.keys(
18
23
  drawerProps$1
@@ -6,6 +6,11 @@
6
6
 
7
7
  /* 抽屉 */
8
8
  .ele-drawer {
9
+ &.el-drawer-fade-enter-active *,
10
+ &.el-drawer-fade-leave-active * {
11
+ pointer-events: none !important;
12
+ }
13
+
9
14
  &.el-overlay {
10
15
  overflow: hidden;
11
16
  }
@@ -88,6 +93,12 @@
88
93
  display: none !important;
89
94
  }
90
95
 
96
+ /* 最大宽度适应屏幕 */
97
+ .ele-drawer-responsive > .el-drawer {
98
+ max-width: 100%;
99
+ max-height: 100%;
100
+ }
101
+
91
102
  /* 限制在主体区域 */
92
103
  .ele-admin-modals > .ele-drawer {
93
104
  height: auto;
@@ -1,5 +1,5 @@
1
1
  import { EleDropdownInstance } from '../ele-app/plus';
2
- import { FileItem, SortValue, ItemContextMenuOption, FileListLocale } from './types';
2
+ import { FileItem, SortValue, ItemContextMenuOption } from './types';
3
3
 
4
4
  declare function __VLS_template(): Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: {
5
5
  item: FileItem;
@@ -29,7 +29,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
29
29
  boxChoose: BooleanConstructor;
30
30
  contextMenus: import('vue').PropType<import('./types').ContextMenus>;
31
31
  contextMenuProps: import('vue').PropType<import('../ele-app/plus').EleDropdownProps>;
32
- locale: import('vue').PropType<Partial<FileListLocale>>;
32
+ locale: import('vue').PropType<Partial<import('./types').FileListLocale>>;
33
33
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
34
34
  itemClick: (_item: FileItem) => void;
35
35
  sortChange: (_sorter: SortValue) => void;
@@ -61,7 +61,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
61
61
  boxChoose: BooleanConstructor;
62
62
  contextMenus: import('vue').PropType<import('./types').ContextMenus>;
63
63
  contextMenuProps: import('vue').PropType<import('../ele-app/plus').EleDropdownProps>;
64
- locale: import('vue').PropType<Partial<FileListLocale>>;
64
+ locale: import('vue').PropType<Partial<import('./types').FileListLocale>>;
65
65
  }>> & Readonly<{
66
66
  onItemClick?: ((_item: FileItem) => any) | undefined;
67
67
  onSortChange?: ((_sorter: SortValue) => any) | undefined;
@@ -2,6 +2,8 @@ import { PropType } from 'vue';
2
2
  import { StyleValue } from '../../ele-app/types';
3
3
  import { ElEmptyProps } from '../../ele-app/el';
4
4
  import { EleTooltipProps } from '../../ele-app/plus';
5
+ import { PopperType } from '../../ele-basic-select/types';
6
+ import { ItemTooltip } from '../types';
5
7
 
6
8
  declare function __VLS_template(): {
7
9
  icon?(_: {
@@ -20,7 +22,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
20
22
  /** 空组件属性 */
21
23
  emptyProps: PropType<ElEmptyProps>;
22
24
  /** 是否显示提示 */
23
- tooltip: BooleanConstructor;
25
+ tooltip: PropType<ItemTooltip>;
24
26
  /** 提示属性 */
25
27
  tooltipProps: PropType<EleTooltipProps>;
26
28
  /** 气泡是否展开 */
@@ -29,6 +31,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
29
31
  gridStyle: PropType<StyleValue>;
30
32
  /** 图标样式 */
31
33
  itemStyle: PropType<StyleValue>;
34
+ /** 下拉组件类型 */
35
+ popperType: PropType<PopperType>;
32
36
  }>, {
33
37
  hideTooltip: () => void;
34
38
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -44,7 +48,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
44
48
  /** 空组件属性 */
45
49
  emptyProps: PropType<ElEmptyProps>;
46
50
  /** 是否显示提示 */
47
- tooltip: BooleanConstructor;
51
+ tooltip: PropType<ItemTooltip>;
48
52
  /** 提示属性 */
49
53
  tooltipProps: PropType<EleTooltipProps>;
50
54
  /** 气泡是否展开 */
@@ -53,10 +57,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
53
57
  gridStyle: PropType<StyleValue>;
54
58
  /** 图标样式 */
55
59
  itemStyle: PropType<StyleValue>;
60
+ /** 下拉组件类型 */
61
+ popperType: PropType<PopperType>;
56
62
  }>> & Readonly<{
57
63
  onSelect?: ((_icon: string) => any) | undefined;
58
64
  }>, {
59
- tooltip: boolean;
60
65
  popperVisible: boolean;
61
66
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
62
67
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
@@ -1,8 +1,12 @@
1
- import { defineComponent, ref, watch, createBlock, openBlock, unref, withCtx, createElementVNode, createElementBlock, createCommentVNode, createVNode, normalizeStyle, Fragment, renderList, normalizeClass, renderSlot, mergeProps } from "vue";
1
+ import { defineComponent, ref, watch, createBlock, openBlock, unref, withCtx, createElementVNode, createElementBlock, createCommentVNode, normalizeStyle, normalizeClass, Fragment, renderList, renderSlot, toDisplayString, createVNode, mergeProps } from "vue";
2
2
  import { ElScrollbar, ElEmpty } from "element-plus";
3
3
  import EleTooltip from "../../ele-tooltip/index";
4
4
  const _hoisted_1 = ["title", "onClick", "onMouseover"];
5
5
  const _hoisted_2 = {
6
+ key: 0,
7
+ class: "ele-icon-select-item-name"
8
+ };
9
+ const _hoisted_3 = {
6
10
  key: 0,
7
11
  class: "ele-icon-select-empty"
8
12
  };
@@ -20,7 +24,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
24
  /** 空组件属性 */
21
25
  emptyProps: Object,
22
26
  /** 是否显示提示 */
23
- tooltip: Boolean,
27
+ tooltip: [Boolean, String],
24
28
  /** 提示属性 */
25
29
  tooltipProps: Object,
26
30
  /** 气泡是否展开 */
@@ -28,7 +32,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
32
  /** 网格样式 */
29
33
  gridStyle: Object,
30
34
  /** 图标样式 */
31
- itemStyle: Object
35
+ itemStyle: Object,
36
+ /** 下拉组件类型 */
37
+ popperType: String
32
38
  },
33
39
  emits: {
34
40
  select: (_icon) => true
@@ -46,7 +52,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
52
  updateTooltipVisible(false);
47
53
  };
48
54
  const handleItemHover = (icon, e) => {
49
- if (props.tooltip && props.popperVisible && icon) {
55
+ if (props.tooltip === true && (props.popperVisible || props.popperType === "default") && icon) {
50
56
  virtualRef.value = e.currentTarget;
51
57
  tooltipContent.value = icon;
52
58
  tooltipVisible.value = true;
@@ -70,14 +76,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
70
76
  return openBlock(), createBlock(unref(ElScrollbar), { class: "ele-icon-select-body" }, {
71
77
  default: withCtx(() => [
72
78
  createElementVNode("div", {
73
- class: "ele-icon-select-grid",
79
+ class: normalizeClass(["ele-icon-select-grid", { "is-loose": __props.tooltip === "static" }]),
74
80
  style: normalizeStyle(__props.gridStyle)
75
81
  }, [
76
82
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.data, (d, i) => {
77
83
  return openBlock(), createElementBlock("div", {
78
84
  key: i + "-" + d,
79
85
  class: normalizeClass(["ele-icon-select-item", { "is-active": __props.icon && d === __props.icon }]),
80
- title: __props.tooltip ? void 0 : d,
86
+ title: !__props.tooltip || __props.tooltip === "static" ? d : void 0,
81
87
  style: normalizeStyle(__props.itemStyle),
82
88
  onClick: ($event) => handleItemClick(d),
83
89
  onMouseover: (e) => handleItemHover(d, e)
@@ -85,24 +91,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
85
91
  renderSlot(_ctx.$slots, "icon", {
86
92
  icon: d,
87
93
  prefix: false
88
- })
94
+ }),
95
+ __props.tooltip === "static" ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(d), 1)) : createCommentVNode("", true)
89
96
  ], 46, _hoisted_1);
90
97
  }), 128))
91
- ], 4),
92
- !__props.data || !__props.data.length ? (openBlock(), createElementBlock("div", _hoisted_2, [
98
+ ], 6),
99
+ !__props.data || !__props.data.length ? (openBlock(), createElementBlock("div", _hoisted_3, [
93
100
  createVNode(unref(ElEmpty), mergeProps({ imageSize: 60 }, __props.emptyProps || {}), null, 16)
94
101
  ])) : createCommentVNode("", true),
95
- createVNode(EleTooltip, mergeProps({
102
+ __props.tooltip === true ? (openBlock(), createBlock(EleTooltip, mergeProps({
103
+ key: 1,
96
104
  placement: "top",
97
105
  offset: 6,
98
- teleported: false
106
+ teleported: __props.popperType !== "popper"
99
107
  }, __props.tooltipProps || {}, {
100
108
  visible: tooltipVisible.value,
101
109
  content: tooltipContent.value,
102
110
  virtualRef: virtualRef.value,
103
111
  virtualTriggering: true,
104
112
  "onUpdate:visible": updateTooltipVisible
105
- }), null, 16, ["visible", "content", "virtualRef"])
113
+ }), null, 16, ["teleported", "visible", "content", "virtualRef"])) : createCommentVNode("", true)
106
114
  ]),
107
115
  _: 3
108
116
  });
@@ -1,4 +1,3 @@
1
- import { StyleValue } from '../ele-app/types';
2
1
  import { EleBasicSelectInstance } from '../ele-app/plus';
3
2
  import { IconItem } from './types';
4
3
 
@@ -19,6 +18,23 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
19
18
  placeholder: StringConstructor;
20
19
  automaticDropdown: BooleanConstructor;
21
20
  filterable: import('vue').PropType<boolean | "popper">;
21
+ selectStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
22
+ inputStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
23
+ selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
24
+ popperClass: StringConstructor;
25
+ popperWidth: {
26
+ type: (StringConstructor | NumberConstructor)[];
27
+ default: number;
28
+ };
29
+ popperHeight: {
30
+ type: (StringConstructor | NumberConstructor)[];
31
+ default: number;
32
+ };
33
+ popperType: {
34
+ type: import('vue').PropType<import('../ele-basic-select/types').PopperType>;
35
+ default: string;
36
+ };
37
+ popperProps: import('vue').PropType<import('../ele-basic-select/types').PopperProps>;
22
38
  teleported: {
23
39
  type: BooleanConstructor;
24
40
  default: boolean;
@@ -36,38 +52,21 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
36
52
  default: string;
37
53
  };
38
54
  popperOptions: import('vue').PropType<import('../ele-app/plus').EleTooltipProps["popperOptions"]>;
39
- popperClass: StringConstructor;
40
- popperWidth: {
41
- type: (StringConstructor | NumberConstructor)[];
42
- default: number;
43
- };
44
- popperHeight: {
45
- type: (StringConstructor | NumberConstructor)[];
46
- default: number;
47
- };
48
- selectStyle: import('vue').PropType<StyleValue>;
49
- inputStyle: import('vue').PropType<StyleValue>;
50
- selectTagsStyle: import('vue').PropType<StyleValue>;
51
- hideOnSingleTab: BooleanConstructor;
52
- emptyProps: import('vue').PropType<import('../ele-app/el').ElEmptyProps>;
55
+ filterPlaceholder: StringConstructor;
53
56
  tooltip: {
54
- type: BooleanConstructor;
57
+ type: import('vue').PropType<import('./types').ItemTooltip>;
55
58
  default: boolean;
56
59
  };
57
60
  tooltipProps: import('vue').PropType<import('../ele-app/plus').EleTooltipProps>;
58
- headerStyle: import('vue').PropType<StyleValue>;
59
- tabsStyle: import('vue').PropType<StyleValue>;
60
- searchStyle: import('vue').PropType<StyleValue>;
61
- menusStyle: import('vue').PropType<StyleValue>;
62
- bodyStyle: import('vue').PropType<StyleValue>;
63
- gridStyle: import('vue').PropType<StyleValue>;
64
- itemStyle: import('vue').PropType<StyleValue>;
65
- filterPlaceholder: {
66
- type: StringConstructor;
67
- default: string;
68
- };
69
- popperType: import('vue').PropType<import('../ele-basic-select/types').PopperType>;
70
- popperProps: import('vue').PropType<import('../ele-basic-select/types').PopperProps>;
61
+ emptyProps: import('vue').PropType<import('../ele-app/el').ElEmptyProps>;
62
+ hideOnSingleTab: BooleanConstructor;
63
+ headerStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
64
+ tabsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
65
+ searchStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
66
+ menusStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
67
+ bodyStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
68
+ gridStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
69
+ itemStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
71
70
  responsive: {
72
71
  type: BooleanConstructor;
73
72
  default: null;
@@ -91,6 +90,23 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
91
90
  placeholder: StringConstructor;
92
91
  automaticDropdown: BooleanConstructor;
93
92
  filterable: import('vue').PropType<boolean | "popper">;
93
+ selectStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
94
+ inputStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
95
+ selectTagsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
96
+ popperClass: StringConstructor;
97
+ popperWidth: {
98
+ type: (StringConstructor | NumberConstructor)[];
99
+ default: number;
100
+ };
101
+ popperHeight: {
102
+ type: (StringConstructor | NumberConstructor)[];
103
+ default: number;
104
+ };
105
+ popperType: {
106
+ type: import('vue').PropType<import('../ele-basic-select/types').PopperType>;
107
+ default: string;
108
+ };
109
+ popperProps: import('vue').PropType<import('../ele-basic-select/types').PopperProps>;
94
110
  teleported: {
95
111
  type: BooleanConstructor;
96
112
  default: boolean;
@@ -108,38 +124,21 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
108
124
  default: string;
109
125
  };
110
126
  popperOptions: import('vue').PropType<import('../ele-app/plus').EleTooltipProps["popperOptions"]>;
111
- popperClass: StringConstructor;
112
- popperWidth: {
113
- type: (StringConstructor | NumberConstructor)[];
114
- default: number;
115
- };
116
- popperHeight: {
117
- type: (StringConstructor | NumberConstructor)[];
118
- default: number;
119
- };
120
- selectStyle: import('vue').PropType<StyleValue>;
121
- inputStyle: import('vue').PropType<StyleValue>;
122
- selectTagsStyle: import('vue').PropType<StyleValue>;
123
- hideOnSingleTab: BooleanConstructor;
124
- emptyProps: import('vue').PropType<import('../ele-app/el').ElEmptyProps>;
127
+ filterPlaceholder: StringConstructor;
125
128
  tooltip: {
126
- type: BooleanConstructor;
129
+ type: import('vue').PropType<import('./types').ItemTooltip>;
127
130
  default: boolean;
128
131
  };
129
132
  tooltipProps: import('vue').PropType<import('../ele-app/plus').EleTooltipProps>;
130
- headerStyle: import('vue').PropType<StyleValue>;
131
- tabsStyle: import('vue').PropType<StyleValue>;
132
- searchStyle: import('vue').PropType<StyleValue>;
133
- menusStyle: import('vue').PropType<StyleValue>;
134
- bodyStyle: import('vue').PropType<StyleValue>;
135
- gridStyle: import('vue').PropType<StyleValue>;
136
- itemStyle: import('vue').PropType<StyleValue>;
137
- filterPlaceholder: {
138
- type: StringConstructor;
139
- default: string;
140
- };
141
- popperType: import('vue').PropType<import('../ele-basic-select/types').PopperType>;
142
- popperProps: import('vue').PropType<import('../ele-basic-select/types').PopperProps>;
133
+ emptyProps: import('vue').PropType<import('../ele-app/el').ElEmptyProps>;
134
+ hideOnSingleTab: BooleanConstructor;
135
+ headerStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
136
+ tabsStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
137
+ searchStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
138
+ menusStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
139
+ bodyStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
140
+ gridStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
141
+ itemStyle: import('vue').PropType<import('../ele-app/types').StyleValue>;
143
142
  responsive: {
144
143
  type: BooleanConstructor;
145
144
  default: null;
@@ -157,13 +156,13 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
157
156
  disabled: boolean;
158
157
  clearable: boolean;
159
158
  persistent: boolean;
160
- tooltip: boolean;
159
+ tooltip: import('./types').ItemTooltip;
161
160
  transition: string;
162
161
  automaticDropdown: boolean;
163
- filterPlaceholder: string;
164
162
  responsive: boolean;
165
163
  popperWidth: string | number;
166
164
  popperHeight: string | number;
165
+ popperType: import('../ele-basic-select/types').PopperType;
167
166
  hideOnSingleTab: boolean;
168
167
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
169
168
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
@@ -1,5 +1,6 @@
1
- import { defineComponent, ref, computed, watch, createBlock, openBlock, createSlots, withCtx, createElementVNode, normalizeStyle, createElementBlock, createCommentVNode, renderSlot, Fragment, renderList, normalizeClass, toDisplayString, createVNode, unref, normalizeProps, guardReactiveProps } from "vue";
1
+ import { defineComponent, ref, computed, watch, createBlock, openBlock, unref, createSlots, withCtx, createElementBlock, createCommentVNode, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, normalizeClass, toDisplayString, createVNode, normalizeProps, guardReactiveProps } from "vue";
2
2
  import { ElInput } from "element-plus";
3
+ import { useLocale } from "../ele-config-provider/receiver";
3
4
  import { useResponsive } from "../ele-pro-layout/util";
4
5
  import EleBasicSelect from "../ele-basic-select/index";
5
6
  import { useFormValidate, valueIsChanged } from "../ele-basic-select/util";
@@ -17,6 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
18
  setup(__props, { expose: __expose, emit: __emit }) {
18
19
  const props = __props;
19
20
  const emit = __emit;
21
+ const { lang } = useLocale("iconSelect", props);
20
22
  const { validateChange } = useFormValidate();
21
23
  const isResponsive = useResponsive(props);
22
24
  const selectRef = ref(null);
@@ -36,24 +38,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
36
38
  }
37
39
  return true;
38
40
  });
41
+ const showFilterInput = computed(() => {
42
+ if (props.filterable === true && props.popperType !== "popper") {
43
+ return true;
44
+ }
45
+ return props.filterable === "popper";
46
+ });
39
47
  const selectPopperClass = computed(() => {
48
+ var _a;
40
49
  const classes = ["ele-icon-select-popper"];
41
- if (isResponsive.value) {
42
- classes.push("is-responsive");
50
+ if (props.popperType === "default") {
51
+ classes.push("is-icon-select-default");
52
+ }
53
+ if (props.popperType === "modal" && (tabBar.value || showFilterInput.value || ((_a = menus.value) == null ? void 0 : _a.length))) {
54
+ classes.push("is-show-header-border");
55
+ }
56
+ if (isResponsive.value && props.popperType === "popper") {
57
+ classes.push("is-icon-select-responsive");
43
58
  }
44
59
  if (props.popperClass) {
45
60
  classes.push(props.popperClass);
46
61
  }
47
62
  return classes.join(" ");
48
63
  });
49
- const iconPopperStyle = computed(() => {
50
- if (!props.popperHeight) {
51
- return;
52
- }
53
- return {
54
- height: typeof props.popperHeight === "number" ? `${props.popperHeight}px` : props.popperHeight
55
- };
56
- });
57
64
  const updatePopover = () => {
58
65
  selectRef.value && selectRef.value.updatePopper();
59
66
  };
@@ -196,15 +203,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
196
203
  persistent: _ctx.persistent,
197
204
  placement: _ctx.placement,
198
205
  transition: _ctx.transition,
199
- popperWidth: _ctx.popperWidth,
200
206
  popperOptions: _ctx.popperOptions,
201
- popperClass: selectPopperClass.value,
202
207
  selectClass: "is-icon-select",
203
208
  selectStyle: _ctx.selectStyle,
204
209
  inputStyle: _ctx.inputStyle,
205
210
  selectTagsStyle: _ctx.selectTagsStyle,
211
+ popperClass: selectPopperClass.value,
212
+ popperWidth: _ctx.popperWidth,
213
+ popperHeight: _ctx.popperHeight,
206
214
  popperType: _ctx.popperType,
207
215
  popperProps: _ctx.popperProps,
216
+ popperTitle: unref(lang).title,
217
+ responsive: unref(isResponsive),
208
218
  selectedLabel: _ctx.modelValue,
209
219
  visible: selectVisible.value,
210
220
  "onUpdate:visible": updateVisible,
@@ -214,82 +224,78 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
214
224
  onBlur: handleSelectBlur
215
225
  }, createSlots({
216
226
  default: withCtx(() => [
217
- createElementVNode("div", {
218
- class: "ele-icon-select",
219
- style: normalizeStyle(iconPopperStyle.value)
227
+ tabBar.value || showFilterInput.value ? (openBlock(), createElementBlock("div", {
228
+ key: 0,
229
+ class: "ele-icon-select-header",
230
+ style: normalizeStyle(_ctx.headerStyle)
220
231
  }, [
221
- tabBar.value || _ctx.filterable === "popper" ? (openBlock(), createElementBlock("div", {
232
+ renderSlot(_ctx.$slots, "tabLeftExtra"),
233
+ tabBar.value ? (openBlock(), createElementBlock("div", {
222
234
  key: 0,
223
- class: "ele-icon-select-header",
224
- style: normalizeStyle(_ctx.headerStyle)
235
+ class: "ele-icon-select-tabs",
236
+ style: normalizeStyle(_ctx.tabsStyle)
237
+ }, [
238
+ (openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (t, i) => {
239
+ return openBlock(), createElementBlock("div", {
240
+ key: i + "-" + t,
241
+ class: normalizeClass(["ele-icon-select-tab", { "is-active": i === tabActive.value }]),
242
+ onClick: ($event) => handleTabClick(i)
243
+ }, toDisplayString(t), 11, _hoisted_1);
244
+ }), 128))
245
+ ], 4)) : createCommentVNode("", true),
246
+ showFilterInput.value ? (openBlock(), createElementBlock("div", {
247
+ key: 1,
248
+ class: "ele-icon-select-search",
249
+ style: normalizeStyle(_ctx.searchStyle)
225
250
  }, [
226
- renderSlot(_ctx.$slots, "tabLeftExtra"),
227
- tabBar.value ? (openBlock(), createElementBlock("div", {
228
- key: 0,
229
- class: "ele-icon-select-tabs",
230
- style: normalizeStyle(_ctx.tabsStyle)
231
- }, [
232
- (openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (t, i) => {
233
- return openBlock(), createElementBlock("div", {
234
- key: i + "-" + t,
235
- class: normalizeClass(["ele-icon-select-tab", { "is-active": i === tabActive.value }]),
236
- onClick: ($event) => handleTabClick(i)
237
- }, toDisplayString(t), 11, _hoisted_1);
238
- }), 128))
239
- ], 4)) : createCommentVNode("", true),
240
- _ctx.filterable === "popper" ? (openBlock(), createElementBlock("div", {
241
- key: 1,
242
- class: "ele-icon-select-search",
243
- style: normalizeStyle(_ctx.searchStyle)
244
- }, [
245
- createVNode(unref(ElInput), {
246
- size: "small",
247
- clearable: true,
248
- modelValue: keywords.value,
249
- validateEvent: false,
250
- prefixIcon: unref(SearchOutlined),
251
- placeholder: _ctx.filterPlaceholder,
252
- "onUpdate:modelValue": handleSelectFilter
253
- }, null, 8, ["modelValue", "prefixIcon", "placeholder"])
254
- ], 4)) : createCommentVNode("", true),
255
- renderSlot(_ctx.$slots, "tabRightExtra")
251
+ createVNode(unref(ElInput), {
252
+ size: "small",
253
+ clearable: true,
254
+ modelValue: keywords.value,
255
+ validateEvent: false,
256
+ prefixIcon: unref(SearchOutlined),
257
+ placeholder: _ctx.filterPlaceholder ?? unref(lang).searchPlaceholder,
258
+ "onUpdate:modelValue": handleSelectFilter
259
+ }, null, 8, ["modelValue", "prefixIcon", "placeholder"])
256
260
  ], 4)) : createCommentVNode("", true),
257
- createElementVNode("div", _hoisted_2, [
258
- menus.value && menus.value.length ? (openBlock(), createElementBlock("div", {
259
- key: 0,
260
- class: "ele-icon-select-menus",
261
- style: normalizeStyle(_ctx.menusStyle)
262
- }, [
263
- (openBlock(true), createElementBlock(Fragment, null, renderList(menus.value, (m, i) => {
264
- return openBlock(), createElementBlock("div", {
265
- key: i + "-" + m,
266
- class: normalizeClass(["ele-icon-select-menu", { "is-active": i === menuActive.value }]),
267
- onClick: ($event) => handleMenuClick(i)
268
- }, toDisplayString(m), 11, _hoisted_3);
269
- }), 128))
270
- ], 4)) : createCommentVNode("", true),
271
- createVNode(IconGrid, {
272
- data: icons.value,
273
- icon: _ctx.modelValue,
274
- emptyProps: _ctx.emptyProps,
275
- tooltip: _ctx.tooltip,
276
- tooltipProps: _ctx.tooltipProps,
277
- popperVisible: selectVisible.value,
278
- gridStyle: _ctx.gridStyle,
279
- itemStyle: _ctx.itemStyle,
280
- style: normalizeStyle(_ctx.bodyStyle),
281
- onSelect: handleIconSelect
282
- }, createSlots({ _: 2 }, [
283
- _ctx.$slots.icon ? {
284
- name: "icon",
285
- fn: withCtx((slotProps) => [
286
- renderSlot(_ctx.$slots, "icon", normalizeProps(guardReactiveProps(slotProps || {})))
287
- ]),
288
- key: "0"
289
- } : void 0
290
- ]), 1032, ["data", "icon", "emptyProps", "tooltip", "tooltipProps", "popperVisible", "gridStyle", "itemStyle", "style"])
291
- ])
292
- ], 4)
261
+ renderSlot(_ctx.$slots, "tabRightExtra")
262
+ ], 4)) : createCommentVNode("", true),
263
+ createElementVNode("div", _hoisted_2, [
264
+ menus.value && menus.value.length ? (openBlock(), createElementBlock("div", {
265
+ key: 0,
266
+ class: "ele-icon-select-menus",
267
+ style: normalizeStyle(_ctx.menusStyle)
268
+ }, [
269
+ (openBlock(true), createElementBlock(Fragment, null, renderList(menus.value, (m, i) => {
270
+ return openBlock(), createElementBlock("div", {
271
+ key: i + "-" + m,
272
+ class: normalizeClass(["ele-icon-select-menu", { "is-active": i === menuActive.value }]),
273
+ onClick: ($event) => handleMenuClick(i)
274
+ }, toDisplayString(m), 11, _hoisted_3);
275
+ }), 128))
276
+ ], 4)) : createCommentVNode("", true),
277
+ createVNode(IconGrid, {
278
+ data: icons.value,
279
+ icon: _ctx.modelValue,
280
+ emptyProps: _ctx.emptyProps,
281
+ tooltip: _ctx.tooltip,
282
+ tooltipProps: _ctx.tooltipProps,
283
+ popperVisible: selectVisible.value,
284
+ gridStyle: _ctx.gridStyle,
285
+ itemStyle: _ctx.itemStyle,
286
+ popperType: _ctx.popperType,
287
+ style: normalizeStyle(_ctx.bodyStyle),
288
+ onSelect: handleIconSelect
289
+ }, createSlots({ _: 2 }, [
290
+ _ctx.$slots.icon ? {
291
+ name: "icon",
292
+ fn: withCtx((slotProps) => [
293
+ renderSlot(_ctx.$slots, "icon", normalizeProps(guardReactiveProps(slotProps || {})))
294
+ ]),
295
+ key: "0"
296
+ } : void 0
297
+ ]), 1032, ["data", "icon", "emptyProps", "tooltip", "tooltipProps", "popperVisible", "gridStyle", "itemStyle", "popperType", "style"])
298
+ ])
293
299
  ]),
294
300
  _: 2
295
301
  }, [
@@ -303,7 +309,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
303
309
  ]),
304
310
  key: "0"
305
311
  } : void 0
306
- ]), 1032, ["value", "disabled", "size", "clearable", "placeholder", "automaticDropdown", "filterable", "teleported", "persistent", "placement", "transition", "popperWidth", "popperOptions", "popperClass", "selectStyle", "inputStyle", "selectTagsStyle", "popperType", "popperProps", "selectedLabel", "visible"]);
312
+ ]), 1032, ["value", "disabled", "size", "clearable", "placeholder", "automaticDropdown", "filterable", "teleported", "persistent", "placement", "transition", "popperOptions", "selectStyle", "inputStyle", "selectTagsStyle", "popperClass", "popperWidth", "popperHeight", "popperType", "popperProps", "popperTitle", "responsive", "selectedLabel", "visible"]);
307
313
  };
308
314
  }
309
315
  });