import Test from './app.vue'
import ToggleButton from './components/toggle-button/toggle-button.vue';
import OrganizationChart from './components/organization-chart/organization-chart.vue';
import HongqiTable from './components/hongqiTable/hongqiTable.vue';
import BtnInTable from './components/hongqiTable/btnInTable.vue';
import DivideLine from './components/hongqiTable/divideLine.vue';
import Transform from './components/transform/transform.vue';
import AdvanceSearch from './components/fastQuerySearch/advanceSearch.vue';
import FastQuerySearch from './components/fastQuerySearch/fastQuerySearch.vue';
import ImageCropper from './components/imageCropper/imageCropper.vue';
import HongqiGrid from './components/HongqiGrid/grid.vue';
const defaultOptions = {
	hongqiTable:{
		index: true,
		selection: false,
		exportExcel: false,
		page: true,
		pageSizeOpts: [10, 20, 50, 100],
		toolbar: true,
		size: 'default',
		headerTool: true,
		height: null,
		maxHeight:null,
		subtotal: null,
		stripe: false,
		border: true,
		showHeader: true,
		width: 'auto',
		disabledHover: false,
		noDataText: '暂无数据',
		allSortAble:true,
		draggable:false,
		tooltipTheme:'light',
		rowKey:false
	}
};
const pagination={
	install:function (Vue, opts = {}) {
		Vue.prototype.$HqComponents  = Object.assign({},defaultOptions,opts)
		Vue.component('Test',Test);
		Vue.component('ToggleButton',ToggleButton);
		Vue.component('OrganizationChart',OrganizationChart);
		Vue.component('HongqiTable',HongqiTable);
		Vue.component('BtnInTable',BtnInTable);
		Vue.component('DivideLine',DivideLine);
		Vue.component('Transform',Transform);
		Vue.component('AdvanceSearch',AdvanceSearch);
		Vue.component('FastQuerySearch',FastQuerySearch);
		Vue.component('ImageCropper',ImageCropper);
		Vue.component('HongqiGrid',HongqiGrid)
	}
};
// 这里的判断很重要
if (typeof window !== 'undefined' && window.Vue) {
  	window.Vue.use(pagination)
}
export default pagination