<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script src="vue.min.js"></script>
<link rel="stylesheet" href="./css/style.css" />
</head>
<body>
<div id="app">
<div class="search-wrapper">
<input type="text" v-model="search" @input="query()" placeholder="请搜索" />
</div>
<div class="wrapper">
<div class="card" v-for="post in filterList">
<a v-bind:href="post.link" target="_blank">
<img v-bind:src="post.img" />
{
{ post.title }}
</a>
</div>
</div>
</div>
<script>
class Post {
constructor(title, link, img) {
this.title = title;
this.link = link;
this.img = img;
}
}
const app = new Vue({
el: "#app",
data: {
search:
楼赛 第 31 期(Web 前端挑战)【功能实现】搜一搜呀 折叠手风琴
于 2022-02-22 12:24:51 首次发布