This commit is contained in:
jhy 2023-09-04 18:31:48 +08:00
commit d7091e2b5a
18 changed files with 1953 additions and 0 deletions

28
.gitignore vendored Normal file
View File

@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

3
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}

29
README.md Normal file
View File

@ -0,0 +1,29 @@
# vue
This template should help get you started developing with Vue 3 in Vite.
## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
## Customize configuration
See [Vite Configuration Reference](https://vitejs.dev/config/).
## Project Setup
```sh
npm install
```
### Compile and Hot-Reload for Development
```sh
npm run dev
```
### Compile and Minify for Production
```sh
npm run build
```

13
index.html Normal file
View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>黑龙江东印科技</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>

1373
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

20
package.json Normal file
View File

@ -0,0 +1,20 @@
{
"name": "vue",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"pinia": "^2.1.6",
"tdesign-vue-next": "^1.5.3",
"vue": "^3.3.4",
"vue-router": "^4.2.4"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.3.1",
"vite": "^4.4.9"
}
}

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

21
src/App.vue Normal file
View File

@ -0,0 +1,21 @@
<script setup>
import navigation from './components/navigation/index.vue'
// import footer from './components/footer/footer.vue';
</script>
<template>
<navigation />
<RouterView />
<!-- <footer></footer> -->
</template>
<style>
html,
body {
margin: 0;
padding: 0;
}
</style>

73
src/assets/base.css Normal file
View File

@ -0,0 +1,73 @@
/* color palette from <https://github.com/vuejs/theme> */
:root {
--vt-c-white: #ffffff;
--vt-c-white-soft: #f8f8f8;
--vt-c-white-mute: #f2f2f2;
--vt-c-black: #181818;
--vt-c-black-soft: #222222;
--vt-c-black-mute: #282828;
--vt-c-indigo: #2c3e50;
--vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
--vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
--vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
--vt-c-text-light-1: var(--vt-c-indigo);
--vt-c-text-light-2: rgba(60, 60, 60, 0.66);
--vt-c-text-dark-1: var(--vt-c-white);
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
}
/* semantic color variables for this project */
:root {
--color-background: var(--vt-c-white);
--color-background-soft: var(--vt-c-white-soft);
--color-background-mute: var(--vt-c-white-mute);
--color-border: var(--vt-c-divider-light-2);
--color-border-hover: var(--vt-c-divider-light-1);
--color-heading: var(--vt-c-text-light-1);
--color-text: var(--vt-c-text-light-1);
--section-gap: 160px;
}
@media (prefers-color-scheme: dark) {
:root {
--color-background: var(--vt-c-black);
--color-background-soft: var(--vt-c-black-soft);
--color-background-mute: var(--vt-c-black-mute);
--color-border: var(--vt-c-divider-dark-2);
--color-border-hover: var(--vt-c-divider-dark-1);
--color-heading: var(--vt-c-text-dark-1);
--color-text: var(--vt-c-text-dark-2);
}
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
font-weight: normal;
}
body {
min-height: 100vh;
color: var(--color-text);
background: var(--color-background);
transition: color 0.5s, background-color 0.5s;
line-height: 1.6;
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 15px;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

1
src/assets/logo.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>

After

Width:  |  Height:  |  Size: 276 B

37
src/assets/main.css Normal file
View File

@ -0,0 +1,37 @@
#app {
max-width: 1280px;
margin: 0 auto;
font-weight: normal;
}
a,
.green {
text-decoration: none;
color: hsla(160, 100%, 37%, 1);
transition: 0.4s;
}
@media (hover: hover) {
a:hover {
background-color: hsla(160, 100%, 37%, 0.2);
}
}
body {
display: flex;
place-items: center;
padding: 0;
margin: 0;
}
#app {
width: 100vw;
height: 100vh;
display: grid;
grid-template-columns: 1fr 1fr;
padding: 0;
margin: 0;
}

View File

@ -0,0 +1,29 @@
<script setup>
</script>
<template>
<footer class="footer">
<span>鄂ICP备2023000527</span>
<span><span class="hui">2023</span> <strong>黑龙江东印科技</strong> <span class="hui">版权所有</span></span>
</footer>
</template>
<style scoped>
.footer {
width: 100%;
position: fixed;
bottom: 0px;
text-align: center;
height: 150px;
background-color: black;
color: aliceblue;
font-size: 13px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.hui {
color: #999;
}
</style>

View File

@ -0,0 +1,48 @@
<script setup>
import { ref } from 'vue';
const menu1Value = ref('item1');
const changeHandler = (active) => {
console.log('change', active);
};
</script>
<template>
<div class="navigation">
<div class="menu">
<t-head-menu
v-model="menu1Value"
theme="dark"
height="150px"
@change="changeHandler"
>
<template #logo>
<div class="text">黑龙江东印科技</div>
</template>
<t-menu-item value="item1" class="menu"> 首页 </t-menu-item>
<t-menu-item value="item2" class="menu"> 服务项目 </t-menu-item>
<t-menu-item value="item3" class="menu"> 联系我们 </t-menu-item>
</t-head-menu>
</div>
</div>
</template>
<style scoped>
.navigation{
width: 100vw;
}
.text{
line-height: 80px;
color: #fff;
font-size: 26px;
margin-left: 450px;
margin-right: 600px;
}
.t-menu__item.t-is-active{
background-color:#88888863
}
</style>

14
src/main.js Normal file
View File

@ -0,0 +1,14 @@
import 'tdesign-vue-next/es/style/index.css';
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import TDesign from 'tdesign-vue-next';
import App from './App.vue'
import router from './router'
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.use(TDesign)
app.mount('#app')

23
src/router/index.js Normal file
View File

@ -0,0 +1,23 @@
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: HomeView
},
// {
// path: '/about',
// name: 'about',
// // route level code-splitting
// // this generates a separate chunk (About.[hash].js) for this route
// // which is lazy-loaded when the route is visited.
// component: () => import('../views/AboutView.vue')
// }
]
})
export default router

