🔧工具(other): modify frame
This commit is contained in:
@@ -4,7 +4,7 @@ module.exports = {
|
|||||||
// { value: 'feat', name: 'feat: 新增功能' },
|
// { value: 'feat', name: 'feat: 新增功能' },
|
||||||
// { value: 'fix', name: 'fix: 修复 bug' },
|
// { value: 'fix', name: 'fix: 修复 bug' },
|
||||||
// { value: 'docs', name: 'docs: 文档变更' },
|
// { value: 'docs', name: 'docs: 文档变更' },
|
||||||
// { value: 'style', name: 'style: 代码格式(不影响功能,例如空格、分号等格式修正)' },
|
// { value: 'styles', name: 'styles: 代码格式(不影响功能,例如空格、分号等格式修正)' },
|
||||||
// { value: 'refactor', name: 'refactor: 代码重构(不包括 bug 修复、功能新增)' },
|
// { value: 'refactor', name: 'refactor: 代码重构(不包括 bug 修复、功能新增)' },
|
||||||
// { value: 'perf', name: 'perf: 性能优化' },
|
// { value: 'perf', name: 'perf: 性能优化' },
|
||||||
// { value: 'test', name: 'test: 添加、修改测试用例' },
|
// { value: 'test', name: 'test: 添加、修改测试用例' },
|
||||||
@@ -58,7 +58,7 @@ module.exports = {
|
|||||||
scopeOverrides: {
|
scopeOverrides: {
|
||||||
fix: [
|
fix: [
|
||||||
{ name: 'merge' },
|
{ name: 'merge' },
|
||||||
{ name: 'style' },
|
{ name: 'styles' },
|
||||||
{ name: 'e2eTest' },
|
{ name: 'e2eTest' },
|
||||||
{ name: 'unitTest' }
|
{ name: 'unitTest' }
|
||||||
]
|
]
|
||||||
|
@@ -45,7 +45,7 @@ module.exports = {
|
|||||||
// 'object-curly-spacing': ['error', 'always'], // 强制在大括号中使用一致的空格
|
// 'object-curly-spacing': ['error', 'always'], // 强制在大括号中使用一致的空格
|
||||||
// 'max-len': ['error', 120], // 强制一行的最大长度
|
// 'max-len': ['error', 120], // 强制一行的最大长度
|
||||||
// 'no-new': 'off', // 禁止使用 new 以避免产生副作用
|
// 'no-new': 'off', // 禁止使用 new 以避免产生副作用
|
||||||
// 'linebreak-style': 'off', // 强制使用一致的换行风格
|
// 'linebreak-styles': 'off', // 强制使用一致的换行风格
|
||||||
// 'import/extensions': 'off', // 确保在导入路径中统一使用文件扩展名
|
// 'import/extensions': 'off', // 确保在导入路径中统一使用文件扩展名
|
||||||
// 'eol-last': 'off', // 要求或禁止文件末尾存在空行
|
// 'eol-last': 'off', // 要求或禁止文件末尾存在空行
|
||||||
// 'no-shadow': 'off', // 禁止变量声明与外层作用域的变量同名
|
// 'no-shadow': 'off', // 禁止变量声明与外层作用域的变量同名
|
||||||
|
11
src/App.vue
11
src/App.vue
@@ -1,10 +1,7 @@
|
|||||||
<script setup lang="ts"></script>
|
<script setup lang="ts">
|
||||||
|
import LayOut from '@/layout/Layout.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- 设置路由出口 -->
|
<LayOut />
|
||||||
<router-view v-slot="{ Component, route }">
|
|
||||||
<transition name="animation" mode="out-in">
|
|
||||||
<component :is="Component" :key="route.path" />
|
|
||||||
</transition>
|
|
||||||
</router-view>
|
|
||||||
</template>
|
</template>
|
||||||
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 506 B |
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
@@ -19,7 +19,7 @@ const props = defineProps({
|
|||||||
const iconName = computed(() => `#icon-${props.iconClass}`)
|
const iconName = computed(() => `#icon-${props.iconClass}`)
|
||||||
const svgClass = computed(() => {
|
const svgClass = computed(() => {
|
||||||
if (props.className) {
|
if (props.className) {
|
||||||
return 'svg-icon ' + props.className
|
return 'icons-icon ' + props.className
|
||||||
} else {
|
} else {
|
||||||
return 'svg-icon'
|
return 'svg-icon'
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
.svg-icon {
|
.svg-icon {
|
||||||
// svg 图标默认宽高,根据个人使用情况自行调整
|
// icons 图标默认宽高,根据个人使用情况自行调整
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height:100px;
|
height:100px;
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
|
16
src/layout/Layout.vue
Normal file
16
src/layout/Layout.vue
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import { defineComponent } from 'vue'
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'LayOut'
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<!-- 设置路由出口 -->
|
||||||
|
<router-view v-slot="{ Component, route }">
|
||||||
|
<transition name="animation" mode="out-in">
|
||||||
|
<component :is="Component" :key="route.path" />
|
||||||
|
</transition>
|
||||||
|
</router-view>
|
||||||
|
</template>
|
@@ -1 +0,0 @@
|
|||||||
# 布局
|
|
@@ -1,5 +1,5 @@
|
|||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import './style/style.less'
|
import '@/assets/styles/style.less'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from '@/router/index'
|
import router from '@/router/index'
|
||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
@@ -7,10 +7,10 @@ import Antd from 'ant-design-vue'
|
|||||||
import 'ant-design-vue/dist/reset.css'
|
import 'ant-design-vue/dist/reset.css'
|
||||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||||
import '@/polyfill/polyfill'
|
import '@/polyfill/polyfill'
|
||||||
import '@/style/scroll-bar.less'
|
import '@/assets/styles/scroll-bar.less'
|
||||||
// 国际化
|
// 国际化
|
||||||
import i18n from '../locales'
|
import i18n from '../locales'
|
||||||
// svg 相关
|
// icons 相关
|
||||||
import 'virtual:svg-icons-register'
|
import 'virtual:svg-icons-register'
|
||||||
import SvgIcon from './components/svgIcon/SvgIcon.vue'
|
import SvgIcon from './components/svgIcon/SvgIcon.vue'
|
||||||
import 'vue-global-api'
|
import 'vue-global-api'
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { IUser } from '@/interface/user/user'
|
import { IUser } from '@/types/user/user'
|
||||||
|
|
||||||
export const useAuthStore = defineStore(
|
export const useAuthStore = defineStore(
|
||||||
'user',
|
'user',
|
||||||
|
@@ -13,7 +13,7 @@ export default defineComponent({
|
|||||||
<svg-icon icon-class="schisandra" class-name="icon"></svg-icon>
|
<svg-icon icon-class="schisandra" class-name="icon"></svg-icon>
|
||||||
<h1>Login</h1>
|
<h1>Login</h1>
|
||||||
<h2>测试页面,看到这个,那么项目就成功跑起来了</h2>
|
<h2>测试页面,看到这个,那么项目就成功跑起来了</h2>
|
||||||
<img style="width: 300px; height: 200px" src="@/assets/image/wallhaven.jpg" />
|
<img style="width: 300px; height: 200px" src="@/assets/images/wallhaven.jpg" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ import Components from 'unplugin-vue-components/vite'
|
|||||||
//ant-design-vue
|
//ant-design-vue
|
||||||
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'
|
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'
|
||||||
|
|
||||||
// svg plugin
|
// icons plugin
|
||||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||||
|
|
||||||
import autoprefixer from 'autoprefixer'
|
import autoprefixer from 'autoprefixer'
|
||||||
@@ -37,7 +37,7 @@ export default defineConfig(({ mode, command }) => {
|
|||||||
less: {
|
less: {
|
||||||
javascriptEnabled: true,
|
javascriptEnabled: true,
|
||||||
charset: false, //禁用字符集声明(charset 选项用于控制是否在生成的 CSS 文件的头部添加 @charset "UTF-8";)
|
charset: false, //禁用字符集声明(charset 选项用于控制是否在生成的 CSS 文件的头部添加 @charset "UTF-8";)
|
||||||
additionalData: '@import "./src/style/variables.less";'
|
additionalData: '@import "./src/assets/styles/variables.less";'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
postcss: {
|
postcss: {
|
||||||
@@ -112,10 +112,10 @@ export default defineConfig(({ mode, command }) => {
|
|||||||
ext: '.gz',
|
ext: '.gz',
|
||||||
deleteOriginFile: true // 源文件压缩后是否删除
|
deleteOriginFile: true // 源文件压缩后是否删除
|
||||||
}),
|
}),
|
||||||
// 修改 svg 相关配置
|
// 修改 icons 相关配置
|
||||||
createSvgIconsPlugin({
|
createSvgIconsPlugin({
|
||||||
// 指定需要缓存的图标文件夹
|
// 指定需要缓存的图标文件夹
|
||||||
iconDirs: [path.resolve(__dirname, './src/assets/svg')]
|
iconDirs: [path.resolve(__dirname, './src/assets/icons')]
|
||||||
}),
|
}),
|
||||||
legacy({
|
legacy({
|
||||||
renderLegacyChunks: true,
|
renderLegacyChunks: true,
|
||||||
|
Reference in New Issue
Block a user