优化template的结构,包一层,否则唯一标识不会生效

This commit is contained in:
阿辉
2024-11-23 15:55:43 +08:00
parent dac7ea90ae
commit 422f86da22

View File

@@ -1,4 +1,5 @@
<template>
<div>
<div v-show="props.showInput" style="width: 100%;" :class="props.class" :style="props.style">
<el-select v-if="props.inputType === 'selector'" v-model="data" suffix-icon="arrow-down" clearable
:multiple="props.multiple" placeholder="请选择文件" @click="selectVisiable = true && !props.disabled"
@@ -61,7 +62,7 @@
</div>
</div>
<el-dialog v-model="selectVisiable" :draggable="false" width="50%" :align-center="false"
@open="if (listData.length === 0) listRequest();" @closed="clear" modal-class="_overlay">
@open="if (listData.length === 0) listRequest();" @closed="clear" modal-class="">
<template #header>
<span class="el-dialog__title">文件选择</span>
<el-divider style="margin: 0;" />
@@ -112,6 +113,7 @@
<el-button type="primary" @click="selectVisiable = false">确定</el-button>
</template>
</el-dialog>
</div>
</template>
<script setup lang="ts">
@@ -259,10 +261,6 @@ onMounted(() => {
</script>
<style scoped>
._overlay {
width: unset !important;
}
.headerBar>* {
display: flex;
justify-content: space-between;