Skip to content

Commit

Permalink
style: lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
crlang committed Jun 26, 2022
1 parent 7ada4c3 commit d854c63
Show file tree
Hide file tree
Showing 222 changed files with 1,186 additions and 1,487 deletions.
3 changes: 1 addition & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
<meta name="renderer" content="webkit" />
<meta
name="viewport"
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
/>
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<title><%= title %></title>
<link rel="icon" href="/favicon.ico" />
</head>
Expand Down
8 changes: 6 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ useTitle()
if ((process.env.NODE_ENV || '') === 'production') {
const { pkg, lastBuildTime } = __APP_INFO__
const { name, version } = pkg
console.info(` %c ${name} %c 版本${version} %c 构建时间${lastBuildTime} `, 'color: #fadfa3; background: #030307; padding:5px 0;', 'color: #fadfa3; background: #4D4A48; padding:5px 0;', 'background: #fadfa3; padding:5px 0;')
console.info(
` %c ${name} %c 版本${version} %c 构建时间${lastBuildTime} `,
'color: #fadfa3; background: #030307; padding:5px 0;',
'color: #fadfa3; background: #4D4A48; padding:5px 0;',
'background: #fadfa3; padding:5px 0;'
)
}
</script>
6 changes: 2 additions & 4 deletions src/api/demo/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ enum Api {
export const getAccountList = (params: AccountParams) =>
defHttp.get<AccountListGetResultModel>({ url: Api.AccountList, params })

export const getDeptList = (params?: DeptListItem) =>
defHttp.get<DeptListGetResultModel>({ url: Api.DeptList, params })
export const getDeptList = (params?: DeptListItem) => defHttp.get<DeptListGetResultModel>({ url: Api.DeptList, params })

export const getMenuList = (params?: MenuParams) =>
defHttp.get<MenuListGetResultModel>({ url: Api.MenuList, params })
export const getMenuList = (params?: MenuParams) => defHttp.get<MenuListGetResultModel>({ url: Api.MenuList, params })

export const getRoleListByPage = (params?: RolePageParams) =>
defHttp.get<RolePageListGetResultModel>({ url: Api.RolePageList, params })
Expand Down
2 changes: 1 addition & 1 deletion src/api/model/baseModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export interface BasicPageParams {

export interface BasicFetchResult<T> {
items: T[]
page: number,
page: number
total: number
}
5 changes: 1 addition & 4 deletions src/api/sys/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ const { uploadUrl = '' } = useGlobSetting()
/**
* @description: Upload interface
*/
export function uploadApi(
params: UploadFileParams,
onUploadProgress?: (progressEvent: ProgressEvent) => void
) {
export function uploadApi(params: UploadFileParams, onUploadProgress?: (progressEvent: ProgressEvent) => void) {
return defHttp.uploadFile<UploadApiResult>(
{
url: uploadUrl,
Expand Down
11 changes: 0 additions & 11 deletions src/components/Application/src/AppProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,9 @@
import { defineComponent, ref, unref } from 'vue'
import { createAppProviderContext } from './useAppContext'
import { createBreakpointListen } from '@/hooks/event/useBreakpoint'
// import { prefixCls } from '@/settings/designSetting'
import { useAppStore } from '@/store/modules/app'
import { MenuModeEnum, MenuTypeEnum } from '@/enums/menuEnum'
// const props = {
/**
* class style prefix
*/
// prefixCls: { type: String, default: prefixCls },
// }
export default defineComponent({
name: 'AppProvider',
inheritAttrs: false,
Expand All @@ -33,11 +25,8 @@ export default defineComponent({
handleRestoreState()
})
// const { prefixCls } = toRefs(props)
// Inject variables into the global
createAppProviderContext({
// prefixCls,
isMobile,
})
Expand Down
41 changes: 19 additions & 22 deletions src/components/Basic/src/BasicHelp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ export default defineComponent({
return () => {
return (
<ElTooltip
popper-class={`${prefixCls}__wrap`}
effect={props.effect}
placement={props.placement} >
<ElTooltip popper-class={`${prefixCls}__wrap`} effect={props.effect} placement={props.placement}>
{{
content: () => renderTitle(),
default: () => <span class={prefixCls}>{getSlot(slots) || <SvgIcon name={'info-fill'} />}</span>,
Expand All @@ -96,28 +93,28 @@ export default defineComponent({
</script>

<style lang="scss">
$prefix-cls: '#{$tonyname}-basic-help';
$prefix-cls: '#{$tonyname}-basic-help';
.#{$prefix-cls} {
display: inline-block;
margin-left: 6px;
font-size: 0.875rem;
color: var(--text-secondary-color);
cursor: pointer;
.#{$prefix-cls} {
display: inline-block;
margin-left: 6px;
font-size: 0.875rem;
color: var(--text-secondary-color);
cursor: pointer;
&:hover {
color: var(--primary-color);
}
&:hover {
color: var(--primary-color);
}
svg {
width: 1em;
height: 1em;
}
svg {
width: 1em;
height: 1em;
}
&__wrap {
p {
margin-bottom: 0;
}
&__wrap {
p {
margin-bottom: 0;
}
}
}
</style>
1 change: 0 additions & 1 deletion src/components/Basic/src/BasicTitle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export default defineComponent({
return { prefixCls, getClass }
},
})
</script>

<style lang="scss">
Expand Down
7 changes: 3 additions & 4 deletions src/components/BasicDescription/src/BasicDescription.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default defineComponent({
}
return (
<ElDescriptionsItem {...(unref(item))}>
<ElDescriptionsItem {...unref(item)}>
{() => {
if (!minWidth) {
return getContent()
Expand All @@ -117,8 +117,7 @@ export default defineComponent({
minWidth: `${minWidth}px`,
}
return <div style={style}>{getContent()}</div>
}
}
}}
</ElDescriptionsItem>
)
})
Expand All @@ -132,7 +131,7 @@ export default defineComponent({
*/
const renderDesc = () => {
return (
<ElDescriptions class={`${prefixCls}`} {...(unref(getBindValues))}>
<ElDescriptions class={`${prefixCls}`} {...unref(getBindValues)}>
{renderItem()}
</ElDescriptions>
)
Expand Down
24 changes: 12 additions & 12 deletions src/components/BasicDescription/src/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ export const customProps = {
default: () => [],
},
/**
* 描述数据
*
* Description data
*/
* 描述数据
*
* Description data
*/
data: { type: Object },
/**
* 是否包含折叠组件
*
* Whether to include the collapse component
*/
* 是否包含折叠组件
*
* Whether to include the collapse component
*/
useCollapse: {
type: Boolean,
default: true,
},
/**
* 折叠组件配置
*
* Collapse component configuration
*/
* 折叠组件配置
*
* Collapse component configuration
*/
collapseOptions: {
type: Object as PropType<CollapseBasicProps>,
default: null,
Expand Down
5 changes: 1 addition & 4 deletions src/components/BasicDescription/src/typing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ export interface DescItem extends EleDescriptionsItem {
*
* Custom rendering description item content (VNode)
*/
render?: (
val: any,
data: Recordable,
) => JSX.Element | undefined | Element | string | number
render?: (val: any, data: Recordable) => JSX.Element | undefined | Element | string | number
}

/**
Expand Down
11 changes: 6 additions & 5 deletions src/components/BasicDrawer/src/BasicDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
<span
:class="`${prefixCls}-header__back`"
v-if="isDetail"
@click="handleClose()"><SvgIcon
@click="handleClose()">
<SvgIcon
name="arrow-right"
:size="16"
rotate="180deg" /></span>
rotate="180deg" />
</span>

<BasicTitle
:class="`${prefixCls}-header__title`">
<BasicTitle :class="`${prefixCls}-header__title`">
<template v-if="title">{{ title || '' }}</template>
<template v-else><slot name="title"></slot></template>
</BasicTitle>
Expand Down Expand Up @@ -168,7 +169,7 @@ export default defineComponent({
const { closeFn } = unref(getProps)
if (typeof closeFn === 'function') {
const isClose:boolean = await closeFn()
const isClose: boolean = await closeFn()
visibleRef.value = !isClose
return
} else {
Expand Down
80 changes: 40 additions & 40 deletions src/components/BasicDrawer/src/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,58 @@ import { EleDrawerProps } from '@/components/ElementPlus'
export const customProps = {
modelValue: { type: Boolean },
/**
* 抽屉标题
*
* Drawer title
*/
* 抽屉标题
*
* Drawer title
*/
title: { type: String },
/**
* 是否为详情模式(带返回按钮)
*
* Whether it is in detail mode (with back button)
*/
* 是否为详情模式(带返回按钮)
*
* Whether it is in detail mode (with back button)
*/
isDetail: Boolean,
/**
* 是否显示加载状态
*
* Whether to show loading
*/
* 是否显示加载状态
*
* Whether to show loading
*/
loading: Boolean,
/**
* 加载提示文字
*
* Loading text
*/
* 加载提示文字
*
* Loading text
*/
loadingText: String,
/**
* 关闭前触发的方法
*
* Method triggered before closing
*/
* 关闭前触发的方法
*
* Method triggered before closing
*/
closeFn: {
type: Function as PropType<(arg?: Recordable) => Promise<boolean>>,
default: null,
},
/**
* 是否显示脚部
*
* Whether to display the footer
*/
* 是否显示脚部
*
* Whether to display the footer
*/
showFooter: Boolean,
/**
* 是否显示确认按钮
*
* Whether to show the confirm button
*/
* 是否显示确认按钮
*
* Whether to show the confirm button
*/
showConfirmBtn: {
type: Boolean,
default: true,
},
/**
* 确认按钮配置,同 ElButton
*
* Confirm button configuration, same as ElButton
*/
* 确认按钮配置,同 ElButton
*
* Confirm button configuration, same as ElButton
*/
confirmOptions: {
type: Object as PropType<EleButton>,
default: {
Expand All @@ -65,19 +65,19 @@ export const customProps = {
},
},
/**
* 是否显示取消按钮
*
* Whether to show the cancel button
*/
* 是否显示取消按钮
*
* Whether to show the cancel button
*/
showCancelBtn: {
type: Boolean,
default: true,
},
/**
* 取消按钮配置,同 ElButton
*
* Confirm button configuration, same as ElButton
*/
* 取消按钮配置,同 ElButton
*
* Confirm button configuration, same as ElButton
*/
cancelOptions: {
type: Object as PropType<EleButton>,
default: {
Expand Down
Loading

0 comments on commit d854c63

Please sign in to comment.