Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lihuizhen
ec-report-refactor
Commits
f2b97eca
Commit
f2b97eca
authored
Feb 16, 2022
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: set table style like dashboard
parent
51f18d16
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
6 deletions
+13
-6
CountTo.vue
components/CountTo/CountTo.vue
+0
-1
NormalTable.vue
components/NormalTable/NormalTable.vue
+5
-3
u-count-to.vue
uview-ui/components/u-count-to/u-count-to.vue
+1
-1
u-table.vue
uview-ui/components/u-table/u-table.vue
+6
-1
u-td.vue
uview-ui/components/u-td/u-td.vue
+1
-0
No files found.
components/CountTo/CountTo.vue
View file @
f2b97eca
<
template
>
<view
class=
"count-to"
:style=
"
{height: `${height}px`,}">
<!--
<BasicText
:elementInfo=
"elementInfo"
></BasicText>
-->
<NormalTitle
:elementInfo=
"elementInfo"
></NormalTitle>
<!-- warning:count-to的font-size单位为rpx -->
<u-count-to
:start-val=
"startVal"
:end-val=
"endVal"
separator=
","
:color=
"elementInfo.option.countTo.color"
:font-size=
"getFontSize()"
></u-count-to>
...
...
components/NormalTable/NormalTable.vue
View file @
f2b97eca
<
template
>
<view
>
<view
style=
"margin-top: 20px;"
>
<NormalTitle
:elementInfo=
"elementInfo"
></NormalTitle>
<scroll-view
scroll-x=
"true"
>
<view
class=
"scroll-view_H"
>
...
...
@@ -10,6 +10,7 @@
:bg-color=
"elementInfo.table.tableCell.backgroundColor"
:color=
"elementInfo.table.tableCell.titleColor"
:font-size=
"$u.common.pxToRpx(elementInfo.table.tableCell.titleFontSize)"
:height=
"elementInfo.table.tableCell.cellRowHeight"
:align=
"elementInfo.table.tableCell.titlePostion"
:th-style=
"headerStyle"
>
...
...
@@ -17,7 +18,7 @@
<u-th
v-for=
"(item, index) in columns"
:key=
"index"
>
{{
item
.
title
}}
</u-th>
</u-tr>
<u-tr
v-for=
"(cell, cellIndex) in chartTables"
:key=
"cellIndex"
@
tap=
"cellClick(cell)"
>
<u-td
style=
"width:
30
0rpx;"
v-for=
"(item, index) in columns"
:key=
"index"
>
<u-td
style=
"width:
24
0rpx;"
v-for=
"(item, index) in columns"
:key=
"index"
>
{{
cell
[
item
.
dataIndex
]
}}
</u-td>
</u-tr>
...
...
@@ -46,7 +47,8 @@
headerStyle
()
{
const
{
headerRowHeight
,
titleColor
,
backgroundColor
,
titlePostion
,
titleFontSize
}
=
this
.
elementInfo
.
table
.
tableHeader
return
{
'height'
:
`
${
this
.
$u
.
common
.
pxToRpx
(
headerRowHeight
)}
rpx`
,
// 'lineHeight': `${this.$u.common.pxToRpx(headerRowHeight)}rpx`,
'lineHeight'
:
`
${
headerRowHeight
}
px`
,
'color'
:
titleColor
,
'background-color'
:
backgroundColor
,
'text-align'
:
titlePostion
,
...
...
uview-ui/components/u-count-to/u-count-to.vue
View file @
f2b97eca
...
...
@@ -234,7 +234,7 @@ export default {
.u-count-num
{
/* #ifndef APP-NVUE */
display
:
inline-flex
;
//
display: inline-flex;
/* #endif */
text-align
:
center
;
}
...
...
uview-ui/components/u-table/u-table.vue
View file @
f2b97eca
...
...
@@ -42,7 +42,12 @@
// td的内边距
padding
:
{
type
:
String
,
default
:
'10rpx 6rpx'
default
:
'10px 10px'
},
// td的高度
height
:
{
type
:
[
String
,
Number
],
default
:
30
},
// 字体大小
fontSize
:
{
...
...
uview-ui/components/u-td/u-td.vue
View file @
f2b97eca
...
...
@@ -39,6 +39,7 @@
if
(
this
.
width
!=
"auto"
)
style
.
flex
=
`0 0
${
this
.
width
}
`
;
style
.
textAlign
=
this
.
parent
.
align
;
style
.
fontSize
=
this
.
parent
.
fontSize
+
'rpx'
;
style
.
lineHeight
=
this
.
parent
.
height
+
'px'
;
style
.
padding
=
this
.
parent
.
padding
;
style
.
borderBottom
=
`
${
this
.
parent
.
borderStyle
}
${
this
.
parent
.
borderWidth
}
px
${
this
.
parent
.
borderColor
}
`
;
style
.
borderRight
=
`
${
this
.
parent
.
borderStyle
}
${
this
.
parent
.
borderWidth
}
px
${
this
.
parent
.
borderColor
}
`
;
...
...
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