pull/165/head
wangxueliang 2018-07-23 16:28:40 +08:00
commit 78e156f65a
13 changed files with 305 additions and 202 deletions

View File

@ -5,8 +5,10 @@ node_js:
before_script:
- npm install vue vue-template-compiler
script:
- cp ./scripts/.npmrc.template $HOME/.npmrc
- COVERAGE=true npm run test
- npm run codecov
- if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then npm run pub-with-ci; fi
- bash ./scripts/deploy-to-gh-pages.sh
env:
matrix:

26
BACKERS.md Normal file
View File

@ -0,0 +1,26 @@
<h1 align="center">Sponsors &amp; Backers</h1>
<br><br>
<h2 align="center">Sponsors</h2>
<p align="center">
<a href="https://www.patreon.com/tangjinzhou" target="_blank">
虚位以待...
</a>
</p>
<h2 align="center">Backers</h2>
<p align="center">
<a href="https://www.patreon.com/tangjinzhou" target="_blank">
虚位以待...
</a>
</p>
<h2 align="center">支付宝/微信</h2>
### 使用支付宝/微信的赞助的用户如需要添加名单赞助后可发github账号到邮箱(415800467@qq.com)
- [fastgoo](https://github.com/fastgoo)
- [sendya](https://github.com/sendya)
- [limichange](https://github.com/limichange)

View File

@ -2,6 +2,12 @@
---
## 1.0.0
`2018-07-21`
- 🌟 Add `Carousel` component [edddbd](https://github.com/vueComponent/ant-design/commit/edddbd982a279b62229ce825855c14c556866ece)
- modify some error document
## 0.7.1
`2018-07-17`

View File

@ -2,6 +2,12 @@
---
## 1.0.0
`2018-07-21`
- 🌟 新增`Carousel 走马灯`组件[edddbd](https://github.com/vueComponent/ant-design/commit/edddbd982a279b62229ce825855c14c556866ece)
- 更正了若干文档错误
## 0.7.1
`2018-07-17`

View File

@ -22,6 +22,18 @@ Ant Design 3.X 的 Vue 实现,开发和服务于企业级后台产品。
[README in English](README.md)
## 赞助
vue-antd-ui是一个开源的独立项目为了项目能够更好的持续的发展我们期望获得你的支持你可以通过如下任何一种方式支持我们
- [Patreon](https://www.patreon.com/tangjinzhou)
- [opencollective](https://opencollective.com/ant-design-278)
- [paypal](https://www.paypal.me/tangjinzhou)
<p align="center">
<img src="https://user-images.githubusercontent.com/6937879/43032487-932a5536-8cea-11e8-9175-9c006e938a82.png">
</p>
## 特性
- 提炼自企业级中后台产品的交互语言和视觉风格。

View File

@ -27,6 +27,17 @@ An enterprise-class UI components based on Ant Design 3.X and Vue.
- A set of high-quality Vue components out of the box.
- Shared [Ant Design of React](https://ant.design/docs/spec/introduce) design resources.
## Donation
vue-antd-ui is an open source independent project. In order to achieve better and sustainable development of the project, we hope to get your support. You can support us in any of the following ways:
- [Patreon](https://www.patreon.com/tangjinzhou)
- [opencollective](https://opencollective.com/ant-design-278)
- [paypal](https://www.paypal.me/tangjinzhou)
<p align="center">
<img src="https://user-images.githubusercontent.com/6937879/43032487-932a5536-8cea-11e8-9175-9c006e938a82.png">
</p>
## Using npm or yarn

View File

@ -25,6 +25,7 @@ const fs = require('fs')
const rimraf = require('rimraf')
const replaceLib = require('./replaceLib')
const stripCode = require('gulp-strip-code')
const compareVersions = require('compare-versions')
const cwd = process.cwd()
const libDir = path.join(cwd, 'lib')
@ -133,13 +134,15 @@ function compile (modules) {
function tag () {
console.log('tagging')
const { version } = packageJson
execSync(`git config --global user.email ${process.env.GITHUB_USER_EMAIL}`)
execSync(`git config --global user.name ${process.env.GITHUB_USER_NAME}`)
execSync(`git tag ${version}`)
execSync(`git push origin ${version}:${version}`)
execSync('git push origin master:master')
console.log('tagged')
}
function githubRelease () {
function githubRelease (done) {
const changlogFiles = [
path.join(cwd, 'CHANGELOG.en-US.md'),
path.join(cwd, 'CHANGELOG.zh-CN.md'),
@ -173,13 +176,14 @@ function githubRelease () {
const [_, owner, repo] = execSync('git remote get-url origin') // eslint-disable-line
.toString()
.match(/github.com[:/](.+)\/(.+)\.git/)
github.repos.createRelease({
owner,
repo,
tag_name: version,
name: version,
body: changelog,
}).then(() => {
done()
})
}
gulp.task('check-git', (done) => {
@ -204,8 +208,9 @@ function publish (tagString, done) {
const publishNpm = process.env.PUBLISH_NPM_CLI || 'npm'
runCmd(publishNpm, args, (code) => {
tag()
githubRelease()
done(code)
githubRelease(() => {
done(code)
})
})
}
@ -261,6 +266,43 @@ gulp.task('pub', ['check-git', 'compile'], (done) => {
}
})
gulp.task('pub-with-ci', (done) => {
if (!process.env.NPM_TOKEN) {
console.log('no NPM token found, skip')
} else {
const github = new GitHub()
github.authenticate({
type: 'oauth',
token: process.env.GITHUB_TOKEN,
})
const [_, owner, repo] = execSync('git remote get-url origin') // eslint-disable-line
.toString()
.match(/github.com[:/](.+)\/(.+)\.git/)
const getLatestRelease = github.repos.getLatestRelease({
owner,
repo,
})
const getCommits = github.repos.getCommits({
owner,
repo,
per_page: 1,
})
Promise.all([getLatestRelease, getCommits]).then(([latestRelease, commits]) => {
const preVersion = latestRelease.data.tag_name
const { version } = packageJson
const [_, newVersion] = commits.data[0].commit.message.trim().match(/bump (.+)/) || []
if (compareVersions(version, preVersion) === 1 && newVersion && newVersion.trim() === version) {
gulp.run('pub', (err) => {
err && console.log('err', err)
done()
})
} else {
console.log('donot need publish' + version)
}
})
}
})
function reportError () {
console.log(chalk.bgRed('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'))
console.log(chalk.bgRed('!! `npm publish` is forbidden for this package. !!'))

View File

@ -119,13 +119,11 @@ After wrapped by `getFieldDecorator`, `value`(or other property defined by `valu
| options.initialValue | You can specify initial value, type, optional value of children node. (Note: Because `Form` will test equality with `===` internaly, we recommend to use vairable as `initialValue`, instead of literal) | | n/a |
| options.normalize | Normalize value to form component, [a select-all example](https://codesandbox.io/s/kw4l2vqqmv) | function(value, prevValue, allValues): any | - |
| options.rules | Includes validation rules. Please refer to "Validation Rules" part for details. | object\[] | n/a |
| options.trigger | When to collect the value of children node | string | 'onChange' |
| options.trigger | When to collect the value of children node | string | 'change' |
| options.validateFirst | Whether stop validate on first rule of error for this field. | boolean | false |
| options.validateTrigger | When to validate the value of children node. | string\|string\[] | 'onChange' |
| options.validateTrigger | When to validate the value of children node. | string\|string\[] | 'change' |
| options.valuePropName | Props of children node, for example, the prop of Switch is 'checked'. | string | 'value' |
More option can be referenced at [rc-form option](https://github.com/react-component/form#option-object)。
### Form.Item
Note:

View File

@ -118,13 +118,11 @@ CustomizedForm = Form.create({})(CustomizedForm);
| options.initialValue | 子节点的初始值,类型、可选值均由子节点决定(注意:由于内部校验时使用 `===` 判断是否变化,建议使用变量缓存所需设置的值而非直接使用字面量)) | | |
| options.normalize | 转换默认的 value 给控件,[一个选择全部的例子](https://codesandbox.io/s/kw4l2vqqmv) | function(value, prevValue, allValues): any | - |
| options.rules | 校验规则,参考下方文档 | object\[] | |
| options.trigger | 收集子节点的值的时机 | string | 'onChange' |
| options.trigger | 收集子节点的值的时机 | string | 'change' |
| options.validateFirst | 当某一规则校验不通过时,是否停止剩下的规则的校验 | boolean | false |
| options.validateTrigger | 校验子节点值的时机 | string\|string\[] | 'onChange' |
| options.validateTrigger | 校验子节点值的时机 | string\|string\[] | 'change' |
| options.valuePropName | 子节点的值的属性,如 Switch 的是 'checked' | string | 'value' |
更多参数可参考 [rc-form option](https://github.com/react-component/form#option-object)。
### Form.Item
注意:

View File

@ -1,175 +1,177 @@
{
"name": "vue-antd-ui",
"version": "0.7.1",
"title": "Ant Design Vue",
"description": "An enterprise-class UI design language and Vue-based implementation",
"keywords": [
"ant",
"design",
"antd",
"vue",
"vueComponent",
"component",
"components",
"ui",
"framework",
"frontend"
],
"main": "dist/antd.min.js",
"files": [
"dist",
"lib",
"es"
],
"scripts": {
"dev": "NODE_ENV=development ENTRY_INDEX=dev ./node_modules/.bin/webpack-dev-server --open --hot --port 3001",
"start": "NODE_ENV=development ./node_modules/.bin/webpack-dev-server --open --hot",
"test": "jest --config .jest.js",
"site": "node scripts/run.js site-dist",
"copy": "node scripts/run.js copy-html",
"compile": "node antd-tools/cli/run.js compile",
"pub": "node antd-tools/cli/run.js pub",
"prepublish": "node antd-tools/cli/run.js guard",
"pre-publish": "npm run test && node ./scripts/prepub",
"dist": "node antd-tools/cli/run.js dist",
"lint": "eslint -c ./.eslintrc --fix --ext .jsx,.js,.vue ./components",
"lint:style": "stylelint \"./examples/**/*.less\" --fix --syntax less",
"commitmsg": "commitlint -x @commitlint/config-conventional -e $GIT_PARAMS",
"codecov": "codecov"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vueComponent/ant-design.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/vueComponent/ant-design/issues"
},
"homepage": "https://github.com/vueComponent/ant-design",
"pre-commit": [
"lint:style",
"lint"
],
"peerDependencies": {
"vue": ">=2.5.0",
"vue-template-compiler": ">=2.5.0"
},
"devDependencies": {
"@commitlint/cli": "^6.2.0",
"@commitlint/config-conventional": "^6.1.3",
"@octokit/rest": "^15.4.1",
"@vue/server-test-utils": "1.0.0-beta.16",
"@vue/test-utils": "1.0.0-beta.16",
"autoprefixer": "^8.1.0",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-jest": "^22.4.3",
"babel-loader": "^7.1.2",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-import": "^1.1.1",
"babel-plugin-istanbul": "^4.1.1",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es3-member-expression-literals": "^6.22.0",
"babel-plugin-transform-es3-property-literals": "^6.22.0",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-runtime": "~6.23.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
"case-sensitive-paths-webpack-plugin": "^2.1.2",
"chalk": "^2.3.2",
"cheerio": "^1.0.0-rc.2",
"codecov": "^3.0.0",
"colorful": "^2.1.0",
"commander": "^2.15.0",
"cross-env": "^5.1.4",
"css-loader": "^0.28.7",
"deep-assign": "^2.0.0",
"eslint": "^4.7.2",
"eslint-plugin-html": "^3.2.2",
"eslint-plugin-vue": "^3.13.0",
"eslint-plugin-vue-libs": "^1.2.1",
"extract-text-webpack-plugin": "^3.0.2",
"fetch-jsonp": "^1.1.3",
"glob": "^7.1.2",
"gulp": "^3.9.1",
"gulp-babel": "^7.0.0",
"gulp-strip-code": "^0.1.4",
"highlight.js": "^9.12.0",
"html-webpack-plugin": "^2.30.1",
"husky": "^0.14.3",
"istanbul-instrumenter-loader": "^3.0.0",
"jest": "^22.4.3",
"jest-serializer-vue": "^1.0.0",
"jsonp": "^0.2.1",
"less": "^2.7.2",
"less-loader": "^4.0.5",
"less-plugin-npm-import": "^2.1.0",
"markdown-it": "^8.4.0",
"markdown-it-anchor": "^4.0.0",
"marked": "^0.3.7",
"merge2": "^1.2.1",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"mockdate": "^2.0.2",
"moment-timezone": "^0.5.17",
"nprogress": "^0.2.0",
"postcss": "^6.0.20",
"postcss-loader": "^2.1.2",
"pre-commit": "^1.2.2",
"querystring": "^0.2.0",
"raw-loader": "^1.0.0-beta.0",
"reqwest": "^2.0.5",
"rimraf": "^2.6.2",
"rucksack-css": "^1.0.2",
"selenium-server": "^3.0.1",
"semver": "^5.3.0",
"style-loader": "^0.18.2",
"stylelint": "^8.1.1",
"stylelint-config-standard": "^17.0.0",
"through2": "^2.0.3",
"vue": "^2.5.16",
"vue-antd-md-loader": "^1.0.3",
"vue-clipboard2": "0.0.8",
"vue-infinite-scroll": "^2.0.2",
"vue-jest": "^2.5.0",
"vue-loader": "^13.0.5",
"vue-router": "^3.0.1",
"vue-server-renderer": "^2.5.16",
"vue-template-compiler": "^2.5.16",
"vue-virtual-scroller": "^0.12.0",
"webpack": "^3.11.0",
"webpack-chunk-hash": "^0.5.0",
"webpack-dev-server": "^2.8.2",
"webpack-merge": "^4.1.1"
},
"dependencies": {
"add-dom-event-listener": "^1.0.2",
"array-tree-filter": "^2.1.0",
"async-validator": "^1.8.2",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-runtime": "6.x",
"classnames": "^2.2.5",
"component-classes": "^1.2.6",
"dom-align": "^1.6.7",
"dom-closest": "^0.2.0",
"dom-scroll-into-view": "^1.2.1",
"enquire.js": "^2.1.6",
"json2mq": "^0.2.0",
"is-negative-zero": "^2.0.0",
"lodash": "^4.17.5",
"moment": "^2.21.0",
"omit.js": "^1.0.0",
"resize-observer-polyfill": "^1.5.0",
"shallow-equal": "^1.0.0",
"shallowequal": "^1.0.2",
"warning": "^3.0.0"
}
"name": "vue-antd-ui",
"version": "1.0.0",
"title": "Ant Design Vue",
"description": "An enterprise-class UI design language and Vue-based implementation",
"keywords": [
"ant",
"design",
"antd",
"vue",
"vueComponent",
"component",
"components",
"ui",
"framework",
"frontend"
],
"main": "dist/antd.min.js",
"files": [
"dist",
"lib",
"es"
],
"scripts": {
"dev": "NODE_ENV=development ENTRY_INDEX=dev ./node_modules/.bin/webpack-dev-server --open --hot --port 3001",
"start": "NODE_ENV=development ./node_modules/.bin/webpack-dev-server --open --hot",
"test": "jest --config .jest.js",
"site": "node scripts/run.js site-dist",
"copy": "node scripts/run.js copy-html",
"compile": "node antd-tools/cli/run.js compile",
"pub": "node antd-tools/cli/run.js pub",
"pub-with-ci": "node antd-tools/cli/run.js pub-with-ci",
"prepublish": "node antd-tools/cli/run.js guard",
"pre-publish": "node ./scripts/prepub",
"dist": "node antd-tools/cli/run.js dist",
"lint": "eslint -c ./.eslintrc --fix --ext .jsx,.js,.vue ./components",
"lint:style": "stylelint \"./examples/**/*.less\" --fix --syntax less",
"commitmsg": "commitlint -x @commitlint/config-conventional -e $GIT_PARAMS",
"codecov": "codecov"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vueComponent/ant-design.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/vueComponent/ant-design/issues"
},
"homepage": "https://github.com/vueComponent/ant-design",
"pre-commit": [
"lint:style",
"lint"
],
"peerDependencies": {
"vue": ">=2.5.0",
"vue-template-compiler": ">=2.5.0"
},
"devDependencies": {
"@commitlint/cli": "^6.2.0",
"@commitlint/config-conventional": "^6.1.3",
"@octokit/rest": "^15.4.1",
"@vue/server-test-utils": "1.0.0-beta.16",
"@vue/test-utils": "1.0.0-beta.16",
"autoprefixer": "^8.1.0",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-jest": "^22.4.3",
"babel-loader": "^7.1.2",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-import": "^1.1.1",
"babel-plugin-istanbul": "^4.1.1",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es3-member-expression-literals": "^6.22.0",
"babel-plugin-transform-es3-property-literals": "^6.22.0",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-runtime": "~6.23.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
"case-sensitive-paths-webpack-plugin": "^2.1.2",
"chalk": "^2.3.2",
"cheerio": "^1.0.0-rc.2",
"codecov": "^3.0.0",
"colorful": "^2.1.0",
"commander": "^2.15.0",
"compare-versions": "^3.3.0",
"cross-env": "^5.1.4",
"css-loader": "^0.28.7",
"deep-assign": "^2.0.0",
"eslint": "^4.7.2",
"eslint-plugin-html": "^3.2.2",
"eslint-plugin-vue": "^3.13.0",
"eslint-plugin-vue-libs": "^1.2.1",
"extract-text-webpack-plugin": "^3.0.2",
"fetch-jsonp": "^1.1.3",
"glob": "^7.1.2",
"gulp": "^3.9.1",
"gulp-babel": "^7.0.0",
"gulp-strip-code": "^0.1.4",
"highlight.js": "^9.12.0",
"html-webpack-plugin": "^2.30.1",
"husky": "^0.14.3",
"istanbul-instrumenter-loader": "^3.0.0",
"jest": "^22.4.3",
"jest-serializer-vue": "^1.0.0",
"jsonp": "^0.2.1",
"less": "^2.7.2",
"less-loader": "^4.0.5",
"less-plugin-npm-import": "^2.1.0",
"markdown-it": "^8.4.0",
"markdown-it-anchor": "^4.0.0",
"marked": "^0.3.7",
"merge2": "^1.2.1",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"mockdate": "^2.0.2",
"moment-timezone": "^0.5.17",
"nprogress": "^0.2.0",
"postcss": "^6.0.20",
"postcss-loader": "^2.1.2",
"pre-commit": "^1.2.2",
"querystring": "^0.2.0",
"raw-loader": "^1.0.0-beta.0",
"reqwest": "^2.0.5",
"rimraf": "^2.6.2",
"rucksack-css": "^1.0.2",
"selenium-server": "^3.0.1",
"semver": "^5.3.0",
"style-loader": "^0.18.2",
"stylelint": "^8.1.1",
"stylelint-config-standard": "^17.0.0",
"through2": "^2.0.3",
"vue": "^2.5.16",
"vue-antd-md-loader": "^1.0.3",
"vue-clipboard2": "0.0.8",
"vue-infinite-scroll": "^2.0.2",
"vue-jest": "^2.5.0",
"vue-loader": "^13.0.5",
"vue-router": "^3.0.1",
"vue-server-renderer": "^2.5.16",
"vue-template-compiler": "^2.5.16",
"vue-virtual-scroller": "^0.12.0",
"webpack": "^3.11.0",
"webpack-chunk-hash": "^0.5.0",
"webpack-dev-server": "^2.8.2",
"webpack-merge": "^4.1.1"
},
"dependencies": {
"add-dom-event-listener": "^1.0.2",
"array-tree-filter": "^2.1.0",
"async-validator": "^1.8.2",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-runtime": "6.x",
"classnames": "^2.2.5",
"component-classes": "^1.2.6",
"dom-align": "^1.6.7",
"dom-closest": "^0.2.0",
"dom-scroll-into-view": "^1.2.1",
"enquire.js": "^2.1.6",
"json2mq": "^0.2.0",
"is-negative-zero": "^2.0.0",
"lodash": "^4.17.5",
"moment": "^2.21.0",
"omit.js": "^1.0.0",
"resize-observer-polyfill": "^1.5.0",
"shallow-equal": "^1.0.0",
"shallowequal": "^1.0.2",
"warning": "^3.0.0"
}
}

3
scripts/.npmrc.template Normal file
View File

@ -0,0 +1,3 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
loglevel=info
registry=https://registry.npmjs.org/

View File

@ -2,24 +2,22 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="icon" type="image/x-icon" href="https://raw.githubusercontent.com/vueComponent/ant-design/master/logo.png">
<style id="nprogress-style">
#nprogress {
display: none
}
</style>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<link rel="icon" type="image/x-icon" href="https://raw.githubusercontent.com/vueComponent/ant-design/master/logo.png">
<style id="nprogress-style">
#nprogress { display: none;}
</style>
</head>
<body>
<div id="app">
<router-view></router-view>
</div>
<div id="app">
<router-view></router-view>
</div>
</body>
</html>
</html>

View File

@ -76,7 +76,6 @@ module.exports = merge(baseWebpackConfig, {
new HtmlWebpackPlugin({
template: './site/index.html',
inject: true,
minify: { collapseWhitespace: true },
production: true,
}),
new webpack.LoaderOptionsPlugin({