Add and use vue-save-state
This commit is contained in:
parent
6ce41c0f0b
commit
45f8a6a2ab
|
@ -17,7 +17,8 @@
|
||||||
"qs": "^6.8.0",
|
"qs": "^6.8.0",
|
||||||
"tailwindcss": "^1.1.2",
|
"tailwindcss": "^1.1.2",
|
||||||
"vue": "^2.6.10",
|
"vue": "^2.6.10",
|
||||||
"vue-router": "^3.0.3"
|
"vue-router": "^3.0.3",
|
||||||
|
"vue-save-state": "^1.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "^3.7.0",
|
"@vue/cli-plugin-babel": "^3.7.0",
|
||||||
|
|
|
@ -8,13 +8,16 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import qs from 'qs'
|
|
||||||
import AcceptedSessionsList from '@/components/AcceptedSessionsList'
|
import AcceptedSessionsList from '@/components/AcceptedSessionsList'
|
||||||
|
import qs from 'qs'
|
||||||
|
import saveState from 'vue-save-state'
|
||||||
import SessionForm from '@/components/SessionForm'
|
import SessionForm from '@/components/SessionForm'
|
||||||
|
|
||||||
const axios = require('axios')
|
const axios = require('axios')
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [saveState],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
AcceptedSessionsList,
|
AcceptedSessionsList,
|
||||||
SessionForm
|
SessionForm
|
||||||
|
@ -43,8 +46,14 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
addSession: function (session) {
|
addSession (session) {
|
||||||
this.sessions.push(session)
|
this.sessions.push(session)
|
||||||
|
},
|
||||||
|
|
||||||
|
getSaveStateConfig () {
|
||||||
|
return {
|
||||||
|
cacheKey: 'app'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6080,6 +6080,11 @@ lodash@4.x, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lo
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
|
||||||
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
|
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
|
||||||
|
|
||||||
|
lodash@^4.0.0:
|
||||||
|
version "4.17.15"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
|
||||||
|
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
|
||||||
|
|
||||||
log-symbols@^2.2.0:
|
log-symbols@^2.2.0:
|
||||||
version "2.2.0"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"
|
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"
|
||||||
|
@ -9626,6 +9631,13 @@ vue-router@^3.0.3:
|
||||||
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.6.tgz#2e4f0f9cbb0b96d0205ab2690cfe588935136ac3"
|
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.6.tgz#2e4f0f9cbb0b96d0205ab2690cfe588935136ac3"
|
||||||
integrity sha512-Ox0ciFLswtSGRTHYhGvx2L44sVbTPNS+uD2kRISuo8B39Y79rOo0Kw0hzupTmiVtftQYCZl87mwldhh2L9Aquw==
|
integrity sha512-Ox0ciFLswtSGRTHYhGvx2L44sVbTPNS+uD2kRISuo8B39Y79rOo0Kw0hzupTmiVtftQYCZl87mwldhh2L9Aquw==
|
||||||
|
|
||||||
|
vue-save-state@^1.2.0:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/vue-save-state/-/vue-save-state-1.2.0.tgz#fefedc1e5af6a3b0a397c13e41113000404c1963"
|
||||||
|
integrity sha1-/v7cHlr2o7Cjl8E+QREwAEBMGWM=
|
||||||
|
dependencies:
|
||||||
|
lodash "^4.0.0"
|
||||||
|
|
||||||
vue-style-loader@^4.1.0:
|
vue-style-loader@^4.1.0:
|
||||||
version "4.1.2"
|
version "4.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-4.1.2.tgz#dedf349806f25ceb4e64f3ad7c0a44fba735fcf8"
|
resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-4.1.2.tgz#dedf349806f25ceb4e64f3ad7c0a44fba735fcf8"
|
||||||
|
|
Loading…
Reference in a new issue