From 5f37f3ee541f79d1a5dbcf2bf9a122bffac50685 Mon Sep 17 00:00:00 2001 From: cookfront Date: Fri, 10 Feb 2017 16:53:17 +0800 Subject: [PATCH 1/5] build add eslint --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 793bdeee6..447de6783 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "scripts": { "bootstrap": "npm i --registry=http://registry.npm.qima-inc.com", "build:file": "node build/bin/build-entry.js", - "build": "npm run clean && npm run build:file && npm run concat:dev && npm run concat:prod", + "build": "npm run clean && npm run lint && npm run build:file && npm run concat:dev && npm run concat:prod", "dev": "npm run bootstrap && npm run build:file", "builddocs": "webpack --progress --hide-modules --config build/webpack.config.js && set NODE_ENV=production webpack --progress --hide-modules --config build/webpack.config.js", "docs": "npm run dev && webpack-dev-server --inline --hot --config build/webpack.config.js", From a7dec9fe8ecbdb97005538d004744475eeff43b0 Mon Sep 17 00:00:00 2001 From: cookfront Date: Sun, 12 Feb 2017 12:35:10 +0800 Subject: [PATCH 2/5] field component --- components.json | 3 ++- packages/field/CHANGELOG.md | 8 ++++++++ packages/field/README.md | 26 ++++++++++++++++++++++++++ packages/field/index.js | 3 +++ packages/field/package.json | 3 +++ packages/field/src/field.vue | 7 +++++++ src/index.js | 5 ++++- 7 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 packages/field/CHANGELOG.md create mode 100644 packages/field/README.md create mode 100644 packages/field/index.js create mode 100644 packages/field/package.json create mode 100644 packages/field/src/field.vue diff --git a/components.json b/components.json index 1c29279de..838a8444c 100644 --- a/components.json +++ b/components.json @@ -1,5 +1,6 @@ { "sample": "./packages/sample/index.js", "button": "./packages/button/index.js", - "switch": "./packages/switch/index.js" + "switch": "./packages/switch/index.js", + "field": "./packages/field/index.js" } diff --git a/packages/field/CHANGELOG.md b/packages/field/CHANGELOG.md new file mode 100644 index 000000000..e88c472b3 --- /dev/null +++ b/packages/field/CHANGELOG.md @@ -0,0 +1,8 @@ +## 0.0.2 (2017-01-20) + +* 改了bug A +* 加了功能B + +## 0.0.1 (2017-01-10) + +* 第一版 diff --git a/packages/field/README.md b/packages/field/README.md new file mode 100644 index 000000000..4c6172563 --- /dev/null +++ b/packages/field/README.md @@ -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) diff --git a/packages/field/index.js b/packages/field/index.js new file mode 100644 index 000000000..391f5272c --- /dev/null +++ b/packages/field/index.js @@ -0,0 +1,3 @@ +import Field from './src/field'; + +export default Field; diff --git a/packages/field/package.json b/packages/field/package.json new file mode 100644 index 000000000..766a56bea --- /dev/null +++ b/packages/field/package.json @@ -0,0 +1,3 @@ +{ + "name": "o2-field" +} diff --git a/packages/field/src/field.vue b/packages/field/src/field.vue new file mode 100644 index 000000000..5c85aebfd --- /dev/null +++ b/packages/field/src/field.vue @@ -0,0 +1,7 @@ + + + diff --git a/src/index.js b/src/index.js index 34cf81788..875fce4c5 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,7 @@ import Sample from '../packages/sample/index.js'; import Button from '../packages/button/index.js'; import Switch from '../packages/switch/index.js'; +import Field from '../packages/field/index.js'; // zenui import '../packages/zenui/src/index.pcss'; @@ -10,6 +11,7 @@ const install = function(Vue) { Vue.component(Sample.name, Sample); Vue.component(Button.name, Button); Vue.component(Switch.name, Switch); + Vue.component(Field.name, Field); }; // auto install @@ -22,5 +24,6 @@ module.exports = { version: '0.0.1', Sample, Button, - Switch + Switch, + Field }; From 906f2fad07529d5c2160e59cd0cd4530b76f68b4 Mon Sep 17 00:00:00 2001 From: cookfront Date: Sun, 12 Feb 2017 12:48:16 +0800 Subject: [PATCH 3/5] form components --- docs/examples/checkbox.md | 1 + docs/examples/field.md | 1 + docs/examples/radio.md | 1 + docs/nav.config.json | 19 ++++++++++++++++++- packages/field/src/field.vue | 8 ++++++-- 5 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 docs/examples/checkbox.md create mode 100644 docs/examples/field.md create mode 100644 docs/examples/radio.md diff --git a/docs/examples/checkbox.md b/docs/examples/checkbox.md new file mode 100644 index 000000000..64a485a6a --- /dev/null +++ b/docs/examples/checkbox.md @@ -0,0 +1 @@ +## Checkbox组件 \ No newline at end of file diff --git a/docs/examples/field.md b/docs/examples/field.md new file mode 100644 index 000000000..9aa26efa9 --- /dev/null +++ b/docs/examples/field.md @@ -0,0 +1 @@ +## Field组件 diff --git a/docs/examples/radio.md b/docs/examples/radio.md new file mode 100644 index 000000000..75a86f5f0 --- /dev/null +++ b/docs/examples/radio.md @@ -0,0 +1 @@ +## Radio组件 diff --git a/docs/nav.config.json b/docs/nav.config.json index 401945ae3..591cb03af 100644 --- a/docs/nav.config.json +++ b/docs/nav.config.json @@ -13,10 +13,27 @@ { "path": "/button", "title": "Button组件" - }, + } + ] + }, + { + "groupName": "Form", + "list": [ { "path": "/switch", "title": "Switch组件" + }, + { + "path": "/field", + "title": "Field组件" + }, + { + "path": "/radio", + "title": "Radio组件" + }, + { + "path": "/checkbox", + "title": "Checkbox组件" } ] } diff --git a/packages/field/src/field.vue b/packages/field/src/field.vue index 5c85aebfd..ca9543abe 100644 --- a/packages/field/src/field.vue +++ b/packages/field/src/field.vue @@ -1,7 +1,11 @@ From 7a21b3abdeaced0bccaea8524d02c50b9f345631 Mon Sep 17 00:00:00 2001 From: cookfront Date: Sun, 12 Feb 2017 12:53:22 +0800 Subject: [PATCH 4/5] radio components --- components.json | 3 ++- packages/radio/CHANGELOG.md | 8 ++++++++ packages/radio/README.md | 26 ++++++++++++++++++++++++++ packages/radio/index.js | 3 +++ packages/radio/package.json | 10 ++++++++++ packages/radio/src/radio.vue | 11 +++++++++++ 6 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 packages/radio/CHANGELOG.md create mode 100644 packages/radio/README.md create mode 100644 packages/radio/index.js create mode 100644 packages/radio/package.json create mode 100644 packages/radio/src/radio.vue diff --git a/components.json b/components.json index 838a8444c..52e0653db 100644 --- a/components.json +++ b/components.json @@ -2,5 +2,6 @@ "sample": "./packages/sample/index.js", "button": "./packages/button/index.js", "switch": "./packages/switch/index.js", - "field": "./packages/field/index.js" + "field": "./packages/field/index.js", + "radio": "./packages/radio/index.js" } diff --git a/packages/radio/CHANGELOG.md b/packages/radio/CHANGELOG.md new file mode 100644 index 000000000..e88c472b3 --- /dev/null +++ b/packages/radio/CHANGELOG.md @@ -0,0 +1,8 @@ +## 0.0.2 (2017-01-20) + +* 改了bug A +* 加了功能B + +## 0.0.1 (2017-01-10) + +* 第一版 diff --git a/packages/radio/README.md b/packages/radio/README.md new file mode 100644 index 000000000..4c6172563 --- /dev/null +++ b/packages/radio/README.md @@ -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) diff --git a/packages/radio/index.js b/packages/radio/index.js new file mode 100644 index 000000000..28c69693a --- /dev/null +++ b/packages/radio/index.js @@ -0,0 +1,3 @@ +import Radio from './src/radio'; + +export default Radio; diff --git a/packages/radio/package.json b/packages/radio/package.json new file mode 100644 index 000000000..7dbfa2900 --- /dev/null +++ b/packages/radio/package.json @@ -0,0 +1,10 @@ +{ + "name": "<%= name %>", + "version": "<%= version %>", + "description": "<%= description %>", + "main": "./lib/index.js", + "author": "<%= author %>", + "license": "<%= license %>", + "devDependencies": {}, + "dependencies": {} +} diff --git a/packages/radio/src/radio.vue b/packages/radio/src/radio.vue new file mode 100644 index 000000000..789b41ee4 --- /dev/null +++ b/packages/radio/src/radio.vue @@ -0,0 +1,11 @@ + + + From 2fed755d7c4d9986f52254a085c1bec3726745f5 Mon Sep 17 00:00:00 2001 From: cookfront Date: Mon, 13 Feb 2017 16:14:37 +0800 Subject: [PATCH 5/5] cell components --- components.json | 3 ++- docs/examples/cell.md | 15 +++++++++++++++ docs/nav.config.json | 21 +++++++++++++++------ packages/cell/CHANGELOG.md | 8 ++++++++ packages/cell/README.md | 26 ++++++++++++++++++++++++++ packages/cell/index.js | 3 +++ packages/cell/package.json | 10 ++++++++++ packages/cell/src/cell.vue | 28 ++++++++++++++++++++++++++++ src/index.js | 8 +++++++- 9 files changed, 114 insertions(+), 8 deletions(-) create mode 100644 docs/examples/cell.md create mode 100644 packages/cell/CHANGELOG.md create mode 100644 packages/cell/README.md create mode 100644 packages/cell/index.js create mode 100644 packages/cell/package.json create mode 100644 packages/cell/src/cell.vue diff --git a/components.json b/components.json index 52e0653db..8fcccc5c1 100644 --- a/components.json +++ b/components.json @@ -3,5 +3,6 @@ "button": "./packages/button/index.js", "switch": "./packages/switch/index.js", "field": "./packages/field/index.js", - "radio": "./packages/radio/index.js" + "radio": "./packages/radio/index.js", + "cell": "./packages/cell/index.js" } diff --git a/docs/examples/cell.md b/docs/examples/cell.md new file mode 100644 index 000000000..344456778 --- /dev/null +++ b/docs/examples/cell.md @@ -0,0 +1,15 @@ +## Cell 组件 + +### API + +| 参数 | 说明 | 类型 | 默认值 | 可选值 | +|-----------|-----------|-----------|-------------|-------------| +| className | 自定义额外类名 | string | '' | '' | + +### Slot + +| name | 描述 | +|-----------|-----------| +| - | 自定义显示内容 | +| icon | | +| name | | diff --git a/docs/nav.config.json b/docs/nav.config.json index 591cb03af..88eefc099 100644 --- a/docs/nav.config.json +++ b/docs/nav.config.json @@ -8,11 +8,20 @@ "list": [ { "path": "/sample", - "title": "Sample组件" + "title": "Sample" }, { "path": "/button", - "title": "Button组件" + "title": "Button" + } + ] + }, + { + "groupName": "CSS组件", + "list": [ + { + "path": "/cell", + "title": "Cell" } ] }, @@ -21,19 +30,19 @@ "list": [ { "path": "/switch", - "title": "Switch组件" + "title": "Switch" }, { "path": "/field", - "title": "Field组件" + "title": "Field" }, { "path": "/radio", - "title": "Radio组件" + "title": "Radio" }, { "path": "/checkbox", - "title": "Checkbox组件" + "title": "Checkbox" } ] } diff --git a/packages/cell/CHANGELOG.md b/packages/cell/CHANGELOG.md new file mode 100644 index 000000000..e88c472b3 --- /dev/null +++ b/packages/cell/CHANGELOG.md @@ -0,0 +1,8 @@ +## 0.0.2 (2017-01-20) + +* 改了bug A +* 加了功能B + +## 0.0.1 (2017-01-10) + +* 第一版 diff --git a/packages/cell/README.md b/packages/cell/README.md new file mode 100644 index 000000000..4c6172563 --- /dev/null +++ b/packages/cell/README.md @@ -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) diff --git a/packages/cell/index.js b/packages/cell/index.js new file mode 100644 index 000000000..aa54ff040 --- /dev/null +++ b/packages/cell/index.js @@ -0,0 +1,3 @@ +import Cell from './src/cell'; + +export default Cell; diff --git a/packages/cell/package.json b/packages/cell/package.json new file mode 100644 index 000000000..7dbfa2900 --- /dev/null +++ b/packages/cell/package.json @@ -0,0 +1,10 @@ +{ + "name": "<%= name %>", + "version": "<%= version %>", + "description": "<%= description %>", + "main": "./lib/index.js", + "author": "<%= author %>", + "license": "<%= license %>", + "devDependencies": {}, + "dependencies": {} +} diff --git a/packages/cell/src/cell.vue b/packages/cell/src/cell.vue new file mode 100644 index 000000000..03fb7c6cf --- /dev/null +++ b/packages/cell/src/cell.vue @@ -0,0 +1,28 @@ + + + diff --git a/src/index.js b/src/index.js index 875fce4c5..fa6aedd6a 100644 --- a/src/index.js +++ b/src/index.js @@ -2,6 +2,8 @@ import Sample from '../packages/sample/index.js'; import Button from '../packages/button/index.js'; import Switch from '../packages/switch/index.js'; import Field from '../packages/field/index.js'; +import Radio from '../packages/radio/index.js'; +import Cell from '../packages/cell/index.js'; // zenui import '../packages/zenui/src/index.pcss'; @@ -12,6 +14,8 @@ const install = function(Vue) { Vue.component(Button.name, Button); Vue.component(Switch.name, Switch); Vue.component(Field.name, Field); + Vue.component(Radio.name, Radio); + Vue.component(Cell.name, Cell); }; // auto install @@ -25,5 +29,7 @@ module.exports = { Sample, Button, Switch, - Field + Field, + Radio, + Cell };