import Vue from 'vue' export default function getAttributes () { return new Promise(async resolve => { try { const { data } = await Vue.http.get('/product/attribute/category', { params: { per_page: 1000, }, }) const list = data.map(attribute => { return { value: attribute.id, label: attribute.name } }) resolve(list) } catch { resolve([]) } }) }