master
yutent 2023-02-08 19:09:58 +08:00
parent e85da16f59
commit 62e755c2d4
3 changed files with 28 additions and 3 deletions

View File

@ -6,6 +6,6 @@
"build": "vue-live build"
},
"devDependencies": {
"@bytedo/vue-live": "^0.0.13"
"@bytedo/vue-live": "^0.1.4"
}
}

View File

@ -1,7 +1,13 @@
import { reactive } from 'vue'
const store = reactive({
user: {}
user: {},
stats: {
0: '已删除',
1: '待审核中',
2: '正常收录',
9: '拒绝收录'
}
})
export default function (app) {

View File

@ -1,12 +1,20 @@
<script>
import fetch from '@/lib/fetch.js'
export default {
data() {
return {
content: '这是关于我们页面'
content: '这是关于我们页面',
list: []
}
},
mounted() {
this.$store.searchShow = false
fetch('/package/list').then(r => {
console.log(r)
this.list = r.data
})
}
}
</script>
@ -17,10 +25,21 @@ export default {
<thead>
<tr>
<th>开源库</th>
<th>作者</th>
<th>介绍</th>
<th>最后同步日期</th>
<th>收录状态</th>
</tr>
</thead>
<tbody>
<tr v-for="it of list" :key="it.id">
<td>{{ it.id }}</td>
<td>{{ it.author }}</td>
<td>{{ it.description }}</td>
<td>{{ it.sync_date }}</td>
<td>{{ $store.stats[it.stat] }}</td>
</tr>
</tbody>
</table>
</main>
</template>