Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
meihua-island-book
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-12-15 13:35:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ca0a9ed8ba13fbb4e869781993ff5deea8080eb1
ca0a9ed8
1 parent
e4736065
fix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
components.d.ts
src/pages/book/index.vue
components.d.ts
View file @
ca0a9ed
...
...
@@ -16,6 +16,10 @@ declare module '@vue/runtime-core' {
NutCol
:
typeof
import
(
'@nutui/nutui-taro'
)[
'Col'
]
NutConfigProvider
:
typeof
import
(
'@nutui/nutui-taro'
)[
'ConfigProvider'
]
NutRow
:
typeof
import
(
'@nutui/nutui-taro'
)[
'Row'
]
NutTabbar
:
typeof
import
(
'@nutui/nutui-taro'
)[
'Tabbar'
]
NutTabbarItem
:
typeof
import
(
'@nutui/nutui-taro'
)[
'TabbarItem'
]
NutTabPane
:
typeof
import
(
'@nutui/nutui-taro'
)[
'TabPane'
]
NutTabs
:
typeof
import
(
'@nutui/nutui-taro'
)[
'Tabs'
]
Picker
:
typeof
import
(
'./src/components/time-picker-data/picker.vue'
)[
'default'
]
PosterBuilder
:
typeof
import
(
'./src/components/PosterBuilder/index.vue'
)[
'default'
]
RoomCard
:
typeof
import
(
'./src/components/roomCard.vue'
)[
'default'
]
...
...
src/pages/book/index.vue
View file @
ca0a9ed
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-15 13:
07:36
* @LastEditTime: 2023-12-15 13:
32:01
* @FilePath: /meihuaApp/src/pages/book/index.vue
* @Description: 文件描述
-->
<template>
<view class="book-page">
<view id="book-content" class="book-content">
<view
v-if="showContent"
id="book-content" class="book-content">
<view id="book-cal" class="book-cal">
<calendar-select @on-dates-change="onDatesChange"></calendar-select>
</view>
...
...
@@ -16,9 +16,9 @@
<nut-tab-pane v-for="item in list" :title="'Tab ' + item" :pane-key="item">
<view class="book-list">
<scroll-view :style="scrollStyle" :scroll-y="true" :scroll-with-animation="true" @scrolltolower="onScrollToLower">
<view v-for="(item, index) in
2
0" :key="index">
<view v-for="(item, index) in
1
0" :key="index">
<room-card :key="index"></room-card>
<view v-if="index ===
1
9" style="height: 2rem;"></view>
<view v-if="index === 9" style="height: 2rem;"></view>
</view>
</scroll-view>
</view>
...
...
@@ -33,8 +33,8 @@
<script setup>
import Taro from '@tarojs/taro'
import { ref } from "vue";
import calendarSelect from '@/components/calendarSelect.vue'
import navBar from '@/components/navBar.vue'
import calendarSelect from '@/components/calendarSelect.vue'
import roomCard from '@/components/roomCard.vue'
const onDatesChange = ({ startDate, endDate }) => {
...
...
@@ -42,7 +42,7 @@ const onDatesChange = ({ startDate, endDate }) => {
}
const value = ref('0');
const list = new Array(
10
).fill(0).map((_, index) => index);
const list = new Array(
5
).fill(0).map((_, index) => index);
</script>
<script>
...
...
@@ -62,6 +62,10 @@ export default {
mounted () {
// 设置首页封面高度
const windowHeight = wx.getSystemInfoSync().windowHeight;
// 处理切换显示白屏问题
setTimeout(() => {
this.showContent = true;
}, 100);
setTimeout(async () => {
const navHeight = await $('#navbar-page').height();
const calHeight = await $('#book-cal').height();
...
...
@@ -70,6 +74,7 @@ export default {
},
data() {
return {
showContent: false,
indexCoverHeight: 0,
};
},
...
...
Please
register
or
login
to post a comment