Skip to content

Commit

Permalink
Merge pull request #48 from log-z/dev 代码格式化
Browse files Browse the repository at this point in the history
代码格式化
  • Loading branch information
log-z authored Aug 13, 2024
2 parents 75e9d2f + 94250a1 commit 2b547e9
Show file tree
Hide file tree
Showing 22 changed files with 90 additions and 63 deletions.
3 changes: 2 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<!-- LOGO -->
<nav-logo
@mouseenter="toggleScheme"
@mouseleave="clearToggleScheme" />
@mouseleave="clearToggleScheme"
/>
</div>
<div class="vue-app__search-warppar">
<!-- 搜索 -->
Expand Down
6 changes: 4 additions & 2 deletions src/components/nav-favorites/nav-favorite-group.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<div class="nav-favorite-group">
<h2 class="nav-favorite-group__title">{{ info.name }}</h2>
<h2 class="nav-favorite-group__title">
{{ info.name }}
</h2>
<ul>
<li
v-for="item in info.websites"
Expand All @@ -14,7 +16,7 @@

<script>
export default {
name: 'navFavoriteGroup',
name: 'NavFavoriteGroup',
props: {
info: {
type: Object,
Expand Down
4 changes: 2 additions & 2 deletions src/components/nav-favorites/nav-favorite-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
</div>
<!-- 副标题 -->
<div
class="nav-favorite-item__subtitle"
v-if="website.subtitle"
class="nav-favorite-item__subtitle"
>
{{ website.subtitle }}
</div>
Expand All @@ -50,7 +50,7 @@

<script>
export default {
name: 'navFavoriteItem',
name: 'NavFavoriteItem',
props: {
website: {
type: Object,
Expand Down
5 changes: 3 additions & 2 deletions src/components/nav-favorites/nav-favorites.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
<nav-favorite-group
v-for="g in groups"
:key="g.name"
:info="g" />
:info="g"
/>
</div>
</template>

<script>
export default {
name: 'navFavorites'
name: 'NavFavorites'
}
</script>
<script setup>
Expand Down
13 changes: 9 additions & 4 deletions src/components/nav-foot/nav-foot.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
<template>
<footer class="nav-foot">
<!-- 切换毛玻璃特性 -->
<button class="nav-foot__action" @click.prevent="toggleFeatureGlassmorphism">
{{featureGlassmorphism ? '毛玻璃' : '纯色'}}
<button
class="nav-foot__action"
@click.prevent="toggleFeatureGlassmorphism"
>
{{ featureGlassmorphism ? '毛玻璃' : '纯色' }}
</button>
<!-- 描述信息 -->
<div class="nav-foot__info">{{description}}</div>
<div class="nav-foot__info">
{{ description }}
</div>
</footer>
</template>

<script>
export default {
name: 'navFoot'
name: 'NavFoot'
}
</script>
<script setup>
Expand Down
14 changes: 10 additions & 4 deletions src/components/nav-logo/nav-logo.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
<template>
<div class="nav-logo">
<svg class="nav-logo__svg" viewBox="0 0 1000 1000">
<polygon style="opacity:0.33" points="653.9,507.7 693.1,614.5 862.2,228.2 475.9,397.3 582.2,437 344.5,674.7 191.5,523.1 92.8,565.2 344.8,816.6 344.8,816.6 344.9,816.7 "></polygon>
<polygon points="698.9,462.7 738.1,569.5 907.2,183.2 520.9,352.3 627.2,392 389.5,629.7 236.5,478.1 137.8,520.2 389.8,771.6 389.8,771.6 389.9,771.7 "></polygon>
<svg
class="nav-logo__svg"
viewBox="0 0 1000 1000"
>
<polygon
style="opacity:0.33"
points="653.9,507.7 693.1,614.5 862.2,228.2 475.9,397.3 582.2,437 344.5,674.7 191.5,523.1 92.8,565.2 344.8,816.6 344.8,816.6 344.9,816.7 "
/>
<polygon points="698.9,462.7 738.1,569.5 907.2,183.2 520.9,352.3 627.2,392 389.5,629.7 236.5,478.1 137.8,520.2 389.8,771.6 389.8,771.6 389.9,771.7 " />
</svg>
</div>
</template>

<script>
export default {
name: 'navLogo'
name: 'NavLogo'
}
</script>

Expand Down
4 changes: 2 additions & 2 deletions src/components/nav-search/nav-search-complete.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div
class="nav-search-complete nav-card-2"
v-if="list.length > 1"
class="nav-search-complete nav-card-2"
>
<ol>
<li
Expand All @@ -18,7 +18,7 @@

<script>
export default {
name: 'navSearchComplete',
name: 'NavSearchComplete',
}
</script>
<script setup>
Expand Down
20 changes: 13 additions & 7 deletions src/components/nav-search/nav-search-engine-selector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,28 @@
@click="next"
>
<Baidu
v-if="status.eng == 'baidu'" />
v-if="status.eng == 'baidu'"
/>
<Google
v-if="status.eng == 'google'" />
v-if="status.eng == 'google'"
/>
<Bing
v-if="status.eng == 'bing'" />
v-if="status.eng == 'bing'"
/>
<Qiuwenbaike
v-if="status.eng == 'qiuwenbaike'" />
v-if="status.eng == 'qiuwenbaike'"
/>
<Wikipedia
v-if="status.eng == 'wikipedia'" />
v-if="status.eng == 'wikipedia'"
/>
</nav-icon>
<!-- 气泡 -->
<div class="nav-search-engine-selector__popover">
<div class="nav-search-engine-selector__popover-wrapper nav-card-2">
<div class="nav-search-engine-selector__popover_item"
<div
v-for="eng in engineList"
:key="eng"
class="nav-search-engine-selector__popover_item"
:class="{active: eng == status.eng}"
@click="select(eng)"
>
Expand All @@ -48,7 +54,7 @@

<script>
export default {
name: 'navSearchEngineSelector'
name: 'NavSearchEngineSelector'
}
</script>

Expand Down
4 changes: 2 additions & 2 deletions src/components/nav-search/nav-search-input.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<div class="nav-search-input">
<input
ref="inputRef"
name="nav-search-input"
class="nav-search-input__input"
type="text"
autocomplete="off"
autofocus="autofocus"
spellcheck="false"
ref="inputRef"
:placeholder="placeholder"
:value="modelValue"
@input="input"
Expand All @@ -24,7 +24,7 @@

<script>
export default {
name: 'navSearchInput',
name: 'NavSearchInput',
props: {
modelValue: {
type: String,
Expand Down
20 changes: 13 additions & 7 deletions src/components/nav-search/nav-search.vue
Original file line number Diff line number Diff line change
@@ -1,41 +1,47 @@
<template>
<div class="nav-search" :class="rootClass">
<div
class="nav-search"
:class="rootClass"
>
<form
:class="fromClass"
@submit.prevent="submit"
>
<nav-search-input
v-model="data.searchWord"
ref="inputRef"
v-model="data.searchWord"
@input="input"
@focus="focus"
@blur="blur"
@eng-next="engineNext"
@eng-prev="enginePrev"
@complete-next="completeNext"
@complete-prev="completePrev" />
@complete-prev="completePrev"
/>
<nav-search-engine-selector
ref="engineSelectorRef"
:engine="engine"
@change="engineChange" />
@change="engineChange"
/>
<nav-icon
class="nav-search__submit"
@click="submit"
>
<CheveronRight/>
<CheveronRight />
</nav-icon>
</form>
<nav-search-complete
ref="completeRef"
:list="data.complete"
@selecte="completeSelect"
@change="completeChange" />
@change="completeChange"
/>
</div>
</template>

<script>
export default {
name: 'navSearch'
name: 'NavSearch'
}
</script>
<script setup>
Expand Down
4 changes: 2 additions & 2 deletions src/icons-vue/nav-icon-baidu.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<span class="iconfont icon-baidu"></span>
<span class="iconfont icon-baidu" />
</template>

<script>
export default {
name: 'navIconBaidu'
name: 'NavIconBaidu'
}
</script>
4 changes: 2 additions & 2 deletions src/icons-vue/nav-icon-bing.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<span class="iconfont icon-bing"></span>
<span class="iconfont icon-bing" />
</template>

<script>
export default {
name: 'navIconBing'
name: 'NavIconBing'
}
</script>
4 changes: 2 additions & 2 deletions src/icons-vue/nav-icon-cheveron-right.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<span class="iconfont icon-cheveron-right"></span>
<span class="iconfont icon-cheveron-right" />
</template>

<script>
export default {
name: 'navIconCheveronRight'
name: 'NavIconCheveronRight'
}
</script>
4 changes: 2 additions & 2 deletions src/icons-vue/nav-icon-google.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<span class="iconfont icon-google"></span>
<span class="iconfont icon-google" />
</template>

<script>
export default {
name: 'navIconGoogle'
name: 'NavIconGoogle'
}
</script>
4 changes: 2 additions & 2 deletions src/icons-vue/nav-icon-qiuwenbaike.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<span class="iconfont icon-qiuwenbaike"></span>
<span class="iconfont icon-qiuwenbaike" />
</template>

<script>
export default {
name: 'navIconQiuwenbaike'
name: 'NavIconQiuwenbaike'
}
</script>
4 changes: 2 additions & 2 deletions src/icons-vue/nav-icon-wikipedia.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<span class="iconfont icon-wikipedia"></span>
<span class="iconfont icon-wikipedia" />
</template>

<script>
export default {
name: 'navIconWikipedia'
name: 'NavIconWikipedia'
}
</script>
16 changes: 8 additions & 8 deletions src/icons-vue/nav-icon/nav-icon.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<template>
<div class="nav-icon">
<slot></slot>
<slot />
</div>
</template>

<style>
.nav-icon > span {
display: block;
}
</style>

<script>
export default {
name: 'navIcon'
name: 'NavIcon'
}
</script>
<script setup>
</script>

<style>
.nav-icon > span {
display: block;
}
</style>
4 changes: 2 additions & 2 deletions src/icons-vue/nav-iconcl-baidu.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<span class="iconfont-coloru icon-cl-baidu"></span>
<span class="iconfont-coloru icon-cl-baidu" />
</template>

<script>
export default {
name: 'navIconclBaidu'
name: 'NavIconclBaidu'
}
</script>
4 changes: 2 additions & 2 deletions src/icons-vue/nav-iconcl-bing.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<span class="iconfont-coloru icon-cl-bing"></span>
<span class="iconfont-coloru icon-cl-bing" />
</template>

<script>
export default {
name: 'navIconclBing'
name: 'NavIconclBing'
}
</script>
4 changes: 2 additions & 2 deletions src/icons-vue/nav-iconcl-google.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<span class="iconfont-coloru icon-cl-google"></span>
<span class="iconfont-coloru icon-cl-google" />
</template>

<script>
export default {
name: 'navIconclGoogle'
name: 'NavIconclGoogle'
}
</script>
Loading

0 comments on commit 2b547e9

Please sign in to comment.