refactor(frontend): ESLint vue code

This commit is contained in:
junjie 2021-03-11 14:36:02 +08:00
parent d8c66325a9
commit faeedeb1e9
6 changed files with 30 additions and 30 deletions

View File

@ -7,7 +7,7 @@
{{ $t('chart.datalist') }}
</span>
</el-row>
<el-divider/>
<el-divider />
<el-row>
<el-button icon="el-icon-circle-plus" type="primary" size="mini" @click="add('group')">
@ -101,7 +101,7 @@
<el-dialog :title="dialogTitle" :visible="editGroup" :show-close="false" width="30%">
<el-form ref="groupForm" :model="groupForm" :rules="groupFormRules">
<el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="groupForm.name"/>
<el-input v-model="groupForm.name" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -121,7 +121,7 @@
{{ $t('chart.back') }}
</el-button>
</el-row>
<el-divider/>
<el-divider />
<el-row>
<el-button type="primary" size="mini" plain @click="selectTable">
{{ $t('chart.add_chart') }}
@ -180,7 +180,7 @@
<el-dialog :title="$t('chart.chart')" :visible="editTable" :show-close="false" width="30%">
<el-form ref="tableForm" :model="tableForm" :rules="tableFormRules">
<el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="tableForm.name"/>
<el-input v-model="tableForm.name" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -197,7 +197,7 @@
width="70%"
class="dialog-css"
>
<table-selector @getTable="getTable"/>
<table-selector @getTable="getTable" />
<div slot="footer" class="dialog-footer">
<el-button size="mini" @click="selectTableFlag = false">{{ $t('chart.cancel') }}</el-button>
<el-button type="primary" size="mini" @click="createChart">{{ $t('chart.confirm') }}</el-button>

View File

@ -2,12 +2,12 @@
<ms-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
<ms-aside-container>
<group @switchComponent="switchComponent"/>
<group @switchComponent="switchComponent" />
</ms-aside-container>
<ms-main-container>
<!-- <router-view />-->
<component :is="component" :param="param" @switchComponent="switchComponent"/>
<component :is="component" :param="param" @switchComponent="switchComponent" />
</ms-main-container>
</ms-container>
</template>

View File

@ -14,7 +14,7 @@
</el-button>
</el-row>
</el-row>
<el-divider/>
<el-divider />
<el-row>
<el-form :inline="true">
<el-form-item class="form-item">
@ -60,10 +60,10 @@
import { listDatasource, post } from '@/api/dataset/dataset'
export default {
name: 'AddDB',
props: {
param: Object
},
name: 'AddDB',
data() {
return {
searchTable: '',

View File

@ -7,7 +7,7 @@
{{ $t('dataset.datalist') }}
</span>
</el-row>
<el-divider/>
<el-divider />
<el-row>
<el-form>
@ -59,7 +59,7 @@
{{ $t('dataset.back') }}
</el-button>
</el-row>
<el-divider/>
<el-divider />
<el-row>
<el-form>
<el-form-item class="form-item">
@ -85,8 +85,8 @@
({{ data.type }})
</span>
<span>
<span v-if="data.mode === 0" style="margin-left: 6px"><i class="el-icon-s-operation"/></span>
<span v-if="data.mode === 1" style="margin-left: 6px"><i class="el-icon-time"/></span>
<span v-if="data.mode === 0" style="margin-left: 6px"><i class="el-icon-s-operation" /></span>
<span v-if="data.mode === 1" style="margin-left: 6px"><i class="el-icon-time" /></span>
</span>
<span style="margin-left: 6px">{{ data.name }}</span>
</span>

View File

@ -15,17 +15,17 @@
<!-- </el-button>-->
</el-row>
</el-row>
<el-divider/>
<el-divider />
<el-tabs v-model="tabActive">
<el-tab-pane :label="$t('dataset.data_preview')" name="dataPreview">
<tab-data-preview :table="table" :fields="fields" :data="data"/>
<tab-data-preview :table="table" :fields="fields" :data="data" />
</el-tab-pane>
<el-tab-pane :label="$t('dataset.join_view')" name="joinView">
关联视图 TODO
</el-tab-pane>
<el-tab-pane v-if="table.mode === 1" :label="$t('dataset.update_info')" name="updateInfo">
<update-info :table="table"/>
<update-info :table="table" />
</el-tab-pane>
</el-tabs>
@ -40,17 +40,17 @@
</el-table-column>
<el-table-column property="name" :label="$t('dataset.field_name')" width="180">
<template slot-scope="scope">
<el-input v-model="scope.row.name" size="mini"/>
<el-input v-model="scope.row.name" size="mini" />
</template>
</el-table-column>
<el-table-column property="originName" :label="$t('dataset.field_origin_name')" width="180"/>
<el-table-column property="originName" :label="$t('dataset.field_origin_name')" width="180" />
<el-table-column property="checked" :label="$t('dataset.field_check')" width="80">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.checked"/>
<el-checkbox v-model="scope.row.checked" />
</template>
</el-table-column>
<!--下面这一列占位-->
<el-table-column property=""/>
<el-table-column property="" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button size="mini" @click="closeEdit">{{ $t('dataset.cancel') }}</el-button>

View File

@ -7,7 +7,7 @@
{{ $t('dataset.datalist') }}
</span>
</el-row>
<el-divider/>
<el-divider />
<el-row>
<el-button icon="el-icon-circle-plus" type="primary" size="mini" @click="add('group')">
@ -103,7 +103,7 @@
<el-dialog :title="dialogTitle" :visible="editGroup" :show-close="false" width="30%">
<el-form ref="groupForm" :model="groupForm" :rules="groupFormRules">
<el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="groupForm.name"/>
<el-input v-model="groupForm.name" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -124,7 +124,7 @@
{{ $t('dataset.back') }}
</el-button>
</el-row>
<el-divider/>
<el-divider />
<el-row>
<el-dropdown style="margin-right: 10px;" size="small" trigger="click" @command="clickAddData">
<el-button type="primary" size="mini" plain>
@ -178,8 +178,8 @@
({{ data.type }})
</span>
<span>
<span v-if="data.mode === 0" style="margin-left: 6px"><i class="el-icon-s-operation"/></span>
<span v-if="data.mode === 1" style="margin-left: 6px"><i class="el-icon-time"/></span>
<span v-if="data.mode === 0" style="margin-left: 6px"><i class="el-icon-s-operation" /></span>
<span v-if="data.mode === 1" style="margin-left: 6px"><i class="el-icon-time" /></span>
</span>
<span style="margin-left: 6px">{{ data.name }}</span>
</span>
@ -213,12 +213,12 @@
<el-dialog :title="$t('dataset.table')" :visible="editTable" :show-close="false" width="30%">
<el-form ref="tableForm" :model="tableForm" :rules="tableFormRules">
<el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="tableForm.name"/>
<el-input v-model="tableForm.name" />
</el-form-item>
<!-- <el-form-item :label="$t('dataset.mode')" prop="mode">-->
<!-- <el-radio v-model="tableForm.mode" label="0">{{ $t('dataset.direct_connect') }}</el-radio>-->
<!-- <el-radio v-model="tableForm.mode" label="1">{{ $t('dataset.sync_data') }}</el-radio>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('dataset.mode')" prop="mode">-->
<!-- <el-radio v-model="tableForm.mode" label="0">{{ $t('dataset.direct_connect') }}</el-radio>-->
<!-- <el-radio v-model="tableForm.mode" label="1">{{ $t('dataset.sync_data') }}</el-radio>-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="mini" @click="closeTable()">{{ $t('dataset.cancel') }}</el-button>