Compare commits

...

2 Commits

Author SHA1 Message Date
姜鑫 083ce97df8 chore(release): 1.0.0-B.24 2 years ago
姜鑫 0e1398b5ff refactor: ♻️ 修改 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. 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.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) ## [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", "name": "vue_cli_ts",
"version": "1.0.0-B.23",
"version": "1.0.0-B.24",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

2
package.json

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

6
src/App.vue

@ -1,7 +1,7 @@
<template> <template>
<WeatherAndTime :mall-code="mallCode" /> <WeatherAndTime :mall-code="mallCode" />
<ScrollList ref="scrollList" :customer-list="customerList" :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> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, onBeforeUnmount, ref, toRefs, shallowRef } from 'vue' import { onMounted, onBeforeUnmount, ref, toRefs, shallowRef } from 'vue'
@ -39,7 +39,7 @@ onMounted(() => {
_getCustomerList() _getCustomerList()
timer = setInterval(() => { timer = setInterval(() => {
_getCustomerList() _getCustomerList()
scrollList.value.swiper?.value?.scrollTo(0, 1000, false)
scrollList.value.scroll()
}, 1000 * 60) }, 1000 * 60)
}) })
onBeforeUnmount(() => { onBeforeUnmount(() => {
@ -47,7 +47,7 @@ onBeforeUnmount(() => {
}) })
function back() { function back() {
scrollList.value.swiper?.value?.scrollTo(0, 1000, false)
scrollList.value.scroll()
} }
</script> </script>

6
src/components/ScrollList/ScrollList.vue

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

2
src/components/ScrollListItem/ScrollListItem.vue

@ -15,7 +15,7 @@
{{ formatDate(customer.addTime) }} {{ formatDate(customer.addTime) }}
</div> </div>
<ScrollView class="relative h-[355px]" scrollbar :list="customer.suggestionContent"> <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 v-html="customer.suggestionContent"></div>
</div> </div>
</ScrollView> </ScrollView>

Loading…
Cancel
Save