Update anji-select.vue

WongBin 3 years ago
parent 851f8098ed
commit 1deeca3103

@ -53,6 +53,7 @@
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { getStorageItem } from '@/utils/storage';
export default { export default {
props: { props: {
dictCode: null, // dictCodeurl dictCode: null, // dictCodeurl
@ -204,7 +205,7 @@ export default {
}, },
// localStorage gaeaDict // localStorage gaeaDict
getOptionsFromLocalStorage () { getOptionsFromLocalStorage () {
var dicts = JSON.parse(localStorage.getItem('gaeaDict')) var dicts = getStorageItem('gaeaDict')
var options = [] var options = []
if (!dicts.hasOwnProperty(this.dictCode)) { if (!dicts.hasOwnProperty(this.dictCode)) {
return [] return []

Loading…
Cancel
Save