随笔笔记

keydown:当用户按下键盘上的任意键时触发,如果按住不放的话,会重复触发此事件;
keypress:当用户按下键盘上的字符键时触发,如果按住不让的话,会重复触发此事件; 字符键(数字+字母+标点符号)
keyup:当用户释放键盘上的任意键时触发。

 

 property:属性,attribute:特性

property是DOM中的属性,是JavaScript里的对象;

property取值 DOM.xxx

property赋值 DOM.xxx = xxx

attribute是HTML标签上的特性,它的值只能够是字符串;

attribute 取值方法:getAttribute()

attribute 赋值方法:setAttribute()

property能够从attribute中得到同步;

attribute不会同步property上的值;

attribute和property之间的数据绑定是单向的,attribute->property;

更改property和attribute上的任意值,都会将更新反映到HTML页面中;

 

数据concat的使用

在一个页面里面使用concat当给后端数据时一定要小心,记得清空一下,否则会上传多条数据,

 

windows上生成tree状目录结构

ssr-vue
├── app.js
├── assets
├── bin
├── config
├── controller
├── logs
├── middlewares
├── models
├── package-lock.json
├── package.json
├── README.md
├── tests
├── views
└── widgets
安装 tree-node-cli    npm install -g tree-node-cli
windows  用treee linux 用tree
treee     -L     2     -I      "node_modules
命令名称  深度  2  忽略    node_modules  
tree [options] [path/to/dir]
options:

-V, --version 输出版本号
-a, --all-files 打印所有文件,包括隐藏文件
--dirs-first 目录在前,文件在后
-d, --dirs-only 仅列出目录
-I, --exclude [patterns] 排除与模式匹配的文件。用 | 隔开,用双引号包裹。 例如 “node_modules|.git”
-L, --max-depth <n> 目录树的最大显示深度
-r, --reverse 按反向字母顺序对输出进行排序
-F, --trailing-slash 为目录添加'/'
-h, --help 输出用法信息

[path/to/dir]

> xxxx.xxx(文件名)

 

treee     -L     2     -I      "node_modules" > README.md

翻译  把生成的tree目录结构的数据保存到README.md里面    > 必须要(指定生成的数据保存到哪里)

posted @ 2020-07-03 13:45  单身飞过撒哈拉  阅读(73)  评论(0)    收藏  举报