export default class AnalyzerDell implements Analyzer {
private static instance: AnalyzerDell
private constructor () {}
static getInstance () {
// 在这里,老师你用的是类名,也就是AnalyzerDell.instance和this.instance有什么区别吗?代码确实不报错
if (!this.instance) {
this.instance = new AnalyzerDell()
}
return this.instance
}