fix: sort selected field
This commit is contained in:
parent
eaa92f214d
commit
42585c859c
2 changed files with 25 additions and 11 deletions
|
|
@ -101,11 +101,19 @@ defineProps<{
|
|||
<slot name="data"></slot>
|
||||
<template v-if="!$slots.data">
|
||||
<div
|
||||
v-for="key in fieldSelected || [
|
||||
'branchLabelAddress',
|
||||
'branchLabelTel',
|
||||
'branchLabelType',
|
||||
]"
|
||||
v-for="key in (
|
||||
fieldSelected || [
|
||||
'branchLabelAddress',
|
||||
'branchLabelTel',
|
||||
'branchLabelType',
|
||||
]
|
||||
).sort((lhs, rhs) => {
|
||||
let order = Object.keys(data);
|
||||
return (
|
||||
order.findIndex((i) => i === lhs) -
|
||||
order.findIndex((i) => i === rhs)
|
||||
);
|
||||
})"
|
||||
:key="key"
|
||||
class="branch-card__data"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue