统一表格页面抛出操作按钮

main
许宏杰 1 week ago
parent 5b07233894
commit be041e1461

@ -3,26 +3,10 @@
<div class="filtrate-row">
<slot name="search"></slot>
</div>
<div class="table-list">
<div class="table-pagination">
<div class="table-operation">
<el-button
type="primary"
plain
v-show="options.add"
icon="Plus"
@click="clickAdd()"
>录入</el-button
>
<el-button
type="primary"
plain
v-show="options.export"
icon="Download"
@click="clickExport()"
>导出</el-button
>
<slot name="operation"></slot>
</div>
<div class="table-el">
<slot name="table"></slot>
@ -37,23 +21,7 @@
</template>
<script setup>
const props = defineProps({
options: {
type: Object,
default: {
add: true, //
export: true, //
},
},
});
const emits = defineEmits(["handlerAdd", "handlerExport"]);
const clickAdd = () => {
emits("handlerAdd");
};
const clickExport = () => {
emits("handlerExport");
};
</script>
<style lang="scss" scoped>

@ -1,5 +1,5 @@
<template>
<tablePage @handlerAdd="handlerAdd()" @handlerExport="handlerExport()">
<tablePage >
<template #search>
<el-form
:model="queryParams"
@ -84,6 +84,22 @@
</el-form-item>
</el-form>
</template>
<template #operation>
<el-button
type="primary"
plain
@handlerAdd="handlerAdd()"
icon="Plus"
>录入</el-button
>
<el-button
type="primary"
plain
@handlerExport="handlerExport()"
icon="Download"
>导出</el-button
>
</template>
<template #table>
<el-table
v-loading="loading"

@ -2,7 +2,8 @@ import { defineConfig, loadEnv } from 'vite'
import path from 'path'
import createVitePlugins from './vite/plugins'
const baseUrl = 'http://192.168.0.112:9116' // 后端接口
// const baseUrl = 'http://192.168.0.112:9116' // 后端接口
const baseUrl = 'http://36.213.9.3:9116' // 后端接口
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {

Loading…
Cancel
Save