cell component add click event

This commit is contained in:
cookfront
2017-02-14 15:22:45 +08:00
parent f55d3cb7c4
commit 975c39029b
5 changed files with 39 additions and 3 deletions
+7 -1
View File
@@ -1,5 +1,5 @@
<template>
<a class="o2-cell" :href="url">
<a class="o2-cell" :href="url" @click="handleClick">
<div class="o2-cell-title">
<slot name="icon">
<i v-if="icon" class="zui-icon" :class="'zui-icon-' + icon"></i>
@@ -29,6 +29,12 @@ export default {
url: String,
label: String,
isLink: Boolean
},
methods: {
handleClick() {
this.$emit('click');
}
}
};
</script>
+7 -1
View File
@@ -5,7 +5,13 @@
</template>
<script>
import O2Cell from 'packages/cell';
export default {
name: 'o2-filed'
name: 'o2-filed',
components: {
O2Cell
}
};
</script>
View File