dev #24

Merged
jiangx merged 2 commits from dev into test 2 years ago
  1. 2
      CHANGELOG.md
  2. 2
      package-lock.json
  3. 2
      package.json
  4. 6
      src/App.vue
  5. 6
      src/components/ScrollList/ScrollList.vue
  6. 2
      src/components/ScrollListItem/ScrollListItem.vue

2
CHANGELOG.md

@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [1.0.0-B.24](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.23...v1.0.0-B.24) (2024-03-28)
## [1.0.0-B.23](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.22...v1.0.0-B.23) (2024-03-28)
## [1.0.0-B.22](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.21...v1.0.0-B.22) (2024-03-28)

2
package-lock.json

@ -1,6 +1,6 @@
{
"name": "vue_cli_ts",
"version": "1.0.0-B.23",
"version": "1.0.0-B.24",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

2
package.json

@ -1,6 +1,6 @@
{
"name": "vue_cli_ts",
"version": "1.0.0-B.23",
"version": "1.0.0-B.24",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",

6
src/App.vue

@ -1,7 +1,7 @@
<template>
<WeatherAndTime :mall-code="mallCode" />
<ScrollList ref="scrollList" :customer-list="customerList" :mall-code="mallCode" />
<img src="./assets/images/back_index_icon.svg" class="fixed bottom-3 left-3 w-28 h-12 z-100" alt="" @click="back" />
<img src="./assets/images/back_index_icon.svg" class="fixed bottom-11 left-[52px] w-28 h-12 z-100" alt="" @click="back" />
</template>
<script setup lang="ts">
import { onMounted, onBeforeUnmount, ref, toRefs, shallowRef } from 'vue'
@ -39,7 +39,7 @@ onMounted(() => {
_getCustomerList()
timer = setInterval(() => {
_getCustomerList()
scrollList.value.swiper?.value?.scrollTo(0, 1000, false)
scrollList.value.scroll()
}, 1000 * 60)
})
onBeforeUnmount(() => {
@ -47,7 +47,7 @@ onBeforeUnmount(() => {
})
function back() {
scrollList.value.swiper?.value?.scrollTo(0, 1000, false)
scrollList.value.scroll()
}
</script>

6
src/components/ScrollList/ScrollList.vue

@ -56,8 +56,12 @@ function swiperInit(_swiper: any) {
swiper.value = _swiper
}
function scroll() {
swiper.value?.slideTo(0)
}
defineExpose({
swiper
scroll
})
</script>

2
src/components/ScrollListItem/ScrollListItem.vue

@ -15,7 +15,7 @@
{{ formatDate(customer.addTime) }}
</div>
<ScrollView class="relative h-[355px]" scrollbar :list="customer.suggestionContent">
<div class="text-[#C70082] text-24 font-normal leading-normal whitespace-normal pr-[14px]">
<div class="text-[#C70082] text-24 font-normal leading-normal whitespace-normal pr-[14px] pb-10">
<div v-html="customer.suggestionContent"></div>
</div>
</ScrollView>

Loading…
Cancel
Save