formatter code

This commit is contained in:
lbw 2023-04-10 23:57:01 +08:00
parent dd7ea74da8
commit c2161148d6
5 changed files with 24 additions and 27 deletions

View File

@ -63,7 +63,7 @@
:cell-style="tableStyle.cellStyle"
:header-cell-style="tableStyle.headerCellStyle"
>
<el-table-column :selectable="handleSelectable" align="center" type="selection" width="40"/>
<el-table-column :selectable="handleSelectable" align="center" type="selection" width="40" />
<el-table-column :label="t('param.index')" type="index" width="60" />
<el-table-column :label="t('param.publicName')" prop="publicName" show-overflow-tooltip />
<el-table-column :label="t('param.publicKey')" prop="publicKey" show-overflow-tooltip />

View File

@ -232,21 +232,21 @@ const onSubmit = async () => {
* @return {Promise} - 包含用户数据的 Promise 对象
*/
const getUserData = async (id) => {
try {
loading.value = true;
const { data } = await getObj(id);
Object.assign(dataForm, data);
if (data.roleList) {
dataForm.role = data.roleList.map(item => item.roleId);
}
if (data.postList) {
dataForm.post = data.postList.map(item => item.postId);
}
} catch (err:any) {
useMessage().error(err.msg);
} finally {
loading.value = false;
}
try {
loading.value = true;
const { data } = await getObj(id);
Object.assign(dataForm, data);
if (data.roleList) {
dataForm.role = data.roleList.map((item) => item.roleId);
}
if (data.postList) {
dataForm.post = data.postList.map((item) => item.postId);
}
} catch (err: any) {
useMessage().error(err.msg);
} finally {
loading.value = false;
}
};
//

View File

@ -8,7 +8,6 @@
</template>
<script lang="ts" name="modelView" setup>
import other from '/@/utils/other';
import { Session } from '/@/utils/storage';
const { proxy } = getCurrentInstance();
const route = useRoute();

View File

@ -6,7 +6,6 @@
</template>
<script lang="ts" name="modelView" setup>
import other from '/@/utils/other';
import { Session } from '/@/utils/storage';
const { proxy } = getCurrentInstance();
const route = useRoute();

View File

@ -341,17 +341,16 @@ const deleteMenu = () => {
};
const handleSave = async () => {
try {
await useMessageBox().confirm('确定要保存该菜单吗?');
await saveObj(accountId.value, { button: menuList });
await publishObj(accountId.value);
useMessage().error('发布成功');
} catch (err:any) {
useMessage().error(err.msg);
}
try {
await useMessageBox().confirm('确定要保存该菜单吗?');
await saveObj(accountId.value, { button: menuList });
await publishObj(accountId.value);
useMessage().error('发布成功');
} catch (err: any) {
useMessage().error(err.msg);
}
};
const deleteMaterial = () => {
tempObj.value.replyArticles = [];
tempObj.value.articleId = '';