afn-basic-components 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +22 -32
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "afn-basic-components",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "基础公共组件库 - 包含GlobalDrawer、MessagePopUp、ProTable等组件和样式",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -1,50 +1,40 @@
1
1
  // 导入组件
2
- import GlobalDrawer from './components/GlobalDrawer/index.vue'
3
- import MessagePopUp from './components/MessagePopUp/index.vue'
4
- import ProTable from './components/ProTable/index.vue'
2
+ import GlobalDrawer from "./components/GlobalDrawer/index.vue";
3
+ import MessagePopUp from "./components/MessagePopUp/index.vue";
4
+ import ProTable from "./components/ProTable/index.vue";
5
5
 
6
6
  // 导入样式
7
- import './styles/variables.scss'
8
- import './styles/btn.scss'
9
- import './styles/element-ui.scss'
10
- import './styles/index.scss'
11
- import './styles/sidebar.scss'
12
- import './styles/tags-view.scss'
13
- import './styles/transition.scss'
14
- import './styles/utils.scss'
7
+ import "./styles/variables.scss";
8
+ import "./styles/btn.scss";
9
+ import "./styles/element-ui.scss";
10
+ import "./styles/index.scss";
11
+ import "./styles/sidebar.scss";
12
+ import "./styles/transition.scss";
15
13
 
16
14
  // 组件列表
17
- const components = [
18
- GlobalDrawer,
19
- MessagePopUp,
20
- ProTable
21
- ]
15
+ const components = [GlobalDrawer, MessagePopUp, ProTable];
22
16
 
23
17
  // 定义 install 方法,接收 Vue 作为参数
24
- const install = function(Vue) {
18
+ const install = function (Vue) {
25
19
  // 判断是否安装
26
- if (install.installed) return
27
- install.installed = true
20
+ if (install.installed) return;
21
+ install.installed = true;
28
22
 
29
23
  // 遍历注册所有组件
30
- components.forEach(component => {
31
- Vue.component(component.name, component)
32
- })
33
- }
24
+ components.forEach((component) => {
25
+ Vue.component(component.name, component);
26
+ });
27
+ };
34
28
 
35
29
  // 判断是否是直接引入文件,如果是,就不用调用 Vue.use()
36
- if (typeof window !== 'undefined' && window.Vue) {
37
- install(window.Vue)
30
+ if (typeof window !== "undefined" && window.Vue) {
31
+ install(window.Vue);
38
32
  }
39
33
 
40
34
  // 导出组件
41
- export {
42
- GlobalDrawer,
43
- MessagePopUp,
44
- ProTable
45
- }
35
+ export { GlobalDrawer, MessagePopUp, ProTable };
46
36
 
47
37
  // 导出 install 方法
48
38
  export default {
49
- install
50
- }
39
+ install,
40
+ };