Cell component add @on-click event
This commit is contained in:
parent
4258a559c2
commit
9c52988555
3 changed files with 29 additions and 8 deletions
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<div style="margin: 100px;background: #f8f8f9;padding: 100px;">
|
||||
<Card title="选项" :padding="0" shadow style="width: 300px;">
|
||||
<CellGroup>
|
||||
<Cell title="标题一" label="附属内容" to="/button"></Cell>
|
||||
<Cell title="标题一" label="附属内容" extra="详细信息"></Cell>
|
||||
<Cell title="标题一" label="附属内容" extra="详细信息" to="/button"></Cell>
|
||||
<Cell title="标题一" label="附属内容" selected></Cell>
|
||||
<CellGroup @on-click="handleClick">
|
||||
<Cell title="标题一" name="a1" label="附属内容" to="/button"></Cell>
|
||||
<Cell title="标题一" name="a2" label="附属内容" extra="详细信息"></Cell>
|
||||
<Cell title="标题一" name="a3" label="附属内容" extra="详细信息" to="/button"></Cell>
|
||||
<Cell title="标题一" name="a4" label="附属内容" selected></Cell>
|
||||
<Cell title="标题二">
|
||||
<Icon type="trash-a" slot="icon"></Icon>
|
||||
</Cell>
|
||||
|
@ -30,6 +30,11 @@
|
|||
return {
|
||||
switch1: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick (name) {
|
||||
console.log(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue