2024-07-05 15:42:19 +08:00
|
|
|
|
// 导入组件
|
2024-09-05 18:34:12 +08:00
|
|
|
|
import agInput from './agInput/index';
|
|
|
|
|
import agSelect from './agSelect/index';
|
2024-09-12 09:53:40 +08:00
|
|
|
|
import agUpload from './agUpload';
|
2024-09-06 18:16:54 +08:00
|
|
|
|
import agForm from './agForm';
|
2024-09-09 14:27:02 +08:00
|
|
|
|
import agColorPicker from './agColorPicker';
|
2024-09-09 15:13:37 +08:00
|
|
|
|
import agQuery from './agQuery';
|
|
|
|
|
import agTable from './agTable';
|
|
|
|
|
import agTabs from './agTabs';
|
|
|
|
|
import agDialog from './agDialog';
|
|
|
|
|
import agPagination from './agPagination';
|
|
|
|
|
import agRow from './agRow';
|
|
|
|
|
import agCol from './agCol';
|
2024-09-10 10:09:09 +08:00
|
|
|
|
import agMutionCheckbox from './agMutionCheckbox';
|
2024-09-13 11:15:27 +08:00
|
|
|
|
import agSearch from './agSearch';
|
2024-09-10 10:09:09 +08:00
|
|
|
|
import agDatePicker from "./agDatePicker";
|
|
|
|
|
import agNumberRange from "./agNumberRange";
|
2024-09-12 19:23:13 +08:00
|
|
|
|
import agMultionDatePicker from "./agMultionDatePicker";
|
2024-09-13 11:15:27 +08:00
|
|
|
|
import agMultionInput from "./agMultionInput";
|
2024-09-09 15:13:37 +08:00
|
|
|
|
|
2024-09-05 17:32:53 +08:00
|
|
|
|
// 注册组件
|
|
|
|
|
|
2024-07-05 15:42:19 +08:00
|
|
|
|
// 组件列表
|
|
|
|
|
const components = [
|
|
|
|
|
agInput,
|
2024-09-05 18:34:12 +08:00
|
|
|
|
agSelect,
|
2024-09-12 09:53:40 +08:00
|
|
|
|
agUpload,
|
2024-09-09 14:27:02 +08:00
|
|
|
|
agForm,
|
2024-09-09 15:13:37 +08:00
|
|
|
|
agColorPicker,
|
|
|
|
|
agQuery,
|
|
|
|
|
agTable,
|
|
|
|
|
agDialog,
|
|
|
|
|
agTabs,
|
|
|
|
|
agPagination,
|
|
|
|
|
agCol,
|
2024-09-10 10:09:09 +08:00
|
|
|
|
agRow,
|
|
|
|
|
agDatePicker,
|
|
|
|
|
agMutionCheckbox,
|
2024-09-13 11:15:27 +08:00
|
|
|
|
agSearch,
|
2024-09-12 16:44:45 +08:00
|
|
|
|
agNumberRange,
|
2024-09-13 11:15:27 +08:00
|
|
|
|
agMultionDatePicker,
|
|
|
|
|
agMultionInput
|
2024-07-05 15:42:19 +08:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
// 定义 install 方法,接收 Vue 作为参数(使用 use 注册插件,那么所有的组件都会被注册)
|
|
|
|
|
const install = function (Vue) {
|
|
|
|
|
// 判断是否安装
|
|
|
|
|
if (install.installed) return
|
|
|
|
|
// 遍历注册全局组件
|
2024-09-10 10:09:09 +08:00
|
|
|
|
components.forEach(component => {
|
|
|
|
|
Vue.component(component.name, component);
|
|
|
|
|
});
|
2024-07-05 15:42:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 判断是否是直接引入文件
|
|
|
|
|
if (typeof window !== 'undefined' && window.Vue) {
|
|
|
|
|
install(window.Vue)
|
2024-09-10 10:09:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-07-05 15:42:19 +08:00
|
|
|
|
export default {
|
2024-09-10 10:09:09 +08:00
|
|
|
|
version:'2.15.14',
|
2024-07-05 15:42:19 +08:00
|
|
|
|
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
|
|
|
|
|
install,
|
|
|
|
|
// 以下是具体的组件列表
|
2024-09-12 16:44:45 +08:00
|
|
|
|
...components
|
2024-07-05 15:42:19 +08:00
|
|
|
|
}
|