Skip to content

Commit ec9e29a

Browse files
committed
feat(resources): fix eslint problem
1 parent 9f75375 commit ec9e29a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

packages/plugins/resource/src/ResourceSetting.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<script>
3636
import { ref, reactive, computed } from 'vue'
3737
import { Button, Collapse, CollapseItem, Form, FormItem, Input } from '@opentiny/vue'
38-
import { useLayout, useNotify, getMetaApi, META_SERVICE } from '@opentiny/tiny-engine-meta-register'
38+
import { useLayout, useNotify } from '@opentiny/tiny-engine-meta-register'
3939
import { PluginSetting, ButtonGroup, SvgButton } from '@opentiny/tiny-engine-common'
4040
import { createResourceGroup, updateResourceGroup } from './js/http'
4141
@@ -53,7 +53,6 @@ const state = reactive({
5353
export const openResourceSettingPanel = (data) => {
5454
if (data) {
5555
state.data = { ...data }
56-
console.log(state.data)
5756
}
5857
isShow.value = true
5958
}
@@ -87,9 +86,12 @@ export default {
8786
})
8887
const saveResourceSetting = () => {
8988
generalForm.value.validate((valid) => {
89+
if (!valid) {
90+
return
91+
}
9092
if (state.data.id) {
9193
updateResourceGroup(state.data.id, { name: state.data.name, description: state.data.description })
92-
.then((res) => {
94+
.then(() => {
9395
emit('create-group')
9496
closeResourceSettingPanel()
9597
useNotify({ message: '修改资源分组成功', type: 'success' })
@@ -99,7 +101,7 @@ export default {
99101
})
100102
} else {
101103
createResourceGroup(state.data)
102-
.then((res) => {
104+
.then(() => {
103105
emit('create-group')
104106
closeResourceSettingPanel()
105107
useNotify({ message: '添加资源分组成功', type: 'success' })

0 commit comments

Comments
 (0)