From 1af9ab3e167fa52b8e38a3834d8b30dbd7e9dbcb Mon Sep 17 00:00:00 2001 From: mxie <15623530290@163.com> Date: Sat, 16 Jun 2018 11:05:12 +0800 Subject: [PATCH] docs: add ChangeLog update readme --- CHANGELOG.md | 33 +++++++++++++++++++++++++++++++++ README.md | 15 ++++++++++++++- README.zh-CN.md | 2 +- package.json | 5 +++-- 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e97db93 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,33 @@ +## Changelog + + +# [2.0.0]() (2018-06-16) + +### New features + +* Add `clearable` used to show clear icon +* Add slot `calendar-icon` to custom calendar icon +* Add slot `header` and `footer` to custom popup area +* `disabledDays` supports custom functions + +### Breaking changes + +* Refactored code. This may fail if you hacked the code +* `format` default value changes from yyyy-MM-dd to YYYY-MM-DD, now the parsing tokens are similar to the moment.js, not supports lowercase yyyy +* remove `custom-formatter` +* `editable` default value changes from false to true, now supports range +* select the year or month panel will not change the value(Because it causes many problems when set the `not-before` or `not-after`) + +### 新特性 +* 添加`clearable` 用于控制是否显示清除按钮 +* 添加 slot `calendar-icon` 自定义日历图标 +* 添加 slot `header` 和 `footer` 自定义弹出日历的头部和尾部 +* `disabledDays` 现在支持函数 + +### 非兼容性更新 + +* 重构代码. 如果你自己hack过代码可能会失效 +* `format` 默认值由 yyyy-MM-dd 改成 YYYY-MM-DD, 现在格式类似moment.js. 不支持小写的yyyy +* 移除了`custom-formatter` +* `editable` 默认由false改成true, 现在日历范围也支持手动修改 +* 当选择年或月的面板的时候不会修改日期(因为当设置了`not-before`或者`not-after`的时候会引发很多问题和bug) diff --git a/README.md b/README.md index 15639b5..09d2642 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ ## Demo - + ![image](https://github.com/mengxiong10/vue2-datepicker/raw/master/screenshot/demo.PNG) @@ -149,6 +149,19 @@ export default { | confirm | When user click 'OK' button | the currentValue | | input-error | When user type a invalid Date| the input value | +### Slots + +| Name | Description | +|-----------------|--------------------------| +| calendar-icon | custom the calender icon | +| header | popup header | +| footer | popup footer | + +## ChangeLog + +[CHANGELOG](CHANGELOG.md) + + ## License [MIT](https://github.com/mengxiong10/vue2-datepicker/blob/master/LICENSE) diff --git a/README.zh-CN.md b/README.zh-CN.md index 7ce103a..7979334 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -15,7 +15,7 @@ ## 线上Demo - + ![image](https://github.com/mengxiong10/vue2-datepicker/raw/master/screenshot/demo.PNG) diff --git a/package.json b/package.json index 79d6916..5409ea1 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,10 @@ "scripts": { "dev": "cross-env NODE_ENV=development webpack-dev-server --hot --open --config build/webpack.dev.config.js", "demo": "cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.demo.config.js", - "deploy": "cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.deploy.config.js", + "build": "cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.deploy.config.js", "test:push": "jest --coverage --coverageReporters=text-lcov | coveralls", - "test": "jest" + "test": "jest", + "deploy": "npm test && npm run build" }, "jest": { "moduleFileExtensions": [