@jetlinks-web/components 2.0.2 → 2.0.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/es/AMap/Map.js +124 -0
- package/es/AMap/index.js +2 -0
- package/es/AMap/util.js +56 -0
- package/es/BadgeStatus/Badge.js +54 -0
- package/es/BadgeStatus/color.js +21 -0
- package/es/BadgeStatus/index.js +3 -0
- package/es/CardSelect/CardSelect.js +123 -0
- package/es/CardSelect/index.js +2 -0
- package/es/CheckButton/CheckButton.js +121 -0
- package/es/CheckButton/index.js +2 -0
- package/es/ConfigProvider/context.js +12 -0
- package/es/ConfigProvider/index.js +31 -0
- package/es/Echarts/Echarts.js +47 -0
- package/es/Echarts/index.js +2 -0
- package/es/Ellipsis/Ellipsis.js +189 -0
- package/es/Ellipsis/index.js +2 -0
- package/es/Empty/Empty.js +56 -0
- package/es/Empty/image.js +2 -0
- package/es/Empty/index.js +2 -0
- package/es/FullPage/FullPage.js +31 -0
- package/es/FullPage/index.js +2 -0
- package/es/Icon/icon.js +42 -0
- package/{src/Icon/index.ts → es/Icon/index.js} +2 -3
- package/es/MonacoEditor/Monaco.js +238 -0
- package/es/MonacoEditor/index.js +2 -0
- package/es/PermissionButton/index.js +117 -0
- package/es/ProLayout/Basic/BasicLayout.js +259 -0
- package/es/ProLayout/Basic/Header.js +97 -0
- package/es/ProLayout/PageContainer/index.js +324 -0
- package/es/ProLayout/PageContainer/typings.js +1 -0
- package/es/ProLayout/RouteContext.js +22 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +285 -0
- package/es/ProLayout/SiderMenu/SiderMenu.js +278 -0
- package/es/ProLayout/SiderMenu/index.js +2 -0
- package/es/ProLayout/SiderMenu/typings.js +1 -0
- package/es/ProLayout/TopHeader/index.js +163 -0
- package/es/ProLayout/defaultSettings.js +66 -0
- package/{src/ProLayout/index.ts → es/ProLayout/index.js} +4 -6
- package/{src → es}/ProLayout/style/default.less +4 -4
- package/es/ProLayout/style/index.js +1 -0
- package/es/ProLayout/typings.js +1 -0
- package/es/ProLayout/util.js +61 -0
- package/es/ProTable/index.js +411 -0
- package/es/ProTable/proTableTypes.js +11 -0
- package/es/ProTable/style/index.css +65 -0
- package/es/ProTable/style/index.js +1 -0
- package/es/Scrollbar/Bar.js +114 -0
- package/es/Scrollbar/Scrollbar.js +212 -0
- package/es/Scrollbar/Thumb.js +189 -0
- package/es/Scrollbar/constants.js +1 -0
- package/es/Scrollbar/index.js +2 -0
- package/es/Scrollbar/scrollbarProps.js +100 -0
- package/es/Scrollbar/thumbProps.js +10 -0
- package/es/Scrollbar/util.js +30 -0
- package/es/Search/Advanced/History.js +183 -0
- package/es/Search/Advanced/SaveHistory.js +153 -0
- package/es/Search/Advanced/index.js +520 -0
- package/es/Search/Item.js +497 -0
- package/es/Search/Search.js +249 -0
- package/es/Search/hooks/index.js +1 -0
- package/es/Search/hooks/useSearchItems.js +40 -0
- package/es/Search/index.js +4 -0
- package/es/Search/setting.js +91 -0
- package/es/Search/style/Item.less +33 -0
- package/es/Search/style/Search.less +179 -0
- package/es/Search/style/index.js +2 -0
- package/es/Search/typing.js +1 -0
- package/es/Search/util.js +234 -0
- package/es/ValueItem/ValueItem.js +233 -0
- package/es/ValueItem/index.js +2 -0
- package/es/ValueItem/util.js +16 -0
- package/es/index.js +24 -0
- package/es/style/index.js +3 -0
- package/es/style/variable.css +0 -0
- package/{src → es}/style/variable.less +0 -2
- package/es/style.js +3 -0
- package/lib/AMap/Map.js +124 -0
- package/lib/AMap/index.js +9 -0
- package/lib/AMap/util.js +62 -0
- package/lib/BadgeStatus/Badge.js +54 -0
- package/lib/BadgeStatus/color.js +27 -0
- package/lib/BadgeStatus/index.js +22 -0
- package/lib/CardSelect/CardSelect.js +123 -0
- package/lib/CardSelect/index.js +9 -0
- package/lib/CheckButton/CheckButton.js +121 -0
- package/lib/CheckButton/index.js +9 -0
- package/lib/ConfigProvider/context.js +19 -0
- package/lib/ConfigProvider/index.js +37 -0
- package/lib/Echarts/Echarts.js +47 -0
- package/lib/Echarts/index.js +9 -0
- package/lib/Ellipsis/Ellipsis.js +189 -0
- package/lib/Ellipsis/index.js +9 -0
- package/lib/Empty/Empty.js +56 -0
- package/lib/Empty/image.js +8 -0
- package/lib/Empty/index.js +9 -0
- package/lib/FullPage/FullPage.js +31 -0
- package/lib/FullPage/index.js +9 -0
- package/lib/Icon/icon.js +52 -0
- package/lib/Icon/index.js +9 -0
- package/lib/MonacoEditor/Monaco.js +238 -0
- package/lib/MonacoEditor/index.js +9 -0
- package/lib/PermissionButton/index.js +124 -0
- package/lib/ProLayout/Basic/BasicLayout.js +268 -0
- package/lib/ProLayout/Basic/BasicLayout.less +66 -0
- package/lib/ProLayout/Basic/Header.js +103 -0
- package/lib/ProLayout/Basic/Header.less +8 -0
- package/lib/ProLayout/PageContainer/index.js +327 -0
- package/lib/ProLayout/PageContainer/index.less +103 -0
- package/lib/ProLayout/PageContainer/typings.js +5 -0
- package/lib/ProLayout/RouteContext.js +28 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +290 -0
- package/lib/ProLayout/SiderMenu/SiderMenu.js +287 -0
- package/lib/ProLayout/SiderMenu/index.js +20 -0
- package/lib/ProLayout/SiderMenu/index.less +212 -0
- package/lib/ProLayout/SiderMenu/typings.js +5 -0
- package/lib/ProLayout/TopHeader/index.js +168 -0
- package/lib/ProLayout/TopHeader/index.less +174 -0
- package/lib/ProLayout/defaultSettings.js +72 -0
- package/lib/ProLayout/index.js +16 -0
- package/lib/ProLayout/style/default.less +4 -0
- package/lib/ProLayout/style/index.js +3 -0
- package/lib/ProLayout/style/style.less +7 -0
- package/lib/ProLayout/typings.js +5 -0
- package/lib/ProLayout/util.js +72 -0
- package/lib/ProTable/index.js +417 -0
- package/lib/ProTable/proTableTypes.js +17 -0
- package/lib/ProTable/style/index.css +65 -0
- package/lib/ProTable/style/index.js +3 -0
- package/lib/ProTable/style/index.less +92 -0
- package/lib/Scrollbar/Bar.js +114 -0
- package/lib/Scrollbar/Scrollbar.js +212 -0
- package/lib/Scrollbar/Thumb.js +189 -0
- package/lib/Scrollbar/constants.js +7 -0
- package/lib/Scrollbar/index.js +9 -0
- package/{src/Scrollbar/scrollbar.ts → lib/Scrollbar/scrollbarProps.js} +106 -108
- package/lib/Scrollbar/thumbProps.js +16 -0
- package/lib/Scrollbar/util.js +37 -0
- package/lib/Search/Advanced/History.js +183 -0
- package/lib/Search/Advanced/SaveHistory.js +153 -0
- package/lib/Search/Advanced/index.js +520 -0
- package/lib/Search/Item.js +497 -0
- package/lib/Search/Search.js +249 -0
- package/lib/Search/hooks/index.js +16 -0
- package/lib/Search/hooks/useSearchItems.js +47 -0
- package/lib/Search/index.js +16 -0
- package/lib/Search/setting.js +97 -0
- package/lib/Search/style/Item.less +33 -0
- package/lib/Search/style/Search.less +179 -0
- package/lib/Search/style/index.js +4 -0
- package/lib/Search/typing.js +5 -0
- package/lib/Search/util.js +241 -0
- package/lib/ValueItem/ValueItem.js +233 -0
- package/lib/ValueItem/index.js +9 -0
- package/lib/ValueItem/util.js +22 -0
- package/lib/index.js +158 -0
- package/lib/style/components.less +1 -0
- package/lib/style/index.js +4 -0
- package/lib/style/variable.css +0 -0
- package/lib/style/variable.less +2 -0
- package/lib/style.js +5 -0
- package/package.json +122 -13
- package/index.ts +0 -64
- package/src/AMap/Map.vue +0 -110
- package/src/AMap/index.ts +0 -1
- package/src/AMap/util.ts +0 -56
- package/src/BadgeStatus/Badge.vue +0 -41
- package/src/BadgeStatus/color.ts +0 -25
- package/src/BadgeStatus/index.ts +0 -4
- package/src/CardSelect/CardSelect.vue +0 -136
- package/src/CardSelect/index.ts +0 -3
- package/src/CheckButton/CheckButton.vue +0 -146
- package/src/CheckButton/index.md +0 -27
- package/src/CheckButton/index.ts +0 -3
- package/src/ConfigProvider/context.ts +0 -17
- package/src/ConfigProvider/index.tsx +0 -42
- package/src/Echarts/Echarts.vue +0 -43
- package/src/Echarts/index.ts +0 -3
- package/src/Ellipsis/Ellipsis.vue +0 -182
- package/src/Ellipsis/index.ts +0 -3
- package/src/Empty/Empty.vue +0 -43
- package/src/Empty/image.ts +0 -3
- package/src/Empty/index.ts +0 -2
- package/src/FullPage/FullPage.vue +0 -30
- package/src/FullPage/index.ts +0 -3
- package/src/Icon/icon.tsx +0 -40
- package/src/MonacoEditor/Monaco.vue +0 -242
- package/src/MonacoEditor/index.md +0 -26
- package/src/MonacoEditor/index.ts +0 -2
- package/src/PermissionButton/index.tsx +0 -110
- package/src/ProLayout/Basic/BasicLayout.tsx +0 -392
- package/src/ProLayout/Basic/Header.tsx +0 -115
- package/src/ProLayout/PageContainer/index.tsx +0 -441
- package/src/ProLayout/PageContainer/typings.ts +0 -56
- package/src/ProLayout/RouteContext.ts +0 -87
- package/src/ProLayout/SiderMenu/BaseMenu.tsx +0 -296
- package/src/ProLayout/SiderMenu/SiderMenu.tsx +0 -320
- package/src/ProLayout/SiderMenu/index.ts +0 -2
- package/src/ProLayout/SiderMenu/typings.ts +0 -49
- package/src/ProLayout/TopHeader/index.tsx +0 -210
- package/src/ProLayout/defaultSettings.ts +0 -106
- package/src/ProLayout/style/index.ts +0 -1
- package/src/ProLayout/typings.ts +0 -87
- package/src/ProLayout/util.ts +0 -64
- package/src/ProTable/index.md +0 -53
- package/src/ProTable/index.tsx +0 -551
- package/src/ProTable/proTableTypes.ts +0 -70
- package/src/ProTable/style/index.ts +0 -1
- package/src/Scrollbar/Bar.vue +0 -75
- package/src/Scrollbar/Scrollbar.vue +0 -260
- package/src/Scrollbar/Thumb.vue +0 -163
- package/src/Scrollbar/constants.ts +0 -10
- package/src/Scrollbar/index.ts +0 -4
- package/src/Scrollbar/thumb.ts +0 -16
- package/src/Scrollbar/util.ts +0 -38
- package/src/Search/Advanced/History.vue +0 -140
- package/src/Search/Advanced/SaveHistory.vue +0 -108
- package/src/Search/Advanced/index.vue +0 -435
- package/src/Search/Item.vue +0 -525
- package/src/Search/Search.vue +0 -398
- package/src/Search/hooks/index.ts +0 -1
- package/src/Search/hooks/useSearchItems.ts +0 -68
- package/src/Search/index.md +0 -57
- package/src/Search/index.ts +0 -5
- package/src/Search/setting.ts +0 -55
- package/src/Search/typing.ts +0 -76
- package/src/Search/util.ts +0 -263
- package/src/ValueItem/ValueItem.vue +0 -192
- package/src/ValueItem/index.ts +0 -3
- package/src/ValueItem/util.ts +0 -16
- package/src/style/index.ts +0 -3
- /package/{src → es}/ProLayout/Basic/BasicLayout.less +0 -0
- /package/{src → es}/ProLayout/Basic/Header.less +0 -0
- /package/{src → es}/ProLayout/PageContainer/index.less +0 -0
- /package/{src → es}/ProLayout/SiderMenu/index.less +0 -0
- /package/{src → es}/ProLayout/TopHeader/index.less +0 -0
- /package/{src → es}/ProLayout/style/style.less +0 -0
- /package/{src → es}/ProTable/style/index.less +0 -0
package/lib/style.js
ADDED
package/package.json
CHANGED
|
@@ -1,40 +1,149 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetlinks-web/components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "index.
|
|
6
|
-
"module": "index.
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"module": "es/index.js",
|
|
7
7
|
"keywords": [],
|
|
8
8
|
"files": [
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"lib",
|
|
10
|
+
"es"
|
|
11
11
|
],
|
|
12
12
|
"private": false,
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@ant-design/icons-vue": "^7.0.1",
|
|
17
|
+
"@vuemap/vue-amap": "^2.0.17",
|
|
17
18
|
"@vueuse/core": "^10.2.1",
|
|
18
19
|
"@vueuse/router": "^10.9.0",
|
|
19
|
-
"
|
|
20
|
-
"sortablejs": "^1.15.2",
|
|
20
|
+
"ant-design-vue": "3.2.20",
|
|
21
21
|
"echarts": "^5.4.3",
|
|
22
22
|
"monaco-editor": "^0.40.0",
|
|
23
|
-
"
|
|
23
|
+
"sortablejs": "^1.15.2",
|
|
24
24
|
"@jetlinks-web/constants": "^1.0.2",
|
|
25
|
-
"@jetlinks-web/hooks": "^1.0.
|
|
25
|
+
"@jetlinks-web/hooks": "^1.0.12",
|
|
26
|
+
"@jetlinks-web/utils": "^1.0.6"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
29
|
+
"@babel/cli": "^7.8.4",
|
|
30
|
+
"@babel/core": "^7.10.5",
|
|
31
|
+
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
|
32
|
+
"@babel/plugin-proposal-export-default-from": "^7.8.3",
|
|
33
|
+
"@babel/plugin-proposal-export-namespace-from": "^7.12.1",
|
|
34
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.9.6",
|
|
35
|
+
"@babel/plugin-proposal-optional-chaining": "^7.10.1",
|
|
36
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
37
|
+
"@babel/plugin-transform-member-expression-literals": "^7.8.3",
|
|
38
|
+
"@babel/plugin-transform-object-assign": "^7.8.3",
|
|
39
|
+
"@babel/plugin-transform-property-literals": "^7.8.3",
|
|
40
|
+
"@babel/plugin-transform-runtime": "^7.10.5",
|
|
41
|
+
"@babel/plugin-transform-template-literals": "^7.8.3",
|
|
42
|
+
"@babel/plugin-transform-typescript": "^7.12.1",
|
|
43
|
+
"@babel/polyfill": "^7.8.7",
|
|
44
|
+
"@babel/preset-env": "^7.9.6",
|
|
45
|
+
"@babel/preset-typescript": "^7.10.4",
|
|
46
|
+
"@commitlint/cli": "^17.4.2",
|
|
47
|
+
"@commitlint/config-conventional": "^17.4.2",
|
|
48
|
+
"@rollup/plugin-commonjs": "^22.0.1",
|
|
49
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
50
|
+
"@types/eslint": "^8.21.0",
|
|
51
|
+
"@types/lodash-es": "^4.17.6",
|
|
52
|
+
"@types/node": "^18.13.0",
|
|
53
|
+
"@types/sortablejs": "^1.15.1",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^5.50.0",
|
|
55
|
+
"@typescript-eslint/parser": "^5.50.0",
|
|
56
|
+
"@vitejs/plugin-vue": "^2.3.3",
|
|
57
|
+
"@vitejs/plugin-vue-jsx": "^1.3.10",
|
|
58
|
+
"@vue/babel-plugin-jsx": "^1.0.0",
|
|
59
|
+
"@vue/compiler-sfc": "^3.4.21",
|
|
60
|
+
"autoprefixer": "^10.2.0",
|
|
61
|
+
"babel-eslint": "^10.0.1",
|
|
62
|
+
"babel-loader": "^8.0.0",
|
|
63
|
+
"babel-plugin-import": "^1.1.1",
|
|
64
|
+
"babel-plugin-inline-import-data-uri": "^1.0.1",
|
|
65
|
+
"babel-plugin-istanbul": "^6.0.0",
|
|
66
|
+
"babel-plugin-transform-require-context": "^0.1.1",
|
|
67
|
+
"case-sensitive-paths-webpack-plugin": "^2.1.2",
|
|
68
|
+
"child_process": "^1.0.2",
|
|
69
|
+
"codesandbox": "^2.2.3",
|
|
70
|
+
"colorful": "^2.1.0",
|
|
71
|
+
"commander": "^6.1.0",
|
|
72
|
+
"commitlint": "^17.4.2",
|
|
73
|
+
"compute-scroll-into-view": "^3.0.0",
|
|
74
|
+
"css-loader": "^6.7.3",
|
|
75
|
+
"css-minimizer-webpack-plugin": "^3.0.0",
|
|
76
|
+
"diacritics": "^1.3.0",
|
|
77
|
+
"duplicate-package-checker-webpack-plugin": "^3.0.0",
|
|
78
|
+
"esbuild": "~0.12.29",
|
|
79
|
+
"esbuild-loader": "^2.18.0",
|
|
80
|
+
"escape-html": "^1.0.3",
|
|
81
|
+
"eslint": "^8.33.0",
|
|
82
|
+
"eslint-config-prettier": "^8.0.0",
|
|
83
|
+
"eslint-plugin-html": "^6.0.0",
|
|
84
|
+
"eslint-plugin-import": "^2.24.2",
|
|
85
|
+
"eslint-plugin-markdown": "^2.0.0",
|
|
86
|
+
"eslint-plugin-vue": "^8.1.1",
|
|
87
|
+
"fast-glob": "^3.2.12",
|
|
88
|
+
"globby": "^11.1.0",
|
|
89
|
+
"gray-matter": "^4.0.3",
|
|
90
|
+
"gulp": "^4.0.2",
|
|
91
|
+
"gulp-babel": "^8.0.0",
|
|
92
|
+
"gulp-strip-code": "^0.1.4",
|
|
93
|
+
"gulp-typescript": "^6.0.0-alpha.1",
|
|
94
|
+
"is-windows": "^1.0.2",
|
|
95
|
+
"json5": "^2.2.3",
|
|
96
|
+
"less": "^4.1.3",
|
|
97
|
+
"less-loader": "^11.1.0",
|
|
98
|
+
"less-plugin-npm-import": "^2.1.0",
|
|
99
|
+
"less-vars-to-js": "^1.3.0",
|
|
100
|
+
"lint-staged": "^13.1.0",
|
|
101
|
+
"lru-cache": "^7.14.1",
|
|
102
|
+
"marked": "0.3.18",
|
|
103
|
+
"merge2": "^1.4.1",
|
|
104
|
+
"mini-css-extract-plugin": "^2.4.5",
|
|
105
|
+
"minimist": "^1.2.0",
|
|
106
|
+
"mkdirp": "^0.5.1",
|
|
107
|
+
"object-assign": "^4.1.1",
|
|
108
|
+
"postcss": "^8.2.12",
|
|
109
|
+
"postcss-loader": "^6.0.0",
|
|
110
|
+
"prettier": "^2.8.3",
|
|
111
|
+
"prismjs": "^1.29.0",
|
|
112
|
+
"remove-files-webpack-plugin": "^1.5.0",
|
|
113
|
+
"rollup-plugin-esbuild": "^4.9.1",
|
|
114
|
+
"rollup-plugin-typescript2": "^0.34.1",
|
|
115
|
+
"rollup-plugin-vue": "^6.0.0",
|
|
116
|
+
"slash": "^3.0.0",
|
|
117
|
+
"string-replace-loader": "^3.1.0",
|
|
118
|
+
"style-loader": "^3.3.1",
|
|
119
|
+
"sucrase": "^3.29.0",
|
|
120
|
+
"terser-webpack-plugin": "^5.1.1",
|
|
121
|
+
"through2": "^4.0.2",
|
|
122
|
+
"ts-loader": "^9.1.0",
|
|
123
|
+
"ts-morph": "^17.0.1",
|
|
124
|
+
"typescript": "^4.9.3",
|
|
125
|
+
"unplugin-vue-macros": "^0.11.2",
|
|
126
|
+
"url": "^0.11.0",
|
|
127
|
+
"url-loader": "^3.0.0",
|
|
128
|
+
"vite": "^4.0.0",
|
|
129
|
+
"vite-plugin-monaco-editor": "^1.1.0",
|
|
130
|
+
"vite-plugin-vue-setup-extend": "^0.4.0",
|
|
131
|
+
"vue": "^3.2.45",
|
|
132
|
+
"vue-eslint-parser": "^9.1.0",
|
|
133
|
+
"vue-tsc": "^1.0.11",
|
|
134
|
+
"webpack": "^5.75.0",
|
|
135
|
+
"webpack-bundle-analyzer": "^4.4.2",
|
|
136
|
+
"webpack-cli": "^4.6.0",
|
|
137
|
+
"webpack-dev-server": "^4.0.0",
|
|
138
|
+
"webpack-merge": "^5.0.0",
|
|
139
|
+
"webpackbar": "^5.0.2"
|
|
32
140
|
},
|
|
33
141
|
"publishConfig": {
|
|
34
142
|
"registry": "https://registry.npmjs.org/",
|
|
35
143
|
"access": "public"
|
|
36
144
|
},
|
|
37
145
|
"scripts": {
|
|
146
|
+
"compile": "node tools/cli/run.js compile",
|
|
38
147
|
"clean": "pnpm rimraf node_modules && pnpm rimraf .turbo"
|
|
39
148
|
}
|
|
40
149
|
}
|
package/index.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { App } from 'vue'
|
|
2
|
-
|
|
3
|
-
import { InitAMap } from './src/AMap'
|
|
4
|
-
import BadgeStatus from './src/BadgeStatus'
|
|
5
|
-
import CardSelect from './src/CardSelect'
|
|
6
|
-
import CheckButton from './src/CheckButton'
|
|
7
|
-
import ConfigProvider from './src/ConfigProvider'
|
|
8
|
-
import Echarts from './src/Echarts'
|
|
9
|
-
import Ellipsis from './src/Ellipsis'
|
|
10
|
-
import Empty from './src/Empty'
|
|
11
|
-
import FullPage from './src/FullPage'
|
|
12
|
-
import AIcon from './src/Icon'
|
|
13
|
-
import MonacoEditor from './src/MonacoEditor'
|
|
14
|
-
import PermissionButton from './src/PermissionButton'
|
|
15
|
-
import ProLayout, { PageContainer } from './src/ProLayout'
|
|
16
|
-
import ProTable from './src/ProTable'
|
|
17
|
-
import Scrollbar from './src/Scrollbar'
|
|
18
|
-
import Search, { AdvancedSearch } from './src/Search'
|
|
19
|
-
import ValueItem from './src/ValueItem'
|
|
20
|
-
|
|
21
|
-
export * from './src/style'
|
|
22
|
-
|
|
23
|
-
export {
|
|
24
|
-
BadgeStatus,
|
|
25
|
-
CardSelect,
|
|
26
|
-
CheckButton,
|
|
27
|
-
Echarts,
|
|
28
|
-
Ellipsis,
|
|
29
|
-
Empty,
|
|
30
|
-
FullPage,
|
|
31
|
-
AIcon,
|
|
32
|
-
MonacoEditor,
|
|
33
|
-
PermissionButton,
|
|
34
|
-
ValueItem,
|
|
35
|
-
ProTable,
|
|
36
|
-
Scrollbar,
|
|
37
|
-
Search,
|
|
38
|
-
AdvancedSearch,
|
|
39
|
-
ConfigProvider,
|
|
40
|
-
}
|
|
41
|
-
export default {
|
|
42
|
-
install(app: App) {
|
|
43
|
-
app
|
|
44
|
-
.component('JAMap', InitAMap)
|
|
45
|
-
.component('JBadgeStatus', BadgeStatus)
|
|
46
|
-
.component('JCardSelect', CardSelect)
|
|
47
|
-
.component('JCheckButton', CheckButton)
|
|
48
|
-
.component('JConfigProvider', ConfigProvider)
|
|
49
|
-
.component('JEcharts', Echarts)
|
|
50
|
-
.component('JEllipsis', Ellipsis)
|
|
51
|
-
.component('JEmpty', Empty)
|
|
52
|
-
.component('JFullPage', FullPage)
|
|
53
|
-
.component('AIcon', AIcon)
|
|
54
|
-
.component('JMonacoEditor', MonacoEditor)
|
|
55
|
-
.component('JPermissionButton', PermissionButton)
|
|
56
|
-
.component('JProLayout', ProLayout)
|
|
57
|
-
.component('JPageContainer', PageContainer)
|
|
58
|
-
.component('JProTable', ProTable)
|
|
59
|
-
.component('JScrollbar', Scrollbar)
|
|
60
|
-
.component('JSearch', Search)
|
|
61
|
-
.component('JAdvancedSearch', AdvancedSearch)
|
|
62
|
-
.component('JValueItem', ValueItem)
|
|
63
|
-
},
|
|
64
|
-
}
|
package/src/AMap/Map.vue
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:style="props.style || { width: '100%', height: '100%' }"
|
|
4
|
-
:class="props.class"
|
|
5
|
-
>
|
|
6
|
-
<el-amap
|
|
7
|
-
v-if="hasAMapKey"
|
|
8
|
-
:map-style="_mapStyle"
|
|
9
|
-
v-bind="{
|
|
10
|
-
...props,
|
|
11
|
-
...$attrs
|
|
12
|
-
}"
|
|
13
|
-
@init="initMap"
|
|
14
|
-
>
|
|
15
|
-
<template v-if="uiLoading">
|
|
16
|
-
<slot></slot>
|
|
17
|
-
</template>
|
|
18
|
-
<template v-else><slot></slot></template>
|
|
19
|
-
</el-amap>
|
|
20
|
-
<Empty v-else description="请配置高德地图key" style="padding: 20%" />
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script setup name="InitAMap" lang="ts">
|
|
25
|
-
import type { CSSProperties, PropType } from 'vue';
|
|
26
|
-
import { ref, computed } from 'vue'
|
|
27
|
-
import { initAMapApiLoader, ElAmap } from '@vuemap/vue-amap';
|
|
28
|
-
import { getAMapUiPromise } from '@jetlinks-web/utils'
|
|
29
|
-
import { MapProps } from './util'
|
|
30
|
-
import { MAPConfig } from "@jetlinks-web/constants";
|
|
31
|
-
import Empty from '../Empty'
|
|
32
|
-
import '@vuemap/vue-amap/dist/style.css';
|
|
33
|
-
|
|
34
|
-
interface AMapProps {
|
|
35
|
-
style?: CSSProperties;
|
|
36
|
-
class?: string;
|
|
37
|
-
AMapUI?: string | boolean;
|
|
38
|
-
plugins?: string[]
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const emit = defineEmits([
|
|
42
|
-
'initMap',
|
|
43
|
-
])
|
|
44
|
-
|
|
45
|
-
const props = defineProps({
|
|
46
|
-
...MapProps(),
|
|
47
|
-
style: Object as PropType<AMapProps['style']>,
|
|
48
|
-
class: String as PropType<AMapProps['class']>,
|
|
49
|
-
AMapUI: [String, Boolean],
|
|
50
|
-
center: Array,
|
|
51
|
-
plugins: Array as PropType<string[]>,
|
|
52
|
-
zooms: {
|
|
53
|
-
type: Array,
|
|
54
|
-
default: [3, 20]
|
|
55
|
-
},
|
|
56
|
-
JSKey: String,
|
|
57
|
-
WebKey: String,
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
const config = inject<{ mapStyle: any, JSKey: string, WebKey: string }>(MAPConfig)
|
|
61
|
-
|
|
62
|
-
const _mapStyle = computed(() => {
|
|
63
|
-
if (props.mapStyle) {
|
|
64
|
-
return `amap://styles/${props.mapStyle}`
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (config.mapStyle) {
|
|
68
|
-
return config.mapStyle
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return undefined
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
const hasAMapKey = computed(() => {
|
|
75
|
-
return !!(props.JSKey || config.JSKey)
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
initAMapApiLoader({
|
|
79
|
-
key: props.JSKey || config.JSKey || '',
|
|
80
|
-
securityJsCode: props.WebKey || config.WebKey,
|
|
81
|
-
plugins: props.plugins
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
const uiLoading = ref<boolean>(false);
|
|
85
|
-
|
|
86
|
-
const map = ref<any>(null);
|
|
87
|
-
|
|
88
|
-
const isOpenUi = computed(() => {
|
|
89
|
-
return 'AMapUI' in props || props.AMapUI;
|
|
90
|
-
});
|
|
91
|
-
const getAMapUI = () => {
|
|
92
|
-
const version = typeof props.AMapUI === 'string' ? props.AMapUI : '1.1';
|
|
93
|
-
getAMapUiPromise(version).then(() => {
|
|
94
|
-
uiLoading.value = true;
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const initMap = (e: any) => {
|
|
99
|
-
map.value = e;
|
|
100
|
-
emit('initMap', e)
|
|
101
|
-
if (isOpenUi.value) {
|
|
102
|
-
getAMapUI();
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
</script>
|
|
107
|
-
|
|
108
|
-
<style scoped>
|
|
109
|
-
|
|
110
|
-
</style>
|
package/src/AMap/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as InitAMap } from './Map.vue'
|
package/src/AMap/util.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export const MapProps = () => ({
|
|
2
|
-
// 响应式
|
|
3
|
-
center: Array,
|
|
4
|
-
labelzIndex: Number,
|
|
5
|
-
lang: String,
|
|
6
|
-
mapStyle: String,
|
|
7
|
-
|
|
8
|
-
// 静态属性
|
|
9
|
-
vid: String,
|
|
10
|
-
amapManager: Object as any,
|
|
11
|
-
defaultCursor: String,
|
|
12
|
-
animateEnable: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: true
|
|
15
|
-
},
|
|
16
|
-
isHotspot: Boolean,
|
|
17
|
-
rotateEnable: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: true
|
|
20
|
-
},
|
|
21
|
-
resizeEnable: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: true
|
|
24
|
-
},
|
|
25
|
-
showIndoorMap: Boolean,
|
|
26
|
-
expandZoomRange: Boolean,
|
|
27
|
-
dragEnable: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: true
|
|
30
|
-
},
|
|
31
|
-
zoomEnable: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
default: true
|
|
34
|
-
},
|
|
35
|
-
doubleClickZoom: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: true
|
|
38
|
-
},
|
|
39
|
-
keyboardEnable: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: true
|
|
42
|
-
},
|
|
43
|
-
jogEnable: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: true
|
|
46
|
-
},
|
|
47
|
-
scrollWheel: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: true
|
|
50
|
-
},
|
|
51
|
-
touchZoom: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: true
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
})
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-badge
|
|
3
|
-
:color="_color"
|
|
4
|
-
:text="text"
|
|
5
|
-
></a-badge>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script setup lang="ts" name="BadgeStatus">
|
|
9
|
-
import { computed } from 'vue'
|
|
10
|
-
import { getHexColor } from './color'
|
|
11
|
-
|
|
12
|
-
const props = defineProps({
|
|
13
|
-
text: {
|
|
14
|
-
type: String,
|
|
15
|
-
},
|
|
16
|
-
status: {
|
|
17
|
-
type: [String, Number],
|
|
18
|
-
default: 'default',
|
|
19
|
-
},
|
|
20
|
-
/**
|
|
21
|
-
* 自定义status值颜色
|
|
22
|
-
* @example {
|
|
23
|
-
* 1: 'success',
|
|
24
|
-
* 0: 'error'
|
|
25
|
-
* }
|
|
26
|
-
*/
|
|
27
|
-
statusNames: {
|
|
28
|
-
type: Object,
|
|
29
|
-
default: () => ({
|
|
30
|
-
'success': 'success',
|
|
31
|
-
'warning': 'warning',
|
|
32
|
-
'error': 'error',
|
|
33
|
-
'default': 'default',
|
|
34
|
-
})
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
const _color = computed(() => {
|
|
39
|
-
return getHexColor(props.status, props.statusNames, 1)
|
|
40
|
-
})
|
|
41
|
-
</script>
|
package/src/BadgeStatus/color.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const colorMap = {
|
|
2
|
-
'success': '36, 178, 118',
|
|
3
|
-
'warning': '255, 144, 0',
|
|
4
|
-
'error': '229, 0, 18',
|
|
5
|
-
'processing': '9, 46, 231',
|
|
6
|
-
'default': '102, 102, 102',
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const getHexColor = (code: string | number, statusNames: Record<string | number, any>, pe: number = 0.1) => {
|
|
10
|
-
if (!code) {
|
|
11
|
-
return `rgba(102, 102, 102, ${pe})`
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if (colorMap[code]) {
|
|
15
|
-
return `rgba(${colorMap[code]}, ${pe})`
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (Object.keys(statusNames).length) {
|
|
19
|
-
return statusNames[code]
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default colorMap
|
package/src/BadgeStatus/index.ts
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="j-card-select" :style="CardSelectStyle">
|
|
3
|
-
<div
|
|
4
|
-
v-for="item in options"
|
|
5
|
-
:class="{
|
|
6
|
-
'j-card-select-item': true,
|
|
7
|
-
'disabled': disabled || item.disabled,
|
|
8
|
-
'active': selectKeys.includes(item.value)
|
|
9
|
-
}"
|
|
10
|
-
@click="() => handleSelect(item.value, item)"
|
|
11
|
-
>
|
|
12
|
-
<slot name="itemRender" :node="item" >
|
|
13
|
-
<div class="j-card-select-item-content">
|
|
14
|
-
<div class="j-card-select-title">
|
|
15
|
-
{{ item.label }}
|
|
16
|
-
</div>
|
|
17
|
-
<div class="j-card-select-describe">
|
|
18
|
-
{{ item.describe }}
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</slot>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
|
|
26
|
-
<script setup name="CardSelect">
|
|
27
|
-
import { has } from 'lodash-es'
|
|
28
|
-
const props = defineProps({
|
|
29
|
-
layout: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: 'horizontal'
|
|
32
|
-
},
|
|
33
|
-
options: {
|
|
34
|
-
type: Array,
|
|
35
|
-
default: () => [],
|
|
36
|
-
},
|
|
37
|
-
disabled: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: false,
|
|
40
|
-
},
|
|
41
|
-
multiple: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: false,
|
|
44
|
-
},
|
|
45
|
-
column: {
|
|
46
|
-
type: Number,
|
|
47
|
-
default: 3,
|
|
48
|
-
},
|
|
49
|
-
value: {
|
|
50
|
-
type: [String, Array],
|
|
51
|
-
default: undefined,
|
|
52
|
-
},
|
|
53
|
-
itemLayout: {
|
|
54
|
-
type: String,
|
|
55
|
-
default: 'horizontal'
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
const emit = defineEmits(['select', 'change', 'update:value'])
|
|
60
|
-
|
|
61
|
-
const selectKeys = ref([])
|
|
62
|
-
|
|
63
|
-
const CardSelectStyle = computed(() => {
|
|
64
|
-
const _column = props.column > 0 && props.layout === 'horizontal' ? props.column : 1
|
|
65
|
-
|
|
66
|
-
return {
|
|
67
|
-
'grid-template-columns': `repeat(${_column}, 1fr)`
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
const isMultiple = computed(() => {
|
|
72
|
-
return has(props, 'multiple') && props.multiple !== false
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
const handleSelect = (key, node) => {
|
|
76
|
-
if (props.disabled || node.disabled) {
|
|
77
|
-
return
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const selectKeysSet = new Set(selectKeys.value)
|
|
81
|
-
const isActive = selectKeysSet.has(key)
|
|
82
|
-
|
|
83
|
-
if (isMultiple.value) {
|
|
84
|
-
if (isActive) {
|
|
85
|
-
selectKeysSet.delete(key)
|
|
86
|
-
} else {
|
|
87
|
-
selectKeysSet.add(key)
|
|
88
|
-
}
|
|
89
|
-
selectKeys.value = [...selectKeysSet.values()]
|
|
90
|
-
const nodes = props.options.filter(item => selectKeys.value.includes(item.value))
|
|
91
|
-
emit('select', selectKeys.value, nodes)
|
|
92
|
-
emit('change', selectKeys.value, nodes)
|
|
93
|
-
emit('update:value', selectKeys.value)
|
|
94
|
-
} else {
|
|
95
|
-
selectKeys.value = [key]
|
|
96
|
-
|
|
97
|
-
emit('select', key, node)
|
|
98
|
-
emit('change', key, node)
|
|
99
|
-
emit('update:value', key)
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
watch(() => props.value, () => {
|
|
104
|
-
selectKeys.value = isMultiple.value ? props.value : [props.value]
|
|
105
|
-
}, { immediate: true })
|
|
106
|
-
|
|
107
|
-
</script>
|
|
108
|
-
|
|
109
|
-
<style lang="less">
|
|
110
|
-
@import '../style/variable.less';
|
|
111
|
-
|
|
112
|
-
.j-card-select {
|
|
113
|
-
display: grid;
|
|
114
|
-
gap: 12px;
|
|
115
|
-
|
|
116
|
-
.j-card-select-item {
|
|
117
|
-
padding: 12px;
|
|
118
|
-
border: 1px solid #e6e6e6;
|
|
119
|
-
border-radius: @border-radius-base;
|
|
120
|
-
cursor: pointer;
|
|
121
|
-
|
|
122
|
-
&.active {
|
|
123
|
-
border-color: @primary-color;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&.disabled {
|
|
127
|
-
cursor: not-allowed;
|
|
128
|
-
opacity: 0.75;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.j-card-select-describe {
|
|
132
|
-
color: @text-color-subtitle;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
</style>
|
package/src/CardSelect/index.ts
DELETED