Skip to content

Commit 7583079

Browse files
committed
同步代码
1 parent d53d452 commit 7583079

File tree

16 files changed

+301
-90
lines changed

16 files changed

+301
-90
lines changed

src/marsgis/common/uses/use-lifecycle.ts

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

88
export default function useLifecycle(mapWork: any): void {
99
const getMapInstance = inject<any>("getMapInstance")
10-
onBeforeMount(() => {
10+
onMounted(() => {
1111
if (mapWork.onMounted) {
1212
const map = getMapInstance()
1313
mapWork.onMounted(map)

src/marsgis/components/mars-ui/base.less

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@mars-basecolor-reverse: #000; // 基础字体颜色-反色
33
@primary-color: #4db3ff; // 主要颜色
44
@mars-ordinary-color: #9fd9fd; // 普通颜色
5+
@mars-background-active: #000000d9; // 全局激活背景色
56
@font-size-base: 12px; // 主要字体大小
67
@border-color-ordinary: grey; // 基础边框颜色
78
@border-color-base: #ececec; // 基础边框颜色
@@ -209,6 +210,10 @@
209210
.ant-select:not(.ant-select-customize-input) .ant-select-selector {
210211
background-color: transparent !important;
211212
}
213+
214+
.ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
215+
background-color: @mars-background-active !important;
216+
}
212217
// .ant-select:not(.ant-select-customize-input) .ant-select-selector {
213218
// background-color: transparent !important;
214219
// }
@@ -247,3 +252,12 @@
247252
.ant-input-number-handler-wrap {
248253
background-color: @form-input-background !important;
249254
}
255+
256+
//table表格滚动条
257+
.ant-table-body {
258+
&::-webkit-scrollbar {
259+
//整体样式
260+
height: 0;
261+
width: 0;
262+
}
263+
}
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
/**
2+
* 所有页面全局公共CSS
3+
*
4+
* @copyright 火星科技 mars3d.cn
5+
* @author 火星吴彦祖 2022-01-01
6+
*/
7+
8+
/* 清除内外边距 */
9+
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */
10+
dl, dt, dd, ul, ol, li, /* list elements 列表元素 */
11+
pre, /* text formatting elements 文本格式元素 */
12+
fieldset, lengend, button, input, textarea, /* form elements 表单元素 */
13+
th, td {
14+
/* table elements 表格元素 */
15+
margin: 0;
16+
padding: 0;
17+
-moz-user-select: none; /*火狐*/
18+
-webkit-user-select: none; /*webkit浏览器*/
19+
-ms-user-select: none; /*IE10*/
20+
-khtml-user-select: none; /*早期浏览器*/
21+
user-select: none;
22+
list-style: none;
23+
}
24+
25+
#app {
26+
height: 100%;
27+
}
28+
29+
/*滚动条*/
30+
body,
31+
html {
32+
background-color: @background-base;
33+
color: @mars-basecolor;
34+
overflow: hidden;
35+
* {
36+
scrollbar-base-color: #f4f7fc;
37+
scrollbar-track-color: #f4f7fc;
38+
scrollbar-face-color: #797979;
39+
scrollbar-arrow-color: #f4f7fc;
40+
scrollbar-shadow-color: #f4f7fc;
41+
scrollbar-3dlight-color: #f4f7fc;
42+
scrollbar-highlight-color: #f4f7fc;
43+
scrollbar-darkshadow-color: #f4f7fc;
44+
font-size: @font-size-base;
45+
scrollbar-width: thin;
46+
}
47+
}
48+
49+
.layout-right__header {
50+
background-color: @mars-background-active;
51+
h3 {
52+
color: @mars-basecolor !important;
53+
}
54+
}
55+
.editor-container .editor-header {
56+
background-color: @mars-background-active;
57+
.fileTip {
58+
color: @mars-basecolor !important;
59+
}
60+
}
61+
62+
.mars-link-btn-primary {
63+
* {
64+
color: @primary-color !important;
65+
}
66+
}
67+
68+
::-webkit-scrollbar-button {
69+
height: 0;
70+
width: 0;
71+
display: none;
72+
}
73+
74+
::-webkit-scrollbar-track {
75+
background: transparent;
76+
}
77+
78+
::-webkit-scrollbar-track,
79+
::-webkit-scrollbar-thumb {
80+
border: 0;
81+
}
82+
83+
::-webkit-scrollbar {
84+
height: 10px;
85+
width: 4px;
86+
background: transparent;
87+
border-radius: 4px;
88+
}
89+
90+
::-webkit-scrollbar-thumb {
91+
padding-top: 100px;
92+
-webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1), inset -1px -1px 0 rgba(0, 0, 0, 0.07);
93+
background-color: rgba(79, 79, 79, 0.8);
94+
min-height: 28px;
95+
border-radius: 4px;
96+
background-clip: padding-box;
97+
}
98+
99+
::-webkit-scrollbar-track,
100+
::-webkit-scrollbar-thumb {
101+
border: 0;
102+
}
103+
104+
::-webkit-scrollbar-thumb:hover {
105+
-webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25);
106+
background-color: rgba(0, 0, 0, 0.4);
107+
}
108+
109+
::-webkit-scrollbar-thumb:active {
110+
-webkit-box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.35);
111+
background-color: rgba(0, 0, 0, 0.5);
112+
}
113+
114+
.base-overlay {
115+
.ant-dropdown-menu {
116+
background-color: rgba(63, 72, 84, 0.7) !important;
117+
.i-icon {
118+
vertical-align: middle;
119+
margin-right: 4px;
120+
}
121+
}
122+
}
123+
124+
/* Popup样式*/
125+
.mars3d-popup-btn-custom {
126+
padding: 3px 10px;
127+
border: 1px solid #209ffd;
128+
background: #209ffd1c;
129+
}
130+
131+
.mars3d-template-content label {
132+
padding-right: 6px;
133+
}
134+
135+
.mars3d-template-titile a {
136+
font-size: 16px;
137+
}
138+
139+
.icon-vertical-a {
140+
width: 20px;
141+
height: 20px;
142+
vertical-align: -0.3em !important;
143+
}
144+
145+
.ant-popover {
146+
.ant-popover-title {
147+
color: @mars-basecolor;
148+
}
149+
}
150+
.ant-popover-inner-content {
151+
a {
152+
color: @primary-color !important;
153+
&:hover {
154+
text-decoration: underline;
155+
}
156+
}
157+
}
158+
159+
.mars-primary-table {
160+
width: 100%;
161+
tr td:nth-of-type(1) {
162+
width: 100px;
163+
}
164+
td {
165+
padding: 5px;
166+
}
167+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ import {
6161

6262
import "./mars-echarts"
6363

64+
import "./index.less"
6465
import "./function.less"
6566

6667
export const $alert = marsAlert

src/marsgis/components/mars-ui/mars-dialog/index.vue

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@
1818
</div>
1919
</div>
2020
</div>
21-
<div
22-
v-for="handle in actualHandles"
23-
:key="handle"
24-
class="handle"
25-
:class="['handle-' + handle]"
26-
@mousedown="handleDown(handle, $event)"
27-
>
21+
<div v-for="handle in actualHandles" :key="handle" class="handle" :class="['handle-' + handle]" @mousedown="handleDown(handle, $event)">
2822
<slot :name="handle"></slot>
2923
</div>
3024
</div>
@@ -63,7 +57,7 @@ interface Props {
6357
right?: number | string // 定位right值
6458
top?: number | string // 定位top值
6559
bottom?: number | string // 定位bottom值
66-
position?: Position
60+
position?: Position // 统一设置位置属性,优先级高于 left right top bottom
6761
6862
handles?: boolean | string // 缩放控制器 默认 [x, y, xy]
6963
minWidth?: number // 最小宽度
@@ -83,7 +77,7 @@ const props = withDefaults(defineProps<Props>(), {
8377
minHeight: 100,
8478
maxWidth: 1000,
8579
maxHeight: 1000,
86-
zIndex: 200
80+
zIndex: 900
8781
})
8882
8983
const mergeProps = computed(() => {
@@ -341,7 +335,7 @@ export default {
341335
<style lang="less" scoped>
342336
.pannel-model {
343337
position: absolute;
344-
padding: 0 5px 10px 10px;
338+
padding: 0;
345339
border-radius: 4px;
346340
border: 1px solid #4db3ff70;
347341
z-index: 100;
@@ -357,8 +351,10 @@ export default {
357351
line-height: 40px;
358352
cursor: move;
359353
overflow: hidden;
360-
border-bottom: 1px solid #3b4d5e;
361-
color: #fff;
354+
padding: 0 5px 0px 15px;
355+
border-bottom: 1px solid @border-color-ordinary;
356+
background-color: @collapse-header-color;
357+
color: @mars-basecolor;
362358
.icon {
363359
vertical-align: middle;
364360
margin-right: 5px;
@@ -377,6 +373,7 @@ export default {
377373
.pannel-model__body {
378374
width: 100%;
379375
height: calc(100% - 40px);
376+
padding: 0 5px 10px 10px;
380377
overflow: hidden;
381378
}
382379
.content {
@@ -398,7 +395,7 @@ export default {
398395
bottom: 0;
399396
display: flex;
400397
align-items: center;
401-
background: rgb(64, 65, 70);
398+
background: @background-base;
402399
}
403400
}
404401

src/marsgis/components/mars-ui/mars-notify/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const $notify = (message: any, description: any, options: any = {}, type:
1515
return new Promise((resolve) => {
1616
notification.config({
1717
placement: "bottomRight",
18+
right: 20,
1819
duration: undefined,
1920
...options
2021
})
Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,41 @@
1-
// 功能提示和已知问题提示框
2-
.mars-notify-message {
3-
* {
4-
color: @mars-basecolor;
5-
}
6-
padding: 15px 10px;
7-
border: 1px solid @border-color-base;
8-
background: @background-base !important;
9-
10-
.ant-notification-notice-icon {
11-
margin: 0;
12-
font-size: 22px;
13-
line-height: 22px;
14-
}
15-
.ant-notification-notice-message {
16-
height: 30px;
17-
margin-left: 30px;
18-
color: @mars-basecolor;
19-
font-size: 16px;
20-
border-color: @border-color-base;
21-
}
22-
.ant-notification-notice-description {
23-
color: @mars-basecolor;
24-
margin-left: 5px;
25-
line-height: 21px;
26-
text-indent: 25px;
27-
}
28-
.ant-notification-notice-close {
29-
color: @mars-basecolor;
30-
top: 10px;
31-
right: 10px;
32-
}
33-
34-
.anticon {
35-
* {
36-
color: @primary-color !important;
37-
font-size: 20px;
38-
}
39-
}
40-
}
1+
// 功能提示和已知问题提示框
2+
.mars-notify-message {
3+
* {
4+
color: @mars-basecolor;
5+
}
6+
right: 30px !important;
7+
padding: 15px 10px;
8+
border: 1px solid @border-color-base;
9+
background: @background-base !important;
10+
11+
.ant-notification-notice-icon {
12+
margin: 0;
13+
font-size: 22px;
14+
line-height: 22px;
15+
}
16+
.ant-notification-notice-message {
17+
height: 30px;
18+
margin-left: 30px;
19+
color: @mars-basecolor;
20+
font-size: 16px;
21+
border-color: @border-color-base;
22+
}
23+
.ant-notification-notice-description {
24+
color: @mars-basecolor;
25+
margin-left: 5px;
26+
line-height: 21px;
27+
text-indent: 25px;
28+
}
29+
.ant-notification-notice-close {
30+
color: @mars-basecolor;
31+
top: 10px;
32+
right: 10px;
33+
}
34+
35+
.anticon {
36+
* {
37+
color: @primary-color !important;
38+
font-size: 20px;
39+
}
40+
}
41+
}

src/marsgis/components/mars-ui/mars-pannel/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const props = withDefaults(defineProps<Props>(), {
5555
warpper: "app",
5656
visible: false,
5757
closeable: false,
58-
zIndex: 200
58+
zIndex: 900
5959
})
6060
6161
const mergeProps = computed(() => {

0 commit comments

Comments
 (0)