store-manage-app/src/pages/user/components/item.vue

41 lines
1.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view class="flex rounded-19rpx box-content card" @click="goPage(`/pages/user/detail?id=${item.id}`)">
<view class="rounded-full w-100rpx h-100rpx overflow-hidden">
<image class="w-full h-full" :src="item.avatar"></image>
</view>
<view class="flex-1 ml-20rpx flex flex-col justify-between">
<view class="flex text-sm">
<view>{{ item.name }}</view>
<template v-if="item.jobs">
<uv-tags
v-for="job in item.jobs"
class="ml-20rpx"
:text="job.name"
:key="job.id"
plain
size="mini"
type="primary"
></uv-tags>
</template>
</view>
<view class="text-24rpx text-hex-999">
<view class="">电话:{{ item.phone }}</view>
<view class="" v-if="item.store">{{ item.store.address }}</view>
</view>
</view>
</view>
</template>
<script setup>
defineProps({
item: {
type: Object,
default: () => ({}),
},
})
const goPage = (url) => {
uni.navigateTo({
url,
})
}
</script>