You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.4 KiB
35 lines
1.4 KiB
1 year ago
|
<template>
|
||
|
<dialog-form
|
||
|
:name="$t('menu.{{camelCase path}}.{{camelCase name}}')"
|
||
|
:queryBean="query{{pascalCase name}}"
|
||
|
:createBean="create{{pascalCase name}}"
|
||
|
:updateBean="update{{pascalCase name}}"
|
||
|
:deleteBean="delete{{pascalCase name}}"
|
||
|
:beanId="beanId"
|
||
|
:beanIds="beanIds"
|
||
|
:focus="focus"
|
||
|
:initValues="() => ({})"
|
||
|
:toValues="(bean) => ({ ...bean })"
|
||
|
perms="{{camelCase name}}"
|
||
|
:model-value="modelValue"
|
||
|
@update:model-value="$emit('update:modelValue', $event)"
|
||
|
@finished="$emit('finished')"
|
||
|
>
|
||
|
<template #default="{ values }">
|
||
|
<el-form-item prop="name" :label="$t('{{camelCase name}}.name')" :rules="{ required: true, message: () => $t('v.required') }">
|
||
|
<el-input v-model="values.name" ref="focus" maxlength="50"></el-input>
|
||
|
</el-form-item>
|
||
|
</template>
|
||
|
</dialog-form>
|
||
|
</template>
|
||
|
|
||
|
<script setup lang="ts">
|
||
|
import { defineProps, defineEmits, ref } from 'vue';
|
||
|
import { query{{pascalCase name}}, create{{pascalCase name}}, update{{pascalCase name}}, delete{{pascalCase name}} } from '@/api/{{kebabCase path}}';
|
||
|
import DialogForm from '@/components/DialogForm.vue';
|
||
|
|
||
|
defineProps({ modelValue: { type: Boolean, required: true }, beanId: { required: true }, beanIds: { type: Array, required: true } });
|
||
|
defineEmits({ 'update:modelValue': null, finished: null });
|
||
|
const focus = ref<any>();
|
||
|
</script>
|