@jetlinks-web/components 2.0.2-1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetlinks-web/components",
|
|
3
|
-
"version": "2.0.2
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"module": "index.ts",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"sortablejs": "^1.15.2",
|
|
21
21
|
"echarts": "^5.4.3",
|
|
22
22
|
"monaco-editor": "^0.40.0",
|
|
23
|
+
"@jetlinks-web/utils": "^1.0.6",
|
|
23
24
|
"@jetlinks-web/constants": "^1.0.2",
|
|
24
|
-
"@jetlinks-web/hooks": "^1.0.
|
|
25
|
-
"@jetlinks-web/utils": "^1.0.6"
|
|
25
|
+
"@jetlinks-web/hooks": "^1.0.10"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"lodash-es": "^4.17.21",
|
|
@@ -1,40 +1,42 @@
|
|
|
1
|
-
import {defineComponent, provide, reactive} from 'vue'
|
|
2
|
-
import { configProps } from './context'
|
|
3
|
-
import type { MapConfigType } from './context'
|
|
4
|
-
import { ComponentsEnum, MAPConfig } from '@jetlinks-web/constants'
|
|
5
|
-
import { ConfigProvider } from 'ant-design-vue'
|
|
6
|
-
import {omit} from 'lodash-es'
|
|
7
|
-
import Empty from '../Empty'
|
|
8
|
-
|
|
9
|
-
const JConfigProvider = defineComponent({
|
|
10
|
-
name: 'JConfigProvider',
|
|
11
|
-
inheritAttrs: false,
|
|
12
|
-
props: {
|
|
13
|
-
...configProps()
|
|
14
|
-
},
|
|
15
|
-
setup(props, { slots }) {
|
|
16
|
-
|
|
17
|
-
const _iconConfig = reactive(props.IconConfig || {})
|
|
18
|
-
const _mapConfig = reactive<MapConfigType>(props.MapConfig || {})
|
|
19
|
-
|
|
20
|
-
provide(ComponentsEnum.Icon, _iconConfig) // 全局Icon 配置
|
|
21
|
-
|
|
22
|
-
provide(MAPConfig, _mapConfig) // 全局地图配置
|
|
23
|
-
|
|
24
|
-
return () => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
import {defineComponent, provide, reactive} from 'vue'
|
|
2
|
+
import { configProps } from './context'
|
|
3
|
+
import type { MapConfigType } from './context'
|
|
4
|
+
import { ComponentsEnum, MAPConfig } from '@jetlinks-web/constants'
|
|
5
|
+
import { ConfigProvider } from 'ant-design-vue'
|
|
6
|
+
import {omit} from 'lodash-es'
|
|
7
|
+
import Empty from '../Empty'
|
|
8
|
+
|
|
9
|
+
const JConfigProvider = defineComponent({
|
|
10
|
+
name: 'JConfigProvider',
|
|
11
|
+
inheritAttrs: false,
|
|
12
|
+
props: {
|
|
13
|
+
...configProps()
|
|
14
|
+
},
|
|
15
|
+
setup(props, { slots }) {
|
|
16
|
+
|
|
17
|
+
const _iconConfig = reactive(props.IconConfig || {})
|
|
18
|
+
const _mapConfig = reactive<MapConfigType>(props.MapConfig || {})
|
|
19
|
+
|
|
20
|
+
provide(ComponentsEnum.Icon, _iconConfig) // 全局Icon 配置
|
|
21
|
+
|
|
22
|
+
provide(MAPConfig, _mapConfig) // 全局地图配置
|
|
23
|
+
|
|
24
|
+
return () => {
|
|
25
|
+
return (
|
|
26
|
+
<ConfigProvider
|
|
27
|
+
{...omit(props, ['IconConfig', 'MapConfig'])}
|
|
28
|
+
v-slots={{
|
|
29
|
+
renderEmpty: () => (slots.renderEmpty?.() || <Empty />),
|
|
30
|
+
...slots,
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
{ slots.default?.() }
|
|
34
|
+
</ConfigProvider>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
JConfigProvider.config = ConfigProvider.config
|
|
41
|
+
|
|
42
|
+
export default JConfigProvider
|
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
reactive,
|
|
22
22
|
watchEffect,
|
|
23
23
|
toRefs,
|
|
24
|
-
h
|
|
25
24
|
} from 'vue';
|
|
26
25
|
import { defaultSettingProps } from '../defaultSettings';
|
|
27
26
|
import { baseHeaderProps } from '../TopHeader';
|
|
@@ -195,9 +194,7 @@ export default defineComponent({
|
|
|
195
194
|
if (p.headerRender === false || p.pure) {
|
|
196
195
|
return null;
|
|
197
196
|
}
|
|
198
|
-
return
|
|
199
|
-
|
|
200
|
-
// <Header {...p} matchMenuKeys={matchMenuKeys || []} />;
|
|
197
|
+
return <Header {...p} matchMenuKeys={matchMenuKeys || []} />;
|
|
201
198
|
};
|
|
202
199
|
|
|
203
200
|
const breadcrumb = computed<BreadcrumbProps>(() => ({
|