style: 调整代码格式,去除多余代码
This commit is contained in:
parent
f46e6ad8c8
commit
763173de44
@ -39,7 +39,6 @@ export const useDataListInit = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改页数
|
// 修改页数
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { ref, Ref } from 'vue'
|
import { ref, Ref } from 'vue'
|
||||||
import { ChartEnum } from '@/enums/pageEnum'
|
import { ChartEnum } from '@/enums/pageEnum'
|
||||||
import { fetchPathByName, routerTurnByPath } from '@/utils'
|
import { fetchPathByName, routerTurnByPath } from '@/utils'
|
||||||
import { Chartype } from '../../..'
|
import { Chartype } from '../../../index.d'
|
||||||
export const useModalDataInit = () => {
|
export const useModalDataInit = () => {
|
||||||
const modalShow = ref<boolean>(false)
|
const modalShow = ref<boolean>(false)
|
||||||
const modalData = ref<Chartype | null>(null)
|
const modalData = ref<Chartype | null>(null)
|
||||||
@ -14,14 +14,14 @@ export const useModalDataInit = () => {
|
|||||||
|
|
||||||
// 打开 modal
|
// 打开 modal
|
||||||
const resizeHandle = (cardData: Chartype) => {
|
const resizeHandle = (cardData: Chartype) => {
|
||||||
if(!cardData) return
|
if (!cardData) return
|
||||||
modalShow.value = true
|
modalShow.value = true
|
||||||
modalData.value = cardData
|
modalData.value = cardData
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开 modal
|
// 打开 modal
|
||||||
const editHandle = (cardData: Chartype) => {
|
const editHandle = (cardData: Chartype) => {
|
||||||
if(!cardData) return
|
if (!cardData) return
|
||||||
const path = fetchPathByName(ChartEnum.CHART_HOME_NAME, 'href')
|
const path = fetchPathByName(ChartEnum.CHART_HOME_NAME, 'href')
|
||||||
routerTurnByPath(path, [cardData.id], undefined, true)
|
routerTurnByPath(path, [cardData.id], undefined, true)
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ import { useDataListInit } from './hooks/useData.hook'
|
|||||||
|
|
||||||
const { CopyIcon, EllipsisHorizontalCircleSharpIcon } = icon.ionicons5
|
const { CopyIcon, EllipsisHorizontalCircleSharpIcon } = icon.ionicons5
|
||||||
const { modalData, modalShow, closeModal, resizeHandle, editHandle } = useModalDataInit()
|
const { modalData, modalShow, closeModal, resizeHandle, editHandle } = useModalDataInit()
|
||||||
const { paginat, list, changeSize,changePage, fetchList, deleteHandle } = useDataListInit()
|
const { paginat, list, changeSize,changePage, deleteHandle } = useDataListInit()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user