- 调整了多个组件中的导入语句顺序以保持一致 - 格式化了 App.vue 中的 CSS 样式规则使其更易读 - 规范化了 vite.config.ts 中的配置对象缩进 - 移除了未使用的 computed 导入以减少代码冗余 - 整理了图标组件的导入顺序使其按字母排序 - 统一了代码中的空行和缩进格式
This commit is contained in:
+79
-22
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import {ref} from 'vue'
|
||||||
|
|
||||||
const themeMode = ref('light')
|
const themeMode = ref('light')
|
||||||
</script>
|
</script>
|
||||||
@@ -104,30 +104,87 @@ html, body, #app {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Gap 间距 */
|
/* Gap 间距 */
|
||||||
.gap-sm { gap: 8px; }
|
.gap-sm {
|
||||||
.gap-md { gap: 12px; }
|
gap: 8px;
|
||||||
.gap-lg { gap: 16px; }
|
}
|
||||||
|
|
||||||
|
.gap-md {
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gap-lg {
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
/* 间距工具类 */
|
/* 间距工具类 */
|
||||||
.mt-sm { margin-top: 8px; }
|
.mt-sm {
|
||||||
.mt-md { margin-top: 16px; }
|
margin-top: 8px;
|
||||||
.mt-lg { margin-top: 24px; }
|
}
|
||||||
.mb-sm { margin-bottom: 8px; }
|
|
||||||
.mb-md { margin-bottom: 16px; }
|
.mt-md {
|
||||||
.mb-lg { margin-bottom: 24px; }
|
margin-top: 16px;
|
||||||
.ml-sm { margin-left: 8px; }
|
}
|
||||||
.ml-md { margin-left: 12px; }
|
|
||||||
.ml-lg { margin-left: 16px; }
|
.mt-lg {
|
||||||
.mr-sm { margin-right: 8px; }
|
margin-top: 24px;
|
||||||
.mr-md { margin-right: 12px; }
|
}
|
||||||
.mr-lg { margin-right: 16px; }
|
|
||||||
|
.mb-sm {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-md {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-lg {
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ml-sm {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ml-md {
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ml-lg {
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mr-sm {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mr-md {
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mr-lg {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
/* 文本工具类 */
|
/* 文本工具类 */
|
||||||
.text-primary { color: var(--text-primary); }
|
.text-primary {
|
||||||
.text-success { color: var(--success-color); }
|
color: var(--text-primary);
|
||||||
.text-warning { color: var(--warning-color); }
|
}
|
||||||
.text-danger { color: var(--danger-color); }
|
|
||||||
.text-info { color: var(--info-color); }
|
.text-success {
|
||||||
|
color: var(--success-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-warning {
|
||||||
|
color: var(--warning-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-danger {
|
||||||
|
color: var(--danger-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-info {
|
||||||
|
color: var(--info-color);
|
||||||
|
}
|
||||||
|
|
||||||
/* 加载动画 */
|
/* 加载动画 */
|
||||||
.loading-container {
|
.loading-container {
|
||||||
@@ -153,7 +210,7 @@ html, body, #app {
|
|||||||
padding: 16px;
|
padding: 16px;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hide-on-mobile {
|
.hide-on-mobile {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, computed} from "vue"
|
import {computed, ref} from "vue"
|
||||||
import axios from "@/axios.ts"
|
import axios from "@/axios.ts"
|
||||||
import {ElMessage} from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
import {Upload} from '@element-plus/icons-vue'
|
import {Upload} from '@element-plus/icons-vue'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {ref, computed} from 'vue'
|
import {ref} from 'vue'
|
||||||
import {defineStore} from 'pinia'
|
import {defineStore} from 'pinia'
|
||||||
|
|
||||||
export const useCounterStore = defineStore('counter', () => {
|
export const useCounterStore = defineStore('counter', () => {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, watch, computed} from 'vue'
|
import {ref, watch} from 'vue'
|
||||||
import {useRoute, useRouter} from "vue-router"
|
import {useRoute, useRouter} from "vue-router"
|
||||||
import {useCounterStore} from "@/stores/counter.ts"
|
import {useCounterStore} from "@/stores/counter.ts"
|
||||||
import {Edit, User, Document, CloseBold} from '@element-plus/icons-vue'
|
import {CloseBold, Document, Edit, User} from '@element-plus/icons-vue'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, onMounted, onUnmounted} from 'vue'
|
import {onMounted, onUnmounted, ref} from 'vue'
|
||||||
import axios from "@/axios.ts"
|
import axios from "@/axios.ts"
|
||||||
import {useRoute} from "vue-router"
|
import {useRoute} from "vue-router"
|
||||||
import {ElMessage} from "element-plus"
|
import {ElMessage} from "element-plus"
|
||||||
import {
|
import {DataAnalysis, Document, Key, Search, Upload, Warning} from '@element-plus/icons-vue'
|
||||||
Key, DataAnalysis,
|
|
||||||
Document, Warning, Search, Upload
|
|
||||||
} from '@element-plus/icons-vue'
|
|
||||||
import AddDataDialog from "@/components/AddDataDialog.vue";
|
import AddDataDialog from "@/components/AddDataDialog.vue";
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, onMounted, onUnmounted, watch} from 'vue'
|
import {onMounted, onUnmounted, ref, watch} from 'vue'
|
||||||
import {useCounterStore} from "@/stores/counter.ts"
|
import {useCounterStore} from "@/stores/counter.ts"
|
||||||
import axios from "@/axios.ts"
|
import axios from "@/axios.ts"
|
||||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||||
import {
|
import {DataAnalysis, Delete, Document, InfoFilled, Key, Refresh, Search, Warning} from '@element-plus/icons-vue'
|
||||||
Key, Refresh, Delete, DataAnalysis,
|
|
||||||
Document, Warning, Search, InfoFilled
|
|
||||||
} from '@element-plus/icons-vue'
|
|
||||||
|
|
||||||
const store = useCounterStore()
|
const store = useCounterStore()
|
||||||
const result = ref<any>(null)
|
const result = ref<any>(null)
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, onMounted} from "vue"
|
import {onMounted, ref} from "vue"
|
||||||
import axios from "@/axios.ts"
|
import axios from "@/axios.ts"
|
||||||
import {ElMessage} from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
import {useCounterStore} from "@/stores/counter.ts"
|
import {useCounterStore} from "@/stores/counter.ts"
|
||||||
import {useRouter} from "vue-router"
|
import {useRouter} from "vue-router"
|
||||||
import {Plus, View, Edit, Delete, Key, Memo, Lock} from '@element-plus/icons-vue'
|
import {Delete, Edit, Key, Lock, Memo, Plus, View} from '@element-plus/icons-vue'
|
||||||
import AddDataDialog from '@/components/AddDataDialog.vue'
|
import AddDataDialog from '@/components/AddDataDialog.vue'
|
||||||
|
|
||||||
const store = useCounterStore()
|
const store = useCounterStore()
|
||||||
|
|||||||
+10
-10
@@ -1,18 +1,18 @@
|
|||||||
import { fileURLToPath, URL } from 'node:url'
|
import {fileURLToPath, URL} from 'node:url'
|
||||||
|
|
||||||
import { defineConfig } from 'vite'
|
import {defineConfig} from 'vite'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import vueDevTools from 'vite-plugin-vue-devtools'
|
import vueDevTools from 'vite-plugin-vue-devtools'
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
vueDevTools(),
|
vueDevTools(),
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user