demo-legacy.de02e26d.js 7.9 KB

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