摘要: <style> * { margin: 0; padding: 0; } #mask { width: 700px; height: 300px; margin: 30px auto; text-align: center; } h1 { font-weight: 300; color: #1267 阅读全文
posted @ 2020-12-28 22:26 闭上耳朵 阅读(44) 评论(0) 推荐(0) 编辑
摘要: <body> <div id="mask"> <button @click="getJoke">获取笑话</button> <p> {{ joke }} </p> </div> <script src="http://unpkg.com/axios/dist/axios.min.js"></scri 阅读全文
posted @ 2020-12-28 22:19 闭上耳朵 阅读(89) 评论(0) 推荐(0) 编辑
摘要: <body> <button class="get">get请求</button><button class="post">post请求</button> <!-- 官网提供的 axios 在线地址 --> <script src="http://unpkg.com/axios/dist/axios 阅读全文
posted @ 2020-12-28 22:16 闭上耳朵 阅读(81) 评论(0) 推荐(0) 编辑
摘要: <style> * { margin: 0; padding: 0; box-sizing: border-box; } #mask { width: 300px; height: 400px; background-color: rgb(238, 238, 238); text-align: ce 阅读全文
posted @ 2020-12-28 22:14 闭上耳朵 阅读(46) 评论(0) 推荐(0) 编辑
摘要: <body> <div id="app"> <button @click="setM">我想说</button> <input type="text" v-model="message"> <h2> {{ message }} </h2> </div> <script src="https://cd 阅读全文
posted @ 2020-12-28 22:13 闭上耳朵 阅读(52) 评论(0) 推荐(0) 编辑
摘要: <body> <div id="app"> <select name="abc" v-model="fruit"> <option value="榴莲">榴莲</option> <option value="荔枝">荔枝</option> <option value="龙眼">龙眼</option> 阅读全文
posted @ 2020-12-28 22:10 闭上耳朵 阅读(90) 评论(0) 推荐(0) 编辑
摘要: <body> <div id="app"> <label for="agree"> <input type="checkbox" name="agree" id="agree" v-model="isAgree">同意协议: <button :disabled="!isAgree">下一步</but 阅读全文
posted @ 2020-12-28 22:06 闭上耳朵 阅读(96) 评论(0) 推荐(0) 编辑
摘要: <body> <div id="app"> <!-- v-model结合input:radio单选框使用 不写name属性 也可以实现单选 --> <label for="male"> 男:<input type="radio" id="male" value="男" v-model="sex"> 阅读全文
posted @ 2020-12-28 22:05 闭上耳朵 阅读(81) 评论(0) 推荐(0) 编辑
摘要: <body> <div id="app"> <button @click="doIt(f1,f2)">点击</button> <input type="text" @keyup.enter="sayHi"> </div> <script src="https://cdn.jsdelivr.net/n 阅读全文
posted @ 2020-12-28 22:03 闭上耳朵 阅读(56) 评论(0) 推荐(0) 编辑
摘要: <body> <div id="app"> <ul> <li v-for="(i,index) in arr"> {{ (index+1) + " " + i }} </li> </ul> <ul> <!-- 遍历对象中 获取key value 格式(value,key) --> <li v-for 阅读全文
posted @ 2020-12-28 22:00 闭上耳朵 阅读(137) 评论(0) 推荐(0) 编辑