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
+11 -1
View File
@@ -6,6 +6,16 @@
}
</style>
<script>
export default {
methods: {
handleClick() {
console.log('cell click');
}
}
};
</script>
## Cell 组件
### 基础用法
@@ -24,7 +34,7 @@
:::demo 传入`label`属性,属性值为描述信息的值。
```html
<o2-cell-group>
<o2-cell title="单元格1" label="描述信息" is-link></o2-cell>
<o2-cell title="单元格1" label="描述信息" is-link url="javascript:void(0)" @click="handleClick"></o2-cell>
<o2-cell title="单元格2" label="描述信息"></o2-cell>
</o2-cell-group>
```
+14
View File
@@ -1 +1,15 @@
## Field组件
表单中`input``textarea`的输入框。
### API
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
| type | 输入框类型 | string | text | text, number, email, url, tel, date, datetime, password, textarea |
| placeholder | 输入框placeholder | string | '' | |
| value | 输入框的值 | string | '' | |
| label | 输入框标签 | string | '' | |
| disabled | 是否禁用输入框 | boolean | false | |
| readonly | 输入框是否只读 | boolean | false | |