table: [],
this.$store.dispatch('SAVE_TABLE', [window.location.href, data]);
SET_TABLE: (state, payload) => {
state.table[payload[0]] = payload[1];
// state.table = [];
},
undefined
выведет.console.log(this.$store.getters.TABLE);
0: {http://localhost:8080/menu/5/1: {,…}}
1: {http://localhost:8080/menu/5/1: {,…}}
a = {}
, что так a = []
, console.log
все равно скажет, что это обьект 'Origin' => ['http://front.ru', 'http://localhost:8080'],
Access-Control-Allow-Methods: GET, POST, HEAD, OPTIONS
'Access-Control-Request-Method'
'corsFilter' => [
'class' => \yii\filters\Cors::class,
'cors' => [
'Origin' => ['http://front.ru', 'http://localhost:8080'],
'Access-Control-Request-Method' => ['OPTIONS', 'POST', 'PUT', 'GET', 'DELETE', 'PATCH', 'HEAD'],
'Access-Control-Request-Headers' => ['*'],
'Access-Control-Allow-Credentials' => true,
'Access-Control-Max-Age' => 3600,
'Access-Control-Expose-Headers' => ['X-Pagination-Current-Page'],
],
],