Browse Source

fix: eslint

main
xingyu 2 years ago
parent
commit
430cdc4ec1
  1. 4
      src/components/Application/src/AppDarkModeToggle.vue
  2. 5
      src/components/Application/src/search/AppSearchFooter.vue
  3. 6
      src/components/CodeEditor/src/codemirror/codemirror.css
  4. 5
      src/components/ContextMenu/src/ContextMenu.vue
  5. 4
      src/components/Cropper/src/CopperModal.vue
  6. 2
      src/components/Drawer/src/BasicDrawer.vue
  7. 2
      src/components/Form/src/BasicForm.vue
  8. 2
      src/components/Form/src/components/ApiTree.vue
  9. 2
      src/components/Form/src/components/FileUpload.vue
  10. 13
      src/components/FormDesign/src/components/VFormDesign/index.vue
  11. 4
      src/components/Modal/src/index.less
  12. 5
      src/components/Page/src/PageFooter.vue
  13. 4
      src/components/StrengthMeter/src/StrengthMeter.vue
  14. 12
      src/design/theme.less
  15. 8
      src/design/transition/fade.less
  16. 5
      src/design/transition/index.less
  17. 8
      src/design/transition/zoom.less
  18. 9
      src/hooks/web/useLockPage.ts
  19. 3
      src/layouts/default/tabs/index.less
  20. 2
      src/utils/props.ts
  21. 2
      src/views/infra/codegen/components/PreviewModal.vue
  22. 2
      src/views/mp/components/WxMaterialSelect/index.vue
  23. 2
      src/views/mp/components/WxMsg/index.vue
  24. 2
      src/views/mp/components/WxMusic/index.vue
  25. 2
      src/views/mp/components/WxReply/index.vue
  26. 2
      src/views/mp/components/WxVideoPlay/index.vue
  27. 2
      src/views/mp/components/WxVoicePlay/index.vue

4
src/components/Application/src/AppDarkModeToggle.vue

@ -63,7 +63,9 @@ html[data-theme='dark'] {
height: 18px;
background-color: #fff;
border-radius: 50%;
transition: transform 0.5s, background-color 0.5s;
transition:
transform 0.5s,
background-color 0.5s;
will-change: transform;
}

5
src/components/Application/src/search/AppSearchFooter.vue

@ -41,7 +41,10 @@ const { t } = useI18n()
margin-right: 0.4em;
background-color: linear-gradient(-225deg, #d5dbe4, #f8f8f8);
border-radius: 2px;
box-shadow: inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #fff, 0 1px 2px 1px rgb(30 35 90 / 40%);
box-shadow:
inset 0 -2px 0 0 #cdcde6,
inset 0 0 1px 1px #fff,
0 1px 2px 1px rgb(30 35 90 / 40%);
align-items: center;
justify-content: center;

6
src/components/CodeEditor/src/codemirror/codemirror.css

@ -70,7 +70,11 @@
font-family: arial;
line-height: 0.3;
color: #414141;
text-shadow: #f96 1px 1px 2px, #f96 -1px -1px 2px, #f96 1px -1px 2px, #f96 -1px 1px 2px;
text-shadow:
#f96 1px 1px 2px,
#f96 -1px -1px 2px,
#f96 1px -1px 2px,
#f96 -1px 1px 2px;
cursor: pointer;
}

5
src/components/ContextMenu/src/ContextMenu.vue

