@jetlinks-web/components 2.0.4 → 2.0.6
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/AMap/Map.js +3 -0
- package/es/AMap/index.js +3 -0
- package/es/BadgeStatus/Badge.js +3 -0
- package/es/BadgeStatus/index.js +3 -0
- package/es/CardSelect/CardSelect.js +4 -2
- package/es/CardSelect/index.js +3 -0
- package/es/CheckButton/CheckButton.js +4 -2
- package/es/CheckButton/index.js +3 -0
- package/es/CheckButton/style/index.css +37 -0
- package/es/CheckButton/style/index.less +40 -0
- package/es/ConfigProvider/index.js +3 -0
- package/es/Echarts/Echarts.js +3 -0
- package/es/Echarts/index.js +3 -0
- package/es/Ellipsis/Ellipsis.js +23 -15
- package/es/Ellipsis/index.js +3 -0
- package/es/Ellipsis/style/index.css +17 -0
- package/es/Ellipsis/style/index.less +20 -0
- package/es/Empty/Empty.js +3 -0
- package/es/Empty/index.js +3 -0
- package/es/FullPage/FullPage.js +4 -1
- package/es/FullPage/index.js +3 -0
- package/es/Icon/index.js +3 -0
- package/es/MonacoEditor/Monaco.js +4 -2
- package/es/MonacoEditor/index.js +3 -0
- package/es/PermissionButton/index.js +4 -1
- package/es/ProLayout/Basic/BasicLayout.js +142 -43
- package/es/ProLayout/PageContainer/index.js +2 -2
- package/es/ProLayout/SiderMenu/BaseMenu.js +2 -3
- package/es/ProLayout/SiderMenu/SiderMenu.js +35 -8
- package/es/ProLayout/SiderMenu/index.less +226 -212
- package/es/ProLayout/defaultSettings.js +38 -1
- package/es/ProLayout/index.js +5 -1
- package/es/ProLayout/style/default.less +4 -4
- package/es/ProTable/index.js +4 -1
- package/es/ProTable/style/index.css +5 -1
- package/es/Scrollbar/index.js +3 -0
- package/es/Search/Advanced/SaveHistory.js +1 -1
- package/es/Search/Advanced/index.js +3 -0
- package/es/Search/Item.js +1 -1
- package/es/Search/Search.js +4 -1
- package/es/Search/index.js +3 -0
- package/es/ValueItem/ValueItem.js +3 -0
- package/es/ValueItem/index.js +3 -0
- package/es/components.js +17 -0
- package/es/index.js +13 -22
- package/es/style/index.css +719 -0
- package/es/style/index.less +6 -0
- package/es/style/variable.css +4 -0
- package/es/style/variable.less +4 -2
- package/es/style.js +2 -0
- package/lib/AMap/Map.js +3 -0
- package/lib/AMap/index.js +3 -0
- package/lib/BadgeStatus/Badge.js +3 -0
- package/lib/BadgeStatus/index.js +3 -0
- package/lib/CardSelect/CardSelect.js +4 -2
- package/lib/CardSelect/index.js +3 -0
- package/lib/CheckButton/CheckButton.js +4 -2
- package/lib/CheckButton/index.js +3 -0
- package/lib/CheckButton/style/index.css +37 -0
- package/lib/CheckButton/style/index.less +40 -0
- package/lib/ConfigProvider/index.js +3 -0
- package/lib/Echarts/Echarts.js +3 -0
- package/lib/Echarts/index.js +3 -0
- package/lib/Ellipsis/Ellipsis.js +23 -15
- package/lib/Ellipsis/index.js +3 -0
- package/lib/Ellipsis/style/index.css +17 -0
- package/lib/Ellipsis/style/index.less +20 -0
- package/lib/Empty/Empty.js +3 -0
- package/lib/Empty/index.js +3 -0
- package/lib/FullPage/FullPage.js +4 -1
- package/lib/FullPage/index.js +3 -0
- package/lib/Icon/index.js +3 -0
- package/lib/MonacoEditor/Monaco.js +4 -2
- package/lib/MonacoEditor/index.js +3 -0
- package/lib/PermissionButton/index.js +4 -1
- package/lib/ProLayout/Basic/BasicLayout.js +140 -41
- package/lib/ProLayout/PageContainer/index.js +2 -2
- package/lib/ProLayout/SiderMenu/BaseMenu.js +2 -3
- package/lib/ProLayout/SiderMenu/SiderMenu.js +32 -5
- package/lib/ProLayout/SiderMenu/index.less +226 -212
- package/lib/ProLayout/defaultSettings.js +40 -2
- package/lib/ProLayout/index.js +10 -0
- package/lib/ProLayout/style/default.less +4 -4
- package/lib/ProTable/index.js +4 -1
- package/lib/ProTable/style/index.css +5 -1
- package/lib/Scrollbar/index.js +3 -0
- package/lib/Search/Advanced/SaveHistory.js +1 -1
- package/lib/Search/Advanced/index.js +3 -0
- package/lib/Search/Item.js +1 -1
- package/lib/Search/Search.js +4 -1
- package/lib/Search/index.js +3 -0
- package/lib/ValueItem/ValueItem.js +3 -0
- package/lib/ValueItem/index.js +3 -0
- package/lib/components.js +134 -0
- package/lib/index.js +18 -138
- package/lib/style/components.less +2 -0
- package/lib/style/index.css +719 -0
- package/lib/style/index.less +6 -0
- package/lib/style/variable.css +4 -0
- package/lib/style/variable.less +4 -2
- package/lib/style.js +2 -0
- package/package.json +8 -10
package/es/AMap/Map.js
CHANGED
package/es/AMap/index.js
CHANGED
package/es/BadgeStatus/Badge.js
CHANGED
|
@@ -12,6 +12,9 @@ import { resolveComponent as _resolveComponent, openBlock as _openBlock, createB
|
|
|
12
12
|
import { computed } from 'vue';
|
|
13
13
|
import { getHexColor } from './color';
|
|
14
14
|
const __sfc_main__ = _defineComponent({
|
|
15
|
+
...{
|
|
16
|
+
name: 'JBadgeStatus'
|
|
17
|
+
},
|
|
15
18
|
props: {
|
|
16
19
|
text: {
|
|
17
20
|
type: String,
|
package/es/BadgeStatus/index.js
CHANGED
|
@@ -20,7 +20,9 @@ const _hoisted_2 = { class: "j-card-select-item-content" };
|
|
|
20
20
|
const _hoisted_3 = { class: "j-card-select-title" };
|
|
21
21
|
const _hoisted_4 = { class: "j-card-select-describe" };
|
|
22
22
|
import { has } from 'lodash-es';
|
|
23
|
-
const __sfc_main__ = {
|
|
23
|
+
const __sfc_main__ = Object.assign({
|
|
24
|
+
name: 'JCardSelect'
|
|
25
|
+
}, {
|
|
24
26
|
props: {
|
|
25
27
|
layout: {
|
|
26
28
|
type: String,
|
|
@@ -119,5 +121,5 @@ const __sfc_main__ = {
|
|
|
119
121
|
], 4 /* STYLE */));
|
|
120
122
|
};
|
|
121
123
|
}
|
|
122
|
-
};
|
|
124
|
+
});
|
|
123
125
|
export default __sfc_main__;
|
package/es/CardSelect/index.js
CHANGED
|
@@ -19,12 +19,14 @@
|
|
|
19
19
|
"selected": "setup-const"
|
|
20
20
|
} */
|
|
21
21
|
import { defineComponent as _defineComponent } from 'vue';
|
|
22
|
-
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle
|
|
23
|
-
const _withScopeId = n => (_pushScopeId("data-v-1712901444819"), n = n(), _popScopeId(), n);
|
|
22
|
+
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue";
|
|
24
23
|
const _hoisted_1 = ["onClick"];
|
|
25
24
|
import { computed, ref, watch } from 'vue';
|
|
26
25
|
import { isArray } from '@jetlinks-web/utils';
|
|
27
26
|
const __sfc_main__ = _defineComponent({
|
|
27
|
+
...{
|
|
28
|
+
name: 'JCheckButton'
|
|
29
|
+
},
|
|
28
30
|
props: {
|
|
29
31
|
value: {
|
|
30
32
|
type: [String, Array],
|
package/es/CheckButton/index.js
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
|
|
2
|
+
/* stylelint-disable no-duplicate-selectors */
|
|
3
|
+
/* stylelint-disable */
|
|
4
|
+
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
|
|
5
|
+
.j-check-button {
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: 16px;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
.j-check-button .j-check-button-item {
|
|
11
|
+
flex: 1;
|
|
12
|
+
min-width: 0;
|
|
13
|
+
padding: 8px;
|
|
14
|
+
border-radius: 2px;
|
|
15
|
+
background-color: #f2f3f5;
|
|
16
|
+
transition: all 0.3s;
|
|
17
|
+
color: #333;
|
|
18
|
+
text-align: center;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
.j-check-button .j-check-button-item:hover {
|
|
22
|
+
background-color: #1890ff;
|
|
23
|
+
opacity: 0.85;
|
|
24
|
+
color: #fff;
|
|
25
|
+
}
|
|
26
|
+
.j-check-button .j-check-button-item.selected {
|
|
27
|
+
background-color: #1890ff;
|
|
28
|
+
color: #fff;
|
|
29
|
+
}
|
|
30
|
+
.j-check-button .j-check-button-item.disabled {
|
|
31
|
+
cursor: not-allowed;
|
|
32
|
+
color: #00000060;
|
|
33
|
+
}
|
|
34
|
+
.j-check-button .j-check-button-item.disabled:hover {
|
|
35
|
+
background-color: #f2f3f5;
|
|
36
|
+
color: #00000060;
|
|
37
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@import 'ant-design-vue/es/style/themes/index.less';
|
|
2
|
+
|
|
3
|
+
.j-check-button {
|
|
4
|
+
display: flex;
|
|
5
|
+
gap: 16px;
|
|
6
|
+
width: 100%;
|
|
7
|
+
|
|
8
|
+
.j-check-button-item {
|
|
9
|
+
flex: 1;
|
|
10
|
+
min-width: 0;
|
|
11
|
+
padding: 8px;
|
|
12
|
+
border-radius: @border-radius-base;
|
|
13
|
+
background-color: #f2f3f5;
|
|
14
|
+
transition: all 0.3s;
|
|
15
|
+
color: #333;
|
|
16
|
+
text-align: center;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
|
|
19
|
+
&:hover {
|
|
20
|
+
background-color: @primary-color;
|
|
21
|
+
opacity: 0.85;
|
|
22
|
+
color: #fff;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.selected {
|
|
26
|
+
background-color: @primary-color;
|
|
27
|
+
color: #fff;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.disabled {
|
|
31
|
+
cursor: not-allowed;
|
|
32
|
+
color: #00000060;
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
background-color: #f2f3f5;
|
|
36
|
+
color: #00000060;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
package/es/Echarts/Echarts.js
CHANGED
|
@@ -16,6 +16,9 @@ import { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createEleme
|
|
|
16
16
|
import { nextTick, ref, watch, } from 'vue';
|
|
17
17
|
import { useECharts } from '@jetlinks-web/hooks';
|
|
18
18
|
const __sfc_main__ = _defineComponent({
|
|
19
|
+
...{
|
|
20
|
+
name: 'JEcharts'
|
|
21
|
+
},
|
|
19
22
|
props: {
|
|
20
23
|
options: {
|
|
21
24
|
type: Object,
|
package/es/Echarts/index.js
CHANGED
package/es/Ellipsis/Ellipsis.js
CHANGED
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"syncCursorStyle": "setup-const",
|
|
26
26
|
"getTooltipDisabled": "setup-const"
|
|
27
27
|
} */
|
|
28
|
-
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass,
|
|
28
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, mergeProps as _mergeProps, unref as _unref, withCtx as _withCtx, createSlots as _createSlots, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
29
29
|
import { Tooltip } from 'ant-design-vue';
|
|
30
30
|
import { computed, mergeProps, ref, useAttrs } from 'vue';
|
|
31
31
|
const jEllipsis = 'j-ellipsis';
|
|
32
32
|
const jEllipsisCursorClass = 'j-ellipsis-cursor';
|
|
33
33
|
const jEllipsisLineClampClass = 'j-ellipsis-line-clamp';
|
|
34
34
|
const __sfc_main__ = Object.assign({
|
|
35
|
-
name: '
|
|
35
|
+
name: 'JEllipsis',
|
|
36
36
|
}, {
|
|
37
37
|
props: {
|
|
38
38
|
expandTrigger: {
|
|
@@ -154,17 +154,8 @@ const __sfc_main__ = Object.assign({
|
|
|
154
154
|
ref_key: "tooltipRef",
|
|
155
155
|
ref: tooltipRef,
|
|
156
156
|
placement: "top"
|
|
157
|
-
}, __props.tooltip, { visible: visible.value }), {
|
|
157
|
+
}, __props.tooltip, { visible: visible.value }), _createSlots({
|
|
158
158
|
default: _withCtx(() => [
|
|
159
|
-
(__props.tooltip)
|
|
160
|
-
? (_openBlock(), _createElementBlock("div", {
|
|
161
|
-
key: 0,
|
|
162
|
-
class: _normalizeClass([jEllipsisLineClampClass, jEllipsis, 'j-ellipsis-deep'])
|
|
163
|
-
}, [
|
|
164
|
-
_renderSlot(_ctx.$slots, "default"),
|
|
165
|
-
_renderSlot(_ctx.$slots, "tooltip")
|
|
166
|
-
], 2 /* CLASS */))
|
|
167
|
-
: _createCommentVNode("v-if", true),
|
|
168
159
|
_createElementVNode("span", _mergeProps({
|
|
169
160
|
ref_key: "triggerRef",
|
|
170
161
|
ref: triggerRef
|
|
@@ -174,10 +165,27 @@ const __sfc_main__ = Object.assign({
|
|
|
174
165
|
onMouseenter: _cache[2] || (_cache[2] = $event => (props.expandTrigger === 'click'
|
|
175
166
|
? getTooltipDisabled()
|
|
176
167
|
: showTooltip()))
|
|
177
|
-
}),
|
|
168
|
+
}), [
|
|
169
|
+
_renderSlot(_ctx.$slots, "default")
|
|
170
|
+
], 16 /* FULL_PROPS */)
|
|
178
171
|
]),
|
|
179
|
-
_:
|
|
180
|
-
},
|
|
172
|
+
_: 2 /* DYNAMIC */
|
|
173
|
+
}, [
|
|
174
|
+
(__props.tooltip)
|
|
175
|
+
? {
|
|
176
|
+
name: "title",
|
|
177
|
+
fn: _withCtx(() => [
|
|
178
|
+
_createElementVNode("div", {
|
|
179
|
+
class: _normalizeClass([jEllipsisLineClampClass, jEllipsis, 'j-ellipsis-deep'])
|
|
180
|
+
}, [
|
|
181
|
+
_renderSlot(_ctx.$slots, "default"),
|
|
182
|
+
_renderSlot(_ctx.$slots, "tooltip")
|
|
183
|
+
], 2 /* CLASS */)
|
|
184
|
+
]),
|
|
185
|
+
key: "0"
|
|
186
|
+
}
|
|
187
|
+
: undefined
|
|
188
|
+
]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["visible"]));
|
|
181
189
|
};
|
|
182
190
|
}
|
|
183
191
|
});
|
package/es/Ellipsis/index.js
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.j-ellipsis {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
vertical-align: bottom;
|
|
4
|
+
}
|
|
5
|
+
.j-ellipsis-cursor {
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
}
|
|
8
|
+
.j-ellipsis-line-clamp {
|
|
9
|
+
display: -webkit-box;
|
|
10
|
+
-webkit-box-orient: vertical;
|
|
11
|
+
word-break: break-all;
|
|
12
|
+
}
|
|
13
|
+
.j-ellipsis-deep {
|
|
14
|
+
max-height: 380px;
|
|
15
|
+
-webkit-line-clamp: 17;
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.j-ellipsis {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
vertical-align: bottom;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.j-ellipsis-cursor {
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.j-ellipsis-line-clamp {
|
|
11
|
+
display: -webkit-box;
|
|
12
|
+
-webkit-box-orient: vertical;
|
|
13
|
+
word-break: break-all;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.j-ellipsis-deep {
|
|
17
|
+
max-height: 380px;
|
|
18
|
+
-webkit-line-clamp: 17;
|
|
19
|
+
text-overflow: ellipsis;
|
|
20
|
+
}
|
package/es/Empty/Empty.js
CHANGED
package/es/Empty/index.js
CHANGED
package/es/FullPage/FullPage.js
CHANGED
|
@@ -6,11 +6,14 @@
|
|
|
6
6
|
} */
|
|
7
7
|
import { defineComponent as _defineComponent } from 'vue';
|
|
8
8
|
import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
9
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
9
|
+
const _withScopeId = n => (_pushScopeId("data-v-1713333270029"), n = n(), _popScopeId(), n);
|
|
10
10
|
const _hoisted_1 = { class: "full-page-warp-content" };
|
|
11
11
|
import { ref } from 'vue';
|
|
12
12
|
import { useElementBounding } from '@vueuse/core';
|
|
13
13
|
const __sfc_main__ = _defineComponent({
|
|
14
|
+
...{
|
|
15
|
+
name: 'JFullPage'
|
|
16
|
+
},
|
|
14
17
|
setup(__props) {
|
|
15
18
|
const fullPage = ref(null);
|
|
16
19
|
const { y } = useElementBounding(fullPage);
|
package/es/FullPage/index.js
CHANGED
package/es/Icon/index.js
CHANGED
|
@@ -51,7 +51,9 @@ import { openBlock as _openBlock, createElementBlock as _createElementBlock } fr
|
|
|
51
51
|
import { ref, onMounted, watch, onUnmounted, toRaw, nextTick } from 'vue';
|
|
52
52
|
import * as monaco from 'monaco-editor';
|
|
53
53
|
import { omit } from 'lodash-es';
|
|
54
|
-
const __sfc_main__ = {
|
|
54
|
+
const __sfc_main__ = Object.assign({
|
|
55
|
+
name: 'JMonacoEditor'
|
|
56
|
+
}, {
|
|
55
57
|
props: {
|
|
56
58
|
modelValue: [String, Number],
|
|
57
59
|
theme: { type: String, default: 'vs-dark' },
|
|
@@ -234,5 +236,5 @@ const __sfc_main__ = {
|
|
|
234
236
|
}, null, 512 /* NEED_PATCH */));
|
|
235
237
|
};
|
|
236
238
|
}
|
|
237
|
-
};
|
|
239
|
+
});
|
|
238
240
|
export default __sfc_main__;
|
package/es/MonacoEditor/index.js
CHANGED
|
@@ -27,7 +27,7 @@ var definedProps = _objectSpread({
|
|
|
27
27
|
}
|
|
28
28
|
}, omit(buttonProps(), 'icon'));
|
|
29
29
|
var PermissionButton = defineComponent({
|
|
30
|
-
name: '
|
|
30
|
+
name: 'JPermissionButton',
|
|
31
31
|
// @ts-ignore
|
|
32
32
|
slots: ['button', 'icon'],
|
|
33
33
|
props: definedProps,
|
|
@@ -114,4 +114,7 @@ var PermissionButton = defineComponent({
|
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
|
+
PermissionButton.install = function (app) {
|
|
118
|
+
app.component(PermissionButton.name, PermissionButton);
|
|
119
|
+
};
|
|
117
120
|
export default PermissionButton;
|
|
@@ -5,14 +5,14 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
5
5
|
var _excluded = ["pure", "onCollapse", "onOpenKeys", "onSelect", "onMenuClick"];
|
|
6
6
|
import SiderMenu, { siderMenuProps } from '../SiderMenu/SiderMenu';
|
|
7
7
|
import { computed, defineComponent, provide, reactive, watchEffect, toRefs, h } from 'vue';
|
|
8
|
-
import { defaultSettingProps } from '../defaultSettings';
|
|
8
|
+
import { defaultSettingProps, LayoutType } from '../defaultSettings';
|
|
9
9
|
import { baseHeaderProps } from '../TopHeader';
|
|
10
10
|
import Header, { headerViewProps } from './Header';
|
|
11
11
|
import useConfigInject from 'ant-design-vue/es/_util/hooks/useConfigInject';
|
|
12
12
|
import { pick } from 'lodash-es';
|
|
13
13
|
import { defaultRouteContext, routeContextInjectKey } from '../RouteContext';
|
|
14
14
|
import { getMenuFirstChildren, getSlot } from '../util';
|
|
15
|
-
import { Layout, LayoutContent } from 'ant-design-vue';
|
|
15
|
+
import { Layout, LayoutContent, Breadcrumb, Tabs } from 'ant-design-vue';
|
|
16
16
|
function _isSlot(s) {
|
|
17
17
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
18
18
|
}
|
|
@@ -90,7 +90,7 @@ export default defineComponent({
|
|
|
90
90
|
name: 'JProLayout',
|
|
91
91
|
inheritAttrs: false,
|
|
92
92
|
props: basicLayoutProps,
|
|
93
|
-
emits: ['update:collapsed', 'update:open-keys', 'update:selected-keys', 'collapse', 'openKeys', 'select', 'menuHeaderClick', 'menuClick', 'backClick'],
|
|
93
|
+
emits: ['update:collapsed', 'update:open-keys', 'update:selected-keys', 'update:active-key', 'collapse', 'openKeys', 'select', 'menuHeaderClick', 'menuClick', 'backClick', 'historyTabClick', 'historyTabEdit', 'appMenuClick'],
|
|
94
94
|
setup: function setup(props, _ref) {
|
|
95
95
|
var emit = _ref.emit,
|
|
96
96
|
attrs = _ref.attrs,
|
|
@@ -133,6 +133,18 @@ export default defineComponent({
|
|
|
133
133
|
var onBack = function onBack(args) {
|
|
134
134
|
emit('backClick', args);
|
|
135
135
|
};
|
|
136
|
+
var onTabClick = function onTabClick(args) {
|
|
137
|
+
emit('historyTabClick', args);
|
|
138
|
+
};
|
|
139
|
+
var onTabEdit = function onTabEdit(args) {
|
|
140
|
+
emit('historyTabEdit', args);
|
|
141
|
+
};
|
|
142
|
+
var onAppMenuClick = function onAppMenuClick(args) {
|
|
143
|
+
emit('appMenuClick', args);
|
|
144
|
+
};
|
|
145
|
+
var onTabChange = function onTabChange(key) {
|
|
146
|
+
emit('update:active-key', key);
|
|
147
|
+
};
|
|
136
148
|
var baseClassName = computed(function () {
|
|
137
149
|
return "".concat(props.prefixCls, "-basicLayout");
|
|
138
150
|
});
|
|
@@ -171,12 +183,11 @@ export default defineComponent({
|
|
|
171
183
|
hasSide: hasSide,
|
|
172
184
|
back: onBack,
|
|
173
185
|
hasHeader: true,
|
|
174
|
-
flatMenu: hasFlatMenu
|
|
186
|
+
flatMenu: hasFlatMenu,
|
|
187
|
+
layoutType: props.layoutType
|
|
175
188
|
}));
|
|
176
189
|
provide(routeContextInjectKey, routeContext);
|
|
177
190
|
return function () {
|
|
178
|
-
var _slot;
|
|
179
|
-
var _slots$default, _slots$default2;
|
|
180
191
|
var pure = props.pure,
|
|
181
192
|
propsOnCollapse = props.onCollapse,
|
|
182
193
|
propsOnOpenKeys = props.onOpenKeys,
|
|
@@ -217,43 +228,131 @@ export default defineComponent({
|
|
|
217
228
|
var contentClassName = computed(function () {
|
|
218
229
|
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(baseClassName.value, "-content"), true), "".concat(baseClassName.value, "-has-header"), headerDom), "".concat(baseClassName.value, "-content-disable-margin"), props.disableContentMargin);
|
|
219
230
|
});
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
231
|
+
if (pure) {
|
|
232
|
+
var _slots$default;
|
|
233
|
+
return (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
234
|
+
}
|
|
235
|
+
if (props.layoutType === LayoutType.LIST) {
|
|
236
|
+
var _slot;
|
|
237
|
+
var _slots$default2;
|
|
238
|
+
return _createVNode(_Fragment, null, [_createVNode("div", {
|
|
239
|
+
"class": className.value
|
|
240
|
+
}, [_createVNode(Layout, {
|
|
241
|
+
"style": _objectSpread({
|
|
242
|
+
minHeight: '100vh'
|
|
243
|
+
}, attrs.style || {})
|
|
244
|
+
}, {
|
|
245
|
+
default: function _default() {
|
|
246
|
+
return [headerDom.value, _createVNode(Layout, {
|
|
247
|
+
"style": genLayoutStyle,
|
|
248
|
+
"class": prefixCls.value
|
|
249
|
+
}, {
|
|
250
|
+
default: function _default() {
|
|
251
|
+
return [!isTop.value && _createVNode(SiderMenu, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
252
|
+
"menuHeaderRender": menuHeaderRender,
|
|
253
|
+
"menuExtraRender": menuExtraRender,
|
|
254
|
+
"menuContentRender": menuContentRender,
|
|
255
|
+
"menuItemRender": menuItemRender,
|
|
256
|
+
"subMenuItemRender": subMenuItemRender,
|
|
257
|
+
"collapsedButtonRender": collapsedButtonRender,
|
|
258
|
+
"onCollapse": onCollapse,
|
|
259
|
+
"onSelect": onSelect,
|
|
260
|
+
"onOpenKeys": onOpenKeys,
|
|
261
|
+
"onMenuClick": onMenuClick
|
|
262
|
+
}), null), _createVNode(Layout, null, _isSlot(_slot = _createVNode(LayoutContent, null, {
|
|
263
|
+
default: function _default() {
|
|
264
|
+
return [(_slots$default2 = slots.default) === null || _slots$default2 === void 0 ? void 0 : _slots$default2.call(slots)];
|
|
265
|
+
}
|
|
266
|
+
})) ? _slot : {
|
|
267
|
+
default: function _default() {
|
|
268
|
+
return [_slot];
|
|
269
|
+
}
|
|
270
|
+
})];
|
|
271
|
+
}
|
|
272
|
+
})];
|
|
273
|
+
}
|
|
274
|
+
})])]);
|
|
275
|
+
} else {
|
|
276
|
+
var _slots$default3;
|
|
277
|
+
var _slot2, _slot3, _slot4;
|
|
278
|
+
return _createVNode(_Fragment, null, [_createVNode("div", {
|
|
279
|
+
"class": className.value
|
|
280
|
+
}, [_createVNode(Layout, null, {
|
|
281
|
+
default: function _default() {
|
|
282
|
+
return [_createVNode(SiderMenu, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
283
|
+
"siderWidth": props.cardSiderWidth,
|
|
284
|
+
"headerHeight": 0,
|
|
285
|
+
"menuHeaderRender": menuHeaderRender,
|
|
286
|
+
"menuExtraRender": menuExtraRender,
|
|
287
|
+
"menuContentRender": menuContentRender,
|
|
288
|
+
"menuItemRender": menuItemRender,
|
|
289
|
+
"subMenuItemRender": subMenuItemRender,
|
|
290
|
+
"onCollapse": onCollapse,
|
|
291
|
+
"onSelect": onSelect,
|
|
292
|
+
"onOpenKeys": onOpenKeys,
|
|
293
|
+
"onMenuClick": onMenuClick,
|
|
294
|
+
"onAppMenuClick": onAppMenuClick
|
|
295
|
+
}), null), _createVNode(Layout, null, {
|
|
296
|
+
default: function _default() {
|
|
297
|
+
return [_createVNode(Layout.Header, {
|
|
298
|
+
"style": {
|
|
299
|
+
background: 'transparent',
|
|
300
|
+
padding: 0,
|
|
301
|
+
height: '40px'
|
|
302
|
+
}
|
|
303
|
+
}, _isSlot(_slot3 = _createVNode(Tabs, {
|
|
304
|
+
"hide-add": true,
|
|
305
|
+
"type": "editable-card",
|
|
306
|
+
"class": "history-tabs",
|
|
307
|
+
"id": 'history-route-tabs',
|
|
308
|
+
"tabBarStyle": {
|
|
309
|
+
margin: 0
|
|
310
|
+
},
|
|
311
|
+
"onTabClick": onTabClick,
|
|
312
|
+
"onEdit": onTabEdit,
|
|
313
|
+
"activeKey": props.historyActive,
|
|
314
|
+
"onChange": onTabChange
|
|
315
|
+
}, _isSlot(_slot2 = props.historyRoutes.map(function (item) {
|
|
316
|
+
return _createVNode(Tabs.TabPane, {
|
|
317
|
+
"key": item.name,
|
|
318
|
+
"tab": item.label,
|
|
319
|
+
"closable": true
|
|
320
|
+
}, null);
|
|
321
|
+
})) ? _slot2 : {
|
|
322
|
+
default: function _default() {
|
|
323
|
+
return [_slot2];
|
|
324
|
+
}
|
|
325
|
+
})) ? _slot3 : {
|
|
326
|
+
default: function _default() {
|
|
327
|
+
return [_slot3];
|
|
328
|
+
}
|
|
329
|
+
}), _createVNode(LayoutContent, {
|
|
330
|
+
"style": {
|
|
331
|
+
height: "calc(100vh - 88px)"
|
|
332
|
+
}
|
|
333
|
+
}, {
|
|
334
|
+
default: function _default() {
|
|
335
|
+
return [(_slots$default3 = slots.default) === null || _slots$default3 === void 0 ? void 0 : _slots$default3.call(slots)];
|
|
336
|
+
}
|
|
337
|
+
}), _createVNode(Layout.Footer, {
|
|
338
|
+
"style": {
|
|
339
|
+
padding: '11px 24px'
|
|
340
|
+
}
|
|
341
|
+
}, _isSlot(_slot4 = _createVNode("div", {
|
|
342
|
+
"style": props.pageFooterStyle
|
|
343
|
+
}, [_createVNode(Breadcrumb, {
|
|
344
|
+
"routes": props.breadcrumb.routes,
|
|
345
|
+
"itemRender": props.breadcrumbRender
|
|
346
|
+
}, null)])) ? _slot4 : {
|
|
347
|
+
default: function _default() {
|
|
348
|
+
return [_slot4];
|
|
349
|
+
}
|
|
350
|
+
})];
|
|
351
|
+
}
|
|
352
|
+
})];
|
|
353
|
+
}
|
|
354
|
+
})])]);
|
|
355
|
+
}
|
|
257
356
|
};
|
|
258
357
|
}
|
|
259
358
|
});
|
|
@@ -12,7 +12,7 @@ import { pageHeaderProps } from 'ant-design-vue/es/page-header';
|
|
|
12
12
|
import { useRouteContext } from '../RouteContext';
|
|
13
13
|
import { getSlotVNode } from '../util';
|
|
14
14
|
import 'ant-design-vue/es/_util/type';
|
|
15
|
-
import '
|
|
15
|
+
import PropTypes from 'ant-design-vue/es/_util/vue-types';
|
|
16
16
|
function _isSlot(s) {
|
|
17
17
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
18
18
|
}
|
|
@@ -59,7 +59,7 @@ export var pageHeaderTabConfig = {
|
|
|
59
59
|
export var pageContainerProps = _objectSpread(_objectSpread(_objectSpread({}, pageHeaderTabConfig), pageHeaderProps), {}, {
|
|
60
60
|
prefixCls: {
|
|
61
61
|
type: String,
|
|
62
|
-
default: 'ant-pro'
|
|
62
|
+
default: PropTypes.string.def('ant-pro')
|
|
63
63
|
},
|
|
64
64
|
title: {
|
|
65
65
|
type: [Object, String, Boolean, Function],
|