Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsx-posters
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2c09aa13
authored
Oct 19, 2022
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
0a41d3ce
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
8 deletions
package-lock.json
src/assets/styles/activity.scss
src/components/EchartBox/index.vue
src/views/crowdfunding/activited.vue
package-lock.json
View file @
2c09aa1
...
...
@@ -488,6 +488,22 @@
"tslib"
:
"^2.0.3"
}
},
"echarts"
:
{
"version"
:
"5.4.0"
,
"resolved"
:
"https://registry.npmjs.org/echarts/-/echarts-5.4.0.tgz"
,
"integrity"
:
"sha512-uPsO9VRUIKAdFOoH3B0aNg7NRVdN7aM39/OjovjO9MwmWsAkfGyeXJhK+dbRi51iDrQWliXV60/XwLA7kg3z0w=="
,
"requires"
:
{
"tslib"
:
"2.3.0"
,
"zrender"
:
"5.4.0"
},
"dependencies"
:
{
"tslib"
:
{
"version"
:
"2.3.0"
,
"resolved"
:
"https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz"
,
"integrity"
:
"sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
}
}
},
"error-ex"
:
{
"version"
:
"1.3.2"
,
"resolved"
:
"https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz"
,
...
...
@@ -1425,6 +1441,21 @@
"resolved"
:
"https://registry.npmmirror.com/yaml/-/yaml-1.10.2.tgz"
,
"integrity"
:
"sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="
,
"dev"
:
true
},
"zrender"
:
{
"version"
:
"5.4.0"
,
"resolved"
:
"https://registry.npmjs.org/zrender/-/zrender-5.4.0.tgz"
,
"integrity"
:
"sha512-rOS09Z2HSVGFs2dn/TuYk5BlCaZcVe8UDLLjj1ySYF828LATKKdxuakSZMvrDz54yiKPDYVfjdKqcX8Jky3BIA=="
,
"requires"
:
{
"tslib"
:
"2.3.0"
},
"dependencies"
:
{
"tslib"
:
{
"version"
:
"2.3.0"
,
"resolved"
:
"https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz"
,
"integrity"
:
"sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
}
}
}
}
}
src/assets/styles/activity.scss
View file @
2c09aa1
This diff is collapsed.
Click to expand it.
src/components/EchartBox/index.vue
View file @
2c09aa1
...
...
@@ -2,8 +2,8 @@
* @Description:
* @Author: huyue
* @Date: 2022-10-14 18:32:54
* @LastEditors:
huyue
* @LastEditTime: 2022-10-19 1
5:50:56
* @LastEditors:
yangming yangming@didihu.com.cn
* @LastEditTime: 2022-10-19 1
7:21:59
-->
<
template
>
<div
:ref=
"id"
class=
"canvas"
></div>
...
...
@@ -12,7 +12,7 @@
import
{
onMounted
,
ref
}
from
"vue"
;
// 按需引入 echarts
import
*
as
echarts
from
"echarts"
;
import
type
{
PropType
}
from
"@vue/runtime-core"
;
import
{
PropType
,
watch
}
from
"@vue/runtime-core"
;
let
chart
:
any
=
null
;
const
client
=
ref
();
const
props
=
defineProps
({
...
...
@@ -20,6 +20,10 @@ const props = defineProps({
type
:
Array
as
PropType
<
string
[]
>
,
default
:
()
=>
[
"#FFC154"
,
"#FF9671"
],
},
value
:
{
type
:
Array
,
default
:
[],
},
id
:
{
type
:
String
,
default
:
""
,
...
...
@@ -31,7 +35,6 @@ const props = defineProps({
});
const
id
=
(
el
:
HTMLElement
)
=>
{
if
(
el
)
{
console
.
log
(
el
);
client
.
value
=
el
;
}
};
...
...
@@ -40,12 +43,18 @@ onMounted(() => {
chart
.
setOption
(
getChartSetOption
());
window
.
addEventListener
(
"resize"
,
resizeHandler
);
});
watch
(
props
,
(
count
,
prevCount
)
=>
{
chart
=
echarts
.
init
(
client
.
value
);
chart
.
setOption
(
getChartSetOption
());
window
.
addEventListener
(
"resize"
,
resizeHandler
);
});
const
resizeHandler
=
()
=>
{
if
(
chart
)
{
chart
.
resize
();
}
};
const
getChartSetOption
=
()
=>
{
console
.
log
(
props
.
value
);
var
option
=
{
color
:
props
.
colors
,
series
:
[
...
...
@@ -68,10 +77,7 @@ const getChartSetOption = () => {
labelLine
:
{
show
:
false
,
},
data
:
[
{
value
:
735
,
name
:
"Direct"
},
{
value
:
580
,
name
:
"Email"
},
],
data
:
props
.
value
,
},
],
};
...
...
src/views/crowdfunding/activited.vue
View file @
2c09aa1
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment