mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
cell components
This commit is contained in:
parent
7a21b3abde
commit
2fed755d7c
@ -3,5 +3,6 @@
|
|||||||
"button": "./packages/button/index.js",
|
"button": "./packages/button/index.js",
|
||||||
"switch": "./packages/switch/index.js",
|
"switch": "./packages/switch/index.js",
|
||||||
"field": "./packages/field/index.js",
|
"field": "./packages/field/index.js",
|
||||||
"radio": "./packages/radio/index.js"
|
"radio": "./packages/radio/index.js",
|
||||||
|
"cell": "./packages/cell/index.js"
|
||||||
}
|
}
|
||||||
|
15
docs/examples/cell.md
Normal file
15
docs/examples/cell.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
## Cell 组件
|
||||||
|
|
||||||
|
### API
|
||||||
|
|
||||||
|
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|
||||||
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
|
| className | 自定义额外类名 | string | '' | '' |
|
||||||
|
|
||||||
|
### Slot
|
||||||
|
|
||||||
|
| name | 描述 |
|
||||||
|
|-----------|-----------|
|
||||||
|
| - | 自定义显示内容 |
|
||||||
|
| icon | |
|
||||||
|
| name | |
|
@ -8,11 +8,20 @@
|
|||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"path": "/sample",
|
"path": "/sample",
|
||||||
"title": "Sample组件"
|
"title": "Sample"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "/button",
|
"path": "/button",
|
||||||
"title": "Button组件"
|
"title": "Button"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupName": "CSS组件",
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"path": "/cell",
|
||||||
|
"title": "Cell"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -21,19 +30,19 @@
|
|||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"path": "/switch",
|
"path": "/switch",
|
||||||
"title": "Switch组件"
|
"title": "Switch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "/field",
|
"path": "/field",
|
||||||
"title": "Field组件"
|
"title": "Field"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "/radio",
|
"path": "/radio",
|
||||||
"title": "Radio组件"
|
"title": "Radio"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "/checkbox",
|
"path": "/checkbox",
|
||||||
"title": "Checkbox组件"
|
"title": "Checkbox"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
8
packages/cell/CHANGELOG.md
Normal file
8
packages/cell/CHANGELOG.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
## 0.0.2 (2017-01-20)
|
||||||
|
|
||||||
|
* 改了bug A
|
||||||
|
* 加了功能B
|
||||||
|
|
||||||
|
## 0.0.1 (2017-01-10)
|
||||||
|
|
||||||
|
* 第一版
|
26
packages/cell/README.md
Normal file
26
packages/cell/README.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# @youzan/<%= name %>
|
||||||
|
|
||||||
|
!!! 请在此处填写你的文档最简单描述 !!!
|
||||||
|
|
||||||
|
[![version][version-image]][download-url]
|
||||||
|
[![download][download-image]][download-url]
|
||||||
|
|
||||||
|
[version-image]: http://npm.qima-inc.com/badge/v/@youzan/<%= name %>.svg?style=flat-square
|
||||||
|
[download-image]: http://npm.qima-inc.com/badge/d/@youzan/<%= name %>.svg?style=flat-square
|
||||||
|
[download-url]: http://npm.qima-inc.com/package/@youzan/<%= name %>
|
||||||
|
|
||||||
|
## Demo
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|
||||||
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
|
| className | 自定义额外类名 | string | '' | '' |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## License
|
||||||
|
[MIT](https://opensource.org/licenses/MIT)
|
3
packages/cell/index.js
Normal file
3
packages/cell/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import Cell from './src/cell';
|
||||||
|
|
||||||
|
export default Cell;
|
10
packages/cell/package.json
Normal file
10
packages/cell/package.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "<%= name %>",
|
||||||
|
"version": "<%= version %>",
|
||||||
|
"description": "<%= description %>",
|
||||||
|
"main": "./lib/index.js",
|
||||||
|
"author": "<%= author %>",
|
||||||
|
"license": "<%= license %>",
|
||||||
|
"devDependencies": {},
|
||||||
|
"dependencies": {}
|
||||||
|
}
|
28
packages/cell/src/cell.vue
Normal file
28
packages/cell/src/cell.vue
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<template>
|
||||||
|
<div class="o2-cell">
|
||||||
|
<div class="o2-cell-title">
|
||||||
|
<slot name="icon">
|
||||||
|
<i v-if="icon" class="o2-icon" :class="'o2-icon-' + icon"></i>
|
||||||
|
</slot>
|
||||||
|
<slot name="title">
|
||||||
|
</slot>
|
||||||
|
</div>
|
||||||
|
<div class="o2-cell-value">
|
||||||
|
<slot>
|
||||||
|
|
||||||
|
</slot>
|
||||||
|
</div>
|
||||||
|
<i class="o2-cell-arrow-right"></i>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'o2-cell',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
icon: String,
|
||||||
|
title: String
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -2,6 +2,8 @@ import Sample from '../packages/sample/index.js';
|
|||||||
import Button from '../packages/button/index.js';
|
import Button from '../packages/button/index.js';
|
||||||
import Switch from '../packages/switch/index.js';
|
import Switch from '../packages/switch/index.js';
|
||||||
import Field from '../packages/field/index.js';
|
import Field from '../packages/field/index.js';
|
||||||
|
import Radio from '../packages/radio/index.js';
|
||||||
|
import Cell from '../packages/cell/index.js';
|
||||||
// zenui
|
// zenui
|
||||||
import '../packages/zenui/src/index.pcss';
|
import '../packages/zenui/src/index.pcss';
|
||||||
|
|
||||||
@ -12,6 +14,8 @@ const install = function(Vue) {
|
|||||||
Vue.component(Button.name, Button);
|
Vue.component(Button.name, Button);
|
||||||
Vue.component(Switch.name, Switch);
|
Vue.component(Switch.name, Switch);
|
||||||
Vue.component(Field.name, Field);
|
Vue.component(Field.name, Field);
|
||||||
|
Vue.component(Radio.name, Radio);
|
||||||
|
Vue.component(Cell.name, Cell);
|
||||||
};
|
};
|
||||||
|
|
||||||
// auto install
|
// auto install
|
||||||
@ -25,5 +29,7 @@ module.exports = {
|
|||||||
Sample,
|
Sample,
|
||||||
Button,
|
Button,
|
||||||
Switch,
|
Switch,
|
||||||
Field
|
Field,
|
||||||
|
Radio,
|
||||||
|
Cell
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user