const examMixins = {
    data() {
        let letterArr = [];
        for (var i = 65; i < 91; i++) {
            letterArr.push(String.fromCharCode(i));
        }
        return {
            letters: letterArr
        }
    },
    methods: {
        /**
         * 根据下标返回字母
         * @param {Number}
         */
        getLetter(i) {
            return this.letters[i]
        },
        /**
         * 根据子母返回下标
         * @param {Number}
         */
        getLetterIndex(letter){
            var index = 0;
            this.letters.map((ltr,i)=>{
                if(ltr == letter){
                    index = i
                }
            })
            return index
        }
    }
}
export default examMixins