10 2019 档案
摘要:1,子组件 TodoItem.vue : <template> <div class="todo-item" :class="{'is-complete':todo.completed}"> <p> <input type="checkbox" @change="markComplete"> {{t
阅读全文
摘要:<template> <div class="todo-item" :class="{'is-complete':todo.completed}"> <p> <input type="checkbox" @change="markComplete"> {{todo.title}} </p> </di
阅读全文
摘要:<template> <div> <div v-for="todo in a" :key="todo.id"> {{todo}} </div> </div> </template> <script> export default { name:'todos', data(){ return{ a:t
阅读全文
摘要:<html><body> <script type="text/javascript"> var str="0123456789!" document.write(str.substring(3,7)) //输出 3456 </script> </body></html>
阅读全文
摘要:1,父组件 App.vue 传值: <template> <div id="app"> <Todos :todos="todos"/> <!-- 父组件传递到子组件 --> </div> </template> <script> import Todos from './components/Tod
阅读全文
摘要:1,cnpm i express -g 2, cnpm i express-generater -g 3, express - e 项目名
阅读全文
摘要:1,博客表结构 Blog.js var mongoose = require('mongoose') mongoose.connect('mongodb://localhost/test',{ useUnifiedTopology: true , useNewUrlParser: true}); v
阅读全文
摘要:flex-direction定义伸缩项目放置在伸缩容器的排列方向,对应有四个值: (1)row:从左到右或从右到左 (2)row-reverse:与row属性相反 (3)column:从上到下排列 (4)column-reverse:从上到下排列,内容与column相反
阅读全文
摘要:一,单行 white-space:nowrap; overflow:hidden;text-overflow: ellipsis; 二,多行 display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orie
阅读全文
摘要:Linux常用命令大全(非常全!!!) 最近都在和Linux打交道,感觉还不错。我觉得Linux相比windows比较麻烦的就是很多东西都要用命令来控制,当然,这也是很多人喜欢linux的原因,比较短小但却功能强大。我将我了解到的命令列举一下,仅供大家参考: 系统信息 arch 显示机器的处理器架构
阅读全文
摘要:var date = new Date(); var date = new Date(); var date = new Date(); var date = new Date(); date .getYear(); //获取当前年份(2位) date .getFullYear(); //获取完整的
阅读全文
摘要:import Card from './components/Card.vue' Vue.component('m-card',Card) // component是注册全局组件,在实例化VUE前调用,注册后可以全局使用 。 components是局部注册组件,注册后只能在当页调用。 import
阅读全文
摘要:div{ display:flex; alian-items:center; //使垂直对齐 justify-content:center //使水平对齐 }
阅读全文
摘要:div{ width: 20%; border-left: 1px solid $border-color; &:nth-child(5n+1){ border: 0; } } 以上为一行5个的div边框的控制,使最每行的第一个的左边框消失。 以此类推 。。 div{ width: 20%; bor
阅读全文
摘要:@charset "UTF-8"; * { -webkit-box-sizing: border-box; box-sizing: border-box; outline: none; } .breake-word{ word-wrap: break-word; } .ellipsis{ white
阅读全文
摘要:一,工具 ├ 1, vue-awesome-swiper 基于 Swiper4、适用于 Vue 的轮播组件,支持服务端渲染和单页应用。 2, http://www.spritecow.com/ 雪碧图背景定位工具 3, uuid (npm) 自动生成id 4,Animate.css 一款强大的预设c
阅读全文
摘要:描述: 您可以使用&字符选择父级选择器。 它告诉父选择器应该插入的位置。 例一:&在前 Css代码 h3 { font-size: 20px margin-bottom: 10px &.some-selector { font-size: 24px margin-bottom: 20px } } 输
阅读全文
摘要:body{ margin: 0; font-family: Arial, Helvetica, sans-serif; line-height: 1.2em; background: #f1f1f1; -webkit-font-smoothing: antialiased; -moz-osx-fon
阅读全文
摘要:1,<span onclick="return confirmAct();">执行操作</span> 2, function confirmAct(){ if(confirm('确定要执行此操作吗?')){ alert(1) }else{ alert(2) } }
阅读全文
摘要:1.在win10 系统中搜索框 输入 Windos PowerShell选择 管理员身份运行 2,打开了powershell命令行之后,输入 set-ExecutionPolicy RemoteSigned 然后更改权限为A 最后通过 get-ExecutionPolicy 查看当前的状态 完成。
阅读全文
摘要:String(req.headers.authorization || '').split(' ').pop()
阅读全文
摘要:1,定义全局变量 app.set('name','八戒') 2,获取全局变量 app.get('name')
阅读全文