index.js
1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import Confirm from './Confirm';
import SwitchButton from './SwitchButton';
import StatusIndicator from './StatusIndicator';
import Select from './Select';
import TreeSelect from './TreeSelect';
import ImageUpload from './ImageUpload';
import ImageMultipleUpload from './ImageUpload/multiple';
import ImageView from './ImageView';
import FileUpload from './FileUpload';
import Editor from './Editor';
import SvgIcon from './SvgIcon';
import Capital from './Capital';
import RadioGroup from './RadioGroup';
import RegionPicker from './RegionPicker';
import DistPicker from './DistPicker';
import QuillEditor from './Editor/register'; // quill编辑器
import Code from './Code';
const components = {
Confirm,
SwitchButton,
StatusIndicator,
Select,
TreeSelect,
ImageUpload,
ImageMultipleUpload,
ImageView,
FileUpload,
Editor,
SvgIcon,
Capital,
RadioGroup,
RegionPicker,
DistPicker,
Code
};
// 给组件库配置install方法
const install = function(Vue) {
// 注册编辑器
Vue.use(QuillEditor);
Object.values(components).forEach(component => {
// 配置组件名称
const name = 'Eagle' + component.name;
// 给每个子组件配置install方法
component.install = function (Vue) {
Vue.component(name, component);
};
// 将每个子组件注册为全局组件
Vue.component(name, component);
});
};
export default {
install,
...components
};