@jetlinks-web/components 2.0.1 → 2.0.2-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 +3 -3
- package/src/ConfigProvider/context.ts +17 -17
- package/src/ConfigProvider/index.tsx +40 -42
- package/src/ProLayout/Basic/BasicLayout.tsx +395 -392
- package/src/ProLayout/Basic/Header.tsx +115 -115
- package/src/ProLayout/PageContainer/index.tsx +441 -441
- package/src/ProLayout/SiderMenu/BaseMenu.tsx +296 -296
- package/src/ProLayout/SiderMenu/SiderMenu.tsx +320 -320
- package/src/ProLayout/SiderMenu/typings.ts +49 -49
- package/src/ProLayout/TopHeader/index.tsx +210 -210
- package/src/ProLayout/typings.ts +87 -87
- package/src/ProTable/index.tsx +551 -551
- package/src/ProTable/proTableTypes.ts +70 -70
- package/src/ProTable/style/index.less +92 -92
- package/src/Search/typing.ts +76 -76
- package/src/style/variable.less +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetlinks-web/components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2-2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"module": "index.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"echarts": "^5.4.3",
|
|
22
22
|
"monaco-editor": "^0.40.0",
|
|
23
23
|
"@jetlinks-web/constants": "^1.0.2",
|
|
24
|
-
"@jetlinks-web/
|
|
25
|
-
"@jetlinks-web/
|
|
24
|
+
"@jetlinks-web/hooks": "^1.0.12",
|
|
25
|
+
"@jetlinks-web/utils": "^1.0.6"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"lodash-es": "^4.17.21",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type {PropType} from "vue";
|
|
2
|
-
import { configProviderProps } from 'ant-design-vue/
|
|
3
|
-
|
|
4
|
-
export type MapConfigType = {
|
|
5
|
-
mapStyle?: any
|
|
6
|
-
JSKey?: string
|
|
7
|
-
WebKey?: string
|
|
8
|
-
}
|
|
9
|
-
export const configProps = () => ({
|
|
10
|
-
...configProviderProps(),
|
|
11
|
-
IconConfig: {
|
|
12
|
-
type: Object as PropType<{ scriptUrl: string }>
|
|
13
|
-
},
|
|
14
|
-
MapConfig: {
|
|
15
|
-
type: Object as PropType<MapConfigType>
|
|
16
|
-
}
|
|
17
|
-
})
|
|
1
|
+
import type {PropType} from "vue";
|
|
2
|
+
import { configProviderProps } from 'ant-design-vue/es/config-provider/context';
|
|
3
|
+
|
|
4
|
+
export type MapConfigType = {
|
|
5
|
+
mapStyle?: any
|
|
6
|
+
JSKey?: string
|
|
7
|
+
WebKey?: string
|
|
8
|
+
}
|
|
9
|
+
export const configProps = () => ({
|
|
10
|
+
...configProviderProps(),
|
|
11
|
+
IconConfig: {
|
|
12
|
+
type: Object as PropType<{ scriptUrl: string }>
|
|
13
|
+
},
|
|
14
|
+
MapConfig: {
|
|
15
|
+
type: Object as PropType<MapConfigType>
|
|
16
|
+
}
|
|
17
|
+
})
|
|
@@ -1,42 +1,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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
export default JConfigProvider
|
|
1
|
+
import {defineComponent, provide, reactive, h} 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
|
+
return h(
|
|
27
|
+
ConfigProvider,
|
|
28
|
+
{...omit(props, ['IconConfig', 'MapConfig'])},
|
|
29
|
+
{
|
|
30
|
+
default: slots.default,
|
|
31
|
+
renderEmpty: () => (slots.renderEmpty?.() || <Empty />)
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
JConfigProvider.config = ConfigProvider.config
|
|
39
|
+
|
|
40
|
+
export default JConfigProvider
|