@ -175,7 +175,10 @@ export default defineComponent({
background-color: @component-background;
border: 1px solid rgb(0 0 0 / 8%);
border-radius: 0.25rem;
box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 10%), 0 1px 5px 0 rgb(0 0 0 / 6%);
box-shadow:
0 2px 2px 0 rgb(0 0 0 / 14%),
0 3px 1px -2px rgb(0 0 0 / 10%),
0 1px 5px 0 rgb(0 0 0 / 6%);
background-clip: padding-box;
user-select: none;

4
src/components/Cropper/src/CopperModal.vue

@ -200,7 +200,9 @@ async function handleOk() {
background: #eee;
background-image: linear-gradient(45deg, rgb(0 0 0 / 25%) 25%, transparent 0, transparent 75%, rgb(0 0 0 / 25%) 0),
linear-gradient(45deg, rgb(0 0 0 / 25%) 25%, transparent 0, transparent 75%, rgb(0 0 0 / 25%) 0);
background-position: 0 0, 12px 12px;
background-position:
0 0,
12px 12px;
background-size: 24px 24px;
}

2
src/components/Drawer/src/BasicDrawer.vue

@ -1,7 +1,7 @@
<template>
<Drawer :class="prefixCls" @close="onClose" v-bind="getBindValues">
<template #title v-if="!$slots.title">
<DrawerHeader :title="(getMergeProps.title as any)" :isDetail="isDetail" :showDetailBack="showDetailBack" @close="onClose">
<DrawerHeader :title="getMergeProps.title as any" :isDetail="isDetail" :showDetailBack="showDetailBack" @close="onClose">
<template #titleToolbar>
<slot name="titleToolbar"></slot>
</template>

2
src/components/Form/src/BasicForm.vue

@ -103,7 +103,7 @@ const getRow = computed((): Recordable => {
}
})
const getBindValue = computed(() => ({ ...attrs, ...props, ...unref(getProps) } as Recordable))
const getBindValue = computed(() => ({ ...attrs, ...props, ...unref(getProps) }) as Recordable)
const getSchema = computed((): FormSchema[] => {
const schemas: FormSchema[] = unref(schemaRef) || (unref(getProps).schemas as any)

2
src/components/Form/src/components/ApiTree.vue

@ -1,5 +1,5 @@
<template>
<Tree v-bind="(getAttrs as any)" @change="handleChange">
<Tree v-bind="getAttrs as any" @change="handleChange">
<template #[item]="data" v-for="item in Object.keys(slots)">
<slot :name="item" v-bind="data || {}"></slot>
</template>

2
src/components/Form/src/components/FileUpload.vue

@ -3,7 +3,7 @@
<Upload
:headers="headers"
:multiple="multiple"
:action="(uploadUrl as any)"
:action="uploadUrl as any"
:fileList="fileList"
:disabled="disabled"
v-bind="bindProps"

13
src/components/FormDesign/src/components/VFormDesign/index.vue

@ -323,13 +323,14 @@ provide<IFormDesignMethods>('formDesignMethods', {
@prefix-cls: ~'@{namespace}-form-design';
[data-theme='dark'] {
.@{prefix-cls}-sider{
background-color: #1f1f1f;
}}
.@{prefix-cls}-sider {
background-color: #1f1f1f;
}
}
[data-theme='light'] {
.@{prefix-cls}-sider{
background-color: #fff;
}
.@{prefix-cls}-sider {
background-color: #fff;
}
}
</style>

4
src/components/Modal/src/index.less

@ -50,7 +50,9 @@
}
&-content {
box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);
box-shadow:
0 4px 8px 0 rgb(0 0 0 / 20%),
0 6px 20px 0 rgb(0 0 0 / 19%);
}
&-footer {

5
src/components/Page/src/PageFooter.vue

@ -34,7 +34,10 @@ const { getCalcContentWidth } = useMenuSetting()
line-height: 44px;
background-color: @component-background;
border-top: 1px solid @border-color-base;
box-shadow: 0 -6px 16px -8px rgb(0 0 0 / 8%), 0 -9px 28px 0 rgb(0 0 0 / 5%), 0 -12px 48px 16px rgb(0 0 0 / 3%);
box-shadow:
0 -6px 16px -8px rgb(0 0 0 / 8%),
0 -9px 28px 0 rgb(0 0 0 / 5%),
0 -12px 48px 16px rgb(0 0 0 / 3%);
transition: width 0.2s;
&__left {

4
src/components/StrengthMeter/src/StrengthMeter.vue

@ -92,7 +92,9 @@ watch(
height: inherit;
background-color: transparent;
border-radius: inherit;
transition: width 0.5s ease-in-out, background 0.25s;
transition:
width 0.5s ease-in-out,
background 0.25s;
&[data-score='0'] {
width: 20%;

12
src/design/theme.less

@ -33,11 +33,19 @@ html[data-theme='light'] {
}
.ant-card-grid-hoverable:hover {
box-shadow: 0 3px 6px -4px rgb(0 0 0 / 48%), 0 6px 16px 0 rgb(0 0 0 / 32%), 0 9px 28px 8px rgb(0 0 0 / 20%);
box-shadow:
0 3px 6px -4px rgb(0 0 0 / 48%),
0 6px 16px 0 rgb(0 0 0 / 32%),
0 9px 28px 8px rgb(0 0 0 / 20%);
}
.ant-card-grid {
box-shadow: 1px 0 0 0 #434343, 0 1px 0 0 #434343, 1px 1px 0 0 #434343, 1px 0 0 0 #434343 inset, 0 1px 0 0 #434343 inset;
box-shadow:
1px 0 0 0 #434343,
0 1px 0 0 #434343,
1px 1px 0 0 #434343,
1px 0 0 0 #434343 inset,
0 1px 0 0 #434343 inset;
}
.ant-calendar-selected-day .ant-calendar-date {

8
src/design/transition/fade.less

@ -43,7 +43,9 @@
// Speed: 1x
.fade-bottom-enter-active,
.fade-bottom-leave-active {
transition: opacity 0.25s, transform 0.3s;
transition:
opacity 0.25s,
transform 0.3s;
}
.fade-bottom-enter-from {
@ -79,7 +81,9 @@
// Speed: 1x
.fade-top-enter-active,
.fade-top-leave-active {
transition: opacity 0.2s, transform 0.25s;
transition:
opacity 0.2s,
transform 0.25s;
}
.fade-top-enter-from {

5
src/design/transition/index.less

@ -6,5 +6,8 @@
@import './zoom.less';
.collapse-transition {
transition: 0.2s height ease-in-out, 0.2s padding-top ease-in-out, 0.2s padding-bottom ease-in-out;
transition:
0.2s height ease-in-out,
0.2s padding-top ease-in-out,
0.2s padding-bottom ease-in-out;
}

8
src/design/transition/zoom.less

@ -1,7 +1,9 @@
// zoom-out
.zoom-out-enter-active,
.zoom-out-leave-active {
transition: opacity 0.1 ease-in-out, transform 0.15s ease-out;
transition:
opacity 0.1 ease-in-out,
transform 0.15s ease-out;
}
.zoom-out-enter-from,
@ -13,7 +15,9 @@
// zoom-fade
.zoom-fade-enter-active,
.zoom-fade-leave-active {
transition: transform 0.2s, opacity 0.3s ease-out;
transition:
transform 0.2s,
opacity 0.3s ease-out;
}
.zoom-fade-enter-from {

9
src/hooks/web/useLockPage.ts

@ -32,9 +32,12 @@ export function useLockPage() {
}
clear()
timeId = setTimeout(() => {
lockPage()
}, lockTime * 60 * 1000)
timeId = setTimeout(
() => {
lockPage()
},
lockTime * 60 * 1000
)
}
function lockPage(): void {

3
src/layouts/default/tabs/index.less

@ -25,7 +25,6 @@ html[data-theme='light'] {
}
}
}
}
.@{prefix-cls} {
@ -132,8 +131,6 @@ html[data-theme='light'] {
}
}
.ant-tabs-tab-active {
position: relative;
padding: 0 20px;

2
src/utils/props.ts

@ -150,7 +150,7 @@ export const buildProps = <
: never
}
export const definePropType = <T>(val: any) => ({ [wrapperKey]: val } as PropWrapper<T>)
export const definePropType = <T>(val: any) => ({ [wrapperKey]: val }) as PropWrapper<T>
export const keyOf = <T>(arr: T) => Object.keys(arr as any) as Array<keyof T>
export const mutable = <T extends readonly any[] | Record<string, unknown>>(val: T) => val as Mutable<typeof val>

2
src/views/infra/codegen/components/PreviewModal.vue

@ -17,7 +17,7 @@
<Tabs v-model:activeKey="activeKey">
<TabPane v-for="item in previewCodes" :key="item.filePath" :tab="item.filePath.substring(item.filePath.lastIndexOf('/') + 1)">
<a-button type="link" style="float: right" @click="copy(item.code)">复制</a-button>
<CodeEditor class="max-h-200" :value="(item.code as any)" :mode="modeValue" :readonly="true" />
<CodeEditor class="max-h-200" :value="item.code as any" :mode="modeValue" :readonly="true" />
</TabPane>
</Tabs>
</Card>

2
src/views/mp/components/WxMaterialSelect/index.vue

@ -1 +1 @@
<template><span>123</span> </template>
<template><span>123</span></template>

2
src/views/mp/components/WxMsg/index.vue

@ -1 +1 @@
<template><span>123</span> </template>
<template><span>123</span></template>

2
src/views/mp/components/WxMusic/index.vue

@ -1 +1 @@
<template><span>123</span> </template>
<template><span>123</span></template>

2
src/views/mp/components/WxReply/index.vue

@ -1 +1 @@
<template><span>123</span> </template>
<template><span>123</span></template>

2
src/views/mp/components/WxVideoPlay/index.vue

@ -1 +1 @@
<template><span>123</span> </template>
<template><span>123</span></template>

2
src/views/mp/components/WxVoicePlay/index.vue

@ -1 +1 @@
<template><span>123</span> </template>
<template><span>123</span></template>