forked from UzTech/Vue3-typescript-demo
组件调整
This commit is contained in:
@@ -11,8 +11,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Footer from '@/components/Footer.vue'
|
||||
import Header from '@/components/Header.vue'
|
||||
import { Footer, Header } from '@/components'
|
||||
import { ref, watch } from 'vue'
|
||||
import { RouteLocationNormalizedLoaded, useRoute } from 'vue-router'
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { defineProps } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
path: {
|
||||
type: Array
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
import Nav from './Nav.vue'
|
||||
import { Nav } from '@/components'
|
||||
|
||||
const router = useRouter()
|
||||
</script>
|
||||
|
||||
13
src/components/index.ts
Normal file
13
src/components/index.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import Banner from './Banner.vue'
|
||||
import Breadcrumb from './Breadcrumb.vue'
|
||||
import Footer from './Footer.vue'
|
||||
import Header from './Header.vue'
|
||||
import Nav from './Nav.vue'
|
||||
|
||||
export default {
|
||||
Banner,
|
||||
Breadcrumb,
|
||||
Footer,
|
||||
Header,
|
||||
Nav
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Breadcrumb from '@/components/Breadcrumb.vue'
|
||||
import { Breadcrumb } from '@/components'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { block } from '@/api'
|
||||
import Breadcrumb from '@/components/Breadcrumb.vue'
|
||||
import { Breadcrumb } from '@/components'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const route= useRoute()
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { block } from '@/api'
|
||||
import Breadcrumb from '@/components/Breadcrumb.vue'
|
||||
import { Breadcrumb } from '@/components'
|
||||
import { useStore } from '@/store'
|
||||
import { filterHash } from '@/utils/filters'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { block } from '@/api'
|
||||
import Breadcrumb from '@/components/Breadcrumb.vue'
|
||||
import { Breadcrumb } from '@/components'
|
||||
import { useStore } from '@/store'
|
||||
import { computed, onBeforeUnmount, ref } from 'vue'
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { block } from '@/api'
|
||||
import { ref } from 'vue'
|
||||
import Breadcrumb from '@/components/Breadcrumb.vue'
|
||||
import { Breadcrumb } from '@/components'
|
||||
|
||||
const data = ref<string>('')
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { block } from '@/api'
|
||||
import Breadcrumb from '@/components/Breadcrumb.vue'
|
||||
import { Breadcrumb } from '@/components'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const data = ref<string>('')
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { block } from '@/api'
|
||||
import Breadcrumb from '@/components/Breadcrumb.vue'
|
||||
import { Breadcrumb } from '@/components'
|
||||
import { ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Breadcrumb from '@/components/Breadcrumb.vue'
|
||||
import { Breadcrumb } from '@/components'
|
||||
|
||||
import { ref } from 'vue'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user