|
@@ -1,17 +1,28 @@
|
|
<template>
|
|
<template>
|
|
<full-page ref="fullpage" :options="options" @after-load="afterLoad">
|
|
<full-page ref="fullpage" :options="options" @after-load="afterLoad">
|
|
- <View />
|
|
|
|
|
|
+ <View :fullpage="fullpage" />
|
|
</full-page>
|
|
</full-page>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import FullPage from "./components/fullpage/fullpage.vue";
|
|
import FullPage from "./components/fullpage/fullpage.vue";
|
|
import View from "./view/index.vue";
|
|
import View from "./view/index.vue";
|
|
-import { ref } from "vue";
|
|
|
|
|
|
+import { onMounted, ref, watchEffect, getCurrentInstance } from "vue";
|
|
|
|
+
|
|
|
|
+const instance = getCurrentInstance();
|
|
|
|
+const fullpage = ref();
|
|
|
|
+onMounted(() => {
|
|
|
|
+ watchEffect(() => {
|
|
|
|
+ if (instance.proxy.$refs.fullpage) {
|
|
|
|
+ fullpage.value = instance.proxy.$refs.fullpage;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+});
|
|
|
|
+
|
|
const options = ref({
|
|
const options = ref({
|
|
licenseKey: "",
|
|
licenseKey: "",
|
|
menu: ".nav",
|
|
menu: ".nav",
|
|
- // anchors: ["page1", "page2", "page3"],
|
|
|
|
|
|
+ // anchors: ["section1", "page2", "page3"],
|
|
controlArrows: true,
|
|
controlArrows: true,
|
|
scrollOverflow: false,
|
|
scrollOverflow: false,
|
|
// scrollBar: true,
|
|
// scrollBar: true,
|