Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mt-education-mobile
Project
Project
Details
Activity
Releases
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
王旭
mt-education-mobile
Commits
40cf135b
Commit
40cf135b
authored
Sep 01, 2020
by
zhangyichen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
角标改为倍率缩放
parent
1713c0af
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
22 deletions
+9
-22
global.less
src/assets/style/global.less
+3
-16
diyTag.vue
src/components/diyTags/diyTag.vue
+6
-6
No files found.
src/assets/style/global.less
View file @
40cf135b
...
...
@@ -52,26 +52,13 @@
@selectColor: #4498F0; // #4498F0
.diyTag{
// transform: scale(.99,.99);
border-radius: 14px;
font-size: 20px;
transform: scale(0.5);
background-color:#E94B3F;
color: white;
position: absolute;
font-weight: initial;
z-index: 999;
display: inline-table;
box-sizing: border-box;
transform-origin: 0 0;
// display: flex;
// align-items: center;
// justify-content: center;
.center{
display: table-cell;
vertical-align:middle;
//display: flex;
//align-items: center;
//justify-content: center
}
}
...
...
src/components/diyTags/diyTag.vue
View file @
40cf135b
<
template
>
<div
style=
"position: relative;display: inline-block;width: 0px;height: 18px
;transform: scale(0.5)
"
>
<div
style=
"position: relative;display: inline-block;width: 0px;height: 18px"
>
<div
class=
"diyTag"
v-if=
"num !== 0"
v-show=
"num !== 'NaN'"
style=
"height: 28px"
style=
"height:
30px;border-radius: 30px;font-size: 20px;line-height:
28px"
:style=
"
{
'top':type === 1 ? '-
22px' : type === 2 ? '-18px' : '0
',
'left':type === 1 ? '-1
0px': type === 2 ? '-8px' : '0
',
'width':num > 99 ? '48px': '
28
px',
'top':type === 1 ? '-
30px' : type === 2 ? '-24px' : '-14px
',
'left':type === 1 ? '-1
4px': type === 2 ? '-12px' : '-12px
',
'width':num > 99 ? '48px': '
30
px',
}">
<span
class=
"center"
>
{{
num
>
99
?
'99+'
:
num
}}
</span>
<span>
{{
num
>
99
?
'99+'
:
num
}}
</span>
</div>
</div>
...
...
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