mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 13:28:38 +08:00
调整代码风格
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"src/**/*.{ts,tsx,vue}": "eslint --cache --fix --no-ignore --no-error-on-unmatched-pattern",
|
||||
"src/**/*.{css,scss,vue}": "stylelint --cache --fix --allow-empty-input"
|
||||
"*.{ts,tsx,vue}": "eslint --cache --fix --no-ignore --no-error-on-unmatched-pattern --ext .ts,.tsx,.vue src/",
|
||||
"*.{css,scss,vue}": "stylelint src/**/*.{css,scss,vue} --cache --fix --allow-empty-input"
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import { ElMessage } from 'element-plus'
|
||||
import router from '@/router/index'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const toLogin = () => {
|
||||
function toLogin() {
|
||||
useUserStore().logout().then(() => {
|
||||
router.push({
|
||||
path: '/login',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup name="FileUpload">
|
||||
import { ElMessage, UploadUserFile } from 'element-plus'
|
||||
import type { UploadProps } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import type { UploadProps, UploadUserFile } from 'element-plus'
|
||||
|
||||
const props = defineProps({
|
||||
action: {
|
||||
|
||||
@@ -432,10 +432,7 @@ function handleCopy() {
|
||||
}
|
||||
|
||||
.mode-container {
|
||||
top: 5px;
|
||||
left: 40px;
|
||||
right: 5px;
|
||||
bottom: 5px;
|
||||
inset: 5px 5px 5px 40px;
|
||||
border: 1px dashed var(--g-sub-sidebar-menu-active-bg);
|
||||
}
|
||||
}
|
||||
@@ -461,10 +458,7 @@ function handleCopy() {
|
||||
}
|
||||
|
||||
.mode-container {
|
||||
top: 20px;
|
||||
left: 25px;
|
||||
right: 5px;
|
||||
bottom: 5px;
|
||||
inset: 20px 5px 5px 25px;
|
||||
border: 1px dashed var(--g-sub-sidebar-menu-active-bg);
|
||||
}
|
||||
}
|
||||
@@ -482,10 +476,7 @@ function handleCopy() {
|
||||
}
|
||||
|
||||
.mode-container {
|
||||
top: 5px;
|
||||
left: 25px;
|
||||
right: 5px;
|
||||
bottom: 5px;
|
||||
inset: 5px 5px 5px 25px;
|
||||
border: 1px dashed var(--g-sub-sidebar-menu-active-bg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,9 @@ const actived = ref(-1)
|
||||
const searchInputRef = ref()
|
||||
const searchResultRef = ref()
|
||||
const searchResultItemRef = ref<any>([])
|
||||
const setSearchResultItemRef = (el: any) => searchResultItemRef.value.push(el)
|
||||
function setSearchResultItemRef(el: any) {
|
||||
return searchResultItemRef.value.push(el)
|
||||
}
|
||||
onBeforeUpdate(() => {
|
||||
searchResultItemRef.value = []
|
||||
})
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
const Layout = () => import('@/layouts/index.vue')
|
||||
function Layout() {
|
||||
return import('@/layouts/index.vue')
|
||||
}
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/breadcrumb_example',
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
const Layout = () => import('@/layouts/index.vue')
|
||||
function Layout() {
|
||||
return import('@/layouts/index.vue')
|
||||
}
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/component_basic_example',
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
const Layout = () => import('@/layouts/index.vue')
|
||||
function Layout() {
|
||||
return import('@/layouts/index.vue')
|
||||
}
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/component_extend_example',
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
const Layout = () => import('@/layouts/index.vue')
|
||||
function Layout() {
|
||||
return import('@/layouts/index.vue')
|
||||
}
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
const Layout = () => import('@/layouts/index.vue')
|
||||
function Layout() {
|
||||
return import('@/layouts/index.vue')
|
||||
}
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/link',
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
const Layout = () => import('@/layouts/index.vue')
|
||||
function Layout() {
|
||||
return import('@/layouts/index.vue')
|
||||
}
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/jsx_example',
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
const Layout = () => import('@/layouts/index.vue')
|
||||
function Layout() {
|
||||
return import('@/layouts/index.vue')
|
||||
}
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/keep_alive_example',
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
const Layout = () => import('@/layouts/index.vue')
|
||||
function Layout() {
|
||||
return import('@/layouts/index.vue')
|
||||
}
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/mock_example',
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
const Layout = () => import('@/layouts/index.vue')
|
||||
function Layout() {
|
||||
return import('@/layouts/index.vue')
|
||||
}
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/multilevel_menu_example',
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
const Layout = () => import('@/layouts/index.vue')
|
||||
function Layout() {
|
||||
return import('@/layouts/index.vue')
|
||||
}
|
||||
|
||||
const routes: RouteRecordRaw = {
|
||||
path: '/permission_example',
|
||||
|
||||
Vendored
+2
-1
@@ -4,7 +4,8 @@ declare interface Window {
|
||||
}
|
||||
|
||||
declare module '*.vue' {
|
||||
import { type DefineComponent } from 'vue'
|
||||
import { type DefineComponent } from 'vue'
|
||||
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ meta:
|
||||
|
||||
<script lang="ts" setup name="TabExampleNested1">
|
||||
import useKeepAliveStore from '@/store/modules/keepAlive'
|
||||
|
||||
const keepAliveStore = useKeepAliveStore()
|
||||
</script>
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ meta:
|
||||
|
||||
<script lang="ts" setup name="TabExampleNested2">
|
||||
import useKeepAliveStore from '@/store/modules/keepAlive'
|
||||
|
||||
const keepAliveStore = useKeepAliveStore()
|
||||
</script>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ meta:
|
||||
<script lang="ts" setup>
|
||||
import { ElNotification } from 'element-plus'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
function getPermission() {
|
||||
|
||||
@@ -27,7 +27,7 @@ const handleSuccess: UploadProps['onSuccess'] = (res) => {
|
||||
ElMessage.warning(res.error)
|
||||
}
|
||||
}
|
||||
const editPassword = () => {
|
||||
function editPassword() {
|
||||
router.push({
|
||||
name: 'personalEditPassword',
|
||||
})
|
||||
@@ -42,7 +42,7 @@ const editPassword = () => {
|
||||
<h2>基本设置</h2>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="16">
|
||||
<el-form ref="formRef" :model="form" label-width="120px" label-suffix=":">
|
||||
<el-form :model="form" label-width="120px" label-suffix=":">
|
||||
<el-form-item label="名 称">
|
||||
<el-input v-model="form.name" placeholder="请输入你的名称" />
|
||||
</el-form-item>
|
||||
|
||||
Reference in New Issue
Block a user