mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2025-04-30 14:19:01 +08:00
fix: lint fix
This commit is contained in:
parent
7dde0bbfc6
commit
f28e3a946e
@ -145,6 +145,7 @@ async function handleQuery() {
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error)
|
||||
tableData.value = []
|
||||
pagination.itemCount = 0
|
||||
}
|
||||
|
@ -144,11 +144,12 @@ async function handleOk(data) {
|
||||
// 调用onOk函数,传入data参数
|
||||
const res = await modalOptions.value.onOk(data)
|
||||
// 如果onOk函数的返回值不为false,则关闭模态框
|
||||
res !== false && close()
|
||||
if (res !== false)
|
||||
close()
|
||||
}
|
||||
catch (error) {
|
||||
okLoading.value = false
|
||||
console.error(error)
|
||||
okLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,11 +164,12 @@ async function handleCancel(data) {
|
||||
const res = await modalOptions.value.onCancel(data)
|
||||
|
||||
// 如果onCancel函数的返回值不为false,则关闭模态框
|
||||
res !== false && close()
|
||||
if (res !== false)
|
||||
close()
|
||||
}
|
||||
catch (error) {
|
||||
okLoading.value = false
|
||||
console.error(error)
|
||||
okLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,7 @@ export function useCrud({ name, initForm = {}, doCreate, doDelete, doUpdate, ref
|
||||
data && refresh(data)
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error)
|
||||
okLoading.value = false
|
||||
return false
|
||||
}
|
||||
@ -103,6 +104,7 @@ export function useCrud({ name, initForm = {}, doCreate, doDelete, doUpdate, ref
|
||||
refresh(data, true)
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error)
|
||||
d.loading = false
|
||||
}
|
||||
},
|
||||
|
@ -119,7 +119,8 @@ function handleHideDropdown() {
|
||||
|
||||
function handleSelect(key) {
|
||||
const actionFn = actionMap.get(key)
|
||||
actionFn && actionFn()
|
||||
if (typeof actionFn === 'function')
|
||||
actionFn()
|
||||
handleHideDropdown()
|
||||
}
|
||||
</script>
|
||||
|
@ -47,6 +47,7 @@ class Storage {
|
||||
return def
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error)
|
||||
this.remove(key)
|
||||
return def
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ import icons from 'isme:icons'
|
||||
const { copy, copied } = useClipboard()
|
||||
|
||||
watch(copied, (val) => {
|
||||
val && $message.success('已复制到剪切板')
|
||||
if (val)
|
||||
$message.success('已复制到剪切板')
|
||||
})
|
||||
</script>
|
||||
|
@ -70,7 +70,8 @@ const imgList = reactive([
|
||||
])
|
||||
|
||||
watch(copied, (val) => {
|
||||
val && $message.success('已复制到剪切板')
|
||||
if (val)
|
||||
$message.success('已复制到剪切板')
|
||||
})
|
||||
|
||||
function onBeforeUpload({ file }) {
|
||||
|
@ -28,8 +28,8 @@
|
||||
:on-update:selected-keys="onSelect"
|
||||
key-field="code"
|
||||
label-field="name"
|
||||
default-expand-all
|
||||
block-line
|
||||
|
||||
block-line default-expand-all
|
||||
/>
|
||||
</n-space>
|
||||
|
||||
@ -115,6 +115,7 @@ function handleDelete(item) {
|
||||
emit('update:currentMenu', null)
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error)
|
||||
$message.destroy('deleteMenu')
|
||||
}
|
||||
},
|
||||
|
@ -231,6 +231,7 @@ function handleDeleteBtn(id) {
|
||||
d.loading = false
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error)
|
||||
d.loading = false
|
||||
}
|
||||
},
|
||||
@ -248,6 +249,7 @@ async function handleEnable(item) {
|
||||
item.enableLoading = false
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error)
|
||||
item.enableLoading = false
|
||||
}
|
||||
}
|
||||
|
@ -74,9 +74,8 @@
|
||||
:data="permissionTree"
|
||||
:checked-keys="modalForm.permissionIds"
|
||||
:on-update:checked-keys="(keys) => (modalForm.permissionIds = keys)"
|
||||
checkable
|
||||
check-on-click
|
||||
default-expand-all
|
||||
|
||||
default-expand-all checkable check-on-click
|
||||
class="cus-scroll max-h-200 w-full"
|
||||
/>
|
||||
</n-form-item>
|
||||
@ -211,6 +210,7 @@ async function handleEnable(row) {
|
||||
$table.value?.handleSearch()
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error)
|
||||
row.enableLoading = false
|
||||
}
|
||||
}
|
||||
|
@ -279,6 +279,7 @@ async function handleEnable(row) {
|
||||
$table.value?.handleSearch()
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error)
|
||||
row.enableLoading = false
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user