Commit 5fb9441f authored by tanghao's avatar tanghao

Merge branch 'dev' into information

parents 022c1c01 279acb5f
......@@ -10,35 +10,33 @@
show-footer
>
<template #default>
<vxe-table ref="xTable" border :data="data" size="small" height="400">
<vxe-column v-for="column in titles"
<vxe-column
v-for="column in titles"
:key="item"
:field="column"
:title="column"
show-overflow
width="150">
width="150"
>
</vxe-column>
</vxe-table>
</template>
<template #footer>
<el-button type="primary" @click="exportRunData">导出</el-button>
<el-button type="primary" @click="showEdit = false">关闭</el-button>
</template>
</vxe-modal>
</template>
</template>
<script lang="ts">
import { defineComponent, ref, onMounted, reactive, watch, unref } from 'vue'
import { getCustomerPage } from '@/api/customer'
import type { VxeTableInstance } from 'vxe-table'
import { ElMessage } from 'element-plus'
<script lang="ts">
import { defineComponent, ref, onMounted, reactive, watch, unref } from 'vue'
import { getCustomerPage } from '@/api/customer'
import type { VxeTableInstance } from 'vxe-table'
import { ElMessage } from 'element-plus'
export default defineComponent({
export default defineComponent({
name: 'TemplateVariables',
props: {
visible: {
......@@ -60,7 +58,6 @@
const xTable = ref<VxeTableInstance>()
const tableData = ref([])
watch(
() => props.visible,
(val) => {
......@@ -68,18 +65,21 @@
}
)
const onHide = () => {
emit('update:visible', false)
}
const exportRunData = () => {
xTable.value?.exportData({ type: 'csv' })
}
return {
showEdit,
xTable,
tableData,
onHide,
exportRunData
}
}
})
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
})
</script>
<style lang="scss" scoped></style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment