// 全局组件注册
import LayoutTable from '@/components/Table.vue';
import LayoutForm from '@/components/Form.vue';
import LayoutView from '@/components/View.vue';
import TableButtons from '@/components/tools/TableButtons';
import FormButtons from '@/components/tools/FormButtons';
import Breadcrumb from '@/components/Breadcrumb';
import MySwitch from '@/components/Switch';
import Confirm from '@/components/Confirm';
import FormField from '@/components/FormField';
import DescField from '@/components/DescField';
import Upload from '@/components/Upload';
import ImageUpload from '@/components/ImageUpload';
import FileUpload from '@/components/FileUpload';
import Editor from '@/components/Editor';
import Tree from '@/components/Tree';

const Prototype = function() {};

Prototype.install = (Vue, options) => {
  Vue.component('LayoutTable', LayoutTable) // 表格
  Vue.component('LayoutForm', LayoutForm) // 表单
  Vue.component('LayoutView', LayoutView) // 表单
  Vue.component('TableButtons', TableButtons) // 表格内的编辑和删除
  Vue.component('FormButtons', FormButtons) // 表单内的保存和取消
  Vue.component('Breadcrumb', Breadcrumb) // 面包屑导航
  Vue.component('DescField', DescField) // 描述字段
  Vue.component('Field', FormField) // 表单字段
  Vue.component('MySwitch', MySwitch) // 拨动开关
  Vue.component('Confirm', Confirm) // 局部确认窗口
  Vue.component('Upload', Upload) // 文件上传
  Vue.component('ImageUpload', ImageUpload) // 图片上传
  Vue.component('FileUpload', FileUpload) // 文件上传
  Vue.component('Editor', Editor) // 富文本
  Vue.component('Tree', Tree) // 富文本
}

export default Prototype;
