提交 a5c74589 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

feat: 修改eslint验证规则

上级 9bd75d6a
...@@ -195,6 +195,9 @@ module.exports = { ...@@ -195,6 +195,9 @@ module.exports = {
'object-curly-spacing': [2, 'always', { 'object-curly-spacing': [2, 'always', {
objectsInObjects: false objectsInObjects: false
}], }],
'array-bracket-spacing': [2, 'never'] 'array-bracket-spacing': [2, 'never'],
"vue/no-use-v-if-with-v-for": ["error", {
"allowUsingIterationVar": true
}]
} }
} }
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
@mouseleave="leave" @mouseleave="leave"
> >
<div <div
v-for="(handle, index) in actualHandles" v-for="(handlei, indexi) in actualHandles"
:key="index" :key="indexi"
:class="[classNameHandle, classNameHandle + '-' + handle]" :class="[classNameHandle, classNameHandle + '-' + handlei]"
:style="handleStyle(handle, index)" :style="handleStyle(handlei, indexi)"
@mousedown.stop.prevent="handleDown(handle, $event)" @mousedown.stop.prevent="handleDown(handlei, $event)"
@touchstart.stop.prevent="handleTouchDown(handle, $event)" @touchstart.stop.prevent="handleTouchDown(handlei, $event)"
> >
<slot :name="handle" /> <slot :name="handlei" />
</div> </div>
<slot /> <slot />
</div> </div>
...@@ -282,14 +282,17 @@ export default { ...@@ -282,14 +282,17 @@ export default {
type: String, type: String,
default: 'mouseOn' default: 'mouseOn'
}, },
// eslint-disable-next-line vue/require-default-prop
element: { element: {
require: true, require: true,
type: Object type: Object
}, },
// eslint-disable-next-line vue/require-default-prop
defaultStyle: { defaultStyle: {
require: true, require: true,
type: Object type: Object
}, },
// eslint-disable-next-line vue/require-default-prop
index: { index: {
require: true, require: true,
type: [Number, String] type: [Number, String]
...@@ -299,6 +302,7 @@ export default { ...@@ -299,6 +302,7 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
// eslint-disable-next-line vue/require-default-prop
changeStyle: { changeStyle: {
require: true, require: true,
type: Object type: Object
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
</template> </template>
<script> <script>
// eslint-disable-next-line no-unused-vars
import { DEFAULT_PANEL_STYLE } from '@/views/panel/panel' import { DEFAULT_PANEL_STYLE } from '@/views/panel/panel'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { deepCopy } from '@/components/canvas/utils/utils' import { deepCopy } from '@/components/canvas/utils/utils'
......
// eslint-disable-next-line no-unused-vars
import { BASE_CHART, BASE_CHART_STRING } from '@/views/chart/chart/chart' import { BASE_CHART, BASE_CHART_STRING } from '@/views/chart/chart/chart'
import { deepCopy } from '@/components/canvas/utils/utils' import { deepCopy } from '@/components/canvas/utils/utils'
...@@ -48,6 +50,7 @@ export function chartTransStr2Object(targetIn, copy) { ...@@ -48,6 +50,7 @@ export function chartTransStr2Object(targetIn, copy) {
} }
export function chartTransObject2Str(targetIn, deepCopy) { export function chartTransObject2Str(targetIn, deepCopy) {
// eslint-disable-next-line no-undef
const target = copy === 'Y' ? deepCopy(targetIn) : targetIn const target = copy === 'Y' ? deepCopy(targetIn) : targetIn
if (target.chart) { if (target.chart) {
if (target.chart.xaxis && typeof target.chart.xaxis !== 'string') { if (target.chart.xaxis && typeof target.chart.xaxis !== 'string') {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
</template> </template>
<script> <script>
// eslint-disable-next-line no-unused-vars
import { get, post } from '@/api/panel/panel' import { get, post } from '@/api/panel/panel'
export default { export default {
name: 'TemplateItem', name: 'TemplateItem',
......
...@@ -52,6 +52,7 @@ import LazyTree from './components/LazyTree' ...@@ -52,6 +52,7 @@ import LazyTree from './components/LazyTree'
export default { export default {
name: 'Authority', name: 'Authority',
// eslint-disable-next-line vue/no-unused-components
components: { LazyTree, DeMainContainer, DeAsideContainer, DeContainer }, components: { LazyTree, DeMainContainer, DeAsideContainer, DeContainer },
props: { props: {
resourceId: { resourceId: {
......
...@@ -20,6 +20,7 @@ import AuthQuickConfig from './authQuickConfig' ...@@ -20,6 +20,7 @@ import AuthQuickConfig from './authQuickConfig'
export default { export default {
name: 'Authority', name: 'Authority',
// eslint-disable-next-line vue/no-unused-components
components: { DeContainer, DeMainContainer, AuthConfig, AuthQuickConfig }, components: { DeContainer, DeMainContainer, AuthConfig, AuthQuickConfig },
data() { data() {
return { return {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论