A place that I have explored in network.Including some demos which tech I have tested, managing my own knowledge, and saved some articles.
记录一些零碎的东西
12:05
学习的时候先找准主题,集中式的去搜集资料,然后学习。最好学习的过程中能带着问题去解决,比如学习这个主题,是要解决什么问题,要达到怎样一种效果。
for...in循环的是key,for...of循环的是value,对象不能使用for...of进行遍历
使用for...in遍历数组时,如果有自定义key,自定义key也会遍历,如果用for...of,只会遍历数组中的value,而不会遍历出自定义key的值
如何在现有项目中pod install
。
在styl中使用绝对路径来处理图片路径问题,暂时没去找其他的解决方案了。
background-image: url('/images/bg4.jpg')
附件的deleted字段都为true了,相当于需要保存的数据为空,这个时候没有做判断.
[Content](#anchor)
<span id="anchor"></span>
JSON.stringify
序列化的对象不能包括自己本身,否则会报错。
$emit
会有性能开销,如果处理的数据较多,$emit
次数过多的话,会导致性能崩掉。类似于selection-change
这种操作,不应该触发子元素的emit
事件。及组件内部的修改,不应该触发子组件的emit
。
第三个参数用来去匹配获取的路径,是否满足正则条件。该方法获取的路径如下:
./FileUtils.js
./StringUtils.js
./Test/T/index.js
./Test/index.js
./Test/router/index.js
./index.js
./init.js
Webpack
会用正则去跟这些路径做比较,满足条件的就会被留下来。
Open alfred
or spotlight
to search Network tools
, select lookup
, enter the site to find the ip.
Or use nslookup
in terminal
.
Use cmd+enter
to create a new line below, or use cmd+shift+enter
to create a new line above.
Use like this:
<style>
.numeric-conversion-rules table th:first-of-type {
width: 150px;
}
</style>
<div class="numeric-conversion-rules">
|__Head1__|__Head2__|
|---------|---------|
| body1 | body2 |
</div>
Use ~
to resolve path in <template>
. Like this:
<img src="~p@/img.png" />
// $ means absolute path
// $A$1 $A1 A$1 A1
=IF(AND(OR(IF($K3<>"", 1, 0), IF($L3<>"",1,0)), IF(R3="",1,0)),1,0)
- Select A3
- Click freeze
class Test {
constructor(name) {
this.name = name;
}
get name() {
return this.name;
}
set name(val) {
this.name = val;
}
}
If use setter/getter like above, while occur below error.
Uncaught RangeError: Maximum call stack size exceeded
The correct way is to use like below:
class Test {
constructor(name) {
this.name = name;
}
get name() {
return this._name;
}
set name(val) {
this._name = val;
}
}
Use a temp variable to store the value.
If bind scope to slot, use this to instead of $slots.
// Input.vue
<script>
import { Input } from 'element-ui';
export default {
mixins: [Input],
props: {
size: {
default: 'mini',
},
},
mounted() {
this.$on('input', (e) => {
console.log(e);
});
},
};
</script>
If use this way to set default props to a component, also can use below way to listener to event.
<input @input="input">