上一页 1 2 3 4 5 6 7 8 9 ··· 44 下一页
摘要: 只在节点渲染一次内容,就被视为静态内容了 阅读全文
posted @ 2023-02-21 17:23 罗砂 阅读(25) 评论(0) 推荐(0)
摘要: body: <!-- 列表过滤 --> <div class=""> <!-- 模糊查询 --> <input type="text" v-model="keyWords"> <!-- 列表渲染 --> <ul> <li v-for="item in filterPersons" :key="ite 阅读全文
posted @ 2023-02-21 16:26 罗砂 阅读(28) 评论(0) 推荐(0)
摘要: 1 安装工具babel-cli babel-preset-env browserify(webpack) .babelrc配置 { presets":["babel-preset-env"] 2 npx babel src/js -d dist/js 3 打包 npx browserify dist 阅读全文
posted @ 2023-02-20 16:02 罗砂 阅读(57) 评论(0) 推荐(0)
摘要: NPM和模块化结合使用 前提是要先安装node.js 如果在vscode的终端中一直不成功的话,可以在cmd里,以管理员身份来安装jquery: 使用方法: //修改背景颜色为粉色 // ES6引入jquery写法 import $ from 'jquery';// 类似于node.js:const 阅读全文
posted @ 2023-02-20 16:00 罗砂 阅读(35) 评论(0) 推荐(0)
摘要: 模块化 模块化是指将一个大的程序文件 ,拆分成许多小的文件,然后将小文件组合起来。 模块化的好处 模块化的优势有以下几点: 1.防止命名冲突 2.代码复用 3.高维护性 export是暴露的意思 引入js文件然后打印 htm: <script type="module"> import * as m 阅读全文
posted @ 2023-02-20 14:45 罗砂 阅读(24) 评论(0) 推荐(0)
摘要: Object.assign 对象的合并 <script> // Object.assign 对象的合并 const config1={ host:'localhost', port:3306, name:'root', pass:'root', test:'test' } const config2 阅读全文
posted @ 2023-02-20 14:03 罗砂 阅读(14) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <script> class Phone{ // 构造方法 constructor(brand,price){ this.brand 阅读全文
posted @ 2023-02-20 11:34 罗砂 阅读(25) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <script> function Phone(brand,price){ this.brand = brand this.pric 阅读全文
posted @ 2023-02-20 11:21 罗砂 阅读(17) 评论(0) 推荐(0)
摘要: <script> //ES5 //手机类 // function Phone(brand,price){ // this.brand = brand; // this.price = price; // } // Phone.phoneName = '手机'; // //添加方法 // Phone. 阅读全文
posted @ 2023-02-20 10:58 罗砂 阅读(16) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <script> class Shouji{ // 构造方法 名字不能修改 constructor(brand,price){ th 阅读全文
posted @ 2023-02-20 10:50 罗砂 阅读(19) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 44 下一页