随笔分类 - 前端歌谣--学习-vue2课程
摘要://导入jquery import $ from 'jquery' //导入图片文件 import logo from "./logo.jpg" //给img标签的src动态赋值 $('.box').attr('src',logo) //定义jquery的入口 import './index.css
阅读全文
摘要:base64防止一些不必要的网络请求 体积增大一点点
阅读全文
摘要:const path = require('path') // 1. 导入 html-webpack-plugin 这个插件,得到插件的构造函数 const HtmlPlugin = require('html-webpack-plugin') // 2. new 构造函数,创建插件的实例对象 co
阅读全文
摘要:const path=require('path') // 1. 导入 html-webpack-plugin 这个插件,得到插件的构造函数 const HtmlPlugin = require('html-webpack-plugin') // 2. new 构造函数,创建插件的实例对象 cons
阅读全文
摘要://导入jquery import $ from 'jquery' //定义jquery的入口 import './index.css' $(function(){ $('li:odd').css('background-color','red') $('li:even').css('backgro
阅读全文
摘要:const path=require('path') // 1. 导入 html-webpack-plugin 这个插件,得到插件的构造函数 const HtmlPlugin = require('html-webpack-plugin') // 2. new 构造函数,创建插件的实例对象 cons
阅读全文
摘要:内存中的页面不受到影响 会引用内存中的bundle.js
阅读全文
摘要:const path=require('path') // 1. 导入 html-webpack-plugin 这个插件,得到插件的构造函数 const HtmlPlugin = require('html-webpack-plugin') // 2. new 构造函数,创建插件的实例对象 cons
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:webpack.config.js { "name": "change-rows-color", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "dev": "webpack serve" }, "ke
阅读全文
摘要:<!-- 在绑定事件处理函数的时候,可以使用 () 传递参数 --> <!-- v-on: 指令可以被简写为 @ --> <button @click="add(1)">+1</button> <button @click="sub">-1</button> 直接用@进行数据绑定
阅读全文
摘要:// methods 的作用,就是定义事件的处理函数 methods: { add(n) { // 在 methods 处理函数中,this 就是 new 出来的 vm 实例对象 // console.log(vm this) console.log(vm) // vm.count += 1 thi
阅读全文
摘要:处理函数可以去除function进行书写 add(n) { // 在 methods 处理函数中,this 就是 new 出来的 vm 实例对象 // console.log(vm this) console.log(vm) // vm.count += 1 this.count += n }, s
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
阅读全文