/* 由'./build/bin/build-comps-index.js' 自动生成*/

import ViewUI from 'view-design';
import 'view-design/dist/styles/iview.css';

import Vue from 'vue'
/*import infiniteScroll from 'vue-infinite-scroll'

Vue.use(infiniteScroll)
Vue.use(Iview, {
     timePicker: {
         icon: ' uedicon ht-base-LiRa_time',
         customIcon:' uedicon ht-base-LiRa_time',
         iconSize: 16
     },
     select: {
         arrow: ' uedicon ht-base-LiRa_down',
         arrowSize: 12
     },
     datePicker: {
         icon: ' uedicon ht-base-LiRa_calendar',
         iconSize: 16
     }
 });
*/

import Base from './components/base/index.js';
import BaseAffix from './components/base-affix/index.js';
import BaseAlert from './components/base-alert/index.js';
import BaseAnchor from './components/base-anchor/index.js';
import BaseAnchorLink from './components/base-anchor-link/index.js';
import BaseAutoComplete from './components/base-auto-complete/index.js';
import BaseAvatar from './components/base-avatar/index.js';
import BaseBackTop from './components/base-back-top/index.js';
import BaseBadge from './components/base-badge/index.js';
import BaseBreadcrumb from './components/base-breadcrumb/index.js';
import BaseBreadcrumbItem from './components/base-breadcrumb-item/index.js';
import BaseButton from './components/base-button/index.js';
import BaseButtonCustormPay from './components/base-button-custorm-pay/index.js';
import BaseButtonCustorms from './components/base-button-custorms/index.js';
import BaseButtonGroup from './components/base-button-group/index.js';
import BaseCard from './components/base-card/index.js';
import BaseCardGridEmbedding from './components/base-card-grid-embedding/index.js';
import BaseCardMeta from './components/base-card-meta/index.js';
import BaseCarousel from './components/base-carousel/index.js';
import BaseCarouselItem from './components/base-carousel-item/index.js';
import BaseCascader from './components/base-cascader/index.js';
import BaseCheckbox from './components/base-checkbox/index.js';
import BaseCheckboxGroup from './components/base-checkbox-group/index.js';
import BaseCircle from './components/base-circle/index.js';
import BaseCol from './components/base-col/index.js';
import BaseCollapse from './components/base-collapse/index.js';
import BaseDatePicker from './components/base-date-picker/index.js';
import BaseDivider from './components/base-divider/index.js';
import BaseDrawer from './components/base-drawer/index.js';
import BaseDropdown from './components/base-dropdown/index.js';
import BaseDropdownItem from './components/base-dropdown-item/index.js';
import BaseDropdownMenu from './components/base-dropdown-menu/index.js';
import BaseForm from './components/base-form/index.js';
import BaseFormItem from './components/base-form-item/index.js';
import BaseIcon from './components/base-icon/index.js';
import BaseInput from './components/base-input/index.js';
import BaseInputNumber from './components/base-input-number/index.js';
import BaseList from './components/base-list/index.js';
import BaseListItem from './components/base-list-item/index.js';
import BaseListItemMeta from './components/base-list-item-meta/index.js';
import BaseLoadingBar from './components/base-loading-bar/index.js';
import BaseMenu from './components/base-menu/index.js';
import BaseMenuGroup from './components/base-menu-group/index.js';
import BaseMenuItem from './components/base-menu-item/index.js';
import BaseMessage from './components/base-message/index.js';
import BaseModal from './components/base-modal/index.js';
import BaseNotice from './components/base-notice/index.js';
import BaseOption from './components/base-option/index.js';
import BaseOptionGroup from './components/base-option-group/index.js';
import BasePage from './components/base-page/index.js';
import BasePoptip from './components/base-poptip/index.js';
import BaseProgress from './components/base-progress/index.js';
import BaseRadio from './components/base-radio/index.js';
import BaseRadioGroup from './components/base-radio-group/index.js';
import BaseRate from './components/base-rate/index.js';
import BaseRow from './components/base-row/index.js';
import BaseScroll from './components/base-scroll/index.js';
import BaseSearchBar from './components/base-search-bar/index.js';
import BaseSelect from './components/base-select/index.js';
import BaseSkeleton from './components/base-skeleton/index.js';
import BaseSpin from './components/base-spin/index.js';
import BaseStep from './components/base-step/index.js';
import BaseSteps from './components/base-steps/index.js';
import BaseSubmenu from './components/base-submenu/index.js';
import BaseSwitch from './components/base-switch/index.js';
import BaseTabPane from './components/base-tab-pane/index.js';
import BaseTable from './components/base-table/index.js';
import BaseTabs from './components/base-tabs/index.js';
import BaseTag from './components/base-tag/index.js';
import BaseTime from './components/base-time/index.js';
import BaseTimePicker from './components/base-time-picker/index.js';
import BaseTimeline from './components/base-timeline/index.js';
import BaseTimelineItem from './components/base-timeline-item/index.js';
import BaseTooltip from './components/base-tooltip/index.js';
import BaseTransfer from './components/base-transfer/index.js';
import BaseTransferTree from './components/base-transfer-tree/index.js';
import BaseTree from './components/base-tree/index.js';
import BaseUpload from './components/base-upload/index.js';

 //工具函数从这里引入,和声明
 //import VcUtils from './libs/utils'
 //window.VcUtils = VcUtilsu

