Files
YGChatCS/pages/order/components/CustomRefresher/index.vue
2025-07-29 09:01:18 +08:00

40 lines
1011 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- z-paging自定义的下拉刷新view -->
<template>
<view class="refresher-container">
<image
class="refresher-image"
mode="aspectFit"
src="./images/refresher_loading.gif"
></image>
<text class="refresher-text">{{ statusText }}</text>
</view>
</template>
<script setup>
import { computed } from "vue";
const props = defineProps({
status: {
type: String,
default: "",
},
});
const statusText = computed(() => {
// 这里可以做i18n国际化相关操作可以通过uni.getLocale()获取当前语言(具体操作见i18n-demo.vue);
// 获取到当前语言之后,就可以自定义不同语言下的展示内容了
const statusTextMap = {
default: "哎呀,用点力继续下拉!",
"release-to-refresh": "拉疼我啦,松手刷新~~",
loading: "正在努力刷新中...",
complete: "刷新成功啦~",
};
return statusTextMap[this.status];
});
</script>
<style scoped lang="scss">
@import "./styles/index.scss";
</style>