2019/08/04 14:01:52 [emerg] 15376#8580: could not build map_hash, you should increase map_hash_bucket_size: 32
2019/08/04 14:05:40 [emerg] 12020#17148: could not build map_hash, you should increase map_hash_bucket_size: 32
2019/08/04 14:06:49 [emerg] 13284#5700: could not build map_hash, you should increase map_hash_bucket_size: 32
http {
map_hash_bucket_size 128;
...
events()
{
let search = debounce(async ({e, value, f}) => {
let response = await Digest.fastSearch({
q: value
})
f(response.items)
}, 1000)
this.$root.$on("on-root-main-search-change", async ({e, value, f}) => {
search({e, value, f})
})
}
$product = new Product();
$product->setProductType($this->productTypeRepository->getById($this->request->mixed("productType")));
$product->setName($this->request->mixed("name"));
$product->setPrice($this->request->mixed("price"));
$product->setCountMin($this->request->mixed("countMin"));
$product->setCountMax($this->request->mixed("countMax"));
$product->setShortDescription($this->request->mixed("shortDescription"));
$product->setLongDescription($this->request->mixed("longDescription"));
$extras_criteria = explode(",", $this->request->mixed("extras")) ;
/** @var Extras $item */
foreach ($this->extrasRepository->findBy(["id" => $extras_criteria]) as $item){
$product->getExtras()->add($item);
}
Scoped slots give you greater control over how the record data appears. If you want to add an extra field which does not exist in the records, just add it to the fields array, And then reference the field(s) in the scoped slot(s).
<b-table
no-local-sorting hover show-empty
select-mode="multi"
selectedVariant="success"
:items="this.products.items"
:fields="this.products.fields"
@row-selected="rowSelected"
@filtered="filtered"
>
<template slot="mybutton" slot-scope="data">
<b-button variant="outline-primary">Edit</b-button>
</template>
<template slot="empty" slot-scope="scope">
<div class="text-center">
<h5>Пусто</h5>
</div>
</template>
</b-table>
Происходит всего один раз при обновлении страницы или при первой загрузке на стороне клиента (в браузере)
export default (ctx) => {
let auth = isAuth(Cookie.get("access_token"))
if(!auth){
ctx.redirect('/login')
} else {
ctx.redirect('/')
}
}
Происходит каждый раз при изменении роута. В режиме спа не работает на сервере ()
export default async function ({store, req, redirect}) {
if (process.browser){
console.log('check auth')
let auth = isAuth(Cookie.get("access_token"))
if(!auth){
redirect('/login')
}
}
};