perf:修复大多数文件的 linter(首次)
This commit is contained in:
@@ -74,8 +74,8 @@ const props = defineProps<{
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'search': [data: SearchFormData]
|
||||
'reset': []
|
||||
search: [data: SearchFormData]
|
||||
reset: []
|
||||
}>()
|
||||
|
||||
const visible = ref(false)
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type {Dept} from '@/api/system/dept'
|
||||
import {getSimpleDeptList} from '@/api/system/dept'
|
||||
import {onMounted, ref, watch} from 'vue'
|
||||
import type { Dept } from '@/api/system/dept'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import { getSimpleDeptList } from '@/api/system/dept'
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
modelValue?: number
|
||||
@@ -47,15 +47,15 @@ watch(
|
||||
// 顶级部门或未选择,重置
|
||||
selectedValue.value = [0]
|
||||
} else {
|
||||
selectedValue.value = []
|
||||
selectedValue.value = []
|
||||
}
|
||||
// 重新构建第一列,确保正确
|
||||
if (deptList.value.length > 0) {
|
||||
initFirstColumn()
|
||||
initFirstColumn()
|
||||
}
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
{ immediate: true },
|
||||
)
|
||||
|
||||
/** 初始化第一列 */
|
||||
@@ -65,12 +65,12 @@ function initFirstColumn() {
|
||||
deptColumns.value = [
|
||||
[
|
||||
{ label: '顶级部门', value: 0 },
|
||||
...topDepts.map(item => ({ value: item.id, label: item.name }))
|
||||
]
|
||||
...topDepts.map(item => ({ value: item.id, label: item.name })),
|
||||
],
|
||||
]
|
||||
} else {
|
||||
deptColumns.value = [
|
||||
topDepts.map(item => ({ value: item.id, label: item.name }))
|
||||
topDepts.map(item => ({ value: item.id, label: item.name })),
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,10 +80,10 @@ import type { Dept } from '@/api/system/dept'
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { useToast } from 'wot-design-uni'
|
||||
import { createDept, getDept, updateDept } from '@/api/system/dept'
|
||||
import UserPicker from '@/pages-system/user/form/components/user-picker.vue'
|
||||
import { navigateBackPlus } from '@/utils'
|
||||
import { CommonStatusEnum } from '@/utils/constants'
|
||||
import DeptPicker from './components/dept-picker.vue'
|
||||
import UserPicker from '@/pages-system/user/form/components/user-picker.vue'
|
||||
import {navigateBackPlus} from '@/utils';
|
||||
|
||||
const props = defineProps<{
|
||||
id?: number | any
|
||||
|
||||
@@ -35,7 +35,7 @@ const props = withDefaults(defineProps<{
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:modelValue': [value: number]
|
||||
back: [] // 返回上一层级事件
|
||||
'back': [] // 返回上一层级事件
|
||||
}>()
|
||||
|
||||
const breadcrumbs = ref<BreadcrumbNode[]>([]) // 面包屑路径(不包含根目录)
|
||||
@@ -47,12 +47,13 @@ const breadcrumbItems = computed(() => [
|
||||
|
||||
const currentParentId = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val) => emit('update:modelValue', val),
|
||||
set: val => emit('update:modelValue', val),
|
||||
}) // 当前父节点编号
|
||||
|
||||
/** 面包屑点击 */
|
||||
function handleClick(index: number) {
|
||||
if (index === breadcrumbItems.value.length - 1) return // 点击当前层级不处理
|
||||
if (index === breadcrumbItems.value.length - 1)
|
||||
return // 点击当前层级不处理
|
||||
if (index === 0) {
|
||||
breadcrumbs.value = []
|
||||
currentParentId.value = 0
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
菜单状态
|
||||
</view>
|
||||
<wd-radio-group v-model="formData.status" shape="button">
|
||||
<wd-radio v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)" :key="dict.value" :value="dict.value">
|
||||
<wd-radio v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)" :key="dict.value" :value="dict.value">
|
||||
{{ dict.label }}
|
||||
</wd-radio>
|
||||
</wd-radio-group>
|
||||
@@ -53,8 +53,8 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, reactive, ref, watch } from 'vue'
|
||||
import { DICT_TYPE } from '@/utils/constants'
|
||||
import { getIntDictOptions } from '@/hooks/useDict'
|
||||
import { DICT_TYPE } from '@/utils/constants'
|
||||
|
||||
/** 搜索表单数据 */
|
||||
export interface SearchFormData {
|
||||
@@ -67,8 +67,8 @@ const props = defineProps<{
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'search': [data: SearchFormData]
|
||||
'reset': []
|
||||
search: [data: SearchFormData]
|
||||
reset: []
|
||||
}>()
|
||||
|
||||
const visible = ref(false)
|
||||
|
||||
@@ -126,8 +126,8 @@ import { computed, onMounted, ref } from 'vue'
|
||||
import { useToast } from 'wot-design-uni'
|
||||
import { createMenu, getMenu, updateMenu } from '@/api/system/menu'
|
||||
import { getIntDictOptions } from '@/hooks/useDict'
|
||||
import { CommonStatusEnum, DICT_TYPE, SystemMenuTypeEnum } from '@/utils/constants'
|
||||
import { navigateBackPlus } from '@/utils'
|
||||
import { CommonStatusEnum, DICT_TYPE, SystemMenuTypeEnum } from '@/utils/constants'
|
||||
import MenuPicker from './components/menu-picker.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -85,8 +85,8 @@ const props = defineProps<{
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'search': [data: SearchFormData]
|
||||
'reset': []
|
||||
search: [data: SearchFormData]
|
||||
reset: []
|
||||
}>()
|
||||
|
||||
const visible = ref(false)
|
||||
|
||||
@@ -30,7 +30,7 @@ const selectedIds = ref<number[]>([])
|
||||
const columns = computed(() => {
|
||||
return postList.value.map(item => ({
|
||||
label: item.name,
|
||||
value: item.id
|
||||
value: item.id,
|
||||
}))
|
||||
})
|
||||
|
||||
@@ -39,7 +39,7 @@ watch(
|
||||
(val) => {
|
||||
selectedIds.value = val || []
|
||||
},
|
||||
{ immediate: true }
|
||||
{ immediate: true },
|
||||
)
|
||||
|
||||
async function loadPostList() {
|
||||
|
||||
@@ -85,8 +85,8 @@ const props = defineProps<{
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'search': [data: SearchFormData]
|
||||
'reset': []
|
||||
search: [data: SearchFormData]
|
||||
reset: []
|
||||
}>()
|
||||
|
||||
const visible = ref(false)
|
||||
|
||||
@@ -65,8 +65,8 @@ const props = defineProps<{
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'search': [data: SearchFormData]
|
||||
'reset': []
|
||||
search: [data: SearchFormData]
|
||||
reset: []
|
||||
}>()
|
||||
|
||||
const visible = ref(false)
|
||||
|
||||
@@ -73,11 +73,11 @@ import { computed, onMounted, ref } from 'vue'
|
||||
import { useToast } from 'wot-design-uni'
|
||||
import { deleteUser, getUser, updateUserStatus } from '@/api/system/user'
|
||||
import { useAccess } from '@/hooks/useAccess'
|
||||
import { navigateBackPlus } from '@/utils'
|
||||
import { CommonStatusEnum, DICT_TYPE } from '@/utils/constants'
|
||||
import { formatDateTime } from '@/utils/date'
|
||||
import PasswordForm from './components/password-form.vue'
|
||||
import RoleAssignForm from './components/role-assign-form.vue'
|
||||
import { navigateBackPlus } from '@/utils';
|
||||
|
||||
const props = defineProps<{
|
||||
id?: number | any
|
||||
|
||||
@@ -21,7 +21,7 @@ const props = withDefaults(defineProps<{
|
||||
label?: string
|
||||
}>(), {
|
||||
type: 'checkbox',
|
||||
label: '负责人'
|
||||
label: '负责人',
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -35,7 +35,7 @@ const selectedId = ref<number | string | number[]>([])
|
||||
const columns = computed(() => {
|
||||
return userList.value.map(user => ({
|
||||
label: user.nickname,
|
||||
value: user.id
|
||||
value: user.id,
|
||||
}))
|
||||
})
|
||||
|
||||
@@ -50,7 +50,7 @@ watch(
|
||||
selectedId.value = Array.isArray(val) ? val : []
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
{ immediate: true },
|
||||
)
|
||||
|
||||
async function loadUserList() {
|
||||
|
||||
@@ -105,11 +105,11 @@ import { computed, onMounted, ref } from 'vue'
|
||||
import { useToast } from 'wot-design-uni'
|
||||
import { createUser, getUser, updateUser } from '@/api/system/user'
|
||||
import { getIntDictOptions } from '@/hooks/useDict'
|
||||
import { CommonStatusEnum, DICT_TYPE } from '@/utils/constants'
|
||||
import { isEmail, isMobile } from '@/utils/validator'
|
||||
import DeptPicker from '@/pages-system/dept/form/components/dept-picker.vue'
|
||||
import PostPicker from '@/pages-system/post/form/components/post-picker.vue'
|
||||
import { navigateBackPlus } from '@/utils';
|
||||
import { navigateBackPlus } from '@/utils'
|
||||
import { CommonStatusEnum, DICT_TYPE } from '@/utils/constants'
|
||||
import { isEmail, isMobile } from '@/utils/validator'
|
||||
|
||||
const props = defineProps<{
|
||||
id?: number | any
|
||||
|
||||
@@ -88,8 +88,8 @@ import { getUserPage } from '@/api/system/user'
|
||||
import { useAccess } from '@/hooks/useAccess'
|
||||
import { navigateBackPlus } from '@/utils'
|
||||
import { DICT_TYPE } from '@/utils/constants'
|
||||
import { formatDate } from '@/utils/date'
|
||||
import SearchForm from './components/search-form.vue'
|
||||
import { formatDate } from '@/utils/date';
|
||||
|
||||
definePage({
|
||||
style: {
|
||||
|
||||
Reference in New Issue
Block a user