mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-11 06:57:10 +08:00
fix: 修复文件重命名时不能回显原值的问题
This commit is contained in:
@@ -14,11 +14,17 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { FileItem } from '@/apis'
|
||||
import type { FormInstance } from '@arco-design/web-vue'
|
||||
|
||||
interface Props {
|
||||
data: FileItem
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {})
|
||||
|
||||
const formRef = ref<FormInstance>()
|
||||
const form = reactive({
|
||||
name: ''
|
||||
name: props.data?.name || ''
|
||||
})
|
||||
|
||||
defineExpose({ formRef })
|
||||
|
@@ -12,6 +12,7 @@ export function openFileRenameModal(data: FileItem, callback?: () => void) {
|
||||
width: '90%',
|
||||
content: () =>
|
||||
h(ModalContent, {
|
||||
data,
|
||||
ref: (e) => {
|
||||
ModalContentRef.value = e as any
|
||||
}
|
||||
|
@@ -17,7 +17,13 @@
|
||||
</a-dropdown>
|
||||
|
||||
<a-input-group>
|
||||
<a-input v-model="queryForm.name" placeholder="请输入文件名" allow-clear @change="search" />
|
||||
<a-input
|
||||
v-model="queryForm.name"
|
||||
placeholder="请输入文件名"
|
||||
allow-clear
|
||||
style="width: 200px"
|
||||
@change="search"
|
||||
/>
|
||||
<a-button type="primary" @click="search">
|
||||
<template #icon>
|
||||
<icon-search />
|
||||
@@ -47,11 +53,11 @@
|
||||
<template #default>{{ isBatchMode ? '取消批量' : '批量操作' }}</template>
|
||||
</a-button>
|
||||
<a-button-group>
|
||||
<a-tooltip content="视图" position="bottom">
|
||||
<a-button @click="toggleMode">
|
||||
<a-tooltip content="视图">
|
||||
<a-button class="gi_hover_btn-border" @click="toggleMode">
|
||||
<template #icon>
|
||||
<icon-apps v-if="mode === 'grid'" />
|
||||
<icon-list v-else />
|
||||
<icon-list v-if="mode === 'grid'" />
|
||||
<icon-apps v-else />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
Reference in New Issue
Block a user