style: format code for all

This commit is contained in:
LZHD
2021-07-06 01:01:42 +08:00
committed by 踏学吾痕
parent e1200f2dbe
commit 77a1a47110
114 changed files with 7068 additions and 1068 deletions

View File

@@ -23,8 +23,18 @@
<vxe-table-column field="dataval" title="数据值"></vxe-table-column>
<vxe-table-column title="操作" fixed="right">
<template #default="{ row }">
<vxe-button type="text" icon="el-icon-edit" @click="editConfig(row)">编辑</vxe-button>
<vxe-button type="text" icon="el-icon-delete" @click="delConfig(row)">删除</vxe-button>
<vxe-button
type="text"
icon="el-icon-edit"
@click="editConfig(row)"
>编辑</vxe-button
>
<vxe-button
type="text"
icon="el-icon-delete"
@click="delConfig(row)"
>删除</vxe-button
>
</template>
</vxe-table-column>
</vxe-table>
@@ -33,7 +43,16 @@
v-model:current-page="tablePage.currentPage"
v-model:page-size="tablePage.pageSize"
:total="tablePage.total"
:layouts="['PrevJump', 'PrevPage', 'Number', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'Total']"
:layouts="[
'PrevJump',
'PrevPage',
'Number',
'NextPage',
'NextJump',
'Sizes',
'FullJump',
'Total'
]"
>
<template #left>
<span class="page-left">
@@ -42,7 +61,9 @@
:indeterminate="isIndeterminate"
@change="changeAllEvent"
></vxe-checkbox>
<span class="select-count">已选中{{ selectRecords.length }}</span>
<span class="select-count"
>已选中{{ selectRecords.length }}</span
>
<vxe-button size="small">{{ $t("message.hsdelete") }}</vxe-button>
</span>
</template>
@@ -53,7 +74,7 @@
</template>
<script lang="ts">
import { defineComponent, reactive, toRefs, ref } from "vue";
import { defineComponent, reactive, toRefs } from "vue";
import { propTypes } from "/@/utils/propTypes";
import { VxeTableEvents } from "vxe-table";
import { templateRef } from "@vueuse/core";
@@ -92,7 +113,7 @@ export default defineComponent({
});
// 抽屉关闭
function handleClose(done) {
function handleClose() {
configData.isAllChecked = false;
configData.isIndeterminate = false;
emit("handleClose");

View File

@@ -1,26 +1,34 @@
.<template>
.
<template>
<div class="dict-container">
<!-- 工具栏 -->
<vxe-toolbar>
<template #buttons>
<vxe-input v-model="filterName" :placeholder="$t('message.hssearch')" @keyup="searchEvent"></vxe-input>
<vxe-input
v-model="filterName"
:placeholder="$t('message.hssearch')"
@keyup="searchEvent"
></vxe-input>
</template>
<template #tools>
<vxe-button
icon="el-icon-circle-plus-outline"
status="primary"
@click="onAdd"
>{{$t('message.hsadd')}}</vxe-button>
>{{ $t("message.hsadd") }}</vxe-button
>
<vxe-button
icon="el-icon-folder-opened"
status="primary"
@click="$refs.xTree.setAllTreeExpand(true)"
>{{$t('message.hsexpendAll')}}</vxe-button>
>{{ $t("message.hsexpendAll") }}</vxe-button
>
<vxe-button
icon="el-icon-folder"
status="primary"
@click="$refs.xTree.clearTreeExpand()"
>{{$t('message.hscollapseAll')}}</vxe-button>
>{{ $t("message.hscollapseAll") }}</vxe-button
>
</template>
</vxe-toolbar>
@@ -29,29 +37,51 @@
ref="xTree"
border
resizable
:tree-config="{children: 'children', iconOpen: 'fa fa-minus-square-o', iconClose: 'fa fa-plus-square-o'}"
:tree-config="{
children: 'children',
iconOpen: 'fa fa-minus-square-o',
iconClose: 'fa fa-plus-square-o'
}"
:data="tableData"
@cell-dblclick="cellDBLClickEvent"
>
<vxe-table-column tree-node field="name" title="字典名称"></vxe-table-column>
<vxe-table-column
tree-node
field="name"
title="字典名称"
></vxe-table-column>
<vxe-table-column title="字典类型">
<template #default="{ row }">
<el-tooltip effect="dark" :content="'双击复制:'+row.model" placement="right">
<el-tooltip
effect="dark"
:content="'双击复制:' + row.model"
placement="right"
>
<span class="text-model">{{ row.model }}</span>
</el-tooltip>
</template>
</vxe-table-column>
<vxe-table-column title="操作" width="330" fixed="right">
<template #default="{ row }">
<vxe-button type="text" icon="el-icon-edit" @click="onEdit(row)">编辑</vxe-button>
<vxe-button type="text" icon="el-icon-circle-plus-outline" @click="onAddChild(row)">新增子类型</vxe-button>
<vxe-button type="text" icon="el-icon-edit" @click="onEdit(row)"
>编辑</vxe-button
>
<vxe-button
type="text"
icon="el-icon-circle-plus-outline"
@click="onAddChild(row)"
>新增子类型</vxe-button
>
<vxe-button
v-show="row.model"
type="text"
icon="el-icon-setting"
@click="onDeploy(row)"
>字典配置</vxe-button>
<vxe-button type="text" icon="el-icon-delete" @click="confirmEvent">删除</vxe-button>
>字典配置</vxe-button
>
<vxe-button type="text" icon="el-icon-delete" @click="confirmEvent"
>删除</vxe-button
>
</template>
</vxe-table-column>
</vxe-table>
@@ -63,7 +93,7 @@
v-model="showEdit"
:title="selectRow ? '编辑' : '新增'"
:loading="submitLoading"
@hide="$refs.xForm.reset();"
@hide="$refs.xForm.reset()"
>
<template #default>
<vxe-form
@@ -80,7 +110,7 @@
<Config :drawer="drawer" drawTitle="字典列表" @handleClose="handleClose" />
</div>
</template>
<script lang="ts">
<script lang="ts">
import { reactive, ref, unref, nextTick, toRefs } from "vue";
import XEUtils from "xe-utils";
import { cloneDeep } from "lodash-es";
@@ -90,7 +120,6 @@ import {
VXETable,
VxeTableInstance,
VxeTableEvents,
VxeTablePropTypes,
VxeFormPropTypes
} from "vxe-table";
import Config from "./config.vue";
@@ -203,7 +232,7 @@ export default {
// 创建一个防防抖函数,调用频率间隔 100 毫秒
const searchEvent = XEUtils.debounce(
function() {
function () {
handleSearch();
},
100,
@@ -279,7 +308,7 @@ export default {
let drawer = ref(false);
function onDeploy(row: any) {
function onDeploy() {
drawer.value = true;
}
@@ -325,4 +354,4 @@ export default {
cursor: pointer;
}
}
</style>
</style>

View File

@@ -1,8 +1,8 @@
<template>
<vxe-grid v-bind="gridOptions" style="width:98%"></vxe-grid>
<vxe-grid v-bind="gridOptions" style="width: 98%"></vxe-grid>
</template>
<script lang='ts'>
<script lang="ts">
import { reactive } from "vue";
import { VxeGridProps } from "vxe-table";
export default {
@@ -249,5 +249,4 @@ export default {
};
</script>
<style scoped>
</style>
<style scoped></style>