shijiplus-web-plugin 0.1.12 → 0.1.13

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shijiplus-web-plugin",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "files": [
5
5
  "src"
6
6
  ],
@@ -1,6 +1,7 @@
1
1
  const compFiles = ['plus-icon', 'plus-city-cascader', 'plus-count-down', 'plus-city-cascader', 'plus-common-header', 'plus-poptip', 'plus-qr-code', 'plus-drawer', 'plus-tabs', 'plus-remote-selector', 'plus-select', 'plus-form', 'plus-scrollview', 'plus-table', 'plus-modal', 'plus-card', 'permission-component']
2
2
 
3
3
  const install = (vue, opts = {}) => {
4
+ console.log('--------install---plus-comp----------')
4
5
  compFiles.forEach(file => {
5
6
  let compName = ''
6
7
  file.split('-').forEach(word => {
package/src/index.js CHANGED
@@ -3,6 +3,7 @@ import './index.less'
3
3
  import i18n from './locale'
4
4
  import ExtentionPlugin from './extentionPlugin'
5
5
  import importDirective from './directive'
6
+ import PlusComp from './components/plus-comp'
6
7
 
7
8
  console.log('--------web-tool---index.js----------')
8
9
 
@@ -12,5 +13,17 @@ export default {
12
13
  importDirective,
13
14
  installDirectives(Vue) {
14
15
  importDirective(Vue)
16
+ },
17
+ PlusComp,
18
+ install(vue, opts = {}) {
19
+ vue.use(PlusComp)
20
+ /**
21
+ * 注册指令
22
+ */
23
+ importDirective(vue)
24
+ vue.use(ExtentionPlugin)
25
+ vue.use(iView, {
26
+ i18n: (key, value) => i18n.t(key, value)
27
+ })
15
28
  }
16
29
  }
package/src/main.js CHANGED
@@ -7,27 +7,18 @@ import ExtentionPlugin from './extentionPlugin'
7
7
  import importDirective from './directive'
8
8
  import PlusComp from './components/plus-comp'
9
9
 
10
- Vue.config.productionTip = false
10
+ import Tool from './index'
11
+
12
+
11
13
 
12
- Vue.use(PlusComp)
13
- /**
14
- * 注册指令
15
- */
16
- importDirective(Vue)
17
14
 
18
- Vue.use(ExtentionPlugin)
19
- Vue.use(iView, {
20
- i18n: (key, value) => i18n.t(key, value)
21
- })
15
+ Vue.config.productionTip = false
16
+
17
+ Tool.install(Vue)
22
18
  new Vue({
23
19
  render: h => h(App),
24
20
  }).$mount('#app')
25
21
 
26
22
  export default {
27
- i18n,
28
- ExtentionPlugin,
29
- importDirective,
30
- installDirectives(Vue) {
31
- importDirective(Vue)
32
- }
23
+ ...Tool
33
24
  }