From 367878b19818932bfe5bb9a3de146a46e0a529d6 Mon Sep 17 00:00:00 2001 From: rex Date: Tue, 28 Jul 2020 20:52:00 +0800 Subject: [PATCH] build: compile 1.4.1 --- .github_changelog_generator | 6 ++++++ dist/area/index.js | 10 ++++++---- dist/picker/shared.js | 2 +- dist/slider/index.js | 12 ++++++++---- dist/toast/index.wxss | 2 +- lib/area/index.js | 10 ++++++---- lib/picker/shared.js | 2 +- lib/slider/index.js | 12 ++++++++---- lib/toast/index.wxss | 2 +- package.json | 1 + yarn.lock | 10 +++++++++- 11 files changed, 48 insertions(+), 21 deletions(-) create mode 100644 .github_changelog_generator diff --git a/.github_changelog_generator b/.github_changelog_generator new file mode 100644 index 00000000..1d661433 --- /dev/null +++ b/.github_changelog_generator @@ -0,0 +1,6 @@ +project=vant-weapp +user=youzan +since-tag=v1.3.0 +token=0935f6bd6b40169f1bc45bba0782e309d4a13017 +exclude-labels=duplicate,question,invalid,wontfix +issues=false \ No newline at end of file diff --git a/dist/area/index.js b/dist/area/index.js index d77fcf8e..c6216823 100644 --- a/dist/area/index.js +++ b/dist/area/index.js @@ -166,18 +166,19 @@ VantComponent({ } const stack = []; const indexes = []; - if (this.data.columnsNum >= 1) { + const { columnsNum } = this.data; + if (columnsNum >= 1) { stack.push(picker.setColumnValues(0, province, false)); indexes.push(this.getIndex('province', code)); } - if (this.data.columnsNum >= 2) { + if (columnsNum >= 2) { stack.push(picker.setColumnValues(1, city, false)); - indexes.push(this.getIndex('province', code)); + indexes.push(this.getIndex('city', code)); if (city.length && code.slice(2, 4) === '00') { [{ code }] = city; } } - if (this.data.columnsNum === 3) { + if (columnsNum === 3) { stack.push( picker.setColumnValues( 2, @@ -185,6 +186,7 @@ VantComponent({ false ) ); + indexes.push(this.getIndex('county', code)); } return Promise.all(stack) .catch(() => {}) diff --git a/dist/picker/shared.js b/dist/picker/shared.js index a8c96a8b..8531290b 100644 --- a/dist/picker/shared.js +++ b/dist/picker/shared.js @@ -12,7 +12,7 @@ export const pickerProps = { }, visibleItemCount: { type: Number, - value: 5, + value: 6, }, itemHeight: { type: Number, diff --git a/dist/slider/index.js b/dist/slider/index.js index 73c62a7f..97432920 100644 --- a/dist/slider/index.js +++ b/dist/slider/index.js @@ -23,11 +23,15 @@ VantComponent({ value: { type: Number, value: 0, - observer: 'updateValue', + observer(val) { + if (val !== this.value) { + this.updateValue(val); + } + }, }, barHeight: { type: null, - value: '2px', + value: 2, }, }, created() { @@ -37,7 +41,7 @@ VantComponent({ onTouchStart(event) { if (this.data.disabled) return; this.touchStart(event); - this.startValue = this.format(this.data.value); + this.startValue = this.format(this.value); this.dragStatus = 'start'; }, onTouchMove(event) { @@ -73,8 +77,8 @@ VantComponent({ value = this.format(value); const { min } = this.data; const width = `${((value - min) * 100) / this.getRange()}%`; + this.value = value; this.setData({ - value, barStyle: ` width: ${width}; ${drag ? 'transition: none;' : ''} diff --git a/dist/toast/index.wxss b/dist/toast/index.wxss index da946c9b..2a98d2e2 100644 --- a/dist/toast/index.wxss +++ b/dist/toast/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:initial;color:#fff;color:var(--toast-text-color,#fff);font-size:14px;font-size:var(--toast-font-size,14px);line-height:20px;line-height:var(--toast-line-height,20px);white-space:pre-wrap;word-wrap:break-word;background-color:rgba(50,50,51,.88);background-color:var(--toast-background-color,rgba(50,50,51,.88));border-radius:4px;border-radius:var(--toast-border-radius,4px)}.van-toast__container{position:fixed;top:50%;left:50%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:70%;max-width:var(--toast-max-width,70%)}.van-toast--text{min-width:96px;min-width:var(--toast-text-min-width,96px);padding:8px 12px;padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{width:90px;width:var(--toast-default-width,90px);min-height:90px;min-height:var(--toast-default-min-height,90px);padding:16px;padding:var(--toast-default-padding,16px)}.van-toast--icon .van-toast__icon{font-size:48px;font-size:var(--toast-icon-size,48px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translateY(-30vh);transform:translateY(-30vh)}.van-toast--bottom{-webkit-transform:translateY(30vh);transform:translateY(30vh)} \ No newline at end of file +@import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:initial;color:#fff;color:var(--toast-text-color,#fff);font-size:14px;font-size:var(--toast-font-size,14px);line-height:20px;line-height:var(--toast-line-height,20px);white-space:pre-wrap;word-wrap:break-word;background-color:rgba(50,50,51,.88);background-color:var(--toast-background-color,rgba(50,50,51,.88));border-radius:8px;border-radius:var(--toast-border-radius,8px)}.van-toast__container{position:fixed;top:50%;left:50%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:70%;max-width:var(--toast-max-width,70%)}.van-toast--text{min-width:96px;min-width:var(--toast-text-min-width,96px);padding:8px 12px;padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{width:90px;width:var(--toast-default-width,90px);min-height:90px;min-height:var(--toast-default-min-height,90px);padding:16px;padding:var(--toast-default-padding,16px)}.van-toast--icon .van-toast__icon{font-size:48px;font-size:var(--toast-icon-size,48px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translateY(-30vh);transform:translateY(-30vh)}.van-toast--bottom{-webkit-transform:translateY(30vh);transform:translateY(30vh)} \ No newline at end of file diff --git a/lib/area/index.js b/lib/area/index.js index 4f158fbb..d02aa154 100644 --- a/lib/area/index.js +++ b/lib/area/index.js @@ -192,18 +192,19 @@ component_1.VantComponent({ } var stack = []; var indexes = []; - if (this.data.columnsNum >= 1) { + var columnsNum = this.data.columnsNum; + if (columnsNum >= 1) { stack.push(picker.setColumnValues(0, province, false)); indexes.push(this.getIndex('province', code)); } - if (this.data.columnsNum >= 2) { + if (columnsNum >= 2) { stack.push(picker.setColumnValues(1, city, false)); - indexes.push(this.getIndex('province', code)); + indexes.push(this.getIndex('city', code)); if (city.length && code.slice(2, 4) === '00') { code = city[0].code; } } - if (this.data.columnsNum === 3) { + if (columnsNum === 3) { stack.push( picker.setColumnValues( 2, @@ -211,6 +212,7 @@ component_1.VantComponent({ false ) ); + indexes.push(this.getIndex('county', code)); } return Promise.all(stack) .catch(function () {}) diff --git a/lib/picker/shared.js b/lib/picker/shared.js index 4081f546..9b2ca48a 100644 --- a/lib/picker/shared.js +++ b/lib/picker/shared.js @@ -15,7 +15,7 @@ exports.pickerProps = { }, visibleItemCount: { type: Number, - value: 5, + value: 6, }, itemHeight: { type: Number, diff --git a/lib/slider/index.js b/lib/slider/index.js index f945c101..1001a4dd 100644 --- a/lib/slider/index.js +++ b/lib/slider/index.js @@ -25,11 +25,15 @@ component_1.VantComponent({ value: { type: Number, value: 0, - observer: 'updateValue', + observer: function (val) { + if (val !== this.value) { + this.updateValue(val); + } + }, }, barHeight: { type: null, - value: '2px', + value: 2, }, }, created: function () { @@ -39,7 +43,7 @@ component_1.VantComponent({ onTouchStart: function (event) { if (this.data.disabled) return; this.touchStart(event); - this.startValue = this.format(this.data.value); + this.startValue = this.format(this.value); this.dragStatus = 'start'; }, onTouchMove: function (event) { @@ -77,8 +81,8 @@ component_1.VantComponent({ value = this.format(value); var min = this.data.min; var width = ((value - min) * 100) / this.getRange() + '%'; + this.value = value; this.setData({ - value: value, barStyle: '\n width: ' + width + diff --git a/lib/toast/index.wxss b/lib/toast/index.wxss index da946c9b..2a98d2e2 100644 --- a/lib/toast/index.wxss +++ b/lib/toast/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:initial;color:#fff;color:var(--toast-text-color,#fff);font-size:14px;font-size:var(--toast-font-size,14px);line-height:20px;line-height:var(--toast-line-height,20px);white-space:pre-wrap;word-wrap:break-word;background-color:rgba(50,50,51,.88);background-color:var(--toast-background-color,rgba(50,50,51,.88));border-radius:4px;border-radius:var(--toast-border-radius,4px)}.van-toast__container{position:fixed;top:50%;left:50%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:70%;max-width:var(--toast-max-width,70%)}.van-toast--text{min-width:96px;min-width:var(--toast-text-min-width,96px);padding:8px 12px;padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{width:90px;width:var(--toast-default-width,90px);min-height:90px;min-height:var(--toast-default-min-height,90px);padding:16px;padding:var(--toast-default-padding,16px)}.van-toast--icon .van-toast__icon{font-size:48px;font-size:var(--toast-icon-size,48px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translateY(-30vh);transform:translateY(-30vh)}.van-toast--bottom{-webkit-transform:translateY(30vh);transform:translateY(30vh)} \ No newline at end of file +@import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:initial;color:#fff;color:var(--toast-text-color,#fff);font-size:14px;font-size:var(--toast-font-size,14px);line-height:20px;line-height:var(--toast-line-height,20px);white-space:pre-wrap;word-wrap:break-word;background-color:rgba(50,50,51,.88);background-color:var(--toast-background-color,rgba(50,50,51,.88));border-radius:8px;border-radius:var(--toast-border-radius,8px)}.van-toast__container{position:fixed;top:50%;left:50%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:70%;max-width:var(--toast-max-width,70%)}.van-toast--text{min-width:96px;min-width:var(--toast-text-min-width,96px);padding:8px 12px;padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{width:90px;width:var(--toast-default-width,90px);min-height:90px;min-height:var(--toast-default-min-height,90px);padding:16px;padding:var(--toast-default-padding,16px)}.van-toast--icon .van-toast__icon{font-size:48px;font-size:var(--toast-icon-size,48px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translateY(-30vh);transform:translateY(-30vh)}.van-toast--bottom{-webkit-transform:translateY(30vh);transform:translateY(30vh)} \ No newline at end of file diff --git a/package.json b/package.json index a95d5334..fd30b02a 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "progress-bar-webpack-plugin": "^1.11.0", "style-loader": "^1.0.0", "stylelint": "^13.0.0", + "tscpaths": "^0.0.9", "typescript": "^3.8.0", "vue": "2.6.10", "vue-loader": "^15.7.1", diff --git a/yarn.lock b/yarn.lock index ff2c21b4..407d0f63 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5855,7 +5855,7 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" -globby@^9.0.0: +globby@^9.0.0, globby@^9.2.0: version "9.2.0" resolved "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d" integrity sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg== @@ -11556,6 +11556,14 @@ trough@^1.0.0: resolved "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== +tscpaths@^0.0.9: + version "0.0.9" + resolved "https://registry.npm.taobao.org/tscpaths/download/tscpaths-0.0.9.tgz#c77abfde6820920f10c64f83c27753b9505814ab" + integrity sha1-x3q/3mggkg8Qxk+DwndTuVBYFKs= + dependencies: + commander "^2.20.0" + globby "^9.2.0" + tslib@1.10.0: version "1.10.0" resolved "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"