class 里面的get方法 class Computed { n = 4 get Num () { return (m: number) => { return this.n * m } } } const a = new Computed() const b = a.Num(3) // 12 Vue // html <div>{{ total(3) }} </div> // js computed: { total() { return function(n) { return n * this.num } }, }