From 9be8526bb38b37d7e8c7c5a920c78e31ab390d62 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Thu, 31 Oct 2019 12:38:30 +0800 Subject: [PATCH] feat(v3): keep-alive --- packages/uni-app-plus/dist/index.v3.js | 18 +- .../uni-app-plus/dist/service.runtime.esm.js | 31 +- packages/uni-app-plus/dist/view.css | 1394 ++- packages/uni-app-plus/dist/view.umd.js | 8108 +++++++++-------- .../compiler-app-plus-extra.service.spec.js | 11 + .../compiler-app-plus-extra.view.spec.js | 10 + .../compiler-app-plus.service.spec.js | 2 +- .../__tests__/compiler-app-plus.view.spec.js | 2 +- .../uni-template-compiler/__tests__/demo.js | 2 +- .../lib/app/optimizer.js | 10 +- .../lib/app/parser/base-parser.js | 11 + .../lib/app/parser/component-parser.js | 9 +- .../uni-template-compiler/lib/app/service.js | 2 + .../uni-template-compiler/lib/app/util.js | 5 +- .../uni-template-compiler/lib/app/view.js | 5 +- packages/uni-template-compiler/lib/util.js | 8 +- .../webpack-uni-app-loader/view/main.js | 6 +- .../webpack-uni-app-loader/view/script.js | 14 +- .../webpack-uni-app-loader/view/util.js | 14 +- .../lib/babel/scoped-component-traverse.js | 34 +- 20 files changed, 5972 insertions(+), 3724 deletions(-) diff --git a/packages/uni-app-plus/dist/index.v3.js b/packages/uni-app-plus/dist/index.v3.js index c0fb3a609..ecfa304d6 100644 --- a/packages/uni-app-plus/dist/index.v3.js +++ b/packages/uni-app-plus/dist/index.v3.js @@ -3173,7 +3173,7 @@ var serviceContext = (function () { return invokeVmMethodWithoutArgs(ctx, 'pause') }, seek (ctx, args) { - return invokeVmMethod(ctx, 'seek', args) + return invokeVmMethod(ctx, 'seek', args.position) }, stop (ctx) { return invokeVmMethodWithoutArgs(ctx, 'stop') @@ -3182,7 +3182,7 @@ var serviceContext = (function () { return invokeVmMethod(ctx, 'sendDanmu', args) }, playbackRate (ctx, args) { - return invokeVmMethod(ctx, 'playbackRate', args) + return invokeVmMethod(ctx, 'playbackRate', args.rate) }, requestFullScreen (ctx, args) { return invokeVmMethod(ctx, 'requestFullScreen', args) @@ -7999,7 +7999,7 @@ var serviceContext = (function () { createMapContext: createMapContext$1 }); - const RATES = [0.5, 0.8, 1.0, 1.25, 1.5]; + const RATES = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0]; function operateVideoPlayer$3 (videoId, pageVm, type, data) { invokeMethod('operateVideoPlayer', videoId, pageVm, type, data); @@ -8021,8 +8021,8 @@ var serviceContext = (function () { operateVideoPlayer$3(this.id, this.pageVm, 'stop'); } seek (position) { - operateVideoPlayer$3(this.id, this.pageVm, 'seek', { - position + operateVideoPlayer$3(this.id, this.pageVm, 'seek', { + position }); } sendDanmu (args) { @@ -8032,12 +8032,12 @@ var serviceContext = (function () { if (!~RATES.indexOf(rate)) { rate = 1.0; } - operateVideoPlayer$3(this.id, this.pageVm, 'playbackRate', { - rate + operateVideoPlayer$3(this.id, this.pageVm, 'playbackRate', { + rate }); } - requestFullScreen () { - operateVideoPlayer$3(this.id, this.pageVm, 'requestFullScreen'); + requestFullScreen (args = {}) { + operateVideoPlayer$3(this.id, this.pageVm, 'requestFullScreen', args); } exitFullScreen () { operateVideoPlayer$3(this.id, this.pageVm, 'exitFullScreen'); diff --git a/packages/uni-app-plus/dist/service.runtime.esm.js b/packages/uni-app-plus/dist/service.runtime.esm.js index b2c7602ae..60834b981 100644 --- a/packages/uni-app-plus/dist/service.runtime.esm.js +++ b/packages/uni-app-plus/dist/service.runtime.esm.js @@ -695,7 +695,13 @@ var uid = 0; * directives subscribing to it. */ var Dep = function Dep () { - this.id = uid++; + // fixed by xxxxxx (nvue vuex) + /* eslint-disable no-undef */ + if(typeof SharedObject !== 'undefined'){ + this.id = SharedObject.uid++; + } else { + this.id = uid++; + } this.subs = []; }; @@ -708,8 +714,8 @@ Dep.prototype.removeSub = function removeSub (sub) { }; Dep.prototype.depend = function depend () { - if (Dep.target) { - Dep.target.addDep(this); + if (Dep.SharedObject.target) { // fixed by xxxxxx + Dep.SharedObject.target.addDep(this); } }; @@ -730,17 +736,20 @@ Dep.prototype.notify = function notify () { // The current target watcher being evaluated. // This is globally unique because only one watcher // can be evaluated at a time. -Dep.target = null; -var targetStack = []; +// fixed by xxxxxx (nvue shared vuex) +/* eslint-disable no-undef */ +Dep.SharedObject = typeof SharedObject !== 'undefined' ? SharedObject : {}; +Dep.SharedObject.target = null; +Dep.SharedObject.targetStack = []; function pushTarget (target) { - targetStack.push(target); - Dep.target = target; + Dep.SharedObject.targetStack.push(target); + Dep.SharedObject.target = target; } function popTarget () { - targetStack.pop(); - Dep.target = targetStack[targetStack.length - 1]; + Dep.SharedObject.targetStack.pop(); + Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1]; } /* */ @@ -1019,7 +1028,7 @@ function defineReactive$$1 ( configurable: true, get: function reactiveGetter () { var value = getter ? getter.call(obj) : val; - if (Dep.target) { + if (Dep.SharedObject.target) { // fixed by xxxxxx dep.depend(); if (childOb) { childOb.dep.depend(); @@ -4843,7 +4852,7 @@ function createComputedGetter (key) { if (watcher.dirty) { watcher.evaluate(); } - if (Dep.target) { + if (Dep.SharedObject.target) { // fixed by xxxxxx watcher.depend(); } return watcher.value diff --git a/packages/uni-app-plus/dist/view.css b/packages/uni-app-plus/dist/view.css index ddde0f12d..6cb82d8b4 100644 --- a/packages/uni-app-plus/dist/view.css +++ b/packages/uni-app-plus/dist/view.css @@ -1 +1,1393 @@ -*{margin:0;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent}input[type=search]::-webkit-search-cancel-button{display:none}@font-face{font-weight:400;font-style:normal;font-family:uni;src:url("data:application/octet-stream;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzJAKEx+AAABfAAAAFZjbWFw65cFHQAAAhwAAAJQZ2x5ZvCRR/EAAASUAAAKtGhlYWQLKIN9AAAA4AAAADZoaGVhCCwD+gAAALwAAAAkaG10eEJo//8AAAHUAAAASGxvY2EYqh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d2V1aVJlZ3VsYXJ3ZXVpd2V1aVZlcnNpb24gMS4wd2V1aUdlbmVyYXRlZCBieSBzdmcydHRmIGZyb20gRm9udGVsbG8gcHJvamVjdC5odHRwOi8vZm9udGVsbG8uY29tAHcAZQB1AGkAUgBlAGcAdQBsAGEAcgB3AGUAdQBpAHcAZQB1AGkAVgBlAHIAcwBpAG8AbgAgADEALgAwAHcAZQB1AGkARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAQIBAwEEAQUBBgEHAQgBCQEKAQsBDAENAQ4BDwEQAREBEgETAAZjaXJjbGUIZG93bmxvYWQEaW5mbwxzYWZlX3N1Y2Nlc3MJc2FmZV93YXJuB3N1Y2Nlc3MOc3VjY2Vzcy1jaXJjbGURc3VjY2Vzcy1uby1jaXJjbGUHd2FpdGluZw53YWl0aW5nLWNpcmNsZQR3YXJuC2luZm8tY2lyY2xlBmNhbmNlbAZzZWFyY2gFY2xlYXIEYmFjawZkZWxldGUAAAAA") format("truetype")}@font-face{font-weight:400;font-style:normal;font-family:unibtn;src:url("data:application/octet-stream;base64,AAEAAAALAIAAAwAwT1MvMg8SAzoAAAC8AAAAYGNtYXAAILNAAAABHAAAAGRnYXNwAAAAEAAAAYAAAAAIZ2x5ZnVT/G4AAAGIAAAEHGhlYWQOAdVuAAAFpAAAADZoaGVhB3wDzAAABdwAAAAkaG10eCIABqYAAAYAAAAALGxvY2EDqgTMAAAGLAAAABhtYXhwAA8ATQAABkQAAAAgbmFtZXBR8sQAAAZkAAAB2nBvc3QAAwAAAAAIQAAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABE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AG4AIAAxAC4AMHN0cmVhbWljb25mb250AHMAdAByAGUAYQBtAGkAYwBvAG4AZgBvAG4AdHN0cmVhbWljb25mb250AHMAdAByAGUAYQBtAGkAYwBvAG4AZgBvAG4AdFJlZ3VsYXIAUgBlAGcAdQBsAGEAcnN0cmVhbWljb25mb250AHMAdAByAGUAYQBtAGkAYwBvAG4AZgBvAG4AdEZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}body,html{-webkit-user-select:none;user-select:none;width:100%}html{height:100%}body{overflow-x:hidden}[class*=" uni-icon-"],[class^=uni-icon-]{display:inline-block;vertical-align:middle;font:normal normal normal 14px/1 uni;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}[class*=" uni-btn-icon"],[class^=uni-btn-icon]{display:inline-block;font:normal normal normal 14px/1 unibtn;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}[class*=" uni-btn-icon"]:before,[class^=uni-btn-icon]:before{margin:0;box-sizing:border-box}.uni-icon-success-no-circle:before{content:"\EA08"}.uni-loading,uni-button[loading]:before{background:rgba(0,0,0,0) url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWln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IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=") no-repeat}.uni-loading{width:20px;height:20px;display:inline-block;vertical-align:middle;-webkit-animation:uni-loading 1s steps(12) infinite;animation:uni-loading 1s steps(12) infinite;background-size:100%}@-webkit-keyframes uni-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes uni-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}[nvue] uni-scroll-view,[nvue] uni-swiper-item,[nvue] uni-view{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-shrink:0;flex-shrink:0;-webkit-box-flex:0;-webkit-flex-grow:0;flex-grow:0;-webkit-flex-basis:auto;flex-basis:auto;-webkit-box-align:stretch;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start}[nvue-dir-row] uni-swiper-item,[nvue-dir-row] uni-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}[nvue-dir-column] uni-swiper-item,[nvue-dir-column] uni-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}[nvue-dir-row-reverse] uni-swiper-item,[nvue-dir-row-reverse] uni-view{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse}[nvue-dir-column-reverse] uni-swiper-item,[nvue-dir-column-reverse] uni-view{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse}[nvue] uni-image,[nvue] uni-input,[nvue] uni-scroll-view,[nvue] uni-swiper,[nvue] uni-swiper-item,[nvue] uni-text,[nvue] uni-textarea,[nvue] uni-video,[nvue] uni-view{position:relative;border:0 solid #000;box-sizing:border-box}[nvue] uni-swiper-item{position:absolute}uni-button{position:relative;display:block;margin-left:auto;margin-right:auto;padding-left:14px;padding-right:14px;box-sizing:border-box;font-size:18px;text-align:center;text-decoration:none;line-height:2.55555556;border-radius:5px;-webkit-tap-highlight-color:transparent;overflow:hidden;color:#000;background-color:#f8f8f8}uni-button[hidden]{display:none!important}uni-button:after{content:" ";width:200%;height:200%;position:absolute;top:0;left:0;border:1px solid rgba(0,0,0,.2);-webkit-transform:scale(.5);transform:scale(.5);-webkit-transform-origin:0 0;transform-origin:0 0;box-sizing:border-box;border-radius:10px}uni-button[native]{padding-left:0;padding-right:0}uni-button[native] .uni-button-cover-view-wrapper{border:inherit;border-color:inherit;border-radius:inherit;background-color:inherit}uni-button[native] .uni-button-cover-view-inner{padding-left:14px;padding-right:14px}uni-button uni-cover-view{line-height:inherit;white-space:inherit}uni-button[type=default]{color:#000;background-color:#f8f8f8}uni-button[type=primary]{color:#fff;background-color:#007aff}uni-button[type=warn]{color:#fff;background-color:#e64340}uni-button[disabled]{color:hsla(0,0%,100%,.6)}uni-button[disabled]:not([type]),uni-button[disabled][type=default]{color:rgba(0,0,0,.3);background-color:#f7f7f7}uni-button[disabled][type=primary]{background-color:rgba(0,122,255,.6)}uni-button[disabled][type=warn]{background-color:#ec8b89}uni-button[type=primary][plain]{color:#007aff;border:1px solid #007aff;background-color:rgba(0,0,0,0)}uni-button[type=primary][plain][disabled]{color:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2)}uni-button[type=primary][plain]:after{border-width:0}uni-button[type=default][plain]{color:#353535;border:1px solid #353535;background-color:rgba(0,0,0,0)}uni-button[type=default][plain][disabled]{color:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2)}uni-button[type=default][plain]:after{border-width:0}uni-button[plain]{color:#353535;border:1px solid #353535;background-color:rgba(0,0,0,0)}uni-button[plain][disabled]{color:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2)}uni-button[plain]:after{border-width:0}uni-button[plain][native] .uni-button-cover-view-inner{padding:0}uni-button[type=warn][plain]{color:#e64340;border:1px solid #e64340;background-color:rgba(0,0,0,0)}uni-button[type=warn][plain][disabled]{color:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2)}uni-button[type=warn][plain]:after{border-width:0}uni-button[size=mini]{display:inline-block;line-height:2.3;font-size:13px;padding:0 1.34em}uni-button[size=mini][native]{padding:0}uni-button[size=mini][native] .uni-button-cover-view-inner{padding:0 1.34em}uni-button[loading]:before{content:" ";display:inline-block;width:18px;height:18px;vertical-align:middle;-webkit-animation:uni-loading 1s steps(12) infinite;animation:uni-loading 1s steps(12) infinite;background-size:100%}uni-button[loading][type=primary]{color:hsla(0,0%,100%,.6);background-color:#0062cc}uni-button[loading][type=primary][plain]{color:#007aff;background-color:rgba(0,0,0,0)}uni-button[loading][type=default]{color:rgba(0,0,0,.6);background-color:#dedede}uni-button[loading][type=default][plain]{color:#353535;background-color:rgba(0,0,0,0)}uni-button[loading][type=warn]{color:hsla(0,0%,100%,.6);background-color:#ce3c39}uni-button[loading][type=warn][plain]{color:#e64340;background-color:rgba(0,0,0,0)}uni-button[loading][native]:before{content:none}.button-hover{color:rgba(0,0,0,.6);background-color:#dedede}.button-hover[plain]{color:rgba(53,53,53,.6);border-color:rgba(53,53,53,.6);background-color:rgba(0,0,0,0)}.button-hover[type=primary]{color:hsla(0,0%,100%,.6);background-color:#0062cc}.button-hover[type=primary][plain]{color:rgba(26,173,25,.6);border-color:rgba(26,173,25,.6);background-color:rgba(0,0,0,0)}.button-hover[type=default]{color:rgba(0,0,0,.6);background-color:#dedede}.button-hover[type=default][plain]{color:rgba(53,53,53,.6);border-color:rgba(53,53,53,.6);background-color:rgba(0,0,0,0)}.button-hover[type=warn]{color:hsla(0,0%,100%,.6);background-color:#ce3c39}.button-hover[type=warn][plain]{color:rgba(230,67,64,.6);border-color:rgba(230,67,64,.6);background-color:rgba(0,0,0,0)}uni-canvas{width:300px;height:150px;display:block;position:relative}uni-canvas>canvas{position:absolute;top:0;left:0;width:100%;height:100%}uni-checkbox-group[hidden]{display:none}uni-checkbox{-webkit-tap-highlight-color:transparent;display:inline-block}uni-checkbox[hidden]{display:none}uni-checkbox .uni-checkbox-wrapper{display:-webkit-inline-flex;display:-webkit-inline-box;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;align-items:center;vertical-align:middle}uni-checkbox .uni-checkbox-input{margin-right:5px;-webkit-appearance:none;appearance:none;outline:0;border:1px solid #d1d1d1;background-color:#fff;border-radius:3px;width:22px;height:22px;position:relative}uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked{color:#007aff}uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked:before{font:normal normal normal 14px/1 uni;content:"\EA08";font-size:22px;position:absolute;top:50%;left:50%;transform:translate(-50%,-48%) scale(.73);-webkit-transform:translate(-50%,-48%) scale(.73)}uni-checkbox .uni-checkbox-input.uni-checkbox-input-disabled{background-color:#e1e1e1}uni-checkbox .uni-checkbox-input.uni-checkbox-input-disabled:before{color:#adadad}uni-checkbox-group{display:block}uni-icon{display:inline-block;font-size:0;box-sizing:border-box}uni-icon[hidden]{display:none}uni-icon>i{font:normal normal normal 14px/1 weui}uni-icon>i:before{margin:0;box-sizing:border-box}@font-face{font-weight:400;font-style:normal;font-family:weui;src:url("data:application/octet-stream;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzJAKEx8AAABfAAAAFZjbWFw65cFHQAAAhwAAAJQZ2x5Zp+UEEcAAASUAAAIvGhlYWQUqc7xAAAA4AAAADZoaGVhB/YD+wAAALwAAAAkaG10eEJoAAAAAAHUAAAASGxvY2EUxhJeAAAEbAAAACZtYXhwASEAQwAAARgAAAAgbmFtZeNcHtgAAA1QAAAB5nBvc3T6OoZLAAAPOAAAAOYAAQAAA+gAAABaA+gAAAAAA7MAAQAAAAAAAAAAAAAAAAAAABIAAQAAAAEAAMCU2KdfDzz1AAsD6AAAAADY7EUUAAAAANjsRRQAAAAAA7MD5AAAAAgAAgAAAAAAAAABAAAAEgA3AAUAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAAAAQOwAZAABQAIAnoCvAAAAIwCegK8AAAB4AAxAQIAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA6gHqEQPoAAAAWgPoAAAAAAABAAAAAAAAAAAAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAAAAABQAAAAMAAAAsAAAABAAAAXQAAQAAAAAAbgADAAEAAAAsAAMACgAAAXQABABCAAAABAAEAAEAAOoR//8AAOoB//8AAAABAAQAAAABAAIAAwAEAAUABgAHAAgACQAKAAsADAANAA4ADwAQABEAAAEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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4BDwEQAREBEgETAAZjaXJjbGUIZG93bmxvYWQEaW5mbwxzYWZlLXN1Y2Nlc3MJc2FmZS13YXJuB3N1Y2Nlc3MOc3VjY2Vzcy1jaXJjbGURc3VjY2Vzcy1uby1jaXJjbGUHd2FpdGluZw53YWl0aW5nLWNpcmNsZQR3YXJuC2luZm8tY2lyY2xlBmNhbmNlbAZzZWFyY2gFY2xlYXIEYmFjawZkZWxldGUAAAAA") format("truetype")}.uni-icon-success:before{content:"\EA06"}.uni-icon-success_circle:before{content:"\EA07"}.uni-icon-success_no_circle:before{content:"\EA08"}.uni-icon-safe_success:before{content:"\EA04"}.uni-icon-safe_warn:before{content:"\EA05"}.uni-icon-info:before{content:"\EA03"}.uni-icon-info_circle:before{content:"\EA0C"}.uni-icon-warn:before{content:"\EA0B"}.uni-icon-waiting:before{content:"\EA09"}.uni-icon-waiting_circle:before{content:"\EA0A"}.uni-icon-circle:before{content:"\EA01"}.uni-icon-cancel:before{content:"\EA0D"}.uni-icon-download:before{content:"\EA02"}.uni-icon-search:before{content:"\EA0E"}.uni-icon-clear:before{content:"\EA0F"}.uni-icon-safe_success,.uni-icon-success,.uni-icon-success_circle,.uni-icon-success_no_circle{color:#007aff}.uni-icon-safe_warn{color:#ffbe00}.uni-icon-info{color:#10aeff}.uni-icon-info_circle{color:#007aff}.uni-icon-warn{color:#f76260}.uni-icon-waiting,.uni-icon-waiting_circle{color:#10aeff}.uni-icon-circle{color:#c9c9c9}.uni-icon-cancel{color:#f43530}.uni-icon-download{color:#007aff}.uni-icon-clear,.uni-icon-search{color:#b2b2b2}uni-image{width:320px;height:240px;display:inline-block;overflow:hidden;position:relative}uni-image[hidden]{display:none}uni-image>div,uni-image>img{width:100%;height:100%}uni-image>img{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;display:block;position:absolute;top:0;left:0;opacity:0}uni-image>.uni-image-will-change{will-change:transform}uni-input{display:block;font-size:16px;line-height:1.4em;height:1.4em;min-height:1.4em;overflow:hidden}uni-input[hidden]{display:none}.uni-input-form,.uni-input-input,.uni-input-placeholder,.uni-input-wrapper{outline:none;border:none;padding:0;margin:0;text-decoration:inherit}.uni-input-form,.uni-input-wrapper{display:block;position:relative;width:100%;height:100%}.uni-input-input,.uni-input-placeholder{width:100%}.uni-input-placeholder{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:grey;overflow:hidden;text-overflow:clip;white-space:pre;word-break:keep-all;pointer-events:none}.uni-input-input{display:block;height:100%;background:none;color:inherit;opacity:1;-webkit-text-fill-color:currentcolor;font:inherit;line-height:inherit;letter-spacing:inherit;text-align:inherit;text-indent:inherit;text-transform:inherit;text-shadow:inherit}.uni-input-input[type=search]::-webkit-search-cancel-button{display:none}.uni-input-input::-webkit-inner-spin-button,.uni-input-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.uni-input-input[type=number]{-moz-appearance:textfield}uni-movable-area{display:block;position:relative;width:10px;height:10px}uni-movable-area[hidden]{display:none}uni-movable-view{display:inline-block;width:10px;height:10px;top:0;left:0;position:absolute}uni-movable-view[hidden]{display:none}.navigator-hover{background-color:rgba(0,0,0,.1);opacity:.7}uni-navigator{height:auto;width:auto;display:block}uni-navigator[hidden]{display:none}uni-picker-view-column{-webkit-flex:1;-webkit-box-flex:1;flex:1;position:relative;height:100%;overflow:hidden}uni-picker-view-column[hidden]{display:none}.uni-picker-view-group{height:100%}.uni-picker-view-mask{transform:translateZ(0);-webkit-transform:translateZ(0);top:0;height:100%;margin:0 auto;background:-webkit-linear-gradient(top,hsla(0,0%,100%,.95),hsla(0,0%,100%,.6)),-webkit-linear-gradient(bottom,hsla(0,0%,100%,.95),hsla(0,0%,100%,.6));background:linear-gradient(180deg,hsla(0,0%,100%,.95),hsla(0,0%,100%,.6)),linear-gradient(0deg,hsla(0,0%,100%,.95),hsla(0,0%,100%,.6));background-position:top,bottom;background-size:100% 102px;background-repeat:no-repeat}.uni-picker-view-indicator{height:34px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.uni-picker-view-indicator,.uni-picker-view-mask{position:absolute;left:0;width:100%;z-index:3;pointer-events:none}.uni-picker-view-content{position:absolute;top:0;left:0;width:100%;will-change:transform;padding:102px 0}.uni-picker-view-content>*{height:34px;overflow:hidden}.uni-picker-view-indicator:before{top:0;border-top:1px solid #e5e5e5;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.uni-picker-view-indicator:after{bottom:0;border-bottom:1px solid #e5e5e5;-webkit-transform-origin:0 100%;transform-origin:0 100%;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.uni-picker-view-indicator:after,.uni-picker-view-indicator:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#e5e5e5}uni-picker-view{display:block}uni-picker-view .uni-picker-view-wrapper{display:-webkit-box;display:-webkit-flex;display:flex;position:relative;overflow:hidden;height:100%}uni-picker-view[hidden]{display:none}uni-progress{display:-webkit-flex;display:-webkit-box;display:flex;-webkit-align-items:center;-webkit-box-align:center;align-items:center}uni-progress[hidden]{display:none}.uni-progress-bar{-webkit-flex:1;-webkit-box-flex:1;flex:1}.uni-progress-inner-bar{width:0;height:100%}.uni-progress-info{margin-top:0;margin-bottom:0;min-width:2em;margin-left:15px;font-size:16px}uni-radio-group[hidden]{display:none}uni-radio{-webkit-tap-highlight-color:transparent;display:inline-block}uni-radio[hidden]{display:none}uni-radio .uni-radio-wrapper{display:-webkit-inline-flex;display:-webkit-inline-box;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;align-items:center;vertical-align:middle}uni-radio .uni-radio-input{-webkit-appearance:none;appearance:none;margin-right:5px;outline:0;border:1px solid #d1d1d1;background-color:#fff;border-radius:50%;width:22px;height:22px;position:relative}uni-radio .uni-radio-input.uni-radio-input-checked:before{font:normal normal normal 14px/1 uni;content:"\EA08";color:#fff;font-size:18px;position:absolute;top:50%;left:50%;transform:translate(-50%,-48%) scale(.73);-webkit-transform:translate(-50%,-48%) scale(.73)}uni-radio .uni-radio-input.uni-radio-input-disabled{background-color:#e1e1e1;border-color:#d1d1d1}uni-radio .uni-radio-input.uni-radio-input-disabled:before{color:#adadad}uni-radio-group{display:block}@-webkit-keyframes once-show{0%{top:0}}@keyframes once-show{0%{top:0}}uni-resize-sensor,uni-resize-sensor>div{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden}uni-resize-sensor{display:block;z-index:-1;visibility:hidden;-webkit-animation:once-show 1ms;animation:once-show 1ms}uni-resize-sensor>div>div{position:absolute;left:0;top:0}uni-resize-sensor>div:first-child>div{width:100000px;height:100000px}uni-resize-sensor>div:last-child>div{width:200%;height:200%}uni-scroll-view{display:block;width:100%}uni-scroll-view[hidden]{display:none}.uni-scroll-view{position:relative;-webkit-overflow-scrolling:touch;width:100%;height:100%;max-height:inherit}uni-slider{margin:10px 18px;padding:0;display:block}uni-slider[hidden]{display:none}uni-slider .uni-slider-wrapper{display:-webkit-flex;display:-webkit-box;display:flex;-webkit-align-items:center;-webkit-box-align:center;align-items:center;min-height:16px}uni-slider .uni-slider-tap-area{-webkit-flex:1;-webkit-box-flex:1;flex:1;padding:8px 0}uni-slider .uni-slider-handle-wrapper{position:relative;height:2px;border-radius:5px;background-color:#e9e9e9;cursor:pointer;-webkit-tap-highlight-color:transparent}uni-slider .uni-slider-handle-wrapper,uni-slider .uni-slider-track{-webkit-transition:background-color .3s ease;transition:background-color .3s ease}uni-slider .uni-slider-track{height:100%;border-radius:6px;background-color:#007aff}uni-slider .uni-slider-handle,uni-slider .uni-slider-thumb{position:absolute;left:50%;top:50%;cursor:pointer;border-radius:50%;-webkit-transition:border-color .3s ease;transition:border-color .3s ease}uni-slider .uni-slider-handle{width:28px;height:28px;margin-top:-14px;margin-left:-14px;background-color:rgba(0,0,0,0);z-index:3}uni-slider .uni-slider-thumb{z-index:2;box-shadow:0 0 4px rgba(0,0,0,.2)}uni-slider .uni-slider-step{position:absolute;width:100%;height:2px;background:rgba(0,0,0,0);z-index:1}uni-slider .uni-slider-value{color:#888;font-size:14px;margin-left:1em}uni-slider .uni-slider-disabled .uni-slider-track{background-color:#ccc}uni-slider .uni-slider-disabled .uni-slider-thumb{background-color:#fff;border-color:#ccc}uni-swiper-item{display:block;overflow:hidden;will-change:transform;position:absolute;width:100%;height:100%}uni-swiper-item[hidden]{display:none}uni-swiper{display:block;height:150px}uni-swiper[hidden]{display:none}uni-swiper .uni-swiper-wrapper{overflow:hidden;position:relative;width:100%;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0)}uni-swiper .uni-swiper-slides{position:absolute;left:0;top:0;right:0;bottom:0}uni-swiper .uni-swiper-slide-frame{position:absolute;left:0;top:0;width:100%;height:100%;will-change:transform}uni-swiper .uni-swiper-dots{position:absolute;font-size:0}uni-swiper .uni-swiper-dots-horizontal{left:50%;bottom:10px;text-align:center;white-space:nowrap;-webkit-transform:translate(-50%);transform:translate(-50%)}uni-swiper .uni-swiper-dots-horizontal .uni-swiper-dot{margin-right:8px}uni-swiper .uni-swiper-dots-horizontal .uni-swiper-dot:last-child{margin-right:0}uni-swiper .uni-swiper-dots-vertical{right:10px;top:50%;text-align:right;-webkit-transform:translateY(-50%);transform:translateY(-50%)}uni-swiper .uni-swiper-dots-vertical .uni-swiper-dot{display:block;margin-bottom:9px}uni-swiper .uni-swiper-dots-vertical .uni-swiper-dot:last-child{margin-bottom:0}uni-swiper .uni-swiper-dot{display:inline-block;width:8px;height:8px;cursor:pointer;-webkit-transition-property:background-color;transition-property:background-color;-webkit-transition-timing-function:ease;transition-timing-function:ease;background:rgba(0,0,0,.3);border-radius:50%}uni-swiper .uni-swiper-dot-active{background-color:#000}uni-switch{-webkit-tap-highlight-color:transparent;display:inline-block}uni-switch[hidden]{display:none}uni-switch .uni-switch-wrapper{display:-webkit-inline-flex;display:-webkit-inline-box;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;align-items:center;vertical-align:middle}uni-switch .uni-switch-input{-webkit-appearance:none;appearance:none;position:relative;width:52px;height:32px;margin-right:5px;border:1px solid #dfdfdf;outline:0;border-radius:16px;box-sizing:border-box;background-color:#dfdfdf;-webkit-transition:background-color .1s,border .1s;transition:background-color .1s,border .1s}uni-switch .uni-switch-input:before{width:50px;background-color:#fdfdfd}uni-switch .uni-switch-input:after,uni-switch .uni-switch-input:before{content:" ";position:absolute;top:0;left:0;height:30px;border-radius:15px;transition:-webkit-transform .3s;-webkit-transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}uni-switch .uni-switch-input:after{width:30px;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.4)}uni-switch .uni-switch-input.uni-switch-input-checked{border-color:#007aff;background-color:#007aff}uni-switch .uni-switch-input.uni-switch-input-checked:before{-webkit-transform:scale(0);transform:scale(0)}uni-switch .uni-switch-input.uni-switch-input-checked:after{-webkit-transform:translateX(20px);transform:translateX(20px)}uni-switch .uni-checkbox-input{margin-right:5px;-webkit-appearance:none;appearance:none;outline:0;border:1px solid #d1d1d1;background-color:#fff;border-radius:3px;width:22px;height:22px;position:relative;color:#007aff}uni-switch .uni-checkbox-input.uni-checkbox-input-checked:before{font:normal normal normal 14px/1 uni;content:"\EA08";color:inherit;font-size:22px;position:absolute;top:50%;left:50%;transform:translate(-50%,-48%) scale(.73);-webkit-transform:translate(-50%,-48%) scale(.73)}uni-switch .uni-checkbox-input.uni-checkbox-input-disabled{background-color:#e1e1e1}uni-switch .uni-checkbox-input.uni-checkbox-input-disabled:before{color:#adadad}uni-text[selectable]{cursor:auto;user-select:text;-webkit-user-select:text}uni-textarea{width:300px;height:150px;display:block;position:relative;font-size:16px;line-height:normal}uni-textarea[hidden]{display:none}uni-textarea[auto-height] .uni-textarea-textarea{overflow-y:hidden}.uni-textarea-compute,.uni-textarea-placeholder,.uni-textarea-textarea,.uni-textarea-wrapper{outline:none;border:none;padding:0;margin:0;text-decoration:inherit}.uni-textarea-wrapper{display:block;position:relative;width:100%;height:100%}.uni-textarea-compute,.uni-textarea-placeholder,.uni-textarea-textarea{position:absolute;width:100%;height:100%;left:0;top:0;white-space:pre-wrap;word-break:break-all}.uni-textarea-placeholder{color:grey;overflow:hidden}.uni-textarea-compute{visibility:hidden;height:auto}.uni-textarea-textarea{resize:none;background:none;color:inherit;opacity:1;-webkit-text-fill-color:currentcolor;font:inherit;line-height:inherit;letter-spacing:inherit;text-align:inherit;text-indent:inherit;text-transform:inherit;text-shadow:inherit}.uni-textarea-textarea-ios{width:auto;right:0;margin:0 -3px}uni-view{display:block}uni-view[hidden]{display:none} \ No newline at end of file +* { + margin: 0; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: transparent; +} + +input[type="search"]::-webkit-search-cancel-button { + display: none; +} + +@font-face { + font-weight: normal; + font-style: normal; + font-family: "uni"; + src: url('data:application/octet-stream;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzJAKEx+AAABfAAAAFZjbWFw65cFHQAAAhwAAAJQZ2x5ZvCRR/EAAASUAAAKtGhlYWQLKIN9AAAA4AAAADZoaGVhCCwD+gAAALwAAAAkaG10eEJo//8AAAHUAAAASGxvY2EYqhW6AAAEbAAAACZtYXhwASEAVQAAARgAAAAgbmFtZeNcHtgAAA9IAAAB5nBvc3T6bLhLAAARMAAAAOYAAQAAA+gAAABaA+j/////A+kAAQAAAAAAAAAAAAAAAAAAABIAAQAAAAEAACkCj3dfDzz1AAsD6AAAAADUER9XAAAAANQRH1f//wAAA+kD6gAAAAgAAgAAAAAAAAABAAAAEgBJAAUAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAAAAQOwAZAABQAIAnoCvAAAAIwCegK8AAAB4AAxAQIAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA6gHqEQPoAAAAWgPqAAAAAAABAAAAAAAAAAAAAAPoAAAD6AAAA+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4BDwEQAREBEgETAAZjaXJjbGUIZG93bmxvYWQEaW5mbwxzYWZlX3N1Y2Nlc3MJc2FmZV93YXJuB3N1Y2Nlc3MOc3VjY2Vzcy1jaXJjbGURc3VjY2Vzcy1uby1jaXJjbGUHd2FpdGluZw53YWl0aW5nLWNpcmNsZQR3YXJuC2luZm8tY2lyY2xlBmNhbmNlbAZzZWFyY2gFY2xlYXIEYmFjawZkZWxldGUAAAAA') format('truetype'); +} + +@font-face { + font-weight: normal; + font-style: normal; + font-family: "unibtn"; + src: url('data:application/octet-stream;base64,AAEAAAALAIAAAwAwT1MvMg8SAzoAAAC8AAAAYGNtYXAAILNAAAABHAAAAGRnYXNwAAAAEAAAAYAAAAAIZ2x5ZnVT/G4AAAGIAAAEHGhlYWQOAdVuAAAFpAAAADZoaGVhB3wDzAAABdwAAAAkaG10eCIABqYAAAYAAAAALGxvY2EDqgTMAAAGLAAAABhtYXhwAA8ATQAABkQAAAAgbmFtZXBR8sQAAAZkAAAB2nBvc3QAAwAAAAAIQAAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADmUAPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQASAAAAA4ACAACAAYAAQAg5gLmBuZQ//3//wAAAAAAIOYA5gTmUP/9//8AAf/jGgQaAxm6AAMAAQAAAAAAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQFgAHkCwQLqABYAAAEmNDc2MhcBHgEVFAYHAQYiJyY0NwkBAWAICAcWBwE1BAQEBP7LBxYHCAgBIv7eAsUHFwcICP7cBAsFBgsE/twICAcXCAETARMAAAEBWAB5ArkC6gAXAAAJAhYUBwYiJwEuATU0NjcBNjIXFhQHMQ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ICQnq7AkJBAoGBQsE7OwECwUGCgQJCQG76gkXCQgI6+sICAgYCOvrCBgIBAQEBOvtBQQFBAgXCQABAAAAAQAA3hDrLV8PPPUACwQAAAAAANWUyKsAAAAA1ZTIqwAAAAADugMbAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAO6AAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWAEAAFYBAAA0AQAAJcEAAC/BAAA3AQAAOwAAAAAAAoAFAAeAEoAdgDGAToBmgHSAg4AAQAAAAsASwADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAA4AAAABAAAAAAACAAcAnwABAAAAAAADAA4ASwABAAAAAAAEAA4AtAABAAAAAAAFAAsAKgABAAAAAAAGAA4AdQABAAAAAAAKABoA3gADAAEECQABABwADgADAAEECQACAA4ApgADAAEECQADABwAWQADAAEECQAEABwAwgADAAEECQAFABYANQADAAEECQAGABwAgwADAAEECQAKADQA+HN0cmVhbWljb25mb250AHMAdAByAGUAYQBtAGkAYwBvAG4AZgBvAG4AdFZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMHN0cmVhbWljb25mb250AHMAdAByAGUAYQBtAGkAYwBvAG4AZgBvAG4AdHN0cmVhbWljb25mb250AHMAdAByAGUAYQBtAGkAYwBvAG4AZgBvAG4AdFJlZ3VsYXIAUgBlAGcAdQBsAGEAcnN0cmVhbWljb25mb250AHMAdAByAGUAYQBtAGkAYwBvAG4AZgBvAG4AdEZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=') format('truetype') +} + +html, +body { + -webkit-user-select: none; + user-select: none; + width: 100%; +} + +html { + height: 100%; +} + +body { + overflow-x: hidden; +} + +[class^="uni-icon-"], +[class*=" uni-icon-"] { + display: inline-block; + vertical-align: middle; + font: normal normal normal 14px/1 "uni"; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; +} + + + +[class^="uni-btn-icon"], +[class*=" uni-btn-icon"] { + display: inline-block; + font: normal normal normal 14px/1 "unibtn"; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; +} + +[class^="uni-btn-icon"]:before, +[class*=" uni-btn-icon"]:before { + margin: 0; + box-sizing: border-box; +} + +.uni-icon-success-no-circle:before { + content: "\EA08"; +} + +.uni-loading, +uni-button[loading]:before { + background: transparent url("data:image/svg+xml;base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0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dGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=") no-repeat; +} + +.uni-loading { + width: 20px; + height: 20px; + display: inline-block; + vertical-align: middle; + -webkit-animation: uni-loading 1s steps(12, end) infinite; + animation: uni-loading 1s steps(12, end) infinite; + background-size: 100%; +} + +@-webkit-keyframes uni-loading { + 0% { + -webkit-transform: rotate3d(0, 0, 1, 0deg); + transform: rotate3d(0, 0, 1, 0deg); + } + + 100% { + -webkit-transform: rotate3d(0, 0, 1, 360deg); + transform: rotate3d(0, 0, 1, 360deg); + } +} + +@keyframes uni-loading { + 0% { + -webkit-transform: rotate3d(0, 0, 1, 0deg); + transform: rotate3d(0, 0, 1, 0deg); + } + + 100% { + -webkit-transform: rotate3d(0, 0, 1, 360deg); + transform: rotate3d(0, 0, 1, 360deg); + } +} + + +[nvue] uni-view, +[nvue] uni-swiper-item, +[nvue] uni-scroll-view { + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-flex-shrink: 0; + flex-shrink: 0; + -webkit-box-flex: 0; + -webkit-flex-grow: 0; + flex-grow: 0; + -webkit-flex-basis: auto; + flex-basis: auto; + -webkit-box-align: stretch; + -webkit-align-items: stretch; + align-items: stretch; + -webkit-align-content: flex-start; + align-content: flex-start; +} + +[nvue-dir-row] uni-view, +[nvue-dir-row] uni-swiper-item { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -webkit-flex-direction: row; + flex-direction: row; +} + +[nvue-dir-column] uni-view, +[nvue-dir-column] uni-swiper-item { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-flex-direction: column; + flex-direction: column; +} + +[nvue-dir-row-reverse] uni-view, +[nvue-dir-row-reverse] uni-swiper-item { + -webkit-box-orient: horizontal; + -webkit-box-direction: reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; +} + +[nvue-dir-column-reverse] uni-view, +[nvue-dir-column-reverse] uni-swiper-item { + -webkit-box-orient: vertical; + -webkit-box-direction: reverse; + -webkit-flex-direction: column-reverse; + flex-direction: column-reverse; +} + +[nvue] uni-view, +[nvue] uni-image, +[nvue] uni-input, +[nvue] uni-scroll-view, +[nvue] uni-swiper, +[nvue] uni-swiper-item, +[nvue] uni-text, +[nvue] uni-textarea, +[nvue] uni-video { + position: relative; + border: 0px solid #000000; + box-sizing: border-box; +} + +[nvue] uni-swiper-item { + position: absolute; +} + + +uni-button { + position: relative; + display: block; + margin-left: auto; + margin-right: auto; + padding-left: 14px; + padding-right: 14px; + box-sizing: border-box; + font-size: 18px; + text-align: center; + text-decoration: none; + line-height: 2.55555556; + border-radius: 5px; + -webkit-tap-highlight-color: transparent; + overflow: hidden; + color: #000000; + background-color: #F8F8F8; +} +uni-button[hidden] { + display: none !important; +} +uni-button:after { + content: " "; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-transform: scale(0.5); + transform: scale(0.5); + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + box-sizing: border-box; + border-radius: 10px; +} +uni-button[native] { + padding-left: 0; + padding-right: 0; +} +uni-button[native] .uni-button-cover-view-wrapper { + border: inherit; + border-color: inherit; + border-radius: inherit; + background-color: inherit; +} +uni-button[native] .uni-button-cover-view-inner { + padding-left: 14px; + padding-right: 14px; +} +uni-button uni-cover-view { + line-height: inherit; + white-space: inherit; +} +uni-button[type=default] { + color: #000000; + background-color: #F8F8F8; +} +uni-button[type=primary] { + color: #FFFFFF; + background-color: #007aff; +} +uni-button[type=warn] { + color: #FFFFFF; + background-color: #E64340; +} +uni-button[disabled] { + color: rgba(255, 255, 255, 0.6); +} +uni-button[disabled][type=default], +uni-button[disabled]:not([type]) { + color: rgba(0, 0, 0, 0.3); + background-color: #F7F7F7; +} +uni-button[disabled][type=primary] { + background-color: rgba(0, 122, 255, 0.6); +} +uni-button[disabled][type=warn] { + background-color: #EC8B89; +} +uni-button[type=primary][plain] { + color: #007aff; + border: 1px solid #007aff; + background-color: transparent; +} +uni-button[type=primary][plain][disabled] { + color: rgba(0, 0, 0, 0.2); + border-color: rgba(0, 0, 0, 0.2); +} +uni-button[type=primary][plain]:after { + border-width: 0; +} +uni-button[type=default][plain] { + color: #353535; + border: 1px solid #353535; + background-color: transparent; +} +uni-button[type=default][plain][disabled] { + color: rgba(0, 0, 0, 0.2); + border-color: rgba(0, 0, 0, 0.2); +} +uni-button[type=default][plain]:after { + border-width: 0; +} +uni-button[plain] { + color: #353535; + border: 1px solid #353535; + background-color: transparent; +} +uni-button[plain][disabled] { + color: rgba(0, 0, 0, 0.2); + border-color: rgba(0, 0, 0, 0.2); +} +uni-button[plain]:after { + border-width: 0; +} +uni-button[plain][native] .uni-button-cover-view-inner { + padding: 0; +} +uni-button[type=warn][plain] { + color: #e64340; + border: 1px solid #e64340; + background-color: transparent; +} +uni-button[type=warn][plain][disabled] { + color: rgba(0, 0, 0, 0.2); + border-color: rgba(0, 0, 0, 0.2); +} +uni-button[type=warn][plain]:after { + border-width: 0; +} +uni-button[size=mini] { + display: inline-block; + line-height: 2.3; + font-size: 13px; + padding: 0 1.34em; +} +uni-button[size=mini][native] { + padding: 0; +} +uni-button[size=mini][native] .uni-button-cover-view-inner { + padding: 0 1.34em; +} +uni-button[loading]:before { + content: " "; + display: inline-block; + width: 18px; + height: 18px; + vertical-align: middle; + -webkit-animation: uni-loading 1s steps(12, end) infinite; + animation: uni-loading 1s steps(12, end) infinite; + background-size: 100%; +} +uni-button[loading][type=primary] { + color: rgba(255, 255, 255, 0.6); + background-color: #0062cc; +} +uni-button[loading][type=primary][plain] { + color: #007aff; + background-color: transparent; +} +uni-button[loading][type=default] { + color: rgba(0, 0, 0, 0.6); + background-color: #DEDEDE; +} +uni-button[loading][type=default][plain] { + color: #353535; + background-color: transparent; +} +uni-button[loading][type=warn] { + color: rgba(255, 255, 255, 0.6); + background-color: #CE3C39; +} +uni-button[loading][type=warn][plain] { + color: #e64340; + background-color: transparent; +} +uni-button[loading][native]:before { + content: none; +} +.button-hover { + color: rgba(0, 0, 0, 0.6); + background-color: #DEDEDE; +} +.button-hover[plain] { + color: rgba(53, 53, 53, 0.6); + border-color: rgba(53, 53, 53, 0.6); + background-color: transparent; +} +.button-hover[type=primary] { + color: rgba(255, 255, 255, 0.6); + background-color: #0062cc; +} +.button-hover[type=primary][plain] { + color: rgba(26, 173, 25, 0.6); + border-color: rgba(26, 173, 25, 0.6); + background-color: transparent; +} +.button-hover[type=default] { + color: rgba(0, 0, 0, 0.6); + background-color: #DEDEDE; +} +.button-hover[type=default][plain] { + color: rgba(53, 53, 53, 0.6); + border-color: rgba(53, 53, 53, 0.6); + background-color: transparent; +} +.button-hover[type=warn] { + color: rgba(255, 255, 255, 0.6); + background-color: #CE3C39; +} +.button-hover[type=warn][plain] { + color: rgba(230, 67, 64, 0.6); + border-color: rgba(230, 67, 64, 0.6); + background-color: transparent; +} + + +uni-canvas { + width: 300px; + height: 150px; + display: block; + position: relative; +} +uni-canvas>canvas { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + + +uni-checkbox-group[hidden] { + display: none; +} + + +uni-checkbox { + -webkit-tap-highlight-color: transparent; + display: inline-block; +} +uni-checkbox[hidden] { + display: none; +} +uni-checkbox .uni-checkbox-wrapper { + display: -webkit-inline-flex; + display: -webkit-inline-box; + display: inline-flex; + -webkit-align-items: center; + -webkit-box-align: center; + align-items: center; + vertical-align: middle; +} +uni-checkbox .uni-checkbox-input { + margin-right: 5px; + -webkit-appearance: none; + appearance: none; + outline: 0; + border: 1px solid #D1D1D1; + background-color: #FFFFFF; + border-radius: 3px; + width: 22px; + height: 22px; + position: relative; +} +uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked { + color: #007aff; +} +uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked:before { + font: normal normal normal 14px/1 "uni"; + content: "\EA08"; + font-size: 22px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -48%) scale(0.73); + -webkit-transform: translate(-50%, -48%) scale(0.73); +} +uni-checkbox .uni-checkbox-input.uni-checkbox-input-disabled { + background-color: #E1E1E1; +} +uni-checkbox .uni-checkbox-input.uni-checkbox-input-disabled:before { + color: #ADADAD; +} +uni-checkbox-group { + display: block; +} + + +uni-icon { + display: inline-block; + font-size: 0; + box-sizing: border-box; +} +uni-icon[hidden] { + display: none; +} +uni-icon > i { + font: normal normal normal 14px/1 "weui"; +} +uni-icon > i:before { + margin: 0; + box-sizing: border-box; +} +@font-face { + font-weight: normal; + font-style: normal; + font-family: "weui"; + src: url("data:application/octet-stream;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzJAKEx8AAABfAAAAFZjbWFw65cFHQAAAhwAAAJQZ2x5Zp+UEEcAAASUAAAIvGhlYWQUqc7xAAAA4AAAADZoaGVhB/YD+wAAALwAAAAkaG10eEJoAAAAAAHUAAAASGxvY2EUxhJeAAAEbAAAACZtYXhwASEAQwAAARgAAAAgbmFtZeNcHtgAAA1QAAAB5nBvc3T6OoZLAAAPOAAAAOYAAQAAA+gAAABaA+gAAAAAA7MAAQAAAAAAAAAAAAAAAAAAABIAAQAAAAEAAMCU2KdfDzz1AAsD6AAAAADY7EUUAAAAANjsRRQAAAAAA7MD5AAAAAgAAgAAAAAAAAABAAAAEgA3AAUAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAAAAQOwAZAABQAIAnoCvAAAAIwCegK8AAAB4AAxAQIAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA6gHqEQPoAAAAWgPoAAAAAAABAAAAAAAAAAAAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6AAAA+gAAAPoAAAD6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AGcAdQBsAGEAcgB3AGUAdQBpAHcAZQB1AGkAVgBlAHIAcwBpAG8AbgAgADEALgAwAHcAZQB1AGkARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAQIBAwEEAQUBBgEHAQgBCQEKAQsBDAENAQ4BDwEQAREBEgETAAZjaXJjbGUIZG93bmxvYWQEaW5mbwxzYWZlLXN1Y2Nlc3MJc2FmZS13YXJuB3N1Y2Nlc3MOc3VjY2Vzcy1jaXJjbGURc3VjY2Vzcy1uby1jaXJjbGUHd2FpdGluZw53YWl0aW5nLWNpcmNsZQR3YXJuC2luZm8tY2lyY2xlBmNhbmNlbAZzZWFyY2gFY2xlYXIEYmFjawZkZWxldGUAAAAA") + format("truetype"); +} +.uni-icon-success:before { + content: "\EA06"; +} +.uni-icon-success_circle:before { + content: "\EA07"; +} +.uni-icon-success_no_circle:before { + content: "\EA08"; +} +.uni-icon-safe_success:before { + content: "\EA04"; +} +.uni-icon-safe_warn:before { + content: "\EA05"; +} +.uni-icon-info:before { + content: "\EA03"; +} +.uni-icon-info_circle:before { + content: "\EA0C"; +} +.uni-icon-warn:before { + content: "\EA0B"; +} +.uni-icon-waiting:before { + content: "\EA09"; +} +.uni-icon-waiting_circle:before { + content: "\EA0A"; +} +.uni-icon-circle:before { + content: "\EA01"; +} +.uni-icon-cancel:before { + content: "\EA0D"; +} +.uni-icon-download:before { + content: "\EA02"; +} +.uni-icon-search:before { + content: "\EA0E"; +} +.uni-icon-clear:before { + content: "\EA0F"; +} +.uni-icon-success { + color: #007aff; +} +.uni-icon-success_circle { + color: #007aff; +} +.uni-icon-success_no_circle { + color: #007aff; +} +.uni-icon-safe_success { + color: #007aff; +} +.uni-icon-safe_warn { + color: #ffbe00; +} +.uni-icon-info { + color: #10aeff; +} +.uni-icon-info_circle { + color: #007aff; +} +.uni-icon-warn { + color: #f76260; +} +.uni-icon-waiting { + color: #10aeff; +} +.uni-icon-waiting_circle { + color: #10aeff; +} +.uni-icon-circle { + color: #c9c9c9; +} +.uni-icon-cancel { + color: #f43530; +} +.uni-icon-download { + color: #007aff; +} +.uni-icon-search { + color: #b2b2b2; +} +.uni-icon-clear { + color: #b2b2b2; +} + + +uni-image { + width: 320px; + height: 240px; + display: inline-block; + overflow: hidden; + position: relative; +} +uni-image[hidden] { + display: none; +} +uni-image>div { + width: 100%; + height: 100%; +} +uni-image>img { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; +} +uni-image>.uni-image-will-change { + will-change: transform; +} + + +uni-input { + display: block; + font-size: 16px; + line-height: 1.4em; + height: 1.4em; + min-height: 1.4em; + overflow: hidden; +} +uni-input[hidden] { + display: none; +} +.uni-input-wrapper, +.uni-input-placeholder, +.uni-input-form, +.uni-input-input { + outline: none; + border: none; + padding: 0; + margin: 0; + text-decoration: inherit; +} +.uni-input-wrapper, +.uni-input-form { + display: block; + position: relative; + width: 100%; + height: 100%; +} +.uni-input-placeholder, +.uni-input-input{ + width: 100%; +} +.uni-input-placeholder { + position: absolute; + top: 50%; + left: 0; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + color: gray; + overflow: hidden; + text-overflow: clip; + white-space: pre; + word-break: keep-all; + pointer-events: none; +} +.uni-input-input { + display: block; + height: 100%; + background: none; + color: inherit; + opacity: 1; + -webkit-text-fill-color: currentcolor; + font: inherit; + line-height: inherit; + letter-spacing: inherit; + text-align: inherit; + text-indent: inherit; + text-transform: inherit; + text-shadow: inherit; +} +.uni-input-input[type="search"]::-webkit-search-cancel-button { + display: none; +} +.uni-input-input::-webkit-outer-spin-button, +.uni-input-input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} +.uni-input-input[type="number"] { + -moz-appearance: textfield; +} + + +uni-movable-area { + display: block; + position: relative; + width: 10px; + height: 10px; +} +uni-movable-area[hidden] { + display: none; +} + + +uni-movable-view { + display: inline-block; + width: 10px; + height: 10px; + top: 0px; + left: 0px; + position: absolute; +} +uni-movable-view[hidden] { + display: none; +} + + +.navigator-hover { + background-color: rgba(0, 0, 0, 0.1); + opacity: 0.7; +} +uni-navigator { + height: auto; + width: auto; + display: block; +} +uni-navigator[hidden] { + display: none; +} + + +uni-picker-view-column { + -webkit-flex: 1; + -webkit-box-flex: 1; + flex: 1; + position: relative; + height: 100%; + overflow: hidden; +} +uni-picker-view-column[hidden] { + display: none; +} +.uni-picker-view-group { + height: 100%; +} +.uni-picker-view-mask { + transform: translateZ(0); + -webkit-transform: translateZ(0); +} +.uni-picker-view-indicator, +.uni-picker-view-mask { + position: absolute; + left: 0; + width: 100%; + z-index: 3; +} +.uni-picker-view-mask { + top: 0; + height: 100%; + margin: 0 auto; + background: -webkit-linear-gradient( + top, + hsla(0, 0%, 100%, 0.95), + hsla(0, 0%, 100%, 0.6) + ), + -webkit-linear-gradient(bottom, hsla(0, 0%, 100%, 0.95), hsla(0, 0%, 100%, 0.6)); + background: linear-gradient( + 180deg, + hsla(0, 0%, 100%, 0.95), + hsla(0, 0%, 100%, 0.6) + ), + linear-gradient(0deg, hsla(0, 0%, 100%, 0.95), hsla(0, 0%, 100%, 0.6)); + background-position: top, bottom; + background-size: 100% 102px; + background-repeat: no-repeat; +} +.uni-picker-view-indicator { + height: 34px; + /* top: 102px; */ + top: 50%; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +.uni-picker-view-indicator, +.uni-picker-view-mask { + position: absolute; + left: 0; + width: 100%; + z-index: 3; + pointer-events: none; +} +.uni-picker-view-content { + position: absolute; + top: 0; + left: 0; + width: 100%; + will-change: transform; + padding: 102px 0; +} +.uni-picker-view-content > * { + height: 34px; + overflow: hidden; +} +.uni-picker-view-indicator:after, +.uni-picker-view-indicator:before { + content: " "; + position: absolute; + left: 0; + right: 0; + height: 1px; + color: #e5e5e5; +} +.uni-picker-view-indicator:before { + top: 0; + border-top: 1px solid #e5e5e5; + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +.uni-picker-view-indicator:after { + bottom: 0; + border-bottom: 1px solid #e5e5e5; + -webkit-transform-origin: 0 100%; + transform-origin: 0 100%; + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +.uni-picker-view-indicator:after, +.uni-picker-view-indicator:before { + content: " "; + position: absolute; + left: 0; + right: 0; + height: 1px; + color: #e5e5e5; +} + + +uni-picker-view { + display: block; +} +uni-picker-view .uni-picker-view-wrapper { + display: -webkit-box; + display: -webkit-flex; + display: flex; + position: relative; + overflow: hidden; + height: 100%; +} +uni-picker-view[hidden] { + display: none; +} + + +uni-progress { + display: -webkit-flex; + display: -webkit-box; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + align-items: center; +} +uni-progress[hidden] { + display: none; +} +.uni-progress-bar { + -webkit-flex: 1; + -webkit-box-flex: 1; + flex: 1; +} +.uni-progress-inner-bar { + width: 0; + height: 100%; +} +.uni-progress-info { + margin-top: 0; + margin-bottom: 0; + min-width: 2em; + margin-left: 15px; + font-size: 16px; +} + + +uni-radio-group[hidden] { + display: none; +} + + +uni-radio { + -webkit-tap-highlight-color: transparent; + display: inline-block; +} +uni-radio[hidden] { + display: none; +} +uni-radio .uni-radio-wrapper { + display: -webkit-inline-flex; + display: -webkit-inline-box; + display: inline-flex; + -webkit-align-items: center; + -webkit-box-align: center; + align-items: center; + vertical-align: middle; +} +uni-radio .uni-radio-input { + -webkit-appearance: none; + appearance: none; + margin-right: 5px; + outline: 0; + border: 1px solid #D1D1D1; + background-color: #ffffff; + border-radius: 50%; + width: 22px; + height: 22px; + position: relative; +} +uni-radio .uni-radio-input.uni-radio-input-checked:before { + font: normal normal normal 14px/1 "uni"; + content: "\EA08"; + color: #ffffff; + font-size: 18px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -48%) scale(0.73); + -webkit-transform: translate(-50%, -48%) scale(0.73); +} +uni-radio .uni-radio-input.uni-radio-input-disabled { + background-color: #E1E1E1; + border-color: #D1D1D1; +} +uni-radio .uni-radio-input.uni-radio-input-disabled:before { + color: #ADADAD; +} +uni-radio-group { + display: block; +} + + +@-webkit-keyframes once-show { +from { + top: 0; +} +} +@keyframes once-show { +from { + top: 0; +} +} +uni-resize-sensor, +uni-resize-sensor > div { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + overflow: hidden; +} +uni-resize-sensor { + display: block; + z-index: -1; + visibility: hidden; + -webkit-animation: once-show 1ms; + animation: once-show 1ms; +} +uni-resize-sensor > div > div { + position: absolute; + left: 0; + top: 0; +} +uni-resize-sensor > div:first-child > div { + width: 100000px; + height: 100000px; +} +uni-resize-sensor > div:last-child > div { + width: 200%; + height: 200%; +} + + +uni-scroll-view { + display: block; + width: 100%; +} +uni-scroll-view[hidden] { + display: none; +} +.uni-scroll-view { + position: relative; + -webkit-overflow-scrolling: touch; + width: 100%; + /* display: flex; 时在安卓下会导致scrollWidth和offsetWidth一样 */ + height: 100%; + max-height: inherit; +} + + +uni-slider { + margin: 10px 18px; + padding: 0; + display: block; +} +uni-slider[hidden] { + display: none; +} +uni-slider .uni-slider-wrapper { + display: -webkit-flex; + display: -webkit-box; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + align-items: center; + min-height: 16px; +} +uni-slider .uni-slider-tap-area { + -webkit-flex: 1; + -webkit-box-flex: 1; + flex: 1; + padding: 8px 0; +} +uni-slider .uni-slider-handle-wrapper { + position: relative; + height: 2px; + border-radius: 5px; + background-color: #e9e9e9; + cursor: pointer; + -webkit-transition: background-color 0.3s ease; + transition: background-color 0.3s ease; + -webkit-tap-highlight-color: transparent; +} +uni-slider .uni-slider-track { + height: 100%; + border-radius: 6px; + background-color: #007aff; + -webkit-transition: background-color 0.3s ease; + transition: background-color 0.3s ease; +} +uni-slider .uni-slider-handle, +uni-slider .uni-slider-thumb { + position: absolute; + left: 50%; + top: 50%; + cursor: pointer; + border-radius: 50%; + -webkit-transition: border-color 0.3s ease; + transition: border-color 0.3s ease; +} +uni-slider .uni-slider-handle { + width: 28px; + height: 28px; + margin-top: -14px; + margin-left: -14px; + background-color: transparent; + z-index: 3; +} +uni-slider .uni-slider-thumb { + z-index: 2; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.2); +} +uni-slider .uni-slider-step { + position: absolute; + width: 100%; + height: 2px; + background: transparent; + z-index: 1; +} +uni-slider .uni-slider-value { + color: #888; + font-size: 14px; + margin-left: 1em; +} +uni-slider .uni-slider-disabled .uni-slider-track { + background-color: #ccc; +} +uni-slider .uni-slider-disabled .uni-slider-thumb { + background-color: #FFF; + border-color: #ccc; +} + + +uni-swiper-item { + display: block; + overflow: hidden; + will-change: transform; + position: absolute; + width: 100%; + height: 100%; +} +uni-swiper-item[hidden] { + display: none; +} + + +uni-swiper { + display: block; + height: 150px; +} +uni-swiper[hidden] { + display: none; +} +uni-swiper .uni-swiper-wrapper { + overflow: hidden; + position: relative; + width: 100%; + height: 100%; + -webkit-transform: translateZ(0); + transform: translateZ(0); +} +uni-swiper .uni-swiper-slides { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; +} +uni-swiper .uni-swiper-slide-frame { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + will-change: transform; +} +uni-swiper .uni-swiper-dots { + position: absolute; + font-size: 0; +} +uni-swiper .uni-swiper-dots-horizontal { + left: 50%; + bottom: 10px; + text-align: center; + white-space: nowrap; + -webkit-transform: translate(-50%, 0); + transform: translate(-50%, 0); +} +uni-swiper .uni-swiper-dots-horizontal .uni-swiper-dot { + margin-right: 8px; +} +uni-swiper .uni-swiper-dots-horizontal .uni-swiper-dot:last-child { + margin-right: 0; +} +uni-swiper .uni-swiper-dots-vertical { + right: 10px; + top: 50%; + text-align: right; + -webkit-transform: translate(0, -50%); + transform: translate(0, -50%); +} +uni-swiper .uni-swiper-dots-vertical .uni-swiper-dot { + display: block; + margin-bottom: 9px; +} +uni-swiper .uni-swiper-dots-vertical .uni-swiper-dot:last-child { + margin-bottom: 0; +} +uni-swiper .uni-swiper-dot { + display: inline-block; + width: 8px; + height: 8px; + cursor: pointer; + -webkit-transition-property: background-color; + transition-property: background-color; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; + background: rgba(0, 0, 0, 0.3); + border-radius: 50%; +} +uni-swiper .uni-swiper-dot-active { + background-color: #000000; +} + + +uni-switch { + -webkit-tap-highlight-color: transparent; + display: inline-block; +} +uni-switch[hidden] { + display: none; +} +uni-switch .uni-switch-wrapper { + display: -webkit-inline-flex; + display: -webkit-inline-box; + display: inline-flex; + -webkit-align-items: center; + -webkit-box-align: center; + align-items: center; + vertical-align: middle; +} +uni-switch .uni-switch-input { + -webkit-appearance: none; + appearance: none; + position: relative; + width: 52px; + height: 32px; + margin-right: 5px; + border: 1px solid #DFDFDF; + outline: 0; + border-radius: 16px; + box-sizing: border-box; + background-color: #DFDFDF; + -webkit-transition: background-color 0.1s, border 0.1s; + transition: background-color 0.1s, border 0.1s; +} +uni-switch .uni-switch-input:before { + content: " "; + position: absolute; + top: 0; + left: 0; + width: 50px; + height: 30px; + border-radius: 15px; + background-color: #FDFDFD; + transition: -webkit-transform 0.3s; + -webkit-transition: -webkit-transform 0.3s; + transition: transform 0.3s; + transition: transform 0.3s, -webkit-transform 0.3s; +} +uni-switch .uni-switch-input:after { + content: " "; + position: absolute; + top: 0; + left: 0; + width: 30px; + height: 30px; + border-radius: 15px; + background-color: #FFFFFF; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); + transition: -webkit-transform 0.3s; + -webkit-transition: -webkit-transform 0.3s; + transition: transform 0.3s; + transition: transform 0.3s, -webkit-transform 0.3s; +} +uni-switch .uni-switch-input.uni-switch-input-checked { + border-color: #007aff; + background-color: #007aff; +} +uni-switch .uni-switch-input.uni-switch-input-checked:before { + -webkit-transform: scale(0); + transform: scale(0); +} +uni-switch .uni-switch-input.uni-switch-input-checked:after { + -webkit-transform: translateX(20px); + transform: translateX(20px); +} +uni-switch .uni-checkbox-input { + margin-right: 5px; + -webkit-appearance: none; + appearance: none; + outline: 0; + border: 1px solid #D1D1D1; + background-color: #FFFFFF; + border-radius: 3px; + width: 22px; + height: 22px; + position: relative; + color: #007aff; +} +uni-switch .uni-checkbox-input.uni-checkbox-input-checked:before { + font: normal normal normal 14px/1 "uni"; + content: "\EA08"; + color: inherit; + font-size: 22px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -48%) scale(0.73); + -webkit-transform: translate(-50%, -48%) scale(0.73); +} +uni-switch .uni-checkbox-input.uni-checkbox-input-disabled { + background-color: #E1E1E1; +} +uni-switch .uni-checkbox-input.uni-checkbox-input-disabled:before { + color: #ADADAD; +} + + +uni-text[selectable] { + cursor: auto; + user-select: text; + -webkit-user-select: text; +} + + +uni-textarea { + width: 300px; + height: 150px; + display: block; + position: relative; + font-size: 16px; + line-height: normal; +} +uni-textarea[hidden] { + display: none; +} +uni-textarea[auto-height] .uni-textarea-textarea { + overflow-y: hidden; +} +.uni-textarea-wrapper, +.uni-textarea-placeholder, +.uni-textarea-compute, +.uni-textarea-textarea { + outline: none; + border: none; + padding: 0; + margin: 0; + text-decoration: inherit; +} +.uni-textarea-wrapper { + display: block; + position: relative; + width: 100%; + height: 100%; +} +.uni-textarea-placeholder, +.uni-textarea-compute, +.uni-textarea-textarea { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + white-space: pre-wrap; + word-break: break-all; +} +.uni-textarea-placeholder { + color: grey; + overflow: hidden; +} +.uni-textarea-compute { + visibility: hidden; + height: auto; +} +.uni-textarea-textarea { + resize: none; + background: none; + color: inherit; + opacity: 1; + -webkit-text-fill-color: currentcolor; + font: inherit; + line-height: inherit; + letter-spacing: inherit; + text-align: inherit; + text-indent: inherit; + text-transform: inherit; + text-shadow: inherit; +} +/* 用于解决 iOS textarea 内部默认边距 */ +.uni-textarea-textarea-ios { + width: auto; + right: 0; + margin: 0 -3px; +} + + +uni-view { + display: block; +} +uni-view[hidden] { + display: none; +} + + +uni-picker { + display: block; +} + + +uni-video { + width: 300px; + height: 225px; + display: inline-block; + line-height: 0; + overflow: hidden; + position: relative; +} +uni-video[hidden] { + display: none; +} +.uni-video-container { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + overflow: hidden; + background-color: black; +} +.uni-video-slot { + position: absolute; + top: 0; + width: 100%; + height: 100%; + overflow: hidden; + pointer-events: none; +} + diff --git a/packages/uni-app-plus/dist/view.umd.js b/packages/uni-app-plus/dist/view.umd.js index a33c74008..0788762a8 100644 --- a/packages/uni-app-plus/dist/view.umd.js +++ b/packages/uni-app-plus/dist/view.umd.js @@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 121); +/******/ return __webpack_require__(__webpack_require__.s = 124); /******/ }) /************************************************************************/ /******/ ([ @@ -276,13 +276,13 @@ function broadcast(componentName, eventName) { } }); // EXTERNAL MODULE: ./src/core/view/mixins/listeners.js -var listeners = __webpack_require__(53); +var listeners = __webpack_require__(54); // EXTERNAL MODULE: ./src/core/view/mixins/hover.js var hover = __webpack_require__(14); // EXTERNAL MODULE: ./src/core/view/mixins/subscriber.js -var subscriber = __webpack_require__(54); +var subscriber = __webpack_require__(55); // CONCATENATED MODULE: ./src/core/view/mixins/index.js /* concated harmony reexport emitter */__webpack_require__.d(__webpack_exports__, "a", function() { return emitter; }); @@ -569,10 +569,10 @@ __webpack_require__.r(__webpack_exports__); var view_runtime_esm = __webpack_require__(5); // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/api/request-component-info.js -var request_component_info = __webpack_require__(57); +var request_component_info = __webpack_require__(58); // EXTERNAL MODULE: ./src/core/view/bridge/subscribe/api/request-component-observer.js -var request_component_observer = __webpack_require__(50); +var request_component_observer = __webpack_require__(51); // CONCATENATED MODULE: ./src/core/view/bridge/subscribe/api/index.js @@ -586,7 +586,7 @@ var request_component_observer = __webpack_require__(50); var subscribe_scroll = __webpack_require__(12); // EXTERNAL MODULE: ./src/platforms/app-plus/view/bridge/subscribe/index.js -var bridge_subscribe = __webpack_require__(58); +var bridge_subscribe = __webpack_require__(59); // CONCATENATED MODULE: ./src/core/view/bridge/subscribe/index.js @@ -9100,7 +9100,7 @@ if (inBrowser) { /* harmony default export */ __webpack_exports__["a"] = (Vue); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(50))) /***/ }), /* 6 */ @@ -9881,10 +9881,10 @@ function createScrollListener(pageId, _ref2) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return initData; }); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); -/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42); -/* harmony import */ var _vdom_sync__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(61); -/* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(44); -/* harmony import */ var _page_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43); +/* harmony import */ var _vdom_sync__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(62); +/* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45); +/* harmony import */ var _page_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(44); var _handleData; function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } @@ -9937,6 +9937,32 @@ var handleData = (_handleData = {}, _defineProperty(_handleData, _constants__WEB }).$mount('#app'); }), _handleData); +function broadcast(vm, componentName, eventName) { + for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { + params[_key - 3] = arguments[_key]; + } + + vm.$children.forEach(function (child) { + var name = child.$options.name && child.$options.name.replace(/^VUni/, ''); + + if (~componentName.indexOf(name)) { + child.$emit.apply(child, [eventName].concat(params)); + } + + broadcast.apply(void 0, [child, componentName, eventName].concat(params)); + }); +} + +var NATIVE_COMPONENTS = ['Camera', 'LivePlayer', 'LivePusher', 'Map', 'Video']; + +function updateView() { + var pages = getCurrentPages(); + var pageVm = pages[0] && pages[0].$vm; + pageVm && broadcast(pageVm, NATIVE_COMPONENTS, 'uni-view-update'); +} + +window.addEventListener('resize', updateView); + function vdSync(_ref) { var data = _ref.data, options = _ref.options; @@ -9950,8 +9976,9 @@ function vdSync(_ref) { handleData[data[0]](data[1]); }); vd.flush(); - isVdCallback && vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].nextTick(function () { - UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_1__[/* VD_SYNC_CALLBACK */ "i"]); + vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].nextTick(function () { + updateView(); + isVdCallback && UniViewJSBridge.publishHandler(_constants__WEBPACK_IMPORTED_MODULE_1__[/* VD_SYNC_CALLBACK */ "i"]); }); } @@ -10084,7 +10111,7 @@ function initData(Vue) { "use strict"; /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_mixins__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); -/* harmony import */ var uni_helpers_hidpi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48); +/* harmony import */ var uni_helpers_hidpi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } @@ -10856,6 +10883,14 @@ function processTouches(target, touches) { /***/ }), /* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + if(false) { var cssReload; } + + +/***/ }), +/* 42 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -10898,7 +10933,7 @@ function findElm(component, pageVm) { } /***/ }), -/* 42 */ +/* 43 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -10906,7 +10941,7 @@ function findElm(component, pageVm) { var ON_PAGE_CREATE = 'onPageCreate'; /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -10944,7 +10979,7 @@ function createPage(pagePath, pageId, pageQuery, pageInstance) { } /***/ }), -/* 44 */ +/* 45 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -10965,7 +11000,7 @@ function setCurrentPage(pageId, pagePath) { } /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -11039,7 +11074,7 @@ Friction.prototype.configuration = function () { }; /***/ }), -/* 46 */ +/* 47 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -11272,16 +11307,16 @@ Spring.prototype.configuration = function () { }; /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Friction.js -var Friction = __webpack_require__(45); +var Friction = __webpack_require__(46); // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Spring.js -var Spring = __webpack_require__(46); +var Spring = __webpack_require__(47); // CONCATENATED MODULE: ./src/core/view/mixins/scroller/Scroll.js @@ -11824,7 +11859,7 @@ Scroller.prototype.isScrolling = function () { }); /***/ }), -/* 48 */ +/* 49 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -11989,7 +12024,7 @@ function wrapper(canvas) { } /***/ }), -/* 49 */ +/* 50 */ /***/ (function(module, exports) { var g; @@ -12015,16 +12050,16 @@ module.exports = g; /***/ }), -/* 50 */ +/* 51 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return requestComponentObserver; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return destroyComponentObserver; }); -/* harmony import */ var intersection_observer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65); +/* harmony import */ var intersection_observer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(66); /* harmony import */ var intersection_observer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(intersection_observer__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var uni_helpers_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); -/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41); +/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42); @@ -12103,23 +12138,23 @@ function destroyComponentObserver(_ref2) { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4))) /***/ }), -/* 51 */ +/* 52 */ /***/ (function(module, exports) { module.exports = ['uni-app', 'uni-tabbar', 'uni-page', 'uni-page-head', 'uni-page-wrapper', 'uni-page-body', 'uni-page-refresh', 'uni-actionsheet', 'uni-modal', 'uni-toast', 'uni-resize-sensor', 'uni-ad', 'uni-audio', 'uni-button', 'uni-camera', 'uni-canvas', 'uni-checkbox', 'uni-checkbox-group', 'uni-cover-image', 'uni-cover-view', 'uni-form', 'uni-functional-page-navigator', 'uni-icon', 'uni-image', 'uni-input', 'uni-label', 'uni-live-player', 'uni-live-pusher', 'uni-map', 'uni-movable-area', 'uni-movable-view', 'uni-navigator', 'uni-official-account', 'uni-open-data', 'uni-picker', 'uni-picker-view', 'uni-picker-view-column', 'uni-progress', 'uni-radio', 'uni-radio-group', 'uni-rich-text', 'uni-scroll-view', 'uni-slider', 'uni-swiper', 'uni-swiper-item', 'uni-switch', 'uni-text', 'uni-textarea', 'uni-video', 'uni-view', 'uni-web-view']; /***/ }), -/* 52 */ +/* 53 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(UniViewJSBridge, global) {/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5); -/* harmony import */ var uni_platform_view_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66); +/* harmony import */ var uni_platform_view_index_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67); /* harmony import */ var uni_platform_view_index_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(uni_platform_view_index_css__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var uni_platform_page_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43); -/* harmony import */ var uni_platform_view_framework_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44); -/* harmony import */ var uni_platform_view_framework_plugins_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(62); -/* harmony import */ var _view_api_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(56); +/* harmony import */ var uni_platform_page_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44); +/* harmony import */ var uni_platform_view_framework_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45); +/* harmony import */ var uni_platform_view_framework_plugins_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63); +/* harmony import */ var _view_api_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(57); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["a"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _view_api_js__WEBPACK_IMPORTED_MODULE_5__["b"]; }); @@ -12150,13 +12185,13 @@ global.__definePage = uni_platform_page_factory__WEBPACK_IMPORTED_MODULE_2__[/* global.Vue = vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]; vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].use(uni_platform_view_framework_plugins_index__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]); -__webpack_require__(104); +__webpack_require__(106); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4), __webpack_require__(49))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4), __webpack_require__(50))) /***/ }), -/* 53 */ +/* 54 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -12270,7 +12305,7 @@ __webpack_require__(104); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4))) /***/ }), -/* 54 */ +/* 55 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -12320,7 +12355,7 @@ __webpack_require__(104); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4))) /***/ }), -/* 55 */ +/* 56 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -12363,7 +12398,7 @@ function switchTab(args) { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4))) /***/ }), -/* 56 */ +/* 57 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -12416,7 +12451,7 @@ function upx2px(number, newDeviceWidth) { return number < 0 ? -result : result; } // EXTERNAL MODULE: ./src/platforms/app-plus/view/api/index.js -var api = __webpack_require__(55); +var api = __webpack_require__(56); // EXTERNAL MODULE: ./src/platforms/app-plus/helpers/get-window-offset.js var get_window_offset = __webpack_require__(9); @@ -12571,14 +12606,14 @@ function canIUse(schema) { } /***/ }), -/* 57 */ +/* 58 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return requestComponentInfo; }); /* harmony import */ var uni_helpers_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); /* harmony import */ var uni_platform_helpers_get_window_offset__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); -/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41); +/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42); @@ -12731,14 +12766,14 @@ function requestComponentInfo(_ref, pageId) { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4))) /***/ }), -/* 58 */ +/* 59 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return initSubscribe; }); /* harmony import */ var uni_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var uni_core_view_bridge_subscribe_scroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12); -/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3); @@ -12780,14 +12815,14 @@ function initSubscribe(subscribe) { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4))) /***/ }), -/* 59 */ +/* 60 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(UniViewJSBridge) {/* harmony import */ var uni_helpers_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); /* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10); -/* harmony import */ var _behaviors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63); -/* harmony import */ var _wxs_component_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(60); +/* harmony import */ var _behaviors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(64); +/* harmony import */ var _wxs_component_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(61); @@ -12880,7 +12915,7 @@ function pageMounted() { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4))) /***/ }), -/* 60 */ +/* 61 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -13095,10 +13130,10 @@ function createComponentDescriptor(vm) { return vm.$el.__wxsComponentDescriptor; } } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(50))) /***/ }), -/* 61 */ +/* 62 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -13203,13 +13238,13 @@ function () { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4))) /***/ }), -/* 62 */ +/* 63 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./src/core/helpers/tags.js -var tags = __webpack_require__(51); +var tags = __webpack_require__(52); var tags_default = /*#__PURE__*/__webpack_require__.n(tags); // CONCATENATED MODULE: ./src/core/vue.js @@ -13236,7 +13271,7 @@ function initVue(Vue) { }; } // EXTERNAL MODULE: ./src/core/view/plugins/index.js -var plugins = __webpack_require__(59); +var plugins = __webpack_require__(60); // EXTERNAL MODULE: ./src/platforms/app-plus/view/framework/plugins/data.js var data = __webpack_require__(13); @@ -13300,7 +13335,7 @@ function initEvent(Vue) { }); /***/ }), -/* 63 */ +/* 64 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -13419,7 +13454,7 @@ function initBehaviors(options, vm) { } /***/ }), -/* 64 */ +/* 65 */ /***/ (function(module, exports) { // document.currentScript polyfill by Adam Miller @@ -13461,7 +13496,7 @@ function initBehaviors(options, vm) { /***/ }), -/* 65 */ +/* 66 */ /***/ (function(module, exports) { /** @@ -14208,7 +14243,7 @@ window.IntersectionObserverEntry = IntersectionObserverEntry; /***/ }), -/* 66 */ +/* 67 */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin @@ -14216,37 +14251,37 @@ window.IntersectionObserverEntry = IntersectionObserverEntry; /***/ }), -/* 67 */ +/* 68 */ /***/ (function(module, exports, __webpack_require__) { var map = { - "./button/index.vue": 116, - "./canvas/index.vue": 113, - "./checkbox-group/index.vue": 101, - "./checkbox/index.vue": 103, - "./form/index.vue": 95, - "./icon/index.vue": 96, - "./image/index.vue": 106, - "./input/index.vue": 107, - "./label/index.vue": 112, - "./movable-area/index.vue": 115, - "./movable-view/index.vue": 94, - "./navigator/index.vue": 109, - "./picker-view-column/index.vue": 117, - "./picker-view/index.vue": 120, - "./progress/index.vue": 98, - "./radio-group/index.vue": 97, - "./radio/index.vue": 100, - "./resize-sensor/index.vue": 119, - "./rich-text/index.vue": 93, - "./scroll-view/index.vue": 111, - "./slider/index.vue": 110, - "./swiper-item/index.vue": 108, - "./swiper/index.vue": 114, - "./switch/index.vue": 105, - "./text/index.vue": 118, - "./textarea/index.vue": 102, - "./view/index.vue": 99 + "./button/index.vue": 123, + "./canvas/index.vue": 115, + "./checkbox-group/index.vue": 109, + "./checkbox/index.vue": 112, + "./form/index.vue": 107, + "./icon/index.vue": 99, + "./image/index.vue": 100, + "./input/index.vue": 114, + "./label/index.vue": 116, + "./movable-area/index.vue": 121, + "./movable-view/index.vue": 97, + "./navigator/index.vue": 113, + "./picker-view-column/index.vue": 120, + "./picker-view/index.vue": 118, + "./progress/index.vue": 111, + "./radio-group/index.vue": 110, + "./radio/index.vue": 108, + "./resize-sensor/index.vue": 122, + "./rich-text/index.vue": 95, + "./scroll-view/index.vue": 101, + "./slider/index.vue": 98, + "./swiper-item/index.vue": 105, + "./swiper/index.vue": 117, + "./switch/index.vue": 104, + "./text/index.vue": 119, + "./textarea/index.vue": 103, + "./view/index.vue": 102 }; @@ -14268,10 +14303,10 @@ webpackContext.keys = function webpackContextKeys() { }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; -webpackContext.id = 67; +webpackContext.id = 68; /***/ }), -/* 68 */ +/* 69 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14281,7 +14316,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 69 */ +/* 70 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14291,7 +14326,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 70 */ +/* 71 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14301,7 +14336,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 71 */ +/* 72 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14311,7 +14346,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 72 */ +/* 73 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14321,7 +14356,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 73 */ +/* 74 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14331,7 +14366,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 74 */ +/* 75 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14341,7 +14376,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 75 */ +/* 76 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14351,7 +14386,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 76 */ +/* 77 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14361,7 +14396,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14371,7 +14406,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14381,7 +14416,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14391,7 +14426,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14401,7 +14436,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14411,7 +14446,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14421,7 +14456,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 83 */ +/* 84 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14431,7 +14466,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 84 */ +/* 85 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14441,7 +14476,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14451,7 +14486,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 86 */ +/* 87 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14461,7 +14496,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 87 */ +/* 88 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14471,7 +14506,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14481,7 +14516,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14491,7 +14526,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14501,7 +14536,7 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -14511,21 +14546,47 @@ webpackContext.id = 67; /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); /***/ }), -/* 92 */ -/***/ (function(module, exports) { +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +var map = { + "./picker/index.vue": 96, + "./video/index.vue": 127 +}; -function webpackEmptyContext(req) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; + +function webpackContext(req) { + var id = webpackContextResolve(req); + return __webpack_require__(id); +} +function webpackContextResolve(req) { + var id = map[req]; + if(!(id + 1)) { // check for number or string + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return id; } -webpackEmptyContext.keys = function() { return []; }; -webpackEmptyContext.resolve = webpackEmptyContext; -module.exports = webpackEmptyContext; -webpackEmptyContext.id = 92; +webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); +}; +webpackContext.resolve = webpackContextResolve; +module.exports = webpackContext; +webpackContext.id = 93; /***/ }), -/* 93 */ +/* 94 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); +/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); +/* unused harmony reexport * */ + /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); + +/***/ }), +/* 95 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -15116,24 +15177,28 @@ component.options.__file = "src/core/view/components/rich-text/index.vue" /* harmony default export */ var rich_text = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 94 */ +/* 96 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/movable-view/index.vue?vue&type=template&id=8de47606& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/picker/index.vue?vue&type=template&id=0268771e& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( - "uni-movable-view", - _vm._g({}, _vm.$listeners), - [ - _c("v-uni-resize-sensor", { on: { resize: _vm.setParent } }), - _vm._t("default") - ], + "uni-picker", + { + on: { + click: function($event) { + $event.stopPropagation() + return _vm._show($event) + } + } + }, + [_vm._t("default")], 2 ) } @@ -15141,1499 +15206,1522 @@ var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/movable-view/index.vue?vue&type=template&id=8de47606& +// CONCATENATED MODULE: ./src/platforms/app-plus/view/components/picker/index.vue?vue&type=template&id=0268771e& -// EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js -var touchtrack = __webpack_require__(8); +// EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules +var mixins = __webpack_require__(1); -// CONCATENATED MODULE: ./src/core/view/components/movable-view/utils.js -function e(e, t, n) { - return e > t - n && e < t + n; +// CONCATENATED MODULE: ./src/platforms/app-plus/view/components/picker/page.js +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function getPageType() { + return (typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object' && (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) === 'object' && (typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' ? 'vue' : 'nvue'; } -function t(t, n) { - return e(t, 0, n); +var pageId; + +function getPageId() { + return pageId || (pageId = plus.webview.currentWebview().id); } -function Decline() {} +var initedEventListener = false; +var callbacks = {}; -Decline.prototype.x = function (e) { - return Math.sqrt(e); -}; +function addEventListener(pageId, callback) { + var type = getPageType(); -function Friction(e, t) { - this._m = e; - this._f = 1e3 * t; - this._startTime = 0; - this._v = 0; -} + function onPlusMessage(res) { + var message = res.data.__message; -Friction.prototype.setV = function (x, y) { - var n = Math.pow(Math.pow(x, 2) + Math.pow(y, 2), 0.5); - this._x_v = x; - this._y_v = y; - this._x_a = -this._f * this._x_v / n; - this._y_a = -this._f * this._y_v / n; - this._t = Math.abs(x / this._x_a) || Math.abs(y / this._y_a); - this._lastDt = null; - this._startTime = new Date().getTime(); -}; + if (!message || !message.__page) { + return; + } -Friction.prototype.setS = function (x, y) { - this._x_s = x; - this._y_s = y; -}; + var pageId = message.__page; + var callback = callbacks[pageId]; + callback && callback(message); -Friction.prototype.s = function (t) { - if (undefined === t) { - t = (new Date().getTime() - this._startTime) / 1e3; + if (!message.keep) { + delete callbacks[pageId]; + } } - if (t > this._t) { - t = this._t; - this._lastDt = t; + if (!initedEventListener) { + if (type === 'nvue') { + var globalEvent = weex.requireModule('globalEvent'); + globalEvent.addEventListener('plusMessage', onPlusMessage); + } else { + window.__plusMessage = onPlusMessage; + } + + initedEventListener = true; } - var x = this._x_v * t + 0.5 * this._x_a * Math.pow(t, 2) + this._x_s; + callbacks[pageId] = callback; +} - var y = this._y_v * t + 0.5 * this._y_a * Math.pow(t, 2) + this._y_s; +var Page = +/*#__PURE__*/ +function () { + function Page(webview) { + _classCallCheck(this, Page); - if (this._x_a > 0 && x < this._endPositionX || this._x_a < 0 && x > this._endPositionX) { - x = this._endPositionX; + this.webview = webview; } - if (this._y_a > 0 && y < this._endPositionY || this._y_a < 0 && y > this._endPositionY) { - y = this._endPositionY; - } + _createClass(Page, [{ + key: "sendMessage", + value: function sendMessage(data) { + plus.webview.postMessageToUniNView({ + __message: { + data: data + } + }, this.webview.id); + } + }]); - return { - x: x, - y: y - }; -}; + return Page; +}(); -Friction.prototype.ds = function (t) { - if (undefined === t) { - t = (new Date().getTime() - this._startTime) / 1e3; - } +function showPage(_ref) { + var url = _ref.url, + _ref$data = _ref.data, + data = _ref$data === void 0 ? {} : _ref$data, + _ref$style = _ref.style, + style = _ref$style === void 0 ? {} : _ref$style, + onMessage = _ref.onMessage, + onClose = _ref.onClose; + var type = getPageType(); + var fromId = getPageId(); + var titleNView = { + autoBackButton: true, + titleSize: '17px' + }; + var pageId = "page".concat(Date.now()); + style = Object.assign({}, style); - if (t > this._t) { - t = this._t; + if (style.titleNView !== false && style.titleNView !== 'none') { + style.titleNView = Object.assign(titleNView, style.titleNView); } - return { - dx: this._x_v + this._x_a * t, - dy: this._y_v + this._y_a * t - }; -}; - -Friction.prototype.delta = function () { - return { - x: -1.5 * Math.pow(this._x_v, 2) / this._x_a || 0, - y: -1.5 * Math.pow(this._y_v, 2) / this._y_a || 0 + var defaultStyle = { + top: 0, + bottom: 0, + usingComponents: {}, + popGesture: 'close', + scrollIndicator: 'none', + animationType: 'pop-in', + animationDuration: 200, + uniNView: { + path: "_www/".concat(url, ".js?from=").concat(fromId, "&type=").concat(type, "&data=").concat(encodeURIComponent(JSON.stringify(data))), + defaultFontSize: plus.screen.resolutionWidth / 20, + viewport: plus.screen.resolutionWidth + } }; -}; + style = Object.assign(defaultStyle, style); + var page = plus.webview.create('', pageId, style); + page.addEventListener('close', onClose); + addEventListener(pageId, function (message) { + if (typeof onMessage === 'function') { + onMessage(message.data); + } -Friction.prototype.dt = function () { - return -this._x_v / this._x_a; -}; + if (!message.keep) { + page.close('auto'); + } + }); + page.show(style.animationType, style.animationDuration); + return new Page(page); +} +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/picker/index.vue?vue&type=script&lang=js& +// +// +// +// +// +// -Friction.prototype.done = function () { - var t = e(this.s().x, this._endPositionX) || e(this.s().y, this._endPositionY) || this._lastDt === this._t; - this._lastDt = null; - return t; -}; +var mode = { + SELECTOR: 'selector', + MULTISELECTOR: 'multiSelector', + TIME: 'time', + DATE: 'date' // 暂不支持城市选择 + // REGION: 'region' -Friction.prototype.setEnd = function (x, y) { - this._endPositionX = x; - this._endPositionY = y; }; - -Friction.prototype.reconfigure = function (m, f) { - this._m = m; - this._f = 1e3 * f; +var fields = { + YEAR: 'year', + MONTH: 'month', + DAY: 'day' }; - -function Spring(m, k, c) { - this._m = m; - this._k = k; - this._c = c; - this._solution = null; - this._endPosition = 0; - this._startTime = 0; -} - -Spring.prototype._solve = function (e, t) { - var n = this._c; - var i = this._m; - var r = this._k; - var o = n * n - 4 * i * r; - - if (o === 0) { - var a = -n / (2 * i); - var s = e; - var l = t / (a * e); - return { - x: function x(e) { - return (s + l * e) * Math.pow(Math.E, a * e); - }, - dx: function dx(e) { - var t = Math.pow(Math.E, a * e); - return a * (s + l * e) * t + l * t; +/* harmony default export */ var pickervue_type_script_lang_js_ = ({ + name: 'Picker', + mixins: [mixins["a" /* emitter */]], + props: { + name: { + type: String, + default: '' + }, + range: { + type: Array, + default: function _default() { + return []; } - }; - } + }, + rangeKey: { + type: String, + default: '' + }, + value: { + type: [Number, String, Array], + default: 0 + }, + mode: { + type: String, + default: mode.SELECTOR, + validator: function validator(val) { + return Object.values(mode).indexOf(val) >= 0; + } + }, + fields: { + type: String, + default: 'day', + validator: function validator(val) { + return Object.values(fields).indexOf(val) >= 0; + } + }, + start: { + type: String, + default: function _default() { + if (this.mode === mode.TIME) { + return '00:00'; + } - if (o > 0) { - var c = (-n - Math.sqrt(o)) / (2 * i); - var u = (-n + Math.sqrt(o)) / (2 * i); - var d = (t - c * e) / (u - c); - var h = e - d; - return { - x: function x(e) { - var t; - var n; + if (this.mode === mode.DATE) { + var year = new Date().getFullYear() - 60; - if (e === this._t) { - t = this._powER1T; - n = this._powER2T; - } + switch (this.fields) { + case fields.YEAR: + return year; - this._t = e; + case fields.MONTH: + return year + '-01'; - if (!t) { - t = this._powER1T = Math.pow(Math.E, c * e); + case fields.DAY: + return year + '-01-01'; + } } - if (!n) { - n = this._powER2T = Math.pow(Math.E, u * e); + return ''; + } + }, + end: { + type: String, + default: function _default() { + if (this.mode === mode.TIME) { + return '23:59'; } - return h * t + d * n; - }, - dx: function dx(e) { - var t; - var n; - - if (e === this._t) { - t = this._powER1T; - n = this._powER2T; - } + if (this.mode === mode.DATE) { + var year = new Date().getFullYear() + 60; - this._t = e; + switch (this.fields) { + case fields.YEAR: + return year; - if (!t) { - t = this._powER1T = Math.pow(Math.E, c * e); - } + case fields.MONTH: + return year + '-12'; - if (!n) { - n = this._powER2T = Math.pow(Math.E, u * e); + case fields.DAY: + return year + '-12-31'; + } } - return h * c * t + d * u * n; + return ''; } - }; - } - - var p = Math.sqrt(4 * i * r - n * n) / (2 * i); - var f = -n / 2 * i; - var v = e; - var g = (t - f * e) / p; - return { - x: function x(e) { - return Math.pow(Math.E, f * e) * (v * Math.cos(p * e) + g * Math.sin(p * e)); }, - dx: function dx(e) { - var t = Math.pow(Math.E, f * e); - var n = Math.cos(p * e); - var i = Math.sin(p * e); - return t * (g * p * n - v * p * i) + f * t * (g * i + v * n); + disabled: { + type: [Boolean, String], + default: false } - }; -}; - -Spring.prototype.x = function (e) { - if (undefined === e) { - e = (new Date().getTime() - this._startTime) / 1e3; - } + }, + created: function created() { + var _this = this; - return this._solution ? this._endPosition + this._solution.x(e) : 0; -}; + this.$dispatch('Form', 'uni-form-group-update', { + type: 'add', + vm: this + }); + Object.keys(this.$props).forEach(function (key) { + if (key !== 'name') { + _this.$watch(key, function (val) { + _this._updatePicker({ + key: val + }); + }); + } + }); + }, + beforeDestroy: function beforeDestroy() { + this.$dispatch('Form', 'uni-form-group-update', { + type: 'remove', + vm: this + }); + }, + methods: { + _show: function _show() { + if (this.disabled) { + return; + } -Spring.prototype.dx = function (e) { - if (undefined === e) { - e = (new Date().getTime() - this._startTime) / 1e3; - } + this._showPicker(Object.assign({}, this.$props)); + }, + _showPicker: function _showPicker(data) { + var _this2 = this; - return this._solution ? this._solution.dx(e) : 0; -}; + if (this.page) { + return; + } -Spring.prototype.setEnd = function (e, n, i) { - if (!i) { - i = new Date().getTime(); - } + var res = { + event: 'cancel' + }; + this.page = showPage({ + url: '__uniapppicker', + data: data, + style: { + titleNView: false, + animationType: 'none', + animationDuration: 0, + background: 'rgba(0,0,0,0)', + popGesture: 'none' + }, + onMessage: function onMessage(message) { + var event = message.event; - if (e !== this._endPosition || !t(n, 0.1)) { - n = n || 0; - var r = this._endPosition; + if (event === 'created') { + _this2._updatePicker(data); - if (this._solution) { - if (t(n, 0.1)) { - n = this._solution.dx((i - this._startTime) / 1e3); - } + return; + } - r = this._solution.x((i - this._startTime) / 1e3); + if (event === 'columnchange') { + delete message.event; - if (t(n, 0.1)) { - n = 0; - } + _this2.$trigger(event, {}, message); - if (t(r, 0.1)) { - r = 0; - } + return; + } - r += this._endPosition; - } + res = message; + }, + onClose: function onClose() { + _this2.page = null; + var event = res.event; + delete res.event; - if (!(this._solution && t(r - e, 0.1) && t(n, 0.1))) { - this._endPosition = e; - this._solution = this._solve(r - this._endPosition, n); - this._startTime = i; + _this2.$trigger(event, {}, res); + } + }); + }, + _updatePicker: function _updatePicker(data) { + this.page && this.page.sendMessage(data); } } -}; +}); +// CONCATENATED MODULE: ./src/platforms/app-plus/view/components/picker/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_pickervue_type_script_lang_js_ = (pickervue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/platforms/app-plus/view/components/picker/index.vue?vue&type=style&index=0&lang=css& +var pickervue_type_style_index_0_lang_css_ = __webpack_require__(94); -Spring.prototype.snap = function (e) { - this._startTime = new Date().getTime(); - this._endPosition = e; - this._solution = { - x: function x() { - return 0; - }, - dx: function dx() { - return 0; - } - }; -}; +// EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__(0); -Spring.prototype.done = function (n) { - if (!n) { - n = new Date().getTime(); - } +// CONCATENATED MODULE: ./src/platforms/app-plus/view/components/picker/index.vue - return e(this.x(), this._endPosition, 0.1) && t(this.dx(), 0.1); -}; -Spring.prototype.reconfigure = function (m, t, c) { - this._m = m; - this._k = t; - this._c = c; - if (!this.done()) { - this._solution = this._solve(this.x() - this._endPosition, this.dx()); - this._startTime = new Date().getTime(); - } -}; -Spring.prototype.springConstant = function () { - return this._k; -}; -Spring.prototype.damping = function () { - return this._c; -}; -Spring.prototype.configuration = function () { - function e(e, t) { - e.reconfigure(1, t, e.damping()); - } +/* normalize component */ - function t(e, t) { - e.reconfigure(1, e.springConstant(), t); - } +var component = Object(componentNormalizer["a" /* default */])( + components_pickervue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) - return [{ - label: 'Spring Constant', - read: this.springConstant.bind(this), - write: e.bind(this, this), - min: 100, - max: 1e3 - }, { - label: 'Damping', - read: this.damping.bind(this), - write: t.bind(this, this), - min: 1, - max: 500 - }]; -}; +/* hot reload */ +if (false) { var api; } +component.options.__file = "src/platforms/app-plus/view/components/picker/index.vue" +/* harmony default export */ var picker = __webpack_exports__["default"] = (component.exports); -function STD(e, t, n) { - this._springX = new Spring(e, t, n); - this._springY = new Spring(e, t, n); - this._springScale = new Spring(e, t, n); - this._startTime = 0; +/***/ }), +/* 97 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/movable-view/index.vue?vue&type=template&id=8de47606& +var render = function() { + var _vm = this + var _h = _vm.$createElement + var _c = _vm._self._c || _h + return _c( + "uni-movable-view", + _vm._g({}, _vm.$listeners), + [ + _c("v-uni-resize-sensor", { on: { resize: _vm.setParent } }), + _vm._t("default") + ], + 2 + ) } +var staticRenderFns = [] +render._withStripped = true -STD.prototype.setEnd = function (e, t, n, i) { - var r = new Date().getTime(); - this._springX.setEnd(e, i, r); +// CONCATENATED MODULE: ./src/core/view/components/movable-view/index.vue?vue&type=template&id=8de47606& - this._springY.setEnd(t, i, r); +// EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js +var touchtrack = __webpack_require__(8); - this._springScale.setEnd(n, i, r); +// CONCATENATED MODULE: ./src/core/view/components/movable-view/utils.js +function e(e, t, n) { + return e > t - n && e < t + n; +} - this._startTime = r; -}; +function t(t, n) { + return e(t, 0, n); +} -STD.prototype.x = function () { - var e = (new Date().getTime() - this._startTime) / 1e3; - return { - x: this._springX.x(e), - y: this._springY.x(e), - scale: this._springScale.x(e) - }; -}; +function Decline() {} -STD.prototype.done = function () { - var e = new Date().getTime(); - return this._springX.done(e) && this._springY.done(e) && this._springScale.done(e); +Decline.prototype.x = function (e) { + return Math.sqrt(e); }; -STD.prototype.reconfigure = function (e, t, n) { - this._springX.reconfigure(e, t, n); - - this._springY.reconfigure(e, t, n); +function Friction(e, t) { + this._m = e; + this._f = 1e3 * t; + this._startTime = 0; + this._v = 0; +} - this._springScale.reconfigure(e, t, n); +Friction.prototype.setV = function (x, y) { + var n = Math.pow(Math.pow(x, 2) + Math.pow(y, 2), 0.5); + this._x_v = x; + this._y_v = y; + this._x_a = -this._f * this._x_v / n; + this._y_a = -this._f * this._y_v / n; + this._t = Math.abs(x / this._x_a) || Math.abs(y / this._y_a); + this._lastDt = null; + this._startTime = new Date().getTime(); }; -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/movable-view/index.vue?vue&type=script&lang=js& -// -// -// -// -// -// +Friction.prototype.setS = function (x, y) { + this._x_s = x; + this._y_s = y; +}; -var requesting = false; - -function _requestAnimationFrame(e) { - if (!requesting) { - requesting = true; - requestAnimationFrame(function () { - e(); - requesting = false; - }); +Friction.prototype.s = function (t) { + if (undefined === t) { + t = (new Date().getTime() - this._startTime) / 1e3; } -} -function p(t, n) { - if (t === n) { - return 0; + if (t > this._t) { + t = this._t; + this._lastDt = t; } - var i = t.offsetLeft; - return t.offsetParent ? i += p(t.offsetParent, n) : 0; -} + var x = this._x_v * t + 0.5 * this._x_a * Math.pow(t, 2) + this._x_s; -function f(t, n) { - if (t === n) { - return 0; + var y = this._y_v * t + 0.5 * this._y_a * Math.pow(t, 2) + this._y_s; + + if (this._x_a > 0 && x < this._endPositionX || this._x_a < 0 && x > this._endPositionX) { + x = this._endPositionX; } - var i = t.offsetTop; - return t.offsetParent ? i += f(t.offsetParent, n) : 0; -} + if (this._y_a > 0 && y < this._endPositionY || this._y_a < 0 && y > this._endPositionY) { + y = this._endPositionY; + } -function v(a, b) { - return +((1000 * a - 1000 * b) / 1000).toFixed(1); -} + return { + x: x, + y: y + }; +}; -function g(e, t, n) { - var i = function i(e) { - if (e && e.id) { - cancelAnimationFrame(e.id); - } +Friction.prototype.ds = function (t) { + if (undefined === t) { + t = (new Date().getTime() - this._startTime) / 1e3; + } - if (e) { - e.cancelled = true; - } + if (t > this._t) { + t = this._t; + } + + return { + dx: this._x_v + this._x_a * t, + dy: this._y_v + this._y_a * t }; +}; - var r = { - id: 0, - cancelled: false +Friction.prototype.delta = function () { + return { + x: -1.5 * Math.pow(this._x_v, 2) / this._x_a || 0, + y: -1.5 * Math.pow(this._y_v, 2) / this._y_a || 0 }; +}; - function fn(n, i, r, o) { - if (!n || !n.cancelled) { - r(i); - var a = e.done(); +Friction.prototype.dt = function () { + return -this._x_v / this._x_a; +}; - if (!a) { - if (!n.cancelled) { - n.id = requestAnimationFrame(fn.bind(null, n, i, r, o)); - } - } +Friction.prototype.done = function () { + var t = e(this.s().x, this._endPositionX) || e(this.s().y, this._endPositionY) || this._lastDt === this._t; - if (a && o) { - o(i); - } - } - } + this._lastDt = null; + return t; +}; - fn(r, e, t, n); - return { - cancel: i.bind(null, r), - model: e - }; +Friction.prototype.setEnd = function (x, y) { + this._endPositionX = x; + this._endPositionY = y; +}; + +Friction.prototype.reconfigure = function (m, f) { + this._m = m; + this._f = 1e3 * f; +}; + +function Spring(m, k, c) { + this._m = m; + this._k = k; + this._c = c; + this._solution = null; + this._endPosition = 0; + this._startTime = 0; } -/* harmony default export */ var movable_viewvue_type_script_lang_js_ = ({ - name: 'MovableView', - mixins: [touchtrack["a" /* default */]], - props: { - direction: { - type: String, - default: 'none' - }, - inertia: { - type: [Boolean, String], - default: false - }, - outOfBounds: { - type: [Boolean, String], - default: false - }, - x: { - type: [Number, String], - default: 0 - }, - y: { - type: [Number, String], - default: 0 - }, - damping: { - type: [Number, String], - default: 20 - }, - friction: { - type: [Number, String], - default: 2 - }, - disabled: { - type: [Boolean, String], - default: false - }, - scale: { - type: [Boolean, String], - default: false - }, - scaleMin: { - type: [Number, String], - default: 0.5 - }, - scaleMax: { - type: [Number, String], - default: 10 - }, - scaleValue: { - type: [Number, String], - default: 1 - }, - animation: { - type: [Boolean, String], - default: true - } - }, - data: function data() { +Spring.prototype._solve = function (e, t) { + var n = this._c; + var i = this._m; + var r = this._k; + var o = n * n - 4 * i * r; + + if (o === 0) { + var a = -n / (2 * i); + var s = e; + var l = t / (a * e); return { - xSync: this._getPx(this.x), - ySync: this._getPx(this.y), - scaleValueSync: Number(this.scaleValue) || 1, - width: 0, - height: 0, - minX: 0, - minY: 0, - maxX: 0, - maxY: 0 - }; - }, - computed: { - dampingNumber: function dampingNumber() { - var val = Number(this.damping); - return isNaN(val) ? 20 : val; - }, - frictionNumber: function frictionNumber() { - var val = Number(this.friction); - return isNaN(val) || val <= 0 ? 2 : val; - }, - scaleMinNumber: function scaleMinNumber() { - var val = Number(this.scaleMin); - return isNaN(val) ? 0.5 : val; - }, - scaleMaxNumber: function scaleMaxNumber() { - var val = Number(this.scaleMax); - return isNaN(val) ? 10 : val; - }, - xMove: function xMove() { - return this.direction === 'all' || this.direction === 'horizontal'; - }, - yMove: function yMove() { - return this.direction === 'all' || this.direction === 'vertical'; - } - }, - watch: { - x: function x(val) { - this.xSync = this._getPx(val); - }, - xSync: function xSync(val) { - this._setX(val); - }, - y: function y(val) { - this.ySync = this._getPx(val); - }, - ySync: function ySync(val) { - this._setY(val); - }, - scaleValue: function scaleValue(val) { - this.scaleValueSync = Number(val) || 0; - }, - scaleValueSync: function scaleValueSync(val) { - this._setScaleValue(val); - }, - scaleMinNumber: function scaleMinNumber() { - this._setScaleMinOrMax(); - }, - scaleMaxNumber: function scaleMaxNumber() { - this._setScaleMinOrMax(); - } - }, - created: function created() { - this._offset = { - x: 0, - y: 0 - }; - this._scaleOffset = { - x: 0, - y: 0 - }; - this._translateX = 0; - this._translateY = 0; - this._scale = 1; - this._oldScale = 1; - this._STD = new STD(1, 9 * Math.pow(this.dampingNumber, 2) / 40, this.dampingNumber); - this._friction = new Friction(1, this.frictionNumber); - this._declineX = new Decline(); - this._declineY = new Decline(); - this.__touchInfo = { - historyX: [0, 0], - historyY: [0, 0], - historyT: [0, 0] + x: function x(e) { + return (s + l * e) * Math.pow(Math.E, a * e); + }, + dx: function dx(e) { + var t = Math.pow(Math.E, a * e); + return a * (s + l * e) * t + l * t; + } }; - }, - mounted: function mounted() { - this.touchtrack(this.$el, '_onTrack'); - this.setParent(); - - this._friction.reconfigure(1, this.frictionNumber); + } - this._STD.reconfigure(1, 9 * Math.pow(this.dampingNumber, 2) / 40, this.dampingNumber); + if (o > 0) { + var c = (-n - Math.sqrt(o)) / (2 * i); + var u = (-n + Math.sqrt(o)) / (2 * i); + var d = (t - c * e) / (u - c); + var h = e - d; + return { + x: function x(e) { + var t; + var n; - this.$el.style.transformOrigin = 'center'; - }, - methods: { - _getPx: function _getPx(val) { - if (/\d+[ur]px$/i.test(val)) { - return uni.upx2px(parseFloat(val)); - } + if (e === this._t) { + t = this._powER1T; + n = this._powER2T; + } - return Number(val) || 0; - }, - _setX: function _setX(val) { - if (this.xMove) { - if (val + this._scaleOffset.x === this._translateX) { - return this._translateX; - } else { - if (this._SFA) { - this._SFA.cancel(); - } + this._t = e; - this._animationTo(val + this._scaleOffset.x, this.ySync + this._scaleOffset.y, this._scale); + if (!t) { + t = this._powER1T = Math.pow(Math.E, c * e); } - } - - return val; - }, - _setY: function _setY(val) { - if (this.yMove) { - if (val + this._scaleOffset.y === this._translateY) { - return this._translateY; - } else { - if (this._SFA) { - this._SFA.cancel(); - } - this._animationTo(this.xSync + this._scaleOffset.x, val + this._scaleOffset.y, this._scale); + if (!n) { + n = this._powER2T = Math.pow(Math.E, u * e); } - } - return val; - }, - _setScaleMinOrMax: function _setScaleMinOrMax() { - if (!this.scale) { - return false; - } + return h * t + d * n; + }, + dx: function dx(e) { + var t; + var n; - this._updateScale(this._scale, true); + if (e === this._t) { + t = this._powER1T; + n = this._powER2T; + } - this._updateOldScale(this._scale); - }, - _setScaleValue: function _setScaleValue(scale) { - if (!this.scale) { - return false; - } + this._t = e; - scale = this._adjustScale(scale); + if (!t) { + t = this._powER1T = Math.pow(Math.E, c * e); + } - this._updateScale(scale, true); + if (!n) { + n = this._powER2T = Math.pow(Math.E, u * e); + } - this._updateOldScale(scale); + return h * c * t + d * u * n; + } + }; + } - return scale; + var p = Math.sqrt(4 * i * r - n * n) / (2 * i); + var f = -n / 2 * i; + var v = e; + var g = (t - f * e) / p; + return { + x: function x(e) { + return Math.pow(Math.E, f * e) * (v * Math.cos(p * e) + g * Math.sin(p * e)); }, - __handleTouchStart: function __handleTouchStart() { - if (!this._isScaling) { - if (!this.disabled) { - if (this._FA) { - this._FA.cancel(); - } + dx: function dx(e) { + var t = Math.pow(Math.E, f * e); + var n = Math.cos(p * e); + var i = Math.sin(p * e); + return t * (g * p * n - v * p * i) + f * t * (g * i + v * n); + } + }; +}; - if (this._SFA) { - this._SFA.cancel(); - } +Spring.prototype.x = function (e) { + if (undefined === e) { + e = (new Date().getTime() - this._startTime) / 1e3; + } - this.__touchInfo.historyX = [0, 0]; - this.__touchInfo.historyY = [0, 0]; - this.__touchInfo.historyT = [0, 0]; + return this._solution ? this._endPosition + this._solution.x(e) : 0; +}; - if (this.xMove) { - this.__baseX = this._translateX; - } +Spring.prototype.dx = function (e) { + if (undefined === e) { + e = (new Date().getTime() - this._startTime) / 1e3; + } - if (this.yMove) { - this.__baseY = this._translateY; - } + return this._solution ? this._solution.dx(e) : 0; +}; - this.$el.style.willChange = 'transform'; - this._checkCanMove = null; - this._firstMoveDirection = null; - this._isTouching = true; - } +Spring.prototype.setEnd = function (e, n, i) { + if (!i) { + i = new Date().getTime(); + } + + if (e !== this._endPosition || !t(n, 0.1)) { + n = n || 0; + var r = this._endPosition; + + if (this._solution) { + if (t(n, 0.1)) { + n = this._solution.dx((i - this._startTime) / 1e3); } - }, - __handleTouchMove: function __handleTouchMove(event) { - var self = this; - if (!this._isScaling && !this.disabled && this._isTouching) { - var x = this._translateX; - var y = this._translateY; + r = this._solution.x((i - this._startTime) / 1e3); - if (this._firstMoveDirection === null) { - this._firstMoveDirection = Math.abs(event.detail.dx / event.detail.dy) > 1 ? 'htouchmove' : 'vtouchmove'; - } + if (t(n, 0.1)) { + n = 0; + } - if (this.xMove) { - x = event.detail.dx + this.__baseX; + if (t(r, 0.1)) { + r = 0; + } - this.__touchInfo.historyX.shift(); + r += this._endPosition; + } - this.__touchInfo.historyX.push(x); + if (!(this._solution && t(r - e, 0.1) && t(n, 0.1))) { + this._endPosition = e; + this._solution = this._solve(r - this._endPosition, n); + this._startTime = i; + } + } +}; - if (!this.yMove) { - if (!null !== this._checkCanMove) { - if (Math.abs(event.detail.dx / event.detail.dy) > 1) { - this._checkCanMove = false; - } else { - this._checkCanMove = true; - } - } - } - } +Spring.prototype.snap = function (e) { + this._startTime = new Date().getTime(); + this._endPosition = e; + this._solution = { + x: function x() { + return 0; + }, + dx: function dx() { + return 0; + } + }; +}; - if (this.yMove) { - y = event.detail.dy + this.__baseY; +Spring.prototype.done = function (n) { + if (!n) { + n = new Date().getTime(); + } - this.__touchInfo.historyY.shift(); + return e(this.x(), this._endPosition, 0.1) && t(this.dx(), 0.1); +}; - this.__touchInfo.historyY.push(y); +Spring.prototype.reconfigure = function (m, t, c) { + this._m = m; + this._k = t; + this._c = c; - if (!this.xMove) { - if (!null !== this._checkCanMove) { - if (Math.abs(event.detail.dy / event.detail.dx) > 1) { - this._checkCanMove = false; - } else { - this._checkCanMove = true; - } - } - } - } + if (!this.done()) { + this._solution = this._solve(this.x() - this._endPosition, this.dx()); + this._startTime = new Date().getTime(); + } +}; - this.__touchInfo.historyT.shift(); +Spring.prototype.springConstant = function () { + return this._k; +}; - this.__touchInfo.historyT.push(event.detail.timeStamp); +Spring.prototype.damping = function () { + return this._c; +}; - if (!this._checkCanMove) { - event.preventDefault(); - var source = 'touch'; +Spring.prototype.configuration = function () { + function e(e, t) { + e.reconfigure(1, t, e.damping()); + } - if (x < this.minX) { - if (this.outOfBounds) { - source = 'touch-out-of-bounds'; - x = this.minX - this._declineX.x(this.minX - x); - } else { - x = this.minX; - } - } else if (x > this.maxX) { - if (this.outOfBounds) { - source = 'touch-out-of-bounds'; - x = this.maxX + this._declineX.x(x - this.maxX); - } else { - x = this.maxX; - } - } + function t(e, t) { + e.reconfigure(1, e.springConstant(), t); + } - if (y < this.minY) { - if (this.outOfBounds) { - source = 'touch-out-of-bounds'; - y = this.minY - this._declineY.x(this.minY - y); - } else { - y = this.minY; - } - } else { - if (y > this.maxY) { - if (this.outOfBounds) { - source = 'touch-out-of-bounds'; - y = this.maxY + this._declineY.x(y - this.maxY); - } else { - y = this.maxY; - } - } - } + return [{ + label: 'Spring Constant', + read: this.springConstant.bind(this), + write: e.bind(this, this), + min: 100, + max: 1e3 + }, { + label: 'Damping', + read: this.damping.bind(this), + write: t.bind(this, this), + min: 1, + max: 500 + }]; +}; - _requestAnimationFrame(function () { - self._setTransform(x, y, self._scale, source); - }); - } - } - }, - __handleTouchEnd: function __handleTouchEnd() { - var self = this; +function STD(e, t, n) { + this._springX = new Spring(e, t, n); + this._springY = new Spring(e, t, n); + this._springScale = new Spring(e, t, n); + this._startTime = 0; +} - if (!this._isScaling && !this.disabled && this._isTouching) { - this.$el.style.willChange = 'auto'; - this._isTouching = false; +STD.prototype.setEnd = function (e, t, n, i) { + var r = new Date().getTime(); - if (!this._checkCanMove && !this._revise('out-of-bounds') && this.inertia) { - var xv = 1000 * (this.__touchInfo.historyX[1] - this.__touchInfo.historyX[0]) / (this.__touchInfo.historyT[1] - this.__touchInfo.historyT[0]); - var yv = 1000 * (this.__touchInfo.historyY[1] - this.__touchInfo.historyY[0]) / (this.__touchInfo.historyT[1] - this.__touchInfo.historyT[0]); + this._springX.setEnd(e, i, r); - this._friction.setV(xv, yv); + this._springY.setEnd(t, i, r); - this._friction.setS(this._translateX, this._translateY); + this._springScale.setEnd(n, i, r); - var x0 = this._friction.delta().x; + this._startTime = r; +}; - var y0 = this._friction.delta().y; +STD.prototype.x = function () { + var e = (new Date().getTime() - this._startTime) / 1e3; + return { + x: this._springX.x(e), + y: this._springY.x(e), + scale: this._springScale.x(e) + }; +}; - var x = x0 + this._translateX; - var y = y0 + this._translateY; +STD.prototype.done = function () { + var e = new Date().getTime(); + return this._springX.done(e) && this._springY.done(e) && this._springScale.done(e); +}; - if (x < this.minX) { - x = this.minX; - y = this._translateY + (this.minX - this._translateX) * y0 / x0; - } else { - if (x > this.maxX) { - x = this.maxX; - y = this._translateY + (this.maxX - this._translateX) * y0 / x0; - } - } +STD.prototype.reconfigure = function (e, t, n) { + this._springX.reconfigure(e, t, n); - if (y < this.minY) { - y = this.minY; - x = this._translateX + (this.minY - this._translateY) * x0 / y0; - } else { - if (y > this.maxY) { - y = this.maxY; - x = this._translateX + (this.maxY - this._translateY) * x0 / y0; - } - } + this._springY.reconfigure(e, t, n); - this._friction.setEnd(x, y); + this._springScale.reconfigure(e, t, n); +}; +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/movable-view/index.vue?vue&type=script&lang=js& +// +// +// +// +// +// - this._FA = g(this._friction, function () { - var t = self._friction.s(); - var x = t.x; - var y = t.y; +var requesting = false; - self._setTransform(x, y, self._scale, 'friction'); - }, function () { - self._FA.cancel(); - }); - } - } - }, - _onTrack: function _onTrack(event) { - switch (event.detail.state) { - case 'start': - this.__handleTouchStart(); +function _requestAnimationFrame(e) { + if (!requesting) { + requesting = true; + requestAnimationFrame(function () { + e(); + requesting = false; + }); + } +} - break; +function p(t, n) { + if (t === n) { + return 0; + } - case 'move': - this.__handleTouchMove(event); + var i = t.offsetLeft; + return t.offsetParent ? i += p(t.offsetParent, n) : 0; +} - break; +function f(t, n) { + if (t === n) { + return 0; + } - case 'end': - this.__handleTouchEnd(); + var i = t.offsetTop; + return t.offsetParent ? i += f(t.offsetParent, n) : 0; +} - } - }, - _getLimitXY: function _getLimitXY(x, y) { - var outOfBounds = false; +function v(a, b) { + return +((1000 * a - 1000 * b) / 1000).toFixed(1); +} - if (x > this.maxX) { - x = this.maxX; - outOfBounds = true; - } else { - if (x < this.minX) { - x = this.minX; - outOfBounds = true; - } - } +function g(e, t, n) { + var i = function i(e) { + if (e && e.id) { + cancelAnimationFrame(e.id); + } - if (y > this.maxY) { - y = this.maxY; - outOfBounds = true; - } else { - if (y < this.minY) { - y = this.minY; - outOfBounds = true; - } - } + if (e) { + e.cancelled = true; + } + }; - return { - x: x, - y: y, - outOfBounds: outOfBounds - }; - }, - setParent: function setParent() { - if (!this.$parent._isMounted) { - return; - } + var r = { + id: 0, + cancelled: false + }; - if (this._FA) { - this._FA.cancel(); - } + function fn(n, i, r, o) { + if (!n || !n.cancelled) { + r(i); + var a = e.done(); - if (this._SFA) { - this._SFA.cancel(); + if (!a) { + if (!n.cancelled) { + n.id = requestAnimationFrame(fn.bind(null, n, i, r, o)); + } } - var scale = this.scale ? this.scaleValueSync : 1; - - this._updateOffset(); - - this._updateWH(scale); - - this._updateBoundary(); - - this._translateX = this.xSync + this._scaleOffset.x; - this._translateY = this.ySync + this._scaleOffset.y; - - var limitXY = this._getLimitXY(this._translateX, this._translateY); - - var x = limitXY.x; - var y = limitXY.y; + if (a && o) { + o(i); + } + } + } - this._setTransform(x, y, scale, '', true); + fn(r, e, t, n); + return { + cancel: i.bind(null, r), + model: e + }; +} - this._updateOldScale(scale); +/* harmony default export */ var movable_viewvue_type_script_lang_js_ = ({ + name: 'MovableView', + mixins: [touchtrack["a" /* default */]], + props: { + direction: { + type: String, + default: 'none' }, - _updateOffset: function _updateOffset() { - this._offset.x = p(this.$el, this.$parent.$el); - this._offset.y = f(this.$el, this.$parent.$el); + inertia: { + type: [Boolean, String], + default: false }, - _updateWH: function _updateWH(scale) { - scale = scale || this._scale; - scale = this._adjustScale(scale); - var rect = this.$el.getBoundingClientRect(); - this.height = rect.height / this._scale; - this.width = rect.width / this._scale; - var height = this.height * scale; - var width = this.width * scale; - this._scaleOffset.x = (width - this.width) / 2; - this._scaleOffset.y = (height - this.height) / 2; + outOfBounds: { + type: [Boolean, String], + default: false }, - _updateBoundary: function _updateBoundary() { - var x = 0 - this._offset.x + this._scaleOffset.x; - var width = this.$parent.width - this.width - this._offset.x - this._scaleOffset.x; - this.minX = Math.min(x, width); - this.maxX = Math.max(x, width); - var y = 0 - this._offset.y + this._scaleOffset.y; - var height = this.$parent.height - this.height - this._offset.y - this._scaleOffset.y; - this.minY = Math.min(y, height); - this.maxY = Math.max(y, height); + x: { + type: [Number, String], + default: 0 }, - _beginScale: function _beginScale() { - this._isScaling = true; + y: { + type: [Number, String], + default: 0 }, - _endScale: function _endScale() { - this._isScaling = false; - - this._updateOldScale(this._scale); + damping: { + type: [Number, String], + default: 20 }, - _setScale: function _setScale(scale) { - if (this.scale) { - scale = this._adjustScale(scale); - scale = this._oldScale * scale; - - this._beginScale(); - - this._updateScale(scale); - } + friction: { + type: [Number, String], + default: 2 }, - _updateScale: function _updateScale(scale, animat) { - var self = this; - - if (this.scale) { - scale = this._adjustScale(scale); - - this._updateWH(scale); - - this._updateBoundary(); - - var limitXY = this._getLimitXY(this._translateX, this._translateY); - - var x = limitXY.x; - var y = limitXY.y; - - if (animat) { - this._animationTo(x, y, scale, '', true, true); - } else { - _requestAnimationFrame(function () { - self._setTransform(x, y, scale, '', true, true); - }); - } - } + disabled: { + type: [Boolean, String], + default: false }, - _updateOldScale: function _updateOldScale(scale) { - this._oldScale = scale; + scale: { + type: [Boolean, String], + default: false }, - _adjustScale: function _adjustScale(scale) { - scale = Math.max(0.5, this.scaleMinNumber, scale); - scale = Math.min(10, this.scaleMaxNumber, scale); - return scale; + scaleMin: { + type: [Number, String], + default: 0.5 }, - _animationTo: function _animationTo(x, y, scale, source, r, o) { - var self = this; - - if (this._FA) { - this._FA.cancel(); - } + scaleMax: { + type: [Number, String], + default: 10 + }, + scaleValue: { + type: [Number, String], + default: 1 + }, + animation: { + type: [Boolean, String], + default: true + } + }, + data: function data() { + return { + xSync: this._getPx(this.x), + ySync: this._getPx(this.y), + scaleValueSync: Number(this.scaleValue) || 1, + width: 0, + height: 0, + minX: 0, + minY: 0, + maxX: 0, + maxY: 0 + }; + }, + computed: { + dampingNumber: function dampingNumber() { + var val = Number(this.damping); + return isNaN(val) ? 20 : val; + }, + frictionNumber: function frictionNumber() { + var val = Number(this.friction); + return isNaN(val) || val <= 0 ? 2 : val; + }, + scaleMinNumber: function scaleMinNumber() { + var val = Number(this.scaleMin); + return isNaN(val) ? 0.5 : val; + }, + scaleMaxNumber: function scaleMaxNumber() { + var val = Number(this.scaleMax); + return isNaN(val) ? 10 : val; + }, + xMove: function xMove() { + return this.direction === 'all' || this.direction === 'horizontal'; + }, + yMove: function yMove() { + return this.direction === 'all' || this.direction === 'vertical'; + } + }, + watch: { + x: function x(val) { + this.xSync = this._getPx(val); + }, + xSync: function xSync(val) { + this._setX(val); + }, + y: function y(val) { + this.ySync = this._getPx(val); + }, + ySync: function ySync(val) { + this._setY(val); + }, + scaleValue: function scaleValue(val) { + this.scaleValueSync = Number(val) || 0; + }, + scaleValueSync: function scaleValueSync(val) { + this._setScaleValue(val); + }, + scaleMinNumber: function scaleMinNumber() { + this._setScaleMinOrMax(); + }, + scaleMaxNumber: function scaleMaxNumber() { + this._setScaleMinOrMax(); + } + }, + created: function created() { + this._offset = { + x: 0, + y: 0 + }; + this._scaleOffset = { + x: 0, + y: 0 + }; + this._translateX = 0; + this._translateY = 0; + this._scale = 1; + this._oldScale = 1; + this._STD = new STD(1, 9 * Math.pow(this.dampingNumber, 2) / 40, this.dampingNumber); + this._friction = new Friction(1, this.frictionNumber); + this._declineX = new Decline(); + this._declineY = new Decline(); + this.__touchInfo = { + historyX: [0, 0], + historyY: [0, 0], + historyT: [0, 0] + }; + }, + mounted: function mounted() { + this.touchtrack(this.$el, '_onTrack'); + this.setParent(); - if (this._SFA) { - this._SFA.cancel(); + this._friction.reconfigure(1, this.frictionNumber); + + this._STD.reconfigure(1, 9 * Math.pow(this.dampingNumber, 2) / 40, this.dampingNumber); + + this.$el.style.transformOrigin = 'center'; + }, + methods: { + _getPx: function _getPx(val) { + if (/\d+[ur]px$/i.test(val)) { + return uni.upx2px(parseFloat(val)); } - if (!this.xMove) { - x = this._translateX; + return Number(val) || 0; + }, + _setX: function _setX(val) { + if (this.xMove) { + if (val + this._scaleOffset.x === this._translateX) { + return this._translateX; + } else { + if (this._SFA) { + this._SFA.cancel(); + } + + this._animationTo(val + this._scaleOffset.x, this.ySync + this._scaleOffset.y, this._scale); + } } - if (!this.yMove) { - y = this._translateY; + return val; + }, + _setY: function _setY(val) { + if (this.yMove) { + if (val + this._scaleOffset.y === this._translateY) { + return this._translateY; + } else { + if (this._SFA) { + this._SFA.cancel(); + } + + this._animationTo(this.xSync + this._scaleOffset.x, val + this._scaleOffset.y, this._scale); + } } + return val; + }, + _setScaleMinOrMax: function _setScaleMinOrMax() { if (!this.scale) { - scale = this._scale; + return false; } - var limitXY = this._getLimitXY(x, y); - - x = limitXY.x; - y = limitXY.y; - - if (!this.animation) { - this._setTransform(x, y, scale, source, r, o); + this._updateScale(this._scale, true); - return; + this._updateOldScale(this._scale); + }, + _setScaleValue: function _setScaleValue(scale) { + if (!this.scale) { + return false; } - this._STD._springX._solution = null; - this._STD._springY._solution = null; - this._STD._springScale._solution = null; - this._STD._springX._endPosition = this._translateX; - this._STD._springY._endPosition = this._translateY; - this._STD._springScale._endPosition = this._scale; - - this._STD.setEnd(x, y, scale, 1); + scale = this._adjustScale(scale); - this._SFA = g(this._STD, function () { - var data = self._STD.x(); + this._updateScale(scale, true); - var x = data.x; - var y = data.y; - var scale = data.scale; + this._updateOldScale(scale); - self._setTransform(x, y, scale, source, r, o); - }, function () { - self._SFA.cancel(); - }); + return scale; }, - _revise: function _revise(source) { - var limitXY = this._getLimitXY(this._translateX, this._translateY); + __handleTouchStart: function __handleTouchStart() { + if (!this._isScaling) { + if (!this.disabled) { + if (this._FA) { + this._FA.cancel(); + } - var x = limitXY.x; - var y = limitXY.y; - var outOfBounds = limitXY.outOfBounds; + if (this._SFA) { + this._SFA.cancel(); + } - if (outOfBounds) { - this._animationTo(x, y, this._scale, source); - } + this.__touchInfo.historyX = [0, 0]; + this.__touchInfo.historyY = [0, 0]; + this.__touchInfo.historyT = [0, 0]; - return outOfBounds; - }, - _setTransform: function _setTransform(x, y, scale) { - var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ''; - var r = arguments.length > 4 ? arguments[4] : undefined; - var o = arguments.length > 5 ? arguments[5] : undefined; + if (this.xMove) { + this.__baseX = this._translateX; + } - if (!(x !== null && x.toString() !== 'NaN' && typeof x === 'number')) { - x = this._translateX || 0; - } + if (this.yMove) { + this.__baseY = this._translateY; + } - if (!(y !== null && y.toString() !== 'NaN' && typeof y === 'number')) { - y = this._translateY || 0; + this.$el.style.willChange = 'transform'; + this._checkCanMove = null; + this._firstMoveDirection = null; + this._isTouching = true; + } } + }, + __handleTouchMove: function __handleTouchMove(event) { + var self = this; - x = Number(x.toFixed(1)); - y = Number(y.toFixed(1)); - scale = Number(scale.toFixed(1)); + if (!this._isScaling && !this.disabled && this._isTouching) { + var x = this._translateX; + var y = this._translateY; - if (!(this._translateX === x && this._translateY === y)) { - if (!r) { - this.$trigger('change', {}, { - x: v(x, this._scaleOffset.x), - y: v(y, this._scaleOffset.y), - source: source - }); + if (this._firstMoveDirection === null) { + this._firstMoveDirection = Math.abs(event.detail.dx / event.detail.dy) > 1 ? 'htouchmove' : 'vtouchmove'; } - } - if (!this.scale) { - scale = this._scale; - } + if (this.xMove) { + x = event.detail.dx + this.__baseX; - scale = this._adjustScale(scale); - scale = +scale.toFixed(3); + this.__touchInfo.historyX.shift(); - if (o && scale !== this._scale) { - this.$trigger('scale', {}, { - x: x, - y: y, - scale: scale - }); - } + this.__touchInfo.historyX.push(x); - var transform = 'translateX(' + x + 'px) translateY(' + y + 'px) translateZ(0px) scale(' + scale + ')'; - this.$el.style.transform = transform; - this.$el.style.webkitTransform = transform; - this._translateX = x; - this._translateY = y; - this._scale = scale; - } - } -}); -// CONCATENATED MODULE: ./src/core/view/components/movable-view/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_movable_viewvue_type_script_lang_js_ = (movable_viewvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/movable-view/index.vue?vue&type=style&index=0&lang=css& -var movable_viewvue_type_style_index_0_lang_css_ = __webpack_require__(76); + if (!this.yMove) { + if (!null !== this._checkCanMove) { + if (Math.abs(event.detail.dx / event.detail.dy) > 1) { + this._checkCanMove = false; + } else { + this._checkCanMove = true; + } + } + } + } -// EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js -var componentNormalizer = __webpack_require__(0); + if (this.yMove) { + y = event.detail.dy + this.__baseY; -// CONCATENATED MODULE: ./src/core/view/components/movable-view/index.vue + this.__touchInfo.historyY.shift(); + this.__touchInfo.historyY.push(y); + if (!this.xMove) { + if (!null !== this._checkCanMove) { + if (Math.abs(event.detail.dy / event.detail.dx) > 1) { + this._checkCanMove = false; + } else { + this._checkCanMove = true; + } + } + } + } + this.__touchInfo.historyT.shift(); + this.__touchInfo.historyT.push(event.detail.timeStamp); + if (!this._checkCanMove) { + event.preventDefault(); + var source = 'touch'; -/* normalize component */ + if (x < this.minX) { + if (this.outOfBounds) { + source = 'touch-out-of-bounds'; + x = this.minX - this._declineX.x(this.minX - x); + } else { + x = this.minX; + } + } else if (x > this.maxX) { + if (this.outOfBounds) { + source = 'touch-out-of-bounds'; + x = this.maxX + this._declineX.x(x - this.maxX); + } else { + x = this.maxX; + } + } -var component = Object(componentNormalizer["a" /* default */])( - components_movable_viewvue_type_script_lang_js_, - render, - staticRenderFns, - false, - null, - null, - null - -) + if (y < this.minY) { + if (this.outOfBounds) { + source = 'touch-out-of-bounds'; + y = this.minY - this._declineY.x(this.minY - y); + } else { + y = this.minY; + } + } else { + if (y > this.maxY) { + if (this.outOfBounds) { + source = 'touch-out-of-bounds'; + y = this.maxY + this._declineY.x(y - this.maxY); + } else { + y = this.maxY; + } + } + } -/* hot reload */ -if (false) { var api; } -component.options.__file = "src/core/view/components/movable-view/index.vue" -/* harmony default export */ var movable_view = __webpack_exports__["default"] = (component.exports); + _requestAnimationFrame(function () { + self._setTransform(x, y, self._scale, source); + }); + } + } + }, + __handleTouchEnd: function __handleTouchEnd() { + var self = this; -/***/ }), -/* 95 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (!this._isScaling && !this.disabled && this._isTouching) { + this.$el.style.willChange = 'auto'; + this._isTouching = false; -"use strict"; -__webpack_require__.r(__webpack_exports__); + if (!this._checkCanMove && !this._revise('out-of-bounds') && this.inertia) { + var xv = 1000 * (this.__touchInfo.historyX[1] - this.__touchInfo.historyX[0]) / (this.__touchInfo.historyT[1] - this.__touchInfo.historyT[0]); + var yv = 1000 * (this.__touchInfo.historyY[1] - this.__touchInfo.historyY[0]) / (this.__touchInfo.historyT[1] - this.__touchInfo.historyT[0]); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/form/index.vue?vue&type=template&id=7735a91d& -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("uni-form", _vm._g({}, _vm.$listeners), [ - _c("span", [_vm._t("default")], 2) - ]) -} -var staticRenderFns = [] -render._withStripped = true + this._friction.setV(xv, yv); + this._friction.setS(this._translateX, this._translateY); -// CONCATENATED MODULE: ./src/core/view/components/form/index.vue?vue&type=template&id=7735a91d& + var x0 = this._friction.delta().x; -// EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules -var mixins = __webpack_require__(1); + var y0 = this._friction.delta().y; -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/form/index.vue?vue&type=script&lang=js& -// -// -// -// -// -// -// + var x = x0 + this._translateX; + var y = y0 + this._translateY; -/* harmony default export */ var formvue_type_script_lang_js_ = ({ - name: 'Form', - mixins: [mixins["c" /* listeners */]], - data: function data() { - return { - childrenList: [] - }; - }, - listeners: { - '@form-submit': '_onSubmit', - '@form-reset': '_onReset', - '@form-group-update': '_formGroupUpdateHandler' - }, - methods: { - _onSubmit: function _onSubmit($event) { - var data = {}; - this.childrenList.forEach(function (vm) { - if (vm._getFormData && vm._getFormData().key) { - data[vm._getFormData().key] = vm._getFormData().value; - } - }); - this.$trigger('submit', $event, { - value: data - }); - }, - _onReset: function _onReset($event) { - this.$trigger('reset', $event, {}); - this.childrenList.forEach(function (vm) { - vm._resetFormData && vm._resetFormData(); - }); - }, - _formGroupUpdateHandler: function _formGroupUpdateHandler($event) { - if ($event.type === 'add') { - this.childrenList.push($event.vm); - } else { - var index = this.childrenList.indexOf($event.vm); - this.childrenList.splice(index, 1); - } - } - } -}); -// CONCATENATED MODULE: ./src/core/view/components/form/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_formvue_type_script_lang_js_ = (formvue_type_script_lang_js_); -// EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js -var componentNormalizer = __webpack_require__(0); + if (x < this.minX) { + x = this.minX; + y = this._translateY + (this.minX - this._translateX) * y0 / x0; + } else { + if (x > this.maxX) { + x = this.maxX; + y = this._translateY + (this.maxX - this._translateX) * y0 / x0; + } + } -// CONCATENATED MODULE: ./src/core/view/components/form/index.vue + if (y < this.minY) { + y = this.minY; + x = this._translateX + (this.minY - this._translateY) * x0 / y0; + } else { + if (y > this.maxY) { + y = this.maxY; + x = this._translateX + (this.maxY - this._translateY) * x0 / y0; + } + } + this._friction.setEnd(x, y); + this._FA = g(this._friction, function () { + var t = self._friction.s(); + var x = t.x; + var y = t.y; + self._setTransform(x, y, self._scale, 'friction'); + }, function () { + self._FA.cancel(); + }); + } + } + }, + _onTrack: function _onTrack(event) { + switch (event.detail.state) { + case 'start': + this.__handleTouchStart(); -/* normalize component */ + break; -var component = Object(componentNormalizer["a" /* default */])( - components_formvue_type_script_lang_js_, - render, - staticRenderFns, - false, - null, - null, - null - -) + case 'move': + this.__handleTouchMove(event); -/* hot reload */ -if (false) { var api; } -component.options.__file = "src/core/view/components/form/index.vue" -/* harmony default export */ var components_form = __webpack_exports__["default"] = (component.exports); + break; -/***/ }), -/* 96 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + case 'end': + this.__handleTouchEnd(); -"use strict"; -__webpack_require__.r(__webpack_exports__); - -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/icon/index.vue?vue&type=template&id=6c7a7a92& -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("uni-icon", [ - _c("i", { - class: "uni-icon-" + _vm.type, - style: { "font-size": _vm._converPx(_vm.size), color: _vm.color }, - attrs: { role: "img" } - }) - ]) -} -var staticRenderFns = [] -render._withStripped = true + } + }, + _getLimitXY: function _getLimitXY(x, y) { + var outOfBounds = false; + if (x > this.maxX) { + x = this.maxX; + outOfBounds = true; + } else { + if (x < this.minX) { + x = this.minX; + outOfBounds = true; + } + } -// CONCATENATED MODULE: ./src/core/view/components/icon/index.vue?vue&type=template&id=6c7a7a92& + if (y > this.maxY) { + y = this.maxY; + outOfBounds = true; + } else { + if (y < this.minY) { + y = this.minY; + outOfBounds = true; + } + } -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/icon/index.vue?vue&type=script&lang=js& -// -// -// -// -// -// -// -// -// -// -/* harmony default export */ var iconvue_type_script_lang_js_ = ({ - name: 'Icon', - props: { - type: { - type: String, - required: true, - default: '' - }, - size: { - type: [String, Number], - default: 23 + return { + x: x, + y: y, + outOfBounds: outOfBounds + }; }, - color: { - type: String, - default: '' - } - }, - methods: { - _converPx: function _converPx(value) { - if (/\d+[ur]px$/i.test(value)) { - value.replace(/\d+[ur]px$/i, function (text) { - return "".concat(uni.upx2px(parseFloat(text)), "px"); - }); // eslint-disable-next-line no-useless-escape - } else if (/^-?[\d\.]+$/.test(value)) { - return "".concat(value, "px"); + setParent: function setParent() { + if (!this.$parent._isMounted) { + return; } - return value || ''; - } - } -}); -// CONCATENATED MODULE: ./src/core/view/components/icon/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_iconvue_type_script_lang_js_ = (iconvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/icon/index.vue?vue&type=style&index=0&lang=css& -var iconvue_type_style_index_0_lang_css_ = __webpack_require__(72); - -// EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js -var componentNormalizer = __webpack_require__(0); + if (this._FA) { + this._FA.cancel(); + } -// CONCATENATED MODULE: ./src/core/view/components/icon/index.vue + if (this._SFA) { + this._SFA.cancel(); + } + var scale = this.scale ? this.scaleValueSync : 1; + this._updateOffset(); + this._updateWH(scale); + this._updateBoundary(); + this._translateX = this.xSync + this._scaleOffset.x; + this._translateY = this.ySync + this._scaleOffset.y; -/* normalize component */ + var limitXY = this._getLimitXY(this._translateX, this._translateY); -var component = Object(componentNormalizer["a" /* default */])( - components_iconvue_type_script_lang_js_, - render, - staticRenderFns, - false, - null, - null, - null - -) + var x = limitXY.x; + var y = limitXY.y; -/* hot reload */ -if (false) { var api; } -component.options.__file = "src/core/view/components/icon/index.vue" -/* harmony default export */ var icon = __webpack_exports__["default"] = (component.exports); + this._setTransform(x, y, scale, '', true); -/***/ }), -/* 97 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + this._updateOldScale(scale); + }, + _updateOffset: function _updateOffset() { + this._offset.x = p(this.$el, this.$parent.$el); + this._offset.y = f(this.$el, this.$parent.$el); + }, + _updateWH: function _updateWH(scale) { + scale = scale || this._scale; + scale = this._adjustScale(scale); + var rect = this.$el.getBoundingClientRect(); + this.height = rect.height / this._scale; + this.width = rect.width / this._scale; + var height = this.height * scale; + var width = this.width * scale; + this._scaleOffset.x = (width - this.width) / 2; + this._scaleOffset.y = (height - this.height) / 2; + }, + _updateBoundary: function _updateBoundary() { + var x = 0 - this._offset.x + this._scaleOffset.x; + var width = this.$parent.width - this.width - this._offset.x - this._scaleOffset.x; + this.minX = Math.min(x, width); + this.maxX = Math.max(x, width); + var y = 0 - this._offset.y + this._scaleOffset.y; + var height = this.$parent.height - this.height - this._offset.y - this._scaleOffset.y; + this.minY = Math.min(y, height); + this.maxY = Math.max(y, height); + }, + _beginScale: function _beginScale() { + this._isScaling = true; + }, + _endScale: function _endScale() { + this._isScaling = false; -"use strict"; -__webpack_require__.r(__webpack_exports__); + this._updateOldScale(this._scale); + }, + _setScale: function _setScale(scale) { + if (this.scale) { + scale = this._adjustScale(scale); + scale = this._oldScale * scale; -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio-group/index.vue?vue&type=template&id=17be8d0a& -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c( - "uni-radio-group", - _vm._g({}, _vm.$listeners), - [_vm._t("default")], - 2 - ) -} -var staticRenderFns = [] -render._withStripped = true + this._beginScale(); + this._updateScale(scale); + } + }, + _updateScale: function _updateScale(scale, animat) { + var self = this; -// CONCATENATED MODULE: ./src/core/view/components/radio-group/index.vue?vue&type=template&id=17be8d0a& + if (this.scale) { + scale = this._adjustScale(scale); -// EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules -var mixins = __webpack_require__(1); + this._updateWH(scale); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio-group/index.vue?vue&type=script&lang=js& -// -// -// -// -// -// + this._updateBoundary(); -/* harmony default export */ var radio_groupvue_type_script_lang_js_ = ({ - name: 'RadioGroup', - mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */]], - props: { - name: { - type: String, - default: '' - } - }, - data: function data() { - return { - radioList: [] - }; - }, - listeners: { - '@radio-change': '_changeHandler', - '@radio-group-update': '_radioGroupUpdateHandler' - }, - mounted: function mounted() { - this._resetRadioGroupValue(this.radioList.length - 1); - }, - created: function created() { - this.$dispatch('Form', 'uni-form-group-update', { - type: 'add', - vm: this - }); - }, - beforeDestroy: function beforeDestroy() { - this.$dispatch('Form', 'uni-form-group-update', { - type: 'remove', - vm: this - }); - }, - methods: { - _changeHandler: function _changeHandler($event, vm) { - var index = this.radioList.indexOf(vm); + var limitXY = this._getLimitXY(this._translateX, this._translateY); - this._resetRadioGroupValue(index, true); + var x = limitXY.x; + var y = limitXY.y; - this.$trigger('change', $event, { - value: vm.radioValue - }); - }, - _radioGroupUpdateHandler: function _radioGroupUpdateHandler($event) { - if ($event.type === 'add') { - this.radioList.push($event.vm); - } else { - var index = this.radioList.indexOf($event.vm); - this.radioList.splice(index, 1); + if (animat) { + this._animationTo(x, y, scale, '', true, true); + } else { + _requestAnimationFrame(function () { + self._setTransform(x, y, scale, '', true, true); + }); + } } }, - _resetRadioGroupValue: function _resetRadioGroupValue(key, change) { - var _this = this; - - this.radioList.forEach(function (value, index) { - if (index === key) { - return; - } + _updateOldScale: function _updateOldScale(scale) { + this._oldScale = scale; + }, + _adjustScale: function _adjustScale(scale) { + scale = Math.max(0.5, this.scaleMinNumber, scale); + scale = Math.min(10, this.scaleMaxNumber, scale); + return scale; + }, + _animationTo: function _animationTo(x, y, scale, source, r, o) { + var self = this; - if (change) { - _this.radioList[index].radioChecked = false; - } else { - _this.radioList.forEach(function (v, i) { - if (index >= i) { - return; - } + if (this._FA) { + this._FA.cancel(); + } - if (_this.radioList[i].radioChecked) { - _this.radioList[index].radioChecked = false; - } - }); - } + if (this._SFA) { + this._SFA.cancel(); + } + + if (!this.xMove) { + x = this._translateX; + } + + if (!this.yMove) { + y = this._translateY; + } + + if (!this.scale) { + scale = this._scale; + } + + var limitXY = this._getLimitXY(x, y); + + x = limitXY.x; + y = limitXY.y; + + if (!this.animation) { + this._setTransform(x, y, scale, source, r, o); + + return; + } + + this._STD._springX._solution = null; + this._STD._springY._solution = null; + this._STD._springScale._solution = null; + this._STD._springX._endPosition = this._translateX; + this._STD._springY._endPosition = this._translateY; + this._STD._springScale._endPosition = this._scale; + + this._STD.setEnd(x, y, scale, 1); + + this._SFA = g(this._STD, function () { + var data = self._STD.x(); + + var x = data.x; + var y = data.y; + var scale = data.scale; + + self._setTransform(x, y, scale, source, r, o); + }, function () { + self._SFA.cancel(); }); }, - _getFormData: function _getFormData() { - var data = {}; + _revise: function _revise(source) { + var limitXY = this._getLimitXY(this._translateX, this._translateY); - if (this.name !== '') { - var value = ''; - this.radioList.forEach(function (vm) { - if (vm.radioChecked) { - value = vm.value; - } + var x = limitXY.x; + var y = limitXY.y; + var outOfBounds = limitXY.outOfBounds; + + if (outOfBounds) { + this._animationTo(x, y, this._scale, source); + } + + return outOfBounds; + }, + _setTransform: function _setTransform(x, y, scale) { + var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ''; + var r = arguments.length > 4 ? arguments[4] : undefined; + var o = arguments.length > 5 ? arguments[5] : undefined; + + if (!(x !== null && x.toString() !== 'NaN' && typeof x === 'number')) { + x = this._translateX || 0; + } + + if (!(y !== null && y.toString() !== 'NaN' && typeof y === 'number')) { + y = this._translateY || 0; + } + + x = Number(x.toFixed(1)); + y = Number(y.toFixed(1)); + scale = Number(scale.toFixed(1)); + + if (!(this._translateX === x && this._translateY === y)) { + if (!r) { + this.$trigger('change', {}, { + x: v(x, this._scaleOffset.x), + y: v(y, this._scaleOffset.y), + source: source + }); + } + } + + if (!this.scale) { + scale = this._scale; + } + + scale = this._adjustScale(scale); + scale = +scale.toFixed(3); + + if (o && scale !== this._scale) { + this.$trigger('scale', {}, { + x: x, + y: y, + scale: scale }); - data['value'] = value; - data['key'] = this.name; } - return data; + var transform = 'translateX(' + x + 'px) translateY(' + y + 'px) translateZ(0px) scale(' + scale + ')'; + this.$el.style.transform = transform; + this.$el.style.webkitTransform = transform; + this._translateX = x; + this._translateY = y; + this._scale = scale; } } }); -// CONCATENATED MODULE: ./src/core/view/components/radio-group/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_radio_groupvue_type_script_lang_js_ = (radio_groupvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/radio-group/index.vue?vue&type=style&index=0&lang=css& -var radio_groupvue_type_style_index_0_lang_css_ = __webpack_require__(81); +// CONCATENATED MODULE: ./src/core/view/components/movable-view/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_movable_viewvue_type_script_lang_js_ = (movable_viewvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/movable-view/index.vue?vue&type=style&index=0&lang=css& +var movable_viewvue_type_style_index_0_lang_css_ = __webpack_require__(77); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/radio-group/index.vue +// CONCATENATED MODULE: ./src/core/view/components/movable-view/index.vue @@ -16643,7 +16731,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_radio_groupvue_type_script_lang_js_, + components_movable_viewvue_type_script_lang_js_, render, staticRenderFns, false, @@ -16655,8 +16743,8 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/radio-group/index.vue" -/* harmony default export */ var radio_group = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/movable-view/index.vue" +/* harmony default export */ var movable_view = __webpack_exports__["default"] = (component.exports); /***/ }), /* 98 */ @@ -16665,28 +16753,54 @@ component.options.__file = "src/core/view/components/radio-group/index.vue" "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/progress/index.vue?vue&type=template&id=34f62046& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/slider/index.vue?vue&type=template&id=1969bd7a& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( - "uni-progress", - _vm._g({ staticClass: "uni-progress" }, _vm.$listeners), + "uni-slider", + _vm._g({ ref: "uni-slider", on: { click: _vm._onClick } }, _vm.$listeners), [ - _c("div", { staticClass: "uni-progress-bar", style: _vm.outerBarStyle }, [ - _c("div", { - staticClass: "uni-progress-inner-bar", - style: _vm.innerBarStyle - }) + _c("div", { staticClass: "uni-slider-wrapper" }, [ + _c("div", { staticClass: "uni-slider-tap-area" }, [ + _c( + "div", + { staticClass: "uni-slider-handle-wrapper", style: _vm.setBgColor }, + [ + _c("div", { + ref: "uni-slider-handle", + staticClass: "uni-slider-handle", + style: _vm.setBlockBg + }), + _c("div", { + staticClass: "uni-slider-thumb", + style: _vm.setBlockStyle + }), + _c("div", { + staticClass: "uni-slider-track", + style: _vm.setActiveColor + }) + ] + ) + ]), + _c( + "span", + { + directives: [ + { + name: "show", + rawName: "v-show", + value: _vm.showValue, + expression: "showValue" + } + ], + staticClass: "uni-slider-value" + }, + [_vm._v(_vm._s(_vm.sliderValue))] + ) ]), - _vm.showInfo - ? [ - _c("p", { staticClass: "uni-progress-info" }, [ - _vm._v(_vm._s(_vm.currentPercent) + "%") - ]) - ] - : _vm._e() + _vm._t("default") ], 2 ) @@ -16695,9 +16809,15 @@ var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/progress/index.vue?vue&type=template&id=34f62046& +// CONCATENATED MODULE: ./src/core/view/components/slider/index.vue?vue&type=template&id=1969bd7a& -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/progress/index.vue?vue&type=script&lang=js& +// EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules +var mixins = __webpack_require__(1); + +// EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js +var touchtrack = __webpack_require__(8); + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/slider/index.vue?vue&type=script&lang=js& // // // @@ -16714,124 +16834,198 @@ render._withStripped = true // // // -var VALUES = { - activeColor: '#007AFF', - backgroundColor: '#EBEBEB', - activeMode: 'backwards' -}; -/* harmony default export */ var progressvue_type_script_lang_js_ = ({ - name: 'Progress', +// +// +// +// +// +// +// +// +// +// +// +// +// + + +/* harmony default export */ var slidervue_type_script_lang_js_ = ({ + name: 'Slider', + mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */], touchtrack["a" /* default */]], props: { - percent: { - type: [Number, String], - default: 0, - validator: function validator(value) { - return !isNaN(parseFloat(value, 10)); - } + name: { + type: String, + default: '' }, - showInfo: { - type: [Boolean, String], - default: false + min: { + type: [Number, String], + default: 0 }, - strokeWidth: { + max: { type: [Number, String], - default: 6, - validator: function validator(value) { - return !isNaN(parseFloat(value, 10)); - } + default: 100 + }, + value: { + type: [Number, String], + default: 0 + }, + step: { + type: [Number, String], + default: 1 + }, + disabled: { + type: [Boolean, String], + default: false }, color: { type: String, - default: VALUES.activeColor + default: '#e9e9e9' + }, + backgroundColor: { + type: String, + default: '#e9e9e9' }, activeColor: { type: String, - default: VALUES.activeColor + default: '#007aff' }, - backgroundColor: { + selectedColor: { type: String, - default: VALUES.backgroundColor + default: '#007aff' }, - active: { + blockColor: { + type: String, + default: '#ffffff' + }, + blockSize: { + type: [Number, String], + default: 28 + }, + showValue: { type: [Boolean, String], default: false - }, - activeMode: { - type: String, - default: VALUES.activeMode } }, data: function data() { return { - currentPercent: 0, - strokeTimer: 0, - lastPercent: 0 + sliderValue: Number(this.value) }; }, computed: { - outerBarStyle: function outerBarStyle() { - return "background-color: ".concat(this.backgroundColor, "; height: ").concat(this.strokeWidth, "px;"); + setBlockStyle: function setBlockStyle() { + return { + width: this.blockSize + 'px', + height: this.blockSize + 'px', + marginLeft: -this.blockSize / 2 + 'px', + marginTop: -this.blockSize / 2 + 'px', + left: this._getValueWidth(), + backgroundColor: this.blockColor + }; }, - innerBarStyle: function innerBarStyle() { - // 兼容下不推荐的属性,activeColor 优先级高于 color。 - var backgroundColor = ''; - - if (this.color !== VALUES.activeColor && this.activeColor === VALUES.activeColor) { - backgroundColor = this.color; - } else { - backgroundColor = this.activeColor; - } - - return "width: ".concat(this.currentPercent, "%;background-color: ").concat(backgroundColor); + setBgColor: function setBgColor() { + return { + backgroundColor: this._getBgColor() + }; }, - realPercent: function realPercent() { - // 确保最终计算时使用的是 Number 类型的值,并且在有效范围内。 - var realValue = parseFloat(this.percent, 10); - realValue < 0 && (realValue = 0); - realValue > 100 && (realValue = 100); - return realValue; + setBlockBg: function setBlockBg() { + return { + left: this._getValueWidth() + }; + }, + setActiveColor: function setActiveColor() { + // 有问题,设置最大值最小值是有问题 + return { + backgroundColor: this._getActiveColor(), + width: this._getValueWidth() + }; } }, watch: { - realPercent: function realPercent(newValue, oldValue) { - this.strokeTimer && clearInterval(this.strokeTimer); - this.lastPercent = oldValue || 0; - - this._activeAnimation(); + value: function value(val) { + this.sliderValue = Number(val); } }, + mounted: function mounted() { + this.touchtrack(this.$refs['uni-slider-handle'], '_onTrack'); + }, created: function created() { - this._activeAnimation(); + this.$dispatch('Form', 'uni-form-group-update', { + type: 'add', + vm: this + }); + }, + beforeDestroy: function beforeDestroy() { + this.$dispatch('Form', 'uni-form-group-update', { + type: 'remove', + vm: this + }); }, methods: { - _activeAnimation: function _activeAnimation() { - var _this = this; + _onUserChangedValue: function _onUserChangedValue(e) { + var slider = this.$refs['uni-slider']; + var offsetWidth = slider.offsetWidth; + var boxLeft = slider.getBoundingClientRect().left; + var value = (e.x - boxLeft) * (this.max - this.min) / offsetWidth + Number(this.min); + this.sliderValue = this._filterValue(value); + }, + _filterValue: function _filterValue(e) { + return e < this.min ? this.min : e > this.max ? this.max : Math.round((e - this.min) / this.step) * this.step + Number(this.min); + }, + _getValueWidth: function _getValueWidth() { + return 100 * (this.sliderValue - this.min) / (this.max - this.min) + '%'; + }, + _getBgColor: function _getBgColor() { + return this.backgroundColor !== '#e9e9e9' ? this.backgroundColor : this.color !== '#007aff' ? this.color : '#007aff'; + }, + _getActiveColor: function _getActiveColor() { + return this.activeColor !== '#007aff' ? this.activeColor : this.selectedColor !== '#e9e9e9' ? this.selectedColor : '#e9e9e9'; + }, + _onTrack: function _onTrack(e) { + if (!this.disabled) { + return e.detail.state === 'move' ? (this._onUserChangedValue({ + x: e.detail.x0 + }), this.$trigger('changing', e, { + value: this.sliderValue + }), !1) : void (e.detail.state === 'end' && this.$trigger('change', e, { + value: this.sliderValue + })); + } + }, + _onClick: function _onClick($event) { + if (this.disabled) { + return; + } - if (this.active) { - this.currentPercent = this.activeMode === VALUES.activeMode ? 0 : this.lastPercent; - this.strokeTimer = setInterval(function () { - if (_this.currentPercent + 1 > _this.realPercent) { - _this.currentPercent = _this.realPercent; - _this.strokeTimer && clearInterval(_this.strokeTimer); - } else { - _this.currentPercent += 1; - } - }, 30); - } else { - this.currentPercent = this.realPercent; + this._onUserChangedValue($event); + + this.$trigger('change', $event, { + value: this.sliderValue + }); + }, + _resetFormData: function _resetFormData() { + this.sliderValue = this.min; + }, + _getFormData: function _getFormData() { + var data = {}; + + if (this.name !== '') { + data['value'] = this.sliderValue; + data['key'] = this.name; } + + return data; } } }); -// CONCATENATED MODULE: ./src/core/view/components/progress/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_progressvue_type_script_lang_js_ = (progressvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/progress/index.vue?vue&type=style&index=0&lang=css& -var progressvue_type_style_index_0_lang_css_ = __webpack_require__(80); +// CONCATENATED MODULE: ./src/core/view/components/slider/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_slidervue_type_script_lang_js_ = (slidervue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/slider/index.vue?vue&type=style&index=0&lang=css& +var slidervue_type_style_index_0_lang_css_ = __webpack_require__(86); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/progress/index.vue +// CONCATENATED MODULE: ./src/core/view/components/slider/index.vue @@ -16841,7 +17035,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_progressvue_type_script_lang_js_, + components_slidervue_type_script_lang_js_, render, staticRenderFns, false, @@ -16853,8 +17047,8 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/progress/index.vue" -/* harmony default export */ var progress = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/slider/index.vue" +/* harmony default export */ var slider = __webpack_exports__["default"] = (component.exports); /***/ }), /* 99 */ @@ -16863,57 +17057,26 @@ component.options.__file = "src/core/view/components/progress/index.vue" "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/view/index.vue?vue&type=template&id=6ae9b1be& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/icon/index.vue?vue&type=template&id=6c7a7a92& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _vm.hoverClass && _vm.hoverClass !== "none" - ? _c( - "uni-view", - _vm._g( - { - class: [_vm.hovering ? _vm.hoverClass : ""], - on: { - touchstart: _vm._hoverTouchStart, - touchend: _vm._hoverTouchEnd, - touchcancel: _vm._hoverTouchCancel - } - }, - _vm.$listeners - ), - [_vm._t("default")], - 2 - ) - : _c("uni-view", _vm._g({}, _vm.$listeners), [_vm._t("default")], 2) + return _c("uni-icon", [ + _c("i", { + class: "uni-icon-" + _vm.type, + style: { "font-size": _vm._converPx(_vm.size), color: _vm.color }, + attrs: { role: "img" } + }) + ]) } var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/view/index.vue?vue&type=template&id=6ae9b1be& - -// EXTERNAL MODULE: ./src/core/view/mixins/hover.js -var hover = __webpack_require__(14); +// CONCATENATED MODULE: ./src/core/view/components/icon/index.vue?vue&type=template&id=6c7a7a92& -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/view/index.vue?vue&type=script&lang=js& -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/icon/index.vue?vue&type=script&lang=js& // // // @@ -16924,23 +17087,46 @@ var hover = __webpack_require__(14); // // // - -/* harmony default export */ var viewvue_type_script_lang_js_ = ({ - name: 'View', - mixins: [hover["a" /* default */]], - listeners: { - 'label-click': 'clickHandler' - } -}); -// CONCATENATED MODULE: ./src/core/view/components/view/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_viewvue_type_script_lang_js_ = (viewvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/view/index.vue?vue&type=style&index=0&lang=css& -var viewvue_type_style_index_0_lang_css_ = __webpack_require__(91); +/* harmony default export */ var iconvue_type_script_lang_js_ = ({ + name: 'Icon', + props: { + type: { + type: String, + required: true, + default: '' + }, + size: { + type: [String, Number], + default: 23 + }, + color: { + type: String, + default: '' + } + }, + methods: { + _converPx: function _converPx(value) { + if (/\d+[ur]px$/i.test(value)) { + value.replace(/\d+[ur]px$/i, function (text) { + return "".concat(uni.upx2px(parseFloat(text)), "px"); + }); // eslint-disable-next-line no-useless-escape + } else if (/^-?[\d\.]+$/.test(value)) { + return "".concat(value, "px"); + } + + return value || ''; + } + } +}); +// CONCATENATED MODULE: ./src/core/view/components/icon/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_iconvue_type_script_lang_js_ = (iconvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/icon/index.vue?vue&type=style&index=0&lang=css& +var iconvue_type_style_index_0_lang_css_ = __webpack_require__(73); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/view/index.vue +// CONCATENATED MODULE: ./src/core/view/components/icon/index.vue @@ -16950,7 +17136,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_viewvue_type_script_lang_js_, + components_iconvue_type_script_lang_js_, render, staticRenderFns, false, @@ -16962,8 +17148,8 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/view/index.vue" -/* harmony default export */ var view = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/icon/index.vue" +/* harmony default export */ var icon = __webpack_exports__["default"] = (component.exports); /***/ }), /* 100 */ @@ -16972,41 +17158,36 @@ component.options.__file = "src/core/view/components/view/index.vue" "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio/index.vue?vue&type=template&id=4b562a50& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/image/index.vue?vue&type=template&id=c7af6f90& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( - "uni-radio", - _vm._g({ on: { click: _vm._onClick } }, _vm.$listeners), + "uni-image", + _vm._g({}, _vm.$listeners), [ - _c( - "div", - { staticClass: "uni-radio-wrapper" }, - [ - _c("div", { - staticClass: "uni-radio-input", - class: _vm.radioChecked ? "uni-radio-input-checked" : "", - style: _vm.radioChecked ? _vm.checkedStyle : "" - }), - _vm._t("default") - ], - 2 - ) - ] + _c("div", { ref: "content", style: _vm.modeStyle }), + _c("img", { attrs: { src: _vm.realImagePath } }), + _vm.mode === "widthFix" + ? _c("v-uni-resize-sensor", { + ref: "sensor", + on: { resize: _vm._resize } + }) + : _vm._e() + ], + 1 ) } var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/radio/index.vue?vue&type=template&id=4b562a50& +// CONCATENATED MODULE: ./src/core/view/components/image/index.vue?vue&type=template&id=c7af6f90& -// EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules -var mixins = __webpack_require__(1); +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/image/index.vue?vue&type=script&lang=js& +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio/index.vue?vue&type=script&lang=js& // // // @@ -17019,99 +17200,666 @@ var mixins = __webpack_require__(1); // // // -// - -/* harmony default export */ var radiovue_type_script_lang_js_ = ({ - name: 'Radio', - mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */]], +/* harmony default export */ var imagevue_type_script_lang_js_ = ({ + name: 'Image', props: { - checked: { - type: [Boolean, String], - default: false - }, - id: { + src: { type: String, default: '' }, - disabled: { - type: [Boolean, String], - default: false - }, - color: { + mode: { type: String, - default: '#007AFF' + default: 'scaleToFill' }, - value: { - type: String, - default: '' + // TODO 懒加载 + lazyLoad: { + type: [Boolean, String], + default: false } }, data: function data() { return { - radioChecked: this.checked, - radioValue: this.value + originalWidth: 0, + originalHeight: 0, + availHeight: '', + sizeFixed: false }; }, computed: { - checkedStyle: function checkedStyle() { - return "background-color: ".concat(this.color, ";border-color: ").concat(this.color, ";"); + ratio: function ratio() { + return this.originalWidth && this.originalHeight ? this.originalWidth / this.originalHeight : 0; + }, + realImagePath: function realImagePath() { + return this.src && this.$getRealPath(this.src); + }, + modeStyle: function modeStyle() { + var size = 'auto'; + var position = ''; + var repeat = 'no-repeat'; + + switch (this.mode) { + case 'aspectFit': + size = 'contain'; + position = 'center center'; + break; + + case 'aspectFill': + size = 'cover'; + position = 'center center'; + break; + + case 'widthFix': + size = '100% 100%'; + break; + + case 'top': + position = 'center top'; + break; + + case 'bottom': + position = 'center bottom'; + break; + + case 'center': + position = 'center center'; + break; + + case 'left': + position = 'left center'; + break; + + case 'right': + position = 'right center'; + break; + + case 'top left': + position = 'left top'; + break; + + case 'top right': + position = 'right top'; + break; + + case 'bottom left': + position = 'left bottom'; + break; + + case 'bottom right': + position = 'right bottom'; + break; + + default: + size = '100% 100%'; + position = '0% 0%'; + break; + } + + return "background-position:".concat(position, ";background-size:").concat(size, ";background-repeat:").concat(repeat, ";"); } }, watch: { - checked: function checked(val) { - this.radioChecked = val; + src: function src(newValue, oldValue) { + this._loadImage(); }, - value: function value(val) { - this.radioValue = val; + mode: function mode(newValue, oldValue) { + if (oldValue === 'widthFix') { + this.$el.style.height = this.availHeight; + this.sizeFixed = false; + } + + if (newValue === 'widthFix' && this.ratio) { + this._fixSize(); + } } }, - listeners: { - 'label-click': '_onClick', - '@label-click': '_onClick' - }, - created: function created() { - this.$dispatch('RadioGroup', 'uni-radio-group-update', { - type: 'add', - vm: this - }); - this.$dispatch('Form', 'uni-form-group-update', { - type: 'add', - vm: this - }); - }, - beforeDestroy: function beforeDestroy() { - this.$dispatch('RadioGroup', 'uni-radio-group-update', { - type: 'remove', - vm: this - }); - this.$dispatch('Form', 'uni-form-group-update', { - type: 'remove', - vm: this - }); + mounted: function mounted() { + this.availHeight = this.$el.style.height || ''; + + this._loadImage(); }, methods: { - _onClick: function _onClick($event) { - if (this.disabled || this.radioChecked) { - return; + _resize: function _resize() { + if (this.mode === 'widthFix' && !this.sizeFixed) { + this._fixSize(); + } + }, + _fixSize: function _fixSize() { + var elWidth = this._getWidth(); + + if (elWidth) { + var height = elWidth / this.ratio; // fix: 解决 Chrome 浏览器上某些情况下导致 1px 缝隙的问题 + + if ((typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) && navigator.vendor === 'Google Inc.' && height > 10) { + height = Math.round(height / 2) * 2; + } + + this.$el.style.height = height + 'px'; + this.sizeFixed = true; + } + }, + _loadImage: function _loadImage() { + this.$refs.content.style.backgroundImage = this.src ? "url(".concat(this.realImagePath, ")") : 'none'; + + var _self = this; + + var img = new Image(); + + img.onload = function ($event) { + _self.originalWidth = this.width; + _self.originalHeight = this.height; + + if (_self.mode === 'widthFix') { + _self._fixSize(); + } + + _self.$trigger('load', $event, { + width: this.width, + height: this.height + }); + }; + + img.onerror = function ($event) { + _self.$trigger('error', $event, { + errMsg: "GET ".concat(_self.src, " 404 (Not Found)") + }); + }; + + img.src = this.realImagePath; + }, + _getWidth: function _getWidth() { + var computedStyle = window.getComputedStyle(this.$el); + var borderWidth = (parseFloat(computedStyle.borderLeftWidth, 10) || 0) + (parseFloat(computedStyle.borderRightWidth, 10) || 0); + var paddingWidth = (parseFloat(computedStyle.paddingLeft, 10) || 0) + (parseFloat(computedStyle.paddingRight, 10) || 0); + return this.$el.offsetWidth - borderWidth - paddingWidth; + } + } +}); +// CONCATENATED MODULE: ./src/core/view/components/image/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_imagevue_type_script_lang_js_ = (imagevue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/image/index.vue?vue&type=style&index=0&lang=css& +var imagevue_type_style_index_0_lang_css_ = __webpack_require__(74); + +// EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__(0); + +// CONCATENATED MODULE: ./src/core/view/components/image/index.vue + + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + components_imagevue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var api; } +component.options.__file = "src/core/view/components/image/index.vue" +/* harmony default export */ var components_image = __webpack_exports__["default"] = (component.exports); + +/***/ }), +/* 101 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/scroll-view/index.vue?vue&type=template&id=e9d562fc& +var render = function() { + var _vm = this + var _h = _vm.$createElement + var _c = _vm._self._c || _h + return _c("uni-scroll-view", _vm._g({}, _vm.$listeners), [ + _c("div", { ref: "wrap", staticClass: "uni-scroll-view" }, [ + _c( + "div", + { + ref: "main", + staticClass: "uni-scroll-view", + style: { + "overflow-x": _vm.scrollX ? "auto" : "hidden", + "overflow-y": _vm.scrollY ? "auto" : "hidden" + } + }, + [_c("div", { ref: "content" }, [_vm._t("default")], 2)] + ) + ]) + ]) +} +var staticRenderFns = [] +render._withStripped = true + + +// CONCATENATED MODULE: ./src/core/view/components/scroll-view/index.vue?vue&type=template&id=e9d562fc& + +// EXTERNAL MODULE: ./src/core/view/mixins/scroller/index.js + 2 modules +var scroller = __webpack_require__(48); + +// EXTERNAL MODULE: ./src/shared/index.js + 4 modules +var shared = __webpack_require__(2); + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/scroll-view/index.vue?vue&type=script&lang=js& +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + +var passiveOptions = shared["f" /* supportsPassive */] ? { + passive: true +} : false; +/* harmony default export */ var scroll_viewvue_type_script_lang_js_ = ({ + name: 'ScrollView', + mixins: [scroller["a" /* default */]], + props: { + scrollX: { + type: [Boolean, String], + default: false + }, + scrollY: { + type: [Boolean, String], + default: false + }, + upperThreshold: { + type: [Number, String], + default: 50 + }, + lowerThreshold: { + type: [Number, String], + default: 50 + }, + scrollTop: { + type: [Number, String], + default: 0 + }, + scrollLeft: { + type: [Number, String], + default: 0 + }, + scrollIntoView: { + type: String, + default: '' + }, + scrollWithAnimation: { + type: [Boolean, String], + default: false + }, + enableBackToTop: { + type: [Boolean, String], + default: false + } + }, + data: function data() { + return { + lastScrollTop: this.scrollTopNumber, + lastScrollLeft: this.scrollLeftNumber, + lastScrollToUpperTime: 0, + lastScrollToLowerTime: 0 + }; + }, + computed: { + upperThresholdNumber: function upperThresholdNumber() { + var val = Number(this.upperThreshold); + return isNaN(val) ? 50 : val; + }, + lowerThresholdNumber: function lowerThresholdNumber() { + var val = Number(this.lowerThreshold); + return isNaN(val) ? 50 : val; + }, + scrollTopNumber: function scrollTopNumber() { + return Number(this.scrollTop) || 0; + }, + scrollLeftNumber: function scrollLeftNumber() { + return Number(this.scrollLeft) || 0; + } + }, + watch: { + scrollTopNumber: function scrollTopNumber(val) { + this._scrollTopChanged(val); + }, + scrollLeftNumber: function scrollLeftNumber(val) { + this._scrollLeftChanged(val); + }, + scrollIntoView: function scrollIntoView(val) { + this._scrollIntoViewChanged(val); + } + }, + mounted: function mounted() { + var self = this; + this._attached = true; + + this._scrollTopChanged(this.scrollTopNumber); + + this._scrollLeftChanged(this.scrollLeftNumber); + + this._scrollIntoViewChanged(this.scrollIntoView); + + this.__handleScroll = function (e) { + event.preventDefault(); + event.stopPropagation(); + + self._handleScroll.bind(self, event)(); + }; + + var touchStart = null; + var needStop = null; + + this.__handleTouchMove = function (event) { + var x = event.touches[0].pageX; + var y = event.touches[0].pageY; + var main = self.$refs.main; + + if (needStop === null) { + if (Math.abs(x - touchStart.x) > Math.abs(y - touchStart.y)) { + // 横向滑动 + if (self.scrollX) { + if (main.scrollLeft === 0 && x > touchStart.x) { + needStop = false; + return; + } else if (main.scrollWidth === main.offsetWidth + main.scrollLeft && x < touchStart.x) { + needStop = false; + return; + } + + needStop = true; + } else { + needStop = false; + } + } else { + // 纵向滑动 + if (self.scrollY) { + if (main.scrollTop === 0 && y > touchStart.y) { + needStop = false; + return; + } else if (main.scrollHeight === main.offsetHeight + main.scrollTop && y < touchStart.y) { + needStop = false; + return; + } + + needStop = true; + } else { + needStop = false; + } + } + } + + if (needStop) { + event.stopPropagation(); + } + }; + + this.__handleTouchStart = function (event) { + if (event.touches.length === 1) { + needStop = null; + touchStart = { + x: event.touches[0].pageX, + y: event.touches[0].pageY + }; + } + }; + + this.$refs.main.addEventListener('touchstart', this.__handleTouchStart, passiveOptions); + this.$refs.main.addEventListener('touchmove', this.__handleTouchMove, passiveOptions); + this.$refs.main.addEventListener('scroll', this.__handleScroll, shared["f" /* supportsPassive */] ? { + passive: false + } : false); + }, + activated: function activated() { + // 还原 scroll-view 滚动位置 + this.scrollY && (this.$refs.main.scrollTop = this.lastScrollTop); + this.scrollX && (this.$refs.main.scrollLeft = this.lastScrollLeft); + }, + beforeDestroy: function beforeDestroy() { + this.$refs.main.removeEventListener('touchstart', this.__handleTouchStart, passiveOptions); + this.$refs.main.removeEventListener('touchmove', this.__handleTouchMove, passiveOptions); + this.$refs.main.removeEventListener('scroll', this.__handleScroll, shared["f" /* supportsPassive */] ? { + passive: false + } : false); + }, + methods: { + scrollTo: function scrollTo(t, n) { + var i = this.$refs.main; + t < 0 ? t = 0 : n === 'x' && t > i.scrollWidth - i.offsetWidth ? t = i.scrollWidth - i.offsetWidth : n === 'y' && t > i.scrollHeight - i.offsetHeight && (t = i.scrollHeight - i.offsetHeight); + var r = 0; + var o = ''; + n === 'x' ? r = i.scrollLeft - t : n === 'y' && (r = i.scrollTop - t); + + if (r !== 0) { + this.$refs.content.style.transition = 'transform .3s ease-out'; + this.$refs.content.style.webkitTransition = '-webkit-transform .3s ease-out'; + + if (n === 'x') { + o = 'translateX(' + r + 'px) translateZ(0)'; + } else { + n === 'y' && (o = 'translateY(' + r + 'px) translateZ(0)'); + } + + this.$refs.content.removeEventListener('transitionend', this.__transitionEnd); + this.$refs.content.removeEventListener('webkitTransitionEnd', this.__transitionEnd); + this.__transitionEnd = this._transitionEnd.bind(this, t, n); + this.$refs.content.addEventListener('transitionend', this.__transitionEnd); + this.$refs.content.addEventListener('webkitTransitionEnd', this.__transitionEnd); + + if (n === 'x') { + // if (e !== 'ios') { + i.style.overflowX = 'hidden'; // } + } else if (n === 'y') { + i.style.overflowY = 'hidden'; + } + + this.$refs.content.style.transform = o; + this.$refs.content.style.webkitTransform = o; + } + }, + _handleTrack: function _handleTrack($event) { + if ($event.detail.state === 'start') { + this._x = $event.detail.x; + this._y = $event.detail.y; + this._noBubble = null; + return; + } + + if ($event.detail.state === 'end') { + this._noBubble = false; + } + + if (this._noBubble === null && this.scrollY) { + if (Math.abs(this._y - $event.detail.y) / Math.abs(this._x - $event.detail.x) > 1) { + this._noBubble = true; + } else { + this._noBubble = false; + } + } + + if (this._noBubble === null && this.scrollX) { + if (Math.abs(this._x - $event.detail.x) / Math.abs(this._y - $event.detail.y) > 1) { + this._noBubble = true; + } else { + this._noBubble = false; + } + } + + this._x = $event.detail.x; + this._y = $event.detail.y; + + if (this._noBubble) { + $event.stopPropagation(); + } + }, + _handleScroll: function _handleScroll($event) { + if (!($event.timeStamp - this._lastScrollTime < 20)) { + this._lastScrollTime = $event.timeStamp; + var target = $event.target; + this.$trigger('scroll', $event, { + scrollLeft: target.scrollLeft, + scrollTop: target.scrollTop, + scrollHeight: target.scrollHeight, + scrollWidth: target.scrollWidth, + deltaX: this.lastScrollLeft - target.scrollLeft, + deltaY: this.lastScrollTop - target.scrollTop + }); + + if (this.scrollY) { + if (target.scrollTop <= this.upperThresholdNumber && this.lastScrollTop - target.scrollTop > 0 && $event.timeStamp - this.lastScrollToUpperTime > 200) { + this.$trigger('scrolltoupper', $event, { + direction: 'top' + }); + this.lastScrollToUpperTime = $event.timeStamp; + } + + if (target.scrollTop + target.offsetHeight + this.lowerThresholdNumber >= target.scrollHeight && this.lastScrollTop - target.scrollTop < 0 && $event.timeStamp - this.lastScrollToLowerTime > 200) { + this.$trigger('scrolltolower', $event, { + direction: 'bottom' + }); + this.lastScrollToLowerTime = $event.timeStamp; + } + } + + if (this.scrollX) { + if (target.scrollLeft <= this.upperThresholdNumber && this.lastScrollLeft - target.scrollLeft > 0 && $event.timeStamp - this.lastScrollToUpperTime > 200) { + this.$trigger('scrolltoupper', $event, { + direction: 'left' + }); + this.lastScrollToUpperTime = $event.timeStamp; + } + + if (target.scrollLeft + target.offsetWidth + this.lowerThresholdNumber >= target.scrollWidth && this.lastScrollLeft - target.scrollLeft < 0 && $event.timeStamp - this.lastScrollToLowerTime > 200) { + this.$trigger('scrolltolower', $event, { + direction: 'right' + }); + this.lastScrollToLowerTime = $event.timeStamp; + } + } + + this.lastScrollTop = target.scrollTop; + this.lastScrollLeft = target.scrollLeft; + } + }, + _scrollTopChanged: function _scrollTopChanged(val) { + if (this.scrollY) { + if (this._innerSetScrollTop) { + this._innerSetScrollTop = false; + } else { + if (this.scrollWithAnimation) { + this.scrollTo(val, 'y'); + } else { + this.$refs.main.scrollTop = val; + } + } + } + }, + _scrollLeftChanged: function _scrollLeftChanged(val) { + if (this.scrollX) { + if (this._innerSetScrollLeft) { + this._innerSetScrollLeft = false; + } else { + if (this.scrollWithAnimation) { + this.scrollTo(val, 'x'); + } else { + this.$refs.main.scrollLeft = val; + } + } + } + }, + _scrollIntoViewChanged: function _scrollIntoViewChanged(val) { + if (val) { + if (!/^[_a-zA-Z][-_a-zA-Z0-9:]*$/.test(val)) { + console.group('scroll-into-view="' + val + '" 有误'); + console.error('id 属性值格式错误。如不能以数字开头。'); + console.groupEnd(); + return; + } + + var element = this.$el.querySelector('#' + val); + + if (element) { + var mainRect = this.$refs.main.getBoundingClientRect(); + var elRect = element.getBoundingClientRect(); + + if (this.scrollX) { + var left = elRect.left - mainRect.left; + var scrollLeft = this.$refs.main.scrollLeft; + var x = scrollLeft + left; + + if (this.scrollWithAnimation) { + this.scrollTo(x, 'x'); + } else { + this.$refs.main.scrollLeft = x; + } + } + + if (this.scrollY) { + var top = elRect.top - mainRect.top; + var scrollTop = this.$refs.main.scrollTop; + var y = scrollTop + top; + + if (this.scrollWithAnimation) { + this.scrollTo(y, 'y'); + } else { + this.$refs.main.scrollTop = y; + } + } + } } + }, + _transitionEnd: function _transitionEnd(val, type) { + this.$refs.content.style.transition = ''; + this.$refs.content.style.webkitTransition = ''; + this.$refs.content.style.transform = ''; + this.$refs.content.style.webkitTransform = ''; + var main = this.$refs.main; - this.radioChecked = true; - this.$dispatch('RadioGroup', 'uni-radio-change', $event, this); + if (type === 'x') { + main.style.overflowX = this.scrollX ? 'auto' : 'hidden'; + main.scrollLeft = val; + } else if (type === 'y') { + main.style.overflowY = this.scrollY ? 'auto' : 'hidden'; + main.scrollTop = val; + } + + this.$refs.content.removeEventListener('transitionend', this.__transitionEnd); + this.$refs.content.removeEventListener('webkitTransitionEnd', this.__transitionEnd); }, - _resetFormData: function _resetFormData() { - this.radioChecked = this.min; + getScrollPosition: function getScrollPosition() { + var main = this.$refs.main; + return { + scrollLeft: main.scrollLeft, + scrollTop: main.scrollTop + }; } } }); -// CONCATENATED MODULE: ./src/core/view/components/radio/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_radiovue_type_script_lang_js_ = (radiovue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/radio/index.vue?vue&type=style&index=0&lang=css& -var radiovue_type_style_index_0_lang_css_ = __webpack_require__(82); +// CONCATENATED MODULE: ./src/core/view/components/scroll-view/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_scroll_viewvue_type_script_lang_js_ = (scroll_viewvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/scroll-view/index.vue?vue&type=style&index=0&lang=css& +var scroll_viewvue_type_style_index_0_lang_css_ = __webpack_require__(85); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/radio/index.vue +// CONCATENATED MODULE: ./src/core/view/components/scroll-view/index.vue @@ -17121,7 +17869,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_radiovue_type_script_lang_js_, + components_scroll_viewvue_type_script_lang_js_, render, staticRenderFns, false, @@ -17133,38 +17881,71 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/radio/index.vue" -/* harmony default export */ var components_radio = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/scroll-view/index.vue" +/* harmony default export */ var scroll_view = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 101 */ +/* 102 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox-group/index.vue?vue&type=template&id=37cde58e& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/view/index.vue?vue&type=template&id=6ae9b1be& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _c( - "uni-checkbox-group", - _vm._g({}, _vm.$listeners), - [_vm._t("default")], - 2 - ) + return _vm.hoverClass && _vm.hoverClass !== "none" + ? _c( + "uni-view", + _vm._g( + { + class: [_vm.hovering ? _vm.hoverClass : ""], + on: { + touchstart: _vm._hoverTouchStart, + touchend: _vm._hoverTouchEnd, + touchcancel: _vm._hoverTouchCancel + } + }, + _vm.$listeners + ), + [_vm._t("default")], + 2 + ) + : _c("uni-view", _vm._g({}, _vm.$listeners), [_vm._t("default")], 2) } var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=template&id=37cde58e& +// CONCATENATED MODULE: ./src/core/view/components/view/index.vue?vue&type=template&id=6ae9b1be& -// EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules -var mixins = __webpack_require__(1); +// EXTERNAL MODULE: ./src/core/view/mixins/hover.js +var hover = __webpack_require__(14); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox-group/index.vue?vue&type=script&lang=js& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/view/index.vue?vue&type=script&lang=js& +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// // // // @@ -17172,83 +17953,22 @@ var mixins = __webpack_require__(1); // // -/* harmony default export */ var checkbox_groupvue_type_script_lang_js_ = ({ - name: 'CheckboxGroup', - mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */]], - props: { - name: { - type: String, - default: '' - } - }, - data: function data() { - return { - checkboxList: [] - }; - }, +/* harmony default export */ var viewvue_type_script_lang_js_ = ({ + name: 'View', + mixins: [hover["a" /* default */]], listeners: { - '@checkbox-change': '_changeHandler', - '@checkbox-group-update': '_checkboxGroupUpdateHandler' - }, - created: function created() { - this.$dispatch('Form', 'uni-form-group-update', { - type: 'add', - vm: this - }); - }, - beforeDestroy: function beforeDestroy() { - this.$dispatch('Form', 'uni-form-group-update', { - type: 'remove', - vm: this - }); - }, - methods: { - _changeHandler: function _changeHandler($event) { - var value = []; - this.checkboxList.forEach(function (vm) { - if (vm.checkboxChecked) { - value.push(vm.value); - } - }); - this.$trigger('change', $event, { - value: value - }); - }, - _checkboxGroupUpdateHandler: function _checkboxGroupUpdateHandler($event) { - if ($event.type === 'add') { - this.checkboxList.push($event.vm); - } else { - var index = this.checkboxList.indexOf($event.vm); - this.checkboxList.splice(index, 1); - } - }, - _getFormData: function _getFormData() { - var data = {}; - - if (this.name !== '') { - var value = []; - this.checkboxList.forEach(function (vm) { - if (vm.checkboxChecked) { - value.push(vm.value); - } - }); - data['value'] = value; - data['key'] = this.name; - } - - return data; - } + 'label-click': 'clickHandler' } }); -// CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_checkbox_groupvue_type_script_lang_js_ = (checkbox_groupvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=style&index=0&lang=css& -var checkbox_groupvue_type_style_index_0_lang_css_ = __webpack_require__(70); +// CONCATENATED MODULE: ./src/core/view/components/view/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_viewvue_type_script_lang_js_ = (viewvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/view/index.vue?vue&type=style&index=0&lang=css& +var viewvue_type_style_index_0_lang_css_ = __webpack_require__(92); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue +// CONCATENATED MODULE: ./src/core/view/components/view/index.vue @@ -17258,7 +17978,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_checkbox_groupvue_type_script_lang_js_, + components_viewvue_type_script_lang_js_, render, staticRenderFns, false, @@ -17270,11 +17990,11 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/checkbox-group/index.vue" -/* harmony default export */ var checkbox_group = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/view/index.vue" +/* harmony default export */ var view = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 102 */ +/* 103 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -17693,7 +18413,7 @@ var mixins = __webpack_require__(1); // CONCATENATED MODULE: ./src/core/view/components/textarea/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_textareavue_type_script_lang_js_ = (textareavue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/textarea/index.vue?vue&type=style&index=0&lang=css& -var textareavue_type_style_index_0_lang_css_ = __webpack_require__(90); +var textareavue_type_style_index_0_lang_css_ = __webpack_require__(91); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); @@ -17724,34 +18444,52 @@ component.options.__file = "src/core/view/components/textarea/index.vue" /* harmony default export */ var components_textarea = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox/index.vue?vue&type=template&id=a63c1348& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/switch/index.vue?vue&type=template&id=04951fe6& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( - "uni-checkbox", + "uni-switch", _vm._g({ on: { click: _vm._onClick } }, _vm.$listeners), [ - _c( - "div", - { staticClass: "uni-checkbox-wrapper" }, - [ - _c("div", { - staticClass: "uni-checkbox-input", - class: [_vm.checkboxChecked ? "uni-checkbox-input-checked" : ""], - style: { color: _vm.color } - }), - _vm._t("default") - ], - 2 - ) + _c("div", { staticClass: "uni-switch-wrapper" }, [ + _c("div", { + directives: [ + { + name: "show", + rawName: "v-show", + value: _vm.type === "switch", + expression: "type === 'switch'" + } + ], + staticClass: "uni-switch-input", + class: [_vm.switchChecked ? "uni-switch-input-checked" : ""], + style: { + backgroundColor: _vm.switchChecked ? _vm.color : "#DFDFDF", + borderColor: _vm.switchChecked ? _vm.color : "#DFDFDF" + } + }), + _c("div", { + directives: [ + { + name: "show", + rawName: "v-show", + value: _vm.type === "checkbox", + expression: "type === 'checkbox'" + } + ], + staticClass: "uni-checkbox-input", + class: [_vm.switchChecked ? "uni-checkbox-input-checked" : ""], + style: { color: _vm.color } + }) + ]) ] ) } @@ -17759,12 +18497,17 @@ var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/checkbox/index.vue?vue&type=template&id=a63c1348& +// CONCATENATED MODULE: ./src/core/view/components/switch/index.vue?vue&type=template&id=04951fe6& // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules var mixins = __webpack_require__(1); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox/index.vue?vue&type=script&lang=js& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/switch/index.vue?vue&type=script&lang=js& +// +// +// +// +// // // // @@ -17779,14 +18522,22 @@ var mixins = __webpack_require__(1); // // -/* harmony default export */ var checkboxvue_type_script_lang_js_ = ({ - name: 'Checkbox', +/* harmony default export */ var switchvue_type_script_lang_js_ = ({ + name: 'Switch', mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */]], props: { + name: { + type: String, + default: '' + }, checked: { type: [Boolean, String], default: false }, + type: { + type: String, + default: 'switch' + }, id: { type: String, default: '' @@ -17798,73 +18549,69 @@ var mixins = __webpack_require__(1); color: { type: String, default: '#007aff' - }, - value: { - type: String, - default: '' } }, data: function data() { return { - checkboxChecked: this.checked, - checkboxValue: this.value + switchChecked: this.checked }; }, watch: { checked: function checked(val) { - this.checkboxChecked = val; - }, - value: function value(val) { - this.checkboxValue = val; + this.switchChecked = val; } }, - listeners: { - 'label-click': '_onClick', - '@label-click': '_onClick' - }, created: function created() { - this.$dispatch('CheckboxGroup', 'uni-checkbox-group-update', { - type: 'add', - vm: this - }); this.$dispatch('Form', 'uni-form-group-update', { type: 'add', vm: this }); }, beforeDestroy: function beforeDestroy() { - this.$dispatch('CheckboxGroup', 'uni-checkbox-group-update', { - type: 'remove', - vm: this - }); this.$dispatch('Form', 'uni-form-group-update', { type: 'remove', vm: this }); }, + listeners: { + 'label-click': '_onClick', + '@label-click': '_onClick' + }, methods: { _onClick: function _onClick($event) { if (this.disabled) { return; } - this.checkboxChecked = !this.checkboxChecked; - this.$dispatch('CheckboxGroup', 'uni-checkbox-change', $event); + this.switchChecked = !this.switchChecked; + this.$trigger('change', $event, { + value: this.switchChecked + }); }, _resetFormData: function _resetFormData() { - this.checkboxChecked = false; + this.switchChecked = false; + }, + _getFormData: function _getFormData() { + var data = {}; + + if (this.name !== '') { + data['value'] = this.switchChecked; + data['key'] = this.name; + } + + return data; } } }); -// CONCATENATED MODULE: ./src/core/view/components/checkbox/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_checkboxvue_type_script_lang_js_ = (checkboxvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/checkbox/index.vue?vue&type=style&index=0&lang=css& -var checkboxvue_type_style_index_0_lang_css_ = __webpack_require__(71); +// CONCATENATED MODULE: ./src/core/view/components/switch/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_switchvue_type_script_lang_js_ = (switchvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/switch/index.vue?vue&type=style&index=0&lang=css& +var switchvue_type_style_index_0_lang_css_ = __webpack_require__(89); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/checkbox/index.vue +// CONCATENATED MODULE: ./src/core/view/components/switch/index.vue @@ -17874,7 +18621,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_checkboxvue_type_script_lang_js_, + components_switchvue_type_script_lang_js_, render, staticRenderFns, false, @@ -17886,11 +18633,97 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/checkbox/index.vue" -/* harmony default export */ var components_checkbox = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/switch/index.vue" +/* harmony default export */ var components_switch = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 104 */ +/* 105 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/swiper-item/index.vue?vue&type=template&id=3883b065& +var render = function() { + var _vm = this + var _h = _vm.$createElement + var _c = _vm._self._c || _h + return _c( + "uni-swiper-item", + _vm._g({}, _vm.$listeners), + [_vm._t("default")], + 2 + ) +} +var staticRenderFns = [] +render._withStripped = true + + +// CONCATENATED MODULE: ./src/core/view/components/swiper-item/index.vue?vue&type=template&id=3883b065& + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/swiper-item/index.vue?vue&type=script&lang=js& +// +// +// +// +// +/* harmony default export */ var swiper_itemvue_type_script_lang_js_ = ({ + name: 'SwiperItem', + props: { + itemId: { + type: String, + default: '' + } + }, + mounted: function mounted() { + var $el = this.$el; + $el.style.position = 'absolute'; + $el.style.width = '100%'; + $el.style.height = '100%'; + var callbacks = this.$vnode._callbacks; + + if (callbacks) { + callbacks.forEach(function (callback) { + callback(); + }); + } + } +}); +// CONCATENATED MODULE: ./src/core/view/components/swiper-item/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_swiper_itemvue_type_script_lang_js_ = (swiper_itemvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/swiper-item/index.vue?vue&type=style&index=0&lang=css& +var swiper_itemvue_type_style_index_0_lang_css_ = __webpack_require__(87); + +// EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__(0); + +// CONCATENATED MODULE: ./src/core/view/components/swiper-item/index.vue + + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + components_swiper_itemvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var api; } +component.options.__file = "src/core/view/components/swiper-item/index.vue" +/* harmony default export */ var swiper_item = __webpack_exports__["default"] = (component.exports); + +/***/ }), +/* 106 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -18115,7 +18948,7 @@ function startAnimation(context) { var requireComponents = [// baseComponents -__webpack_require__(67), __webpack_require__(92)]; +__webpack_require__(68), __webpack_require__(93)]; requireComponents.forEach(function (components, index) { components.keys().forEach(function (fileName) { // 获取组件配置 @@ -18131,76 +18964,31 @@ requireComponents.forEach(function (components, index) { }); /***/ }), -/* 105 */ +/* 107 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/switch/index.vue?vue&type=template&id=04951fe6& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/form/index.vue?vue&type=template&id=7735a91d& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _c( - "uni-switch", - _vm._g({ on: { click: _vm._onClick } }, _vm.$listeners), - [ - _c("div", { staticClass: "uni-switch-wrapper" }, [ - _c("div", { - directives: [ - { - name: "show", - rawName: "v-show", - value: _vm.type === "switch", - expression: "type === 'switch'" - } - ], - staticClass: "uni-switch-input", - class: [_vm.switchChecked ? "uni-switch-input-checked" : ""], - style: { - backgroundColor: _vm.switchChecked ? _vm.color : "#DFDFDF", - borderColor: _vm.switchChecked ? _vm.color : "#DFDFDF" - } - }), - _c("div", { - directives: [ - { - name: "show", - rawName: "v-show", - value: _vm.type === "checkbox", - expression: "type === 'checkbox'" - } - ], - staticClass: "uni-checkbox-input", - class: [_vm.switchChecked ? "uni-checkbox-input-checked" : ""], - style: { color: _vm.color } - }) - ]) - ] - ) + return _c("uni-form", _vm._g({}, _vm.$listeners), [ + _c("span", [_vm._t("default")], 2) + ]) } var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/switch/index.vue?vue&type=template&id=04951fe6& +// CONCATENATED MODULE: ./src/core/view/components/form/index.vue?vue&type=template&id=7735a91d& // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules var mixins = __webpack_require__(1); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/switch/index.vue?vue&type=script&lang=js& -// -// -// -// -// -// -// -// -// -// -// +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/form/index.vue?vue&type=script&lang=js& // // // @@ -18209,97 +18997,53 @@ var mixins = __webpack_require__(1); // // -/* harmony default export */ var switchvue_type_script_lang_js_ = ({ - name: 'Switch', - mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */]], - props: { - name: { - type: String, - default: '' - }, - checked: { - type: [Boolean, String], - default: false - }, - type: { - type: String, - default: 'switch' - }, - id: { - type: String, - default: '' - }, - disabled: { - type: [Boolean, String], - default: false - }, - color: { - type: String, - default: '#007aff' - } - }, +/* harmony default export */ var formvue_type_script_lang_js_ = ({ + name: 'Form', + mixins: [mixins["c" /* listeners */]], data: function data() { return { - switchChecked: this.checked + childrenList: [] }; }, - watch: { - checked: function checked(val) { - this.switchChecked = val; - } - }, - created: function created() { - this.$dispatch('Form', 'uni-form-group-update', { - type: 'add', - vm: this - }); - }, - beforeDestroy: function beforeDestroy() { - this.$dispatch('Form', 'uni-form-group-update', { - type: 'remove', - vm: this - }); - }, listeners: { - 'label-click': '_onClick', - '@label-click': '_onClick' + '@form-submit': '_onSubmit', + '@form-reset': '_onReset', + '@form-group-update': '_formGroupUpdateHandler' }, methods: { - _onClick: function _onClick($event) { - if (this.disabled) { - return; - } - - this.switchChecked = !this.switchChecked; - this.$trigger('change', $event, { - value: this.switchChecked + _onSubmit: function _onSubmit($event) { + var data = {}; + this.childrenList.forEach(function (vm) { + if (vm._getFormData && vm._getFormData().key) { + data[vm._getFormData().key] = vm._getFormData().value; + } + }); + this.$trigger('submit', $event, { + value: data }); }, - _resetFormData: function _resetFormData() { - this.switchChecked = false; + _onReset: function _onReset($event) { + this.$trigger('reset', $event, {}); + this.childrenList.forEach(function (vm) { + vm._resetFormData && vm._resetFormData(); + }); }, - _getFormData: function _getFormData() { - var data = {}; - - if (this.name !== '') { - data['value'] = this.switchChecked; - data['key'] = this.name; + _formGroupUpdateHandler: function _formGroupUpdateHandler($event) { + if ($event.type === 'add') { + this.childrenList.push($event.vm); + } else { + var index = this.childrenList.indexOf($event.vm); + this.childrenList.splice(index, 1); } - - return data; } } }); -// CONCATENATED MODULE: ./src/core/view/components/switch/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_switchvue_type_script_lang_js_ = (switchvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/switch/index.vue?vue&type=style&index=0&lang=css& -var switchvue_type_style_index_0_lang_css_ = __webpack_require__(88); - +// CONCATENATED MODULE: ./src/core/view/components/form/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_formvue_type_script_lang_js_ = (formvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/switch/index.vue - +// CONCATENATED MODULE: ./src/core/view/components/form/index.vue @@ -18308,7 +19052,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_switchvue_type_script_lang_js_, + components_formvue_type_script_lang_js_, render, staticRenderFns, false, @@ -18320,46 +19064,51 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/switch/index.vue" -/* harmony default export */ var components_switch = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/form/index.vue" +/* harmony default export */ var components_form = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 106 */ +/* 108 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/image/index.vue?vue&type=template&id=c7af6f90& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio/index.vue?vue&type=template&id=4b562a50& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( - "uni-image", - _vm._g({}, _vm.$listeners), + "uni-radio", + _vm._g({ on: { click: _vm._onClick } }, _vm.$listeners), [ - _c("div", { ref: "content", style: _vm.modeStyle }), - _c("img", { attrs: { src: _vm.realImagePath } }), - _vm.mode === "widthFix" - ? _c("v-uni-resize-sensor", { - ref: "sensor", - on: { resize: _vm._resize } - }) - : _vm._e() - ], - 1 + _c( + "div", + { staticClass: "uni-radio-wrapper" }, + [ + _c("div", { + staticClass: "uni-radio-input", + class: _vm.radioChecked ? "uni-radio-input-checked" : "", + style: _vm.radioChecked ? _vm.checkedStyle : "" + }), + _vm._t("default") + ], + 2 + ) + ] ) } var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/image/index.vue?vue&type=template&id=c7af6f90& +// CONCATENATED MODULE: ./src/core/view/components/radio/index.vue?vue&type=template&id=4b562a50& -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/image/index.vue?vue&type=script&lang=js& -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +// EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules +var mixins = __webpack_require__(1); +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio/index.vue?vue&type=script&lang=js& // // // @@ -18372,189 +19121,99 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat // // // -/* harmony default export */ var imagevue_type_script_lang_js_ = ({ - name: 'Image', +// + +/* harmony default export */ var radiovue_type_script_lang_js_ = ({ + name: 'Radio', + mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */]], props: { - src: { - type: String, - default: '' + checked: { + type: [Boolean, String], + default: false }, - mode: { + id: { type: String, - default: 'scaleToFill' + default: '' }, - // TODO 懒加载 - lazyLoad: { + disabled: { type: [Boolean, String], default: false + }, + color: { + type: String, + default: '#007AFF' + }, + value: { + type: String, + default: '' } }, data: function data() { return { - originalWidth: 0, - originalHeight: 0, - availHeight: '', - sizeFixed: false + radioChecked: this.checked, + radioValue: this.value }; }, computed: { - ratio: function ratio() { - return this.originalWidth && this.originalHeight ? this.originalWidth / this.originalHeight : 0; - }, - realImagePath: function realImagePath() { - return this.src && this.$getRealPath(this.src); - }, - modeStyle: function modeStyle() { - var size = 'auto'; - var position = ''; - var repeat = 'no-repeat'; - - switch (this.mode) { - case 'aspectFit': - size = 'contain'; - position = 'center center'; - break; - - case 'aspectFill': - size = 'cover'; - position = 'center center'; - break; - - case 'widthFix': - size = '100% 100%'; - break; - - case 'top': - position = 'center top'; - break; - - case 'bottom': - position = 'center bottom'; - break; - - case 'center': - position = 'center center'; - break; - - case 'left': - position = 'left center'; - break; - - case 'right': - position = 'right center'; - break; - - case 'top left': - position = 'left top'; - break; - - case 'top right': - position = 'right top'; - break; - - case 'bottom left': - position = 'left bottom'; - break; - - case 'bottom right': - position = 'right bottom'; - break; - - default: - size = '100% 100%'; - position = '0% 0%'; - break; - } - - return "background-position:".concat(position, ";background-size:").concat(size, ";background-repeat:").concat(repeat, ";"); + checkedStyle: function checkedStyle() { + return "background-color: ".concat(this.color, ";border-color: ").concat(this.color, ";"); } }, watch: { - src: function src(newValue, oldValue) { - this._loadImage(); + checked: function checked(val) { + this.radioChecked = val; }, - mode: function mode(newValue, oldValue) { - if (oldValue === 'widthFix') { - this.$el.style.height = this.availHeight; - this.sizeFixed = false; - } - - if (newValue === 'widthFix' && this.ratio) { - this._fixSize(); - } + value: function value(val) { + this.radioValue = val; } }, - mounted: function mounted() { - this.availHeight = this.$el.style.height || ''; - - this._loadImage(); + listeners: { + 'label-click': '_onClick', + '@label-click': '_onClick' + }, + created: function created() { + this.$dispatch('RadioGroup', 'uni-radio-group-update', { + type: 'add', + vm: this + }); + this.$dispatch('Form', 'uni-form-group-update', { + type: 'add', + vm: this + }); + }, + beforeDestroy: function beforeDestroy() { + this.$dispatch('RadioGroup', 'uni-radio-group-update', { + type: 'remove', + vm: this + }); + this.$dispatch('Form', 'uni-form-group-update', { + type: 'remove', + vm: this + }); }, methods: { - _resize: function _resize() { - if (this.mode === 'widthFix' && !this.sizeFixed) { - this._fixSize(); - } - }, - _fixSize: function _fixSize() { - var elWidth = this._getWidth(); - - if (elWidth) { - var height = elWidth / this.ratio; // fix: 解决 Chrome 浏览器上某些情况下导致 1px 缝隙的问题 - - if ((typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) && navigator.vendor === 'Google Inc.' && height > 10) { - height = Math.round(height / 2) * 2; - } - - this.$el.style.height = height + 'px'; - this.sizeFixed = true; + _onClick: function _onClick($event) { + if (this.disabled || this.radioChecked) { + return; } - }, - _loadImage: function _loadImage() { - this.$refs.content.style.backgroundImage = this.src ? "url(".concat(this.realImagePath, ")") : 'none'; - var _self = this; - - var img = new Image(); - - img.onload = function ($event) { - _self.originalWidth = this.width; - _self.originalHeight = this.height; - - if (_self.mode === 'widthFix') { - _self._fixSize(); - } - - _self.$trigger('load', $event, { - width: this.width, - height: this.height - }); - }; - - img.onerror = function ($event) { - _self.$trigger('error', $event, { - errMsg: "GET ".concat(_self.src, " 404 (Not Found)") - }); - }; - - img.src = this.realImagePath; + this.radioChecked = true; + this.$dispatch('RadioGroup', 'uni-radio-change', $event, this); }, - _getWidth: function _getWidth() { - var computedStyle = window.getComputedStyle(this.$el); - var borderWidth = (parseFloat(computedStyle.borderLeftWidth, 10) || 0) + (parseFloat(computedStyle.borderRightWidth, 10) || 0); - var paddingWidth = (parseFloat(computedStyle.paddingLeft, 10) || 0) + (parseFloat(computedStyle.paddingRight, 10) || 0); - return this.$el.offsetWidth - borderWidth - paddingWidth; + _resetFormData: function _resetFormData() { + this.radioChecked = this.min; } } }); -// CONCATENATED MODULE: ./src/core/view/components/image/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_imagevue_type_script_lang_js_ = (imagevue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/image/index.vue?vue&type=style&index=0&lang=css& -var imagevue_type_style_index_0_lang_css_ = __webpack_require__(73); +// CONCATENATED MODULE: ./src/core/view/components/radio/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_radiovue_type_script_lang_js_ = (radiovue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/radio/index.vue?vue&type=style&index=0&lang=css& +var radiovue_type_style_index_0_lang_css_ = __webpack_require__(83); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/image/index.vue +// CONCATENATED MODULE: ./src/core/view/components/radio/index.vue @@ -18564,7 +19223,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_imagevue_type_script_lang_js_, + components_radiovue_type_script_lang_js_, render, staticRenderFns, false, @@ -18576,232 +19235,38 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/image/index.vue" -/* harmony default export */ var components_image = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/radio/index.vue" +/* harmony default export */ var components_radio = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 107 */ +/* 109 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/input/index.vue?vue&type=template&id=c65e1032& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox-group/index.vue?vue&type=template&id=37cde58e& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _c( - "uni-input", - _vm._g( - { - on: { - change: function($event) { - $event.stopPropagation() - } - } - }, - _vm.$listeners - ), - [ - _c("div", { ref: "wrapper", staticClass: "uni-input-wrapper" }, [ - _c( - "div", - { - directives: [ - { - name: "show", - rawName: "v-show", - value: !(_vm.composing || _vm.inputValue.length), - expression: "!(composing || inputValue.length)" - } - ], - ref: "placeholder", - staticClass: "uni-input-placeholder", - class: _vm.placeholderClass, - style: _vm.placeholderStyle - }, - [_vm._v(_vm._s(_vm.placeholder))] - ), - _vm.inputType === "checkbox" - ? _c("input", { - directives: [ - { - name: "model", - rawName: "v-model", - value: _vm.inputValue, - expression: "inputValue" - } - ], - ref: "input", - staticClass: "uni-input-input", - attrs: { - disabled: _vm.disabled, - maxlength: _vm.maxlength, - step: _vm.step, - autocomplete: "off", - type: "checkbox" - }, - domProps: { - checked: Array.isArray(_vm.inputValue) - ? _vm._i(_vm.inputValue, null) > -1 - : _vm.inputValue - }, - on: { - focus: _vm._onFocus, - blur: _vm._onBlur, - input: function($event) { - $event.stopPropagation() - return _vm._onInput($event) - }, - compositionstart: _vm._onComposition, - compositionend: _vm._onComposition, - keyup: function($event) { - $event.stopPropagation() - return _vm._onKeyup($event) - }, - change: function($event) { - var $$a = _vm.inputValue, - $$el = $event.target, - $$c = $$el.checked ? true : false - if (Array.isArray($$a)) { - var $$v = null, - $$i = _vm._i($$a, $$v) - if ($$el.checked) { - $$i < 0 && (_vm.inputValue = $$a.concat([$$v])) - } else { - $$i > -1 && - (_vm.inputValue = $$a - .slice(0, $$i) - .concat($$a.slice($$i + 1))) - } - } else { - _vm.inputValue = $$c - } - } - } - }) - : _vm.inputType === "radio" - ? _c("input", { - directives: [ - { - name: "model", - rawName: "v-model", - value: _vm.inputValue, - expression: "inputValue" - } - ], - ref: "input", - staticClass: "uni-input-input", - attrs: { - disabled: _vm.disabled, - maxlength: _vm.maxlength, - step: _vm.step, - autocomplete: "off", - type: "radio" - }, - domProps: { checked: _vm._q(_vm.inputValue, null) }, - on: { - focus: _vm._onFocus, - blur: _vm._onBlur, - input: function($event) { - $event.stopPropagation() - return _vm._onInput($event) - }, - compositionstart: _vm._onComposition, - compositionend: _vm._onComposition, - keyup: function($event) { - $event.stopPropagation() - return _vm._onKeyup($event) - }, - change: function($event) { - _vm.inputValue = null - } - } - }) - : _c("input", { - directives: [ - { - name: "model", - rawName: "v-model", - value: _vm.inputValue, - expression: "inputValue" - } - ], - ref: "input", - staticClass: "uni-input-input", - attrs: { - disabled: _vm.disabled, - maxlength: _vm.maxlength, - step: _vm.step, - autocomplete: "off", - type: _vm.inputType - }, - domProps: { value: _vm.inputValue }, - on: { - focus: _vm._onFocus, - blur: _vm._onBlur, - input: [ - function($event) { - if ($event.target.composing) { - return - } - _vm.inputValue = $event.target.value - }, - function($event) { - $event.stopPropagation() - return _vm._onInput($event) - } - ], - compositionstart: _vm._onComposition, - compositionend: _vm._onComposition, - keyup: function($event) { - $event.stopPropagation() - return _vm._onKeyup($event) - } - } - }) - ]) - ] + return _c( + "uni-checkbox-group", + _vm._g({}, _vm.$listeners), + [_vm._t("default")], + 2 ) } var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/input/index.vue?vue&type=template&id=c65e1032& +// CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=template&id=37cde58e& // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules var mixins = __webpack_require__(1); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/input/index.vue?vue&type=script&lang=js& -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox-group/index.vue?vue&type=script&lang=js& // // // @@ -18809,113 +19274,163 @@ var mixins = __webpack_require__(1); // // -var INPUT_TYPES = ['text', 'number', 'idcard', 'digit', 'password']; -var NUMBER_TYPES = ['number', 'digit']; -/* harmony default export */ var inputvue_type_script_lang_js_ = ({ - name: 'Input', - mixins: [mixins["a" /* emitter */]], - model: { - prop: 'value', - event: 'update:value' - }, +/* harmony default export */ var checkbox_groupvue_type_script_lang_js_ = ({ + name: 'CheckboxGroup', + mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */]], props: { name: { type: String, default: '' - }, - value: { - type: [String, Number], - default: '' - }, - type: { - type: String, - default: 'text' - }, - password: { - type: [Boolean, String], - default: false - }, - placeholder: { - type: String, - default: '' - }, - placeholderStyle: { - type: String, - default: '' - }, - placeholderClass: { - type: String, - default: '' - }, - disabled: { - type: [Boolean, String], - default: false - }, - maxlength: { - type: [Number, String], - default: 140 - }, - focus: { - type: [Boolean, String], - default: false - }, - confirmType: { - type: String, - default: 'done' } }, data: function data() { return { - inputValue: this.value + '', - composing: false, - wrapperHeight: 0, - cachedValue: '' + checkboxList: [] }; }, - computed: { - inputType: function inputType() { - var type = ''; + listeners: { + '@checkbox-change': '_changeHandler', + '@checkbox-group-update': '_checkboxGroupUpdateHandler' + }, + created: function created() { + this.$dispatch('Form', 'uni-form-group-update', { + type: 'add', + vm: this + }); + }, + beforeDestroy: function beforeDestroy() { + this.$dispatch('Form', 'uni-form-group-update', { + type: 'remove', + vm: this + }); + }, + methods: { + _changeHandler: function _changeHandler($event) { + var value = []; + this.checkboxList.forEach(function (vm) { + if (vm.checkboxChecked) { + value.push(vm.value); + } + }); + this.$trigger('change', $event, { + value: value + }); + }, + _checkboxGroupUpdateHandler: function _checkboxGroupUpdateHandler($event) { + if ($event.type === 'add') { + this.checkboxList.push($event.vm); + } else { + var index = this.checkboxList.indexOf($event.vm); + this.checkboxList.splice(index, 1); + } + }, + _getFormData: function _getFormData() { + var data = {}; - switch (this.type) { - case 'text': - this.confirmType === 'search' && (type = 'search'); - break; + if (this.name !== '') { + var value = []; + this.checkboxList.forEach(function (vm) { + if (vm.checkboxChecked) { + value.push(vm.value); + } + }); + data['value'] = value; + data['key'] = this.name; + } - case 'idcard': - // TODO 可能要根据不同平台进行区分处理 - type = 'text'; - break; + return data; + } + } +}); +// CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_checkbox_groupvue_type_script_lang_js_ = (checkbox_groupvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/checkbox-group/index.vue?vue&type=style&index=0&lang=css& +var checkbox_groupvue_type_style_index_0_lang_css_ = __webpack_require__(71); - case 'digit': - type = 'number'; - break; +// EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__(0); - default: - type = ~INPUT_TYPES.indexOf(this.type) ? this.type : 'text'; - break; - } +// CONCATENATED MODULE: ./src/core/view/components/checkbox-group/index.vue - return this.password ? 'password' : type; - }, - step: function step() { - // 处理部分设备中无法输入小数点的问题 - return ~NUMBER_TYPES.indexOf(this.type) ? '0.000000000000000001' : ''; + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + components_checkbox_groupvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var api; } +component.options.__file = "src/core/view/components/checkbox-group/index.vue" +/* harmony default export */ var checkbox_group = __webpack_exports__["default"] = (component.exports); + +/***/ }), +/* 110 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio-group/index.vue?vue&type=template&id=17be8d0a& +var render = function() { + var _vm = this + var _h = _vm.$createElement + var _c = _vm._self._c || _h + return _c( + "uni-radio-group", + _vm._g({}, _vm.$listeners), + [_vm._t("default")], + 2 + ) +} +var staticRenderFns = [] +render._withStripped = true + + +// CONCATENATED MODULE: ./src/core/view/components/radio-group/index.vue?vue&type=template&id=17be8d0a& + +// EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules +var mixins = __webpack_require__(1); + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/radio-group/index.vue?vue&type=script&lang=js& +// +// +// +// +// +// + +/* harmony default export */ var radio_groupvue_type_script_lang_js_ = ({ + name: 'RadioGroup', + mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */]], + props: { + name: { + type: String, + default: '' } }, - watch: { - focus: function focus(value) { - value && this._focusInput(); - }, - value: function value(_value) { - this.inputValue = _value + ''; - }, - inputValue: function inputValue(value) { - this.$emit('update:value', value); - }, - maxlength: function maxlength(value) { - var realValue = this.inputValue.slice(0, parseInt(value, 10)); - realValue !== this.inputValue && (this.inputValue = realValue); - } + data: function data() { + return { + radioList: [] + }; + }, + listeners: { + '@radio-change': '_changeHandler', + '@radio-group-update': '_radioGroupUpdateHandler' + }, + mounted: function mounted() { + this._resetRadioGroupValue(this.radioList.length - 1); }, created: function created() { this.$dispatch('Form', 'uni-form-group-update', { @@ -18923,34 +19438,6 @@ var NUMBER_TYPES = ['number', 'digit']; vm: this }); }, - mounted: function mounted() { - if (this.confirmType === 'search') { - var formElem = document.createElement('form'); - formElem.action = ''; - - formElem.onsubmit = function () { - return false; - }; - - formElem.className = 'uni-input-form'; - formElem.appendChild(this.$refs.input); - this.$refs.wrapper.appendChild(formElem); - } - - var $vm = this; - - while ($vm) { - var scopeId = $vm.$options._scopeId; - - if (scopeId) { - this.$refs.placeholder.setAttribute(scopeId, ''); - } - - $vm = $vm.$parent; - } - - this.focus && this._focusInput(); - }, beforeDestroy: function beforeDestroy() { this.$dispatch('Form', 'uni-form-group-update', { type: 'remove', @@ -18958,97 +19445,73 @@ var NUMBER_TYPES = ['number', 'digit']; }); }, methods: { - _onKeyup: function _onKeyup($event) { - if ($event.keyCode === 13) { - this.$trigger('confirm', $event, { - value: $event.target.value - }); - } - }, - _onInput: function _onInput($event) { - if (this.composing) { - return; - } // 处理部分输入法可以输入其它字符的情况 + _changeHandler: function _changeHandler($event, vm) { + var index = this.radioList.indexOf(vm); + this._resetRadioGroupValue(index, true); - if (~NUMBER_TYPES.indexOf(this.type)) { - if (this.$refs.input.validity && !this.$refs.input.validity.valid) { - $event.target.value = this.cachedValue; - this.inputValue = $event.target.value; // 输入非法字符不触发 input 事件 + this.$trigger('change', $event, { + value: vm.radioValue + }); + }, + _radioGroupUpdateHandler: function _radioGroupUpdateHandler($event) { + if ($event.type === 'add') { + this.radioList.push($event.vm); + } else { + var index = this.radioList.indexOf($event.vm); + this.radioList.splice(index, 1); + } + }, + _resetRadioGroupValue: function _resetRadioGroupValue(key, change) { + var _this = this; + this.radioList.forEach(function (value, index) { + if (index === key) { return; - } else { - this.cachedValue = this.inputValue; } - } // type="number" 不支持 maxlength 属性,因此需要主动限制长度。 - - - if (this.inputType === 'number') { - var maxlength = parseInt(this.maxlength, 10); - if (maxlength > 0 && $event.target.value.length > maxlength) { - $event.target.value = $event.target.value.slice(0, maxlength); - this.inputValue = $event.target.value; // 字符长度超出范围不触发 input 事件 + if (change) { + _this.radioList[index].radioChecked = false; + } else { + _this.radioList.forEach(function (v, i) { + if (index >= i) { + return; + } - return; + if (_this.radioList[i].radioChecked) { + _this.radioList[index].radioChecked = false; + } + }); } - } - - this.$trigger('input', $event, { - value: this.inputValue - }); - }, - _onFocus: function _onFocus($event) { - this.$trigger('focus', $event, { - value: $event.target.value - }); - }, - _onBlur: function _onBlur($event) { - this.$trigger('blur', $event, { - value: $event.target.value }); }, - _focusInput: function _focusInput() { - var _this = this; - - setTimeout(function () { - _this.$refs.input.focus(); - }, 350); - }, - _blurInput: function _blurInput() { - var _this2 = this; + _getFormData: function _getFormData() { + var data = {}; - setTimeout(function () { - _this2.$refs.input.blur(); - }, 350); - }, - _onComposition: function _onComposition($event) { - if ($event.type === 'compositionstart') { - this.composing = true; - } else { - this.composing = false; + if (this.name !== '') { + var value = ''; + this.radioList.forEach(function (vm) { + if (vm.radioChecked) { + value = vm.value; + } + }); + data['value'] = value; + data['key'] = this.name; } - }, - _resetFormData: function _resetFormData() { - this.inputValue = ''; - }, - _getFormData: function _getFormData() { - return this.name ? { - value: this.inputValue, - key: this.name - } : {}; + + return data; } } }); -// CONCATENATED MODULE: ./src/core/view/components/input/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/input/index.vue?vue&type=style&index=0&lang=css& -var inputvue_type_style_index_0_lang_css_ = __webpack_require__(74); +// CONCATENATED MODULE: ./src/core/view/components/radio-group/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_radio_groupvue_type_script_lang_js_ = (radio_groupvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/radio-group/index.vue?vue&type=style&index=0&lang=css& +var radio_groupvue_type_style_index_0_lang_css_ = __webpack_require__(82); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/input/index.vue +// CONCATENATED MODULE: ./src/core/view/components/radio-group/index.vue @@ -19058,7 +19521,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_inputvue_type_script_lang_js_, + components_radio_groupvue_type_script_lang_js_, render, staticRenderFns, false, @@ -19070,25 +19533,39 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/input/index.vue" -/* harmony default export */ var input = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/radio-group/index.vue" +/* harmony default export */ var radio_group = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 108 */ +/* 111 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/swiper-item/index.vue?vue&type=template&id=3883b065& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/progress/index.vue?vue&type=template&id=34f62046& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( - "uni-swiper-item", - _vm._g({}, _vm.$listeners), - [_vm._t("default")], + "uni-progress", + _vm._g({ staticClass: "uni-progress" }, _vm.$listeners), + [ + _c("div", { staticClass: "uni-progress-bar", style: _vm.outerBarStyle }, [ + _c("div", { + staticClass: "uni-progress-inner-bar", + style: _vm.innerBarStyle + }) + ]), + _vm.showInfo + ? [ + _c("p", { staticClass: "uni-progress-info" }, [ + _vm._v(_vm._s(_vm.currentPercent) + "%") + ]) + ] + : _vm._e() + ], 2 ) } @@ -19096,45 +19573,143 @@ var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/swiper-item/index.vue?vue&type=template&id=3883b065& +// CONCATENATED MODULE: ./src/core/view/components/progress/index.vue?vue&type=template&id=34f62046& + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/progress/index.vue?vue&type=script&lang=js& +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +var VALUES = { + activeColor: '#007AFF', + backgroundColor: '#EBEBEB', + activeMode: 'backwards' +}; +/* harmony default export */ var progressvue_type_script_lang_js_ = ({ + name: 'Progress', + props: { + percent: { + type: [Number, String], + default: 0, + validator: function validator(value) { + return !isNaN(parseFloat(value, 10)); + } + }, + showInfo: { + type: [Boolean, String], + default: false + }, + strokeWidth: { + type: [Number, String], + default: 6, + validator: function validator(value) { + return !isNaN(parseFloat(value, 10)); + } + }, + color: { + type: String, + default: VALUES.activeColor + }, + activeColor: { + type: String, + default: VALUES.activeColor + }, + backgroundColor: { + type: String, + default: VALUES.backgroundColor + }, + active: { + type: [Boolean, String], + default: false + }, + activeMode: { + type: String, + default: VALUES.activeMode + } + }, + data: function data() { + return { + currentPercent: 0, + strokeTimer: 0, + lastPercent: 0 + }; + }, + computed: { + outerBarStyle: function outerBarStyle() { + return "background-color: ".concat(this.backgroundColor, "; height: ").concat(this.strokeWidth, "px;"); + }, + innerBarStyle: function innerBarStyle() { + // 兼容下不推荐的属性,activeColor 优先级高于 color。 + var backgroundColor = ''; + + if (this.color !== VALUES.activeColor && this.activeColor === VALUES.activeColor) { + backgroundColor = this.color; + } else { + backgroundColor = this.activeColor; + } + + return "width: ".concat(this.currentPercent, "%;background-color: ").concat(backgroundColor); + }, + realPercent: function realPercent() { + // 确保最终计算时使用的是 Number 类型的值,并且在有效范围内。 + var realValue = parseFloat(this.percent, 10); + realValue < 0 && (realValue = 0); + realValue > 100 && (realValue = 100); + return realValue; + } + }, + watch: { + realPercent: function realPercent(newValue, oldValue) { + this.strokeTimer && clearInterval(this.strokeTimer); + this.lastPercent = oldValue || 0; -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/swiper-item/index.vue?vue&type=script&lang=js& -// -// -// -// -// -/* harmony default export */ var swiper_itemvue_type_script_lang_js_ = ({ - name: 'SwiperItem', - props: { - itemId: { - type: String, - default: '' + this._activeAnimation(); } }, - mounted: function mounted() { - var $el = this.$el; - $el.style.position = 'absolute'; - $el.style.width = '100%'; - $el.style.height = '100%'; - var callbacks = this.$vnode._callbacks; + created: function created() { + this._activeAnimation(); + }, + methods: { + _activeAnimation: function _activeAnimation() { + var _this = this; - if (callbacks) { - callbacks.forEach(function (callback) { - callback(); - }); + if (this.active) { + this.currentPercent = this.activeMode === VALUES.activeMode ? 0 : this.lastPercent; + this.strokeTimer = setInterval(function () { + if (_this.currentPercent + 1 > _this.realPercent) { + _this.currentPercent = _this.realPercent; + _this.strokeTimer && clearInterval(_this.strokeTimer); + } else { + _this.currentPercent += 1; + } + }, 30); + } else { + this.currentPercent = this.realPercent; + } } } }); -// CONCATENATED MODULE: ./src/core/view/components/swiper-item/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_swiper_itemvue_type_script_lang_js_ = (swiper_itemvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/swiper-item/index.vue?vue&type=style&index=0&lang=css& -var swiper_itemvue_type_style_index_0_lang_css_ = __webpack_require__(86); +// CONCATENATED MODULE: ./src/core/view/components/progress/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_progressvue_type_script_lang_js_ = (progressvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/progress/index.vue?vue&type=style&index=0&lang=css& +var progressvue_type_style_index_0_lang_css_ = __webpack_require__(81); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/swiper-item/index.vue +// CONCATENATED MODULE: ./src/core/view/components/progress/index.vue @@ -19144,7 +19719,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_swiper_itemvue_type_script_lang_js_, + components_progressvue_type_script_lang_js_, render, staticRenderFns, false, @@ -19156,61 +19731,51 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/swiper-item/index.vue" -/* harmony default export */ var swiper_item = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/progress/index.vue" +/* harmony default export */ var progress = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 109 */ +/* 112 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/navigator/index.vue?vue&type=template&id=c893a598& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox/index.vue?vue&type=template&id=a63c1348& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _vm.hoverClass && _vm.hoverClass !== "none" - ? _c( - "uni-navigator", - _vm._g( - { - class: [_vm.hovering ? _vm.hoverClass : ""], - on: { - touchstart: _vm._hoverTouchStart, - touchend: _vm._hoverTouchEnd, - touchcancel: _vm._hoverTouchCancel, - click: _vm._onClick - } - }, - _vm.$listeners - ), - [_vm._t("default")], - 2 - ) - : _c( - "uni-navigator", - _vm._g({ on: { click: _vm._onClick } }, _vm.$listeners), - [_vm._t("default")], + return _c( + "uni-checkbox", + _vm._g({ on: { click: _vm._onClick } }, _vm.$listeners), + [ + _c( + "div", + { staticClass: "uni-checkbox-wrapper" }, + [ + _c("div", { + staticClass: "uni-checkbox-input", + class: [_vm.checkboxChecked ? "uni-checkbox-input-checked" : ""], + style: { color: _vm.color } + }), + _vm._t("default") + ], 2 ) + ] + ) } var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue?vue&type=template&id=c893a598& +// CONCATENATED MODULE: ./src/core/view/components/checkbox/index.vue?vue&type=template&id=a63c1348& // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules var mixins = __webpack_require__(1); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/navigator/index.vue?vue&type=script&lang=js& -// -// -// -// -// +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/checkbox/index.vue?vue&type=script&lang=js& // // // @@ -19225,92 +19790,92 @@ var mixins = __webpack_require__(1); // // -var OPEN_TYPES = ['navigate', 'redirect', 'switchTab', 'reLaunch', 'navigateBack']; -/* harmony default export */ var navigatorvue_type_script_lang_js_ = ({ - name: 'Navigator', - mixins: [mixins["b" /* hover */]], +/* harmony default export */ var checkboxvue_type_script_lang_js_ = ({ + name: 'Checkbox', + mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */]], props: { - hoverClass: { - type: String, - default: 'navigator-hover' + checked: { + type: [Boolean, String], + default: false }, - url: { + id: { type: String, default: '' }, - openType: { - type: String, - default: 'navigate', - validator: function validator(value) { - return ~OPEN_TYPES.indexOf(value); - } + disabled: { + type: [Boolean, String], + default: false }, - delta: { - type: Number, - default: 1 + color: { + type: String, + default: '#007aff' }, - hoverStartTime: { - type: Number, - default: 20 + value: { + type: String, + default: '' + } + }, + data: function data() { + return { + checkboxChecked: this.checked, + checkboxValue: this.value + }; + }, + watch: { + checked: function checked(val) { + this.checkboxChecked = val; }, - hoverStayTime: { - type: Number, - default: 600 + value: function value(val) { + this.checkboxValue = val; } }, + listeners: { + 'label-click': '_onClick', + '@label-click': '_onClick' + }, + created: function created() { + this.$dispatch('CheckboxGroup', 'uni-checkbox-group-update', { + type: 'add', + vm: this + }); + this.$dispatch('Form', 'uni-form-group-update', { + type: 'add', + vm: this + }); + }, + beforeDestroy: function beforeDestroy() { + this.$dispatch('CheckboxGroup', 'uni-checkbox-group-update', { + type: 'remove', + vm: this + }); + this.$dispatch('Form', 'uni-form-group-update', { + type: 'remove', + vm: this + }); + }, methods: { _onClick: function _onClick($event) { - if (this.openType !== 'navigateBack' && !this.url) { - console.error(" should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab"); + if (this.disabled) { return; } - switch (this.openType) { - case 'navigate': - uni.navigateTo({ - url: this.url - }); - break; - - case 'redirect': - uni.redirectTo({ - url: this.url - }); - break; - - case 'switchTab': - uni.switchTab({ - url: this.url - }); - break; - - case 'reLaunch': - uni.reLaunch({ - url: this.url - }); - break; - - case 'navigateBack': - uni.navigateBack({ - delta: this.delta - }); - break; - - default: - break; - } + this.checkboxChecked = !this.checkboxChecked; + this.$dispatch('CheckboxGroup', 'uni-checkbox-change', $event); + }, + _resetFormData: function _resetFormData() { + this.checkboxChecked = false; } } }); -// CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_navigatorvue_type_script_lang_js_ = (navigatorvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/navigator/index.vue?vue&type=style&index=0&lang=css& -var navigatorvue_type_style_index_0_lang_css_ = __webpack_require__(77); +// CONCATENATED MODULE: ./src/core/view/components/checkbox/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_checkboxvue_type_script_lang_js_ = (checkboxvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/checkbox/index.vue?vue&type=style&index=0&lang=css& +var checkboxvue_type_style_index_0_lang_css_ = __webpack_require__(72); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue +// CONCATENATED MODULE: ./src/core/view/components/checkbox/index.vue @@ -19320,7 +19885,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_navigatorvue_type_script_lang_js_, + components_checkboxvue_type_script_lang_js_, render, staticRenderFns, false, @@ -19332,92 +19897,56 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/navigator/index.vue" -/* harmony default export */ var components_navigator = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/checkbox/index.vue" +/* harmony default export */ var components_checkbox = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 110 */ +/* 113 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/slider/index.vue?vue&type=template&id=1969bd7a& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/navigator/index.vue?vue&type=template&id=c893a598& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _c( - "uni-slider", - _vm._g({ ref: "uni-slider", on: { click: _vm._onClick } }, _vm.$listeners), - [ - _c("div", { staticClass: "uni-slider-wrapper" }, [ - _c("div", { staticClass: "uni-slider-tap-area" }, [ - _c( - "div", - { staticClass: "uni-slider-handle-wrapper", style: _vm.setBgColor }, - [ - _c("div", { - ref: "uni-slider-handle", - staticClass: "uni-slider-handle", - style: _vm.setBlockBg - }), - _c("div", { - staticClass: "uni-slider-thumb", - style: _vm.setBlockStyle - }), - _c("div", { - staticClass: "uni-slider-track", - style: _vm.setActiveColor - }) - ] - ) - ]), - _c( - "span", + return _vm.hoverClass && _vm.hoverClass !== "none" + ? _c( + "uni-navigator", + _vm._g( { - directives: [ - { - name: "show", - rawName: "v-show", - value: _vm.showValue, - expression: "showValue" - } - ], - staticClass: "uni-slider-value" + class: [_vm.hovering ? _vm.hoverClass : ""], + on: { + touchstart: _vm._hoverTouchStart, + touchend: _vm._hoverTouchEnd, + touchcancel: _vm._hoverTouchCancel, + click: _vm._onClick + } }, - [_vm._v(_vm._s(_vm.sliderValue))] - ) - ]), - _vm._t("default") - ], - 2 - ) + _vm.$listeners + ), + [_vm._t("default")], + 2 + ) + : _c( + "uni-navigator", + _vm._g({ on: { click: _vm._onClick } }, _vm.$listeners), + [_vm._t("default")], + 2 + ) } var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/slider/index.vue?vue&type=template&id=1969bd7a& +// CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue?vue&type=template&id=c893a598& // EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules var mixins = __webpack_require__(1); -// EXTERNAL MODULE: ./src/core/view/mixins/touchtrack.js -var touchtrack = __webpack_require__(8); - -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/slider/index.vue?vue&type=script&lang=js& -// -// -// -// -// -// -// -// -// -// -// +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/navigator/index.vue?vue&type=script&lang=js& // // // @@ -19437,184 +19966,92 @@ var touchtrack = __webpack_require__(8); // // - -/* harmony default export */ var slidervue_type_script_lang_js_ = ({ - name: 'Slider', - mixins: [mixins["a" /* emitter */], mixins["c" /* listeners */], touchtrack["a" /* default */]], +var OPEN_TYPES = ['navigate', 'redirect', 'switchTab', 'reLaunch', 'navigateBack']; +/* harmony default export */ var navigatorvue_type_script_lang_js_ = ({ + name: 'Navigator', + mixins: [mixins["b" /* hover */]], props: { - name: { - type: String, - default: '' - }, - min: { - type: [Number, String], - default: 0 - }, - max: { - type: [Number, String], - default: 100 - }, - value: { - type: [Number, String], - default: 0 - }, - step: { - type: [Number, String], - default: 1 - }, - disabled: { - type: [Boolean, String], - default: false - }, - color: { - type: String, - default: '#e9e9e9' - }, - backgroundColor: { - type: String, - default: '#e9e9e9' - }, - activeColor: { + hoverClass: { type: String, - default: '#007aff' + default: 'navigator-hover' }, - selectedColor: { + url: { type: String, - default: '#007aff' + default: '' }, - blockColor: { + openType: { type: String, - default: '#ffffff' - }, - blockSize: { - type: [Number, String], - default: 28 - }, - showValue: { - type: [Boolean, String], - default: false - } - }, - data: function data() { - return { - sliderValue: Number(this.value) - }; - }, - computed: { - setBlockStyle: function setBlockStyle() { - return { - width: this.blockSize + 'px', - height: this.blockSize + 'px', - marginLeft: -this.blockSize / 2 + 'px', - marginTop: -this.blockSize / 2 + 'px', - left: this._getValueWidth(), - backgroundColor: this.blockColor - }; - }, - setBgColor: function setBgColor() { - return { - backgroundColor: this._getBgColor() - }; - }, - setBlockBg: function setBlockBg() { - return { - left: this._getValueWidth() - }; - }, - setActiveColor: function setActiveColor() { - // 有问题,设置最大值最小值是有问题 - return { - backgroundColor: this._getActiveColor(), - width: this._getValueWidth() - }; - } - }, - watch: { - value: function value(val) { - this.sliderValue = Number(val); - } - }, - mounted: function mounted() { - this.touchtrack(this.$refs['uni-slider-handle'], '_onTrack'); - }, - created: function created() { - this.$dispatch('Form', 'uni-form-group-update', { - type: 'add', - vm: this - }); - }, - beforeDestroy: function beforeDestroy() { - this.$dispatch('Form', 'uni-form-group-update', { - type: 'remove', - vm: this - }); - }, - methods: { - _onUserChangedValue: function _onUserChangedValue(e) { - var slider = this.$refs['uni-slider']; - var offsetWidth = slider.offsetWidth; - var boxLeft = slider.getBoundingClientRect().left; - var value = (e.x - boxLeft) * (this.max - this.min) / offsetWidth + Number(this.min); - this.sliderValue = this._filterValue(value); - }, - _filterValue: function _filterValue(e) { - return e < this.min ? this.min : e > this.max ? this.max : Math.round((e - this.min) / this.step) * this.step + Number(this.min); - }, - _getValueWidth: function _getValueWidth() { - return 100 * (this.sliderValue - this.min) / (this.max - this.min) + '%'; - }, - _getBgColor: function _getBgColor() { - return this.backgroundColor !== '#e9e9e9' ? this.backgroundColor : this.color !== '#007aff' ? this.color : '#007aff'; + default: 'navigate', + validator: function validator(value) { + return ~OPEN_TYPES.indexOf(value); + } }, - _getActiveColor: function _getActiveColor() { - return this.activeColor !== '#007aff' ? this.activeColor : this.selectedColor !== '#e9e9e9' ? this.selectedColor : '#e9e9e9'; + delta: { + type: Number, + default: 1 }, - _onTrack: function _onTrack(e) { - if (!this.disabled) { - return e.detail.state === 'move' ? (this._onUserChangedValue({ - x: e.detail.x0 - }), this.$trigger('changing', e, { - value: this.sliderValue - }), !1) : void (e.detail.state === 'end' && this.$trigger('change', e, { - value: this.sliderValue - })); - } + hoverStartTime: { + type: Number, + default: 20 }, + hoverStayTime: { + type: Number, + default: 600 + } + }, + methods: { _onClick: function _onClick($event) { - if (this.disabled) { + if (this.openType !== 'navigateBack' && !this.url) { + console.error(" should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab"); return; } - this._onUserChangedValue($event); + switch (this.openType) { + case 'navigate': + uni.navigateTo({ + url: this.url + }); + break; - this.$trigger('change', $event, { - value: this.sliderValue - }); - }, - _resetFormData: function _resetFormData() { - this.sliderValue = this.min; - }, - _getFormData: function _getFormData() { - var data = {}; + case 'redirect': + uni.redirectTo({ + url: this.url + }); + break; - if (this.name !== '') { - data['value'] = this.sliderValue; - data['key'] = this.name; - } + case 'switchTab': + uni.switchTab({ + url: this.url + }); + break; - return data; + case 'reLaunch': + uni.reLaunch({ + url: this.url + }); + break; + + case 'navigateBack': + uni.navigateBack({ + delta: this.delta + }); + break; + + default: + break; + } } } }); -// CONCATENATED MODULE: ./src/core/view/components/slider/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_slidervue_type_script_lang_js_ = (slidervue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/slider/index.vue?vue&type=style&index=0&lang=css& -var slidervue_type_style_index_0_lang_css_ = __webpack_require__(85); +// CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_navigatorvue_type_script_lang_js_ = (navigatorvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/navigator/index.vue?vue&type=style&index=0&lang=css& +var navigatorvue_type_style_index_0_lang_css_ = __webpack_require__(78); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/slider/index.vue +// CONCATENATED MODULE: ./src/core/view/components/navigator/index.vue @@ -19624,7 +20061,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_slidervue_type_script_lang_js_, + components_navigatorvue_type_script_lang_js_, render, staticRenderFns, false, @@ -19636,51 +20073,222 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/slider/index.vue" -/* harmony default export */ var slider = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/navigator/index.vue" +/* harmony default export */ var components_navigator = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 111 */ +/* 114 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/scroll-view/index.vue?vue&type=template&id=e9d562fc& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/input/index.vue?vue&type=template&id=c65e1032& var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _c("uni-scroll-view", _vm._g({}, _vm.$listeners), [ - _c("div", { ref: "wrap", staticClass: "uni-scroll-view" }, [ - _c( - "div", - { - ref: "main", - staticClass: "uni-scroll-view", - style: { - "overflow-x": _vm.scrollX ? "auto" : "hidden", - "overflow-y": _vm.scrollY ? "auto" : "hidden" + return _c( + "uni-input", + _vm._g( + { + on: { + change: function($event) { + $event.stopPropagation() } - }, - [_c("div", { ref: "content" }, [_vm._t("default")], 2)] - ) - ]) - ]) + } + }, + _vm.$listeners + ), + [ + _c("div", { ref: "wrapper", staticClass: "uni-input-wrapper" }, [ + _c( + "div", + { + directives: [ + { + name: "show", + rawName: "v-show", + value: !(_vm.composing || _vm.inputValue.length), + expression: "!(composing || inputValue.length)" + } + ], + ref: "placeholder", + staticClass: "uni-input-placeholder", + class: _vm.placeholderClass, + style: _vm.placeholderStyle + }, + [_vm._v(_vm._s(_vm.placeholder))] + ), + _vm.inputType === "checkbox" + ? _c("input", { + directives: [ + { + name: "model", + rawName: "v-model", + value: _vm.inputValue, + expression: "inputValue" + } + ], + ref: "input", + staticClass: "uni-input-input", + attrs: { + disabled: _vm.disabled, + maxlength: _vm.maxlength, + step: _vm.step, + autocomplete: "off", + type: "checkbox" + }, + domProps: { + checked: Array.isArray(_vm.inputValue) + ? _vm._i(_vm.inputValue, null) > -1 + : _vm.inputValue + }, + on: { + focus: _vm._onFocus, + blur: _vm._onBlur, + input: function($event) { + $event.stopPropagation() + return _vm._onInput($event) + }, + compositionstart: _vm._onComposition, + compositionend: _vm._onComposition, + keyup: function($event) { + $event.stopPropagation() + return _vm._onKeyup($event) + }, + change: function($event) { + var $$a = _vm.inputValue, + $$el = $event.target, + $$c = $$el.checked ? true : false + if (Array.isArray($$a)) { + var $$v = null, + $$i = _vm._i($$a, $$v) + if ($$el.checked) { + $$i < 0 && (_vm.inputValue = $$a.concat([$$v])) + } else { + $$i > -1 && + (_vm.inputValue = $$a + .slice(0, $$i) + .concat($$a.slice($$i + 1))) + } + } else { + _vm.inputValue = $$c + } + } + } + }) + : _vm.inputType === "radio" + ? _c("input", { + directives: [ + { + name: "model", + rawName: "v-model", + value: _vm.inputValue, + expression: "inputValue" + } + ], + ref: "input", + staticClass: "uni-input-input", + attrs: { + disabled: _vm.disabled, + maxlength: _vm.maxlength, + step: _vm.step, + autocomplete: "off", + type: "radio" + }, + domProps: { checked: _vm._q(_vm.inputValue, null) }, + on: { + focus: _vm._onFocus, + blur: _vm._onBlur, + input: function($event) { + $event.stopPropagation() + return _vm._onInput($event) + }, + compositionstart: _vm._onComposition, + compositionend: _vm._onComposition, + keyup: function($event) { + $event.stopPropagation() + return _vm._onKeyup($event) + }, + change: function($event) { + _vm.inputValue = null + } + } + }) + : _c("input", { + directives: [ + { + name: "model", + rawName: "v-model", + value: _vm.inputValue, + expression: "inputValue" + } + ], + ref: "input", + staticClass: "uni-input-input", + attrs: { + disabled: _vm.disabled, + maxlength: _vm.maxlength, + step: _vm.step, + autocomplete: "off", + type: _vm.inputType + }, + domProps: { value: _vm.inputValue }, + on: { + focus: _vm._onFocus, + blur: _vm._onBlur, + input: [ + function($event) { + if ($event.target.composing) { + return + } + _vm.inputValue = $event.target.value + }, + function($event) { + $event.stopPropagation() + return _vm._onInput($event) + } + ], + compositionstart: _vm._onComposition, + compositionend: _vm._onComposition, + keyup: function($event) { + $event.stopPropagation() + return _vm._onKeyup($event) + } + } + }) + ]) + ] + ) } var staticRenderFns = [] render._withStripped = true -// CONCATENATED MODULE: ./src/core/view/components/scroll-view/index.vue?vue&type=template&id=e9d562fc& - -// EXTERNAL MODULE: ./src/core/view/mixins/scroller/index.js + 2 modules -var scroller = __webpack_require__(47); +// CONCATENATED MODULE: ./src/core/view/components/input/index.vue?vue&type=template&id=c65e1032& -// EXTERNAL MODULE: ./src/shared/index.js + 4 modules -var shared = __webpack_require__(2); +// EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules +var mixins = __webpack_require__(1); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/scroll-view/index.vue?vue&type=script&lang=js& +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/input/index.vue?vue&type=script&lang=js& +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// // // // @@ -19698,458 +20306,247 @@ var shared = __webpack_require__(2); // // - -var passiveOptions = shared["f" /* supportsPassive */] ? { - passive: true -} : false; -/* harmony default export */ var scroll_viewvue_type_script_lang_js_ = ({ - name: 'ScrollView', - mixins: [scroller["a" /* default */]], +var INPUT_TYPES = ['text', 'number', 'idcard', 'digit', 'password']; +var NUMBER_TYPES = ['number', 'digit']; +/* harmony default export */ var inputvue_type_script_lang_js_ = ({ + name: 'Input', + mixins: [mixins["a" /* emitter */]], + model: { + prop: 'value', + event: 'update:value' + }, props: { - scrollX: { - type: [Boolean, String], - default: false - }, - scrollY: { - type: [Boolean, String], - default: false + name: { + type: String, + default: '' }, - upperThreshold: { - type: [Number, String], - default: 50 + value: { + type: [String, Number], + default: '' }, - lowerThreshold: { - type: [Number, String], - default: 50 + type: { + type: String, + default: 'text' }, - scrollTop: { - type: [Number, String], - default: 0 + password: { + type: [Boolean, String], + default: false }, - scrollLeft: { - type: [Number, String], - default: 0 + placeholder: { + type: String, + default: '' }, - scrollIntoView: { + placeholderStyle: { type: String, default: '' }, - scrollWithAnimation: { - type: [Boolean, String], - default: false + placeholderClass: { + type: String, + default: '' }, - enableBackToTop: { + disabled: { type: [Boolean, String], default: false - } - }, - data: function data() { - return { - lastScrollTop: this.scrollTopNumber, - lastScrollLeft: this.scrollLeftNumber, - lastScrollToUpperTime: 0, - lastScrollToLowerTime: 0 - }; - }, - computed: { - upperThresholdNumber: function upperThresholdNumber() { - var val = Number(this.upperThreshold); - return isNaN(val) ? 50 : val; - }, - lowerThresholdNumber: function lowerThresholdNumber() { - var val = Number(this.lowerThreshold); - return isNaN(val) ? 50 : val; - }, - scrollTopNumber: function scrollTopNumber() { - return Number(this.scrollTop) || 0; }, - scrollLeftNumber: function scrollLeftNumber() { - return Number(this.scrollLeft) || 0; - } - }, - watch: { - scrollTopNumber: function scrollTopNumber(val) { - this._scrollTopChanged(val); - }, - scrollLeftNumber: function scrollLeftNumber(val) { - this._scrollLeftChanged(val); - }, - scrollIntoView: function scrollIntoView(val) { - this._scrollIntoViewChanged(val); - } - }, - mounted: function mounted() { - var self = this; - this._attached = true; - - this._scrollTopChanged(this.scrollTopNumber); - - this._scrollLeftChanged(this.scrollLeftNumber); - - this._scrollIntoViewChanged(this.scrollIntoView); - - this.__handleScroll = function (e) { - event.preventDefault(); - event.stopPropagation(); - - self._handleScroll.bind(self, event)(); - }; - - var touchStart = null; - var needStop = null; - - this.__handleTouchMove = function (event) { - var x = event.touches[0].pageX; - var y = event.touches[0].pageY; - var main = self.$refs.main; - - if (needStop === null) { - if (Math.abs(x - touchStart.x) > Math.abs(y - touchStart.y)) { - // 横向滑动 - if (self.scrollX) { - if (main.scrollLeft === 0 && x > touchStart.x) { - needStop = false; - return; - } else if (main.scrollWidth === main.offsetWidth + main.scrollLeft && x < touchStart.x) { - needStop = false; - return; - } - - needStop = true; - } else { - needStop = false; - } - } else { - // 纵向滑动 - if (self.scrollY) { - if (main.scrollTop === 0 && y > touchStart.y) { - needStop = false; - return; - } else if (main.scrollHeight === main.offsetHeight + main.scrollTop && y < touchStart.y) { - needStop = false; - return; - } - - needStop = true; - } else { - needStop = false; - } - } - } - - if (needStop) { - event.stopPropagation(); - } - }; - - this.__handleTouchStart = function (event) { - if (event.touches.length === 1) { - needStop = null; - touchStart = { - x: event.touches[0].pageX, - y: event.touches[0].pageY - }; - } - }; - - this.$refs.main.addEventListener('touchstart', this.__handleTouchStart, passiveOptions); - this.$refs.main.addEventListener('touchmove', this.__handleTouchMove, passiveOptions); - this.$refs.main.addEventListener('scroll', this.__handleScroll, shared["f" /* supportsPassive */] ? { - passive: false - } : false); - }, - activated: function activated() { - // 还原 scroll-view 滚动位置 - this.scrollY && (this.$refs.main.scrollTop = this.lastScrollTop); - this.scrollX && (this.$refs.main.scrollLeft = this.lastScrollLeft); - }, - beforeDestroy: function beforeDestroy() { - this.$refs.main.removeEventListener('touchstart', this.__handleTouchStart, passiveOptions); - this.$refs.main.removeEventListener('touchmove', this.__handleTouchMove, passiveOptions); - this.$refs.main.removeEventListener('scroll', this.__handleScroll, shared["f" /* supportsPassive */] ? { - passive: false - } : false); - }, - methods: { - scrollTo: function scrollTo(t, n) { - var i = this.$refs.main; - t < 0 ? t = 0 : n === 'x' && t > i.scrollWidth - i.offsetWidth ? t = i.scrollWidth - i.offsetWidth : n === 'y' && t > i.scrollHeight - i.offsetHeight && (t = i.scrollHeight - i.offsetHeight); - var r = 0; - var o = ''; - n === 'x' ? r = i.scrollLeft - t : n === 'y' && (r = i.scrollTop - t); - - if (r !== 0) { - this.$refs.content.style.transition = 'transform .3s ease-out'; - this.$refs.content.style.webkitTransition = '-webkit-transform .3s ease-out'; - - if (n === 'x') { - o = 'translateX(' + r + 'px) translateZ(0)'; - } else { - n === 'y' && (o = 'translateY(' + r + 'px) translateZ(0)'); - } - - this.$refs.content.removeEventListener('transitionend', this.__transitionEnd); - this.$refs.content.removeEventListener('webkitTransitionEnd', this.__transitionEnd); - this.__transitionEnd = this._transitionEnd.bind(this, t, n); - this.$refs.content.addEventListener('transitionend', this.__transitionEnd); - this.$refs.content.addEventListener('webkitTransitionEnd', this.__transitionEnd); - - if (n === 'x') { - // if (e !== 'ios') { - i.style.overflowX = 'hidden'; // } - } else if (n === 'y') { - i.style.overflowY = 'hidden'; - } - - this.$refs.content.style.transform = o; - this.$refs.content.style.webkitTransform = o; - } + maxlength: { + type: [Number, String], + default: 140 }, - _handleTrack: function _handleTrack($event) { - if ($event.detail.state === 'start') { - this._x = $event.detail.x; - this._y = $event.detail.y; - this._noBubble = null; - return; - } - - if ($event.detail.state === 'end') { - this._noBubble = false; - } - - if (this._noBubble === null && this.scrollY) { - if (Math.abs(this._y - $event.detail.y) / Math.abs(this._x - $event.detail.x) > 1) { - this._noBubble = true; - } else { - this._noBubble = false; - } - } - - if (this._noBubble === null && this.scrollX) { - if (Math.abs(this._x - $event.detail.x) / Math.abs(this._y - $event.detail.y) > 1) { - this._noBubble = true; - } else { - this._noBubble = false; - } - } - - this._x = $event.detail.x; - this._y = $event.detail.y; - - if (this._noBubble) { - $event.stopPropagation(); - } + focus: { + type: [Boolean, String], + default: false }, - _handleScroll: function _handleScroll($event) { - if (!($event.timeStamp - this._lastScrollTime < 20)) { - this._lastScrollTime = $event.timeStamp; - var target = $event.target; - this.$trigger('scroll', $event, { - scrollLeft: target.scrollLeft, - scrollTop: target.scrollTop, - scrollHeight: target.scrollHeight, - scrollWidth: target.scrollWidth, - deltaX: this.lastScrollLeft - target.scrollLeft, - deltaY: this.lastScrollTop - target.scrollTop - }); - - if (this.scrollY) { - if (target.scrollTop <= this.upperThresholdNumber && this.lastScrollTop - target.scrollTop > 0 && $event.timeStamp - this.lastScrollToUpperTime > 200) { - this.$trigger('scrolltoupper', $event, { - direction: 'top' - }); - this.lastScrollToUpperTime = $event.timeStamp; - } + confirmType: { + type: String, + default: 'done' + } + }, + data: function data() { + return { + inputValue: this.value + '', + composing: false, + wrapperHeight: 0, + cachedValue: '' + }; + }, + computed: { + inputType: function inputType() { + var type = ''; - if (target.scrollTop + target.offsetHeight + this.lowerThresholdNumber >= target.scrollHeight && this.lastScrollTop - target.scrollTop < 0 && $event.timeStamp - this.lastScrollToLowerTime > 200) { - this.$trigger('scrolltolower', $event, { - direction: 'bottom' - }); - this.lastScrollToLowerTime = $event.timeStamp; - } - } + switch (this.type) { + case 'text': + this.confirmType === 'search' && (type = 'search'); + break; - if (this.scrollX) { - if (target.scrollLeft <= this.upperThresholdNumber && this.lastScrollLeft - target.scrollLeft > 0 && $event.timeStamp - this.lastScrollToUpperTime > 200) { - this.$trigger('scrolltoupper', $event, { - direction: 'left' - }); - this.lastScrollToUpperTime = $event.timeStamp; - } + case 'idcard': + // TODO 可能要根据不同平台进行区分处理 + type = 'text'; + break; - if (target.scrollLeft + target.offsetWidth + this.lowerThresholdNumber >= target.scrollWidth && this.lastScrollLeft - target.scrollLeft < 0 && $event.timeStamp - this.lastScrollToLowerTime > 200) { - this.$trigger('scrolltolower', $event, { - direction: 'right' - }); - this.lastScrollToLowerTime = $event.timeStamp; - } - } + case 'digit': + type = 'number'; + break; - this.lastScrollTop = target.scrollTop; - this.lastScrollLeft = target.scrollLeft; + default: + type = ~INPUT_TYPES.indexOf(this.type) ? this.type : 'text'; + break; } + + return this.password ? 'password' : type; }, - _scrollTopChanged: function _scrollTopChanged(val) { - if (this.scrollY) { - if (this._innerSetScrollTop) { - this._innerSetScrollTop = false; - } else { - if (this.scrollWithAnimation) { - this.scrollTo(val, 'y'); - } else { - this.$refs.main.scrollTop = val; - } - } - } + step: function step() { + // 处理部分设备中无法输入小数点的问题 + return ~NUMBER_TYPES.indexOf(this.type) ? '0.000000000000000001' : ''; + } + }, + watch: { + focus: function focus(value) { + value && this._focusInput(); }, - _scrollLeftChanged: function _scrollLeftChanged(val) { - if (this.scrollX) { - if (this._innerSetScrollLeft) { - this._innerSetScrollLeft = false; - } else { - if (this.scrollWithAnimation) { - this.scrollTo(val, 'x'); - } else { - this.$refs.main.scrollLeft = val; - } - } - } + value: function value(_value) { + this.inputValue = _value + ''; }, - _scrollIntoViewChanged: function _scrollIntoViewChanged(val) { - if (val) { - if (!/^[_a-zA-Z][-_a-zA-Z0-9:]*$/.test(val)) { - console.group('scroll-into-view="' + val + '" 有误'); - console.error('id 属性值格式错误。如不能以数字开头。'); - console.groupEnd(); - return; - } - - var element = this.$el.querySelector('#' + val); - - if (element) { - var mainRect = this.$refs.main.getBoundingClientRect(); - var elRect = element.getBoundingClientRect(); - - if (this.scrollX) { - var left = elRect.left - mainRect.left; - var scrollLeft = this.$refs.main.scrollLeft; - var x = scrollLeft + left; - - if (this.scrollWithAnimation) { - this.scrollTo(x, 'x'); - } else { - this.$refs.main.scrollLeft = x; - } - } - - if (this.scrollY) { - var top = elRect.top - mainRect.top; - var scrollTop = this.$refs.main.scrollTop; - var y = scrollTop + top; - - if (this.scrollWithAnimation) { - this.scrollTo(y, 'y'); - } else { - this.$refs.main.scrollTop = y; - } - } - } - } + inputValue: function inputValue(value) { + this.$emit('update:value', value); }, - _transitionEnd: function _transitionEnd(val, type) { - this.$refs.content.style.transition = ''; - this.$refs.content.style.webkitTransition = ''; - this.$refs.content.style.transform = ''; - this.$refs.content.style.webkitTransform = ''; - var main = this.$refs.main; - - if (type === 'x') { - main.style.overflowX = this.scrollX ? 'auto' : 'hidden'; - main.scrollLeft = val; - } else if (type === 'y') { - main.style.overflowY = this.scrollY ? 'auto' : 'hidden'; - main.scrollTop = val; - } + maxlength: function maxlength(value) { + var realValue = this.inputValue.slice(0, parseInt(value, 10)); + realValue !== this.inputValue && (this.inputValue = realValue); + } + }, + created: function created() { + this.$dispatch('Form', 'uni-form-group-update', { + type: 'add', + vm: this + }); + }, + mounted: function mounted() { + if (this.confirmType === 'search') { + var formElem = document.createElement('form'); + formElem.action = ''; - this.$refs.content.removeEventListener('transitionend', this.__transitionEnd); - this.$refs.content.removeEventListener('webkitTransitionEnd', this.__transitionEnd); - }, - getScrollPosition: function getScrollPosition() { - var main = this.$refs.main; - return { - scrollLeft: main.scrollLeft, - scrollTop: main.scrollTop + formElem.onsubmit = function () { + return false; }; - } - } -}); -// CONCATENATED MODULE: ./src/core/view/components/scroll-view/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_scroll_viewvue_type_script_lang_js_ = (scroll_viewvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/scroll-view/index.vue?vue&type=style&index=0&lang=css& -var scroll_viewvue_type_style_index_0_lang_css_ = __webpack_require__(84); -// EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js -var componentNormalizer = __webpack_require__(0); + formElem.className = 'uni-input-form'; + formElem.appendChild(this.$refs.input); + this.$refs.wrapper.appendChild(formElem); + } -// CONCATENATED MODULE: ./src/core/view/components/scroll-view/index.vue + var $vm = this; + while ($vm) { + var scopeId = $vm.$options._scopeId; + if (scopeId) { + this.$refs.placeholder.setAttribute(scopeId, ''); + } + $vm = $vm.$parent; + } + this.focus && this._focusInput(); + }, + beforeDestroy: function beforeDestroy() { + this.$dispatch('Form', 'uni-form-group-update', { + type: 'remove', + vm: this + }); + }, + methods: { + _onKeyup: function _onKeyup($event) { + if ($event.keyCode === 13) { + this.$trigger('confirm', $event, { + value: $event.target.value + }); + } + }, + _onInput: function _onInput($event) { + if (this.composing) { + return; + } // 处理部分输入法可以输入其它字符的情况 -/* normalize component */ + if (~NUMBER_TYPES.indexOf(this.type)) { + if (this.$refs.input.validity && !this.$refs.input.validity.valid) { + $event.target.value = this.cachedValue; + this.inputValue = $event.target.value; // 输入非法字符不触发 input 事件 -var component = Object(componentNormalizer["a" /* default */])( - components_scroll_viewvue_type_script_lang_js_, - render, - staticRenderFns, - false, - null, - null, - null - -) + return; + } else { + this.cachedValue = this.inputValue; + } + } // type="number" 不支持 maxlength 属性,因此需要主动限制长度。 -/* hot reload */ -if (false) { var api; } -component.options.__file = "src/core/view/components/scroll-view/index.vue" -/* harmony default export */ var scroll_view = __webpack_exports__["default"] = (component.exports); -/***/ }), -/* 112 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (this.inputType === 'number') { + var maxlength = parseInt(this.maxlength, 10); -"use strict"; -__webpack_require__.r(__webpack_exports__); + if (maxlength > 0 && $event.target.value.length > maxlength) { + $event.target.value = $event.target.value.slice(0, maxlength); + this.inputValue = $event.target.value; // 字符长度超出范围不触发 input 事件 -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/label/index.vue?vue&type=template&id=04b5b291& -var render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c( - "uni-label", - _vm._g({ on: { click: _vm._onClick } }, _vm.$listeners), - [_vm._t("default")], - 2 - ) -} -var staticRenderFns = [] -render._withStripped = true + return; + } + } + this.$trigger('input', $event, { + value: this.inputValue + }); + }, + _onFocus: function _onFocus($event) { + this.$trigger('focus', $event, { + value: $event.target.value + }); + }, + _onBlur: function _onBlur($event) { + this.$trigger('blur', $event, { + value: $event.target.value + }); + }, + _focusInput: function _focusInput() { + var _this = this; -// CONCATENATED MODULE: ./src/core/view/components/label/index.vue?vue&type=template&id=04b5b291& + setTimeout(function () { + _this.$refs.input.focus(); + }, 350); + }, + _blurInput: function _blurInput() { + var _this2 = this; -// EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/label/index.vue?vue&type=script&lang=js& -var labelvue_type_script_lang_js_ = __webpack_require__(23); + setTimeout(function () { + _this2.$refs.input.blur(); + }, 350); + }, + _onComposition: function _onComposition($event) { + if ($event.type === 'compositionstart') { + this.composing = true; + } else { + this.composing = false; + } + }, + _resetFormData: function _resetFormData() { + this.inputValue = ''; + }, + _getFormData: function _getFormData() { + return this.name ? { + value: this.inputValue, + key: this.name + } : {}; + } + } +}); +// CONCATENATED MODULE: ./src/core/view/components/input/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/input/index.vue?vue&type=style&index=0&lang=css& +var inputvue_type_style_index_0_lang_css_ = __webpack_require__(75); -// CONCATENATED MODULE: ./src/core/view/components/label/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_labelvue_type_script_lang_js_ = (labelvue_type_script_lang_js_["a" /* default */]); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/label/index.vue +// CONCATENATED MODULE: ./src/core/view/components/input/index.vue + @@ -20158,7 +20555,7 @@ var componentNormalizer = __webpack_require__(0); /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_labelvue_type_script_lang_js_, + components_inputvue_type_script_lang_js_, render, staticRenderFns, false, @@ -20170,11 +20567,11 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/label/index.vue" -/* harmony default export */ var label = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/input/index.vue" +/* harmony default export */ var input = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 113 */ +/* 115 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -20230,7 +20627,7 @@ var canvasvue_type_script_lang_js_ = __webpack_require__(16); // CONCATENATED MODULE: ./src/core/view/components/canvas/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_canvasvue_type_script_lang_js_ = (canvasvue_type_script_lang_js_["a" /* default */]); // EXTERNAL MODULE: ./src/core/view/components/canvas/index.vue?vue&type=style&index=0&lang=css& -var canvasvue_type_style_index_0_lang_css_ = __webpack_require__(69); +var canvasvue_type_style_index_0_lang_css_ = __webpack_require__(70); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); @@ -20261,7 +20658,64 @@ component.options.__file = "src/core/view/components/canvas/index.vue" /* harmony default export */ var canvas = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 114 */ +/* 116 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/label/index.vue?vue&type=template&id=04b5b291& +var render = function() { + var _vm = this + var _h = _vm.$createElement + var _c = _vm._self._c || _h + return _c( + "uni-label", + _vm._g({ on: { click: _vm._onClick } }, _vm.$listeners), + [_vm._t("default")], + 2 + ) +} +var staticRenderFns = [] +render._withStripped = true + + +// CONCATENATED MODULE: ./src/core/view/components/label/index.vue?vue&type=template&id=04b5b291& + +// EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/label/index.vue?vue&type=script&lang=js& +var labelvue_type_script_lang_js_ = __webpack_require__(23); + +// CONCATENATED MODULE: ./src/core/view/components/label/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_labelvue_type_script_lang_js_ = (labelvue_type_script_lang_js_["a" /* default */]); +// EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__(0); + +// CONCATENATED MODULE: ./src/core/view/components/label/index.vue + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + components_labelvue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var api; } +component.options.__file = "src/core/view/components/label/index.vue" +/* harmony default export */ var label = __webpack_exports__["default"] = (component.exports); + +/***/ }), +/* 117 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -20999,7 +21453,7 @@ var touchtrack = __webpack_require__(8); // CONCATENATED MODULE: ./src/core/view/components/swiper/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_swipervue_type_script_lang_js_ = (swipervue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/swiper/index.vue?vue&type=style&index=0&lang=css& -var swipervue_type_style_index_0_lang_css_ = __webpack_require__(87); +var swipervue_type_style_index_0_lang_css_ = __webpack_require__(88); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); @@ -21011,220 +21465,171 @@ var render, staticRenderFns -/* normalize component */ - -var component = Object(componentNormalizer["a" /* default */])( - components_swipervue_type_script_lang_js_, - render, - staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var api; } -component.options.__file = "src/core/view/components/swiper/index.vue" -/* harmony default export */ var swiper = __webpack_exports__["default"] = (component.exports); - -/***/ }), -/* 115 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); - -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/movable-area/index.vue?vue&type=script&lang=js& -function calc(e) { - return Math.sqrt(e.x * e.x + e.y * e.y); -} - -/* harmony default export */ var movable_areavue_type_script_lang_js_ = ({ - name: 'MovableArea', - props: { - scaleArea: { - type: Boolean, - default: false - } - }, - data: function data() { - return { - width: 0, - height: 0, - items: [] - }; - }, - created: function created() { - this.gapV = { - x: null, - y: null - }; - this.pinchStartLen = null; - }, - mounted: function mounted() { - this._resize(); - }, - methods: { - _resize: function _resize() { - this._getWH(); - - this.items.forEach(function (item, index) { - item.componentInstance.setParent(); - }); - }, - _find: function _find(target) { - var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.items; - var root = this.$el; - - function get(node) { - for (var i = 0; i < items.length; i++) { - var item = items[i]; - - if (node === item.componentInstance.$el) { - return item; - } - } - - if (node === root || node === document.body || node === document) { - return null; - } - - return get(node.parentNode); - } - - return get(target); - }, - _touchstart: function _touchstart(t) { - var i = t.touches; +/* normalize component */ - if (i) { - if (i.length > 1) { - var r = { - x: i[1].pageX - i[0].pageX, - y: i[1].pageY - i[0].pageY - }; - this.pinchStartLen = calc(r); - this.gapV = r; +var component = Object(componentNormalizer["a" /* default */])( + components_swipervue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) - if (!this.scaleArea) { - var touch0 = this._find(i[0].target); +/* hot reload */ +if (false) { var api; } +component.options.__file = "src/core/view/components/swiper/index.vue" +/* harmony default export */ var swiper = __webpack_exports__["default"] = (component.exports); - var touch1 = this._find(i[1].target); +/***/ }), +/* 118 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - this._scaleMovableView = touch0 && touch0 === touch1 ? touch0 : null; - } - } - } - }, - _touchmove: function _touchmove(t) { - var n = t.touches; +"use strict"; +__webpack_require__.r(__webpack_exports__); - if (n) { - if (n.length > 1) { - t.preventDefault(); - var i = { - x: n[1].pageX - n[0].pageX, - y: n[1].pageY - n[0].pageY - }; +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/picker-view/index.vue?vue&type=script&lang=js& +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - if (this.gapV.x !== null && this.pinchStartLen > 0) { - var r = calc(i) / this.pinchStartLen; +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - this._updateScale(r); - } +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - this.gapV = i; - } +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } + +/* harmony default export */ var picker_viewvue_type_script_lang_js_ = ({ + name: 'PickerView', + props: { + value: { + type: Array, + default: function _default() { + return []; + }, + validator: function validator(val) { + return Array.isArray(val) && val.filter(function (val) { + return typeof val === 'number'; + }).length === val.length; } }, - _touchend: function _touchend(e) { - var t = e.touches; - - if (!(t && t.length)) { - if (e.changedTouches) { - this.gapV.x = 0; - this.gapV.y = 0; - this.pinchStartLen = null; + indicatorStyle: { + type: String, + default: '' + }, + indicatorClass: { + type: String, + default: '' + }, + maskStyle: { + type: String, + default: '' + }, + maskClass: { + type: String, + default: '' + } + }, + data: function data() { + return { + valueSync: _toConsumableArray(this.value), + height: 34, + items: [], + changeSource: '' + }; + }, + watch: { + value: function value(val) { + var _this = this; - if (this.scaleArea) { - this.items.forEach(function (item) { - item.componentInstance._endScale(); - }); - } else { - if (this._scaleMovableView) { - this._scaleMovableView.componentInstance._endScale(); - } - } + this.valueSync.length = val.length; + val.forEach(function (val, index) { + if (val !== _this.valueSync[index]) { + _this.$set(_this.valueSync, index, val); } - } + }); }, - _updateScale: function _updateScale(e) { - if (e && e !== 1) { - if (this.scaleArea) { - this.items.forEach(function (item) { - item.componentInstance._setScale(e); - }); + valueSync: { + deep: true, + handler: function handler(val, oldVal) { + if (this.changeSource === '') { + this._valueChanged(val); } else { - if (this._scaleMovableView) { - this._scaleMovableView.componentInstance._setScale(e); - } + this.changeSource = ''; // 避免外部直接对此值进行修改 + + var value = val.map(function (val) { + return val; + }); + this.$emit('update:value', value); + this.$trigger('change', {}, { + value: value + }); } } + } + }, + methods: { + getItemIndex: function getItemIndex(vnode) { + return this.items.indexOf(vnode); + }, + getItemValue: function getItemValue(vm) { + return this.valueSync[this.getItemIndex(vm.$vnode)] || 0; + }, + setItemValue: function setItemValue(vm, val) { + var index = this.getItemIndex(vm.$vnode); + var oldVal = this.valueSync[index]; + + if (oldVal !== val) { + this.changeSource = 'touch'; + this.$set(this.valueSync, index, val); + } }, - _getWH: function _getWH() { - var style = window.getComputedStyle(this.$el); - var rect = this.$el.getBoundingClientRect(); - this.width = rect.width - ['Left', 'Right'].reduce(function (all, item) { - return all + parseFloat(style['border' + item + 'Width']) + parseFloat(style['padding' + item]); - }, 0); - this.height = rect.height - ['Top', 'Bottom'].reduce(function (all, item) { - return all + parseFloat(style['border' + item + 'Width']) + parseFloat(style['padding' + item]); - }, 0); + _valueChanged: function _valueChanged(val) { + this.items.forEach(function (item, index) { + item.componentInstance.setCurrent(val[index] || 0); + }); + }, + _resize: function _resize(_ref) { + var height = _ref.height; + this.height = height; } }, render: function render(createElement) { - var _this = this; - var items = []; if (this.$slots.default) { this.$slots.default.forEach(function (vnode) { - if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-movable-view') { + if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-picker-view-column') { items.push(vnode); } }); } this.items = items; - var $listeners = Object.assign({}, this.$listeners); - var events = ['touchstart', 'touchmove', 'touchend']; - events.forEach(function (event) { - var existing = $listeners[event]; - - var ours = _this["_".concat(event)]; - - $listeners[event] = existing ? [].concat(existing, ours) : ours; - }); - return createElement('uni-movable-area', { - on: $listeners + return createElement('uni-picker-view', { + on: this.$listeners }, [createElement('v-uni-resize-sensor', { + attrs: { + initial: true + }, on: { resize: this._resize } - })].concat(items)); + }), createElement('div', { + ref: 'wrapper', + 'class': 'uni-picker-view-wrapper' + }, items)]); } }); -// CONCATENATED MODULE: ./src/core/view/components/movable-area/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_movable_areavue_type_script_lang_js_ = (movable_areavue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/movable-area/index.vue?vue&type=style&index=0&lang=css& -var movable_areavue_type_style_index_0_lang_css_ = __webpack_require__(75); +// CONCATENATED MODULE: ./src/core/view/components/picker-view/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_picker_viewvue_type_script_lang_js_ = (picker_viewvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/picker-view/index.vue?vue&type=style&index=0&lang=css& +var picker_viewvue_type_style_index_0_lang_css_ = __webpack_require__(80); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/movable-area/index.vue +// CONCATENATED MODULE: ./src/core/view/components/picker-view/index.vue var render, staticRenderFns @@ -21234,7 +21639,7 @@ var render, staticRenderFns /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_movable_areavue_type_script_lang_js_, + components_picker_viewvue_type_script_lang_js_, render, staticRenderFns, false, @@ -21246,146 +21651,92 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/movable-area/index.vue" -/* harmony default export */ var movable_area = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/picker-view/index.vue" +/* harmony default export */ var picker_view = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 116 */ +/* 119 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules -var mixins = __webpack_require__(1); - -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/button/index.vue?vue&type=script&lang=js& - -/* harmony default export */ var buttonvue_type_script_lang_js_ = ({ - name: 'Button', - mixins: [mixins["b" /* hover */], mixins["a" /* emitter */], mixins["c" /* listeners */]], +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/text/index.vue?vue&type=script&lang=js& +var SPACE_UNICODE = { + 'ensp': "\u2002", + 'emsp': "\u2003", + 'nbsp': "\xA0" +}; +/* harmony default export */ var textvue_type_script_lang_js_ = ({ + name: 'Text', props: { - hoverClass: { - type: String, - default: 'button-hover' - }, - disabled: { + selectable: { type: [Boolean, String], default: false }, - id: { + space: { type: String, default: '' }, - hoverStopPropagation: { - type: Boolean, + decode: { + type: [Boolean, String], default: false - }, - hoverStartTime: { - type: Number, - default: 20 - }, - hoverStayTime: { - type: Number, - default: 70 - }, - formType: { - type: String, - default: '', - validator: function validator(value) { - // 只有这几个可取值,其它都是非法的。 - return ~['', 'submit', 'reset'].indexOf(value); - } } }, - data: function data() { - return { - clickFunction: null - }; - }, methods: { - _onClick: function _onClick($event, isLabelClick) { - if (this.disabled) { - return; + _decodeHtml: function _decodeHtml(htmlString) { + if (this.space && SPACE_UNICODE[this.space]) { + htmlString = htmlString.replace(/ /g, SPACE_UNICODE[this.space]); } - if (isLabelClick) { - this.$el.click(); - } // TODO 通知父表单执行相应的行为 - - - if (this.formType) { - this.$dispatch('Form', this.formType === 'submit' ? 'uni-form-submit' : 'uni-form-reset', { - type: this.formType - }); - } - }, - _bindObjectListeners: function _bindObjectListeners(data, value) { - if (value) { - for (var key in value) { - var existing = data.on[key]; - var ours = value[key]; - data.on[key] = existing ? [].concat(existing, ours) : ours; - } + if (this.decode) { + htmlString = htmlString.replace(/ /g, SPACE_UNICODE.nbsp).replace(/ /g, SPACE_UNICODE.ensp).replace(/ /g, SPACE_UNICODE.emsp).replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, "'"); } - return data; + return htmlString; } }, render: function render(createElement) { var _this = this; - var $listeners = Object.create(null); + var nodeList = []; + this.$slots.default && this.$slots.default.forEach(function (vnode) { + if (vnode.text) { + // 处理可能出现的多余的转义字符 + var nodeText = vnode.text.replace(/\\n/g, '\n'); + var texts = nodeText.split('\n'); + texts.forEach(function (text, index) { + nodeList.push(_this._decodeHtml(text)); - if (this.$listeners) { - Object.keys(this.$listeners).forEach(function (e) { - if (_this.disabled && (e === 'click' || e === 'tap')) { - return; + if (index !== texts.length - 1) { + nodeList.push(createElement('br')); + } + }); + } else { + if (vnode.componentOptions && vnode.componentOptions.tag !== 'v-uni-text') { + console.warn(' 组件内只支持嵌套 ,不支持其它组件或自定义组件,否则会引发在不同平台的渲染差异。'); } - $listeners[e] = _this.$listeners[e]; - }); - } - - if (this.hoverClass && this.hoverClass !== 'none') { - return createElement('uni-button', this._bindObjectListeners({ - class: [this.hovering ? this.hoverClass : ''], - attrs: { - 'disabled': this.disabled - }, - on: { - touchstart: this._hoverTouchStart, - touchend: this._hoverTouchEnd, - touchcancel: this._hoverTouchCancel, - click: this._onClick - } - }, $listeners), this.$slots.default); - } else { - return createElement('uni-button', this._bindObjectListeners({ - class: [this.hovering ? this.hoverClass : ''], - attrs: { - 'disabled': this.disabled - }, - on: { - click: this._onClick - } - }, $listeners), this.$slots.default); - } - }, - listeners: { - 'label-click': '_onClick', - '@label-click': '_onClick' + nodeList.push(vnode); + } + }); + return createElement('uni-text', { + on: this.$listeners, + attrs: { + selectable: !!this.selectable + } + }, [createElement('span', {}, nodeList)]); } }); -// CONCATENATED MODULE: ./src/core/view/components/button/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_buttonvue_type_script_lang_js_ = (buttonvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/button/index.vue?vue&type=style&index=0&lang=css& -var buttonvue_type_style_index_0_lang_css_ = __webpack_require__(68); +// CONCATENATED MODULE: ./src/core/view/components/text/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_textvue_type_script_lang_js_ = (textvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/text/index.vue?vue&type=style&index=0&lang=css& +var textvue_type_style_index_0_lang_css_ = __webpack_require__(90); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/button/index.vue +// CONCATENATED MODULE: ./src/core/view/components/text/index.vue var render, staticRenderFns @@ -21395,7 +21746,7 @@ var render, staticRenderFns /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_buttonvue_type_script_lang_js_, + components_textvue_type_script_lang_js_, render, staticRenderFns, false, @@ -21407,11 +21758,11 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/button/index.vue" -/* harmony default export */ var components_button = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/text/index.vue" +/* harmony default export */ var components_text = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 117 */ +/* 120 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -21421,13 +21772,13 @@ __webpack_require__.r(__webpack_exports__); var touchtrack = __webpack_require__(8); // EXTERNAL MODULE: ./src/core/view/mixins/scroller/index.js + 2 modules -var scroller = __webpack_require__(47); +var scroller = __webpack_require__(48); // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Friction.js -var Friction = __webpack_require__(45); +var Friction = __webpack_require__(46); // EXTERNAL MODULE: ./src/core/view/mixins/scroller/Spring.js -var Spring = __webpack_require__(46); +var Spring = __webpack_require__(47); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/picker-view-column/index.vue?vue&type=script&lang=js& @@ -21653,7 +22004,7 @@ function onClick(dom, callback) { // CONCATENATED MODULE: ./src/core/view/components/picker-view-column/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_picker_view_columnvue_type_script_lang_js_ = (picker_view_columnvue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/picker-view-column/index.vue?vue&type=style&index=0&lang=css& -var picker_view_columnvue_type_style_index_0_lang_css_ = __webpack_require__(78); +var picker_view_columnvue_type_style_index_0_lang_css_ = __webpack_require__(79); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); @@ -21684,88 +22035,201 @@ component.options.__file = "src/core/view/components/picker-view-column/index.vu /* harmony default export */ var picker_view_column = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 118 */ +/* 121 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/text/index.vue?vue&type=script&lang=js& -var SPACE_UNICODE = { - 'ensp': "\u2002", - 'emsp': "\u2003", - 'nbsp': "\xA0" -}; -/* harmony default export */ var textvue_type_script_lang_js_ = ({ - name: 'Text', +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/movable-area/index.vue?vue&type=script&lang=js& +function calc(e) { + return Math.sqrt(e.x * e.x + e.y * e.y); +} + +/* harmony default export */ var movable_areavue_type_script_lang_js_ = ({ + name: 'MovableArea', props: { - selectable: { - type: [Boolean, String], - default: false - }, - space: { - type: String, - default: '' - }, - decode: { - type: [Boolean, String], + scaleArea: { + type: Boolean, default: false } }, + data: function data() { + return { + width: 0, + height: 0, + items: [] + }; + }, + created: function created() { + this.gapV = { + x: null, + y: null + }; + this.pinchStartLen = null; + }, + mounted: function mounted() { + this._resize(); + }, methods: { - _decodeHtml: function _decodeHtml(htmlString) { - if (this.space && SPACE_UNICODE[this.space]) { - htmlString = htmlString.replace(/ /g, SPACE_UNICODE[this.space]); + _resize: function _resize() { + this._getWH(); + + this.items.forEach(function (item, index) { + item.componentInstance.setParent(); + }); + }, + _find: function _find(target) { + var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.items; + var root = this.$el; + + function get(node) { + for (var i = 0; i < items.length; i++) { + var item = items[i]; + + if (node === item.componentInstance.$el) { + return item; + } + } + + if (node === root || node === document.body || node === document) { + return null; + } + + return get(node.parentNode); + } + + return get(target); + }, + _touchstart: function _touchstart(t) { + var i = t.touches; + + if (i) { + if (i.length > 1) { + var r = { + x: i[1].pageX - i[0].pageX, + y: i[1].pageY - i[0].pageY + }; + this.pinchStartLen = calc(r); + this.gapV = r; + + if (!this.scaleArea) { + var touch0 = this._find(i[0].target); + + var touch1 = this._find(i[1].target); + + this._scaleMovableView = touch0 && touch0 === touch1 ? touch0 : null; + } + } + } + }, + _touchmove: function _touchmove(t) { + var n = t.touches; + + if (n) { + if (n.length > 1) { + t.preventDefault(); + var i = { + x: n[1].pageX - n[0].pageX, + y: n[1].pageY - n[0].pageY + }; + + if (this.gapV.x !== null && this.pinchStartLen > 0) { + var r = calc(i) / this.pinchStartLen; + + this._updateScale(r); + } + + this.gapV = i; + } } + }, + _touchend: function _touchend(e) { + var t = e.touches; + + if (!(t && t.length)) { + if (e.changedTouches) { + this.gapV.x = 0; + this.gapV.y = 0; + this.pinchStartLen = null; - if (this.decode) { - htmlString = htmlString.replace(/ /g, SPACE_UNICODE.nbsp).replace(/ /g, SPACE_UNICODE.ensp).replace(/ /g, SPACE_UNICODE.emsp).replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, "'"); + if (this.scaleArea) { + this.items.forEach(function (item) { + item.componentInstance._endScale(); + }); + } else { + if (this._scaleMovableView) { + this._scaleMovableView.componentInstance._endScale(); + } + } + } } - - return htmlString; + }, + _updateScale: function _updateScale(e) { + if (e && e !== 1) { + if (this.scaleArea) { + this.items.forEach(function (item) { + item.componentInstance._setScale(e); + }); + } else { + if (this._scaleMovableView) { + this._scaleMovableView.componentInstance._setScale(e); + } + } + } + }, + _getWH: function _getWH() { + var style = window.getComputedStyle(this.$el); + var rect = this.$el.getBoundingClientRect(); + this.width = rect.width - ['Left', 'Right'].reduce(function (all, item) { + return all + parseFloat(style['border' + item + 'Width']) + parseFloat(style['padding' + item]); + }, 0); + this.height = rect.height - ['Top', 'Bottom'].reduce(function (all, item) { + return all + parseFloat(style['border' + item + 'Width']) + parseFloat(style['padding' + item]); + }, 0); } }, render: function render(createElement) { var _this = this; - var nodeList = []; - this.$slots.default && this.$slots.default.forEach(function (vnode) { - if (vnode.text) { - // 处理可能出现的多余的转义字符 - var nodeText = vnode.text.replace(/\\n/g, '\n'); - var texts = nodeText.split('\n'); - texts.forEach(function (text, index) { - nodeList.push(_this._decodeHtml(text)); + var items = []; - if (index !== texts.length - 1) { - nodeList.push(createElement('br')); - } - }); - } else { - if (vnode.componentOptions && vnode.componentOptions.tag !== 'v-uni-text') { - console.warn(' 组件内只支持嵌套 ,不支持其它组件或自定义组件,否则会引发在不同平台的渲染差异。'); + if (this.$slots.default) { + this.$slots.default.forEach(function (vnode) { + if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-movable-view') { + items.push(vnode); } + }); + } - nodeList.push(vnode); - } + this.items = items; + var $listeners = Object.assign({}, this.$listeners); + var events = ['touchstart', 'touchmove', 'touchend']; + events.forEach(function (event) { + var existing = $listeners[event]; + + var ours = _this["_".concat(event)]; + + $listeners[event] = existing ? [].concat(existing, ours) : ours; }); - return createElement('uni-text', { - on: this.$listeners, - attrs: { - selectable: !!this.selectable + return createElement('uni-movable-area', { + on: $listeners + }, [createElement('v-uni-resize-sensor', { + on: { + resize: this._resize } - }, [createElement('span', {}, nodeList)]); + })].concat(items)); } }); -// CONCATENATED MODULE: ./src/core/view/components/text/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_textvue_type_script_lang_js_ = (textvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/text/index.vue?vue&type=style&index=0&lang=css& -var textvue_type_style_index_0_lang_css_ = __webpack_require__(89); +// CONCATENATED MODULE: ./src/core/view/components/movable-area/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_movable_areavue_type_script_lang_js_ = (movable_areavue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/movable-area/index.vue?vue&type=style&index=0&lang=css& +var movable_areavue_type_style_index_0_lang_css_ = __webpack_require__(76); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/text/index.vue +// CONCATENATED MODULE: ./src/core/view/components/movable-area/index.vue var render, staticRenderFns @@ -21775,7 +22239,7 @@ var render, staticRenderFns /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_textvue_type_script_lang_js_, + components_movable_areavue_type_script_lang_js_, render, staticRenderFns, false, @@ -21787,11 +22251,11 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/text/index.vue" -/* harmony default export */ var components_text = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/movable-area/index.vue" +/* harmony default export */ var movable_area = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 119 */ +/* 122 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -21869,7 +22333,7 @@ __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./src/core/view/components/resize-sensor/index.vue?vue&type=script&lang=js& /* harmony default export */ var components_resize_sensorvue_type_script_lang_js_ = (resize_sensorvue_type_script_lang_js_); // EXTERNAL MODULE: ./src/core/view/components/resize-sensor/index.vue?vue&type=style&index=0&lang=css& -var resize_sensorvue_type_style_index_0_lang_css_ = __webpack_require__(83); +var resize_sensorvue_type_style_index_0_lang_css_ = __webpack_require__(84); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); @@ -21900,152 +22364,142 @@ component.options.__file = "src/core/view/components/resize-sensor/index.vue" /* harmony default export */ var resize_sensor = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 120 */ +/* 123 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/picker-view/index.vue?vue&type=script&lang=js& -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } +// EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules +var mixins = __webpack_require__(1); -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/core/view/components/button/index.vue?vue&type=script&lang=js& -/* harmony default export */ var picker_viewvue_type_script_lang_js_ = ({ - name: 'PickerView', +/* harmony default export */ var buttonvue_type_script_lang_js_ = ({ + name: 'Button', + mixins: [mixins["b" /* hover */], mixins["a" /* emitter */], mixins["c" /* listeners */]], props: { - value: { - type: Array, - default: function _default() { - return []; - }, - validator: function validator(val) { - return Array.isArray(val) && val.filter(function (val) { - return typeof val === 'number'; - }).length === val.length; - } - }, - indicatorStyle: { + hoverClass: { type: String, - default: '' + default: 'button-hover' }, - indicatorClass: { - type: String, - default: '' + disabled: { + type: [Boolean, String], + default: false }, - maskStyle: { + id: { type: String, default: '' }, - maskClass: { + hoverStopPropagation: { + type: Boolean, + default: false + }, + hoverStartTime: { + type: Number, + default: 20 + }, + hoverStayTime: { + type: Number, + default: 70 + }, + formType: { type: String, - default: '' + default: '', + validator: function validator(value) { + // 只有这几个可取值,其它都是非法的。 + return ~['', 'submit', 'reset'].indexOf(value); + } } }, data: function data() { return { - valueSync: _toConsumableArray(this.value), - height: 34, - items: [], - changeSource: '' + clickFunction: null }; }, - watch: { - value: function value(val) { - var _this = this; + methods: { + _onClick: function _onClick($event, isLabelClick) { + if (this.disabled) { + return; + } - this.valueSync.length = val.length; - val.forEach(function (val, index) { - if (val !== _this.valueSync[index]) { - _this.$set(_this.valueSync, index, val); - } - }); - }, - valueSync: { - deep: true, - handler: function handler(val, oldVal) { - if (this.changeSource === '') { - this._valueChanged(val); - } else { - this.changeSource = ''; // 避免外部直接对此值进行修改 + if (isLabelClick) { + this.$el.click(); + } // TODO 通知父表单执行相应的行为 - var value = val.map(function (val) { - return val; - }); - this.$emit('update:value', value); - this.$trigger('change', {}, { - value: value - }); + + if (this.formType) { + this.$dispatch('Form', this.formType === 'submit' ? 'uni-form-submit' : 'uni-form-reset', { + type: this.formType + }); + } + }, + _bindObjectListeners: function _bindObjectListeners(data, value) { + if (value) { + for (var key in value) { + var existing = data.on[key]; + var ours = value[key]; + data.on[key] = existing ? [].concat(existing, ours) : ours; } } + + return data; } }, - methods: { - getItemIndex: function getItemIndex(vnode) { - return this.items.indexOf(vnode); - }, - getItemValue: function getItemValue(vm) { - return this.valueSync[this.getItemIndex(vm.$vnode)] || 0; - }, - setItemValue: function setItemValue(vm, val) { - var index = this.getItemIndex(vm.$vnode); - var oldVal = this.valueSync[index]; + render: function render(createElement) { + var _this = this; - if (oldVal !== val) { - this.changeSource = 'touch'; - this.$set(this.valueSync, index, val); - } - }, - _valueChanged: function _valueChanged(val) { - this.items.forEach(function (item, index) { - item.componentInstance.setCurrent(val[index] || 0); + var $listeners = Object.create(null); + + if (this.$listeners) { + Object.keys(this.$listeners).forEach(function (e) { + if (_this.disabled && (e === 'click' || e === 'tap')) { + return; + } + + $listeners[e] = _this.$listeners[e]; }); - }, - _resize: function _resize(_ref) { - var height = _ref.height; - this.height = height; } - }, - render: function render(createElement) { - var items = []; - if (this.$slots.default) { - this.$slots.default.forEach(function (vnode) { - if (vnode.componentOptions && vnode.componentOptions.tag === 'v-uni-picker-view-column') { - items.push(vnode); + if (this.hoverClass && this.hoverClass !== 'none') { + return createElement('uni-button', this._bindObjectListeners({ + class: [this.hovering ? this.hoverClass : ''], + attrs: { + 'disabled': this.disabled + }, + on: { + touchstart: this._hoverTouchStart, + touchend: this._hoverTouchEnd, + touchcancel: this._hoverTouchCancel, + click: this._onClick } - }); + }, $listeners), this.$slots.default); + } else { + return createElement('uni-button', this._bindObjectListeners({ + class: [this.hovering ? this.hoverClass : ''], + attrs: { + 'disabled': this.disabled + }, + on: { + click: this._onClick + } + }, $listeners), this.$slots.default); } - - this.items = items; - return createElement('uni-picker-view', { - on: this.$listeners - }, [createElement('v-uni-resize-sensor', { - attrs: { - initial: true - }, - on: { - resize: this._resize - } - }), createElement('div', { - ref: 'wrapper', - 'class': 'uni-picker-view-wrapper' - }, items)]); + }, + listeners: { + 'label-click': '_onClick', + '@label-click': '_onClick' } }); -// CONCATENATED MODULE: ./src/core/view/components/picker-view/index.vue?vue&type=script&lang=js& - /* harmony default export */ var components_picker_viewvue_type_script_lang_js_ = (picker_viewvue_type_script_lang_js_); -// EXTERNAL MODULE: ./src/core/view/components/picker-view/index.vue?vue&type=style&index=0&lang=css& -var picker_viewvue_type_style_index_0_lang_css_ = __webpack_require__(79); +// CONCATENATED MODULE: ./src/core/view/components/button/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_buttonvue_type_script_lang_js_ = (buttonvue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/core/view/components/button/index.vue?vue&type=style&index=0&lang=css& +var buttonvue_type_style_index_0_lang_css_ = __webpack_require__(69); // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); -// CONCATENATED MODULE: ./src/core/view/components/picker-view/index.vue +// CONCATENATED MODULE: ./src/core/view/components/button/index.vue var render, staticRenderFns @@ -22055,7 +22509,7 @@ var render, staticRenderFns /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( - components_picker_viewvue_type_script_lang_js_, + components_buttonvue_type_script_lang_js_, render, staticRenderFns, false, @@ -22067,11 +22521,11 @@ var component = Object(componentNormalizer["a" /* default */])( /* hot reload */ if (false) { var api; } -component.options.__file = "src/core/view/components/picker-view/index.vue" -/* harmony default export */ var picker_view = __webpack_exports__["default"] = (component.exports); +component.options.__file = "src/core/view/components/button/index.vue" +/* harmony default export */ var components_button = __webpack_exports__["default"] = (component.exports); /***/ }), -/* 121 */ +/* 124 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -22082,7 +22536,7 @@ __webpack_require__.r(__webpack_exports__); if (typeof window !== 'undefined') { if (true) { - __webpack_require__(64) + __webpack_require__(65) } var i @@ -22095,7 +22549,7 @@ if (typeof window !== 'undefined') { /* harmony default export */ var setPublicPath = (null); // EXTERNAL MODULE: ./lib/app-plus/view.js -var view = __webpack_require__(52); +var view = __webpack_require__(53); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js /* concated harmony reexport upx2px */__webpack_require__.d(__webpack_exports__, "upx2px", function() { return view["h" /* upx2px */]; }); @@ -22110,6 +22564,314 @@ var view = __webpack_require__(52); +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + if(false) { var cssReload; } + + +/***/ }), +/* 126 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(125); +/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__); +/* unused harmony reexport * */ + /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); + +/***/ }), +/* 127 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26557f38-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/video/index.vue?vue&type=template&id=0ba2468e& +var render = function() { + var _vm = this + var _h = _vm.$createElement + var _c = _vm._self._c || _h + return _c( + "uni-video", + _vm._g(_vm._b({}, "uni-video", _vm.attrs, false), _vm.$listeners), + [ + _c("div", { ref: "container", staticClass: "uni-video-container" }), + _c("div", { staticClass: "uni-video-slot" }, [_vm._t("default")], 2) + ] + ) +} +var staticRenderFns = [] +render._withStripped = true + + +// CONCATENATED MODULE: ./src/platforms/app-plus/view/components/video/index.vue?vue&type=template&id=0ba2468e& + +// EXTERNAL MODULE: ./src/core/view/mixins/index.js + 1 modules +var mixins = __webpack_require__(1); + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/platforms/app-plus/view/components/video/index.vue?vue&type=script&lang=js& +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +// +// +// +// +// +// +// +// +// +// +// +// + +var methods = ['play', 'pause', 'seek', 'sendDanmu', 'playbackRate', 'requestFullScreen', 'exitFullScreen']; +var events = ['play', 'pause', 'ended', 'timeupdate', 'fullscreenchange', 'waiting', 'error']; +var _attrs = ['src', 'duration', 'controls', 'danmuList', 'danmuBtn', 'enableDanmu', 'autoplay', 'loop', 'muted', 'objectFit', 'poster', 'direction', 'showProgress', 'initialTime', 'showFullscreenBtn', 'pageGesture', 'enableProgressGesture', 'showPlayBtn', 'showCenterPlayBtn']; +/* harmony default export */ var videovue_type_script_lang_js_ = ({ + name: 'Video', + mixins: [mixins["d" /* subscriber */], mixins["c" /* listeners */]], + props: { + id: { + type: String, + default: '' + }, + src: { + type: String, + default: '' + }, + duration: { + type: [Number, String], + default: '' + }, + controls: { + type: [Boolean, String], + default: true + }, + danmuList: { + type: Array, + default: function _default() { + return []; + } + }, + danmuBtn: { + type: [Boolean, String], + default: false + }, + enableDanmu: { + type: [Boolean, String], + default: false + }, + autoplay: { + type: [Boolean, String], + default: false + }, + loop: { + type: [Boolean, String], + default: false + }, + muted: { + type: [Boolean, String], + default: false + }, + objectFit: { + type: String, + default: 'contain' + }, + poster: { + type: String, + default: '' + }, + direction: { + type: [String, Number], + default: 360 + }, + showProgress: { + type: Boolean, + default: true + }, + initialTime: { + type: [String, Number], + default: 0 + }, + showFullscreenBtn: { + type: [Boolean, String], + default: true + }, + pageGesture: { + type: [Boolean, String], + default: false + }, + enableProgressGesture: { + type: [Boolean, String], + default: true + }, + showPlayBtn: { + type: [Boolean, String], + default: true + }, + showCenterPlayBtn: { + type: [Boolean, String], + default: true + } + }, + data: function data() { + return { + style: { + top: '0px', + left: '0px', + width: '0px', + height: '0px', + position: 'static' + }, + hidden: false + }; + }, + computed: { + attrs: function attrs() { + var _this = this; + + var obj = {}; + + _attrs.forEach(function (key) { + var val = _this.$props[key]; + val = key === 'src' ? _this.$getRealPath(val) : val; + obj[key.replace(/[A-Z]/g, function (str) { + return '-' + str.toLowerCase(); + })] = val; + }); + + return obj; + } + }, + watch: { + hidden: function hidden(val) { + this.video && this.video[val ? 'hide' : 'show'](); + } + }, + listeners: { + '@view-update': '_requestUpdate' + }, + mounted: function mounted() { + var _this2 = this; + + this._updateStyle(); + + var video = this.video = plus.video.createVideoPlayer('video' + Date.now(), Object.assign({}, this.attrs, this.style)); + plus.webview.currentWebview().append(video); + + if (this.hidden) { + video.hide(); + } + + this.$watch('attrs', function () { + _this2.video && _this2.video.setStyles(_this2.attrs); + }, { + deep: true + }); + this.$watch('style', function () { + _this2.video && _this2.video.setStyles(_this2.style); + }, { + deep: true + }); + events.forEach(function (key) { + video.addEventListener(key, function () { + var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + _this2.$trigger(key, {}, data); + }); + }); + }, + beforeDestroy: function beforeDestroy() { + this.video && this.video.close(); + delete this.video; + }, + methods: { + _handleSubscribe: function _handleSubscribe(_ref) { + var type = _ref.type, + _ref$data = _ref.data, + data = _ref$data === void 0 ? {} : _ref$data; + + if (methods.includes(type)) { + if (_typeof(data) === 'object') { + switch (type) { + case 'seek': + data = data.position; + break; + + case 'playbackRate': + data = data.rate; + break; + } + } + + this.video && this.video[type](data); + } + }, + _updateStyle: function _updateStyle() { + var _this3 = this; + + var rect = this.$refs.container.getBoundingClientRect(); + this.hidden = getComputedStyle(this.$el).display === 'none'; + ['top', 'left', 'width', 'height'].forEach(function (key) { + var val = rect[key]; + val = key === 'top' ? val + (document.documentElement.scrollTop || document.body.scrollTop || 0) : val; + _this3.style[key] = val + 'px'; + }); + }, + _requestUpdate: function _requestUpdate() { + var _this4 = this; + + if (this._animationFrame) { + cancelAnimationFrame(this._animationFrame); + } + + if (this.video) { + this._animationFrame = requestAnimationFrame(function () { + delete _this4._animationFrame; + + _this4._updateStyle(); + }); + } + } + } +}); +// CONCATENATED MODULE: ./src/platforms/app-plus/view/components/video/index.vue?vue&type=script&lang=js& + /* harmony default export */ var components_videovue_type_script_lang_js_ = (videovue_type_script_lang_js_); +// EXTERNAL MODULE: ./src/platforms/app-plus/view/components/video/index.vue?vue&type=style&index=0&lang=css& +var videovue_type_style_index_0_lang_css_ = __webpack_require__(126); + +// EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js +var componentNormalizer = __webpack_require__(0); + +// CONCATENATED MODULE: ./src/platforms/app-plus/view/components/video/index.vue + + + + + + +/* normalize component */ + +var component = Object(componentNormalizer["a" /* default */])( + components_videovue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var api; } +component.options.__file = "src/platforms/app-plus/view/components/video/index.vue" +/* harmony default export */ var video = __webpack_exports__["default"] = (component.exports); + /***/ }) /******/ ]); }); \ No newline at end of file diff --git a/packages/uni-template-compiler/__tests__/compiler-app-plus-extra.service.spec.js b/packages/uni-template-compiler/__tests__/compiler-app-plus-extra.service.spec.js index 311e15e9d..bffd4b20c 100644 --- a/packages/uni-template-compiler/__tests__/compiler-app-plus-extra.service.spec.js +++ b/packages/uni-template-compiler/__tests__/compiler-app-plus-extra.service.spec.js @@ -70,6 +70,17 @@ describe('codegen', () => { '{{ user.firstName }}', `with(this){return _c('current-user',{attrs:{"_i":0},scopedSlots:_u([{key:"default",fn:function({ user }){return [_v((_$s(0,'t0',_s(user.firstName))))]}}])})}` ) + }) + + it('generate keep-alive', () => { + assertCodegen( + ``, + `with(this){return _c('keep-alive',{attrs:{"exclude":"componentWithStatus1","_i":0}},[_c("componentWithStatus",{tag:"component",attrs:{"_i":1}})],1)}` + ) + assertCodegen( + ``, + `with(this){return _c('keep-alive',{attrs:{"exclude":_$s(0,'a-exclude',componentWithStatus1),"_i":0}},[_c(_$s(1,'is','componentWithStatus'+index),{tag:"component",attrs:{"_i":1}})],1)}` + ) }) }) /* eslint-enable quotes */ diff --git a/packages/uni-template-compiler/__tests__/compiler-app-plus-extra.view.spec.js b/packages/uni-template-compiler/__tests__/compiler-app-plus-extra.view.spec.js index f4ed62645..2d801a19f 100644 --- a/packages/uni-template-compiler/__tests__/compiler-app-plus-extra.view.spec.js +++ b/packages/uni-template-compiler/__tests__/compiler-app-plus-extra.view.spec.js @@ -45,6 +45,16 @@ describe('codegen', () => { '{{ user.firstName }}', `with(this){return _c('current-user',{attrs:{"_i":0},scopedSlots:_u([{key:"default",fn:function({ user }){return [_v((_$g(0,'t0')))]}}])})}` ) + }) + it('generate keep-alive', () => { + assertCodegen( + ``, + `with(this){return _c('keep-alive',{attrs:{"exclude":"componentWithStatus1","_i":0}},[_c("componentWithStatus",{tag:"component",attrs:{"_i":1}})],1)}` + ) + assertCodegen( + ``, + `with(this){return _c('keep-alive',{attrs:{"exclude":_$g(0,'a-exclude'),"_i":0}},[_c(_$g(1,'is'),{tag:"component",attrs:{"_i":1}})],1)}` + ) }) }) /* eslint-enable quotes */ diff --git a/packages/uni-template-compiler/__tests__/compiler-app-plus.service.spec.js b/packages/uni-template-compiler/__tests__/compiler-app-plus.service.spec.js index dbbdabc73..00cfbbeab 100644 --- a/packages/uni-template-compiler/__tests__/compiler-app-plus.service.spec.js +++ b/packages/uni-template-compiler/__tests__/compiler-app-plus.service.spec.js @@ -576,7 +576,7 @@ describe('codegen', () => { ) assertCodegen( '
', - `with(this){return _c(component1,{tag:"div"})}` + `with(this){return _c(_$s(0,'is',component1),{tag:"div"})}` ) // maybe a component and normalize type should be 1 assertCodegen( diff --git a/packages/uni-template-compiler/__tests__/compiler-app-plus.view.spec.js b/packages/uni-template-compiler/__tests__/compiler-app-plus.view.spec.js index 2aef257be..c2fa0c934 100644 --- a/packages/uni-template-compiler/__tests__/compiler-app-plus.view.spec.js +++ b/packages/uni-template-compiler/__tests__/compiler-app-plus.view.spec.js @@ -576,7 +576,7 @@ describe('codegen', () => { ) assertCodegen( '
', - `with(this){return _c(component1,{tag:"v-uni-view",attrs:{"_i":0}})}` + `with(this){return _c(_$g(0,'is'),{tag:"v-uni-view",attrs:{"_i":0}})}` ) // maybe a component and normalize type should be 1 assertCodegen( diff --git a/packages/uni-template-compiler/__tests__/demo.js b/packages/uni-template-compiler/__tests__/demo.js index 5f9a46fa8..faf09b177 100644 --- a/packages/uni-template-compiler/__tests__/demo.js +++ b/packages/uni-template-compiler/__tests__/demo.js @@ -1,7 +1,7 @@ const compiler = require('../lib') const res = compiler.compile( ` -
A{{ d | e | f }}B{{text}}C
+ `, { resourcePath: '/User/fxy/Documents/test.wxml', isReservedTag: function (tag) { diff --git a/packages/uni-template-compiler/lib/app/optimizer.js b/packages/uni-template-compiler/lib/app/optimizer.js index 2ced1db00..50d5d7d0f 100644 --- a/packages/uni-template-compiler/lib/app/optimizer.js +++ b/packages/uni-template-compiler/lib/app/optimizer.js @@ -14,7 +14,11 @@ function no (a, b, c) { } function isBuiltInTag (tag) { - if (tag === 'slot' || tag === 'component') { + if ( + tag === 'slot' || + tag === 'component' || + tag === 'keep-alive' + ) { return true } } @@ -48,11 +52,11 @@ function markStatic (node) { } delete node.attrs } - if (node.type === 1) { + if (node.type === 1) { delete node.staticClass delete node.staticStyle - if (node.attrs && !isComponent(node.tag)) { // 移除静态属性 + if (node.attrs && !isComponent(node.tag) && node.tag !== 'keep-alive') { // 移除静态属性 node.attrs = node.attrs.filter(attr => attr.name === ID || isVar(attr.value)) } diff --git a/packages/uni-template-compiler/lib/app/parser/base-parser.js b/packages/uni-template-compiler/lib/app/parser/base-parser.js index 426ac5313..40c79406a 100644 --- a/packages/uni-template-compiler/lib/app/parser/base-parser.js +++ b/packages/uni-template-compiler/lib/app/parser/base-parser.js @@ -1,5 +1,6 @@ const { ID, + C_IS, V_IF, V_FOR, V_ELSE_IF, @@ -8,6 +9,15 @@ const { const parseTextExpr = require('./text-parser') +function parseIs (el, genVar) { + if (!el.component) { + return + } + if (isVar(el.component)) { + el.component = genVar(C_IS, el.component) + } +} + function parseIf (el, createGenVar) { if (!el.if) { return @@ -60,6 +70,7 @@ function parseText (el, parent, state) { } module.exports = { + parseIs, parseIf, parseFor, parseText, diff --git a/packages/uni-template-compiler/lib/app/parser/component-parser.js b/packages/uni-template-compiler/lib/app/parser/component-parser.js index c558bd6bf..446569ee5 100644 --- a/packages/uni-template-compiler/lib/app/parser/component-parser.js +++ b/packages/uni-template-compiler/lib/app/parser/component-parser.js @@ -1,14 +1,15 @@ const { - ID, - hasOwn + ID } = require('../util') -const tags = require('../../../../uni-cli-shared/lib/tags') +const { + isComponent +} = require('../../util') // 仅限 view 层 module.exports = function parseComponent (el) { // 需要把自定义组件的 attrs, props 全干掉 - if (el.tag && !hasOwn(tags, el.tag.replace('v-uni-', ''))) { + if (el.tag && isComponent(el.tag)) { // 仅保留 ID el.attrs && (el.attrs = el.attrs.filter(attr => attr.name === ID)) } diff --git a/packages/uni-template-compiler/lib/app/service.js b/packages/uni-template-compiler/lib/app/service.js index 28adee2ec..2883d648b 100644 --- a/packages/uni-template-compiler/lib/app/service.js +++ b/packages/uni-template-compiler/lib/app/service.js @@ -14,6 +14,7 @@ const { } = require('../util') const { + parseIs, parseIf, parseFor, parseText, @@ -82,6 +83,7 @@ function transformNode (el, parent, state) { const genVar = createGenVar(el.attrsMap[ID]) + parseIs(el, genVar) parseFor(el, createGenVar) parseKey(el) diff --git a/packages/uni-template-compiler/lib/app/util.js b/packages/uni-template-compiler/lib/app/util.js index 51bf36b66..2924c9b61 100644 --- a/packages/uni-template-compiler/lib/app/util.js +++ b/packages/uni-template-compiler/lib/app/util.js @@ -9,6 +9,8 @@ const ITERATOR2 = '$2' const ITERATOR3 = '$3' const SET_DATA = '_$s' const GET_DATA = '_$g' + +const C_IS = 'is' const V_FOR = 'f' const V_IF = 'i' @@ -190,7 +192,8 @@ function addHandler (el, name, value, important) { el.plain = false } -module.exports = { +module.exports = { + C_IS, V_FOR, V_IF, V_ELSE_IF, diff --git a/packages/uni-template-compiler/lib/app/view.js b/packages/uni-template-compiler/lib/app/view.js index e22130f37..077a8fac1 100644 --- a/packages/uni-template-compiler/lib/app/view.js +++ b/packages/uni-template-compiler/lib/app/view.js @@ -8,7 +8,8 @@ const { traverseNode } = require('./util') -const { +const { + parseIs, parseIf, parseFor, parseText, @@ -74,6 +75,8 @@ function transformNode (el, parent, state) { const genVar = createGenVar(el.attrsMap[ID]) + parseIs(el, genVar) + if (parseFor(el, createGenVar)) { if (el.alias[0] === '{') { //
  • el.alias = '$item' diff --git a/packages/uni-template-compiler/lib/util.js b/packages/uni-template-compiler/lib/util.js index 5a4fd8d77..bf119e07e 100644 --- a/packages/uni-template-compiler/lib/util.js +++ b/packages/uni-template-compiler/lib/util.js @@ -183,9 +183,13 @@ const { } = require('./h5') function isComponent (tagName) { - if (tagName === 'block' || tagName === 'template') { + if ( + tagName === 'block' || + tagName === 'template' || + tagName === 'keep-alive' + ) { return false - } + } return !hasOwn(tags, getTagName(tagName.replace('v-uni-', ''))) } diff --git a/packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/main.js b/packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/main.js index 0d42f1947..d5d3875be 100644 --- a/packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/main.js +++ b/packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/main.js @@ -17,7 +17,9 @@ const { parseComponents } = require('./util') -function getDefineComponents(components) { +function getDefineComponents({ + components +}) { return components.map(({ name, source @@ -93,7 +95,7 @@ module.exports = function(source, map) { return ` import 'uni-pages' function initView(){ - ${getStylesCode(this)} + ${getStylesCode(this)} injectStyles() ${getDefineComponents(parseComponents(source, traverse)).join('\n')} UniViewJSBridge.publishHandler('webviewReady') diff --git a/packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/script.js b/packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/script.js index 9036d20ed..77f1395a6 100644 --- a/packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/script.js +++ b/packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/script.js @@ -10,7 +10,7 @@ const { parseComponents } = require('./util') -function genComponentCode (components) { +function genComponentCode(components) { const importCode = [] const componentsCode = [] components.forEach(({ @@ -24,12 +24,20 @@ function genComponentCode (components) { return [importCode.join('\n'), componentsCode.join(',\n')] } -function genCode (components, css = []) { +function genCode({ + components, + options +}, css = []) { + const optionsCode = [] + Object.keys(options).forEach(name => { + options[name] !== null && optionsCode.push(`${name}:${options[name]}`) + }) const [importComponentCode, componentsCode] = genComponentCode(components) // TODO js 内引用 css return ` ${importComponentCode} export default { + ${optionsCode.length?(optionsCode.join(',')+','):''} data(){ return {} }, @@ -40,7 +48,7 @@ export default { ` } -module.exports = function (content, map) { +module.exports = function(content, map) { this.cacheable && this.cacheable() content = preprocessor.preprocess(content, jsPreprocessOptions.context, { diff --git a/packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/util.js b/packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/util.js index 1e4edac65..26f293577 100644 --- a/packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/util.js +++ b/packages/vue-cli-plugin-uni/packages/webpack-uni-app-loader/view/util.js @@ -1,8 +1,9 @@ const parser = require('@babel/parser') -function parseComponents (content, traverse) { +function parseComponents(content, traverse) { const { state: { + options, components } } = traverse(parser.parse(content, { @@ -15,9 +16,16 @@ function parseComponents (content, traverse) { 'classProperties' ] }), { - components: [] + components: [], + options: { + name: null, + inheritAttrs: null + } }) - return components + return { + components, + options + } } module.exports = { diff --git a/packages/webpack-uni-mp-loader/lib/babel/scoped-component-traverse.js b/packages/webpack-uni-mp-loader/lib/babel/scoped-component-traverse.js index f29dabe45..f17ff36bc 100644 --- a/packages/webpack-uni-mp-loader/lib/babel/scoped-component-traverse.js +++ b/packages/webpack-uni-mp-loader/lib/babel/scoped-component-traverse.js @@ -6,10 +6,27 @@ const { } = require('./util') function handleObjectExpression (declaration, path, state) { + if (state.options) { // name,inheritAttrs + Object.keys(state.options).forEach(name => { + const optionProperty = declaration.properties.filter(prop => { + return t.isObjectProperty(prop) && + t.isIdentifier(prop.key) && + prop.key.name === name + })[0] + if (optionProperty) { + if (t.isStringLiteral(optionProperty.value)) { + state.options[name] = JSON.stringify(optionProperty.value.value) + } else { + state.options[name] = optionProperty.value.value + } + } + }) + } + const componentsProperty = declaration.properties.filter(prop => { return t.isObjectProperty(prop) && - t.isIdentifier(prop.key) && - prop.key.name === 'components' + t.isIdentifier(prop.key) && + prop.key.name === 'components' })[0] if (componentsProperty && t.isObjectExpression(componentsProperty.value)) { @@ -27,7 +44,8 @@ function handleObjectExpression (declaration, path, state) { module.exports = function (ast, state = { type: 'Component', - components: [] + components: [], + options: {} }) { babelTraverse(ast, { ExportDefaultDeclaration (path) { @@ -35,15 +53,15 @@ module.exports = function (ast, state = { if (t.isObjectExpression(declaration)) { // export default {components:{}} handleObjectExpression(declaration, path, state) } else if (t.isCallExpression(declaration) && - t.isMemberExpression(declaration.callee) && - declaration.arguments.length === 1) { // export default Vue.extend({components:{}}) + t.isMemberExpression(declaration.callee) && + declaration.arguments.length === 1) { // export default Vue.extend({components:{}}) if (declaration.callee.object.name === 'Vue' && declaration.callee.property.name === - 'extend') { + 'extend') { handleObjectExpression(declaration.arguments[0], path, state) } } else if (t.isClassDeclaration(declaration) && - declaration.decorators && - declaration.decorators.length) { // export default @Component({components:{}}) class MyComponent extend Vue + declaration.decorators && + declaration.decorators.length) { // export default @Component({components:{}}) class MyComponent extend Vue const componentDecorator = declaration.decorators[0] if (t.isCallExpression(componentDecorator.expression)) { const args = componentDecorator.expression.arguments -- GitLab