1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <CzrDialog
- :show="show"
- title="默认弹窗"
- @onClose="$emit('update:show', false)"
- width="1000px"
- height="auto"
- maxHeight="80%"
- :loading="state.loading"
- :show-submit="false"
- >
- <div class="__normal-form">
- <el-button @click="() => state.length++">新增一行</el-button>
- <el-button @click="() => state.length--">删除一行</el-button>
- <template v-for="(item, index) in state.length">
- <h1>{{ index }}</h1>
- </template>
- </div>
- </CzrDialog>
- </template>
- <script setup lang="ts">
- import {
- computed,
- getCurrentInstance,
- nextTick,
- reactive,
- ref,
- watch,
- } from 'vue'
- import { ElMessage, ElMessageBox } from 'element-plus'
- const emit = defineEmits(['update:show', 'refresh'])
- const { proxy } = getCurrentInstance()
- const props = defineProps({
- show: { default: false },
- transfer: {},
- })
- const state: any = reactive({
- loading: false,
- form: {},
- length: 10,
- })
- const ref_form = ref()
- watch(
- () => props.show,
- (n) => {},
- )
- </script>
- <style lang="scss" scoped></style>
|