Skip to content

Commit 1b74e28

Browse files
【update】综合示例新增搜索功能
去除符号选择器点、线自动制图比例尺分类
1 parent ec10b95 commit 1b74e28

File tree

21 files changed

+168673
-41604
lines changed

21 files changed

+168673
-41604
lines changed

dist/mapboxgl/iclient-mapboxgl-es6.js

Lines changed: 120235 additions & 19533 deletions
Large diffs are not rendered by default.

dist/mapboxgl/iclient-mapboxgl-es6.min.js

Lines changed: 505 additions & 445 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mapboxgl/iclient-mapboxgl.js

Lines changed: 47292 additions & 20781 deletions
Large diffs are not rendered by default.

dist/mapboxgl/iclient-mapboxgl.min.js

Lines changed: 482 additions & 437 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/mapboxgl-v2/src/components/classify-content-layout/style/index.less

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.fv-tabs.style-setting-classify-tabs {
2-
height: 610px;
2+
height: 650px;
33
width: 280px;
44
margin-left: -16px;
55

@@ -33,10 +33,7 @@
3333

3434
.fv-tabs-content-item {
3535
width: 248px;
36-
37-
&>div {
38-
height: 100%;
39-
}
36+
height: auto;
4037
}
4138
}
4239
}

examples/mapboxgl-v2/src/components/classify-tabs/style/index.less

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
height: 24px;
1616
border-radius: 4px;
1717
margin-bottom: 8px;
18-
margin-right:4px;
18+
margin-right: 4px;
1919
}
2020

2121
.fv-tabs-active {
@@ -24,4 +24,7 @@
2424
border-radius: 4px;
2525
}
2626
}
27+
.style-setting-search {
28+
margin-bottom: 12px;
29+
}
2730
}

examples/mapboxgl-v2/src/components/panel-layout/style/index.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@
2626
.style-setting-panel {
2727
padding: 16px 16px 0 16px;
2828
}
29+
div.fv-scrollbars .fv-scrollbars-track-vertical .fv-scrollbars-thumb-vertical {
30+
background-color: rgba(0, 0, 0, 0.15);
31+
}
2932
}
Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
11
import { Input, Icon } from '@ispeco/iptl-components-react';
2-
import React from 'react';
2+
import React, { useState } from 'react';
33
import './style';
44
type SearchEditorProps = {
5+
onSearchValueChange: (v: string) => void;
56
}
67

78
const SearchEditor = (props: SearchEditorProps) => {
8-
const { } = props;
9-
return <Input placeholder='请输入符号名称搜索' suffix={<Icon type="ms-icons-search" className="style-setting-search-button" />} className='style-setting-search' />
9+
const { onSearchValueChange } = props;
10+
const [value, setValue] = useState('');
11+
const onClose = () => {
12+
setValue('');
13+
onSearchValueChange('');
14+
};
15+
return <Input
16+
className='style-setting-search'
17+
placeholder='请输入符号名称搜索'
18+
value={value}
19+
onChange={(v) => {
20+
setValue(v.target.value);
21+
onSearchValueChange(v.target.value);
22+
}}
23+
suffix={<>
24+
{value && <Icon
25+
type="ms-icons-close"
26+
className="style-setting-search-close"
27+
onClick={onClose} />}
28+
</>}
29+
/>
1030
}
1131

1232
export default SearchEditor;

examples/mapboxgl-v2/src/components/search-editor/style/index.less

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@
22
padding: 4px 8px;
33
border-radius: 4px;
44
border: 1px solid rgba(0, 0, 0, 0.15);
5-
margin-bottom: 24px;
65
width: 248px;
76

87
input {
98
&::placeholder {
109
color: rgba(0, 0, 0, 0.45);
1110
}
1211

13-
color: rgba(0, 0, 0, 0.45);
12+
color: rgba(0, 0, 0, 0.65);
1413
}
1514

16-
.style-setting-search-button {
15+
.style-setting-search-close {
1716
cursor: pointer;
18-
1917
svg {
2018
color: rgba(0, 0, 0, 0.45);
2119
}

examples/mapboxgl-v2/src/constants/LineInfo.ts

Lines changed: 15 additions & 109 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)