update
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
setTimeout(() => {
|
||||
setSpin(false);
|
||||
}, 1000);
|
||||
getList();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
@@ -54,7 +55,7 @@
|
||||
async function getList() {
|
||||
setSpin(true);
|
||||
try {
|
||||
const { code, result } = (await getDetail({ dataType: props.setting.dataType })) || {};
|
||||
const { code, result } = (await getDetail({ dataType: props.setting.dataType, condition: selectIndex.value })) || {};
|
||||
setSpin(!spinning.value);
|
||||
if (code != 200) {
|
||||
return;
|
||||
|
||||
@@ -51,20 +51,8 @@
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
document.addEventListener('visibilitychange', checkTabState);
|
||||
init();
|
||||
});
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener('visibilitychange', checkTabState);
|
||||
});
|
||||
const tabState = ref('');
|
||||
|
||||
function checkTabState() {
|
||||
console.log('checkTabState', document.hidden);
|
||||
tabState.value = document.hidden ? 'inactive' : 'active';
|
||||
if (!document.hidden) {
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
getDepartOption();
|
||||
|
||||
Reference in New Issue
Block a user