Merge branch 'dev' into 'master'

uniapp【修复】:修复首页下拉刷新,首页更新没有更新变化

See merge request jianweie/coreshoppro!92
This commit is contained in:
bob bob
2024-11-20 14:01:44 +00:00
3 changed files with 8 additions and 9 deletions

View File

@@ -46,7 +46,7 @@
</view>
</template>
<script setup lang="ts">
import { reactive, onMounted } from 'vue';
import { reactive, watch } from 'vue';
import Point from '../home-goods/point.vue';
import { handleRouteNavigateTo, splitArrayByStep } from '@/core/utils';
@@ -64,8 +64,8 @@
column: 1,
})
onMounted(() => {
hanlderChangeTab(props.data.list[0]);
watch(() => props.data.list[0], () => {
hanlderChangeTab(props.data.list?.[0]);
})
// 组合商品数据传入组件

View File

@@ -76,7 +76,7 @@
</view>
</template>
<script setup lang="ts">
import { reactive, onMounted } from 'vue';
import { reactive, watchEffect } from 'vue';
import Point from './point.vue';
import { handleRouteNavigateTo, toDimensionArray, splitArrayByStep } from '@/core/utils';
@@ -91,8 +91,7 @@
}>({
goodsList: [],
})
onMounted(() => {
watchEffect(() => {
if (props.data.display == 'slide') { // 横向滚动数据处理
goodsState.goodsList = toDimensionArray(props.data.list.slice(0, props.data.limit), props.data.column);
} else { // 列表瀑布流数据处理

View File

@@ -4,7 +4,7 @@
</view>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { ref,ks watch } from 'vue';
const props = withDefaults(defineProps<{
data : any,
@@ -14,11 +14,11 @@
let autoplay = ref(false);
onMounted(() => {
watch(() => props.data.autoplay, (autoplay) => {
if (props.data.autoplay == true || props.data.autoplay == 'true') {
autoplay.value = true;
}
})
}, { immediate: true });
</script>
<style lang="scss" scoped>
.video-box {