remove AppPullDownRefresh.vue
This commit is contained in:
@@ -95,7 +95,7 @@ html.theme-dark body {
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.app-pull-down-refresh {
|
||||
.t-pull-down-refresh {
|
||||
height: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
<template>
|
||||
<t-pull-down-refresh
|
||||
ref="rootRef"
|
||||
class="app-pull-down-refresh"
|
||||
v-bind="forwardedAttrs"
|
||||
@touchstart.capture="guardTouch"
|
||||
@touchmove.capture="guardTouch"
|
||||
@touchend.capture="guardTouch"
|
||||
@touchcancel.capture="guardTouch"
|
||||
>
|
||||
<slot />
|
||||
</t-pull-down-refresh>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { ComponentPublicInstance } from "vue";
|
||||
|
||||
defineOptions({
|
||||
name: "AppPullDownRefresh",
|
||||
inheritAttrs: false
|
||||
});
|
||||
|
||||
type EventListener = (...args: unknown[]) => unknown;
|
||||
type ScrollTarget = HTMLElement | Window;
|
||||
|
||||
const scrollToLowerThreshold = 20;
|
||||
const attrs = useAttrs();
|
||||
const rootRef = ref<ComponentPublicInstance | null>(null);
|
||||
const forwardedAttrs = computed(() => Object.fromEntries(
|
||||
Object.entries(attrs).filter(([key]) => key !== "onScrolltolower")
|
||||
));
|
||||
let rootElement: HTMLElement | null = null;
|
||||
let scrollFrame = 0;
|
||||
let isScrollListenerBound = false;
|
||||
|
||||
function isScrollable(element: HTMLElement): boolean {
|
||||
const overflowY = window.getComputedStyle(element).overflowY;
|
||||
return /auto|scroll/i.test(overflowY) && element.clientHeight < element.scrollHeight;
|
||||
}
|
||||
|
||||
function getScrollParents(target: EventTarget | null): HTMLElement[] {
|
||||
let current = target instanceof HTMLElement
|
||||
? target
|
||||
: target instanceof Element ? target.parentElement : null;
|
||||
const parents: HTMLElement[] = [];
|
||||
while (current) {
|
||||
if (isScrollable(current)) {
|
||||
parents.push(current);
|
||||
}
|
||||
current = current.parentElement;
|
||||
}
|
||||
return parents;
|
||||
}
|
||||
|
||||
function getWindowScrollTop(): number {
|
||||
return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
|
||||
}
|
||||
|
||||
function isAtTop(target: EventTarget | null): boolean {
|
||||
if (getScrollParents(target).some(parent => 0 < parent.scrollTop)) {
|
||||
return false;
|
||||
}
|
||||
return getWindowScrollTop() < 1;
|
||||
}
|
||||
|
||||
function guardTouch(event: TouchEvent): void {
|
||||
if (isAtTop(event.target)) {
|
||||
return;
|
||||
}
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
|
||||
function getScrollTarget(event: Event): ScrollTarget {
|
||||
return getScrollParents(event.target)[0] || window;
|
||||
}
|
||||
|
||||
function isReachBottom(target: ScrollTarget): boolean {
|
||||
if (target === window) {
|
||||
const documentElement = document.documentElement;
|
||||
const scrollHeight = Math.max(documentElement.scrollHeight, document.body.scrollHeight);
|
||||
const clientHeight = window.innerHeight || documentElement.clientHeight;
|
||||
return clientHeight < scrollHeight && scrollHeight - scrollToLowerThreshold < getWindowScrollTop() + clientHeight;
|
||||
}
|
||||
|
||||
if (!(target instanceof HTMLElement)) {
|
||||
return false;
|
||||
}
|
||||
return target.clientHeight < target.scrollHeight
|
||||
&& target.scrollHeight - scrollToLowerThreshold < target.scrollTop + target.clientHeight;
|
||||
}
|
||||
|
||||
function invokeListener(listener: unknown): void {
|
||||
if (Array.isArray(listener)) {
|
||||
for (const item of listener) {
|
||||
invokeListener(item);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (typeof listener === "function") {
|
||||
(listener as EventListener)();
|
||||
}
|
||||
}
|
||||
|
||||
function handleScroll(event: Event): void {
|
||||
const target = getScrollTarget(event);
|
||||
if (scrollFrame || !isReachBottom(target)) {
|
||||
return;
|
||||
}
|
||||
|
||||
scrollFrame = requestAnimationFrame(() => {
|
||||
scrollFrame = 0;
|
||||
if (isReachBottom(target)) {
|
||||
invokeListener(attrs.onScrolltolower);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function bindScrollListeners(): void {
|
||||
if (isScrollListenerBound) {
|
||||
return;
|
||||
}
|
||||
|
||||
const element = rootRef.value?.$el;
|
||||
if (!(element instanceof HTMLElement)) {
|
||||
return;
|
||||
}
|
||||
|
||||
rootElement = element;
|
||||
rootElement.addEventListener("scroll", handleScroll, true);
|
||||
window.addEventListener("scroll", handleScroll, { passive: true });
|
||||
isScrollListenerBound = true;
|
||||
}
|
||||
|
||||
function unbindScrollListeners(): void {
|
||||
if (!isScrollListenerBound) {
|
||||
return;
|
||||
}
|
||||
|
||||
rootElement?.removeEventListener("scroll", handleScroll, true);
|
||||
window.removeEventListener("scroll", handleScroll);
|
||||
isScrollListenerBound = false;
|
||||
if (scrollFrame) {
|
||||
cancelAnimationFrame(scrollFrame);
|
||||
scrollFrame = 0;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(bindScrollListeners);
|
||||
onActivated(bindScrollListeners);
|
||||
onDeactivated(unbindScrollListeners);
|
||||
onUnmounted(unbindScrollListeners);
|
||||
</script>
|
||||
@@ -38,7 +38,7 @@
|
||||
@status-change="handleScanStatusChange"
|
||||
/>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
class="result-list"
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@@ -52,7 +52,7 @@
|
||||
:empty-text="loading ? '正在加载客户' : '未找到匹配客户'"
|
||||
@select="toggleCustomer"
|
||||
/>
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
</bottom-popup>
|
||||
</template>
|
||||
|
||||
@@ -237,8 +237,17 @@ function confirm(): void {
|
||||
|
||||
<style scoped lang="less">
|
||||
:global(.bottom-popup:has(.filter-popup)) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 86vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:global(.bottom-popup:has(.filter-popup) .body) {
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
touch-action: pan-y;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.filter-popup {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
v-can="permissionCodes.customer.read"
|
||||
class="customer-invite-rank"
|
||||
>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
class="list-wrapper"
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@@ -46,7 +46,7 @@
|
||||
</t-cell-group>
|
||||
<div v-else class="center-tips" v-text="emptyText" />
|
||||
<div v-if="rankedCustomerList.length" class="center-tips" v-text="loadStateText" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
/>
|
||||
<t-button size="extra-small" variant="text" @click="clearTagFilter">清空</t-button>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
class="fix-last-cell-line"
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@@ -113,7 +113,7 @@
|
||||
<div v-if="!pageResult.list.length" class="center-tips" v-text="isLoading ? '正在加载客户' : '暂无客户数据'" />
|
||||
<div v-if="pageResult.list.length" class="center-tips" v-text="isLoading ? '正在加载更多' : isNoMore ? '已经到底了' : '上拉加载更多'" />
|
||||
</div>
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
<tag-selector
|
||||
v-model="selectedTagIdList"
|
||||
v-model:visible="tagSelectorVisible"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
v-can="{ value: [permissionCodes.event.read, permissionCodes.user.read], mode: 'and' }"
|
||||
class="registration-event-list"
|
||||
>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="refresh"
|
||||
@@ -71,7 +71,7 @@
|
||||
</t-cell-group>
|
||||
<div v-if="!visibleEventList.length" class="empty-block" v-text="emptyText" />
|
||||
<div v-if="visibleEventList.length" class="center-tips" v-text="isNoMore ? '已经到底了' : '上拉加载更多'" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<nav-bar-action-menu v-if="canShowActionMenu" :actions="actionList" />
|
||||
<event-remove-dialog
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
/>
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="reloadRecords"
|
||||
@@ -101,7 +101,7 @@
|
||||
<div v-else class="center-tips" v-text="isLoading ? '正在加载登记事件记录' : '暂无登记事件记录'" />
|
||||
<div v-if="pageResult.list.length" class="center-tips" v-text="loadStateText" />
|
||||
</div>
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<nav-bar-action-menu v-if="canShowActionMenu" :actions="actionList" />
|
||||
<customer-selector
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
@click="endVisible = true"
|
||||
/>
|
||||
</t-cell-group>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
class="list-wrapper"
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@@ -100,7 +100,7 @@
|
||||
</t-cell-group>
|
||||
<div v-else class="center-tips" v-text="emptyStateText" />
|
||||
<div v-if="pageResult.list.length" class="center-tips" v-text="loadStateText" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<t-popup v-model="startVisible" placement="bottom">
|
||||
<t-date-time-picker
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/>
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
class="list-wrap"
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@@ -149,7 +149,7 @@
|
||||
</t-swipe-cell>
|
||||
</t-cell-group>
|
||||
<div class="center-tips" v-text="isLoading ? '正在加载提醒' : pageResult.list.length ? (isNoMore ? '已经到底了' : '上拉加载更多') : '暂无跟进提醒'" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
<customer-selector
|
||||
v-model="selectedCustomerId"
|
||||
v-model:visible="customerSelectorVisible"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
/>
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="refreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="refresh"
|
||||
@@ -93,7 +93,7 @@
|
||||
<div v-else class="center-tips" v-text="loading ? '正在加载履约单' : '暂无履约单'" />
|
||||
<div class="center-tips" v-text="loading ? '正在加载' : noMore ? '已经到底了' : '上拉加载更多'" />
|
||||
</div>
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<nav-bar-action-menu v-if="canCreate" :actions="actions" />
|
||||
<customer-selector
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-can="corePermissionCodes.notify.read" class="notify-management">
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="refresh"
|
||||
@@ -54,7 +54,7 @@
|
||||
</t-cell-group>
|
||||
<t-empty v-else-if="!isLoading" description="暂无已发送通知" />
|
||||
<div class="center-tips" v-text="loadStateText" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@change="switchFilter"
|
||||
v-entrance-transition
|
||||
/>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="refresh"
|
||||
@@ -61,7 +61,7 @@
|
||||
description="暂无站内通知"
|
||||
/>
|
||||
<div class="center-tips" v-text="loadStateText" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/>
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="reload"
|
||||
@@ -73,7 +73,7 @@
|
||||
</t-cell-group>
|
||||
<div v-else class="center-tips" v-text="loading ? '正在加载套餐配置' : '暂无套餐配置'" />
|
||||
<div class="center-tips" v-text="loadStateText" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<nav-bar-action-menu v-if="canCreate" :actions="actionList" />
|
||||
</template>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/>
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="refreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="reload"
|
||||
@@ -64,7 +64,7 @@
|
||||
</t-cell-group>
|
||||
<div v-else class="center-tips" v-text="loading ? '正在加载套餐' : '暂无套餐'" />
|
||||
<div class="center-tips" v-text="loadStateText" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-can="{ value: [corePermissionCodes.role.read, corePermissionCodes.permission.read], mode: 'and' }" class="permission-list">
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
class="list-wrapper"
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@@ -27,7 +27,7 @@
|
||||
</t-cell-group>
|
||||
<t-empty v-if="!permissionStore.loading && !isSourceLoading" description="暂无权限" />
|
||||
</div>
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-can="{ value: [corePermissionCodes.role.read, corePermissionCodes.permission.read], mode: 'and' }" class="role-list">
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
class="list-wrapper"
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@@ -30,7 +30,7 @@
|
||||
</t-swipe-cell>
|
||||
</t-cell-group>
|
||||
<t-empty v-else-if="!permissionStore.loading" description="暂无角色" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</template>
|
||||
</t-input>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="reload"
|
||||
@@ -47,7 +47,7 @@
|
||||
</t-cell-group>
|
||||
<div class="center-tips" v-text="loadStateText" />
|
||||
</div>
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
<customer-selector
|
||||
v-model="selectedCustomerId"
|
||||
v-model:visible="customerSelectorVisible"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
/>
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="reload"
|
||||
@@ -107,7 +107,7 @@
|
||||
</t-cell-group>
|
||||
<div class="center-tips" v-text="loadStateText" />
|
||||
</div>
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<customer-selector
|
||||
v-model="selectedCustomerId"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
placeholder="搜索产品名称、编码或 SKU"
|
||||
/>
|
||||
</div>
|
||||
<app-pull-down-refresh v-model="isRefreshing" :refresh-timeout="30000" @refresh="reload" @scrolltolower="load">
|
||||
<t-pull-down-refresh v-model="isRefreshing" :refresh-timeout="30000" @refresh="reload" @scrolltolower="load">
|
||||
<t-cell-group v-if="result.list.length" theme="card">
|
||||
<t-cell
|
||||
v-for="(item, index) in result.list"
|
||||
@@ -56,7 +56,7 @@
|
||||
</t-cell-group>
|
||||
<t-empty v-else :description="isLoading ? '正在加载兑换配置' : '暂无兑换配置'" />
|
||||
<div class="tips" v-text="isNoMore ? `共 ${result.total} 条配置` : '上拉加载更多'" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<nav-bar-action-menu
|
||||
v-can="permissionCodes.pointRedeemSku.manage"
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/>
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="refreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="reload"
|
||||
@@ -112,7 +112,7 @@
|
||||
:description="loading ? '正在加载兑换记录' : hasFilter ? '未找到匹配的兑换记录' : '暂无兑换记录'"
|
||||
/>
|
||||
</div>
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<customer-selector
|
||||
v-model="customerId"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/>
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
class="list-wrapper"
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@@ -56,7 +56,7 @@
|
||||
</t-cell>
|
||||
</t-cell-group>
|
||||
<div class="center-tips" v-text="loadStateText" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<nav-bar-action-menu v-if="canShowActionMenu" :actions="actionList" />
|
||||
</template>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/>
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh v-model="isRefreshing" :refresh-timeout="30000" @refresh="refresh" @scrolltolower="loadMore">
|
||||
<t-pull-down-refresh v-model="isRefreshing" :refresh-timeout="30000" @refresh="refresh" @scrolltolower="loadMore">
|
||||
<t-cell-group v-if="categoryList.length" theme="card" class="list fix-last-cell-line">
|
||||
<t-swipe-cell v-for="(item, index) in categoryList" :key="item.id" class="item" v-entrance-transition="index * 30">
|
||||
<t-cell arrow hover @click="openEditDialog(item)">
|
||||
@@ -37,7 +37,7 @@
|
||||
</t-cell-group>
|
||||
<div v-else class="center-tips" v-text="emptyText" />
|
||||
<div v-if="categoryList.length" class="center-tips" v-text="isLoading ? '正在加载更多' : isNoMore ? '已经到底了' : '上拉加载更多'" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<t-dialog
|
||||
v-model:visible="editDialogVisible"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
/>
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh v-model="isRefreshing" :refresh-timeout="30000" @refresh="refresh" @scrolltolower="loadMore">
|
||||
<t-pull-down-refresh v-model="isRefreshing" :refresh-timeout="30000" @refresh="refresh" @scrolltolower="loadMore">
|
||||
<t-cell-group
|
||||
v-if="productList.length"
|
||||
class="list fix-last-cell-line empty-cell-title-margin"
|
||||
@@ -84,7 +84,7 @@
|
||||
</t-cell-group>
|
||||
<div v-else class="center-tips" v-text="emptyText" />
|
||||
<div v-if="productList.length" class="center-tips" v-text="isLoading ? '正在加载更多' : isNoMore ? '已经到底了' : '上拉加载更多'" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<nav-bar-action-menu v-if="route.name === 'ProductList' && canCreate" :actions="actionList" />
|
||||
</template>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
class="list-wrap empty-cell-title-margin"
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@@ -64,7 +64,7 @@
|
||||
</t-cell-group>
|
||||
<div v-else class="center-tips" v-text="emptyText" />
|
||||
<div v-if="productList.length" class="center-tips" v-text="isLoading ? '正在加载更多' : isNoMore ? '已经到底了' : '上拉加载更多'" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<t-dropdown-item v-model="direction" label="出入库" :options="directionOptions" @change="selectDirection" />
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="refresh"
|
||||
@@ -84,7 +84,7 @@
|
||||
</t-cell-group>
|
||||
<div v-else class="center-tips" v-text="emptyText" />
|
||||
<div v-if="recordList.length" class="center-tips" v-text="loadStateText" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
placeholder="搜索 SKU 名称、编码或规格"
|
||||
/>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
class="list-wrap empty-cell-title-margin"
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@@ -68,7 +68,7 @@
|
||||
<div v-else class="center-tips" v-text="emptyText" />
|
||||
<div v-if="skuStockList.length" class="center-tips" v-text="isLoading ? '正在加载更多' : isNoMore ? '已经到底了' : '上拉加载更多'" />
|
||||
</div>
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
/>
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="reloadRecords"
|
||||
@@ -137,7 +137,7 @@
|
||||
<div v-else class="center-tips" v-text="isLoading ? '正在加载消费记录' : '暂无消费记录'" />
|
||||
<div v-if="recordList.length" class="center-tips" v-text="loadStateText" />
|
||||
</div>
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
<customer-selector
|
||||
v-model="customerId"
|
||||
v-model:visible="customerSelectorVisible"
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/>
|
||||
</t-dropdown-menu>
|
||||
</div>
|
||||
<app-pull-down-refresh v-model="isRefreshing" :refresh-timeout="30000" @refresh="reload" @scrolltolower="loadMore">
|
||||
<t-pull-down-refresh v-model="isRefreshing" :refresh-timeout="30000" @refresh="reload" @scrolltolower="loadMore">
|
||||
<t-cell-group v-if="recordList.length" class="empty-cell-title-margin" theme="card">
|
||||
<t-cell
|
||||
class="item"
|
||||
@@ -117,7 +117,7 @@
|
||||
</t-cell-group>
|
||||
<div v-else class="empty" v-text="loading ? '正在加载资金流水' : '暂无资金流水'" />
|
||||
<div class="center-tips" v-text="loadStateText" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<customer-selector
|
||||
v-model="customerId"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</t-button>
|
||||
</div>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
class="list-wrap"
|
||||
v-model="refreshing"
|
||||
:refresh-timeout="30000"
|
||||
@@ -82,7 +82,7 @@
|
||||
<div v-if="!list.length" class="empty" v-text="loading ? '正在加载销售订单' : '暂无销售订单'" />
|
||||
</div>
|
||||
<div class="center-tips" v-text="loading ? '正在加载' : noMore ? '已经到底了' : '上拉加载更多'" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<nav-bar-action-menu v-if="route.name === 'SalesOrderList' && actions.length" :actions="actions" />
|
||||
<customer-selector
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-can="permissionCodes.storeDiary.read"
|
||||
class="store-diary-list"
|
||||
v-model="isRefreshing"
|
||||
@@ -52,7 +52,7 @@
|
||||
</t-cell-group>
|
||||
<div class="center-tips" v-text="loadStateText" />
|
||||
</div>
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
<nav-bar-action-menu v-if="canShowActionMenu" :actions="actionList" />
|
||||
<bottom-popup
|
||||
v-model="diaryPopupVisible"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-can="permissionCodes.store.read" class="store-list">
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
class="list-wrapper"
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@@ -46,7 +46,7 @@
|
||||
</t-cell-group>
|
||||
<div v-if="!pageResult.list.length" class="center-tips" v-text="isLoading ? '正在加载门店' : '暂无门店'" />
|
||||
<div v-if="pageResult.list.length" class="center-tips" v-text="isNoMore ? '已加载全部门店' : '上拉加载更多'" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<store-remove-dialog
|
||||
v-model:visible="removeDialogVisible"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
placeholder="搜索标签"
|
||||
/>
|
||||
</div>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="refresh"
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<div v-if="!tagList.length" class="empty" v-text="emptyText" />
|
||||
<div v-if="tagList.length" class="center-tips" v-text="isLoading ? '正在加载更多' : isNoMore ? '已经到底了' : '上拉加载更多'" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<t-dialog
|
||||
v-model:visible="editDialogVisible"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
v-can="permissionCodes.user.read"
|
||||
class="user-list"
|
||||
>
|
||||
<app-pull-down-refresh
|
||||
<t-pull-down-refresh
|
||||
v-model="isRefreshing"
|
||||
:refresh-timeout="30000"
|
||||
@refresh="refresh"
|
||||
@@ -44,7 +44,7 @@
|
||||
</t-cell-group>
|
||||
<div v-if="!pageResult.list.length" class="center-tips" v-text="isLoading ? '正在加载用户' : '暂无用户'" />
|
||||
<div v-if="pageResult.list.length" class="center-tips" v-text="isNoMore ? '已经到底了' : '上拉加载更多'" />
|
||||
</app-pull-down-refresh>
|
||||
</t-pull-down-refresh>
|
||||
</div>
|
||||
<nav-bar-action-menu
|
||||
v-if="canCreateUser"
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ export default defineConfig(({ mode }) => {
|
||||
server: {
|
||||
port: 84,
|
||||
allowedHosts: [
|
||||
"gao.imyeyu.dev"
|
||||
"gao.imyeyu.com"
|
||||
],
|
||||
fs: {
|
||||
allow: [
|
||||
|
||||
Reference in New Issue
Block a user