Skip to content

Commit 8cabfde

Browse files
committed
同步代码
1 parent 59228ea commit 8cabfde

File tree

3 files changed

+25
-16
lines changed

3 files changed

+25
-16
lines changed

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ git clone [email protected]:marsgis/mars3d-vue-project.git
8585
```
8686

8787
### 运行命令
88+
请将机器Node版本升级到v14及以上版本
8889

8990
#### 首次运行前安装依赖
9091

@@ -109,25 +110,20 @@ npm run build
109110

110111
## 运行效果
111112

112-
访问[基础项目 Vue 版](http://mars3d.cn/project/jcxm-vue/index.html) 在线体验效果和功能
113+
访问[基础项目 Vue 版](http://mars3d.cn/project/vue/index.html) 在线体验效果和功能
113114

114115
![image](https://muyao1987.gitee.io/cdn/mars3d.cn/xm/jcxm-vue/1.jpg)
115116

116117

117118

118119
## 浏览器支持
119120

120-
本地开发推荐使用`Chrome 80+` 浏览器
121+
推荐使用`Chrome 90+` 浏览器, 建议升级浏览器到最新版本访问。
121122

122-
支持现代浏览器, 不支持 IE
123-
124-
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
123+
| IE | Edge | Firefox | Chrome | Safari |
125124
| :-: | :-: | :-: | :-: | :-: |
126125
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
127126

128-
129-
130-
131127
## 如何反馈问题?
132128

133129
- 发现您发现项目中存在的问题或者需要优化的地方;
@@ -149,7 +145,7 @@ npm run build
149145
- [Es6+](http://es6.ruanyifeng.com/) - 熟悉 es6 基本语法
150146
- [Ant Design Vue](https://next.antdv.com/components/overview-cn/):UI 控件库
151147
- [ESlint](https://eslint.bootcss.com/):代码检查工具
152-
- [IconPark](https://iconpark.oceanengine.com/official):UI 图标库
148+
- [IconPark](https://iconpark.oceanengine.com/official):UI 图标库
153149

154150
> 需要有一定的知识储备,包括 vue3.0 中的 composition Api 模式等,建议浏览下[Web 前端知识视频讲解](https://www.bilibili.com/video/BV1xr4y1U73r/)
155151
@@ -617,6 +613,7 @@ const show = (name: string) => {
617613
"axios": "^0.23.0",
618614
"core-js": "^3.6.5",
619615
"ant-design-vue": "3.0.0-alpha.13",
616+
"@icon-park/vue-next": "^1.3.5",
620617
"nprogress": "^0.2.0",
621618
"echarts": "^5.2.2",
622619
"localforage": "^1.10.0"
@@ -683,7 +680,7 @@ app.use(injectState(widgetStore), key)
683680

684681
### 1. 如果切换mars3d到授权版
685682

686-
参考 [获取Mars3D](http://mars3d.cn/dev/guide/basics/download.html)中“从 Mars3D官网 下载获取”章节介绍。
683+
参考 [获取Mars3D](http://mars3d.cn/dev/guide/start/download.html)中“从 Mars3D官网 下载获取”章节介绍。
687684

688685
流程大概是:
689686
- 将npm安装后的`node_modules/mars3d/`下的所有文件拷贝一份放在`src\common\mars3d-sdk\`目录。
@@ -703,7 +700,7 @@ chainWebpack: (config) => {
703700
"mars3d-cesium": "^1.93.0",
704701
},
705702
```
706-
![image](http://mars3d.cn/dev/img/guide/basics-download-import.jpg)
703+
![image](http://mars3d.cn/dev/img/guide/start-download-import.jpg)
707704

708705

709706
### 2. 局域网离线使用时注意事项

package.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
"clean-cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite",
99
"clean-lib": "rimraf node_modules",
1010
"preview": "vite preview",
11-
"build": "npm run lint && vite build",
12-
"lint": "eslint ./src/**/*.{js,jsx,vue,ts,tsx} --fix && vue-tsc --noEmit"
11+
"build": "vite build",
12+
"lint": "vue-tsc --noEmit --skipLibCheck && eslint ./src/**/*.{js,jsx,vue,ts,tsx} --fix",
13+
"prepare": "husky install"
1314
},
1415
"dependencies": {
1516
"@icon-park/vue-next": "^1.3.6",
@@ -22,7 +23,7 @@
2223
"kml-geojson": "^1.2.0",
2324
"localforage": "^1.10.0",
2425
"mapv": "^2.0.62",
25-
"mars3d": "^3.3.7",
26+
"mars3d": "^3.3.8",
2627
"mars3d-cesium": "^1.93.0",
2728
"mars3d-echarts": "^3.3.0",
2829
"mars3d-heatmap": "^3.3.0",
@@ -39,13 +40,17 @@
3940
"@vitejs/plugin-vue": "^2.1.0",
4041
"@vue/eslint-config-typescript": "^10.0.0",
4142
"consola": "^2.15.3",
43+
"eslint": "^7.32.0",
4244
"eslint-config-standard": "^16.0.3",
4345
"eslint-plugin-import": "^2.25.4",
4446
"eslint-plugin-node": "^11.1.0",
4547
"eslint-plugin-promise": "^5.2.0",
4648
"eslint-plugin-vue": "^8.3.0",
4749
"fs-extra": "^10.0.0",
50+
"husky": "^7.0.4",
4851
"less": "^4.1.2",
52+
"lint-staged": "^12.4.1",
53+
"prettier": "^2.6.2",
4954
"rollup-plugin-visualizer": "^5.6.0",
5055
"serve-static": "^1.14.2",
5156
"standard": "^16.0.4",
@@ -80,5 +85,10 @@
8085
],
8186
"author": "火星科技",
8287
"license": "Apache-2.0",
83-
"homepage": "http://mars3d.cn"
88+
"homepage": "http://mars3d.cn",
89+
"lint-staged": {
90+
"*.{js,jsx,vue,ts,tsx}": [
91+
"npm run lint"
92+
]
93+
}
8494
}

src/widgets/basic/manage-layers/index.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ const checkedChange = (keys: string[], e: any) => {
102102
}
103103
if (keys.indexOf(e.node.id) !== -1) {
104104
layer.show = true
105-
layer.flyTo()
105+
layer.readyPromise.then(function (layer) {
106+
layer.flyTo()
107+
})
106108
} else {
107109
layer.show = false
108110
}

0 commit comments

Comments
 (0)