Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sample
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
周韬
node-sample
Commits
61426829
Commit
61426829
authored
Aug 10, 2016
by
Evan You
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve list item for jobs/ask
parent
fa452764
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
16 deletions
+21
-16
Item.vue
src/components/Item.vue
+20
-15
ItemView.vue
src/views/ItemView.vue
+1
-1
No files found.
src/components/Item.vue
View file @
61426829
<
template
>
<
template
>
<li
class=
"news-item"
>
<li
class=
"news-item"
>
<span
class=
"score"
>
{{
item
.
score
}}
</span>
<span
class=
"score"
>
{{
item
.
score
}}
</span>
<template
v-if=
"item.url"
>
<span
class=
"title"
>
<a
:href=
"item.url"
target=
"_blank"
>
{{
item
.
title
}}
</a>
<template
v-if=
"item.url"
>
<span>
(
{{
item
.
url
|
host
}}
)
</span>
<a
:href=
"item.url"
target=
"_blank"
>
{{
item
.
title
}}
</a>
</
template
>
<span>
(
{{
item
.
url
|
host
}}
)
</span>
<
template
v-else
>
</
template
>
<router-link
:to=
"'/item/' + item.id"
>
{{
item
.
title
}}
</router-link>
<
template
v-else
>
</
template
>
<router-link
:to=
"'/item/' + item.id"
>
{{
item
.
title
}}
</router-link>
</
template
>
</span>
<br>
<br>
by
<span
class=
"meta"
>
<router-link
:to=
"'/user/' + item.by"
>
<span
v-if=
"item.type !== 'job'"
class=
"by"
>
{{ item.by }}
by
<router-link
:to=
"'/user/' + item.by"
>
{{ item.by }}
</router-link>
</router-link>
</span>
{{ item.time | timeAgo }} ago |
<span
class=
"time"
>
<router-link
:to=
"'/item/' + item.id"
>
{{ item.time | timeAgo }} ago
{{ item.descendants }} comments
</span>
</router-link>
<span
v-if=
"item.type !== 'job'"
class=
"comments-link"
>
|
<router-link
:to=
"'/item/' + item.id"
>
{{ item.descendants }} comments
</router-link>
</span>
</span>
</li>
</li>
</template>
</template>
...
...
src/views/ItemView.vue
View file @
61426829
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
|
{{
item
.
descendants
}}
comments
|
{{
item
.
descendants
}}
comments
</p>
</p>
</div>
</div>
<ul
class=
"item-view-comments"
>
<ul
v-if=
"item.kids"
class=
"item-view-comments"
>
<comment
v-for=
"id in item.kids"
:id=
"id"
></comment>
<comment
v-for=
"id in item.kids"
:id=
"id"
></comment>
</ul>
</ul>
</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