This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setAnswers (state, payload) { | |
let answersLength = state.test.answers.length | |
let answerNumber = payload.questionNumber | |
for (let i = 0; i < answersLength + 1; i++) { | |
if (answerNumber === 0 && answersLength === 0) { | |
state.test.answers.push(payload) | |
} else if (answerNumber === i) { | |
state.test.answers[answerNumber].questionNumber = payload.questionNumber | |
state.test.answers[answerNumber].correct = payload.correct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nuxt.config.js | |
const webpack = require('webpack') | |
module.exports = { | |
build: { | |
vendor: ['jquery', 'bootstrap'], | |
plugins: [ | |
// set shortcuts as global for bootstrap | |
new webpack.ProvidePlugin({ |