zhang_li
3 months ago
6 changed files with 40 additions and 45 deletions
@ -1,41 +1,37 @@ |
|||||
<!--发料任务卡片--> |
<!--发料任务卡片--> |
||||
<template> |
<template> |
||||
<!-- <page-meta root-font-size="18px"></page-meta> --> |
<!-- <page-meta root-font-size="18px"></page-meta> --> |
||||
<u-popup v-model='show' mode='center'> |
<u-popup v-model="show" mode="center"> |
||||
<scroll-view scroll-y="true" style="background-color: #EEEEEE;height: 90vh;"> |
<scroll-view scroll-y="true" style="background-color: #eeeeee; height: 90vh"> |
||||
<item :dataContent="balanceItems[0]"></item> |
<item style="margin: 10rpx" :dataContent="balanceItems[0]"></item> |
||||
<view class="popinpop count_shadow" style="width: 90vw;margin: 20rpx 20rpx 30rpx 20rpx;" |
<view class="popinpop count_shadow" style="width: 90vw; margin: 20rpx 20rpx 30rpx 20rpx" v-for="(item, index) in balanceItems" :key="item.id" @click="callback(item)"> |
||||
v-for="(item, index) in balanceItems" :key="item.id" @click="callback(item)"> |
<balance :dataContent="item" :isShowStatus="false"></balance> |
||||
<balance :dataContent="item"></balance> |
|
||||
</view> |
</view> |
||||
</scroll-view> |
</scroll-view> |
||||
</u-popup> |
</u-popup> |
||||
</template> |
</template> |
||||
|
|
||||
<script setup lang="ts"> |
<script setup lang="ts"> |
||||
import { |
import { ref, getCurrentInstance } from 'vue' |
||||
ref, |
|
||||
getCurrentInstance, |
|
||||
} from 'vue' |
|
||||
import item from '@/mycomponents/item/item.vue' |
import item from '@/mycomponents/item/item.vue' |
||||
import balance from '@/mycomponents/balance/balance.vue' |
import balance from '@/mycomponents/balance/balance.vue' |
||||
|
|
||||
const balanceItems = ref([]) |
const balanceItems = ref([]) |
||||
const openPopup = (items) => { |
const openPopup = (items) => { |
||||
if (Array.isArray(items)) { |
if (Array.isArray(items)) { |
||||
balanceItems.value= items; |
balanceItems.value = items |
||||
} else { |
} else { |
||||
balanceItems.value = [items]; |
balanceItems.value = [items] |
||||
} |
} |
||||
show.value = true |
show.value = true |
||||
} |
} |
||||
|
|
||||
const callback = (item) => { |
const callback = (item) => { |
||||
emit("onSelectItem", item); |
emit('onSelectItem', item) |
||||
show.value = false |
show.value = false |
||||
} |
} |
||||
const emit = defineEmits(['onSelectItem']) |
const emit = defineEmits(['onSelectItem']) |
||||
defineExpose({ openPopup }) |
defineExpose({ openPopup }) |
||||
</script> |
</script> |
||||
|
|
||||
<style scoped lang="scss"> |
<style scoped lang="scss"></style> |
||||
</style> |
|
||||
|
Loading…
Reference in new issue