SOURCE

console 命令行工具 X clear

                    
>
console
<script src="https://unpkg.com/vue@3"></script>
    <style>
        html,body{
            background: #ffdbb7;
        }
        .wrap{
            max-width: 900px;
            margin: 0 auto;
        }
    </style>
<div id="app">
    <div class="wrap">
        <div>
            <input v-model="text" placeholder="搜索软件">
        </div>
        <div v-for="item in tableData">
            <div><el-image :src="item.name"/></div>
            <div>{{ item.description }}</div>
        </div>
    </div>
</div>
<script>
    const { createApp } = Vue

    createApp({
        data() {
            return {
                tableData: []
            }
        },
        mounted:function (){
            this.conditionalQuery()
        },
        methods: {
            conditionalQuery(){
                this.$http.post(
                    'https://img.ylface.com/lizhi/list.json'
                ).then((response)=>{
                    if(response.data.code == 0){
                        this.tableData = response.data.data
                    }else{
                        this.tableData = []
                    }
                })
            },
        }
    }).mount('#app')
</script>