Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pro-blocks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
pro-blocks
Commits
34418ae2
Commit
34418ae2
authored
Apr 16, 2019
by
陈帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug: fix autoHeight infinite loop
parent
061a1e7d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
115 deletions
+69
-115
.dockerignore
.dockerignore
+0
-35
.firebaserc
.firebaserc
+0
-5
.gitpod.yml
.gitpod.yml
+0
-6
Analysis/src/components/Charts/autoHeight.tsx
Analysis/src/components/Charts/autoHeight.tsx
+4
-9
Analysis/src/components/IntroduceRow.tsx
Analysis/src/components/IntroduceRow.tsx
+62
-60
typings.d.ts
typings.d.ts
+3
-0
No files found.
.dockerignore
deleted
100644 → 0
View file @
061a1e7d
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
**/node_modules
/src/utils/request-temp.js
# production
/.vscode
# misc
.DS_Store
npm-debug.log*
yarn-error.log
/coverage
.idea
yarn.lock
package-lock.json
*bak
.vscode
# visual studio code
.history
*.log
functions/mock
.temp/**
# umi
.umi
.umi-production
# screenshot
screenshot
.firebase
\ No newline at end of file
.firebaserc
deleted
100644 → 0
View file @
061a1e7d
{
"projects": {
"default": "antd-pro"
}
}
.gitpod.yml
deleted
100644 → 0
View file @
061a1e7d
ports
:
-
port
:
8000
onOpen
:
open-preview
tasks
:
-
init
:
npm install
command
:
npm start
Analysis/src/components/Charts/autoHeight.tsx
View file @
34418ae2
/* eslint eqeqeq: 0 */
import
React
from
'
react
'
;
import
React
from
'
react
'
;
export
type
IReactComponent
<
P
=
any
>
=
export
type
IReactComponent
<
P
=
any
>
=
...
@@ -7,6 +6,7 @@ export type IReactComponent<P = any> =
...
@@ -7,6 +6,7 @@ export type IReactComponent<P = any> =
|
React
.
ClassicComponentClass
<
P
>
;
|
React
.
ClassicComponentClass
<
P
>
;
function
computeHeight
(
node
:
HTMLDivElement
)
{
function
computeHeight
(
node
:
HTMLDivElement
)
{
node
.
style
.
height
=
'
100%
'
;
const
totalHeight
=
parseInt
(
getComputedStyle
(
node
).
height
+
''
,
10
);
const
totalHeight
=
parseInt
(
getComputedStyle
(
node
).
height
+
''
,
10
);
const
padding
=
const
padding
=
parseInt
(
getComputedStyle
(
node
).
paddingTop
+
''
,
10
)
+
parseInt
(
getComputedStyle
(
node
).
paddingTop
+
''
,
10
)
+
...
@@ -22,14 +22,9 @@ function getAutoHeight(n: HTMLDivElement) {
...
@@ -22,14 +22,9 @@ function getAutoHeight(n: HTMLDivElement) {
let
node
=
n
;
let
node
=
n
;
let
height
=
computeHeight
(
node
);
let
height
=
computeHeight
(
node
);
const
parentNode
=
node
.
parentNode
as
HTMLDivElement
;
while
(
!
height
)
{
if
(
parentNode
)
{
const
parentNode
=
node
.
parentNode
as
HTMLDivElement
;
height
=
computeHeight
(
parentNode
);
if
(
parentNode
)
{
height
=
computeHeight
(
parentNode
);
}
else
{
break
;
}
}
}
return
height
;
return
height
;
...
...
Analysis/src/components/IntroduceRow.tsx
View file @
34418ae2
...
@@ -59,66 +59,68 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: IVi
...
@@ -59,66 +59,68 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: IVi
</
ChartCard
>
</
ChartCard
>
</
Col
>
</
Col
>
{
/* <Col {...topColResponsiveProps}>
<
Col
{
...
topColResponsiveProps
}
>
<ChartCard
<
ChartCard
bordered={false}
bordered
=
{
false
}
loading={loading}
loading
=
{
loading
}
title={<FormattedMessage id="BLOCK_NAME.analysis.visits" defaultMessage="Visits" />}
title
=
{
<
FormattedMessage
id
=
"BLOCK_NAME.analysis.visits"
defaultMessage
=
"Visits"
/>
}
action={
action
=
{
<Tooltip
<
Tooltip
title={
title
=
{
<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="Introduce" />
<
FormattedMessage
id
=
"BLOCK_NAME.analysis.introduce"
defaultMessage
=
"Introduce"
/>
}
}
>
>
<Icon type="info-circle-o" />
<
Icon
type
=
"info-circle-o"
/>
</Tooltip>
</
Tooltip
>
}
}
total={numeral(8846).format('0,0')}
total
=
{
numeral
(
8846
).
format
(
'
0,0
'
)
}
footer={
footer
=
{
<Field
<
Field
label={
label
=
{
<FormattedMessage id="BLOCK_NAME.analysis.day-visits" defaultMessage="Daily Visits" />
<
FormattedMessage
}
id
=
"BLOCK_NAME.analysis.day-visits"
value={numeral(1234).format('0,0')}
defaultMessage
=
"Daily Visits"
/>
/>
}
}
contentHeight={46}
value
=
{
numeral
(
1234
).
format
(
'
0,0
'
)
}
>
/>
<MiniArea color="#975FE4" data={visitData} />
}
</ChartCard>
contentHeight
=
{
46
}
</Col> */
}
>
<
MiniArea
color
=
"#975FE4"
data
=
{
visitData
}
/>
{
/* <Col {...topColResponsiveProps}>
</
ChartCard
>
<ChartCard
</
Col
>
bordered={false}
<
Col
{
...
topColResponsiveProps
}
>
loading={loading}
<
ChartCard
title={<FormattedMessage id="BLOCK_NAME.analysis.payments" defaultMessage="Payments" />}
bordered
=
{
false
}
action={
loading
=
{
loading
}
<Tooltip
title
=
{
<
FormattedMessage
id
=
"BLOCK_NAME.analysis.payments"
defaultMessage
=
"Payments"
/>
}
title={
action
=
{
<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="Introduce" />
<
Tooltip
}
title
=
{
>
<
FormattedMessage
id
=
"BLOCK_NAME.analysis.introduce"
defaultMessage
=
"Introduce"
/>
<Icon type="info-circle-o" />
}
</Tooltip>
>
}
<
Icon
type
=
"info-circle-o"
/>
total={numeral(6560).format('0,0')}
</
Tooltip
>
footer={
}
<Field
total
=
{
numeral
(
6560
).
format
(
'
0,0
'
)
}
label={
footer
=
{
<FormattedMessage
<
Field
id="BLOCK_NAME.analysis.conversion-rate"
label
=
{
defaultMessage="Conversion Rate"
<
FormattedMessage
/>
id
=
"BLOCK_NAME.analysis.conversion-rate"
}
defaultMessage
=
"Conversion Rate"
value="60%"
/>
/>
}
}
value
=
"60%"
contentHeight={46}
/>
>
}
<MiniBar data={visitData} />
contentHeight
=
{
46
}
</ChartCard>
>
</Col> */
}
<
MiniBar
data
=
{
visitData
}
/>
</
ChartCard
>
</
Col
>
<
Col
{
...
topColResponsiveProps
}
>
<
Col
{
...
topColResponsiveProps
}
>
<
ChartCard
<
ChartCard
loading
=
{
loading
}
loading
=
{
loading
}
...
...
typings.d.ts
View file @
34418ae2
...
@@ -11,3 +11,6 @@ declare module '*.bmp';
...
@@ -11,3 +11,6 @@ declare module '*.bmp';
declare
module
'
*.tiff
'
;
declare
module
'
*.tiff
'
;
declare
var
APP_TYPE
:
string
;
declare
var
APP_TYPE
:
string
;
declare
module
'
react-fittext
'
;
declare
module
'
@antv/data-set
'
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment