Skip to content

Commit b8e0c4f

Browse files
committed
同步最新代码
1 parent 9a51bd9 commit b8e0c4f

File tree

20 files changed

+360
-335
lines changed

20 files changed

+360
-335
lines changed

.browserslistrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
> 1%
2-
last 2 versions
3-
not dead
1+
> 1%
2+
last 2 versions
3+
not dead

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
# dependencies
1111
/node_modules
1212
public/lib/CesiumUnminified/
13-
public/lib/mars3d/plugins/widget/
13+
src/common/mars3d-sdk/dist/plugins/
1414
mars3d-*src.*
15-
!mars3d-supermap-src.js*
16-
!mars3d-tdt-src.js*
15+
1716

1817
# profiling files
1918
chrome-profiler-events*.json

package.json

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,38 @@
33
"version": "3.2.0",
44
"description": "在Vue3技术栈下的Mars3D平台 基础项目",
55
"scripts": {
6-
"serve": "vite",
76
"dev": "vite",
7+
"serve": "npm run clean-cache && vite",
88
"clean-cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite",
99
"clean-lib": "rimraf node_modules",
1010
"preview": "vite preview",
11-
"build": "vite build",
12-
"build-tsc": "vue-tsc --noEmit && vite build",
13-
"lint": "eslint ./src/**/*.{js,jsx,vue,ts,tsx} --fix"
11+
"build": "npm run lint && vite build",
12+
"lint": "eslint ./src/**/*.{js,jsx,vue,ts,tsx} --fix && vue-tsc --noEmit"
1413
},
1514
"dependencies": {
1615
"@iconify/vue": "^3.1.3",
1716
"@turf/turf": "^6.5.0",
18-
"ant-design-vue": "3.0.0-beta.9",
17+
"ant-design-vue": "3.0.0-beta.13",
1918
"axios": "^0.25.0",
2019
"core-js": "^3.20.3",
2120
"echarts": "^5.2.2",
2221
"echarts-gl": "^2.0.8",
2322
"kml-geojson": "^1.2.0",
2423
"localforage": "^1.10.0",
2524
"mapv": "^2.0.62",
26-
"mars3d": "^3.2.4",
27-
"mars3d-cesium": "^1.90.2",
28-
"mars3d-echarts": "^3.2.2",
29-
"mars3d-heatmap": "^3.2.2",
30-
"mars3d-mapv": "^3.2.2",
25+
"mars3d": "^3.3.0",
26+
"mars3d-cesium": "^1.91.0",
27+
"mars3d-echarts": "^3.3.0",
28+
"mars3d-heatmap": "^3.3.0",
29+
"mars3d-mapv": "^3.3.0",
3130
"nprogress": "^0.2.0",
3231
"uuid": "^8.3.2",
33-
"vue": "^3.2.30",
32+
"vue": "^3.2.31",
3433
"vue-color-kit": "^1.0.5",
3534
"vuex": "^4.0.2"
3635
},
3736
"devDependencies": {
38-
"@types/node": "^17.0.10",
37+
"@types/node": "^17.0.21",
3938
"@vitejs/plugin-vue": "^2.1.0",
4039
"@vue/eslint-config-typescript": "^10.0.0",
4140
"consola": "^2.15.3",
@@ -50,7 +49,7 @@
5049
"standard": "^16.0.4",
5150
"typescript": "^4.5.5",
5251
"unplugin-vue-components": "^0.17.13",
53-
"vite": "^2.8.0",
52+
"vite": "^2.8.6",
5453
"vite-plugin-eslint": "^1.3.0",
5554
"vite-plugin-mars3d": "^1.1.1",
5655
"vite-plugin-style-import": "^2.0.0",

src/common/store/test.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
/**
2-
* store 状态管理
3-
* @copyright 火星科技 mars3d.cn
4-
* @author 火星吴彦祖 2022-02-19
5-
*/
6-
import { Store, createStore } from "vuex"
7-
import { InjectionKey } from "vue"
8-
9-
export interface Test {
10-
count?: number
11-
}
12-
13-
export const key: InjectionKey<Store<Test>> = Symbol("test")
14-
15-
export const store = createStore<Test>({
16-
state: {
17-
count: 0
18-
}
19-
})
1+
/**
2+
* store 状态管理
3+
* @copyright 火星科技 mars3d.cn
4+
* @author 火星吴彦祖 2022-02-19
5+
*/
6+
import { Store, createStore } from "vuex"
7+
import { InjectionKey } from "vue"
8+
9+
export interface Test {
10+
count?: number
11+
}
12+
13+
export const key: InjectionKey<Store<Test>> = Symbol("test")
14+
15+
export const store = createStore<Test>({
16+
state: {
17+
count: 0
18+
}
19+
})

src/common/uses/use-lifecycle.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
* @copyright 火星科技 mars3d.cn
44
* @author 火星吴彦祖 2022-02-19
55
*/
6-
import { inject, onMounted, onUnmounted } from "vue"
6+
import { inject, onBeforeMount, onBeforeUnmount } from "vue"
77

88
export default function useLifecycle(mapWork: any): void {
99
const getMapInstance = inject<any>("getMapInstance")
10-
onMounted(() => {
10+
onBeforeMount(() => {
1111
if (mapWork.onMounted) {
1212
const map = getMapInstance()
1313
mapWork.onMounted(map)
1414
}
1515
})
16-
onUnmounted(() => {
16+
onBeforeUnmount(() => {
1717
if (mapWork.onUnmounted) {
1818
mapWork.onUnmounted()
1919
}

src/components/mars-ui/base.less

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
@mars-basecolor: #ffffffd9; // 基础字体颜色
22
@mars-basecolor-reverse: #000; // 基础字体颜色-反色
33
@primary-color: #4db3ff; // 主要颜色
4-
@mars-ordinary-color: #9fd9fd; // 普通颜色
4+
@mars-ordinary-color: rgba(32, 160, 255, 0.2); // 普通颜色
55
@mars-background-active: #000000d9; // 全局激活背景色
66
@font-size-base: 12px; // 主要字体大小
77
@border-color-ordinary: grey; // 基础边框颜色
88
@border-color-base: #ececec; // 基础边框颜色
9+
@tree-border-color: #ccc; //树控件复选框边框颜色
910
@mars-disable-color: #ccc; // 禁用字体颜色
1011
@form-input-background: rgba(63, 72, 84, 0.7); // input 背景色
1112
@input-background-active: rgba(37, 49, 63, 0.788); // input 激活背景色
@@ -78,6 +79,7 @@
7879
.mars-ant-card {
7980
background: none;
8081
border: 1px solid @mars-basecolor;
82+
color: @mars-basecolor;
8183
.ant-card-head {
8284
border-color: @mars-basecolor;
8385
min-height: auto;
@@ -164,6 +166,7 @@
164166
.ant-table-container,
165167
.ant-table-cell {
166168
border-color: #cde1de !important;
169+
background: transparent !important;
167170
}
168171
.ant-table-container {
169172
border: 1px solid #cde1de !important;
@@ -175,6 +178,10 @@
175178
background: rgba(32, 42, 68, 0.3) !important;
176179
}
177180

181+
.ant-table-row:nth-last-child(1) .ant-table-cell {
182+
border-bottom: none;
183+
}
184+
178185
// 分页
179186
.ant-pagination {
180187
* {
Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
1-
<template>
2-
<a-input class="mars-input" v-bind="attrs">
3-
<template v-for="(comp, name) in slots" :key="name" v-slot:[name]>
4-
<component :is="comp" />
5-
</template>
6-
</a-input>
7-
</template>
8-
<script lang="ts">
9-
import { useAttrs, useSlots, defineComponent } from "vue"
10-
export default defineComponent({
11-
name: "mars-input",
12-
inheritAttrs: false,
13-
setup() {
14-
const attrs = useAttrs()
15-
const slots = useSlots()
16-
return {
17-
attrs,
18-
slots
19-
}
20-
}
21-
})
22-
</script>
23-
<style lang="less" scoped>
24-
.mars-input {
25-
color: @mars-basecolor;
26-
background-color: @form-input-background !important;
27-
border-color: @border-color-ordinary;
28-
:deep(.ant-input) {
29-
background-color: @form-input-background !important;
30-
border-color: @border-color-ordinary;
31-
color: @mars-basecolor;
32-
}
33-
:deep(.ant-input-suffix .anticon) {
34-
color: @mars-basecolor;
35-
}
36-
}
37-
.mars-input[disabled] {
38-
color: @mars-disable-color;
39-
}
40-
</style>
1+
<template>
2+
<a-input class="mars-input" v-bind="attrs">
3+
<template v-for="(comp, name) in slots" :key="name" v-slot:[name]>
4+
<component :is="comp" />
5+
</template>
6+
</a-input>
7+
</template>
8+
<script lang="ts">
9+
import { useAttrs, useSlots, defineComponent } from "vue"
10+
export default defineComponent({
11+
name: "mars-input",
12+
inheritAttrs: false,
13+
setup() {
14+
const attrs = useAttrs()
15+
const slots = useSlots()
16+
return {
17+
attrs,
18+
slots
19+
}
20+
}
21+
})
22+
</script>
23+
<style lang="less" scoped>
24+
.mars-input {
25+
color: @mars-basecolor;
26+
background-color: @form-input-background !important;
27+
border-color: @border-color-ordinary;
28+
font-size: 12px !important;
29+
30+
:deep(.ant-input) {
31+
background-color: @form-input-background !important;
32+
border-color: @border-color-ordinary;
33+
color: @mars-basecolor;
34+
}
35+
:deep(.ant-input-suffix .anticon) {
36+
color: @mars-basecolor;
37+
}
38+
}
39+
.mars-input[disabled] {
40+
color: @mars-disable-color;
41+
}
42+
</style>

src/components/mars-ui/mars-tree/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ const MarsTree = defineComponent({
1212
name: "mars-tree",
1313
inheritAttrs: false,
1414
setup(props, context) {
15-
const icon = (isLeaf: boolean, expanded: boolean) => {
16-
if (isLeaf) {
15+
const icon = (isLeaf: boolean, expanded: boolean, group: boolean) => {
16+
if (isLeaf && !group) {
1717
return [h(Icon, { icon: "ph:browsers-fill", width: "14", color: "#79C1F8" })]
18-
} else if (expanded) {
19-
return [h(Icon, { icon: "ph:folders-fill", width: "14", color: "#db9829" })]
2018
} else if (!expanded) {
2119
return [h(Icon, { icon: "ph:folder-fill", width: "14", color: "#db9829" })]
20+
} else if (expanded) {
21+
return [h(Icon, { icon: "ph:folders-fill", width: "14", color: "#db9829" })]
2222
}
2323
}
2424
return () =>
@@ -31,7 +31,7 @@ const MarsTree = defineComponent({
3131
...props
3232
},
3333
{
34-
icon: ({ isLeaf, expanded }: any) => h("span", null, icon(isLeaf, expanded)),
34+
icon: ({ isLeaf, expanded, data }: any) => h("span", null, icon(isLeaf, expanded, data.group)),
3535
...context.slots
3636
}
3737
)

0 commit comments

Comments
 (0)