替换var 为const/let

删除未使用import
替换 == 为 ===
This commit is contained in:
xingyu4j
2022-11-08 13:31:08 +08:00
parent c9e11e7636
commit 011dc23699
66 changed files with 305 additions and 319 deletions

View File

@@ -60,7 +60,7 @@
</div>
</template>
<script>
import { deepClone } from '@/utils/index'
import { deepClone } from '@/utils'
export default {
components: {},

View File

@@ -651,10 +651,10 @@
<script>
import { isArray } from 'util'
import TreeNodeDialog from './TreeNodeDialog'
import { isNumberStr } from '@/utils/index'
import { isNumberStr } from '@/utils'
import IconsDialog from './IconsDialog'
import {
inputComponents, selectComponents, layoutComponents
inputComponents, selectComponents
} from '@/components/generator/config'
import { saveFormConf } from '@/utils/db'

View File

@@ -71,7 +71,7 @@
</div>
</template>
<script>
import { isNumberStr } from '@/utils/index'
import { isNumberStr } from '@/utils'
import { getTreeNodeId, saveTreeNodeId } from '@/utils/db'
const id = getTreeNodeId()

View File

@@ -133,8 +133,8 @@ import {
inputComponents, selectComponents, layoutComponents, formConf
} from '@/components/generator/config'
import {
exportDefault, beautifierConf, isNumberStr, titleCase, deepClone
} from '@/utils/index'
beautifierConf, titleCase, deepClone
} from '@/utils'
import {
makeUpHtml, vueTemplate, vueScript, cssStyle
} from '@/components/generator/html'

View File

@@ -105,7 +105,7 @@
</el-form-item>
</el-col>
<el-col :span="24" v-if="info.genType == '1'">
<el-col :span="24" v-if="info.genType === '1'">
<el-form-item prop="genPath">
<span slot="label">
自定义路径
@@ -128,7 +128,7 @@
</el-col>
</el-row>
<el-row v-show="info.tplCategory == 'tree'">
<el-row v-show="info.tplCategory === 'tree'">
<h4 class="form-header">其他信息</h4>
<el-col :span="12">
<el-form-item>
@@ -185,7 +185,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-show="info.tplCategory == 'sub'">
<el-row v-show="info.tplCategory === 'sub'">
<h4 class="form-header">关联信息</h4>
<el-col :span="12">
<el-form-item>
@@ -314,7 +314,7 @@ export default {
},
/** 设置关联外键 */
setSubTableColumns(value) {
for (var item in this.tables) {
for (let item in this.tables) {
const name = this.tables[item].tableName;
if (value === name) {
this.subColumns = this.tables[item].columns;

View File

@@ -209,7 +209,7 @@ export default {
highlightedCode(item) {
// const vmName = key.substring(key.lastIndexOf("/") + 1, key.indexOf(".vm"));
// var language = vmName.substring(vmName.indexOf(".") + 1, vmName.length);
var language = item.filePath.substring(item.filePath.lastIndexOf(".") + 1);
const language = item.filePath.substring(item.filePath.lastIndexOf('.') + 1)
const result = hljs.highlight(language, item.code || "", true);
return result.value || '&nbsp;';
},

View File

@@ -13,7 +13,7 @@
<td><div class="cell">Redis版本</div></td>
<td><div class="cell" v-if="cache.info">{{ cache.info.redis_version }}</div></td>
<td><div class="cell">运行模式</div></td>
<td><div class="cell" v-if="cache.info">{{ cache.info.redis_mode == "standalone" ? "单机" : "集群" }}</div></td>
<td><div class="cell" v-if="cache.info">{{ cache.info.redis_mode === "standalone" ? "单机" : "集群" }}</div></td>
<td><div class="cell">端口</div></td>
<td><div class="cell" v-if="cache.info">{{ cache.info.tcp_port }}</div></td>
<td><div class="cell">客户端数</div></td>