快乐的梦鱼 дней назад: 3
Родитель
Сommit
d6e8d1ceea

+ 1 - 1
src/components/nav/Tabs.vue

@@ -235,7 +235,7 @@ const props = withDefaults(defineProps<TabsProps>(), {
 
 const theme = useTheme();
 
-const tabPaddingHorizontal = computed(() => theme.getVar('TabsItemPaddingHorizontal', 10));
+const tabPaddingHorizontal = computed(() => theme.getVar('TabsItemPaddingHorizontal', 0));
 const themedUnderlayColor = computed(() => theme.resolveThemeColor(props.underlayColor));
 const themedActiveTextColor = computed(() => theme.resolveThemeColor(props.activeTextColor));
 const themedTextColor = computed(() => theme.resolveThemeColor(props.textColor));

+ 1 - 1
src/pages/article/common/DetailTabPage.vue

@@ -34,7 +34,7 @@
               v-model:currentIndex="tabCurrentIndex"
               :autoScroll="true"
               :autoItemWidth="false"
-              :defaultIndicatorWidth="130"
+              :defaultIndicatorWidth="100"
               :width="710"
               class="top-tab"
             />

+ 3 - 3
src/pages/article/data/CommonCategoryDetail.vue

@@ -262,7 +262,7 @@ async function loadPageConfig() {
     title: currentCommonCategoryDefine.value?.title || '',
   })
 
-  await waitTimeOut(100);
+  await waitTimeOut(50);
   
   try {
     //特殊处理
@@ -274,9 +274,9 @@ async function loadPageConfig() {
       }
     }
     if (hasNestCategory)
-      await waitTimeOut(100);
+      await waitTimeOut(50);
     loadState.value = true;
-    await waitTimeOut(100);
+    await waitTimeOut(50);
     pageRef.value?.load(props.pageQuerys);
   } catch (error) {
     console.error(error);

+ 0 - 2
src/pages/article/data/CommonCategoryList.vue

@@ -74,8 +74,6 @@ async function loadPageConfig() {
   uni.setNavigationBarTitle({
     title: currentCommonCategoryDefine.value?.title || '',
   })
-
-  await waitTimeOut(600);
 }
 
 watch(() => props.pageConfigName, loadPageConfig);

+ 10 - 3
src/pages/article/data/CommonCategoryListBlock.vue

@@ -1,6 +1,6 @@
 <template>
   <CommonListPage
-    v-if="currentCommonCategoryDefine"
+    v-if="currentCommonCategoryDefine && !loading"
     :startTabIndex="pageStartTab"
     :hasPadding="hasPadding"
     :hasBg="hasBg"
@@ -60,8 +60,11 @@ const emit = defineEmits<{
   (e: 'error', error: any): void;
 }>();
 
+const loading = ref(false);
+
 async function loadPageConfig() {
-  await waitTimeOut(100);
+  loading.value = true;
+  await waitTimeOut(50);
   try {
     //特殊处理
     let hasNestCategory = false;
@@ -76,7 +79,7 @@ async function loadPageConfig() {
     }
 
     if (hasNestCategory)
-      await waitTimeOut(100);
+      await waitTimeOut(50);
 
     //加载下拉列表
     const result = [] as DropDownNames[];
@@ -108,10 +111,14 @@ async function loadPageConfig() {
     dropdownNames.value = result;
   } catch (error) {
     emit('error', error);
+  } finally {
+    loading.value = false;
   }
 }
 
 watch(() => props.currentCommonCategoryDefine, loadPageConfig, { immediate: true });
+watch(() => props.currentCommonCategoryDefine?.content, loadPageConfig);
+watch(() => props.currentCommonCategoryContentDefine, loadPageConfig);
 onMounted(loadPageConfig);
 
 type RenderTabDefine = IHomeCommonCategoryListTabDefine & {

+ 2 - 1
src/pages/article/data/DefaultCategory.json

@@ -1544,7 +1544,8 @@
             },
             {
               "text": "地理位置",
-              "type": "map"
+              "type": "map",
+              "key": "200"
             }
           ]
         }

+ 3 - 3
src/pages/blocks/MapBlock.vue

@@ -57,7 +57,7 @@ const mapLoader = useSimpleDataLoader(async () => {
     props.mapConfigItems[mapTab.value].data,
     1, 6, '', [], []
   ))?.list || [];
-  const res = list.map((p) => {
+  const res = list.map((p: any) => {
     return {
       title: p.title || p.name,
       id: p.id,
@@ -68,9 +68,9 @@ const mapLoader = useSimpleDataLoader(async () => {
       height: 40,
     };
   });
-  await waitTimeOut(200);
+  await waitTimeOut(100);
   mapCtx.includePoints({
-    points: res.map(p => {
+    points: res.map((p: any) => {
       if (!p.longitude || !p.latitude) {
         p.longitude = AppCofig.defaultLonLat[0];
         p.latitude = AppCofig.defaultLonLat[1];

+ 1 - 1
src/pages/inhert/village/list.vue

@@ -58,7 +58,7 @@ const tabs = ref<{id: number, text: string}[]>();
 
 onMounted(async () => {
   //tabs.value = res.slice(1).map((p) => ({ id: p.id, text: p.title }));
-  await waitTimeOut(400);
+  await waitTimeOut(200);
   list.value.load();
 })
 </script>