12
src/stores/counter.js Normal file
View File

@ -0,0 +1,12 @@
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', () => {
const count = ref(0)
const doubleCount = computed(() => count.value * 2)
function increment() {
count.value++
}
return { count, doubleCount, increment }
})

213
src/views/HomeView.vue Normal file
View File

@ -0,0 +1,213 @@
<script setup>
import { ref } from 'vue'
import { Icon } from 'tdesign-icons-vue-next';
const image = [
{ url: 'https://yingyongge.com/zb_users/theme/FY_Qo/style/images/1.jpg', text: "APP软件开发" },
{ url: 'https://yingyongge.com/zb_users/theme/FY_Qo/style/images/2.jpg', text: "小程序开发" },
{ url: 'https://yingyongge.com/zb_users/theme/FY_Qo/style/images/3.jpg', text: "企业网站开发" },
]
const images = ref(image)
const text = ref('APP软件开发')
</script>
<template>
<div class="home">
<t-swiper class="tdesign-demo-block--swiper" :duration="300" :interval="2000">
<t-swiper-item v-for="(item, index) in images" :key="index">
<t-image :src="item.url" :style="{ width: '100vw' }" overlayTrigger="always">
<template #overlayContent>
<div class="overlayContent">
<div class="text">{{ item.text }}</div>
<t-button theme="warning" class="button">了解详情</t-button>
</div>
</template>
</t-image>
</t-swiper-item>
</t-swiper>
<div class="special_service">
<h1 class="special_service_text">特色服务</h1>
<div class="special_service_dec">
<span class="special_service_dec_top">专注高端定制与设计的网站建设工作室,我们是体验经济世界的构筑者,我们创造有价值的精彩体验</span>
<span>1111</span>
</div>
<div class="special_service_type">
<div class="special_service_typeone">
<div class="special_service_yuan">
<span class="icon">
<icon name="system-marked" color="orange" style="color:orange;" />
</span>
</div>
<span class="special_service_wenzi"><strong>APP软件开发</strong></span>
</div>
<div class="special_service_typeone">
<div class="special_service_yuan">
<span class="icon">
<icon name="system-code" color="orange" />
</span>
</div>
<span class="special_service_wenzi"><strong>小程序开发</strong></span>
</div>
<div class="special_service_typeone">
<div class="special_service_yuan">
<span class="icon">
<icon name="system-messages" color="orange" />
</span>
</div>
<span class="special_service_wenzi"><strong>网站开发</strong></span>
</div>
</div>
</div>
</div>
<footer class="footer">
<span>鄂ICP备2023000527</span>
<span><span class="hui">2023</span> <strong>黑龙江东印科技</strong> <span class="hui">版权所有</span></span>
</footer>
</template>
<style scoped>
.home {
width: 100vw;
/* height: 100vh; */
}
/* 竖排展示 demo 行间距 16px */
.tdesign-demo-block-column {
display: flex;
flex-direction: column;
row-gap: 16px;
}
/* 竖排展示 demo 行间距 32px */
.tdesign-demo-block-column-large {
display: flex;
flex-direction: column;
row-gap: 32px;
}
/* 横排排展示 demo 列间距 16px */
.tdesign-demo-block-row {
display: flex;
column-gap: 16px;
align-items: center;
}
.text {
color: #fff;
font-size: 50px;
}
.overlayContent {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
}
.button {
width: 130px;
margin-top: 30px;
}
.special_service {
/* height: 500px; */
background-color: #f5f5f5;
padding: 60px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
margin-bottom: 10px;
}
.special_service_text {
text-align: center;
margin: auto;
width: 130px;
border-bottom: 5px solid orange;
height: 50px;
}
.special_service_dec {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 40px;
margin-bottom: 70px;
font-size: 14px;
}
.special_service_dec_top {
margin-bottom: 5px;
}
.special_service_type {
width: 60%;
display: flex;
justify-content: space-around;
align-items: center;
/* background-color: beige; */
}
.special_service_yuan {
position: relative;
width: 95px;
height: 95px;
border-radius: 100%;
background-color: #fff;
margin-bottom: 10px;
}
.special_service_typeone {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
.special_service_wenzi {
font-size: 20px;
}
.icon {
position: absolute;
width: 100%;
line-height: 85px;
margin: auto;
font-size: 48px;
text-align: center;
/* top: 50%;
transform: translateY(-50%);
left: 50%;
transform: translateX(-50%); */
}
.footer {
width: 100%;
/* position: fixed; */
/* bottom: 0px; */
text-align: center;
height: 150px;
background-color: black;
color: aliceblue;
font-size: 13px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.hui {
color: #999;
}
</style>

16
vite.config.js Normal file
View File

@ -0,0 +1,16 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})