|
@@ -0,0 +1,74 @@
|
|
|
+<template>
|
|
|
+ <a-modal
|
|
|
+ title="设置子表字段(SetSonList)"
|
|
|
+ width="45%"
|
|
|
+ :visible="visible"
|
|
|
+ :maskClosable="false"
|
|
|
+ switchFullscreen
|
|
|
+ @ok = "handleOk"
|
|
|
+ @cancel="handleCancel">
|
|
|
+ <div>
|
|
|
+ <a-card :body-style="{ padding: '10px' }" :bordered="false" style="margin: 10px;">
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
+ <a-form :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" :rules="rules" ref="formRef">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :md="24" :sm="24">
|
|
|
+ <a-form-item label="数值(numerical value)" name="numericalValue">
|
|
|
+ <a-input-number placeholder="请输入" v-model:value="form.numericalValue" style="width: 100%;"></a-input-number>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
+ </a-modal>
|
|
|
+</template>
|
|
|
+<script lang="ts" setup>
|
|
|
+ import {ref, reactive } from 'vue';
|
|
|
+ var visible = ref(false);
|
|
|
+ const emit = defineEmits([ 'success']); //定义emit
|
|
|
+ var form = ref({
|
|
|
+ numericalValue:''
|
|
|
+ });
|
|
|
+ var formRef = ref();
|
|
|
+ const labelCol = ref({
|
|
|
+ xs: { span: 24 },
|
|
|
+ sm: { span: 5 },
|
|
|
+ });
|
|
|
+ const wrapperCol = ref({
|
|
|
+ xs: { span: 24 },
|
|
|
+ sm: { span: 19 },
|
|
|
+ });
|
|
|
+ const rules = {
|
|
|
+ numericalValue: [{required: true,message: '请输入数值',},],
|
|
|
+ }
|
|
|
+ function handleOk(){
|
|
|
+ formRef.value .validate().then(() => {
|
|
|
+ emit('success',form.value)
|
|
|
+ handleCancel()
|
|
|
+ }).catch((error) => {
|
|
|
+ console.log('error', error);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function handleCancel(){
|
|
|
+ visible.value = false;
|
|
|
+ form.value.numericalValue=''
|
|
|
+ formRef.value.resetFields();
|
|
|
+ }
|
|
|
+ function getTable(){
|
|
|
+ visible.value = true
|
|
|
+ }
|
|
|
+ defineExpose({
|
|
|
+ getTable
|
|
|
+ });
|
|
|
+</script>
|
|
|
+<style scoped lang="less">
|
|
|
+/deep/.ant-form-item{
|
|
|
+ margin-bottom: 8px !important;
|
|
|
+}
|
|
|
+// /deep/.ant-table-wrapper .ant-table-thead > tr > th, .ant-table-wrapper .ant-table-thead > tr > td{
|
|
|
+// padding: 8px !important;
|
|
|
+// }
|
|
|
+
|
|
|
+</style>
|