update
This commit is contained in:
		
							parent
							
								
									3d97313732
								
							
						
					
					
						commit
						5d8bf5c079
					
				@ -421,10 +421,8 @@ VS Code 默认支持 Emmet。更多 Emmet 语法规则,请自行查阅。
 | 
			
		||||
 | 
			
		||||
VS Code 有一个很强大的功能就是支持插件扩展。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
上图中,点击红框部分,即可在输入框里,查找你想要的插件名,然后进行安装。
 | 
			
		||||
 | 
			
		||||
我来列举几个常见的插件,这些插件都很实用。
 | 
			
		||||
@ -435,11 +433,13 @@ VS Code 有一个很强大的功能就是支持插件扩展。
 | 
			
		||||
 | 
			
		||||
GitLens 在 Git 管理上有很多强大的功能,比如:
 | 
			
		||||
 | 
			
		||||
- 将光标放置在代码的当前行,可以看到这样代码的提交者是谁,以及提交时间。这一点,是 GitLens 最便捷的功能。
 | 
			
		||||
 | 
			
		||||
- 查看某个 commit 的代码改动记录
 | 
			
		||||
 | 
			
		||||
- 查看不同的分支
 | 
			
		||||
 | 
			
		||||
- 可以将两个 commit 进行代码对比,甚至可以将两个 branch 分支进行代码比对。这一点,简直是 GitLens 最强大的功能。
 | 
			
		||||
- 可以将两个 commit 进行代码对比,甚至可以将两个 branch 分支进行整体的代码比对。这一点,简直是 GitLens 最强大的功能。
 | 
			
		||||
 | 
			
		||||
### RemoteHub
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										27
									
								
								12-Vue基础/Vue.js在开发中的常见写法积累.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								12-Vue基础/Vue.js在开发中的常见写法积累.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,27 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### 001、对象的赋值
 | 
			
		||||
 | 
			
		||||
(1)在 store 中定义一个对象:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
    userInfo: {
 | 
			
		||||
        pin: '',
 | 
			
		||||
        nickName: '',
 | 
			
		||||
        avatarUrl: DEFAULT_AVATAR,
 | 
			
		||||
        definePin: '',
 | 
			
		||||
        isbind: true
 | 
			
		||||
    },
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
(2)从接口拿到数据后,给这个对象赋值:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
    this.userInfo = {
 | 
			
		||||
        ...this.userInfo,
 | 
			
		||||
        pin: res.base.curPin,
 | 
			
		||||
        nickName: res.base.nickname,
 | 
			
		||||
        avatarUrl: res.base.headImageUrl ? res.base.headImageUrl : DEFAULT_AVATAR,
 | 
			
		||||
        definePin: res.definePin
 | 
			
		||||
    }
 | 
			
		||||
```
 | 
			
		||||
@ -287,6 +287,10 @@ Sass 是成熟、稳定、强大的 CSS 扩展语言。入门文档可以看:<
 | 
			
		||||
 | 
			
		||||
- **图片压缩**:<https://www.yasuotu.com/>
 | 
			
		||||
 | 
			
		||||
- 图片转base64:<http://imgbase64.duoshitong.com/>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
- 在线PS:<https://www.photopea.com/>
 | 
			
		||||
 | 
			
		||||
- 图片在线裁剪:<https://www.asqql.com/gifc/>
 | 
			
		||||
 | 
			
		||||
@ -235,9 +235,34 @@ Object.assign(this.dataObj, dataObj);
 | 
			
		||||
尤其要研究一下 `vertical-align: middle;`这个属性。
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### 2019-05-30
 | 
			
		||||
### 2019-06-11
 | 
			
		||||
 | 
			
		||||
已知某背景图片的尺寸是:586 * 931。现只截图图片的上面一部分区域(586 * 810)做展示。代码实现如下:
 | 
			
		||||
 | 
			
		||||
标签部分:
 | 
			
		||||
 | 
			
		||||
```html
 | 
			
		||||
 | 
			
		||||
<div class="img"> </div>
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
css部分:(重点是 background 属性的写法)
 | 
			
		||||
 | 
			
		||||
```css
 | 
			
		||||
  .img{
 | 
			
		||||
      width: 586rpx;
 | 
			
		||||
      height: 810rpx;
 | 
			
		||||
      background: url('https://img11.360buyimg.com/jdphoto/s586x931_jfs/t1/27766/15/3237/102443/5c258955Ee307620e/21a744b0d2e065b3.png') 0 0/cover no-repeat;
 | 
			
		||||
      margin: 0 auto;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
`arr1.push(arr2)` 和
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user