fix(vnTable_order): default value
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
873d8ad2c3
commit
58d029c5bb
|
@ -175,7 +175,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
|
|
||||||
async function addOrder(field, direction = 'ASC') {
|
async function addOrder(field, direction = 'ASC') {
|
||||||
const newOrder = field + ' ' + direction;
|
const newOrder = field + ' ' + direction;
|
||||||
let order = store.order ?? [];
|
let order = store.order || [];
|
||||||
if (typeof order == 'string') order = [order];
|
if (typeof order == 'string') order = [order];
|
||||||
|
|
||||||
let index = order.findIndex((o) => o.split(' ')[0] === field);
|
let index = order.findIndex((o) => o.split(' ')[0] === field);
|
||||||
|
|
Loading…
Reference in New Issue