<template>
  <nm-form-dialog ref="form" v-bind="form" v-on="on" :visible.sync="visible_">
    <el-row>
      <el-col :span="20" :offset="1">
        <el-form-item label="父类：" prop="parentId">
          <el-input v-model="form.model.parentId" clearable />
        </el-form-item>
        <el-form-item label="名称：" prop="name">
          <el-input v-model="form.model.name" clearable />
        </el-form-item>
        <el-form-item label="编码：" prop="code">
          <el-input v-model="form.model.code" clearable />
        </el-form-item>
        <el-form-item label="图标：" prop="icon">
          <el-input v-model="form.model.icon" clearable />
        </el-form-item>
        <el-form-item label="图片：" prop="imageUrl">
          <el-input v-model="form.model.imageUrl" clearable />
        </el-form-item>
        <el-form-item label="类型：" prop="type">
          <el-input v-model="form.model.type" clearable />
        </el-form-item>
        <el-form-item label="链接：" prop="url">
          <el-input v-model="form.model.url" clearable />
        </el-form-item>
        <el-form-item label="路由：" prop="route">
          <el-input v-model="form.model.route" clearable />
        </el-form-item>
        <el-form-item label="目标：" prop="target">
          <el-input v-model="form.model.target" clearable />
        </el-form-item>
        <el-form-item label="描述：" prop="description">
          <el-input v-model="form.model.description" clearable />
        </el-form-item>
        <el-form-item label="状态：" prop="status">
          <el-input v-model="form.model.status" clearable />
        </el-form-item>
        <el-form-item label="排序：" prop="sort">
          <el-input v-model="form.model.sort" clearable />
        </el-form-item>
        <el-form-item label="层级：" prop="level">
          <el-input v-model="form.model.level" clearable />
        </el-form-item>
      </el-col>
    </el-row>
  </nm-form-dialog>
</template>
<script>
import { mixins } from 'netmodular-ui'

const { add, edit, update } = $api.base.navMenu

export default {
  mixins: [mixins.formSave],
  data() {
    return {
      title: '导航菜单',
      actions: { add, edit, update },
      form: {
        model: {
          /** 父类 */
          parentId: '',
          /** 名称 */
          name: '',
          /** 编码 */
          code: '',
          /** 图标 */
          icon: '',
          /** 图片 */
          imageUrl: '',
          /** 类型 */
          type: '',
          /** 链接 */
          url: '',
          /** 路由 */
          route: '',
          /** 目标 */
          target: '',
          /** 描述 */
          description: '',
          /** 状态 */
          status: '',
          /** 排序 */
          sort: '',
          /** 层级 */
          level: ''
        },
        rules: {}
      }
    }
  }
}
</script>
