@meethive/components 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/EditTable/props.js +1 -1
- package/es/ProLayout/SiderMenu/SiderMenu.js +133 -147
- package/es/ProLayout/TopHeader/index.js +91 -99
- package/es/ProTable/Alert.js +30 -15
- package/es/ProTable/Content.js +118 -30
- package/es/ProTable/Header.js +47 -14
- package/es/ProTable/Pagination.js +25 -14
- package/es/ProTable/ProTable.js +77 -30
- package/es/ProTable/setting.js +1 -1
- package/es/Search/Advanced/History.js +142 -0
- package/es/Search/Advanced/SaveHistory.js +124 -0
- package/es/Search/Advanced/index.js +369 -0
- package/es/Search/Item.js +70 -21
- package/es/Search/Search.js +81 -24
- package/es/Search/index.js +3 -3
- package/es/VirtualTable/VirtualTable.js +4 -4
- package/es/components.js +1 -1
- package/lib/EditTable/props.js +1 -1
- package/lib/ProLayout/SiderMenu/SiderMenu.js +133 -147
- package/lib/ProLayout/TopHeader/index.js +91 -99
- package/lib/ProTable/Alert.js +30 -15
- package/lib/ProTable/Content.js +118 -30
- package/lib/ProTable/Header.js +47 -14
- package/lib/ProTable/Pagination.js +25 -14
- package/lib/ProTable/ProTable.js +77 -30
- package/lib/ProTable/setting.js +1 -1
- package/lib/Search/Advanced/History.js +142 -0
- package/lib/Search/Advanced/SaveHistory.js +124 -0
- package/lib/Search/Advanced/index.js +369 -0
- package/lib/Search/Item.js +70 -21
- package/lib/Search/Search.js +81 -24
- package/lib/Search/index.js +3 -3
- package/lib/VirtualTable/VirtualTable.js +4 -4
- package/lib/components.js +1 -1
- package/package.json +1 -1
package/es/Search/Search.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import { defineComponent
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from "vue";
|
|
3
|
+
const _hoisted_1 = {
|
|
4
|
+
class: "JSearch-content simple"
|
|
5
|
+
};
|
|
6
|
+
const _hoisted_2 = {
|
|
7
|
+
class: "JSearch-items"
|
|
8
|
+
};
|
|
9
|
+
import { reactive, ref, computed, inject, useAttrs } from 'vue';
|
|
2
10
|
import { searchProps } from './setting';
|
|
3
11
|
import { useLocaleReceiver } from '../LocaleReciver';
|
|
4
12
|
import { Button, Col, Form, FormItemRest, Row } from 'ant-design-vue';
|
|
@@ -7,25 +15,22 @@ import Item from './Item.js';
|
|
|
7
15
|
import { useHandleColumns, useOptionMapContent } from './hooks';
|
|
8
16
|
import { termsParamsFormat } from './util';
|
|
9
17
|
import useSearchStyle from './style';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Col,
|
|
15
|
-
Form,
|
|
16
|
-
FormItemRest,
|
|
17
|
-
Row,
|
|
18
|
-
Item
|
|
18
|
+
const __sfc_main__ = _defineComponent({
|
|
19
|
+
...{
|
|
20
|
+
name: 'JSearch',
|
|
21
|
+
inheritAttrs: false
|
|
19
22
|
},
|
|
20
|
-
|
|
23
|
+
__name: 'Search',
|
|
21
24
|
props: {
|
|
22
25
|
...searchProps()
|
|
23
26
|
},
|
|
24
27
|
emits: ['search'],
|
|
25
|
-
setup(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
setup(__props, {
|
|
29
|
+
expose: __expose,
|
|
30
|
+
emit: __emit
|
|
28
31
|
}) {
|
|
32
|
+
const props = __props;
|
|
33
|
+
const emit = __emit;
|
|
29
34
|
const [contextLocale] = useLocaleReceiver('Search');
|
|
30
35
|
const attrs = useAttrs();
|
|
31
36
|
const columnsOptionMap = ref({}); // 存储每个columnItem的option
|
|
@@ -73,18 +78,70 @@ export default defineComponent({
|
|
|
73
78
|
});
|
|
74
79
|
emit('search', termsParamsFormat(terms, columnsMap.value));
|
|
75
80
|
};
|
|
76
|
-
|
|
81
|
+
__expose({
|
|
77
82
|
setValues: handleDefaultValues,
|
|
78
83
|
reset
|
|
79
84
|
});
|
|
80
|
-
return {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
return (_ctx, _cache) => {
|
|
86
|
+
return _openBlock(), _createBlock(_unref(Form), {
|
|
87
|
+
model: terms,
|
|
88
|
+
onFinish: searchSubmit
|
|
89
|
+
}, {
|
|
90
|
+
default: _withCtx(() => [_createElementVNode("div", {
|
|
91
|
+
class: _normalizeClass(['JSearch-warp', _unref(attrs).class, _unref(hashId)]),
|
|
92
|
+
style: _normalizeStyle(_unref(attrs).style)
|
|
93
|
+
}, [_createElementVNode("div", _hoisted_1, [_createElementVNode("div", _hoisted_2, [_createVNode(_unref(Row), {
|
|
94
|
+
gutter: [16, 16]
|
|
95
|
+
}, {
|
|
96
|
+
default: _withCtx(() => [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(terms.terms, (item, index) => {
|
|
97
|
+
return _openBlock(), _createBlock(_unref(Col), {
|
|
98
|
+
key: index,
|
|
99
|
+
span: item._span || 24 / _ctx.column
|
|
100
|
+
}, {
|
|
101
|
+
default: _withCtx(() => [_createVNode(Item, {
|
|
102
|
+
value: item.value,
|
|
103
|
+
"onUpdate:value": $event => item.value = $event,
|
|
104
|
+
termType: item.termType,
|
|
105
|
+
"onUpdate:termType": $event => item.termType = $event,
|
|
106
|
+
column: item.column,
|
|
107
|
+
"onUpdate:column": $event => item.column = $event,
|
|
108
|
+
type: item.type,
|
|
109
|
+
"onUpdate:type": $event => item.type = $event,
|
|
110
|
+
labelWidth: _ctx.labelWidth
|
|
111
|
+
}, null, 8 /* PROPS */, ["value", "onUpdate:value", "termType", "onUpdate:termType", "column", "onUpdate:column", "type", "onUpdate:type", "labelWidth"])]),
|
|
112
|
+
_: 2 /* DYNAMIC */
|
|
113
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["span"]);
|
|
114
|
+
}), 128 /* KEYED_FRAGMENT */)), _createVNode(_unref(Col), {
|
|
115
|
+
span: 24 / _ctx.column
|
|
116
|
+
}, {
|
|
117
|
+
default: _withCtx(() => [_renderSlot(_ctx.$slots, "footerRender", {
|
|
118
|
+
reset: reset,
|
|
119
|
+
submit: searchSubmit
|
|
120
|
+
}, () => [_createElementVNode("div", {
|
|
121
|
+
class: "JSearch-footer--btns",
|
|
122
|
+
style: _normalizeStyle(footerStyles.value)
|
|
123
|
+
}, [_createVNode(_unref(Button), {
|
|
124
|
+
onClick: reset
|
|
125
|
+
}, {
|
|
126
|
+
default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.resetText || _unref(contextLocale)?.search?.reset), 1 /* TEXT */)]),
|
|
127
|
+
_: 1 /* STABLE */
|
|
128
|
+
}), _createVNode(_unref(FormItemRest), null, {
|
|
129
|
+
default: _withCtx(() => [_createVNode(_unref(Button), {
|
|
130
|
+
"html-type": "submit",
|
|
131
|
+
type: "primary"
|
|
132
|
+
}, {
|
|
133
|
+
default: _withCtx(() => [_createTextVNode(_toDisplayString(_ctx.submitText || _unref(contextLocale)?.search?.search), 1 /* TEXT */)]),
|
|
134
|
+
_: 1 /* STABLE */
|
|
135
|
+
})]),
|
|
136
|
+
_: 1 /* STABLE */
|
|
137
|
+
})], 4 /* STYLE */)])]),
|
|
138
|
+
_: 3 /* FORWARDED */
|
|
139
|
+
}, 8 /* PROPS */, ["span"])]),
|
|
140
|
+
_: 3 /* FORWARDED */
|
|
141
|
+
})])])], 6 /* CLASS, STYLE */)]),
|
|
142
|
+
_: 3 /* FORWARDED */
|
|
143
|
+
}, 8 /* PROPS */, ["model"]);
|
|
88
144
|
};
|
|
89
145
|
}
|
|
90
|
-
});
|
|
146
|
+
});
|
|
147
|
+
export default __sfc_main__;
|
package/es/Search/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import AdvancedSearch from './Advanced/index.js'
|
|
1
2
|
import Search from './Search.js'
|
|
2
3
|
|
|
3
4
|
Search.install = function (app) {
|
|
4
5
|
app.component(Search.name, Search)
|
|
6
|
+
app.component(AdvancedSearch.name, AdvancedSearch)
|
|
5
7
|
}
|
|
6
8
|
|
|
9
|
+
export { AdvancedSearch }
|
|
7
10
|
export default Search
|
|
8
|
-
export * from './hooks'
|
|
9
|
-
export * from './util'
|
|
10
|
-
export * from './setting'
|
|
@@ -27,7 +27,7 @@ export default defineComponent({
|
|
|
27
27
|
default: () => []
|
|
28
28
|
},
|
|
29
29
|
rowSelection: {
|
|
30
|
-
type: Object
|
|
30
|
+
type: [Object, Boolean]
|
|
31
31
|
},
|
|
32
32
|
rowKey: {
|
|
33
33
|
type: [String, Function],
|
|
@@ -220,10 +220,10 @@ export default defineComponent({
|
|
|
220
220
|
container,
|
|
221
221
|
selectedAll,
|
|
222
222
|
visibleRows,
|
|
223
|
-
_indeterminate,
|
|
223
|
+
checkIndeterminate: _indeterminate,
|
|
224
224
|
viewportHeight,
|
|
225
|
-
_columns,
|
|
226
|
-
_rowSelection,
|
|
225
|
+
tableColumns: _columns,
|
|
226
|
+
tableRowSelection: _rowSelection,
|
|
227
227
|
totalHeight,
|
|
228
228
|
offsetY,
|
|
229
229
|
firstColumn,
|
package/es/components.js
CHANGED
|
@@ -10,7 +10,7 @@ export { default as PermissionButton } from './PermissionButton'
|
|
|
10
10
|
export { default as ProLayout, PageContainer } from './ProLayout'
|
|
11
11
|
export { default as ProTable } from './ProTable'
|
|
12
12
|
export { default as Scrollbar } from './Scrollbar'
|
|
13
|
-
export { default as Search } from './Search'
|
|
13
|
+
export { default as Search, AdvancedSearch } from './Search'
|
|
14
14
|
export { default as ValueItem } from './ValueItem'
|
|
15
15
|
export { default as TimeFormat } from './TimeFormat'
|
|
16
16
|
export { default as DragModal } from './DragModal'
|
package/lib/EditTable/props.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, unref,
|
|
1
|
+
import { computed, unref, createVNode as _createVNode, createTextVNode as _createTextVNode, Fragment as _Fragment } from 'vue';
|
|
2
2
|
import { LayoutSider as Sider, Menu, Tooltip } from 'ant-design-vue';
|
|
3
3
|
import BaseMenu, { baseMenuProps } from './BaseMenu.js';
|
|
4
4
|
import { defaultSettingProps, LayoutType } from '../defaultSettings';
|
|
@@ -135,154 +135,140 @@ export const defaultRenderCollapsedButton = collapsed => {
|
|
|
135
135
|
"type": "MenuFoldOutlined"
|
|
136
136
|
}, null);
|
|
137
137
|
};
|
|
138
|
-
const SiderMenu =
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
props.onSelect($event);
|
|
138
|
+
const SiderMenu = props => {
|
|
139
|
+
const {
|
|
140
|
+
collapsed,
|
|
141
|
+
siderWidth,
|
|
142
|
+
breakpoint,
|
|
143
|
+
collapsedWidth = 48,
|
|
144
|
+
menuExtraRender = false,
|
|
145
|
+
menuContentRender = false,
|
|
146
|
+
collapsedButtonRender = defaultRenderCollapsedButton,
|
|
147
|
+
linksRender,
|
|
148
|
+
theme
|
|
149
|
+
} = props;
|
|
150
|
+
const prefixCls = computed(() => 'pro-layout');
|
|
151
|
+
const [wrapSSR, hashId] = useProLayoutStyle(prefixCls);
|
|
152
|
+
const context = useRouteContext();
|
|
153
|
+
const getPrefixCls = context.getPrefixCls;
|
|
154
|
+
const baseClassName = getPrefixCls('sider');
|
|
155
|
+
const hasSplitMenu = computed(() => {
|
|
156
|
+
return props.layout === 'mix' && props.splitMenus;
|
|
157
|
+
});
|
|
158
|
+
const sSideWidth = computed(() => {
|
|
159
|
+
return props.collapsed ? props.collapsedWidth : props.siderWidth;
|
|
160
|
+
});
|
|
161
|
+
const classNames = computed(() => ({
|
|
162
|
+
[baseClassName]: true,
|
|
163
|
+
[`${baseClassName}-fixed`]: context.fixSiderbar,
|
|
164
|
+
[`${baseClassName}-${theme}`]: true,
|
|
165
|
+
[`${baseClassName}-layout-${props.layout}`]: props.layout,
|
|
166
|
+
[hashId.value]: true
|
|
167
|
+
}));
|
|
168
|
+
const logCls = computed(() => ({
|
|
169
|
+
[`${baseClassName}-logo`]: true,
|
|
170
|
+
[`${baseClassName}-logo-card`]: props.layoutType === LayoutType.CARD
|
|
171
|
+
}));
|
|
172
|
+
const handleSelect = $event => {
|
|
173
|
+
if (props.onSelect) {
|
|
174
|
+
if (unref(hasSplitMenu)) {
|
|
175
|
+
props.onSelect([context.selectedKeys[0], ...$event]);
|
|
176
|
+
return;
|
|
179
177
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
178
|
+
props.onSelect($event);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
const headerDom = defaultRenderLogoAndTitle({
|
|
182
|
+
...props,
|
|
183
|
+
baseClassName
|
|
184
|
+
});
|
|
185
|
+
const extraDom = menuExtraRender && menuExtraRender(props);
|
|
186
|
+
if (props.layoutType !== LayoutType.CARD && hasSplitMenu.value && unref(context.flatMenuData).length === 0) {
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
const defaultMenuDom = _createVNode(BaseMenu, {
|
|
190
|
+
"prefixCls": getPrefixCls(),
|
|
191
|
+
"locale": props.locale || context.locale,
|
|
192
|
+
"theme": theme,
|
|
193
|
+
"mode": "inline",
|
|
194
|
+
"menuData": hasSplitMenu.value ? context.flatMenuData : context.menuData,
|
|
195
|
+
"collapsed": props.collapsed,
|
|
196
|
+
"openKeys": context.openKeys,
|
|
197
|
+
"selectedKeys": context.selectedKeys,
|
|
198
|
+
"menuItemRender": props.menuItemRender,
|
|
199
|
+
"subMenuItemRender": props.subMenuItemRender,
|
|
200
|
+
"iconfontUrl": props.iconfontUrl,
|
|
201
|
+
"onClick": props.onMenuClick,
|
|
202
|
+
"style": {
|
|
203
|
+
width: '100%'
|
|
204
|
+
},
|
|
205
|
+
"class": `${baseClassName}-menu`,
|
|
206
|
+
"onUpdate:openKeys": $event => props.onOpenKeys && props.onOpenKeys($event),
|
|
207
|
+
"onUpdate:selectedKeys": handleSelect
|
|
208
|
+
}, null);
|
|
209
|
+
return _createVNode(_Fragment, null, [context.fixSiderbar && _createVNode("div", {
|
|
210
|
+
"style": {
|
|
211
|
+
width: `${sSideWidth.value}px`,
|
|
212
|
+
overflow: 'hidden',
|
|
213
|
+
flex: `0 0 ${sSideWidth.value}px`,
|
|
214
|
+
maxWidth: `${sSideWidth.value}px`,
|
|
215
|
+
minWidth: `${sSideWidth.value}px`,
|
|
216
|
+
transition: 'background-color 0.3s, min-width 0.3s, max-width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
217
|
+
}
|
|
218
|
+
}, null), _createVNode(Sider, {
|
|
219
|
+
"collapsible": true,
|
|
220
|
+
"trigger": null,
|
|
221
|
+
"collapsed": collapsed,
|
|
222
|
+
"breakpoint": breakpoint || undefined,
|
|
223
|
+
"onCollapse": collapse => {
|
|
224
|
+
props.onCollapse?.(collapse);
|
|
225
|
+
},
|
|
226
|
+
"collapsedWidth": collapsedWidth,
|
|
227
|
+
"style": {
|
|
228
|
+
overflow: 'hidden',
|
|
229
|
+
paddingTop: `${props.headerHeight}px`,
|
|
230
|
+
zIndex: props.layoutType === LayoutType.PAD ? 200 : 1
|
|
231
|
+
},
|
|
232
|
+
"width": siderWidth,
|
|
233
|
+
"theme": theme,
|
|
234
|
+
"class": classNames.value
|
|
235
|
+
}, {
|
|
236
|
+
default: () => [headerDom && _createVNode("div", {
|
|
237
|
+
"class": logCls.value,
|
|
238
|
+
"onClick": props.layout !== 'mix' ? props.onMenuHeaderClick : undefined,
|
|
239
|
+
"id": "logo",
|
|
240
|
+
"style": props?.logoStyle
|
|
241
|
+
}, [headerDom]), extraDom && _createVNode("div", {
|
|
242
|
+
"class": {
|
|
243
|
+
[`${baseClassName}-extra`]: true,
|
|
244
|
+
[`${baseClassName}-extra-no-logo`]: !headerDom
|
|
200
245
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
},
|
|
217
|
-
"class": `${baseClassName}-menu`,
|
|
218
|
-
"onUpdate:openKeys": $event => props.onOpenKeys && props.onOpenKeys($event),
|
|
219
|
-
"onUpdate:selectedKeys": handleSelect
|
|
220
|
-
}, null);
|
|
221
|
-
return _createVNode(_Fragment, null, [context.fixSiderbar && _createVNode("div", {
|
|
222
|
-
"style": {
|
|
223
|
-
width: `${sSideWidth.value}px`,
|
|
224
|
-
overflow: 'hidden',
|
|
225
|
-
flex: `0 0 ${sSideWidth.value}px`,
|
|
226
|
-
maxWidth: `${sSideWidth.value}px`,
|
|
227
|
-
minWidth: `${sSideWidth.value}px`,
|
|
228
|
-
transition: 'background-color 0.3s, min-width 0.3s, max-width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
246
|
+
}, [extraDom]), _createVNode("div", {
|
|
247
|
+
"class": `${baseClassName}-body`,
|
|
248
|
+
"style": "flex: 1; overflow: hidden auto;"
|
|
249
|
+
}, [props.layoutType !== LayoutType.CARD ? menuContentRender && menuContentRender(props, defaultMenuDom) || defaultMenuDom : null]), _createVNode("div", {
|
|
250
|
+
"class": `${baseClassName}-links`
|
|
251
|
+
}, [linksRender ? linksRender() : collapsedButtonRender !== false ? _createVNode(Menu, {
|
|
252
|
+
"class": `${baseClassName}-link-menu`,
|
|
253
|
+
"inlineIndent": 16,
|
|
254
|
+
"theme": theme,
|
|
255
|
+
"selectedKeys": [],
|
|
256
|
+
"openKeys": [],
|
|
257
|
+
"mode": "inline",
|
|
258
|
+
"onClick": () => {
|
|
259
|
+
if (props.onCollapse) {
|
|
260
|
+
props.onCollapse(!props.collapsed);
|
|
229
261
|
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
"
|
|
234
|
-
"
|
|
235
|
-
"
|
|
236
|
-
props.onCollapse?.(collapse);
|
|
237
|
-
},
|
|
238
|
-
"collapsedWidth": collapsedWidth,
|
|
239
|
-
"style": {
|
|
240
|
-
overflow: 'hidden',
|
|
241
|
-
paddingTop: `${props.headerHeight}px`,
|
|
242
|
-
zIndex: props.layoutType === LayoutType.PAD ? 200 : 1
|
|
243
|
-
},
|
|
244
|
-
"width": siderWidth,
|
|
245
|
-
"theme": theme,
|
|
246
|
-
"class": classNames.value
|
|
262
|
+
}
|
|
263
|
+
}, {
|
|
264
|
+
default: () => [_createVNode(Menu.Item, {
|
|
265
|
+
"key": "collapsed-button",
|
|
266
|
+
"class": `${baseClassName}-collapsed-button`,
|
|
267
|
+
"title": false
|
|
247
268
|
}, {
|
|
248
|
-
default: () => [
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}, [headerDom.value]), extraDom.value && _createVNode("div", {
|
|
254
|
-
"class": {
|
|
255
|
-
[`${baseClassName}-extra`]: true,
|
|
256
|
-
[`${baseClassName}-extra-no-logo`]: !headerDom.value
|
|
257
|
-
}
|
|
258
|
-
}, [extraDom.value]), _createVNode("div", {
|
|
259
|
-
"class": `${baseClassName}-body`,
|
|
260
|
-
"style": "flex: 1; overflow: hidden auto;"
|
|
261
|
-
}, [props.layoutType !== LayoutType.CARD ? menuContentRender && menuContentRender(props, defaultMenuDom) || defaultMenuDom : null]), _createVNode("div", {
|
|
262
|
-
"class": `${baseClassName}-links`
|
|
263
|
-
}, [linksRender ? linksRender() : collapsedButtonRender !== false ? _createVNode(Menu, {
|
|
264
|
-
"class": `${baseClassName}-link-menu`,
|
|
265
|
-
"inlineIndent": 16,
|
|
266
|
-
"theme": theme,
|
|
267
|
-
"selectedKeys": [],
|
|
268
|
-
"openKeys": [],
|
|
269
|
-
"mode": "inline",
|
|
270
|
-
"onClick": () => {
|
|
271
|
-
if (props.onCollapse) {
|
|
272
|
-
props.onCollapse(!props.collapsed);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}, {
|
|
276
|
-
default: () => [_createVNode(Menu.Item, {
|
|
277
|
-
"key": "collapsed-button",
|
|
278
|
-
"class": `${baseClassName}-collapsed-button`,
|
|
279
|
-
"title": false
|
|
280
|
-
}, {
|
|
281
|
-
default: () => [collapsedButtonRender && typeof collapsedButtonRender === 'function' ? collapsedButtonRender(collapsed) : collapsedButtonRender]
|
|
282
|
-
})]
|
|
283
|
-
}) : null])]
|
|
284
|
-
})]);
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
});
|
|
269
|
+
default: () => [collapsedButtonRender && typeof collapsedButtonRender === 'function' ? collapsedButtonRender(collapsed) : collapsedButtonRender]
|
|
270
|
+
})]
|
|
271
|
+
}) : null])]
|
|
272
|
+
})]);
|
|
273
|
+
};
|
|
288
274
|
export default SiderMenu;
|