Skip to content

Commit 42499ad

Browse files
committed
commit
1 parent 85c8386 commit 42499ad

File tree

16 files changed

+1913
-103
lines changed

16 files changed

+1913
-103
lines changed

components.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,16 @@ declare module '@vue/runtime-core' {
1313
AlbumLeft: typeof import('./src/components/AlbumLeft.vue')['default']
1414
CardMD: typeof import('./src/components/CardMD.vue')['default']
1515
CateMenu: typeof import('./src/components/CateMenu.vue')['default']
16+
ElButton: typeof import('element-plus/es')['ElButton']
17+
ElCascader: typeof import('element-plus/es')['ElCascader']
18+
ElCheckTag: typeof import('element-plus/es')['ElCheckTag']
1619
ElCol: typeof import('element-plus/es')['ElCol']
1720
ElDialog: typeof import('element-plus/es')['ElDialog']
21+
ElInput: typeof import('element-plus/es')['ElInput']
1822
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
23+
ElOption: typeof import('element-plus/es')['ElOption']
1924
ElRow: typeof import('element-plus/es')['ElRow']
25+
ElSelect: typeof import('element-plus/es')['ElSelect']
2026
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
2127
ElTabPane: typeof import('element-plus/es')['ElTabPane']
2228
ElTabs: typeof import('element-plus/es')['ElTabs']

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"lint": "vue-cli-service lint"
99
},
1010
"dependencies": {
11+
"@kangc/v-md-editor": "^2.3.15",
12+
"animate.css": "^4.1.1",
1113
"axios": "^1.1.3",
1214
"core-js": "^3.8.3",
1315
"dayjs": "^1.11.7",

public/img/bg10.png

-2.35 MB
Binary file not shown.

src/App.vue

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,48 @@
11
<template>
22
<div>
33
<layout-body-vue>
4-
<router-view />
5-
<!-- :key="routerKey" -->
4+
<router-view v-slot="{ Component }">
5+
<transition
6+
name="slide-fade"
7+
appear
8+
>
9+
<keep-alive>
10+
<component :is="Component"></component>
11+
</keep-alive>
12+
</transition>
13+
</router-view>
614
</layout-body-vue>
715
</div>
816
</template>
917
<script lang="ts" setup>
1018
import layoutBodyVue from './views/layout/layout-body.vue'
11-
// import { useRoute } from 'vue-router'
12-
import { onMounted } from 'vue'
19+
import { onMounted, ref } from 'vue'
1320
import store from '@/store'
1421
const isMobile = () => {
1522
let flag = navigator.userAgent.match(/(phone|pod|iPhone|iPod|ios|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
1623
return flag
1724
}
25+
let a = ref(true)
1826
onMounted(() => {
1927
store.commit('isMobile', isMobile())
2028
})
21-
// const route = useRoute()
22-
// const routerKey = computed(() => {
23-
// //TODO query参数改变时刷新页面
24-
// return route.path + Math.random()
25-
// })
2629
</script>
2730
<style lang="scss">
2831
#app {
2932
font-family: 'HarmonyOS' !important;
3033
font-weight: 500 !important;
3134
}
35+
.slide-fade-enter-active {
36+
transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1);
37+
}
38+
39+
.slide-fade-leave-active {
40+
transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1);
41+
}
42+
43+
.slide-fade-enter-from,
44+
.slide-fade-leave-to {
45+
transform: translateY(30px);
46+
opacity: 0;
47+
}
3248
</style>

src/components/PlainCard.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@
2222
><span>{{ card1?.tag }}</span>
2323
</div>
2424
</div>
25-
<a href="mailto:Hibi<[email protected]>"> <i class="fa fa-envelope"></i></a>
25+
<a
26+
27+
href="mailto:Hibi<[email protected]>"
28+
>
29+
<i class="fa fa-envelope"></i
30+
></a>
2631
</div>
2732
</div>
2833
<div class="fourth">
@@ -118,6 +123,7 @@ const toArticleDetail = (id) => {
118123
font-size: 20px;
119124
margin-bottom: 20px;
120125
}
126+
.pfp:hover,
121127
i:hover {
122128
cursor: pointer;
123129
animation: aa 0.5s;

src/components/word.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,20 @@ import { EChartsType } from 'echarts'
1515
import 'echarts-wordcloud'
1616
import { onMounted, ref } from 'vue'
1717
18-
// const colorArr = ['coral', 'darkcyan', 'chocolate', 'brown', 'deeppink', 'limegreen', 'orange']
19-
// const fontSize = ['14px', '18px', '22px', '26px']
20-
// const colorRandom = () => colorArr[Math.floor(Math.random() * colorArr.length)]
21-
// const sizeRandom = () => fontSize[Math.floor(Math.random() * fontSize.length)]
22-
2318
let tagsArr = <allTags>[]
2419
const chartDom = ref<any>(null)
2520
let chart: any = null
2621
const data = ref<any>([])
2722
onMounted(async () => {
2823
tagsArr = await getAllTags()
29-
tagsArr.forEach((i) => {
24+
tagsArr.forEach((i) =>
3025
data.value.push({
3126
name: i.tag_name,
3227
value: Math.random() * 100,
3328
id: i.tag_id
3429
})
35-
})
30+
)
31+
3632
chart = echarts.init(chartDom.value) as EChartsType
3733
chart.setOption({
3834
series: [

src/language/cn.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export default {
1717
board: '留言板',
1818
keyword: '关键词',
1919
friend: '友情链接',
20-
corner: '角落'
20+
corner: '角落',
21+
all: '全部',
22+
total: '共计'
2123
}
2224
}

src/language/en.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export default {
1717
board: 'Message Board',
1818
keyword: 'Keyword',
1919
friend: 'Friendship Link',
20-
corner: 'Corner'
20+
corner: 'Corner',
21+
all: 'All',
22+
total: 'Total'
2123
}
2224
}

src/main.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,17 @@ import './assets/css/scroll.css'
1717
import './assets/css/font.css'
1818
import './assets/css/el.css'
1919
import './index.css'
20+
import 'animate.css';
21+
//md editer
22+
import VMdEditor from '@kangc/v-md-editor';
23+
import '@kangc/v-md-editor/lib/style/base-editor.css';
24+
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
25+
import '@kangc/v-md-editor/lib/theme/style/github.css';
26+
VMdEditor.use(githubTheme, {
27+
Hljs: hljs,
28+
});
2029
createApp(App)
30+
.use(VMdEditor)
2131
.use(store)
2232
.use(router)
2333
.use(i18n)

src/request/api/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
// 导入axios实例
22
import service from '@/request/index'
33
import './types'
4-
4+
//上传
5+
export function postArticle (data) {
6+
return service({
7+
url: '/postArticle',
8+
method: 'post',
9+
data
10+
})
11+
}
512
//归档
613
export function getArchive () {
714
return service({

0 commit comments

Comments
 (0)