diff --git a/components.json b/components.json
index 9a639f624..1625ebdda 100644
--- a/components.json
+++ b/components.json
@@ -28,5 +28,6 @@
"image-preview": "./packages/image-preview/index.js",
"col": "./packages/col/index.js",
"row": "./packages/row/index.js",
- "actionsheet": "./packages/actionsheet/index.js"
+ "actionsheet": "./packages/actionsheet/index.js",
+ "quantity": "./packages/quantity/index.js"
}
diff --git a/docs/ExamplesDocsApp.vue b/docs/ExamplesDocsApp.vue
index 1e1a9133e..45fceb877 100644
--- a/docs/ExamplesDocsApp.vue
+++ b/docs/ExamplesDocsApp.vue
@@ -72,6 +72,12 @@ export default {
color: #5e6d82;
margin: 14px 0;
}
+
+ p > code {
+ background-color: #eee;
+ padding: 2px 4px;
+ color: #26a2ff;
+ }
}
.demo-page {
diff --git a/docs/examples-docs/quantity.md b/docs/examples-docs/quantity.md
new file mode 100644
index 000000000..f43c15da4
--- /dev/null
+++ b/docs/examples-docs/quantity.md
@@ -0,0 +1,65 @@
+
+
+
+
+## Quantity
+
+### 基础用法
+
+:::demo 基础用法
+```html
+
当前值:{{ quantity1 }}
+``` +::: + +### 禁用Quantity + +:::demo 禁用Quantity +```html +当前值:{{ quantity2 }}
+``` +::: + +### API + +| 参数 | 说明 | 类型 | 默认值 | 可选值 | +|-----------|-----------|-----------|-------------|-------------| +| min | 最小值 | string/number | 1 | '' | +| max | 最大值 | string/number | '' | '' | +| step | 步数 | string/number | 1 | '' | +| disabled | 是否被禁用了 | boolean | false | '' | +| defaultValue | 默认值 | string/number | 1 | '' | + diff --git a/docs/nav.config.json b/docs/nav.config.json index 498fc0ef2..bee4487f5 100644 --- a/docs/nav.config.json +++ b/docs/nav.config.json @@ -133,6 +133,10 @@ "path": "/swipe", "title": "Swipe" }, + { + "path": "/quantity", + "title": "Quantity" + }, { "path": "/waterfall", "title": "Waterfall" diff --git a/packages/quantity/CHANGELOG.md b/packages/quantity/CHANGELOG.md new file mode 100644 index 000000000..e88c472b3 --- /dev/null +++ b/packages/quantity/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/quantity/README.md b/packages/quantity/README.md new file mode 100644 index 000000000..4c6172563 --- /dev/null +++ b/packages/quantity/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/quantity/index.js b/packages/quantity/index.js new file mode 100644 index 000000000..31f90beb3 --- /dev/null +++ b/packages/quantity/index.js @@ -0,0 +1,3 @@ +import Quantity from './src/quantity'; + +export default Quantity; diff --git a/packages/quantity/package.json b/packages/quantity/package.json new file mode 100644 index 000000000..7dbfa2900 --- /dev/null +++ b/packages/quantity/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/quantity/src/quantity.vue b/packages/quantity/src/quantity.vue new file mode 100644 index 000000000..469f75ed1 --- /dev/null +++ b/packages/quantity/src/quantity.vue @@ -0,0 +1,104 @@ + +