Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
company-portal-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
赵啸非
company-portal-ui
Commits
966a179c
Commit
966a179c
authored
Dec 03, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改配置文件
parent
1c9c43ba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
admin/src/views/portal/NewsView.vue
admin/src/views/portal/NewsView.vue
+17
-2
No files found.
admin/src/views/portal/NewsView.vue
View file @
966a179c
...
...
@@ -38,7 +38,7 @@
<div
class=
"article-header"
>
<h2><router-link
:to=
"
{name:'newsDetails',params:{newsId:article.id}}" rel="">
{{
article
.
title
}}
</router-link></h2>
<ul
class=
"article--meta"
>
<li
class=
"article--meta_item -date"
>
{{
$moment
(
article
.
createTime
).
format
(
"
YYYY-MM-DD HH:mm
"
)
}}
</li>
<li
class=
"article--meta_item -date"
>
{{
formatterDate
(
article
.
createTime
)
}}
</li>
</ul>
</div>
<div
class=
"article--content"
>
...
...
@@ -123,7 +123,22 @@ export default {
this
.
pageIndex
=
p
;
this
.
getArticle
(
p
)
}
}
},
formatterDate
(
time
)
{
if
(
!
time
)
return
''
;
let
date
=
new
Date
(
Number
(
time
));
let
Y
=
date
.
getFullYear
()
+
'
-
'
;
let
M
=
(
date
.
getMonth
()
+
1
<
10
?
'
0
'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'
-
'
;
let
D
=
panLeft
(
date
.
getDate
())
+
'
'
;
let
h
=
panLeft
(
date
.
getHours
())
+
'
:
'
;
let
m
=
panLeft
(
date
.
getMinutes
())
+
'
:
'
;
let
s
=
panLeft
(
date
.
getSeconds
());
return
Y
+
M
+
D
+
h
+
m
+
s
;
},
panLeft
(
num
)
{
return
num
<
10
?
'
0
'
+
num
:
num
;
}
}
}
</
script
>
...
...
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