鍍金池/ 問答/HTML/ es6在helper02.js文件中定義了一個類,想在其他文件中調(diào)用但是無效,怎

es6在helper02.js文件中定義了一個類,想在其他文件中調(diào)用但是無效,怎么修改???

static get circlesMade()static set circlesMade(val)區(qū)別是什么

helper02.js

class Helper {
    /*
    constructor(radius) {
        this.radius = radius;
        Circle.circlesMade++;
    };
    static draw(circle, canvas) {
        // Canvas繪制代碼
    };

    area() {
        return Math.pow(this.radius, 2) * Math.PI;
    };
    get radius() {
        return this._radius;
    };
    isDom(obj) {
        console.log(obj)
    };

    var a = {}

    */

    static get circlesMade() {
        return !this._count ? 0 : this._count;
    };
    static set circlesMade(val) {
        this._count = val;
    };

    static getAge(){
        return '12';
    };

    getClassName(){
        return " ClassName1= "
    };

}

export Helper;
import _ from './helper02';

_.getAge()
回答
編輯回答
不舍棄

export default Helper;

2017年3月14日 16:37
編輯回答
好難瘦
import _ from './helper02';

_.getAge()
2017年4月29日 02:34