Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Likebocai #229

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,36 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
AppIcon: typeof import('./src/components/AppIcon.vue')['default']
Default: typeof import('./src/components/layouts/default.vue')['default']
ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
ElCol: typeof import('element-plus/es')['ElCol']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElIconHide: typeof import('@element-plus/icons-vue')['Hide']
ElIconView: typeof import('@element-plus/icons-vue')['View']
ElInput: typeof import('element-plus/es')['ElInput']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElProgress: typeof import('element-plus/es')['ElProgress']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTag: typeof import('element-plus/es')['ElTag']
ElText: typeof import('element-plus/es')['ElText']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
Header: typeof import('./src/components/header.vue')['default']
Icon: typeof import('./src/components/likebocai/Icon.vue')['default']
IconInfo: typeof import('./src/components/likebocai/IconInfo.vue')['default']
Input: typeof import('./src/components/likebocai/input.vue')['default']
OrgSelect: typeof import('./src/components/OrgSelect.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Expand Down
23 changes: 23 additions & 0 deletions src/components/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template>
<div class="default-body">
<LikebocaiHeader />
<div style="width: 100%;display: flex;justify-content: center;align-items: center;">
<div style="width: 1400px;">
<RouterView />
</div>
</div>
</div>
</template>

<script setup lang="ts">
import LikebocaiHeader from './header.vue'
</script>

<style scoped>
.default-body {
height: 100%;
width: 100%;
background-color: #fafbff;

}
</style>
52 changes: 52 additions & 0 deletions src/components/layouts/header.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<template>
<div class="rocket-nav-box">
<div class="rocket-nav">
<ElButton type="primary" plain style="border: 0px;">捐赠</ElButton>
<div class="rocket-nav-right" style="">
<p>BitTorrent客户端下载</p>
<p>站内规则</p>
<p>我的资源</p>
<p>消息</p>
<p>用户昵称▼</p>
</div>
</div>
</div>
</template>

<script setup lang="ts">
import { ElButton } from 'element-plus';


</script>

<style scoped>
.rocket-nav-box {
width: 100%;
height: 60px;
display: flex;
justify-content: center;
align-items: center;
.rocket-nav {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.rocket-nav-right {
display: flex;
justify-content: right;
align-items: center;
width: 80%;
p {
color: #7d808a;
height: 40px;
padding: 0px 20px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
}
}
}
</style>
11 changes: 11 additions & 0 deletions src/components/likebocai/Icon.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<template>
<img src="../likebocai/image.png" width="50">
</template>

<script setup lang="ts">

</script>

<style scoped>

</style>
47 changes: 47 additions & 0 deletions src/components/likebocai/IconInfo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<template>
<p class="icon-default-style" v-for="item in props.typeList" :style="{ color: style(item)[0],backgroundColor: style(item)[1] }">{{ text(item) }}</p>
</template>

<script setup lang="ts">
const props = defineProps({
typeList: Array as () => number[]
})

// 内容
const text = (textLet:number) => {
switch(textLet){
case 0:
return 'free';
case 1:
return 'H&R';
case 2:
return '热门'
}
}

// 样式
const style = (textLet:number) => {
switch(textLet){
case 0:
return ['#d8f9ff','#3b7ce2'];
case 1:
return ['#ffffff','#14162c'];
case 2:
return ['#fffbf0','#d46250']
}
}
</script>

<style scoped>
.icon-default-style {
background-color: #3b7ce2;
color: #d8f9ff;
height: 20px;
width: 40px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 4px;
margin: 0px 3px;
}
</style>
Binary file added src/components/likebocai/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions src/components/likebocai/input.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<template>
<!-- 邮箱验证码 -->
<div class="login-input-box">
<p class="login-prefix">
{{ prefixTitle ? prefixTitle : '请设置:prefixTitle的值' }}
</p>
<div class="likebocai-input-box">
<input class="likebocai-input" :type="type ? type : 'text'" :value="modelValue" @input="emit('update:model-value',(<HTMLInputElement>$event.target).value)" :placeholder="placeholder ? placeholder : '请输入内容'" />
<div class="login-suffix-box">
<slot />
</div>
</div>

</div>
</template>

<script setup lang="ts">
// 接收props
defineProps(['modelValue','placeholder','prefixTitle','type'])
// 声明事件
const emit = defineEmits(['update:model-value'])
</script>

<style scoped>
.login-input-box {
height: 60px;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 8px;

.login-prefix {
color: #a0a0a0;
width: 100px;
display: flex;
align-items: center;
justify-content: right;
margin-right: 20px;
font-size: 18px;
}

.likebocai-input-box {
width: 360px;
height: 50px;
border-radius: 25px;
background-color: #f0f0f0;
display: flex;
align-items: center;

.likebocai-input {
width: 170px;
height: 30px;
border: 0px;
background-color: #f0f0f0;
outline: none;
font-size: 18px;
margin-left: 25px;
}

.likebocai-input::placeholder {
color: #bcbcbc;
}

.login-suffix-box {
width: 130px;
height: 40px;
margin-left: 10px;
display: flex;
justify-content: right;
align-items: center;
}
}
}
</style>
Loading