このリポジトリは2023-09-09にアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュ、イシューの作成、プルリクエストはできません。
076server/resources/assets/js/components/NewEntries.vue

50 行
951 B
Vue
Raw 通常表示 履歴

2018-01-24 23:48:58 +09:00
<template>
<div class="container">
<div class="row">
2018-01-24 23:58:21 +09:00
<span v-for="item in items">
<div class="col-md-2">
<a :href="'/entry/' + item.id">
<img :src="'/assets/store/' + item.id + '/screens/1.png'" width="100px" height="100px" />
<br />
{{ item.title }}
</a>
<br />
<a href="/profile/0">
Name
</a>
<br />
{{ item.submit_date }}
</div>
</span>
2018-01-24 23:48:58 +09:00
</div>
</div>
</template>
<script>
import moment from 'moment';
export default {
2018-01-25 00:58:29 +09:00
name: 'new-items',
data: function () {
return {
items: []
}
},
created: function () {
axios.get('/api/rpc/file/getnewfiles').then(data => {
data.data.forEach(cb => {
this.items.push({
'id': cb.id,
'title': cb.title,
'submit_date': moment.unix(cb.submit_date).format("YYYY/MM/DD")
});
2018-01-24 23:58:21 +09:00
});
2018-01-25 00:58:29 +09:00
})
}
2018-01-24 23:48:58 +09:00
}
</script>
<style>
.col {
2018-01-24 23:58:21 +09:00
text-align: center;
2018-01-24 23:48:58 +09:00
}
</style>