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