eoss-mobiles 0.2.24 → 0.2.25

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": "eoss-mobiles",
3
- "version": "0.2.24",
3
+ "version": "0.2.25",
4
4
  "description": "eoss内部移动端业务组件",
5
5
  "main": "lib/eoss-mobile.common.js",
6
6
  "files": [
@@ -1,38 +1,43 @@
1
1
  <template>
2
- <div class="em-grid">
3
- <van-grid v-bind="$attrs" v-on="$listeners" :column-num="columnNum">
4
- <van-grid-item
5
- v-bind="item"
6
- :class="{'em-grid-ellipsis':textEllipsis}"
7
- :style="`width:${100 / columnNum}%;`"
8
- @click="goView($event,item)"
9
- v-show="$attrs.data && $attrs.data.length > 0"
10
- v-for="(item, index) of $attrs.data"
11
- :key="index"
12
- />
13
- <slot v-show="$attrs.data && $attrs.data.length == 0" />
14
- </van-grid>
2
+ <div class="em-grid">
3
+ <van-grid v-bind="$attrs" v-on="$listeners" :column-num="columnNum">
4
+ <van-grid-item
5
+ v-bind="item"
6
+ :class="{ 'em-grid-ellipsis': textEllipsis }"
7
+ :style="`width:${100 / columnNum}%;`"
8
+ @click="goView($event, item)"
9
+ v-show="$attrs.data && $attrs.data.length > 0"
10
+ v-for="(item, index) of $attrs.data"
11
+ :key="index"
12
+ />
13
+ <slot v-show="$attrs.data && $attrs.data.length == 0" />
14
+ </van-grid>
15
15
  </div>
16
16
  </template>
17
17
 
18
18
  <script>
19
19
  export default {
20
20
  name: 'EmGrid',
21
- inheritAttrs:false,
22
- props:{
23
- columnNum:{
24
- type:[Number,String],
25
- default:4
26
- },
27
- textEllipsis:{
28
- type:Boolean,
29
- default:false
30
- }
21
+ inheritAttrs: false,
22
+ props: {
23
+ columnNum: {
24
+ type: [Number, String],
25
+ default: 4
31
26
  },
32
- methods:{
33
- goView(event,val){
34
- this.$emit('click',{event,info:val})
27
+ textEllipsis: {
28
+ type: Boolean,
29
+ default: false
35
30
  },
31
+ targetStop: {
32
+ type: Boolean,
33
+ default: true
34
+ }
35
+ },
36
+ methods: {
37
+ goView(event, val) {
38
+ this.$emit('click', val);
39
+ this.targetStop && event.stopPropagation();
40
+ }
36
41
  }
37
42
  };
38
43
  </script>
package/src/index.js CHANGED
@@ -101,7 +101,7 @@ if (typeof window !== 'undefined' && window.Vue) {
101
101
  }
102
102
 
103
103
  export default {
104
- version: '0.2.24',
104
+ version: '0.2.25',
105
105
  install,
106
106
  Button,
107
107
  ButtonGroup,