新增modal跳转
This commit is contained in:
parent
5cbdbf137d
commit
291290d7f1
@ -4,7 +4,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vue-tsc --noEmit && vite build",
|
"build": "vue-tsc --noEmit && vite build",
|
||||||
"serve": "vite preview",
|
|
||||||
"lint": "eslint \"{src}/**/*.{vue,ts,tsx}\" --fix --ext"
|
"lint": "eslint \"{src}/**/*.{vue,ts,tsx}\" --fix --ext"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -173,9 +173,6 @@ const handleSelect = (key: string) => {
|
|||||||
case 'edit':
|
case 'edit':
|
||||||
editHandle()
|
editHandle()
|
||||||
break
|
break
|
||||||
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
v-model:show="modalShow"
|
v-model:show="modalShow"
|
||||||
:cardData="modalData"
|
:cardData="modalData"
|
||||||
@close="closeModal"
|
@close="closeModal"
|
||||||
|
@edit="editHandle"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
<template v-for="item in fnBtnList" :key="item.key">
|
<template v-for="item in fnBtnList" :key="item.key">
|
||||||
<n-tooltip placement="bottom" trigger="hover">
|
<n-tooltip placement="bottom" trigger="hover">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<n-button size="small">
|
<n-button size="small" @click="handleSelect(item.key)">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<component :is="item.icon" />
|
<component :is="item.icon" />
|
||||||
</template>
|
</template>
|
||||||
@ -78,7 +78,7 @@ import { AppleControlBtn } from '@/components/AppleControlBtn'
|
|||||||
|
|
||||||
const { HammerIcon } = icon.ionicons5
|
const { HammerIcon } = icon.ionicons5
|
||||||
|
|
||||||
const emit = defineEmits(['close'])
|
const emit = defineEmits(['close', 'edit'])
|
||||||
|
|
||||||
const t = window['$t']
|
const t = window['$t']
|
||||||
|
|
||||||
@ -102,6 +102,19 @@ const fnBtnList = reactive([
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
const handleSelect = (key: string) => {
|
||||||
|
switch (key) {
|
||||||
|
case 'edit':
|
||||||
|
editHandle()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 编辑处理
|
||||||
|
const editHandle = () => {
|
||||||
|
emit('edit', props.cardData)
|
||||||
|
}
|
||||||
|
|
||||||
// 关闭对话框
|
// 关闭对话框
|
||||||
const closeHandle = () => {
|
const closeHandle = () => {
|
||||||
emit('close')
|
emit('close')
|
||||||
|
6
src/views/project/items/index.d.ts
vendored
6
src/views/project/items/index.d.ts
vendored
@ -1,7 +1,11 @@
|
|||||||
export type CardType = {
|
export type Chartype = {
|
||||||
id: number | string
|
id: number | string
|
||||||
title: string // 标题
|
title: string // 标题
|
||||||
lableId: string | number
|
lableId: string | number
|
||||||
label: string // 标签
|
label: string // 标签
|
||||||
release: number // 0未发布 | 1已发布
|
release: number // 0未发布 | 1已发布
|
||||||
|
icon: any
|
||||||
|
['string']: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type ChartList = Chartype[]
|
@ -31,7 +31,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { computed } from 'node_modules/vue/dist/vue'
|
|
||||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||||
import { CreateModal } from './components/CreateModal/index'
|
import { CreateModal } from './components/CreateModal/index'
|
||||||
import { icon } from '@/plugins'
|
import { icon } from '@/plugins'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user