Browse Source

master

master
邓宏 3 years ago
parent
commit
0c497d52e0
  1. 1
      src/App.vue
  2. 24
      src/assets/style/base.less
  3. 2
      src/assets/style/index.less
  4. 22
      src/assets/style/variables.less
  5. 2
      src/assets/svg/car.svg
  6. 2
      src/assets/svg/demo.svg
  7. 2
      src/components/index.js
  8. 3
      src/index.js
  9. 2
      src/main.js
  10. 2
      src/router/index.js
  11. 0
      src/view/demo.vue
  12. 2
      src/view/home.vue

1
src/App.vue

@ -1,7 +1,6 @@
<script setup>
import {useRouter} from 'vue-router'
const {push}=useRouter()
</script>
<template>

24
src/assets/style/base.less

@ -0,0 +1,24 @@
*,
*:before,
*:after {
box-sizing: border-box;
}
body {
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
font-size: 14px;
line-height: 1.15;
color: @--color-text-primary;
background-color: #fff;
}
a {
color: mix(#fff, @--color-primary, 20%);
text-decoration: none;
&:focus,
&:hover {
color: @--color-primary;
text-decoration: underline;
}
}
img {
vertical-align: middle;
}

2
src/assets/style/index.less

@ -0,0 +1,2 @@
@import url("variables.less");
@import url("base.less");

22
src/assets/style/variables.less

@ -0,0 +1,22 @@
/**
* 站点变量
*
* #1 重置element-ui组件, 请查阅_element-ui__variable-lookup.scss官方变量列表进行重置, 必须保证变量名一致才能生效!
* #2 站内变量
*/
// ---------- #1 ----------
@--color-primary: #17b3a3;
@--color-text-primary: #303133;
// ---------- #2 ----------
// Navbar
@navbar--background-color: @--color-primary;
// Sidebar
@sidebar--background-color-dark: #263238;
@sidebar--color-text-dark: #8a979e;
// Content
@content--background-color: #f1f4f5;

2
src/assets/svg/car.svg

@ -0,0 +1,2 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1650355811960" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1309" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M73.142857 0h877.714286v877.714286H73.142857z" fill="#FFFFFF" p-id="1310"></path><path d="M694.857143 100.571429a27.428571 27.428571 0 0 1 23.277714 12.928l1.261714 2.249142 70.034286 140.233143L868.571429 256v54.857143l-51.730286-0.018286 48.694857 97.462857a27.428571 27.428571 0 0 1 2.761143 9.709715l0.128 2.56 0.146286 256v73.142857a27.428571 27.428571 0 0 1-24.795429 27.300571L841.142857 777.142857h-146.285714a27.428571 27.428571 0 0 1-27.300572-24.795428L667.428571 749.714286l-0.018285-45.714286h-310.857143L356.571429 749.714286a27.428571 27.428571 0 0 1-22.217143 26.934857l-2.56 0.365714L329.142857 777.142857H182.857143a27.428571 27.428571 0 0 1-27.300572-24.795428L155.428571 749.714286V420.571429c0-3.401143 0.64-6.765714 1.865143-9.929143l1.024-2.340572L207.049143 310.857143 155.428571 310.857143v-54.857143l79.049143-0.018286 70.125715-140.251428a27.428571 27.428571 0 0 1 21.961142-15.030857L329.142857 100.571429h365.714286zM411.428571 329.142857h-54.857142v63.981714L292.571429 393.142857v54.857143l64-0.018286V512h54.857142v-64.018286l64 0.018286v-54.857143l-64-0.018286V329.142857zM731.428571 393.142857H548.571429v54.857143h182.857142v-54.857143z" fill="#111111" p-id="1311"></path></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

2
src/assets/svg/demo.svg

@ -1,2 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1650508799437" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1081" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M817.152 899.072H186.368c-12.288 0-22.528-8.192-22.528-20.48V153.6c0-10.24 10.24-20.48 22.528-20.48h630.784c12.288 0 22.528 8.192 22.528 20.48v724.992c0 10.24-10.24 20.48-22.528 20.48z m-608.256-40.96h587.776V172.032H208.896v686.08z m0 0" fill="#BBBBBB" p-id="1082"></path><path d="M593.92 448.512c-4.096 0-6.144 0-10.24-2.048l-79.872-47.104-79.872 47.104c-6.144 4.096-14.336 4.096-20.48 0-6.144-4.096-10.24-10.24-10.24-16.384V153.6c0-10.24 8.192-20.48 20.48-20.48H593.92c10.24 0 20.48 8.192 20.48 20.48V430.08c0 6.144-4.096 14.336-10.24 16.384-2.048 2.048-6.144 2.048-10.24 2.048z m-90.112-90.112c4.096 0 6.144 0 10.24 2.048l61.44 34.816V172.032h-141.312v223.232l61.44-34.816c2.048-2.048 4.096-2.048 8.192-2.048z m153.6 247.808H342.016c-10.24 0-20.48-8.192-20.48-20.48 0-10.24 8.192-20.48 20.48-20.48h315.392c10.24 0 20.48 8.192 20.48 20.48s-10.24 20.48-20.48 20.48z m-157.696 102.4h-157.696c-10.24 0-20.48-8.192-20.48-20.48 0-10.24 8.192-20.48 20.48-20.48h157.696c10.24 0 20.48 8.192 20.48 20.48s-10.24 20.48-20.48 20.48z m143.36 106.496c-43.008 0-77.824-34.816-77.824-77.824 0-43.008 34.816-77.824 77.824-77.824s77.824 34.816 77.824 77.824c0 43.008-34.816 77.824-77.824 77.824z m0-114.688c-20.48 0-36.864 16.384-36.864 36.864s16.384 36.864 36.864 36.864 36.864-16.384 36.864-36.864c2.048-18.432-16.384-36.864-36.864-36.864z m0 0" fill="#BBBBBB" p-id="1083"></path></svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

2
src/components/index.js

@ -1,6 +1,6 @@
import svgIcon from './svg-icon.vue'
const components = {
const components={
svgIcon,
}

3
src/index.js

@ -1,3 +0,0 @@
import {ref} from 'vue'
var a=ref(43)
console.log(a,"-----------asdf--------")

2
src/main.js

@ -5,6 +5,8 @@ import store from '@/store'
import regComponents from '@/components'
console.log(import.meta.env,'--------------import------')
import "@/assets/style/index.less"
var app=createApp(App)
app.use(router)
.use(store)

2
src/router/index.js

@ -1,5 +1,5 @@
import { createRouter, createWebHashHistory } from "vue-router";
import Home from "@/views/home.vue";
import Home from "@/view/home.vue";
import { defineAsyncComponent, defineComponent } from "vue";
const routes = [

0
src/views/Demo.vue → src/view/demo.vue

2
src/views/Home.vue → src/view/home.vue

@ -3,7 +3,7 @@
</style>
<template>
<div @click="$router.push({path:'/demo'})">demo</div>
svg-icon:<svg-icon name="demo"/>
svg-icon:<svg-icon name="car"/>
<img alt="Vue logo" src="~@/assets/img/logo.png" />
<hello-world msg="Hello Vue 3 + Vite" :num='1' style="color:red;" class="hello">
<div class="a">111</div>
Loading…
Cancel
Save