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