<template>
  <el-form ref="ruleFormRef" :model="newFormInline" label-width="82px">
    <el-row :gutter="30">
      <re-col :value="24" :xm="24" :sm="24">
        <el-form-item label="配置名称" prop="name">
          <el-input
            v-model="newFormInline.name"
            clearable
            placeholder="请输入配置名称"
          />
        </el-form-item>
      </re-col>
      <re-col :value="24" :xm="24" :sm="24">
        <el-form-item label="配置键名" prop="key">
          <el-input
            v-model="newFormInline.key"
            clearable
            placeholder="请输入配置键名~"
          />
        </el-form-item>
      </re-col>
      <re-col :value="24" :xm="24" :sm="24">
        <el-form-item label="配置键值" prop="value">
          <el-input
            v-model="newFormInline.value"
            clearable
            placeholder="请输入配置内容~"
          />
        </el-form-item>
      </re-col>
      <re-col :value="24" :xm="24" :sm="24">
        <el-form-item label="系统内置" prop="type">
          <el-radio-group v-model="newFormInline.type">
            <el-radio :value="true"> 是 </el-radio>
            <el-radio :value="false"> 否 </el-radio>
          </el-radio-group>
        </el-form-item>
      </re-col>
      <re-col :value="24" :xm="24" :sm="24">
        <el-form-item label="备注" prop="remark">
          <el-input
            v-model="newFormInline.remark"
            type="textarea"
            clearable
            placeholder="请输入内容"
          />
        </el-form-item>
      </re-col>
    </el-row>
  </el-form>
</template>
<script setup lang="ts">
import { ref } from "vue";
import ReCol from "@/components/ReCol";
import { ConfigInfo } from "types/system";
interface FormItemProps {
  /** 主键ID */
  id: string;
  /** 创建人 */
  create_by: string;
  /** 创建时间 */
  create_time: string;
  /** 更新人 */
  update_by: string;
  /** 更新时间 */
  update_time: string;
  /**配置名称 */
  name: string;
  /**配置键 */
  key: string;
  /**配置值 */
  value: string;
  /**系统配置 */
  type: boolean;
  /**备注 */
  remark: string;
}
interface FormProps {
  formInline: FormItemProps;
}
const props = withDefaults(defineProps<FormProps>(), {
  formInline: () => ({
    /** 主键ID */
    id: "",
    /** 创建人 */
    create_by: "",
    /** 创建时间 */
    create_time: "",
    /** 更新人 */
    update_by: "",
    /** 更新时间 */
    update_time: "",
    /**配置名称 */
    name: "",
    /**配置键 */
    key: "",
    /**配置值 */
    value: "",
    /**系统配置 */
    type: true,
    /**备注 */
    remark: ""
  })
});
const newFormInline = ref<ConfigInfo>(props.formInline);

defineExpose({ newFormInline });
</script>
