09 2021 档案

摘要:const a = [] for (i = 0; i < 100000; i++) { a.push({ id: i, name: 'xx' + i }) } const b = [] for (let i = 0; i < 100; i++) { b.push({ id: i, name: 'yy 阅读全文
posted @ 2021-09-29 21:56 吴小明- 阅读(767) 评论(0) 推荐(0) 编辑
摘要:<template> <div id="app"> <span @click="close">x</span> </div> </template> <script> export default { methods: { close() { console.log('123') } } } </s 阅读全文
posted @ 2021-09-25 19:40 吴小明- 阅读(182) 评论(0) 推荐(0) 编辑
摘要:[class^='icon'], [class*=' icon'] { width: 100px; height: 100px; background-color: red; } 以icon开头,包含 ' icon'的类名 阅读全文
posted @ 2021-09-25 19:32 吴小明- 阅读(740) 评论(0) 推荐(0) 编辑
摘要:概念:当设置padding-bottom的值为75%时,该值为父级元素宽度的75%,可以达到自适应的效果 应用: <template> <div id="app"> <div class="img-container"><img src="./assets/images/4:3.jpg"></div 阅读全文
posted @ 2021-09-25 17:09 吴小明- 阅读(69) 评论(0) 推荐(0) 编辑
摘要:自定义loading指令directives/MyLoading/index.vue: <template> <div class="loading-wrapper"> <div class="loading-content"> <img width="50" height="50" src="./loading.gif" 阅读全文
posted @ 2021-09-25 16:19 吴小明- 阅读(208) 评论(0) 推荐(0) 编辑
摘要:<style> * { margin: 0; padding: 0; } .container { width: 350px; border: 1px solid red; display: flex; flex-wrap: wrap; justify-content: space-between; 阅读全文
posted @ 2021-09-24 22:26 吴小明- 阅读(215) 评论(0) 推荐(0) 编辑
摘要:html: <style> .div { width: 200px; height: 200px; background-color: greenyellow; } </style> </head> <body> <div class="div">一些文字</div> <script> const 阅读全文
posted @ 2021-09-24 21:45 吴小明- 阅读(473) 评论(0) 推荐(0) 编辑
摘要:vue.config.js: devServer: { before: function (app) { app.get('/aaa', (req, res) => { res.json({ errno: 0, data: { id: 1, name: '小明' } }) }) } } App.vu 阅读全文
posted @ 2021-09-24 20:46 吴小明- 阅读(233) 评论(0) 推荐(0) 编辑
摘要:<template> <div id="app"> <transition-group tag="ul" name="list"> <li v-for="(item,index) in list" :key="index">{{item}}<button @click="handleDelete(i 阅读全文
posted @ 2021-09-23 17:40 吴小明- 阅读(135) 评论(0) 推荐(0) 编辑
摘要:fast mock官网地址:https://www.fastmock.site/#/projects 1、创建项目 2、添加接口 3、使用接口 <script> import axios from 'axios' export default { created() { const url = 'h 阅读全文
posted @ 2021-09-23 17:03 吴小明- 阅读(2550) 评论(0) 推荐(0) 编辑
摘要:store/index.js: import Vue from 'vue' import Vuex from 'vuex' import school from './school' import { createLogger } from 'vuex' import logger from 'vu 阅读全文
posted @ 2021-09-23 14:16 吴小明- 阅读(1745) 评论(0) 推荐(0) 编辑
摘要:ProjressCircle.vue <template> <div class="progress-circle"> <svg :width="size" :height="size" viewBox="0 0 100 100"> <circle r="50" cx="50" cy="50" fi 阅读全文
posted @ 2021-09-22 17:44 吴小明- 阅读(42) 评论(0) 推荐(0) 编辑
摘要:<template> <div id="app"> <ul> <li v-for="(item, index) in slideData" :key="index"> <transition> <img :src="item.img" v-if="index currentIndex" /> </t 阅读全文
posted @ 2021-09-12 21:51 吴小明- 阅读(1094) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示