@imengyu/vue3-context-menu 1.1.2 → 1.1.3
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/README.CN.md +51 -3
- package/README.md +53 -3
- package/examples/index.html +3 -2
- package/examples/views/BasicComponent.vue +1 -1
- package/examples/views/BasicCustomize.vue +1 -1
- package/examples/views/BasicUseage.vue +16 -2
- package/index.d.ts +22 -2
- package/lib/vue3-context-menu.common.js +80 -33
- package/lib/vue3-context-menu.common.js.map +1 -1
- package/lib/vue3-context-menu.css +1 -1
- package/lib/vue3-context-menu.umd.js +80 -33
- package/lib/vue3-context-menu.umd.js.map +1 -1
- package/lib/vue3-context-menu.umd.min.js +1 -1
- package/lib/vue3-context-menu.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/ContextMenu.vue +1 -0
- package/src/ContextMenuDefine.ts +4 -1
- package/src/ContextMenuGroup.vue +1 -0
- package/src/ContextMenuItem.vue +39 -9
- package/src/ContextSubMenu.vue +17 -3
- package/CHANGELOG.md +0 -28
package/README.CN.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
### ❗ 重大升级
|
|
19
19
|
|
|
20
|
-
版本 1.1.0
|
|
20
|
+
版本 1.1.0 做了很大升级,如果您从之前的版本升级过来,可能会存在与之前版本不兼容的情况,你需要参考文档修改菜单的数据格式。如果出现问题,请安装 1.0.9 版本。
|
|
21
21
|
|
|
22
22
|
## 安装
|
|
23
23
|
|
|
@@ -121,9 +121,46 @@ methods: {
|
|
|
121
121
|
|
|
122
122
|
## 菜单图标
|
|
123
123
|
|
|
124
|
-
菜单组件不提供任何图标,如果您想添加图标,推荐使用 [iconfont](http://iconfont.cn)
|
|
124
|
+
菜单组件不提供任何图标,如果您想添加图标,推荐使用 [iconfont](http://iconfont.cn) 图标库。
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
### 字体图标
|
|
127
|
+
|
|
128
|
+
使用 iconfont 图标库,导入字体后填写 `MenuItem` 的 `icon` 属性,即可在菜单项前面显示图标。
|
|
129
|
+
|
|
130
|
+
* 如果字体名称不一样,可用 `MenuItem` 或者 `MenuOptions` 的 `iconFontClass` 属性指定其他字体。
|
|
131
|
+
* 默认使用 `<i>` 元素来显示图标。
|
|
132
|
+
|
|
133
|
+
### SVG 图标
|
|
134
|
+
|
|
135
|
+
支持使用 svg symbol 来显示图标:
|
|
136
|
+
|
|
137
|
+
```html
|
|
138
|
+
<svg viewBox="0 0 80 20" xmlns="http://www.w3.org/2000/svg">
|
|
139
|
+
<!-- Your icon -->
|
|
140
|
+
<symbol id="icon-multiply" viewBox="0 0 1024 1024">
|
|
141
|
+
<path d="M512 64C264.608 64 64 264.608 64 512c0 247.36 200.608 448 448 448 247.36 0 448-200.64 448-448 0-247.392-200.64-448-448-448z m158.4 651.552L512 557.312l-158.4 158.24-45.312-45.248L466.688 512l-158.304-158.4 45.312-45.312L512 466.688l158.4-158.4 45.28 45.312L557.312 512l158.368 158.4-45.28 45.152z" fill="#F74A21"></path>
|
|
142
|
+
</symbol>
|
|
143
|
+
</svg>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
```js
|
|
147
|
+
this.$contextmenu({
|
|
148
|
+
items: [
|
|
149
|
+
{
|
|
150
|
+
label: "Item with svg icon",
|
|
151
|
+
svgIcon: "#icon-multiply",
|
|
152
|
+
svgProps: {
|
|
153
|
+
fill: '#f60',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
//...省略
|
|
158
|
+
} as MenuOptions);
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
> 注:使用 iconfont 库导出的图标库,会附带 `iconfont.js` ,你只需要在 html 中引入这个js,他会自动为你导入所有的 svg symbol,你可直接复制图标名称使用。
|
|
162
|
+
|
|
163
|
+
### 自定义渲染
|
|
127
164
|
|
|
128
165
|
你也可以通过菜单的插槽来完全自定义渲染图标,如:
|
|
129
166
|
|
|
@@ -219,6 +256,8 @@ import '你的样式css文件路径.css'
|
|
|
219
256
|
| 属性名 | 描述 | 类型 |
|
|
220
257
|
| :----: | :----: | :----: |
|
|
221
258
|
| theme | 菜单主题 | `'light' 'dark'` |
|
|
259
|
+
| isOpen | 指示当前菜单子菜单是否处于打开状态 | `boolean` |
|
|
260
|
+
| hasChildren | 指示当前菜单是否有子级菜单 | `boolean` |
|
|
222
261
|
| onClick | 自定义元素的点击事件回调,它用于菜单内部事件处理,当自定义渲染时,请回调此函数,否则菜单无法正常响应事件 | - |
|
|
223
262
|
| onMouseEnter | 自定义元素的鼠标移入事件回调,它用于菜单内部事件处理,当自定义渲染时,请回调此函数,否则菜单无法正常响应事件 | - |
|
|
224
263
|
| ... | 其他参数与 `MenuItem` 一致 | - |
|
|
@@ -235,6 +274,9 @@ import '你的样式css文件路径.css'
|
|
|
235
274
|
| :----: | :----: | :----: | :----: |
|
|
236
275
|
| label | 菜单项名称 | `string` | — |
|
|
237
276
|
| icon | 菜单项图标 | `string` | — |
|
|
277
|
+
| iconFontClass | 自定义图标字体类名 | `string` | — | `iconfont` |
|
|
278
|
+
| svgIcon | 菜单项图标 svg,仅在 icon 为空时有效 | `string` | — | — |
|
|
279
|
+
| svgProps | 当使用 svg 图标时,自定义 svg 标签属性 | `SVGAttributes` | — | — |
|
|
238
280
|
| disabled | 是否禁用菜单项 | `boolean` | `false` |
|
|
239
281
|
| clickableWhenHasChildren | 指定当本菜单下有子菜单时,点击当前菜单是否触发点击事件 | `boolean` | `false` |
|
|
240
282
|
| clickClose | 点击当前菜单项是否自动关闭整个菜单 | `boolean` | `true` |
|
|
@@ -268,6 +310,9 @@ import '你的样式css文件路径.css'
|
|
|
268
310
|
| :----: | :----: | :----: | :----: |
|
|
269
311
|
| label | 菜单项名称 | `string` | — |
|
|
270
312
|
| icon | 菜单项图标 | `string` | — |
|
|
313
|
+
| iconFontClass | 自定义图标字体类名 | `string` | — | `iconfont` |
|
|
314
|
+
| svgIcon | 菜单项图标 svg,仅在 icon 为空时有效 | `string` | — | — |
|
|
315
|
+
| svgProps | 当使用 svg 图标时,自定义 svg 标签属性 | `SVGAttributes` | — | — |
|
|
271
316
|
| disabled | 是否禁用菜单项 | `boolean` | `false` |
|
|
272
317
|
| clickableWhenHasChildren | 指定当本菜单下有子菜单时,点击当前菜单是否触发点击事件 | `boolean` | `false` |
|
|
273
318
|
| adjustSubMenuPosition | 是否在子菜单超出屏幕后进行自动调整 | `boolean` | `true` |
|
|
@@ -335,6 +380,9 @@ import '你的样式css文件路径.css'
|
|
|
335
380
|
| :----: | :----: | :----: | :----: | :----: |
|
|
336
381
|
| label | 菜单项名称,可传入VNode | `string` or `VNode` or `((label: string) => VNode)` | — | — |
|
|
337
382
|
| icon | 菜单项图标,可传入VNode | `string` or `VNode` or `((icon: string) => VNode)` | — | — |
|
|
383
|
+
| iconFontClass | 自定义图标字体类名 | `string` | — | `iconfont` |
|
|
384
|
+
| svgIcon | 菜单项图标 svg,仅在 icon 为空时有效 | `string` | — | — |
|
|
385
|
+
| svgProps | 当使用 svg 图标时,自定义 svg 标签属性 | `SVGAttributes` | — | — |
|
|
338
386
|
| disabled | 是否禁用菜单项 | `boolean` | — | `false` |
|
|
339
387
|
| adjustSubMenuPosition | 是否在子菜单超出屏幕后进行自动调整 | `boolean` | — | `true` |
|
|
340
388
|
| clickableWhenHasChildren | 指定当本菜单下有子菜单时,点击当前菜单是否触发点击事件 | `boolean` | — | `false` |
|
package/README.md
CHANGED
|
@@ -122,11 +122,50 @@ methods: {
|
|
|
122
122
|
|
|
123
123
|
## Menu icon
|
|
124
124
|
|
|
125
|
-
The menu component does not provide any icons. If you want to add an icon, it is recommended to use [iconfont](http://iconfont.cn) Icon library.
|
|
125
|
+
The menu component does not provide any icons. If you want to add an icon, it is recommended to use [iconfont](http://iconfont.cn) Icon library.
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
### Font icon
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
Use iconfont library: After importing, fill in the `icon` attribute of `MenuItem` to display the icon in front of the menu item.
|
|
130
|
+
|
|
131
|
+
* If the font names are different, you can specify other fonts by writing the `iconFontClass` attribute of `MenuItem` or `MenuOptions`.
|
|
132
|
+
* By default, the `<i>` element is used to display icons
|
|
133
|
+
|
|
134
|
+
### SVG Icon
|
|
135
|
+
|
|
136
|
+
Support the use of svg `<symbol>` to display icons:
|
|
137
|
+
|
|
138
|
+
```html
|
|
139
|
+
<svg viewBox="0 0 80 20" xmlns="http://www.w3.org/2000/svg">
|
|
140
|
+
<!-- Your icon -->
|
|
141
|
+
<symbol id="icon-multiply" viewBox="0 0 1024 1024">
|
|
142
|
+
<path d="M512 64C264.608 64 64 264.608 64 512c0 247.36 200.608 448 448 448 247.36 0 448-200.64 448-448 0-247.392-200.64-448-448-448z m158.4 651.552L512 557.312l-158.4 158.24-45.312-45.248L466.688 512l-158.304-158.4 45.312-45.312L512 466.688l158.4-158.4 45.28 45.312L557.312 512l158.368 158.4-45.28 45.152z" fill="#F74A21"></path>
|
|
143
|
+
</symbol>
|
|
144
|
+
</svg>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
```js
|
|
148
|
+
//Function mode
|
|
149
|
+
this.$contextmenu({
|
|
150
|
+
items: [
|
|
151
|
+
{
|
|
152
|
+
label: "Item with svg icon",
|
|
153
|
+
svgIcon: "#icon-multiply",
|
|
154
|
+
svgProps: {
|
|
155
|
+
fill: '#f60',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
//...
|
|
160
|
+
} as MenuOptions);
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
```js
|
|
164
|
+
//Component mode
|
|
165
|
+
<context-menu-item label="Item with svg icon" svgIcon="#icon-multiply" :svgProps="{ fill: '#f60' }" />
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Customize icon
|
|
130
169
|
|
|
131
170
|
You can also completely customize the rendering icon through the slot of the menu, such as:
|
|
132
171
|
|
|
@@ -219,6 +258,8 @@ Menu component.
|
|
|
219
258
|
| Property | Description | Type |
|
|
220
259
|
| :----: | :----: | :----: |
|
|
221
260
|
| theme | Menu theme | `'light' 'dark'` |
|
|
261
|
+
| isOpen | This value indicates whether the current menu submenu is open | `boolean` |
|
|
262
|
+
| hasChildren | This value indicates whether the current menu has submenus | `boolean` |
|
|
222
263
|
| onClick | Define the click event callback of the element, which is used for the internal event processing of the menu. When rendering item with slot, please call this function back, otherwise the menu cannot respond to the event normally | - |
|
|
223
264
|
| onMouseEnter | Mouse in event callback of custom element. When rendering item with slot, please call this function back, otherwise the menu cannot respond to the event normally | - |
|
|
224
265
|
| ... | Other arguments are same with `MenuItem` | - |
|
|
@@ -235,6 +276,9 @@ Menu item component.
|
|
|
235
276
|
| :----: | :----: | :----: | :----: |
|
|
236
277
|
| label | The label of menu. | `string` | — |
|
|
237
278
|
| icon | The icon for menu item. | `string` | — |
|
|
279
|
+
| iconFontClass | Custom icon library font class name. | `string` | — | `iconfont` |
|
|
280
|
+
| svgIcon | Display icons use svg symbol (`<use xlink:href="...">`) , only valid when icon attribute is empty. | `string` | — | — |
|
|
281
|
+
| svgProps | The user-defined attribute of the svg tag, which is valid when using `svgIcon`. | `SVGAttributes` | — | — |
|
|
238
282
|
| disabled | Disable menu item? | `boolean` | `false` |
|
|
239
283
|
| clickableWhenHasChildren | When there are subitems in this item, is it allowed to trigger its own click event? | `boolean` | `false` |
|
|
240
284
|
| clickClose | Should close menu when Click this menu item ? | `boolean` | `true` |
|
|
@@ -268,6 +312,9 @@ Submenu component.
|
|
|
268
312
|
| :----: | :----: | :----: | :----: |
|
|
269
313
|
| label | The label of menu. | `string` | — |
|
|
270
314
|
| icon | The icon for menu item. | `string` | — |
|
|
315
|
+
| iconFontClass | Custom icon library font class name. | `string` | — | `iconfont` |
|
|
316
|
+
| svgIcon | Display icons use svg symbol (`<use xlink:href="...">`) , only valid when icon attribute is empty. | `string` | — | — |
|
|
317
|
+
| svgProps | The user-defined attribute of the svg tag, which is valid when using `svgIcon`. | `SVGAttributes` | — | — |
|
|
271
318
|
| disabled | Disable menu item? | `boolean` | `false` |
|
|
272
319
|
| clickableWhenHasChildren | When there are subitems in this item, is it allowed to trigger its own click event? | `boolean` | `false` |
|
|
273
320
|
| adjustSubMenuPosition | Specifies should submenu adjust it position when the menu exceeds the screen.| `boolean` | `true` |
|
|
@@ -335,6 +382,9 @@ Menu separator component.
|
|
|
335
382
|
| :----: | :----: | :----: | :----: | :----: |
|
|
336
383
|
| label | The label of menu. | `string` or `VNode` or `((label: string) => VNode)` | — | — |
|
|
337
384
|
| icon | The icon for menu item. | `string` or `VNode` or `((icon: string) => VNode)` | — | — |
|
|
385
|
+
| iconFontClass | Custom icon library font class name. | `string` | — | `iconfont` |
|
|
386
|
+
| svgIcon | Display icons use svg symbol (`<use xlink:href="...">`) , only valid when icon attribute is empty. | `string` | — | — |
|
|
387
|
+
| svgProps | The user-defined attribute of the svg tag, which is valid when using `svgIcon`. | `SVGAttributes` | — | — |
|
|
338
388
|
| disabled | Disable menu item? | `boolean` | — | `false` |
|
|
339
389
|
| adjustSubMenuPosition | Specifies should submenu adjust it position when the menu exceeds the screen. | `boolean` | — | `true` |
|
|
340
390
|
| clickableWhenHasChildren | When there are subitems in this item, is it allowed to trigger its own click event? | `boolean` | — | `false` |
|
package/examples/index.html
CHANGED
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
7
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
|
8
8
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
9
|
-
<
|
|
10
|
-
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.0.1/highlight.min.js"></script>
|
|
9
|
+
<script src="https://imengyu.top/static/iconfont-small-test.js"></script>
|
|
11
10
|
</head>
|
|
12
11
|
<body>
|
|
13
12
|
<noscript>
|
|
@@ -16,5 +15,7 @@
|
|
|
16
15
|
<a href="https://github.com/imengyu/vue3-context-menu"><img style="position: absolute; top: 0; left: 0; border: 0; z-index: 100" src="https://camo.githubusercontent.com/82b228a3648bf44fc1163ef44c62fcc60081495e/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_red_aa0000.png"></a>
|
|
17
16
|
<div id="app"></div>
|
|
18
17
|
<!-- built files will be auto injected -->
|
|
18
|
+
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.0.1/highlight.min.js"></script>
|
|
19
|
+
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.0.1/styles/default.min.css">
|
|
19
20
|
</body>
|
|
20
21
|
</html>
|
|
@@ -91,7 +91,7 @@ export default defineComponent({
|
|
|
91
91
|
hljs: {
|
|
92
92
|
highlightAll: () => void
|
|
93
93
|
}
|
|
94
|
-
}).hljs
|
|
94
|
+
}).hljs?.highlightAll?.();
|
|
95
95
|
},
|
|
96
96
|
methods: {
|
|
97
97
|
test() {
|
|
@@ -140,7 +140,6 @@ export default defineComponent({
|
|
|
140
140
|
alert("You click Print");
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
|
|
144
143
|
{ label: "View source", icon: "icon-terminal" },
|
|
145
144
|
{ label: "Inspect" }
|
|
146
145
|
],
|
|
@@ -206,6 +205,21 @@ export default defineComponent({
|
|
|
206
205
|
},
|
|
207
206
|
]
|
|
208
207
|
},
|
|
208
|
+
{
|
|
209
|
+
label: 'Item with icon',
|
|
210
|
+
icon: "icon-reload-1",
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
label: "Item with svg icon",
|
|
214
|
+
svgIcon: "#icon-clock",
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
label: "Item with svg icon",
|
|
218
|
+
svgIcon: "#icon-multiply",
|
|
219
|
+
svgProps: {
|
|
220
|
+
fill: '#f60',
|
|
221
|
+
},
|
|
222
|
+
},
|
|
209
223
|
],
|
|
210
224
|
iconFontClass: 'iconfont',
|
|
211
225
|
customClass: "class-a",
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { App, Slot, VNode } from "vue";
|
|
1
|
+
import { App, Slot, SVGAttributes, VNode } from "vue";
|
|
2
2
|
|
|
3
3
|
declare module 'vue3-context-menu' {
|
|
4
4
|
}
|
|
@@ -44,7 +44,7 @@ export declare interface MenuOptions {
|
|
|
44
44
|
*/
|
|
45
45
|
customClass ?: string,
|
|
46
46
|
/**
|
|
47
|
-
* Custom icon library font class name.
|
|
47
|
+
* Custom icon library font class name. (global)
|
|
48
48
|
*/
|
|
49
49
|
iconFontClass ?: string,
|
|
50
50
|
/**
|
|
@@ -73,6 +73,18 @@ export declare interface MenuItem {
|
|
|
73
73
|
* The icon for menu item.
|
|
74
74
|
*/
|
|
75
75
|
icon ?: string|VNode|((icon: string) => VNode),
|
|
76
|
+
/**
|
|
77
|
+
* Custom icon library font class name.
|
|
78
|
+
*/
|
|
79
|
+
iconFontClass ?: string,
|
|
80
|
+
/**
|
|
81
|
+
* Display icons use svg symbol (`<use xlink:href="...">`) , only valid when icon attribute is empty.
|
|
82
|
+
*/
|
|
83
|
+
svgIcon ?: string,
|
|
84
|
+
/**
|
|
85
|
+
* The user-defined attribute of the svg tag, which is valid when using `svgIcon`.
|
|
86
|
+
*/
|
|
87
|
+
svgProps ?: SVGAttributes,
|
|
76
88
|
/**
|
|
77
89
|
* Disable menu item?
|
|
78
90
|
*/
|
|
@@ -125,6 +137,14 @@ export declare interface MenuItemRenderData extends Omit<MenuItem, 'children'|'c
|
|
|
125
137
|
* Global theme
|
|
126
138
|
*/
|
|
127
139
|
theme: 'light'|'dark',
|
|
140
|
+
/**
|
|
141
|
+
* This value indicates whether the current menu submenu is open
|
|
142
|
+
*/
|
|
143
|
+
isOpen: boolean,
|
|
144
|
+
/**
|
|
145
|
+
* This value indicates whether the current menu has submenus
|
|
146
|
+
*/
|
|
147
|
+
hasChildren: boolean,
|
|
128
148
|
/**
|
|
129
149
|
* Click event callback of custom element, which is used for menu internal event
|
|
130
150
|
*/
|
|
@@ -2469,7 +2469,7 @@ var MenuConstOptions = {
|
|
|
2469
2469
|
defaultMaxWidth: 600,
|
|
2470
2470
|
defaultZindex: 100
|
|
2471
2471
|
};
|
|
2472
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ContextSubMenu.vue?vue&type=template&id=
|
|
2472
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ContextSubMenu.vue?vue&type=template&id=2dab0b5e&ts=true
|
|
2473
2473
|
|
|
2474
2474
|
var _hoisted_1 = {
|
|
2475
2475
|
"class": "mx-context-menu-scroll",
|
|
@@ -2519,14 +2519,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2519
2519
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createVNode)(_component_ContextMenuItem, {
|
|
2520
2520
|
clickHandler: item.onClick,
|
|
2521
2521
|
disabled: item.disabled,
|
|
2522
|
-
iconFontClass: item.customClass,
|
|
2523
2522
|
icon: item.icon,
|
|
2523
|
+
iconFontClass: item.iconFontClass,
|
|
2524
|
+
svgIcon: item.svgIcon,
|
|
2525
|
+
svgProps: item.svgProps,
|
|
2524
2526
|
label: item.label,
|
|
2525
2527
|
customRender: item.customRender,
|
|
2526
2528
|
customClass: item.customClass,
|
|
2527
2529
|
clickClose: item.clickClose,
|
|
2528
2530
|
clickableWhenHasChildren: item.clickableWhenHasChildren,
|
|
2529
|
-
showRightArrow: item.children && item.children.length > 0
|
|
2531
|
+
showRightArrow: item.children && item.children.length > 0,
|
|
2532
|
+
hasChildren: item.children && item.children.length > 0
|
|
2530
2533
|
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createSlots)({
|
|
2531
2534
|
_: 2
|
|
2532
2535
|
}, [item.children && item.children.length > 0 ? {
|
|
@@ -2539,7 +2542,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2539
2542
|
adjustPosition: item.adjustSubMenuPosition
|
|
2540
2543
|
}, null, 8, ["items", "maxWidth", "minWidth", "adjustPosition"])];
|
|
2541
2544
|
})
|
|
2542
|
-
} : undefined]), 1032, ["clickHandler", "disabled", "iconFontClass", "
|
|
2545
|
+
} : undefined]), 1032, ["clickHandler", "disabled", "icon", "iconFontClass", "svgIcon", "svgProps", "label", "customRender", "customClass", "clickClose", "clickableWhenHasChildren", "showRightArrow", "hasChildren"]), item.divided && _ctx.globalHasSlot('speratorRender') ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createBlock)(_component_VNodeRender, {
|
|
2543
2546
|
key: 0,
|
|
2544
2547
|
vnode: function vnode() {
|
|
2545
2548
|
return _ctx.globalRenderSlot('speratorRender', {});
|
|
@@ -2560,7 +2563,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2560
2563
|
})
|
|
2561
2564
|
}, _hoisted_5, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.vShow, _ctx.overflow && _ctx.scrollValue > -_ctx.scrollHeight]])], 512)], 6);
|
|
2562
2565
|
}
|
|
2563
|
-
;// CONCATENATED MODULE: ./src/ContextSubMenu.vue?vue&type=template&id=
|
|
2566
|
+
;// CONCATENATED MODULE: ./src/ContextSubMenu.vue?vue&type=template&id=2dab0b5e&ts=true
|
|
2564
2567
|
|
|
2565
2568
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js
|
|
2566
2569
|
var es_number_constructor = __webpack_require__(9653);
|
|
@@ -2617,23 +2620,24 @@ var VNodeRender = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObjec
|
|
|
2617
2620
|
};
|
|
2618
2621
|
}
|
|
2619
2622
|
});
|
|
2620
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ContextMenuItem.vue?vue&type=template&id=
|
|
2623
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ContextMenuItem.vue?vue&type=template&id=119046a6&ts=true
|
|
2621
2624
|
|
|
2622
|
-
var
|
|
2625
|
+
var ContextMenuItemvue_type_template_id_119046a6_ts_true_hoisted_1 = {
|
|
2623
2626
|
"class": "mx-context-menu-item-wrapper"
|
|
2624
2627
|
};
|
|
2625
|
-
var
|
|
2628
|
+
var ContextMenuItemvue_type_template_id_119046a6_ts_true_hoisted_2 = ["xlink:href"];
|
|
2629
|
+
var ContextMenuItemvue_type_template_id_119046a6_ts_true_hoisted_3 = {
|
|
2626
2630
|
key: 1
|
|
2627
2631
|
};
|
|
2628
2632
|
|
|
2629
|
-
var
|
|
2633
|
+
var ContextMenuItemvue_type_template_id_119046a6_ts_true_hoisted_4 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("span", {
|
|
2630
2634
|
"class": "mx-right-arrow"
|
|
2631
2635
|
}, null, -1);
|
|
2632
2636
|
|
|
2633
|
-
function
|
|
2637
|
+
function ContextMenuItemvue_type_template_id_119046a6_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2634
2638
|
var _component_VNodeRender = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.resolveComponent)("VNodeRender");
|
|
2635
2639
|
|
|
2636
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div",
|
|
2640
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", ContextMenuItemvue_type_template_id_119046a6_ts_true_hoisted_1, [_ctx.globalHasSlot('itemRender') ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createBlock)(_component_VNodeRender, {
|
|
2637
2641
|
key: 0,
|
|
2638
2642
|
vnode: function vnode() {
|
|
2639
2643
|
return _ctx.globalRenderSlot('itemRender', _ctx.getItemDataForChildren());
|
|
@@ -2644,7 +2648,7 @@ function ContextMenuItemvue_type_template_id_4200a0a0_ts_true_render(_ctx, _cach
|
|
|
2644
2648
|
data: _ctx.getItemDataForChildren()
|
|
2645
2649
|
}, null, 8, ["vnode", "data"])) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", {
|
|
2646
2650
|
key: 2,
|
|
2647
|
-
"class": (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)('mx-context-menu-item'
|
|
2651
|
+
"class": (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)(['mx-context-menu-item', _ctx.disabled ? 'disabled' : '', _ctx.customClass ? ' ' + _ctx.customClass : '', _ctx.showSubMenu ? 'open' : '']),
|
|
2648
2652
|
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
2649
2653
|
function () {
|
|
2650
2654
|
return _ctx.onClick && _ctx.onClick.apply(_ctx, arguments);
|
|
@@ -2660,11 +2664,16 @@ function ContextMenuItemvue_type_template_id_4200a0a0_ts_true_render(_ctx, _cach
|
|
|
2660
2664
|
vnode: function vnode() {
|
|
2661
2665
|
return _ctx.globalRenderSlot('itemIconRender', _ctx.getItemDataForChildren());
|
|
2662
2666
|
}
|
|
2663
|
-
}, null, 8, ["vnode"])) : typeof _ctx.
|
|
2667
|
+
}, null, 8, ["vnode"])) : typeof _ctx.svgIcon === 'string' && _ctx.svgIcon ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("svg", (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.mergeProps)({
|
|
2664
2668
|
key: 1,
|
|
2665
|
-
"class":
|
|
2666
|
-
},
|
|
2669
|
+
"class": "icon svg"
|
|
2670
|
+
}, _ctx.svgProps), [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("use", {
|
|
2671
|
+
"xlink:href": _ctx.svgIcon
|
|
2672
|
+
}, null, 8, ContextMenuItemvue_type_template_id_119046a6_ts_true_hoisted_2)], 16)) : typeof _ctx.icon === 'string' ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("i", {
|
|
2667
2673
|
key: 2,
|
|
2674
|
+
"class": (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)(_ctx.icon + ' icon ' + _ctx.iconFontClass + ' ' + _ctx.globalIconFontClass)
|
|
2675
|
+
}, null, 2)) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createBlock)(_component_VNodeRender, {
|
|
2676
|
+
key: 3,
|
|
2668
2677
|
vnode: _ctx.icon,
|
|
2669
2678
|
data: _ctx.icon
|
|
2670
2679
|
}, null, 8, ["vnode", "data"]))];
|
|
@@ -2674,7 +2683,7 @@ function ContextMenuItemvue_type_template_id_4200a0a0_ts_true_render(_ctx, _cach
|
|
|
2674
2683
|
vnode: function vnode() {
|
|
2675
2684
|
return _ctx.globalRenderSlot('itemLabelRender', _ctx.getItemDataForChildren());
|
|
2676
2685
|
}
|
|
2677
|
-
}, null, 8, ["vnode"])) : typeof _ctx.label === 'string' ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("span",
|
|
2686
|
+
}, null, 8, ["vnode"])) : typeof _ctx.label === 'string' ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("span", ContextMenuItemvue_type_template_id_119046a6_ts_true_hoisted_3, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.label), 1)) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createBlock)(_component_VNodeRender, {
|
|
2678
2687
|
key: 2,
|
|
2679
2688
|
vnode: _ctx.label,
|
|
2680
2689
|
data: _ctx.label
|
|
@@ -2687,13 +2696,13 @@ function ContextMenuItemvue_type_template_id_4200a0a0_ts_true_render(_ctx, _cach
|
|
|
2687
2696
|
vnode: function vnode() {
|
|
2688
2697
|
return _ctx.globalRenderSlot('itemRightArrowRender', _ctx.getItemDataForChildren());
|
|
2689
2698
|
}
|
|
2690
|
-
}, null, 8, ["vnode"])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true),
|
|
2699
|
+
}, null, 8, ["vnode"])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true), ContextMenuItemvue_type_template_id_119046a6_ts_true_hoisted_4];
|
|
2691
2700
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)];
|
|
2692
2701
|
})], 34)), _ctx.showSubMenu ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.renderSlot)(_ctx.$slots, "submenu", {
|
|
2693
2702
|
key: 3
|
|
2694
2703
|
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)]);
|
|
2695
2704
|
}
|
|
2696
|
-
;// CONCATENATED MODULE: ./src/ContextMenuItem.vue?vue&type=template&id=
|
|
2705
|
+
;// CONCATENATED MODULE: ./src/ContextMenuItem.vue?vue&type=template&id=119046a6&ts=true
|
|
2697
2706
|
|
|
2698
2707
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ContextMenuItem.vue?vue&type=script&lang=ts
|
|
2699
2708
|
|
|
@@ -2752,6 +2761,18 @@ function ContextMenuItemvue_type_template_id_4200a0a0_ts_true_render(_ctx, _cach
|
|
|
2752
2761
|
"default": 'iconfont'
|
|
2753
2762
|
},
|
|
2754
2763
|
|
|
2764
|
+
/**
|
|
2765
|
+
* Menu icon (for svg)
|
|
2766
|
+
*/
|
|
2767
|
+
svgIcon: {
|
|
2768
|
+
type: String,
|
|
2769
|
+
"default": ''
|
|
2770
|
+
},
|
|
2771
|
+
svgProps: {
|
|
2772
|
+
type: Object,
|
|
2773
|
+
"default": null
|
|
2774
|
+
},
|
|
2775
|
+
|
|
2755
2776
|
/**
|
|
2756
2777
|
* Show right arrow on this menu?
|
|
2757
2778
|
*/
|
|
@@ -2759,6 +2780,10 @@ function ContextMenuItemvue_type_template_id_4200a0a0_ts_true_render(_ctx, _cach
|
|
|
2759
2780
|
type: Boolean,
|
|
2760
2781
|
"default": false
|
|
2761
2782
|
},
|
|
2783
|
+
hasChildren: {
|
|
2784
|
+
type: Boolean,
|
|
2785
|
+
"default": false
|
|
2786
|
+
},
|
|
2762
2787
|
|
|
2763
2788
|
/**
|
|
2764
2789
|
* Should close menu when Click this menu item ?
|
|
@@ -2786,7 +2811,8 @@ function ContextMenuItemvue_type_template_id_4200a0a0_ts_true_render(_ctx, _cach
|
|
|
2786
2811
|
label = _toRefs.label,
|
|
2787
2812
|
icon = _toRefs.icon,
|
|
2788
2813
|
iconFontClass = _toRefs.iconFontClass,
|
|
2789
|
-
showRightArrow = _toRefs.showRightArrow
|
|
2814
|
+
showRightArrow = _toRefs.showRightArrow,
|
|
2815
|
+
hasChildren = _toRefs.hasChildren;
|
|
2790
2816
|
|
|
2791
2817
|
var showSubMenu = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.ref)(false);
|
|
2792
2818
|
var globalHasSlot = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.inject)('globalHasSlot');
|
|
@@ -2797,9 +2823,9 @@ function ContextMenuItemvue_type_template_id_4200a0a0_ts_true_render(_ctx, _cach
|
|
|
2797
2823
|
function onClick(e) {
|
|
2798
2824
|
if (e.target.classList.contains('mx-context-no-clickable')) return;
|
|
2799
2825
|
|
|
2800
|
-
if (
|
|
2826
|
+
if (hasChildren.value) {
|
|
2801
2827
|
//Has submenu
|
|
2802
|
-
if (clickableWhenHasChildren && typeof clickHandler.value === 'function') clickHandler.value();
|
|
2828
|
+
if (clickableWhenHasChildren.value && typeof clickHandler.value === 'function') clickHandler.value();
|
|
2803
2829
|
} else {
|
|
2804
2830
|
//Call hander from options
|
|
2805
2831
|
if (typeof clickHandler.value === 'function') clickHandler.value();
|
|
@@ -2815,13 +2841,17 @@ function ContextMenuItemvue_type_template_id_4200a0a0_ts_true_render(_ctx, _cach
|
|
|
2815
2841
|
|
|
2816
2842
|
function onMouseEnter() {
|
|
2817
2843
|
if (!menuContext.checkCloseOtherSubMenuTimeOut()) menuContext.closeOtherSubMenu();
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2844
|
+
|
|
2845
|
+
if (hasChildren.value) {
|
|
2846
|
+
menuContext.addOpenedSubMenu(function () {
|
|
2847
|
+
showSubMenu.value = false;
|
|
2848
|
+
});
|
|
2849
|
+
showSubMenu.value = true;
|
|
2850
|
+
}
|
|
2822
2851
|
}
|
|
2823
2852
|
|
|
2824
2853
|
var globalTheme = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.inject)('globalTheme');
|
|
2854
|
+
var globalIconFontClass = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.inject)('globalIconFontClass');
|
|
2825
2855
|
return {
|
|
2826
2856
|
//Data for custom render
|
|
2827
2857
|
getItemDataForChildren: function getItemDataForChildren() {
|
|
@@ -2834,6 +2864,8 @@ function ContextMenuItemvue_type_template_id_4200a0a0_ts_true_render(_ctx, _cach
|
|
|
2834
2864
|
clickClose: clickClose.value,
|
|
2835
2865
|
clickableWhenHasChildren: clickableWhenHasChildren.value,
|
|
2836
2866
|
theme: globalTheme,
|
|
2867
|
+
isOpen: showSubMenu,
|
|
2868
|
+
hasChildren: hasChildren,
|
|
2837
2869
|
onClick: onClick,
|
|
2838
2870
|
onMouseEnter: onMouseEnter
|
|
2839
2871
|
};
|
|
@@ -2841,6 +2873,7 @@ function ContextMenuItemvue_type_template_id_4200a0a0_ts_true_render(_ctx, _cach
|
|
|
2841
2873
|
showSubMenu: showSubMenu,
|
|
2842
2874
|
globalHasSlot: globalHasSlot,
|
|
2843
2875
|
globalRenderSlot: globalRenderSlot,
|
|
2876
|
+
globalIconFontClass: globalIconFontClass,
|
|
2844
2877
|
onMouseEnter: onMouseEnter,
|
|
2845
2878
|
onClick: onClick
|
|
2846
2879
|
};
|
|
@@ -2856,7 +2889,7 @@ var exportHelper = __webpack_require__(3744);
|
|
|
2856
2889
|
|
|
2857
2890
|
|
|
2858
2891
|
;
|
|
2859
|
-
const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.Z)(ContextMenuItemvue_type_script_lang_ts, [['render',
|
|
2892
|
+
const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.Z)(ContextMenuItemvue_type_script_lang_ts, [['render',ContextMenuItemvue_type_template_id_119046a6_ts_true_render]])
|
|
2860
2893
|
|
|
2861
2894
|
/* harmony default export */ const ContextMenuItem = (__exports__);
|
|
2862
2895
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ContextMenuSperator.vue?vue&type=template&id=c306a596&ts=true
|
|
@@ -3070,10 +3103,10 @@ var fillPadding = 10; //padding for submenu position adjust
|
|
|
3070
3103
|
}));
|
|
3071
3104
|
;// CONCATENATED MODULE: ./src/ContextSubMenu.vue?vue&type=script&lang=ts
|
|
3072
3105
|
|
|
3073
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ContextSubMenu.vue?vue&type=style&index=0&id=
|
|
3106
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ContextSubMenu.vue?vue&type=style&index=0&id=2dab0b5e&lang=scss
|
|
3074
3107
|
// extracted by mini-css-extract-plugin
|
|
3075
3108
|
|
|
3076
|
-
;// CONCATENATED MODULE: ./src/ContextSubMenu.vue?vue&type=style&index=0&id=
|
|
3109
|
+
;// CONCATENATED MODULE: ./src/ContextSubMenu.vue?vue&type=style&index=0&id=2dab0b5e&lang=scss
|
|
3077
3110
|
|
|
3078
3111
|
;// CONCATENATED MODULE: ./src/ContextSubMenu.vue
|
|
3079
3112
|
|
|
@@ -3119,12 +3152,14 @@ const ContextSubMenu_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Con
|
|
|
3119
3152
|
},
|
|
3120
3153
|
provide: function provide() {
|
|
3121
3154
|
var _this$options,
|
|
3155
|
+
_this$options2,
|
|
3122
3156
|
_this = this;
|
|
3123
3157
|
|
|
3124
3158
|
return {
|
|
3125
3159
|
globalOptions: this.options,
|
|
3126
3160
|
globalCloseMenu: this.closeMenu,
|
|
3127
3161
|
globalTheme: ((_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.theme) || 'light',
|
|
3162
|
+
globalIconFontClass: ((_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.iconFontClass) || 'iconfont',
|
|
3128
3163
|
//check slot exists
|
|
3129
3164
|
globalHasSlot: function globalHasSlot(name) {
|
|
3130
3165
|
return _this.$slots[name] !== undefined;
|
|
@@ -3165,7 +3200,7 @@ const ContextSubMenu_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Con
|
|
|
3165
3200
|
}
|
|
3166
3201
|
},
|
|
3167
3202
|
render: function render() {
|
|
3168
|
-
var _this$
|
|
3203
|
+
var _this$options3;
|
|
3169
3204
|
|
|
3170
3205
|
//Hidden
|
|
3171
3206
|
if (!this.show) return []; //Create SubMenu
|
|
@@ -3177,7 +3212,7 @@ const ContextSubMenu_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Con
|
|
|
3177
3212
|
}
|
|
3178
3213
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.h)(ContextSubMenu, {
|
|
3179
3214
|
"class": 'mx-menu-host',
|
|
3180
|
-
items: (_this$
|
|
3215
|
+
items: (_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.items,
|
|
3181
3216
|
maxWidth: this.options.maxWidth || MenuConstOptions.defaultMaxWidth,
|
|
3182
3217
|
minWidth: this.options.minWidth || MenuConstOptions.defaultMinWidth
|
|
3183
3218
|
}, {
|
|
@@ -3237,10 +3272,10 @@ const ContextSubMenu_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Con
|
|
|
3237
3272
|
}));
|
|
3238
3273
|
;// CONCATENATED MODULE: ./src/ContextMenu.vue?vue&type=script&lang=ts
|
|
3239
3274
|
|
|
3240
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ContextMenu.vue?vue&type=style&index=0&id=
|
|
3275
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ContextMenu.vue?vue&type=style&index=0&id=994229e2&lang=css
|
|
3241
3276
|
// extracted by mini-css-extract-plugin
|
|
3242
3277
|
|
|
3243
|
-
;// CONCATENATED MODULE: ./src/ContextMenu.vue?vue&type=style&index=0&id=
|
|
3278
|
+
;// CONCATENATED MODULE: ./src/ContextMenu.vue?vue&type=style&index=0&id=994229e2&lang=css
|
|
3244
3279
|
|
|
3245
3280
|
;// CONCATENATED MODULE: ./src/ContextMenu.vue
|
|
3246
3281
|
|
|
@@ -3251,12 +3286,23 @@ const ContextSubMenu_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Con
|
|
|
3251
3286
|
const ContextMenu_exports_ = ContextMenuvue_type_script_lang_ts;
|
|
3252
3287
|
|
|
3253
3288
|
/* harmony default export */ const ContextMenu = (ContextMenu_exports_);
|
|
3289
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
3290
|
+
function _typeof(obj) {
|
|
3291
|
+
"@babel/helpers - typeof";
|
|
3292
|
+
|
|
3293
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
3294
|
+
return typeof obj;
|
|
3295
|
+
} : function (obj) {
|
|
3296
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
3297
|
+
}, _typeof(obj);
|
|
3298
|
+
}
|
|
3254
3299
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/ContextMenuGroup.vue?vue&type=script&lang=ts
|
|
3255
3300
|
|
|
3256
3301
|
|
|
3257
3302
|
|
|
3258
3303
|
|
|
3259
3304
|
|
|
3305
|
+
|
|
3260
3306
|
/* harmony default export */ const ContextMenuGroupvue_type_script_lang_ts = ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.defineComponent)({
|
|
3261
3307
|
name: 'ContextMenuGroup',
|
|
3262
3308
|
props: {
|
|
@@ -3345,7 +3391,8 @@ const ContextMenu_exports_ = ContextMenuvue_type_script_lang_ts;
|
|
|
3345
3391
|
showRightArrow: true,
|
|
3346
3392
|
maxWidth: undefined,
|
|
3347
3393
|
minWidth: undefined,
|
|
3348
|
-
adjustSubMenuPosition: undefined
|
|
3394
|
+
adjustSubMenuPosition: undefined,
|
|
3395
|
+
hasChildren: _typeof(this.$slots["default"]) !== undefined
|
|
3349
3396
|
}), this.$slots["default"] ? {
|
|
3350
3397
|
//Create SubMenu
|
|
3351
3398
|
submenu: function submenu() {
|