Skip to content

Commit ef81e1b

Browse files
authored
Merge pull request #6 from iview/dewyzee/dev
add new components && examples
2 parents 1aa9b18 + b72edea commit ef81e1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1413
-44
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<template>
2+
<div class="i-class i-grid-icon" v-bind:class="iClass">
3+
<slot></slot>
4+
</div>
5+
</template>
6+
<script>
7+
export default {
8+
props: {
9+
iClass: {
10+
type: String,
11+
default: ''
12+
}
13+
}
14+
}
15+
</script>

dist/components/grid-icon/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import gridIcon from 'grid-icon.vue'
2+
3+
export default gridIcon
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import './grid-icon.css'
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.i-grid-icon {
2+
display: block;
3+
width: 28px;
4+
height: 28px;
5+
margin: 0 auto;
6+
}
7+
.i-grid-icon image {
8+
width: 100%;
9+
height: 100%;
10+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@import '../../common/_base.less';
2+
3+
.i-grid-icon {
4+
display: block;
5+
width: @size-grid-icon;
6+
height: @size-grid-icon;
7+
margin: 0 auto;
8+
9+
image{
10+
width: 100%;
11+
height: 100%;
12+
}
13+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import './grid-icon.less'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<template>
2+
<div class="i-class i-grid-item" v-bind:class="iClass" @click.stop="bindTap">
3+
<slot></slot>
4+
</div>
5+
</template>
6+
7+
<script>
8+
export default {
9+
props: {
10+
iClass: {
11+
type: String,
12+
default: ''
13+
}
14+
},
15+
methods: {
16+
bindTap(evt) {
17+
this.$emit('click', evt)
18+
}
19+
},
20+
}
21+
</script>

dist/components/grid-item/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import gridItem from 'grid-item.vue'
2+
3+
export default gridItem
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import './grid-item.css'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.i-grid-item {
2+
-webkit-box-flex: 1;
3+
-webkit-flex: 1;
4+
-ms-flex: 1;
5+
flex: 1;
6+
float: left;
7+
padding: 20px 10px;
8+
-webkit-box-sizing: border-box;
9+
box-sizing: border-box;
10+
border-right: 1rpx solid #e9eaec;
11+
border-bottom: 1rpx solid #e9eaec;
12+
}

0 commit comments

Comments
 (0)