demo-legacy.f9bc2aa0.js 11 KB

1
  1. !function(){var t=document.createElement("style");t.innerHTML="@-webkit-keyframes nutFadeIn-7c997070{0%{opacity:0}to{opacity:1}}@keyframes nutFadeIn-7c997070{0%{opacity:0}to{opacity:1}}@-webkit-keyframes nutFadeOut-7c997070{0%{opacity:1}to{opacity:0}}@keyframes nutFadeOut-7c997070{0%{opacity:1}to{opacity:0}}.nutFade-enter-active[data-v-7c997070],.nutFadeIn[data-v-7c997070],.nutFade-leave-active[data-v-7c997070],.nutFadeOut[data-v-7c997070]{-webkit-animation-duration:.25s;animation-duration:.25s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:cubic-bezier(.55,.085,.68,.53);animation-timing-function:cubic-bezier(.55,.085,.68,.53)}.nutFade-enter-active[data-v-7c997070],.nutFadeIn[data-v-7c997070]{-webkit-animation-name:nutFadeIn-7c997070;animation-name:nutFadeIn-7c997070}.nutFade-leave-active[data-v-7c997070],.nutFadeOut[data-v-7c997070]{-webkit-animation-name:nutFadeOut-7c997070;animation-name:nutFadeOut-7c997070}@-webkit-keyframes nutZoomIn-7c997070{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes nutZoomIn-7c997070{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-webkit-keyframes nutZoomOut-7c997070{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes nutZoomOut-7c997070{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.nutZoom-enter-active[data-v-7c997070],.nutZoomIn[data-v-7c997070],.nutZoom-leave-active[data-v-7c997070],.nutZoomOut[data-v-7c997070]{-webkit-animation-duration:.25s;animation-duration:.25s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:cubic-bezier(.55,.085,.68,.53);animation-timing-function:cubic-bezier(.55,.085,.68,.53)}.nutZoom-enter-active[data-v-7c997070],.nutZoomIn[data-v-7c997070]{-webkit-animation-name:nutZoomIn-7c997070;animation-name:nutZoomIn-7c997070}.nutZoom-leave-active[data-v-7c997070],.nutZoomOut[data-v-7c997070]{-webkit-animation-name:nutZoomOut-7c997070;animation-name:nutZoomOut-7c997070}@-webkit-keyframes nutEaseIn-7c997070{0%{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes nutEaseIn-7c997070{0%{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes nutEaseOut-7c997070{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}}@keyframes nutEaseOut-7c997070{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}}.nutEase-enter-active[data-v-7c997070],.nutEaseIn[data-v-7c997070],.nutEase-leave-active[data-v-7c997070],.nutEaseOut[data-v-7c997070]{-webkit-animation-duration:.25s;animation-duration:.25s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:cubic-bezier(.55,.085,.68,.53);animation-timing-function:cubic-bezier(.55,.085,.68,.53)}.nutEase-enter-active[data-v-7c997070],.nutEaseIn[data-v-7c997070]{-webkit-animation-name:nutEaseIn-7c997070;animation-name:nutEaseIn-7c997070}.nutEase-leave-active[data-v-7c997070],.nutEaseOut[data-v-7c997070]{-webkit-animation-name:nutEaseOut-7c997070;animation-name:nutEaseOut-7c997070}@-webkit-keyframes nutDropIn-7c997070{0%{opacity:0;-webkit-transform:scaleY(.8);transform:scaleY(.8)}to{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}@keyframes nutDropIn-7c997070{0%{opacity:0;-webkit-transform:scaleY(.8);transform:scaleY(.8)}to{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}@-webkit-keyframes nutDropOut-7c997070{0%{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}to{opacity:0;-webkit-transform:scaleY(.8);transform:scaleY(.8)}}@keyframes nutDropOut-7c997070{0%{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}to{opacity:0;-webkit-transform:scaleY(.8);transform:scaleY(.8)}}.nutDrop-enter-active[data-v-7c997070],.nutDropIn[data-v-7c997070],.nutDrop-leave-active[data-v-7c997070],.nutDropOut[data-v-7c997070]{-webkit-animation-duration:.25s;animation-duration:.25s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:cubic-bezier(.55,.085,.68,.53);animation-timing-function:cubic-bezier(.55,.085,.68,.53)}.nutDrop-enter-active[data-v-7c997070],.nutDropIn[data-v-7c997070]{-webkit-animation-name:nutDropIn-7c997070;animation-name:nutDropIn-7c997070}.nutDrop-leave-active[data-v-7c997070],.nutDropOut[data-v-7c997070]{-webkit-animation-name:nutDropOut-7c997070;animation-name:nutDropOut-7c997070}@-webkit-keyframes rotation-7c997070{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes rotation-7c997070{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}.nutRotate-enter-active[data-v-7c997070],.nutRotateIn[data-v-7c997070],.nutRotate-leave-active[data-v-7c997070],.nutRotateOut[data-v-7c997070]{-webkit-animation-duration:.25s;animation-duration:.25s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:cubic-bezier(.55,.085,.68,.53);animation-timing-function:cubic-bezier(.55,.085,.68,.53)}.nutRotate-enter-active[data-v-7c997070],.nutRotateIn[data-v-7c997070]{-webkit-animation-name:nutRotateIn;animation-name:nutRotateIn}.nutRotate-leave-active[data-v-7c997070],.nutRotateOut[data-v-7c997070]{-webkit-animation-name:nutRotateOut;animation-name:nutRotateOut}.demo .nut-cell[data-v-7c997070]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.demo .nut-cell .nut-cell__value[data-v-7c997070]{margin-right:8px}\n",document.head.appendChild(t),System.register(["./mobile-legacy.d4517c41.js","./index-legacy.5dec0910.js","./vendor-legacy.44d419bd.js"],(function(t){"use strict";var e,a,n,o,i,c,s,r,l,m,d,u;return{setters:[function(t){e=t.c},function(t){a=t._},function(t){n=t.a,o=t.m,i=t.A,c=t.r,s=t.e,r=t.j,l=t.B,m=t.C,d=t.g,u=t.o}],execute:function(){const{createDemo:b}=e("address"),v=b({props:{},setup(){const t=n({province:[{id:1,name:"北京"},{id:2,name:"广西"},{id:3,name:"江西"},{id:4,name:"四川"},{id:5,name:"浙江"}],city:[{id:7,name:"朝阳区"},{id:8,name:"崇文区"},{id:9,name:"昌平区"},{id:6,name:"石景山区"},{id:3,name:"八里庄街道"},{id:9,name:"北苑"}],country:[{id:3,name:"八里庄街道"},{id:9,name:"北苑"},{id:4,name:"常营乡"}],town:[]}),e=n({normal:!1,normal2:!1,exist:!1,customImg:!1,other:!1}),a=n({selectedIcon:"heart-fill",defaultIcon:"heart1",closeBtnIcon:"close",backBtnIcon:"left"}),c=o([{id:1,addressDetail:"",cityName:"次渠镇",countyName:"通州区",provinceName:"北京市",selectedAddress:!0,townName:"",name:"探探鱼",phone:"182****1718"},{id:2,addressDetail:"",cityName:"钓鱼岛全区",countyName:"",provinceName:"钓鱼岛",selectedAddress:!1,townName:"",name:"探探鱼",phone:"182****1718"},{id:3,addressDetail:"京东大厦",cityName:"大兴区",countyName:"科创十一街18号院",provinceName:"北京市",selectedAddress:!1,townName:"",name:"探探鱼",phone:"182****1718"}]),s=n({one:"请选择地址",two:"请选择地址",three:"请选择地址",four:"请选择地址",five:"请选择地址"});return{showAddress:()=>{e.normal=!e.normal},showAddress2:()=>{e.normal2=!e.normal2},showPopup:e,onChange:(a,n)=>{t[a.next].length<1&&(e[n]=!1)},close1:t=>{console.log(t),s.one=t.data.addressStr},showAddressExist:()=>{e.exist=!0},close2:t=>{if(console.log(t),"exist"==t.type){const{provinceName:e,cityName:a,countyName:n,townName:o,addressDetail:i}=t.data;s.two=e+a+n+o+i}else s.two=t.data.addressStr},close5:t=>{console.log(t),s.five=t.data.addressStr},selected:(t,e,a)=>{console.log(t),console.log(e)},existAddress:c,showAddressOther:()=>{e.other=!0},showCustomImg:()=>{e.customImg=!0},close3:t=>{if(console.log(t),"exist"==t.type){const{provinceName:e,cityName:a,countyName:n,townName:o,addressDetail:i}=t.data;s.three=e+a+n+o+i}else s.three=t.data.addressStr},close4:t=>{if(console.log(t),"exist"==t.type){const{provinceName:e,cityName:a,countyName:n,townName:o,addressDetail:i}=t.data;s.four=e+a+n+o+i}else s.four=t.data.addressStr},switchModule:t=>{"custom"==t.type?console.log("点击了“选择其他地址”按钮"):console.log("点击了自定义地址左上角的返回按钮")},closeMask:t=>{console.log("关闭弹层",t)},...i(a),...i(s),...i(e),...i(t)}}}),f=t=>(l("data-v-7c997070"),t=t(),m(),t),k={class:"demo"},y=f((()=>d("h2",null,"选择自定义地址",-1))),w=f((()=>d("h2",null,"选择自定义地址2",-1))),p=f((()=>d("h2",null,"选择已有地址",-1))),h=f((()=>d("h2",null,"自定义图标",-1))),g=f((()=>d("h2",null,"自定义地址与已有地址切换",-1)));t("default",a(v,[["render",function(t,e,a,n,o,i){const l=c("nut-cell"),m=c("nut-address");return u(),s("div",k,[y,r(l,{title:"选择地址",desc:t.one,"is-link":"",onClick:t.showAddress},null,8,["desc","onClick"]),r(m,{visible:t.normal,"onUpdate:visible":e[0]||(e[0]=e=>t.normal=e),province:t.province,city:t.city,country:t.country,town:t.town,onChange:e[1]||(e[1]=e=>t.onChange(e,"normal")),onClose:t.close1,"custom-address-title":"请选择所在地区"},null,8,["visible","province","city","country","town","onClose"]),w,r(l,{title:"选择地址",desc:t.five,"is-link":"",onClick:t.showAddress2},null,8,["desc","onClick"]),r(m,{visible:t.normal2,"onUpdate:visible":e[2]||(e[2]=e=>t.normal2=e),type:"custom2",province:t.province,city:t.city,country:t.country,town:t.town,height:"270px",onChange:e[3]||(e[3]=e=>t.onChange(e,"normal2")),onClose:t.close5,"custom-address-title":"请选择所在地区"},null,8,["visible","province","city","country","town","onClose"]),p,r(l,{title:"选择地址",desc:t.two,"is-link":"",onClick:t.showAddressExist},null,8,["desc","onClick"]),r(m,{visible:t.exist,"onUpdate:visible":e[4]||(e[4]=e=>t.exist=e),type:"exist","exist-address":t.existAddress,onChange:e[5]||(e[5]=e=>t.onChange(e,"exist")),onClose:t.close2,"is-show-custom-address":!1,onSelected:t.selected,"exist-address-title":"配送至"},null,8,["visible","exist-address","onClose","onSelected"]),h,r(l,{title:"选择地址",desc:t.three,"is-link":"",onClick:t.showCustomImg},null,8,["desc","onClick"]),r(m,{visible:t.customImg,"onUpdate:visible":e[6]||(e[6]=e=>t.customImg=e),type:"exist","exist-address":t.existAddress,onChange:e[7]||(e[7]=e=>t.onChange(e,"customImg")),onClose:t.close3,"is-show-custom-address":!1,onSelected:t.selected,"default-icon":t.defaultIcon,"selected-icon":t.selectedIcon,"close-btn-icon":t.closeBtnIcon},null,8,["visible","exist-address","onClose","onSelected","default-icon","selected-icon","close-btn-icon"]),g,r(l,{title:"选择地址",desc:t.four,"is-link":"",onClick:t.showAddressOther},null,8,["desc","onClick"]),r(m,{visible:t.other,"onUpdate:visible":e[8]||(e[8]=e=>t.other=e),type:"exist","exist-address":t.existAddress,province:t.province,city:t.city,country:t.country,town:t.town,"back-btn-icon":t.backBtnIcon,onChange:e[9]||(e[9]=e=>t.onChange(e,"other")),onClose:t.close4,onSelected:t.selected,"custom-and-exist-title":"选择其他地址",onSwitchModule:t.switchModule,onCloseMask:t.closeMask},null,8,["visible","exist-address","province","city","country","town","back-btn-icon","onClose","onSelected","onSwitchModule","onCloseMask"])])}],["__scopeId","data-v-7c997070"]]))}}}))}();