feat: 添加了取消按钮

This commit is contained in:
wzp 2024-05-19 00:33:21 +08:00
parent 69404e6dec
commit 7bb008704e

View File

@ -66,6 +66,10 @@ const importAtlas = () => {
emit("addResource", data);
resourceData.value = [];
}
const cancel = () => {
emit("addResource", []);
resourceData.value = [];
}
const canImportAtlas = computed<boolean>(() => tableData.value.filter((e) => !e.load).length === 0);
</script>
@ -84,7 +88,10 @@ const canImportAtlas = computed<boolean>(() => tableData.value.filter((e) => !e.
</template>
</el-table-column>
</el-table>
<el-button v-if="canImportAtlas" @click="importAtlas" type="warning" style="margin-top: 10px">确定</el-button>
<div style="margin-top: 10px">
<el-button @click="cancel" type="primary" >取消</el-button>
<el-button v-if="canImportAtlas" @click="importAtlas" type="warning">确定</el-button>
</div>
</template>
<style scoped>