ftvs-vue2 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/Button.js +1 -1
- package/lib/cjs/FileBag.js +1 -1
- package/lib/cjs/{ListSelect-ed4d973d.js → ListSelect-b31b9dfc.js} +1 -1
- package/lib/cjs/ListSelect.js +1 -1
- package/lib/cjs/Picker.js +1 -1
- package/lib/cjs/Popup.js +1 -1
- package/lib/cjs/SelectAddress.js +1 -1
- package/lib/cjs/index.css +49 -46
- package/lib/cjs/index.js +1 -1
- package/lib/esm/Button.js +1 -1
- package/lib/esm/FileBag.js +1 -1
- package/lib/esm/{ListSelect-990a220c.js → ListSelect-f0abbab6.js} +1 -1
- package/lib/esm/ListSelect.js +1 -1
- package/lib/esm/Picker.js +1 -1
- package/lib/esm/Popup.js +1 -1
- package/lib/esm/SelectAddress.js +1 -1
- package/lib/esm/index.css +49 -46
- package/lib/esm/index.js +1 -1
- package/package.json +1 -1
- /package/lib/cjs/{browser-2c77e9e9.js → browser-452735a2.js} +0 -0
- /package/lib/esm/{browser-312fc847.js → browser-dba31c0f.js} +0 -0
package/lib/cjs/Button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./browser-
|
|
1
|
+
"use strict";var e=require("./browser-452735a2.js"),t={name:"Button",props:{type:{type:String,default:"default",desc:"default | danger"}},emits:{click:function(e){return"点击事件"}},methods:{},mounted:function(){}},n=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{directives:[{name:"focusable",rawName:"v-focusable"}],class:[e.$style.button,e.$style[e.type]],on:{click:function(t){return e.$emit("click")}}},[e._t("default")],2)};n._withStripped=!0;var a=function(e){e&&(e("data-v-aff05d48_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{button:"packages-Button-button-1dIW",default:"packages-Button-default-Zf6U",danger:"packages-Button-danger-1SaJ"}}))},r=e.normalizeComponent({render:n,staticRenderFns:[]},a,t,undefined,false,undefined,!1,e.createInjector,void 0,void 0);module.exports=r;
|
package/lib/cjs/FileBag.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./ListSelect-
|
|
1
|
+
"use strict";var e=require("./ListSelect-b31b9dfc.js"),t=require("./Popup.js"),i=require("./browser-452735a2.js");require("./utils.js"),require("vue"),require("./staticImg.js"),require("vant");var n={name:"FileBag",components:{Popup:t,ListSelect:e.__vue_component__},props:{value:{type:Boolean,default:!1,required:!0,desc:"是否展示"},title:{type:String,default:"请选择健康档案",desc:"标题"},codeTitle:{type:String,default:"添加或编辑档案",desc:"二维码标题"}},watch:{value:{handler:function(e){this.show=e,e&&this.inits()},immediate:!0},show:function(e){e||this.$refs.listSelect._tvRest(),this.$emit("input",e)}},emits:{input:function(e){return"内容变化时触发"},change:function(e){return"选中当前项"},list:function(e){return"地址数据返回"}},data:function(){return{list:[],QrPath:"",show:!1}},methods:{change:function(e){this.show=!1,this.$emit("change",e)},inits:function(){var t=this;return e._asyncToGenerator(e.regenerator.mark(function i(){var n,r;return e.regenerator.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.$ftvsApiConfigInfo.fileBagFn){e.next=2;break}return e.next=1,t.$ftvsApiConfigInfo.fileBagFn();case 1:n=e.sent,t.list=n||[],t.$emit("list",t.list);case 2:t.$ftvsApiConfigInfo.qrCodePathFn&&(r=t.$ftvsApiConfigInfo.qrCodePathFn(),t.QrPath=r.weAppHealthRecordPath);case 3:case"end":return e.stop()}},i)}))()}}},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Popup",{class:e.$style.popup,model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[i("div",{class:e.$style["file-bag"]},[i("ListSelect",{ref:"listSelect",attrs:{list:e.list,qrPath:e.QrPath,title:e.title,codeTitle:e.codeTitle},on:{change:e.change}})],1)])};r._withStripped=!0;var s=function(e){e&&(e("data-v-5e8af8c4_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{popup:"packages-FileBag-popup-Hc07","file-bag":"packages-FileBag-file-bag-xapd"}}))},a=i.normalizeComponent({render:r,staticRenderFns:[]},s,n,undefined,false,undefined,!1,i.createInjector,void 0,void 0);module.exports=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("./utils.js"),e=require("./staticImg.js"),r=require("./browser-2c77e9e9.js");function n(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}),e.default=t,Object.freeze(e)}function i(t,e,r,n,i,o,c){try{var a=t[o](c),s=a.value}catch(t){return void r(t)}a.done?e(s):Promise.resolve(s).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var c=t.apply(e,r);function a(t){i(c,n,o,a,s,"next",t)}function s(t){i(c,n,o,a,s,"throw",t)}a(void 0)})}}var c={exports:{}};!function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,c=Object.create(o.prototype),a=new $(n||[]);return i(c,"_invoke",{value:T(t,r,a)}),c}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function _(){}var w={};u(w,c,function(){return this});var x=Object.getPrototypeOf,b=x&&x(x(I([])));b&&b!==r&&n.call(b,c)&&(w=b);var L=_.prototype=g.prototype=Object.create(w);function k(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function j(t,e){function r(i,o,c,a){var s=f(t[i],t,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,c,a)},function(t){r("throw",t,c,a)}):e.resolve(l).then(function(t){u.value=t,c(u)},function(t){return r("throw",t,c,a)})}a(s.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e(function(e,i){r(t,n,e,i)})}return o=o?o.then(i,i):i()}})}function T(t,e,r){var n=h;return function(i,o){if(n===v)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw o;return R()}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var a=O(c,r);if(a){if(a===y)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=v;var s=f(t,e,r);if("normal"===s.type){if(n=r.done?p:d,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=p,r.method="throw",r.arg=s.arg)}}}function O(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var c=o.arg;return c?c.done?(r[t.resultName]=c.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):c:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function I(t){if(t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}return{next:R}}function R(){return{value:e,done:!0}}return m.prototype=_,i(L,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:m,configurable:!0}),m.displayName=u(_,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},t.awrap=function(t){return{__await:t}},k(j.prototype),u(j.prototype,a,function(){return this}),t.AsyncIterator=j,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var c=new j(l(e,r,n,i),o);return t.isGeneratorFunction(r)?c:c.next().then(function(t){return t.done?t.value:c.next()})},k(L),u(L,s,"Generator"),u(L,c,function(){return this}),u(L,"toString",function(){return"[object Generator]"}),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=I,$.prototype={constructor:$,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o],a=c.completion;if("root"===c.tryLoc)return i("end");if(c.tryLoc<=this.prev){var s=n.call(c,"catchLoc"),u=n.call(c,"finallyLoc");if(s&&u){if(this.prev<c.catchLoc)return i(c.catchLoc,!0);if(this.prev<c.finallyLoc)return i(c.finallyLoc)}else if(s){if(this.prev<c.catchLoc)return i(c.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return i(c.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var c=o?o.completion:{};return c.type=t,c.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(c);var a=c.exports,s={name:"ListSelect",props:{value:{type:Object,default:function(){return{}},desc:"当前选中项"},list:{type:Array,required:!0,desc:"属性说明"},title:{type:String,default:"",desc:"标题"},codeTitle:{type:String,default:"",desc:"二维码标题"},qrPath:{type:String,default:"",desc:"二维码链接"}},watch:{qrPath:{handler:function(t){this.initQr(t)},immediate:!0},value:{handler:function(t){var e=this.findObjectIndex(this.list,t);e>-1&&(this.selectIndex=e)},immediate:!0},list:{handler:function(t){t.length&&this.inits()},immediate:!0}},emits:{change:function(t){return"选中当前项"},input:function(t){return"内容变化时触发"},onFocus:function(t){return"获得当前焦点所在项"}},slots:{item:{desc:"列表元素"},hint:{desc:"二维码下方提示"}},data:function(){var r=t.ftvsTvScope.apply(this);return{ftvsTvInit:r.ftvsTvInit,ftvsTvReset:r.ftvsTvReset,qrcodeThis:void 0,QRCode:null,selectIndex:null,staticCodeIcon:e.staticCodeIcon,selected:e.staticSelectedIcon,wxIcon:e.staticWxIcon}},methods:{initQr:function(t){var e=this;return o(a.mark(function r(){var i;return a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(null!==e.QRCode){r.next=2;break}return r.next=1,Promise.resolve().then(function(){return n(require("qrcodejs2"))});case 1:e.QRCode=r.sent.default;case 2:if(t){r.next=3;break}return r.abrupt("return");case 3:i={text:t,width:314,height:316,colorDark:"#000000",colorLight:"#ffffff",correctLevel:e.QRCode.CorrectLevel.H},void 0!==e.qrcodeThis?(e.qrcodeThis.clear(),e.qrcodeThis.makeCode(t)):e.qrcodeThis=new e.QRCode(e.$refs.ftvsQrCode,i),e.$nextTick(function(){e.forceRepaint(e.$refs.ftvsQrCode)});case 4:case"end":return r.stop()}},r)}))()},forceRepaint:function(t){t.style.display="none",t.offsetHeight,t.style.display="flex"},findObjectIndex:function(t,e){return t.findIndex(function(t){return Object.keys(e).every(function(r){return t[r]===e[r]})})},_tvRest:function(){this.ftvsTvReset()},change:function(t,e){this.selectIndex=e,this.$emit("input",t),this.$emit("change",{item:t,index:e}),this.ftvsTvReset()},onFocus:function(t,e){this.$emit("onFocus",{item:t,index:e})},inits:function(){var t=this;return o(a.mark(function e(){return a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.$nextTick(o(a.mark(function e(){return a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.ftvsTvInit({distanceToCenter:!0,scrollEl:t.$refs.left,limitingEl:t.$refs.left},function(){var e=t.$refs.left,r=e?e.querySelectorAll(".".concat(t.$style.item)):null;r&&r.length&&t.$tv.next(r[t.selectIndex||0])});case 1:case"end":return e.stop()}},e)})));case 1:case"end":return e.stop()}},e)}))()}},beforeDestroy:function(){this.ftvsTvReset()},mounted:function(){}},u=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{class:t.$style.list_select},[t.title?r("div",{class:t.$style.title},[t._v(t._s(t.title))]):t._e(),t._v(" "),r("div",{class:t.$style.content},[t.list.length?r("div",{ref:"left",class:t.$style.left},t._l(t.list,function(e,n){return r("div",{directives:[{name:"focusable",rawName:"v-focusable"}],key:n+"-ftvs-file-bg-list",class:t.$style.item,on:{click:function(r){return t.change(e,n)},onFocus:function(r){return t.onFocus(e,n)}}},[r("div",{class:t.$style.item_l},[t._t("item",function(){return[r("div",[t._v("\n "+t._s(e.memberName)+" "+t._s(e.sexText)+" "+t._s(e.age)+"岁\n ")])]},{item:e,index:n})],2),t._v(" "),n===t.selectIndex?r("img",{class:t.$style.selected,attrs:{src:t.selected}}):t._e()])}),0):t._e(),t._v(" "),r("div",{class:t.$style.right,style:{background:"url('"+t.staticCodeIcon+"')"}},[r("div",{class:t.$style.r_div},[r("div",{class:t.$style.r_title},[t._v(t._s(t.codeTitle))]),t._v(" "),r("div",{ref:"ftvsQrCode",class:t.$style.img_code}),t._v(" "),t._t("hint",function(){return[r("div",{class:t.$style.r_hint},[r("img",{attrs:{src:t.wxIcon}}),t._v("\n 使用微信扫码\n ")])]})],2)])])])};u._withStripped=!0;var l=function(t){t&&(t("data-v-11259aeb_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{list_select:"packages-ListSelect-list_select-83QA",title:"packages-ListSelect-title-eOZz",content:"packages-ListSelect-content-g6tF",left:"packages-ListSelect-left-3xR9",item:"packages-ListSelect-item-1TtQ",item_l:"packages-ListSelect-item_l-2OUN",selected:"packages-ListSelect-selected-1V7w",right:"packages-ListSelect-right-3GvU",r_div:"packages-ListSelect-r_div-2m0w",img_code:"packages-ListSelect-img_code-24n2",r_title:"packages-ListSelect-r_title-12wf",r_hint:"packages-ListSelect-r_hint-189D"}}))},f=r.normalizeComponent({render:u,staticRenderFns:[]},l,s,undefined,false,undefined,!1,r.createInjector,void 0,void 0);exports.__vue_component__=f,exports._asyncToGenerator=o,exports.regenerator=a;
|
|
1
|
+
"use strict";var t=require("./utils.js"),e=require("./staticImg.js"),r=require("./browser-452735a2.js");function n(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}),e.default=t,Object.freeze(e)}function i(t,e,r,n,i,o,c){try{var a=t[o](c),s=a.value}catch(t){return void r(t)}a.done?e(s):Promise.resolve(s).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var c=t.apply(e,r);function a(t){i(c,n,o,a,s,"next",t)}function s(t){i(c,n,o,a,s,"throw",t)}a(void 0)})}}var c={exports:{}};!function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,c=Object.create(o.prototype),a=new $(n||[]);return i(c,"_invoke",{value:T(t,r,a)}),c}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function _(){}var w={};u(w,c,function(){return this});var x=Object.getPrototypeOf,b=x&&x(x(I([])));b&&b!==r&&n.call(b,c)&&(w=b);var L=_.prototype=g.prototype=Object.create(w);function k(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function j(t,e){function r(i,o,c,a){var s=f(t[i],t,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,c,a)},function(t){r("throw",t,c,a)}):e.resolve(l).then(function(t){u.value=t,c(u)},function(t){return r("throw",t,c,a)})}a(s.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e(function(e,i){r(t,n,e,i)})}return o=o?o.then(i,i):i()}})}function T(t,e,r){var n=h;return function(i,o){if(n===v)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw o;return R()}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var a=O(c,r);if(a){if(a===y)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=v;var s=f(t,e,r);if("normal"===s.type){if(n=r.done?p:d,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=p,r.method="throw",r.arg=s.arg)}}}function O(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var c=o.arg;return c?c.done?(r[t.resultName]=c.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):c:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function I(t){if(t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}return{next:R}}function R(){return{value:e,done:!0}}return m.prototype=_,i(L,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:m,configurable:!0}),m.displayName=u(_,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},t.awrap=function(t){return{__await:t}},k(j.prototype),u(j.prototype,a,function(){return this}),t.AsyncIterator=j,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var c=new j(l(e,r,n,i),o);return t.isGeneratorFunction(r)?c:c.next().then(function(t){return t.done?t.value:c.next()})},k(L),u(L,s,"Generator"),u(L,c,function(){return this}),u(L,"toString",function(){return"[object Generator]"}),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=I,$.prototype={constructor:$,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o],a=c.completion;if("root"===c.tryLoc)return i("end");if(c.tryLoc<=this.prev){var s=n.call(c,"catchLoc"),u=n.call(c,"finallyLoc");if(s&&u){if(this.prev<c.catchLoc)return i(c.catchLoc,!0);if(this.prev<c.finallyLoc)return i(c.finallyLoc)}else if(s){if(this.prev<c.catchLoc)return i(c.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return i(c.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var c=o?o.completion:{};return c.type=t,c.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(c);var a=c.exports,s={name:"ListSelect",props:{value:{type:Object,default:function(){return{}},desc:"当前选中项"},list:{type:Array,required:!0,desc:"属性说明"},title:{type:String,default:"",desc:"标题"},codeTitle:{type:String,default:"",desc:"二维码标题"},qrPath:{type:String,default:"",desc:"二维码链接"}},watch:{qrPath:{handler:function(t){this.initQr(t)},immediate:!0},value:{handler:function(t){var e=this.findObjectIndex(this.list,t);e>-1&&(this.selectIndex=e)},immediate:!0},list:{handler:function(t){t.length&&this.inits()},immediate:!0}},emits:{change:function(t){return"选中当前项"},input:function(t){return"内容变化时触发"},onFocus:function(t){return"获得当前焦点所在项"}},slots:{item:{desc:"列表元素"},hint:{desc:"二维码下方提示"}},data:function(){var r=t.ftvsTvScope.apply(this);return{ftvsTvInit:r.ftvsTvInit,ftvsTvReset:r.ftvsTvReset,qrcodeThis:void 0,QRCode:null,selectIndex:null,staticCodeIcon:e.staticCodeIcon,selected:e.staticSelectedIcon,wxIcon:e.staticWxIcon}},methods:{initQr:function(t){var e=this;return o(a.mark(function r(){var i;return a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(null!==e.QRCode){r.next=2;break}return r.next=1,Promise.resolve().then(function(){return n(require("qrcodejs2"))});case 1:e.QRCode=r.sent.default;case 2:if(t){r.next=3;break}return r.abrupt("return");case 3:i={text:t,width:314,height:316,colorDark:"#000000",colorLight:"#ffffff",correctLevel:e.QRCode.CorrectLevel.H},void 0!==e.qrcodeThis?(e.qrcodeThis.clear(),e.qrcodeThis.makeCode(t)):e.qrcodeThis=new e.QRCode(e.$refs.ftvsQrCode,i),e.$nextTick(function(){e.forceRepaint(e.$refs.ftvsQrCode)});case 4:case"end":return r.stop()}},r)}))()},forceRepaint:function(t){t.style.display="none",t.offsetHeight,t.style.display="flex"},findObjectIndex:function(t,e){return t.findIndex(function(t){return Object.keys(e).every(function(r){return t[r]===e[r]})})},_tvRest:function(){this.ftvsTvReset()},change:function(t,e){this.selectIndex=e,this.$emit("input",t),this.$emit("change",{item:t,index:e}),this.ftvsTvReset()},onFocus:function(t,e){this.$emit("onFocus",{item:t,index:e})},inits:function(){var t=this;return o(a.mark(function e(){return a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.$nextTick(o(a.mark(function e(){return a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.ftvsTvInit({distanceToCenter:!0,scrollEl:t.$refs.left,limitingEl:t.$refs.left},function(){var e=t.$refs.left,r=e?e.querySelectorAll(".".concat(t.$style.item)):null;r&&r.length&&t.$tv.next(r[t.selectIndex||0])});case 1:case"end":return e.stop()}},e)})));case 1:case"end":return e.stop()}},e)}))()}},beforeDestroy:function(){this.ftvsTvReset()},mounted:function(){}},u=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{class:t.$style.list_select},[t.title?r("div",{class:t.$style.title},[t._v(t._s(t.title))]):t._e(),t._v(" "),r("div",{class:t.$style.content},[t.list.length?r("div",{ref:"left",class:t.$style.left},t._l(t.list,function(e,n){return r("div",{directives:[{name:"focusable",rawName:"v-focusable"}],key:n+"-ftvs-file-bg-list",class:t.$style.item,on:{click:function(r){return t.change(e,n)},onFocus:function(r){return t.onFocus(e,n)}}},[r("div",{class:t.$style.item_l},[t._t("item",function(){return[r("div",[t._v("\n "+t._s(e.memberName)+" "+t._s(e.sexText)+" "+t._s(e.age)+"岁\n ")])]},{item:e,index:n})],2),t._v(" "),n===t.selectIndex?r("img",{class:t.$style.selected,attrs:{src:t.selected}}):t._e()])}),0):t._e(),t._v(" "),r("div",{class:t.$style.right,style:{background:"url('"+t.staticCodeIcon+"')"}},[r("div",{class:t.$style.r_div},[r("div",{class:t.$style.r_title},[t._v(t._s(t.codeTitle))]),t._v(" "),r("div",{ref:"ftvsQrCode",class:t.$style.img_code}),t._v(" "),t._t("hint",function(){return[r("div",{class:t.$style.r_hint},[r("img",{attrs:{src:t.wxIcon}}),t._v("\n 使用微信扫码\n ")])]})],2)])])])};u._withStripped=!0;var l=function(t){t&&(t("data-v-34ece6c8_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{list_select:"packages-ListSelect-list_select-83QA",title:"packages-ListSelect-title-eOZz",content:"packages-ListSelect-content-g6tF",left:"packages-ListSelect-left-3xR9",item:"packages-ListSelect-item-1TtQ",item_l:"packages-ListSelect-item_l-2OUN",selected:"packages-ListSelect-selected-1V7w",right:"packages-ListSelect-right-3GvU",r_div:"packages-ListSelect-r_div-2m0w",img_code:"packages-ListSelect-img_code-24n2",r_title:"packages-ListSelect-r_title-12wf",r_hint:"packages-ListSelect-r_hint-189D"}}))},f=r.normalizeComponent({render:u,staticRenderFns:[]},l,s,undefined,false,undefined,!1,r.createInjector,void 0,void 0);exports.__vue_component__=f,exports._asyncToGenerator=o,exports.regenerator=a;
|
package/lib/cjs/ListSelect.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./ListSelect-
|
|
1
|
+
"use strict";var e=require("./ListSelect-b31b9dfc.js");require("./browser-452735a2.js"),require("./utils.js"),require("vue"),require("./staticImg.js"),module.exports=e.__vue_component__;
|
package/lib/cjs/Picker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("vant"),e=require("./utils.js"),n=require("./browser-
|
|
1
|
+
"use strict";var t=require("vant"),e=require("./utils.js"),n=require("./browser-452735a2.js");function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}require("vue");var o={name:"Picker",components:{vantPicker:t.Picker},props:{valueKey:{type:String,default:"text",desc:"选项对象中,选项文字对应的键名"},columns:{type:Array,required:!0,desc:"对象数组,配置每一列显示的数据"}},emits:{confirm:function(t){return"最后一列选项改变时触发,单列:Picker 实例,选中值,选中值对应的索引\n多列:Picker 实例,所有列选中值,当前列对应的索引"}},data:function(){var t=e.ftvsTvScope.apply(this);return{ftvsTvInit:t.ftvsTvInit,ftvsTvReset:t.ftvsTvReset,itemHeight:e.ftvsPxToRem(130),isMove:!1,visibleItemCount:6,tvColumns:[],columnsNum:null,nowColumnsIndex:0,columnsType:"singleRow",isTree:!1}},computed:{nowColumns:function(){return this.tvColumns[this.nowColumnsIndex]}},watch:{columns:{handler:function(t){var e=this;t.length&&this.$nextTick(function(){e.init()})},immediate:!0,deep:!0}},methods:{setPracticalIndex:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.getColumnsIndexes(),n=t||this.nowColumnsIndex;this.tvColumns[n].focusIndex=e[n]||null},selectVal:function(t){var e,n=this,s=t.target,o=s.parentNode,i=o.parentNode,u=null===(e=Array.from(null==i?void 0:i.children))||void 0===e?void 0:e.indexOf(o),l=Number(s.parentNode.parentNode.getAttribute("data-tv-index"));this.nowColumnsIndex=l,this.$set(this.tvColumns[l],"focusIndex",u),this.setNowColumnsFocus(),this.$refs.vantPicker.setColumnIndex(this.nowColumnsIndex,this.nowColumns.focusIndex),this.isTree&&this.resetColumnFocusIndex();var r,c=this.$refs.vantPicker.getValues();r="singleRow"===this.columnsType?c[0]:this.isTree?c.map(function(t){return t[n.valueKey]}):c,this.emitVal(r)},emitVal:function(t){var e=this;if(this.nowColumnsIndex+1===this.columnsNum){var n=[];try{n=this.$refs.vantPicker.getColumnValue(this.nowColumnsIndex)}catch(t){}var s={currentOption:n,selectedValues:t,selectedOptions:this.getColumnValues(this.nowColumnsIndex),selectedIndexes:this.getColumnsIndexes()};this.$emit("confirm",s),this.ftvsTvReset()}var o=this.tvColumns[this.nowColumnsIndex+1];o&&o.dom&&this.$nextTick(function(){e.updateColumns(o.dom,e.nowColumnsIndex+1,o.focusIndex)})},toUp:function(){this.nowColumns.focusIndex>0&&(this.tvColumns[this.nowColumnsIndex].focusIndex--,this.setNowColumnsFocus(),this.move(this.nowColumns.focusIndex))},toLeft:function(){this.nowColumnsIndex>0&&(this.nowColumnsIndex--,this.setPracticalIndex(this.nowColumnsIndex+1),this.setNowColumnsFocus())},toRight:function(){this.nowColumnsIndex<this.tvColumns.length-1&&(this.nowColumnsIndex++,this.setNowColumnsFocus())},toDown:function(){this.nowColumns.focusIndex<this.nowColumns.focusNum-1&&(this.tvColumns[this.nowColumnsIndex].focusIndex++,this.setNowColumnsFocus(),this.move(this.nowColumns.focusIndex))},getColumnsIndexes:function(){return this.$refs.vantPicker.getIndexes()},getColumnValues:function(t){return this.$refs.vantPicker.getColumnValues(t)},resetColumnFocusIndex:function(){for(var t=this.nowColumnsIndex;t<this.tvColumns.length-1;t++)this.tvColumns[t+1].focusIndex=0},move:function(t){var e=this,n=this.$refs.vantPicker,s=n.children[this.nowColumnsIndex].options,o=n.children[this.nowColumnsIndex].itemHeight,i=function(t,e){var n,s,o;n=e,s=0,o=t.length;for(var i=e=Math.min(Math.max(n,s),o);i<t.length;i++)if(!t[i].disabled)return i;for(var u=e-1;u>=0;u--)if(!t[u].disabled)return u;return 0},u=function(t){return-i(s,t)*o+o*(e.visibleItemCount-1)/2}(t);this.nowColumns.dom.style.webkitTtransitionDuration="0ms",this.nowColumns.dom.style.webkitTransitionProperty="none",this.nowColumns.dom.style.webkitTransform="translate3d(0px, ".concat(u,"px, 0px)")},setNowColumnsFocus:function(){var t=this.tvColumns[this.nowColumnsIndex];null===t.focusIndex&&(t.focusIndex=this.getColumnsIndexes()[this.nowColumnsIndex]);var e=t.dom.querySelectorAll("li")[t.focusIndex].children[0];this.$tv.next(e),this.isMove=!0},setColumnsType:function(){var t=this.columns[0];"object"===s(t)&&(t.hasOwnProperty("children")||t.hasOwnProperty("values"))&&(t.hasOwnProperty("children")&&(this.isTree=!0),this.columnsType="multiColumn")},againFocus:function(){this.isMove&&(this.ftvsTvInit(),this.setNowColumnsFocus())},updateColumns:function(t,e){this.tvColumns[e].focusNum=t.querySelectorAll("li").length},init:function(){this.ftvsTvInit(),this.setColumnsType();var t="singleRow"===this.columnsType,e=document.querySelector("."+this.$style.picker).querySelectorAll("ul");this.columnsNum=t?1:e.length;for(var n=0;n<this.columnsNum;n++){var s=e[n];s.setAttribute("data-tv-index",n),this.$set(this.tvColumns,n,{focusIndex:null,focusNum:s.querySelectorAll("li").length,dom:s})}this.setNowColumnsFocus()}},beforeDestroy:function(){this.ftvsTvReset()},mounted:function(){}},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("vantPicker",{ref:"vantPicker",class:t.$style.picker,attrs:{columns:t.columns,"value-key":t.valueKey,"item-height":t.itemHeight},scopedSlots:t._u([{key:"option",fn:function(e){return[n("div",{directives:[{name:"focusable",rawName:"v-focusable"}],class:t.$style.column_item,on:{up:t.toUp,left:t.toLeft,right:t.toRight,down:t.toDown,click:t.selectVal}},["string"==typeof e?[t._v("\n "+t._s(e)+"\n ")]:[t._v(t._s(e[t.valueKey]))]],2)]}}])})};i._withStripped=!0;var u=function(t){t&&(t("data-v-fb7f4ec2_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{picker:"packages-Picker-picker-3oJS",column_item:"packages-Picker-column_item-3Wh4"}}))},l=n.normalizeComponent({render:i,staticRenderFns:[]},u,o,undefined,false,undefined,!1,n.createInjector,void 0,void 0);module.exports=l;
|
package/lib/cjs/Popup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("vant"),o=require("./browser-
|
|
1
|
+
"use strict";var e=require("vant"),o=require("./browser-452735a2.js"),t={name:"Popup",components:{vantPopup:e.Popup},props:{value:{type:Boolean,required:!0,desc:"属性说明"},position:{type:String,default:"center",desc:"弹出位置,可选值为 top bottom right left"},closeable:{type:Boolean,default:!1,desc:"是否显示关闭图标"},getContainer:{type:String,desc:"挂载节点, 使用 get-container 属性的组件不能为根节点"},overlay:{type:Boolean,default:!0,desc:"是否显示遮罩层"},duration:{type:[Number,String],default:.3,desc:"动画时长,单位秒"},overlayClass:{type:String,desc:"自定义遮罩层类名"},overlayStyle:{type:Object,default:function(){return{backgroundColor:"#151d2b"}},desc:"自定义遮罩层样式"},closeOnPopstate:{type:Boolean,default:!1,desc:"是否在页面回退时自动关闭"},closeOnClickOverlay:{type:Boolean,default:!1,desc:"是否在点击遮罩层后关闭"}},emits:{clickCloseIcon:function(e){return"点击关闭图标时触发"},click:function(e){return"点击弹出层时触发"},clickOverlay:function(){return"点击遮罩层时触发"},open:function(){return"打开弹出层时触发"},close:function(){return"关闭弹出层时触发"},opened:function(){return"打开弹出层且动画结束后触发"},closed:function(){return"关闭弹出层且动画结束后触发"}},data:function(){return{show:!1}},watch:{value:{handler:function(e){this.show=e},immediate:!0},show:{handler:function(e){this.$emit("input",e)}}},methods:{clickCloseIcon:function(e){this.$emit("clickCloseIcon",e)},click:function(e){this.$emit("click",e)},clickOverlay:function(){this.$emit("clickOverlay")},open:function(){this.$emit("open")},close:function(){this.$emit("close")},opened:function(){this.$emit("opened")},closed:function(){this.$emit("closed")}},mounted:function(){}},n=function(){var e=this,o=e.$createElement;return(e._self._c||o)("vantPopup",{class:e.$style.popup,attrs:{position:e.position,closeable:e.closeable,"get-container":e.getContainer,overlay:e.overlay,"overlay-class":e.overlayClass,"overlay-style":e.overlayStyle,"close-on-popstate":e.closeOnPopstate,"close-on-click-overlay":e.closeOnClickOverlay,duration:e.duration},on:{"click-close-icon":e.clickCloseIcon,click:e.click,"click-overlay":e.clickOverlay,open:e.open,close:e.close,opened:e.opened,closed:e.closed},model:{value:e.show,callback:function(o){e.show=o},expression:"show"}},[e._t("default")],2)};n._withStripped=!0;var c=function(e){e&&(e("data-v-77af2cd1_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{popup:"packages-Popup-popup-1uSf"}}))},l=o.normalizeComponent({render:n,staticRenderFns:[]},c,t,undefined,false,undefined,!1,o.createInjector,void 0,void 0);module.exports=l;
|
package/lib/cjs/SelectAddress.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./ListSelect-
|
|
1
|
+
"use strict";var e=require("./ListSelect-b31b9dfc.js"),t=require("vue"),n=require("./Popup.js"),s=require("./staticImg.js"),r=require("./browser-452735a2.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./utils.js"),require("vant");var a=i(t),o=function(){var t=e._asyncToGenerator(e.regenerator.mark(function t(){var n;return e.regenerator.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=[],!a.default.prototype.$ftvsApiConfigInfo.selectAddressFn){e.next=1;break}return e.next=1,a.default.prototype.$ftvsApiConfigInfo.selectAddressFn().then(function(e){n=e||[]});case 1:return e.abrupt("return",n);case 2:case"end":return e.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),c={name:"SelectAddress",components:{Popup:n,ListSelect:e.__vue_component__},props:{value:{type:Boolean,default:!1,required:!0,desc:"是否展示"},title:{type:String,default:"收货地址",desc:"标题"},codeTitle:{type:String,default:"添加或编辑地址",desc:"二维码标题"}},watch:{value:{handler:function(e){this.show=e,e&&this.inits()},immediate:!0},show:function(e){e||this.$refs.listSelect._tvRest(),this.$emit("input",e)}},emits:{input:function(e){return"内容变化时触发"},change:function(e){return"选中当前项"},list:function(e){return"地址数据返回"}},data:function(){return{nowIndex:null,staticSiteSelectIcon:s.staticSiteSelectIcon,staticSiteUnSelectIcon:s.staticSiteUnSelectIcon,list:[],QrPath:"",show:!1}},getList:function(){return e._asyncToGenerator(e.regenerator.mark(function t(){return e.regenerator.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,o();case 1:return e.abrupt("return",e.sent);case 2:case"end":return e.stop()}},t)}))()},methods:{getList:o,change:function(e){this.show=!1,this.$emit("change",e)},onFocus:function(e){var t=e.index;this.nowIndex=t},inits:function(){var t=this;return e._asyncToGenerator(e.regenerator.mark(function n(){var s;return e.regenerator.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:o().then(function(e){t.list=e,t.$emit("list",t.list)}),t.$ftvsApiConfigInfo.qrCodePathFn&&(s=t.$ftvsApiConfigInfo.qrCodePathFn(),t.QrPath=s.weAppSitePath);case 1:case"end":return e.stop()}},n)}))()}}},u=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Popup",{class:e.$style.popup,model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[n("div",{class:e.$style.select_address},[n("ListSelect",{ref:"listSelect",attrs:{list:e.list,qrPath:e.QrPath,title:e.title,codeTitle:e.codeTitle},on:{onFocus:e.onFocus,change:e.change},scopedSlots:e._u([{key:"item",fn:function(t){var s=t.item,r=t.index;return[n("div",{class:[e.$style.item_title]},[n("img",{directives:[{name:"show",rawName:"v-show",value:e.nowIndex===r,expression:"nowIndex === index"}],attrs:{src:e.staticSiteSelectIcon}}),e._v(" "),n("img",{directives:[{name:"show",rawName:"v-show",value:e.nowIndex!==r,expression:"nowIndex !== index"}],attrs:{src:e.staticSiteUnSelectIcon}}),e._v(" "),n("div",[e._v("\n "+e._s(s.detail)+"\n ")])]),e._v(" "),n("div",{class:[e.$style.item_content,e.nowIndex===r&&e.$style.item_active]},[n("span",[e._v(e._s(s.receiver))]),e._v(" "),n("span",[e._v(e._s(s.phoneNo))]),e._v(" "),s.defaultFlag?n("span",{class:e.$style.def_text},[e._v("默认")]):e._e()])]}}])})],1)])};u._withStripped=!0;var d=function(e){e&&(e("data-v-2e080928_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{popup:"packages-SelectAddress-popup-23a2",select_address:"packages-SelectAddress-select_address-3v1d",item_title:"packages-SelectAddress-item_title-1zWy",item_content:"packages-SelectAddress-item_content-kXYo",def_text:"packages-SelectAddress-def_text-2xeo",item_active:"packages-SelectAddress-item_active-3Xn3"}}))},l=r.normalizeComponent({render:u,staticRenderFns:[]},d,c,undefined,false,undefined,!1,r.createInjector,void 0,void 0);module.exports=l;
|
package/lib/cjs/index.css
CHANGED
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
overflow-y: scroll;
|
|
22
22
|
flex: 1;
|
|
23
23
|
}
|
|
24
|
+
.packages-ListSelect-list_select-83QA .packages-ListSelect-content-g6tF .packages-ListSelect-left-3xR9::-webkit-scrollbar {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
24
27
|
.packages-ListSelect-list_select-83QA .packages-ListSelect-content-g6tF .packages-ListSelect-left-3xR9 .packages-ListSelect-item-1TtQ {
|
|
25
28
|
display: flex;
|
|
26
29
|
align-items: center;
|
|
@@ -111,10 +114,10 @@
|
|
|
111
114
|
color: rgba(0, 0, 0, 0.9);
|
|
112
115
|
line-height: 42px;
|
|
113
116
|
}
|
|
114
|
-
.packages-
|
|
117
|
+
.packages-FileBag-popup-Hc07 {
|
|
115
118
|
background-color: transparent !important;
|
|
116
119
|
}
|
|
117
|
-
.packages-
|
|
120
|
+
.packages-FileBag-file-bag-xapd {
|
|
118
121
|
width: 1640px;
|
|
119
122
|
height: 824px;
|
|
120
123
|
box-sizing: border-box;
|
|
@@ -123,45 +126,8 @@
|
|
|
123
126
|
border-radius: 24px;
|
|
124
127
|
border: 1px solid rgba(255, 255, 255, 0.5);
|
|
125
128
|
}
|
|
126
|
-
.packages-
|
|
127
|
-
|
|
128
|
-
align-items: center;
|
|
129
|
-
font-family: MiSans-Semibold;
|
|
130
|
-
font-weight: 600;
|
|
131
|
-
font-size: 32px;
|
|
132
|
-
line-height: 42px;
|
|
133
|
-
}
|
|
134
|
-
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_title-1zWy img {
|
|
135
|
-
width: 32px;
|
|
136
|
-
height: 32px;
|
|
137
|
-
margin-right: 10px;
|
|
138
|
-
}
|
|
139
|
-
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_content-kXYo {
|
|
140
|
-
display: flex;
|
|
141
|
-
align-items: center;
|
|
142
|
-
font-family: MiSans-regular;
|
|
143
|
-
font-weight: 400;
|
|
144
|
-
font-size: 32px;
|
|
145
|
-
color: rgba(255, 255, 255, 0.6);
|
|
146
|
-
line-height: 42px;
|
|
147
|
-
padding-left: 42px;
|
|
148
|
-
margin-top: 16px;
|
|
149
|
-
}
|
|
150
|
-
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_content-kXYo span {
|
|
151
|
-
margin-right: 20px;
|
|
152
|
-
}
|
|
153
|
-
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_content-kXYo .packages-SelectAddress-def_text-2xeo {
|
|
154
|
-
font-family: MiSans-regular;
|
|
155
|
-
font-weight: 400;
|
|
156
|
-
font-size: 20px;
|
|
157
|
-
color: #ffffff;
|
|
158
|
-
line-height: 27px;
|
|
159
|
-
padding: 2px 10px;
|
|
160
|
-
background: #cc522c;
|
|
161
|
-
border-radius: 7px;
|
|
162
|
-
}
|
|
163
|
-
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_active-3Xn3 {
|
|
164
|
-
color: rgba(0, 0, 0, 0.9);
|
|
129
|
+
.packages-Popup-popup-1uSf {
|
|
130
|
+
background-color: transparent !important;
|
|
165
131
|
}
|
|
166
132
|
.packages-Picker-picker-3oJS {
|
|
167
133
|
background-color: transparent !important;
|
|
@@ -198,13 +164,10 @@
|
|
|
198
164
|
background: #ffffff;
|
|
199
165
|
color: rgba(0, 0, 0, 0.9);
|
|
200
166
|
}
|
|
201
|
-
.packages-
|
|
202
|
-
background-color: transparent !important;
|
|
203
|
-
}
|
|
204
|
-
.packages-FileBag-popup-Hc07 {
|
|
167
|
+
.packages-SelectAddress-popup-23a2 {
|
|
205
168
|
background-color: transparent !important;
|
|
206
169
|
}
|
|
207
|
-
.packages-
|
|
170
|
+
.packages-SelectAddress-select_address-3v1d {
|
|
208
171
|
width: 1640px;
|
|
209
172
|
height: 824px;
|
|
210
173
|
box-sizing: border-box;
|
|
@@ -213,6 +176,46 @@
|
|
|
213
176
|
border-radius: 24px;
|
|
214
177
|
border: 1px solid rgba(255, 255, 255, 0.5);
|
|
215
178
|
}
|
|
179
|
+
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_title-1zWy {
|
|
180
|
+
display: flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
font-family: MiSans-Semibold;
|
|
183
|
+
font-weight: 600;
|
|
184
|
+
font-size: 32px;
|
|
185
|
+
line-height: 42px;
|
|
186
|
+
}
|
|
187
|
+
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_title-1zWy img {
|
|
188
|
+
width: 32px;
|
|
189
|
+
height: 32px;
|
|
190
|
+
margin-right: 10px;
|
|
191
|
+
}
|
|
192
|
+
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_content-kXYo {
|
|
193
|
+
display: flex;
|
|
194
|
+
align-items: center;
|
|
195
|
+
font-family: MiSans-regular;
|
|
196
|
+
font-weight: 400;
|
|
197
|
+
font-size: 32px;
|
|
198
|
+
color: rgba(255, 255, 255, 0.6);
|
|
199
|
+
line-height: 42px;
|
|
200
|
+
padding-left: 42px;
|
|
201
|
+
margin-top: 16px;
|
|
202
|
+
}
|
|
203
|
+
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_content-kXYo span {
|
|
204
|
+
margin-right: 20px;
|
|
205
|
+
}
|
|
206
|
+
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_content-kXYo .packages-SelectAddress-def_text-2xeo {
|
|
207
|
+
font-family: MiSans-regular;
|
|
208
|
+
font-weight: 400;
|
|
209
|
+
font-size: 20px;
|
|
210
|
+
color: #ffffff;
|
|
211
|
+
line-height: 27px;
|
|
212
|
+
padding: 2px 10px;
|
|
213
|
+
background: #cc522c;
|
|
214
|
+
border-radius: 7px;
|
|
215
|
+
}
|
|
216
|
+
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_active-3Xn3 {
|
|
217
|
+
color: rgba(0, 0, 0, 0.9);
|
|
218
|
+
}
|
|
216
219
|
.packages-Button-button-1dIW {
|
|
217
220
|
display: inline-block;
|
|
218
221
|
font-family: MiSans-regular;
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Popup.js"),n=require("./Picker.js"),t=require("./SelectAddress.js"),r=require("./ListSelect-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Popup.js"),n=require("./Picker.js"),t=require("./SelectAddress.js"),r=require("./ListSelect-b31b9dfc.js");require("vue");var o=require("./Button.js"),s=require("./FileBag.js");require("vant"),require("./browser-452735a2.js"),require("./utils.js"),require("./staticImg.js"),e.install=function(n){n.component(e.name,e)};var i=e;n.install=function(e){e.component(n.name,n)};var u=n;t.install=function(e){e.component(t.name,t)};var a=t;r.__vue_component__.install=function(e){e.component(r.__vue_component__.name,r.__vue_component__)};var c=r.__vue_component__;o.install=function(e){e.component(o.name,o)};var p=o;s.install=function(e){e.component(s.name,s)};var _=s;exports.Button=p,exports.FileBag=_,exports.ListSelect=c,exports.Picker=u,exports.Popup=i,exports.SelectAddress=a;
|
package/lib/esm/Button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,c as t}from"./browser-
|
|
1
|
+
import{n as e,c as t}from"./browser-dba31c0f.js";var a={name:"Button",props:{type:{type:String,default:"default",desc:"default | danger"}},emits:{click:function(e){return"点击事件"}},methods:{},mounted:function(){}},n=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{directives:[{name:"focusable",rawName:"v-focusable"}],class:[e.$style.button,e.$style[e.type]],on:{click:function(t){return e.$emit("click")}}},[e._t("default")],2)};n._withStripped=!0;var d=e({render:n,staticRenderFns:[]},function(e){e&&(e("data-v-aff05d48_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{button:"packages-Button-button-1dIW",default:"packages-Button-default-Zf6U",danger:"packages-Button-danger-1SaJ"}}))},a,undefined,false,undefined,!1,t,void 0,void 0);export{d as default};
|
package/lib/esm/FileBag.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,a as e,r as i}from"./ListSelect-
|
|
1
|
+
import{_ as t,a as e,r as i}from"./ListSelect-f0abbab6.js";import s from"./Popup.js";import{n,c as a}from"./browser-dba31c0f.js";import"./utils.js";import"vue";import"./staticImg.js";import"vant";var o={name:"FileBag",components:{Popup:s,ListSelect:t},props:{value:{type:Boolean,default:!1,required:!0,desc:"是否展示"},title:{type:String,default:"请选择健康档案",desc:"标题"},codeTitle:{type:String,default:"添加或编辑档案",desc:"二维码标题"}},watch:{value:{handler:function(t){this.show=t,t&&this.inits()},immediate:!0},show:function(t){t||this.$refs.listSelect._tvRest(),this.$emit("input",t)}},emits:{input:function(t){return"内容变化时触发"},change:function(t){return"选中当前项"},list:function(t){return"地址数据返回"}},data:function(){return{list:[],QrPath:"",show:!1}},methods:{change:function(t){this.show=!1,this.$emit("change",t)},inits:function(){var t=this;return e(i.mark(function e(){var s,n;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.$ftvsApiConfigInfo.fileBagFn){e.next=2;break}return e.next=1,t.$ftvsApiConfigInfo.fileBagFn();case 1:s=e.sent,t.list=s||[],t.$emit("list",t.list);case 2:t.$ftvsApiConfigInfo.qrCodePathFn&&(n=t.$ftvsApiConfigInfo.qrCodePathFn(),t.QrPath=n.weAppHealthRecordPath);case 3:case"end":return e.stop()}},e)}))()}}},r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("Popup",{class:t.$style.popup,model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[i("div",{class:t.$style["file-bag"]},[i("ListSelect",{ref:"listSelect",attrs:{list:t.list,qrPath:t.QrPath,title:t.title,codeTitle:t.codeTitle},on:{change:t.change}})],1)])};r._withStripped=!0;var c=n({render:r,staticRenderFns:[]},function(t){t&&(t("data-v-5e8af8c4_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{popup:"packages-FileBag-popup-Hc07","file-bag":"packages-FileBag-file-bag-xapd"}}))},o,undefined,false,undefined,!1,a,void 0,void 0);export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ftvsTvScope as t}from"./utils.js";import{staticCodeIcon as e,staticSelectedIcon as r,staticWxIcon as n}from"./staticImg.js";import{n as i,c as o}from"./browser-312fc847.js";function c(t,e,r,n,i,o,c){try{var a=t[o](c),s=a.value}catch(t){return void r(t)}a.done?e(s):Promise.resolve(s).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)})}}var s={exports:{}};!function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,c=Object.create(o.prototype),a=new O(n||[]);return i(c,"_invoke",{value:$(t,r,a)}),c}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function w(){}var _={};l(_,c,function(){return this});var x=Object.getPrototypeOf,b=x&&x(x(I([])));b&&b!==r&&n.call(b,c)&&(_=b);var L=w.prototype=g.prototype=Object.create(_);function k(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function T(t,e){function r(i,o,c,a){var s=f(t[i],t,o);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==typeof u&&n.call(u,"__await")?e.resolve(u.__await).then(function(t){r("next",t,c,a)},function(t){r("throw",t,c,a)}):e.resolve(u).then(function(t){l.value=t,c(l)},function(t){return r("throw",t,c,a)})}a(s.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e(function(e,i){r(t,n,e,i)})}return o=o?o.then(i,i):i()}})}function $(t,e,r){var n=h;return function(i,o){if(n===v)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw o;return R()}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var a=E(c,r);if(a){if(a===y)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=v;var s=f(t,e,r);if("normal"===s.type){if(n=r.done?p:d,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=p,r.method="throw",r.arg=s.arg)}}}function E(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var c=o.arg;return c?c.done?(r[t.resultName]=c.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):c:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function I(t){if(t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}return{next:R}}function R(){return{value:e,done:!0}}return m.prototype=w,i(L,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:m,configurable:!0}),m.displayName=l(w,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},t.awrap=function(t){return{__await:t}},k(T.prototype),l(T.prototype,a,function(){return this}),t.AsyncIterator=T,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var c=new T(u(e,r,n,i),o);return t.isGeneratorFunction(r)?c:c.next().then(function(t){return t.done?t.value:c.next()})},k(L),l(L,s,"Generator"),l(L,c,function(){return this}),l(L,"toString",function(){return"[object Generator]"}),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=I,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(j),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o],a=c.completion;if("root"===c.tryLoc)return i("end");if(c.tryLoc<=this.prev){var s=n.call(c,"catchLoc"),l=n.call(c,"finallyLoc");if(s&&l){if(this.prev<c.catchLoc)return i(c.catchLoc,!0);if(this.prev<c.finallyLoc)return i(c.finallyLoc)}else if(s){if(this.prev<c.catchLoc)return i(c.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return i(c.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var c=o?o.completion:{};return c.type=t,c.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;j(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(s);var l=s.exports,u={name:"ListSelect",props:{value:{type:Object,default:function(){return{}},desc:"当前选中项"},list:{type:Array,required:!0,desc:"属性说明"},title:{type:String,default:"",desc:"标题"},codeTitle:{type:String,default:"",desc:"二维码标题"},qrPath:{type:String,default:"",desc:"二维码链接"}},watch:{qrPath:{handler:function(t){this.initQr(t)},immediate:!0},value:{handler:function(t){var e=this.findObjectIndex(this.list,t);e>-1&&(this.selectIndex=e)},immediate:!0},list:{handler:function(t){t.length&&this.inits()},immediate:!0}},emits:{change:function(t){return"选中当前项"},input:function(t){return"内容变化时触发"},onFocus:function(t){return"获得当前焦点所在项"}},slots:{item:{desc:"列表元素"},hint:{desc:"二维码下方提示"}},data:function(){var i=t.apply(this);return{ftvsTvInit:i.ftvsTvInit,ftvsTvReset:i.ftvsTvReset,qrcodeThis:void 0,QRCode:null,selectIndex:null,staticCodeIcon:e,selected:r,wxIcon:n}},methods:{initQr:function(t){var e=this;return a(l.mark(function r(){var n;return l.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(null!==e.QRCode){r.next=2;break}return r.next=1,import("qrcodejs2");case 1:e.QRCode=r.sent.default;case 2:if(t){r.next=3;break}return r.abrupt("return");case 3:n={text:t,width:314,height:316,colorDark:"#000000",colorLight:"#ffffff",correctLevel:e.QRCode.CorrectLevel.H},void 0!==e.qrcodeThis?(e.qrcodeThis.clear(),e.qrcodeThis.makeCode(t)):e.qrcodeThis=new e.QRCode(e.$refs.ftvsQrCode,n),e.$nextTick(function(){e.forceRepaint(e.$refs.ftvsQrCode)});case 4:case"end":return r.stop()}},r)}))()},forceRepaint:function(t){t.style.display="none",t.offsetHeight,t.style.display="flex"},findObjectIndex:function(t,e){return t.findIndex(function(t){return Object.keys(e).every(function(r){return t[r]===e[r]})})},_tvRest:function(){this.ftvsTvReset()},change:function(t,e){this.selectIndex=e,this.$emit("input",t),this.$emit("change",{item:t,index:e}),this.ftvsTvReset()},onFocus:function(t,e){this.$emit("onFocus",{item:t,index:e})},inits:function(){var t=this;return a(l.mark(function e(){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.$nextTick(a(l.mark(function e(){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.ftvsTvInit({distanceToCenter:!0,scrollEl:t.$refs.left,limitingEl:t.$refs.left},function(){var e=t.$refs.left,r=e?e.querySelectorAll(".".concat(t.$style.item)):null;r&&r.length&&t.$tv.next(r[t.selectIndex||0])});case 1:case"end":return e.stop()}},e)})));case 1:case"end":return e.stop()}},e)}))()}},beforeDestroy:function(){this.ftvsTvReset()},mounted:function(){}},f=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{class:t.$style.list_select},[t.title?r("div",{class:t.$style.title},[t._v(t._s(t.title))]):t._e(),t._v(" "),r("div",{class:t.$style.content},[t.list.length?r("div",{ref:"left",class:t.$style.left},t._l(t.list,function(e,n){return r("div",{directives:[{name:"focusable",rawName:"v-focusable"}],key:n+"-ftvs-file-bg-list",class:t.$style.item,on:{click:function(r){return t.change(e,n)},onFocus:function(r){return t.onFocus(e,n)}}},[r("div",{class:t.$style.item_l},[t._t("item",function(){return[r("div",[t._v("\n "+t._s(e.memberName)+" "+t._s(e.sexText)+" "+t._s(e.age)+"岁\n ")])]},{item:e,index:n})],2),t._v(" "),n===t.selectIndex?r("img",{class:t.$style.selected,attrs:{src:t.selected}}):t._e()])}),0):t._e(),t._v(" "),r("div",{class:t.$style.right,style:{background:"url('"+t.staticCodeIcon+"')"}},[r("div",{class:t.$style.r_div},[r("div",{class:t.$style.r_title},[t._v(t._s(t.codeTitle))]),t._v(" "),r("div",{ref:"ftvsQrCode",class:t.$style.img_code}),t._v(" "),t._t("hint",function(){return[r("div",{class:t.$style.r_hint},[r("img",{attrs:{src:t.wxIcon}}),t._v("\n 使用微信扫码\n ")])]})],2)])])])};f._withStripped=!0;var h=i({render:f,staticRenderFns:[]},function(t){t&&(t("data-v-11259aeb_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{list_select:"packages-ListSelect-list_select-83QA",title:"packages-ListSelect-title-eOZz",content:"packages-ListSelect-content-g6tF",left:"packages-ListSelect-left-3xR9",item:"packages-ListSelect-item-1TtQ",item_l:"packages-ListSelect-item_l-2OUN",selected:"packages-ListSelect-selected-1V7w",right:"packages-ListSelect-right-3GvU",r_div:"packages-ListSelect-r_div-2m0w",img_code:"packages-ListSelect-img_code-24n2",r_title:"packages-ListSelect-r_title-12wf",r_hint:"packages-ListSelect-r_hint-189D"}}))},u,undefined,false,undefined,!1,o,void 0,void 0);export{h as _,a,l as r};
|
|
1
|
+
import{ftvsTvScope as t}from"./utils.js";import{staticCodeIcon as e,staticSelectedIcon as r,staticWxIcon as n}from"./staticImg.js";import{n as i,c as o}from"./browser-dba31c0f.js";function c(t,e,r,n,i,o,c){try{var a=t[o](c),s=a.value}catch(t){return void r(t)}a.done?e(s):Promise.resolve(s).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)})}}var s={exports:{}};!function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,c=Object.create(o.prototype),a=new O(n||[]);return i(c,"_invoke",{value:$(t,r,a)}),c}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function w(){}var _={};l(_,c,function(){return this});var x=Object.getPrototypeOf,b=x&&x(x(I([])));b&&b!==r&&n.call(b,c)&&(_=b);var L=w.prototype=g.prototype=Object.create(_);function k(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function T(t,e){function r(i,o,c,a){var s=f(t[i],t,o);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==typeof u&&n.call(u,"__await")?e.resolve(u.__await).then(function(t){r("next",t,c,a)},function(t){r("throw",t,c,a)}):e.resolve(u).then(function(t){l.value=t,c(l)},function(t){return r("throw",t,c,a)})}a(s.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e(function(e,i){r(t,n,e,i)})}return o=o?o.then(i,i):i()}})}function $(t,e,r){var n=h;return function(i,o){if(n===v)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw o;return R()}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var a=E(c,r);if(a){if(a===y)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=v;var s=f(t,e,r);if("normal"===s.type){if(n=r.done?p:d,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=p,r.method="throw",r.arg=s.arg)}}}function E(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var c=o.arg;return c?c.done?(r[t.resultName]=c.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):c:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function I(t){if(t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}return{next:R}}function R(){return{value:e,done:!0}}return m.prototype=w,i(L,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:m,configurable:!0}),m.displayName=l(w,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},t.awrap=function(t){return{__await:t}},k(T.prototype),l(T.prototype,a,function(){return this}),t.AsyncIterator=T,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var c=new T(u(e,r,n,i),o);return t.isGeneratorFunction(r)?c:c.next().then(function(t){return t.done?t.value:c.next()})},k(L),l(L,s,"Generator"),l(L,c,function(){return this}),l(L,"toString",function(){return"[object Generator]"}),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=I,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(j),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o],a=c.completion;if("root"===c.tryLoc)return i("end");if(c.tryLoc<=this.prev){var s=n.call(c,"catchLoc"),l=n.call(c,"finallyLoc");if(s&&l){if(this.prev<c.catchLoc)return i(c.catchLoc,!0);if(this.prev<c.finallyLoc)return i(c.finallyLoc)}else if(s){if(this.prev<c.catchLoc)return i(c.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return i(c.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var c=o?o.completion:{};return c.type=t,c.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;j(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(s);var l=s.exports,u={name:"ListSelect",props:{value:{type:Object,default:function(){return{}},desc:"当前选中项"},list:{type:Array,required:!0,desc:"属性说明"},title:{type:String,default:"",desc:"标题"},codeTitle:{type:String,default:"",desc:"二维码标题"},qrPath:{type:String,default:"",desc:"二维码链接"}},watch:{qrPath:{handler:function(t){this.initQr(t)},immediate:!0},value:{handler:function(t){var e=this.findObjectIndex(this.list,t);e>-1&&(this.selectIndex=e)},immediate:!0},list:{handler:function(t){t.length&&this.inits()},immediate:!0}},emits:{change:function(t){return"选中当前项"},input:function(t){return"内容变化时触发"},onFocus:function(t){return"获得当前焦点所在项"}},slots:{item:{desc:"列表元素"},hint:{desc:"二维码下方提示"}},data:function(){var i=t.apply(this);return{ftvsTvInit:i.ftvsTvInit,ftvsTvReset:i.ftvsTvReset,qrcodeThis:void 0,QRCode:null,selectIndex:null,staticCodeIcon:e,selected:r,wxIcon:n}},methods:{initQr:function(t){var e=this;return a(l.mark(function r(){var n;return l.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(null!==e.QRCode){r.next=2;break}return r.next=1,import("qrcodejs2");case 1:e.QRCode=r.sent.default;case 2:if(t){r.next=3;break}return r.abrupt("return");case 3:n={text:t,width:314,height:316,colorDark:"#000000",colorLight:"#ffffff",correctLevel:e.QRCode.CorrectLevel.H},void 0!==e.qrcodeThis?(e.qrcodeThis.clear(),e.qrcodeThis.makeCode(t)):e.qrcodeThis=new e.QRCode(e.$refs.ftvsQrCode,n),e.$nextTick(function(){e.forceRepaint(e.$refs.ftvsQrCode)});case 4:case"end":return r.stop()}},r)}))()},forceRepaint:function(t){t.style.display="none",t.offsetHeight,t.style.display="flex"},findObjectIndex:function(t,e){return t.findIndex(function(t){return Object.keys(e).every(function(r){return t[r]===e[r]})})},_tvRest:function(){this.ftvsTvReset()},change:function(t,e){this.selectIndex=e,this.$emit("input",t),this.$emit("change",{item:t,index:e}),this.ftvsTvReset()},onFocus:function(t,e){this.$emit("onFocus",{item:t,index:e})},inits:function(){var t=this;return a(l.mark(function e(){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.$nextTick(a(l.mark(function e(){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.ftvsTvInit({distanceToCenter:!0,scrollEl:t.$refs.left,limitingEl:t.$refs.left},function(){var e=t.$refs.left,r=e?e.querySelectorAll(".".concat(t.$style.item)):null;r&&r.length&&t.$tv.next(r[t.selectIndex||0])});case 1:case"end":return e.stop()}},e)})));case 1:case"end":return e.stop()}},e)}))()}},beforeDestroy:function(){this.ftvsTvReset()},mounted:function(){}},f=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{class:t.$style.list_select},[t.title?r("div",{class:t.$style.title},[t._v(t._s(t.title))]):t._e(),t._v(" "),r("div",{class:t.$style.content},[t.list.length?r("div",{ref:"left",class:t.$style.left},t._l(t.list,function(e,n){return r("div",{directives:[{name:"focusable",rawName:"v-focusable"}],key:n+"-ftvs-file-bg-list",class:t.$style.item,on:{click:function(r){return t.change(e,n)},onFocus:function(r){return t.onFocus(e,n)}}},[r("div",{class:t.$style.item_l},[t._t("item",function(){return[r("div",[t._v("\n "+t._s(e.memberName)+" "+t._s(e.sexText)+" "+t._s(e.age)+"岁\n ")])]},{item:e,index:n})],2),t._v(" "),n===t.selectIndex?r("img",{class:t.$style.selected,attrs:{src:t.selected}}):t._e()])}),0):t._e(),t._v(" "),r("div",{class:t.$style.right,style:{background:"url('"+t.staticCodeIcon+"')"}},[r("div",{class:t.$style.r_div},[r("div",{class:t.$style.r_title},[t._v(t._s(t.codeTitle))]),t._v(" "),r("div",{ref:"ftvsQrCode",class:t.$style.img_code}),t._v(" "),t._t("hint",function(){return[r("div",{class:t.$style.r_hint},[r("img",{attrs:{src:t.wxIcon}}),t._v("\n 使用微信扫码\n ")])]})],2)])])])};f._withStripped=!0;var h=i({render:f,staticRenderFns:[]},function(t){t&&(t("data-v-34ece6c8_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{list_select:"packages-ListSelect-list_select-83QA",title:"packages-ListSelect-title-eOZz",content:"packages-ListSelect-content-g6tF",left:"packages-ListSelect-left-3xR9",item:"packages-ListSelect-item-1TtQ",item_l:"packages-ListSelect-item_l-2OUN",selected:"packages-ListSelect-selected-1V7w",right:"packages-ListSelect-right-3GvU",r_div:"packages-ListSelect-r_div-2m0w",img_code:"packages-ListSelect-img_code-24n2",r_title:"packages-ListSelect-r_title-12wf",r_hint:"packages-ListSelect-r_hint-189D"}}))},u,undefined,false,undefined,!1,o,void 0,void 0);export{h as _,a,l as r};
|
package/lib/esm/ListSelect.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{_ as default}from"./ListSelect-
|
|
1
|
+
export{_ as default}from"./ListSelect-f0abbab6.js";import"./browser-dba31c0f.js";import"./utils.js";import"vue";import"./staticImg.js";
|
package/lib/esm/Picker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Picker as t}from"vant";import{ftvsTvScope as n,ftvsPxToRem as e}from"./utils.js";import{n as s,c as o}from"./browser-
|
|
1
|
+
import{Picker as t}from"vant";import{ftvsTvScope as n,ftvsPxToRem as e}from"./utils.js";import{n as s,c as o}from"./browser-dba31c0f.js";import"vue";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var u={name:"Picker",components:{vantPicker:t},props:{valueKey:{type:String,default:"text",desc:"选项对象中,选项文字对应的键名"},columns:{type:Array,required:!0,desc:"对象数组,配置每一列显示的数据"}},emits:{confirm:function(t){return"最后一列选项改变时触发,单列:Picker 实例,选中值,选中值对应的索引\n多列:Picker 实例,所有列选中值,当前列对应的索引"}},data:function(){var t=n.apply(this);return{ftvsTvInit:t.ftvsTvInit,ftvsTvReset:t.ftvsTvReset,itemHeight:e(130),isMove:!1,visibleItemCount:6,tvColumns:[],columnsNum:null,nowColumnsIndex:0,columnsType:"singleRow",isTree:!1}},computed:{nowColumns:function(){return this.tvColumns[this.nowColumnsIndex]}},watch:{columns:{handler:function(t){var n=this;t.length&&this.$nextTick(function(){n.init()})},immediate:!0,deep:!0}},methods:{setPracticalIndex:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.getColumnsIndexes(),e=t||this.nowColumnsIndex;this.tvColumns[e].focusIndex=n[e]||null},selectVal:function(t){var n,e=this,s=t.target,o=s.parentNode,i=o.parentNode,u=null===(n=Array.from(null==i?void 0:i.children))||void 0===n?void 0:n.indexOf(o),l=Number(s.parentNode.parentNode.getAttribute("data-tv-index"));this.nowColumnsIndex=l,this.$set(this.tvColumns[l],"focusIndex",u),this.setNowColumnsFocus(),this.$refs.vantPicker.setColumnIndex(this.nowColumnsIndex,this.nowColumns.focusIndex),this.isTree&&this.resetColumnFocusIndex();var r,c=this.$refs.vantPicker.getValues();r="singleRow"===this.columnsType?c[0]:this.isTree?c.map(function(t){return t[e.valueKey]}):c,this.emitVal(r)},emitVal:function(t){var n=this;if(this.nowColumnsIndex+1===this.columnsNum){var e=[];try{e=this.$refs.vantPicker.getColumnValue(this.nowColumnsIndex)}catch(t){}var s={currentOption:e,selectedValues:t,selectedOptions:this.getColumnValues(this.nowColumnsIndex),selectedIndexes:this.getColumnsIndexes()};this.$emit("confirm",s),this.ftvsTvReset()}var o=this.tvColumns[this.nowColumnsIndex+1];o&&o.dom&&this.$nextTick(function(){n.updateColumns(o.dom,n.nowColumnsIndex+1,o.focusIndex)})},toUp:function(){this.nowColumns.focusIndex>0&&(this.tvColumns[this.nowColumnsIndex].focusIndex--,this.setNowColumnsFocus(),this.move(this.nowColumns.focusIndex))},toLeft:function(){this.nowColumnsIndex>0&&(this.nowColumnsIndex--,this.setPracticalIndex(this.nowColumnsIndex+1),this.setNowColumnsFocus())},toRight:function(){this.nowColumnsIndex<this.tvColumns.length-1&&(this.nowColumnsIndex++,this.setNowColumnsFocus())},toDown:function(){this.nowColumns.focusIndex<this.nowColumns.focusNum-1&&(this.tvColumns[this.nowColumnsIndex].focusIndex++,this.setNowColumnsFocus(),this.move(this.nowColumns.focusIndex))},getColumnsIndexes:function(){return this.$refs.vantPicker.getIndexes()},getColumnValues:function(t){return this.$refs.vantPicker.getColumnValues(t)},resetColumnFocusIndex:function(){for(var t=this.nowColumnsIndex;t<this.tvColumns.length-1;t++)this.tvColumns[t+1].focusIndex=0},move:function(t){var n=this,e=this.$refs.vantPicker,s=e.children[this.nowColumnsIndex].options,o=e.children[this.nowColumnsIndex].itemHeight,i=function(t,n){var e,s,o;e=n,s=0,o=t.length;for(var i=n=Math.min(Math.max(e,s),o);i<t.length;i++)if(!t[i].disabled)return i;for(var u=n-1;u>=0;u--)if(!t[u].disabled)return u;return 0},u=function(t){return-i(s,t)*o+o*(n.visibleItemCount-1)/2}(t);this.nowColumns.dom.style.webkitTtransitionDuration="0ms",this.nowColumns.dom.style.webkitTransitionProperty="none",this.nowColumns.dom.style.webkitTransform="translate3d(0px, ".concat(u,"px, 0px)")},setNowColumnsFocus:function(){var t=this.tvColumns[this.nowColumnsIndex];null===t.focusIndex&&(t.focusIndex=this.getColumnsIndexes()[this.nowColumnsIndex]);var n=t.dom.querySelectorAll("li")[t.focusIndex].children[0];this.$tv.next(n),this.isMove=!0},setColumnsType:function(){var t=this.columns[0];"object"===i(t)&&(t.hasOwnProperty("children")||t.hasOwnProperty("values"))&&(t.hasOwnProperty("children")&&(this.isTree=!0),this.columnsType="multiColumn")},againFocus:function(){this.isMove&&(this.ftvsTvInit(),this.setNowColumnsFocus())},updateColumns:function(t,n){this.tvColumns[n].focusNum=t.querySelectorAll("li").length},init:function(){this.ftvsTvInit(),this.setColumnsType();var t="singleRow"===this.columnsType,n=document.querySelector("."+this.$style.picker).querySelectorAll("ul");this.columnsNum=t?1:n.length;for(var e=0;e<this.columnsNum;e++){var s=n[e];s.setAttribute("data-tv-index",e),this.$set(this.tvColumns,e,{focusIndex:null,focusNum:s.querySelectorAll("li").length,dom:s})}this.setNowColumnsFocus()}},beforeDestroy:function(){this.ftvsTvReset()},mounted:function(){}},l=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("vantPicker",{ref:"vantPicker",class:t.$style.picker,attrs:{columns:t.columns,"value-key":t.valueKey,"item-height":t.itemHeight},scopedSlots:t._u([{key:"option",fn:function(n){return[e("div",{directives:[{name:"focusable",rawName:"v-focusable"}],class:t.$style.column_item,on:{up:t.toUp,left:t.toLeft,right:t.toRight,down:t.toDown,click:t.selectVal}},["string"==typeof n?[t._v("\n "+t._s(n)+"\n ")]:[t._v(t._s(n[t.valueKey]))]],2)]}}])})};l._withStripped=!0;var r=s({render:l,staticRenderFns:[]},function(t){t&&(t("data-v-fb7f4ec2_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{picker:"packages-Picker-picker-3oJS",column_item:"packages-Picker-column_item-3Wh4"}}))},u,undefined,false,undefined,!1,o,void 0,void 0);export{r as default};
|
package/lib/esm/Popup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Popup as e}from"vant";import{n as o,c as t}from"./browser-
|
|
1
|
+
import{Popup as e}from"vant";import{n as o,c as t}from"./browser-dba31c0f.js";var n={name:"Popup",components:{vantPopup:e},props:{value:{type:Boolean,required:!0,desc:"属性说明"},position:{type:String,default:"center",desc:"弹出位置,可选值为 top bottom right left"},closeable:{type:Boolean,default:!1,desc:"是否显示关闭图标"},getContainer:{type:String,desc:"挂载节点, 使用 get-container 属性的组件不能为根节点"},overlay:{type:Boolean,default:!0,desc:"是否显示遮罩层"},duration:{type:[Number,String],default:.3,desc:"动画时长,单位秒"},overlayClass:{type:String,desc:"自定义遮罩层类名"},overlayStyle:{type:Object,default:function(){return{backgroundColor:"#151d2b"}},desc:"自定义遮罩层样式"},closeOnPopstate:{type:Boolean,default:!1,desc:"是否在页面回退时自动关闭"},closeOnClickOverlay:{type:Boolean,default:!1,desc:"是否在点击遮罩层后关闭"}},emits:{clickCloseIcon:function(e){return"点击关闭图标时触发"},click:function(e){return"点击弹出层时触发"},clickOverlay:function(){return"点击遮罩层时触发"},open:function(){return"打开弹出层时触发"},close:function(){return"关闭弹出层时触发"},opened:function(){return"打开弹出层且动画结束后触发"},closed:function(){return"关闭弹出层且动画结束后触发"}},data:function(){return{show:!1}},watch:{value:{handler:function(e){this.show=e},immediate:!0},show:{handler:function(e){this.$emit("input",e)}}},methods:{clickCloseIcon:function(e){this.$emit("clickCloseIcon",e)},click:function(e){this.$emit("click",e)},clickOverlay:function(){this.$emit("clickOverlay")},open:function(){this.$emit("open")},close:function(){this.$emit("close")},opened:function(){this.$emit("opened")},closed:function(){this.$emit("closed")}},mounted:function(){}},c=function(){var e=this,o=e.$createElement;return(e._self._c||o)("vantPopup",{class:e.$style.popup,attrs:{position:e.position,closeable:e.closeable,"get-container":e.getContainer,overlay:e.overlay,"overlay-class":e.overlayClass,"overlay-style":e.overlayStyle,"close-on-popstate":e.closeOnPopstate,"close-on-click-overlay":e.closeOnClickOverlay,duration:e.duration},on:{"click-close-icon":e.clickCloseIcon,click:e.click,"click-overlay":e.clickOverlay,open:e.open,close:e.close,opened:e.opened,closed:e.closed},model:{value:e.show,callback:function(o){e.show=o},expression:"show"}},[e._t("default")],2)};c._withStripped=!0;var l=o({render:c,staticRenderFns:[]},function(e){e&&(e("data-v-77af2cd1_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{popup:"packages-Popup-popup-1uSf"}}))},n,undefined,false,undefined,!1,t,void 0,void 0);export{l as default};
|
package/lib/esm/SelectAddress.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t,r as n}from"./ListSelect-
|
|
1
|
+
import{_ as e,a as t,r as n}from"./ListSelect-f0abbab6.js";import s from"vue";import i from"./Popup.js";import{staticSiteSelectIcon as r,staticSiteUnSelectIcon as a}from"./staticImg.js";import{n as o,c}from"./browser-dba31c0f.js";import"./utils.js";import"vant";var d=function(){var e=t(n.mark(function e(){var t;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=[],!s.prototype.$ftvsApiConfigInfo.selectAddressFn){e.next=1;break}return e.next=1,s.prototype.$ftvsApiConfigInfo.selectAddressFn().then(function(e){t=e||[]});case 1:return e.abrupt("return",t);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),u={name:"SelectAddress",components:{Popup:i,ListSelect:e},props:{value:{type:Boolean,default:!1,required:!0,desc:"是否展示"},title:{type:String,default:"收货地址",desc:"标题"},codeTitle:{type:String,default:"添加或编辑地址",desc:"二维码标题"}},watch:{value:{handler:function(e){this.show=e,e&&this.inits()},immediate:!0},show:function(e){e||this.$refs.listSelect._tvRest(),this.$emit("input",e)}},emits:{input:function(e){return"内容变化时触发"},change:function(e){return"选中当前项"},list:function(e){return"地址数据返回"}},data:function(){return{nowIndex:null,staticSiteSelectIcon:r,staticSiteUnSelectIcon:a,list:[],QrPath:"",show:!1}},getList:function(){return t(n.mark(function e(){return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,d();case 1:return e.abrupt("return",e.sent);case 2:case"end":return e.stop()}},e)}))()},methods:{getList:d,change:function(e){this.show=!1,this.$emit("change",e)},onFocus:function(e){var t=e.index;this.nowIndex=t},inits:function(){var e=this;return t(n.mark(function t(){var s;return n.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:d().then(function(t){e.list=t,e.$emit("list",e.list)}),e.$ftvsApiConfigInfo.qrCodePathFn&&(s=e.$ftvsApiConfigInfo.qrCodePathFn(),e.QrPath=s.weAppSitePath);case 1:case"end":return t.stop()}},t)}))()}}},l=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Popup",{class:e.$style.popup,model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[n("div",{class:e.$style.select_address},[n("ListSelect",{ref:"listSelect",attrs:{list:e.list,qrPath:e.QrPath,title:e.title,codeTitle:e.codeTitle},on:{onFocus:e.onFocus,change:e.change},scopedSlots:e._u([{key:"item",fn:function(t){var s=t.item,i=t.index;return[n("div",{class:[e.$style.item_title]},[n("img",{directives:[{name:"show",rawName:"v-show",value:e.nowIndex===i,expression:"nowIndex === index"}],attrs:{src:e.staticSiteSelectIcon}}),e._v(" "),n("img",{directives:[{name:"show",rawName:"v-show",value:e.nowIndex!==i,expression:"nowIndex !== index"}],attrs:{src:e.staticSiteUnSelectIcon}}),e._v(" "),n("div",[e._v("\n "+e._s(s.detail)+"\n ")])]),e._v(" "),n("div",{class:[e.$style.item_content,e.nowIndex===i&&e.$style.item_active]},[n("span",[e._v(e._s(s.receiver))]),e._v(" "),n("span",[e._v(e._s(s.phoneNo))]),e._v(" "),s.defaultFlag?n("span",{class:e.$style.def_text},[e._v("默认")]):e._e()])]}}])})],1)])};l._withStripped=!0;var p=o({render:l,staticRenderFns:[]},function(e){e&&(e("data-v-2e080928_0",{source:"",map:void 0,media:void 0}),Object.defineProperty(this,"$style",{value:{popup:"packages-SelectAddress-popup-23a2",select_address:"packages-SelectAddress-select_address-3v1d",item_title:"packages-SelectAddress-item_title-1zWy",item_content:"packages-SelectAddress-item_content-kXYo",def_text:"packages-SelectAddress-def_text-2xeo",item_active:"packages-SelectAddress-item_active-3Xn3"}}))},u,undefined,false,undefined,!1,c,void 0,void 0);export{p as default};
|
package/lib/esm/index.css
CHANGED
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
overflow-y: scroll;
|
|
22
22
|
flex: 1;
|
|
23
23
|
}
|
|
24
|
+
.packages-ListSelect-list_select-83QA .packages-ListSelect-content-g6tF .packages-ListSelect-left-3xR9::-webkit-scrollbar {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
24
27
|
.packages-ListSelect-list_select-83QA .packages-ListSelect-content-g6tF .packages-ListSelect-left-3xR9 .packages-ListSelect-item-1TtQ {
|
|
25
28
|
display: flex;
|
|
26
29
|
align-items: center;
|
|
@@ -111,10 +114,10 @@
|
|
|
111
114
|
color: rgba(0, 0, 0, 0.9);
|
|
112
115
|
line-height: 42px;
|
|
113
116
|
}
|
|
114
|
-
.packages-
|
|
117
|
+
.packages-FileBag-popup-Hc07 {
|
|
115
118
|
background-color: transparent !important;
|
|
116
119
|
}
|
|
117
|
-
.packages-
|
|
120
|
+
.packages-FileBag-file-bag-xapd {
|
|
118
121
|
width: 1640px;
|
|
119
122
|
height: 824px;
|
|
120
123
|
box-sizing: border-box;
|
|
@@ -123,45 +126,8 @@
|
|
|
123
126
|
border-radius: 24px;
|
|
124
127
|
border: 1px solid rgba(255, 255, 255, 0.5);
|
|
125
128
|
}
|
|
126
|
-
.packages-
|
|
127
|
-
|
|
128
|
-
align-items: center;
|
|
129
|
-
font-family: MiSans-Semibold;
|
|
130
|
-
font-weight: 600;
|
|
131
|
-
font-size: 32px;
|
|
132
|
-
line-height: 42px;
|
|
133
|
-
}
|
|
134
|
-
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_title-1zWy img {
|
|
135
|
-
width: 32px;
|
|
136
|
-
height: 32px;
|
|
137
|
-
margin-right: 10px;
|
|
138
|
-
}
|
|
139
|
-
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_content-kXYo {
|
|
140
|
-
display: flex;
|
|
141
|
-
align-items: center;
|
|
142
|
-
font-family: MiSans-regular;
|
|
143
|
-
font-weight: 400;
|
|
144
|
-
font-size: 32px;
|
|
145
|
-
color: rgba(255, 255, 255, 0.6);
|
|
146
|
-
line-height: 42px;
|
|
147
|
-
padding-left: 42px;
|
|
148
|
-
margin-top: 16px;
|
|
149
|
-
}
|
|
150
|
-
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_content-kXYo span {
|
|
151
|
-
margin-right: 20px;
|
|
152
|
-
}
|
|
153
|
-
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_content-kXYo .packages-SelectAddress-def_text-2xeo {
|
|
154
|
-
font-family: MiSans-regular;
|
|
155
|
-
font-weight: 400;
|
|
156
|
-
font-size: 20px;
|
|
157
|
-
color: #ffffff;
|
|
158
|
-
line-height: 27px;
|
|
159
|
-
padding: 2px 10px;
|
|
160
|
-
background: #cc522c;
|
|
161
|
-
border-radius: 7px;
|
|
162
|
-
}
|
|
163
|
-
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_active-3Xn3 {
|
|
164
|
-
color: rgba(0, 0, 0, 0.9);
|
|
129
|
+
.packages-Popup-popup-1uSf {
|
|
130
|
+
background-color: transparent !important;
|
|
165
131
|
}
|
|
166
132
|
.packages-Picker-picker-3oJS {
|
|
167
133
|
background-color: transparent !important;
|
|
@@ -198,13 +164,10 @@
|
|
|
198
164
|
background: #ffffff;
|
|
199
165
|
color: rgba(0, 0, 0, 0.9);
|
|
200
166
|
}
|
|
201
|
-
.packages-
|
|
202
|
-
background-color: transparent !important;
|
|
203
|
-
}
|
|
204
|
-
.packages-FileBag-popup-Hc07 {
|
|
167
|
+
.packages-SelectAddress-popup-23a2 {
|
|
205
168
|
background-color: transparent !important;
|
|
206
169
|
}
|
|
207
|
-
.packages-
|
|
170
|
+
.packages-SelectAddress-select_address-3v1d {
|
|
208
171
|
width: 1640px;
|
|
209
172
|
height: 824px;
|
|
210
173
|
box-sizing: border-box;
|
|
@@ -213,6 +176,46 @@
|
|
|
213
176
|
border-radius: 24px;
|
|
214
177
|
border: 1px solid rgba(255, 255, 255, 0.5);
|
|
215
178
|
}
|
|
179
|
+
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_title-1zWy {
|
|
180
|
+
display: flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
font-family: MiSans-Semibold;
|
|
183
|
+
font-weight: 600;
|
|
184
|
+
font-size: 32px;
|
|
185
|
+
line-height: 42px;
|
|
186
|
+
}
|
|
187
|
+
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_title-1zWy img {
|
|
188
|
+
width: 32px;
|
|
189
|
+
height: 32px;
|
|
190
|
+
margin-right: 10px;
|
|
191
|
+
}
|
|
192
|
+
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_content-kXYo {
|
|
193
|
+
display: flex;
|
|
194
|
+
align-items: center;
|
|
195
|
+
font-family: MiSans-regular;
|
|
196
|
+
font-weight: 400;
|
|
197
|
+
font-size: 32px;
|
|
198
|
+
color: rgba(255, 255, 255, 0.6);
|
|
199
|
+
line-height: 42px;
|
|
200
|
+
padding-left: 42px;
|
|
201
|
+
margin-top: 16px;
|
|
202
|
+
}
|
|
203
|
+
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_content-kXYo span {
|
|
204
|
+
margin-right: 20px;
|
|
205
|
+
}
|
|
206
|
+
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_content-kXYo .packages-SelectAddress-def_text-2xeo {
|
|
207
|
+
font-family: MiSans-regular;
|
|
208
|
+
font-weight: 400;
|
|
209
|
+
font-size: 20px;
|
|
210
|
+
color: #ffffff;
|
|
211
|
+
line-height: 27px;
|
|
212
|
+
padding: 2px 10px;
|
|
213
|
+
background: #cc522c;
|
|
214
|
+
border-radius: 7px;
|
|
215
|
+
}
|
|
216
|
+
.packages-SelectAddress-select_address-3v1d .packages-SelectAddress-item_active-3Xn3 {
|
|
217
|
+
color: rgba(0, 0, 0, 0.9);
|
|
218
|
+
}
|
|
216
219
|
.packages-Button-button-1dIW {
|
|
217
220
|
display: inline-block;
|
|
218
221
|
font-family: MiSans-regular;
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./Popup.js";import t from"./Picker.js";import n from"./SelectAddress.js";import{_ as m}from"./ListSelect-
|
|
1
|
+
import o from"./Popup.js";import t from"./Picker.js";import n from"./SelectAddress.js";import{_ as m}from"./ListSelect-f0abbab6.js";import"vue";import i from"./Button.js";import r from"./FileBag.js";import"vant";import"./browser-dba31c0f.js";import"./utils.js";import"./staticImg.js";o.install=function(t){t.component(o.name,o)};var a=o;t.install=function(o){o.component(t.name,t)};var e=t;n.install=function(o){o.component(n.name,n)};var s=n;m.install=function(o){o.component(m.name,m)};var p=m;i.install=function(o){o.component(i.name,i)};var c=i;r.install=function(o){o.component(r.name,r)};var l=r;export{c as Button,l as FileBag,p as ListSelect,e as Picker,a as Popup,s as SelectAddress};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ftvs-vue2","version":"0.0.
|
|
1
|
+
{"name":"ftvs-vue2","version":"0.0.13","description":"未来电视vue2版本ui库","main":"./lib/cjs/index.js","module":"./lib/esm/index.js","license":"MIT","dependencies":{},"peerDependencies":{"qrcodejs2":"^0.0.2","vant":"^2.12.6"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}
|
|
File without changes
|
|
File without changes
|