添加空状态
This commit is contained in:
@@ -1,16 +1,23 @@
|
||||
<script setup>
|
||||
import { navigateTo } from '@/utils/router'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { getUserAddress, updateUserAddress, deleteUserAddress } from '@/api'
|
||||
import {
|
||||
getUserAddress,
|
||||
updateUserAddress,
|
||||
deleteUserAddress
|
||||
} from '@/api'
|
||||
import { ref } from 'vue'
|
||||
import { useUI } from '@/utils/use-ui'
|
||||
|
||||
const { showDialog, showToast } = useUI()
|
||||
|
||||
const listData = ref([])
|
||||
const loading = ref(true)
|
||||
const getData = async () => {
|
||||
loading.value = true
|
||||
const res = await getUserAddress({ pageNum: 1, pageSize: 99 })
|
||||
listData.value = res.rows
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
const onAdd = () => {
|
||||
@@ -59,6 +66,9 @@
|
||||
<text class="top-right-name" @click="onAdd">添加地址</text>
|
||||
</template>
|
||||
</nav-bar>
|
||||
|
||||
<cb-empty v-if="!loading && listData.length === 0"></cb-empty>
|
||||
|
||||
<view class="address-list">
|
||||
<uni-swipe-action>
|
||||
<uni-swipe-action-item v-for="item in listData" :key="item.id">
|
||||
|
||||
Reference in New Issue
Block a user