feat: 集成unplugin-auto-import自动引入
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { watch } from 'vue'
|
||||
import { useCssVar } from '@vueuse/core'
|
||||
import MessageContent from './MessageContent.vue'
|
||||
import DialogContent from './DialogContent.vue'
|
||||
|
@@ -24,7 +24,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { debounce } from '@/utils'
|
||||
import { isNullOrUndef } from '@/utils/is'
|
||||
|
||||
|
@@ -9,8 +9,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
|
||||
const appStore = useAppStore()
|
||||
|
@@ -7,7 +7,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
|
@@ -12,8 +12,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
import { computed } from 'vue'
|
||||
import { usePermissionStore } from '@/store/modules/permission'
|
||||
|
||||
import { isExternal } from '@/utils/is'
|
||||
|
@@ -11,7 +11,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import { useTagsStore } from '@/store/modules/tags'
|
||||
import { renderIcon } from '@/utils/icon'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
|
@@ -23,8 +23,6 @@
|
||||
|
||||
<script setup name="Tags">
|
||||
import ContextMenu from './ContextMenu.vue'
|
||||
import { nextTick, reactive, ref, watch } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useTagsStore } from '@/store/modules/tags'
|
||||
import { useThemeStore } from '@/store/modules/theme'
|
||||
import ScrollX from '@/components/Common/ScrollX.vue'
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { nextTick } from 'vue'
|
||||
|
||||
export const useAppStore = defineStore('app', {
|
||||
state() {
|
||||
|
@@ -12,7 +12,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
const { replace } = useRouter()
|
||||
</script>
|
||||
|
||||
|
@@ -9,9 +9,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
import MdEditor from 'md-editor-v3'
|
||||
import 'md-editor-v3/lib/style.css'
|
||||
|
||||
|
@@ -17,8 +17,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onBeforeMount } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { usePostTable } from './usePostTable'
|
||||
|
||||
const router = useRouter()
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { h, ref } from 'vue'
|
||||
import { h } from 'vue'
|
||||
import { NButton, NSwitch } from 'naive-ui'
|
||||
import { getPosts } from '@/api/post'
|
||||
import { formatDateTime } from '@/utils'
|
||||
|
@@ -40,9 +40,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, unref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
import { login } from '@/api/auth'
|
||||
import { createLocalStorage } from '@/utils/cache'
|
||||
import { setToken } from '@/utils/token'
|
||||
|
@@ -1,8 +1,6 @@
|
||||
<template></template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const { currentRoute, replace } = useRouter()
|
||||
|
||||
const { query } = currentRoute.value
|
||||
|
@@ -6,8 +6,6 @@
|
||||
|
||||
<!--使用keep-alive须设置name,注意请与对应的路由的name保持一致,方便统一处理-->
|
||||
<script setup name="TestKeepAlive">
|
||||
import { onMounted, onActivated, onDeactivated } from 'vue'
|
||||
|
||||
onMounted(() => {
|
||||
$message.success('触发onMounted')
|
||||
})
|
||||
|
Reference in New Issue
Block a user