const components = [
  Base,
  BaseAffix,
  BaseAlert,
  BaseAnchor,
  BaseAnchorLink,
  BaseAutoComplete,
  BaseAvatar,
  BaseBackTop,
  BaseBadge,
  BaseBreadcrumb,
  BaseBreadcrumbItem,
  BaseButton,
  BaseButtonCustormPay,
  BaseButtonCustorms,
  BaseButtonGroup,
  BaseCard,
  BaseCardGridEmbedding,
  BaseCardMeta,
  BaseCarousel,
  BaseCarouselItem,
  BaseCascader,
  BaseCheckbox,
  BaseCheckboxGroup,
  BaseCircle,
  BaseCol,
  BaseCollapse,
  BaseDatePicker,
  BaseDivider,
  BaseDrawer,
  BaseDropdown,
  BaseDropdownItem,
  BaseDropdownMenu,
  BaseForm,
  BaseFormItem,
  BaseIcon,
  BaseInput,
  BaseInputNumber,
  BaseList,
  BaseListItem,
  BaseListItemMeta,
  BaseLoadingBar,
  BaseMenu,
  BaseMenuGroup,
  BaseMenuItem,
  BaseMessage,
  BaseModal,
  BaseNotice,
  BaseOption,
  BaseOptionGroup,
  BasePage,
  BasePoptip,
  BaseProgress,
  BaseRadio,
  BaseRadioGroup,
  BaseRate,
  BaseRow,
  BaseScroll,
  BaseSearchBar,
  BaseSelect,
  BaseSkeleton,
  BaseSpin,
  BaseStep,
  BaseSteps,
  BaseSubmenu,
  BaseSwitch,
  BaseTabPane,
  BaseTable,
  BaseTabs,
  BaseTag,
  BaseTime,
  BaseTimePicker,
  BaseTimeline,
  BaseTimelineItem,
  BaseTooltip,
  BaseTransfer,
  BaseTransferTree,
  BaseTree,
  BaseUpload,
];
const install = function(Vue, opts = {}) {
  //当有全局组件需要注册到Vue.prototype或者window时,或者需要执行的语句,可以在component.index.tpl添加,例如
  //Vue.prototype.$alert = MessageBox.alert;
  //Vue.prototype.$BaseLoadingBar1 = Vue.prototype.$Loading;
  Vue.prototype.$HtBaseLoading = BaseLoadingBar
  Vue.prototype.$HtBaseMessage = BaseMessage
  Vue.prototype.$HtBaseNotice = BaseNotice
  Vue.prototype.$HtBaseModal = BaseModal
  //Vue.prototype.$HtBaseSpin = BaseSpin

  Vue.use(ViewUI)

  //Vue.prototype.$HtBaseMessage = BaseMessage

  components.map(component => {
    Vue.component(component.name, component);
  });

};

/* html通过script标签引入时自动注册全局vue*/
if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue);
};

export default {
  version: '2.0.1-beta',
  install,
  Base,
  BaseAffix,
  BaseAlert,
  BaseAnchor,
  BaseAnchorLink,
  BaseAutoComplete,
  BaseAvatar,
  BaseBackTop,
  BaseBadge,
  BaseBreadcrumb,
  BaseBreadcrumbItem,
  BaseButton,
  BaseButtonCustormPay,
  BaseButtonCustorms,
  BaseButtonGroup,
  BaseCard,
  BaseCardGridEmbedding,
  BaseCardMeta,
  BaseCarousel,
  BaseCarouselItem,
  BaseCascader,
  BaseCheckbox,
  BaseCheckboxGroup,
  BaseCircle,
  BaseCol,
  BaseCollapse,
  BaseDatePicker,
  BaseDivider,
  BaseDrawer,
  BaseDropdown,
  BaseDropdownItem,
  BaseDropdownMenu,
  BaseForm,
  BaseFormItem,
  BaseIcon,
  BaseInput,
  BaseInputNumber,
  BaseList,
  BaseListItem,
  BaseListItemMeta,
  BaseLoadingBar,
  BaseMenu,
  BaseMenuGroup,
  BaseMenuItem,
  BaseMessage,
  BaseModal,
  BaseNotice,
  BaseOption,
  BaseOptionGroup,
  BasePage,
  BasePoptip,
  BaseProgress,
  BaseRadio,
  BaseRadioGroup,
  BaseRate,
  BaseRow,
  BaseScroll,
  BaseSearchBar,
  BaseSelect,
  BaseSkeleton,
  BaseSpin,
  BaseStep,
  BaseSteps,
  BaseSubmenu,
  BaseSwitch,
  BaseTabPane,
  BaseTable,
  BaseTabs,
  BaseTag,
  BaseTime,
  BaseTimePicker,
  BaseTimeline,
  BaseTimelineItem,
  BaseTooltip,
  BaseTransfer,
  BaseTransferTree,
  BaseTree,
  BaseUpload
};

