Commit 8cca5b82 by linjinhong

fix:修改物流方式Tik Tok模式

parent fe99190c
......@@ -82,12 +82,14 @@ export default defineComponent({
const selectedList = ref<(string | number)[]>([])
const selectedRadioList = ref<string | number>()
const waysName = ref('')
const selectedRadioName = ref('')
watch(
() => props.modelValue,
(newVal) => {
if (props.isRadio) {
selectedRadioList.value = newVal as string | number
console.log('waysName', waysName.value)
} else {
selectedList.value = newVal as (string | number)[]
}
......@@ -109,7 +111,12 @@ export default defineComponent({
if (props.isRadio) {
emit('update:modelValue', newVal[2])
companyList.value = newVal[1] as ICompanyList[]
waysName.value = selectedRadioName.value
const allWayLists: IwayList[] = props.companyList.flatMap(
(company) => company.wayList,
) as IwayList[]
waysName.value =
allWayLists.find((el: IwayList) => newVal[2] === el.id)?.name || ''
} else {
emit('update:modelValue', newVal[0])
allList.value = newVal[1] as IAllList[]
......@@ -221,9 +228,6 @@ export default defineComponent({
onUpdate:modelValue={(value) => {
console.log('company', value)
selectedRadioList.value = value as string | number
selectedRadioName.value = company.wayList.find(
(el) => el.id === value,
)?.name as string
}}
style={styles.checkboxGroup}
>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment