Commit f313756d authored by youjie's avatar youjie

no message

parent d26392dc
......@@ -37,7 +37,9 @@
narrow-indicator>
<q-tab v-for="(x, i) in navs"
:key="i"
@click="goScrollHandler(x.top + 20)" :name="x.display" :label="x.display"></q-tab>
@click="goScrollHandler(x.top + 20)"
:name="x.display"
:label="x.display"></q-tab>
</q-tabs>
</div>
<div v-if="dataList" style="margin-left: auto; margin-right: auto"
......@@ -460,6 +462,23 @@ export default defineComponent({
watch(()=>data.days,(n, o) => {
data.days = n
},{immediate: true,deep: true})
watch(()=>data.currentHeight,(n, o) => {
data.navs.forEach((x, i) => {
if (
x.top &&
data.currentHeight >= x.top &&
(i == data.navs.length - 1 ||
data.currentHeight < data.navs[i + 1].top)
) {
if (data.tab != x.display) {
data.tab = x.display;
return;
} else {
return;
}
}
});
},{immediate: true,deep: false})
const methods = {
changeShowOrderPreviewHandler() {
data.showOrderPreview = !data.showOrderPreview;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment