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" "build": "vue-live build"
}, },
"devDependencies": { "devDependencies": {
"@bytedo/vue-live": "^0.0.13" "@bytedo/vue-live": "^0.1.4"
} }
} }

View File

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

View File

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