Skip to content

Commit f19bee0

Browse files
author
unliar
committed
feat: global import vue
1 parent 0d88a25 commit f19bee0

File tree

22 files changed

+93
-56
lines changed

22 files changed

+93
-56
lines changed

package-lock.json

Lines changed: 89 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"js-cookie": "^2.2.1",
2727
"markdown-it": "^12.0.4",
2828
"nprogress": "^0.2.0",
29-
"vue": "^3.0.5",
29+
"vue": "^3.1.4",
30+
"vue-global-api": "^0.2.1",
3031
"vue-router": "^4.0.3",
3132
"vue-toastification": "^2.0.0-rc.1",
3233
"vuex": "^4.0.0"

src/App.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
<script lang="ts" setup>
66
import { useHead } from "@vueuse/head";
7-
import { onMounted, computed } from "vue";
87
import { POSITION, useToast } from "vue-toastification";
98
import { useStore } from "vuex";
109
import { useRoute } from "vue-router";

src/components/article/Comment.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts" setup>
2-
import { onMounted, reactive, defineProps, computed } from "vue";
32
import { useRouter } from "vue-router";
43
import { useToast } from "vue-toastification";
54
import { useStore } from "vuex";

src/components/article/SimpleInfoItem.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts" setup>
2-
import { defineProps } from "vue";
32
import { FromNow } from "~/utils/time";
43
54
const props = defineProps({

src/components/common/FontIcon.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script lang="ts" setup>
2-
import { defineProps, computed } from "vue";
3-
42
const props = defineProps({
53
iconClass: String,
64
});

src/components/common/Footer.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@
5252
</template>
5353

5454
<script lang="ts" setup>
55-
import { onMounted, onUnmounted, reactive, ref } from "vue";
56-
5755
// ref: Year = "2021";
5856
const Year = ref("2021");
5957
const TimeShow = reactive({

src/components/common/LoadingBall/index.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script lang="ts" setup>
2-
import { defineProps, reactive, computed } from "vue";
3-
42
const props = defineProps({
53
info: String,
64
color: String,

src/components/common/Message/index.vue

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@
1919
</transition>
2020
</template>
2121
<script lang="ts" setup>
22-
import {
23-
ref,
24-
onMounted,
25-
onBeforeUnmount,
26-
defineProps,
27-
computed,
28-
defineEmit,
29-
} from "vue";
3022
// 是否可见
3123
const visible = ref(false);
3224

src/components/layouts/Content/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { defineComponent, computed } from "vue";
21
import { useStore } from "vuex";
32

43
import { StoreType } from "~/store";

src/components/layouts/Content/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
</template>
2424

2525
<script lang="ts" setup>
26-
import { computed } from "vue";
2726
import { useStore } from "vuex";
2827
2928
import type { StoreType } from "~/store";

src/components/layouts/Default/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { defineComponent } from "vue";
21
import { DEFAULT_LAYOUT_NAME } from "~/constants";
32
import Footer from "~/components/common/Footer.vue";
43
import Header from "~/components/common/Header.vue";

src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createApp } from "vue";
22
import { createHead } from "@vueuse/head";
3+
import "vue-global-api";
34
import Toast, { PluginOptions, POSITION } from "vue-toastification";
45
import "vue-toastification/dist/index.css";
56
import "@geist-ui/themes";

src/utils/pageView.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { onBeforeMount } from "vue";
2-
31
/**
42
* 插入百度统计脚本
53
* @param id

src/utils/useFetch.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { AxiosRequestConfig } from "axios";
2-
import { reactive, watchEffect, toRefs } from "vue";
32
import Axios from "./fetch";
43

54
// 花里胡哨请求数据

src/views/404/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script lang="ts" setup>
22
import { useHead } from "@vueuse/head";
3-
import { onMounted, onUnmounted, ref } from "vue";
43
import { useRouter } from "vue-router";
54
const router = useRouter();
65

src/views/daily-articles/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
</template>
2323

2424
<script lang="ts" setup>
25-
import { defineProps, computed, watch } from "vue";
2625
import { useHead } from "@vueuse/head";
2726
2827
import { UseGetMeiRiYiWen } from "~/api/article";

src/views/home/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { defineComponent, watch, onMounted, reactive } from "vue";
21
import { useHead } from "@vueuse/head";
32

43
import { GetArticles } from "~/api/article";

src/views/home/index.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<script lang="ts" setup="">
2-
import { defineProps, onMounted, reactive } from "vue";
1+
<script lang="ts" setup>
32
import { useHead } from "@vueuse/head";
43
import { GetArticles } from "~/api/article";
54
import ContentLayout from "~/components/layouts/Content/index.vue";

src/views/post/pid.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
</DefaultLayout>
5252
</template>
5353
<script lang="ts" setup>
54-
import { computed, defineProps, watch } from "vue";
5554
import { useToast } from "vue-toastification";
5655
import { useHead } from "@vueuse/head";
5756

src/views/signin/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
</template>
7474

7575
<script lang="ts" setup>
76-
import { computed, ref, watch } from "vue";
7776
import { useRouter } from "vue-router";
7877
import { useToast } from "vue-toastification";
7978
import { useStore } from "vuex";

src/views/users/uid.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
</DefaultLayout>
5757
</template>
5858
<script lang="ts" setup>
59-
import { defineProps, reactive, onMounted, computed, watch } from "vue";
6059
import { useHead } from "@vueuse/head";
6160
import { useStore } from "vuex";
6261
import { useToast } from "vue-toastification";

0 commit comments

Comments
 (0)