# 好的命名方式
let maxCount = 10;
let tableTitle = '啦啦啦';
# 不好的命名方式
let setConut = 10;
let getTitle = '啦啦啦';
const MAX_COUNT = 10;
const URL = '//www.huifenqi.com';
// 是否可阅读
function canRead() {}
// 获取名称
function getName() {}
class Persion {
constructor(name) {
...
}
}
let person = new Person('啦啦啦');
class Person {
// 私有属性
_name: string;
constructor() { }
// 公共方法
getName() {
return this._name;
}
// 公共方法
setName(name) {
this._name = name;
}
}
import ElInput form '***'
import Emitter from '***'
原文:https://www.cnblogs.com/cowboybusy/p/11496301.html