From 273889fa7049779928c4adb23263307dbcbe3a45 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Tue, 20 Mar 2018 19:06:04 +0800 Subject: [PATCH] update license and add input doc locale doc --- .stylelintrc | 1 + LICENSE | 28 +++- antd-tools/getWebpackConfig.js | 2 +- components/index.js | 3 +- components/input/Group.jsx | 4 +- components/input/demo/{addon.vue => addon.md} | 17 ++- components/input/demo/autosize-textarea.md | 20 +++ components/input/demo/autosize-textarea.vue | 16 --- components/input/demo/basic.md | 15 ++ components/input/demo/basic.vue | 3 - components/input/demo/group.md | 136 ++++++++++++++++++ components/input/demo/index.vue | 73 ++++++---- components/input/demo/presuffix.md | 50 +++++++ components/input/demo/presuffix.vue | 41 ------ .../{search-input.vue => search-input.md} | 22 ++- components/input/demo/size.md | 29 ++++ components/input/demo/size.vue | 23 --- components/input/demo/textarea.md | 17 +++ components/input/demo/textarea.vue | 12 -- .../input/demo/{tooltip.vue => tooltip.md} | 15 +- components/input/index.en-US.md | 68 +++++++++ components/input/index.zh-CN.md | 67 +++++++++ components/locale-provider/demo/all.md | 130 +++++++++++++++++ components/locale-provider/demo/basic.md | 28 ++++ components/locale-provider/demo/index.vue | 25 ++++ components/locale-provider/index.en-US.md | 58 ++++++++ components/locale-provider/index.jsx | 10 +- components/locale-provider/index.zh-CN.md | 57 ++++++++ components/popconfirm/index.jsx | 48 ++++--- components/radio/Group.jsx | 12 +- components/radio/Radio.jsx | 6 +- examples/demo.js | 1 + examples/routes.js | 2 +- 33 files changed, 861 insertions(+), 178 deletions(-) rename components/input/demo/{addon.vue => addon.md} (87%) create mode 100644 components/input/demo/autosize-textarea.md delete mode 100644 components/input/demo/autosize-textarea.vue create mode 100644 components/input/demo/basic.md delete mode 100644 components/input/demo/basic.vue create mode 100644 components/input/demo/group.md create mode 100644 components/input/demo/presuffix.md delete mode 100644 components/input/demo/presuffix.vue rename components/input/demo/{search-input.vue => search-input.md} (52%) create mode 100644 components/input/demo/size.md delete mode 100644 components/input/demo/size.vue create mode 100644 components/input/demo/textarea.md delete mode 100644 components/input/demo/textarea.vue rename components/input/demo/{tooltip.vue => tooltip.md} (80%) create mode 100644 components/input/index.en-US.md create mode 100644 components/input/index.zh-CN.md create mode 100644 components/locale-provider/demo/all.md create mode 100644 components/locale-provider/demo/basic.md create mode 100644 components/locale-provider/demo/index.vue create mode 100644 components/locale-provider/index.en-US.md create mode 100644 components/locale-provider/index.zh-CN.md diff --git a/.stylelintrc b/.stylelintrc index 1e5e8983f..74608186c 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,5 +1,6 @@ { "extends": "stylelint-config-standard", + "ignoreFiles": "./components/**", "rules": { "comment-empty-line-before": null, "declaration-empty-line-before": null, diff --git a/LICENSE b/LICENSE index 5d5bd95ea..5f0f8bf29 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ MIT License -Copyright (c) 2017-present tangjinzhou +Copyright (c) 2017-present vue-antd-ui Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,4 +19,28 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. + + +MIT LICENSE + +Copyright (c) 2015-present Alipay.com, https://www.alipay.com/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/antd-tools/getWebpackConfig.js b/antd-tools/getWebpackConfig.js index 6755c7809..1646f1034 100644 --- a/antd-tools/getWebpackConfig.js +++ b/antd-tools/getWebpackConfig.js @@ -153,7 +153,7 @@ module.exports = function (modules) { new webpack.BannerPlugin(` ${distFileBaseName} v${pkg.version} -Copyright 2017-present, tangjinzhou, Inc. +Copyright 2017-present, vue-antd-ui, Inc. All rights reserved. `), new webpack.ProgressPlugin((percentage, msg, addInfo) => { diff --git a/components/index.js b/components/index.js index eceafd26f..5419e5ea8 100644 --- a/components/index.js +++ b/components/index.js @@ -40,8 +40,9 @@ const InputGroup = Input.Group const InputSearch = Input.Search const InputTextArea = Input.TextArea const Textarea = InputTextArea +const TextArea = InputTextArea -export { Input, InputGroup, InputSearch, InputTextArea, Textarea } +export { Input, InputGroup, InputSearch, InputTextArea, Textarea, TextArea } import Breadcrumb from './breadcrumb' const BreadcrumbItem = Breadcrumb.Item diff --git a/components/input/Group.jsx b/components/input/Group.jsx index cd5f5d6cd..6364e4b78 100644 --- a/components/input/Group.jsx +++ b/components/input/Group.jsx @@ -1,4 +1,4 @@ - +import { filterEmpty } from '../_util/props-util' export default { name: 'InputGruop', props: { @@ -29,7 +29,7 @@ export default { render () { return ( - {this.$slots.default} + {filterEmpty(this.$slots.default)} ) }, diff --git a/components/input/demo/addon.vue b/components/input/demo/addon.md similarity index 87% rename from components/input/demo/addon.vue rename to components/input/demo/addon.md index d26edd1e3..4442adef5 100644 --- a/components/input/demo/addon.vue +++ b/components/input/demo/addon.md @@ -1,3 +1,14 @@ + +#### 前置/后置标签 +用于配置一些固定组合。 + + + +#### Pre / Post tab +Using pre & post tabs example. + + +```html - +``` diff --git a/components/input/demo/autosize-textarea.md b/components/input/demo/autosize-textarea.md new file mode 100644 index 000000000..9332f75af --- /dev/null +++ b/components/input/demo/autosize-textarea.md @@ -0,0 +1,20 @@ + +#### 适应文本高度的文本域 +`autosize` 属性适用于 `textarea` 节点,并且只有高度会自动变化。另外 `autosize` 可以设定为一个对象,指定最小行数和最大行数。 + + + +#### Autosizing the height to fit the content +`autosize` prop for a `textarea` type of `Input` makes the height to automatically adjust based on the content. +An options object can be provided to `autosize` to specify the minimum and maximum number of lines the textarea will automatically adjust. + + +```html + +``` diff --git a/components/input/demo/autosize-textarea.vue b/components/input/demo/autosize-textarea.vue deleted file mode 100644 index abf12a0bc..000000000 --- a/components/input/demo/autosize-textarea.vue +++ /dev/null @@ -1,16 +0,0 @@ - - diff --git a/components/input/demo/basic.md b/components/input/demo/basic.md new file mode 100644 index 000000000..78663f521 --- /dev/null +++ b/components/input/demo/basic.md @@ -0,0 +1,15 @@ + +#### 基本使用 +基本使用。 + + + +#### Basic usage +Basic usage example. + + +```html + +``` diff --git a/components/input/demo/basic.vue b/components/input/demo/basic.vue deleted file mode 100644 index 4201fb155..000000000 --- a/components/input/demo/basic.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/components/input/demo/group.md b/components/input/demo/group.md new file mode 100644 index 000000000..d5f73edb0 --- /dev/null +++ b/components/input/demo/group.md @@ -0,0 +1,136 @@ + +#### 输入框组合 +输入框的组合展现。 +注意:使用 `compact` 模式时,不需要通过 `Col` 来控制宽度。 + + + +#### Input Group +Input.Group example +Note: You don't need `Col` to control the width in the `compact` mode. + + +```html + + +``` diff --git a/components/input/demo/index.vue b/components/input/demo/index.vue index e665d8c9e..0e87f5762 100644 --- a/components/input/demo/index.vue +++ b/components/input/demo/index.vue @@ -1,42 +1,57 @@ -