How to introduce static pictures into vuex, or what better ideas do you have?

now the array of the carousel graph is taken from the background interface action dispatch.
now you want to add a local static image to the array, how to write it in store

Mar.10,2021

if the path array for storing the webcast image is already defined in state (suppose loopList), only needs to write a method to add images in mutations, the js code is as follows:


export default {
    namespace: true,
    state: {
        loopList: []
    },
    mutations: {
        // 
        getLoopList: (state, loopList) => {
            state.loopList = loopList;
        },

        // 
        addLoopList: (state, src) => {
            state.loopList.push(src);
        }
    },

    // action
    actions: {
        // 
        getLoopList: ({commit}) => {
            // ajax
            $http.get('/xxx/xxx').then(function (data) {
                commit('getLoopList', data);
            }, function (err) {
                console.log(err);
            });
        }
    }
};

suppose you want to add an address after an operation, and the code in the .vue file is as follows:

let path = 'your img url';
this.$store.commit('addLoopList', path);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eab3ea-203e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eab3ea-203e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?