button
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
.title {{ item.user.name }}
|
||||
.info
|
||||
span {{ rwdate(item.updatedAt) }}
|
||||
p {{ item.data }}
|
||||
div(v-html="markdown(item.data)")
|
||||
.post-none(v-else) 没有评论~
|
||||
</template>
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import { marked } from "marked";
|
||||
export default {
|
||||
props: ["data"],
|
||||
methods: {
|
||||
@@ -55,6 +56,9 @@ export default {
|
||||
let t = new Date(utc);
|
||||
return t.getMonth() + 1 + "月 " + t.getDate() + ", " + t.getFullYear();
|
||||
},
|
||||
markdown(data) {
|
||||
return marked.parse(data);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user