diff --git a/app.js b/app.js new file mode 100644 index 0000000..eba3ea4 --- /dev/null +++ b/app.js @@ -0,0 +1,48 @@ +//app.js +var util = require("./utils/util.js") +App({ + onLaunch: function () { + var openid = wx.getStorageSync("openid") + if(openid == ""){ + qq.login({ + success(res) { + if (res.code) { + // console.log(res.code) + wx.request({ + data: util.json2Form({ + code: res.code + }), + header: { + "Content-Type": "application/x-www-form-urlencoded" + }, + url: 'https://www.neumark.top/user/qqlogin', + method: "POST", + success: (res) => { + // console.log(res.data["openid"]); + wx.setStorageSync("openid", res.data["openid"]) + } + }) + } else { + console.log('登录失败!' + res.errMsg) + } + } + }) + } + else{ + console.log("存在openid") + } + + + var ifbind = wx.getStorageSync("ifbind") + if(ifbind == ""){ + wx.showToast({ + title: '绑定账号解锁更多功能!', + icon: "none", + duration: 4000 + }) + }else{ + } + }, + globalData: { + } +}) \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..251ecdd --- /dev/null +++ b/app.json @@ -0,0 +1,67 @@ +{ + "pages": [ + "pages/index/index", + "pages/advice/advice", + "pages/login/login", + "pages/me/me", + "pages/curriculum/curriculum", + "pages/function/function", + "pages/schoolbus/schoolbus", + "pages/calendar/calendar", + "pages/library/library", + "pages/librarylogin/librarylogin", + "pages/lessoninfo/lessoninfo", + "pages/liblecture/liblecture" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "果壳儿", + "navigationBarTextStyle": "black" + }, + "sitemapLocation": "sitemap.json", + "usingComponents": { + "van-button": "vant-weapp/button", + "van-tabbar": "vant-weapp/tabbar", + "van-tabbar-item": "vant-weapp/tabbar-item", + "van-cell": "vant-weapp/cell", + "van-cell-group": "vant-weapp/cell-group", + "van-field": "vant-weapp/field", + "van-row": "vant-weapp/row", + "van-col": "vant-weapp/col" + }, + "tabBar": { + "color": "#000000", + "selectedColor": "#000000", + "backgroundColor": "#ffffff", + "list": [ + { + "iconPath": "/images/icon_home.png", + "selectedIconPath": "images/icon_home_active.png", + "pagePath": "pages/index/index", + "text": "主页" + }, + { + "iconPath": "/images/icon_notebook.png", + "selectedIconPath": "images/icon_notebook_active.png", + "pagePath": "pages/curriculum/curriculum", + "text": "课表" + }, + { + "iconPath": "/images/icon_tag.png", + "selectedIconPath": "images/icon_tag_active.png", + "pagePath": "pages/function/function", + "text": "百宝箱" + }, + { + "iconPath": "/images/icon_me.png", + "selectedIconPath": "images/icon_me_active.png", + "pagePath": "pages/me/me", + "text": "我的" + } + ] + }, + "groupIdList":[ + "805769614" + ] +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..a0880e3 --- /dev/null +++ b/app.wxss @@ -0,0 +1,8 @@ +/**app.wxss**/ + +@import "colorui/main.wxss"; +@import "colorui/icon.wxss"; + +Page{ + background-color: #f8f8f8; +} diff --git a/colorui/animation.wxss b/colorui/animation.wxss new file mode 100644 index 0000000..931bb51 --- /dev/null +++ b/colorui/animation.wxss @@ -0,0 +1,184 @@ +/* + Animation 微动画 + 基于ColorUI组建库的动画模块 by 文晓港 2019年3月26日19:52:28 + */ + +/* css 滤镜 控制黑白底色gif的 */ +.gif-black{ + mix-blend-mode: screen; +} +.gif-white{ + mix-blend-mode: multiply; +} + + +/* Animation css */ +[class*=animation-] { + animation-duration: .5s; + animation-timing-function: ease-out; + animation-fill-mode: both +} + +.animation-fade { + animation-name: fade; + animation-duration: .8s; + animation-timing-function: linear +} + +.animation-scale-up { + animation-name: scale-up +} + +.animation-scale-down { + animation-name: scale-down +} + +.animation-slide-top { + animation-name: slide-top +} + +.animation-slide-bottom { + animation-name: slide-bottom +} + +.animation-slide-left { + animation-name: slide-left +} + +.animation-slide-right { + animation-name: slide-right +} + +.animation-shake { + animation-name: shake +} + +.animation-reverse { + animation-direction: reverse +} + +@keyframes fade { + 0% { + opacity: 0 + } + + 100% { + opacity: 1 + } +} + +@keyframes scale-up { + 0% { + opacity: 0; + transform: scale(.2) + } + + 100% { + opacity: 1; + transform: scale(1) + } +} + +@keyframes scale-down { + 0% { + opacity: 0; + transform: scale(1.8) + } + + 100% { + opacity: 1; + transform: scale(1) + } +} + +@keyframes slide-top { + 0% { + opacity: 0; + transform: translateY(-100%) + } + + 100% { + opacity: 1; + transform: translateY(0) + } +} + +@keyframes slide-bottom { + 0% { + opacity: 0; + transform: translateY(100%) + } + + 100% { + opacity: 1; + transform: translateY(0) + } +} + +@keyframes shake { + + 0%, + 100% { + transform: translateX(0) + } + + 10% { + transform: translateX(-9px) + } + + 20% { + transform: translateX(8px) + } + + 30% { + transform: translateX(-7px) + } + + 40% { + transform: translateX(6px) + } + + 50% { + transform: translateX(-5px) + } + + 60% { + transform: translateX(4px) + } + + 70% { + transform: translateX(-3px) + } + + 80% { + transform: translateX(2px) + } + + 90% { + transform: translateX(-1px) + } +} + +@keyframes slide-left { + 0% { + opacity: 0; + transform: translateX(-100%) + } + + 100% { + opacity: 1; + transform: translateX(0) + } +} + +@keyframes slide-right { + 0% { + opacity: 0; + transform: translateX(100%) + } + + 100% { + opacity: 1; + transform: translateX(0) + } +} \ No newline at end of file diff --git a/colorui/components/cu-custom.js b/colorui/components/cu-custom.js new file mode 100644 index 0000000..0324164 --- /dev/null +++ b/colorui/components/cu-custom.js @@ -0,0 +1,54 @@ +const app = getApp(); +Component({ + /** + * 组件的一些选项 + */ + options: { + addGlobalClass: true, + multipleSlots: true + }, + /** + * 组件的对外属性 + */ + properties: { + bgColor: { + type: String, + default: '' + }, + isCustom: { + type: [Boolean, String], + default: false + }, + isBack: { + type: [Boolean, String], + default: false + }, + bgImage: { + type: String, + default: '' + }, + }, + /** + * 组件的初始数据 + */ + data: { + StatusBar: app.globalData.StatusBar, + CustomBar: app.globalData.CustomBar, + Custom: app.globalData.Custom + }, + /** + * 组件的方法列表 + */ + methods: { + BackPage() { + wx.navigateBack({ + delta: 1 + }); + }, + toHome(){ + wx.reLaunch({ + url: '/pages/index/index', + }) + } + } +}) \ No newline at end of file diff --git a/colorui/components/cu-custom.json b/colorui/components/cu-custom.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/colorui/components/cu-custom.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/colorui/components/cu-custom.wxml b/colorui/components/cu-custom.wxml new file mode 100644 index 0000000..c248d48 --- /dev/null +++ b/colorui/components/cu-custom.wxml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/colorui/components/cu-custom.wxss b/colorui/components/cu-custom.wxss new file mode 100644 index 0000000..07675e2 --- /dev/null +++ b/colorui/components/cu-custom.wxss @@ -0,0 +1 @@ +/* colorui/components/cu-custom.wxss */ \ No newline at end of file diff --git a/colorui/icon.wxss b/colorui/icon.wxss new file mode 100644 index 0000000..e19a7bb --- /dev/null +++ b/colorui/icon.wxss @@ -0,0 +1,1226 @@ +@keyframes cuIcon-spin { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); + } + + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} + +.iconfont-spin { + -webkit-animation: cuIcon-spin 2s infinite linear; + animation: cuIcon-spin 2s infinite linear; + display: inline-block; +} + +.iconfont-pulse { + -webkit-animation: cuIcon-spin 1s infinite steps(8); + animation: cuIcon-spin 1s infinite steps(8); + display: inline-block; +} + +[class*="cuIcon-"] { + font-family: "cuIcon"; + font-size: inherit; + font-style: normal; +} + +@font-face { + font-family: "cuIcon"; + src: url('//at.alicdn.com/t/font_533566_yfq2d9wdij.eot?t=1545239985831'); + /* IE9*/ + src: url('//at.alicdn.com/t/font_533566_yfq2d9wdij.eot?t=1545239985831#iefix') format('embedded-opentype'), + /* IE6-IE8 */ + url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAKQcAAsAAAABNKAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8dkoiY21hcAAAAYAAAAiaAAATkilZPq9nbHlmAAAKHA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AyLDGbO6kFFgwyWqSeUyOlcCLyVg27IJk563tD7gsjDpU2lPvaFDoUmwR3kekyl0oploYqo72S1SqpqPTbWTDqZN/lcsNoGdIya6thw0TjmY88HHVB6qdSLgOb2UOPXUA0FTuciqY1AuI7vF6nWpvVO02ne5arqB37cYfXbdvWJp+72HZWYLgtTOUobVLLQd7qsKJTno9tbezVnzQl9aFVRlyxibZj3LTh1ORmM6AmovaDrirNhDvywLRBI5QNQsFFJnZSl8lOgm1jr6p0KbnPvdChcT/TM97W+czmzJyZerwwCqYTNu4Lkz+I7OQaOpS6AuRyryt3Dndl0s1T1oWRakSt/M0Zd9gIObM1MF4y16ZL1tYeubvWzt3wyKaaU4FDWevJ0WxHD70DNuPTqlVeLJse7RUrW9CLfVpyWk9L1ifcRt/RuvvkgOPKqtla59gENYWt1qHm2ukiFz46kYfrdlGXF56Y3krsvdTlOK83V7OcO8Ocy7xTooebK1W5GQf/x3a+rfr698fGhbsi56VKed69SIJJ67KCl534bWkaO7a6DE56I61YQUsXLIcS0+djakEnrrjDgW3TBS+Yq9yhQwHb4TpRc+4fHhaMK/P02c28dEeteeEYf3z98jjpJ2zsXRpbLsaqzVQueeNu++4050ZTrmdtFk1LkVEzp3sjuA9sJmz1t7m5l+xta3JwvX+MuGWHLnMc3G/Ta6u7Yfye3fvFGQd8zd3y9G/1b415YErR3FzW9QU8ZmXJG8XibbllL4e4MEqatTTg+crn8waZrtfW/gthnmJTAAAA') format('woff'), + url('//at.alicdn.com/t/font_533566_yfq2d9wdij.ttf?t=1545239985831') format('truetype'), + /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ + url('//at.alicdn.com/t/font_533566_yfq2d9wdij.svg?t=1545239985831#iconfont') format('svg'); + /* iOS 4.1- */ +} + +.cuIcon-appreciate:before { + content: "\e644"; +} + +.cuIcon-check:before { + content: "\e645"; +} + +.cuIcon-close:before { + content: "\e646"; +} + +.cuIcon-edit:before { + content: "\e649"; +} + +.cuIcon-emoji:before { + content: "\e64a"; +} + +.cuIcon-favorfill:before { + content: "\e64b"; +} + +.cuIcon-favor:before { + content: "\e64c"; +} + +.cuIcon-loading:before { + content: "\e64f"; +} + +.cuIcon-locationfill:before { + content: "\e650"; +} + +.cuIcon-location:before { + content: "\e651"; +} + +.cuIcon-phone:before { + content: "\e652"; +} + +.cuIcon-roundcheckfill:before { + content: "\e656"; +} + +.cuIcon-roundcheck:before { + content: "\e657"; +} + +.cuIcon-roundclosefill:before { + content: "\e658"; +} + +.cuIcon-roundclose:before { + content: "\e659"; +} + +.cuIcon-roundrightfill:before { + content: "\e65a"; +} + +.cuIcon-roundright:before { + content: "\e65b"; +} + +.cuIcon-search:before { + content: "\e65c"; +} + +.cuIcon-taxi:before { + content: "\e65d"; +} + +.cuIcon-timefill:before { + content: "\e65e"; +} + +.cuIcon-time:before { + content: "\e65f"; +} + +.cuIcon-unfold:before { + content: "\e661"; +} + +.cuIcon-warnfill:before { + content: "\e662"; +} + +.cuIcon-warn:before { + content: "\e663"; +} + +.cuIcon-camerafill:before { + content: "\e664"; +} + +.cuIcon-camera:before { + content: "\e665"; +} + +.cuIcon-commentfill:before { + content: "\e666"; +} + +.cuIcon-comment:before { + content: "\e667"; +} + +.cuIcon-likefill:before { + content: "\e668"; +} + +.cuIcon-like:before { + content: "\e669"; +} + +.cuIcon-notificationfill:before { + content: "\e66a"; +} + +.cuIcon-notification:before { + content: "\e66b"; +} + +.cuIcon-order:before { + content: "\e66c"; +} + +.cuIcon-samefill:before { + content: "\e66d"; +} + +.cuIcon-same:before { + content: "\e66e"; +} + +.cuIcon-deliver:before { + content: "\e671"; +} + +.cuIcon-evaluate:before { + content: "\e672"; +} + +.cuIcon-pay:before { + content: "\e673"; +} + +.cuIcon-send:before { + content: "\e675"; +} + +.cuIcon-shop:before { + content: "\e676"; +} + +.cuIcon-ticket:before { + content: "\e677"; +} + +.cuIcon-back:before { + content: "\e679"; +} + +.cuIcon-cascades:before { + content: "\e67c"; +} + +.cuIcon-discover:before { + content: "\e67e"; +} + +.cuIcon-list:before { + content: "\e682"; +} + +.cuIcon-more:before { + content: "\e684"; +} + +.cuIcon-scan:before { + content: "\e689"; +} + +.cuIcon-settings:before { + content: "\e68a"; +} + +.cuIcon-questionfill:before { + content: "\e690"; +} + +.cuIcon-question:before { + content: "\e691"; +} + +.cuIcon-shopfill:before { + content: "\e697"; +} + +.cuIcon-form:before { + content: "\e699"; +} + +.cuIcon-pic:before { + content: "\e69b"; +} + +.cuIcon-filter:before { + content: "\e69c"; +} + +.cuIcon-footprint:before { + content: "\e69d"; +} + +.cuIcon-top:before { + content: "\e69e"; +} + +.cuIcon-pulldown:before { + content: "\e69f"; +} + +.cuIcon-pullup:before { + content: "\e6a0"; +} + +.cuIcon-right:before { + content: "\e6a3"; +} + +.cuIcon-refresh:before { + content: "\e6a4"; +} + +.cuIcon-moreandroid:before { + content: "\e6a5"; +} + +.cuIcon-deletefill:before { + content: "\e6a6"; +} + +.cuIcon-refund:before { + content: "\e6ac"; +} + +.cuIcon-cart:before { + content: "\e6af"; +} + +.cuIcon-qrcode:before { + content: "\e6b0"; +} + +.cuIcon-remind:before { + content: "\e6b2"; +} + +.cuIcon-delete:before { + content: "\e6b4"; +} + +.cuIcon-profile:before { + content: "\e6b7"; +} + +.cuIcon-home:before { + content: "\e6b8"; +} + +.cuIcon-cartfill:before { + content: "\e6b9"; +} + +.cuIcon-discoverfill:before { + content: "\e6ba"; +} + +.cuIcon-homefill:before { + content: "\e6bb"; +} + +.cuIcon-message:before { + content: "\e6bc"; +} + +.cuIcon-addressbook:before { + content: "\e6bd"; +} + +.cuIcon-link:before { + content: "\e6bf"; +} + +.cuIcon-lock:before { + content: "\e6c0"; +} + +.cuIcon-unlock:before { + content: "\e6c2"; +} + +.cuIcon-vip:before { + content: "\e6c3"; +} + +.cuIcon-weibo:before { + content: "\e6c4"; +} + +.cuIcon-activity:before { + content: "\e6c5"; +} + +.cuIcon-friendaddfill:before { + content: "\e6c9"; +} + +.cuIcon-friendadd:before { + content: "\e6ca"; +} + +.cuIcon-friendfamous:before { + content: "\e6cb"; +} + +.cuIcon-friend:before { + content: "\e6cc"; +} + +.cuIcon-goods:before { + content: "\e6cd"; +} + +.cuIcon-selection:before { + content: "\e6ce"; +} + +.cuIcon-explore:before { + content: "\e6d2"; +} + +.cuIcon-present:before { + content: "\e6d3"; +} + +.cuIcon-squarecheckfill:before { + content: "\e6d4"; +} + +.cuIcon-square:before { + content: "\e6d5"; +} + +.cuIcon-squarecheck:before { + content: "\e6d6"; +} + +.cuIcon-round:before { + content: "\e6d7"; +} + +.cuIcon-roundaddfill:before { + content: "\e6d8"; +} + +.cuIcon-roundadd:before { + content: "\e6d9"; +} + +.cuIcon-add:before { + content: "\e6da"; +} + +.cuIcon-notificationforbidfill:before { + content: "\e6db"; +} + +.cuIcon-explorefill:before { + content: "\e6dd"; +} + +.cuIcon-fold:before { + content: "\e6de"; +} + +.cuIcon-game:before { + content: "\e6df"; +} + +.cuIcon-redpacket:before { + content: "\e6e0"; +} + +.cuIcon-selectionfill:before { + content: "\e6e1"; +} + +.cuIcon-similar:before { + content: "\e6e2"; +} + +.cuIcon-appreciatefill:before { + content: "\e6e3"; +} + +.cuIcon-infofill:before { + content: "\e6e4"; +} + +.cuIcon-info:before { + content: "\e6e5"; +} + +.cuIcon-forwardfill:before { + content: "\e6ea"; +} + +.cuIcon-forward:before { + content: "\e6eb"; +} + +.cuIcon-rechargefill:before { + content: "\e6ec"; +} + +.cuIcon-recharge:before { + content: "\e6ed"; +} + +.cuIcon-vipcard:before { + content: "\e6ee"; +} + +.cuIcon-voice:before { + content: "\e6ef"; +} + +.cuIcon-voicefill:before { + content: "\e6f0"; +} + +.cuIcon-friendfavor:before { + content: "\e6f1"; +} + +.cuIcon-wifi:before { + content: "\e6f2"; +} + +.cuIcon-share:before { + content: "\e6f3"; +} + +.cuIcon-wefill:before { + content: "\e6f4"; +} + +.cuIcon-we:before { + content: "\e6f5"; +} + +.cuIcon-lightauto:before { + content: "\e6f6"; +} + +.cuIcon-lightforbid:before { + content: "\e6f7"; +} + +.cuIcon-lightfill:before { + content: "\e6f8"; +} + +.cuIcon-camerarotate:before { + content: "\e6f9"; +} + +.cuIcon-light:before { + content: "\e6fa"; +} + +.cuIcon-barcode:before { + content: "\e6fb"; +} + +.cuIcon-flashlightclose:before { + content: "\e6fc"; +} + +.cuIcon-flashlightopen:before { + content: "\e6fd"; +} + +.cuIcon-searchlist:before { + content: "\e6fe"; +} + +.cuIcon-service:before { + content: "\e6ff"; +} + +.cuIcon-sort:before { + content: "\e700"; +} + +.cuIcon-down:before { + content: "\e703"; +} + +.cuIcon-mobile:before { + content: "\e704"; +} + +.cuIcon-mobilefill:before { + content: "\e705"; +} + +.cuIcon-copy:before { + content: "\e706"; +} + +.cuIcon-countdownfill:before { + content: "\e707"; +} + +.cuIcon-countdown:before { + content: "\e708"; +} + +.cuIcon-noticefill:before { + content: "\e709"; +} + +.cuIcon-notice:before { + content: "\e70a"; +} + +.cuIcon-upstagefill:before { + content: "\e70e"; +} + +.cuIcon-upstage:before { + content: "\e70f"; +} + +.cuIcon-babyfill:before { + content: "\e710"; +} + +.cuIcon-baby:before { + content: "\e711"; +} + +.cuIcon-brandfill:before { + content: "\e712"; +} + +.cuIcon-brand:before { + content: "\e713"; +} + +.cuIcon-choicenessfill:before { + content: "\e714"; +} + +.cuIcon-choiceness:before { + content: "\e715"; +} + +.cuIcon-clothesfill:before { + content: "\e716"; +} + +.cuIcon-clothes:before { + content: "\e717"; +} + +.cuIcon-creativefill:before { + content: "\e718"; +} + +.cuIcon-creative:before { + content: "\e719"; +} + +.cuIcon-female:before { + content: "\e71a"; +} + +.cuIcon-keyboard:before { + content: "\e71b"; +} + +.cuIcon-male:before { + content: "\e71c"; +} + +.cuIcon-newfill:before { + content: "\e71d"; +} + +.cuIcon-new:before { + content: "\e71e"; +} + +.cuIcon-pullleft:before { + content: "\e71f"; +} + +.cuIcon-pullright:before { + content: "\e720"; +} + +.cuIcon-rankfill:before { + content: "\e721"; +} + +.cuIcon-rank:before { + content: "\e722"; +} + +.cuIcon-bad:before { + content: "\e723"; +} + +.cuIcon-cameraadd:before { + content: "\e724"; +} + +.cuIcon-focus:before { + content: "\e725"; +} + +.cuIcon-friendfill:before { + content: "\e726"; +} + +.cuIcon-cameraaddfill:before { + content: "\e727"; +} + +.cuIcon-apps:before { + content: "\e729"; +} + +.cuIcon-paintfill:before { + content: "\e72a"; +} + +.cuIcon-paint:before { + content: "\e72b"; +} + +.cuIcon-picfill:before { + content: "\e72c"; +} + +.cuIcon-refresharrow:before { + content: "\e72d"; +} + +.cuIcon-colorlens:before { + content: "\e6e6"; +} + +.cuIcon-markfill:before { + content: "\e730"; +} + +.cuIcon-mark:before { + content: "\e731"; +} + +.cuIcon-presentfill:before { + content: "\e732"; +} + +.cuIcon-repeal:before { + content: "\e733"; +} + +.cuIcon-album:before { + content: "\e734"; +} + +.cuIcon-peoplefill:before { + content: "\e735"; +} + +.cuIcon-people:before { + content: "\e736"; +} + +.cuIcon-servicefill:before { + content: "\e737"; +} + +.cuIcon-repair:before { + content: "\e738"; +} + +.cuIcon-file:before { + content: "\e739"; +} + +.cuIcon-repairfill:before { + content: "\e73a"; +} + +.cuIcon-taoxiaopu:before { + content: "\e73b"; +} + +.cuIcon-weixin:before { + content: "\e612"; +} + +.cuIcon-attentionfill:before { + content: "\e73c"; +} + +.cuIcon-attention:before { + content: "\e73d"; +} + +.cuIcon-commandfill:before { + content: "\e73e"; +} + +.cuIcon-command:before { + content: "\e73f"; +} + +.cuIcon-communityfill:before { + content: "\e740"; +} + +.cuIcon-community:before { + content: "\e741"; +} + +.cuIcon-read:before { + content: "\e742"; +} + +.cuIcon-calendar:before { + content: "\e74a"; +} + +.cuIcon-cut:before { + content: "\e74b"; +} + +.cuIcon-magic:before { + content: "\e74c"; +} + +.cuIcon-backwardfill:before { + content: "\e74d"; +} + +.cuIcon-playfill:before { + content: "\e74f"; +} + +.cuIcon-stop:before { + content: "\e750"; +} + +.cuIcon-tagfill:before { + content: "\e751"; +} + +.cuIcon-tag:before { + content: "\e752"; +} + +.cuIcon-group:before { + content: "\e753"; +} + +.cuIcon-all:before { + content: "\e755"; +} + +.cuIcon-backdelete:before { + content: "\e756"; +} + +.cuIcon-hotfill:before { + content: "\e757"; +} + +.cuIcon-hot:before { + content: "\e758"; +} + +.cuIcon-post:before { + content: "\e759"; +} + +.cuIcon-radiobox:before { + content: "\e75b"; +} + +.cuIcon-rounddown:before { + content: "\e75c"; +} + +.cuIcon-upload:before { + content: "\e75d"; +} + +.cuIcon-writefill:before { + content: "\e760"; +} + +.cuIcon-write:before { + content: "\e761"; +} + +.cuIcon-radioboxfill:before { + content: "\e763"; +} + +.cuIcon-punch:before { + content: "\e764"; +} + +.cuIcon-shake:before { + content: "\e765"; +} + +.cuIcon-move:before { + content: "\e768"; +} + +.cuIcon-safe:before { + content: "\e769"; +} + +.cuIcon-activityfill:before { + content: "\e775"; +} + +.cuIcon-crownfill:before { + content: "\e776"; +} + +.cuIcon-crown:before { + content: "\e777"; +} + +.cuIcon-goodsfill:before { + content: "\e778"; +} + +.cuIcon-messagefill:before { + content: "\e779"; +} + +.cuIcon-profilefill:before { + content: "\e77a"; +} + +.cuIcon-sound:before { + content: "\e77b"; +} + +.cuIcon-sponsorfill:before { + content: "\e77c"; +} + +.cuIcon-sponsor:before { + content: "\e77d"; +} + +.cuIcon-upblock:before { + content: "\e77e"; +} + +.cuIcon-weblock:before { + content: "\e77f"; +} + +.cuIcon-weunblock:before { + content: "\e780"; +} + +.cuIcon-my:before { + content: "\e78b"; +} + +.cuIcon-myfill:before { + content: "\e78c"; +} + +.cuIcon-emojifill:before { + content: "\e78d"; +} + +.cuIcon-emojiflashfill:before { + content: "\e78e"; +} + +.cuIcon-flashbuyfill:before { + content: "\e78f"; +} + +.cuIcon-text:before { + content: "\e791"; +} + +.cuIcon-goodsfavor:before { + content: "\e794"; +} + +.cuIcon-musicfill:before { + content: "\e795"; +} + +.cuIcon-musicforbidfill:before { + content: "\e796"; +} + +.cuIcon-card:before { + content: "\e624"; +} + +.cuIcon-triangledownfill:before { + content: "\e79b"; +} + +.cuIcon-triangleupfill:before { + content: "\e79c"; +} + +.cuIcon-roundleftfill-copy:before { + content: "\e79e"; +} + +.cuIcon-font:before { + content: "\e76a"; +} + +.cuIcon-title:before { + content: "\e82f"; +} + +.cuIcon-recordfill:before { + content: "\e7a4"; +} + +.cuIcon-record:before { + content: "\e7a6"; +} + +.cuIcon-cardboardfill:before { + content: "\e7a9"; +} + +.cuIcon-cardboard:before { + content: "\e7aa"; +} + +.cuIcon-formfill:before { + content: "\e7ab"; +} + +.cuIcon-coin:before { + content: "\e7ac"; +} + +.cuIcon-cardboardforbid:before { + content: "\e7af"; +} + +.cuIcon-circlefill:before { + content: "\e7b0"; +} + +.cuIcon-circle:before { + content: "\e7b1"; +} + +.cuIcon-attentionforbid:before { + content: "\e7b2"; +} + +.cuIcon-attentionforbidfill:before { + content: "\e7b3"; +} + +.cuIcon-attentionfavorfill:before { + content: "\e7b4"; +} + +.cuIcon-attentionfavor:before { + content: "\e7b5"; +} + +.cuIcon-titles:before { + content: "\e701"; +} + +.cuIcon-icloading:before { + content: "\e67a"; +} + +.cuIcon-full:before { + content: "\e7bc"; +} + +.cuIcon-mail:before { + content: "\e7bd"; +} + +.cuIcon-peoplelist:before { + content: "\e7be"; +} + +.cuIcon-goodsnewfill:before { + content: "\e7bf"; +} + +.cuIcon-goodsnew:before { + content: "\e7c0"; +} + +.cuIcon-medalfill:before { + content: "\e7c1"; +} + +.cuIcon-medal:before { + content: "\e7c2"; +} + +.cuIcon-newsfill:before { + content: "\e7c3"; +} + +.cuIcon-newshotfill:before { + content: "\e7c4"; +} + +.cuIcon-newshot:before { + content: "\e7c5"; +} + +.cuIcon-news:before { + content: "\e7c6"; +} + +.cuIcon-videofill:before { + content: "\e7c7"; +} + +.cuIcon-video:before { + content: "\e7c8"; +} + +.cuIcon-exit:before { + content: "\e7cb"; +} + +.cuIcon-skinfill:before { + content: "\e7cc"; +} + +.cuIcon-skin:before { + content: "\e7cd"; +} + +.cuIcon-moneybagfill:before { + content: "\e7ce"; +} + +.cuIcon-usefullfill:before { + content: "\e7cf"; +} + +.cuIcon-usefull:before { + content: "\e7d0"; +} + +.cuIcon-moneybag:before { + content: "\e7d1"; +} + +.cuIcon-redpacket_fill:before { + content: "\e7d3"; +} + +.cuIcon-subscription:before { + content: "\e7d4"; +} + +.cuIcon-loading1:before { + content: "\e633"; +} + +.cuIcon-github:before { + content: "\e692"; +} + +.cuIcon-global:before { + content: "\e7eb"; +} + +.cuIcon-settingsfill:before { + content: "\e6ab"; +} + +.cuIcon-back_android:before { + content: "\e7ed"; +} + +.cuIcon-expressman:before { + content: "\e7ef"; +} + +.cuIcon-evaluate_fill:before { + content: "\e7f0"; +} + +.cuIcon-group_fill:before { + content: "\e7f5"; +} + +.cuIcon-play_forward_fill:before { + content: "\e7f6"; +} + +.cuIcon-deliver_fill:before { + content: "\e7f7"; +} + +.cuIcon-notice_forbid_fill:before { + content: "\e7f8"; +} + +.cuIcon-fork:before { + content: "\e60c"; +} + +.cuIcon-pick:before { + content: "\e7fa"; +} + +.cuIcon-wenzi:before { + content: "\e6a7"; +} + +.cuIcon-ellipse:before { + content: "\e600"; +} + +.cuIcon-qr_code:before { + content: "\e61b"; +} + +.cuIcon-dianhua:before { + content: "\e64d"; +} + +.cuIcon-icon:before { + content: "\e602"; +} + +.cuIcon-loading2:before { + content: "\e7f1"; +} + +.cuIcon-btn:before { + content: "\e601"; +} diff --git a/colorui/main.wxss b/colorui/main.wxss new file mode 100644 index 0000000..9ff677e --- /dev/null +++ b/colorui/main.wxss @@ -0,0 +1,3941 @@ +/* + ColorUi for MP-weixin v2.1.4 | by 文晓港 2019年4月25日19:15:42 + 仅供学习交流,如作它用所承受的法律责任一概与作者无关 + 使用ColorUi开发扩展与插件时,请注明基于ColorUi开发 + + (QQ交流群:240787041) +*/ + +/* ================== + 初始化 + ==================== */ +page { + /* Color 可以自定义相关配色 */ + /* var属性兼容性 --> https://www.caniuse.com/#feat=css-variables */ + /* 标准色 */ + --red: #e54d42; + --orange: #f37b1d; + --yellow: #fbbd08; + --olive: #8dc63f; + --green: #39b54a; + --cyan: #1cbbb4; + --blue: #0081ff; + --purple: #6739b6; + --mauve: #9c26b0; + --pink: #e03997; + --brown: #a5673f; + --grey: #8799a3; + --black: #333333; + --darkGray: #666666; + --gray: #aaaaaa; + --ghostWhite: #f1f1f1; + --white: #ffffff; + /* 浅色 */ + --redLight: #fadbd9; + --orangeLight: #fde6d2; + --yellowLight: #fef2ce; + --oliveLight: #e8f4d9; + --greenLight: #d7f0db; + --cyanLight: #d2f1f0; + --blueLight: #cce6ff; + --purpleLight: #e1d7f0; + --mauveLight: #ebd4ef; + --pinkLight: #f9d7ea; + --brownLight: #ede1d9; + --greyLight: #e7ebed; + /* 渐变色 */ + --gradualRed: linear-gradient(45deg, #f43f3b, #ec008c); + --gradualOrange: linear-gradient(45deg, #ff9700, #ed1c24); + --gradualGreen: linear-gradient(45deg, #39b54a, #8dc63f); + --gradualPurple: linear-gradient(45deg, #9000ff, #5e00ff); + --gradualPink: linear-gradient(45deg, #ec008c, #6739b6); + --gradualBlue: linear-gradient(45deg, #0081ff, #1cbbb4); + /* 阴影透明色 */ + --ShadowSize: 6rpx 6rpx 8rpx; + --redShadow: rgba(204, 69, 59, 0.2); + --orangeShadow: rgba(217, 109, 26, 0.2); + --yellowShadow: rgba(224, 170, 7, 0.2); + --oliveShadow: rgba(124, 173, 55, 0.2); + --greenShadow: rgba(48, 156, 63, 0.2); + --cyanShadow: rgba(28, 187, 180, 0.2); + --blueShadow: rgba(0, 102, 204, 0.2); + --purpleShadow: rgba(88, 48, 156, 0.2); + --mauveShadow: rgba(133, 33, 150, 0.2); + --pinkShadow: rgba(199, 50, 134, 0.2); + --brownShadow: rgba(140, 88, 53, 0.2); + --greyShadow: rgba(114, 130, 138, 0.2); + --grayShadow: rgba(114, 130, 138, 0.2); + --blackShadow: rgba(26, 26, 26, 0.2); + + background-color: var(--ghostWhite); + font-size: 28rpx; + color: var(--black); + font-family: Helvetica Neue, Helvetica, sans-serif; +} + +view, +scroll-view, +swiper, +button, +input, +textarea, +label, +navigator, +image { + box-sizing: border-box; +} + +.round { + border-radius: 5000rpx; +} + +.radius { + border-radius: 6rpx; +} + +/* ================== + 图片 + ==================== */ + +image { + max-width: 100%; + display: inline-block; + position: relative; + z-index: 0; +} + +image.loading::before { + content: ""; + background-color: #f5f5f5; + display: block; + position: absolute; + width: 100%; + height: 100%; + z-index: -2; +} + +image.loading::after { + content: "\e7f1"; + font-family: "cuIcon"; + position: absolute; + top: 0; + left: 0; + width: 32rpx; + height: 32rpx; + line-height: 32rpx; + right: 0; + bottom: 0; + z-index: -1; + font-size: 32rpx; + margin: auto; + color: #ccc; + -webkit-animation: cuIcon-spin 2s infinite linear; + animation: cuIcon-spin 2s infinite linear; + display: block; +} + +.response { + width: 100%; +} + +/* ================== + 开关 + ==================== */ + +switch, +checkbox, +radio { + position: relative; +} + +switch::after, +switch::before { + font-family: "cuIcon"; + content: "\e645"; + position: absolute; + color: var(--white) !important; + top: 0%; + left: 0rpx; + font-size: 26rpx; + line-height: 26px; + width: 50%; + text-align: center; + pointer-events: none; + transform: scale(0, 0); + transition: all 0.3s ease-in-out 0s; + z-index: 9; + bottom: 0; + height: 26px; + margin: auto; +} + +switch::before { + content: "\e646"; + right: 0; + transform: scale(1, 1); + left: auto; +} + +switch[checked]::after, +switch.checked::after { + transform: scale(1, 1); +} + +switch[checked]::before, +switch.checked::before { + transform: scale(0, 0); +} + +switch[checked]::before { + transform: scale(0, 0); +} + +radio::before, +checkbox::before { + font-family: "cuIcon"; + content: "\e645"; + position: absolute; + color: var(--white) !important; + top: 50%; + margin-top: -8px; + right: 5px; + font-size: 32rpx; + line-height: 16px; + pointer-events: none; + transform: scale(1, 1); + transition: all 0.3s ease-in-out 0s; + z-index: 9; +} + +radio .wx-radio-input, +checkbox .wx-checkbox-input { + margin: 0; + width: 24px; + height: 24px; +} + +checkbox.round .wx-checkbox-input { + border-radius: 100rpx; +} + +switch .wx-switch-input { + border: none; + padding: 0 24px; + width: 48px; + height: 26px; + margin: 0; + border-radius: 100rpx; +} + +switch .wx-switch-input:not([class*="bg-"]) { + background: var(--grey) !important; +} + +switch .wx-switch-input::after { + margin: auto; + width: 26px; + height: 26px; + border-radius: 100rpx; + left: 0rpx; + top: 0rpx; + bottom: 0rpx; + position: absolute; + transform: scale(0.9, 0.9); + transition: all 0.1s ease-in-out 0s; +} + +switch .wx-switch-input.wx-switch-input-checked::after { + margin: auto; + left: 22px; + box-shadow: none; + transform: scale(0.9, 0.9); +} + +radio-group { + display: inline-block; +} + + + +switch.radius .wx-switch-input::after, +switch.radius .wx-switch-input, +switch.radius .wx-switch-input::before { + border-radius: 10rpx; +} + +switch .wx-switch-input::before, +radio.radio::before, +checkbox .wx-checkbox-input::before, +radio .wx-radio-input::before, +radio.radio::before { + display: none; +} + +radio.radio[checked]::after { + content: ""; + background-color: transparent; + display: block; + position: absolute; + width: 8px; + height: 8px; + z-index: 999; + top: 0rpx; + left: 0rpx; + right: 0; + bottom: 0; + margin: auto; + border-radius: 200rpx; + border: 8px solid var(--white) !important; +} + +.switch-sex::after { + content: "\e71c"; +} + +.switch-sex::before { + content: "\e71a"; +} + +.switch-sex .wx-switch-input { + background: var(--red) !important; + border-color: var(--red) !important; +} + +.switch-sex[checked] .wx-switch-input { + background: var(--blue) !important; + border-color: var(--blue) !important; +} + +switch.red[checked] .wx-switch-input, +checkbox.red[checked] .wx-checkbox-input, +radio.red[checked] .wx-radio-input { + border-color: var(--red) !important; +} + +switch.orange[checked] .wx-switch-input, +checkbox.orange[checked] .wx-checkbox-input, +radio.orange[checked] .wx-radio-input { + border-color: var(--orange) !important; +} + +switch.yellow[checked] .wx-switch-input, +checkbox.yellow[checked] .wx-checkbox-input, +radio.yellow[checked] .wx-radio-input { + border-color: var(--yellow) !important; +} + +switch.olive[checked] .wx-switch-input, +checkbox.olive[checked] .wx-checkbox-input, +radio.olive[checked] .wx-radio-input { + border-color: var(--olive) !important; +} + +switch.green[checked] .wx-switch-input, +checkbox.green[checked] .wx-checkbox-input, +checkbox[checked] .wx-checkbox-input, +radio.green[checked] .wx-radio-input { + border-color: var(--green) !important; +} + +switch.cyan[checked] .wx-switch-input, +checkbox.cyan[checked] .wx-checkbox-input, +radio.cyan[checked] .wx-radio-input { + border-color: var(--cyan) !important; +} + +switch.blue[checked] .wx-switch-input, +checkbox.blue[checked] .wx-checkbox-input, +radio.blue[checked] .wx-radio-input { + border-color: var(--blue) !important; +} + +switch.purple[checked] .wx-switch-input, +checkbox.purple[checked] .wx-checkbox-input, +radio.purple[checked] .wx-radio-input { + border-color: var(--purple) !important; +} + +switch.mauve[checked] .wx-switch-input, +checkbox.mauve[checked] .wx-checkbox-input, +radio.mauve[checked] .wx-radio-input { + border-color: var(--mauve) !important; +} + +switch.pink[checked] .wx-switch-input, +checkbox.pink[checked] .wx-checkbox-input, +radio.pink[checked] .wx-radio-input { + border-color: var(--pink) !important; +} + +switch.brown[checked] .wx-switch-input, +checkbox.brown[checked] .wx-checkbox-input, +radio.brown[checked] .wx-radio-input { + border-color: var(--brown) !important; +} + +switch.grey[checked] .wx-switch-input, +checkbox.grey[checked] .wx-checkbox-input, +radio.grey[checked] .wx-radio-input { + border-color: var(--grey) !important; +} + +switch.gray[checked] .wx-switch-input, +checkbox.gray[checked] .wx-checkbox-input, +radio.gray[checked] .wx-radio-input { + border-color: var(--grey) !important; +} + +switch.black[checked] .wx-switch-input, +checkbox.black[checked] .wx-checkbox-input, +radio.black[checked] .wx-radio-input { + border-color: var(--black) !important; +} + +switch.white[checked] .wx-switch-input, +checkbox.white[checked] .wx-checkbox-input, +radio.white[checked] .wx-radio-input { + border-color: var(--white) !important; +} + +switch.red[checked] .wx-switch-input.wx-switch-input-checked, +checkbox.red[checked] .wx-checkbox-input, +radio.red[checked] .wx-radio-input { + background-color: var(--red) !important; + color: var(--white) !important; +} + +switch.orange[checked] .wx-switch-input, +checkbox.orange[checked] .wx-checkbox-input, +radio.orange[checked] .wx-radio-input { + background-color: var(--orange) !important; + color: var(--white) !important; +} + +switch.yellow[checked] .wx-switch-input, +checkbox.yellow[checked] .wx-checkbox-input, +radio.yellow[checked] .wx-radio-input { + background-color: var(--yellow) !important; + color: var(--black) !important; +} + +switch.olive[checked] .wx-switch-input, +checkbox.olive[checked] .wx-checkbox-input, +radio.olive[checked] .wx-radio-input { + background-color: var(--olive) !important; + color: var(--white) !important; +} + +switch.green[checked] .wx-switch-input, +switch[checked] .wx-switch-input, +checkbox.green[checked] .wx-checkbox-input, +checkbox[checked] .wx-checkbox-input, +radio.green[checked] .wx-radio-input, +radio[checked] .wx-radio-input { + background-color: var(--green) !important; + color: var(--white) !important; +} + +switch.cyan[checked] .wx-switch-input, +checkbox.cyan[checked] .wx-checkbox-input, +radio.cyan[checked] .wx-radio-input { + background-color: var(--cyan) !important; + color: var(--white) !important; +} + +switch.blue[checked] .wx-switch-input, +checkbox.blue[checked] .wx-checkbox-input, +radio.blue[checked] .wx-radio-input { + background-color: var(--blue) !important; + color: var(--white) !important; +} + +switch.purple[checked] .wx-switch-input, +checkbox.purple[checked] .wx-checkbox-input, +radio.purple[checked] .wx-radio-input { + background-color: var(--purple) !important; + color: var(--white) !important; +} + +switch.mauve[checked] .wx-switch-input, +checkbox.mauve[checked] .wx-checkbox-input, +radio.mauve[checked] .wx-radio-input { + background-color: var(--mauve) !important; + color: var(--white) !important; +} + +switch.pink[checked] .wx-switch-input, +checkbox.pink[checked] .wx-checkbox-input, +radio.pink[checked] .wx-radio-input { + background-color: var(--pink) !important; + color: var(--white) !important; +} + +switch.brown[checked] .wx-switch-input, +checkbox.brown[checked] .wx-checkbox-input, +radio.brown[checked] .wx-radio-input { + background-color: var(--brown) !important; + color: var(--white) !important; +} + +switch.grey[checked] .wx-switch-input, +checkbox.grey[checked] .wx-checkbox-input, +radio.grey[checked] .wx-radio-input { + background-color: var(--grey) !important; + color: var(--white) !important; +} + +switch.gray[checked] .wx-switch-input, +checkbox.gray[checked] .wx-checkbox-input, +radio.gray[checked] .wx-radio-input { + background-color: #f0f0f0 !important; + color: var(--black) !important; +} + +switch.black[checked] .wx-switch-input, +checkbox.black[checked] .wx-checkbox-input, +radio.black[checked] .wx-radio-input { + background-color: var(--black) !important; + color: var(--white) !important; +} + +switch.white[checked] .wx-switch-input, +checkbox.white[checked] .wx-checkbox-input, +radio.white[checked] .wx-radio-input { + background-color: var(--white) !important; + color: var(--black) !important; +} + +/* ================== + 边框 + ==================== */ + +/* -- 实线 -- */ + +.solid, +.solid-top, +.solid-right, +.solid-bottom, +.solid-left, +.solids, +.solids-top, +.solids-right, +.solids-bottom, +.solids-left, +.dashed, +.dashed-top, +.dashed-right, +.dashed-bottom, +.dashed-left { + position: relative; +} + +.solid::after, +.solid-top::after, +.solid-right::after, +.solid-bottom::after, +.solid-left::after, +.solids::after, +.solids-top::after, +.solids-right::after, +.solids-bottom::after, +.solids-left::after, +.dashed::after, +.dashed-top::after, +.dashed-right::after, +.dashed-bottom::after, +.dashed-left::after { + content: " "; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border-radius: inherit; + transform: scale(0.5); + transform-origin: 0 0; + pointer-events: none; + box-sizing: border-box; +} + +.solid::after { + border: 1rpx solid rgba(0, 0, 0, 0.1); +} + +.solid-top::after { + border-top: 1rpx solid rgba(0, 0, 0, 0.1); +} + +.solid-right::after { + border-right: 1rpx solid rgba(0, 0, 0, 0.1); +} + +.solid-bottom::after { + border-bottom: 1rpx solid rgba(0, 0, 0, 0.1); +} + +.solid-left::after { + border-left: 1rpx solid rgba(0, 0, 0, 0.1); +} + +.solids::after { + border: 8rpx solid #eee; +} + +.solids-top::after { + border-top: 8rpx solid #eee; +} + +.solids-right::after { + border-right: 8rpx solid #eee; +} + +.solids-bottom::after { + border-bottom: 8rpx solid #eee; +} + +.solids-left::after { + border-left: 8rpx solid #eee; +} + +/* -- 虚线 -- */ + +.dashed::after { + border: 1rpx dashed #ddd; +} + +.dashed-top::after { + border-top: 1rpx dashed #ddd; +} + +.dashed-right::after { + border-right: 1rpx dashed #ddd; +} + +.dashed-bottom::after { + border-bottom: 1rpx dashed #ddd; +} + +.dashed-left::after { + border-left: 1rpx dashed #ddd; +} + +/* -- 阴影 -- */ + +.shadow[class*='white'] { + --ShadowSize: 0 1rpx 6rpx; +} + +.shadow-lg { + --ShadowSize: 0rpx 40rpx 100rpx 0rpx; +} + +.shadow-warp { + position: relative; + box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1); +} + +.shadow-warp:before, +.shadow-warp:after { + position: absolute; + content: ""; + top: 20rpx; + bottom: 30rpx; + left: 20rpx; + width: 50%; + box-shadow: 0 30rpx 20rpx rgba(0, 0, 0, 0.2); + transform: rotate(-3deg); + z-index: -1; +} + +.shadow-warp:after { + right: 20rpx; + left: auto; + transform: rotate(3deg); +} + +.shadow-blur { + position: relative; +} + +.shadow-blur::before { + content: ""; + display: block; + background: inherit; + filter: blur(10rpx); + position: absolute; + width: 100%; + height: 100%; + top: 10rpx; + left: 10rpx; + z-index: -1; + opacity: 0.4; + transform-origin: 0 0; + border-radius: inherit; + transform: scale(1, 1); +} + +/* ================== + 按钮 + ==================== */ + +.cu-btn { + position: relative; + border: 0rpx; + display: inline-flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 0 30rpx; + font-size: 28rpx; + height: 64rpx; + line-height: 1; + text-align: center; + text-decoration: none; + overflow: visible; + margin-left: initial; + transform: translate(0rpx, 0rpx); + margin-right: initial; +} + +.cu-btn::after { + display: none; +} + +.cu-btn:not([class*="bg-"]) { + background-color: #f0f0f0; +} + +.cu-btn[class*="line"] { + background-color: transparent; +} + +.cu-btn[class*="line"]::after { + content: " "; + display: block; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border: 1rpx solid currentColor; + transform: scale(0.5); + transform-origin: 0 0; + box-sizing: border-box; + border-radius: 12rpx; + z-index: 1; + pointer-events: none; +} + +.cu-btn.round[class*="line"]::after { + border-radius: 1000rpx; +} + +.cu-btn[class*="lines"]::after { + border: 6rpx solid currentColor; +} + +.cu-btn[class*="bg-"]::after { + display: none; +} + +.cu-btn.sm { + padding: 0 20rpx; + font-size: 20rpx; + height: 48rpx; +} + +.cu-btn.lg { + padding: 0 40rpx; + font-size: 32rpx; + height: 80rpx; +} + +.cu-btn.icon.sm { + width: 48rpx; + height: 48rpx; +} + +.cu-btn.icon { + width: 64rpx; + height: 64rpx; + border-radius: 500rpx; + padding: 0; +} + +button.icon.lg { + width: 80rpx; + height: 80rpx; +} + +.cu-btn.shadow-blur::before { + top: 4rpx; + left: 4rpx; + filter: blur(6rpx); + opacity: 0.6; +} + +.cu-btn.button-hover { + transform: translate(1rpx, 1rpx); +} + +.block { + display: block; +} + +.cu-btn.block { + display: flex; +} + +.cu-btn[disabled] { + opacity: 0.6; + color: var(--white); +} + +/* ================== + 徽章 + ==================== */ + +.cu-tag { + font-size: 24rpx; + vertical-align: middle; + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 0rpx 16rpx; + height: 48rpx; + font-family: Helvetica Neue, Helvetica, sans-serif; + white-space: nowrap; +} + +.cu-tag:not([class*="bg"]):not([class*="line"]) { + background-color: var(--ghostWhite); +} + +.cu-tag[class*="line-"]::after { + content: " "; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border: 1rpx solid currentColor; + transform: scale(0.5); + transform-origin: 0 0; + box-sizing: border-box; + border-radius: inherit; + z-index: 1; + pointer-events: none; +} + +.cu-tag.radius[class*="line"]::after { + border-radius: 12rpx; +} + +.cu-tag.round[class*="line"]::after { + border-radius: 1000rpx; +} + +.cu-tag[class*="line-"]::after { + border-radius: 0; +} + +.cu-tag+.cu-tag { + margin-left: 10rpx; +} + +.cu-tag.sm { + font-size: 20rpx; + padding: 0rpx 12rpx; + height: 32rpx; +} + +.cu-capsule { + display: inline-flex; + vertical-align: middle; +} + +.cu-capsule+.cu-capsule { + margin-left: 10rpx; +} + +.cu-capsule .cu-tag { + margin: 0; +} + +.cu-capsule .cu-tag[class*="line-"]:last-child::after { + border-left: 0rpx solid transparent; +} + +.cu-capsule .cu-tag[class*="line-"]:first-child::after { + border-right: 0rpx solid transparent; +} + +.cu-capsule.radius .cu-tag:first-child { + border-top-left-radius: 6rpx; + border-bottom-left-radius: 6rpx; +} + +.cu-capsule.radius .cu-tag:last-child::after, +.cu-capsule.radius .cu-tag[class*="line-"] { + border-top-right-radius: 12rpx; + border-bottom-right-radius: 12rpx; +} + +.cu-capsule.round .cu-tag:first-child { + border-top-left-radius: 200rpx; + border-bottom-left-radius: 200rpx; + text-indent: 4rpx; +} + +.cu-capsule.round .cu-tag:last-child::after, +.cu-capsule.round .cu-tag:last-child { + border-top-right-radius: 200rpx; + border-bottom-right-radius: 200rpx; + text-indent: -4rpx; +} + +.cu-tag.badge { + border-radius: 200rpx; + position: absolute; + top: -10rpx; + right: -10rpx; + font-size: 20rpx; + padding: 0rpx 10rpx; + height: 28rpx; + color: var(--white); +} + +.cu-tag.badge:not([class*="bg-"]) { + background-color: #dd514c; +} + +.cu-tag:empty:not([class*="cuIcon-"]) { + padding: 0rpx; + width: 16rpx; + height: 16rpx; + top: -4rpx; + right: -4rpx; +} + +.cu-tag[class*="cuIcon-"] { + width: 32rpx; + height: 32rpx; + top: -4rpx; + right: -4rpx; +} + +/* ================== + 头像 + ==================== */ + +.cu-avatar { + font-variant: small-caps; + margin: 0; + padding: 0; + display: inline-flex; + text-align: center; + justify-content: center; + align-items: center; + background-color: #ccc; + color: var(--white); + white-space: nowrap; + position: relative; + width: 64rpx; + height: 64rpx; + background-size: cover; + background-position: center; + vertical-align: middle; + font-size: 1.5em; +} + +.cu-avatar.sm { + width: 48rpx; + height: 48rpx; + font-size: 1em; +} + +.cu-avatar.lg { + width: 96rpx; + height: 96rpx; + font-size: 2em; +} + +.cu-avatar.xl { + width: 128rpx; + height: 128rpx; + font-size: 2.5em; +} + +.cu-avatar .avatar-text { + font-size: 0.4em; +} + +.cu-avatar-group { + direction: rtl; + unicode-bidi: bidi-override; + padding: 0 10rpx 0 40rpx; + display: inline-block; +} + +.cu-avatar-group .cu-avatar { + margin-left: -30rpx; + border: 4rpx solid var(--ghostWhite); + vertical-align: middle; +} + +.cu-avatar-group .cu-avatar.sm { + margin-left: -20rpx; + border: 1rpx solid var(--ghostWhite); +} + +/* ================== + 进度条 + ==================== */ + +.cu-progress { + overflow: hidden; + height: 28rpx; + background-color: #ebeef5; + display: inline-flex; + align-items: center; + width: 100%; +} + +.cu-progress+view, +.cu-progress+text { + line-height: 1; +} + +.cu-progress.xs { + height: 10rpx; +} + +.cu-progress.sm { + height: 20rpx; +} + +.cu-progress view { + width: 0; + height: 100%; + align-items: center; + display: flex; + justify-items: flex-end; + justify-content: space-around; + font-size: 20rpx; + color: var(--white); + transition: width 0.6s ease; +} + +.cu-progress text { + align-items: center; + display: flex; + font-size: 20rpx; + color: var(--black); + text-indent: 10rpx; +} + +.cu-progress.text-progress { + padding-right: 60rpx; +} + +.cu-progress.striped view { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 72rpx 72rpx; +} + +.cu-progress.active view { + animation: progress-stripes 2s linear infinite; +} + +@keyframes progress-stripes { + from { + background-position: 72rpx 0; + } + + to { + background-position: 0 0; + } +} + +/* ================== + 加载 + ==================== */ + +.cu-load { + display: block; + line-height: 3em; + text-align: center; +} + +.cu-load::before { + font-family: "cuIcon"; + display: inline-block; + margin-right: 6rpx; +} + +.cu-load.loading::before { + content: "\e67a"; + animation: cuIcon-spin 2s infinite linear; +} + +.cu-load.loading::after { + content: "加载中..."; +} + +.cu-load.over::before { + content: "\e64a"; +} + +.cu-load.over::after { + content: "没有更多了"; +} + +.cu-load.erro::before { + content: "\e658"; +} + +.cu-load.erro::after { + content: "加载失败"; +} + +.cu-load.load-icon::before { + font-size: 32rpx; +} + +.cu-load.load-icon::after { + display: none; +} + +.cu-load.load-icon.over { + display: none; +} + +.cu-load.load-modal { + position: fixed; + top: 0; + right: 0; + bottom: 140rpx; + left: 0; + margin: auto; + width: 260rpx; + height: 260rpx; + background-color: var(--white); + border-radius: 10rpx; + box-shadow: 0 0 0rpx 2000rpx rgba(0, 0, 0, 0.5); + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; + font-size: 28rpx; + z-index: 9999; + line-height: 2.4em; +} + +.cu-load.load-modal [class*="cuIcon-"] { + font-size: 60rpx; +} + +.cu-load.load-modal image { + width: 70rpx; + height: 70rpx; +} + +.cu-load.load-modal::after { + content: ""; + position: absolute; + background-color: var(--white); + border-radius: 50%; + width: 200rpx; + height: 200rpx; + font-size: 10px; + border-top: 6rpx solid rgba(0, 0, 0, 0.05); + border-right: 6rpx solid rgba(0, 0, 0, 0.05); + border-bottom: 6rpx solid rgba(0, 0, 0, 0.05); + border-left: 6rpx solid var(--orange); + animation: cuIcon-spin 1s infinite linear; + z-index: -1; +} + +.load-progress { + pointer-events: none; + top: 0; + position: fixed; + width: 100%; + left: 0; + z-index: 2000; +} + +.load-progress.hide { + display: none; +} + +.load-progress .load-progress-bar { + position: relative; + width: 100%; + height: 4rpx; + overflow: hidden; + transition: all 200ms ease 0s; +} + +.load-progress .load-progress-spinner { + position: absolute; + top: 10rpx; + right: 10rpx; + z-index: 2000; + display: block; +} + +.load-progress .load-progress-spinner::after { + content: ""; + display: block; + width: 24rpx; + height: 24rpx; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border: solid 4rpx transparent; + border-top-color: inherit; + border-left-color: inherit; + border-radius: 50%; + -webkit-animation: load-progress-spinner 0.4s linear infinite; + animation: load-progress-spinner 0.4s linear infinite; +} + +@-webkit-keyframes load-progress-spinner { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); + } + + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes load-progress-spinner { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); + } + + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +/* ================== + 列表 + ==================== */ +.grayscale { + filter: grayscale(1); +} + +.cu-list+.cu-list { + margin-top: 30rpx +} + +.cu-list>.cu-item { + transition: all .6s ease-in-out 0s; + transform: translateX(0rpx) +} + +.cu-list>.cu-item.move-cur { + transform: translateX(-260rpx) +} + +.cu-list>.cu-item .move { + position: absolute; + right: 0; + display: flex; + width: 260rpx; + height: 100%; + transform: translateX(100%) +} + +.cu-list>.cu-item .move view { + display: flex; + flex: 1; + justify-content: center; + align-items: center +} + +.cu-list.menu-avatar { + overflow: hidden; +} + +.cu-list.menu-avatar>.cu-item { + position: relative; + display: flex; + padding-right: 10rpx; + height: 140rpx; + background-color: var(--white); + justify-content: flex-end; + align-items: center +} + +.cu-list.menu-avatar>.cu-item>.cu-avatar { + position: absolute; + left: 30rpx +} + +.cu-list.menu-avatar>.cu-item .flex .text-cut { + max-width: 510rpx +} + +.cu-list.menu-avatar>.cu-item .content { + position: absolute; + left: 146rpx; + width: calc(100% - 96rpx - 60rpx - 120rpx - 20rpx); + line-height: 1.6em; +} + +.cu-list.menu-avatar>.cu-item .content.flex-sub { + width: calc(100% - 96rpx - 60rpx - 20rpx); +} + +.cu-list.menu-avatar>.cu-item .content>view:first-child { + font-size: 30rpx; + display: flex; + align-items: center +} + +.cu-list.menu-avatar>.cu-item .content .cu-tag.sm { + display: inline-block; + margin-left: 10rpx; + height: 28rpx; + font-size: 16rpx; + line-height: 32rpx +} + +.cu-list.menu-avatar>.cu-item .action { + width: 100rpx; + text-align: center +} + +.cu-list.menu-avatar>.cu-item .action view+view { + margin-top: 10rpx +} + +.cu-list.menu-avatar.comment>.cu-item .content { + position: relative; + left: 0; + width: auto; + flex: 1; +} + +.cu-list.menu-avatar.comment>.cu-item { + padding: 30rpx 30rpx 30rpx 120rpx; + height: auto +} + +.cu-list.menu-avatar.comment .cu-avatar { + align-self: flex-start +} + +.cu-list.menu>.cu-item { + position: relative; + display: flex; + padding: 0 30rpx; + min-height: 100rpx; + background-color: var(--white); + justify-content: space-between; + align-items: center +} + +.cu-list.menu>.cu-item:last-child:after { + border: none +} + +.cu-list.menu>.cu-item:after { + position: absolute; + top: 0; + left: 0; + box-sizing: border-box; + width: 200%; + height: 200%; + border-bottom: 1rpx solid #ddd; + border-radius: inherit; + content: " "; + transform: scale(.5); + transform-origin: 0 0; + pointer-events: none +} + +.cu-list.menu>.cu-item.grayscale { + background-color: #f5f5f5 +} + +.cu-list.menu>.cu-item.cur { + background-color: #fcf7e9 +} + +.cu-list.menu>.cu-item.arrow { + padding-right: 90rpx +} + +.cu-list.menu>.cu-item.arrow:before { + position: absolute; + top: 0; + right: 30rpx; + bottom: 0; + display: block; + margin: auto; + width: 30rpx; + height: 30rpx; + color: var(--grey); + content: "\e6a3"; + text-align: center; + font-size: 34rpx; + font-family: "cuIcon"; + line-height: 30rpx +} + +.cu-list.menu>.cu-item button.content { + padding: 0; + background-color: transparent; + justify-content: flex-start +} + +.cu-list.menu>.cu-item button.content:after { + display: none +} + +.cu-list.menu>.cu-item .cu-avatar-group .cu-avatar { + border-color: var(--white) +} + +.cu-list.menu>.cu-item .content>view:first-child { + display: flex; + align-items: center +} + +.cu-list.menu>.cu-item .content>text[class*=cuIcon] { + display: inline-block; + margin-right: 10rpx; + width: 1.6em; + text-align: center +} + +.cu-list.menu>.cu-item .content>image { + display: inline-block; + margin-right: 10rpx; + width: 1.6em; + height: 1.6em; + vertical-align: middle +} + +.cu-list.menu>.cu-item .content { + font-size: 30rpx; + line-height: 1.6em; + flex: 1 +} + +.cu-list.menu>.cu-item .content .cu-tag.sm { + display: inline-block; + margin-left: 10rpx; + height: 28rpx; + font-size: 16rpx; + line-height: 32rpx +} + +.cu-list.menu>.cu-item .action .cu-tag:empty { + right: 10rpx +} + +.cu-list.menu { + display: block; + overflow: hidden +} + +.cu-list.menu.sm-border>.cu-item:after { + left: 30rpx; + width: calc(200% - 120rpx) +} + +.cu-list.grid>.cu-item { + position: relative; + display: flex; + padding: 20rpx 0 30rpx; + transition-duration: 0s; + flex-direction: column +} + +.cu-list.grid>.cu-item:after { + position: absolute; + top: 0; + left: 0; + box-sizing: border-box; + width: 200%; + height: 200%; + border-right: 1px solid rgba(0, 0, 0, .1); + border-bottom: 1px solid rgba(0, 0, 0, .1); + border-radius: inherit; + content: " "; + transform: scale(.5); + transform-origin: 0 0; + pointer-events: none +} + +.cu-list.grid>.cu-item text { + display: block; + margin-top: 10rpx; + color: #888; + font-size: 26rpx; + line-height: 40rpx +} + +.cu-list.grid>.cu-item [class*=cuIcon] { + position: relative; + display: block; + margin-top: 20rpx; + width: 100%; + font-size: 48rpx +} + +.cu-list.grid>.cu-item .cu-tag { + right: auto; + left: 50%; + margin-left: 20rpx +} + +.cu-list.grid { + background-color: var(--white); + text-align: center +} + +.cu-list.grid.no-border>.cu-item { + padding-top: 10rpx; + padding-bottom: 20rpx +} + +.cu-list.grid.no-border>.cu-item:after { + border: none +} + +.cu-list.grid.no-border { + padding: 20rpx 10rpx +} + +.cu-list.grid.col-3>.cu-item:nth-child(3n):after, +.cu-list.grid.col-4>.cu-item:nth-child(4n):after, +.cu-list.grid.col-5>.cu-item:nth-child(5n):after { + border-right-width: 0 +} + +.cu-list.card-menu { + overflow: hidden; + margin-right: 30rpx; + margin-left: 30rpx; + border-radius: 20rpx +} + + +/* ================== + 操作条 + ==================== */ + +.cu-bar { + display: flex; + position: relative; + align-items: center; + min-height: 100rpx; + justify-content: space-between; +} + +.cu-bar .action { + display: flex; + align-items: center; + height: 100%; + justify-content: center; + max-width: 100%; +} + +.cu-bar .action.border-title { + position: relative; + top: -10rpx; +} + +.cu-bar .action.border-title text[class*="bg-"]:last-child { + position: absolute; + bottom: -0.5rem; + min-width: 2rem; + height: 6rpx; + left: 0; +} + +.cu-bar .action.sub-title { + position: relative; + top: -0.2rem; +} + +.cu-bar .action.sub-title text { + position: relative; + z-index: 1; +} + +.cu-bar .action.sub-title text[class*="bg-"]:last-child { + position: absolute; + display: inline-block; + bottom: -0.2rem; + border-radius: 6rpx; + width: 100%; + height: 0.6rem; + left: 0.6rem; + opacity: 0.3; + z-index: 0; +} + +.cu-bar .action.sub-title text[class*="text-"]:last-child { + position: absolute; + display: inline-block; + bottom: -0.7rem; + left: 0.5rem; + opacity: 0.2; + z-index: 0; + text-align: right; + font-weight: 900; + font-size: 36rpx; +} + +.cu-bar.justify-center .action.border-title text:last-child, +.cu-bar.justify-center .action.sub-title text:last-child { + left: 0; + right: 0; + margin: auto; + text-align: center; +} + +.cu-bar .action:first-child { + margin-left: 30rpx; + font-size: 30rpx; +} + +.cu-bar .action text.text-cut { + text-align: left; + width: 100%; +} + +.cu-bar .cu-avatar:first-child { + margin-left: 20rpx; +} + +.cu-bar .action:first-child>text[class*="cuIcon-"] { + margin-left: -0.3em; + margin-right: 0.3em; +} + +.cu-bar .action:last-child { + margin-right: 30rpx; +} + +.cu-bar .action>text[class*="cuIcon-"], +.cu-bar .action>view[class*="cuIcon-"] { + font-size: 36rpx; +} + +.cu-bar .action>text[class*="cuIcon-"]+text[class*="cuIcon-"] { + margin-left: 0.5em; +} + +.cu-bar .content { + position: absolute; + text-align: center; + width: calc(100% - 340rpx); + left: 0; + right: 0; + bottom: 0; + top: 0; + margin: auto; + height: 60rpx; + font-size: 32rpx; + line-height: 60rpx; + cursor: none; + pointer-events: none; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.cu-bar.ios .content { + bottom: 7px; + height: 30px; + font-size: 32rpx; + line-height: 30px; +} + +.cu-bar.btn-group { + justify-content: space-around; +} + +.cu-bar.btn-group button { + padding: 20rpx 32rpx; +} + +.cu-bar.btn-group button { + flex: 1; + margin: 0 20rpx; + max-width: 50%; +} + +.cu-bar .search-form { + background-color: #f5f5f5; + line-height: 64rpx; + height: 64rpx; + font-size: 24rpx; + color: var(--black); + flex: 1; + display: flex; + align-items: center; + margin: 0 30rpx; +} + +.cu-bar .search-form+.action { + margin-right: 30rpx; +} + +.cu-bar .search-form input { + flex: 1; + padding-right: 30rpx; + height: 64rpx; + line-height: 64rpx; + font-size: 26rpx; + background-color: transparent; +} + +.cu-bar .search-form [class*="cuIcon-"] { + margin: 0 0.5em 0 0.8em; +} + +.cu-bar .search-form [class*="cuIcon-"]::before { + top: 0rpx; +} + +.cu-bar.fixed, +.nav.fixed { + position: fixed; + width: 100%; + top: 0; + z-index: 1024; + box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, 0.1); +} + +.cu-bar.foot { + position: fixed; + width: 100%; + bottom: 0; + z-index: 1024; + box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, 0.1); +} + +.cu-bar.tabbar { + padding: 0; + height: calc(100rpx + env(safe-area-inset-bottom) / 2); + padding-bottom: calc(env(safe-area-inset-bottom) / 2); +} + +.cu-tabbar-height { + min-height: 100rpx; + height: calc(100rpx + env(safe-area-inset-bottom) / 2); +} + +.cu-bar.tabbar.shadow { + box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, 0.1); +} + +.cu-bar.tabbar .action { + font-size: 22rpx; + position: relative; + flex: 1; + text-align: center; + padding: 0; + display: block; + height: auto; + line-height: 1; + margin: 0; + overflow: initial; +} + +.cu-bar.tabbar.shop .action { + width: 140rpx; + flex: initial; +} + +.cu-bar.tabbar .action.add-action { + position: relative; + z-index: 2; + padding-top: 50rpx; + background-color: inherit; +} + +.cu-bar.tabbar .action.add-action [class*="cuIcon-"] { + position: absolute; + width: 70rpx; + z-index: 2; + height: 70rpx; + border-radius: 50%; + line-height: 70rpx; + font-size: 50rpx; + top: -35rpx; + left: 0; + right: 0; + margin: auto; + padding: 0; +} + +.cu-bar.tabbar .action.add-action::after { + content: ""; + position: absolute; + width: 100rpx; + height: 100rpx; + top: -50rpx; + left: 0; + right: 0; + margin: auto; + box-shadow: 0 -3rpx 8rpx rgba(0, 0, 0, 0.08); + border-radius: 50rpx; + background-color: inherit; + z-index: 0; +} + +.cu-bar.tabbar .action.add-action::before { + content: ""; + position: absolute; + width: 100rpx; + height: 30rpx; + bottom: 30rpx; + left: 0; + right: 0; + margin: auto; + background-color: inherit; + z-index: 1; +} + +.cu-bar.tabbar .btn-group { + flex: 1; + display: flex; + justify-content: space-around; + align-items: center; + padding: 0 10rpx; +} + +.cu-bar.tabbar button.action::after { + border: 0; +} + +.cu-bar.tabbar .action [class*="cuIcon-"] { + width: 100rpx; + position: relative; + display: block; + height: auto; + margin: 0 auto 10rpx; + text-align: center; + font-size: 40rpx; +} + +.cu-bar.tabbar .action .cuIcon-cu-image { + margin: 0 auto; +} + +.cu-bar.tabbar .action .cuIcon-cu-image image { + width: 50rpx; + height: 50rpx; + display: inline-block; +} + +.cu-bar.tabbar .submit { + align-items: center; + display: flex; + justify-content: center; + text-align: center; + position: relative; + flex: 2; + align-self: stretch; +} + +.cu-bar.tabbar .submit:last-child { + flex: 2.6; +} + +.cu-bar.tabbar .submit+.submit { + flex: 2; +} + +.cu-bar.tabbar.border .action::before { + content: " "; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + transform: scale(0.5); + transform-origin: 0 0; + border-right: 1rpx solid rgba(0, 0, 0, 0.1); + z-index: 3; +} + +.cu-bar.tabbar.border .action:last-child:before { + display: none; +} + +.cu-bar.input { + padding-right: 20rpx; + background-color: var(--white); +} + +.cu-bar.input input { + overflow: initial; + line-height: 64rpx; + height: 64rpx; + min-height: 64rpx; + flex: 1; + font-size: 30rpx; + margin: 0 20rpx; +} + +.cu-bar.input .action { + margin-left: 20rpx; +} + +.cu-bar.input .action [class*="cuIcon-"] { + font-size: 48rpx; +} + +.cu-bar.input input+.action { + margin-right: 20rpx; + margin-left: 0rpx; +} + +.cu-bar.input .action:first-child [class*="cuIcon-"] { + margin-left: 0rpx; +} + +.cu-custom { + display: block; + position: relative; +} + +.cu-custom .cu-bar .content { + width: calc(100% - 440rpx); +} + + +.cu-custom .cu-bar .content image { + height: 60rpx; + width: 240rpx; +} + +.cu-custom .cu-bar { + min-height: 0px; + padding-right: 220rpx; + box-shadow: 0rpx 0rpx 0rpx; + z-index: 9999; +} + +.cu-custom .cu-bar .border-custom { + position: relative; + background: rgba(0, 0, 0, 0.15); + border-radius: 1000rpx; + height: 30px; +} + +.cu-custom .cu-bar .border-custom::after { + content: " "; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border-radius: inherit; + transform: scale(0.5); + transform-origin: 0 0; + pointer-events: none; + box-sizing: border-box; + border: 1rpx solid var(--white); + opacity: 0.5; +} + +.cu-custom .cu-bar .border-custom::before { + content: " "; + width: 1rpx; + height: 110%; + position: absolute; + top: 22.5%; + left: 0; + right: 0; + margin: auto; + transform: scale(0.5); + transform-origin: 0 0; + pointer-events: none; + box-sizing: border-box; + opacity: 0.6; + background-color: var(--white); +} + +.cu-custom .cu-bar .border-custom text { + display: block; + flex: 1; + margin: auto !important; + text-align: center; + font-size: 34rpx; +} + +/* ================== + 导航栏 + ==================== */ + +.nav { + white-space: nowrap; +} + +::-webkit-scrollbar { + display: none; +} + +.nav .cu-item { + height: 90rpx; + display: inline-block; + line-height: 90rpx; + margin: 0 10rpx; + padding: 0 20rpx; +} + +.nav .cu-item.cur { + border-bottom: 4rpx solid; +} + +/* ================== + 时间轴 + ==================== */ + +.cu-timeline { + display: block; + background-color: var(--white); +} + +.cu-timeline .cu-time { + width: 120rpx; + text-align: center; + padding: 20rpx 0; + font-size: 26rpx; + color: #888; + display: block; +} + +.cu-timeline>.cu-item { + padding: 30rpx 30rpx 30rpx 120rpx; + position: relative; + display: block; + z-index: 0; +} + +.cu-timeline>.cu-item:not([class*="text-"]) { + color: #ccc; +} + +.cu-timeline>.cu-item::after { + content: ""; + display: block; + position: absolute; + width: 1rpx; + background-color: #ddd; + left: 60rpx; + height: 100%; + top: 0; + z-index: 8; +} + +.cu-timeline>.cu-item::before { + font-family: "cuIcon"; + display: block; + position: absolute; + top: 36rpx; + z-index: 9; + background-color: var(--white); + width: 50rpx; + height: 50rpx; + text-align: center; + border: none; + line-height: 50rpx; + left: 36rpx; +} + +.cu-timeline>.cu-item:not([class*="cuIcon-"])::before { + content: "\e763"; +} + +.cu-timeline>.cu-item[class*="cuIcon-"]::before { + background-color: var(--white); + width: 50rpx; + height: 50rpx; + text-align: center; + border: none; + line-height: 50rpx; + left: 36rpx; +} + +.cu-timeline>.cu-item>.content { + padding: 30rpx; + border-radius: 6rpx; + display: block; + line-height: 1.6; +} + +.cu-timeline>.cu-item>.content:not([class*="bg-"]) { + background-color: var(--ghostWhite); + color: var(--black); +} + +.cu-timeline>.cu-item>.content+.content { + margin-top: 20rpx; +} + +/* ================== + 聊天 + ==================== */ + +.cu-chat { + display: flex; + flex-direction: column; +} + +.cu-chat .cu-item { + display: flex; + padding: 30rpx 30rpx 70rpx; + position: relative; +} + +.cu-chat .cu-item>.cu-avatar { + width: 80rpx; + height: 80rpx; +} + +.cu-chat .cu-item>.main { + max-width: calc(100% - 260rpx); + margin: 0 40rpx; + display: flex; + align-items: center; +} + +.cu-chat .cu-item>image { + height: 320rpx; +} + +.cu-chat .cu-item>.main .content { + padding: 20rpx; + border-radius: 6rpx; + display: inline-flex; + max-width: 100%; + align-items: center; + font-size: 30rpx; + position: relative; + min-height: 80rpx; + line-height: 40rpx; + text-align: left; +} + +.cu-chat .cu-item>.main .content:not([class*="bg-"]) { + background-color: var(--white); + color: var(--black); +} + +.cu-chat .cu-item .date { + position: absolute; + font-size: 24rpx; + color: var(--grey); + width: calc(100% - 320rpx); + bottom: 20rpx; + left: 160rpx; +} + +.cu-chat .cu-item .action { + padding: 0 30rpx; + display: flex; + align-items: center; +} + +.cu-chat .cu-item>.main .content::after { + content: ""; + top: 27rpx; + transform: rotate(45deg); + position: absolute; + z-index: 100; + display: inline-block; + overflow: hidden; + width: 24rpx; + height: 24rpx; + left: -12rpx; + right: initial; + background-color: inherit; +} + +.cu-chat .cu-item.self>.main .content::after { + left: auto; + right: -12rpx; +} + +.cu-chat .cu-item>.main .content::before { + content: ""; + top: 30rpx; + transform: rotate(45deg); + position: absolute; + z-index: -1; + display: inline-block; + overflow: hidden; + width: 24rpx; + height: 24rpx; + left: -12rpx; + right: initial; + background-color: inherit; + filter: blur(5rpx); + opacity: 0.3; +} + +.cu-chat .cu-item>.main .content:not([class*="bg-"])::before { + background-color: var(--black); + opacity: 0.1; +} + +.cu-chat .cu-item.self>.main .content::before { + left: auto; + right: -12rpx; +} + +.cu-chat .cu-item.self { + justify-content: flex-end; + text-align: right; +} + +.cu-chat .cu-info { + display: inline-block; + margin: 20rpx auto; + font-size: 24rpx; + padding: 8rpx 12rpx; + background-color: rgba(0, 0, 0, 0.2); + border-radius: 6rpx; + color: var(--white); + max-width: 400rpx; + line-height: 1.4; +} + +/* ================== + 卡片 + ==================== */ + +.cu-card { + display: block; + overflow: hidden; +} + +.cu-card>.cu-item { + display: block; + background-color: var(--white); + overflow: hidden; + border-radius: 10rpx; + margin: 30rpx; +} + +.cu-card>.cu-item.shadow-blur { + overflow: initial; +} + +.cu-card.no-card>.cu-item { + margin: 0rpx; + border-radius: 0rpx; +} + +.cu-card .grid.grid-square { + margin-bottom: -20rpx; +} + +.cu-card.case .image { + position: relative; +} + +.cu-card.case .image image { + width: 100%; +} + +.cu-card.case .image .cu-tag { + position: absolute; + right: 0; + top: 0; +} + +.cu-card.case .image .cu-bar { + position: absolute; + bottom: 0; + width: 100%; + background-color: transparent; + padding: 0rpx 30rpx; +} + +.cu-card.case.no-card .image { + margin: 30rpx 30rpx 0; + overflow: hidden; + border-radius: 10rpx; +} + +.cu-card.dynamic { + display: block; +} + +.cu-card.dynamic>.cu-item { + display: block; + background-color: var(--white); + overflow: hidden; +} + +.cu-card.dynamic>.cu-item>.text-content { + padding: 0 30rpx 0; + max-height: 6.4em; + overflow: hidden; + font-size: 30rpx; + margin-bottom: 20rpx; +} + +.cu-card.dynamic>.cu-item .square-img { + width: 100%; + height: 200rpx; + border-radius: 6rpx; +} + +.cu-card.dynamic>.cu-item .only-img { + width: 100%; + height: 320rpx; + border-radius: 6rpx; +} + +.cu-card.article { + display: block; +} + +.cu-card.article>.cu-item { + padding-bottom: 30rpx; +} + +.cu-card.article>.cu-item .title { + font-size: 30rpx; + font-weight: 900; + color: var(--black); + line-height: 100rpx; + padding: 0 30rpx; +} + +.cu-card.article>.cu-item .content { + display: flex; + padding: 0 30rpx; +} + +.cu-card.article>.cu-item .content>image { + width: 240rpx; + height: 6.4em; + margin-right: 20rpx; + border-radius: 6rpx; +} + +.cu-card.article>.cu-item .content .desc { + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.cu-card.article>.cu-item .content .text-content { + font-size: 28rpx; + color: #888; + height: 4.8em; + overflow: hidden; +} + +/* ================== + 表单 + ==================== */ + +.cu-form-group { + background-color: var(--white); + padding: 1rpx 30rpx; + display: flex; + align-items: center; + min-height: 100rpx; + justify-content: space-between; +} + +.cu-form-group+.cu-form-group { + border-top: 1rpx solid #eee; +} + +.cu-form-group .title { + text-align: justify; + padding-right: 30rpx; + font-size: 30rpx; + position: relative; + height: 60rpx; + line-height: 60rpx; +} + +.cu-form-group input { + flex: 1; + font-size: 30rpx; + color: #555; + padding-right: 20rpx; +} + +.cu-form-group>text[class*="cuIcon-"] { + font-size: 36rpx; + padding: 0; + box-sizing: border-box; +} + +.cu-form-group textarea { + margin: 32rpx 0 30rpx; + height: 4.6em; + width: 100%; + line-height: 1.2em; + flex: 1; + font-size: 28rpx; + padding: 0; +} + +.cu-form-group.align-start .title { + height: 1em; + margin-top: 32rpx; + line-height: 1em; +} + +.cu-form-group picker { + flex: 1; + padding-right: 40rpx; + overflow: hidden; + position: relative; +} + +.cu-form-group picker .picker { + line-height: 100rpx; + font-size: 28rpx; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + width: 100%; + text-align: right; +} + +.cu-form-group picker::after { + font-family: "cuIcon"; + display: block; + content: "\e6a3"; + position: absolute; + font-size: 34rpx; + color: var(--grey); + line-height: 100rpx; + width: 60rpx; + text-align: center; + top: 0; + bottom: 0; + right: -20rpx; + margin: auto; +} + +.cu-form-group textarea[disabled], +.cu-form-group textarea[disabled] .placeholder { + color: transparent; +} + +/* ================== + 模态窗口 + ==================== */ + +.cu-modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1110; + opacity: 0; + outline: 0; + text-align: center; + -ms-transform: scale(1.185); + transform: scale(1.185); + backface-visibility: hidden; + perspective: 2000rpx; + background: rgba(0, 0, 0, 0.6); + transition: all 0.3s ease-in-out 0s; + pointer-events: none; +} + +.cu-modal::before { + content: "\200B"; + display: inline-block; + height: 100%; + vertical-align: middle; +} + +.cu-modal.show { + opacity: 1; + transition-duration: 0.3s; + -ms-transform: scale(1); + transform: scale(1); + overflow-x: hidden; + overflow-y: auto; + pointer-events: auto; +} + +.cu-dialog { + position: relative; + display: inline-block; + vertical-align: middle; + margin-left: auto; + margin-right: auto; + width: 680rpx; + max-width: 100%; + background-color: #f8f8f8; + border-radius: 10rpx; + overflow: hidden; +} + +.cu-modal.bottom-modal::before { + vertical-align: bottom; +} + +.cu-modal.bottom-modal .cu-dialog { + width: 100%; + border-radius: 0; +} + +.cu-modal.bottom-modal { + margin-bottom: -1000rpx; +} + +.cu-modal.bottom-modal.show { + margin-bottom: 0; +} + +.cu-modal.drawer-modal { + transform: scale(1); + display: flex; +} + +.cu-modal.drawer-modal .cu-dialog { + height: 100%; + min-width: 200rpx; + border-radius: 0; + margin: initial; + transition-duration: 0.3s; +} + +.cu-modal.drawer-modal.justify-start .cu-dialog { + transform: translateX(-100%); +} + +.cu-modal.drawer-modal.justify-end .cu-dialog { + transform: translateX(100%); +} + +.cu-modal.drawer-modal.show .cu-dialog { + transform: translateX(0%); +} +.cu-modal .cu-dialog>.cu-bar:first-child .action{ + min-width: 100rpx; + margin-right: 0; + min-height: 100rpx; +} +/* ================== + 轮播 + ==================== */ +swiper .a-swiper-dot { + display: inline-block; + width: 16rpx; + height: 16rpx; + background: rgba(0, 0, 0, .3); + border-radius: 50%; + vertical-align: middle; +} + +swiper[class*="-dot"] .wx-swiper-dots { + display: flex; + align-items: center; + width: 100%; + justify-content: center; +} + +swiper.square-dot .wx-swiper-dot { + background-color: var(--white); + opacity: 0.4; + width: 10rpx; + height: 10rpx; + border-radius: 20rpx; + margin: 0 8rpx !important; +} + +swiper.square-dot .wx-swiper-dot.wx-swiper-dot-active { + opacity: 1; + width: 30rpx; +} + +swiper.round-dot .wx-swiper-dot { + width: 10rpx; + height: 10rpx; + position: relative; + margin: 4rpx 8rpx !important; +} + +swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active::after { + content: ""; + position: absolute; + width: 10rpx; + height: 10rpx; + top: 0rpx; + left: 0rpx; + right: 0; + bottom: 0; + margin: auto; + background-color: var(--white); + border-radius: 20rpx; +} + +swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active { + width: 18rpx; + height: 18rpx; +} + +.screen-swiper { + min-height: 375rpx; +} + +.screen-swiper image, +.screen-swiper video, +.swiper-item image, +.swiper-item video { + width: 100%; + display: block; + height: 100%; + margin: 0; + pointer-events: none; +} + +.card-swiper { + height: 420rpx !important; +} + +.card-swiper swiper-item { + width: 610rpx !important; + left: 70rpx; + box-sizing: border-box; + padding: 40rpx 0rpx 70rpx; + overflow: initial; +} + +.card-swiper swiper-item .swiper-item { + width: 100%; + display: block; + height: 100%; + border-radius: 10rpx; + transform: scale(0.9); + transition: all 0.2s ease-in 0s; + overflow: hidden; +} + +.card-swiper swiper-item.cur .swiper-item { + transform: none; + transition: all 0.2s ease-in 0s; +} + + +.tower-swiper { + height: 420rpx; + position: relative; + max-width: 750rpx; + overflow: hidden; +} + +.tower-swiper .tower-item { + position: absolute; + width: 300rpx; + height: 380rpx; + top: 0; + bottom: 0; + left: 50%; + margin: auto; + transition: all 0.2s ease-in 0s; + opacity: 1; +} + +.tower-swiper .tower-item.none { + opacity: 0; +} + +.tower-swiper .tower-item .swiper-item { + width: 100%; + height: 100%; + border-radius: 6rpx; + overflow: hidden; +} + +/* ================== + 步骤条 + ==================== */ + +.cu-steps { + display: flex; +} + +scroll-view.cu-steps { + display: block; + white-space: nowrap; +} + +scroll-view.cu-steps .cu-item { + display: inline-block; +} + +.cu-steps .cu-item { + flex: 1; + text-align: center; + position: relative; + min-width: 100rpx; +} + +.cu-steps .cu-item:not([class*="text-"]) { + color: var(--grey); +} + +.cu-steps .cu-item [class*="cuIcon-"], +.cu-steps .cu-item .num { + display: block; + font-size: 40rpx; + line-height: 80rpx; +} + +.cu-steps .cu-item::before, +.cu-steps .cu-item::after, +.cu-steps.steps-arrow .cu-item::before, +.cu-steps.steps-arrow .cu-item::after { + content: ""; + display: block; + position: absolute; + height: 0px; + width: calc(100% - 80rpx); + border-bottom: 1px solid #ccc; + left: calc(0px - (100% - 80rpx) / 2); + top: 40rpx; + z-index: 0; +} + +.cu-steps.steps-arrow .cu-item::before, +.cu-steps.steps-arrow .cu-item::after { + content: "\e6a3"; + font-family: "cuIcon"; + height: 30rpx; + border-bottom-width: 0px; + line-height: 30rpx; + top: 0; + bottom: 0; + margin: auto; + color: #ccc; +} + +.cu-steps.steps-bottom .cu-item::before, +.cu-steps.steps-bottom .cu-item::after { + bottom: 40rpx; + top: initial; +} + +.cu-steps .cu-item::after { + border-bottom: 1px solid currentColor; + width: 0px; + transition: all 0.3s ease-in-out 0s; +} + +.cu-steps .cu-item[class*="text-"]::after { + width: calc(100% - 80rpx); + color: currentColor; +} + +.cu-steps .cu-item:first-child::before, +.cu-steps .cu-item:first-child::after { + display: none; +} + +.cu-steps .cu-item .num { + width: 40rpx; + height: 40rpx; + border-radius: 50%; + line-height: 40rpx; + margin: 20rpx auto; + font-size: 24rpx; + border: 1px solid currentColor; + position: relative; + overflow: hidden; +} + +.cu-steps .cu-item[class*="text-"] .num { + background-color: currentColor; +} + +.cu-steps .cu-item .num::before, +.cu-steps .cu-item .num::after { + content: attr(data-index); + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + margin: auto; + transition: all 0.3s ease-in-out 0s; + transform: translateY(0rpx); +} + +.cu-steps .cu-item[class*="text-"] .num::before { + transform: translateY(-40rpx); + color: var(--white); +} + +.cu-steps .cu-item .num::after { + transform: translateY(40rpx); + color: var(--white); + transition: all 0.3s ease-in-out 0s; +} + +.cu-steps .cu-item[class*="text-"] .num::after { + content: "\e645"; + font-family: "cuIcon"; + color: var(--white); + transform: translateY(0rpx); +} + +.cu-steps .cu-item[class*="text-"] .num.err::after { + content: "\e646"; +} + +/* ================== + 布局 + ==================== */ + +/* -- flex弹性布局 -- */ + +.flex { + display: flex; +} + +.basis-xs { + flex-basis: 20%; +} + +.basis-sm { + flex-basis: 40%; +} + +.basis-df { + flex-basis: 50%; +} + +.basis-lg { + flex-basis: 60%; +} + +.basis-xl { + flex-basis: 80%; +} + +.flex-sub { + flex: 1; +} + +.flex-twice { + flex: 2; +} + +.flex-treble { + flex: 3; +} + +.flex-direction { + flex-direction: column; +} + +.flex-wrap { + flex-wrap: wrap; +} + +.align-start { + align-items: flex-start; +} + +.align-end { + align-items: flex-end; +} + +.align-center { + align-items: center; +} + +.align-stretch { + align-items: stretch; +} + +.self-start { + align-self: flex-start; +} + +.self-center { + align-self: flex-center; +} + +.self-end { + align-self: flex-end; +} + +.self-stretch { + align-self: stretch; +} + +.align-stretch { + align-items: stretch; +} + +.justify-start { + justify-content: flex-start; +} + +.justify-end { + justify-content: flex-end; +} + +.justify-center { + justify-content: center; +} + +.justify-between { + justify-content: space-between; +} + +.justify-around { + justify-content: space-around; +} + +/* grid布局 */ + +.grid { + display: flex; + flex-wrap: wrap; +} + +.grid.grid-square { + overflow: hidden; +} + +.grid.grid-square .cu-tag { + position: absolute; + right: 0; + top: 0; + border-bottom-left-radius: 6rpx; + padding: 6rpx 12rpx; + height: auto; + background-color: rgba(0, 0, 0, 0.5); +} + +.grid.grid-square>view>text[class*="cuIcon-"] { + font-size: 52rpx; + position: absolute; + color: var(--grey); + margin: auto; + top: 0; + bottom: 0; + left: 0; + right: 0; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.grid.grid-square>view { + margin-right: 20rpx; + margin-bottom: 20rpx; + border-radius: 6rpx; + position: relative; + overflow: hidden; +} + +.grid.grid-square>view.bg-img image { + width: 100%; + height: 100%; + position: absolute; +} + +.grid.col-1.grid-square>view { + padding-bottom: 100%; + height: 0; + margin-right: 0; +} + +.grid.col-2.grid-square>view { + padding-bottom: calc((100% - 20rpx)/2); + height: 0; + width: calc((100% - 20rpx)/2); +} + +.grid.col-3.grid-square>view { + padding-bottom: calc((100% - 40rpx)/3); + height: 0; + width: calc((100% - 40rpx)/3); +} + +.grid.col-4.grid-square>view { + padding-bottom: calc((100% - 60rpx)/4); + height: 0; + width: calc((100% - 60rpx)/4); +} + +.grid.col-5.grid-square>view { + padding-bottom: calc((100% - 80rpx)/5); + height: 0; + width: calc((100% - 80rpx)/5); +} + +.grid.col-2.grid-square>view:nth-child(2n), +.grid.col-3.grid-square>view:nth-child(3n), +.grid.col-4.grid-square>view:nth-child(4n), +.grid.col-5.grid-square>view:nth-child(5n){ + margin-right: 0; +} + +.grid.col-1>view { + width: 100%; +} + +.grid.col-2>view { + width: 50%; +} + +.grid.col-3>view { + width: 33.33%; +} + +.grid.col-4>view { + width: 25%; +} + +.grid.col-5>view { + width: 20%; +} + +/* -- 内外边距 -- */ + +.margin-0 { + margin: 0; +} + +.margin-xs { + margin: 10rpx; +} + +.margin-sm { + margin: 20rpx; +} + +.margin { + margin: 30rpx; +} + +.margin-lg { + margin: 40rpx; +} + +.margin-xl { + margin: 50rpx; +} + +.margin-top-xs { + margin-top: 10rpx; +} + +.margin-top-sm { + margin-top: 20rpx; +} + +.margin-top { + margin-top: 30rpx; +} + +.margin-top-lg { + margin-top: 40rpx; +} + +.margin-top-xl { + margin-top: 50rpx; +} + +.margin-right-xs { + margin-right: 10rpx; +} + +.margin-right-sm { + margin-right: 20rpx; +} + +.margin-right { + margin-right: 30rpx; +} + +.margin-right-lg { + margin-right: 40rpx; +} + +.margin-right-xl { + margin-right: 50rpx; +} + +.margin-bottom-xs { + margin-bottom: 10rpx; +} + +.margin-bottom-sm { + margin-bottom: 20rpx; +} + +.margin-bottom { + margin-bottom: 30rpx; +} + +.margin-bottom-lg { + margin-bottom: 40rpx; +} + +.margin-bottom-xl { + margin-bottom: 50rpx; +} + +.margin-left-xs { + margin-left: 10rpx; +} + +.margin-left-sm { + margin-left: 20rpx; +} + +.margin-left { + margin-left: 30rpx; +} + +.margin-left-lg { + margin-left: 40rpx; +} + +.margin-left-xl { + margin-left: 50rpx; +} + +.margin-lr-xs { + margin-left: 10rpx; + margin-right: 10rpx; +} + +.margin-lr-sm { + margin-left: 20rpx; + margin-right: 20rpx; +} + +.margin-lr { + margin-left: 30rpx; + margin-right: 30rpx; +} + +.margin-lr-lg { + margin-left: 40rpx; + margin-right: 40rpx; +} + +.margin-lr-xl { + margin-left: 50rpx; + margin-right: 50rpx; +} + +.margin-tb-xs { + margin-top: 10rpx; + margin-bottom: 10rpx; +} + +.margin-tb-sm { + margin-top: 20rpx; + margin-bottom: 20rpx; +} + +.margin-tb { + margin-top: 30rpx; + margin-bottom: 30rpx; +} + +.margin-tb-lg { + margin-top: 40rpx; + margin-bottom: 40rpx; +} + +.margin-tb-xl { + margin-top: 50rpx; + margin-bottom: 50rpx; +} + +.padding-0 { + padding: 0; +} + +.padding-xs { + padding: 10rpx; +} + +.padding-sm { + padding: 20rpx; +} + +.padding { + padding: 30rpx; +} + +.padding-lg { + padding: 40rpx; +} + +.padding-xl { + padding: 50rpx; +} + +.padding-top-xs { + padding-top: 10rpx; +} + +.padding-top-sm { + padding-top: 20rpx; +} + +.padding-top { + padding-top: 30rpx; +} + +.padding-top-lg { + padding-top: 40rpx; +} + +.padding-top-xl { + padding-top: 50rpx; +} + +.padding-right-xs { + padding-right: 10rpx; +} + +.padding-right-sm { + padding-right: 20rpx; +} + +.padding-right { + padding-right: 30rpx; +} + +.padding-right-lg { + padding-right: 40rpx; +} + +.padding-right-xl { + padding-right: 50rpx; +} + +.padding-bottom-xs { + padding-bottom: 10rpx; +} + +.padding-bottom-sm { + padding-bottom: 20rpx; +} + +.padding-bottom { + padding-bottom: 30rpx; +} + +.padding-bottom-lg { + padding-bottom: 40rpx; +} + +.padding-bottom-xl { + padding-bottom: 50rpx; +} + +.padding-left-xs { + padding-left: 10rpx; +} + +.padding-left-sm { + padding-left: 20rpx; +} + +.padding-left { + padding-left: 30rpx; +} + +.padding-left-lg { + padding-left: 40rpx; +} + +.padding-left-xl { + padding-left: 50rpx; +} + +.padding-lr-xs { + padding-left: 10rpx; + padding-right: 10rpx; +} + +.padding-lr-sm { + padding-left: 20rpx; + padding-right: 20rpx; +} + +.padding-lr { + padding-left: 30rpx; + padding-right: 30rpx; +} + +.padding-lr-lg { + padding-left: 40rpx; + padding-right: 40rpx; +} + +.padding-lr-xl { + padding-left: 50rpx; + padding-right: 50rpx; +} + +.padding-tb-xs { + padding-top: 10rpx; + padding-bottom: 10rpx; +} + +.padding-tb-sm { + padding-top: 20rpx; + padding-bottom: 20rpx; +} + +.padding-tb { + padding-top: 30rpx; + padding-bottom: 30rpx; +} + +.padding-tb-lg { + padding-top: 40rpx; + padding-bottom: 40rpx; +} + +.padding-tb-xl { + padding-top: 50rpx; + padding-bottom: 50rpx; +} + +/* -- 浮动 -- */ + +.cf::after, +.cf::before { + content: " "; + display: table; +} + +.cf::after { + clear: both; +} + +.fl { + float: left; +} + +.fr { + float: right; +} + +/* ================== + 背景 + ==================== */ + +.line-red::after, +.lines-red::after { + border-color: var(--red); +} + +.line-orange::after, +.lines-orange::after { + border-color: var(--orange); +} + +.line-yellow::after, +.lines-yellow::after { + border-color: var(--yellow); +} + +.line-olive::after, +.lines-olive::after { + border-color: var(--olive); +} + +.line-green::after, +.lines-green::after { + border-color: var(--green); +} + +.line-cyan::after, +.lines-cyan::after { + border-color: var(--cyan); +} + +.line-blue::after, +.lines-blue::after { + border-color: var(--blue); +} + +.line-purple::after, +.lines-purple::after { + border-color: var(--purple); +} + +.line-mauve::after, +.lines-mauve::after { + border-color: var(--mauve); +} + +.line-pink::after, +.lines-pink::after { + border-color: var(--pink); +} + +.line-brown::after, +.lines-brown::after { + border-color: var(--brown); +} + +.line-grey::after, +.lines-grey::after { + border-color: var(--grey); +} + +.line-gray::after, +.lines-gray::after { + border-color: var(--gray); +} + +.line-black::after, +.lines-black::after { + border-color: var(--black); +} + +.line-white::after, +.lines-white::after { + border-color: var(--white); +} + +.bg-red { + background-color: var(--red); + color: var(--white); +} + +.bg-orange { + background-color: var(--orange); + color: var(--white); +} + +.bg-yellow { + background-color: var(--yellow); + color: var(--black); +} + +.bg-olive { + background-color: var(--olive); + color: var(--white); +} + +.bg-green { + background-color: var(--green); + color: var(--white); +} + +.bg-cyan { + background-color: var(--cyan); + color: var(--white); +} + +.bg-blue { + background-color: var(--blue); + color: var(--white); +} + +.bg-purple { + background-color: var(--purple); + color: var(--white); +} + +.bg-mauve { + background-color: var(--mauve); + color: var(--white); +} + +.bg-pink { + background-color: var(--pink); + color: var(--white); +} + +.bg-brown { + background-color: var(--brown); + color: var(--white); +} + +.bg-grey { + background-color: var(--grey); + color: var(--white); +} + +.bg-gray { + background-color: #f0f0f0; + color: var(--black); +} + +.bg-black { + background-color: var(--black); + color: var(--white); +} + +.bg-white { + background-color: var(--white); + color: var(--darkGray); +} + +.bg-shadeTop { + background-image: linear-gradient(rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.01)); + color: var(--white); +} + +.bg-shadeBottom { + background-image: linear-gradient(rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 1)); + color: var(--white); +} + +.bg-red.light { + color: var(--red); + background-color: var(--redLight); +} + +.bg-orange.light { + color: var(--orange); + background-color: var(--orangeLight); +} + +.bg-yellow.light { + color: var(--yellow); + background-color: var(--yellowLight); +} + +.bg-olive.light { + color: var(--olive); + background-color: var(--oliveLight); +} + +.bg-green.light { + color: var(--green); + background-color: var(--greenLight); +} + +.bg-cyan.light { + color: var(--cyan); + background-color: var(--cyanLight); +} + +.bg-blue.light { + color: var(--blue); + background-color: var(--blueLight); +} + +.bg-purple.light { + color: var(--purple); + background-color: var(--purpleLight); +} + +.bg-mauve.light { + color: var(--mauve); + background-color: var(--mauveLight); +} + +.bg-pink.light { + color: var(--pink); + background-color: var(--pinkLight); +} + +.bg-brown.light { + color: var(--brown); + background-color: var(--brownLight); +} + +.bg-grey.light { + color: var(--grey); + background-color: var(--greyLight); +} + +.bg-gradual-red { + background-image: var(--gradualRed); + color: var(--white); +} + +.bg-gradual-orange { + background-image: var(--gradualOrange); + color: var(--white); +} + +.bg-gradual-green { + background-image: var(--gradualGreen); + color: var(--white); +} + +.bg-gradual-purple { + background-image: var(--gradualPurple); + color: var(--white); +} + +.bg-gradual-pink { + background-image: var(--gradualPink); + color: var(--white); +} + +.bg-gradual-blue { + background-image: var(--gradualBlue); + color: var(--white); +} + +.shadow[class*="-red"] { + box-shadow: var(--ShadowSize) var(--redShadow); +} + +.shadow[class*="-orange"] { + box-shadow: var(--ShadowSize) var(--orangeShadow); +} + +.shadow[class*="-yellow"] { + box-shadow: var(--ShadowSize) var(--yellowShadow); +} + +.shadow[class*="-olive"] { + box-shadow: var(--ShadowSize) var(--oliveShadow); +} + +.shadow[class*="-green"] { + box-shadow: var(--ShadowSize) var(--greenShadow); +} + +.shadow[class*="-cyan"] { + box-shadow: var(--ShadowSize) var(--cyanShadow); +} + +.shadow[class*="-blue"] { + box-shadow: var(--ShadowSize) var(--blueShadow); +} + +.shadow[class*="-purple"] { + box-shadow: var(--ShadowSize) var(--purpleShadow); +} + +.shadow[class*="-mauve"] { + box-shadow: var(--ShadowSize) var(--mauveShadow); +} + +.shadow[class*="-pink"] { + box-shadow: var(--ShadowSize) var(--pinkShadow); +} + +.shadow[class*="-brown"] { + box-shadow: var(--ShadowSize) var(--brownShadow); +} + +.shadow[class*="-grey"] { + box-shadow: var(--ShadowSize) var(--greyShadow); +} + +.shadow[class*="-gray"] { + box-shadow: var(--ShadowSize) var(--grayShadow); +} + +.shadow[class*="-black"] { + box-shadow: var(--ShadowSize) var(--blackShadow); +} + +.shadow[class*="-white"] { + box-shadow: var(--ShadowSize) var(--blackShadow); +} + +.text-shadow[class*="-red"] { + text-shadow: var(--ShadowSize) var(--redShadow); +} + +.text-shadow[class*="-orange"] { + text-shadow: var(--ShadowSize) var(--orangeShadow); +} + +.text-shadow[class*="-yellow"] { + text-shadow: var(--ShadowSize) var(--yellowShadow); +} + +.text-shadow[class*="-olive"] { + text-shadow: var(--ShadowSize) var(--oliveShadow); +} + +.text-shadow[class*="-green"] { + text-shadow: var(--ShadowSize) var(--greenShadow); +} + +.text-shadow[class*="-cyan"] { + text-shadow: var(--ShadowSize) var(--cyanShadow); +} + +.text-shadow[class*="-blue"] { + text-shadow: var(--ShadowSize) var(--blueShadow); +} + +.text-shadow[class*="-purple"] { + text-shadow: var(--ShadowSize) var(--purpleShadow); +} + +.text-shadow[class*="-mauve"] { + text-shadow: var(--ShadowSize) var(--mauveShadow); +} + +.text-shadow[class*="-pink"] { + text-shadow: var(--ShadowSize) var(--pinkShadow); +} + +.text-shadow[class*="-brown"] { + text-shadow: var(--ShadowSize) var(--brownShadow); +} + +.text-shadow[class*="-grey"] { + text-shadow: var(--ShadowSize) var(--greyShadow); +} + +.text-shadow[class*="-gray"] { + text-shadow: var(--ShadowSize) var(--grayShadow); +} + +.text-shadow[class*="-black"] { + text-shadow: var(--ShadowSize) var(--blackShadow); +} + +.bg-img { + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} + +.bg-mask { + background-color: var(--black); + position: relative; +} + +.bg-mask::after { + content: ""; + border-radius: inherit; + width: 100%; + height: 100%; + display: block; + background-color: rgba(0, 0, 0, 0.4); + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; +} + +.bg-mask view, +.bg-mask cover-view { + z-index: 5; + position: relative; +} + +.bg-video { + position: relative; +} + +.bg-video video { + display: block; + height: 100%; + width: 100%; + -o-object-fit: cover; + object-fit: cover; + position: absolute; + top: 0; + z-index: 0; + pointer-events: none; +} + +/* ================== + 文本 + ==================== */ + +.text-xs { + font-size: 20rpx; +} + +.text-sm { + font-size: 24rpx; +} + +.text-df { + font-size: 28rpx; +} + +.text-lg { + font-size: 32rpx; +} + +.text-xl { + font-size: 36rpx; +} + +.text-xxl { + font-size: 44rpx; +} + +.text-sl { + font-size: 80rpx; +} + +.text-xsl { + font-size: 120rpx; +} + +.text-Abc { + text-transform: Capitalize; +} + +.text-ABC { + text-transform: Uppercase; +} + +.text-abc { + text-transform: Lowercase; +} + +.text-price::before { + content: "¥"; + font-size: 80%; + margin-right: 4rpx; +} + +.text-cut { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.text-bold { + font-weight: bold; +} + +.text-center { + text-align: center; +} + +.text-content { + line-height: 1.6; +} + +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.text-red, +.line-red, +.lines-red { + color: var(--red); +} + +.text-orange, +.line-orange, +.lines-orange { + color: var(--orange); +} + +.text-yellow, +.line-yellow, +.lines-yellow { + color: var(--yellow); +} + +.text-olive, +.line-olive, +.lines-olive { + color: var(--olive); +} + +.text-green, +.line-green, +.lines-green { + color: var(--green); +} + +.text-cyan, +.line-cyan, +.lines-cyan { + color: var(--cyan); +} + +.text-blue, +.line-blue, +.lines-blue { + color: var(--blue); +} + +.text-purple, +.line-purple, +.lines-purple { + color: var(--purple); +} + +.text-mauve, +.line-mauve, +.lines-mauve { + color: var(--mauve); +} + +.text-pink, +.line-pink, +.lines-pink { + color: var(--pink); +} + +.text-brown, +.line-brown, +.lines-brown { + color: var(--brown); +} + +.text-grey, +.line-grey, +.lines-grey { + color: var(--grey); +} + +.text-gray, +.line-gray, +.lines-gray { + color: var(--gray); +} + +.text-black, +.line-black, +.lines-black { + color: var(--black); +} + +.text-white, +.line-white, +.lines-white { + color: var(--white); +} diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js new file mode 100644 index 0000000..a1d3493 --- /dev/null +++ b/custom-tab-bar/index.js @@ -0,0 +1,46 @@ +Component({ + data: { + active: 0, + list: [ + { + icon: 'home-o', + text: "主页", + url: '/pages/index/index' + }, + { + icon: 'search', + text: "提意见", + url: '/pages/advice/advice' + } + ] + }, + + methods: { + onChange(event) { + var that = this; + console.log("hello") + // console.log(event.detail) + this.setData({ active: event.detail }); + // wx.redirectTo({ + // url: this.data.list[event.detail].url, + // }) + wx.switchTab({ + url: this.data.list[this.data.active].url, + success: function(){ + that.setData({ active: event.detail }); + }, + complete: function(){ + that.setData({ active: event.detail }); + } + }); + }, + + // init() { + // console.log("hi") + // const page = getCurrentPages().pop(); + // this.setData({ + // active: this.data.list.findIndex(item => item.url === `/${page.route}`) + // }); + // } + } +}); diff --git a/custom-tab-bar/index.json b/custom-tab-bar/index.json new file mode 100644 index 0000000..f9e7d51 --- /dev/null +++ b/custom-tab-bar/index.json @@ -0,0 +1,5 @@ +{ + "component": true, + "usingComponents": { + } +} \ No newline at end of file diff --git a/custom-tab-bar/index.wxml b/custom-tab-bar/index.wxml new file mode 100644 index 0000000..48f951b --- /dev/null +++ b/custom-tab-bar/index.wxml @@ -0,0 +1,5 @@ + + {{ + item.text + }} + diff --git a/images/icon_home.png b/images/icon_home.png new file mode 100644 index 0000000..0579221 Binary files /dev/null and b/images/icon_home.png differ diff --git a/images/icon_home_active.png b/images/icon_home_active.png new file mode 100644 index 0000000..783ddb1 Binary files /dev/null and b/images/icon_home_active.png differ diff --git a/images/icon_me.png b/images/icon_me.png new file mode 100644 index 0000000..9ceda0b Binary files /dev/null and b/images/icon_me.png differ diff --git a/images/icon_me_active.png b/images/icon_me_active.png new file mode 100644 index 0000000..830e375 Binary files /dev/null and b/images/icon_me_active.png differ diff --git a/images/icon_notebook.png b/images/icon_notebook.png new file mode 100644 index 0000000..786a612 Binary files /dev/null and b/images/icon_notebook.png differ diff --git a/images/icon_notebook_active.png b/images/icon_notebook_active.png new file mode 100644 index 0000000..8e7a899 Binary files /dev/null and b/images/icon_notebook_active.png differ diff --git a/images/icon_tag.png b/images/icon_tag.png new file mode 100644 index 0000000..01995df Binary files /dev/null and b/images/icon_tag.png differ diff --git a/images/icon_tag_active.png b/images/icon_tag_active.png new file mode 100644 index 0000000..f0ba8c2 Binary files /dev/null and b/images/icon_tag_active.png differ diff --git a/miniprogram_npm/vant-weapp/action-sheet/index.d.ts b/miniprogram_npm/vant-weapp/action-sheet/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/action-sheet/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/action-sheet/index.js b/miniprogram_npm/vant-weapp/action-sheet/index.js new file mode 100644 index 0000000..225b463 --- /dev/null +++ b/miniprogram_npm/vant-weapp/action-sheet/index.js @@ -0,0 +1,41 @@ +import { VantComponent } from '../common/component'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + mixins: [safeArea()], + props: { + show: Boolean, + title: String, + cancelText: String, + zIndex: { + type: Number, + value: 100 + }, + actions: { + type: Array, + value: [] + }, + overlay: { + type: Boolean, + value: true + }, + closeOnClickOverlay: { + type: Boolean, + value: true + } + }, + methods: { + onSelect(event) { + const { index } = event.currentTarget.dataset; + const item = this.data.actions[index]; + if (item && !item.disabled && !item.loading) { + this.$emit('select', item); + } + }, + onCancel() { + this.$emit('cancel'); + }, + onClose() { + this.$emit('close'); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/action-sheet/index.json b/miniprogram_npm/vant-weapp/action-sheet/index.json new file mode 100644 index 0000000..19bf989 --- /dev/null +++ b/miniprogram_npm/vant-weapp/action-sheet/index.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-popup": "../popup/index", + "van-loading": "../loading/index" + } +} diff --git a/miniprogram_npm/vant-weapp/action-sheet/index.wxml b/miniprogram_npm/vant-weapp/action-sheet/index.wxml new file mode 100644 index 0000000..5f6d33f --- /dev/null +++ b/miniprogram_npm/vant-weapp/action-sheet/index.wxml @@ -0,0 +1,49 @@ + + + + + {{ title }} + + + + + + + + + {{ cancelText }} + + diff --git a/miniprogram_npm/vant-weapp/action-sheet/index.wxss b/miniprogram_npm/vant-weapp/action-sheet/index.wxss new file mode 100644 index 0000000..a3087b1 --- /dev/null +++ b/miniprogram_npm/vant-weapp/action-sheet/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;color:#333}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;font-size:16px;line-height:50px;text-align:center;background-color:#fff}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5}.van-action-sheet__cancel{height:60px}.van-action-sheet__cancel:before{display:block;height:10px;background-color:#f8f8f8;content:" "}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff}.van-action-sheet__subname{margin-left:5px;font-size:12px;color:#7d7e80}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{position:absolute!important;top:0;right:0;padding:0 15px;font-size:18px!important;line-height:inherit!important;color:#999} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/area/index.d.ts b/miniprogram_npm/vant-weapp/area/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/area/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/area/index.js b/miniprogram_npm/vant-weapp/area/index.js new file mode 100644 index 0000000..17392c9 --- /dev/null +++ b/miniprogram_npm/vant-weapp/area/index.js @@ -0,0 +1,212 @@ +import { VantComponent } from '../common/component'; +import { pickerProps } from '../picker/shared'; +const COLUMNSPLACEHOLDERCODE = '000000'; +VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: Object.assign({}, pickerProps, { value: String, areaList: { + type: Object, + value: {} + }, columnsNum: { + type: [String, Number], + value: 3 + }, columnsPlaceholder: { + type: Array, + observer(val) { + this.setData({ + typeToColumnsPlaceholder: { + province: val[0] || '', + city: val[1] || '', + county: val[2] || '', + } + }); + } + } }), + data: { + columns: [{ values: [] }, { values: [] }, { values: [] }], + displayColumns: [{ values: [] }, { values: [] }, { values: [] }], + typeToColumnsPlaceholder: {} + }, + watch: { + value(value) { + this.code = value; + this.setValues(); + }, + areaList: 'setValues', + columnsNum(value) { + this.set({ + displayColumns: this.data.columns.slice(0, +value) + }); + } + }, + mounted() { + setTimeout(() => { + this.setValues(); + }, 0); + }, + methods: { + getPicker() { + if (this.picker == null) { + this.picker = this.selectComponent('.van-area__picker'); + } + return this.picker; + }, + onCancel(event) { + this.emit('cancel', event.detail); + }, + onConfirm(event) { + const { index } = event.detail; + let { value } = event.detail; + value = this.parseOutputValues(value); + this.emit('confirm', { value, index }); + }, + emit(type, detail) { + detail.values = detail.value; + delete detail.value; + this.$emit(type, detail); + }, + // parse output columns data + parseOutputValues(values) { + const { columnsPlaceholder } = this.data; + return values.map((value, index) => { + // save undefined value + if (!value) + return value; + value = JSON.parse(JSON.stringify(value)); + if (!value.code || value.name === columnsPlaceholder[index]) { + value.code = ''; + value.name = ''; + } + return value; + }); + }, + onChange(event) { + const { index, picker, value } = event.detail; + this.code = value[index].code; + let getValues = picker.getValues(); + getValues = this.parseOutputValues(getValues); + this.setValues().then(() => { + this.$emit('change', { + picker, + values: getValues, + index + }); + }); + }, + getConfig(type) { + const { areaList } = this.data; + return (areaList && areaList[`${type}_list`]) || {}; + }, + getList(type, code) { + const { typeToColumnsPlaceholder } = this.data; + let result = []; + if (type !== 'province' && !code) { + return result; + } + const list = this.getConfig(type); + result = Object.keys(list).map(code => ({ + code, + name: list[code] + })); + if (code) { + // oversea code + if (code[0] === '9' && type === 'city') { + code = '9'; + } + result = result.filter(item => item.code.indexOf(code) === 0); + } + if (typeToColumnsPlaceholder[type] && result.length) { + // set columns placeholder + const codeFill = type === 'province' ? '' : type === 'city' ? COLUMNSPLACEHOLDERCODE.slice(2, 4) : COLUMNSPLACEHOLDERCODE.slice(4, 6); + result.unshift({ + code: `${code}${codeFill}`, + name: typeToColumnsPlaceholder[type] + }); + } + return result; + }, + getIndex(type, code) { + let compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6; + const list = this.getList(type, code.slice(0, compareNum - 2)); + // oversea code + if (code[0] === '9' && type === 'province') { + compareNum = 1; + } + code = code.slice(0, compareNum); + for (let i = 0; i < list.length; i++) { + if (list[i].code.slice(0, compareNum) === code) { + return i; + } + } + return 0; + }, + setValues() { + const county = this.getConfig('county'); + let { code } = this; + if (!code) { + if (this.data.columnsPlaceholder.length) { + code = COLUMNSPLACEHOLDERCODE; + } + else if (Object.keys(county)[0]) { + code = Object.keys(county)[0]; + } + else { + code = ''; + } + } + const province = this.getList('province'); + const city = this.getList('city', code.slice(0, 2)); + const picker = this.getPicker(); + if (!picker) { + return; + } + const stack = []; + stack.push(picker.setColumnValues(0, province, false)); + stack.push(picker.setColumnValues(1, city, false)); + if (city.length && code.slice(2, 4) === '00') { + [{ code }] = city; + } + stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false)); + return Promise.all(stack) + .catch(() => { }) + .then(() => picker.setIndexes([ + this.getIndex('province', code), + this.getIndex('city', code), + this.getIndex('county', code) + ])) + .catch(() => { }); + }, + getValues() { + const picker = this.getPicker(); + return picker ? picker.getValues().filter(value => !!value) : []; + }, + getDetail() { + const values = this.getValues(); + const area = { + code: '', + country: '', + province: '', + city: '', + county: '' + }; + if (!values.length) { + return area; + } + const names = values.map((item) => item.name); + area.code = values[values.length - 1].code; + if (area.code[0] === '9') { + area.country = names[1] || ''; + area.province = names[2] || ''; + } + else { + area.province = names[0] || ''; + area.city = names[1] || ''; + area.county = names[2] || ''; + } + return area; + }, + reset() { + this.code = ''; + return this.setValues(); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/area/index.json b/miniprogram_npm/vant-weapp/area/index.json new file mode 100644 index 0000000..a778e91 --- /dev/null +++ b/miniprogram_npm/vant-weapp/area/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-picker": "../picker/index" + } +} diff --git a/miniprogram_npm/vant-weapp/area/index.wxml b/miniprogram_npm/vant-weapp/area/index.wxml new file mode 100644 index 0000000..6075794 --- /dev/null +++ b/miniprogram_npm/vant-weapp/area/index.wxml @@ -0,0 +1,18 @@ + diff --git a/miniprogram_npm/vant-weapp/area/index.wxss b/miniprogram_npm/vant-weapp/area/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/miniprogram_npm/vant-weapp/area/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/badge-group/index.d.ts b/miniprogram_npm/vant-weapp/badge-group/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/badge-group/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/badge-group/index.js b/miniprogram_npm/vant-weapp/badge-group/index.js new file mode 100644 index 0000000..7629233 --- /dev/null +++ b/miniprogram_npm/vant-weapp/badge-group/index.js @@ -0,0 +1,43 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + relation: { + name: 'badge', + type: 'descendant', + linked(target) { + this.badges.push(target); + this.setActive(this.data.active); + }, + unlinked(target) { + this.badges = this.badges.filter(item => item !== target); + this.setActive(this.data.active); + } + }, + props: { + active: { + type: Number, + value: 0, + observer: 'setActive' + } + }, + beforeCreate() { + this.badges = []; + this.currentActive = -1; + }, + methods: { + setActive(active) { + const { badges, currentActive } = this; + if (!badges.length) { + return Promise.resolve(); + } + this.currentActive = active; + const stack = []; + if (currentActive !== active && badges[currentActive]) { + stack.push(badges[currentActive].setActive(false)); + } + if (badges[active]) { + stack.push(badges[active].setActive(true)); + } + return Promise.all(stack); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/badge-group/index.json b/miniprogram_npm/vant-weapp/badge-group/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram_npm/vant-weapp/badge-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram_npm/vant-weapp/badge-group/index.wxml b/miniprogram_npm/vant-weapp/badge-group/index.wxml new file mode 100644 index 0000000..04a0c8f --- /dev/null +++ b/miniprogram_npm/vant-weapp/badge-group/index.wxml @@ -0,0 +1,3 @@ + + + diff --git a/miniprogram_npm/vant-weapp/badge-group/index.wxss b/miniprogram_npm/vant-weapp/badge-group/index.wxss new file mode 100644 index 0000000..5149eab --- /dev/null +++ b/miniprogram_npm/vant-weapp/badge-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-badge-group{width:85px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/badge/index.d.ts b/miniprogram_npm/vant-weapp/badge/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/badge/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/badge/index.js b/miniprogram_npm/vant-weapp/badge/index.js new file mode 100644 index 0000000..a7c1f4e --- /dev/null +++ b/miniprogram_npm/vant-weapp/badge/index.js @@ -0,0 +1,30 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + relation: { + type: 'ancestor', + name: 'badge-group', + linked(target) { + this.parent = target; + } + }, + props: { + info: null, + title: String + }, + methods: { + onClick() { + const { parent } = this; + if (!parent) { + return; + } + const index = parent.badges.indexOf(this); + parent.setActive(index).then(() => { + this.$emit('click', index); + parent.$emit('change', index); + }); + }, + setActive(active) { + return this.set({ active }); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/badge/index.json b/miniprogram_npm/vant-weapp/badge/index.json new file mode 100644 index 0000000..bf0ebe0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/badge/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-info": "../info/index" + } +} diff --git a/miniprogram_npm/vant-weapp/badge/index.wxml b/miniprogram_npm/vant-weapp/badge/index.wxml new file mode 100644 index 0000000..3563bdb --- /dev/null +++ b/miniprogram_npm/vant-weapp/badge/index.wxml @@ -0,0 +1,17 @@ + + + + + + {{ title }} + + diff --git a/miniprogram_npm/vant-weapp/badge/index.wxss b/miniprogram_npm/vant-weapp/badge/index.wxss new file mode 100644 index 0000000..73cb2c1 --- /dev/null +++ b/miniprogram_npm/vant-weapp/badge/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-badge{display:block;padding:20px 12px 20px 9px;overflow:hidden;font-size:14px;line-height:1.4;color:#7d7e80;word-break:break-all;background-color:#f8f8f8;border-left:3px solid transparent;box-sizing:border-box;-webkit-user-select:none;user-select:none}.van-badge--hover{background-color:#f2f3f5}.van-badge:after{border-bottom-width:1px}.van-badge--active{font-weight:700;color:#333;border-color:#f44}.van-badge--active:after{border-right-width:1px}.van-badge--active,.van-badge--active.van-badge--hover{background-color:#fff}.van-badge__text{position:relative} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/button/index.d.ts b/miniprogram_npm/vant-weapp/button/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/button/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/button/index.js b/miniprogram_npm/vant-weapp/button/index.js new file mode 100644 index 0000000..c7deb50 --- /dev/null +++ b/miniprogram_npm/vant-weapp/button/index.js @@ -0,0 +1,38 @@ +import { VantComponent } from '../common/component'; +import { button } from '../mixins/button'; +import { openType } from '../mixins/open-type'; +VantComponent({ + mixins: [button, openType], + classes: ['hover-class', 'loading-class'], + props: { + icon: String, + color: String, + plain: Boolean, + block: Boolean, + round: Boolean, + square: Boolean, + loading: Boolean, + hairline: Boolean, + disabled: Boolean, + loadingText: String, + type: { + type: String, + value: 'default' + }, + size: { + type: String, + value: 'normal' + }, + loadingSize: { + type: String, + value: '20px' + } + }, + methods: { + onClick() { + if (!this.data.disabled && !this.data.loading) { + this.$emit('click'); + } + } + } +}); diff --git a/miniprogram_npm/vant-weapp/button/index.json b/miniprogram_npm/vant-weapp/button/index.json new file mode 100644 index 0000000..e00a588 --- /dev/null +++ b/miniprogram_npm/vant-weapp/button/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-loading": "../loading/index" + } +} diff --git a/miniprogram_npm/vant-weapp/button/index.wxml b/miniprogram_npm/vant-weapp/button/index.wxml new file mode 100644 index 0000000..dec0e7d --- /dev/null +++ b/miniprogram_npm/vant-weapp/button/index.wxml @@ -0,0 +1,51 @@ + + + diff --git a/miniprogram_npm/vant-weapp/button/index.wxss b/miniprogram_npm/vant-weapp/button/index.wxss new file mode 100644 index 0000000..72a10e7 --- /dev/null +++ b/miniprogram_npm/vant-weapp/button/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-button{position:relative;display:inline-block;height:44px;padding:0;font-size:16px;line-height:42px;text-align:center;vertical-align:middle;box-sizing:border-box;border-radius:2px;-webkit-appearance:none;-webkit-text-size-adjust:100%}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:" ";opacity:0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#333;background-color:#fff;border:1px solid #eee}.van-button--primary{color:#fff;background-color:#07c160;border:1px solid #07c160}.van-button--info{color:#fff;background-color:#1989fa;border:1px solid #1989fa}.van-button--danger{color:#fff;background-color:#f44;border:1px solid #f44}.van-button--warning{color:#fff;background-color:#ff976a;border:1px solid #ff976a}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#07c160}.van-button--plain.van-button--info{color:#1989fa}.van-button--plain.van-button--danger{color:#f44}.van-button--plain.van-button--warning{color:#ff976a}.van-button--large{width:100%;height:50px;line-height:48px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:30px;min-width:60px;padding:0 8px;font-size:12px;line-height:28px}.van-button--mini{display:inline-block;width:50px;height:22px;font-size:10px;line-height:20px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:block;width:100%}.van-button--round{border-radius:10em}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5}.van-button__text{display:inline}.van-button__loading-text{margin-left:5px;display:inline-block;vertical-align:middle}.van-button__icon{min-width:1em;line-height:inherit!important;vertical-align:top}.van-button__icon+.van-button__text:not(:empty){display:inline-block;margin-left:5px;vertical-align:top}.van-button--hairline{border-width:0;padding-top:1px}.van-button--hairline:after{border-width:1px;border-color:inherit;border-radius:4px}.van-button--hairline.van-button--round:after{border-radius:10em}.van-button--hairline.van-button--square:after{border-radius:0} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/card/index.d.ts b/miniprogram_npm/vant-weapp/card/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/card/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/card/index.js b/miniprogram_npm/vant-weapp/card/index.js new file mode 100644 index 0000000..ae64151 --- /dev/null +++ b/miniprogram_npm/vant-weapp/card/index.js @@ -0,0 +1,38 @@ +import { link } from '../mixins/link'; +import { VantComponent } from '../common/component'; +VantComponent({ + classes: [ + 'num-class', + 'desc-class', + 'thumb-class', + 'title-class', + 'price-class', + 'origin-price-class', + ], + mixins: [link], + props: { + tag: String, + num: String, + desc: String, + thumb: String, + title: String, + price: String, + centered: Boolean, + lazyLoad: Boolean, + thumbLink: String, + originPrice: String, + thumbMode: { + type: String, + value: 'aspectFit' + }, + currency: { + type: String, + value: '¥' + } + }, + methods: { + onClickThumb() { + this.jumpLink('thumbLink'); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/card/index.json b/miniprogram_npm/vant-weapp/card/index.json new file mode 100644 index 0000000..e917407 --- /dev/null +++ b/miniprogram_npm/vant-weapp/card/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-tag": "../tag/index" + } +} diff --git a/miniprogram_npm/vant-weapp/card/index.wxml b/miniprogram_npm/vant-weapp/card/index.wxml new file mode 100644 index 0000000..a17b1d6 --- /dev/null +++ b/miniprogram_npm/vant-weapp/card/index.wxml @@ -0,0 +1,45 @@ + + + + + + + + + {{ tag }} + + + + + {{ title }} + + + {{ desc }} + + + + + + {{ currency }} {{ price }} + {{ currency }} {{ originPrice }} + x {{ num }} + + + + + + + + + diff --git a/miniprogram_npm/vant-weapp/card/index.wxss b/miniprogram_npm/vant-weapp/card/index.wxss new file mode 100644 index 0000000..6a74925 --- /dev/null +++ b/miniprogram_npm/vant-weapp/card/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-card{position:relative;padding:5px 15px;font-size:12px;color:#333;background-color:#fafafa;box-sizing:border-box}.van-card__header{display:-webkit-flex;display:flex}.van-card__header--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{position:relative;width:90px;height:90px;margin-right:10px;-webkit-flex:none;flex:none}.van-card__thumb:empty{display:none}.van-card__img{width:100%;height:100%}.van-card__content{position:relative;min-width:0;-webkit-flex:1;flex:1}.van-card__desc,.van-card__title{word-break:break-all}.van-card__title{font-weight:700;line-height:16px}.van-card__desc{color:#7d7e80}.van-card__bottom,.van-card__desc{line-height:20px}.van-card__price{display:inline-block;font-weight:700;color:#f44}.van-card__origin-price{display:inline-block;margin-left:5px;font-size:10px;color:#7d7e80;text-decoration:line-through}.van-card__num{float:right}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{width:100%;text-align:right;-webkit-flex:none;flex:none} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/cell-group/index.d.ts b/miniprogram_npm/vant-weapp/cell-group/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/cell-group/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/cell-group/index.js b/miniprogram_npm/vant-weapp/cell-group/index.js new file mode 100644 index 0000000..3611e09 --- /dev/null +++ b/miniprogram_npm/vant-weapp/cell-group/index.js @@ -0,0 +1,10 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + title: String, + border: { + type: Boolean, + value: true + } + } +}); diff --git a/miniprogram_npm/vant-weapp/cell-group/index.json b/miniprogram_npm/vant-weapp/cell-group/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/cell-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/cell-group/index.wxml b/miniprogram_npm/vant-weapp/cell-group/index.wxml new file mode 100644 index 0000000..6e0b471 --- /dev/null +++ b/miniprogram_npm/vant-weapp/cell-group/index.wxml @@ -0,0 +1,9 @@ + + {{ title }} + + + + diff --git a/miniprogram_npm/vant-weapp/cell-group/index.wxss b/miniprogram_npm/vant-weapp/cell-group/index.wxss new file mode 100644 index 0000000..e0fc603 --- /dev/null +++ b/miniprogram_npm/vant-weapp/cell-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-cell-group__title{font-size:14px;padding:15px 15px 5px;color:#999;line-height:16px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/cell/index.d.ts b/miniprogram_npm/vant-weapp/cell/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/cell/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/cell/index.js b/miniprogram_npm/vant-weapp/cell/index.js new file mode 100644 index 0000000..11cd042 --- /dev/null +++ b/miniprogram_npm/vant-weapp/cell/index.js @@ -0,0 +1,37 @@ +import { link } from '../mixins/link'; +import { VantComponent } from '../common/component'; +VantComponent({ + classes: [ + 'title-class', + 'label-class', + 'value-class', + 'right-icon-class', + 'hover-class' + ], + mixins: [link], + props: { + title: null, + value: null, + icon: String, + size: String, + label: String, + center: Boolean, + isLink: Boolean, + required: Boolean, + clickable: Boolean, + titleWidth: String, + customStyle: String, + arrowDirection: String, + useLabelSlot: Boolean, + border: { + type: Boolean, + value: true + } + }, + methods: { + onClick(event) { + this.$emit('click', event.detail); + this.jumpLink(); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/cell/index.json b/miniprogram_npm/vant-weapp/cell/index.json new file mode 100644 index 0000000..a9ab393 --- /dev/null +++ b/miniprogram_npm/vant-weapp/cell/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/cell/index.wxml b/miniprogram_npm/vant-weapp/cell/index.wxml new file mode 100644 index 0000000..afaaaf8 --- /dev/null +++ b/miniprogram_npm/vant-weapp/cell/index.wxml @@ -0,0 +1,45 @@ + + + + + + + + {{ title }} + + + + + {{ label }} + + + + + {{ value }} + + + + + + + + diff --git a/miniprogram_npm/vant-weapp/cell/index.wxss b/miniprogram_npm/vant-weapp/cell/index.wxss new file mode 100644 index 0000000..a476af1 --- /dev/null +++ b/miniprogram_npm/vant-weapp/cell/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;width:100%;padding:10px 15px;font-size:14px;line-height:24px;color:#333;background-color:#fff;box-sizing:border-box}.van-cell:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:auto;left:15px;right:0;bottom:0;-webkit-transform:scaleY(.5);transform:scaleY(.5);border-bottom:1px solid #eee}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff}.van-cell__label{margin-top:3px;font-size:12px;line-height:18px;color:#999}.van-cell__value{overflow:hidden;color:#999;text-align:right;vertical-align:middle}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;height:24px;font-size:16px;-webkit-align-items:center;align-items:center}.van-cell__left-icon-wrap{margin-right:5px}.van-cell__right-icon-wrap{margin-left:5px;color:#999}.van-cell__left-icon{line-height:24px;vertical-align:middle}.van-cell__right-icon{line-height:24px}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;left:7px;font-size:14px;color:#f44;content:"*"}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-bottom:12px}.van-cell--large .van-cell__title{font-size:16px}.van-cell--large .van-cell__label{font-size:14px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/checkbox-group/index.d.ts b/miniprogram_npm/vant-weapp/checkbox-group/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/checkbox-group/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/checkbox-group/index.js b/miniprogram_npm/vant-weapp/checkbox-group/index.js new file mode 100644 index 0000000..7dd8775 --- /dev/null +++ b/miniprogram_npm/vant-weapp/checkbox-group/index.js @@ -0,0 +1,39 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + relation: { + name: 'checkbox', + type: 'descendant', + linked(target) { + this.children = this.children || []; + this.children.push(target); + this.updateChild(target); + }, + unlinked(target) { + this.children = this.children.filter((child) => child !== target); + } + }, + props: { + max: Number, + value: { + type: Array, + observer: 'updateChildren' + }, + disabled: { + type: Boolean, + observer: 'updateChildren' + } + }, + methods: { + updateChildren() { + (this.children || []).forEach((child) => this.updateChild(child)); + }, + updateChild(child) { + const { value, disabled } = this.data; + child.set({ + value: value.indexOf(child.data.name) !== -1, + disabled: disabled || child.data.disabled + }); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/checkbox-group/index.json b/miniprogram_npm/vant-weapp/checkbox-group/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram_npm/vant-weapp/checkbox-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram_npm/vant-weapp/checkbox-group/index.wxml b/miniprogram_npm/vant-weapp/checkbox-group/index.wxml new file mode 100644 index 0000000..4fa864c --- /dev/null +++ b/miniprogram_npm/vant-weapp/checkbox-group/index.wxml @@ -0,0 +1 @@ + diff --git a/miniprogram_npm/vant-weapp/checkbox-group/index.wxss b/miniprogram_npm/vant-weapp/checkbox-group/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/miniprogram_npm/vant-weapp/checkbox-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/checkbox/index.d.ts b/miniprogram_npm/vant-weapp/checkbox/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/checkbox/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/checkbox/index.js b/miniprogram_npm/vant-weapp/checkbox/index.js new file mode 100644 index 0000000..fdffbbd --- /dev/null +++ b/miniprogram_npm/vant-weapp/checkbox/index.js @@ -0,0 +1,74 @@ +import { VantComponent } from '../common/component'; +function emit(target, value) { + target.$emit('input', value); + target.$emit('change', value); +} +VantComponent({ + field: true, + relation: { + name: 'checkbox-group', + type: 'ancestor', + linked(target) { + this.parent = target; + }, + unlinked() { + this.parent = null; + } + }, + classes: ['icon-class', 'label-class'], + props: { + value: Boolean, + disabled: Boolean, + useIconSlot: Boolean, + checkedColor: String, + labelPosition: String, + labelDisabled: Boolean, + shape: { + type: String, + value: 'round' + } + }, + methods: { + emitChange(value) { + if (this.parent) { + this.setParentValue(this.parent, value); + } + else { + emit(this, value); + } + }, + toggle() { + const { disabled, value } = this.data; + if (!disabled) { + this.emitChange(!value); + } + }, + onClickLabel() { + const { labelDisabled, disabled, value } = this.data; + if (!disabled && !labelDisabled) { + this.emitChange(!value); + } + }, + setParentValue(parent, value) { + const parentValue = parent.data.value.slice(); + const { name } = this.data; + const { max } = parent.data; + if (value) { + if (max && parentValue.length >= max) { + return; + } + if (parentValue.indexOf(name) === -1) { + parentValue.push(name); + emit(parent, parentValue); + } + } + else { + const index = parentValue.indexOf(name); + if (index !== -1) { + parentValue.splice(index, 1); + emit(parent, parentValue); + } + } + } + } +}); diff --git a/miniprogram_npm/vant-weapp/checkbox/index.json b/miniprogram_npm/vant-weapp/checkbox/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/checkbox/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/miniprogram_npm/vant-weapp/checkbox/index.wxml b/miniprogram_npm/vant-weapp/checkbox/index.wxml new file mode 100644 index 0000000..1659ba4 --- /dev/null +++ b/miniprogram_npm/vant-weapp/checkbox/index.wxml @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/miniprogram_npm/vant-weapp/checkbox/index.wxss b/miniprogram_npm/vant-weapp/checkbox/index.wxss new file mode 100644 index 0000000..f623e17 --- /dev/null +++ b/miniprogram_npm/vant-weapp/checkbox/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-checkbox__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c9c9c9}.van-checkbox__label{margin-left:10px;color:#333;word-break:break-all}.van-checkbox__label--left{float:left;margin:0 10px 0 0}.van-checkbox__label--disabled{color:#c9c9c9}.van-checkbox__label:empty{margin:0} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/col/index.d.ts b/miniprogram_npm/vant-weapp/col/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/col/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/col/index.js b/miniprogram_npm/vant-weapp/col/index.js new file mode 100644 index 0000000..8976a5f --- /dev/null +++ b/miniprogram_npm/vant-weapp/col/index.js @@ -0,0 +1,23 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + relation: { + name: 'row', + type: 'ancestor' + }, + props: { + span: Number, + offset: Number + }, + data: { + style: '' + }, + methods: { + setGutter(gutter) { + const padding = `${gutter / 2}px`; + const style = gutter ? `padding-left: ${padding}; padding-right: ${padding};` : ''; + if (style !== this.data.style) { + this.set({ style }); + } + } + } +}); diff --git a/miniprogram_npm/vant-weapp/col/index.json b/miniprogram_npm/vant-weapp/col/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram_npm/vant-weapp/col/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram_npm/vant-weapp/col/index.wxml b/miniprogram_npm/vant-weapp/col/index.wxml new file mode 100644 index 0000000..a759aac --- /dev/null +++ b/miniprogram_npm/vant-weapp/col/index.wxml @@ -0,0 +1,8 @@ + + + + + diff --git a/miniprogram_npm/vant-weapp/col/index.wxss b/miniprogram_npm/vant-weapp/col/index.wxss new file mode 100644 index 0000000..44c896a --- /dev/null +++ b/miniprogram_npm/vant-weapp/col/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-col{float:left;box-sizing:border-box}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/collapse-item/index.d.ts b/miniprogram_npm/vant-weapp/collapse-item/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/collapse-item/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/collapse-item/index.js b/miniprogram_npm/vant-weapp/collapse-item/index.js new file mode 100644 index 0000000..596350e --- /dev/null +++ b/miniprogram_npm/vant-weapp/collapse-item/index.js @@ -0,0 +1,96 @@ +import { VantComponent } from '../common/component'; +const nextTick = () => new Promise(resolve => setTimeout(resolve, 20)); +VantComponent({ + classes: ['title-class', 'content-class'], + relation: { + name: 'collapse', + type: 'ancestor', + linked(parent) { + this.parent = parent; + } + }, + props: { + name: null, + title: null, + value: null, + icon: String, + label: String, + disabled: Boolean, + clickable: Boolean, + border: { + type: Boolean, + value: true + }, + isLink: { + type: Boolean, + value: true + } + }, + data: { + contentHeight: 0, + expanded: false, + transition: false + }, + mounted() { + this.updateExpanded() + .then(nextTick) + .then(() => { + const data = { transition: true }; + if (this.data.expanded) { + data.contentHeight = 'auto'; + } + this.set(data); + }); + }, + methods: { + updateExpanded() { + if (!this.parent) { + return Promise.resolve(); + } + const { value, accordion } = this.parent.data; + const { children = [] } = this.parent; + const { name } = this.data; + const index = children.indexOf(this); + const currentName = name == null ? index : name; + const expanded = accordion + ? value === currentName + : (value || []).some((name) => name === currentName); + const stack = []; + if (expanded !== this.data.expanded) { + stack.push(this.updateStyle(expanded)); + } + stack.push(this.set({ index, expanded })); + return Promise.all(stack); + }, + updateStyle(expanded) { + return this.getRect('.van-collapse-item__content') + .then((rect) => rect.height) + .then((height) => { + if (expanded) { + return this.set({ + contentHeight: height ? `${height}px` : 'auto' + }); + } + return this.set({ contentHeight: `${height}px` }) + .then(nextTick) + .then(() => this.set({ contentHeight: 0 })); + }); + }, + onClick() { + if (this.data.disabled) { + return; + } + const { name, expanded } = this.data; + const index = this.parent.children.indexOf(this); + const currentName = name == null ? index : name; + this.parent.switch(currentName, !expanded); + }, + onTransitionEnd() { + if (this.data.expanded) { + this.set({ + contentHeight: 'auto' + }); + } + } + } +}); diff --git a/miniprogram_npm/vant-weapp/collapse-item/index.json b/miniprogram_npm/vant-weapp/collapse-item/index.json new file mode 100644 index 0000000..0e5425c --- /dev/null +++ b/miniprogram_npm/vant-weapp/collapse-item/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index" + } +} diff --git a/miniprogram_npm/vant-weapp/collapse-item/index.wxml b/miniprogram_npm/vant-weapp/collapse-item/index.wxml new file mode 100644 index 0000000..91afbc2 --- /dev/null +++ b/miniprogram_npm/vant-weapp/collapse-item/index.wxml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + diff --git a/miniprogram_npm/vant-weapp/collapse-item/index.wxss b/miniprogram_npm/vant-weapp/collapse-item/index.wxss new file mode 100644 index 0000000..2ed46f0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/collapse-item/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:.3s}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c9c9c9!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__wrapper--transition{transition:height .3s ease-in-out}.van-collapse-item__content{padding:15px;font-size:13px;line-height:1.5;color:#999;background-color:#fff} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/collapse/index.d.ts b/miniprogram_npm/vant-weapp/collapse/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/collapse/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/collapse/index.js b/miniprogram_npm/vant-weapp/collapse/index.js new file mode 100644 index 0000000..c6efb6a --- /dev/null +++ b/miniprogram_npm/vant-weapp/collapse/index.js @@ -0,0 +1,50 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + relation: { + name: 'collapse-item', + type: 'descendant', + linked(child) { + this.children.push(child); + }, + unlinked(child) { + this.children = this.children.filter((item) => item !== child); + } + }, + props: { + value: { + type: null, + observer: 'updateExpanded' + }, + accordion: { + type: Boolean, + observer: 'updateExpanded' + }, + border: { + type: Boolean, + value: true + } + }, + beforeCreate() { + this.children = []; + }, + methods: { + updateExpanded() { + this.children.forEach((child) => { + child.updateExpanded(); + }); + }, + switch(name, expanded) { + const { accordion, value } = this.data; + if (!accordion) { + name = expanded + ? (value || []).concat(name) + : (value || []).filter((activeName) => activeName !== name); + } + else { + name = expanded ? name : ''; + } + this.$emit('change', name); + this.$emit('input', name); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/collapse/index.json b/miniprogram_npm/vant-weapp/collapse/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram_npm/vant-weapp/collapse/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram_npm/vant-weapp/collapse/index.wxml b/miniprogram_npm/vant-weapp/collapse/index.wxml new file mode 100644 index 0000000..fd4e171 --- /dev/null +++ b/miniprogram_npm/vant-weapp/collapse/index.wxml @@ -0,0 +1,3 @@ + + + diff --git a/miniprogram_npm/vant-weapp/collapse/index.wxss b/miniprogram_npm/vant-weapp/collapse/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/miniprogram_npm/vant-weapp/collapse/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/common/color.d.ts b/miniprogram_npm/vant-weapp/common/color.d.ts new file mode 100644 index 0000000..3f46222 --- /dev/null +++ b/miniprogram_npm/vant-weapp/common/color.d.ts @@ -0,0 +1,4 @@ +export declare const RED = "#f44"; +export declare const BLUE = "#1989fa"; +export declare const GREEN = "#07c160"; +export declare const ORANGE = "#ff976a"; diff --git a/miniprogram_npm/vant-weapp/common/color.js b/miniprogram_npm/vant-weapp/common/color.js new file mode 100644 index 0000000..c850d2a --- /dev/null +++ b/miniprogram_npm/vant-weapp/common/color.js @@ -0,0 +1,4 @@ +export const RED = '#f44'; +export const BLUE = '#1989fa'; +export const GREEN = '#07c160'; +export const ORANGE = '#ff976a'; diff --git a/miniprogram_npm/vant-weapp/common/component.d.ts b/miniprogram_npm/vant-weapp/common/component.d.ts new file mode 100644 index 0000000..9ba8a3b --- /dev/null +++ b/miniprogram_npm/vant-weapp/common/component.d.ts @@ -0,0 +1,3 @@ +import { VantComponentOptions, CombinedComponentInstance } from '../definitions/index'; +declare function VantComponent(vantOptions?: VantComponentOptions>): void; +export { VantComponent }; diff --git a/miniprogram_npm/vant-weapp/common/component.js b/miniprogram_npm/vant-weapp/common/component.js new file mode 100644 index 0000000..63ef1a9 --- /dev/null +++ b/miniprogram_npm/vant-weapp/common/component.js @@ -0,0 +1,48 @@ +import { basic } from '../mixins/basic'; +import { observe } from '../mixins/observer/index'; +function mapKeys(source, target, map) { + Object.keys(map).forEach(key => { + if (source[key]) { + target[map[key]] = source[key]; + } + }); +} +function VantComponent(vantOptions = {}) { + const options = {}; + mapKeys(vantOptions, options, { + data: 'data', + props: 'properties', + mixins: 'behaviors', + methods: 'methods', + beforeCreate: 'created', + created: 'attached', + mounted: 'ready', + relations: 'relations', + destroyed: 'detached', + classes: 'externalClasses' + }); + const { relation } = vantOptions; + if (relation) { + options.relations = Object.assign(options.relations || {}, { + [`../${relation.name}/index`]: relation + }); + } + // add default externalClasses + options.externalClasses = options.externalClasses || []; + options.externalClasses.push('custom-class'); + // add default behaviors + options.behaviors = options.behaviors || []; + options.behaviors.push(basic); + // map field to form-field behavior + if (vantOptions.field) { + options.behaviors.push('wx://form-field'); + } + // add default options + options.options = { + multipleSlots: true, + addGlobalClass: true + }; + observe(vantOptions, options); + Component(options); +} +export { VantComponent }; diff --git a/miniprogram_npm/vant-weapp/common/index.wxss b/miniprogram_npm/vant-weapp/common/index.wxss new file mode 100644 index 0000000..1b5b4ee --- /dev/null +++ b/miniprogram_npm/vant-weapp/common/index.wxss @@ -0,0 +1 @@ +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{content:"";display:table;clear:both}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/common/style/clearfix.wxss b/miniprogram_npm/vant-weapp/common/style/clearfix.wxss new file mode 100644 index 0000000..8d6328c --- /dev/null +++ b/miniprogram_npm/vant-weapp/common/style/clearfix.wxss @@ -0,0 +1 @@ +.van-clearfix:after{content:"";display:table;clear:both} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/common/style/ellipsis.wxss b/miniprogram_npm/vant-weapp/common/style/ellipsis.wxss new file mode 100644 index 0000000..a829a98 --- /dev/null +++ b/miniprogram_npm/vant-weapp/common/style/ellipsis.wxss @@ -0,0 +1 @@ +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/common/style/hairline.wxss b/miniprogram_npm/vant-weapp/common/style/hairline.wxss new file mode 100644 index 0000000..53508ad --- /dev/null +++ b/miniprogram_npm/vant-weapp/common/style/hairline.wxss @@ -0,0 +1 @@ +.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/common/style/mixins/clearfix.wxss b/miniprogram_npm/vant-weapp/common/style/mixins/clearfix.wxss new file mode 100644 index 0000000..e69de29 diff --git a/miniprogram_npm/vant-weapp/common/style/mixins/ellipsis.wxss b/miniprogram_npm/vant-weapp/common/style/mixins/ellipsis.wxss new file mode 100644 index 0000000..e69de29 diff --git a/miniprogram_npm/vant-weapp/common/style/mixins/hairline.wxss b/miniprogram_npm/vant-weapp/common/style/mixins/hairline.wxss new file mode 100644 index 0000000..e69de29 diff --git a/miniprogram_npm/vant-weapp/common/style/var.wxss b/miniprogram_npm/vant-weapp/common/style/var.wxss new file mode 100644 index 0000000..e69de29 diff --git a/miniprogram_npm/vant-weapp/common/utils.d.ts b/miniprogram_npm/vant-weapp/common/utils.d.ts new file mode 100644 index 0000000..dc55bd7 --- /dev/null +++ b/miniprogram_npm/vant-weapp/common/utils.d.ts @@ -0,0 +1,7 @@ +/// +export declare function isDef(value: any): boolean; +export declare function isObj(x: any): boolean; +export declare function isNumber(value: any): boolean; +export declare function range(num: number, min: number, max: number): number; +export declare function nextTick(fn: Function): void; +export declare function getSystemInfoSync(): WechatMiniprogram.GetSystemInfoSuccessCallbackResult; diff --git a/miniprogram_npm/vant-weapp/common/utils.js b/miniprogram_npm/vant-weapp/common/utils.js new file mode 100644 index 0000000..213c91a --- /dev/null +++ b/miniprogram_npm/vant-weapp/common/utils.js @@ -0,0 +1,25 @@ +export function isDef(value) { + return value !== undefined && value !== null; +} +export function isObj(x) { + const type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} +export function isNumber(value) { + return /^\d+$/.test(value); +} +export function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} +export function nextTick(fn) { + setTimeout(() => { + fn(); + }, 1000 / 30); +} +let systemInfo = null; +export function getSystemInfoSync() { + if (systemInfo == null) { + systemInfo = wx.getSystemInfoSync(); + } + return systemInfo; +} diff --git a/miniprogram_npm/vant-weapp/datetime-picker/index.d.ts b/miniprogram_npm/vant-weapp/datetime-picker/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/datetime-picker/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/datetime-picker/index.js b/miniprogram_npm/vant-weapp/datetime-picker/index.js new file mode 100644 index 0000000..e615f1b --- /dev/null +++ b/miniprogram_npm/vant-weapp/datetime-picker/index.js @@ -0,0 +1,287 @@ +import { VantComponent } from '../common/component'; +import { isDef } from '../common/utils'; +import { pickerProps } from '../picker/shared'; +const currentYear = new Date().getFullYear(); +function isValidDate(date) { + return isDef(date) && !isNaN(new Date(date).getTime()); +} +function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} +function padZero(val) { + return `00${val}`.slice(-2); +} +function times(n, iteratee) { + let index = -1; + const result = Array(n < 0 ? 0 : n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} +function getTrueValue(formattedValue) { + if (!formattedValue) + return; + while (isNaN(parseInt(formattedValue, 10))) { + formattedValue = formattedValue.slice(1); + } + return parseInt(formattedValue, 10); +} +function getMonthEndDay(year, month) { + return 32 - new Date(year, month - 1, 32).getDate(); +} +const defaultFormatter = (_, value) => value; +VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: Object.assign({}, pickerProps, { formatter: { + type: Function, + value: defaultFormatter + }, value: null, type: { + type: String, + value: 'datetime' + }, showToolbar: { + type: Boolean, + value: true + }, minDate: { + type: Number, + value: new Date(currentYear - 10, 0, 1).getTime() + }, maxDate: { + type: Number, + value: new Date(currentYear + 10, 11, 31).getTime() + }, minHour: { + type: Number, + value: 0 + }, maxHour: { + type: Number, + value: 23 + }, minMinute: { + type: Number, + value: 0 + }, maxMinute: { + type: Number, + value: 59 + } }), + data: { + innerValue: Date.now(), + columns: [] + }, + watch: { + value: 'updateValue', + type: 'updateValue', + minDate: 'updateValue', + maxDate: 'updateValue', + minHour: 'updateValue', + maxHour: 'updateValue', + minMinute: 'updateValue', + maxMinute: 'updateValue' + }, + methods: { + updateValue() { + const { data } = this; + const val = this.correctValue(this.data.value); + const isEqual = val === data.innerValue; + if (!isEqual) { + this.updateColumnValue(val).then(() => { + this.$emit('input', val); + }); + } + else { + this.updateColumns(); + } + }, + getPicker() { + if (this.picker == null) { + this.picker = this.selectComponent('.van-datetime-picker'); + const { picker } = this; + const { setColumnValues } = picker; + picker.setColumnValues = (...args) => setColumnValues.apply(picker, [...args, false]); + } + return this.picker; + }, + updateColumns() { + const { formatter = defaultFormatter } = this.data; + const results = this.getRanges().map(({ type, range }) => { + const values = times(range[1] - range[0] + 1, index => { + let value = range[0] + index; + value = type === 'year' ? `${value}` : padZero(value); + return formatter(type, value); + }); + return { values }; + }); + return this.set({ columns: results }); + }, + getRanges() { + const { data } = this; + if (data.type === 'time') { + return [ + { + type: 'hour', + range: [data.minHour, data.maxHour] + }, + { + type: 'minute', + range: [data.minMinute, data.maxMinute] + } + ]; + } + const { maxYear, maxDate, maxMonth, maxHour, maxMinute } = this.getBoundary('max', data.innerValue); + const { minYear, minDate, minMonth, minHour, minMinute } = this.getBoundary('min', data.innerValue); + const result = [ + { + type: 'year', + range: [minYear, maxYear] + }, + { + type: 'month', + range: [minMonth, maxMonth] + }, + { + type: 'day', + range: [minDate, maxDate] + }, + { + type: 'hour', + range: [minHour, maxHour] + }, + { + type: 'minute', + range: [minMinute, maxMinute] + } + ]; + if (data.type === 'date') + result.splice(3, 2); + if (data.type === 'year-month') + result.splice(2, 3); + return result; + }, + correctValue(value) { + const { data } = this; + // validate value + const isDateType = data.type !== 'time'; + if (isDateType && !isValidDate(value)) { + value = data.minDate; + } + else if (!isDateType && !value) { + const { minHour } = data; + value = `${padZero(minHour)}:00`; + } + // time type + if (!isDateType) { + let [hour, minute] = value.split(':'); + hour = padZero(range(hour, data.minHour, data.maxHour)); + minute = padZero(range(minute, data.minMinute, data.maxMinute)); + return `${hour}:${minute}`; + } + // date type + value = Math.max(value, data.minDate); + value = Math.min(value, data.maxDate); + return value; + }, + getBoundary(type, innerValue) { + const value = new Date(innerValue); + const boundary = new Date(this.data[`${type}Date`]); + const year = boundary.getFullYear(); + let month = 1; + let date = 1; + let hour = 0; + let minute = 0; + if (type === 'max') { + month = 12; + date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1); + hour = 23; + minute = 59; + } + if (value.getFullYear() === year) { + month = boundary.getMonth() + 1; + if (value.getMonth() + 1 === month) { + date = boundary.getDate(); + if (value.getDate() === date) { + hour = boundary.getHours(); + if (value.getHours() === hour) { + minute = boundary.getMinutes(); + } + } + } + } + return { + [`${type}Year`]: year, + [`${type}Month`]: month, + [`${type}Date`]: date, + [`${type}Hour`]: hour, + [`${type}Minute`]: minute + }; + }, + onCancel() { + this.$emit('cancel'); + }, + onConfirm() { + this.$emit('confirm', this.data.innerValue); + }, + onChange() { + const { data } = this; + let value; + const picker = this.getPicker(); + if (data.type === 'time') { + const indexes = picker.getIndexes(); + value = `${indexes[0] + data.minHour}:${indexes[1] + data.minMinute}`; + } + else { + const values = picker.getValues(); + const year = getTrueValue(values[0]); + const month = getTrueValue(values[1]); + const maxDate = getMonthEndDay(year, month); + let date = getTrueValue(values[2]); + if (data.type === 'year-month') { + date = 1; + } + date = date > maxDate ? maxDate : date; + let hour = 0; + let minute = 0; + if (data.type === 'datetime') { + hour = getTrueValue(values[3]); + minute = getTrueValue(values[4]); + } + value = new Date(year, month - 1, date, hour, minute); + } + value = this.correctValue(value); + this.updateColumnValue(value).then(() => { + this.$emit('input', value); + this.$emit('change', picker); + }); + }, + updateColumnValue(value) { + let values = []; + const { type, formatter = defaultFormatter } = this.data; + const picker = this.getPicker(); + if (type === 'time') { + const pair = value.split(':'); + values = [ + formatter('hour', pair[0]), + formatter('minute', pair[1]) + ]; + } + else { + const date = new Date(value); + values = [ + formatter('year', `${date.getFullYear()}`), + formatter('month', padZero(date.getMonth() + 1)) + ]; + if (type === 'date') { + values.push(formatter('day', padZero(date.getDate()))); + } + if (type === 'datetime') { + values.push(formatter('day', padZero(date.getDate())), formatter('hour', padZero(date.getHours())), formatter('minute', padZero(date.getMinutes()))); + } + } + return this.set({ innerValue: value }) + .then(() => this.updateColumns()) + .then(() => picker.setValues(values)); + } + }, + created() { + const innerValue = this.correctValue(this.data.value); + this.updateColumnValue(innerValue).then(() => { + this.$emit('input', innerValue); + }); + } +}); diff --git a/miniprogram_npm/vant-weapp/datetime-picker/index.json b/miniprogram_npm/vant-weapp/datetime-picker/index.json new file mode 100644 index 0000000..a778e91 --- /dev/null +++ b/miniprogram_npm/vant-weapp/datetime-picker/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-picker": "../picker/index" + } +} diff --git a/miniprogram_npm/vant-weapp/datetime-picker/index.wxml b/miniprogram_npm/vant-weapp/datetime-picker/index.wxml new file mode 100644 index 0000000..ade2202 --- /dev/null +++ b/miniprogram_npm/vant-weapp/datetime-picker/index.wxml @@ -0,0 +1,16 @@ + diff --git a/miniprogram_npm/vant-weapp/datetime-picker/index.wxss b/miniprogram_npm/vant-weapp/datetime-picker/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/miniprogram_npm/vant-weapp/datetime-picker/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/definitions/index.d.ts b/miniprogram_npm/vant-weapp/definitions/index.d.ts new file mode 100644 index 0000000..e63c4a8 --- /dev/null +++ b/miniprogram_npm/vant-weapp/definitions/index.d.ts @@ -0,0 +1,32 @@ +/// +import { Weapp } from './weapp'; +declare type RecordToAny = { + [K in keyof T]: any; +}; +declare type RecordToReturn = { + [P in keyof T]: T[P] extends (...args: any[]) => any ? ReturnType : T[P]; +}; +export declare type CombinedComponentInstance = Methods & WechatMiniprogram.Component.TrivialInstance & Weapp.FormField & { + data: Data & RecordToReturn & RecordToAny; +}; +export interface VantComponentOptions { + data?: Data; + field?: boolean; + classes?: string[]; + mixins?: string[]; + props?: Props & Weapp.PropertyOption; + watch?: Weapp.WatchOption; + computed?: Computed & Weapp.ComputedOption; + relation?: Weapp.RelationOption & { + name: string; + }; + relations?: { + [componentName: string]: Weapp.RelationOption; + }; + methods?: Methods & Weapp.MethodOption; + beforeCreate?: (this: Instance) => void; + created?: (this: Instance) => void; + mounted?: (this: Instance) => void; + destroyed?: (this: Instance) => void; +} +export {}; diff --git a/miniprogram_npm/vant-weapp/definitions/index.js b/miniprogram_npm/vant-weapp/definitions/index.js new file mode 100644 index 0000000..e69de29 diff --git a/miniprogram_npm/vant-weapp/definitions/weapp.d.ts b/miniprogram_npm/vant-weapp/definitions/weapp.d.ts new file mode 100644 index 0000000..9b18ea8 --- /dev/null +++ b/miniprogram_npm/vant-weapp/definitions/weapp.d.ts @@ -0,0 +1,111 @@ +/// +export declare namespace Weapp { + interface FormField { + data: { + name: string; + value: any; + }; + } + interface Target { + id: string; + tagName: string; + dataset: { + [key: string]: any; + }; + } + interface Event { + /** + * 代表事件的类型。 + */ + type: string; + /** + * 页面打开到触发事件所经过的毫秒数。 + */ + timeStamp: number; + /** + * 触发事件的源组件。 + */ + target: Target; + /** + * 事件绑定的当前组件。 + */ + currentTarget: Target; + /** + * 额外的信息 + */ + detail: any; + } + interface Touch { + /** + * 触摸点的标识符 + */ + identifier: number; + /** + * 距离文档左上角的距离,文档的左上角为原点 ,横向为X轴,纵向为Y轴 + */ + pageX: number; + /** + * 距离文档左上角的距离,文档的左上角为原点 ,横向为X轴,纵向为Y轴 + */ + pageY: number; + /** + * 距离页面可显示区域(屏幕除去导航条)左上角距离,横向为X轴,纵向为Y轴 + */ + clientX: number; + /** + * 距离页面可显示区域(屏幕除去导航条)左上角距离,横向为X轴,纵向为Y轴 + */ + clientY: number; + } + interface TouchEvent extends Event { + touches: Array; + changedTouches: Array; + } + /** + * relation定义,miniprogram-api-typings缺少this定义 + */ + interface RelationOption { + /** 目标组件的相对关系 */ + type: 'parent' | 'child' | 'ancestor' | 'descendant'; + /** 关系生命周期函数,当关系被建立在页面节点树中时触发,触发时机在组件attached生命周期之后 */ + linked?(this: Instance, target: WechatMiniprogram.Component.TrivialInstance): void; + /** 关系生命周期函数,当关系在页面节点树中发生改变时触发,触发时机在组件moved生命周期之后 */ + linkChanged?(this: Instance, target: WechatMiniprogram.Component.TrivialInstance): void; + /** 关系生命周期函数,当关系脱离页面节点树时触发,触发时机在组件detached生命周期之后 */ + unlinked?(this: Instance, target: WechatMiniprogram.Component.TrivialInstance): void; + /** 如果这一项被设置,则它表示关联的目标节点所应具有的behavior,所有拥有这一behavior的组件节点都会被关联 */ + target?: string; + } + /** + * obverser定义,miniprogram-api-typings缺少this定义 + */ + type Observer = (this: Instance, newVal: T, oldVal: T, changedPath: Array) => void; + /** + * watch定义 + */ + interface WatchOption { + [name: string]: string | Observer; + } + /** + * methods定义,miniprogram-api-typings缺少this定义 + */ + interface MethodOption { + [name: string]: (this: Instance, ...args: any[]) => any; + } + interface ComputedOption { + [name: string]: (this: Instance) => any; + } + type PropertyType = StringConstructor | NumberConstructor | BooleanConstructor | ArrayConstructor | ObjectConstructor | FunctionConstructor | null; + interface PropertyOption { + [name: string]: PropertyType | PropertyType[] | { + /** 属性类型 */ + type: PropertyType | PropertyType[]; + /** 属性初始值 */ + value?: any; + /** 属性值被更改时的响应函数 */ + observer?: string | Observer; + /** 属性的类型(可以指定多个) */ + optionalTypes?: PropertyType[]; + }; + } +} diff --git a/miniprogram_npm/vant-weapp/definitions/weapp.js b/miniprogram_npm/vant-weapp/definitions/weapp.js new file mode 100644 index 0000000..e69de29 diff --git a/miniprogram_npm/vant-weapp/dialog/dialog.d.ts b/miniprogram_npm/vant-weapp/dialog/dialog.d.ts new file mode 100644 index 0000000..028077a --- /dev/null +++ b/miniprogram_npm/vant-weapp/dialog/dialog.d.ts @@ -0,0 +1,45 @@ +/// +declare type DialogAction = 'confirm' | 'cancel'; +declare type DialogOptions = { + lang?: string; + show?: boolean; + title?: string; + zIndex?: number; + context?: WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance; + message?: string; + overlay?: boolean; + selector?: string; + ariaLabel?: string; + className?: string; + customStyle?: string; + transition?: string; + asyncClose?: boolean; + businessId?: number; + sessionFrom?: string; + appParameter?: string; + messageAlign?: string; + sendMessageImg?: string; + showMessageCard?: boolean; + sendMessagePath?: string; + sendMessageTitle?: string; + confirmButtonText?: string; + cancelButtonText?: string; + showConfirmButton?: boolean; + showCancelButton?: boolean; + closeOnClickOverlay?: boolean; + confirmButtonOpenType?: string; +}; +interface Dialog { + (options: DialogOptions): Promise; + alert?: (options: DialogOptions) => Promise; + confirm?: (options: DialogOptions) => Promise; + close?: () => void; + stopLoading?: () => void; + install?: () => void; + setDefaultOptions?: (options: DialogOptions) => void; + resetDefaultOptions?: () => void; + defaultOptions?: DialogOptions; + currentOptions?: DialogOptions; +} +declare const Dialog: Dialog; +export default Dialog; diff --git a/miniprogram_npm/vant-weapp/dialog/dialog.js b/miniprogram_npm/vant-weapp/dialog/dialog.js new file mode 100644 index 0000000..51902e6 --- /dev/null +++ b/miniprogram_npm/vant-weapp/dialog/dialog.js @@ -0,0 +1,61 @@ +let queue = []; +function getContext() { + const pages = getCurrentPages(); + return pages[pages.length - 1]; +} +const Dialog = options => { + options = Object.assign({}, Dialog.currentOptions, options); + return new Promise((resolve, reject) => { + const context = options.context || getContext(); + const dialog = context.selectComponent(options.selector); + delete options.context; + delete options.selector; + if (dialog) { + dialog.set(Object.assign({ onCancel: reject, onConfirm: resolve }, options)); + queue.push(dialog); + } + else { + console.warn('未找到 van-dialog 节点,请确认 selector 及 context 是否正确'); + } + }); +}; +Dialog.defaultOptions = { + show: true, + title: '', + message: '', + zIndex: 100, + overlay: true, + className: '', + customStyle: '', + asyncClose: false, + messageAlign: '', + transition: 'scale', + selector: '#van-dialog', + confirmButtonText: '确认', + cancelButtonText: '取消', + showConfirmButton: true, + showCancelButton: false, + closeOnClickOverlay: false, + confirmButtonOpenType: '' +}; +Dialog.alert = Dialog; +Dialog.confirm = options => Dialog(Object.assign({ showCancelButton: true }, options)); +Dialog.close = () => { + queue.forEach(dialog => { + dialog.close(); + }); + queue = []; +}; +Dialog.stopLoading = () => { + queue.forEach(dialog => { + dialog.stopLoading(); + }); +}; +Dialog.setDefaultOptions = options => { + Object.assign(Dialog.currentOptions, options); +}; +Dialog.resetDefaultOptions = () => { + Dialog.currentOptions = Object.assign({}, Dialog.defaultOptions); +}; +Dialog.resetDefaultOptions(); +export default Dialog; diff --git a/miniprogram_npm/vant-weapp/dialog/index.d.ts b/miniprogram_npm/vant-weapp/dialog/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/dialog/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/dialog/index.js b/miniprogram_npm/vant-weapp/dialog/index.js new file mode 100644 index 0000000..bbbbff2 --- /dev/null +++ b/miniprogram_npm/vant-weapp/dialog/index.js @@ -0,0 +1,98 @@ +import { VantComponent } from '../common/component'; +import { button } from '../mixins/button'; +import { openType } from '../mixins/open-type'; +VantComponent({ + mixins: [button, openType], + props: { + show: Boolean, + title: String, + message: String, + useSlot: Boolean, + className: String, + customStyle: String, + asyncClose: Boolean, + messageAlign: String, + showCancelButton: Boolean, + closeOnClickOverlay: Boolean, + confirmButtonOpenType: String, + zIndex: { + type: Number, + value: 2000 + }, + confirmButtonText: { + type: String, + value: '确认' + }, + cancelButtonText: { + type: String, + value: '取消' + }, + showConfirmButton: { + type: Boolean, + value: true + }, + overlay: { + type: Boolean, + value: true + }, + transition: { + type: String, + value: 'scale' + } + }, + data: { + loading: { + confirm: false, + cancel: false + } + }, + watch: { + show(show) { + !show && this.stopLoading(); + } + }, + methods: { + onConfirm() { + this.handleAction('confirm'); + }, + onCancel() { + this.handleAction('cancel'); + }, + onClickOverlay() { + this.onClose('overlay'); + }, + handleAction(action) { + if (this.data.asyncClose) { + this.set({ + [`loading.${action}`]: true + }); + } + this.onClose(action); + }, + close() { + this.set({ + show: false + }); + }, + stopLoading() { + this.set({ + loading: { + confirm: false, + cancel: false + } + }); + }, + onClose(action) { + if (!this.data.asyncClose) { + this.close(); + } + this.$emit('close', action); + // 把 dialog 实例传递出去,可以通过 stopLoading() 在外部关闭按钮的 loading + this.$emit(action, { dialog: this }); + const callback = this.data[action === 'confirm' ? 'onConfirm' : 'onCancel']; + if (callback) { + callback(this); + } + } + } +}); diff --git a/miniprogram_npm/vant-weapp/dialog/index.json b/miniprogram_npm/vant-weapp/dialog/index.json new file mode 100644 index 0000000..e2ee09a --- /dev/null +++ b/miniprogram_npm/vant-weapp/dialog/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-popup": "../popup/index", + "van-button": "../button/index" + } +} diff --git a/miniprogram_npm/vant-weapp/dialog/index.wxml b/miniprogram_npm/vant-weapp/dialog/index.wxml new file mode 100644 index 0000000..13a77d1 --- /dev/null +++ b/miniprogram_npm/vant-weapp/dialog/index.wxml @@ -0,0 +1,65 @@ + + + {{ title }} + + + + + {{ message }} + + + + + {{ cancelButtonText }} + + + {{ confirmButtonText }} + + + diff --git a/miniprogram_npm/vant-weapp/dialog/index.wxss b/miniprogram_npm/vant-weapp/dialog/index.wxss new file mode 100644 index 0000000..9dfacb2 --- /dev/null +++ b/miniprogram_npm/vant-weapp/dialog/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-dialog{top:45%!important;width:85%;overflow:hidden;font-size:16px;background-color:#fff;border-radius:4px}.van-dialog__header{padding-top:25px;font-weight:500;line-height:24px;text-align:center}.van-dialog__header--isolated{padding:25px 0}.van-dialog__message{max-height:60vh;padding:25px;overflow-y:auto;font-size:14px;line-height:20px;text-align:center;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:12px;color:#7d7e80}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog__confirm{color:#1989fa!important}.van-dialog-bounce-enter{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9)} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/field/index.d.ts b/miniprogram_npm/vant-weapp/field/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/field/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/field/index.js b/miniprogram_npm/vant-weapp/field/index.js new file mode 100644 index 0000000..7865c00 --- /dev/null +++ b/miniprogram_npm/vant-weapp/field/index.js @@ -0,0 +1,105 @@ +import { VantComponent } from '../common/component'; +import { getSystemInfoSync } from '../common/utils'; +VantComponent({ + field: true, + classes: ['input-class', 'right-icon-class'], + props: { + size: String, + icon: String, + label: String, + error: Boolean, + fixed: Boolean, + focus: Boolean, + center: Boolean, + isLink: Boolean, + leftIcon: String, + rightIcon: String, + disabled: Boolean, + autosize: Boolean, + readonly: Boolean, + required: Boolean, + password: Boolean, + iconClass: String, + clearable: Boolean, + inputAlign: String, + customStyle: String, + confirmType: String, + confirmHold: Boolean, + errorMessage: String, + placeholder: String, + placeholderStyle: String, + errorMessageAlign: String, + selectionEnd: { + type: Number, + value: -1 + }, + selectionStart: { + type: Number, + value: -1 + }, + showConfirmBar: { + type: Boolean, + value: true + }, + adjustPosition: { + type: Boolean, + value: true + }, + cursorSpacing: { + type: Number, + value: 50 + }, + maxlength: { + type: Number, + value: -1 + }, + type: { + type: String, + value: 'text' + }, + border: { + type: Boolean, + value: true + }, + titleWidth: { + type: String, + value: '90px' + } + }, + data: { + focused: false, + system: getSystemInfoSync().system.split(' ').shift().toLowerCase() + }, + methods: { + onInput(event) { + const { value = '' } = event.detail || {}; + this.set({ value }, () => { + this.emitChange(value); + }); + }, + onFocus(event) { + this.set({ focused: true }); + this.$emit('focus', event.detail); + }, + onBlur(event) { + this.set({ focused: false }); + this.$emit('blur', event.detail); + }, + onClickIcon() { + this.$emit('click-icon'); + }, + onClear() { + this.set({ value: '' }, () => { + this.emitChange(''); + this.$emit('clear', ''); + }); + }, + onConfirm() { + this.$emit('confirm', this.data.value); + }, + emitChange(value) { + this.$emit('input', value); + this.$emit('change', value); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/field/index.json b/miniprogram_npm/vant-weapp/field/index.json new file mode 100644 index 0000000..8809c46 --- /dev/null +++ b/miniprogram_npm/vant-weapp/field/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index", + "van-icon": "../icon/index" + } +} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/field/index.wxml b/miniprogram_npm/vant-weapp/field/index.wxml new file mode 100644 index 0000000..d5e70cc --- /dev/null +++ b/miniprogram_npm/vant-weapp/field/index.wxml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + {{ errorMessage }} + + diff --git a/miniprogram_npm/vant-weapp/field/index.wxss b/miniprogram_npm/vant-weapp/field/index.wxss new file mode 100644 index 0000000..e53fee3 --- /dev/null +++ b/miniprogram_npm/vant-weapp/field/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px;line-height:1.2em}.van-field__body--textarea.van-field__body--ios{margin-top:-4.5px}.van-field__input{position:relative;display:block;width:100%;height:24px;min-height:24px;padding:0;margin:0;line-height:inherit;color:#333;text-align:left;background-color:initial;border:0;box-sizing:border-box;resize:none}.van-field__input--textarea{height:18px;min-height:18px}.van-field__input--error{color:#f44}.van-field__input--disabled{color:#999;background-color:initial;opacity:1}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;right:0;left:0;color:#999;pointer-events:none}.van-field__placeholder--error{color:#f44}.van-field__icon-root{display:-webkit-flex;display:flex;min-height:24px;-webkit-align-items:center;align-items:center}.van-field__clear-root,.van-field__icon-container{padding:0 10px;margin-right:-10px;line-height:inherit;vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:10px}.van-field__button:empty{display:none}.van-field__error-message{font-size:12px;color:#f44;text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/goods-action-button/index.d.ts b/miniprogram_npm/vant-weapp/goods-action-button/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action-button/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/goods-action-button/index.js b/miniprogram_npm/vant-weapp/goods-action-button/index.js new file mode 100644 index 0000000..b96e1c8 --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action-button/index.js @@ -0,0 +1,22 @@ +import { VantComponent } from '../common/component'; +import { link } from '../mixins/link'; +import { button } from '../mixins/button'; +import { openType } from '../mixins/open-type'; +VantComponent({ + mixins: [link, button, openType], + props: { + text: String, + loading: Boolean, + disabled: Boolean, + type: { + type: String, + value: 'danger' + } + }, + methods: { + onClick(event) { + this.$emit('click', event.detail); + this.jumpLink(); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/goods-action-button/index.json b/miniprogram_npm/vant-weapp/goods-action-button/index.json new file mode 100644 index 0000000..b567686 --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action-button/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-button": "../button/index" + } +} diff --git a/miniprogram_npm/vant-weapp/goods-action-button/index.wxml b/miniprogram_npm/vant-weapp/goods-action-button/index.wxml new file mode 100644 index 0000000..39296d5 --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action-button/index.wxml @@ -0,0 +1,27 @@ + + {{ text }} + diff --git a/miniprogram_npm/vant-weapp/goods-action-button/index.wxss b/miniprogram_npm/vant-weapp/goods-action-button/index.wxss new file mode 100644 index 0000000..5800197 --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action-button/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';:host{-webkit-flex:1;flex:1} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/goods-action-icon/index.d.ts b/miniprogram_npm/vant-weapp/goods-action-icon/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action-icon/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/goods-action-icon/index.js b/miniprogram_npm/vant-weapp/goods-action-icon/index.js new file mode 100644 index 0000000..7b3af04 --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action-icon/index.js @@ -0,0 +1,21 @@ +import { VantComponent } from '../common/component'; +import { link } from '../mixins/link'; +import { button } from '../mixins/button'; +import { openType } from '../mixins/open-type'; +VantComponent({ + classes: ['icon-class', 'text-class'], + mixins: [link, button, openType], + props: { + text: String, + info: String, + icon: String, + disabled: Boolean, + loading: Boolean + }, + methods: { + onClick(event) { + this.$emit('click', event.detail); + this.jumpLink(); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/goods-action-icon/index.json b/miniprogram_npm/vant-weapp/goods-action-icon/index.json new file mode 100644 index 0000000..93bfe8a --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action-icon/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-button": "../button/index" + } +} diff --git a/miniprogram_npm/vant-weapp/goods-action-icon/index.wxml b/miniprogram_npm/vant-weapp/goods-action-icon/index.wxml new file mode 100644 index 0000000..40c0773 --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action-icon/index.wxml @@ -0,0 +1,35 @@ + + + + {{ text }} + + diff --git a/miniprogram_npm/vant-weapp/goods-action-icon/index.wxss b/miniprogram_npm/vant-weapp/goods-action-icon/index.wxss new file mode 100644 index 0000000..674d0a0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action-icon/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-goods-action-icon{width:50px!important;border:none!important}.van-goods-action-icon__content{display:-webkit-flex;display:flex;height:100%;font-size:10px;line-height:1;color:#7d7e80;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-goods-action-icon__icon{margin-bottom:4px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/goods-action/index.d.ts b/miniprogram_npm/vant-weapp/goods-action/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/goods-action/index.js b/miniprogram_npm/vant-weapp/goods-action/index.js new file mode 100644 index 0000000..458e7aa --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action/index.js @@ -0,0 +1,5 @@ +import { VantComponent } from '../common/component'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + mixins: [safeArea()] +}); diff --git a/miniprogram_npm/vant-weapp/goods-action/index.json b/miniprogram_npm/vant-weapp/goods-action/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram_npm/vant-weapp/goods-action/index.wxml b/miniprogram_npm/vant-weapp/goods-action/index.wxml new file mode 100644 index 0000000..6e61cc9 --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action/index.wxml @@ -0,0 +1,5 @@ + + + + + diff --git a/miniprogram_npm/vant-weapp/goods-action/index.wxss b/miniprogram_npm/vant-weapp/goods-action/index.wxss new file mode 100644 index 0000000..ce8200c --- /dev/null +++ b/miniprogram_npm/vant-weapp/goods-action/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-goods-action{position:fixed;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;background-color:#fff}.van-goods-action--safe{padding-bottom:34px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/icon/index.d.ts b/miniprogram_npm/vant-weapp/icon/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/icon/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/icon/index.js b/miniprogram_npm/vant-weapp/icon/index.js new file mode 100644 index 0000000..3381070 --- /dev/null +++ b/miniprogram_npm/vant-weapp/icon/index.js @@ -0,0 +1,19 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + info: null, + name: String, + size: String, + color: String, + customStyle: String, + classPrefix: { + type: String, + value: 'van-icon' + } + }, + methods: { + onClick() { + this.$emit('click'); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/icon/index.json b/miniprogram_npm/vant-weapp/icon/index.json new file mode 100644 index 0000000..bf0ebe0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/icon/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-info": "../info/index" + } +} diff --git a/miniprogram_npm/vant-weapp/icon/index.wxml b/miniprogram_npm/vant-weapp/icon/index.wxml new file mode 100644 index 0000000..3c1bbad --- /dev/null +++ b/miniprogram_npm/vant-weapp/icon/index.wxml @@ -0,0 +1,19 @@ + + + + + + diff --git a/miniprogram_npm/vant-weapp/icon/index.wxss b/miniprogram_npm/vant-weapp/icon/index.wxss new file mode 100644 index 0000000..2b219ec --- /dev/null +++ b/miniprogram_npm/vant-weapp/icon/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';@font-face{font-style:normal;font-weight:400;font-family:vant-icon;src:url(https://img.yzcdn.cn/vant/vant-icon-3a7dc2.woff2) format("woff2"),url(https://img.yzcdn.cn/vant/vant-icon-3a7dc2.woff) format("woff"),url(https://img.yzcdn.cn/vant/vant-icon-3a7dc2.ttf) format("truetype")}.van-icon{position:relative;font:normal normal normal 14px/1 vant-icon;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.van-icon,.van-icon:before{display:inline-block}.van-icon-add-o:before{content:"\F000"}.van-icon-add-square:before{content:"\F001"}.van-icon-add:before{content:"\F002"}.van-icon-after-sale:before{content:"\F003"}.van-icon-aim:before{content:"\F004"}.van-icon-alipay:before{content:"\F005"}.van-icon-apps-o:before{content:"\F006"}.van-icon-arrow-down:before{content:"\F007"}.van-icon-arrow-left:before{content:"\F008"}.van-icon-arrow-up:before{content:"\F009"}.van-icon-arrow:before{content:"\F00A"}.van-icon-ascending:before{content:"\F00B"}.van-icon-audio:before{content:"\F00C"}.van-icon-award-o:before{content:"\F00D"}.van-icon-award:before{content:"\F00E"}.van-icon-bag-o:before{content:"\F00F"}.van-icon-bag:before{content:"\F010"}.van-icon-balance-list-o:before{content:"\F011"}.van-icon-balance-list:before{content:"\F012"}.van-icon-balance-o:before{content:"\F013"}.van-icon-balance-pay:before{content:"\F014"}.van-icon-bar-chart-o:before{content:"\F015"}.van-icon-bars:before{content:"\F016"}.van-icon-bell:before{content:"\F017"}.van-icon-bill-o:before{content:"\F018"}.van-icon-bill:before{content:"\F019"}.van-icon-birthday-cake-o:before{content:"\F01A"}.van-icon-bookmark-o:before{content:"\F01B"}.van-icon-bookmark:before{content:"\F01C"}.van-icon-browsing-history-o:before{content:"\F01D"}.van-icon-browsing-history:before{content:"\F01E"}.van-icon-brush-o:before{content:"\F01F"}.van-icon-bulb-o:before{content:"\F020"}.van-icon-bullhorn-o:before{content:"\F021"}.van-icon-calender-o:before{content:"\F022"}.van-icon-card:before{content:"\F023"}.van-icon-cart-circle-o:before{content:"\F024"}.van-icon-cart-circle:before{content:"\F025"}.van-icon-cart-o:before{content:"\F026"}.van-icon-cart:before{content:"\F027"}.van-icon-cash-back-record:before{content:"\F028"}.van-icon-cash-on-deliver:before{content:"\F029"}.van-icon-cashier-o:before{content:"\F02A"}.van-icon-certificate:before{content:"\F02B"}.van-icon-chart-trending-o:before{content:"\F02C"}.van-icon-chat-o:before{content:"\F02D"}.van-icon-chat:before{content:"\F02E"}.van-icon-checked:before{content:"\F02F"}.van-icon-circle:before{content:"\F030"}.van-icon-clear:before{content:"\F031"}.van-icon-clock-o:before{content:"\F032"}.van-icon-clock:before{content:"\F033"}.van-icon-close:before{content:"\F034"}.van-icon-closed-eye:before{content:"\F035"}.van-icon-cluster-o:before{content:"\F036"}.van-icon-cluster:before{content:"\F037"}.van-icon-column:before{content:"\F038"}.van-icon-comment-circle-o:before{content:"\F039"}.van-icon-comment-circle:before{content:"\F03A"}.van-icon-comment-o:before{content:"\F03B"}.van-icon-comment:before{content:"\F03C"}.van-icon-completed:before{content:"\F03D"}.van-icon-contact:before{content:"\F03E"}.van-icon-coupon-o:before{content:"\F03F"}.van-icon-coupon:before{content:"\F040"}.van-icon-credit-pay:before{content:"\F041"}.van-icon-cross:before{content:"\F042"}.van-icon-debit-pay:before{content:"\F043"}.van-icon-delete:before{content:"\F044"}.van-icon-descending:before{content:"\F045"}.van-icon-description:before{content:"\F046"}.van-icon-desktop-o:before{content:"\F047"}.van-icon-diamond-o:before{content:"\F048"}.van-icon-diamond:before{content:"\F049"}.van-icon-discount:before{content:"\F04A"}.van-icon-ecard-pay:before{content:"\F04B"}.van-icon-edit:before{content:"\F04C"}.van-icon-ellipsis:before{content:"\F04D"}.van-icon-empty:before{content:"\F04E"}.van-icon-envelop-o:before{content:"\F04F"}.van-icon-exchange:before{content:"\F050"}.van-icon-expand-o:before{content:"\F051"}.van-icon-expand:before{content:"\F052"}.van-icon-eye-o:before{content:"\F053"}.van-icon-eye:before{content:"\F054"}.van-icon-fail:before{content:"\F055"}.van-icon-failure:before{content:"\F056"}.van-icon-filter-o:before{content:"\F057"}.van-icon-fire-o:before{content:"\F058"}.van-icon-fire:before{content:"\F059"}.van-icon-flag-o:before{content:"\F05A"}.van-icon-flower-o:before{content:"\F05B"}.van-icon-free-postage:before{content:"\F05C"}.van-icon-friends-o:before{content:"\F05D"}.van-icon-friends:before{content:"\F05E"}.van-icon-gem-o:before{content:"\F05F"}.van-icon-gem:before{content:"\F060"}.van-icon-gift-card-o:before{content:"\F061"}.van-icon-gift-card:before{content:"\F062"}.van-icon-gift-o:before{content:"\F063"}.van-icon-gift:before{content:"\F064"}.van-icon-gold-coin-o:before{content:"\F065"}.van-icon-gold-coin:before{content:"\F066"}.van-icon-good-job-o:before{content:"\F067"}.van-icon-good-job:before{content:"\F068"}.van-icon-goods-collect-o:before{content:"\F069"}.van-icon-goods-collect:before{content:"\F06A"}.van-icon-graphic:before{content:"\F06B"}.van-icon-home-o:before{content:"\F06C"}.van-icon-hot-o:before{content:"\F06D"}.van-icon-hot-sale-o:before{content:"\F06E"}.van-icon-hot-sale:before{content:"\F06F"}.van-icon-hot:before{content:"\F070"}.van-icon-hotel-o:before{content:"\F071"}.van-icon-idcard:before{content:"\F072"}.van-icon-info-o:before{content:"\F073"}.van-icon-info:before{content:"\F074"}.van-icon-invition:before{content:"\F075"}.van-icon-label-o:before{content:"\F076"}.van-icon-label:before{content:"\F077"}.van-icon-like-o:before{content:"\F078"}.van-icon-like:before{content:"\F079"}.van-icon-live:before{content:"\F07A"}.van-icon-location-o:before{content:"\F07B"}.van-icon-location:before{content:"\F07C"}.van-icon-lock:before{content:"\F07D"}.van-icon-logistics:before{content:"\F07E"}.van-icon-manager-o:before{content:"\F07F"}.van-icon-manager:before{content:"\F080"}.van-icon-map-marked:before{content:"\F081"}.van-icon-medel-o:before{content:"\F082"}.van-icon-medel:before{content:"\F083"}.van-icon-more-o:before{content:"\F084"}.van-icon-more:before{content:"\F085"}.van-icon-music-o:before{content:"\F086"}.van-icon-music:before{content:"\F087"}.van-icon-new-arrival-o:before{content:"\F088"}.van-icon-new-arrival:before{content:"\F089"}.van-icon-new-o:before{content:"\F08A"}.van-icon-new:before{content:"\F08B"}.van-icon-newspaper-o:before{content:"\F08C"}.van-icon-notes-o:before{content:"\F08D"}.van-icon-orders-o:before{content:"\F08E"}.van-icon-other-pay:before{content:"\F08F"}.van-icon-paid:before{content:"\F090"}.van-icon-passed:before{content:"\F091"}.van-icon-pause-circle-o:before{content:"\F092"}.van-icon-pause-circle:before{content:"\F093"}.van-icon-pause:before{content:"\F094"}.van-icon-peer-pay:before{content:"\F095"}.van-icon-pending-payment:before{content:"\F096"}.van-icon-phone-circle-o:before{content:"\F097"}.van-icon-phone-circle:before{content:"\F098"}.van-icon-phone-o:before{content:"\F099"}.van-icon-phone:before{content:"\F09A"}.van-icon-photo-o:before{content:"\F09B"}.van-icon-photo:before{content:"\F09C"}.van-icon-photograph:before{content:"\F09D"}.van-icon-play-circle-o:before{content:"\F09E"}.van-icon-play-circle:before{content:"\F09F"}.van-icon-play:before{content:"\F0A0"}.van-icon-plus:before{content:"\F0A1"}.van-icon-point-gift-o:before{content:"\F0A2"}.van-icon-point-gift:before{content:"\F0A3"}.van-icon-points:before{content:"\F0A4"}.van-icon-printer:before{content:"\F0A5"}.van-icon-qr-invalid:before{content:"\F0A6"}.van-icon-qr:before{content:"\F0A7"}.van-icon-question-o:before{content:"\F0A8"}.van-icon-question:before{content:"\F0A9"}.van-icon-records:before{content:"\F0AA"}.van-icon-refund-o:before{content:"\F0AB"}.van-icon-replay:before{content:"\F0AC"}.van-icon-scan:before{content:"\F0AD"}.van-icon-search:before{content:"\F0AE"}.van-icon-send-gift-o:before{content:"\F0AF"}.van-icon-send-gift:before{content:"\F0B0"}.van-icon-service-o:before{content:"\F0B1"}.van-icon-service:before{content:"\F0B2"}.van-icon-setting-o:before{content:"\F0B3"}.van-icon-setting:before{content:"\F0B4"}.van-icon-share:before{content:"\F0B5"}.van-icon-shop-collect-o:before{content:"\F0B6"}.van-icon-shop-collect:before{content:"\F0B7"}.van-icon-shop-o:before{content:"\F0B8"}.van-icon-shop:before{content:"\F0B9"}.van-icon-shopping-cart-o:before{content:"\F0BA"}.van-icon-shopping-cart:before{content:"\F0BB"}.van-icon-shrink:before{content:"\F0BC"}.van-icon-sign:before{content:"\F0BD"}.van-icon-smile-comment-o:before{content:"\F0BE"}.van-icon-smile-comment:before{content:"\F0BF"}.van-icon-smile-o:before{content:"\F0C0"}.van-icon-smile:before{content:"\F0C1"}.van-icon-star-o:before{content:"\F0C2"}.van-icon-star:before{content:"\F0C3"}.van-icon-stop-circle-o:before{content:"\F0C4"}.van-icon-stop-circle:before{content:"\F0C5"}.van-icon-stop:before{content:"\F0C6"}.van-icon-success:before{content:"\F0C7"}.van-icon-thumb-circle-o:before{content:"\F0C8"}.van-icon-thumb-circle:before{content:"\F0C9"}.van-icon-todo-list-o:before{content:"\F0CA"}.van-icon-todo-list:before{content:"\F0CB"}.van-icon-tosend:before{content:"\F0CC"}.van-icon-tv-o:before{content:"\F0CD"}.van-icon-umbrella-circle:before{content:"\F0CE"}.van-icon-underway-o:before{content:"\F0CF"}.van-icon-underway:before{content:"\F0D0"}.van-icon-upgrade:before{content:"\F0D1"}.van-icon-user-circle-o:before{content:"\F0D2"}.van-icon-user-o:before{content:"\F0D3"}.van-icon-video-o:before{content:"\F0D4"}.van-icon-video:before{content:"\F0D5"}.van-icon-vip-card-o:before{content:"\F0D6"}.van-icon-vip-card:before{content:"\F0D7"}.van-icon-volume-o:before{content:"\F0D8"}.van-icon-volume:before{content:"\F0D9"}.van-icon-wap-home:before{content:"\F0DA"}.van-icon-wap-nav:before{content:"\F0DB"}.van-icon-warn-o:before{content:"\F0DC"}.van-icon-warning-o:before{content:"\F0DD"}.van-icon-warning:before{content:"\F0DE"}.van-icon-weapp-nav:before{content:"\F0DF"}.van-icon-wechat:before{content:"\F0E0"}.van-icon-youzan-shield:before{content:"\F0E1"}.van-icon--image{width:1em;height:1em}.van-icon__image{width:100%;height:100%}.van-icon__info{z-index:1} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/info/index.d.ts b/miniprogram_npm/vant-weapp/info/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/info/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/info/index.js b/miniprogram_npm/vant-weapp/info/index.js new file mode 100644 index 0000000..b7258be --- /dev/null +++ b/miniprogram_npm/vant-weapp/info/index.js @@ -0,0 +1,7 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + info: null, + customStyle: String + } +}); diff --git a/miniprogram_npm/vant-weapp/info/index.json b/miniprogram_npm/vant-weapp/info/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram_npm/vant-weapp/info/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram_npm/vant-weapp/info/index.wxml b/miniprogram_npm/vant-weapp/info/index.wxml new file mode 100644 index 0000000..bf175a0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/info/index.wxml @@ -0,0 +1,5 @@ +{{ info }} diff --git a/miniprogram_npm/vant-weapp/info/index.wxss b/miniprogram_npm/vant-weapp/info/index.wxss new file mode 100644 index 0000000..f9c10d0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/info/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-info{position:absolute;top:-8px;right:0;min-width:16px;padding:0 3px;font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;font-size:12px;font-weight:500;line-height:14px;color:#fff;text-align:center;white-space:nowrap;background-color:#f44;border:1px solid #fff;border-radius:16px;-webkit-transform:translateX(50%);transform:translateX(50%);box-sizing:border-box;-webkit-transform-origin:100%;transform-origin:100%} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/loading/index.d.ts b/miniprogram_npm/vant-weapp/loading/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/loading/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/loading/index.js b/miniprogram_npm/vant-weapp/loading/index.js new file mode 100644 index 0000000..942b7a4 --- /dev/null +++ b/miniprogram_npm/vant-weapp/loading/index.js @@ -0,0 +1,17 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + size: { + type: String, + value: '30px' + }, + type: { + type: String, + value: 'circular' + }, + color: { + type: String, + value: '#c9c9c9' + } + } +}); diff --git a/miniprogram_npm/vant-weapp/loading/index.json b/miniprogram_npm/vant-weapp/loading/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/loading/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/loading/index.wxml b/miniprogram_npm/vant-weapp/loading/index.wxml new file mode 100644 index 0000000..35ca0e2 --- /dev/null +++ b/miniprogram_npm/vant-weapp/loading/index.wxml @@ -0,0 +1,16 @@ + + + + + diff --git a/miniprogram_npm/vant-weapp/loading/index.wxss b/miniprogram_npm/vant-weapp/loading/index.wxss new file mode 100644 index 0000000..58cb52a --- /dev/null +++ b/miniprogram_npm/vant-weapp/loading/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-loading{z-index:0;line-height:0;vertical-align:middle}.van-loading,.van-loading__spinner{position:relative;display:inline-block}.van-loading__spinner{z-index:-1;width:100%;height:100%;box-sizing:border-box;-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border-radius:100%;border:1px solid transparent;border-top-color:initial}.van-loading__dot{top:0;left:0;width:100%;height:100%;position:absolute}.van-loading__dot:before{width:2px;height:25%;content:" ";display:block;margin:0 auto;border-radius:40%;background-color:currentColor}.van-loading__dot:first-of-type{opacity:1;-webkit-transform:rotate(30deg);transform:rotate(30deg)}.van-loading__dot:nth-of-type(2){opacity:.9375;-webkit-transform:rotate(60deg);transform:rotate(60deg)}.van-loading__dot:nth-of-type(3){opacity:.875;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.van-loading__dot:nth-of-type(4){opacity:.8125;-webkit-transform:rotate(120deg);transform:rotate(120deg)}.van-loading__dot:nth-of-type(5){opacity:.75;-webkit-transform:rotate(150deg);transform:rotate(150deg)}.van-loading__dot:nth-of-type(6){opacity:.6875;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-loading__dot:nth-of-type(7){opacity:.625;-webkit-transform:rotate(210deg);transform:rotate(210deg)}.van-loading__dot:nth-of-type(8){opacity:.5625;-webkit-transform:rotate(240deg);transform:rotate(240deg)}.van-loading__dot:nth-of-type(9){opacity:.5;-webkit-transform:rotate(270deg);transform:rotate(270deg)}.van-loading__dot:nth-of-type(10){opacity:.4375;-webkit-transform:rotate(300deg);transform:rotate(300deg)}.van-loading__dot:nth-of-type(11){opacity:.375;-webkit-transform:rotate(330deg);transform:rotate(330deg)}.van-loading__dot:nth-of-type(12){opacity:.3125;-webkit-transform:rotate(1turn);transform:rotate(1turn)}@-webkit-keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/mixins/basic.d.ts b/miniprogram_npm/vant-weapp/mixins/basic.d.ts new file mode 100644 index 0000000..b273369 --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/basic.d.ts @@ -0,0 +1 @@ +export declare const basic: string; diff --git a/miniprogram_npm/vant-weapp/mixins/basic.js b/miniprogram_npm/vant-weapp/mixins/basic.js new file mode 100644 index 0000000..2fdd634 --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/basic.js @@ -0,0 +1,22 @@ +export const basic = Behavior({ + methods: { + $emit(...args) { + this.triggerEvent(...args); + }, + getRect(selector, all) { + return new Promise(resolve => { + wx.createSelectorQuery() + .in(this)[all ? 'selectAll' : 'select'](selector) + .boundingClientRect(rect => { + if (all && Array.isArray(rect) && rect.length) { + resolve(rect); + } + if (!all && rect) { + resolve(rect); + } + }) + .exec(); + }); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/mixins/button.d.ts b/miniprogram_npm/vant-weapp/mixins/button.d.ts new file mode 100644 index 0000000..b51db87 --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/button.d.ts @@ -0,0 +1 @@ +export declare const button: string; diff --git a/miniprogram_npm/vant-weapp/mixins/button.js b/miniprogram_npm/vant-weapp/mixins/button.js new file mode 100644 index 0000000..5d3b4dc --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/button.js @@ -0,0 +1,18 @@ +export const button = Behavior({ + externalClasses: ['hover-class'], + properties: { + id: String, + lang: { + type: String, + value: 'en' + }, + businessId: Number, + sessionFrom: String, + sendMessageTitle: String, + sendMessagePath: String, + sendMessageImg: String, + showMessageCard: Boolean, + appParameter: String, + ariaLabel: String + } +}); diff --git a/miniprogram_npm/vant-weapp/mixins/link.d.ts b/miniprogram_npm/vant-weapp/mixins/link.d.ts new file mode 100644 index 0000000..d58043b --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/link.d.ts @@ -0,0 +1 @@ +export declare const link: string; diff --git a/miniprogram_npm/vant-weapp/mixins/link.js b/miniprogram_npm/vant-weapp/mixins/link.js new file mode 100644 index 0000000..d7aed0c --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/link.js @@ -0,0 +1,17 @@ +export const link = Behavior({ + properties: { + url: String, + linkType: { + type: String, + value: 'navigateTo' + } + }, + methods: { + jumpLink(urlKey = 'url') { + const url = this.data[urlKey]; + if (url) { + wx[this.data.linkType]({ url }); + } + } + } +}); diff --git a/miniprogram_npm/vant-weapp/mixins/observer/behavior.d.ts b/miniprogram_npm/vant-weapp/mixins/observer/behavior.d.ts new file mode 100644 index 0000000..3da2a64 --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/observer/behavior.d.ts @@ -0,0 +1 @@ +export declare const behavior: string; diff --git a/miniprogram_npm/vant-weapp/mixins/observer/behavior.js b/miniprogram_npm/vant-weapp/mixins/observer/behavior.js new file mode 100644 index 0000000..6e5d1a4 --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/observer/behavior.js @@ -0,0 +1,47 @@ +function setAsync(context, data) { + return new Promise(resolve => { + context.setData(data, resolve); + }); +} +export const behavior = Behavior({ + created() { + if (!this.$options) { + return; + } + const cache = {}; + const { computed } = this.$options(); + const keys = Object.keys(computed); + this.calcComputed = () => { + const needUpdate = {}; + keys.forEach(key => { + const value = computed[key].call(this); + if (cache[key] !== value) { + cache[key] = value; + needUpdate[key] = value; + } + }); + return needUpdate; + }; + }, + attached() { + this.set(); + }, + methods: { + // set data and set computed data + set(data, callback) { + const stack = []; + if (data) { + stack.push(setAsync(this, data)); + } + if (this.calcComputed) { + stack.push(setAsync(this, this.calcComputed())); + } + return Promise.all(stack).then(res => { + if (callback && typeof callback === 'function') { + callback.call(this); + } + return res; + }); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/mixins/observer/index.d.ts b/miniprogram_npm/vant-weapp/mixins/observer/index.d.ts new file mode 100644 index 0000000..4e54b2e --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/observer/index.d.ts @@ -0,0 +1 @@ +export declare function observe(vantOptions: any, options: any): void; diff --git a/miniprogram_npm/vant-weapp/mixins/observer/index.js b/miniprogram_npm/vant-weapp/mixins/observer/index.js new file mode 100644 index 0000000..51427f7 --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/observer/index.js @@ -0,0 +1,27 @@ +import { behavior } from './behavior'; +import { observeProps } from './props'; +export function observe(vantOptions, options) { + const { watch, computed } = vantOptions; + options.behaviors.push(behavior); + if (watch) { + const props = options.properties || {}; + Object.keys(watch).forEach(key => { + if (key in props) { + let prop = props[key]; + if (prop === null || !('type' in prop)) { + prop = { type: prop }; + } + prop.observer = watch[key]; + props[key] = prop; + } + }); + options.properties = props; + } + if (computed) { + options.methods = options.methods || {}; + options.methods.$options = () => vantOptions; + if (options.properties) { + observeProps(options.properties); + } + } +} diff --git a/miniprogram_npm/vant-weapp/mixins/observer/props.d.ts b/miniprogram_npm/vant-weapp/mixins/observer/props.d.ts new file mode 100644 index 0000000..43813df --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/observer/props.d.ts @@ -0,0 +1 @@ +export declare function observeProps(props: any): void; diff --git a/miniprogram_npm/vant-weapp/mixins/observer/props.js b/miniprogram_npm/vant-weapp/mixins/observer/props.js new file mode 100644 index 0000000..54f6623 --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/observer/props.js @@ -0,0 +1,22 @@ +export function observeProps(props) { + if (!props) { + return; + } + Object.keys(props).forEach(key => { + let prop = props[key]; + if (prop === null || !('type' in prop)) { + prop = { type: prop }; + } + let { observer } = prop; + prop.observer = function (...args) { + if (observer) { + if (typeof observer === 'string') { + observer = this[observer]; + } + observer.apply(this, args); + } + this.set(); + }; + props[key] = prop; + }); +} diff --git a/miniprogram_npm/vant-weapp/mixins/open-type.d.ts b/miniprogram_npm/vant-weapp/mixins/open-type.d.ts new file mode 100644 index 0000000..64b023d --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/open-type.d.ts @@ -0,0 +1 @@ +export declare const openType: string; diff --git a/miniprogram_npm/vant-weapp/mixins/open-type.js b/miniprogram_npm/vant-weapp/mixins/open-type.js new file mode 100644 index 0000000..514517e --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/open-type.js @@ -0,0 +1,25 @@ +export const openType = Behavior({ + properties: { + openType: String + }, + methods: { + bindGetUserInfo(event) { + this.$emit('getuserinfo', event.detail); + }, + bindContact(event) { + this.$emit('contact', event.detail); + }, + bindGetPhoneNumber(event) { + this.$emit('getphonenumber', event.detail); + }, + bindError(event) { + this.$emit('error', event.detail); + }, + bindLaunchApp(event) { + this.$emit('launchapp', event.detail); + }, + bindOpenSetting(event) { + this.$emit('opensetting', event.detail); + }, + } +}); diff --git a/miniprogram_npm/vant-weapp/mixins/safe-area.d.ts b/miniprogram_npm/vant-weapp/mixins/safe-area.d.ts new file mode 100644 index 0000000..0686353 --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/safe-area.d.ts @@ -0,0 +1,4 @@ +export declare const safeArea: ({ safeAreaInsetBottom, safeAreaInsetTop }?: { + safeAreaInsetBottom?: boolean; + safeAreaInsetTop?: boolean; +}) => string; diff --git a/miniprogram_npm/vant-weapp/mixins/safe-area.js b/miniprogram_npm/vant-weapp/mixins/safe-area.js new file mode 100644 index 0000000..e502622 --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/safe-area.js @@ -0,0 +1,39 @@ +let cache = null; +function getSafeArea() { + return new Promise((resolve, reject) => { + if (cache != null) { + resolve(cache); + } + else { + wx.getSystemInfo({ + success: ({ model, screenHeight, statusBarHeight }) => { + const iphoneX = /iphone x/i.test(model); + const iphoneNew = /iPhone11/i.test(model) && screenHeight === 812; + cache = { + isIPhoneX: iphoneX || iphoneNew, + statusBarHeight + }; + resolve(cache); + }, + fail: reject + }); + } + }); +} +export const safeArea = ({ safeAreaInsetBottom = true, safeAreaInsetTop = false } = {}) => Behavior({ + properties: { + safeAreaInsetTop: { + type: Boolean, + value: safeAreaInsetTop + }, + safeAreaInsetBottom: { + type: Boolean, + value: safeAreaInsetBottom + } + }, + created() { + getSafeArea().then(({ isIPhoneX, statusBarHeight }) => { + this.set({ isIPhoneX, statusBarHeight }); + }); + } +}); diff --git a/miniprogram_npm/vant-weapp/mixins/touch.d.ts b/miniprogram_npm/vant-weapp/mixins/touch.d.ts new file mode 100644 index 0000000..35ee831 --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/touch.d.ts @@ -0,0 +1 @@ +export declare const touch: string; diff --git a/miniprogram_npm/vant-weapp/mixins/touch.js b/miniprogram_npm/vant-weapp/mixins/touch.js new file mode 100644 index 0000000..7566cb3 --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/touch.js @@ -0,0 +1,27 @@ +export const touch = Behavior({ + methods: { + touchStart(event) { + const touch = event.touches[0]; + this.direction = ''; + this.deltaX = 0; + this.deltaY = 0; + this.offsetX = 0; + this.offsetY = 0; + this.startX = touch.clientX; + this.startY = touch.clientY; + }, + touchMove(event) { + const touch = event.touches[0]; + this.deltaX = touch.clientX - this.startX; + this.deltaY = touch.clientY - this.startY; + this.offsetX = Math.abs(this.deltaX); + this.offsetY = Math.abs(this.deltaY); + this.direction = + this.offsetX > this.offsetY + ? 'horizontal' + : this.offsetX < this.offsetY + ? 'vertical' + : ''; + } + } +}); diff --git a/miniprogram_npm/vant-weapp/mixins/transition.d.ts b/miniprogram_npm/vant-weapp/mixins/transition.d.ts new file mode 100644 index 0000000..ee7b6ca --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/transition.d.ts @@ -0,0 +1 @@ +export declare const transition: (showDefaultValue: boolean) => any; diff --git a/miniprogram_npm/vant-weapp/mixins/transition.js b/miniprogram_npm/vant-weapp/mixins/transition.js new file mode 100644 index 0000000..ed34e2c --- /dev/null +++ b/miniprogram_npm/vant-weapp/mixins/transition.js @@ -0,0 +1,111 @@ +import { isObj } from '../common/utils'; +const getClassNames = (name) => ({ + enter: `van-${name}-enter van-${name}-enter-active enter-class enter-active-class`, + 'enter-to': `van-${name}-enter-to van-${name}-enter-active enter-to-class enter-active-class`, + leave: `van-${name}-leave van-${name}-leave-active leave-class leave-active-class`, + 'leave-to': `van-${name}-leave-to van-${name}-leave-active leave-to-class leave-active-class` +}); +const nextTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 30)); +export const transition = function (showDefaultValue) { + return Behavior({ + properties: { + customStyle: String, + // @ts-ignore + show: { + type: Boolean, + value: showDefaultValue, + observer: 'observeShow' + }, + // @ts-ignore + duration: { + type: [Number, Object], + value: 300, + observer: 'observeDuration' + }, + name: { + type: String, + value: 'fade' + } + }, + data: { + type: '', + inited: false, + display: false + }, + attached() { + if (this.data.show) { + this.enter(); + } + }, + methods: { + observeShow(value) { + if (value) { + this.enter(); + } + else { + this.leave(); + } + }, + enter() { + const { duration, name } = this.data; + const classNames = getClassNames(name); + const currentDuration = isObj(duration) ? duration.enter : duration; + this.status = 'enter'; + Promise.resolve() + .then(nextTick) + .then(() => { + this.checkStatus('enter'); + this.set({ + inited: true, + display: true, + classes: classNames.enter, + currentDuration + }); + }) + .then(nextTick) + .then(() => { + this.checkStatus('enter'); + this.set({ + classes: classNames['enter-to'] + }); + }) + .catch(() => { }); + }, + leave() { + const { duration, name } = this.data; + const classNames = getClassNames(name); + const currentDuration = isObj(duration) ? duration.leave : duration; + this.status = 'leave'; + Promise.resolve() + .then(nextTick) + .then(() => { + this.checkStatus('leave'); + this.set({ + classes: classNames.leave, + currentDuration + }); + }) + .then(() => setTimeout(() => this.onTransitionEnd(), currentDuration)) + .then(nextTick) + .then(() => { + this.checkStatus('leave'); + this.set({ + classes: classNames['leave-to'] + }); + }) + .catch(() => { }); + }, + checkStatus(status) { + if (status !== this.status) { + throw new Error(`incongruent status: ${status}`); + } + }, + onTransitionEnd() { + if (!this.data.show) { + this.set({ display: false }); + this.$emit('transitionEnd'); + } + } + } + }); +}; diff --git a/miniprogram_npm/vant-weapp/nav-bar/index.d.ts b/miniprogram_npm/vant-weapp/nav-bar/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/nav-bar/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/nav-bar/index.js b/miniprogram_npm/vant-weapp/nav-bar/index.js new file mode 100644 index 0000000..b2aa6ca --- /dev/null +++ b/miniprogram_npm/vant-weapp/nav-bar/index.js @@ -0,0 +1,29 @@ +import { VantComponent } from '../common/component'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + mixins: [safeArea({ safeAreaInsetTop: true })], + classes: ['title-class'], + props: { + title: String, + fixed: Boolean, + leftText: String, + rightText: String, + leftArrow: Boolean, + border: { + type: Boolean, + value: true + }, + zIndex: { + type: Number, + value: 120 + } + }, + methods: { + onClickLeft() { + this.$emit('click-left'); + }, + onClickRight() { + this.$emit('click-right'); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/nav-bar/index.json b/miniprogram_npm/vant-weapp/nav-bar/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/nav-bar/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/miniprogram_npm/vant-weapp/nav-bar/index.wxml b/miniprogram_npm/vant-weapp/nav-bar/index.wxml new file mode 100644 index 0000000..2f235b5 --- /dev/null +++ b/miniprogram_npm/vant-weapp/nav-bar/index.wxml @@ -0,0 +1,37 @@ + + + + + + + {{ leftText }} + + + + + {{ title }} + + + + {{ rightText }} + + + diff --git a/miniprogram_npm/vant-weapp/nav-bar/index.wxss b/miniprogram_npm/vant-weapp/nav-bar/index.wxss new file mode 100644 index 0000000..8f576d3 --- /dev/null +++ b/miniprogram_npm/vant-weapp/nav-bar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-nav-bar{position:relative;height:44px;line-height:44px;text-align:center;background-color:#fff;-webkit-user-select:none;user-select:none}.van-nav-bar__text{display:inline-block;padding:0 15px;margin:0 -15px;color:#1989fa;vertical-align:middle}.van-nav-bar__text--hover{background-color:#f2f3f5}.van-nav-bar__arrow{color:#1989fa;vertical-align:middle}.van-nav-bar__arrow+.van-nav-bar__text{padding-left:25px;margin-left:-20px}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar__title{max-width:60%;margin:0 auto;font-size:16px;font-weight:500}.van-nav-bar__left,.van-nav-bar__right{position:absolute;bottom:0;font-size:14px}.van-nav-bar__left{left:15px}.van-nav-bar__right{right:15px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/notice-bar/index.d.ts b/miniprogram_npm/vant-weapp/notice-bar/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/notice-bar/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/notice-bar/index.js b/miniprogram_npm/vant-weapp/notice-bar/index.js new file mode 100644 index 0000000..ca03f81 --- /dev/null +++ b/miniprogram_npm/vant-weapp/notice-bar/index.js @@ -0,0 +1,123 @@ +import { VantComponent } from '../common/component'; +const FONT_COLOR = '#ed6a0c'; +const BG_COLOR = '#fffbe8'; +VantComponent({ + props: { + text: { + type: String, + value: '' + }, + mode: { + type: String, + value: '' + }, + url: { + type: String, + value: '' + }, + openType: { + type: String, + value: 'navigate' + }, + delay: { + type: Number, + value: 1 + }, + speed: { + type: Number, + value: 50 + }, + scrollable: { + type: Boolean, + value: true + }, + leftIcon: { + type: String, + value: '' + }, + color: { + type: String, + value: FONT_COLOR + }, + backgroundColor: { + type: String, + value: BG_COLOR + }, + wrapable: Boolean + }, + data: { + show: true + }, + watch: { + text() { + this.set({}, this.init); + } + }, + created() { + this.resetAnimation = wx.createAnimation({ + duration: 0, + timingFunction: 'linear' + }); + }, + destroyed() { + this.timer && clearTimeout(this.timer); + }, + methods: { + init() { + Promise.all([ + this.getRect('.van-notice-bar__content'), + this.getRect('.van-notice-bar__wrap') + ]).then((rects) => { + const [contentRect, wrapRect] = rects; + if (contentRect == null || + wrapRect == null || + !contentRect.width || + !wrapRect.width) { + return; + } + const { speed, scrollable, delay } = this.data; + if (scrollable && wrapRect.width < contentRect.width) { + const duration = (contentRect.width / speed) * 1000; + this.wrapWidth = wrapRect.width; + this.contentWidth = contentRect.width; + this.duration = duration; + this.animation = wx.createAnimation({ + duration, + timingFunction: 'linear', + delay + }); + this.scroll(); + } + }); + }, + scroll() { + this.timer && clearTimeout(this.timer); + this.timer = null; + this.set({ + animationData: this.resetAnimation + .translateX(this.wrapWidth) + .step() + .export() + }); + setTimeout(() => { + this.set({ + animationData: this.animation + .translateX(-this.contentWidth) + .step() + .export() + }); + }, 20); + this.timer = setTimeout(() => { + this.scroll(); + }, this.duration); + }, + onClickIcon() { + this.timer && clearTimeout(this.timer); + this.timer = null; + this.set({ show: false }); + }, + onClick(event) { + this.$emit('click', event); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/notice-bar/index.json b/miniprogram_npm/vant-weapp/notice-bar/index.json new file mode 100644 index 0000000..a9ab393 --- /dev/null +++ b/miniprogram_npm/vant-weapp/notice-bar/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/notice-bar/index.wxml b/miniprogram_npm/vant-weapp/notice-bar/index.wxml new file mode 100644 index 0000000..034ce6f --- /dev/null +++ b/miniprogram_npm/vant-weapp/notice-bar/index.wxml @@ -0,0 +1,35 @@ + + + + + + + + {{ text }} + + + + + + + + diff --git a/miniprogram_npm/vant-weapp/notice-bar/index.wxss b/miniprogram_npm/vant-weapp/notice-bar/index.wxss new file mode 100644 index 0000000..8bbc2c7 --- /dev/null +++ b/miniprogram_npm/vant-weapp/notice-bar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-notice-bar{display:-webkit-flex;display:flex;height:40px;padding:0 15px;font-size:14px;line-height:24px;-webkit-align-items:center;align-items:center}.van-notice-bar--withicon{position:relative;padding-right:40px}.van-notice-bar--wrapable{height:auto;padding:8px 15px}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal}.van-notice-bar__left-icon{display:-webkit-flex;display:flex;margin-right:4px;vertical-align:middle;-webkit-align-items:center;align-items:center}.van-notice-bar__right-icon{position:absolute;top:10px;right:15px;font-size:16px}.van-notice-bar__wrap{position:relative;height:24px;overflow:hidden;-webkit-flex:1;flex:1}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/notify/index.d.ts b/miniprogram_npm/vant-weapp/notify/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/notify/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/notify/index.js b/miniprogram_npm/vant-weapp/notify/index.js new file mode 100644 index 0000000..5de21af --- /dev/null +++ b/miniprogram_npm/vant-weapp/notify/index.js @@ -0,0 +1,45 @@ +import { VantComponent } from '../common/component'; +import { RED } from '../common/color'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + mixins: [safeArea()], + props: { + text: String, + color: { + type: String, + value: '#fff' + }, + backgroundColor: { + type: String, + value: RED + }, + duration: { + type: Number, + value: 3000 + }, + zIndex: { + type: Number, + value: 110 + } + }, + methods: { + show() { + const { duration } = this.data; + clearTimeout(this.timer); + this.set({ + show: true + }); + if (duration > 0 && duration !== Infinity) { + this.timer = setTimeout(() => { + this.hide(); + }, duration); + } + }, + hide() { + clearTimeout(this.timer); + this.set({ + show: false + }); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/notify/index.json b/miniprogram_npm/vant-weapp/notify/index.json new file mode 100644 index 0000000..c14a65f --- /dev/null +++ b/miniprogram_npm/vant-weapp/notify/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-transition": "../transition/index" + } +} diff --git a/miniprogram_npm/vant-weapp/notify/index.wxml b/miniprogram_npm/vant-weapp/notify/index.wxml new file mode 100644 index 0000000..96f5820 --- /dev/null +++ b/miniprogram_npm/vant-weapp/notify/index.wxml @@ -0,0 +1,9 @@ + + + {{ text }} + diff --git a/miniprogram_npm/vant-weapp/notify/index.wxss b/miniprogram_npm/vant-weapp/notify/index.wxss new file mode 100644 index 0000000..6c2fccd --- /dev/null +++ b/miniprogram_npm/vant-weapp/notify/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-notify{position:fixed;top:0;width:100%;padding:6px 15px;font-size:14px;line-height:20px;text-align:center;word-break:break-all;box-sizing:border-box}.van-notify__safe-top{height:44px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/notify/notify.d.ts b/miniprogram_npm/vant-weapp/notify/notify.d.ts new file mode 100644 index 0000000..501dcd9 --- /dev/null +++ b/miniprogram_npm/vant-weapp/notify/notify.d.ts @@ -0,0 +1,12 @@ +interface NotifyOptions { + text: string; + color?: string; + backgroundColor?: string; + duration?: number; + selector?: string; + context?: any; + safeAreaInsetTop?: boolean; + zIndex?: number; +} +export default function Notify(options: NotifyOptions | string): void; +export {}; diff --git a/miniprogram_npm/vant-weapp/notify/notify.js b/miniprogram_npm/vant-weapp/notify/notify.js new file mode 100644 index 0000000..2b89df0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/notify/notify.js @@ -0,0 +1,26 @@ +import { isObj } from '../common/utils'; +const defaultOptions = { + selector: '#van-notify', + duration: 3000 +}; +function parseOptions(text) { + return isObj(text) ? text : { text }; +} +function getContext() { + const pages = getCurrentPages(); + return pages[pages.length - 1]; +} +export default function Notify(options) { + options = Object.assign({}, defaultOptions, parseOptions(options)); + const context = options.context || getContext(); + const notify = context.selectComponent(options.selector); + delete options.context; + delete options.selector; + if (notify) { + notify.set(options); + notify.show(); + } + else { + console.warn('未找到 van-notify 节点,请确认 selector 及 context 是否正确'); + } +} diff --git a/miniprogram_npm/vant-weapp/overlay/index.d.ts b/miniprogram_npm/vant-weapp/overlay/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/overlay/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/overlay/index.js b/miniprogram_npm/vant-weapp/overlay/index.js new file mode 100644 index 0000000..86819a4 --- /dev/null +++ b/miniprogram_npm/vant-weapp/overlay/index.js @@ -0,0 +1,23 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + show: Boolean, + mask: Boolean, + customStyle: String, + duration: { + type: [Number, Object], + value: 300 + }, + zIndex: { + type: Number, + value: 1 + } + }, + methods: { + onClick() { + this.$emit('click'); + }, + // for prevent touchmove + noop() { } + } +}); diff --git a/miniprogram_npm/vant-weapp/overlay/index.json b/miniprogram_npm/vant-weapp/overlay/index.json new file mode 100644 index 0000000..c14a65f --- /dev/null +++ b/miniprogram_npm/vant-weapp/overlay/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-transition": "../transition/index" + } +} diff --git a/miniprogram_npm/vant-weapp/overlay/index.wxml b/miniprogram_npm/vant-weapp/overlay/index.wxml new file mode 100644 index 0000000..31d222e --- /dev/null +++ b/miniprogram_npm/vant-weapp/overlay/index.wxml @@ -0,0 +1,8 @@ + diff --git a/miniprogram_npm/vant-weapp/overlay/index.wxss b/miniprogram_npm/vant-weapp/overlay/index.wxss new file mode 100644 index 0000000..d4a466c --- /dev/null +++ b/miniprogram_npm/vant-weapp/overlay/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-overlay{position:fixed;top:0;right:0;bottom:0;left:0} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/panel/index.d.ts b/miniprogram_npm/vant-weapp/panel/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/panel/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/panel/index.js b/miniprogram_npm/vant-weapp/panel/index.js new file mode 100644 index 0000000..e624d5e --- /dev/null +++ b/miniprogram_npm/vant-weapp/panel/index.js @@ -0,0 +1,10 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + classes: ['header-class', 'footer-class'], + props: { + desc: String, + title: String, + status: String, + useFooterSlot: Boolean + } +}); diff --git a/miniprogram_npm/vant-weapp/panel/index.json b/miniprogram_npm/vant-weapp/panel/index.json new file mode 100644 index 0000000..0e5425c --- /dev/null +++ b/miniprogram_npm/vant-weapp/panel/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index" + } +} diff --git a/miniprogram_npm/vant-weapp/panel/index.wxml b/miniprogram_npm/vant-weapp/panel/index.wxml new file mode 100644 index 0000000..3f135d2 --- /dev/null +++ b/miniprogram_npm/vant-weapp/panel/index.wxml @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/miniprogram_npm/vant-weapp/panel/index.wxss b/miniprogram_npm/vant-weapp/panel/index.wxss new file mode 100644 index 0000000..79d4af7 --- /dev/null +++ b/miniprogram_npm/vant-weapp/panel/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-panel{background:#fff}.van-panel__header-value{color:#f44}.van-panel__footer{padding:10px 15px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/picker-column/index.d.ts b/miniprogram_npm/vant-weapp/picker-column/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker-column/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/picker-column/index.js b/miniprogram_npm/vant-weapp/picker-column/index.js new file mode 100644 index 0000000..4b227c9 --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker-column/index.js @@ -0,0 +1,134 @@ +import { VantComponent } from '../common/component'; +import { isObj, range } from '../common/utils'; +const DEFAULT_DURATION = 200; +VantComponent({ + classes: ['active-class'], + props: { + valueKey: String, + className: String, + itemHeight: Number, + visibleItemCount: Number, + initialOptions: { + type: Array, + value: [] + }, + defaultIndex: { + type: Number, + value: 0 + } + }, + data: { + startY: 0, + offset: 0, + duration: 0, + startOffset: 0, + options: [], + currentIndex: 0 + }, + created() { + const { defaultIndex, initialOptions } = this.data; + this.set({ + currentIndex: defaultIndex, + options: initialOptions + }).then(() => { + this.setIndex(defaultIndex); + }); + }, + computed: { + count() { + return this.data.options.length; + }, + baseOffset() { + const { data } = this; + return (data.itemHeight * (data.visibleItemCount - 1)) / 2; + }, + wrapperStyle() { + const { data } = this; + return [ + `transition: ${data.duration}ms`, + `transform: translate3d(0, ${data.offset + data.baseOffset}px, 0)`, + `line-height: ${data.itemHeight}px` + ].join('; '); + } + }, + watch: { + defaultIndex(value) { + this.setIndex(value); + } + }, + methods: { + onTouchStart(event) { + this.set({ + startY: event.touches[0].clientY, + startOffset: this.data.offset, + duration: 0 + }); + }, + onTouchMove(event) { + const { data } = this; + const deltaY = event.touches[0].clientY - data.startY; + this.set({ + offset: range(data.startOffset + deltaY, -(data.count * data.itemHeight), data.itemHeight) + }); + }, + onTouchEnd() { + const { data } = this; + if (data.offset !== data.startOffset) { + this.set({ + duration: DEFAULT_DURATION + }); + const index = range(Math.round(-data.offset / data.itemHeight), 0, data.count - 1); + this.setIndex(index, true); + } + }, + onClickItem(event) { + const { index } = event.currentTarget.dataset; + this.setIndex(index, true); + }, + adjustIndex(index) { + const { data } = this; + index = range(index, 0, data.count); + for (let i = index; i < data.count; i++) { + if (!this.isDisabled(data.options[i])) + return i; + } + for (let i = index - 1; i >= 0; i--) { + if (!this.isDisabled(data.options[i])) + return i; + } + }, + isDisabled(option) { + return isObj(option) && option.disabled; + }, + getOptionText(option) { + const { data } = this; + return isObj(option) && data.valueKey in option + ? option[data.valueKey] + : option; + }, + setIndex(index, userAction) { + const { data } = this; + index = this.adjustIndex(index) || 0; + const offset = -index * data.itemHeight; + if (index !== data.currentIndex) { + return this.set({ offset, currentIndex: index }).then(() => { + userAction && this.$emit('change', index); + }); + } + return this.set({ offset }); + }, + setValue(value) { + const { options } = this.data; + for (let i = 0; i < options.length; i++) { + if (this.getOptionText(options[i]) === value) { + return this.setIndex(i); + } + } + return Promise.resolve(); + }, + getValue() { + const { data } = this; + return data.options[data.currentIndex]; + } + } +}); diff --git a/miniprogram_npm/vant-weapp/picker-column/index.json b/miniprogram_npm/vant-weapp/picker-column/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker-column/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/picker-column/index.wxml b/miniprogram_npm/vant-weapp/picker-column/index.wxml new file mode 100644 index 0000000..5d9f0ea --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker-column/index.wxml @@ -0,0 +1,22 @@ + + + + + {{ getOptionText(option, valueKey) }} + + diff --git a/miniprogram_npm/vant-weapp/picker-column/index.wxs b/miniprogram_npm/vant-weapp/picker-column/index.wxs new file mode 100644 index 0000000..3c8fc68 --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker-column/index.wxs @@ -0,0 +1,8 @@ +function isObj(x) { + var type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} + +module.exports = function (option, valueKey) { + return isObj(option) && option[valueKey] != null ? option[valueKey] : option; +} diff --git a/miniprogram_npm/vant-weapp/picker-column/index.wxss b/miniprogram_npm/vant-weapp/picker-column/index.wxss new file mode 100644 index 0000000..5142697 --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker-column/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-picker-column{overflow:hidden;font-size:16px;color:#999;text-align:center}.van-picker-column__item{padding:0 5px}.van-picker-column__item--selected{font-weight:500;color:#333}.van-picker-column__item--disabled{opacity:.3} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/picker/index.d.ts b/miniprogram_npm/vant-weapp/picker/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/picker/index.js b/miniprogram_npm/vant-weapp/picker/index.js new file mode 100644 index 0000000..52ee623 --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker/index.js @@ -0,0 +1,132 @@ +import { VantComponent } from '../common/component'; +import { pickerProps } from './shared'; +VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: Object.assign({}, pickerProps, { valueKey: { + type: String, + value: 'text' + }, defaultIndex: { + type: Number, + value: 0 + }, columns: { + type: Array, + value: [], + observer(columns = []) { + this.simple = columns.length && !columns[0].values; + this.children = this.selectAllComponents('.van-picker__column'); + if (Array.isArray(this.children) && this.children.length) { + this.setColumns().catch(() => { }); + } + } + } }), + beforeCreate() { + this.children = []; + }, + methods: { + noop() { }, + setColumns() { + const { data } = this; + const columns = this.simple ? [{ values: data.columns }] : data.columns; + const stack = columns.map((column, index) => this.setColumnValues(index, column.values)); + return Promise.all(stack); + }, + emit(event) { + const { type } = event.currentTarget.dataset; + if (this.simple) { + this.$emit(type, { + value: this.getColumnValue(0), + index: this.getColumnIndex(0) + }); + } + else { + this.$emit(type, { + value: this.getValues(), + index: this.getIndexes() + }); + } + }, + onChange(event) { + if (this.simple) { + this.$emit('change', { + picker: this, + value: this.getColumnValue(0), + index: this.getColumnIndex(0) + }); + } + else { + this.$emit('change', { + picker: this, + value: this.getValues(), + index: event.currentTarget.dataset.index + }); + } + }, + // get column instance by index + getColumn(index) { + return this.children[index]; + }, + // get column value by index + getColumnValue(index) { + const column = this.getColumn(index); + return column && column.getValue(); + }, + // set column value by index + setColumnValue(index, value) { + const column = this.getColumn(index); + if (column == null) { + return Promise.reject(new Error('setColumnValue: 对应列不存在')); + } + return column.setValue(value); + }, + // get column option index by column index + getColumnIndex(columnIndex) { + return (this.getColumn(columnIndex) || {}).data.currentIndex; + }, + // set column option index by column index + setColumnIndex(columnIndex, optionIndex) { + const column = this.getColumn(columnIndex); + if (column == null) { + return Promise.reject(new Error('setColumnIndex: 对应列不存在')); + } + return column.setIndex(optionIndex); + }, + // get options of column by index + getColumnValues(index) { + return (this.children[index] || {}).data.options; + }, + // set options of column by index + setColumnValues(index, options, needReset = true) { + const column = this.children[index]; + if (column == null) { + return Promise.reject(new Error('setColumnValues: 对应列不存在')); + } + const isSame = JSON.stringify(column.data.options) === JSON.stringify(options); + if (isSame) { + return Promise.resolve(); + } + return column.set({ options }).then(() => { + if (needReset) { + column.setIndex(0); + } + }); + }, + // get values of all columns + getValues() { + return this.children.map((child) => child.getValue()); + }, + // set values of all columns + setValues(values) { + const stack = values.map((value, index) => this.setColumnValue(index, value)); + return Promise.all(stack); + }, + // get indexes of all columns + getIndexes() { + return this.children.map((child) => child.data.currentIndex); + }, + // set indexes of all columns + setIndexes(indexes) { + const stack = indexes.map((optionIndex, columnIndex) => this.setColumnIndex(columnIndex, optionIndex)); + return Promise.all(stack); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/picker/index.json b/miniprogram_npm/vant-weapp/picker/index.json new file mode 100644 index 0000000..2fcec89 --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "picker-column": "../picker-column/index", + "loading": "../loading/index" + } +} diff --git a/miniprogram_npm/vant-weapp/picker/index.wxml b/miniprogram_npm/vant-weapp/picker/index.wxml new file mode 100644 index 0000000..2a9cead --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker/index.wxml @@ -0,0 +1,60 @@ + + + + {{ cancelButtonText }} + + {{ title }} + + {{ confirmButtonText }} + + + + + + + + + + + + + function isSimple(columns) { + return columns.length && !columns[0].values; + } + module.exports = isSimple; + diff --git a/miniprogram_npm/vant-weapp/picker/index.wxss b/miniprogram_npm/vant-weapp/picker/index.wxss new file mode 100644 index 0000000..a054f3c --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-picker{position:relative;overflow:hidden;-webkit-text-size-adjust:100%;background-color:#fff;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:-webkit-flex;display:flex;height:44px;line-height:44px;-webkit-justify-content:space-between;justify-content:space-between}.van-picker__cancel,.van-picker__confirm{padding:0 15px;font-size:14px;color:#1989fa}.van-picker__cancel--hover,.van-picker__confirm--hover{background-color:#f2f3f5}.van-picker__title{max-width:50%;font-size:16px;font-weight:500;text-align:center}.van-picker__columns{position:relative;display:-webkit-flex;display:flex}.van-picker__column{-webkit-flex:1 1;flex:1 1;width:0}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:4;display:-webkit-flex;display:flex;background-color:hsla(0,0%,100%,.9);-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-picker__frame,.van-picker__loading .van-loading{position:absolute;top:50%;left:0;z-index:1;width:100%;pointer-events:none;-webkit-transform:translateY(-50%);transform:translateY(-50%)} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/picker/shared.d.ts b/miniprogram_npm/vant-weapp/picker/shared.d.ts new file mode 100644 index 0000000..c548045 --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker/shared.d.ts @@ -0,0 +1,21 @@ +export declare const pickerProps: { + title: StringConstructor; + loading: BooleanConstructor; + showToolbar: BooleanConstructor; + cancelButtonText: { + type: StringConstructor; + value: string; + }; + confirmButtonText: { + type: StringConstructor; + value: string; + }; + visibleItemCount: { + type: NumberConstructor; + value: number; + }; + itemHeight: { + type: NumberConstructor; + value: number; + }; +}; diff --git a/miniprogram_npm/vant-weapp/picker/shared.js b/miniprogram_npm/vant-weapp/picker/shared.js new file mode 100644 index 0000000..cf57d1d --- /dev/null +++ b/miniprogram_npm/vant-weapp/picker/shared.js @@ -0,0 +1,21 @@ +export const pickerProps = { + title: String, + loading: Boolean, + showToolbar: Boolean, + cancelButtonText: { + type: String, + value: '取消' + }, + confirmButtonText: { + type: String, + value: '确认' + }, + visibleItemCount: { + type: Number, + value: 5 + }, + itemHeight: { + type: Number, + value: 44 + } +}; diff --git a/miniprogram_npm/vant-weapp/popup/index.d.ts b/miniprogram_npm/vant-weapp/popup/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/popup/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/popup/index.js b/miniprogram_npm/vant-weapp/popup/index.js new file mode 100644 index 0000000..e9f956b --- /dev/null +++ b/miniprogram_npm/vant-weapp/popup/index.js @@ -0,0 +1,60 @@ +import { VantComponent } from '../common/component'; +import { transition } from '../mixins/transition'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + classes: [ + 'enter-class', + 'enter-active-class', + 'enter-to-class', + 'leave-class', + 'leave-active-class', + 'leave-to-class' + ], + mixins: [transition(false), safeArea()], + props: { + transition: { + type: String, + observer: 'observeClass' + }, + customStyle: String, + overlayStyle: String, + zIndex: { + type: Number, + value: 100 + }, + overlay: { + type: Boolean, + value: true + }, + closeOnClickOverlay: { + type: Boolean, + value: true + }, + position: { + type: String, + value: 'center', + observer: 'observeClass' + } + }, + created() { + this.observeClass(); + }, + methods: { + onClickOverlay() { + this.$emit('click-overlay'); + if (this.data.closeOnClickOverlay) { + this.$emit('close'); + } + }, + observeClass() { + const { transition, position } = this.data; + const updateData = { + name: transition || position + }; + if (transition === 'none') { + updateData.duration = 0; + } + this.set(updateData); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/popup/index.json b/miniprogram_npm/vant-weapp/popup/index.json new file mode 100644 index 0000000..0dd2931 --- /dev/null +++ b/miniprogram_npm/vant-weapp/popup/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-overlay": "../overlay/index" + } +} diff --git a/miniprogram_npm/vant-weapp/popup/index.wxml b/miniprogram_npm/vant-weapp/popup/index.wxml new file mode 100644 index 0000000..414d1c7 --- /dev/null +++ b/miniprogram_npm/vant-weapp/popup/index.wxml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/miniprogram_npm/vant-weapp/popup/index.wxss b/miniprogram_npm/vant-weapp/popup/index.wxss new file mode 100644 index 0000000..0f7a49d --- /dev/null +++ b/miniprogram_npm/vant-weapp/popup/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-popup{position:fixed;top:50%;left:50%;max-height:100%;overflow-y:auto;background-color:#fff;box-sizing:border-box;-webkit-animation:ease both;animation:ease both;-webkit-overflow-scrolling:touch;transition-timing-function:ease}.van-popup--center{-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-popup--top{top:0;right:auto;bottom:auto;left:50%;width:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-popup--right{top:50%;right:0;bottom:auto;left:auto;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--bottom{top:auto;right:auto;bottom:0;left:50%;width:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-popup--left{top:50%;right:auto;bottom:auto;left:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--bottom.van-popup--safe{padding-bottom:34px}.van-popup--left .van-popup__safe-top,.van-popup--right .van-popup__safe-top,.van-popup--top .van-popup__safe-top{height:44px}.van-popup--bottom .van-popup__safe-top,.van-popup--center .van-popup__safe-top{padding-top:0!important}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-scale-enter,.van-scale-leave-to{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-bottom-enter,.van-bottom-leave-to{-webkit-transform:translate3d(-50%,100%,0);transform:translate3d(-50%,100%,0)}.van-top-enter,.van-top-leave-to{-webkit-transform:translate3d(-50%,-100%,0);transform:translate3d(-50%,-100%,0)}.van-left-enter,.van-left-leave-to{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/progress/index.d.ts b/miniprogram_npm/vant-weapp/progress/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/progress/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/progress/index.js b/miniprogram_npm/vant-weapp/progress/index.js new file mode 100644 index 0000000..82b9f10 --- /dev/null +++ b/miniprogram_npm/vant-weapp/progress/index.js @@ -0,0 +1,22 @@ +import { VantComponent } from '../common/component'; +import { BLUE } from '../common/color'; +VantComponent({ + props: { + inactive: Boolean, + percentage: Number, + pivotText: String, + pivotColor: String, + showPivot: { + type: Boolean, + value: true + }, + color: { + type: String, + value: BLUE + }, + textColor: { + type: String, + value: '#fff' + } + } +}); diff --git a/miniprogram_npm/vant-weapp/progress/index.json b/miniprogram_npm/vant-weapp/progress/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram_npm/vant-weapp/progress/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram_npm/vant-weapp/progress/index.wxml b/miniprogram_npm/vant-weapp/progress/index.wxml new file mode 100644 index 0000000..a810ef0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/progress/index.wxml @@ -0,0 +1,16 @@ + + + + + + {{ getters.text(pivotText, percentage) }} + + + diff --git a/miniprogram_npm/vant-weapp/progress/index.wxs b/miniprogram_npm/vant-weapp/progress/index.wxs new file mode 100644 index 0000000..d685345 --- /dev/null +++ b/miniprogram_npm/vant-weapp/progress/index.wxs @@ -0,0 +1,5 @@ +module.exports = { + text: function(pivotText, percentage) { + return pivotText || percentage + '%'; + } +}; diff --git a/miniprogram_npm/vant-weapp/progress/index.wxss b/miniprogram_npm/vant-weapp/progress/index.wxss new file mode 100644 index 0000000..a448a8a --- /dev/null +++ b/miniprogram_npm/vant-weapp/progress/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-progress{position:relative;height:4px;background:#e5e5e5;border-radius:4px}.van-progress__portion{position:absolute;left:0;height:100%;border-radius:inherit}.van-progress__pivot{position:absolute;top:50%;right:0;min-width:2em;padding:0 5px;font-size:10px;line-height:1.6;text-align:center;word-break:keep-all;background-color:#e5e5e5;border-radius:1em;-webkit-transform:translateY(-50%);transform:translateY(-50%);box-sizing:border-box} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/radio-group/index.d.ts b/miniprogram_npm/vant-weapp/radio-group/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/radio-group/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/radio-group/index.js b/miniprogram_npm/vant-weapp/radio-group/index.js new file mode 100644 index 0000000..fc22459 --- /dev/null +++ b/miniprogram_npm/vant-weapp/radio-group/index.js @@ -0,0 +1,38 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + relation: { + name: 'radio', + type: 'descendant', + linked(target) { + this.children = this.children || []; + this.children.push(target); + this.updateChild(target); + }, + unlinked(target) { + this.children = this.children.filter((child) => child !== target); + } + }, + props: { + value: { + type: null, + observer: 'updateChildren' + }, + disabled: { + type: Boolean, + observer: 'updateChildren' + } + }, + methods: { + updateChildren() { + (this.children || []).forEach((child) => this.updateChild(child)); + }, + updateChild(child) { + const { value, disabled } = this.data; + child.set({ + value, + disabled: disabled || child.data.disabled + }); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/radio-group/index.json b/miniprogram_npm/vant-weapp/radio-group/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram_npm/vant-weapp/radio-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram_npm/vant-weapp/radio-group/index.wxml b/miniprogram_npm/vant-weapp/radio-group/index.wxml new file mode 100644 index 0000000..4fa864c --- /dev/null +++ b/miniprogram_npm/vant-weapp/radio-group/index.wxml @@ -0,0 +1 @@ + diff --git a/miniprogram_npm/vant-weapp/radio-group/index.wxss b/miniprogram_npm/vant-weapp/radio-group/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/miniprogram_npm/vant-weapp/radio-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/radio/index.d.ts b/miniprogram_npm/vant-weapp/radio/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/radio/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/radio/index.js b/miniprogram_npm/vant-weapp/radio/index.js new file mode 100644 index 0000000..6e31448 --- /dev/null +++ b/miniprogram_npm/vant-weapp/radio/index.js @@ -0,0 +1,47 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + relation: { + name: 'radio-group', + type: 'ancestor', + linked(target) { + this.parent = target; + }, + unlinked() { + this.parent = null; + } + }, + classes: ['icon-class', 'label-class'], + props: { + value: null, + disabled: Boolean, + useIconSlot: Boolean, + checkedColor: String, + labelPosition: { + type: String, + value: 'right' + }, + labelDisabled: Boolean, + shape: { + type: String, + value: 'round' + } + }, + methods: { + emitChange(value) { + const instance = this.parent || this; + instance.$emit('input', value); + instance.$emit('change', value); + }, + onChange(event) { + console.log(event); + this.emitChange(this.data.name); + }, + onClickLabel() { + const { disabled, labelDisabled, name } = this.data; + if (!disabled && !labelDisabled) { + this.emitChange(name); + } + } + } +}); diff --git a/miniprogram_npm/vant-weapp/radio/index.json b/miniprogram_npm/vant-weapp/radio/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/radio/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/miniprogram_npm/vant-weapp/radio/index.wxml b/miniprogram_npm/vant-weapp/radio/index.wxml new file mode 100644 index 0000000..c681916 --- /dev/null +++ b/miniprogram_npm/vant-weapp/radio/index.wxml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/miniprogram_npm/vant-weapp/radio/index.wxss b/miniprogram_npm/vant-weapp/radio/index.wxss new file mode 100644 index 0000000..cb1b36a --- /dev/null +++ b/miniprogram_npm/vant-weapp/radio/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-radio{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap,.van-radio__label{line-height:20px}.van-radio__icon-wrap{-webkit-flex:none;flex:none}.van-radio__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-radio__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-radio__icon--disabled.van-radio__icon--checked{color:#c9c9c9}.van-radio__label{margin-left:10px;color:#333;word-break:break-all}.van-radio__label--left{float:left;margin:0 10px 0 0}.van-radio__label--disabled{color:#c9c9c9}.van-radio__label:empty{margin:0} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/rate/index.d.ts b/miniprogram_npm/vant-weapp/rate/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/rate/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/rate/index.js b/miniprogram_npm/vant-weapp/rate/index.js new file mode 100644 index 0000000..534b0ae --- /dev/null +++ b/miniprogram_npm/vant-weapp/rate/index.js @@ -0,0 +1,74 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + classes: ['icon-class'], + props: { + value: Number, + readonly: Boolean, + disabled: Boolean, + allowHalf: Boolean, + size: { + type: Number, + value: 20 + }, + icon: { + type: String, + value: 'star' + }, + voidIcon: { + type: String, + value: 'star-o' + }, + color: { + type: String, + value: '#ffd21e' + }, + voidColor: { + type: String, + value: '#c7c7c7' + }, + disabledColor: { + type: String, + value: '#bdbdbd' + }, + count: { + type: Number, + value: 5 + } + }, + data: { + innerValue: 0 + }, + watch: { + value(value) { + if (value !== this.data.innerValue) { + this.set({ innerValue: value }); + } + } + }, + methods: { + onSelect(event) { + const { data } = this; + const { score } = event.currentTarget.dataset; + if (!data.disabled && !data.readonly) { + this.set({ innerValue: score + 1 }); + this.$emit('input', score + 1); + this.$emit('change', score + 1); + } + }, + onTouchMove(event) { + const { clientX, clientY } = event.touches[0]; + this.getRect('.van-rate__icon', true).then((list) => { + const target = list + .sort(item => item.right - item.left) + .find(item => clientX >= item.left && + clientX <= item.right && + clientY >= item.top && + clientY <= item.bottom); + if (target != null) { + this.onSelect(Object.assign({}, event, { currentTarget: target })); + } + }); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/rate/index.json b/miniprogram_npm/vant-weapp/rate/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/rate/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/miniprogram_npm/vant-weapp/rate/index.wxml b/miniprogram_npm/vant-weapp/rate/index.wxml new file mode 100644 index 0000000..fc0d320 --- /dev/null +++ b/miniprogram_npm/vant-weapp/rate/index.wxml @@ -0,0 +1,32 @@ + + + + + + + + + diff --git a/miniprogram_npm/vant-weapp/rate/index.wxss b/miniprogram_npm/vant-weapp/rate/index.wxss new file mode 100644 index 0000000..93edcc0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/rate/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-rate{-webkit-user-select:none;user-select:none}.van-rate__item{position:relative;display:inline-block;padding:0 2px}.van-rate__icon{display:block;height:1em}.van-rate__icon--half{position:absolute;top:0;left:2px;width:.5em;overflow:hidden} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/row/index.d.ts b/miniprogram_npm/vant-weapp/row/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/row/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/row/index.js b/miniprogram_npm/vant-weapp/row/index.js new file mode 100644 index 0000000..4f92485 --- /dev/null +++ b/miniprogram_npm/vant-weapp/row/index.js @@ -0,0 +1,36 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + relation: { + name: 'col', + type: 'descendant', + linked(target) { + if (this.data.gutter) { + target.setGutter(this.data.gutter); + } + } + }, + props: { + gutter: Number + }, + watch: { + gutter: 'setGutter' + }, + mounted() { + if (this.data.gutter) { + this.setGutter(); + } + }, + methods: { + setGutter() { + const { gutter } = this.data; + const margin = `-${Number(gutter) / 2}px`; + const style = gutter + ? `margin-right: ${margin}; margin-left: ${margin};` + : ''; + this.set({ style }); + this.getRelationNodes('../col/index').forEach(col => { + col.setGutter(this.data.gutter); + }); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/row/index.json b/miniprogram_npm/vant-weapp/row/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram_npm/vant-weapp/row/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram_npm/vant-weapp/row/index.wxml b/miniprogram_npm/vant-weapp/row/index.wxml new file mode 100644 index 0000000..20c5366 --- /dev/null +++ b/miniprogram_npm/vant-weapp/row/index.wxml @@ -0,0 +1,3 @@ + + + diff --git a/miniprogram_npm/vant-weapp/row/index.wxss b/miniprogram_npm/vant-weapp/row/index.wxss new file mode 100644 index 0000000..9a46c3f --- /dev/null +++ b/miniprogram_npm/vant-weapp/row/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-row:after{content:"";display:table;clear:both} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/search/index.d.ts b/miniprogram_npm/vant-weapp/search/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/search/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/search/index.js b/miniprogram_npm/vant-weapp/search/index.js new file mode 100644 index 0000000..5aff677 --- /dev/null +++ b/miniprogram_npm/vant-weapp/search/index.js @@ -0,0 +1,62 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + classes: ['field-class', 'input-class', 'cancel-class'], + props: { + label: String, + focus: Boolean, + error: Boolean, + disabled: Boolean, + readonly: Boolean, + inputAlign: String, + showAction: Boolean, + useActionSlot: Boolean, + placeholder: String, + placeholderStyle: String, + background: { + type: String, + value: '#ffffff' + }, + maxlength: { + type: Number, + value: -1 + }, + shape: { + type: String, + value: 'square' + }, + clearable: { + type: Boolean, + value: true + } + }, + methods: { + onChange(event) { + this.set({ value: event.detail }); + this.$emit('change', event.detail); + }, + onCancel() { + /** + * 修复修改输入框值时,输入框失焦和赋值同时触发,赋值失效 + * // https://github.com/youzan/vant-weapp/issues/1768 + */ + setTimeout(() => { + this.set({ value: '' }); + this.$emit('cancel'); + this.$emit('change', ''); + }, 200); + }, + onSearch() { + this.$emit('search', this.data.value); + }, + onFocus() { + this.$emit('focus'); + }, + onBlur() { + this.$emit('blur'); + }, + onClear() { + this.$emit('clear'); + }, + } +}); diff --git a/miniprogram_npm/vant-weapp/search/index.json b/miniprogram_npm/vant-weapp/search/index.json new file mode 100644 index 0000000..b4cfe91 --- /dev/null +++ b/miniprogram_npm/vant-weapp/search/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-field": "../field/index" + } +} diff --git a/miniprogram_npm/vant-weapp/search/index.wxml b/miniprogram_npm/vant-weapp/search/index.wxml new file mode 100644 index 0000000..12ad1be --- /dev/null +++ b/miniprogram_npm/vant-weapp/search/index.wxml @@ -0,0 +1,46 @@ + + + + + {{ label }} + + + + + + + + 取消 + + diff --git a/miniprogram_npm/vant-weapp/search/index.wxss b/miniprogram_npm/vant-weapp/search/index.wxss new file mode 100644 index 0000000..8544516 --- /dev/null +++ b/miniprogram_npm/vant-weapp/search/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-search{padding:10px 16px;-webkit-align-items:center;align-items:center;box-sizing:border-box}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{padding-left:10px;background-color:#f7f8fa;border-radius:2px;-webkit-flex:1;flex:1}.van-search__content--round{border-radius:17px}.van-search__label{padding:0 5px;font-size:14px;line-height:34px;color:#333}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#999}.van-search--withaction{padding-right:0}.van-search__action{padding:0 10px;font-size:14px;line-height:34px;color:#333}.van-search__action--hover{background-color:#f2f3f5} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/slider/index.d.ts b/miniprogram_npm/vant-weapp/slider/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/slider/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/slider/index.js b/miniprogram_npm/vant-weapp/slider/index.js new file mode 100644 index 0000000..4d82657 --- /dev/null +++ b/miniprogram_npm/vant-weapp/slider/index.js @@ -0,0 +1,87 @@ +import { VantComponent } from '../common/component'; +import { touch } from '../mixins/touch'; +VantComponent({ + mixins: [touch], + props: { + disabled: Boolean, + useButtonSlot: Boolean, + activeColor: String, + inactiveColor: String, + max: { + type: Number, + value: 100 + }, + min: { + type: Number, + value: 0 + }, + step: { + type: Number, + value: 1 + }, + value: { + type: Number, + value: 0 + }, + barHeight: { + type: String, + value: '2px' + } + }, + watch: { + value(value) { + this.updateValue(value, false); + } + }, + created() { + this.updateValue(this.data.value); + }, + methods: { + onTouchStart(event) { + if (this.data.disabled) + return; + this.touchStart(event); + this.startValue = this.format(this.data.value); + }, + onTouchMove(event) { + if (this.data.disabled) + return; + this.touchMove(event); + this.getRect('.van-slider').then((rect) => { + const diff = this.deltaX / rect.width * 100; + this.newValue = this.startValue + diff; + this.updateValue(this.newValue, false, true); + }); + }, + onTouchEnd() { + if (this.data.disabled) + return; + this.updateValue(this.newValue, true); + }, + onClick(event) { + if (this.data.disabled) + return; + this.getRect('.van-slider').then((rect) => { + const value = (event.detail.x - rect.left) / rect.width * 100; + this.updateValue(value, true); + }); + }, + updateValue(value, end, drag) { + value = this.format(value); + this.set({ + value, + barStyle: `width: ${value}%; height: ${this.data.barHeight};` + }); + if (drag) { + this.$emit('drag', { value }); + } + if (end) { + this.$emit('change', value); + } + }, + format(value) { + const { max, min, step } = this.data; + return Math.round(Math.max(min, Math.min(value, max)) / step) * step; + } + } +}); diff --git a/miniprogram_npm/vant-weapp/slider/index.json b/miniprogram_npm/vant-weapp/slider/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram_npm/vant-weapp/slider/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram_npm/vant-weapp/slider/index.wxml b/miniprogram_npm/vant-weapp/slider/index.wxml new file mode 100644 index 0000000..d30d078 --- /dev/null +++ b/miniprogram_npm/vant-weapp/slider/index.wxml @@ -0,0 +1,29 @@ + + + + + + + + + + diff --git a/miniprogram_npm/vant-weapp/slider/index.wxss b/miniprogram_npm/vant-weapp/slider/index.wxss new file mode 100644 index 0000000..f227c66 --- /dev/null +++ b/miniprogram_npm/vant-weapp/slider/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-slider{position:relative;border-radius:999px;background-color:#e5e5e5}.van-slider__bar{position:relative;border-radius:inherit;background-color:#1989fa}.van-slider__button{width:20px;height:20px;border-radius:50%;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.5)}.van-slider__button-wrapper{position:absolute;top:50%;right:0;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper:after{content:"";position:absolute;width:200%;height:200%;top:-50%;left:-50%}.van-slider--disabled{opacity:.3} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/stepper/index.d.ts b/miniprogram_npm/vant-weapp/stepper/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/stepper/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/stepper/index.js b/miniprogram_npm/vant-weapp/stepper/index.js new file mode 100644 index 0000000..0bae326 --- /dev/null +++ b/miniprogram_npm/vant-weapp/stepper/index.js @@ -0,0 +1,105 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + classes: [ + 'input-class', + 'plus-class', + 'minus-class' + ], + props: { + value: null, + integer: Boolean, + disabled: Boolean, + inputWidth: String, + asyncChange: Boolean, + disableInput: Boolean, + min: { + type: null, + value: 1 + }, + max: { + type: null, + value: Number.MAX_SAFE_INTEGER + }, + step: { + type: null, + value: 1 + }, + showPlus: { + type: Boolean, + value: true + }, + showMinus: { + type: Boolean, + value: true + } + }, + computed: { + minusDisabled() { + return this.data.disabled || this.data.value <= this.data.min; + }, + plusDisabled() { + return this.data.disabled || this.data.value >= this.data.max; + } + }, + watch: { + value(value) { + if (value === '') { + return; + } + const newValue = this.range(value); + if (typeof newValue === 'number' && +this.data.value !== newValue) { + this.set({ value: newValue }); + } + } + }, + data: { + focus: false + }, + created() { + this.set({ + value: this.range(this.data.value) + }); + }, + methods: { + onFocus(event) { + this.$emit('focus', event.detail); + }, + onBlur(event) { + const value = this.range(this.data.value); + this.triggerInput(value); + this.$emit('blur', event.detail); + }, + // limit value range + range(value) { + value = String(value).replace(/[^0-9.-]/g, ''); + return Math.max(Math.min(this.data.max, value), this.data.min); + }, + onInput(event) { + const { value = '' } = event.detail || {}; + this.triggerInput(value); + }, + onChange(type) { + if (this.data[`${type}Disabled`]) { + this.$emit('overlimit', type); + return; + } + const diff = type === 'minus' ? -this.data.step : +this.data.step; + const value = Math.round((+this.data.value + diff) * 100) / 100; + this.triggerInput(this.range(value)); + this.$emit(type); + }, + onMinus() { + this.onChange('minus'); + }, + onPlus() { + this.onChange('plus'); + }, + triggerInput(value) { + this.set({ + value: this.data.asyncChange ? this.data.value : value + }); + this.$emit('change', value); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/stepper/index.json b/miniprogram_npm/vant-weapp/stepper/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/stepper/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/stepper/index.wxml b/miniprogram_npm/vant-weapp/stepper/index.wxml new file mode 100644 index 0000000..33c257e --- /dev/null +++ b/miniprogram_npm/vant-weapp/stepper/index.wxml @@ -0,0 +1,29 @@ + + + + + + + diff --git a/miniprogram_npm/vant-weapp/stepper/index.wxss b/miniprogram_npm/vant-weapp/stepper/index.wxss new file mode 100644 index 0000000..e681a77 --- /dev/null +++ b/miniprogram_npm/vant-weapp/stepper/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__minus,.van-stepper__plus{position:relative;display:inline-block;width:28px;height:28px;padding:5px;margin:1px;vertical-align:middle;background-color:#f2f3f5;border:0;box-sizing:border-box}.van-stepper__minus:before,.van-stepper__plus:before{width:9px;height:1px}.van-stepper__minus:after,.van-stepper__plus:after{width:1px;height:9px}.van-stepper__minus:after,.van-stepper__minus:before,.van-stepper__plus:after,.van-stepper__plus:before{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;background-color:#333;content:""}.van-stepper__minus--hover,.van-stepper__plus--hover{background-color:#e8e8e8}.van-stepper__minus--disabled,.van-stepper__plus--disabled{background-color:#f7f8fa}.van-stepper__minus--disabled:after,.van-stepper__minus--disabled:before,.van-stepper__plus--disabled:after,.van-stepper__plus--disabled:before{background-color:#c9c9c9}.van-stepper__minus--disabled.van-stepper__minus--hover,.van-stepper__minus--disabled.van-stepper__plus--hover,.van-stepper__plus--disabled.van-stepper__minus--hover,.van-stepper__plus--disabled.van-stepper__plus--hover{background-color:#f7f8fa}.van-stepper__minus{border-radius:4px 0 0 4px}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 4px 4px 0}.van-stepper__input{display:inline-block;width:30px;height:26px;padding:1px;margin:1px;font-size:14px;color:#333;text-align:center;vertical-align:middle;background-color:#f2f3f5;border:0;border-width:1px 0;border-radius:0;box-sizing:initial;-webkit-appearance:none}.van-stepper__input--disabled{color:#c9c9c9;background-color:#f2f3f5} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/steps/index.d.ts b/miniprogram_npm/vant-weapp/steps/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/steps/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/steps/index.js b/miniprogram_npm/vant-weapp/steps/index.js new file mode 100644 index 0000000..6d236d1 --- /dev/null +++ b/miniprogram_npm/vant-weapp/steps/index.js @@ -0,0 +1,17 @@ +import { VantComponent } from '../common/component'; +import { GREEN } from '../common/color'; +VantComponent({ + props: { + icon: String, + steps: Array, + active: Number, + direction: { + type: String, + value: 'horizontal' + }, + activeColor: { + type: String, + value: GREEN + } + } +}); diff --git a/miniprogram_npm/vant-weapp/steps/index.json b/miniprogram_npm/vant-weapp/steps/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/steps/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/miniprogram_npm/vant-weapp/steps/index.wxml b/miniprogram_npm/vant-weapp/steps/index.wxml new file mode 100644 index 0000000..508705d --- /dev/null +++ b/miniprogram_npm/vant-weapp/steps/index.wxml @@ -0,0 +1,35 @@ + + + + + + + {{ item.text }} + {{ item.desc }} + + + + + + + + + + + +function get(index, active) { + if (index < active) { + return 'finish'; + } else if (index === active) { + return 'process'; + } + + return ''; +} + +module.exports = get; + diff --git a/miniprogram_npm/vant-weapp/steps/index.wxss b/miniprogram_npm/vant-weapp/steps/index.wxss new file mode 100644 index 0000000..8ffab00 --- /dev/null +++ b/miniprogram_npm/vant-weapp/steps/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;color:#999}.van-step--finish{color:#333}.van-step__circle{width:5px;height:5px;background-color:#999;border-radius:50%}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;padding:0 8px;background-color:#fff;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0)}.van-step--horizontal .van-step__title{display:inline-block;font-size:12px;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:1px;background-color:#eee;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:#333}.van-step--horizontal.van-step--process .van-step__active{display:block;font-size:12px;line-height:1}.van-step--vertical{padding:10px 10px 10px 0;font-size:14px;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;background-color:#fff;content:""}.van-step--vertical .van-step__active,.van-step--vertical .van-step__circle,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__active{font-size:12px;line-height:1}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;background-color:#eee;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/submit-bar/index.d.ts b/miniprogram_npm/vant-weapp/submit-bar/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/submit-bar/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/submit-bar/index.js b/miniprogram_npm/vant-weapp/submit-bar/index.js new file mode 100644 index 0000000..138c7fc --- /dev/null +++ b/miniprogram_npm/vant-weapp/submit-bar/index.js @@ -0,0 +1,55 @@ +import { VantComponent } from '../common/component'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + mixins: [safeArea()], + classes: [ + 'bar-class', + 'price-class', + 'button-class' + ], + props: { + tip: { + type: null, + observer: 'updateTip' + }, + tipIcon: String, + type: Number, + price: { + type: null, + observer: 'updatePrice' + }, + label: String, + loading: Boolean, + disabled: Boolean, + buttonText: String, + currency: { + type: String, + value: '¥' + }, + buttonType: { + type: String, + value: 'danger' + }, + decimalLength: { + type: Number, + value: 2, + observer: 'updatePrice' + }, + suffixLabel: String + }, + methods: { + updatePrice() { + const { price, decimalLength } = this.data; + this.set({ + hasPrice: typeof price === 'number', + priceStr: (price / 100).toFixed(decimalLength) + }); + }, + updateTip() { + this.set({ hasTip: typeof this.data.tip === 'string' }); + }, + onSubmit(event) { + this.$emit('submit', event.detail); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/submit-bar/index.json b/miniprogram_npm/vant-weapp/submit-bar/index.json new file mode 100644 index 0000000..bda9b8d --- /dev/null +++ b/miniprogram_npm/vant-weapp/submit-bar/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-button": "../button/index", + "van-icon": "../icon/index" + } +} diff --git a/miniprogram_npm/vant-weapp/submit-bar/index.wxml b/miniprogram_npm/vant-weapp/submit-bar/index.wxml new file mode 100644 index 0000000..a9c7f0e --- /dev/null +++ b/miniprogram_npm/vant-weapp/submit-bar/index.wxml @@ -0,0 +1,42 @@ + + + + + + + + + {{ tip }} + + + + + + + + {{ label || '合计:' }} + + {{ currency }} + {{ priceStr }} + + {{ suffixLabel }} + + + {{ loading ? '' : buttonText }} + + + diff --git a/miniprogram_npm/vant-weapp/submit-bar/index.wxss b/miniprogram_npm/vant-weapp/submit-bar/index.wxss new file mode 100644 index 0000000..7e4694b --- /dev/null +++ b/miniprogram_npm/vant-weapp/submit-bar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-submit-bar{position:fixed;bottom:0;left:0;z-index:100;width:100%;-webkit-user-select:none;user-select:none}.van-submit-bar__tip{padding:10px;font-size:12px;line-height:1.5;color:#f56723;background-color:#fff7cc}.van-submit-bar__tip:empty{display:none}.van-submit-bar__tip-icon{width:12px;height:12px;margin-right:4px;vertical-align:middle}.van-submit-bar__tip-text{display:inline;vertical-align:middle}.van-submit-bar__bar{display:-webkit-flex;display:flex;height:50px;font-size:14px;background-color:#fff;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end}.van-submit-bar__bar--safe{padding-bottom:34px}.van-submit-bar__text{padding-right:12px;font-weight:500;color:#333;-webkit-flex:1;flex:1;text-align:right}.van-submit-bar__price{font-size:18px;color:#f44}.van-submit-bar__currency{font-size:14px}.van-submit-bar__suffix-label{margin-left:5px}.van-submit-bar__button{width:110px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/swipe-cell/index.d.ts b/miniprogram_npm/vant-weapp/swipe-cell/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/swipe-cell/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/swipe-cell/index.js b/miniprogram_npm/vant-weapp/swipe-cell/index.js new file mode 100644 index 0000000..f09d73c --- /dev/null +++ b/miniprogram_npm/vant-weapp/swipe-cell/index.js @@ -0,0 +1,113 @@ +import { VantComponent } from '../common/component'; +import { touch } from '../mixins/touch'; +const THRESHOLD = 0.3; +VantComponent({ + props: { + disabled: Boolean, + leftWidth: { + type: Number, + value: 0 + }, + rightWidth: { + type: Number, + value: 0 + }, + asyncClose: Boolean + }, + mixins: [touch], + data: { + catchMove: false + }, + created() { + this.offset = 0; + }, + methods: { + open(position) { + const { leftWidth, rightWidth } = this.data; + const offset = position === 'left' ? leftWidth : -rightWidth; + this.swipeMove(offset); + }, + close() { + this.swipeMove(0); + }, + swipeMove(offset = 0) { + this.offset = offset; + const transform = `translate3d(${offset}px, 0, 0)`; + const transition = this.draging + ? 'none' + : '.6s cubic-bezier(0.18, 0.89, 0.32, 1)'; + this.set({ + wrapperStyle: ` + -webkit-transform: ${transform}; + -webkit-transition: ${transition}; + transform: ${transform}; + transition: ${transition}; + ` + }); + }, + swipeLeaveTransition() { + const { leftWidth, rightWidth } = this.data; + const { offset } = this; + if (rightWidth > 0 && -offset > rightWidth * THRESHOLD) { + this.open('right'); + } + else if (leftWidth > 0 && offset > leftWidth * THRESHOLD) { + this.open('left'); + } + else { + this.swipeMove(0); + } + this.set({ catchMove: false }); + }, + startDrag(event) { + if (this.data.disabled) { + return; + } + this.draging = true; + this.startOffset = this.offset; + this.firstDirection = ''; + this.touchStart(event); + }, + noop() { }, + onDrag(event) { + if (this.data.disabled) { + return; + } + this.touchMove(event); + if (!this.firstDirection) { + this.firstDirection = this.direction; + this.set({ catchMove: this.firstDirection === 'horizontal' }); + } + if (this.firstDirection === 'vertical') { + return; + } + const { leftWidth, rightWidth } = this.data; + const offset = this.startOffset + this.deltaX; + if ((rightWidth > 0 && -offset > rightWidth) || + (leftWidth > 0 && offset > leftWidth)) { + return; + } + this.swipeMove(offset); + }, + endDrag() { + if (this.data.disabled) { + return; + } + this.draging = false; + this.swipeLeaveTransition(); + }, + onClick(event) { + const { key: position = 'outside' } = event.currentTarget.dataset; + this.$emit('click', position); + if (!this.offset) { + return; + } + if (this.data.asyncClose) { + this.$emit('close', { position, instance: this }); + } + else { + this.swipeMove(0); + } + } + } +}); diff --git a/miniprogram_npm/vant-weapp/swipe-cell/index.json b/miniprogram_npm/vant-weapp/swipe-cell/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram_npm/vant-weapp/swipe-cell/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram_npm/vant-weapp/swipe-cell/index.wxml b/miniprogram_npm/vant-weapp/swipe-cell/index.wxml new file mode 100644 index 0000000..0ce1e47 --- /dev/null +++ b/miniprogram_npm/vant-weapp/swipe-cell/index.wxml @@ -0,0 +1,20 @@ + + + + + + + + + + + diff --git a/miniprogram_npm/vant-weapp/swipe-cell/index.wxss b/miniprogram_npm/vant-weapp/swipe-cell/index.wxss new file mode 100644 index 0000000..d615270 --- /dev/null +++ b/miniprogram_npm/vant-weapp/swipe-cell/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-swipe-cell{position:relative;overflow:hidden}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/switch-cell/index.d.ts b/miniprogram_npm/vant-weapp/switch-cell/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/switch-cell/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/switch-cell/index.js b/miniprogram_npm/vant-weapp/switch-cell/index.js new file mode 100644 index 0000000..608ce72 --- /dev/null +++ b/miniprogram_npm/vant-weapp/switch-cell/index.js @@ -0,0 +1,42 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + props: { + value: null, + icon: String, + title: String, + label: String, + border: Boolean, + checked: Boolean, + loading: Boolean, + disabled: Boolean, + activeColor: String, + inactiveColor: String, + useLabelSlot: Boolean, + size: { + type: String, + value: '24px' + }, + activeValue: { + type: null, + value: true + }, + inactiveValue: { + type: null, + value: false + } + }, + watch: { + checked(value) { + this.set({ value }); + } + }, + created() { + this.set({ value: this.data.checked }); + }, + methods: { + onChange(event) { + this.$emit('change', event.detail); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/switch-cell/index.json b/miniprogram_npm/vant-weapp/switch-cell/index.json new file mode 100644 index 0000000..22e5342 --- /dev/null +++ b/miniprogram_npm/vant-weapp/switch-cell/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index", + "van-switch": "../switch/index" + } +} diff --git a/miniprogram_npm/vant-weapp/switch-cell/index.wxml b/miniprogram_npm/vant-weapp/switch-cell/index.wxml new file mode 100644 index 0000000..49a653e --- /dev/null +++ b/miniprogram_npm/vant-weapp/switch-cell/index.wxml @@ -0,0 +1,25 @@ + + + + + + diff --git a/miniprogram_npm/vant-weapp/switch-cell/index.wxss b/miniprogram_npm/vant-weapp/switch-cell/index.wxss new file mode 100644 index 0000000..2ad612e --- /dev/null +++ b/miniprogram_npm/vant-weapp/switch-cell/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-switch-cell{padding-top:9px;padding-bottom:9px}.van-switch-cell__switch{vertical-align:middle} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/switch/index.d.ts b/miniprogram_npm/vant-weapp/switch/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/switch/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/switch/index.js b/miniprogram_npm/vant-weapp/switch/index.js new file mode 100644 index 0000000..77d1559 --- /dev/null +++ b/miniprogram_npm/vant-weapp/switch/index.js @@ -0,0 +1,43 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + classes: ['node-class'], + props: { + checked: null, + loading: Boolean, + disabled: Boolean, + activeColor: String, + inactiveColor: String, + size: { + type: String, + value: '30px' + }, + activeValue: { + type: null, + value: true + }, + inactiveValue: { + type: null, + value: false + } + }, + watch: { + checked(value) { + this.set({ value }); + } + }, + created() { + this.set({ value: this.data.checked }); + }, + methods: { + onClick() { + const { activeValue, inactiveValue } = this.data; + if (!this.data.disabled && !this.data.loading) { + const checked = this.data.checked === activeValue; + const value = checked ? inactiveValue : activeValue; + this.$emit('input', value); + this.$emit('change', value); + } + } + } +}); diff --git a/miniprogram_npm/vant-weapp/switch/index.json b/miniprogram_npm/vant-weapp/switch/index.json new file mode 100644 index 0000000..01077f5 --- /dev/null +++ b/miniprogram_npm/vant-weapp/switch/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-loading": "../loading/index" + } +} diff --git a/miniprogram_npm/vant-weapp/switch/index.wxml b/miniprogram_npm/vant-weapp/switch/index.wxml new file mode 100644 index 0000000..74ce520 --- /dev/null +++ b/miniprogram_npm/vant-weapp/switch/index.wxml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/miniprogram_npm/vant-weapp/switch/index.wxss b/miniprogram_npm/vant-weapp/switch/index.wxss new file mode 100644 index 0000000..85cadf3 --- /dev/null +++ b/miniprogram_npm/vant-weapp/switch/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-switch{display:inline-block;position:relative;width:2em;border:1px solid rgba(0,0,0,.1);border-radius:1em;box-sizing:initial;transition:background-color .3s}.van-switch,.van-switch__node{height:1em;background-color:#fff}.van-switch__node{top:0;left:0;position:absolute;border-radius:100%;width:1em;z-index:1;transition:.3s;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05)}.van-switch__loading{top:25%;left:25%;position:absolute!important}.van-switch--on{background-color:#1989fa}.van-switch--on .van-switch__node{-webkit-transform:translateX(1em);transform:translateX(1em)}.van-switch--disabled{opacity:.4} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/tab/index.d.ts b/miniprogram_npm/vant-weapp/tab/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/tab/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/tab/index.js b/miniprogram_npm/vant-weapp/tab/index.js new file mode 100644 index 0000000..c555393 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tab/index.js @@ -0,0 +1,35 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + relation: { + name: 'tabs', + type: 'ancestor' + }, + props: { + dot: Boolean, + info: null, + title: String, + disabled: Boolean, + titleStyle: String + }, + data: { + width: null, + inited: false, + active: false, + animated: false + }, + watch: { + title: 'update', + disabled: 'update', + dot: 'update', + info: 'update', + titleStyle: 'update' + }, + methods: { + update() { + const parent = this.getRelationNodes('../tabs/index')[0]; + if (parent) { + parent.updateTabs(); + } + } + } +}); diff --git a/miniprogram_npm/vant-weapp/tab/index.json b/miniprogram_npm/vant-weapp/tab/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tab/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/tab/index.wxml b/miniprogram_npm/vant-weapp/tab/index.wxml new file mode 100644 index 0000000..b90f452 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tab/index.wxml @@ -0,0 +1,9 @@ + + + + + diff --git a/miniprogram_npm/vant-weapp/tab/index.wxss b/miniprogram_npm/vant-weapp/tab/index.wxss new file mode 100644 index 0000000..e2e67a9 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tab/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tab__pane{box-sizing:border-box;overflow-y:auto}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/tabbar-item/index.d.ts b/miniprogram_npm/vant-weapp/tabbar-item/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabbar-item/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/tabbar-item/index.js b/miniprogram_npm/vant-weapp/tabbar-item/index.js new file mode 100644 index 0000000..70f285e --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabbar-item/index.js @@ -0,0 +1,49 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + info: null, + icon: String, + dot: Boolean, + name: { + type: [String, Number] + } + }, + relation: { + name: 'tabbar', + type: 'ancestor' + }, + data: { + active: false + }, + methods: { + onClick() { + if (this.parent) { + this.parent.onChange(this); + } + this.$emit('click'); + }, + updateFromParent() { + const { parent } = this; + if (!parent) { + return; + } + const index = parent.children.indexOf(this); + const parentData = parent.data; + const { data } = this; + const active = (data.name || index) === parentData.active; + const patch = {}; + if (active !== data.active) { + patch.active = active; + } + if (parentData.activeColor !== data.activeColor) { + patch.activeColor = parentData.activeColor; + } + if (parentData.inactiveColor !== data.inactiveColor) { + patch.inactiveColor = parentData.inactiveColor; + } + return Object.keys(patch).length > 0 + ? this.set(patch) + : Promise.resolve(); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/tabbar-item/index.json b/miniprogram_npm/vant-weapp/tabbar-item/index.json new file mode 100644 index 0000000..16f174c --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabbar-item/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-info": "../info/index" + } +} diff --git a/miniprogram_npm/vant-weapp/tabbar-item/index.wxml b/miniprogram_npm/vant-weapp/tabbar-item/index.wxml new file mode 100644 index 0000000..b2649ae --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabbar-item/index.wxml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + diff --git a/miniprogram_npm/vant-weapp/tabbar-item/index.wxss b/miniprogram_npm/vant-weapp/tabbar-item/index.wxss new file mode 100644 index 0000000..d2c9d16 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabbar-item/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{color:#7d7e80;height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:12px;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-tabbar-item__icon{font-size:18px;margin-bottom:5px;position:relative}.van-tabbar-item__icon--dot:after{top:0;right:-8px;width:8px;height:8px;content:" ";position:absolute;border-radius:100%;background-color:#f44}.van-tabbar-item__icon image{width:30px;height:18px;display:block}.van-tabbar-item--active{color:#1989fa} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/tabbar/index.d.ts b/miniprogram_npm/vant-weapp/tabbar/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabbar/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/tabbar/index.js b/miniprogram_npm/vant-weapp/tabbar/index.js new file mode 100644 index 0000000..814d817 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabbar/index.js @@ -0,0 +1,63 @@ +import { VantComponent } from '../common/component'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + mixins: [safeArea()], + relation: { + name: 'tabbar-item', + type: 'descendant', + linked(target) { + this.children.push(target); + target.parent = this; + target.updateFromParent(); + }, + unlinked(target) { + this.children = this.children.filter((item) => item !== target); + this.updateChildren(); + } + }, + props: { + active: { + type: [Number, String], + observer: 'updateChildren' + }, + activeColor: { + type: String, + observer: 'updateChildren' + }, + inactiveColor: { + type: String, + observer: 'updateChildren' + }, + fixed: { + type: Boolean, + value: true + }, + border: { + type: Boolean, + value: true + }, + zIndex: { + type: Number, + value: 1 + } + }, + beforeCreate() { + this.children = []; + }, + methods: { + updateChildren() { + const { children } = this; + if (!Array.isArray(children) || !children.length) { + return Promise.resolve(); + } + return Promise.all(children.map((child) => child.updateFromParent())); + }, + onChange(child) { + const index = this.children.indexOf(child); + const active = child.data.name || index; + if (active !== this.data.active) { + this.$emit('change', active); + } + } + } +}); diff --git a/miniprogram_npm/vant-weapp/tabbar/index.json b/miniprogram_npm/vant-weapp/tabbar/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabbar/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram_npm/vant-weapp/tabbar/index.wxml b/miniprogram_npm/vant-weapp/tabbar/index.wxml new file mode 100644 index 0000000..0926b64 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabbar/index.wxml @@ -0,0 +1,8 @@ + + + + + diff --git a/miniprogram_npm/vant-weapp/tabbar/index.wxss b/miniprogram_npm/vant-weapp/tabbar/index.wxss new file mode 100644 index 0000000..b07814c --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabbar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tabbar{display:-webkit-flex;display:flex;width:100%;height:50px;background-color:#fff}.van-tabbar--fixed{position:fixed;bottom:0;left:0}.van-tabbar--safe{padding-bottom:34px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/tabs/index.d.ts b/miniprogram_npm/vant-weapp/tabs/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabs/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/tabs/index.js b/miniprogram_npm/vant-weapp/tabs/index.js new file mode 100644 index 0000000..ac6d2c0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabs/index.js @@ -0,0 +1,317 @@ +import { VantComponent } from '../common/component'; +import { touch } from '../mixins/touch'; +import { nextTick } from '../common/utils'; +VantComponent({ + mixins: [touch], + classes: ['nav-class', 'tab-class', 'tab-active-class', 'line-class'], + relation: { + name: 'tab', + type: 'descendant', + linked(child) { + this.child.push(child); + this.updateTabs(this.data.tabs.concat(child.data)); + }, + unlinked(child) { + const index = this.child.indexOf(child); + const { tabs } = this.data; + tabs.splice(index, 1); + this.child.splice(index, 1); + this.updateTabs(tabs); + } + }, + props: { + color: String, + sticky: Boolean, + animated: Boolean, + swipeable: Boolean, + lineWidth: { + type: Number, + value: -1 + }, + lineHeight: { + type: Number, + value: -1 + }, + active: { + type: Number, + value: 0 + }, + type: { + type: String, + value: 'line' + }, + border: { + type: Boolean, + value: true + }, + duration: { + type: Number, + value: 0.3 + }, + zIndex: { + type: Number, + value: 1 + }, + swipeThreshold: { + type: Number, + value: 4 + }, + offsetTop: { + type: Number, + value: 0 + } + }, + data: { + tabs: [], + lineStyle: '', + scrollLeft: 0, + scrollable: false, + trackStyle: '', + wrapStyle: '', + position: '' + }, + watch: { + swipeThreshold() { + this.set({ + scrollable: this.child.length > this.data.swipeThreshold + }); + }, + color: 'setLine', + lineWidth: 'setLine', + lineHeight: 'setLine', + active: 'setActiveTab', + animated: 'setTrack', + offsetTop: 'setWrapStyle' + }, + beforeCreate() { + this.child = []; + }, + mounted() { + this.setLine(true); + this.setTrack(); + this.scrollIntoView(); + this.getRect('.van-tabs__wrap').then((rect) => { + this.navHeight = rect.height; + this.observerContentScroll(); + }); + }, + destroyed() { + // @ts-ignore + this.createIntersectionObserver().disconnect(); + }, + methods: { + updateTabs(tabs) { + tabs = tabs || this.data.tabs; + this.set({ + tabs, + scrollable: tabs.length > this.data.swipeThreshold + }); + this.setActiveTab(); + }, + trigger(eventName, index) { + this.$emit(eventName, { + index, + title: this.data.tabs[index].title + }); + }, + onTap(event) { + const { index } = event.currentTarget.dataset; + if (this.data.tabs[index].disabled) { + this.trigger('disabled', index); + } + else { + this.trigger('click', index); + this.setActive(index); + } + }, + setActive(active) { + if (active !== this.data.active) { + this.trigger('change', active); + this.set({ active }); + this.setActiveTab(); + } + }, + setLine(skipTransition) { + if (this.data.type !== 'line') { + return; + } + const { color, active, duration, lineWidth, lineHeight } = this.data; + this.getRect('.van-tab', true).then((rects) => { + const rect = rects[active]; + const width = lineWidth !== -1 ? lineWidth : rect.width / 2; + const height = lineHeight !== -1 ? `height: ${lineHeight}px;` : ''; + let left = rects + .slice(0, active) + .reduce((prev, curr) => prev + curr.width, 0); + left += (rect.width - width) / 2; + const transition = skipTransition + ? '' + : `transition-duration: ${duration}s; -webkit-transition-duration: ${duration}s;`; + this.set({ + lineStyle: ` + ${height} + width: ${width}px; + background-color: ${color}; + -webkit-transform: translateX(${left}px); + transform: translateX(${left}px); + ${transition} + ` + }); + }); + }, + setTrack() { + const { animated, active, duration } = this.data; + if (!animated) + return ''; + this.getRect('.van-tabs__content').then((rect) => { + const { width } = rect; + this.set({ + trackStyle: ` + width: ${width * this.child.length}px; + left: ${-1 * active * width}px; + transition: left ${duration}s; + display: -webkit-box; + display: flex; + ` + }); + const props = { width, animated }; + this.child.forEach((item) => { + item.set(props); + }); + }); + }, + setActiveTab() { + this.child.forEach((item, index) => { + const data = { + active: index === this.data.active + }; + if (data.active) { + data.inited = true; + } + if (data.active !== item.data.active) { + item.set(data); + } + }); + nextTick(() => { + this.setLine(); + this.setTrack(); + this.scrollIntoView(); + }); + }, + // scroll active tab into view + scrollIntoView() { + const { active, scrollable } = this.data; + if (!scrollable) { + return; + } + Promise.all([ + this.getRect('.van-tab', true), + this.getRect('.van-tabs__nav') + ]).then(([tabRects, navRect]) => { + const tabRect = tabRects[active]; + const offsetLeft = tabRects + .slice(0, active) + .reduce((prev, curr) => prev + curr.width, 0); + this.set({ + scrollLeft: offsetLeft - (navRect.width - tabRect.width) / 2 + }); + }); + }, + onTouchStart(event) { + if (!this.data.swipeable) + return; + this.touchStart(event); + }, + onTouchMove(event) { + if (!this.data.swipeable) + return; + this.touchMove(event); + }, + // watch swipe touch end + onTouchEnd() { + if (!this.data.swipeable) + return; + const { active, tabs } = this.data; + const { direction, deltaX, offsetX } = this; + const minSwipeDistance = 50; + if (direction === 'horizontal' && offsetX >= minSwipeDistance) { + if (deltaX > 0 && active !== 0) { + this.setActive(active - 1); + } + else if (deltaX < 0 && active !== tabs.length - 1) { + this.setActive(active + 1); + } + } + }, + setWrapStyle() { + const { offsetTop, position } = this.data; + let wrapStyle; + switch (position) { + case 'top': + wrapStyle = ` + top: ${offsetTop}px; + position: fixed; + `; + break; + case 'bottom': + wrapStyle = ` + top: auto; + bottom: 0; + `; + break; + default: + wrapStyle = ''; + } + // cut down `set` + if (wrapStyle === this.data.wrapStyle) + return; + this.set({ wrapStyle }); + }, + observerContentScroll() { + if (!this.data.sticky) { + return; + } + const { offsetTop } = this.data; + const { windowHeight } = wx.getSystemInfoSync(); + // @ts-ignore + this.createIntersectionObserver().disconnect(); + // @ts-ignore + this.createIntersectionObserver() + .relativeToViewport({ top: -(this.navHeight + offsetTop) }) + .observe('.van-tabs', (res) => { + const { top } = res.boundingClientRect; + if (top > offsetTop) { + return; + } + const position = res.intersectionRatio > 0 ? 'top' : 'bottom'; + this.$emit('scroll', { + scrollTop: top + offsetTop, + isFixed: position === 'top' + }); + this.setPosition(position); + }); + // @ts-ignore + this.createIntersectionObserver() + .relativeToViewport({ bottom: -(windowHeight - 1 - offsetTop) }) + .observe('.van-tabs', (res) => { + const { top, bottom } = res.boundingClientRect; + if (bottom < this.navHeight) { + return; + } + const position = res.intersectionRatio > 0 ? 'top' : ''; + this.$emit('scroll', { + scrollTop: top + offsetTop, + isFixed: position === 'top' + }); + this.setPosition(position); + }); + }, + setPosition(position) { + if (position !== this.data.position) { + this.set({ position }).then(() => { + this.setWrapStyle(); + }); + } + } + } +}); diff --git a/miniprogram_npm/vant-weapp/tabs/index.json b/miniprogram_npm/vant-weapp/tabs/index.json new file mode 100644 index 0000000..bf0ebe0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabs/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-info": "../info/index" + } +} diff --git a/miniprogram_npm/vant-weapp/tabs/index.wxml b/miniprogram_npm/vant-weapp/tabs/index.wxml new file mode 100644 index 0000000..1618d64 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabs/index.wxml @@ -0,0 +1,49 @@ + + + + + + + + + + + + {{ item.title }} + + + + + + + + + + + + + + diff --git a/miniprogram_npm/vant-weapp/tabs/index.wxss b/miniprogram_npm/vant-weapp/tabs/index.wxss new file mode 100644 index 0000000..5944afb --- /dev/null +++ b/miniprogram_npm/vant-weapp/tabs/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{position:absolute;top:0;right:0;left:0;display:-webkit-flex;display:flex;background-color:#fff}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__scroll--card{border:1px solid #f44;border-radius:2px}.van-tabs__nav{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none}.van-tabs__nav--line{height:100%}.van-tabs__nav--card{height:30px}.van-tabs__nav--card .van-tab{line-height:30px;color:#f44;border-right:1px solid #f44}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;background-color:#f44}.van-tabs__line{position:absolute;bottom:0;left:0;z-index:1;height:3px;background-color:#f44;border-radius:3px}.van-tabs--line{padding-top:44px}.van-tabs--line .van-tabs__wrap{height:44px}.van-tabs--card{padding-top:30px;margin:0 15px}.van-tabs--card .van-tabs__wrap{height:30px}.van-tabs__content{overflow:hidden}.van-tab,.van-tabs__track{position:relative}.van-tab{min-width:0;padding:0 5px;font-size:14px;line-height:44px;color:#7d7e80;text-align:center;cursor:pointer;box-sizing:border-box;-webkit-flex:1;flex:1}.van-tab--active{font-weight:500;color:#333}.van-tab--disabled{color:#c9c9c9}.van-tab__title--dot:after{display:inline-block;width:8px;height:8px;vertical-align:middle;background-color:#f44;border-radius:100%;content:""}.van-tab__title__info{position:relative!important;top:-1px!important;display:inline-block;-webkit-transform:translateX(0)!important;transform:translateX(0)!important} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/tag/index.d.ts b/miniprogram_npm/vant-weapp/tag/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/tag/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/tag/index.js b/miniprogram_npm/vant-weapp/tag/index.js new file mode 100644 index 0000000..0b1f44c --- /dev/null +++ b/miniprogram_npm/vant-weapp/tag/index.js @@ -0,0 +1,31 @@ +import { VantComponent } from '../common/component'; +import { RED, BLUE, GREEN, ORANGE } from '../common/color'; +const DEFAULT_COLOR = '#999'; +const COLOR_MAP = { + danger: RED, + primary: BLUE, + success: GREEN, + warning: ORANGE +}; +VantComponent({ + props: { + size: String, + type: String, + mark: Boolean, + color: String, + plain: Boolean, + round: Boolean, + textColor: String + }, + computed: { + style() { + const color = this.data.color || COLOR_MAP[this.data.type] || DEFAULT_COLOR; + const key = this.data.plain ? 'color' : 'background-color'; + const style = { [key]: color }; + if (this.data.textColor) { + style.color = this.data.textColor; + } + return Object.keys(style).map(key => `${key}: ${style[key]}`).join(';'); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/tag/index.json b/miniprogram_npm/vant-weapp/tag/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tag/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/tag/index.wxml b/miniprogram_npm/vant-weapp/tag/index.wxml new file mode 100644 index 0000000..e66580c --- /dev/null +++ b/miniprogram_npm/vant-weapp/tag/index.wxml @@ -0,0 +1,8 @@ + + + + + diff --git a/miniprogram_npm/vant-weapp/tag/index.wxss b/miniprogram_npm/vant-weapp/tag/index.wxss new file mode 100644 index 0000000..fbd8fad --- /dev/null +++ b/miniprogram_npm/vant-weapp/tag/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tag{color:#fff;font-size:10px;padding:.2em .5em;line-height:normal;border-radius:.2em;display:inline-block}.van-tag:after{border-color:currentColor;border-radius:.4em}.van-tag--mark{padding-right:.6em;border-radius:0 .8em .8em 0}.van-tag--mark:after{border-radius:0 1.6em 1.6em 0}.van-tag--round{border-radius:.8em}.van-tag--round:after{border-radius:1.6em}.van-tag--medium{font-size:12px}.van-tag--large{font-size:14px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/toast/index.d.ts b/miniprogram_npm/vant-weapp/toast/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/toast/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/toast/index.js b/miniprogram_npm/vant-weapp/toast/index.js new file mode 100644 index 0000000..a9fe162 --- /dev/null +++ b/miniprogram_npm/vant-weapp/toast/index.js @@ -0,0 +1,29 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + show: Boolean, + mask: Boolean, + message: String, + forbidClick: Boolean, + zIndex: { + type: Number, + value: 1000 + }, + type: { + type: String, + value: 'text' + }, + loadingType: { + type: String, + value: 'circular' + }, + position: { + type: String, + value: 'middle' + } + }, + methods: { + // for prevent touchmove + noop() { } + } +}); diff --git a/miniprogram_npm/vant-weapp/toast/index.json b/miniprogram_npm/vant-weapp/toast/index.json new file mode 100644 index 0000000..9b1b78c --- /dev/null +++ b/miniprogram_npm/vant-weapp/toast/index.json @@ -0,0 +1,9 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-loading": "../loading/index", + "van-overlay": "../overlay/index", + "van-transition": "../transition/index" + } +} diff --git a/miniprogram_npm/vant-weapp/toast/index.wxml b/miniprogram_npm/vant-weapp/toast/index.wxml new file mode 100644 index 0000000..3e27e2d --- /dev/null +++ b/miniprogram_npm/vant-weapp/toast/index.wxml @@ -0,0 +1,33 @@ + + + + + {{ message }} + + + + + + {{ message }} + + + + + diff --git a/miniprogram_npm/vant-weapp/toast/index.wxss b/miniprogram_npm/vant-weapp/toast/index.wxss new file mode 100644 index 0000000..c173620 --- /dev/null +++ b/miniprogram_npm/vant-weapp/toast/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;color:#fff;font-size:14px;line-height:20px;border-radius:4px;word-break:break-all;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;box-sizing:initial;background-color:rgba(51,51,51,.88);white-space:pre-wrap}.van-toast__container{position:fixed;top:50%;left:50%;max-width:70%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-toast--text{padding:8px 12px;min-width:96px}.van-toast--icon{width:90px;padding:15px;min-height:90px}.van-toast--icon .van-toast__icon{font-size:48px}.van-toast--icon .van-toast__text{padding-top:5px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translateY(-30vh);transform:translateY(-30vh)}.van-toast--bottom{-webkit-transform:translateY(30vh);transform:translateY(30vh)} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/toast/toast.d.ts b/miniprogram_npm/vant-weapp/toast/toast.d.ts new file mode 100644 index 0000000..f7148a0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/toast/toast.d.ts @@ -0,0 +1,26 @@ +/// +declare type ToastMessage = string | number; +interface ToastOptions { + show?: boolean; + type?: string; + mask?: boolean; + zIndex?: number; + context?: WechatMiniprogram.Component.TrivialInstance | WechatMiniprogram.Page.TrivialInstance; + position?: string; + duration?: number; + selector?: string; + forbidClick?: boolean; + loadingType?: string; + message?: ToastMessage; + onClose?: () => void; +} +declare function Toast(toastOptions: ToastOptions | ToastMessage): WechatMiniprogram.Component.TrivialInstance; +declare namespace Toast { + var loading: (options: string | number | ToastOptions) => WechatMiniprogram.Component.Instance, Record, Record>; + var success: (options: string | number | ToastOptions) => WechatMiniprogram.Component.Instance, Record, Record>; + var fail: (options: string | number | ToastOptions) => WechatMiniprogram.Component.Instance, Record, Record>; + var clear: () => void; + var setDefaultOptions: (options: ToastOptions) => void; + var resetDefaultOptions: () => void; +} +export default Toast; diff --git a/miniprogram_npm/vant-weapp/toast/toast.js b/miniprogram_npm/vant-weapp/toast/toast.js new file mode 100644 index 0000000..3b974ab --- /dev/null +++ b/miniprogram_npm/vant-weapp/toast/toast.js @@ -0,0 +1,66 @@ +import { isObj } from '../common/utils'; +const defaultOptions = { + type: 'text', + mask: false, + message: '', + show: true, + zIndex: 1000, + duration: 3000, + position: 'middle', + forbidClick: false, + loadingType: 'circular', + selector: '#van-toast' +}; +let queue = []; +let currentOptions = Object.assign({}, defaultOptions); +function parseOptions(message) { + return isObj(message) ? message : { message }; +} +function getContext() { + const pages = getCurrentPages(); + return pages[pages.length - 1]; +} +function Toast(toastOptions) { + const options = Object.assign({}, currentOptions, parseOptions(toastOptions)); + const context = options.context || getContext(); + const toast = context.selectComponent(options.selector); + if (!toast) { + console.warn('未找到 van-toast 节点,请确认 selector 及 context 是否正确'); + return; + } + delete options.context; + delete options.selector; + toast.clear = () => { + toast.set({ show: false }); + if (options.onClose) { + options.onClose(); + } + }; + queue.push(toast); + toast.set(options); + clearTimeout(toast.timer); + if (options.duration > 0) { + toast.timer = setTimeout(() => { + toast.clear(); + queue = queue.filter(item => item !== toast); + }, options.duration); + } + return toast; +} +const createMethod = (type) => (options) => Toast(Object.assign({ type }, parseOptions(options))); +Toast.loading = createMethod('loading'); +Toast.success = createMethod('success'); +Toast.fail = createMethod('fail'); +Toast.clear = () => { + queue.forEach(toast => { + toast.clear(); + }); + queue = []; +}; +Toast.setDefaultOptions = (options) => { + Object.assign(currentOptions, options); +}; +Toast.resetDefaultOptions = () => { + currentOptions = Object.assign({}, defaultOptions); +}; +export default Toast; diff --git a/miniprogram_npm/vant-weapp/transition/index.d.ts b/miniprogram_npm/vant-weapp/transition/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/transition/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/transition/index.js b/miniprogram_npm/vant-weapp/transition/index.js new file mode 100644 index 0000000..a920f1f --- /dev/null +++ b/miniprogram_npm/vant-weapp/transition/index.js @@ -0,0 +1,13 @@ +import { VantComponent } from '../common/component'; +import { transition } from '../mixins/transition'; +VantComponent({ + classes: [ + 'enter-class', + 'enter-active-class', + 'enter-to-class', + 'leave-class', + 'leave-active-class', + 'leave-to-class' + ], + mixins: [transition(true)] +}); diff --git a/miniprogram_npm/vant-weapp/transition/index.json b/miniprogram_npm/vant-weapp/transition/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/transition/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/transition/index.wxml b/miniprogram_npm/vant-weapp/transition/index.wxml new file mode 100644 index 0000000..412e8af --- /dev/null +++ b/miniprogram_npm/vant-weapp/transition/index.wxml @@ -0,0 +1,8 @@ + + + diff --git a/miniprogram_npm/vant-weapp/transition/index.wxss b/miniprogram_npm/vant-weapp/transition/index.wxss new file mode 100644 index 0000000..adcbc5f --- /dev/null +++ b/miniprogram_npm/vant-weapp/transition/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-fade-up-enter,.van-fade-up-leave-to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-fade-down-enter,.van-fade-down-leave-to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-fade-left-enter,.van-fade-left-leave-to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-fade-right-enter,.van-fade-right-leave-to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-slide-up-enter,.van-slide-up-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/tree-select/index.d.ts b/miniprogram_npm/vant-weapp/tree-select/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram_npm/vant-weapp/tree-select/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram_npm/vant-weapp/tree-select/index.js b/miniprogram_npm/vant-weapp/tree-select/index.js new file mode 100644 index 0000000..092141f --- /dev/null +++ b/miniprogram_npm/vant-weapp/tree-select/index.js @@ -0,0 +1,78 @@ +import { VantComponent } from '../common/component'; +const ITEM_HEIGHT = 44; +VantComponent({ + classes: [ + 'main-item-class', + 'content-item-class', + 'main-active-class', + 'content-active-class', + 'main-disabled-class', + 'content-disabled-class' + ], + props: { + items: Array, + mainActiveIndex: { + type: Number, + value: 0 + }, + activeId: { + type: [Number, String, Array] + }, + maxHeight: { + type: Number, + value: 300 + } + }, + data: { + subItems: [], + mainHeight: 0, + itemHeight: 0 + }, + watch: { + items() { + this.updateSubItems().then(() => { + this.updateMainHeight(); + }); + }, + maxHeight() { + this.updateItemHeight(this.data.subItems); + this.updateMainHeight(); + }, + mainActiveIndex: 'updateSubItems' + }, + methods: { + // 当一个子项被选择时 + onSelectItem(event) { + const { item } = event.currentTarget.dataset; + if (!item.disabled) { + this.$emit('click-item', item); + } + }, + // 当一个导航被点击时 + onClickNav(event) { + const { index } = event.currentTarget.dataset; + const item = this.data.items[index]; + if (!item.disabled) { + this.$emit('click-nav', { index }); + } + }, + // 更新子项列表 + updateSubItems() { + const { items, mainActiveIndex } = this.data; + const { children = [] } = items[mainActiveIndex] || {}; + this.updateItemHeight(children); + return this.set({ subItems: children }); + }, + // 更新组件整体高度,根据最大高度和当前组件需要展示的高度来决定 + updateMainHeight() { + const { items = [], subItems = [] } = this.data; + const maxHeight = Math.max(items.length * ITEM_HEIGHT, subItems.length * ITEM_HEIGHT); + this.set({ mainHeight: Math.min(maxHeight, this.data.maxHeight) }); + }, + // 更新子项列表高度,根据可展示的最大高度和当前子项列表的高度决定 + updateItemHeight(subItems) { + const itemHeight = Math.min(subItems.length * ITEM_HEIGHT, this.data.maxHeight); + return this.set({ itemHeight }); + } + } +}); diff --git a/miniprogram_npm/vant-weapp/tree-select/index.json b/miniprogram_npm/vant-weapp/tree-select/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tree-select/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/miniprogram_npm/vant-weapp/tree-select/index.wxml b/miniprogram_npm/vant-weapp/tree-select/index.wxml new file mode 100644 index 0000000..9ada914 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tree-select/index.wxml @@ -0,0 +1,40 @@ + + + + + + + {{ item.text }} + + + + + {{ item.text }} + + + + diff --git a/miniprogram_npm/vant-weapp/tree-select/index.wxs b/miniprogram_npm/vant-weapp/tree-select/index.wxs new file mode 100644 index 0000000..b1cbb39 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tree-select/index.wxs @@ -0,0 +1,12 @@ +/* eslint-disable */ +var array = require('../wxs/array.wxs'); + +function isActive (activeList, itemId) { + if (array.isArray(activeList)) { + return activeList.indexOf(itemId) > -1; + } + + return activeList === itemId; +} + +module.exports.isActive = isActive; diff --git a/miniprogram_npm/vant-weapp/tree-select/index.wxss b/miniprogram_npm/vant-weapp/tree-select/index.wxss new file mode 100644 index 0000000..da723a4 --- /dev/null +++ b/miniprogram_npm/vant-weapp/tree-select/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tree-select{position:relative;font-size:14px;-webkit-user-select:none;user-select:none}.van-tree-select__nav{position:absolute;top:0;bottom:0;left:0;width:35%;min-width:120px;background-color:#fafafa}.van-tree-select__nitem{position:relative;padding:0 9px 0 15px;line-height:44px}.van-tree-select__nitem--active:after{position:absolute;top:0;bottom:0;left:0;width:3.6px;background-color:#f44;content:""}.van-tree-select__nitem--active{font-weight:700;background-color:#fff}.van-tree-select__nitem--disabled{color:#999}.van-tree-select__content{width:65%;padding-left:15px;margin-left:35%;background-color:#fff;box-sizing:border-box}.van-tree-select__item{position:relative;font-weight:700;line-height:44px}.van-tree-select__item--active{color:#f44}.van-tree-select__item--disabled{color:#999}.van-tree-select__selected{position:absolute;top:0;right:15px;bottom:0;height:24px;margin:auto 0;line-height:24px} \ No newline at end of file diff --git a/miniprogram_npm/vant-weapp/wxs/array.wxs b/miniprogram_npm/vant-weapp/wxs/array.wxs new file mode 100644 index 0000000..610089c --- /dev/null +++ b/miniprogram_npm/vant-weapp/wxs/array.wxs @@ -0,0 +1,5 @@ +function isArray(array) { + return array && array.constructor === 'Array'; +} + +module.exports.isArray = isArray; diff --git a/miniprogram_npm/vant-weapp/wxs/bem.wxs b/miniprogram_npm/vant-weapp/wxs/bem.wxs new file mode 100644 index 0000000..93b2777 --- /dev/null +++ b/miniprogram_npm/vant-weapp/wxs/bem.wxs @@ -0,0 +1,38 @@ +var array = require('./array.wxs'); +var object = require('./object.wxs'); +var PREFIX = 'van-'; + +function join(name, mods) { + name = PREFIX + name; + mods = mods.map(function(mod) { + return name + '--' + mod; + }); + mods.unshift(name); + return mods.join(' '); +} + +function traversing(mods, conf) { + if (!conf) { + return; + } + + if (typeof conf === 'string' || typeof conf === 'number') { + mods.push(conf); + } else if (array.isArray(conf)) { + conf.forEach(function(item) { + traversing(mods, item); + }); + } else if (typeof conf === 'object') { + object.keys(conf).forEach(function(key) { + conf[key] && mods.push(key); + }); + } +} + +function bem(name, conf) { + var mods = []; + traversing(mods, conf); + return join(name, mods); +} + +module.exports.bem = bem; diff --git a/miniprogram_npm/vant-weapp/wxs/memoize.wxs b/miniprogram_npm/vant-weapp/wxs/memoize.wxs new file mode 100644 index 0000000..261ae67 --- /dev/null +++ b/miniprogram_npm/vant-weapp/wxs/memoize.wxs @@ -0,0 +1,54 @@ +/** + * Simple memoize + * wxs doesn't support fn.apply, so this memoize only support up to 2 args + */ + +function isPrimitive(value) { + var type = typeof value; + return ( + type === 'boolean' || + type === 'number' || + type === 'string' || + type === 'undefined' || + value === null + ); +} + +// mock simple fn.call in wxs +function call(fn, args) { + if (args.length === 2) { + return fn(args[0], args[1]); + } + + if (args.length === 1) { + return fn(args[0]); + } + + return fn(); +} + +function serializer(args) { + if (args.length === 1 && isPrimitive(args[0])) { + return args[0]; + } + var obj = {}; + for (var i = 0; i < args.length; i++) { + obj['key' + i] = args[i]; + } + return JSON.stringify(obj); +} + +function memoize(fn) { + var cache = {}; + + return function() { + var key = serializer(arguments); + if (cache[key] === undefined) { + cache[key] = call(fn, arguments); + } + + return cache[key]; + }; +} + +module.exports.memoize = memoize; diff --git a/miniprogram_npm/vant-weapp/wxs/object.wxs b/miniprogram_npm/vant-weapp/wxs/object.wxs new file mode 100644 index 0000000..e077107 --- /dev/null +++ b/miniprogram_npm/vant-weapp/wxs/object.wxs @@ -0,0 +1,13 @@ +/* eslint-disable */ +var REGEXP = getRegExp('{|}|"', 'g'); + +function keys(obj) { + return JSON.stringify(obj) + .replace(REGEXP, '') + .split(',') + .map(function(item) { + return item.split(':')[0]; + }); +} + +module.exports.keys = keys; diff --git a/miniprogram_npm/vant-weapp/wxs/utils.wxs b/miniprogram_npm/vant-weapp/wxs/utils.wxs new file mode 100644 index 0000000..8cced70 --- /dev/null +++ b/miniprogram_npm/vant-weapp/wxs/utils.wxs @@ -0,0 +1,12 @@ +var bem = require('./bem.wxs').bem; +var memoize = require('./memoize.wxs').memoize; + +function isSrc(url) { + return url.indexOf('http') === 0 || url.indexOf('data:image') === 0 || url.indexOf('//') === 0; +} + +module.exports = { + bem: memoize(bem), + isSrc: isSrc, + memoize: memoize +}; diff --git a/node_modules/vant-weapp/LICENSE b/node_modules/vant-weapp/LICENSE new file mode 100644 index 0000000..8777860 --- /dev/null +++ b/node_modules/vant-weapp/LICENSE @@ -0,0 +1,7 @@ +Copyright 2016-present Youzan + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/vant-weapp/README.md b/node_modules/vant-weapp/README.md new file mode 100644 index 0000000..62d7485 --- /dev/null +++ b/node_modules/vant-weapp/README.md @@ -0,0 +1,128 @@ +

+ logo +

+

轻量、可靠的小程序 UI 组件库

+ +

+ npm version + downloads + downloads + +

+ +

+ 🔥 文档网站 +   + 🚀 Vue 版 +

+ +--- + +## 介绍 + +Vant Weapp 是移动端 Vue 组件库 [Vant](https://github.com/youzan/vant) 的小程序版本,两者基于相同的视觉规范,提供一致的 API 接口,助力开发者快速搭建小程序应用。 + +## 预览 + +扫描下方小程序二维码,体验组件库示例: + + + +## 使用之前 + +使用 Vant Weapp 前,请确保你已经学习过微信官方的 [小程序简易教程](https://mp.weixin.qq.com/debug/wxadoc/dev/) 和 [自定义组件介绍](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/)。 + +## 安装 + +### 方式一. 通过 npm 安装 (推荐) + +小程序已经支持使用 npm 安装第三方包,详见 [npm 支持](https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html?search-key=npm) + +```bash +# npm +npm i vant-weapp -S --production + +# yarn +yarn add vant-weapp --production +``` + +### 方式二. 下载代码 + +直接通过 git 下载 Vant Weapp 源代码,并将`dist`目录拷贝到自己的项目中 +```bash +git clone https://github.com/youzan/vant-weapp.git +``` + +## 使用组件 + +以按钮组件为例,只需要在 json 文件中引入按钮对应的自定义组件即可 + +```json +{ + "usingComponents": { + "van-button": "/path/to/vant-weapp/dist/button/index" + } +} +``` + +接着就可以在 wxml 中直接使用组件 + +```html +按钮 +``` + +## 在开发者工具中预览 + +```bash +# 安装项目依赖 +npm install + +# 执行组件编译 +npm run dev +``` + +打开[微信开发者工具](https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/download.html),把`vant-weapp/example`目录添加进去就可以预览示例了。 + +## 基础库版本 + +Vant Weapp 最低支持到小程序基础库 1.9.9 版本 + +## 微信讨论群 + +欢迎大家在微信上联系我们,添加下方微信并注明『交流 vant-weapp』即可 + + + +## 加入我们 + +**有赞前端团队**是由一群年轻、皮实、对技术饱含热情的小伙伴组成的,目前共有 100 多名前端工程师,分布在业务中台、电商、零售、美业、资产、赋能等业务线。 + +我们热爱分享和开源,崇尚用工程师的方式解决问题,因此造了很多工具来解决我们遇到的问题,目前我们维护的开源产品有: + + + +我们正在寻找更多优秀的小伙伴,一起拓展前端技术的边界,期待你的加入! + +- 职位详情(Base: 杭州/深圳) +- 团队博客 +- 开源项目 + +## 链接 + +* [更新日志](https://github.com/youzan/vant-weapp/blob/dev/docs/markdown/changelog.md) +* [意见反馈](https://github.com/youzan/vant-weapp/issues) +* [加入我们](https://job.youzan.com) +* [Vant: 移动端 Vue UI](https://github.com/youzan/vant) +* [React: PC 端 React UI](https://www.youzanyun.com/zanui/zent) + +## 开源协议 + +本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89)协议,请自由地享受和参与开源。 + +[vant-weapp]: https://github.com/youzan/vant-weapp +[issue]: https://github.com/youzan/vant-weapp/issues/new +[PR]: https://github.com/youzan/vant-weapp/compare +[MIT]: http://opensource.org/licenses/MIT +[小程序简易教程]: https://mp.weixin.qq.com/debug/wxadoc/dev/ +[小程序框架介绍]: https://mp.weixin.qq.com/debug/wxadoc/dev/framework/MINA.html +[微信开发者工具]: https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/download.html diff --git a/node_modules/vant-weapp/dist/action-sheet/index.d.ts b/node_modules/vant-weapp/dist/action-sheet/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/action-sheet/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/action-sheet/index.js b/node_modules/vant-weapp/dist/action-sheet/index.js new file mode 100644 index 0000000..225b463 --- /dev/null +++ b/node_modules/vant-weapp/dist/action-sheet/index.js @@ -0,0 +1,41 @@ +import { VantComponent } from '../common/component'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + mixins: [safeArea()], + props: { + show: Boolean, + title: String, + cancelText: String, + zIndex: { + type: Number, + value: 100 + }, + actions: { + type: Array, + value: [] + }, + overlay: { + type: Boolean, + value: true + }, + closeOnClickOverlay: { + type: Boolean, + value: true + } + }, + methods: { + onSelect(event) { + const { index } = event.currentTarget.dataset; + const item = this.data.actions[index]; + if (item && !item.disabled && !item.loading) { + this.$emit('select', item); + } + }, + onCancel() { + this.$emit('cancel'); + }, + onClose() { + this.$emit('close'); + } + } +}); diff --git a/node_modules/vant-weapp/dist/action-sheet/index.json b/node_modules/vant-weapp/dist/action-sheet/index.json new file mode 100644 index 0000000..19bf989 --- /dev/null +++ b/node_modules/vant-weapp/dist/action-sheet/index.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-popup": "../popup/index", + "van-loading": "../loading/index" + } +} diff --git a/node_modules/vant-weapp/dist/action-sheet/index.wxml b/node_modules/vant-weapp/dist/action-sheet/index.wxml new file mode 100644 index 0000000..5f6d33f --- /dev/null +++ b/node_modules/vant-weapp/dist/action-sheet/index.wxml @@ -0,0 +1,49 @@ + + + + + {{ title }} + + + + + + + + + {{ cancelText }} + + diff --git a/node_modules/vant-weapp/dist/action-sheet/index.wxss b/node_modules/vant-weapp/dist/action-sheet/index.wxss new file mode 100644 index 0000000..a3087b1 --- /dev/null +++ b/node_modules/vant-weapp/dist/action-sheet/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;color:#333}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;font-size:16px;line-height:50px;text-align:center;background-color:#fff}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5}.van-action-sheet__cancel{height:60px}.van-action-sheet__cancel:before{display:block;height:10px;background-color:#f8f8f8;content:" "}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff}.van-action-sheet__subname{margin-left:5px;font-size:12px;color:#7d7e80}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{position:absolute!important;top:0;right:0;padding:0 15px;font-size:18px!important;line-height:inherit!important;color:#999} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/area/index.d.ts b/node_modules/vant-weapp/dist/area/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/area/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/area/index.js b/node_modules/vant-weapp/dist/area/index.js new file mode 100644 index 0000000..17392c9 --- /dev/null +++ b/node_modules/vant-weapp/dist/area/index.js @@ -0,0 +1,212 @@ +import { VantComponent } from '../common/component'; +import { pickerProps } from '../picker/shared'; +const COLUMNSPLACEHOLDERCODE = '000000'; +VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: Object.assign({}, pickerProps, { value: String, areaList: { + type: Object, + value: {} + }, columnsNum: { + type: [String, Number], + value: 3 + }, columnsPlaceholder: { + type: Array, + observer(val) { + this.setData({ + typeToColumnsPlaceholder: { + province: val[0] || '', + city: val[1] || '', + county: val[2] || '', + } + }); + } + } }), + data: { + columns: [{ values: [] }, { values: [] }, { values: [] }], + displayColumns: [{ values: [] }, { values: [] }, { values: [] }], + typeToColumnsPlaceholder: {} + }, + watch: { + value(value) { + this.code = value; + this.setValues(); + }, + areaList: 'setValues', + columnsNum(value) { + this.set({ + displayColumns: this.data.columns.slice(0, +value) + }); + } + }, + mounted() { + setTimeout(() => { + this.setValues(); + }, 0); + }, + methods: { + getPicker() { + if (this.picker == null) { + this.picker = this.selectComponent('.van-area__picker'); + } + return this.picker; + }, + onCancel(event) { + this.emit('cancel', event.detail); + }, + onConfirm(event) { + const { index } = event.detail; + let { value } = event.detail; + value = this.parseOutputValues(value); + this.emit('confirm', { value, index }); + }, + emit(type, detail) { + detail.values = detail.value; + delete detail.value; + this.$emit(type, detail); + }, + // parse output columns data + parseOutputValues(values) { + const { columnsPlaceholder } = this.data; + return values.map((value, index) => { + // save undefined value + if (!value) + return value; + value = JSON.parse(JSON.stringify(value)); + if (!value.code || value.name === columnsPlaceholder[index]) { + value.code = ''; + value.name = ''; + } + return value; + }); + }, + onChange(event) { + const { index, picker, value } = event.detail; + this.code = value[index].code; + let getValues = picker.getValues(); + getValues = this.parseOutputValues(getValues); + this.setValues().then(() => { + this.$emit('change', { + picker, + values: getValues, + index + }); + }); + }, + getConfig(type) { + const { areaList } = this.data; + return (areaList && areaList[`${type}_list`]) || {}; + }, + getList(type, code) { + const { typeToColumnsPlaceholder } = this.data; + let result = []; + if (type !== 'province' && !code) { + return result; + } + const list = this.getConfig(type); + result = Object.keys(list).map(code => ({ + code, + name: list[code] + })); + if (code) { + // oversea code + if (code[0] === '9' && type === 'city') { + code = '9'; + } + result = result.filter(item => item.code.indexOf(code) === 0); + } + if (typeToColumnsPlaceholder[type] && result.length) { + // set columns placeholder + const codeFill = type === 'province' ? '' : type === 'city' ? COLUMNSPLACEHOLDERCODE.slice(2, 4) : COLUMNSPLACEHOLDERCODE.slice(4, 6); + result.unshift({ + code: `${code}${codeFill}`, + name: typeToColumnsPlaceholder[type] + }); + } + return result; + }, + getIndex(type, code) { + let compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6; + const list = this.getList(type, code.slice(0, compareNum - 2)); + // oversea code + if (code[0] === '9' && type === 'province') { + compareNum = 1; + } + code = code.slice(0, compareNum); + for (let i = 0; i < list.length; i++) { + if (list[i].code.slice(0, compareNum) === code) { + return i; + } + } + return 0; + }, + setValues() { + const county = this.getConfig('county'); + let { code } = this; + if (!code) { + if (this.data.columnsPlaceholder.length) { + code = COLUMNSPLACEHOLDERCODE; + } + else if (Object.keys(county)[0]) { + code = Object.keys(county)[0]; + } + else { + code = ''; + } + } + const province = this.getList('province'); + const city = this.getList('city', code.slice(0, 2)); + const picker = this.getPicker(); + if (!picker) { + return; + } + const stack = []; + stack.push(picker.setColumnValues(0, province, false)); + stack.push(picker.setColumnValues(1, city, false)); + if (city.length && code.slice(2, 4) === '00') { + [{ code }] = city; + } + stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false)); + return Promise.all(stack) + .catch(() => { }) + .then(() => picker.setIndexes([ + this.getIndex('province', code), + this.getIndex('city', code), + this.getIndex('county', code) + ])) + .catch(() => { }); + }, + getValues() { + const picker = this.getPicker(); + return picker ? picker.getValues().filter(value => !!value) : []; + }, + getDetail() { + const values = this.getValues(); + const area = { + code: '', + country: '', + province: '', + city: '', + county: '' + }; + if (!values.length) { + return area; + } + const names = values.map((item) => item.name); + area.code = values[values.length - 1].code; + if (area.code[0] === '9') { + area.country = names[1] || ''; + area.province = names[2] || ''; + } + else { + area.province = names[0] || ''; + area.city = names[1] || ''; + area.county = names[2] || ''; + } + return area; + }, + reset() { + this.code = ''; + return this.setValues(); + } + } +}); diff --git a/node_modules/vant-weapp/dist/area/index.json b/node_modules/vant-weapp/dist/area/index.json new file mode 100644 index 0000000..a778e91 --- /dev/null +++ b/node_modules/vant-weapp/dist/area/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-picker": "../picker/index" + } +} diff --git a/node_modules/vant-weapp/dist/area/index.wxml b/node_modules/vant-weapp/dist/area/index.wxml new file mode 100644 index 0000000..6075794 --- /dev/null +++ b/node_modules/vant-weapp/dist/area/index.wxml @@ -0,0 +1,18 @@ + diff --git a/node_modules/vant-weapp/dist/area/index.wxss b/node_modules/vant-weapp/dist/area/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/node_modules/vant-weapp/dist/area/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/badge-group/index.d.ts b/node_modules/vant-weapp/dist/badge-group/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/badge-group/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/badge-group/index.js b/node_modules/vant-weapp/dist/badge-group/index.js new file mode 100644 index 0000000..7629233 --- /dev/null +++ b/node_modules/vant-weapp/dist/badge-group/index.js @@ -0,0 +1,43 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + relation: { + name: 'badge', + type: 'descendant', + linked(target) { + this.badges.push(target); + this.setActive(this.data.active); + }, + unlinked(target) { + this.badges = this.badges.filter(item => item !== target); + this.setActive(this.data.active); + } + }, + props: { + active: { + type: Number, + value: 0, + observer: 'setActive' + } + }, + beforeCreate() { + this.badges = []; + this.currentActive = -1; + }, + methods: { + setActive(active) { + const { badges, currentActive } = this; + if (!badges.length) { + return Promise.resolve(); + } + this.currentActive = active; + const stack = []; + if (currentActive !== active && badges[currentActive]) { + stack.push(badges[currentActive].setActive(false)); + } + if (badges[active]) { + stack.push(badges[active].setActive(true)); + } + return Promise.all(stack); + } + } +}); diff --git a/node_modules/vant-weapp/dist/badge-group/index.json b/node_modules/vant-weapp/dist/badge-group/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/dist/badge-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/dist/badge-group/index.wxml b/node_modules/vant-weapp/dist/badge-group/index.wxml new file mode 100644 index 0000000..04a0c8f --- /dev/null +++ b/node_modules/vant-weapp/dist/badge-group/index.wxml @@ -0,0 +1,3 @@ + + + diff --git a/node_modules/vant-weapp/dist/badge-group/index.wxss b/node_modules/vant-weapp/dist/badge-group/index.wxss new file mode 100644 index 0000000..5149eab --- /dev/null +++ b/node_modules/vant-weapp/dist/badge-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-badge-group{width:85px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/badge/index.d.ts b/node_modules/vant-weapp/dist/badge/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/badge/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/badge/index.js b/node_modules/vant-weapp/dist/badge/index.js new file mode 100644 index 0000000..a7c1f4e --- /dev/null +++ b/node_modules/vant-weapp/dist/badge/index.js @@ -0,0 +1,30 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + relation: { + type: 'ancestor', + name: 'badge-group', + linked(target) { + this.parent = target; + } + }, + props: { + info: null, + title: String + }, + methods: { + onClick() { + const { parent } = this; + if (!parent) { + return; + } + const index = parent.badges.indexOf(this); + parent.setActive(index).then(() => { + this.$emit('click', index); + parent.$emit('change', index); + }); + }, + setActive(active) { + return this.set({ active }); + } + } +}); diff --git a/node_modules/vant-weapp/dist/badge/index.json b/node_modules/vant-weapp/dist/badge/index.json new file mode 100644 index 0000000..bf0ebe0 --- /dev/null +++ b/node_modules/vant-weapp/dist/badge/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-info": "../info/index" + } +} diff --git a/node_modules/vant-weapp/dist/badge/index.wxml b/node_modules/vant-weapp/dist/badge/index.wxml new file mode 100644 index 0000000..3563bdb --- /dev/null +++ b/node_modules/vant-weapp/dist/badge/index.wxml @@ -0,0 +1,17 @@ + + + + + + {{ title }} + + diff --git a/node_modules/vant-weapp/dist/badge/index.wxss b/node_modules/vant-weapp/dist/badge/index.wxss new file mode 100644 index 0000000..73cb2c1 --- /dev/null +++ b/node_modules/vant-weapp/dist/badge/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-badge{display:block;padding:20px 12px 20px 9px;overflow:hidden;font-size:14px;line-height:1.4;color:#7d7e80;word-break:break-all;background-color:#f8f8f8;border-left:3px solid transparent;box-sizing:border-box;-webkit-user-select:none;user-select:none}.van-badge--hover{background-color:#f2f3f5}.van-badge:after{border-bottom-width:1px}.van-badge--active{font-weight:700;color:#333;border-color:#f44}.van-badge--active:after{border-right-width:1px}.van-badge--active,.van-badge--active.van-badge--hover{background-color:#fff}.van-badge__text{position:relative} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/button/index.d.ts b/node_modules/vant-weapp/dist/button/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/button/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/button/index.js b/node_modules/vant-weapp/dist/button/index.js new file mode 100644 index 0000000..c7deb50 --- /dev/null +++ b/node_modules/vant-weapp/dist/button/index.js @@ -0,0 +1,38 @@ +import { VantComponent } from '../common/component'; +import { button } from '../mixins/button'; +import { openType } from '../mixins/open-type'; +VantComponent({ + mixins: [button, openType], + classes: ['hover-class', 'loading-class'], + props: { + icon: String, + color: String, + plain: Boolean, + block: Boolean, + round: Boolean, + square: Boolean, + loading: Boolean, + hairline: Boolean, + disabled: Boolean, + loadingText: String, + type: { + type: String, + value: 'default' + }, + size: { + type: String, + value: 'normal' + }, + loadingSize: { + type: String, + value: '20px' + } + }, + methods: { + onClick() { + if (!this.data.disabled && !this.data.loading) { + this.$emit('click'); + } + } + } +}); diff --git a/node_modules/vant-weapp/dist/button/index.json b/node_modules/vant-weapp/dist/button/index.json new file mode 100644 index 0000000..e00a588 --- /dev/null +++ b/node_modules/vant-weapp/dist/button/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-loading": "../loading/index" + } +} diff --git a/node_modules/vant-weapp/dist/button/index.wxml b/node_modules/vant-weapp/dist/button/index.wxml new file mode 100644 index 0000000..dec0e7d --- /dev/null +++ b/node_modules/vant-weapp/dist/button/index.wxml @@ -0,0 +1,51 @@ + + + diff --git a/node_modules/vant-weapp/dist/button/index.wxss b/node_modules/vant-weapp/dist/button/index.wxss new file mode 100644 index 0000000..72a10e7 --- /dev/null +++ b/node_modules/vant-weapp/dist/button/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-button{position:relative;display:inline-block;height:44px;padding:0;font-size:16px;line-height:42px;text-align:center;vertical-align:middle;box-sizing:border-box;border-radius:2px;-webkit-appearance:none;-webkit-text-size-adjust:100%}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:" ";opacity:0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#333;background-color:#fff;border:1px solid #eee}.van-button--primary{color:#fff;background-color:#07c160;border:1px solid #07c160}.van-button--info{color:#fff;background-color:#1989fa;border:1px solid #1989fa}.van-button--danger{color:#fff;background-color:#f44;border:1px solid #f44}.van-button--warning{color:#fff;background-color:#ff976a;border:1px solid #ff976a}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#07c160}.van-button--plain.van-button--info{color:#1989fa}.van-button--plain.van-button--danger{color:#f44}.van-button--plain.van-button--warning{color:#ff976a}.van-button--large{width:100%;height:50px;line-height:48px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:30px;min-width:60px;padding:0 8px;font-size:12px;line-height:28px}.van-button--mini{display:inline-block;width:50px;height:22px;font-size:10px;line-height:20px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:block;width:100%}.van-button--round{border-radius:10em}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5}.van-button__text{display:inline}.van-button__loading-text{margin-left:5px;display:inline-block;vertical-align:middle}.van-button__icon{min-width:1em;line-height:inherit!important;vertical-align:top}.van-button__icon+.van-button__text:not(:empty){display:inline-block;margin-left:5px;vertical-align:top}.van-button--hairline{border-width:0;padding-top:1px}.van-button--hairline:after{border-width:1px;border-color:inherit;border-radius:4px}.van-button--hairline.van-button--round:after{border-radius:10em}.van-button--hairline.van-button--square:after{border-radius:0} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/card/index.d.ts b/node_modules/vant-weapp/dist/card/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/card/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/card/index.js b/node_modules/vant-weapp/dist/card/index.js new file mode 100644 index 0000000..ae64151 --- /dev/null +++ b/node_modules/vant-weapp/dist/card/index.js @@ -0,0 +1,38 @@ +import { link } from '../mixins/link'; +import { VantComponent } from '../common/component'; +VantComponent({ + classes: [ + 'num-class', + 'desc-class', + 'thumb-class', + 'title-class', + 'price-class', + 'origin-price-class', + ], + mixins: [link], + props: { + tag: String, + num: String, + desc: String, + thumb: String, + title: String, + price: String, + centered: Boolean, + lazyLoad: Boolean, + thumbLink: String, + originPrice: String, + thumbMode: { + type: String, + value: 'aspectFit' + }, + currency: { + type: String, + value: '¥' + } + }, + methods: { + onClickThumb() { + this.jumpLink('thumbLink'); + } + } +}); diff --git a/node_modules/vant-weapp/dist/card/index.json b/node_modules/vant-weapp/dist/card/index.json new file mode 100644 index 0000000..e917407 --- /dev/null +++ b/node_modules/vant-weapp/dist/card/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-tag": "../tag/index" + } +} diff --git a/node_modules/vant-weapp/dist/card/index.wxml b/node_modules/vant-weapp/dist/card/index.wxml new file mode 100644 index 0000000..a17b1d6 --- /dev/null +++ b/node_modules/vant-weapp/dist/card/index.wxml @@ -0,0 +1,45 @@ + + + + + + + + + {{ tag }} + + + + + {{ title }} + + + {{ desc }} + + + + + + {{ currency }} {{ price }} + {{ currency }} {{ originPrice }} + x {{ num }} + + + + + + + + + diff --git a/node_modules/vant-weapp/dist/card/index.wxss b/node_modules/vant-weapp/dist/card/index.wxss new file mode 100644 index 0000000..6a74925 --- /dev/null +++ b/node_modules/vant-weapp/dist/card/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-card{position:relative;padding:5px 15px;font-size:12px;color:#333;background-color:#fafafa;box-sizing:border-box}.van-card__header{display:-webkit-flex;display:flex}.van-card__header--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{position:relative;width:90px;height:90px;margin-right:10px;-webkit-flex:none;flex:none}.van-card__thumb:empty{display:none}.van-card__img{width:100%;height:100%}.van-card__content{position:relative;min-width:0;-webkit-flex:1;flex:1}.van-card__desc,.van-card__title{word-break:break-all}.van-card__title{font-weight:700;line-height:16px}.van-card__desc{color:#7d7e80}.van-card__bottom,.van-card__desc{line-height:20px}.van-card__price{display:inline-block;font-weight:700;color:#f44}.van-card__origin-price{display:inline-block;margin-left:5px;font-size:10px;color:#7d7e80;text-decoration:line-through}.van-card__num{float:right}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{width:100%;text-align:right;-webkit-flex:none;flex:none} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/cell-group/index.d.ts b/node_modules/vant-weapp/dist/cell-group/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/cell-group/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/cell-group/index.js b/node_modules/vant-weapp/dist/cell-group/index.js new file mode 100644 index 0000000..3611e09 --- /dev/null +++ b/node_modules/vant-weapp/dist/cell-group/index.js @@ -0,0 +1,10 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + title: String, + border: { + type: Boolean, + value: true + } + } +}); diff --git a/node_modules/vant-weapp/dist/cell-group/index.json b/node_modules/vant-weapp/dist/cell-group/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/dist/cell-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/cell-group/index.wxml b/node_modules/vant-weapp/dist/cell-group/index.wxml new file mode 100644 index 0000000..6e0b471 --- /dev/null +++ b/node_modules/vant-weapp/dist/cell-group/index.wxml @@ -0,0 +1,9 @@ + + {{ title }} + + + + diff --git a/node_modules/vant-weapp/dist/cell-group/index.wxss b/node_modules/vant-weapp/dist/cell-group/index.wxss new file mode 100644 index 0000000..e0fc603 --- /dev/null +++ b/node_modules/vant-weapp/dist/cell-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-cell-group__title{font-size:14px;padding:15px 15px 5px;color:#999;line-height:16px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/cell/index.d.ts b/node_modules/vant-weapp/dist/cell/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/cell/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/cell/index.js b/node_modules/vant-weapp/dist/cell/index.js new file mode 100644 index 0000000..11cd042 --- /dev/null +++ b/node_modules/vant-weapp/dist/cell/index.js @@ -0,0 +1,37 @@ +import { link } from '../mixins/link'; +import { VantComponent } from '../common/component'; +VantComponent({ + classes: [ + 'title-class', + 'label-class', + 'value-class', + 'right-icon-class', + 'hover-class' + ], + mixins: [link], + props: { + title: null, + value: null, + icon: String, + size: String, + label: String, + center: Boolean, + isLink: Boolean, + required: Boolean, + clickable: Boolean, + titleWidth: String, + customStyle: String, + arrowDirection: String, + useLabelSlot: Boolean, + border: { + type: Boolean, + value: true + } + }, + methods: { + onClick(event) { + this.$emit('click', event.detail); + this.jumpLink(); + } + } +}); diff --git a/node_modules/vant-weapp/dist/cell/index.json b/node_modules/vant-weapp/dist/cell/index.json new file mode 100644 index 0000000..a9ab393 --- /dev/null +++ b/node_modules/vant-weapp/dist/cell/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/cell/index.wxml b/node_modules/vant-weapp/dist/cell/index.wxml new file mode 100644 index 0000000..afaaaf8 --- /dev/null +++ b/node_modules/vant-weapp/dist/cell/index.wxml @@ -0,0 +1,45 @@ + + + + + + + + {{ title }} + + + + + {{ label }} + + + + + {{ value }} + + + + + + + + diff --git a/node_modules/vant-weapp/dist/cell/index.wxss b/node_modules/vant-weapp/dist/cell/index.wxss new file mode 100644 index 0000000..a476af1 --- /dev/null +++ b/node_modules/vant-weapp/dist/cell/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;width:100%;padding:10px 15px;font-size:14px;line-height:24px;color:#333;background-color:#fff;box-sizing:border-box}.van-cell:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:auto;left:15px;right:0;bottom:0;-webkit-transform:scaleY(.5);transform:scaleY(.5);border-bottom:1px solid #eee}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff}.van-cell__label{margin-top:3px;font-size:12px;line-height:18px;color:#999}.van-cell__value{overflow:hidden;color:#999;text-align:right;vertical-align:middle}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;height:24px;font-size:16px;-webkit-align-items:center;align-items:center}.van-cell__left-icon-wrap{margin-right:5px}.van-cell__right-icon-wrap{margin-left:5px;color:#999}.van-cell__left-icon{line-height:24px;vertical-align:middle}.van-cell__right-icon{line-height:24px}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;left:7px;font-size:14px;color:#f44;content:"*"}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-bottom:12px}.van-cell--large .van-cell__title{font-size:16px}.van-cell--large .van-cell__label{font-size:14px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/checkbox-group/index.d.ts b/node_modules/vant-weapp/dist/checkbox-group/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/checkbox-group/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/checkbox-group/index.js b/node_modules/vant-weapp/dist/checkbox-group/index.js new file mode 100644 index 0000000..7dd8775 --- /dev/null +++ b/node_modules/vant-weapp/dist/checkbox-group/index.js @@ -0,0 +1,39 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + relation: { + name: 'checkbox', + type: 'descendant', + linked(target) { + this.children = this.children || []; + this.children.push(target); + this.updateChild(target); + }, + unlinked(target) { + this.children = this.children.filter((child) => child !== target); + } + }, + props: { + max: Number, + value: { + type: Array, + observer: 'updateChildren' + }, + disabled: { + type: Boolean, + observer: 'updateChildren' + } + }, + methods: { + updateChildren() { + (this.children || []).forEach((child) => this.updateChild(child)); + }, + updateChild(child) { + const { value, disabled } = this.data; + child.set({ + value: value.indexOf(child.data.name) !== -1, + disabled: disabled || child.data.disabled + }); + } + } +}); diff --git a/node_modules/vant-weapp/dist/checkbox-group/index.json b/node_modules/vant-weapp/dist/checkbox-group/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/dist/checkbox-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/dist/checkbox-group/index.wxml b/node_modules/vant-weapp/dist/checkbox-group/index.wxml new file mode 100644 index 0000000..4fa864c --- /dev/null +++ b/node_modules/vant-weapp/dist/checkbox-group/index.wxml @@ -0,0 +1 @@ + diff --git a/node_modules/vant-weapp/dist/checkbox-group/index.wxss b/node_modules/vant-weapp/dist/checkbox-group/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/node_modules/vant-weapp/dist/checkbox-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/checkbox/index.d.ts b/node_modules/vant-weapp/dist/checkbox/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/checkbox/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/checkbox/index.js b/node_modules/vant-weapp/dist/checkbox/index.js new file mode 100644 index 0000000..fdffbbd --- /dev/null +++ b/node_modules/vant-weapp/dist/checkbox/index.js @@ -0,0 +1,74 @@ +import { VantComponent } from '../common/component'; +function emit(target, value) { + target.$emit('input', value); + target.$emit('change', value); +} +VantComponent({ + field: true, + relation: { + name: 'checkbox-group', + type: 'ancestor', + linked(target) { + this.parent = target; + }, + unlinked() { + this.parent = null; + } + }, + classes: ['icon-class', 'label-class'], + props: { + value: Boolean, + disabled: Boolean, + useIconSlot: Boolean, + checkedColor: String, + labelPosition: String, + labelDisabled: Boolean, + shape: { + type: String, + value: 'round' + } + }, + methods: { + emitChange(value) { + if (this.parent) { + this.setParentValue(this.parent, value); + } + else { + emit(this, value); + } + }, + toggle() { + const { disabled, value } = this.data; + if (!disabled) { + this.emitChange(!value); + } + }, + onClickLabel() { + const { labelDisabled, disabled, value } = this.data; + if (!disabled && !labelDisabled) { + this.emitChange(!value); + } + }, + setParentValue(parent, value) { + const parentValue = parent.data.value.slice(); + const { name } = this.data; + const { max } = parent.data; + if (value) { + if (max && parentValue.length >= max) { + return; + } + if (parentValue.indexOf(name) === -1) { + parentValue.push(name); + emit(parent, parentValue); + } + } + else { + const index = parentValue.indexOf(name); + if (index !== -1) { + parentValue.splice(index, 1); + emit(parent, parentValue); + } + } + } + } +}); diff --git a/node_modules/vant-weapp/dist/checkbox/index.json b/node_modules/vant-weapp/dist/checkbox/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/node_modules/vant-weapp/dist/checkbox/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/dist/checkbox/index.wxml b/node_modules/vant-weapp/dist/checkbox/index.wxml new file mode 100644 index 0000000..1659ba4 --- /dev/null +++ b/node_modules/vant-weapp/dist/checkbox/index.wxml @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/node_modules/vant-weapp/dist/checkbox/index.wxss b/node_modules/vant-weapp/dist/checkbox/index.wxss new file mode 100644 index 0000000..f623e17 --- /dev/null +++ b/node_modules/vant-weapp/dist/checkbox/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-checkbox__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c9c9c9}.van-checkbox__label{margin-left:10px;color:#333;word-break:break-all}.van-checkbox__label--left{float:left;margin:0 10px 0 0}.van-checkbox__label--disabled{color:#c9c9c9}.van-checkbox__label:empty{margin:0} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/col/index.d.ts b/node_modules/vant-weapp/dist/col/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/col/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/col/index.js b/node_modules/vant-weapp/dist/col/index.js new file mode 100644 index 0000000..8976a5f --- /dev/null +++ b/node_modules/vant-weapp/dist/col/index.js @@ -0,0 +1,23 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + relation: { + name: 'row', + type: 'ancestor' + }, + props: { + span: Number, + offset: Number + }, + data: { + style: '' + }, + methods: { + setGutter(gutter) { + const padding = `${gutter / 2}px`; + const style = gutter ? `padding-left: ${padding}; padding-right: ${padding};` : ''; + if (style !== this.data.style) { + this.set({ style }); + } + } + } +}); diff --git a/node_modules/vant-weapp/dist/col/index.json b/node_modules/vant-weapp/dist/col/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/dist/col/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/dist/col/index.wxml b/node_modules/vant-weapp/dist/col/index.wxml new file mode 100644 index 0000000..a759aac --- /dev/null +++ b/node_modules/vant-weapp/dist/col/index.wxml @@ -0,0 +1,8 @@ + + + + + diff --git a/node_modules/vant-weapp/dist/col/index.wxss b/node_modules/vant-weapp/dist/col/index.wxss new file mode 100644 index 0000000..44c896a --- /dev/null +++ b/node_modules/vant-weapp/dist/col/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-col{float:left;box-sizing:border-box}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/collapse-item/index.d.ts b/node_modules/vant-weapp/dist/collapse-item/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/collapse-item/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/collapse-item/index.js b/node_modules/vant-weapp/dist/collapse-item/index.js new file mode 100644 index 0000000..596350e --- /dev/null +++ b/node_modules/vant-weapp/dist/collapse-item/index.js @@ -0,0 +1,96 @@ +import { VantComponent } from '../common/component'; +const nextTick = () => new Promise(resolve => setTimeout(resolve, 20)); +VantComponent({ + classes: ['title-class', 'content-class'], + relation: { + name: 'collapse', + type: 'ancestor', + linked(parent) { + this.parent = parent; + } + }, + props: { + name: null, + title: null, + value: null, + icon: String, + label: String, + disabled: Boolean, + clickable: Boolean, + border: { + type: Boolean, + value: true + }, + isLink: { + type: Boolean, + value: true + } + }, + data: { + contentHeight: 0, + expanded: false, + transition: false + }, + mounted() { + this.updateExpanded() + .then(nextTick) + .then(() => { + const data = { transition: true }; + if (this.data.expanded) { + data.contentHeight = 'auto'; + } + this.set(data); + }); + }, + methods: { + updateExpanded() { + if (!this.parent) { + return Promise.resolve(); + } + const { value, accordion } = this.parent.data; + const { children = [] } = this.parent; + const { name } = this.data; + const index = children.indexOf(this); + const currentName = name == null ? index : name; + const expanded = accordion + ? value === currentName + : (value || []).some((name) => name === currentName); + const stack = []; + if (expanded !== this.data.expanded) { + stack.push(this.updateStyle(expanded)); + } + stack.push(this.set({ index, expanded })); + return Promise.all(stack); + }, + updateStyle(expanded) { + return this.getRect('.van-collapse-item__content') + .then((rect) => rect.height) + .then((height) => { + if (expanded) { + return this.set({ + contentHeight: height ? `${height}px` : 'auto' + }); + } + return this.set({ contentHeight: `${height}px` }) + .then(nextTick) + .then(() => this.set({ contentHeight: 0 })); + }); + }, + onClick() { + if (this.data.disabled) { + return; + } + const { name, expanded } = this.data; + const index = this.parent.children.indexOf(this); + const currentName = name == null ? index : name; + this.parent.switch(currentName, !expanded); + }, + onTransitionEnd() { + if (this.data.expanded) { + this.set({ + contentHeight: 'auto' + }); + } + } + } +}); diff --git a/node_modules/vant-weapp/dist/collapse-item/index.json b/node_modules/vant-weapp/dist/collapse-item/index.json new file mode 100644 index 0000000..0e5425c --- /dev/null +++ b/node_modules/vant-weapp/dist/collapse-item/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index" + } +} diff --git a/node_modules/vant-weapp/dist/collapse-item/index.wxml b/node_modules/vant-weapp/dist/collapse-item/index.wxml new file mode 100644 index 0000000..91afbc2 --- /dev/null +++ b/node_modules/vant-weapp/dist/collapse-item/index.wxml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + diff --git a/node_modules/vant-weapp/dist/collapse-item/index.wxss b/node_modules/vant-weapp/dist/collapse-item/index.wxss new file mode 100644 index 0000000..2ed46f0 --- /dev/null +++ b/node_modules/vant-weapp/dist/collapse-item/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:.3s}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c9c9c9!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__wrapper--transition{transition:height .3s ease-in-out}.van-collapse-item__content{padding:15px;font-size:13px;line-height:1.5;color:#999;background-color:#fff} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/collapse/index.d.ts b/node_modules/vant-weapp/dist/collapse/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/collapse/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/collapse/index.js b/node_modules/vant-weapp/dist/collapse/index.js new file mode 100644 index 0000000..c6efb6a --- /dev/null +++ b/node_modules/vant-weapp/dist/collapse/index.js @@ -0,0 +1,50 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + relation: { + name: 'collapse-item', + type: 'descendant', + linked(child) { + this.children.push(child); + }, + unlinked(child) { + this.children = this.children.filter((item) => item !== child); + } + }, + props: { + value: { + type: null, + observer: 'updateExpanded' + }, + accordion: { + type: Boolean, + observer: 'updateExpanded' + }, + border: { + type: Boolean, + value: true + } + }, + beforeCreate() { + this.children = []; + }, + methods: { + updateExpanded() { + this.children.forEach((child) => { + child.updateExpanded(); + }); + }, + switch(name, expanded) { + const { accordion, value } = this.data; + if (!accordion) { + name = expanded + ? (value || []).concat(name) + : (value || []).filter((activeName) => activeName !== name); + } + else { + name = expanded ? name : ''; + } + this.$emit('change', name); + this.$emit('input', name); + } + } +}); diff --git a/node_modules/vant-weapp/dist/collapse/index.json b/node_modules/vant-weapp/dist/collapse/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/dist/collapse/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/dist/collapse/index.wxml b/node_modules/vant-weapp/dist/collapse/index.wxml new file mode 100644 index 0000000..fd4e171 --- /dev/null +++ b/node_modules/vant-weapp/dist/collapse/index.wxml @@ -0,0 +1,3 @@ + + + diff --git a/node_modules/vant-weapp/dist/collapse/index.wxss b/node_modules/vant-weapp/dist/collapse/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/node_modules/vant-weapp/dist/collapse/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/common/color.d.ts b/node_modules/vant-weapp/dist/common/color.d.ts new file mode 100644 index 0000000..3f46222 --- /dev/null +++ b/node_modules/vant-weapp/dist/common/color.d.ts @@ -0,0 +1,4 @@ +export declare const RED = "#f44"; +export declare const BLUE = "#1989fa"; +export declare const GREEN = "#07c160"; +export declare const ORANGE = "#ff976a"; diff --git a/node_modules/vant-weapp/dist/common/color.js b/node_modules/vant-weapp/dist/common/color.js new file mode 100644 index 0000000..c850d2a --- /dev/null +++ b/node_modules/vant-weapp/dist/common/color.js @@ -0,0 +1,4 @@ +export const RED = '#f44'; +export const BLUE = '#1989fa'; +export const GREEN = '#07c160'; +export const ORANGE = '#ff976a'; diff --git a/node_modules/vant-weapp/dist/common/component.d.ts b/node_modules/vant-weapp/dist/common/component.d.ts new file mode 100644 index 0000000..9ba8a3b --- /dev/null +++ b/node_modules/vant-weapp/dist/common/component.d.ts @@ -0,0 +1,3 @@ +import { VantComponentOptions, CombinedComponentInstance } from '../definitions/index'; +declare function VantComponent(vantOptions?: VantComponentOptions>): void; +export { VantComponent }; diff --git a/node_modules/vant-weapp/dist/common/component.js b/node_modules/vant-weapp/dist/common/component.js new file mode 100644 index 0000000..63ef1a9 --- /dev/null +++ b/node_modules/vant-weapp/dist/common/component.js @@ -0,0 +1,48 @@ +import { basic } from '../mixins/basic'; +import { observe } from '../mixins/observer/index'; +function mapKeys(source, target, map) { + Object.keys(map).forEach(key => { + if (source[key]) { + target[map[key]] = source[key]; + } + }); +} +function VantComponent(vantOptions = {}) { + const options = {}; + mapKeys(vantOptions, options, { + data: 'data', + props: 'properties', + mixins: 'behaviors', + methods: 'methods', + beforeCreate: 'created', + created: 'attached', + mounted: 'ready', + relations: 'relations', + destroyed: 'detached', + classes: 'externalClasses' + }); + const { relation } = vantOptions; + if (relation) { + options.relations = Object.assign(options.relations || {}, { + [`../${relation.name}/index`]: relation + }); + } + // add default externalClasses + options.externalClasses = options.externalClasses || []; + options.externalClasses.push('custom-class'); + // add default behaviors + options.behaviors = options.behaviors || []; + options.behaviors.push(basic); + // map field to form-field behavior + if (vantOptions.field) { + options.behaviors.push('wx://form-field'); + } + // add default options + options.options = { + multipleSlots: true, + addGlobalClass: true + }; + observe(vantOptions, options); + Component(options); +} +export { VantComponent }; diff --git a/node_modules/vant-weapp/dist/common/index.wxss b/node_modules/vant-weapp/dist/common/index.wxss new file mode 100644 index 0000000..1b5b4ee --- /dev/null +++ b/node_modules/vant-weapp/dist/common/index.wxss @@ -0,0 +1 @@ +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{content:"";display:table;clear:both}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/common/style/clearfix.wxss b/node_modules/vant-weapp/dist/common/style/clearfix.wxss new file mode 100644 index 0000000..8d6328c --- /dev/null +++ b/node_modules/vant-weapp/dist/common/style/clearfix.wxss @@ -0,0 +1 @@ +.van-clearfix:after{content:"";display:table;clear:both} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/common/style/ellipsis.wxss b/node_modules/vant-weapp/dist/common/style/ellipsis.wxss new file mode 100644 index 0000000..a829a98 --- /dev/null +++ b/node_modules/vant-weapp/dist/common/style/ellipsis.wxss @@ -0,0 +1 @@ +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/common/style/hairline.wxss b/node_modules/vant-weapp/dist/common/style/hairline.wxss new file mode 100644 index 0000000..53508ad --- /dev/null +++ b/node_modules/vant-weapp/dist/common/style/hairline.wxss @@ -0,0 +1 @@ +.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/common/style/mixins/clearfix.wxss b/node_modules/vant-weapp/dist/common/style/mixins/clearfix.wxss new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/vant-weapp/dist/common/style/mixins/ellipsis.wxss b/node_modules/vant-weapp/dist/common/style/mixins/ellipsis.wxss new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/vant-weapp/dist/common/style/mixins/hairline.wxss b/node_modules/vant-weapp/dist/common/style/mixins/hairline.wxss new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/vant-weapp/dist/common/style/var.wxss b/node_modules/vant-weapp/dist/common/style/var.wxss new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/vant-weapp/dist/common/utils.d.ts b/node_modules/vant-weapp/dist/common/utils.d.ts new file mode 100644 index 0000000..dc55bd7 --- /dev/null +++ b/node_modules/vant-weapp/dist/common/utils.d.ts @@ -0,0 +1,7 @@ +/// +export declare function isDef(value: any): boolean; +export declare function isObj(x: any): boolean; +export declare function isNumber(value: any): boolean; +export declare function range(num: number, min: number, max: number): number; +export declare function nextTick(fn: Function): void; +export declare function getSystemInfoSync(): WechatMiniprogram.GetSystemInfoSuccessCallbackResult; diff --git a/node_modules/vant-weapp/dist/common/utils.js b/node_modules/vant-weapp/dist/common/utils.js new file mode 100644 index 0000000..213c91a --- /dev/null +++ b/node_modules/vant-weapp/dist/common/utils.js @@ -0,0 +1,25 @@ +export function isDef(value) { + return value !== undefined && value !== null; +} +export function isObj(x) { + const type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} +export function isNumber(value) { + return /^\d+$/.test(value); +} +export function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} +export function nextTick(fn) { + setTimeout(() => { + fn(); + }, 1000 / 30); +} +let systemInfo = null; +export function getSystemInfoSync() { + if (systemInfo == null) { + systemInfo = wx.getSystemInfoSync(); + } + return systemInfo; +} diff --git a/node_modules/vant-weapp/dist/datetime-picker/index.d.ts b/node_modules/vant-weapp/dist/datetime-picker/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/datetime-picker/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/datetime-picker/index.js b/node_modules/vant-weapp/dist/datetime-picker/index.js new file mode 100644 index 0000000..e615f1b --- /dev/null +++ b/node_modules/vant-weapp/dist/datetime-picker/index.js @@ -0,0 +1,287 @@ +import { VantComponent } from '../common/component'; +import { isDef } from '../common/utils'; +import { pickerProps } from '../picker/shared'; +const currentYear = new Date().getFullYear(); +function isValidDate(date) { + return isDef(date) && !isNaN(new Date(date).getTime()); +} +function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} +function padZero(val) { + return `00${val}`.slice(-2); +} +function times(n, iteratee) { + let index = -1; + const result = Array(n < 0 ? 0 : n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} +function getTrueValue(formattedValue) { + if (!formattedValue) + return; + while (isNaN(parseInt(formattedValue, 10))) { + formattedValue = formattedValue.slice(1); + } + return parseInt(formattedValue, 10); +} +function getMonthEndDay(year, month) { + return 32 - new Date(year, month - 1, 32).getDate(); +} +const defaultFormatter = (_, value) => value; +VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: Object.assign({}, pickerProps, { formatter: { + type: Function, + value: defaultFormatter + }, value: null, type: { + type: String, + value: 'datetime' + }, showToolbar: { + type: Boolean, + value: true + }, minDate: { + type: Number, + value: new Date(currentYear - 10, 0, 1).getTime() + }, maxDate: { + type: Number, + value: new Date(currentYear + 10, 11, 31).getTime() + }, minHour: { + type: Number, + value: 0 + }, maxHour: { + type: Number, + value: 23 + }, minMinute: { + type: Number, + value: 0 + }, maxMinute: { + type: Number, + value: 59 + } }), + data: { + innerValue: Date.now(), + columns: [] + }, + watch: { + value: 'updateValue', + type: 'updateValue', + minDate: 'updateValue', + maxDate: 'updateValue', + minHour: 'updateValue', + maxHour: 'updateValue', + minMinute: 'updateValue', + maxMinute: 'updateValue' + }, + methods: { + updateValue() { + const { data } = this; + const val = this.correctValue(this.data.value); + const isEqual = val === data.innerValue; + if (!isEqual) { + this.updateColumnValue(val).then(() => { + this.$emit('input', val); + }); + } + else { + this.updateColumns(); + } + }, + getPicker() { + if (this.picker == null) { + this.picker = this.selectComponent('.van-datetime-picker'); + const { picker } = this; + const { setColumnValues } = picker; + picker.setColumnValues = (...args) => setColumnValues.apply(picker, [...args, false]); + } + return this.picker; + }, + updateColumns() { + const { formatter = defaultFormatter } = this.data; + const results = this.getRanges().map(({ type, range }) => { + const values = times(range[1] - range[0] + 1, index => { + let value = range[0] + index; + value = type === 'year' ? `${value}` : padZero(value); + return formatter(type, value); + }); + return { values }; + }); + return this.set({ columns: results }); + }, + getRanges() { + const { data } = this; + if (data.type === 'time') { + return [ + { + type: 'hour', + range: [data.minHour, data.maxHour] + }, + { + type: 'minute', + range: [data.minMinute, data.maxMinute] + } + ]; + } + const { maxYear, maxDate, maxMonth, maxHour, maxMinute } = this.getBoundary('max', data.innerValue); + const { minYear, minDate, minMonth, minHour, minMinute } = this.getBoundary('min', data.innerValue); + const result = [ + { + type: 'year', + range: [minYear, maxYear] + }, + { + type: 'month', + range: [minMonth, maxMonth] + }, + { + type: 'day', + range: [minDate, maxDate] + }, + { + type: 'hour', + range: [minHour, maxHour] + }, + { + type: 'minute', + range: [minMinute, maxMinute] + } + ]; + if (data.type === 'date') + result.splice(3, 2); + if (data.type === 'year-month') + result.splice(2, 3); + return result; + }, + correctValue(value) { + const { data } = this; + // validate value + const isDateType = data.type !== 'time'; + if (isDateType && !isValidDate(value)) { + value = data.minDate; + } + else if (!isDateType && !value) { + const { minHour } = data; + value = `${padZero(minHour)}:00`; + } + // time type + if (!isDateType) { + let [hour, minute] = value.split(':'); + hour = padZero(range(hour, data.minHour, data.maxHour)); + minute = padZero(range(minute, data.minMinute, data.maxMinute)); + return `${hour}:${minute}`; + } + // date type + value = Math.max(value, data.minDate); + value = Math.min(value, data.maxDate); + return value; + }, + getBoundary(type, innerValue) { + const value = new Date(innerValue); + const boundary = new Date(this.data[`${type}Date`]); + const year = boundary.getFullYear(); + let month = 1; + let date = 1; + let hour = 0; + let minute = 0; + if (type === 'max') { + month = 12; + date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1); + hour = 23; + minute = 59; + } + if (value.getFullYear() === year) { + month = boundary.getMonth() + 1; + if (value.getMonth() + 1 === month) { + date = boundary.getDate(); + if (value.getDate() === date) { + hour = boundary.getHours(); + if (value.getHours() === hour) { + minute = boundary.getMinutes(); + } + } + } + } + return { + [`${type}Year`]: year, + [`${type}Month`]: month, + [`${type}Date`]: date, + [`${type}Hour`]: hour, + [`${type}Minute`]: minute + }; + }, + onCancel() { + this.$emit('cancel'); + }, + onConfirm() { + this.$emit('confirm', this.data.innerValue); + }, + onChange() { + const { data } = this; + let value; + const picker = this.getPicker(); + if (data.type === 'time') { + const indexes = picker.getIndexes(); + value = `${indexes[0] + data.minHour}:${indexes[1] + data.minMinute}`; + } + else { + const values = picker.getValues(); + const year = getTrueValue(values[0]); + const month = getTrueValue(values[1]); + const maxDate = getMonthEndDay(year, month); + let date = getTrueValue(values[2]); + if (data.type === 'year-month') { + date = 1; + } + date = date > maxDate ? maxDate : date; + let hour = 0; + let minute = 0; + if (data.type === 'datetime') { + hour = getTrueValue(values[3]); + minute = getTrueValue(values[4]); + } + value = new Date(year, month - 1, date, hour, minute); + } + value = this.correctValue(value); + this.updateColumnValue(value).then(() => { + this.$emit('input', value); + this.$emit('change', picker); + }); + }, + updateColumnValue(value) { + let values = []; + const { type, formatter = defaultFormatter } = this.data; + const picker = this.getPicker(); + if (type === 'time') { + const pair = value.split(':'); + values = [ + formatter('hour', pair[0]), + formatter('minute', pair[1]) + ]; + } + else { + const date = new Date(value); + values = [ + formatter('year', `${date.getFullYear()}`), + formatter('month', padZero(date.getMonth() + 1)) + ]; + if (type === 'date') { + values.push(formatter('day', padZero(date.getDate()))); + } + if (type === 'datetime') { + values.push(formatter('day', padZero(date.getDate())), formatter('hour', padZero(date.getHours())), formatter('minute', padZero(date.getMinutes()))); + } + } + return this.set({ innerValue: value }) + .then(() => this.updateColumns()) + .then(() => picker.setValues(values)); + } + }, + created() { + const innerValue = this.correctValue(this.data.value); + this.updateColumnValue(innerValue).then(() => { + this.$emit('input', innerValue); + }); + } +}); diff --git a/node_modules/vant-weapp/dist/datetime-picker/index.json b/node_modules/vant-weapp/dist/datetime-picker/index.json new file mode 100644 index 0000000..a778e91 --- /dev/null +++ b/node_modules/vant-weapp/dist/datetime-picker/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-picker": "../picker/index" + } +} diff --git a/node_modules/vant-weapp/dist/datetime-picker/index.wxml b/node_modules/vant-weapp/dist/datetime-picker/index.wxml new file mode 100644 index 0000000..ade2202 --- /dev/null +++ b/node_modules/vant-weapp/dist/datetime-picker/index.wxml @@ -0,0 +1,16 @@ + diff --git a/node_modules/vant-weapp/dist/datetime-picker/index.wxss b/node_modules/vant-weapp/dist/datetime-picker/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/node_modules/vant-weapp/dist/datetime-picker/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/definitions/index.d.ts b/node_modules/vant-weapp/dist/definitions/index.d.ts new file mode 100644 index 0000000..e63c4a8 --- /dev/null +++ b/node_modules/vant-weapp/dist/definitions/index.d.ts @@ -0,0 +1,32 @@ +/// +import { Weapp } from './weapp'; +declare type RecordToAny = { + [K in keyof T]: any; +}; +declare type RecordToReturn = { + [P in keyof T]: T[P] extends (...args: any[]) => any ? ReturnType : T[P]; +}; +export declare type CombinedComponentInstance = Methods & WechatMiniprogram.Component.TrivialInstance & Weapp.FormField & { + data: Data & RecordToReturn & RecordToAny; +}; +export interface VantComponentOptions { + data?: Data; + field?: boolean; + classes?: string[]; + mixins?: string[]; + props?: Props & Weapp.PropertyOption; + watch?: Weapp.WatchOption; + computed?: Computed & Weapp.ComputedOption; + relation?: Weapp.RelationOption & { + name: string; + }; + relations?: { + [componentName: string]: Weapp.RelationOption; + }; + methods?: Methods & Weapp.MethodOption; + beforeCreate?: (this: Instance) => void; + created?: (this: Instance) => void; + mounted?: (this: Instance) => void; + destroyed?: (this: Instance) => void; +} +export {}; diff --git a/node_modules/vant-weapp/dist/definitions/index.js b/node_modules/vant-weapp/dist/definitions/index.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/vant-weapp/dist/definitions/weapp.d.ts b/node_modules/vant-weapp/dist/definitions/weapp.d.ts new file mode 100644 index 0000000..9b18ea8 --- /dev/null +++ b/node_modules/vant-weapp/dist/definitions/weapp.d.ts @@ -0,0 +1,111 @@ +/// +export declare namespace Weapp { + interface FormField { + data: { + name: string; + value: any; + }; + } + interface Target { + id: string; + tagName: string; + dataset: { + [key: string]: any; + }; + } + interface Event { + /** + * 代表事件的类型。 + */ + type: string; + /** + * 页面打开到触发事件所经过的毫秒数。 + */ + timeStamp: number; + /** + * 触发事件的源组件。 + */ + target: Target; + /** + * 事件绑定的当前组件。 + */ + currentTarget: Target; + /** + * 额外的信息 + */ + detail: any; + } + interface Touch { + /** + * 触摸点的标识符 + */ + identifier: number; + /** + * 距离文档左上角的距离,文档的左上角为原点 ,横向为X轴,纵向为Y轴 + */ + pageX: number; + /** + * 距离文档左上角的距离,文档的左上角为原点 ,横向为X轴,纵向为Y轴 + */ + pageY: number; + /** + * 距离页面可显示区域(屏幕除去导航条)左上角距离,横向为X轴,纵向为Y轴 + */ + clientX: number; + /** + * 距离页面可显示区域(屏幕除去导航条)左上角距离,横向为X轴,纵向为Y轴 + */ + clientY: number; + } + interface TouchEvent extends Event { + touches: Array; + changedTouches: Array; + } + /** + * relation定义,miniprogram-api-typings缺少this定义 + */ + interface RelationOption { + /** 目标组件的相对关系 */ + type: 'parent' | 'child' | 'ancestor' | 'descendant'; + /** 关系生命周期函数,当关系被建立在页面节点树中时触发,触发时机在组件attached生命周期之后 */ + linked?(this: Instance, target: WechatMiniprogram.Component.TrivialInstance): void; + /** 关系生命周期函数,当关系在页面节点树中发生改变时触发,触发时机在组件moved生命周期之后 */ + linkChanged?(this: Instance, target: WechatMiniprogram.Component.TrivialInstance): void; + /** 关系生命周期函数,当关系脱离页面节点树时触发,触发时机在组件detached生命周期之后 */ + unlinked?(this: Instance, target: WechatMiniprogram.Component.TrivialInstance): void; + /** 如果这一项被设置,则它表示关联的目标节点所应具有的behavior,所有拥有这一behavior的组件节点都会被关联 */ + target?: string; + } + /** + * obverser定义,miniprogram-api-typings缺少this定义 + */ + type Observer = (this: Instance, newVal: T, oldVal: T, changedPath: Array) => void; + /** + * watch定义 + */ + interface WatchOption { + [name: string]: string | Observer; + } + /** + * methods定义,miniprogram-api-typings缺少this定义 + */ + interface MethodOption { + [name: string]: (this: Instance, ...args: any[]) => any; + } + interface ComputedOption { + [name: string]: (this: Instance) => any; + } + type PropertyType = StringConstructor | NumberConstructor | BooleanConstructor | ArrayConstructor | ObjectConstructor | FunctionConstructor | null; + interface PropertyOption { + [name: string]: PropertyType | PropertyType[] | { + /** 属性类型 */ + type: PropertyType | PropertyType[]; + /** 属性初始值 */ + value?: any; + /** 属性值被更改时的响应函数 */ + observer?: string | Observer; + /** 属性的类型(可以指定多个) */ + optionalTypes?: PropertyType[]; + }; + } +} diff --git a/node_modules/vant-weapp/dist/definitions/weapp.js b/node_modules/vant-weapp/dist/definitions/weapp.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/vant-weapp/dist/dialog/dialog.d.ts b/node_modules/vant-weapp/dist/dialog/dialog.d.ts new file mode 100644 index 0000000..028077a --- /dev/null +++ b/node_modules/vant-weapp/dist/dialog/dialog.d.ts @@ -0,0 +1,45 @@ +/// +declare type DialogAction = 'confirm' | 'cancel'; +declare type DialogOptions = { + lang?: string; + show?: boolean; + title?: string; + zIndex?: number; + context?: WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance; + message?: string; + overlay?: boolean; + selector?: string; + ariaLabel?: string; + className?: string; + customStyle?: string; + transition?: string; + asyncClose?: boolean; + businessId?: number; + sessionFrom?: string; + appParameter?: string; + messageAlign?: string; + sendMessageImg?: string; + showMessageCard?: boolean; + sendMessagePath?: string; + sendMessageTitle?: string; + confirmButtonText?: string; + cancelButtonText?: string; + showConfirmButton?: boolean; + showCancelButton?: boolean; + closeOnClickOverlay?: boolean; + confirmButtonOpenType?: string; +}; +interface Dialog { + (options: DialogOptions): Promise; + alert?: (options: DialogOptions) => Promise; + confirm?: (options: DialogOptions) => Promise; + close?: () => void; + stopLoading?: () => void; + install?: () => void; + setDefaultOptions?: (options: DialogOptions) => void; + resetDefaultOptions?: () => void; + defaultOptions?: DialogOptions; + currentOptions?: DialogOptions; +} +declare const Dialog: Dialog; +export default Dialog; diff --git a/node_modules/vant-weapp/dist/dialog/dialog.js b/node_modules/vant-weapp/dist/dialog/dialog.js new file mode 100644 index 0000000..51902e6 --- /dev/null +++ b/node_modules/vant-weapp/dist/dialog/dialog.js @@ -0,0 +1,61 @@ +let queue = []; +function getContext() { + const pages = getCurrentPages(); + return pages[pages.length - 1]; +} +const Dialog = options => { + options = Object.assign({}, Dialog.currentOptions, options); + return new Promise((resolve, reject) => { + const context = options.context || getContext(); + const dialog = context.selectComponent(options.selector); + delete options.context; + delete options.selector; + if (dialog) { + dialog.set(Object.assign({ onCancel: reject, onConfirm: resolve }, options)); + queue.push(dialog); + } + else { + console.warn('未找到 van-dialog 节点,请确认 selector 及 context 是否正确'); + } + }); +}; +Dialog.defaultOptions = { + show: true, + title: '', + message: '', + zIndex: 100, + overlay: true, + className: '', + customStyle: '', + asyncClose: false, + messageAlign: '', + transition: 'scale', + selector: '#van-dialog', + confirmButtonText: '确认', + cancelButtonText: '取消', + showConfirmButton: true, + showCancelButton: false, + closeOnClickOverlay: false, + confirmButtonOpenType: '' +}; +Dialog.alert = Dialog; +Dialog.confirm = options => Dialog(Object.assign({ showCancelButton: true }, options)); +Dialog.close = () => { + queue.forEach(dialog => { + dialog.close(); + }); + queue = []; +}; +Dialog.stopLoading = () => { + queue.forEach(dialog => { + dialog.stopLoading(); + }); +}; +Dialog.setDefaultOptions = options => { + Object.assign(Dialog.currentOptions, options); +}; +Dialog.resetDefaultOptions = () => { + Dialog.currentOptions = Object.assign({}, Dialog.defaultOptions); +}; +Dialog.resetDefaultOptions(); +export default Dialog; diff --git a/node_modules/vant-weapp/dist/dialog/index.d.ts b/node_modules/vant-weapp/dist/dialog/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/dialog/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/dialog/index.js b/node_modules/vant-weapp/dist/dialog/index.js new file mode 100644 index 0000000..bbbbff2 --- /dev/null +++ b/node_modules/vant-weapp/dist/dialog/index.js @@ -0,0 +1,98 @@ +import { VantComponent } from '../common/component'; +import { button } from '../mixins/button'; +import { openType } from '../mixins/open-type'; +VantComponent({ + mixins: [button, openType], + props: { + show: Boolean, + title: String, + message: String, + useSlot: Boolean, + className: String, + customStyle: String, + asyncClose: Boolean, + messageAlign: String, + showCancelButton: Boolean, + closeOnClickOverlay: Boolean, + confirmButtonOpenType: String, + zIndex: { + type: Number, + value: 2000 + }, + confirmButtonText: { + type: String, + value: '确认' + }, + cancelButtonText: { + type: String, + value: '取消' + }, + showConfirmButton: { + type: Boolean, + value: true + }, + overlay: { + type: Boolean, + value: true + }, + transition: { + type: String, + value: 'scale' + } + }, + data: { + loading: { + confirm: false, + cancel: false + } + }, + watch: { + show(show) { + !show && this.stopLoading(); + } + }, + methods: { + onConfirm() { + this.handleAction('confirm'); + }, + onCancel() { + this.handleAction('cancel'); + }, + onClickOverlay() { + this.onClose('overlay'); + }, + handleAction(action) { + if (this.data.asyncClose) { + this.set({ + [`loading.${action}`]: true + }); + } + this.onClose(action); + }, + close() { + this.set({ + show: false + }); + }, + stopLoading() { + this.set({ + loading: { + confirm: false, + cancel: false + } + }); + }, + onClose(action) { + if (!this.data.asyncClose) { + this.close(); + } + this.$emit('close', action); + // 把 dialog 实例传递出去,可以通过 stopLoading() 在外部关闭按钮的 loading + this.$emit(action, { dialog: this }); + const callback = this.data[action === 'confirm' ? 'onConfirm' : 'onCancel']; + if (callback) { + callback(this); + } + } + } +}); diff --git a/node_modules/vant-weapp/dist/dialog/index.json b/node_modules/vant-weapp/dist/dialog/index.json new file mode 100644 index 0000000..e2ee09a --- /dev/null +++ b/node_modules/vant-weapp/dist/dialog/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-popup": "../popup/index", + "van-button": "../button/index" + } +} diff --git a/node_modules/vant-weapp/dist/dialog/index.wxml b/node_modules/vant-weapp/dist/dialog/index.wxml new file mode 100644 index 0000000..13a77d1 --- /dev/null +++ b/node_modules/vant-weapp/dist/dialog/index.wxml @@ -0,0 +1,65 @@ + + + {{ title }} + + + + + {{ message }} + + + + + {{ cancelButtonText }} + + + {{ confirmButtonText }} + + + diff --git a/node_modules/vant-weapp/dist/dialog/index.wxss b/node_modules/vant-weapp/dist/dialog/index.wxss new file mode 100644 index 0000000..9dfacb2 --- /dev/null +++ b/node_modules/vant-weapp/dist/dialog/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-dialog{top:45%!important;width:85%;overflow:hidden;font-size:16px;background-color:#fff;border-radius:4px}.van-dialog__header{padding-top:25px;font-weight:500;line-height:24px;text-align:center}.van-dialog__header--isolated{padding:25px 0}.van-dialog__message{max-height:60vh;padding:25px;overflow-y:auto;font-size:14px;line-height:20px;text-align:center;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:12px;color:#7d7e80}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog__confirm{color:#1989fa!important}.van-dialog-bounce-enter{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9)} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/field/index.d.ts b/node_modules/vant-weapp/dist/field/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/field/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/field/index.js b/node_modules/vant-weapp/dist/field/index.js new file mode 100644 index 0000000..7865c00 --- /dev/null +++ b/node_modules/vant-weapp/dist/field/index.js @@ -0,0 +1,105 @@ +import { VantComponent } from '../common/component'; +import { getSystemInfoSync } from '../common/utils'; +VantComponent({ + field: true, + classes: ['input-class', 'right-icon-class'], + props: { + size: String, + icon: String, + label: String, + error: Boolean, + fixed: Boolean, + focus: Boolean, + center: Boolean, + isLink: Boolean, + leftIcon: String, + rightIcon: String, + disabled: Boolean, + autosize: Boolean, + readonly: Boolean, + required: Boolean, + password: Boolean, + iconClass: String, + clearable: Boolean, + inputAlign: String, + customStyle: String, + confirmType: String, + confirmHold: Boolean, + errorMessage: String, + placeholder: String, + placeholderStyle: String, + errorMessageAlign: String, + selectionEnd: { + type: Number, + value: -1 + }, + selectionStart: { + type: Number, + value: -1 + }, + showConfirmBar: { + type: Boolean, + value: true + }, + adjustPosition: { + type: Boolean, + value: true + }, + cursorSpacing: { + type: Number, + value: 50 + }, + maxlength: { + type: Number, + value: -1 + }, + type: { + type: String, + value: 'text' + }, + border: { + type: Boolean, + value: true + }, + titleWidth: { + type: String, + value: '90px' + } + }, + data: { + focused: false, + system: getSystemInfoSync().system.split(' ').shift().toLowerCase() + }, + methods: { + onInput(event) { + const { value = '' } = event.detail || {}; + this.set({ value }, () => { + this.emitChange(value); + }); + }, + onFocus(event) { + this.set({ focused: true }); + this.$emit('focus', event.detail); + }, + onBlur(event) { + this.set({ focused: false }); + this.$emit('blur', event.detail); + }, + onClickIcon() { + this.$emit('click-icon'); + }, + onClear() { + this.set({ value: '' }, () => { + this.emitChange(''); + this.$emit('clear', ''); + }); + }, + onConfirm() { + this.$emit('confirm', this.data.value); + }, + emitChange(value) { + this.$emit('input', value); + this.$emit('change', value); + } + } +}); diff --git a/node_modules/vant-weapp/dist/field/index.json b/node_modules/vant-weapp/dist/field/index.json new file mode 100644 index 0000000..8809c46 --- /dev/null +++ b/node_modules/vant-weapp/dist/field/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index", + "van-icon": "../icon/index" + } +} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/field/index.wxml b/node_modules/vant-weapp/dist/field/index.wxml new file mode 100644 index 0000000..d5e70cc --- /dev/null +++ b/node_modules/vant-weapp/dist/field/index.wxml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + {{ errorMessage }} + + diff --git a/node_modules/vant-weapp/dist/field/index.wxss b/node_modules/vant-weapp/dist/field/index.wxss new file mode 100644 index 0000000..e53fee3 --- /dev/null +++ b/node_modules/vant-weapp/dist/field/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px;line-height:1.2em}.van-field__body--textarea.van-field__body--ios{margin-top:-4.5px}.van-field__input{position:relative;display:block;width:100%;height:24px;min-height:24px;padding:0;margin:0;line-height:inherit;color:#333;text-align:left;background-color:initial;border:0;box-sizing:border-box;resize:none}.van-field__input--textarea{height:18px;min-height:18px}.van-field__input--error{color:#f44}.van-field__input--disabled{color:#999;background-color:initial;opacity:1}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;right:0;left:0;color:#999;pointer-events:none}.van-field__placeholder--error{color:#f44}.van-field__icon-root{display:-webkit-flex;display:flex;min-height:24px;-webkit-align-items:center;align-items:center}.van-field__clear-root,.van-field__icon-container{padding:0 10px;margin-right:-10px;line-height:inherit;vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:10px}.van-field__button:empty{display:none}.van-field__error-message{font-size:12px;color:#f44;text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/goods-action-button/index.d.ts b/node_modules/vant-weapp/dist/goods-action-button/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action-button/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/goods-action-button/index.js b/node_modules/vant-weapp/dist/goods-action-button/index.js new file mode 100644 index 0000000..b96e1c8 --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action-button/index.js @@ -0,0 +1,22 @@ +import { VantComponent } from '../common/component'; +import { link } from '../mixins/link'; +import { button } from '../mixins/button'; +import { openType } from '../mixins/open-type'; +VantComponent({ + mixins: [link, button, openType], + props: { + text: String, + loading: Boolean, + disabled: Boolean, + type: { + type: String, + value: 'danger' + } + }, + methods: { + onClick(event) { + this.$emit('click', event.detail); + this.jumpLink(); + } + } +}); diff --git a/node_modules/vant-weapp/dist/goods-action-button/index.json b/node_modules/vant-weapp/dist/goods-action-button/index.json new file mode 100644 index 0000000..b567686 --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action-button/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-button": "../button/index" + } +} diff --git a/node_modules/vant-weapp/dist/goods-action-button/index.wxml b/node_modules/vant-weapp/dist/goods-action-button/index.wxml new file mode 100644 index 0000000..39296d5 --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action-button/index.wxml @@ -0,0 +1,27 @@ + + {{ text }} + diff --git a/node_modules/vant-weapp/dist/goods-action-button/index.wxss b/node_modules/vant-weapp/dist/goods-action-button/index.wxss new file mode 100644 index 0000000..5800197 --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action-button/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';:host{-webkit-flex:1;flex:1} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/goods-action-icon/index.d.ts b/node_modules/vant-weapp/dist/goods-action-icon/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action-icon/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/goods-action-icon/index.js b/node_modules/vant-weapp/dist/goods-action-icon/index.js new file mode 100644 index 0000000..7b3af04 --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action-icon/index.js @@ -0,0 +1,21 @@ +import { VantComponent } from '../common/component'; +import { link } from '../mixins/link'; +import { button } from '../mixins/button'; +import { openType } from '../mixins/open-type'; +VantComponent({ + classes: ['icon-class', 'text-class'], + mixins: [link, button, openType], + props: { + text: String, + info: String, + icon: String, + disabled: Boolean, + loading: Boolean + }, + methods: { + onClick(event) { + this.$emit('click', event.detail); + this.jumpLink(); + } + } +}); diff --git a/node_modules/vant-weapp/dist/goods-action-icon/index.json b/node_modules/vant-weapp/dist/goods-action-icon/index.json new file mode 100644 index 0000000..93bfe8a --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action-icon/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-button": "../button/index" + } +} diff --git a/node_modules/vant-weapp/dist/goods-action-icon/index.wxml b/node_modules/vant-weapp/dist/goods-action-icon/index.wxml new file mode 100644 index 0000000..40c0773 --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action-icon/index.wxml @@ -0,0 +1,35 @@ + + + + {{ text }} + + diff --git a/node_modules/vant-weapp/dist/goods-action-icon/index.wxss b/node_modules/vant-weapp/dist/goods-action-icon/index.wxss new file mode 100644 index 0000000..674d0a0 --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action-icon/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-goods-action-icon{width:50px!important;border:none!important}.van-goods-action-icon__content{display:-webkit-flex;display:flex;height:100%;font-size:10px;line-height:1;color:#7d7e80;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-goods-action-icon__icon{margin-bottom:4px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/goods-action/index.d.ts b/node_modules/vant-weapp/dist/goods-action/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/goods-action/index.js b/node_modules/vant-weapp/dist/goods-action/index.js new file mode 100644 index 0000000..458e7aa --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action/index.js @@ -0,0 +1,5 @@ +import { VantComponent } from '../common/component'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + mixins: [safeArea()] +}); diff --git a/node_modules/vant-weapp/dist/goods-action/index.json b/node_modules/vant-weapp/dist/goods-action/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/dist/goods-action/index.wxml b/node_modules/vant-weapp/dist/goods-action/index.wxml new file mode 100644 index 0000000..6e61cc9 --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action/index.wxml @@ -0,0 +1,5 @@ + + + + + diff --git a/node_modules/vant-weapp/dist/goods-action/index.wxss b/node_modules/vant-weapp/dist/goods-action/index.wxss new file mode 100644 index 0000000..ce8200c --- /dev/null +++ b/node_modules/vant-weapp/dist/goods-action/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-goods-action{position:fixed;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;background-color:#fff}.van-goods-action--safe{padding-bottom:34px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/icon/index.d.ts b/node_modules/vant-weapp/dist/icon/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/icon/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/icon/index.js b/node_modules/vant-weapp/dist/icon/index.js new file mode 100644 index 0000000..3381070 --- /dev/null +++ b/node_modules/vant-weapp/dist/icon/index.js @@ -0,0 +1,19 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + info: null, + name: String, + size: String, + color: String, + customStyle: String, + classPrefix: { + type: String, + value: 'van-icon' + } + }, + methods: { + onClick() { + this.$emit('click'); + } + } +}); diff --git a/node_modules/vant-weapp/dist/icon/index.json b/node_modules/vant-weapp/dist/icon/index.json new file mode 100644 index 0000000..bf0ebe0 --- /dev/null +++ b/node_modules/vant-weapp/dist/icon/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-info": "../info/index" + } +} diff --git a/node_modules/vant-weapp/dist/icon/index.wxml b/node_modules/vant-weapp/dist/icon/index.wxml new file mode 100644 index 0000000..3c1bbad --- /dev/null +++ b/node_modules/vant-weapp/dist/icon/index.wxml @@ -0,0 +1,19 @@ + + + + + + diff --git a/node_modules/vant-weapp/dist/icon/index.wxss b/node_modules/vant-weapp/dist/icon/index.wxss new file mode 100644 index 0000000..2b219ec --- /dev/null +++ b/node_modules/vant-weapp/dist/icon/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';@font-face{font-style:normal;font-weight:400;font-family:vant-icon;src:url(https://img.yzcdn.cn/vant/vant-icon-3a7dc2.woff2) format("woff2"),url(https://img.yzcdn.cn/vant/vant-icon-3a7dc2.woff) format("woff"),url(https://img.yzcdn.cn/vant/vant-icon-3a7dc2.ttf) format("truetype")}.van-icon{position:relative;font:normal normal normal 14px/1 vant-icon;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.van-icon,.van-icon:before{display:inline-block}.van-icon-add-o:before{content:"\F000"}.van-icon-add-square:before{content:"\F001"}.van-icon-add:before{content:"\F002"}.van-icon-after-sale:before{content:"\F003"}.van-icon-aim:before{content:"\F004"}.van-icon-alipay:before{content:"\F005"}.van-icon-apps-o:before{content:"\F006"}.van-icon-arrow-down:before{content:"\F007"}.van-icon-arrow-left:before{content:"\F008"}.van-icon-arrow-up:before{content:"\F009"}.van-icon-arrow:before{content:"\F00A"}.van-icon-ascending:before{content:"\F00B"}.van-icon-audio:before{content:"\F00C"}.van-icon-award-o:before{content:"\F00D"}.van-icon-award:before{content:"\F00E"}.van-icon-bag-o:before{content:"\F00F"}.van-icon-bag:before{content:"\F010"}.van-icon-balance-list-o:before{content:"\F011"}.van-icon-balance-list:before{content:"\F012"}.van-icon-balance-o:before{content:"\F013"}.van-icon-balance-pay:before{content:"\F014"}.van-icon-bar-chart-o:before{content:"\F015"}.van-icon-bars:before{content:"\F016"}.van-icon-bell:before{content:"\F017"}.van-icon-bill-o:before{content:"\F018"}.van-icon-bill:before{content:"\F019"}.van-icon-birthday-cake-o:before{content:"\F01A"}.van-icon-bookmark-o:before{content:"\F01B"}.van-icon-bookmark:before{content:"\F01C"}.van-icon-browsing-history-o:before{content:"\F01D"}.van-icon-browsing-history:before{content:"\F01E"}.van-icon-brush-o:before{content:"\F01F"}.van-icon-bulb-o:before{content:"\F020"}.van-icon-bullhorn-o:before{content:"\F021"}.van-icon-calender-o:before{content:"\F022"}.van-icon-card:before{content:"\F023"}.van-icon-cart-circle-o:before{content:"\F024"}.van-icon-cart-circle:before{content:"\F025"}.van-icon-cart-o:before{content:"\F026"}.van-icon-cart:before{content:"\F027"}.van-icon-cash-back-record:before{content:"\F028"}.van-icon-cash-on-deliver:before{content:"\F029"}.van-icon-cashier-o:before{content:"\F02A"}.van-icon-certificate:before{content:"\F02B"}.van-icon-chart-trending-o:before{content:"\F02C"}.van-icon-chat-o:before{content:"\F02D"}.van-icon-chat:before{content:"\F02E"}.van-icon-checked:before{content:"\F02F"}.van-icon-circle:before{content:"\F030"}.van-icon-clear:before{content:"\F031"}.van-icon-clock-o:before{content:"\F032"}.van-icon-clock:before{content:"\F033"}.van-icon-close:before{content:"\F034"}.van-icon-closed-eye:before{content:"\F035"}.van-icon-cluster-o:before{content:"\F036"}.van-icon-cluster:before{content:"\F037"}.van-icon-column:before{content:"\F038"}.van-icon-comment-circle-o:before{content:"\F039"}.van-icon-comment-circle:before{content:"\F03A"}.van-icon-comment-o:before{content:"\F03B"}.van-icon-comment:before{content:"\F03C"}.van-icon-completed:before{content:"\F03D"}.van-icon-contact:before{content:"\F03E"}.van-icon-coupon-o:before{content:"\F03F"}.van-icon-coupon:before{content:"\F040"}.van-icon-credit-pay:before{content:"\F041"}.van-icon-cross:before{content:"\F042"}.van-icon-debit-pay:before{content:"\F043"}.van-icon-delete:before{content:"\F044"}.van-icon-descending:before{content:"\F045"}.van-icon-description:before{content:"\F046"}.van-icon-desktop-o:before{content:"\F047"}.van-icon-diamond-o:before{content:"\F048"}.van-icon-diamond:before{content:"\F049"}.van-icon-discount:before{content:"\F04A"}.van-icon-ecard-pay:before{content:"\F04B"}.van-icon-edit:before{content:"\F04C"}.van-icon-ellipsis:before{content:"\F04D"}.van-icon-empty:before{content:"\F04E"}.van-icon-envelop-o:before{content:"\F04F"}.van-icon-exchange:before{content:"\F050"}.van-icon-expand-o:before{content:"\F051"}.van-icon-expand:before{content:"\F052"}.van-icon-eye-o:before{content:"\F053"}.van-icon-eye:before{content:"\F054"}.van-icon-fail:before{content:"\F055"}.van-icon-failure:before{content:"\F056"}.van-icon-filter-o:before{content:"\F057"}.van-icon-fire-o:before{content:"\F058"}.van-icon-fire:before{content:"\F059"}.van-icon-flag-o:before{content:"\F05A"}.van-icon-flower-o:before{content:"\F05B"}.van-icon-free-postage:before{content:"\F05C"}.van-icon-friends-o:before{content:"\F05D"}.van-icon-friends:before{content:"\F05E"}.van-icon-gem-o:before{content:"\F05F"}.van-icon-gem:before{content:"\F060"}.van-icon-gift-card-o:before{content:"\F061"}.van-icon-gift-card:before{content:"\F062"}.van-icon-gift-o:before{content:"\F063"}.van-icon-gift:before{content:"\F064"}.van-icon-gold-coin-o:before{content:"\F065"}.van-icon-gold-coin:before{content:"\F066"}.van-icon-good-job-o:before{content:"\F067"}.van-icon-good-job:before{content:"\F068"}.van-icon-goods-collect-o:before{content:"\F069"}.van-icon-goods-collect:before{content:"\F06A"}.van-icon-graphic:before{content:"\F06B"}.van-icon-home-o:before{content:"\F06C"}.van-icon-hot-o:before{content:"\F06D"}.van-icon-hot-sale-o:before{content:"\F06E"}.van-icon-hot-sale:before{content:"\F06F"}.van-icon-hot:before{content:"\F070"}.van-icon-hotel-o:before{content:"\F071"}.van-icon-idcard:before{content:"\F072"}.van-icon-info-o:before{content:"\F073"}.van-icon-info:before{content:"\F074"}.van-icon-invition:before{content:"\F075"}.van-icon-label-o:before{content:"\F076"}.van-icon-label:before{content:"\F077"}.van-icon-like-o:before{content:"\F078"}.van-icon-like:before{content:"\F079"}.van-icon-live:before{content:"\F07A"}.van-icon-location-o:before{content:"\F07B"}.van-icon-location:before{content:"\F07C"}.van-icon-lock:before{content:"\F07D"}.van-icon-logistics:before{content:"\F07E"}.van-icon-manager-o:before{content:"\F07F"}.van-icon-manager:before{content:"\F080"}.van-icon-map-marked:before{content:"\F081"}.van-icon-medel-o:before{content:"\F082"}.van-icon-medel:before{content:"\F083"}.van-icon-more-o:before{content:"\F084"}.van-icon-more:before{content:"\F085"}.van-icon-music-o:before{content:"\F086"}.van-icon-music:before{content:"\F087"}.van-icon-new-arrival-o:before{content:"\F088"}.van-icon-new-arrival:before{content:"\F089"}.van-icon-new-o:before{content:"\F08A"}.van-icon-new:before{content:"\F08B"}.van-icon-newspaper-o:before{content:"\F08C"}.van-icon-notes-o:before{content:"\F08D"}.van-icon-orders-o:before{content:"\F08E"}.van-icon-other-pay:before{content:"\F08F"}.van-icon-paid:before{content:"\F090"}.van-icon-passed:before{content:"\F091"}.van-icon-pause-circle-o:before{content:"\F092"}.van-icon-pause-circle:before{content:"\F093"}.van-icon-pause:before{content:"\F094"}.van-icon-peer-pay:before{content:"\F095"}.van-icon-pending-payment:before{content:"\F096"}.van-icon-phone-circle-o:before{content:"\F097"}.van-icon-phone-circle:before{content:"\F098"}.van-icon-phone-o:before{content:"\F099"}.van-icon-phone:before{content:"\F09A"}.van-icon-photo-o:before{content:"\F09B"}.van-icon-photo:before{content:"\F09C"}.van-icon-photograph:before{content:"\F09D"}.van-icon-play-circle-o:before{content:"\F09E"}.van-icon-play-circle:before{content:"\F09F"}.van-icon-play:before{content:"\F0A0"}.van-icon-plus:before{content:"\F0A1"}.van-icon-point-gift-o:before{content:"\F0A2"}.van-icon-point-gift:before{content:"\F0A3"}.van-icon-points:before{content:"\F0A4"}.van-icon-printer:before{content:"\F0A5"}.van-icon-qr-invalid:before{content:"\F0A6"}.van-icon-qr:before{content:"\F0A7"}.van-icon-question-o:before{content:"\F0A8"}.van-icon-question:before{content:"\F0A9"}.van-icon-records:before{content:"\F0AA"}.van-icon-refund-o:before{content:"\F0AB"}.van-icon-replay:before{content:"\F0AC"}.van-icon-scan:before{content:"\F0AD"}.van-icon-search:before{content:"\F0AE"}.van-icon-send-gift-o:before{content:"\F0AF"}.van-icon-send-gift:before{content:"\F0B0"}.van-icon-service-o:before{content:"\F0B1"}.van-icon-service:before{content:"\F0B2"}.van-icon-setting-o:before{content:"\F0B3"}.van-icon-setting:before{content:"\F0B4"}.van-icon-share:before{content:"\F0B5"}.van-icon-shop-collect-o:before{content:"\F0B6"}.van-icon-shop-collect:before{content:"\F0B7"}.van-icon-shop-o:before{content:"\F0B8"}.van-icon-shop:before{content:"\F0B9"}.van-icon-shopping-cart-o:before{content:"\F0BA"}.van-icon-shopping-cart:before{content:"\F0BB"}.van-icon-shrink:before{content:"\F0BC"}.van-icon-sign:before{content:"\F0BD"}.van-icon-smile-comment-o:before{content:"\F0BE"}.van-icon-smile-comment:before{content:"\F0BF"}.van-icon-smile-o:before{content:"\F0C0"}.van-icon-smile:before{content:"\F0C1"}.van-icon-star-o:before{content:"\F0C2"}.van-icon-star:before{content:"\F0C3"}.van-icon-stop-circle-o:before{content:"\F0C4"}.van-icon-stop-circle:before{content:"\F0C5"}.van-icon-stop:before{content:"\F0C6"}.van-icon-success:before{content:"\F0C7"}.van-icon-thumb-circle-o:before{content:"\F0C8"}.van-icon-thumb-circle:before{content:"\F0C9"}.van-icon-todo-list-o:before{content:"\F0CA"}.van-icon-todo-list:before{content:"\F0CB"}.van-icon-tosend:before{content:"\F0CC"}.van-icon-tv-o:before{content:"\F0CD"}.van-icon-umbrella-circle:before{content:"\F0CE"}.van-icon-underway-o:before{content:"\F0CF"}.van-icon-underway:before{content:"\F0D0"}.van-icon-upgrade:before{content:"\F0D1"}.van-icon-user-circle-o:before{content:"\F0D2"}.van-icon-user-o:before{content:"\F0D3"}.van-icon-video-o:before{content:"\F0D4"}.van-icon-video:before{content:"\F0D5"}.van-icon-vip-card-o:before{content:"\F0D6"}.van-icon-vip-card:before{content:"\F0D7"}.van-icon-volume-o:before{content:"\F0D8"}.van-icon-volume:before{content:"\F0D9"}.van-icon-wap-home:before{content:"\F0DA"}.van-icon-wap-nav:before{content:"\F0DB"}.van-icon-warn-o:before{content:"\F0DC"}.van-icon-warning-o:before{content:"\F0DD"}.van-icon-warning:before{content:"\F0DE"}.van-icon-weapp-nav:before{content:"\F0DF"}.van-icon-wechat:before{content:"\F0E0"}.van-icon-youzan-shield:before{content:"\F0E1"}.van-icon--image{width:1em;height:1em}.van-icon__image{width:100%;height:100%}.van-icon__info{z-index:1} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/info/index.d.ts b/node_modules/vant-weapp/dist/info/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/info/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/info/index.js b/node_modules/vant-weapp/dist/info/index.js new file mode 100644 index 0000000..b7258be --- /dev/null +++ b/node_modules/vant-weapp/dist/info/index.js @@ -0,0 +1,7 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + info: null, + customStyle: String + } +}); diff --git a/node_modules/vant-weapp/dist/info/index.json b/node_modules/vant-weapp/dist/info/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/dist/info/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/dist/info/index.wxml b/node_modules/vant-weapp/dist/info/index.wxml new file mode 100644 index 0000000..bf175a0 --- /dev/null +++ b/node_modules/vant-weapp/dist/info/index.wxml @@ -0,0 +1,5 @@ +{{ info }} diff --git a/node_modules/vant-weapp/dist/info/index.wxss b/node_modules/vant-weapp/dist/info/index.wxss new file mode 100644 index 0000000..f9c10d0 --- /dev/null +++ b/node_modules/vant-weapp/dist/info/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-info{position:absolute;top:-8px;right:0;min-width:16px;padding:0 3px;font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;font-size:12px;font-weight:500;line-height:14px;color:#fff;text-align:center;white-space:nowrap;background-color:#f44;border:1px solid #fff;border-radius:16px;-webkit-transform:translateX(50%);transform:translateX(50%);box-sizing:border-box;-webkit-transform-origin:100%;transform-origin:100%} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/loading/index.d.ts b/node_modules/vant-weapp/dist/loading/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/loading/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/loading/index.js b/node_modules/vant-weapp/dist/loading/index.js new file mode 100644 index 0000000..942b7a4 --- /dev/null +++ b/node_modules/vant-weapp/dist/loading/index.js @@ -0,0 +1,17 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + size: { + type: String, + value: '30px' + }, + type: { + type: String, + value: 'circular' + }, + color: { + type: String, + value: '#c9c9c9' + } + } +}); diff --git a/node_modules/vant-weapp/dist/loading/index.json b/node_modules/vant-weapp/dist/loading/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/dist/loading/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/loading/index.wxml b/node_modules/vant-weapp/dist/loading/index.wxml new file mode 100644 index 0000000..35ca0e2 --- /dev/null +++ b/node_modules/vant-weapp/dist/loading/index.wxml @@ -0,0 +1,16 @@ + + + + + diff --git a/node_modules/vant-weapp/dist/loading/index.wxss b/node_modules/vant-weapp/dist/loading/index.wxss new file mode 100644 index 0000000..58cb52a --- /dev/null +++ b/node_modules/vant-weapp/dist/loading/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-loading{z-index:0;line-height:0;vertical-align:middle}.van-loading,.van-loading__spinner{position:relative;display:inline-block}.van-loading__spinner{z-index:-1;width:100%;height:100%;box-sizing:border-box;-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border-radius:100%;border:1px solid transparent;border-top-color:initial}.van-loading__dot{top:0;left:0;width:100%;height:100%;position:absolute}.van-loading__dot:before{width:2px;height:25%;content:" ";display:block;margin:0 auto;border-radius:40%;background-color:currentColor}.van-loading__dot:first-of-type{opacity:1;-webkit-transform:rotate(30deg);transform:rotate(30deg)}.van-loading__dot:nth-of-type(2){opacity:.9375;-webkit-transform:rotate(60deg);transform:rotate(60deg)}.van-loading__dot:nth-of-type(3){opacity:.875;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.van-loading__dot:nth-of-type(4){opacity:.8125;-webkit-transform:rotate(120deg);transform:rotate(120deg)}.van-loading__dot:nth-of-type(5){opacity:.75;-webkit-transform:rotate(150deg);transform:rotate(150deg)}.van-loading__dot:nth-of-type(6){opacity:.6875;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-loading__dot:nth-of-type(7){opacity:.625;-webkit-transform:rotate(210deg);transform:rotate(210deg)}.van-loading__dot:nth-of-type(8){opacity:.5625;-webkit-transform:rotate(240deg);transform:rotate(240deg)}.van-loading__dot:nth-of-type(9){opacity:.5;-webkit-transform:rotate(270deg);transform:rotate(270deg)}.van-loading__dot:nth-of-type(10){opacity:.4375;-webkit-transform:rotate(300deg);transform:rotate(300deg)}.van-loading__dot:nth-of-type(11){opacity:.375;-webkit-transform:rotate(330deg);transform:rotate(330deg)}.van-loading__dot:nth-of-type(12){opacity:.3125;-webkit-transform:rotate(1turn);transform:rotate(1turn)}@-webkit-keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/mixins/basic.d.ts b/node_modules/vant-weapp/dist/mixins/basic.d.ts new file mode 100644 index 0000000..b273369 --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/basic.d.ts @@ -0,0 +1 @@ +export declare const basic: string; diff --git a/node_modules/vant-weapp/dist/mixins/basic.js b/node_modules/vant-weapp/dist/mixins/basic.js new file mode 100644 index 0000000..2fdd634 --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/basic.js @@ -0,0 +1,22 @@ +export const basic = Behavior({ + methods: { + $emit(...args) { + this.triggerEvent(...args); + }, + getRect(selector, all) { + return new Promise(resolve => { + wx.createSelectorQuery() + .in(this)[all ? 'selectAll' : 'select'](selector) + .boundingClientRect(rect => { + if (all && Array.isArray(rect) && rect.length) { + resolve(rect); + } + if (!all && rect) { + resolve(rect); + } + }) + .exec(); + }); + } + } +}); diff --git a/node_modules/vant-weapp/dist/mixins/button.d.ts b/node_modules/vant-weapp/dist/mixins/button.d.ts new file mode 100644 index 0000000..b51db87 --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/button.d.ts @@ -0,0 +1 @@ +export declare const button: string; diff --git a/node_modules/vant-weapp/dist/mixins/button.js b/node_modules/vant-weapp/dist/mixins/button.js new file mode 100644 index 0000000..5d3b4dc --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/button.js @@ -0,0 +1,18 @@ +export const button = Behavior({ + externalClasses: ['hover-class'], + properties: { + id: String, + lang: { + type: String, + value: 'en' + }, + businessId: Number, + sessionFrom: String, + sendMessageTitle: String, + sendMessagePath: String, + sendMessageImg: String, + showMessageCard: Boolean, + appParameter: String, + ariaLabel: String + } +}); diff --git a/node_modules/vant-weapp/dist/mixins/link.d.ts b/node_modules/vant-weapp/dist/mixins/link.d.ts new file mode 100644 index 0000000..d58043b --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/link.d.ts @@ -0,0 +1 @@ +export declare const link: string; diff --git a/node_modules/vant-weapp/dist/mixins/link.js b/node_modules/vant-weapp/dist/mixins/link.js new file mode 100644 index 0000000..d7aed0c --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/link.js @@ -0,0 +1,17 @@ +export const link = Behavior({ + properties: { + url: String, + linkType: { + type: String, + value: 'navigateTo' + } + }, + methods: { + jumpLink(urlKey = 'url') { + const url = this.data[urlKey]; + if (url) { + wx[this.data.linkType]({ url }); + } + } + } +}); diff --git a/node_modules/vant-weapp/dist/mixins/observer/behavior.d.ts b/node_modules/vant-weapp/dist/mixins/observer/behavior.d.ts new file mode 100644 index 0000000..3da2a64 --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/observer/behavior.d.ts @@ -0,0 +1 @@ +export declare const behavior: string; diff --git a/node_modules/vant-weapp/dist/mixins/observer/behavior.js b/node_modules/vant-weapp/dist/mixins/observer/behavior.js new file mode 100644 index 0000000..6e5d1a4 --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/observer/behavior.js @@ -0,0 +1,47 @@ +function setAsync(context, data) { + return new Promise(resolve => { + context.setData(data, resolve); + }); +} +export const behavior = Behavior({ + created() { + if (!this.$options) { + return; + } + const cache = {}; + const { computed } = this.$options(); + const keys = Object.keys(computed); + this.calcComputed = () => { + const needUpdate = {}; + keys.forEach(key => { + const value = computed[key].call(this); + if (cache[key] !== value) { + cache[key] = value; + needUpdate[key] = value; + } + }); + return needUpdate; + }; + }, + attached() { + this.set(); + }, + methods: { + // set data and set computed data + set(data, callback) { + const stack = []; + if (data) { + stack.push(setAsync(this, data)); + } + if (this.calcComputed) { + stack.push(setAsync(this, this.calcComputed())); + } + return Promise.all(stack).then(res => { + if (callback && typeof callback === 'function') { + callback.call(this); + } + return res; + }); + } + } +}); diff --git a/node_modules/vant-weapp/dist/mixins/observer/index.d.ts b/node_modules/vant-weapp/dist/mixins/observer/index.d.ts new file mode 100644 index 0000000..4e54b2e --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/observer/index.d.ts @@ -0,0 +1 @@ +export declare function observe(vantOptions: any, options: any): void; diff --git a/node_modules/vant-weapp/dist/mixins/observer/index.js b/node_modules/vant-weapp/dist/mixins/observer/index.js new file mode 100644 index 0000000..51427f7 --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/observer/index.js @@ -0,0 +1,27 @@ +import { behavior } from './behavior'; +import { observeProps } from './props'; +export function observe(vantOptions, options) { + const { watch, computed } = vantOptions; + options.behaviors.push(behavior); + if (watch) { + const props = options.properties || {}; + Object.keys(watch).forEach(key => { + if (key in props) { + let prop = props[key]; + if (prop === null || !('type' in prop)) { + prop = { type: prop }; + } + prop.observer = watch[key]; + props[key] = prop; + } + }); + options.properties = props; + } + if (computed) { + options.methods = options.methods || {}; + options.methods.$options = () => vantOptions; + if (options.properties) { + observeProps(options.properties); + } + } +} diff --git a/node_modules/vant-weapp/dist/mixins/observer/props.d.ts b/node_modules/vant-weapp/dist/mixins/observer/props.d.ts new file mode 100644 index 0000000..43813df --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/observer/props.d.ts @@ -0,0 +1 @@ +export declare function observeProps(props: any): void; diff --git a/node_modules/vant-weapp/dist/mixins/observer/props.js b/node_modules/vant-weapp/dist/mixins/observer/props.js new file mode 100644 index 0000000..54f6623 --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/observer/props.js @@ -0,0 +1,22 @@ +export function observeProps(props) { + if (!props) { + return; + } + Object.keys(props).forEach(key => { + let prop = props[key]; + if (prop === null || !('type' in prop)) { + prop = { type: prop }; + } + let { observer } = prop; + prop.observer = function (...args) { + if (observer) { + if (typeof observer === 'string') { + observer = this[observer]; + } + observer.apply(this, args); + } + this.set(); + }; + props[key] = prop; + }); +} diff --git a/node_modules/vant-weapp/dist/mixins/open-type.d.ts b/node_modules/vant-weapp/dist/mixins/open-type.d.ts new file mode 100644 index 0000000..64b023d --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/open-type.d.ts @@ -0,0 +1 @@ +export declare const openType: string; diff --git a/node_modules/vant-weapp/dist/mixins/open-type.js b/node_modules/vant-weapp/dist/mixins/open-type.js new file mode 100644 index 0000000..514517e --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/open-type.js @@ -0,0 +1,25 @@ +export const openType = Behavior({ + properties: { + openType: String + }, + methods: { + bindGetUserInfo(event) { + this.$emit('getuserinfo', event.detail); + }, + bindContact(event) { + this.$emit('contact', event.detail); + }, + bindGetPhoneNumber(event) { + this.$emit('getphonenumber', event.detail); + }, + bindError(event) { + this.$emit('error', event.detail); + }, + bindLaunchApp(event) { + this.$emit('launchapp', event.detail); + }, + bindOpenSetting(event) { + this.$emit('opensetting', event.detail); + }, + } +}); diff --git a/node_modules/vant-weapp/dist/mixins/safe-area.d.ts b/node_modules/vant-weapp/dist/mixins/safe-area.d.ts new file mode 100644 index 0000000..0686353 --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/safe-area.d.ts @@ -0,0 +1,4 @@ +export declare const safeArea: ({ safeAreaInsetBottom, safeAreaInsetTop }?: { + safeAreaInsetBottom?: boolean; + safeAreaInsetTop?: boolean; +}) => string; diff --git a/node_modules/vant-weapp/dist/mixins/safe-area.js b/node_modules/vant-weapp/dist/mixins/safe-area.js new file mode 100644 index 0000000..e502622 --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/safe-area.js @@ -0,0 +1,39 @@ +let cache = null; +function getSafeArea() { + return new Promise((resolve, reject) => { + if (cache != null) { + resolve(cache); + } + else { + wx.getSystemInfo({ + success: ({ model, screenHeight, statusBarHeight }) => { + const iphoneX = /iphone x/i.test(model); + const iphoneNew = /iPhone11/i.test(model) && screenHeight === 812; + cache = { + isIPhoneX: iphoneX || iphoneNew, + statusBarHeight + }; + resolve(cache); + }, + fail: reject + }); + } + }); +} +export const safeArea = ({ safeAreaInsetBottom = true, safeAreaInsetTop = false } = {}) => Behavior({ + properties: { + safeAreaInsetTop: { + type: Boolean, + value: safeAreaInsetTop + }, + safeAreaInsetBottom: { + type: Boolean, + value: safeAreaInsetBottom + } + }, + created() { + getSafeArea().then(({ isIPhoneX, statusBarHeight }) => { + this.set({ isIPhoneX, statusBarHeight }); + }); + } +}); diff --git a/node_modules/vant-weapp/dist/mixins/touch.d.ts b/node_modules/vant-weapp/dist/mixins/touch.d.ts new file mode 100644 index 0000000..35ee831 --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/touch.d.ts @@ -0,0 +1 @@ +export declare const touch: string; diff --git a/node_modules/vant-weapp/dist/mixins/touch.js b/node_modules/vant-weapp/dist/mixins/touch.js new file mode 100644 index 0000000..7566cb3 --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/touch.js @@ -0,0 +1,27 @@ +export const touch = Behavior({ + methods: { + touchStart(event) { + const touch = event.touches[0]; + this.direction = ''; + this.deltaX = 0; + this.deltaY = 0; + this.offsetX = 0; + this.offsetY = 0; + this.startX = touch.clientX; + this.startY = touch.clientY; + }, + touchMove(event) { + const touch = event.touches[0]; + this.deltaX = touch.clientX - this.startX; + this.deltaY = touch.clientY - this.startY; + this.offsetX = Math.abs(this.deltaX); + this.offsetY = Math.abs(this.deltaY); + this.direction = + this.offsetX > this.offsetY + ? 'horizontal' + : this.offsetX < this.offsetY + ? 'vertical' + : ''; + } + } +}); diff --git a/node_modules/vant-weapp/dist/mixins/transition.d.ts b/node_modules/vant-weapp/dist/mixins/transition.d.ts new file mode 100644 index 0000000..ee7b6ca --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/transition.d.ts @@ -0,0 +1 @@ +export declare const transition: (showDefaultValue: boolean) => any; diff --git a/node_modules/vant-weapp/dist/mixins/transition.js b/node_modules/vant-weapp/dist/mixins/transition.js new file mode 100644 index 0000000..ed34e2c --- /dev/null +++ b/node_modules/vant-weapp/dist/mixins/transition.js @@ -0,0 +1,111 @@ +import { isObj } from '../common/utils'; +const getClassNames = (name) => ({ + enter: `van-${name}-enter van-${name}-enter-active enter-class enter-active-class`, + 'enter-to': `van-${name}-enter-to van-${name}-enter-active enter-to-class enter-active-class`, + leave: `van-${name}-leave van-${name}-leave-active leave-class leave-active-class`, + 'leave-to': `van-${name}-leave-to van-${name}-leave-active leave-to-class leave-active-class` +}); +const nextTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 30)); +export const transition = function (showDefaultValue) { + return Behavior({ + properties: { + customStyle: String, + // @ts-ignore + show: { + type: Boolean, + value: showDefaultValue, + observer: 'observeShow' + }, + // @ts-ignore + duration: { + type: [Number, Object], + value: 300, + observer: 'observeDuration' + }, + name: { + type: String, + value: 'fade' + } + }, + data: { + type: '', + inited: false, + display: false + }, + attached() { + if (this.data.show) { + this.enter(); + } + }, + methods: { + observeShow(value) { + if (value) { + this.enter(); + } + else { + this.leave(); + } + }, + enter() { + const { duration, name } = this.data; + const classNames = getClassNames(name); + const currentDuration = isObj(duration) ? duration.enter : duration; + this.status = 'enter'; + Promise.resolve() + .then(nextTick) + .then(() => { + this.checkStatus('enter'); + this.set({ + inited: true, + display: true, + classes: classNames.enter, + currentDuration + }); + }) + .then(nextTick) + .then(() => { + this.checkStatus('enter'); + this.set({ + classes: classNames['enter-to'] + }); + }) + .catch(() => { }); + }, + leave() { + const { duration, name } = this.data; + const classNames = getClassNames(name); + const currentDuration = isObj(duration) ? duration.leave : duration; + this.status = 'leave'; + Promise.resolve() + .then(nextTick) + .then(() => { + this.checkStatus('leave'); + this.set({ + classes: classNames.leave, + currentDuration + }); + }) + .then(() => setTimeout(() => this.onTransitionEnd(), currentDuration)) + .then(nextTick) + .then(() => { + this.checkStatus('leave'); + this.set({ + classes: classNames['leave-to'] + }); + }) + .catch(() => { }); + }, + checkStatus(status) { + if (status !== this.status) { + throw new Error(`incongruent status: ${status}`); + } + }, + onTransitionEnd() { + if (!this.data.show) { + this.set({ display: false }); + this.$emit('transitionEnd'); + } + } + } + }); +}; diff --git a/node_modules/vant-weapp/dist/nav-bar/index.d.ts b/node_modules/vant-weapp/dist/nav-bar/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/nav-bar/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/nav-bar/index.js b/node_modules/vant-weapp/dist/nav-bar/index.js new file mode 100644 index 0000000..b2aa6ca --- /dev/null +++ b/node_modules/vant-weapp/dist/nav-bar/index.js @@ -0,0 +1,29 @@ +import { VantComponent } from '../common/component'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + mixins: [safeArea({ safeAreaInsetTop: true })], + classes: ['title-class'], + props: { + title: String, + fixed: Boolean, + leftText: String, + rightText: String, + leftArrow: Boolean, + border: { + type: Boolean, + value: true + }, + zIndex: { + type: Number, + value: 120 + } + }, + methods: { + onClickLeft() { + this.$emit('click-left'); + }, + onClickRight() { + this.$emit('click-right'); + } + } +}); diff --git a/node_modules/vant-weapp/dist/nav-bar/index.json b/node_modules/vant-weapp/dist/nav-bar/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/node_modules/vant-weapp/dist/nav-bar/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/dist/nav-bar/index.wxml b/node_modules/vant-weapp/dist/nav-bar/index.wxml new file mode 100644 index 0000000..2f235b5 --- /dev/null +++ b/node_modules/vant-weapp/dist/nav-bar/index.wxml @@ -0,0 +1,37 @@ + + + + + + + {{ leftText }} + + + + + {{ title }} + + + + {{ rightText }} + + + diff --git a/node_modules/vant-weapp/dist/nav-bar/index.wxss b/node_modules/vant-weapp/dist/nav-bar/index.wxss new file mode 100644 index 0000000..8f576d3 --- /dev/null +++ b/node_modules/vant-weapp/dist/nav-bar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-nav-bar{position:relative;height:44px;line-height:44px;text-align:center;background-color:#fff;-webkit-user-select:none;user-select:none}.van-nav-bar__text{display:inline-block;padding:0 15px;margin:0 -15px;color:#1989fa;vertical-align:middle}.van-nav-bar__text--hover{background-color:#f2f3f5}.van-nav-bar__arrow{color:#1989fa;vertical-align:middle}.van-nav-bar__arrow+.van-nav-bar__text{padding-left:25px;margin-left:-20px}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar__title{max-width:60%;margin:0 auto;font-size:16px;font-weight:500}.van-nav-bar__left,.van-nav-bar__right{position:absolute;bottom:0;font-size:14px}.van-nav-bar__left{left:15px}.van-nav-bar__right{right:15px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/notice-bar/index.d.ts b/node_modules/vant-weapp/dist/notice-bar/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/notice-bar/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/notice-bar/index.js b/node_modules/vant-weapp/dist/notice-bar/index.js new file mode 100644 index 0000000..ca03f81 --- /dev/null +++ b/node_modules/vant-weapp/dist/notice-bar/index.js @@ -0,0 +1,123 @@ +import { VantComponent } from '../common/component'; +const FONT_COLOR = '#ed6a0c'; +const BG_COLOR = '#fffbe8'; +VantComponent({ + props: { + text: { + type: String, + value: '' + }, + mode: { + type: String, + value: '' + }, + url: { + type: String, + value: '' + }, + openType: { + type: String, + value: 'navigate' + }, + delay: { + type: Number, + value: 1 + }, + speed: { + type: Number, + value: 50 + }, + scrollable: { + type: Boolean, + value: true + }, + leftIcon: { + type: String, + value: '' + }, + color: { + type: String, + value: FONT_COLOR + }, + backgroundColor: { + type: String, + value: BG_COLOR + }, + wrapable: Boolean + }, + data: { + show: true + }, + watch: { + text() { + this.set({}, this.init); + } + }, + created() { + this.resetAnimation = wx.createAnimation({ + duration: 0, + timingFunction: 'linear' + }); + }, + destroyed() { + this.timer && clearTimeout(this.timer); + }, + methods: { + init() { + Promise.all([ + this.getRect('.van-notice-bar__content'), + this.getRect('.van-notice-bar__wrap') + ]).then((rects) => { + const [contentRect, wrapRect] = rects; + if (contentRect == null || + wrapRect == null || + !contentRect.width || + !wrapRect.width) { + return; + } + const { speed, scrollable, delay } = this.data; + if (scrollable && wrapRect.width < contentRect.width) { + const duration = (contentRect.width / speed) * 1000; + this.wrapWidth = wrapRect.width; + this.contentWidth = contentRect.width; + this.duration = duration; + this.animation = wx.createAnimation({ + duration, + timingFunction: 'linear', + delay + }); + this.scroll(); + } + }); + }, + scroll() { + this.timer && clearTimeout(this.timer); + this.timer = null; + this.set({ + animationData: this.resetAnimation + .translateX(this.wrapWidth) + .step() + .export() + }); + setTimeout(() => { + this.set({ + animationData: this.animation + .translateX(-this.contentWidth) + .step() + .export() + }); + }, 20); + this.timer = setTimeout(() => { + this.scroll(); + }, this.duration); + }, + onClickIcon() { + this.timer && clearTimeout(this.timer); + this.timer = null; + this.set({ show: false }); + }, + onClick(event) { + this.$emit('click', event); + } + } +}); diff --git a/node_modules/vant-weapp/dist/notice-bar/index.json b/node_modules/vant-weapp/dist/notice-bar/index.json new file mode 100644 index 0000000..a9ab393 --- /dev/null +++ b/node_modules/vant-weapp/dist/notice-bar/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/notice-bar/index.wxml b/node_modules/vant-weapp/dist/notice-bar/index.wxml new file mode 100644 index 0000000..034ce6f --- /dev/null +++ b/node_modules/vant-weapp/dist/notice-bar/index.wxml @@ -0,0 +1,35 @@ + + + + + + + + {{ text }} + + + + + + + + diff --git a/node_modules/vant-weapp/dist/notice-bar/index.wxss b/node_modules/vant-weapp/dist/notice-bar/index.wxss new file mode 100644 index 0000000..8bbc2c7 --- /dev/null +++ b/node_modules/vant-weapp/dist/notice-bar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-notice-bar{display:-webkit-flex;display:flex;height:40px;padding:0 15px;font-size:14px;line-height:24px;-webkit-align-items:center;align-items:center}.van-notice-bar--withicon{position:relative;padding-right:40px}.van-notice-bar--wrapable{height:auto;padding:8px 15px}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal}.van-notice-bar__left-icon{display:-webkit-flex;display:flex;margin-right:4px;vertical-align:middle;-webkit-align-items:center;align-items:center}.van-notice-bar__right-icon{position:absolute;top:10px;right:15px;font-size:16px}.van-notice-bar__wrap{position:relative;height:24px;overflow:hidden;-webkit-flex:1;flex:1}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/notify/index.d.ts b/node_modules/vant-weapp/dist/notify/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/notify/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/notify/index.js b/node_modules/vant-weapp/dist/notify/index.js new file mode 100644 index 0000000..5de21af --- /dev/null +++ b/node_modules/vant-weapp/dist/notify/index.js @@ -0,0 +1,45 @@ +import { VantComponent } from '../common/component'; +import { RED } from '../common/color'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + mixins: [safeArea()], + props: { + text: String, + color: { + type: String, + value: '#fff' + }, + backgroundColor: { + type: String, + value: RED + }, + duration: { + type: Number, + value: 3000 + }, + zIndex: { + type: Number, + value: 110 + } + }, + methods: { + show() { + const { duration } = this.data; + clearTimeout(this.timer); + this.set({ + show: true + }); + if (duration > 0 && duration !== Infinity) { + this.timer = setTimeout(() => { + this.hide(); + }, duration); + } + }, + hide() { + clearTimeout(this.timer); + this.set({ + show: false + }); + } + } +}); diff --git a/node_modules/vant-weapp/dist/notify/index.json b/node_modules/vant-weapp/dist/notify/index.json new file mode 100644 index 0000000..c14a65f --- /dev/null +++ b/node_modules/vant-weapp/dist/notify/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-transition": "../transition/index" + } +} diff --git a/node_modules/vant-weapp/dist/notify/index.wxml b/node_modules/vant-weapp/dist/notify/index.wxml new file mode 100644 index 0000000..96f5820 --- /dev/null +++ b/node_modules/vant-weapp/dist/notify/index.wxml @@ -0,0 +1,9 @@ + + + {{ text }} + diff --git a/node_modules/vant-weapp/dist/notify/index.wxss b/node_modules/vant-weapp/dist/notify/index.wxss new file mode 100644 index 0000000..6c2fccd --- /dev/null +++ b/node_modules/vant-weapp/dist/notify/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-notify{position:fixed;top:0;width:100%;padding:6px 15px;font-size:14px;line-height:20px;text-align:center;word-break:break-all;box-sizing:border-box}.van-notify__safe-top{height:44px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/notify/notify.d.ts b/node_modules/vant-weapp/dist/notify/notify.d.ts new file mode 100644 index 0000000..501dcd9 --- /dev/null +++ b/node_modules/vant-weapp/dist/notify/notify.d.ts @@ -0,0 +1,12 @@ +interface NotifyOptions { + text: string; + color?: string; + backgroundColor?: string; + duration?: number; + selector?: string; + context?: any; + safeAreaInsetTop?: boolean; + zIndex?: number; +} +export default function Notify(options: NotifyOptions | string): void; +export {}; diff --git a/node_modules/vant-weapp/dist/notify/notify.js b/node_modules/vant-weapp/dist/notify/notify.js new file mode 100644 index 0000000..2b89df0 --- /dev/null +++ b/node_modules/vant-weapp/dist/notify/notify.js @@ -0,0 +1,26 @@ +import { isObj } from '../common/utils'; +const defaultOptions = { + selector: '#van-notify', + duration: 3000 +}; +function parseOptions(text) { + return isObj(text) ? text : { text }; +} +function getContext() { + const pages = getCurrentPages(); + return pages[pages.length - 1]; +} +export default function Notify(options) { + options = Object.assign({}, defaultOptions, parseOptions(options)); + const context = options.context || getContext(); + const notify = context.selectComponent(options.selector); + delete options.context; + delete options.selector; + if (notify) { + notify.set(options); + notify.show(); + } + else { + console.warn('未找到 van-notify 节点,请确认 selector 及 context 是否正确'); + } +} diff --git a/node_modules/vant-weapp/dist/overlay/index.d.ts b/node_modules/vant-weapp/dist/overlay/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/overlay/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/overlay/index.js b/node_modules/vant-weapp/dist/overlay/index.js new file mode 100644 index 0000000..86819a4 --- /dev/null +++ b/node_modules/vant-weapp/dist/overlay/index.js @@ -0,0 +1,23 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + show: Boolean, + mask: Boolean, + customStyle: String, + duration: { + type: [Number, Object], + value: 300 + }, + zIndex: { + type: Number, + value: 1 + } + }, + methods: { + onClick() { + this.$emit('click'); + }, + // for prevent touchmove + noop() { } + } +}); diff --git a/node_modules/vant-weapp/dist/overlay/index.json b/node_modules/vant-weapp/dist/overlay/index.json new file mode 100644 index 0000000..c14a65f --- /dev/null +++ b/node_modules/vant-weapp/dist/overlay/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-transition": "../transition/index" + } +} diff --git a/node_modules/vant-weapp/dist/overlay/index.wxml b/node_modules/vant-weapp/dist/overlay/index.wxml new file mode 100644 index 0000000..31d222e --- /dev/null +++ b/node_modules/vant-weapp/dist/overlay/index.wxml @@ -0,0 +1,8 @@ + diff --git a/node_modules/vant-weapp/dist/overlay/index.wxss b/node_modules/vant-weapp/dist/overlay/index.wxss new file mode 100644 index 0000000..d4a466c --- /dev/null +++ b/node_modules/vant-weapp/dist/overlay/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-overlay{position:fixed;top:0;right:0;bottom:0;left:0} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/panel/index.d.ts b/node_modules/vant-weapp/dist/panel/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/panel/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/panel/index.js b/node_modules/vant-weapp/dist/panel/index.js new file mode 100644 index 0000000..e624d5e --- /dev/null +++ b/node_modules/vant-weapp/dist/panel/index.js @@ -0,0 +1,10 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + classes: ['header-class', 'footer-class'], + props: { + desc: String, + title: String, + status: String, + useFooterSlot: Boolean + } +}); diff --git a/node_modules/vant-weapp/dist/panel/index.json b/node_modules/vant-weapp/dist/panel/index.json new file mode 100644 index 0000000..0e5425c --- /dev/null +++ b/node_modules/vant-weapp/dist/panel/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index" + } +} diff --git a/node_modules/vant-weapp/dist/panel/index.wxml b/node_modules/vant-weapp/dist/panel/index.wxml new file mode 100644 index 0000000..3f135d2 --- /dev/null +++ b/node_modules/vant-weapp/dist/panel/index.wxml @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/node_modules/vant-weapp/dist/panel/index.wxss b/node_modules/vant-weapp/dist/panel/index.wxss new file mode 100644 index 0000000..79d4af7 --- /dev/null +++ b/node_modules/vant-weapp/dist/panel/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-panel{background:#fff}.van-panel__header-value{color:#f44}.van-panel__footer{padding:10px 15px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/picker-column/index.d.ts b/node_modules/vant-weapp/dist/picker-column/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/picker-column/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/picker-column/index.js b/node_modules/vant-weapp/dist/picker-column/index.js new file mode 100644 index 0000000..4b227c9 --- /dev/null +++ b/node_modules/vant-weapp/dist/picker-column/index.js @@ -0,0 +1,134 @@ +import { VantComponent } from '../common/component'; +import { isObj, range } from '../common/utils'; +const DEFAULT_DURATION = 200; +VantComponent({ + classes: ['active-class'], + props: { + valueKey: String, + className: String, + itemHeight: Number, + visibleItemCount: Number, + initialOptions: { + type: Array, + value: [] + }, + defaultIndex: { + type: Number, + value: 0 + } + }, + data: { + startY: 0, + offset: 0, + duration: 0, + startOffset: 0, + options: [], + currentIndex: 0 + }, + created() { + const { defaultIndex, initialOptions } = this.data; + this.set({ + currentIndex: defaultIndex, + options: initialOptions + }).then(() => { + this.setIndex(defaultIndex); + }); + }, + computed: { + count() { + return this.data.options.length; + }, + baseOffset() { + const { data } = this; + return (data.itemHeight * (data.visibleItemCount - 1)) / 2; + }, + wrapperStyle() { + const { data } = this; + return [ + `transition: ${data.duration}ms`, + `transform: translate3d(0, ${data.offset + data.baseOffset}px, 0)`, + `line-height: ${data.itemHeight}px` + ].join('; '); + } + }, + watch: { + defaultIndex(value) { + this.setIndex(value); + } + }, + methods: { + onTouchStart(event) { + this.set({ + startY: event.touches[0].clientY, + startOffset: this.data.offset, + duration: 0 + }); + }, + onTouchMove(event) { + const { data } = this; + const deltaY = event.touches[0].clientY - data.startY; + this.set({ + offset: range(data.startOffset + deltaY, -(data.count * data.itemHeight), data.itemHeight) + }); + }, + onTouchEnd() { + const { data } = this; + if (data.offset !== data.startOffset) { + this.set({ + duration: DEFAULT_DURATION + }); + const index = range(Math.round(-data.offset / data.itemHeight), 0, data.count - 1); + this.setIndex(index, true); + } + }, + onClickItem(event) { + const { index } = event.currentTarget.dataset; + this.setIndex(index, true); + }, + adjustIndex(index) { + const { data } = this; + index = range(index, 0, data.count); + for (let i = index; i < data.count; i++) { + if (!this.isDisabled(data.options[i])) + return i; + } + for (let i = index - 1; i >= 0; i--) { + if (!this.isDisabled(data.options[i])) + return i; + } + }, + isDisabled(option) { + return isObj(option) && option.disabled; + }, + getOptionText(option) { + const { data } = this; + return isObj(option) && data.valueKey in option + ? option[data.valueKey] + : option; + }, + setIndex(index, userAction) { + const { data } = this; + index = this.adjustIndex(index) || 0; + const offset = -index * data.itemHeight; + if (index !== data.currentIndex) { + return this.set({ offset, currentIndex: index }).then(() => { + userAction && this.$emit('change', index); + }); + } + return this.set({ offset }); + }, + setValue(value) { + const { options } = this.data; + for (let i = 0; i < options.length; i++) { + if (this.getOptionText(options[i]) === value) { + return this.setIndex(i); + } + } + return Promise.resolve(); + }, + getValue() { + const { data } = this; + return data.options[data.currentIndex]; + } + } +}); diff --git a/node_modules/vant-weapp/dist/picker-column/index.json b/node_modules/vant-weapp/dist/picker-column/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/dist/picker-column/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/picker-column/index.wxml b/node_modules/vant-weapp/dist/picker-column/index.wxml new file mode 100644 index 0000000..5d9f0ea --- /dev/null +++ b/node_modules/vant-weapp/dist/picker-column/index.wxml @@ -0,0 +1,22 @@ + + + + + {{ getOptionText(option, valueKey) }} + + diff --git a/node_modules/vant-weapp/dist/picker-column/index.wxs b/node_modules/vant-weapp/dist/picker-column/index.wxs new file mode 100644 index 0000000..3c8fc68 --- /dev/null +++ b/node_modules/vant-weapp/dist/picker-column/index.wxs @@ -0,0 +1,8 @@ +function isObj(x) { + var type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} + +module.exports = function (option, valueKey) { + return isObj(option) && option[valueKey] != null ? option[valueKey] : option; +} diff --git a/node_modules/vant-weapp/dist/picker-column/index.wxss b/node_modules/vant-weapp/dist/picker-column/index.wxss new file mode 100644 index 0000000..5142697 --- /dev/null +++ b/node_modules/vant-weapp/dist/picker-column/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-picker-column{overflow:hidden;font-size:16px;color:#999;text-align:center}.van-picker-column__item{padding:0 5px}.van-picker-column__item--selected{font-weight:500;color:#333}.van-picker-column__item--disabled{opacity:.3} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/picker/index.d.ts b/node_modules/vant-weapp/dist/picker/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/picker/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/picker/index.js b/node_modules/vant-weapp/dist/picker/index.js new file mode 100644 index 0000000..52ee623 --- /dev/null +++ b/node_modules/vant-weapp/dist/picker/index.js @@ -0,0 +1,132 @@ +import { VantComponent } from '../common/component'; +import { pickerProps } from './shared'; +VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: Object.assign({}, pickerProps, { valueKey: { + type: String, + value: 'text' + }, defaultIndex: { + type: Number, + value: 0 + }, columns: { + type: Array, + value: [], + observer(columns = []) { + this.simple = columns.length && !columns[0].values; + this.children = this.selectAllComponents('.van-picker__column'); + if (Array.isArray(this.children) && this.children.length) { + this.setColumns().catch(() => { }); + } + } + } }), + beforeCreate() { + this.children = []; + }, + methods: { + noop() { }, + setColumns() { + const { data } = this; + const columns = this.simple ? [{ values: data.columns }] : data.columns; + const stack = columns.map((column, index) => this.setColumnValues(index, column.values)); + return Promise.all(stack); + }, + emit(event) { + const { type } = event.currentTarget.dataset; + if (this.simple) { + this.$emit(type, { + value: this.getColumnValue(0), + index: this.getColumnIndex(0) + }); + } + else { + this.$emit(type, { + value: this.getValues(), + index: this.getIndexes() + }); + } + }, + onChange(event) { + if (this.simple) { + this.$emit('change', { + picker: this, + value: this.getColumnValue(0), + index: this.getColumnIndex(0) + }); + } + else { + this.$emit('change', { + picker: this, + value: this.getValues(), + index: event.currentTarget.dataset.index + }); + } + }, + // get column instance by index + getColumn(index) { + return this.children[index]; + }, + // get column value by index + getColumnValue(index) { + const column = this.getColumn(index); + return column && column.getValue(); + }, + // set column value by index + setColumnValue(index, value) { + const column = this.getColumn(index); + if (column == null) { + return Promise.reject(new Error('setColumnValue: 对应列不存在')); + } + return column.setValue(value); + }, + // get column option index by column index + getColumnIndex(columnIndex) { + return (this.getColumn(columnIndex) || {}).data.currentIndex; + }, + // set column option index by column index + setColumnIndex(columnIndex, optionIndex) { + const column = this.getColumn(columnIndex); + if (column == null) { + return Promise.reject(new Error('setColumnIndex: 对应列不存在')); + } + return column.setIndex(optionIndex); + }, + // get options of column by index + getColumnValues(index) { + return (this.children[index] || {}).data.options; + }, + // set options of column by index + setColumnValues(index, options, needReset = true) { + const column = this.children[index]; + if (column == null) { + return Promise.reject(new Error('setColumnValues: 对应列不存在')); + } + const isSame = JSON.stringify(column.data.options) === JSON.stringify(options); + if (isSame) { + return Promise.resolve(); + } + return column.set({ options }).then(() => { + if (needReset) { + column.setIndex(0); + } + }); + }, + // get values of all columns + getValues() { + return this.children.map((child) => child.getValue()); + }, + // set values of all columns + setValues(values) { + const stack = values.map((value, index) => this.setColumnValue(index, value)); + return Promise.all(stack); + }, + // get indexes of all columns + getIndexes() { + return this.children.map((child) => child.data.currentIndex); + }, + // set indexes of all columns + setIndexes(indexes) { + const stack = indexes.map((optionIndex, columnIndex) => this.setColumnIndex(columnIndex, optionIndex)); + return Promise.all(stack); + } + } +}); diff --git a/node_modules/vant-weapp/dist/picker/index.json b/node_modules/vant-weapp/dist/picker/index.json new file mode 100644 index 0000000..2fcec89 --- /dev/null +++ b/node_modules/vant-weapp/dist/picker/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "picker-column": "../picker-column/index", + "loading": "../loading/index" + } +} diff --git a/node_modules/vant-weapp/dist/picker/index.wxml b/node_modules/vant-weapp/dist/picker/index.wxml new file mode 100644 index 0000000..2a9cead --- /dev/null +++ b/node_modules/vant-weapp/dist/picker/index.wxml @@ -0,0 +1,60 @@ + + + + {{ cancelButtonText }} + + {{ title }} + + {{ confirmButtonText }} + + + + + + + + + + + + + function isSimple(columns) { + return columns.length && !columns[0].values; + } + module.exports = isSimple; + diff --git a/node_modules/vant-weapp/dist/picker/index.wxss b/node_modules/vant-weapp/dist/picker/index.wxss new file mode 100644 index 0000000..a054f3c --- /dev/null +++ b/node_modules/vant-weapp/dist/picker/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-picker{position:relative;overflow:hidden;-webkit-text-size-adjust:100%;background-color:#fff;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:-webkit-flex;display:flex;height:44px;line-height:44px;-webkit-justify-content:space-between;justify-content:space-between}.van-picker__cancel,.van-picker__confirm{padding:0 15px;font-size:14px;color:#1989fa}.van-picker__cancel--hover,.van-picker__confirm--hover{background-color:#f2f3f5}.van-picker__title{max-width:50%;font-size:16px;font-weight:500;text-align:center}.van-picker__columns{position:relative;display:-webkit-flex;display:flex}.van-picker__column{-webkit-flex:1 1;flex:1 1;width:0}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:4;display:-webkit-flex;display:flex;background-color:hsla(0,0%,100%,.9);-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-picker__frame,.van-picker__loading .van-loading{position:absolute;top:50%;left:0;z-index:1;width:100%;pointer-events:none;-webkit-transform:translateY(-50%);transform:translateY(-50%)} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/picker/shared.d.ts b/node_modules/vant-weapp/dist/picker/shared.d.ts new file mode 100644 index 0000000..c548045 --- /dev/null +++ b/node_modules/vant-weapp/dist/picker/shared.d.ts @@ -0,0 +1,21 @@ +export declare const pickerProps: { + title: StringConstructor; + loading: BooleanConstructor; + showToolbar: BooleanConstructor; + cancelButtonText: { + type: StringConstructor; + value: string; + }; + confirmButtonText: { + type: StringConstructor; + value: string; + }; + visibleItemCount: { + type: NumberConstructor; + value: number; + }; + itemHeight: { + type: NumberConstructor; + value: number; + }; +}; diff --git a/node_modules/vant-weapp/dist/picker/shared.js b/node_modules/vant-weapp/dist/picker/shared.js new file mode 100644 index 0000000..cf57d1d --- /dev/null +++ b/node_modules/vant-weapp/dist/picker/shared.js @@ -0,0 +1,21 @@ +export const pickerProps = { + title: String, + loading: Boolean, + showToolbar: Boolean, + cancelButtonText: { + type: String, + value: '取消' + }, + confirmButtonText: { + type: String, + value: '确认' + }, + visibleItemCount: { + type: Number, + value: 5 + }, + itemHeight: { + type: Number, + value: 44 + } +}; diff --git a/node_modules/vant-weapp/dist/popup/index.d.ts b/node_modules/vant-weapp/dist/popup/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/popup/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/popup/index.js b/node_modules/vant-weapp/dist/popup/index.js new file mode 100644 index 0000000..e9f956b --- /dev/null +++ b/node_modules/vant-weapp/dist/popup/index.js @@ -0,0 +1,60 @@ +import { VantComponent } from '../common/component'; +import { transition } from '../mixins/transition'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + classes: [ + 'enter-class', + 'enter-active-class', + 'enter-to-class', + 'leave-class', + 'leave-active-class', + 'leave-to-class' + ], + mixins: [transition(false), safeArea()], + props: { + transition: { + type: String, + observer: 'observeClass' + }, + customStyle: String, + overlayStyle: String, + zIndex: { + type: Number, + value: 100 + }, + overlay: { + type: Boolean, + value: true + }, + closeOnClickOverlay: { + type: Boolean, + value: true + }, + position: { + type: String, + value: 'center', + observer: 'observeClass' + } + }, + created() { + this.observeClass(); + }, + methods: { + onClickOverlay() { + this.$emit('click-overlay'); + if (this.data.closeOnClickOverlay) { + this.$emit('close'); + } + }, + observeClass() { + const { transition, position } = this.data; + const updateData = { + name: transition || position + }; + if (transition === 'none') { + updateData.duration = 0; + } + this.set(updateData); + } + } +}); diff --git a/node_modules/vant-weapp/dist/popup/index.json b/node_modules/vant-weapp/dist/popup/index.json new file mode 100644 index 0000000..0dd2931 --- /dev/null +++ b/node_modules/vant-weapp/dist/popup/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-overlay": "../overlay/index" + } +} diff --git a/node_modules/vant-weapp/dist/popup/index.wxml b/node_modules/vant-weapp/dist/popup/index.wxml new file mode 100644 index 0000000..414d1c7 --- /dev/null +++ b/node_modules/vant-weapp/dist/popup/index.wxml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/node_modules/vant-weapp/dist/popup/index.wxss b/node_modules/vant-weapp/dist/popup/index.wxss new file mode 100644 index 0000000..0f7a49d --- /dev/null +++ b/node_modules/vant-weapp/dist/popup/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-popup{position:fixed;top:50%;left:50%;max-height:100%;overflow-y:auto;background-color:#fff;box-sizing:border-box;-webkit-animation:ease both;animation:ease both;-webkit-overflow-scrolling:touch;transition-timing-function:ease}.van-popup--center{-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-popup--top{top:0;right:auto;bottom:auto;left:50%;width:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-popup--right{top:50%;right:0;bottom:auto;left:auto;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--bottom{top:auto;right:auto;bottom:0;left:50%;width:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-popup--left{top:50%;right:auto;bottom:auto;left:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--bottom.van-popup--safe{padding-bottom:34px}.van-popup--left .van-popup__safe-top,.van-popup--right .van-popup__safe-top,.van-popup--top .van-popup__safe-top{height:44px}.van-popup--bottom .van-popup__safe-top,.van-popup--center .van-popup__safe-top{padding-top:0!important}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-scale-enter,.van-scale-leave-to{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-bottom-enter,.van-bottom-leave-to{-webkit-transform:translate3d(-50%,100%,0);transform:translate3d(-50%,100%,0)}.van-top-enter,.van-top-leave-to{-webkit-transform:translate3d(-50%,-100%,0);transform:translate3d(-50%,-100%,0)}.van-left-enter,.van-left-leave-to{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/progress/index.d.ts b/node_modules/vant-weapp/dist/progress/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/progress/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/progress/index.js b/node_modules/vant-weapp/dist/progress/index.js new file mode 100644 index 0000000..82b9f10 --- /dev/null +++ b/node_modules/vant-weapp/dist/progress/index.js @@ -0,0 +1,22 @@ +import { VantComponent } from '../common/component'; +import { BLUE } from '../common/color'; +VantComponent({ + props: { + inactive: Boolean, + percentage: Number, + pivotText: String, + pivotColor: String, + showPivot: { + type: Boolean, + value: true + }, + color: { + type: String, + value: BLUE + }, + textColor: { + type: String, + value: '#fff' + } + } +}); diff --git a/node_modules/vant-weapp/dist/progress/index.json b/node_modules/vant-weapp/dist/progress/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/dist/progress/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/dist/progress/index.wxml b/node_modules/vant-weapp/dist/progress/index.wxml new file mode 100644 index 0000000..a810ef0 --- /dev/null +++ b/node_modules/vant-weapp/dist/progress/index.wxml @@ -0,0 +1,16 @@ + + + + + + {{ getters.text(pivotText, percentage) }} + + + diff --git a/node_modules/vant-weapp/dist/progress/index.wxs b/node_modules/vant-weapp/dist/progress/index.wxs new file mode 100644 index 0000000..d685345 --- /dev/null +++ b/node_modules/vant-weapp/dist/progress/index.wxs @@ -0,0 +1,5 @@ +module.exports = { + text: function(pivotText, percentage) { + return pivotText || percentage + '%'; + } +}; diff --git a/node_modules/vant-weapp/dist/progress/index.wxss b/node_modules/vant-weapp/dist/progress/index.wxss new file mode 100644 index 0000000..a448a8a --- /dev/null +++ b/node_modules/vant-weapp/dist/progress/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-progress{position:relative;height:4px;background:#e5e5e5;border-radius:4px}.van-progress__portion{position:absolute;left:0;height:100%;border-radius:inherit}.van-progress__pivot{position:absolute;top:50%;right:0;min-width:2em;padding:0 5px;font-size:10px;line-height:1.6;text-align:center;word-break:keep-all;background-color:#e5e5e5;border-radius:1em;-webkit-transform:translateY(-50%);transform:translateY(-50%);box-sizing:border-box} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/radio-group/index.d.ts b/node_modules/vant-weapp/dist/radio-group/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/radio-group/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/radio-group/index.js b/node_modules/vant-weapp/dist/radio-group/index.js new file mode 100644 index 0000000..fc22459 --- /dev/null +++ b/node_modules/vant-weapp/dist/radio-group/index.js @@ -0,0 +1,38 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + relation: { + name: 'radio', + type: 'descendant', + linked(target) { + this.children = this.children || []; + this.children.push(target); + this.updateChild(target); + }, + unlinked(target) { + this.children = this.children.filter((child) => child !== target); + } + }, + props: { + value: { + type: null, + observer: 'updateChildren' + }, + disabled: { + type: Boolean, + observer: 'updateChildren' + } + }, + methods: { + updateChildren() { + (this.children || []).forEach((child) => this.updateChild(child)); + }, + updateChild(child) { + const { value, disabled } = this.data; + child.set({ + value, + disabled: disabled || child.data.disabled + }); + } + } +}); diff --git a/node_modules/vant-weapp/dist/radio-group/index.json b/node_modules/vant-weapp/dist/radio-group/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/dist/radio-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/dist/radio-group/index.wxml b/node_modules/vant-weapp/dist/radio-group/index.wxml new file mode 100644 index 0000000..4fa864c --- /dev/null +++ b/node_modules/vant-weapp/dist/radio-group/index.wxml @@ -0,0 +1 @@ + diff --git a/node_modules/vant-weapp/dist/radio-group/index.wxss b/node_modules/vant-weapp/dist/radio-group/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/node_modules/vant-weapp/dist/radio-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/radio/index.d.ts b/node_modules/vant-weapp/dist/radio/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/radio/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/radio/index.js b/node_modules/vant-weapp/dist/radio/index.js new file mode 100644 index 0000000..6e31448 --- /dev/null +++ b/node_modules/vant-weapp/dist/radio/index.js @@ -0,0 +1,47 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + relation: { + name: 'radio-group', + type: 'ancestor', + linked(target) { + this.parent = target; + }, + unlinked() { + this.parent = null; + } + }, + classes: ['icon-class', 'label-class'], + props: { + value: null, + disabled: Boolean, + useIconSlot: Boolean, + checkedColor: String, + labelPosition: { + type: String, + value: 'right' + }, + labelDisabled: Boolean, + shape: { + type: String, + value: 'round' + } + }, + methods: { + emitChange(value) { + const instance = this.parent || this; + instance.$emit('input', value); + instance.$emit('change', value); + }, + onChange(event) { + console.log(event); + this.emitChange(this.data.name); + }, + onClickLabel() { + const { disabled, labelDisabled, name } = this.data; + if (!disabled && !labelDisabled) { + this.emitChange(name); + } + } + } +}); diff --git a/node_modules/vant-weapp/dist/radio/index.json b/node_modules/vant-weapp/dist/radio/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/node_modules/vant-weapp/dist/radio/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/dist/radio/index.wxml b/node_modules/vant-weapp/dist/radio/index.wxml new file mode 100644 index 0000000..c681916 --- /dev/null +++ b/node_modules/vant-weapp/dist/radio/index.wxml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/node_modules/vant-weapp/dist/radio/index.wxss b/node_modules/vant-weapp/dist/radio/index.wxss new file mode 100644 index 0000000..cb1b36a --- /dev/null +++ b/node_modules/vant-weapp/dist/radio/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-radio{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap,.van-radio__label{line-height:20px}.van-radio__icon-wrap{-webkit-flex:none;flex:none}.van-radio__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-radio__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-radio__icon--disabled.van-radio__icon--checked{color:#c9c9c9}.van-radio__label{margin-left:10px;color:#333;word-break:break-all}.van-radio__label--left{float:left;margin:0 10px 0 0}.van-radio__label--disabled{color:#c9c9c9}.van-radio__label:empty{margin:0} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/rate/index.d.ts b/node_modules/vant-weapp/dist/rate/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/rate/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/rate/index.js b/node_modules/vant-weapp/dist/rate/index.js new file mode 100644 index 0000000..534b0ae --- /dev/null +++ b/node_modules/vant-weapp/dist/rate/index.js @@ -0,0 +1,74 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + classes: ['icon-class'], + props: { + value: Number, + readonly: Boolean, + disabled: Boolean, + allowHalf: Boolean, + size: { + type: Number, + value: 20 + }, + icon: { + type: String, + value: 'star' + }, + voidIcon: { + type: String, + value: 'star-o' + }, + color: { + type: String, + value: '#ffd21e' + }, + voidColor: { + type: String, + value: '#c7c7c7' + }, + disabledColor: { + type: String, + value: '#bdbdbd' + }, + count: { + type: Number, + value: 5 + } + }, + data: { + innerValue: 0 + }, + watch: { + value(value) { + if (value !== this.data.innerValue) { + this.set({ innerValue: value }); + } + } + }, + methods: { + onSelect(event) { + const { data } = this; + const { score } = event.currentTarget.dataset; + if (!data.disabled && !data.readonly) { + this.set({ innerValue: score + 1 }); + this.$emit('input', score + 1); + this.$emit('change', score + 1); + } + }, + onTouchMove(event) { + const { clientX, clientY } = event.touches[0]; + this.getRect('.van-rate__icon', true).then((list) => { + const target = list + .sort(item => item.right - item.left) + .find(item => clientX >= item.left && + clientX <= item.right && + clientY >= item.top && + clientY <= item.bottom); + if (target != null) { + this.onSelect(Object.assign({}, event, { currentTarget: target })); + } + }); + } + } +}); diff --git a/node_modules/vant-weapp/dist/rate/index.json b/node_modules/vant-weapp/dist/rate/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/node_modules/vant-weapp/dist/rate/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/dist/rate/index.wxml b/node_modules/vant-weapp/dist/rate/index.wxml new file mode 100644 index 0000000..fc0d320 --- /dev/null +++ b/node_modules/vant-weapp/dist/rate/index.wxml @@ -0,0 +1,32 @@ + + + + + + + + + diff --git a/node_modules/vant-weapp/dist/rate/index.wxss b/node_modules/vant-weapp/dist/rate/index.wxss new file mode 100644 index 0000000..93edcc0 --- /dev/null +++ b/node_modules/vant-weapp/dist/rate/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-rate{-webkit-user-select:none;user-select:none}.van-rate__item{position:relative;display:inline-block;padding:0 2px}.van-rate__icon{display:block;height:1em}.van-rate__icon--half{position:absolute;top:0;left:2px;width:.5em;overflow:hidden} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/row/index.d.ts b/node_modules/vant-weapp/dist/row/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/row/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/row/index.js b/node_modules/vant-weapp/dist/row/index.js new file mode 100644 index 0000000..4f92485 --- /dev/null +++ b/node_modules/vant-weapp/dist/row/index.js @@ -0,0 +1,36 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + relation: { + name: 'col', + type: 'descendant', + linked(target) { + if (this.data.gutter) { + target.setGutter(this.data.gutter); + } + } + }, + props: { + gutter: Number + }, + watch: { + gutter: 'setGutter' + }, + mounted() { + if (this.data.gutter) { + this.setGutter(); + } + }, + methods: { + setGutter() { + const { gutter } = this.data; + const margin = `-${Number(gutter) / 2}px`; + const style = gutter + ? `margin-right: ${margin}; margin-left: ${margin};` + : ''; + this.set({ style }); + this.getRelationNodes('../col/index').forEach(col => { + col.setGutter(this.data.gutter); + }); + } + } +}); diff --git a/node_modules/vant-weapp/dist/row/index.json b/node_modules/vant-weapp/dist/row/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/dist/row/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/dist/row/index.wxml b/node_modules/vant-weapp/dist/row/index.wxml new file mode 100644 index 0000000..20c5366 --- /dev/null +++ b/node_modules/vant-weapp/dist/row/index.wxml @@ -0,0 +1,3 @@ + + + diff --git a/node_modules/vant-weapp/dist/row/index.wxss b/node_modules/vant-weapp/dist/row/index.wxss new file mode 100644 index 0000000..9a46c3f --- /dev/null +++ b/node_modules/vant-weapp/dist/row/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-row:after{content:"";display:table;clear:both} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/search/index.d.ts b/node_modules/vant-weapp/dist/search/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/search/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/search/index.js b/node_modules/vant-weapp/dist/search/index.js new file mode 100644 index 0000000..5aff677 --- /dev/null +++ b/node_modules/vant-weapp/dist/search/index.js @@ -0,0 +1,62 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + classes: ['field-class', 'input-class', 'cancel-class'], + props: { + label: String, + focus: Boolean, + error: Boolean, + disabled: Boolean, + readonly: Boolean, + inputAlign: String, + showAction: Boolean, + useActionSlot: Boolean, + placeholder: String, + placeholderStyle: String, + background: { + type: String, + value: '#ffffff' + }, + maxlength: { + type: Number, + value: -1 + }, + shape: { + type: String, + value: 'square' + }, + clearable: { + type: Boolean, + value: true + } + }, + methods: { + onChange(event) { + this.set({ value: event.detail }); + this.$emit('change', event.detail); + }, + onCancel() { + /** + * 修复修改输入框值时,输入框失焦和赋值同时触发,赋值失效 + * // https://github.com/youzan/vant-weapp/issues/1768 + */ + setTimeout(() => { + this.set({ value: '' }); + this.$emit('cancel'); + this.$emit('change', ''); + }, 200); + }, + onSearch() { + this.$emit('search', this.data.value); + }, + onFocus() { + this.$emit('focus'); + }, + onBlur() { + this.$emit('blur'); + }, + onClear() { + this.$emit('clear'); + }, + } +}); diff --git a/node_modules/vant-weapp/dist/search/index.json b/node_modules/vant-weapp/dist/search/index.json new file mode 100644 index 0000000..b4cfe91 --- /dev/null +++ b/node_modules/vant-weapp/dist/search/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-field": "../field/index" + } +} diff --git a/node_modules/vant-weapp/dist/search/index.wxml b/node_modules/vant-weapp/dist/search/index.wxml new file mode 100644 index 0000000..12ad1be --- /dev/null +++ b/node_modules/vant-weapp/dist/search/index.wxml @@ -0,0 +1,46 @@ + + + + + {{ label }} + + + + + + + + 取消 + + diff --git a/node_modules/vant-weapp/dist/search/index.wxss b/node_modules/vant-weapp/dist/search/index.wxss new file mode 100644 index 0000000..8544516 --- /dev/null +++ b/node_modules/vant-weapp/dist/search/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-search{padding:10px 16px;-webkit-align-items:center;align-items:center;box-sizing:border-box}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{padding-left:10px;background-color:#f7f8fa;border-radius:2px;-webkit-flex:1;flex:1}.van-search__content--round{border-radius:17px}.van-search__label{padding:0 5px;font-size:14px;line-height:34px;color:#333}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#999}.van-search--withaction{padding-right:0}.van-search__action{padding:0 10px;font-size:14px;line-height:34px;color:#333}.van-search__action--hover{background-color:#f2f3f5} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/slider/index.d.ts b/node_modules/vant-weapp/dist/slider/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/slider/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/slider/index.js b/node_modules/vant-weapp/dist/slider/index.js new file mode 100644 index 0000000..4d82657 --- /dev/null +++ b/node_modules/vant-weapp/dist/slider/index.js @@ -0,0 +1,87 @@ +import { VantComponent } from '../common/component'; +import { touch } from '../mixins/touch'; +VantComponent({ + mixins: [touch], + props: { + disabled: Boolean, + useButtonSlot: Boolean, + activeColor: String, + inactiveColor: String, + max: { + type: Number, + value: 100 + }, + min: { + type: Number, + value: 0 + }, + step: { + type: Number, + value: 1 + }, + value: { + type: Number, + value: 0 + }, + barHeight: { + type: String, + value: '2px' + } + }, + watch: { + value(value) { + this.updateValue(value, false); + } + }, + created() { + this.updateValue(this.data.value); + }, + methods: { + onTouchStart(event) { + if (this.data.disabled) + return; + this.touchStart(event); + this.startValue = this.format(this.data.value); + }, + onTouchMove(event) { + if (this.data.disabled) + return; + this.touchMove(event); + this.getRect('.van-slider').then((rect) => { + const diff = this.deltaX / rect.width * 100; + this.newValue = this.startValue + diff; + this.updateValue(this.newValue, false, true); + }); + }, + onTouchEnd() { + if (this.data.disabled) + return; + this.updateValue(this.newValue, true); + }, + onClick(event) { + if (this.data.disabled) + return; + this.getRect('.van-slider').then((rect) => { + const value = (event.detail.x - rect.left) / rect.width * 100; + this.updateValue(value, true); + }); + }, + updateValue(value, end, drag) { + value = this.format(value); + this.set({ + value, + barStyle: `width: ${value}%; height: ${this.data.barHeight};` + }); + if (drag) { + this.$emit('drag', { value }); + } + if (end) { + this.$emit('change', value); + } + }, + format(value) { + const { max, min, step } = this.data; + return Math.round(Math.max(min, Math.min(value, max)) / step) * step; + } + } +}); diff --git a/node_modules/vant-weapp/dist/slider/index.json b/node_modules/vant-weapp/dist/slider/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/dist/slider/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/dist/slider/index.wxml b/node_modules/vant-weapp/dist/slider/index.wxml new file mode 100644 index 0000000..d30d078 --- /dev/null +++ b/node_modules/vant-weapp/dist/slider/index.wxml @@ -0,0 +1,29 @@ + + + + + + + + + + diff --git a/node_modules/vant-weapp/dist/slider/index.wxss b/node_modules/vant-weapp/dist/slider/index.wxss new file mode 100644 index 0000000..f227c66 --- /dev/null +++ b/node_modules/vant-weapp/dist/slider/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-slider{position:relative;border-radius:999px;background-color:#e5e5e5}.van-slider__bar{position:relative;border-radius:inherit;background-color:#1989fa}.van-slider__button{width:20px;height:20px;border-radius:50%;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.5)}.van-slider__button-wrapper{position:absolute;top:50%;right:0;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper:after{content:"";position:absolute;width:200%;height:200%;top:-50%;left:-50%}.van-slider--disabled{opacity:.3} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/stepper/index.d.ts b/node_modules/vant-weapp/dist/stepper/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/stepper/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/stepper/index.js b/node_modules/vant-weapp/dist/stepper/index.js new file mode 100644 index 0000000..0bae326 --- /dev/null +++ b/node_modules/vant-weapp/dist/stepper/index.js @@ -0,0 +1,105 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + classes: [ + 'input-class', + 'plus-class', + 'minus-class' + ], + props: { + value: null, + integer: Boolean, + disabled: Boolean, + inputWidth: String, + asyncChange: Boolean, + disableInput: Boolean, + min: { + type: null, + value: 1 + }, + max: { + type: null, + value: Number.MAX_SAFE_INTEGER + }, + step: { + type: null, + value: 1 + }, + showPlus: { + type: Boolean, + value: true + }, + showMinus: { + type: Boolean, + value: true + } + }, + computed: { + minusDisabled() { + return this.data.disabled || this.data.value <= this.data.min; + }, + plusDisabled() { + return this.data.disabled || this.data.value >= this.data.max; + } + }, + watch: { + value(value) { + if (value === '') { + return; + } + const newValue = this.range(value); + if (typeof newValue === 'number' && +this.data.value !== newValue) { + this.set({ value: newValue }); + } + } + }, + data: { + focus: false + }, + created() { + this.set({ + value: this.range(this.data.value) + }); + }, + methods: { + onFocus(event) { + this.$emit('focus', event.detail); + }, + onBlur(event) { + const value = this.range(this.data.value); + this.triggerInput(value); + this.$emit('blur', event.detail); + }, + // limit value range + range(value) { + value = String(value).replace(/[^0-9.-]/g, ''); + return Math.max(Math.min(this.data.max, value), this.data.min); + }, + onInput(event) { + const { value = '' } = event.detail || {}; + this.triggerInput(value); + }, + onChange(type) { + if (this.data[`${type}Disabled`]) { + this.$emit('overlimit', type); + return; + } + const diff = type === 'minus' ? -this.data.step : +this.data.step; + const value = Math.round((+this.data.value + diff) * 100) / 100; + this.triggerInput(this.range(value)); + this.$emit(type); + }, + onMinus() { + this.onChange('minus'); + }, + onPlus() { + this.onChange('plus'); + }, + triggerInput(value) { + this.set({ + value: this.data.asyncChange ? this.data.value : value + }); + this.$emit('change', value); + } + } +}); diff --git a/node_modules/vant-weapp/dist/stepper/index.json b/node_modules/vant-weapp/dist/stepper/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/dist/stepper/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/stepper/index.wxml b/node_modules/vant-weapp/dist/stepper/index.wxml new file mode 100644 index 0000000..33c257e --- /dev/null +++ b/node_modules/vant-weapp/dist/stepper/index.wxml @@ -0,0 +1,29 @@ + + + + + + + diff --git a/node_modules/vant-weapp/dist/stepper/index.wxss b/node_modules/vant-weapp/dist/stepper/index.wxss new file mode 100644 index 0000000..e681a77 --- /dev/null +++ b/node_modules/vant-weapp/dist/stepper/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__minus,.van-stepper__plus{position:relative;display:inline-block;width:28px;height:28px;padding:5px;margin:1px;vertical-align:middle;background-color:#f2f3f5;border:0;box-sizing:border-box}.van-stepper__minus:before,.van-stepper__plus:before{width:9px;height:1px}.van-stepper__minus:after,.van-stepper__plus:after{width:1px;height:9px}.van-stepper__minus:after,.van-stepper__minus:before,.van-stepper__plus:after,.van-stepper__plus:before{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;background-color:#333;content:""}.van-stepper__minus--hover,.van-stepper__plus--hover{background-color:#e8e8e8}.van-stepper__minus--disabled,.van-stepper__plus--disabled{background-color:#f7f8fa}.van-stepper__minus--disabled:after,.van-stepper__minus--disabled:before,.van-stepper__plus--disabled:after,.van-stepper__plus--disabled:before{background-color:#c9c9c9}.van-stepper__minus--disabled.van-stepper__minus--hover,.van-stepper__minus--disabled.van-stepper__plus--hover,.van-stepper__plus--disabled.van-stepper__minus--hover,.van-stepper__plus--disabled.van-stepper__plus--hover{background-color:#f7f8fa}.van-stepper__minus{border-radius:4px 0 0 4px}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 4px 4px 0}.van-stepper__input{display:inline-block;width:30px;height:26px;padding:1px;margin:1px;font-size:14px;color:#333;text-align:center;vertical-align:middle;background-color:#f2f3f5;border:0;border-width:1px 0;border-radius:0;box-sizing:initial;-webkit-appearance:none}.van-stepper__input--disabled{color:#c9c9c9;background-color:#f2f3f5} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/steps/index.d.ts b/node_modules/vant-weapp/dist/steps/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/steps/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/steps/index.js b/node_modules/vant-weapp/dist/steps/index.js new file mode 100644 index 0000000..6d236d1 --- /dev/null +++ b/node_modules/vant-weapp/dist/steps/index.js @@ -0,0 +1,17 @@ +import { VantComponent } from '../common/component'; +import { GREEN } from '../common/color'; +VantComponent({ + props: { + icon: String, + steps: Array, + active: Number, + direction: { + type: String, + value: 'horizontal' + }, + activeColor: { + type: String, + value: GREEN + } + } +}); diff --git a/node_modules/vant-weapp/dist/steps/index.json b/node_modules/vant-weapp/dist/steps/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/node_modules/vant-weapp/dist/steps/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/dist/steps/index.wxml b/node_modules/vant-weapp/dist/steps/index.wxml new file mode 100644 index 0000000..508705d --- /dev/null +++ b/node_modules/vant-weapp/dist/steps/index.wxml @@ -0,0 +1,35 @@ + + + + + + + {{ item.text }} + {{ item.desc }} + + + + + + + + + + + +function get(index, active) { + if (index < active) { + return 'finish'; + } else if (index === active) { + return 'process'; + } + + return ''; +} + +module.exports = get; + diff --git a/node_modules/vant-weapp/dist/steps/index.wxss b/node_modules/vant-weapp/dist/steps/index.wxss new file mode 100644 index 0000000..8ffab00 --- /dev/null +++ b/node_modules/vant-weapp/dist/steps/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;color:#999}.van-step--finish{color:#333}.van-step__circle{width:5px;height:5px;background-color:#999;border-radius:50%}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;padding:0 8px;background-color:#fff;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0)}.van-step--horizontal .van-step__title{display:inline-block;font-size:12px;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:1px;background-color:#eee;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:#333}.van-step--horizontal.van-step--process .van-step__active{display:block;font-size:12px;line-height:1}.van-step--vertical{padding:10px 10px 10px 0;font-size:14px;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;background-color:#fff;content:""}.van-step--vertical .van-step__active,.van-step--vertical .van-step__circle,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__active{font-size:12px;line-height:1}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;background-color:#eee;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/submit-bar/index.d.ts b/node_modules/vant-weapp/dist/submit-bar/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/submit-bar/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/submit-bar/index.js b/node_modules/vant-weapp/dist/submit-bar/index.js new file mode 100644 index 0000000..138c7fc --- /dev/null +++ b/node_modules/vant-weapp/dist/submit-bar/index.js @@ -0,0 +1,55 @@ +import { VantComponent } from '../common/component'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + mixins: [safeArea()], + classes: [ + 'bar-class', + 'price-class', + 'button-class' + ], + props: { + tip: { + type: null, + observer: 'updateTip' + }, + tipIcon: String, + type: Number, + price: { + type: null, + observer: 'updatePrice' + }, + label: String, + loading: Boolean, + disabled: Boolean, + buttonText: String, + currency: { + type: String, + value: '¥' + }, + buttonType: { + type: String, + value: 'danger' + }, + decimalLength: { + type: Number, + value: 2, + observer: 'updatePrice' + }, + suffixLabel: String + }, + methods: { + updatePrice() { + const { price, decimalLength } = this.data; + this.set({ + hasPrice: typeof price === 'number', + priceStr: (price / 100).toFixed(decimalLength) + }); + }, + updateTip() { + this.set({ hasTip: typeof this.data.tip === 'string' }); + }, + onSubmit(event) { + this.$emit('submit', event.detail); + } + } +}); diff --git a/node_modules/vant-weapp/dist/submit-bar/index.json b/node_modules/vant-weapp/dist/submit-bar/index.json new file mode 100644 index 0000000..bda9b8d --- /dev/null +++ b/node_modules/vant-weapp/dist/submit-bar/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-button": "../button/index", + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/dist/submit-bar/index.wxml b/node_modules/vant-weapp/dist/submit-bar/index.wxml new file mode 100644 index 0000000..a9c7f0e --- /dev/null +++ b/node_modules/vant-weapp/dist/submit-bar/index.wxml @@ -0,0 +1,42 @@ + + + + + + + + + {{ tip }} + + + + + + + + {{ label || '合计:' }} + + {{ currency }} + {{ priceStr }} + + {{ suffixLabel }} + + + {{ loading ? '' : buttonText }} + + + diff --git a/node_modules/vant-weapp/dist/submit-bar/index.wxss b/node_modules/vant-weapp/dist/submit-bar/index.wxss new file mode 100644 index 0000000..7e4694b --- /dev/null +++ b/node_modules/vant-weapp/dist/submit-bar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-submit-bar{position:fixed;bottom:0;left:0;z-index:100;width:100%;-webkit-user-select:none;user-select:none}.van-submit-bar__tip{padding:10px;font-size:12px;line-height:1.5;color:#f56723;background-color:#fff7cc}.van-submit-bar__tip:empty{display:none}.van-submit-bar__tip-icon{width:12px;height:12px;margin-right:4px;vertical-align:middle}.van-submit-bar__tip-text{display:inline;vertical-align:middle}.van-submit-bar__bar{display:-webkit-flex;display:flex;height:50px;font-size:14px;background-color:#fff;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end}.van-submit-bar__bar--safe{padding-bottom:34px}.van-submit-bar__text{padding-right:12px;font-weight:500;color:#333;-webkit-flex:1;flex:1;text-align:right}.van-submit-bar__price{font-size:18px;color:#f44}.van-submit-bar__currency{font-size:14px}.van-submit-bar__suffix-label{margin-left:5px}.van-submit-bar__button{width:110px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/swipe-cell/index.d.ts b/node_modules/vant-weapp/dist/swipe-cell/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/swipe-cell/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/swipe-cell/index.js b/node_modules/vant-weapp/dist/swipe-cell/index.js new file mode 100644 index 0000000..f09d73c --- /dev/null +++ b/node_modules/vant-weapp/dist/swipe-cell/index.js @@ -0,0 +1,113 @@ +import { VantComponent } from '../common/component'; +import { touch } from '../mixins/touch'; +const THRESHOLD = 0.3; +VantComponent({ + props: { + disabled: Boolean, + leftWidth: { + type: Number, + value: 0 + }, + rightWidth: { + type: Number, + value: 0 + }, + asyncClose: Boolean + }, + mixins: [touch], + data: { + catchMove: false + }, + created() { + this.offset = 0; + }, + methods: { + open(position) { + const { leftWidth, rightWidth } = this.data; + const offset = position === 'left' ? leftWidth : -rightWidth; + this.swipeMove(offset); + }, + close() { + this.swipeMove(0); + }, + swipeMove(offset = 0) { + this.offset = offset; + const transform = `translate3d(${offset}px, 0, 0)`; + const transition = this.draging + ? 'none' + : '.6s cubic-bezier(0.18, 0.89, 0.32, 1)'; + this.set({ + wrapperStyle: ` + -webkit-transform: ${transform}; + -webkit-transition: ${transition}; + transform: ${transform}; + transition: ${transition}; + ` + }); + }, + swipeLeaveTransition() { + const { leftWidth, rightWidth } = this.data; + const { offset } = this; + if (rightWidth > 0 && -offset > rightWidth * THRESHOLD) { + this.open('right'); + } + else if (leftWidth > 0 && offset > leftWidth * THRESHOLD) { + this.open('left'); + } + else { + this.swipeMove(0); + } + this.set({ catchMove: false }); + }, + startDrag(event) { + if (this.data.disabled) { + return; + } + this.draging = true; + this.startOffset = this.offset; + this.firstDirection = ''; + this.touchStart(event); + }, + noop() { }, + onDrag(event) { + if (this.data.disabled) { + return; + } + this.touchMove(event); + if (!this.firstDirection) { + this.firstDirection = this.direction; + this.set({ catchMove: this.firstDirection === 'horizontal' }); + } + if (this.firstDirection === 'vertical') { + return; + } + const { leftWidth, rightWidth } = this.data; + const offset = this.startOffset + this.deltaX; + if ((rightWidth > 0 && -offset > rightWidth) || + (leftWidth > 0 && offset > leftWidth)) { + return; + } + this.swipeMove(offset); + }, + endDrag() { + if (this.data.disabled) { + return; + } + this.draging = false; + this.swipeLeaveTransition(); + }, + onClick(event) { + const { key: position = 'outside' } = event.currentTarget.dataset; + this.$emit('click', position); + if (!this.offset) { + return; + } + if (this.data.asyncClose) { + this.$emit('close', { position, instance: this }); + } + else { + this.swipeMove(0); + } + } + } +}); diff --git a/node_modules/vant-weapp/dist/swipe-cell/index.json b/node_modules/vant-weapp/dist/swipe-cell/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/dist/swipe-cell/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/dist/swipe-cell/index.wxml b/node_modules/vant-weapp/dist/swipe-cell/index.wxml new file mode 100644 index 0000000..0ce1e47 --- /dev/null +++ b/node_modules/vant-weapp/dist/swipe-cell/index.wxml @@ -0,0 +1,20 @@ + + + + + + + + + + + diff --git a/node_modules/vant-weapp/dist/swipe-cell/index.wxss b/node_modules/vant-weapp/dist/swipe-cell/index.wxss new file mode 100644 index 0000000..d615270 --- /dev/null +++ b/node_modules/vant-weapp/dist/swipe-cell/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-swipe-cell{position:relative;overflow:hidden}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/switch-cell/index.d.ts b/node_modules/vant-weapp/dist/switch-cell/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/switch-cell/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/switch-cell/index.js b/node_modules/vant-weapp/dist/switch-cell/index.js new file mode 100644 index 0000000..608ce72 --- /dev/null +++ b/node_modules/vant-weapp/dist/switch-cell/index.js @@ -0,0 +1,42 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + props: { + value: null, + icon: String, + title: String, + label: String, + border: Boolean, + checked: Boolean, + loading: Boolean, + disabled: Boolean, + activeColor: String, + inactiveColor: String, + useLabelSlot: Boolean, + size: { + type: String, + value: '24px' + }, + activeValue: { + type: null, + value: true + }, + inactiveValue: { + type: null, + value: false + } + }, + watch: { + checked(value) { + this.set({ value }); + } + }, + created() { + this.set({ value: this.data.checked }); + }, + methods: { + onChange(event) { + this.$emit('change', event.detail); + } + } +}); diff --git a/node_modules/vant-weapp/dist/switch-cell/index.json b/node_modules/vant-weapp/dist/switch-cell/index.json new file mode 100644 index 0000000..22e5342 --- /dev/null +++ b/node_modules/vant-weapp/dist/switch-cell/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index", + "van-switch": "../switch/index" + } +} diff --git a/node_modules/vant-weapp/dist/switch-cell/index.wxml b/node_modules/vant-weapp/dist/switch-cell/index.wxml new file mode 100644 index 0000000..49a653e --- /dev/null +++ b/node_modules/vant-weapp/dist/switch-cell/index.wxml @@ -0,0 +1,25 @@ + + + + + + diff --git a/node_modules/vant-weapp/dist/switch-cell/index.wxss b/node_modules/vant-weapp/dist/switch-cell/index.wxss new file mode 100644 index 0000000..2ad612e --- /dev/null +++ b/node_modules/vant-weapp/dist/switch-cell/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-switch-cell{padding-top:9px;padding-bottom:9px}.van-switch-cell__switch{vertical-align:middle} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/switch/index.d.ts b/node_modules/vant-weapp/dist/switch/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/switch/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/switch/index.js b/node_modules/vant-weapp/dist/switch/index.js new file mode 100644 index 0000000..77d1559 --- /dev/null +++ b/node_modules/vant-weapp/dist/switch/index.js @@ -0,0 +1,43 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + classes: ['node-class'], + props: { + checked: null, + loading: Boolean, + disabled: Boolean, + activeColor: String, + inactiveColor: String, + size: { + type: String, + value: '30px' + }, + activeValue: { + type: null, + value: true + }, + inactiveValue: { + type: null, + value: false + } + }, + watch: { + checked(value) { + this.set({ value }); + } + }, + created() { + this.set({ value: this.data.checked }); + }, + methods: { + onClick() { + const { activeValue, inactiveValue } = this.data; + if (!this.data.disabled && !this.data.loading) { + const checked = this.data.checked === activeValue; + const value = checked ? inactiveValue : activeValue; + this.$emit('input', value); + this.$emit('change', value); + } + } + } +}); diff --git a/node_modules/vant-weapp/dist/switch/index.json b/node_modules/vant-weapp/dist/switch/index.json new file mode 100644 index 0000000..01077f5 --- /dev/null +++ b/node_modules/vant-weapp/dist/switch/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-loading": "../loading/index" + } +} diff --git a/node_modules/vant-weapp/dist/switch/index.wxml b/node_modules/vant-weapp/dist/switch/index.wxml new file mode 100644 index 0000000..74ce520 --- /dev/null +++ b/node_modules/vant-weapp/dist/switch/index.wxml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/node_modules/vant-weapp/dist/switch/index.wxss b/node_modules/vant-weapp/dist/switch/index.wxss new file mode 100644 index 0000000..85cadf3 --- /dev/null +++ b/node_modules/vant-weapp/dist/switch/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-switch{display:inline-block;position:relative;width:2em;border:1px solid rgba(0,0,0,.1);border-radius:1em;box-sizing:initial;transition:background-color .3s}.van-switch,.van-switch__node{height:1em;background-color:#fff}.van-switch__node{top:0;left:0;position:absolute;border-radius:100%;width:1em;z-index:1;transition:.3s;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05)}.van-switch__loading{top:25%;left:25%;position:absolute!important}.van-switch--on{background-color:#1989fa}.van-switch--on .van-switch__node{-webkit-transform:translateX(1em);transform:translateX(1em)}.van-switch--disabled{opacity:.4} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/tab/index.d.ts b/node_modules/vant-weapp/dist/tab/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/tab/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/tab/index.js b/node_modules/vant-weapp/dist/tab/index.js new file mode 100644 index 0000000..c555393 --- /dev/null +++ b/node_modules/vant-weapp/dist/tab/index.js @@ -0,0 +1,35 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + relation: { + name: 'tabs', + type: 'ancestor' + }, + props: { + dot: Boolean, + info: null, + title: String, + disabled: Boolean, + titleStyle: String + }, + data: { + width: null, + inited: false, + active: false, + animated: false + }, + watch: { + title: 'update', + disabled: 'update', + dot: 'update', + info: 'update', + titleStyle: 'update' + }, + methods: { + update() { + const parent = this.getRelationNodes('../tabs/index')[0]; + if (parent) { + parent.updateTabs(); + } + } + } +}); diff --git a/node_modules/vant-weapp/dist/tab/index.json b/node_modules/vant-weapp/dist/tab/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/dist/tab/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/tab/index.wxml b/node_modules/vant-weapp/dist/tab/index.wxml new file mode 100644 index 0000000..b90f452 --- /dev/null +++ b/node_modules/vant-weapp/dist/tab/index.wxml @@ -0,0 +1,9 @@ + + + + + diff --git a/node_modules/vant-weapp/dist/tab/index.wxss b/node_modules/vant-weapp/dist/tab/index.wxss new file mode 100644 index 0000000..e2e67a9 --- /dev/null +++ b/node_modules/vant-weapp/dist/tab/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tab__pane{box-sizing:border-box;overflow-y:auto}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/tabbar-item/index.d.ts b/node_modules/vant-weapp/dist/tabbar-item/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/tabbar-item/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/tabbar-item/index.js b/node_modules/vant-weapp/dist/tabbar-item/index.js new file mode 100644 index 0000000..70f285e --- /dev/null +++ b/node_modules/vant-weapp/dist/tabbar-item/index.js @@ -0,0 +1,49 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + info: null, + icon: String, + dot: Boolean, + name: { + type: [String, Number] + } + }, + relation: { + name: 'tabbar', + type: 'ancestor' + }, + data: { + active: false + }, + methods: { + onClick() { + if (this.parent) { + this.parent.onChange(this); + } + this.$emit('click'); + }, + updateFromParent() { + const { parent } = this; + if (!parent) { + return; + } + const index = parent.children.indexOf(this); + const parentData = parent.data; + const { data } = this; + const active = (data.name || index) === parentData.active; + const patch = {}; + if (active !== data.active) { + patch.active = active; + } + if (parentData.activeColor !== data.activeColor) { + patch.activeColor = parentData.activeColor; + } + if (parentData.inactiveColor !== data.inactiveColor) { + patch.inactiveColor = parentData.inactiveColor; + } + return Object.keys(patch).length > 0 + ? this.set(patch) + : Promise.resolve(); + } + } +}); diff --git a/node_modules/vant-weapp/dist/tabbar-item/index.json b/node_modules/vant-weapp/dist/tabbar-item/index.json new file mode 100644 index 0000000..16f174c --- /dev/null +++ b/node_modules/vant-weapp/dist/tabbar-item/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-info": "../info/index" + } +} diff --git a/node_modules/vant-weapp/dist/tabbar-item/index.wxml b/node_modules/vant-weapp/dist/tabbar-item/index.wxml new file mode 100644 index 0000000..b2649ae --- /dev/null +++ b/node_modules/vant-weapp/dist/tabbar-item/index.wxml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + diff --git a/node_modules/vant-weapp/dist/tabbar-item/index.wxss b/node_modules/vant-weapp/dist/tabbar-item/index.wxss new file mode 100644 index 0000000..d2c9d16 --- /dev/null +++ b/node_modules/vant-weapp/dist/tabbar-item/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{color:#7d7e80;height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:12px;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-tabbar-item__icon{font-size:18px;margin-bottom:5px;position:relative}.van-tabbar-item__icon--dot:after{top:0;right:-8px;width:8px;height:8px;content:" ";position:absolute;border-radius:100%;background-color:#f44}.van-tabbar-item__icon image{width:30px;height:18px;display:block}.van-tabbar-item--active{color:#1989fa} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/tabbar/index.d.ts b/node_modules/vant-weapp/dist/tabbar/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/tabbar/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/tabbar/index.js b/node_modules/vant-weapp/dist/tabbar/index.js new file mode 100644 index 0000000..814d817 --- /dev/null +++ b/node_modules/vant-weapp/dist/tabbar/index.js @@ -0,0 +1,63 @@ +import { VantComponent } from '../common/component'; +import { safeArea } from '../mixins/safe-area'; +VantComponent({ + mixins: [safeArea()], + relation: { + name: 'tabbar-item', + type: 'descendant', + linked(target) { + this.children.push(target); + target.parent = this; + target.updateFromParent(); + }, + unlinked(target) { + this.children = this.children.filter((item) => item !== target); + this.updateChildren(); + } + }, + props: { + active: { + type: [Number, String], + observer: 'updateChildren' + }, + activeColor: { + type: String, + observer: 'updateChildren' + }, + inactiveColor: { + type: String, + observer: 'updateChildren' + }, + fixed: { + type: Boolean, + value: true + }, + border: { + type: Boolean, + value: true + }, + zIndex: { + type: Number, + value: 1 + } + }, + beforeCreate() { + this.children = []; + }, + methods: { + updateChildren() { + const { children } = this; + if (!Array.isArray(children) || !children.length) { + return Promise.resolve(); + } + return Promise.all(children.map((child) => child.updateFromParent())); + }, + onChange(child) { + const index = this.children.indexOf(child); + const active = child.data.name || index; + if (active !== this.data.active) { + this.$emit('change', active); + } + } + } +}); diff --git a/node_modules/vant-weapp/dist/tabbar/index.json b/node_modules/vant-weapp/dist/tabbar/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/dist/tabbar/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/dist/tabbar/index.wxml b/node_modules/vant-weapp/dist/tabbar/index.wxml new file mode 100644 index 0000000..0926b64 --- /dev/null +++ b/node_modules/vant-weapp/dist/tabbar/index.wxml @@ -0,0 +1,8 @@ + + + + + diff --git a/node_modules/vant-weapp/dist/tabbar/index.wxss b/node_modules/vant-weapp/dist/tabbar/index.wxss new file mode 100644 index 0000000..b07814c --- /dev/null +++ b/node_modules/vant-weapp/dist/tabbar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tabbar{display:-webkit-flex;display:flex;width:100%;height:50px;background-color:#fff}.van-tabbar--fixed{position:fixed;bottom:0;left:0}.van-tabbar--safe{padding-bottom:34px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/tabs/index.d.ts b/node_modules/vant-weapp/dist/tabs/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/tabs/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/tabs/index.js b/node_modules/vant-weapp/dist/tabs/index.js new file mode 100644 index 0000000..ac6d2c0 --- /dev/null +++ b/node_modules/vant-weapp/dist/tabs/index.js @@ -0,0 +1,317 @@ +import { VantComponent } from '../common/component'; +import { touch } from '../mixins/touch'; +import { nextTick } from '../common/utils'; +VantComponent({ + mixins: [touch], + classes: ['nav-class', 'tab-class', 'tab-active-class', 'line-class'], + relation: { + name: 'tab', + type: 'descendant', + linked(child) { + this.child.push(child); + this.updateTabs(this.data.tabs.concat(child.data)); + }, + unlinked(child) { + const index = this.child.indexOf(child); + const { tabs } = this.data; + tabs.splice(index, 1); + this.child.splice(index, 1); + this.updateTabs(tabs); + } + }, + props: { + color: String, + sticky: Boolean, + animated: Boolean, + swipeable: Boolean, + lineWidth: { + type: Number, + value: -1 + }, + lineHeight: { + type: Number, + value: -1 + }, + active: { + type: Number, + value: 0 + }, + type: { + type: String, + value: 'line' + }, + border: { + type: Boolean, + value: true + }, + duration: { + type: Number, + value: 0.3 + }, + zIndex: { + type: Number, + value: 1 + }, + swipeThreshold: { + type: Number, + value: 4 + }, + offsetTop: { + type: Number, + value: 0 + } + }, + data: { + tabs: [], + lineStyle: '', + scrollLeft: 0, + scrollable: false, + trackStyle: '', + wrapStyle: '', + position: '' + }, + watch: { + swipeThreshold() { + this.set({ + scrollable: this.child.length > this.data.swipeThreshold + }); + }, + color: 'setLine', + lineWidth: 'setLine', + lineHeight: 'setLine', + active: 'setActiveTab', + animated: 'setTrack', + offsetTop: 'setWrapStyle' + }, + beforeCreate() { + this.child = []; + }, + mounted() { + this.setLine(true); + this.setTrack(); + this.scrollIntoView(); + this.getRect('.van-tabs__wrap').then((rect) => { + this.navHeight = rect.height; + this.observerContentScroll(); + }); + }, + destroyed() { + // @ts-ignore + this.createIntersectionObserver().disconnect(); + }, + methods: { + updateTabs(tabs) { + tabs = tabs || this.data.tabs; + this.set({ + tabs, + scrollable: tabs.length > this.data.swipeThreshold + }); + this.setActiveTab(); + }, + trigger(eventName, index) { + this.$emit(eventName, { + index, + title: this.data.tabs[index].title + }); + }, + onTap(event) { + const { index } = event.currentTarget.dataset; + if (this.data.tabs[index].disabled) { + this.trigger('disabled', index); + } + else { + this.trigger('click', index); + this.setActive(index); + } + }, + setActive(active) { + if (active !== this.data.active) { + this.trigger('change', active); + this.set({ active }); + this.setActiveTab(); + } + }, + setLine(skipTransition) { + if (this.data.type !== 'line') { + return; + } + const { color, active, duration, lineWidth, lineHeight } = this.data; + this.getRect('.van-tab', true).then((rects) => { + const rect = rects[active]; + const width = lineWidth !== -1 ? lineWidth : rect.width / 2; + const height = lineHeight !== -1 ? `height: ${lineHeight}px;` : ''; + let left = rects + .slice(0, active) + .reduce((prev, curr) => prev + curr.width, 0); + left += (rect.width - width) / 2; + const transition = skipTransition + ? '' + : `transition-duration: ${duration}s; -webkit-transition-duration: ${duration}s;`; + this.set({ + lineStyle: ` + ${height} + width: ${width}px; + background-color: ${color}; + -webkit-transform: translateX(${left}px); + transform: translateX(${left}px); + ${transition} + ` + }); + }); + }, + setTrack() { + const { animated, active, duration } = this.data; + if (!animated) + return ''; + this.getRect('.van-tabs__content').then((rect) => { + const { width } = rect; + this.set({ + trackStyle: ` + width: ${width * this.child.length}px; + left: ${-1 * active * width}px; + transition: left ${duration}s; + display: -webkit-box; + display: flex; + ` + }); + const props = { width, animated }; + this.child.forEach((item) => { + item.set(props); + }); + }); + }, + setActiveTab() { + this.child.forEach((item, index) => { + const data = { + active: index === this.data.active + }; + if (data.active) { + data.inited = true; + } + if (data.active !== item.data.active) { + item.set(data); + } + }); + nextTick(() => { + this.setLine(); + this.setTrack(); + this.scrollIntoView(); + }); + }, + // scroll active tab into view + scrollIntoView() { + const { active, scrollable } = this.data; + if (!scrollable) { + return; + } + Promise.all([ + this.getRect('.van-tab', true), + this.getRect('.van-tabs__nav') + ]).then(([tabRects, navRect]) => { + const tabRect = tabRects[active]; + const offsetLeft = tabRects + .slice(0, active) + .reduce((prev, curr) => prev + curr.width, 0); + this.set({ + scrollLeft: offsetLeft - (navRect.width - tabRect.width) / 2 + }); + }); + }, + onTouchStart(event) { + if (!this.data.swipeable) + return; + this.touchStart(event); + }, + onTouchMove(event) { + if (!this.data.swipeable) + return; + this.touchMove(event); + }, + // watch swipe touch end + onTouchEnd() { + if (!this.data.swipeable) + return; + const { active, tabs } = this.data; + const { direction, deltaX, offsetX } = this; + const minSwipeDistance = 50; + if (direction === 'horizontal' && offsetX >= minSwipeDistance) { + if (deltaX > 0 && active !== 0) { + this.setActive(active - 1); + } + else if (deltaX < 0 && active !== tabs.length - 1) { + this.setActive(active + 1); + } + } + }, + setWrapStyle() { + const { offsetTop, position } = this.data; + let wrapStyle; + switch (position) { + case 'top': + wrapStyle = ` + top: ${offsetTop}px; + position: fixed; + `; + break; + case 'bottom': + wrapStyle = ` + top: auto; + bottom: 0; + `; + break; + default: + wrapStyle = ''; + } + // cut down `set` + if (wrapStyle === this.data.wrapStyle) + return; + this.set({ wrapStyle }); + }, + observerContentScroll() { + if (!this.data.sticky) { + return; + } + const { offsetTop } = this.data; + const { windowHeight } = wx.getSystemInfoSync(); + // @ts-ignore + this.createIntersectionObserver().disconnect(); + // @ts-ignore + this.createIntersectionObserver() + .relativeToViewport({ top: -(this.navHeight + offsetTop) }) + .observe('.van-tabs', (res) => { + const { top } = res.boundingClientRect; + if (top > offsetTop) { + return; + } + const position = res.intersectionRatio > 0 ? 'top' : 'bottom'; + this.$emit('scroll', { + scrollTop: top + offsetTop, + isFixed: position === 'top' + }); + this.setPosition(position); + }); + // @ts-ignore + this.createIntersectionObserver() + .relativeToViewport({ bottom: -(windowHeight - 1 - offsetTop) }) + .observe('.van-tabs', (res) => { + const { top, bottom } = res.boundingClientRect; + if (bottom < this.navHeight) { + return; + } + const position = res.intersectionRatio > 0 ? 'top' : ''; + this.$emit('scroll', { + scrollTop: top + offsetTop, + isFixed: position === 'top' + }); + this.setPosition(position); + }); + }, + setPosition(position) { + if (position !== this.data.position) { + this.set({ position }).then(() => { + this.setWrapStyle(); + }); + } + } + } +}); diff --git a/node_modules/vant-weapp/dist/tabs/index.json b/node_modules/vant-weapp/dist/tabs/index.json new file mode 100644 index 0000000..bf0ebe0 --- /dev/null +++ b/node_modules/vant-weapp/dist/tabs/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-info": "../info/index" + } +} diff --git a/node_modules/vant-weapp/dist/tabs/index.wxml b/node_modules/vant-weapp/dist/tabs/index.wxml new file mode 100644 index 0000000..1618d64 --- /dev/null +++ b/node_modules/vant-weapp/dist/tabs/index.wxml @@ -0,0 +1,49 @@ + + + + + + + + + + + + {{ item.title }} + + + + + + + + + + + + + + diff --git a/node_modules/vant-weapp/dist/tabs/index.wxss b/node_modules/vant-weapp/dist/tabs/index.wxss new file mode 100644 index 0000000..5944afb --- /dev/null +++ b/node_modules/vant-weapp/dist/tabs/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{position:absolute;top:0;right:0;left:0;display:-webkit-flex;display:flex;background-color:#fff}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__scroll--card{border:1px solid #f44;border-radius:2px}.van-tabs__nav{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none}.van-tabs__nav--line{height:100%}.van-tabs__nav--card{height:30px}.van-tabs__nav--card .van-tab{line-height:30px;color:#f44;border-right:1px solid #f44}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;background-color:#f44}.van-tabs__line{position:absolute;bottom:0;left:0;z-index:1;height:3px;background-color:#f44;border-radius:3px}.van-tabs--line{padding-top:44px}.van-tabs--line .van-tabs__wrap{height:44px}.van-tabs--card{padding-top:30px;margin:0 15px}.van-tabs--card .van-tabs__wrap{height:30px}.van-tabs__content{overflow:hidden}.van-tab,.van-tabs__track{position:relative}.van-tab{min-width:0;padding:0 5px;font-size:14px;line-height:44px;color:#7d7e80;text-align:center;cursor:pointer;box-sizing:border-box;-webkit-flex:1;flex:1}.van-tab--active{font-weight:500;color:#333}.van-tab--disabled{color:#c9c9c9}.van-tab__title--dot:after{display:inline-block;width:8px;height:8px;vertical-align:middle;background-color:#f44;border-radius:100%;content:""}.van-tab__title__info{position:relative!important;top:-1px!important;display:inline-block;-webkit-transform:translateX(0)!important;transform:translateX(0)!important} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/tag/index.d.ts b/node_modules/vant-weapp/dist/tag/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/tag/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/tag/index.js b/node_modules/vant-weapp/dist/tag/index.js new file mode 100644 index 0000000..0b1f44c --- /dev/null +++ b/node_modules/vant-weapp/dist/tag/index.js @@ -0,0 +1,31 @@ +import { VantComponent } from '../common/component'; +import { RED, BLUE, GREEN, ORANGE } from '../common/color'; +const DEFAULT_COLOR = '#999'; +const COLOR_MAP = { + danger: RED, + primary: BLUE, + success: GREEN, + warning: ORANGE +}; +VantComponent({ + props: { + size: String, + type: String, + mark: Boolean, + color: String, + plain: Boolean, + round: Boolean, + textColor: String + }, + computed: { + style() { + const color = this.data.color || COLOR_MAP[this.data.type] || DEFAULT_COLOR; + const key = this.data.plain ? 'color' : 'background-color'; + const style = { [key]: color }; + if (this.data.textColor) { + style.color = this.data.textColor; + } + return Object.keys(style).map(key => `${key}: ${style[key]}`).join(';'); + } + } +}); diff --git a/node_modules/vant-weapp/dist/tag/index.json b/node_modules/vant-weapp/dist/tag/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/dist/tag/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/tag/index.wxml b/node_modules/vant-weapp/dist/tag/index.wxml new file mode 100644 index 0000000..e66580c --- /dev/null +++ b/node_modules/vant-weapp/dist/tag/index.wxml @@ -0,0 +1,8 @@ + + + + + diff --git a/node_modules/vant-weapp/dist/tag/index.wxss b/node_modules/vant-weapp/dist/tag/index.wxss new file mode 100644 index 0000000..fbd8fad --- /dev/null +++ b/node_modules/vant-weapp/dist/tag/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tag{color:#fff;font-size:10px;padding:.2em .5em;line-height:normal;border-radius:.2em;display:inline-block}.van-tag:after{border-color:currentColor;border-radius:.4em}.van-tag--mark{padding-right:.6em;border-radius:0 .8em .8em 0}.van-tag--mark:after{border-radius:0 1.6em 1.6em 0}.van-tag--round{border-radius:.8em}.van-tag--round:after{border-radius:1.6em}.van-tag--medium{font-size:12px}.van-tag--large{font-size:14px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/toast/index.d.ts b/node_modules/vant-weapp/dist/toast/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/toast/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/toast/index.js b/node_modules/vant-weapp/dist/toast/index.js new file mode 100644 index 0000000..a9fe162 --- /dev/null +++ b/node_modules/vant-weapp/dist/toast/index.js @@ -0,0 +1,29 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + show: Boolean, + mask: Boolean, + message: String, + forbidClick: Boolean, + zIndex: { + type: Number, + value: 1000 + }, + type: { + type: String, + value: 'text' + }, + loadingType: { + type: String, + value: 'circular' + }, + position: { + type: String, + value: 'middle' + } + }, + methods: { + // for prevent touchmove + noop() { } + } +}); diff --git a/node_modules/vant-weapp/dist/toast/index.json b/node_modules/vant-weapp/dist/toast/index.json new file mode 100644 index 0000000..9b1b78c --- /dev/null +++ b/node_modules/vant-weapp/dist/toast/index.json @@ -0,0 +1,9 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-loading": "../loading/index", + "van-overlay": "../overlay/index", + "van-transition": "../transition/index" + } +} diff --git a/node_modules/vant-weapp/dist/toast/index.wxml b/node_modules/vant-weapp/dist/toast/index.wxml new file mode 100644 index 0000000..3e27e2d --- /dev/null +++ b/node_modules/vant-weapp/dist/toast/index.wxml @@ -0,0 +1,33 @@ + + + + + {{ message }} + + + + + + {{ message }} + + + + + diff --git a/node_modules/vant-weapp/dist/toast/index.wxss b/node_modules/vant-weapp/dist/toast/index.wxss new file mode 100644 index 0000000..c173620 --- /dev/null +++ b/node_modules/vant-weapp/dist/toast/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;color:#fff;font-size:14px;line-height:20px;border-radius:4px;word-break:break-all;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;box-sizing:initial;background-color:rgba(51,51,51,.88);white-space:pre-wrap}.van-toast__container{position:fixed;top:50%;left:50%;max-width:70%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-toast--text{padding:8px 12px;min-width:96px}.van-toast--icon{width:90px;padding:15px;min-height:90px}.van-toast--icon .van-toast__icon{font-size:48px}.van-toast--icon .van-toast__text{padding-top:5px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translateY(-30vh);transform:translateY(-30vh)}.van-toast--bottom{-webkit-transform:translateY(30vh);transform:translateY(30vh)} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/toast/toast.d.ts b/node_modules/vant-weapp/dist/toast/toast.d.ts new file mode 100644 index 0000000..f7148a0 --- /dev/null +++ b/node_modules/vant-weapp/dist/toast/toast.d.ts @@ -0,0 +1,26 @@ +/// +declare type ToastMessage = string | number; +interface ToastOptions { + show?: boolean; + type?: string; + mask?: boolean; + zIndex?: number; + context?: WechatMiniprogram.Component.TrivialInstance | WechatMiniprogram.Page.TrivialInstance; + position?: string; + duration?: number; + selector?: string; + forbidClick?: boolean; + loadingType?: string; + message?: ToastMessage; + onClose?: () => void; +} +declare function Toast(toastOptions: ToastOptions | ToastMessage): WechatMiniprogram.Component.TrivialInstance; +declare namespace Toast { + var loading: (options: string | number | ToastOptions) => WechatMiniprogram.Component.Instance, Record, Record>; + var success: (options: string | number | ToastOptions) => WechatMiniprogram.Component.Instance, Record, Record>; + var fail: (options: string | number | ToastOptions) => WechatMiniprogram.Component.Instance, Record, Record>; + var clear: () => void; + var setDefaultOptions: (options: ToastOptions) => void; + var resetDefaultOptions: () => void; +} +export default Toast; diff --git a/node_modules/vant-weapp/dist/toast/toast.js b/node_modules/vant-weapp/dist/toast/toast.js new file mode 100644 index 0000000..3b974ab --- /dev/null +++ b/node_modules/vant-weapp/dist/toast/toast.js @@ -0,0 +1,66 @@ +import { isObj } from '../common/utils'; +const defaultOptions = { + type: 'text', + mask: false, + message: '', + show: true, + zIndex: 1000, + duration: 3000, + position: 'middle', + forbidClick: false, + loadingType: 'circular', + selector: '#van-toast' +}; +let queue = []; +let currentOptions = Object.assign({}, defaultOptions); +function parseOptions(message) { + return isObj(message) ? message : { message }; +} +function getContext() { + const pages = getCurrentPages(); + return pages[pages.length - 1]; +} +function Toast(toastOptions) { + const options = Object.assign({}, currentOptions, parseOptions(toastOptions)); + const context = options.context || getContext(); + const toast = context.selectComponent(options.selector); + if (!toast) { + console.warn('未找到 van-toast 节点,请确认 selector 及 context 是否正确'); + return; + } + delete options.context; + delete options.selector; + toast.clear = () => { + toast.set({ show: false }); + if (options.onClose) { + options.onClose(); + } + }; + queue.push(toast); + toast.set(options); + clearTimeout(toast.timer); + if (options.duration > 0) { + toast.timer = setTimeout(() => { + toast.clear(); + queue = queue.filter(item => item !== toast); + }, options.duration); + } + return toast; +} +const createMethod = (type) => (options) => Toast(Object.assign({ type }, parseOptions(options))); +Toast.loading = createMethod('loading'); +Toast.success = createMethod('success'); +Toast.fail = createMethod('fail'); +Toast.clear = () => { + queue.forEach(toast => { + toast.clear(); + }); + queue = []; +}; +Toast.setDefaultOptions = (options) => { + Object.assign(currentOptions, options); +}; +Toast.resetDefaultOptions = () => { + currentOptions = Object.assign({}, defaultOptions); +}; +export default Toast; diff --git a/node_modules/vant-weapp/dist/transition/index.d.ts b/node_modules/vant-weapp/dist/transition/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/transition/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/transition/index.js b/node_modules/vant-weapp/dist/transition/index.js new file mode 100644 index 0000000..a920f1f --- /dev/null +++ b/node_modules/vant-weapp/dist/transition/index.js @@ -0,0 +1,13 @@ +import { VantComponent } from '../common/component'; +import { transition } from '../mixins/transition'; +VantComponent({ + classes: [ + 'enter-class', + 'enter-active-class', + 'enter-to-class', + 'leave-class', + 'leave-active-class', + 'leave-to-class' + ], + mixins: [transition(true)] +}); diff --git a/node_modules/vant-weapp/dist/transition/index.json b/node_modules/vant-weapp/dist/transition/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/dist/transition/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/transition/index.wxml b/node_modules/vant-weapp/dist/transition/index.wxml new file mode 100644 index 0000000..412e8af --- /dev/null +++ b/node_modules/vant-weapp/dist/transition/index.wxml @@ -0,0 +1,8 @@ + + + diff --git a/node_modules/vant-weapp/dist/transition/index.wxss b/node_modules/vant-weapp/dist/transition/index.wxss new file mode 100644 index 0000000..adcbc5f --- /dev/null +++ b/node_modules/vant-weapp/dist/transition/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-fade-up-enter,.van-fade-up-leave-to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-fade-down-enter,.van-fade-down-leave-to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-fade-left-enter,.van-fade-left-leave-to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-fade-right-enter,.van-fade-right-leave-to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-slide-up-enter,.van-slide-up-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/tree-select/index.d.ts b/node_modules/vant-weapp/dist/tree-select/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/vant-weapp/dist/tree-select/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/vant-weapp/dist/tree-select/index.js b/node_modules/vant-weapp/dist/tree-select/index.js new file mode 100644 index 0000000..092141f --- /dev/null +++ b/node_modules/vant-weapp/dist/tree-select/index.js @@ -0,0 +1,78 @@ +import { VantComponent } from '../common/component'; +const ITEM_HEIGHT = 44; +VantComponent({ + classes: [ + 'main-item-class', + 'content-item-class', + 'main-active-class', + 'content-active-class', + 'main-disabled-class', + 'content-disabled-class' + ], + props: { + items: Array, + mainActiveIndex: { + type: Number, + value: 0 + }, + activeId: { + type: [Number, String, Array] + }, + maxHeight: { + type: Number, + value: 300 + } + }, + data: { + subItems: [], + mainHeight: 0, + itemHeight: 0 + }, + watch: { + items() { + this.updateSubItems().then(() => { + this.updateMainHeight(); + }); + }, + maxHeight() { + this.updateItemHeight(this.data.subItems); + this.updateMainHeight(); + }, + mainActiveIndex: 'updateSubItems' + }, + methods: { + // 当一个子项被选择时 + onSelectItem(event) { + const { item } = event.currentTarget.dataset; + if (!item.disabled) { + this.$emit('click-item', item); + } + }, + // 当一个导航被点击时 + onClickNav(event) { + const { index } = event.currentTarget.dataset; + const item = this.data.items[index]; + if (!item.disabled) { + this.$emit('click-nav', { index }); + } + }, + // 更新子项列表 + updateSubItems() { + const { items, mainActiveIndex } = this.data; + const { children = [] } = items[mainActiveIndex] || {}; + this.updateItemHeight(children); + return this.set({ subItems: children }); + }, + // 更新组件整体高度,根据最大高度和当前组件需要展示的高度来决定 + updateMainHeight() { + const { items = [], subItems = [] } = this.data; + const maxHeight = Math.max(items.length * ITEM_HEIGHT, subItems.length * ITEM_HEIGHT); + this.set({ mainHeight: Math.min(maxHeight, this.data.maxHeight) }); + }, + // 更新子项列表高度,根据可展示的最大高度和当前子项列表的高度决定 + updateItemHeight(subItems) { + const itemHeight = Math.min(subItems.length * ITEM_HEIGHT, this.data.maxHeight); + return this.set({ itemHeight }); + } + } +}); diff --git a/node_modules/vant-weapp/dist/tree-select/index.json b/node_modules/vant-weapp/dist/tree-select/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/node_modules/vant-weapp/dist/tree-select/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/dist/tree-select/index.wxml b/node_modules/vant-weapp/dist/tree-select/index.wxml new file mode 100644 index 0000000..9ada914 --- /dev/null +++ b/node_modules/vant-weapp/dist/tree-select/index.wxml @@ -0,0 +1,40 @@ + + + + + + + {{ item.text }} + + + + + {{ item.text }} + + + + diff --git a/node_modules/vant-weapp/dist/tree-select/index.wxs b/node_modules/vant-weapp/dist/tree-select/index.wxs new file mode 100644 index 0000000..b1cbb39 --- /dev/null +++ b/node_modules/vant-weapp/dist/tree-select/index.wxs @@ -0,0 +1,12 @@ +/* eslint-disable */ +var array = require('../wxs/array.wxs'); + +function isActive (activeList, itemId) { + if (array.isArray(activeList)) { + return activeList.indexOf(itemId) > -1; + } + + return activeList === itemId; +} + +module.exports.isActive = isActive; diff --git a/node_modules/vant-weapp/dist/tree-select/index.wxss b/node_modules/vant-weapp/dist/tree-select/index.wxss new file mode 100644 index 0000000..da723a4 --- /dev/null +++ b/node_modules/vant-weapp/dist/tree-select/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tree-select{position:relative;font-size:14px;-webkit-user-select:none;user-select:none}.van-tree-select__nav{position:absolute;top:0;bottom:0;left:0;width:35%;min-width:120px;background-color:#fafafa}.van-tree-select__nitem{position:relative;padding:0 9px 0 15px;line-height:44px}.van-tree-select__nitem--active:after{position:absolute;top:0;bottom:0;left:0;width:3.6px;background-color:#f44;content:""}.van-tree-select__nitem--active{font-weight:700;background-color:#fff}.van-tree-select__nitem--disabled{color:#999}.van-tree-select__content{width:65%;padding-left:15px;margin-left:35%;background-color:#fff;box-sizing:border-box}.van-tree-select__item{position:relative;font-weight:700;line-height:44px}.van-tree-select__item--active{color:#f44}.van-tree-select__item--disabled{color:#999}.van-tree-select__selected{position:absolute;top:0;right:15px;bottom:0;height:24px;margin:auto 0;line-height:24px} \ No newline at end of file diff --git a/node_modules/vant-weapp/dist/wxs/array.wxs b/node_modules/vant-weapp/dist/wxs/array.wxs new file mode 100644 index 0000000..610089c --- /dev/null +++ b/node_modules/vant-weapp/dist/wxs/array.wxs @@ -0,0 +1,5 @@ +function isArray(array) { + return array && array.constructor === 'Array'; +} + +module.exports.isArray = isArray; diff --git a/node_modules/vant-weapp/dist/wxs/bem.wxs b/node_modules/vant-weapp/dist/wxs/bem.wxs new file mode 100644 index 0000000..93b2777 --- /dev/null +++ b/node_modules/vant-weapp/dist/wxs/bem.wxs @@ -0,0 +1,38 @@ +var array = require('./array.wxs'); +var object = require('./object.wxs'); +var PREFIX = 'van-'; + +function join(name, mods) { + name = PREFIX + name; + mods = mods.map(function(mod) { + return name + '--' + mod; + }); + mods.unshift(name); + return mods.join(' '); +} + +function traversing(mods, conf) { + if (!conf) { + return; + } + + if (typeof conf === 'string' || typeof conf === 'number') { + mods.push(conf); + } else if (array.isArray(conf)) { + conf.forEach(function(item) { + traversing(mods, item); + }); + } else if (typeof conf === 'object') { + object.keys(conf).forEach(function(key) { + conf[key] && mods.push(key); + }); + } +} + +function bem(name, conf) { + var mods = []; + traversing(mods, conf); + return join(name, mods); +} + +module.exports.bem = bem; diff --git a/node_modules/vant-weapp/dist/wxs/memoize.wxs b/node_modules/vant-weapp/dist/wxs/memoize.wxs new file mode 100644 index 0000000..261ae67 --- /dev/null +++ b/node_modules/vant-weapp/dist/wxs/memoize.wxs @@ -0,0 +1,54 @@ +/** + * Simple memoize + * wxs doesn't support fn.apply, so this memoize only support up to 2 args + */ + +function isPrimitive(value) { + var type = typeof value; + return ( + type === 'boolean' || + type === 'number' || + type === 'string' || + type === 'undefined' || + value === null + ); +} + +// mock simple fn.call in wxs +function call(fn, args) { + if (args.length === 2) { + return fn(args[0], args[1]); + } + + if (args.length === 1) { + return fn(args[0]); + } + + return fn(); +} + +function serializer(args) { + if (args.length === 1 && isPrimitive(args[0])) { + return args[0]; + } + var obj = {}; + for (var i = 0; i < args.length; i++) { + obj['key' + i] = args[i]; + } + return JSON.stringify(obj); +} + +function memoize(fn) { + var cache = {}; + + return function() { + var key = serializer(arguments); + if (cache[key] === undefined) { + cache[key] = call(fn, arguments); + } + + return cache[key]; + }; +} + +module.exports.memoize = memoize; diff --git a/node_modules/vant-weapp/dist/wxs/object.wxs b/node_modules/vant-weapp/dist/wxs/object.wxs new file mode 100644 index 0000000..e077107 --- /dev/null +++ b/node_modules/vant-weapp/dist/wxs/object.wxs @@ -0,0 +1,13 @@ +/* eslint-disable */ +var REGEXP = getRegExp('{|}|"', 'g'); + +function keys(obj) { + return JSON.stringify(obj) + .replace(REGEXP, '') + .split(',') + .map(function(item) { + return item.split(':')[0]; + }); +} + +module.exports.keys = keys; diff --git a/node_modules/vant-weapp/dist/wxs/utils.wxs b/node_modules/vant-weapp/dist/wxs/utils.wxs new file mode 100644 index 0000000..8cced70 --- /dev/null +++ b/node_modules/vant-weapp/dist/wxs/utils.wxs @@ -0,0 +1,12 @@ +var bem = require('./bem.wxs').bem; +var memoize = require('./memoize.wxs').memoize; + +function isSrc(url) { + return url.indexOf('http') === 0 || url.indexOf('data:image') === 0 || url.indexOf('//') === 0; +} + +module.exports = { + bem: memoize(bem), + isSrc: isSrc, + memoize: memoize +}; diff --git a/node_modules/vant-weapp/lib/action-sheet/index.js b/node_modules/vant-weapp/lib/action-sheet/index.js new file mode 100644 index 0000000..63aed39 --- /dev/null +++ b/node_modules/vant-weapp/lib/action-sheet/index.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var safe_area_1 = require("../mixins/safe-area"); +component_1.VantComponent({ + mixins: [safe_area_1.safeArea()], + props: { + show: Boolean, + title: String, + cancelText: String, + zIndex: { + type: Number, + value: 100 + }, + actions: { + type: Array, + value: [] + }, + overlay: { + type: Boolean, + value: true + }, + closeOnClickOverlay: { + type: Boolean, + value: true + } + }, + methods: { + onSelect: function (event) { + var index = event.currentTarget.dataset.index; + var item = this.data.actions[index]; + if (item && !item.disabled && !item.loading) { + this.$emit('select', item); + } + }, + onCancel: function () { + this.$emit('cancel'); + }, + onClose: function () { + this.$emit('close'); + } + } +}); diff --git a/node_modules/vant-weapp/lib/action-sheet/index.json b/node_modules/vant-weapp/lib/action-sheet/index.json new file mode 100644 index 0000000..19bf989 --- /dev/null +++ b/node_modules/vant-weapp/lib/action-sheet/index.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-popup": "../popup/index", + "van-loading": "../loading/index" + } +} diff --git a/node_modules/vant-weapp/lib/action-sheet/index.wxml b/node_modules/vant-weapp/lib/action-sheet/index.wxml new file mode 100644 index 0000000..5f6d33f --- /dev/null +++ b/node_modules/vant-weapp/lib/action-sheet/index.wxml @@ -0,0 +1,49 @@ + + + + + {{ title }} + + + + + + + + + {{ cancelText }} + + diff --git a/node_modules/vant-weapp/lib/action-sheet/index.wxss b/node_modules/vant-weapp/lib/action-sheet/index.wxss new file mode 100644 index 0000000..a3087b1 --- /dev/null +++ b/node_modules/vant-weapp/lib/action-sheet/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-action-sheet{max-height:90%!important;color:#333}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;font-size:16px;line-height:50px;text-align:center;background-color:#fff}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5}.van-action-sheet__cancel{height:60px}.van-action-sheet__cancel:before{display:block;height:10px;background-color:#f8f8f8;content:" "}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:#fff}.van-action-sheet__subname{margin-left:5px;font-size:12px;color:#7d7e80}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{position:absolute!important;top:0;right:0;padding:0 15px;font-size:18px!important;line-height:inherit!important;color:#999} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/area/index.js b/node_modules/vant-weapp/lib/area/index.js new file mode 100644 index 0000000..f4c2fa5 --- /dev/null +++ b/node_modules/vant-weapp/lib/area/index.js @@ -0,0 +1,230 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var shared_1 = require("../picker/shared"); +var COLUMNSPLACEHOLDERCODE = '000000'; +component_1.VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: __assign({}, shared_1.pickerProps, { value: String, areaList: { + type: Object, + value: {} + }, columnsNum: { + type: [String, Number], + value: 3 + }, columnsPlaceholder: { + type: Array, + observer: function (val) { + this.setData({ + typeToColumnsPlaceholder: { + province: val[0] || '', + city: val[1] || '', + county: val[2] || '', + } + }); + } + } }), + data: { + columns: [{ values: [] }, { values: [] }, { values: [] }], + displayColumns: [{ values: [] }, { values: [] }, { values: [] }], + typeToColumnsPlaceholder: {} + }, + watch: { + value: function (value) { + this.code = value; + this.setValues(); + }, + areaList: 'setValues', + columnsNum: function (value) { + this.set({ + displayColumns: this.data.columns.slice(0, +value) + }); + } + }, + mounted: function () { + var _this = this; + setTimeout(function () { + _this.setValues(); + }, 0); + }, + methods: { + getPicker: function () { + if (this.picker == null) { + this.picker = this.selectComponent('.van-area__picker'); + } + return this.picker; + }, + onCancel: function (event) { + this.emit('cancel', event.detail); + }, + onConfirm: function (event) { + var index = event.detail.index; + var value = event.detail.value; + value = this.parseOutputValues(value); + this.emit('confirm', { value: value, index: index }); + }, + emit: function (type, detail) { + detail.values = detail.value; + delete detail.value; + this.$emit(type, detail); + }, + // parse output columns data + parseOutputValues: function (values) { + var columnsPlaceholder = this.data.columnsPlaceholder; + return values.map(function (value, index) { + // save undefined value + if (!value) + return value; + value = JSON.parse(JSON.stringify(value)); + if (!value.code || value.name === columnsPlaceholder[index]) { + value.code = ''; + value.name = ''; + } + return value; + }); + }, + onChange: function (event) { + var _this = this; + var _a = event.detail, index = _a.index, picker = _a.picker, value = _a.value; + this.code = value[index].code; + var getValues = picker.getValues(); + getValues = this.parseOutputValues(getValues); + this.setValues().then(function () { + _this.$emit('change', { + picker: picker, + values: getValues, + index: index + }); + }); + }, + getConfig: function (type) { + var areaList = this.data.areaList; + return (areaList && areaList[type + "_list"]) || {}; + }, + getList: function (type, code) { + var typeToColumnsPlaceholder = this.data.typeToColumnsPlaceholder; + var result = []; + if (type !== 'province' && !code) { + return result; + } + var list = this.getConfig(type); + result = Object.keys(list).map(function (code) { return ({ + code: code, + name: list[code] + }); }); + if (code) { + // oversea code + if (code[0] === '9' && type === 'city') { + code = '9'; + } + result = result.filter(function (item) { return item.code.indexOf(code) === 0; }); + } + if (typeToColumnsPlaceholder[type] && result.length) { + // set columns placeholder + var codeFill = type === 'province' ? '' : type === 'city' ? COLUMNSPLACEHOLDERCODE.slice(2, 4) : COLUMNSPLACEHOLDERCODE.slice(4, 6); + result.unshift({ + code: "" + code + codeFill, + name: typeToColumnsPlaceholder[type] + }); + } + return result; + }, + getIndex: function (type, code) { + var compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6; + var list = this.getList(type, code.slice(0, compareNum - 2)); + // oversea code + if (code[0] === '9' && type === 'province') { + compareNum = 1; + } + code = code.slice(0, compareNum); + for (var i = 0; i < list.length; i++) { + if (list[i].code.slice(0, compareNum) === code) { + return i; + } + } + return 0; + }, + setValues: function () { + var _this = this; + var county = this.getConfig('county'); + var code = this.code; + if (!code) { + if (this.data.columnsPlaceholder.length) { + code = COLUMNSPLACEHOLDERCODE; + } + else if (Object.keys(county)[0]) { + code = Object.keys(county)[0]; + } + else { + code = ''; + } + } + var province = this.getList('province'); + var city = this.getList('city', code.slice(0, 2)); + var picker = this.getPicker(); + if (!picker) { + return; + } + var stack = []; + stack.push(picker.setColumnValues(0, province, false)); + stack.push(picker.setColumnValues(1, city, false)); + if (city.length && code.slice(2, 4) === '00') { + code = city[0].code; + } + stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false)); + return Promise.all(stack) + .catch(function () { }) + .then(function () { + return picker.setIndexes([ + _this.getIndex('province', code), + _this.getIndex('city', code), + _this.getIndex('county', code) + ]); + }) + .catch(function () { }); + }, + getValues: function () { + var picker = this.getPicker(); + return picker ? picker.getValues().filter(function (value) { return !!value; }) : []; + }, + getDetail: function () { + var values = this.getValues(); + var area = { + code: '', + country: '', + province: '', + city: '', + county: '' + }; + if (!values.length) { + return area; + } + var names = values.map(function (item) { return item.name; }); + area.code = values[values.length - 1].code; + if (area.code[0] === '9') { + area.country = names[1] || ''; + area.province = names[2] || ''; + } + else { + area.province = names[0] || ''; + area.city = names[1] || ''; + area.county = names[2] || ''; + } + return area; + }, + reset: function () { + this.code = ''; + return this.setValues(); + } + } +}); diff --git a/node_modules/vant-weapp/lib/area/index.json b/node_modules/vant-weapp/lib/area/index.json new file mode 100644 index 0000000..a778e91 --- /dev/null +++ b/node_modules/vant-weapp/lib/area/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-picker": "../picker/index" + } +} diff --git a/node_modules/vant-weapp/lib/area/index.wxml b/node_modules/vant-weapp/lib/area/index.wxml new file mode 100644 index 0000000..6075794 --- /dev/null +++ b/node_modules/vant-weapp/lib/area/index.wxml @@ -0,0 +1,18 @@ + diff --git a/node_modules/vant-weapp/lib/area/index.wxss b/node_modules/vant-weapp/lib/area/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/node_modules/vant-weapp/lib/area/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/badge-group/index.js b/node_modules/vant-weapp/lib/badge-group/index.js new file mode 100644 index 0000000..ffe6482 --- /dev/null +++ b/node_modules/vant-weapp/lib/badge-group/index.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + relation: { + name: 'badge', + type: 'descendant', + linked: function (target) { + this.badges.push(target); + this.setActive(this.data.active); + }, + unlinked: function (target) { + this.badges = this.badges.filter(function (item) { return item !== target; }); + this.setActive(this.data.active); + } + }, + props: { + active: { + type: Number, + value: 0, + observer: 'setActive' + } + }, + beforeCreate: function () { + this.badges = []; + this.currentActive = -1; + }, + methods: { + setActive: function (active) { + var _a = this, badges = _a.badges, currentActive = _a.currentActive; + if (!badges.length) { + return Promise.resolve(); + } + this.currentActive = active; + var stack = []; + if (currentActive !== active && badges[currentActive]) { + stack.push(badges[currentActive].setActive(false)); + } + if (badges[active]) { + stack.push(badges[active].setActive(true)); + } + return Promise.all(stack); + } + } +}); diff --git a/node_modules/vant-weapp/lib/badge-group/index.json b/node_modules/vant-weapp/lib/badge-group/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/lib/badge-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/lib/badge-group/index.wxml b/node_modules/vant-weapp/lib/badge-group/index.wxml new file mode 100644 index 0000000..04a0c8f --- /dev/null +++ b/node_modules/vant-weapp/lib/badge-group/index.wxml @@ -0,0 +1,3 @@ + + + diff --git a/node_modules/vant-weapp/lib/badge-group/index.wxss b/node_modules/vant-weapp/lib/badge-group/index.wxss new file mode 100644 index 0000000..5149eab --- /dev/null +++ b/node_modules/vant-weapp/lib/badge-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-badge-group{width:85px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/badge/index.js b/node_modules/vant-weapp/lib/badge/index.js new file mode 100644 index 0000000..7abc5ec --- /dev/null +++ b/node_modules/vant-weapp/lib/badge/index.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + relation: { + type: 'ancestor', + name: 'badge-group', + linked: function (target) { + this.parent = target; + } + }, + props: { + info: null, + title: String + }, + methods: { + onClick: function () { + var _this = this; + var parent = this.parent; + if (!parent) { + return; + } + var index = parent.badges.indexOf(this); + parent.setActive(index).then(function () { + _this.$emit('click', index); + parent.$emit('change', index); + }); + }, + setActive: function (active) { + return this.set({ active: active }); + } + } +}); diff --git a/node_modules/vant-weapp/lib/badge/index.json b/node_modules/vant-weapp/lib/badge/index.json new file mode 100644 index 0000000..bf0ebe0 --- /dev/null +++ b/node_modules/vant-weapp/lib/badge/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-info": "../info/index" + } +} diff --git a/node_modules/vant-weapp/lib/badge/index.wxml b/node_modules/vant-weapp/lib/badge/index.wxml new file mode 100644 index 0000000..3563bdb --- /dev/null +++ b/node_modules/vant-weapp/lib/badge/index.wxml @@ -0,0 +1,17 @@ + + + + + + {{ title }} + + diff --git a/node_modules/vant-weapp/lib/badge/index.wxss b/node_modules/vant-weapp/lib/badge/index.wxss new file mode 100644 index 0000000..73cb2c1 --- /dev/null +++ b/node_modules/vant-weapp/lib/badge/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-badge{display:block;padding:20px 12px 20px 9px;overflow:hidden;font-size:14px;line-height:1.4;color:#7d7e80;word-break:break-all;background-color:#f8f8f8;border-left:3px solid transparent;box-sizing:border-box;-webkit-user-select:none;user-select:none}.van-badge--hover{background-color:#f2f3f5}.van-badge:after{border-bottom-width:1px}.van-badge--active{font-weight:700;color:#333;border-color:#f44}.van-badge--active:after{border-right-width:1px}.van-badge--active,.van-badge--active.van-badge--hover{background-color:#fff}.van-badge__text{position:relative} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/button/index.js b/node_modules/vant-weapp/lib/button/index.js new file mode 100644 index 0000000..1bf0bb9 --- /dev/null +++ b/node_modules/vant-weapp/lib/button/index.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var button_1 = require("../mixins/button"); +var open_type_1 = require("../mixins/open-type"); +component_1.VantComponent({ + mixins: [button_1.button, open_type_1.openType], + classes: ['hover-class', 'loading-class'], + props: { + icon: String, + color: String, + plain: Boolean, + block: Boolean, + round: Boolean, + square: Boolean, + loading: Boolean, + hairline: Boolean, + disabled: Boolean, + loadingText: String, + type: { + type: String, + value: 'default' + }, + size: { + type: String, + value: 'normal' + }, + loadingSize: { + type: String, + value: '20px' + } + }, + methods: { + onClick: function () { + if (!this.data.disabled && !this.data.loading) { + this.$emit('click'); + } + } + } +}); diff --git a/node_modules/vant-weapp/lib/button/index.json b/node_modules/vant-weapp/lib/button/index.json new file mode 100644 index 0000000..e00a588 --- /dev/null +++ b/node_modules/vant-weapp/lib/button/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-loading": "../loading/index" + } +} diff --git a/node_modules/vant-weapp/lib/button/index.wxml b/node_modules/vant-weapp/lib/button/index.wxml new file mode 100644 index 0000000..dec0e7d --- /dev/null +++ b/node_modules/vant-weapp/lib/button/index.wxml @@ -0,0 +1,51 @@ + + + diff --git a/node_modules/vant-weapp/lib/button/index.wxss b/node_modules/vant-weapp/lib/button/index.wxss new file mode 100644 index 0000000..72a10e7 --- /dev/null +++ b/node_modules/vant-weapp/lib/button/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-button{position:relative;display:inline-block;height:44px;padding:0;font-size:16px;line-height:42px;text-align:center;vertical-align:middle;box-sizing:border-box;border-radius:2px;-webkit-appearance:none;-webkit-text-size-adjust:100%}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:" ";opacity:0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#333;background-color:#fff;border:1px solid #eee}.van-button--primary{color:#fff;background-color:#07c160;border:1px solid #07c160}.van-button--info{color:#fff;background-color:#1989fa;border:1px solid #1989fa}.van-button--danger{color:#fff;background-color:#f44;border:1px solid #f44}.van-button--warning{color:#fff;background-color:#ff976a;border:1px solid #ff976a}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#07c160}.van-button--plain.van-button--info{color:#1989fa}.van-button--plain.van-button--danger{color:#f44}.van-button--plain.van-button--warning{color:#ff976a}.van-button--large{width:100%;height:50px;line-height:48px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:30px;min-width:60px;padding:0 8px;font-size:12px;line-height:28px}.van-button--mini{display:inline-block;width:50px;height:22px;font-size:10px;line-height:20px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:block;width:100%}.van-button--round{border-radius:10em}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5}.van-button__text{display:inline}.van-button__loading-text{margin-left:5px;display:inline-block;vertical-align:middle}.van-button__icon{min-width:1em;line-height:inherit!important;vertical-align:top}.van-button__icon+.van-button__text:not(:empty){display:inline-block;margin-left:5px;vertical-align:top}.van-button--hairline{border-width:0;padding-top:1px}.van-button--hairline:after{border-width:1px;border-color:inherit;border-radius:4px}.van-button--hairline.van-button--round:after{border-radius:10em}.van-button--hairline.van-button--square:after{border-radius:0} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/card/index.js b/node_modules/vant-weapp/lib/card/index.js new file mode 100644 index 0000000..47a7d83 --- /dev/null +++ b/node_modules/vant-weapp/lib/card/index.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var link_1 = require("../mixins/link"); +var component_1 = require("../common/component"); +component_1.VantComponent({ + classes: [ + 'num-class', + 'desc-class', + 'thumb-class', + 'title-class', + 'price-class', + 'origin-price-class', + ], + mixins: [link_1.link], + props: { + tag: String, + num: String, + desc: String, + thumb: String, + title: String, + price: String, + centered: Boolean, + lazyLoad: Boolean, + thumbLink: String, + originPrice: String, + thumbMode: { + type: String, + value: 'aspectFit' + }, + currency: { + type: String, + value: '¥' + } + }, + methods: { + onClickThumb: function () { + this.jumpLink('thumbLink'); + } + } +}); diff --git a/node_modules/vant-weapp/lib/card/index.json b/node_modules/vant-weapp/lib/card/index.json new file mode 100644 index 0000000..e917407 --- /dev/null +++ b/node_modules/vant-weapp/lib/card/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-tag": "../tag/index" + } +} diff --git a/node_modules/vant-weapp/lib/card/index.wxml b/node_modules/vant-weapp/lib/card/index.wxml new file mode 100644 index 0000000..a17b1d6 --- /dev/null +++ b/node_modules/vant-weapp/lib/card/index.wxml @@ -0,0 +1,45 @@ + + + + + + + + + {{ tag }} + + + + + {{ title }} + + + {{ desc }} + + + + + + {{ currency }} {{ price }} + {{ currency }} {{ originPrice }} + x {{ num }} + + + + + + + + + diff --git a/node_modules/vant-weapp/lib/card/index.wxss b/node_modules/vant-weapp/lib/card/index.wxss new file mode 100644 index 0000000..6a74925 --- /dev/null +++ b/node_modules/vant-weapp/lib/card/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-card{position:relative;padding:5px 15px;font-size:12px;color:#333;background-color:#fafafa;box-sizing:border-box}.van-card__header{display:-webkit-flex;display:flex}.van-card__header--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{position:relative;width:90px;height:90px;margin-right:10px;-webkit-flex:none;flex:none}.van-card__thumb:empty{display:none}.van-card__img{width:100%;height:100%}.van-card__content{position:relative;min-width:0;-webkit-flex:1;flex:1}.van-card__desc,.van-card__title{word-break:break-all}.van-card__title{font-weight:700;line-height:16px}.van-card__desc{color:#7d7e80}.van-card__bottom,.van-card__desc{line-height:20px}.van-card__price{display:inline-block;font-weight:700;color:#f44}.van-card__origin-price{display:inline-block;margin-left:5px;font-size:10px;color:#7d7e80;text-decoration:line-through}.van-card__num{float:right}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{width:100%;text-align:right;-webkit-flex:none;flex:none} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/cell-group/index.js b/node_modules/vant-weapp/lib/cell-group/index.js new file mode 100644 index 0000000..c81ce4b --- /dev/null +++ b/node_modules/vant-weapp/lib/cell-group/index.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + props: { + title: String, + border: { + type: Boolean, + value: true + } + } +}); diff --git a/node_modules/vant-weapp/lib/cell-group/index.json b/node_modules/vant-weapp/lib/cell-group/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/lib/cell-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/cell-group/index.wxml b/node_modules/vant-weapp/lib/cell-group/index.wxml new file mode 100644 index 0000000..6e0b471 --- /dev/null +++ b/node_modules/vant-weapp/lib/cell-group/index.wxml @@ -0,0 +1,9 @@ + + {{ title }} + + + + diff --git a/node_modules/vant-weapp/lib/cell-group/index.wxss b/node_modules/vant-weapp/lib/cell-group/index.wxss new file mode 100644 index 0000000..e0fc603 --- /dev/null +++ b/node_modules/vant-weapp/lib/cell-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-cell-group__title{font-size:14px;padding:15px 15px 5px;color:#999;line-height:16px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/cell/index.js b/node_modules/vant-weapp/lib/cell/index.js new file mode 100644 index 0000000..b35ed85 --- /dev/null +++ b/node_modules/vant-weapp/lib/cell/index.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var link_1 = require("../mixins/link"); +var component_1 = require("../common/component"); +component_1.VantComponent({ + classes: [ + 'title-class', + 'label-class', + 'value-class', + 'right-icon-class', + 'hover-class' + ], + mixins: [link_1.link], + props: { + title: null, + value: null, + icon: String, + size: String, + label: String, + center: Boolean, + isLink: Boolean, + required: Boolean, + clickable: Boolean, + titleWidth: String, + customStyle: String, + arrowDirection: String, + useLabelSlot: Boolean, + border: { + type: Boolean, + value: true + } + }, + methods: { + onClick: function (event) { + this.$emit('click', event.detail); + this.jumpLink(); + } + } +}); diff --git a/node_modules/vant-weapp/lib/cell/index.json b/node_modules/vant-weapp/lib/cell/index.json new file mode 100644 index 0000000..a9ab393 --- /dev/null +++ b/node_modules/vant-weapp/lib/cell/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/cell/index.wxml b/node_modules/vant-weapp/lib/cell/index.wxml new file mode 100644 index 0000000..afaaaf8 --- /dev/null +++ b/node_modules/vant-weapp/lib/cell/index.wxml @@ -0,0 +1,45 @@ + + + + + + + + {{ title }} + + + + + {{ label }} + + + + + {{ value }} + + + + + + + + diff --git a/node_modules/vant-weapp/lib/cell/index.wxss b/node_modules/vant-weapp/lib/cell/index.wxss new file mode 100644 index 0000000..a476af1 --- /dev/null +++ b/node_modules/vant-weapp/lib/cell/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-cell{position:relative;display:-webkit-flex;display:flex;width:100%;padding:10px 15px;font-size:14px;line-height:24px;color:#333;background-color:#fff;box-sizing:border-box}.van-cell:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:auto;left:15px;right:0;bottom:0;-webkit-transform:scaleY(.5);transform:scaleY(.5);border-bottom:1px solid #eee}.van-cell--borderless:after{display:none}.van-cell-group{background-color:#fff}.van-cell__label{margin-top:3px;font-size:12px;line-height:18px;color:#999}.van-cell__value{overflow:hidden;color:#999;text-align:right;vertical-align:middle}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;height:24px;font-size:16px;-webkit-align-items:center;align-items:center}.van-cell__left-icon-wrap{margin-right:5px}.van-cell__right-icon-wrap{margin-left:5px;color:#999}.van-cell__left-icon{line-height:24px;vertical-align:middle}.van-cell__right-icon{line-height:24px}.van-cell--clickable.van-cell--hover{background-color:#f2f3f5}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;left:7px;font-size:14px;color:#f44;content:"*"}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-bottom:12px}.van-cell--large .van-cell__title{font-size:16px}.van-cell--large .van-cell__label{font-size:14px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/checkbox-group/index.js b/node_modules/vant-weapp/lib/checkbox-group/index.js new file mode 100644 index 0000000..0fdb4d0 --- /dev/null +++ b/node_modules/vant-weapp/lib/checkbox-group/index.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + field: true, + relation: { + name: 'checkbox', + type: 'descendant', + linked: function (target) { + this.children = this.children || []; + this.children.push(target); + this.updateChild(target); + }, + unlinked: function (target) { + this.children = this.children.filter(function (child) { return child !== target; }); + } + }, + props: { + max: Number, + value: { + type: Array, + observer: 'updateChildren' + }, + disabled: { + type: Boolean, + observer: 'updateChildren' + } + }, + methods: { + updateChildren: function () { + var _this = this; + (this.children || []).forEach(function (child) { + return _this.updateChild(child); + }); + }, + updateChild: function (child) { + var _a = this.data, value = _a.value, disabled = _a.disabled; + child.set({ + value: value.indexOf(child.data.name) !== -1, + disabled: disabled || child.data.disabled + }); + } + } +}); diff --git a/node_modules/vant-weapp/lib/checkbox-group/index.json b/node_modules/vant-weapp/lib/checkbox-group/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/lib/checkbox-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/lib/checkbox-group/index.wxml b/node_modules/vant-weapp/lib/checkbox-group/index.wxml new file mode 100644 index 0000000..4fa864c --- /dev/null +++ b/node_modules/vant-weapp/lib/checkbox-group/index.wxml @@ -0,0 +1 @@ + diff --git a/node_modules/vant-weapp/lib/checkbox-group/index.wxss b/node_modules/vant-weapp/lib/checkbox-group/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/node_modules/vant-weapp/lib/checkbox-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/checkbox/index.js b/node_modules/vant-weapp/lib/checkbox/index.js new file mode 100644 index 0000000..d690fbf --- /dev/null +++ b/node_modules/vant-weapp/lib/checkbox/index.js @@ -0,0 +1,76 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +function emit(target, value) { + target.$emit('input', value); + target.$emit('change', value); +} +component_1.VantComponent({ + field: true, + relation: { + name: 'checkbox-group', + type: 'ancestor', + linked: function (target) { + this.parent = target; + }, + unlinked: function () { + this.parent = null; + } + }, + classes: ['icon-class', 'label-class'], + props: { + value: Boolean, + disabled: Boolean, + useIconSlot: Boolean, + checkedColor: String, + labelPosition: String, + labelDisabled: Boolean, + shape: { + type: String, + value: 'round' + } + }, + methods: { + emitChange: function (value) { + if (this.parent) { + this.setParentValue(this.parent, value); + } + else { + emit(this, value); + } + }, + toggle: function () { + var _a = this.data, disabled = _a.disabled, value = _a.value; + if (!disabled) { + this.emitChange(!value); + } + }, + onClickLabel: function () { + var _a = this.data, labelDisabled = _a.labelDisabled, disabled = _a.disabled, value = _a.value; + if (!disabled && !labelDisabled) { + this.emitChange(!value); + } + }, + setParentValue: function (parent, value) { + var parentValue = parent.data.value.slice(); + var name = this.data.name; + var max = parent.data.max; + if (value) { + if (max && parentValue.length >= max) { + return; + } + if (parentValue.indexOf(name) === -1) { + parentValue.push(name); + emit(parent, parentValue); + } + } + else { + var index = parentValue.indexOf(name); + if (index !== -1) { + parentValue.splice(index, 1); + emit(parent, parentValue); + } + } + } + } +}); diff --git a/node_modules/vant-weapp/lib/checkbox/index.json b/node_modules/vant-weapp/lib/checkbox/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/node_modules/vant-weapp/lib/checkbox/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/lib/checkbox/index.wxml b/node_modules/vant-weapp/lib/checkbox/index.wxml new file mode 100644 index 0000000..1659ba4 --- /dev/null +++ b/node_modules/vant-weapp/lib/checkbox/index.wxml @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/node_modules/vant-weapp/lib/checkbox/index.wxss b/node_modules/vant-weapp/lib/checkbox/index.wxss new file mode 100644 index 0000000..f623e17 --- /dev/null +++ b/node_modules/vant-weapp/lib/checkbox/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-checkbox__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c9c9c9}.van-checkbox__label{margin-left:10px;color:#333;word-break:break-all}.van-checkbox__label--left{float:left;margin:0 10px 0 0}.van-checkbox__label--disabled{color:#c9c9c9}.van-checkbox__label:empty{margin:0} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/col/index.js b/node_modules/vant-weapp/lib/col/index.js new file mode 100644 index 0000000..1f6beed --- /dev/null +++ b/node_modules/vant-weapp/lib/col/index.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + relation: { + name: 'row', + type: 'ancestor' + }, + props: { + span: Number, + offset: Number + }, + data: { + style: '' + }, + methods: { + setGutter: function (gutter) { + var padding = gutter / 2 + "px"; + var style = gutter ? "padding-left: " + padding + "; padding-right: " + padding + ";" : ''; + if (style !== this.data.style) { + this.set({ style: style }); + } + } + } +}); diff --git a/node_modules/vant-weapp/lib/col/index.json b/node_modules/vant-weapp/lib/col/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/lib/col/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/lib/col/index.wxml b/node_modules/vant-weapp/lib/col/index.wxml new file mode 100644 index 0000000..a759aac --- /dev/null +++ b/node_modules/vant-weapp/lib/col/index.wxml @@ -0,0 +1,8 @@ + + + + + diff --git a/node_modules/vant-weapp/lib/col/index.wxss b/node_modules/vant-weapp/lib/col/index.wxss new file mode 100644 index 0000000..44c896a --- /dev/null +++ b/node_modules/vant-weapp/lib/col/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-col{float:left;box-sizing:border-box}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/collapse-item/index.js b/node_modules/vant-weapp/lib/collapse-item/index.js new file mode 100644 index 0000000..08bb4db --- /dev/null +++ b/node_modules/vant-weapp/lib/collapse-item/index.js @@ -0,0 +1,100 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var nextTick = function () { return new Promise(function (resolve) { return setTimeout(resolve, 20); }); }; +component_1.VantComponent({ + classes: ['title-class', 'content-class'], + relation: { + name: 'collapse', + type: 'ancestor', + linked: function (parent) { + this.parent = parent; + } + }, + props: { + name: null, + title: null, + value: null, + icon: String, + label: String, + disabled: Boolean, + clickable: Boolean, + border: { + type: Boolean, + value: true + }, + isLink: { + type: Boolean, + value: true + } + }, + data: { + contentHeight: 0, + expanded: false, + transition: false + }, + mounted: function () { + var _this = this; + this.updateExpanded() + .then(nextTick) + .then(function () { + var data = { transition: true }; + if (_this.data.expanded) { + data.contentHeight = 'auto'; + } + _this.set(data); + }); + }, + methods: { + updateExpanded: function () { + if (!this.parent) { + return Promise.resolve(); + } + var _a = this.parent.data, value = _a.value, accordion = _a.accordion; + var _b = this.parent.children, children = _b === void 0 ? [] : _b; + var name = this.data.name; + var index = children.indexOf(this); + var currentName = name == null ? index : name; + var expanded = accordion + ? value === currentName + : (value || []).some(function (name) { return name === currentName; }); + var stack = []; + if (expanded !== this.data.expanded) { + stack.push(this.updateStyle(expanded)); + } + stack.push(this.set({ index: index, expanded: expanded })); + return Promise.all(stack); + }, + updateStyle: function (expanded) { + var _this = this; + return this.getRect('.van-collapse-item__content') + .then(function (rect) { return rect.height; }) + .then(function (height) { + if (expanded) { + return _this.set({ + contentHeight: height ? height + "px" : 'auto' + }); + } + return _this.set({ contentHeight: height + "px" }) + .then(nextTick) + .then(function () { return _this.set({ contentHeight: 0 }); }); + }); + }, + onClick: function () { + if (this.data.disabled) { + return; + } + var _a = this.data, name = _a.name, expanded = _a.expanded; + var index = this.parent.children.indexOf(this); + var currentName = name == null ? index : name; + this.parent.switch(currentName, !expanded); + }, + onTransitionEnd: function () { + if (this.data.expanded) { + this.set({ + contentHeight: 'auto' + }); + } + } + } +}); diff --git a/node_modules/vant-weapp/lib/collapse-item/index.json b/node_modules/vant-weapp/lib/collapse-item/index.json new file mode 100644 index 0000000..0e5425c --- /dev/null +++ b/node_modules/vant-weapp/lib/collapse-item/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index" + } +} diff --git a/node_modules/vant-weapp/lib/collapse-item/index.wxml b/node_modules/vant-weapp/lib/collapse-item/index.wxml new file mode 100644 index 0000000..91afbc2 --- /dev/null +++ b/node_modules/vant-weapp/lib/collapse-item/index.wxml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + diff --git a/node_modules/vant-weapp/lib/collapse-item/index.wxss b/node_modules/vant-weapp/lib/collapse-item/index.wxss new file mode 100644 index 0000000..2ed46f0 --- /dev/null +++ b/node_modules/vant-weapp/lib/collapse-item/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:.3s}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c9c9c9!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__wrapper--transition{transition:height .3s ease-in-out}.van-collapse-item__content{padding:15px;font-size:13px;line-height:1.5;color:#999;background-color:#fff} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/collapse/index.js b/node_modules/vant-weapp/lib/collapse/index.js new file mode 100644 index 0000000..6298257 --- /dev/null +++ b/node_modules/vant-weapp/lib/collapse/index.js @@ -0,0 +1,52 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + relation: { + name: 'collapse-item', + type: 'descendant', + linked: function (child) { + this.children.push(child); + }, + unlinked: function (child) { + this.children = this.children.filter(function (item) { return item !== child; }); + } + }, + props: { + value: { + type: null, + observer: 'updateExpanded' + }, + accordion: { + type: Boolean, + observer: 'updateExpanded' + }, + border: { + type: Boolean, + value: true + } + }, + beforeCreate: function () { + this.children = []; + }, + methods: { + updateExpanded: function () { + this.children.forEach(function (child) { + child.updateExpanded(); + }); + }, + switch: function (name, expanded) { + var _a = this.data, accordion = _a.accordion, value = _a.value; + if (!accordion) { + name = expanded + ? (value || []).concat(name) + : (value || []).filter(function (activeName) { return activeName !== name; }); + } + else { + name = expanded ? name : ''; + } + this.$emit('change', name); + this.$emit('input', name); + } + } +}); diff --git a/node_modules/vant-weapp/lib/collapse/index.json b/node_modules/vant-weapp/lib/collapse/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/lib/collapse/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/lib/collapse/index.wxml b/node_modules/vant-weapp/lib/collapse/index.wxml new file mode 100644 index 0000000..fd4e171 --- /dev/null +++ b/node_modules/vant-weapp/lib/collapse/index.wxml @@ -0,0 +1,3 @@ + + + diff --git a/node_modules/vant-weapp/lib/collapse/index.wxss b/node_modules/vant-weapp/lib/collapse/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/node_modules/vant-weapp/lib/collapse/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/common/color.js b/node_modules/vant-weapp/lib/common/color.js new file mode 100644 index 0000000..7e8d90e --- /dev/null +++ b/node_modules/vant-weapp/lib/common/color.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RED = '#f44'; +exports.BLUE = '#1989fa'; +exports.GREEN = '#07c160'; +exports.ORANGE = '#ff976a'; diff --git a/node_modules/vant-weapp/lib/common/component.js b/node_modules/vant-weapp/lib/common/component.js new file mode 100644 index 0000000..9a28b05 --- /dev/null +++ b/node_modules/vant-weapp/lib/common/component.js @@ -0,0 +1,52 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var basic_1 = require("../mixins/basic"); +var index_1 = require("../mixins/observer/index"); +function mapKeys(source, target, map) { + Object.keys(map).forEach(function (key) { + if (source[key]) { + target[map[key]] = source[key]; + } + }); +} +function VantComponent(vantOptions) { + var _a; + if (vantOptions === void 0) { vantOptions = {}; } + var options = {}; + mapKeys(vantOptions, options, { + data: 'data', + props: 'properties', + mixins: 'behaviors', + methods: 'methods', + beforeCreate: 'created', + created: 'attached', + mounted: 'ready', + relations: 'relations', + destroyed: 'detached', + classes: 'externalClasses' + }); + var relation = vantOptions.relation; + if (relation) { + options.relations = Object.assign(options.relations || {}, (_a = {}, + _a["../" + relation.name + "/index"] = relation, + _a)); + } + // add default externalClasses + options.externalClasses = options.externalClasses || []; + options.externalClasses.push('custom-class'); + // add default behaviors + options.behaviors = options.behaviors || []; + options.behaviors.push(basic_1.basic); + // map field to form-field behavior + if (vantOptions.field) { + options.behaviors.push('wx://form-field'); + } + // add default options + options.options = { + multipleSlots: true, + addGlobalClass: true + }; + index_1.observe(vantOptions, options); + Component(options); +} +exports.VantComponent = VantComponent; diff --git a/node_modules/vant-weapp/lib/common/index.wxss b/node_modules/vant-weapp/lib/common/index.wxss new file mode 100644 index 0000000..1b5b4ee --- /dev/null +++ b/node_modules/vant-weapp/lib/common/index.wxss @@ -0,0 +1 @@ +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{content:"";display:table;clear:both}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/common/style/clearfix.wxss b/node_modules/vant-weapp/lib/common/style/clearfix.wxss new file mode 100644 index 0000000..8d6328c --- /dev/null +++ b/node_modules/vant-weapp/lib/common/style/clearfix.wxss @@ -0,0 +1 @@ +.van-clearfix:after{content:"";display:table;clear:both} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/common/style/ellipsis.wxss b/node_modules/vant-weapp/lib/common/style/ellipsis.wxss new file mode 100644 index 0000000..a829a98 --- /dev/null +++ b/node_modules/vant-weapp/lib/common/style/ellipsis.wxss @@ -0,0 +1 @@ +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/common/style/hairline.wxss b/node_modules/vant-weapp/lib/common/style/hairline.wxss new file mode 100644 index 0000000..53508ad --- /dev/null +++ b/node_modules/vant-weapp/lib/common/style/hairline.wxss @@ -0,0 +1 @@ +.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{content:" ";position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/common/style/mixins/clearfix.wxss b/node_modules/vant-weapp/lib/common/style/mixins/clearfix.wxss new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/vant-weapp/lib/common/style/mixins/ellipsis.wxss b/node_modules/vant-weapp/lib/common/style/mixins/ellipsis.wxss new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/vant-weapp/lib/common/style/mixins/hairline.wxss b/node_modules/vant-weapp/lib/common/style/mixins/hairline.wxss new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/vant-weapp/lib/common/style/var.wxss b/node_modules/vant-weapp/lib/common/style/var.wxss new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/vant-weapp/lib/common/utils.js b/node_modules/vant-weapp/lib/common/utils.js new file mode 100644 index 0000000..2af3673 --- /dev/null +++ b/node_modules/vant-weapp/lib/common/utils.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function isDef(value) { + return value !== undefined && value !== null; +} +exports.isDef = isDef; +function isObj(x) { + var type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} +exports.isObj = isObj; +function isNumber(value) { + return /^\d+$/.test(value); +} +exports.isNumber = isNumber; +function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} +exports.range = range; +function nextTick(fn) { + setTimeout(function () { + fn(); + }, 1000 / 30); +} +exports.nextTick = nextTick; +var systemInfo = null; +function getSystemInfoSync() { + if (systemInfo == null) { + systemInfo = wx.getSystemInfoSync(); + } + return systemInfo; +} +exports.getSystemInfoSync = getSystemInfoSync; diff --git a/node_modules/vant-weapp/lib/datetime-picker/index.js b/node_modules/vant-weapp/lib/datetime-picker/index.js new file mode 100644 index 0000000..6e7d6cd --- /dev/null +++ b/node_modules/vant-weapp/lib/datetime-picker/index.js @@ -0,0 +1,312 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var utils_1 = require("../common/utils"); +var shared_1 = require("../picker/shared"); +var currentYear = new Date().getFullYear(); +function isValidDate(date) { + return utils_1.isDef(date) && !isNaN(new Date(date).getTime()); +} +function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} +function padZero(val) { + return ("00" + val).slice(-2); +} +function times(n, iteratee) { + var index = -1; + var result = Array(n < 0 ? 0 : n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} +function getTrueValue(formattedValue) { + if (!formattedValue) + return; + while (isNaN(parseInt(formattedValue, 10))) { + formattedValue = formattedValue.slice(1); + } + return parseInt(formattedValue, 10); +} +function getMonthEndDay(year, month) { + return 32 - new Date(year, month - 1, 32).getDate(); +} +var defaultFormatter = function (_, value) { return value; }; +component_1.VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: __assign({}, shared_1.pickerProps, { formatter: { + type: Function, + value: defaultFormatter + }, value: null, type: { + type: String, + value: 'datetime' + }, showToolbar: { + type: Boolean, + value: true + }, minDate: { + type: Number, + value: new Date(currentYear - 10, 0, 1).getTime() + }, maxDate: { + type: Number, + value: new Date(currentYear + 10, 11, 31).getTime() + }, minHour: { + type: Number, + value: 0 + }, maxHour: { + type: Number, + value: 23 + }, minMinute: { + type: Number, + value: 0 + }, maxMinute: { + type: Number, + value: 59 + } }), + data: { + innerValue: Date.now(), + columns: [] + }, + watch: { + value: 'updateValue', + type: 'updateValue', + minDate: 'updateValue', + maxDate: 'updateValue', + minHour: 'updateValue', + maxHour: 'updateValue', + minMinute: 'updateValue', + maxMinute: 'updateValue' + }, + methods: { + updateValue: function () { + var _this = this; + var data = this.data; + var val = this.correctValue(this.data.value); + var isEqual = val === data.innerValue; + if (!isEqual) { + this.updateColumnValue(val).then(function () { + _this.$emit('input', val); + }); + } + else { + this.updateColumns(); + } + }, + getPicker: function () { + if (this.picker == null) { + this.picker = this.selectComponent('.van-datetime-picker'); + var picker_1 = this.picker; + var setColumnValues_1 = picker_1.setColumnValues; + picker_1.setColumnValues = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return setColumnValues_1.apply(picker_1, args.concat([false])); + }; + } + return this.picker; + }, + updateColumns: function () { + var _a = this.data.formatter, formatter = _a === void 0 ? defaultFormatter : _a; + var results = this.getRanges().map(function (_a) { + var type = _a.type, range = _a.range; + var values = times(range[1] - range[0] + 1, function (index) { + var value = range[0] + index; + value = type === 'year' ? "" + value : padZero(value); + return formatter(type, value); + }); + return { values: values }; + }); + return this.set({ columns: results }); + }, + getRanges: function () { + var data = this.data; + if (data.type === 'time') { + return [ + { + type: 'hour', + range: [data.minHour, data.maxHour] + }, + { + type: 'minute', + range: [data.minMinute, data.maxMinute] + } + ]; + } + var _a = this.getBoundary('max', data.innerValue), maxYear = _a.maxYear, maxDate = _a.maxDate, maxMonth = _a.maxMonth, maxHour = _a.maxHour, maxMinute = _a.maxMinute; + var _b = this.getBoundary('min', data.innerValue), minYear = _b.minYear, minDate = _b.minDate, minMonth = _b.minMonth, minHour = _b.minHour, minMinute = _b.minMinute; + var result = [ + { + type: 'year', + range: [minYear, maxYear] + }, + { + type: 'month', + range: [minMonth, maxMonth] + }, + { + type: 'day', + range: [minDate, maxDate] + }, + { + type: 'hour', + range: [minHour, maxHour] + }, + { + type: 'minute', + range: [minMinute, maxMinute] + } + ]; + if (data.type === 'date') + result.splice(3, 2); + if (data.type === 'year-month') + result.splice(2, 3); + return result; + }, + correctValue: function (value) { + var data = this.data; + // validate value + var isDateType = data.type !== 'time'; + if (isDateType && !isValidDate(value)) { + value = data.minDate; + } + else if (!isDateType && !value) { + var minHour = data.minHour; + value = padZero(minHour) + ":00"; + } + // time type + if (!isDateType) { + var _a = value.split(':'), hour = _a[0], minute = _a[1]; + hour = padZero(range(hour, data.minHour, data.maxHour)); + minute = padZero(range(minute, data.minMinute, data.maxMinute)); + return hour + ":" + minute; + } + // date type + value = Math.max(value, data.minDate); + value = Math.min(value, data.maxDate); + return value; + }, + getBoundary: function (type, innerValue) { + var _a; + var value = new Date(innerValue); + var boundary = new Date(this.data[type + "Date"]); + var year = boundary.getFullYear(); + var month = 1; + var date = 1; + var hour = 0; + var minute = 0; + if (type === 'max') { + month = 12; + date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1); + hour = 23; + minute = 59; + } + if (value.getFullYear() === year) { + month = boundary.getMonth() + 1; + if (value.getMonth() + 1 === month) { + date = boundary.getDate(); + if (value.getDate() === date) { + hour = boundary.getHours(); + if (value.getHours() === hour) { + minute = boundary.getMinutes(); + } + } + } + } + return _a = {}, + _a[type + "Year"] = year, + _a[type + "Month"] = month, + _a[type + "Date"] = date, + _a[type + "Hour"] = hour, + _a[type + "Minute"] = minute, + _a; + }, + onCancel: function () { + this.$emit('cancel'); + }, + onConfirm: function () { + this.$emit('confirm', this.data.innerValue); + }, + onChange: function () { + var _this = this; + var data = this.data; + var value; + var picker = this.getPicker(); + if (data.type === 'time') { + var indexes = picker.getIndexes(); + value = indexes[0] + data.minHour + ":" + (indexes[1] + data.minMinute); + } + else { + var values = picker.getValues(); + var year = getTrueValue(values[0]); + var month = getTrueValue(values[1]); + var maxDate = getMonthEndDay(year, month); + var date = getTrueValue(values[2]); + if (data.type === 'year-month') { + date = 1; + } + date = date > maxDate ? maxDate : date; + var hour = 0; + var minute = 0; + if (data.type === 'datetime') { + hour = getTrueValue(values[3]); + minute = getTrueValue(values[4]); + } + value = new Date(year, month - 1, date, hour, minute); + } + value = this.correctValue(value); + this.updateColumnValue(value).then(function () { + _this.$emit('input', value); + _this.$emit('change', picker); + }); + }, + updateColumnValue: function (value) { + var _this = this; + var values = []; + var _a = this.data, type = _a.type, _b = _a.formatter, formatter = _b === void 0 ? defaultFormatter : _b; + var picker = this.getPicker(); + if (type === 'time') { + var pair = value.split(':'); + values = [ + formatter('hour', pair[0]), + formatter('minute', pair[1]) + ]; + } + else { + var date = new Date(value); + values = [ + formatter('year', "" + date.getFullYear()), + formatter('month', padZero(date.getMonth() + 1)) + ]; + if (type === 'date') { + values.push(formatter('day', padZero(date.getDate()))); + } + if (type === 'datetime') { + values.push(formatter('day', padZero(date.getDate())), formatter('hour', padZero(date.getHours())), formatter('minute', padZero(date.getMinutes()))); + } + } + return this.set({ innerValue: value }) + .then(function () { return _this.updateColumns(); }) + .then(function () { return picker.setValues(values); }); + } + }, + created: function () { + var _this = this; + var innerValue = this.correctValue(this.data.value); + this.updateColumnValue(innerValue).then(function () { + _this.$emit('input', innerValue); + }); + } +}); diff --git a/node_modules/vant-weapp/lib/datetime-picker/index.json b/node_modules/vant-weapp/lib/datetime-picker/index.json new file mode 100644 index 0000000..a778e91 --- /dev/null +++ b/node_modules/vant-weapp/lib/datetime-picker/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-picker": "../picker/index" + } +} diff --git a/node_modules/vant-weapp/lib/datetime-picker/index.wxml b/node_modules/vant-weapp/lib/datetime-picker/index.wxml new file mode 100644 index 0000000..ade2202 --- /dev/null +++ b/node_modules/vant-weapp/lib/datetime-picker/index.wxml @@ -0,0 +1,16 @@ + diff --git a/node_modules/vant-weapp/lib/datetime-picker/index.wxss b/node_modules/vant-weapp/lib/datetime-picker/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/node_modules/vant-weapp/lib/datetime-picker/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/definitions/index.js b/node_modules/vant-weapp/lib/definitions/index.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/vant-weapp/lib/definitions/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/vant-weapp/lib/definitions/weapp.js b/node_modules/vant-weapp/lib/definitions/weapp.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/node_modules/vant-weapp/lib/definitions/weapp.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/vant-weapp/lib/dialog/dialog.js b/node_modules/vant-weapp/lib/dialog/dialog.js new file mode 100644 index 0000000..78e40d7 --- /dev/null +++ b/node_modules/vant-weapp/lib/dialog/dialog.js @@ -0,0 +1,76 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var queue = []; +function getContext() { + var pages = getCurrentPages(); + return pages[pages.length - 1]; +} +var Dialog = function (options) { + options = __assign({}, Dialog.currentOptions, options); + return new Promise(function (resolve, reject) { + var context = options.context || getContext(); + var dialog = context.selectComponent(options.selector); + delete options.context; + delete options.selector; + if (dialog) { + dialog.set(__assign({ onCancel: reject, onConfirm: resolve }, options)); + queue.push(dialog); + } + else { + console.warn('未找到 van-dialog 节点,请确认 selector 及 context 是否正确'); + } + }); +}; +Dialog.defaultOptions = { + show: true, + title: '', + message: '', + zIndex: 100, + overlay: true, + className: '', + customStyle: '', + asyncClose: false, + messageAlign: '', + transition: 'scale', + selector: '#van-dialog', + confirmButtonText: '确认', + cancelButtonText: '取消', + showConfirmButton: true, + showCancelButton: false, + closeOnClickOverlay: false, + confirmButtonOpenType: '' +}; +Dialog.alert = Dialog; +Dialog.confirm = function (options) { + return Dialog(__assign({ showCancelButton: true }, options)); +}; +Dialog.close = function () { + queue.forEach(function (dialog) { + dialog.close(); + }); + queue = []; +}; +Dialog.stopLoading = function () { + queue.forEach(function (dialog) { + dialog.stopLoading(); + }); +}; +Dialog.setDefaultOptions = function (options) { + Object.assign(Dialog.currentOptions, options); +}; +Dialog.resetDefaultOptions = function () { + Dialog.currentOptions = __assign({}, Dialog.defaultOptions); +}; +Dialog.resetDefaultOptions(); +exports.default = Dialog; diff --git a/node_modules/vant-weapp/lib/dialog/index.js b/node_modules/vant-weapp/lib/dialog/index.js new file mode 100644 index 0000000..06b67d5 --- /dev/null +++ b/node_modules/vant-weapp/lib/dialog/index.js @@ -0,0 +1,101 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var button_1 = require("../mixins/button"); +var open_type_1 = require("../mixins/open-type"); +component_1.VantComponent({ + mixins: [button_1.button, open_type_1.openType], + props: { + show: Boolean, + title: String, + message: String, + useSlot: Boolean, + className: String, + customStyle: String, + asyncClose: Boolean, + messageAlign: String, + showCancelButton: Boolean, + closeOnClickOverlay: Boolean, + confirmButtonOpenType: String, + zIndex: { + type: Number, + value: 2000 + }, + confirmButtonText: { + type: String, + value: '确认' + }, + cancelButtonText: { + type: String, + value: '取消' + }, + showConfirmButton: { + type: Boolean, + value: true + }, + overlay: { + type: Boolean, + value: true + }, + transition: { + type: String, + value: 'scale' + } + }, + data: { + loading: { + confirm: false, + cancel: false + } + }, + watch: { + show: function (show) { + !show && this.stopLoading(); + } + }, + methods: { + onConfirm: function () { + this.handleAction('confirm'); + }, + onCancel: function () { + this.handleAction('cancel'); + }, + onClickOverlay: function () { + this.onClose('overlay'); + }, + handleAction: function (action) { + var _a; + if (this.data.asyncClose) { + this.set((_a = {}, + _a["loading." + action] = true, + _a)); + } + this.onClose(action); + }, + close: function () { + this.set({ + show: false + }); + }, + stopLoading: function () { + this.set({ + loading: { + confirm: false, + cancel: false + } + }); + }, + onClose: function (action) { + if (!this.data.asyncClose) { + this.close(); + } + this.$emit('close', action); + // 把 dialog 实例传递出去,可以通过 stopLoading() 在外部关闭按钮的 loading + this.$emit(action, { dialog: this }); + var callback = this.data[action === 'confirm' ? 'onConfirm' : 'onCancel']; + if (callback) { + callback(this); + } + } + } +}); diff --git a/node_modules/vant-weapp/lib/dialog/index.json b/node_modules/vant-weapp/lib/dialog/index.json new file mode 100644 index 0000000..e2ee09a --- /dev/null +++ b/node_modules/vant-weapp/lib/dialog/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-popup": "../popup/index", + "van-button": "../button/index" + } +} diff --git a/node_modules/vant-weapp/lib/dialog/index.wxml b/node_modules/vant-weapp/lib/dialog/index.wxml new file mode 100644 index 0000000..13a77d1 --- /dev/null +++ b/node_modules/vant-weapp/lib/dialog/index.wxml @@ -0,0 +1,65 @@ + + + {{ title }} + + + + + {{ message }} + + + + + {{ cancelButtonText }} + + + {{ confirmButtonText }} + + + diff --git a/node_modules/vant-weapp/lib/dialog/index.wxss b/node_modules/vant-weapp/lib/dialog/index.wxss new file mode 100644 index 0000000..9dfacb2 --- /dev/null +++ b/node_modules/vant-weapp/lib/dialog/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-dialog{top:45%!important;width:85%;overflow:hidden;font-size:16px;background-color:#fff;border-radius:4px}.van-dialog__header{padding-top:25px;font-weight:500;line-height:24px;text-align:center}.van-dialog__header--isolated{padding:25px 0}.van-dialog__message{max-height:60vh;padding:25px;overflow-y:auto;font-size:14px;line-height:20px;text-align:center;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:12px;color:#7d7e80}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog__confirm{color:#1989fa!important}.van-dialog-bounce-enter{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9)} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/field/index.js b/node_modules/vant-weapp/lib/field/index.js new file mode 100644 index 0000000..d27057a --- /dev/null +++ b/node_modules/vant-weapp/lib/field/index.js @@ -0,0 +1,109 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var utils_1 = require("../common/utils"); +component_1.VantComponent({ + field: true, + classes: ['input-class', 'right-icon-class'], + props: { + size: String, + icon: String, + label: String, + error: Boolean, + fixed: Boolean, + focus: Boolean, + center: Boolean, + isLink: Boolean, + leftIcon: String, + rightIcon: String, + disabled: Boolean, + autosize: Boolean, + readonly: Boolean, + required: Boolean, + password: Boolean, + iconClass: String, + clearable: Boolean, + inputAlign: String, + customStyle: String, + confirmType: String, + confirmHold: Boolean, + errorMessage: String, + placeholder: String, + placeholderStyle: String, + errorMessageAlign: String, + selectionEnd: { + type: Number, + value: -1 + }, + selectionStart: { + type: Number, + value: -1 + }, + showConfirmBar: { + type: Boolean, + value: true + }, + adjustPosition: { + type: Boolean, + value: true + }, + cursorSpacing: { + type: Number, + value: 50 + }, + maxlength: { + type: Number, + value: -1 + }, + type: { + type: String, + value: 'text' + }, + border: { + type: Boolean, + value: true + }, + titleWidth: { + type: String, + value: '90px' + } + }, + data: { + focused: false, + system: utils_1.getSystemInfoSync().system.split(' ').shift().toLowerCase() + }, + methods: { + onInput: function (event) { + var _this = this; + var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a; + this.set({ value: value }, function () { + _this.emitChange(value); + }); + }, + onFocus: function (event) { + this.set({ focused: true }); + this.$emit('focus', event.detail); + }, + onBlur: function (event) { + this.set({ focused: false }); + this.$emit('blur', event.detail); + }, + onClickIcon: function () { + this.$emit('click-icon'); + }, + onClear: function () { + var _this = this; + this.set({ value: '' }, function () { + _this.emitChange(''); + _this.$emit('clear', ''); + }); + }, + onConfirm: function () { + this.$emit('confirm', this.data.value); + }, + emitChange: function (value) { + this.$emit('input', value); + this.$emit('change', value); + } + } +}); diff --git a/node_modules/vant-weapp/lib/field/index.json b/node_modules/vant-weapp/lib/field/index.json new file mode 100644 index 0000000..8809c46 --- /dev/null +++ b/node_modules/vant-weapp/lib/field/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index", + "van-icon": "../icon/index" + } +} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/field/index.wxml b/node_modules/vant-weapp/lib/field/index.wxml new file mode 100644 index 0000000..d5e70cc --- /dev/null +++ b/node_modules/vant-weapp/lib/field/index.wxml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + {{ errorMessage }} + + diff --git a/node_modules/vant-weapp/lib/field/index.wxss b/node_modules/vant-weapp/lib/field/index.wxss new file mode 100644 index 0000000..e53fee3 --- /dev/null +++ b/node_modules/vant-weapp/lib/field/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px;line-height:1.2em}.van-field__body--textarea.van-field__body--ios{margin-top:-4.5px}.van-field__input{position:relative;display:block;width:100%;height:24px;min-height:24px;padding:0;margin:0;line-height:inherit;color:#333;text-align:left;background-color:initial;border:0;box-sizing:border-box;resize:none}.van-field__input--textarea{height:18px;min-height:18px}.van-field__input--error{color:#f44}.van-field__input--disabled{color:#999;background-color:initial;opacity:1}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;right:0;left:0;color:#999;pointer-events:none}.van-field__placeholder--error{color:#f44}.van-field__icon-root{display:-webkit-flex;display:flex;min-height:24px;-webkit-align-items:center;align-items:center}.van-field__clear-root,.van-field__icon-container{padding:0 10px;margin-right:-10px;line-height:inherit;vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:10px}.van-field__button:empty{display:none}.van-field__error-message{font-size:12px;color:#f44;text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/goods-action-button/index.js b/node_modules/vant-weapp/lib/goods-action-button/index.js new file mode 100644 index 0000000..943728c --- /dev/null +++ b/node_modules/vant-weapp/lib/goods-action-button/index.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var link_1 = require("../mixins/link"); +var button_1 = require("../mixins/button"); +var open_type_1 = require("../mixins/open-type"); +component_1.VantComponent({ + mixins: [link_1.link, button_1.button, open_type_1.openType], + props: { + text: String, + loading: Boolean, + disabled: Boolean, + type: { + type: String, + value: 'danger' + } + }, + methods: { + onClick: function (event) { + this.$emit('click', event.detail); + this.jumpLink(); + } + } +}); diff --git a/node_modules/vant-weapp/lib/goods-action-button/index.json b/node_modules/vant-weapp/lib/goods-action-button/index.json new file mode 100644 index 0000000..b567686 --- /dev/null +++ b/node_modules/vant-weapp/lib/goods-action-button/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-button": "../button/index" + } +} diff --git a/node_modules/vant-weapp/lib/goods-action-button/index.wxml b/node_modules/vant-weapp/lib/goods-action-button/index.wxml new file mode 100644 index 0000000..39296d5 --- /dev/null +++ b/node_modules/vant-weapp/lib/goods-action-button/index.wxml @@ -0,0 +1,27 @@ + + {{ text }} + diff --git a/node_modules/vant-weapp/lib/goods-action-button/index.wxss b/node_modules/vant-weapp/lib/goods-action-button/index.wxss new file mode 100644 index 0000000..5800197 --- /dev/null +++ b/node_modules/vant-weapp/lib/goods-action-button/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';:host{-webkit-flex:1;flex:1} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/goods-action-icon/index.js b/node_modules/vant-weapp/lib/goods-action-icon/index.js new file mode 100644 index 0000000..b43fc35 --- /dev/null +++ b/node_modules/vant-weapp/lib/goods-action-icon/index.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var link_1 = require("../mixins/link"); +var button_1 = require("../mixins/button"); +var open_type_1 = require("../mixins/open-type"); +component_1.VantComponent({ + classes: ['icon-class', 'text-class'], + mixins: [link_1.link, button_1.button, open_type_1.openType], + props: { + text: String, + info: String, + icon: String, + disabled: Boolean, + loading: Boolean + }, + methods: { + onClick: function (event) { + this.$emit('click', event.detail); + this.jumpLink(); + } + } +}); diff --git a/node_modules/vant-weapp/lib/goods-action-icon/index.json b/node_modules/vant-weapp/lib/goods-action-icon/index.json new file mode 100644 index 0000000..93bfe8a --- /dev/null +++ b/node_modules/vant-weapp/lib/goods-action-icon/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-button": "../button/index" + } +} diff --git a/node_modules/vant-weapp/lib/goods-action-icon/index.wxml b/node_modules/vant-weapp/lib/goods-action-icon/index.wxml new file mode 100644 index 0000000..40c0773 --- /dev/null +++ b/node_modules/vant-weapp/lib/goods-action-icon/index.wxml @@ -0,0 +1,35 @@ + + + + {{ text }} + + diff --git a/node_modules/vant-weapp/lib/goods-action-icon/index.wxss b/node_modules/vant-weapp/lib/goods-action-icon/index.wxss new file mode 100644 index 0000000..674d0a0 --- /dev/null +++ b/node_modules/vant-weapp/lib/goods-action-icon/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-goods-action-icon{width:50px!important;border:none!important}.van-goods-action-icon__content{display:-webkit-flex;display:flex;height:100%;font-size:10px;line-height:1;color:#7d7e80;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-goods-action-icon__icon{margin-bottom:4px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/goods-action/index.js b/node_modules/vant-weapp/lib/goods-action/index.js new file mode 100644 index 0000000..7305e50 --- /dev/null +++ b/node_modules/vant-weapp/lib/goods-action/index.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var safe_area_1 = require("../mixins/safe-area"); +component_1.VantComponent({ + mixins: [safe_area_1.safeArea()] +}); diff --git a/node_modules/vant-weapp/lib/goods-action/index.json b/node_modules/vant-weapp/lib/goods-action/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/lib/goods-action/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/lib/goods-action/index.wxml b/node_modules/vant-weapp/lib/goods-action/index.wxml new file mode 100644 index 0000000..6e61cc9 --- /dev/null +++ b/node_modules/vant-weapp/lib/goods-action/index.wxml @@ -0,0 +1,5 @@ + + + + + diff --git a/node_modules/vant-weapp/lib/goods-action/index.wxss b/node_modules/vant-weapp/lib/goods-action/index.wxss new file mode 100644 index 0000000..ce8200c --- /dev/null +++ b/node_modules/vant-weapp/lib/goods-action/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-goods-action{position:fixed;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;background-color:#fff}.van-goods-action--safe{padding-bottom:34px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/icon/index.js b/node_modules/vant-weapp/lib/icon/index.js new file mode 100644 index 0000000..ee032c7 --- /dev/null +++ b/node_modules/vant-weapp/lib/icon/index.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + props: { + info: null, + name: String, + size: String, + color: String, + customStyle: String, + classPrefix: { + type: String, + value: 'van-icon' + } + }, + methods: { + onClick: function () { + this.$emit('click'); + } + } +}); diff --git a/node_modules/vant-weapp/lib/icon/index.json b/node_modules/vant-weapp/lib/icon/index.json new file mode 100644 index 0000000..bf0ebe0 --- /dev/null +++ b/node_modules/vant-weapp/lib/icon/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-info": "../info/index" + } +} diff --git a/node_modules/vant-weapp/lib/icon/index.wxml b/node_modules/vant-weapp/lib/icon/index.wxml new file mode 100644 index 0000000..3c1bbad --- /dev/null +++ b/node_modules/vant-weapp/lib/icon/index.wxml @@ -0,0 +1,19 @@ + + + + + + diff --git a/node_modules/vant-weapp/lib/icon/index.wxss b/node_modules/vant-weapp/lib/icon/index.wxss new file mode 100644 index 0000000..2b219ec --- /dev/null +++ b/node_modules/vant-weapp/lib/icon/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';@font-face{font-style:normal;font-weight:400;font-family:vant-icon;src:url(https://img.yzcdn.cn/vant/vant-icon-3a7dc2.woff2) format("woff2"),url(https://img.yzcdn.cn/vant/vant-icon-3a7dc2.woff) format("woff"),url(https://img.yzcdn.cn/vant/vant-icon-3a7dc2.ttf) format("truetype")}.van-icon{position:relative;font:normal normal normal 14px/1 vant-icon;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.van-icon,.van-icon:before{display:inline-block}.van-icon-add-o:before{content:"\F000"}.van-icon-add-square:before{content:"\F001"}.van-icon-add:before{content:"\F002"}.van-icon-after-sale:before{content:"\F003"}.van-icon-aim:before{content:"\F004"}.van-icon-alipay:before{content:"\F005"}.van-icon-apps-o:before{content:"\F006"}.van-icon-arrow-down:before{content:"\F007"}.van-icon-arrow-left:before{content:"\F008"}.van-icon-arrow-up:before{content:"\F009"}.van-icon-arrow:before{content:"\F00A"}.van-icon-ascending:before{content:"\F00B"}.van-icon-audio:before{content:"\F00C"}.van-icon-award-o:before{content:"\F00D"}.van-icon-award:before{content:"\F00E"}.van-icon-bag-o:before{content:"\F00F"}.van-icon-bag:before{content:"\F010"}.van-icon-balance-list-o:before{content:"\F011"}.van-icon-balance-list:before{content:"\F012"}.van-icon-balance-o:before{content:"\F013"}.van-icon-balance-pay:before{content:"\F014"}.van-icon-bar-chart-o:before{content:"\F015"}.van-icon-bars:before{content:"\F016"}.van-icon-bell:before{content:"\F017"}.van-icon-bill-o:before{content:"\F018"}.van-icon-bill:before{content:"\F019"}.van-icon-birthday-cake-o:before{content:"\F01A"}.van-icon-bookmark-o:before{content:"\F01B"}.van-icon-bookmark:before{content:"\F01C"}.van-icon-browsing-history-o:before{content:"\F01D"}.van-icon-browsing-history:before{content:"\F01E"}.van-icon-brush-o:before{content:"\F01F"}.van-icon-bulb-o:before{content:"\F020"}.van-icon-bullhorn-o:before{content:"\F021"}.van-icon-calender-o:before{content:"\F022"}.van-icon-card:before{content:"\F023"}.van-icon-cart-circle-o:before{content:"\F024"}.van-icon-cart-circle:before{content:"\F025"}.van-icon-cart-o:before{content:"\F026"}.van-icon-cart:before{content:"\F027"}.van-icon-cash-back-record:before{content:"\F028"}.van-icon-cash-on-deliver:before{content:"\F029"}.van-icon-cashier-o:before{content:"\F02A"}.van-icon-certificate:before{content:"\F02B"}.van-icon-chart-trending-o:before{content:"\F02C"}.van-icon-chat-o:before{content:"\F02D"}.van-icon-chat:before{content:"\F02E"}.van-icon-checked:before{content:"\F02F"}.van-icon-circle:before{content:"\F030"}.van-icon-clear:before{content:"\F031"}.van-icon-clock-o:before{content:"\F032"}.van-icon-clock:before{content:"\F033"}.van-icon-close:before{content:"\F034"}.van-icon-closed-eye:before{content:"\F035"}.van-icon-cluster-o:before{content:"\F036"}.van-icon-cluster:before{content:"\F037"}.van-icon-column:before{content:"\F038"}.van-icon-comment-circle-o:before{content:"\F039"}.van-icon-comment-circle:before{content:"\F03A"}.van-icon-comment-o:before{content:"\F03B"}.van-icon-comment:before{content:"\F03C"}.van-icon-completed:before{content:"\F03D"}.van-icon-contact:before{content:"\F03E"}.van-icon-coupon-o:before{content:"\F03F"}.van-icon-coupon:before{content:"\F040"}.van-icon-credit-pay:before{content:"\F041"}.van-icon-cross:before{content:"\F042"}.van-icon-debit-pay:before{content:"\F043"}.van-icon-delete:before{content:"\F044"}.van-icon-descending:before{content:"\F045"}.van-icon-description:before{content:"\F046"}.van-icon-desktop-o:before{content:"\F047"}.van-icon-diamond-o:before{content:"\F048"}.van-icon-diamond:before{content:"\F049"}.van-icon-discount:before{content:"\F04A"}.van-icon-ecard-pay:before{content:"\F04B"}.van-icon-edit:before{content:"\F04C"}.van-icon-ellipsis:before{content:"\F04D"}.van-icon-empty:before{content:"\F04E"}.van-icon-envelop-o:before{content:"\F04F"}.van-icon-exchange:before{content:"\F050"}.van-icon-expand-o:before{content:"\F051"}.van-icon-expand:before{content:"\F052"}.van-icon-eye-o:before{content:"\F053"}.van-icon-eye:before{content:"\F054"}.van-icon-fail:before{content:"\F055"}.van-icon-failure:before{content:"\F056"}.van-icon-filter-o:before{content:"\F057"}.van-icon-fire-o:before{content:"\F058"}.van-icon-fire:before{content:"\F059"}.van-icon-flag-o:before{content:"\F05A"}.van-icon-flower-o:before{content:"\F05B"}.van-icon-free-postage:before{content:"\F05C"}.van-icon-friends-o:before{content:"\F05D"}.van-icon-friends:before{content:"\F05E"}.van-icon-gem-o:before{content:"\F05F"}.van-icon-gem:before{content:"\F060"}.van-icon-gift-card-o:before{content:"\F061"}.van-icon-gift-card:before{content:"\F062"}.van-icon-gift-o:before{content:"\F063"}.van-icon-gift:before{content:"\F064"}.van-icon-gold-coin-o:before{content:"\F065"}.van-icon-gold-coin:before{content:"\F066"}.van-icon-good-job-o:before{content:"\F067"}.van-icon-good-job:before{content:"\F068"}.van-icon-goods-collect-o:before{content:"\F069"}.van-icon-goods-collect:before{content:"\F06A"}.van-icon-graphic:before{content:"\F06B"}.van-icon-home-o:before{content:"\F06C"}.van-icon-hot-o:before{content:"\F06D"}.van-icon-hot-sale-o:before{content:"\F06E"}.van-icon-hot-sale:before{content:"\F06F"}.van-icon-hot:before{content:"\F070"}.van-icon-hotel-o:before{content:"\F071"}.van-icon-idcard:before{content:"\F072"}.van-icon-info-o:before{content:"\F073"}.van-icon-info:before{content:"\F074"}.van-icon-invition:before{content:"\F075"}.van-icon-label-o:before{content:"\F076"}.van-icon-label:before{content:"\F077"}.van-icon-like-o:before{content:"\F078"}.van-icon-like:before{content:"\F079"}.van-icon-live:before{content:"\F07A"}.van-icon-location-o:before{content:"\F07B"}.van-icon-location:before{content:"\F07C"}.van-icon-lock:before{content:"\F07D"}.van-icon-logistics:before{content:"\F07E"}.van-icon-manager-o:before{content:"\F07F"}.van-icon-manager:before{content:"\F080"}.van-icon-map-marked:before{content:"\F081"}.van-icon-medel-o:before{content:"\F082"}.van-icon-medel:before{content:"\F083"}.van-icon-more-o:before{content:"\F084"}.van-icon-more:before{content:"\F085"}.van-icon-music-o:before{content:"\F086"}.van-icon-music:before{content:"\F087"}.van-icon-new-arrival-o:before{content:"\F088"}.van-icon-new-arrival:before{content:"\F089"}.van-icon-new-o:before{content:"\F08A"}.van-icon-new:before{content:"\F08B"}.van-icon-newspaper-o:before{content:"\F08C"}.van-icon-notes-o:before{content:"\F08D"}.van-icon-orders-o:before{content:"\F08E"}.van-icon-other-pay:before{content:"\F08F"}.van-icon-paid:before{content:"\F090"}.van-icon-passed:before{content:"\F091"}.van-icon-pause-circle-o:before{content:"\F092"}.van-icon-pause-circle:before{content:"\F093"}.van-icon-pause:before{content:"\F094"}.van-icon-peer-pay:before{content:"\F095"}.van-icon-pending-payment:before{content:"\F096"}.van-icon-phone-circle-o:before{content:"\F097"}.van-icon-phone-circle:before{content:"\F098"}.van-icon-phone-o:before{content:"\F099"}.van-icon-phone:before{content:"\F09A"}.van-icon-photo-o:before{content:"\F09B"}.van-icon-photo:before{content:"\F09C"}.van-icon-photograph:before{content:"\F09D"}.van-icon-play-circle-o:before{content:"\F09E"}.van-icon-play-circle:before{content:"\F09F"}.van-icon-play:before{content:"\F0A0"}.van-icon-plus:before{content:"\F0A1"}.van-icon-point-gift-o:before{content:"\F0A2"}.van-icon-point-gift:before{content:"\F0A3"}.van-icon-points:before{content:"\F0A4"}.van-icon-printer:before{content:"\F0A5"}.van-icon-qr-invalid:before{content:"\F0A6"}.van-icon-qr:before{content:"\F0A7"}.van-icon-question-o:before{content:"\F0A8"}.van-icon-question:before{content:"\F0A9"}.van-icon-records:before{content:"\F0AA"}.van-icon-refund-o:before{content:"\F0AB"}.van-icon-replay:before{content:"\F0AC"}.van-icon-scan:before{content:"\F0AD"}.van-icon-search:before{content:"\F0AE"}.van-icon-send-gift-o:before{content:"\F0AF"}.van-icon-send-gift:before{content:"\F0B0"}.van-icon-service-o:before{content:"\F0B1"}.van-icon-service:before{content:"\F0B2"}.van-icon-setting-o:before{content:"\F0B3"}.van-icon-setting:before{content:"\F0B4"}.van-icon-share:before{content:"\F0B5"}.van-icon-shop-collect-o:before{content:"\F0B6"}.van-icon-shop-collect:before{content:"\F0B7"}.van-icon-shop-o:before{content:"\F0B8"}.van-icon-shop:before{content:"\F0B9"}.van-icon-shopping-cart-o:before{content:"\F0BA"}.van-icon-shopping-cart:before{content:"\F0BB"}.van-icon-shrink:before{content:"\F0BC"}.van-icon-sign:before{content:"\F0BD"}.van-icon-smile-comment-o:before{content:"\F0BE"}.van-icon-smile-comment:before{content:"\F0BF"}.van-icon-smile-o:before{content:"\F0C0"}.van-icon-smile:before{content:"\F0C1"}.van-icon-star-o:before{content:"\F0C2"}.van-icon-star:before{content:"\F0C3"}.van-icon-stop-circle-o:before{content:"\F0C4"}.van-icon-stop-circle:before{content:"\F0C5"}.van-icon-stop:before{content:"\F0C6"}.van-icon-success:before{content:"\F0C7"}.van-icon-thumb-circle-o:before{content:"\F0C8"}.van-icon-thumb-circle:before{content:"\F0C9"}.van-icon-todo-list-o:before{content:"\F0CA"}.van-icon-todo-list:before{content:"\F0CB"}.van-icon-tosend:before{content:"\F0CC"}.van-icon-tv-o:before{content:"\F0CD"}.van-icon-umbrella-circle:before{content:"\F0CE"}.van-icon-underway-o:before{content:"\F0CF"}.van-icon-underway:before{content:"\F0D0"}.van-icon-upgrade:before{content:"\F0D1"}.van-icon-user-circle-o:before{content:"\F0D2"}.van-icon-user-o:before{content:"\F0D3"}.van-icon-video-o:before{content:"\F0D4"}.van-icon-video:before{content:"\F0D5"}.van-icon-vip-card-o:before{content:"\F0D6"}.van-icon-vip-card:before{content:"\F0D7"}.van-icon-volume-o:before{content:"\F0D8"}.van-icon-volume:before{content:"\F0D9"}.van-icon-wap-home:before{content:"\F0DA"}.van-icon-wap-nav:before{content:"\F0DB"}.van-icon-warn-o:before{content:"\F0DC"}.van-icon-warning-o:before{content:"\F0DD"}.van-icon-warning:before{content:"\F0DE"}.van-icon-weapp-nav:before{content:"\F0DF"}.van-icon-wechat:before{content:"\F0E0"}.van-icon-youzan-shield:before{content:"\F0E1"}.van-icon--image{width:1em;height:1em}.van-icon__image{width:100%;height:100%}.van-icon__info{z-index:1} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/info/index.js b/node_modules/vant-weapp/lib/info/index.js new file mode 100644 index 0000000..a2de776 --- /dev/null +++ b/node_modules/vant-weapp/lib/info/index.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + props: { + info: null, + customStyle: String + } +}); diff --git a/node_modules/vant-weapp/lib/info/index.json b/node_modules/vant-weapp/lib/info/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/lib/info/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/lib/info/index.wxml b/node_modules/vant-weapp/lib/info/index.wxml new file mode 100644 index 0000000..bf175a0 --- /dev/null +++ b/node_modules/vant-weapp/lib/info/index.wxml @@ -0,0 +1,5 @@ +{{ info }} diff --git a/node_modules/vant-weapp/lib/info/index.wxss b/node_modules/vant-weapp/lib/info/index.wxss new file mode 100644 index 0000000..f9c10d0 --- /dev/null +++ b/node_modules/vant-weapp/lib/info/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-info{position:absolute;top:-8px;right:0;min-width:16px;padding:0 3px;font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;font-size:12px;font-weight:500;line-height:14px;color:#fff;text-align:center;white-space:nowrap;background-color:#f44;border:1px solid #fff;border-radius:16px;-webkit-transform:translateX(50%);transform:translateX(50%);box-sizing:border-box;-webkit-transform-origin:100%;transform-origin:100%} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/loading/index.js b/node_modules/vant-weapp/lib/loading/index.js new file mode 100644 index 0000000..5751005 --- /dev/null +++ b/node_modules/vant-weapp/lib/loading/index.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + props: { + size: { + type: String, + value: '30px' + }, + type: { + type: String, + value: 'circular' + }, + color: { + type: String, + value: '#c9c9c9' + } + } +}); diff --git a/node_modules/vant-weapp/lib/loading/index.json b/node_modules/vant-weapp/lib/loading/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/lib/loading/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/loading/index.wxml b/node_modules/vant-weapp/lib/loading/index.wxml new file mode 100644 index 0000000..35ca0e2 --- /dev/null +++ b/node_modules/vant-weapp/lib/loading/index.wxml @@ -0,0 +1,16 @@ + + + + + diff --git a/node_modules/vant-weapp/lib/loading/index.wxss b/node_modules/vant-weapp/lib/loading/index.wxss new file mode 100644 index 0000000..58cb52a --- /dev/null +++ b/node_modules/vant-weapp/lib/loading/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-loading{z-index:0;line-height:0;vertical-align:middle}.van-loading,.van-loading__spinner{position:relative;display:inline-block}.van-loading__spinner{z-index:-1;width:100%;height:100%;box-sizing:border-box;-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border-radius:100%;border:1px solid transparent;border-top-color:initial}.van-loading__dot{top:0;left:0;width:100%;height:100%;position:absolute}.van-loading__dot:before{width:2px;height:25%;content:" ";display:block;margin:0 auto;border-radius:40%;background-color:currentColor}.van-loading__dot:first-of-type{opacity:1;-webkit-transform:rotate(30deg);transform:rotate(30deg)}.van-loading__dot:nth-of-type(2){opacity:.9375;-webkit-transform:rotate(60deg);transform:rotate(60deg)}.van-loading__dot:nth-of-type(3){opacity:.875;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.van-loading__dot:nth-of-type(4){opacity:.8125;-webkit-transform:rotate(120deg);transform:rotate(120deg)}.van-loading__dot:nth-of-type(5){opacity:.75;-webkit-transform:rotate(150deg);transform:rotate(150deg)}.van-loading__dot:nth-of-type(6){opacity:.6875;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-loading__dot:nth-of-type(7){opacity:.625;-webkit-transform:rotate(210deg);transform:rotate(210deg)}.van-loading__dot:nth-of-type(8){opacity:.5625;-webkit-transform:rotate(240deg);transform:rotate(240deg)}.van-loading__dot:nth-of-type(9){opacity:.5;-webkit-transform:rotate(270deg);transform:rotate(270deg)}.van-loading__dot:nth-of-type(10){opacity:.4375;-webkit-transform:rotate(300deg);transform:rotate(300deg)}.van-loading__dot:nth-of-type(11){opacity:.375;-webkit-transform:rotate(330deg);transform:rotate(330deg)}.van-loading__dot:nth-of-type(12){opacity:.3125;-webkit-transform:rotate(1turn);transform:rotate(1turn)}@-webkit-keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/mixins/basic.js b/node_modules/vant-weapp/lib/mixins/basic.js new file mode 100644 index 0000000..4a47215 --- /dev/null +++ b/node_modules/vant-weapp/lib/mixins/basic.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.basic = Behavior({ + methods: { + $emit: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + this.triggerEvent.apply(this, args); + }, + getRect: function (selector, all) { + var _this = this; + return new Promise(function (resolve) { + wx.createSelectorQuery() + .in(_this)[all ? 'selectAll' : 'select'](selector) + .boundingClientRect(function (rect) { + if (all && Array.isArray(rect) && rect.length) { + resolve(rect); + } + if (!all && rect) { + resolve(rect); + } + }) + .exec(); + }); + } + } +}); diff --git a/node_modules/vant-weapp/lib/mixins/button.js b/node_modules/vant-weapp/lib/mixins/button.js new file mode 100644 index 0000000..af48874 --- /dev/null +++ b/node_modules/vant-weapp/lib/mixins/button.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.button = Behavior({ + externalClasses: ['hover-class'], + properties: { + id: String, + lang: { + type: String, + value: 'en' + }, + businessId: Number, + sessionFrom: String, + sendMessageTitle: String, + sendMessagePath: String, + sendMessageImg: String, + showMessageCard: Boolean, + appParameter: String, + ariaLabel: String + } +}); diff --git a/node_modules/vant-weapp/lib/mixins/link.js b/node_modules/vant-weapp/lib/mixins/link.js new file mode 100644 index 0000000..b2b81dc --- /dev/null +++ b/node_modules/vant-weapp/lib/mixins/link.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.link = Behavior({ + properties: { + url: String, + linkType: { + type: String, + value: 'navigateTo' + } + }, + methods: { + jumpLink: function (urlKey) { + if (urlKey === void 0) { urlKey = 'url'; } + var url = this.data[urlKey]; + if (url) { + wx[this.data.linkType]({ url: url }); + } + } + } +}); diff --git a/node_modules/vant-weapp/lib/mixins/observer/behavior.js b/node_modules/vant-weapp/lib/mixins/observer/behavior.js new file mode 100644 index 0000000..dc53a92 --- /dev/null +++ b/node_modules/vant-weapp/lib/mixins/observer/behavior.js @@ -0,0 +1,51 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function setAsync(context, data) { + return new Promise(function (resolve) { + context.setData(data, resolve); + }); +} +exports.behavior = Behavior({ + created: function () { + var _this = this; + if (!this.$options) { + return; + } + var cache = {}; + var computed = this.$options().computed; + var keys = Object.keys(computed); + this.calcComputed = function () { + var needUpdate = {}; + keys.forEach(function (key) { + var value = computed[key].call(_this); + if (cache[key] !== value) { + cache[key] = value; + needUpdate[key] = value; + } + }); + return needUpdate; + }; + }, + attached: function () { + this.set(); + }, + methods: { + // set data and set computed data + set: function (data, callback) { + var _this = this; + var stack = []; + if (data) { + stack.push(setAsync(this, data)); + } + if (this.calcComputed) { + stack.push(setAsync(this, this.calcComputed())); + } + return Promise.all(stack).then(function (res) { + if (callback && typeof callback === 'function') { + callback.call(_this); + } + return res; + }); + } + } +}); diff --git a/node_modules/vant-weapp/lib/mixins/observer/index.js b/node_modules/vant-weapp/lib/mixins/observer/index.js new file mode 100644 index 0000000..5596871 --- /dev/null +++ b/node_modules/vant-weapp/lib/mixins/observer/index.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var behavior_1 = require("./behavior"); +var props_1 = require("./props"); +function observe(vantOptions, options) { + var watch = vantOptions.watch, computed = vantOptions.computed; + options.behaviors.push(behavior_1.behavior); + if (watch) { + var props_2 = options.properties || {}; + Object.keys(watch).forEach(function (key) { + if (key in props_2) { + var prop = props_2[key]; + if (prop === null || !('type' in prop)) { + prop = { type: prop }; + } + prop.observer = watch[key]; + props_2[key] = prop; + } + }); + options.properties = props_2; + } + if (computed) { + options.methods = options.methods || {}; + options.methods.$options = function () { return vantOptions; }; + if (options.properties) { + props_1.observeProps(options.properties); + } + } +} +exports.observe = observe; diff --git a/node_modules/vant-weapp/lib/mixins/observer/props.js b/node_modules/vant-weapp/lib/mixins/observer/props.js new file mode 100644 index 0000000..3fd9da7 --- /dev/null +++ b/node_modules/vant-weapp/lib/mixins/observer/props.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function observeProps(props) { + if (!props) { + return; + } + Object.keys(props).forEach(function (key) { + var prop = props[key]; + if (prop === null || !('type' in prop)) { + prop = { type: prop }; + } + var observer = prop.observer; + prop.observer = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + if (observer) { + if (typeof observer === 'string') { + observer = this[observer]; + } + observer.apply(this, args); + } + this.set(); + }; + props[key] = prop; + }); +} +exports.observeProps = observeProps; diff --git a/node_modules/vant-weapp/lib/mixins/open-type.js b/node_modules/vant-weapp/lib/mixins/open-type.js new file mode 100644 index 0000000..765989b --- /dev/null +++ b/node_modules/vant-weapp/lib/mixins/open-type.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.openType = Behavior({ + properties: { + openType: String + }, + methods: { + bindGetUserInfo: function (event) { + this.$emit('getuserinfo', event.detail); + }, + bindContact: function (event) { + this.$emit('contact', event.detail); + }, + bindGetPhoneNumber: function (event) { + this.$emit('getphonenumber', event.detail); + }, + bindError: function (event) { + this.$emit('error', event.detail); + }, + bindLaunchApp: function (event) { + this.$emit('launchapp', event.detail); + }, + bindOpenSetting: function (event) { + this.$emit('opensetting', event.detail); + }, + } +}); diff --git a/node_modules/vant-weapp/lib/mixins/safe-area.js b/node_modules/vant-weapp/lib/mixins/safe-area.js new file mode 100644 index 0000000..bccfede --- /dev/null +++ b/node_modules/vant-weapp/lib/mixins/safe-area.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var cache = null; +function getSafeArea() { + return new Promise(function (resolve, reject) { + if (cache != null) { + resolve(cache); + } + else { + wx.getSystemInfo({ + success: function (_a) { + var model = _a.model, screenHeight = _a.screenHeight, statusBarHeight = _a.statusBarHeight; + var iphoneX = /iphone x/i.test(model); + var iphoneNew = /iPhone11/i.test(model) && screenHeight === 812; + cache = { + isIPhoneX: iphoneX || iphoneNew, + statusBarHeight: statusBarHeight + }; + resolve(cache); + }, + fail: reject + }); + } + }); +} +exports.safeArea = function (_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.safeAreaInsetBottom, safeAreaInsetBottom = _c === void 0 ? true : _c, _d = _b.safeAreaInsetTop, safeAreaInsetTop = _d === void 0 ? false : _d; + return Behavior({ + properties: { + safeAreaInsetTop: { + type: Boolean, + value: safeAreaInsetTop + }, + safeAreaInsetBottom: { + type: Boolean, + value: safeAreaInsetBottom + } + }, + created: function () { + var _this = this; + getSafeArea().then(function (_a) { + var isIPhoneX = _a.isIPhoneX, statusBarHeight = _a.statusBarHeight; + _this.set({ isIPhoneX: isIPhoneX, statusBarHeight: statusBarHeight }); + }); + } + }); +}; diff --git a/node_modules/vant-weapp/lib/mixins/touch.js b/node_modules/vant-weapp/lib/mixins/touch.js new file mode 100644 index 0000000..43d1d54 --- /dev/null +++ b/node_modules/vant-weapp/lib/mixins/touch.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.touch = Behavior({ + methods: { + touchStart: function (event) { + var touch = event.touches[0]; + this.direction = ''; + this.deltaX = 0; + this.deltaY = 0; + this.offsetX = 0; + this.offsetY = 0; + this.startX = touch.clientX; + this.startY = touch.clientY; + }, + touchMove: function (event) { + var touch = event.touches[0]; + this.deltaX = touch.clientX - this.startX; + this.deltaY = touch.clientY - this.startY; + this.offsetX = Math.abs(this.deltaX); + this.offsetY = Math.abs(this.deltaY); + this.direction = + this.offsetX > this.offsetY + ? 'horizontal' + : this.offsetX < this.offsetY + ? 'vertical' + : ''; + } + } +}); diff --git a/node_modules/vant-weapp/lib/mixins/transition.js b/node_modules/vant-weapp/lib/mixins/transition.js new file mode 100644 index 0000000..229d0ff --- /dev/null +++ b/node_modules/vant-weapp/lib/mixins/transition.js @@ -0,0 +1,115 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = require("../common/utils"); +var getClassNames = function (name) { return ({ + enter: "van-" + name + "-enter van-" + name + "-enter-active enter-class enter-active-class", + 'enter-to': "van-" + name + "-enter-to van-" + name + "-enter-active enter-to-class enter-active-class", + leave: "van-" + name + "-leave van-" + name + "-leave-active leave-class leave-active-class", + 'leave-to': "van-" + name + "-leave-to van-" + name + "-leave-active leave-to-class leave-active-class" +}); }; +var nextTick = function () { return new Promise(function (resolve) { return setTimeout(resolve, 1000 / 30); }); }; +exports.transition = function (showDefaultValue) { + return Behavior({ + properties: { + customStyle: String, + // @ts-ignore + show: { + type: Boolean, + value: showDefaultValue, + observer: 'observeShow' + }, + // @ts-ignore + duration: { + type: [Number, Object], + value: 300, + observer: 'observeDuration' + }, + name: { + type: String, + value: 'fade' + } + }, + data: { + type: '', + inited: false, + display: false + }, + attached: function () { + if (this.data.show) { + this.enter(); + } + }, + methods: { + observeShow: function (value) { + if (value) { + this.enter(); + } + else { + this.leave(); + } + }, + enter: function () { + var _this = this; + var _a = this.data, duration = _a.duration, name = _a.name; + var classNames = getClassNames(name); + var currentDuration = utils_1.isObj(duration) ? duration.enter : duration; + this.status = 'enter'; + Promise.resolve() + .then(nextTick) + .then(function () { + _this.checkStatus('enter'); + _this.set({ + inited: true, + display: true, + classes: classNames.enter, + currentDuration: currentDuration + }); + }) + .then(nextTick) + .then(function () { + _this.checkStatus('enter'); + _this.set({ + classes: classNames['enter-to'] + }); + }) + .catch(function () { }); + }, + leave: function () { + var _this = this; + var _a = this.data, duration = _a.duration, name = _a.name; + var classNames = getClassNames(name); + var currentDuration = utils_1.isObj(duration) ? duration.leave : duration; + this.status = 'leave'; + Promise.resolve() + .then(nextTick) + .then(function () { + _this.checkStatus('leave'); + _this.set({ + classes: classNames.leave, + currentDuration: currentDuration + }); + }) + .then(function () { return setTimeout(function () { return _this.onTransitionEnd(); }, currentDuration); }) + .then(nextTick) + .then(function () { + _this.checkStatus('leave'); + _this.set({ + classes: classNames['leave-to'] + }); + }) + .catch(function () { }); + }, + checkStatus: function (status) { + if (status !== this.status) { + throw new Error("incongruent status: " + status); + } + }, + onTransitionEnd: function () { + if (!this.data.show) { + this.set({ display: false }); + this.$emit('transitionEnd'); + } + } + } + }); +}; diff --git a/node_modules/vant-weapp/lib/nav-bar/index.js b/node_modules/vant-weapp/lib/nav-bar/index.js new file mode 100644 index 0000000..830e527 --- /dev/null +++ b/node_modules/vant-weapp/lib/nav-bar/index.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var safe_area_1 = require("../mixins/safe-area"); +component_1.VantComponent({ + mixins: [safe_area_1.safeArea({ safeAreaInsetTop: true })], + classes: ['title-class'], + props: { + title: String, + fixed: Boolean, + leftText: String, + rightText: String, + leftArrow: Boolean, + border: { + type: Boolean, + value: true + }, + zIndex: { + type: Number, + value: 120 + } + }, + methods: { + onClickLeft: function () { + this.$emit('click-left'); + }, + onClickRight: function () { + this.$emit('click-right'); + } + } +}); diff --git a/node_modules/vant-weapp/lib/nav-bar/index.json b/node_modules/vant-weapp/lib/nav-bar/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/node_modules/vant-weapp/lib/nav-bar/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/lib/nav-bar/index.wxml b/node_modules/vant-weapp/lib/nav-bar/index.wxml new file mode 100644 index 0000000..2f235b5 --- /dev/null +++ b/node_modules/vant-weapp/lib/nav-bar/index.wxml @@ -0,0 +1,37 @@ + + + + + + + {{ leftText }} + + + + + {{ title }} + + + + {{ rightText }} + + + diff --git a/node_modules/vant-weapp/lib/nav-bar/index.wxss b/node_modules/vant-weapp/lib/nav-bar/index.wxss new file mode 100644 index 0000000..8f576d3 --- /dev/null +++ b/node_modules/vant-weapp/lib/nav-bar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-nav-bar{position:relative;height:44px;line-height:44px;text-align:center;background-color:#fff;-webkit-user-select:none;user-select:none}.van-nav-bar__text{display:inline-block;padding:0 15px;margin:0 -15px;color:#1989fa;vertical-align:middle}.van-nav-bar__text--hover{background-color:#f2f3f5}.van-nav-bar__arrow{color:#1989fa;vertical-align:middle}.van-nav-bar__arrow+.van-nav-bar__text{padding-left:25px;margin-left:-20px}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar__title{max-width:60%;margin:0 auto;font-size:16px;font-weight:500}.van-nav-bar__left,.van-nav-bar__right{position:absolute;bottom:0;font-size:14px}.van-nav-bar__left{left:15px}.van-nav-bar__right{right:15px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/notice-bar/index.js b/node_modules/vant-weapp/lib/notice-bar/index.js new file mode 100644 index 0000000..7e34491 --- /dev/null +++ b/node_modules/vant-weapp/lib/notice-bar/index.js @@ -0,0 +1,127 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var FONT_COLOR = '#ed6a0c'; +var BG_COLOR = '#fffbe8'; +component_1.VantComponent({ + props: { + text: { + type: String, + value: '' + }, + mode: { + type: String, + value: '' + }, + url: { + type: String, + value: '' + }, + openType: { + type: String, + value: 'navigate' + }, + delay: { + type: Number, + value: 1 + }, + speed: { + type: Number, + value: 50 + }, + scrollable: { + type: Boolean, + value: true + }, + leftIcon: { + type: String, + value: '' + }, + color: { + type: String, + value: FONT_COLOR + }, + backgroundColor: { + type: String, + value: BG_COLOR + }, + wrapable: Boolean + }, + data: { + show: true + }, + watch: { + text: function () { + this.set({}, this.init); + } + }, + created: function () { + this.resetAnimation = wx.createAnimation({ + duration: 0, + timingFunction: 'linear' + }); + }, + destroyed: function () { + this.timer && clearTimeout(this.timer); + }, + methods: { + init: function () { + var _this = this; + Promise.all([ + this.getRect('.van-notice-bar__content'), + this.getRect('.van-notice-bar__wrap') + ]).then(function (rects) { + var contentRect = rects[0], wrapRect = rects[1]; + if (contentRect == null || + wrapRect == null || + !contentRect.width || + !wrapRect.width) { + return; + } + var _a = _this.data, speed = _a.speed, scrollable = _a.scrollable, delay = _a.delay; + if (scrollable && wrapRect.width < contentRect.width) { + var duration = (contentRect.width / speed) * 1000; + _this.wrapWidth = wrapRect.width; + _this.contentWidth = contentRect.width; + _this.duration = duration; + _this.animation = wx.createAnimation({ + duration: duration, + timingFunction: 'linear', + delay: delay + }); + _this.scroll(); + } + }); + }, + scroll: function () { + var _this = this; + this.timer && clearTimeout(this.timer); + this.timer = null; + this.set({ + animationData: this.resetAnimation + .translateX(this.wrapWidth) + .step() + .export() + }); + setTimeout(function () { + _this.set({ + animationData: _this.animation + .translateX(-_this.contentWidth) + .step() + .export() + }); + }, 20); + this.timer = setTimeout(function () { + _this.scroll(); + }, this.duration); + }, + onClickIcon: function () { + this.timer && clearTimeout(this.timer); + this.timer = null; + this.set({ show: false }); + }, + onClick: function (event) { + this.$emit('click', event); + } + } +}); diff --git a/node_modules/vant-weapp/lib/notice-bar/index.json b/node_modules/vant-weapp/lib/notice-bar/index.json new file mode 100644 index 0000000..a9ab393 --- /dev/null +++ b/node_modules/vant-weapp/lib/notice-bar/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/notice-bar/index.wxml b/node_modules/vant-weapp/lib/notice-bar/index.wxml new file mode 100644 index 0000000..034ce6f --- /dev/null +++ b/node_modules/vant-weapp/lib/notice-bar/index.wxml @@ -0,0 +1,35 @@ + + + + + + + + {{ text }} + + + + + + + + diff --git a/node_modules/vant-weapp/lib/notice-bar/index.wxss b/node_modules/vant-weapp/lib/notice-bar/index.wxss new file mode 100644 index 0000000..8bbc2c7 --- /dev/null +++ b/node_modules/vant-weapp/lib/notice-bar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-notice-bar{display:-webkit-flex;display:flex;height:40px;padding:0 15px;font-size:14px;line-height:24px;-webkit-align-items:center;align-items:center}.van-notice-bar--withicon{position:relative;padding-right:40px}.van-notice-bar--wrapable{height:auto;padding:8px 15px}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal}.van-notice-bar__left-icon{display:-webkit-flex;display:flex;margin-right:4px;vertical-align:middle;-webkit-align-items:center;align-items:center}.van-notice-bar__right-icon{position:absolute;top:10px;right:15px;font-size:16px}.van-notice-bar__wrap{position:relative;height:24px;overflow:hidden;-webkit-flex:1;flex:1}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/notify/index.js b/node_modules/vant-weapp/lib/notify/index.js new file mode 100644 index 0000000..928e4dd --- /dev/null +++ b/node_modules/vant-weapp/lib/notify/index.js @@ -0,0 +1,48 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var color_1 = require("../common/color"); +var safe_area_1 = require("../mixins/safe-area"); +component_1.VantComponent({ + mixins: [safe_area_1.safeArea()], + props: { + text: String, + color: { + type: String, + value: '#fff' + }, + backgroundColor: { + type: String, + value: color_1.RED + }, + duration: { + type: Number, + value: 3000 + }, + zIndex: { + type: Number, + value: 110 + } + }, + methods: { + show: function () { + var _this = this; + var duration = this.data.duration; + clearTimeout(this.timer); + this.set({ + show: true + }); + if (duration > 0 && duration !== Infinity) { + this.timer = setTimeout(function () { + _this.hide(); + }, duration); + } + }, + hide: function () { + clearTimeout(this.timer); + this.set({ + show: false + }); + } + } +}); diff --git a/node_modules/vant-weapp/lib/notify/index.json b/node_modules/vant-weapp/lib/notify/index.json new file mode 100644 index 0000000..c14a65f --- /dev/null +++ b/node_modules/vant-weapp/lib/notify/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-transition": "../transition/index" + } +} diff --git a/node_modules/vant-weapp/lib/notify/index.wxml b/node_modules/vant-weapp/lib/notify/index.wxml new file mode 100644 index 0000000..96f5820 --- /dev/null +++ b/node_modules/vant-weapp/lib/notify/index.wxml @@ -0,0 +1,9 @@ + + + {{ text }} + diff --git a/node_modules/vant-weapp/lib/notify/index.wxss b/node_modules/vant-weapp/lib/notify/index.wxss new file mode 100644 index 0000000..6c2fccd --- /dev/null +++ b/node_modules/vant-weapp/lib/notify/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-notify{position:fixed;top:0;width:100%;padding:6px 15px;font-size:14px;line-height:20px;text-align:center;word-break:break-all;box-sizing:border-box}.van-notify__safe-top{height:44px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/notify/notify.js b/node_modules/vant-weapp/lib/notify/notify.js new file mode 100644 index 0000000..a64e3e6 --- /dev/null +++ b/node_modules/vant-weapp/lib/notify/notify.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = require("../common/utils"); +var defaultOptions = { + selector: '#van-notify', + duration: 3000 +}; +function parseOptions(text) { + return utils_1.isObj(text) ? text : { text: text }; +} +function getContext() { + var pages = getCurrentPages(); + return pages[pages.length - 1]; +} +function Notify(options) { + options = Object.assign({}, defaultOptions, parseOptions(options)); + var context = options.context || getContext(); + var notify = context.selectComponent(options.selector); + delete options.context; + delete options.selector; + if (notify) { + notify.set(options); + notify.show(); + } + else { + console.warn('未找到 van-notify 节点,请确认 selector 及 context 是否正确'); + } +} +exports.default = Notify; diff --git a/node_modules/vant-weapp/lib/overlay/index.js b/node_modules/vant-weapp/lib/overlay/index.js new file mode 100644 index 0000000..65c9334 --- /dev/null +++ b/node_modules/vant-weapp/lib/overlay/index.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + props: { + show: Boolean, + mask: Boolean, + customStyle: String, + duration: { + type: [Number, Object], + value: 300 + }, + zIndex: { + type: Number, + value: 1 + } + }, + methods: { + onClick: function () { + this.$emit('click'); + }, + // for prevent touchmove + noop: function () { } + } +}); diff --git a/node_modules/vant-weapp/lib/overlay/index.json b/node_modules/vant-weapp/lib/overlay/index.json new file mode 100644 index 0000000..c14a65f --- /dev/null +++ b/node_modules/vant-weapp/lib/overlay/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-transition": "../transition/index" + } +} diff --git a/node_modules/vant-weapp/lib/overlay/index.wxml b/node_modules/vant-weapp/lib/overlay/index.wxml new file mode 100644 index 0000000..31d222e --- /dev/null +++ b/node_modules/vant-weapp/lib/overlay/index.wxml @@ -0,0 +1,8 @@ + diff --git a/node_modules/vant-weapp/lib/overlay/index.wxss b/node_modules/vant-weapp/lib/overlay/index.wxss new file mode 100644 index 0000000..d4a466c --- /dev/null +++ b/node_modules/vant-weapp/lib/overlay/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-overlay{position:fixed;top:0;right:0;bottom:0;left:0} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/panel/index.js b/node_modules/vant-weapp/lib/panel/index.js new file mode 100644 index 0000000..a3ec003 --- /dev/null +++ b/node_modules/vant-weapp/lib/panel/index.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + classes: ['header-class', 'footer-class'], + props: { + desc: String, + title: String, + status: String, + useFooterSlot: Boolean + } +}); diff --git a/node_modules/vant-weapp/lib/panel/index.json b/node_modules/vant-weapp/lib/panel/index.json new file mode 100644 index 0000000..0e5425c --- /dev/null +++ b/node_modules/vant-weapp/lib/panel/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index" + } +} diff --git a/node_modules/vant-weapp/lib/panel/index.wxml b/node_modules/vant-weapp/lib/panel/index.wxml new file mode 100644 index 0000000..3f135d2 --- /dev/null +++ b/node_modules/vant-weapp/lib/panel/index.wxml @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/node_modules/vant-weapp/lib/panel/index.wxss b/node_modules/vant-weapp/lib/panel/index.wxss new file mode 100644 index 0000000..79d4af7 --- /dev/null +++ b/node_modules/vant-weapp/lib/panel/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-panel{background:#fff}.van-panel__header-value{color:#f44}.van-panel__footer{padding:10px 15px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/picker-column/index.js b/node_modules/vant-weapp/lib/picker-column/index.js new file mode 100644 index 0000000..3ab7f87 --- /dev/null +++ b/node_modules/vant-weapp/lib/picker-column/index.js @@ -0,0 +1,138 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var utils_1 = require("../common/utils"); +var DEFAULT_DURATION = 200; +component_1.VantComponent({ + classes: ['active-class'], + props: { + valueKey: String, + className: String, + itemHeight: Number, + visibleItemCount: Number, + initialOptions: { + type: Array, + value: [] + }, + defaultIndex: { + type: Number, + value: 0 + } + }, + data: { + startY: 0, + offset: 0, + duration: 0, + startOffset: 0, + options: [], + currentIndex: 0 + }, + created: function () { + var _this = this; + var _a = this.data, defaultIndex = _a.defaultIndex, initialOptions = _a.initialOptions; + this.set({ + currentIndex: defaultIndex, + options: initialOptions + }).then(function () { + _this.setIndex(defaultIndex); + }); + }, + computed: { + count: function () { + return this.data.options.length; + }, + baseOffset: function () { + var data = this.data; + return (data.itemHeight * (data.visibleItemCount - 1)) / 2; + }, + wrapperStyle: function () { + var data = this.data; + return [ + "transition: " + data.duration + "ms", + "transform: translate3d(0, " + (data.offset + data.baseOffset) + "px, 0)", + "line-height: " + data.itemHeight + "px" + ].join('; '); + } + }, + watch: { + defaultIndex: function (value) { + this.setIndex(value); + } + }, + methods: { + onTouchStart: function (event) { + this.set({ + startY: event.touches[0].clientY, + startOffset: this.data.offset, + duration: 0 + }); + }, + onTouchMove: function (event) { + var data = this.data; + var deltaY = event.touches[0].clientY - data.startY; + this.set({ + offset: utils_1.range(data.startOffset + deltaY, -(data.count * data.itemHeight), data.itemHeight) + }); + }, + onTouchEnd: function () { + var data = this.data; + if (data.offset !== data.startOffset) { + this.set({ + duration: DEFAULT_DURATION + }); + var index = utils_1.range(Math.round(-data.offset / data.itemHeight), 0, data.count - 1); + this.setIndex(index, true); + } + }, + onClickItem: function (event) { + var index = event.currentTarget.dataset.index; + this.setIndex(index, true); + }, + adjustIndex: function (index) { + var data = this.data; + index = utils_1.range(index, 0, data.count); + for (var i = index; i < data.count; i++) { + if (!this.isDisabled(data.options[i])) + return i; + } + for (var i = index - 1; i >= 0; i--) { + if (!this.isDisabled(data.options[i])) + return i; + } + }, + isDisabled: function (option) { + return utils_1.isObj(option) && option.disabled; + }, + getOptionText: function (option) { + var data = this.data; + return utils_1.isObj(option) && data.valueKey in option + ? option[data.valueKey] + : option; + }, + setIndex: function (index, userAction) { + var _this = this; + var data = this.data; + index = this.adjustIndex(index) || 0; + var offset = -index * data.itemHeight; + if (index !== data.currentIndex) { + return this.set({ offset: offset, currentIndex: index }).then(function () { + userAction && _this.$emit('change', index); + }); + } + return this.set({ offset: offset }); + }, + setValue: function (value) { + var options = this.data.options; + for (var i = 0; i < options.length; i++) { + if (this.getOptionText(options[i]) === value) { + return this.setIndex(i); + } + } + return Promise.resolve(); + }, + getValue: function () { + var data = this.data; + return data.options[data.currentIndex]; + } + } +}); diff --git a/node_modules/vant-weapp/lib/picker-column/index.json b/node_modules/vant-weapp/lib/picker-column/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/lib/picker-column/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/picker-column/index.wxml b/node_modules/vant-weapp/lib/picker-column/index.wxml new file mode 100644 index 0000000..5d9f0ea --- /dev/null +++ b/node_modules/vant-weapp/lib/picker-column/index.wxml @@ -0,0 +1,22 @@ + + + + + {{ getOptionText(option, valueKey) }} + + diff --git a/node_modules/vant-weapp/lib/picker-column/index.wxs b/node_modules/vant-weapp/lib/picker-column/index.wxs new file mode 100644 index 0000000..3c8fc68 --- /dev/null +++ b/node_modules/vant-weapp/lib/picker-column/index.wxs @@ -0,0 +1,8 @@ +function isObj(x) { + var type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} + +module.exports = function (option, valueKey) { + return isObj(option) && option[valueKey] != null ? option[valueKey] : option; +} diff --git a/node_modules/vant-weapp/lib/picker-column/index.wxss b/node_modules/vant-weapp/lib/picker-column/index.wxss new file mode 100644 index 0000000..5142697 --- /dev/null +++ b/node_modules/vant-weapp/lib/picker-column/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-picker-column{overflow:hidden;font-size:16px;color:#999;text-align:center}.van-picker-column__item{padding:0 5px}.van-picker-column__item--selected{font-weight:500;color:#333}.van-picker-column__item--disabled{opacity:.3} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/picker/index.js b/node_modules/vant-weapp/lib/picker/index.js new file mode 100644 index 0000000..00fad40 --- /dev/null +++ b/node_modules/vant-weapp/lib/picker/index.js @@ -0,0 +1,156 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var shared_1 = require("./shared"); +component_1.VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: __assign({}, shared_1.pickerProps, { valueKey: { + type: String, + value: 'text' + }, defaultIndex: { + type: Number, + value: 0 + }, columns: { + type: Array, + value: [], + observer: function (columns) { + if (columns === void 0) { columns = []; } + this.simple = columns.length && !columns[0].values; + this.children = this.selectAllComponents('.van-picker__column'); + if (Array.isArray(this.children) && this.children.length) { + this.setColumns().catch(function () { }); + } + } + } }), + beforeCreate: function () { + this.children = []; + }, + methods: { + noop: function () { }, + setColumns: function () { + var _this = this; + var data = this.data; + var columns = this.simple ? [{ values: data.columns }] : data.columns; + var stack = columns.map(function (column, index) { + return _this.setColumnValues(index, column.values); + }); + return Promise.all(stack); + }, + emit: function (event) { + var type = event.currentTarget.dataset.type; + if (this.simple) { + this.$emit(type, { + value: this.getColumnValue(0), + index: this.getColumnIndex(0) + }); + } + else { + this.$emit(type, { + value: this.getValues(), + index: this.getIndexes() + }); + } + }, + onChange: function (event) { + if (this.simple) { + this.$emit('change', { + picker: this, + value: this.getColumnValue(0), + index: this.getColumnIndex(0) + }); + } + else { + this.$emit('change', { + picker: this, + value: this.getValues(), + index: event.currentTarget.dataset.index + }); + } + }, + // get column instance by index + getColumn: function (index) { + return this.children[index]; + }, + // get column value by index + getColumnValue: function (index) { + var column = this.getColumn(index); + return column && column.getValue(); + }, + // set column value by index + setColumnValue: function (index, value) { + var column = this.getColumn(index); + if (column == null) { + return Promise.reject(new Error('setColumnValue: 对应列不存在')); + } + return column.setValue(value); + }, + // get column option index by column index + getColumnIndex: function (columnIndex) { + return (this.getColumn(columnIndex) || {}).data.currentIndex; + }, + // set column option index by column index + setColumnIndex: function (columnIndex, optionIndex) { + var column = this.getColumn(columnIndex); + if (column == null) { + return Promise.reject(new Error('setColumnIndex: 对应列不存在')); + } + return column.setIndex(optionIndex); + }, + // get options of column by index + getColumnValues: function (index) { + return (this.children[index] || {}).data.options; + }, + // set options of column by index + setColumnValues: function (index, options, needReset) { + if (needReset === void 0) { needReset = true; } + var column = this.children[index]; + if (column == null) { + return Promise.reject(new Error('setColumnValues: 对应列不存在')); + } + var isSame = JSON.stringify(column.data.options) === JSON.stringify(options); + if (isSame) { + return Promise.resolve(); + } + return column.set({ options: options }).then(function () { + if (needReset) { + column.setIndex(0); + } + }); + }, + // get values of all columns + getValues: function () { + return this.children.map(function (child) { return child.getValue(); }); + }, + // set values of all columns + setValues: function (values) { + var _this = this; + var stack = values.map(function (value, index) { + return _this.setColumnValue(index, value); + }); + return Promise.all(stack); + }, + // get indexes of all columns + getIndexes: function () { + return this.children.map(function (child) { return child.data.currentIndex; }); + }, + // set indexes of all columns + setIndexes: function (indexes) { + var _this = this; + var stack = indexes.map(function (optionIndex, columnIndex) { + return _this.setColumnIndex(columnIndex, optionIndex); + }); + return Promise.all(stack); + } + } +}); diff --git a/node_modules/vant-weapp/lib/picker/index.json b/node_modules/vant-weapp/lib/picker/index.json new file mode 100644 index 0000000..2fcec89 --- /dev/null +++ b/node_modules/vant-weapp/lib/picker/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "picker-column": "../picker-column/index", + "loading": "../loading/index" + } +} diff --git a/node_modules/vant-weapp/lib/picker/index.wxml b/node_modules/vant-weapp/lib/picker/index.wxml new file mode 100644 index 0000000..2a9cead --- /dev/null +++ b/node_modules/vant-weapp/lib/picker/index.wxml @@ -0,0 +1,60 @@ + + + + {{ cancelButtonText }} + + {{ title }} + + {{ confirmButtonText }} + + + + + + + + + + + + + function isSimple(columns) { + return columns.length && !columns[0].values; + } + module.exports = isSimple; + diff --git a/node_modules/vant-weapp/lib/picker/index.wxss b/node_modules/vant-weapp/lib/picker/index.wxss new file mode 100644 index 0000000..a054f3c --- /dev/null +++ b/node_modules/vant-weapp/lib/picker/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-picker{position:relative;overflow:hidden;-webkit-text-size-adjust:100%;background-color:#fff;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:-webkit-flex;display:flex;height:44px;line-height:44px;-webkit-justify-content:space-between;justify-content:space-between}.van-picker__cancel,.van-picker__confirm{padding:0 15px;font-size:14px;color:#1989fa}.van-picker__cancel--hover,.van-picker__confirm--hover{background-color:#f2f3f5}.van-picker__title{max-width:50%;font-size:16px;font-weight:500;text-align:center}.van-picker__columns{position:relative;display:-webkit-flex;display:flex}.van-picker__column{-webkit-flex:1 1;flex:1 1;width:0}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:4;display:-webkit-flex;display:flex;background-color:hsla(0,0%,100%,.9);-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-picker__frame,.van-picker__loading .van-loading{position:absolute;top:50%;left:0;z-index:1;width:100%;pointer-events:none;-webkit-transform:translateY(-50%);transform:translateY(-50%)} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/picker/shared.js b/node_modules/vant-weapp/lib/picker/shared.js new file mode 100644 index 0000000..060e5ab --- /dev/null +++ b/node_modules/vant-weapp/lib/picker/shared.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pickerProps = { + title: String, + loading: Boolean, + showToolbar: Boolean, + cancelButtonText: { + type: String, + value: '取消' + }, + confirmButtonText: { + type: String, + value: '确认' + }, + visibleItemCount: { + type: Number, + value: 5 + }, + itemHeight: { + type: Number, + value: 44 + } +}; diff --git a/node_modules/vant-weapp/lib/popup/index.js b/node_modules/vant-weapp/lib/popup/index.js new file mode 100644 index 0000000..e5cedbe --- /dev/null +++ b/node_modules/vant-weapp/lib/popup/index.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var transition_1 = require("../mixins/transition"); +var safe_area_1 = require("../mixins/safe-area"); +component_1.VantComponent({ + classes: [ + 'enter-class', + 'enter-active-class', + 'enter-to-class', + 'leave-class', + 'leave-active-class', + 'leave-to-class' + ], + mixins: [transition_1.transition(false), safe_area_1.safeArea()], + props: { + transition: { + type: String, + observer: 'observeClass' + }, + customStyle: String, + overlayStyle: String, + zIndex: { + type: Number, + value: 100 + }, + overlay: { + type: Boolean, + value: true + }, + closeOnClickOverlay: { + type: Boolean, + value: true + }, + position: { + type: String, + value: 'center', + observer: 'observeClass' + } + }, + created: function () { + this.observeClass(); + }, + methods: { + onClickOverlay: function () { + this.$emit('click-overlay'); + if (this.data.closeOnClickOverlay) { + this.$emit('close'); + } + }, + observeClass: function () { + var _a = this.data, transition = _a.transition, position = _a.position; + var updateData = { + name: transition || position + }; + if (transition === 'none') { + updateData.duration = 0; + } + this.set(updateData); + } + } +}); diff --git a/node_modules/vant-weapp/lib/popup/index.json b/node_modules/vant-weapp/lib/popup/index.json new file mode 100644 index 0000000..0dd2931 --- /dev/null +++ b/node_modules/vant-weapp/lib/popup/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-overlay": "../overlay/index" + } +} diff --git a/node_modules/vant-weapp/lib/popup/index.wxml b/node_modules/vant-weapp/lib/popup/index.wxml new file mode 100644 index 0000000..414d1c7 --- /dev/null +++ b/node_modules/vant-weapp/lib/popup/index.wxml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/node_modules/vant-weapp/lib/popup/index.wxss b/node_modules/vant-weapp/lib/popup/index.wxss new file mode 100644 index 0000000..0f7a49d --- /dev/null +++ b/node_modules/vant-weapp/lib/popup/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-popup{position:fixed;top:50%;left:50%;max-height:100%;overflow-y:auto;background-color:#fff;box-sizing:border-box;-webkit-animation:ease both;animation:ease both;-webkit-overflow-scrolling:touch;transition-timing-function:ease}.van-popup--center{-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-popup--top{top:0;right:auto;bottom:auto;left:50%;width:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-popup--right{top:50%;right:0;bottom:auto;left:auto;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--bottom{top:auto;right:auto;bottom:0;left:50%;width:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-popup--left{top:50%;right:auto;bottom:auto;left:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--bottom.van-popup--safe{padding-bottom:34px}.van-popup--left .van-popup__safe-top,.van-popup--right .van-popup__safe-top,.van-popup--top .van-popup__safe-top{height:44px}.van-popup--bottom .van-popup__safe-top,.van-popup--center .van-popup__safe-top{padding-top:0!important}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-scale-enter,.van-scale-leave-to{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-bottom-enter,.van-bottom-leave-to{-webkit-transform:translate3d(-50%,100%,0);transform:translate3d(-50%,100%,0)}.van-top-enter,.van-top-leave-to{-webkit-transform:translate3d(-50%,-100%,0);transform:translate3d(-50%,-100%,0)}.van-left-enter,.van-left-leave-to{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/progress/index.js b/node_modules/vant-weapp/lib/progress/index.js new file mode 100644 index 0000000..60b8f11 --- /dev/null +++ b/node_modules/vant-weapp/lib/progress/index.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var color_1 = require("../common/color"); +component_1.VantComponent({ + props: { + inactive: Boolean, + percentage: Number, + pivotText: String, + pivotColor: String, + showPivot: { + type: Boolean, + value: true + }, + color: { + type: String, + value: color_1.BLUE + }, + textColor: { + type: String, + value: '#fff' + } + } +}); diff --git a/node_modules/vant-weapp/lib/progress/index.json b/node_modules/vant-weapp/lib/progress/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/lib/progress/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/lib/progress/index.wxml b/node_modules/vant-weapp/lib/progress/index.wxml new file mode 100644 index 0000000..a810ef0 --- /dev/null +++ b/node_modules/vant-weapp/lib/progress/index.wxml @@ -0,0 +1,16 @@ + + + + + + {{ getters.text(pivotText, percentage) }} + + + diff --git a/node_modules/vant-weapp/lib/progress/index.wxs b/node_modules/vant-weapp/lib/progress/index.wxs new file mode 100644 index 0000000..d685345 --- /dev/null +++ b/node_modules/vant-weapp/lib/progress/index.wxs @@ -0,0 +1,5 @@ +module.exports = { + text: function(pivotText, percentage) { + return pivotText || percentage + '%'; + } +}; diff --git a/node_modules/vant-weapp/lib/progress/index.wxss b/node_modules/vant-weapp/lib/progress/index.wxss new file mode 100644 index 0000000..a448a8a --- /dev/null +++ b/node_modules/vant-weapp/lib/progress/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-progress{position:relative;height:4px;background:#e5e5e5;border-radius:4px}.van-progress__portion{position:absolute;left:0;height:100%;border-radius:inherit}.van-progress__pivot{position:absolute;top:50%;right:0;min-width:2em;padding:0 5px;font-size:10px;line-height:1.6;text-align:center;word-break:keep-all;background-color:#e5e5e5;border-radius:1em;-webkit-transform:translateY(-50%);transform:translateY(-50%);box-sizing:border-box} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/radio-group/index.js b/node_modules/vant-weapp/lib/radio-group/index.js new file mode 100644 index 0000000..8f98d87 --- /dev/null +++ b/node_modules/vant-weapp/lib/radio-group/index.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + field: true, + relation: { + name: 'radio', + type: 'descendant', + linked: function (target) { + this.children = this.children || []; + this.children.push(target); + this.updateChild(target); + }, + unlinked: function (target) { + this.children = this.children.filter(function (child) { return child !== target; }); + } + }, + props: { + value: { + type: null, + observer: 'updateChildren' + }, + disabled: { + type: Boolean, + observer: 'updateChildren' + } + }, + methods: { + updateChildren: function () { + var _this = this; + (this.children || []).forEach(function (child) { + return _this.updateChild(child); + }); + }, + updateChild: function (child) { + var _a = this.data, value = _a.value, disabled = _a.disabled; + child.set({ + value: value, + disabled: disabled || child.data.disabled + }); + } + } +}); diff --git a/node_modules/vant-weapp/lib/radio-group/index.json b/node_modules/vant-weapp/lib/radio-group/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/lib/radio-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/lib/radio-group/index.wxml b/node_modules/vant-weapp/lib/radio-group/index.wxml new file mode 100644 index 0000000..4fa864c --- /dev/null +++ b/node_modules/vant-weapp/lib/radio-group/index.wxml @@ -0,0 +1 @@ + diff --git a/node_modules/vant-weapp/lib/radio-group/index.wxss b/node_modules/vant-weapp/lib/radio-group/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/node_modules/vant-weapp/lib/radio-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/radio/index.js b/node_modules/vant-weapp/lib/radio/index.js new file mode 100644 index 0000000..7654fbb --- /dev/null +++ b/node_modules/vant-weapp/lib/radio/index.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + field: true, + relation: { + name: 'radio-group', + type: 'ancestor', + linked: function (target) { + this.parent = target; + }, + unlinked: function () { + this.parent = null; + } + }, + classes: ['icon-class', 'label-class'], + props: { + value: null, + disabled: Boolean, + useIconSlot: Boolean, + checkedColor: String, + labelPosition: { + type: String, + value: 'right' + }, + labelDisabled: Boolean, + shape: { + type: String, + value: 'round' + } + }, + methods: { + emitChange: function (value) { + var instance = this.parent || this; + instance.$emit('input', value); + instance.$emit('change', value); + }, + onChange: function (event) { + console.log(event); + this.emitChange(this.data.name); + }, + onClickLabel: function () { + var _a = this.data, disabled = _a.disabled, labelDisabled = _a.labelDisabled, name = _a.name; + if (!disabled && !labelDisabled) { + this.emitChange(name); + } + } + } +}); diff --git a/node_modules/vant-weapp/lib/radio/index.json b/node_modules/vant-weapp/lib/radio/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/node_modules/vant-weapp/lib/radio/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/lib/radio/index.wxml b/node_modules/vant-weapp/lib/radio/index.wxml new file mode 100644 index 0000000..c681916 --- /dev/null +++ b/node_modules/vant-weapp/lib/radio/index.wxml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/node_modules/vant-weapp/lib/radio/index.wxss b/node_modules/vant-weapp/lib/radio/index.wxss new file mode 100644 index 0000000..cb1b36a --- /dev/null +++ b/node_modules/vant-weapp/lib/radio/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-radio{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap,.van-radio__label{line-height:20px}.van-radio__icon-wrap{-webkit-flex:none;flex:none}.van-radio__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-radio__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-radio__icon--disabled.van-radio__icon--checked{color:#c9c9c9}.van-radio__label{margin-left:10px;color:#333;word-break:break-all}.van-radio__label--left{float:left;margin:0 10px 0 0}.van-radio__label--disabled{color:#c9c9c9}.van-radio__label:empty{margin:0} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/rate/index.js b/node_modules/vant-weapp/lib/rate/index.js new file mode 100644 index 0000000..85516f9 --- /dev/null +++ b/node_modules/vant-weapp/lib/rate/index.js @@ -0,0 +1,90 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + field: true, + classes: ['icon-class'], + props: { + value: Number, + readonly: Boolean, + disabled: Boolean, + allowHalf: Boolean, + size: { + type: Number, + value: 20 + }, + icon: { + type: String, + value: 'star' + }, + voidIcon: { + type: String, + value: 'star-o' + }, + color: { + type: String, + value: '#ffd21e' + }, + voidColor: { + type: String, + value: '#c7c7c7' + }, + disabledColor: { + type: String, + value: '#bdbdbd' + }, + count: { + type: Number, + value: 5 + } + }, + data: { + innerValue: 0 + }, + watch: { + value: function (value) { + if (value !== this.data.innerValue) { + this.set({ innerValue: value }); + } + } + }, + methods: { + onSelect: function (event) { + var data = this.data; + var score = event.currentTarget.dataset.score; + if (!data.disabled && !data.readonly) { + this.set({ innerValue: score + 1 }); + this.$emit('input', score + 1); + this.$emit('change', score + 1); + } + }, + onTouchMove: function (event) { + var _this = this; + var _a = event.touches[0], clientX = _a.clientX, clientY = _a.clientY; + this.getRect('.van-rate__icon', true).then(function (list) { + var target = list + .sort(function (item) { return item.right - item.left; }) + .find(function (item) { + return clientX >= item.left && + clientX <= item.right && + clientY >= item.top && + clientY <= item.bottom; + }); + if (target != null) { + _this.onSelect(__assign({}, event, { currentTarget: target })); + } + }); + } + } +}); diff --git a/node_modules/vant-weapp/lib/rate/index.json b/node_modules/vant-weapp/lib/rate/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/node_modules/vant-weapp/lib/rate/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/lib/rate/index.wxml b/node_modules/vant-weapp/lib/rate/index.wxml new file mode 100644 index 0000000..fc0d320 --- /dev/null +++ b/node_modules/vant-weapp/lib/rate/index.wxml @@ -0,0 +1,32 @@ + + + + + + + + + diff --git a/node_modules/vant-weapp/lib/rate/index.wxss b/node_modules/vant-weapp/lib/rate/index.wxss new file mode 100644 index 0000000..93edcc0 --- /dev/null +++ b/node_modules/vant-weapp/lib/rate/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-rate{-webkit-user-select:none;user-select:none}.van-rate__item{position:relative;display:inline-block;padding:0 2px}.van-rate__icon{display:block;height:1em}.van-rate__icon--half{position:absolute;top:0;left:2px;width:.5em;overflow:hidden} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/row/index.js b/node_modules/vant-weapp/lib/row/index.js new file mode 100644 index 0000000..767223e --- /dev/null +++ b/node_modules/vant-weapp/lib/row/index.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + relation: { + name: 'col', + type: 'descendant', + linked: function (target) { + if (this.data.gutter) { + target.setGutter(this.data.gutter); + } + } + }, + props: { + gutter: Number + }, + watch: { + gutter: 'setGutter' + }, + mounted: function () { + if (this.data.gutter) { + this.setGutter(); + } + }, + methods: { + setGutter: function () { + var _this = this; + var gutter = this.data.gutter; + var margin = "-" + Number(gutter) / 2 + "px"; + var style = gutter + ? "margin-right: " + margin + "; margin-left: " + margin + ";" + : ''; + this.set({ style: style }); + this.getRelationNodes('../col/index').forEach(function (col) { + col.setGutter(_this.data.gutter); + }); + } + } +}); diff --git a/node_modules/vant-weapp/lib/row/index.json b/node_modules/vant-weapp/lib/row/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/lib/row/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/lib/row/index.wxml b/node_modules/vant-weapp/lib/row/index.wxml new file mode 100644 index 0000000..20c5366 --- /dev/null +++ b/node_modules/vant-weapp/lib/row/index.wxml @@ -0,0 +1,3 @@ + + + diff --git a/node_modules/vant-weapp/lib/row/index.wxss b/node_modules/vant-weapp/lib/row/index.wxss new file mode 100644 index 0000000..9a46c3f --- /dev/null +++ b/node_modules/vant-weapp/lib/row/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-row:after{content:"";display:table;clear:both} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/search/index.js b/node_modules/vant-weapp/lib/search/index.js new file mode 100644 index 0000000..9a91743 --- /dev/null +++ b/node_modules/vant-weapp/lib/search/index.js @@ -0,0 +1,65 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + field: true, + classes: ['field-class', 'input-class', 'cancel-class'], + props: { + label: String, + focus: Boolean, + error: Boolean, + disabled: Boolean, + readonly: Boolean, + inputAlign: String, + showAction: Boolean, + useActionSlot: Boolean, + placeholder: String, + placeholderStyle: String, + background: { + type: String, + value: '#ffffff' + }, + maxlength: { + type: Number, + value: -1 + }, + shape: { + type: String, + value: 'square' + }, + clearable: { + type: Boolean, + value: true + } + }, + methods: { + onChange: function (event) { + this.set({ value: event.detail }); + this.$emit('change', event.detail); + }, + onCancel: function () { + var _this = this; + /** + * 修复修改输入框值时,输入框失焦和赋值同时触发,赋值失效 + * // https://github.com/youzan/vant-weapp/issues/1768 + */ + setTimeout(function () { + _this.set({ value: '' }); + _this.$emit('cancel'); + _this.$emit('change', ''); + }, 200); + }, + onSearch: function () { + this.$emit('search', this.data.value); + }, + onFocus: function () { + this.$emit('focus'); + }, + onBlur: function () { + this.$emit('blur'); + }, + onClear: function () { + this.$emit('clear'); + }, + } +}); diff --git a/node_modules/vant-weapp/lib/search/index.json b/node_modules/vant-weapp/lib/search/index.json new file mode 100644 index 0000000..b4cfe91 --- /dev/null +++ b/node_modules/vant-weapp/lib/search/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-field": "../field/index" + } +} diff --git a/node_modules/vant-weapp/lib/search/index.wxml b/node_modules/vant-weapp/lib/search/index.wxml new file mode 100644 index 0000000..12ad1be --- /dev/null +++ b/node_modules/vant-weapp/lib/search/index.wxml @@ -0,0 +1,46 @@ + + + + + {{ label }} + + + + + + + + 取消 + + diff --git a/node_modules/vant-weapp/lib/search/index.wxss b/node_modules/vant-weapp/lib/search/index.wxss new file mode 100644 index 0000000..8544516 --- /dev/null +++ b/node_modules/vant-weapp/lib/search/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-search{padding:10px 16px;-webkit-align-items:center;align-items:center;box-sizing:border-box}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{padding-left:10px;background-color:#f7f8fa;border-radius:2px;-webkit-flex:1;flex:1}.van-search__content--round{border-radius:17px}.van-search__label{padding:0 5px;font-size:14px;line-height:34px;color:#333}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#999}.van-search--withaction{padding-right:0}.van-search__action{padding:0 10px;font-size:14px;line-height:34px;color:#333}.van-search__action--hover{background-color:#f2f3f5} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/slider/index.js b/node_modules/vant-weapp/lib/slider/index.js new file mode 100644 index 0000000..395a7bc --- /dev/null +++ b/node_modules/vant-weapp/lib/slider/index.js @@ -0,0 +1,91 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var touch_1 = require("../mixins/touch"); +component_1.VantComponent({ + mixins: [touch_1.touch], + props: { + disabled: Boolean, + useButtonSlot: Boolean, + activeColor: String, + inactiveColor: String, + max: { + type: Number, + value: 100 + }, + min: { + type: Number, + value: 0 + }, + step: { + type: Number, + value: 1 + }, + value: { + type: Number, + value: 0 + }, + barHeight: { + type: String, + value: '2px' + } + }, + watch: { + value: function (value) { + this.updateValue(value, false); + } + }, + created: function () { + this.updateValue(this.data.value); + }, + methods: { + onTouchStart: function (event) { + if (this.data.disabled) + return; + this.touchStart(event); + this.startValue = this.format(this.data.value); + }, + onTouchMove: function (event) { + var _this = this; + if (this.data.disabled) + return; + this.touchMove(event); + this.getRect('.van-slider').then(function (rect) { + var diff = _this.deltaX / rect.width * 100; + _this.newValue = _this.startValue + diff; + _this.updateValue(_this.newValue, false, true); + }); + }, + onTouchEnd: function () { + if (this.data.disabled) + return; + this.updateValue(this.newValue, true); + }, + onClick: function (event) { + var _this = this; + if (this.data.disabled) + return; + this.getRect('.van-slider').then(function (rect) { + var value = (event.detail.x - rect.left) / rect.width * 100; + _this.updateValue(value, true); + }); + }, + updateValue: function (value, end, drag) { + value = this.format(value); + this.set({ + value: value, + barStyle: "width: " + value + "%; height: " + this.data.barHeight + ";" + }); + if (drag) { + this.$emit('drag', { value: value }); + } + if (end) { + this.$emit('change', value); + } + }, + format: function (value) { + var _a = this.data, max = _a.max, min = _a.min, step = _a.step; + return Math.round(Math.max(min, Math.min(value, max)) / step) * step; + } + } +}); diff --git a/node_modules/vant-weapp/lib/slider/index.json b/node_modules/vant-weapp/lib/slider/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/lib/slider/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/lib/slider/index.wxml b/node_modules/vant-weapp/lib/slider/index.wxml new file mode 100644 index 0000000..d30d078 --- /dev/null +++ b/node_modules/vant-weapp/lib/slider/index.wxml @@ -0,0 +1,29 @@ + + + + + + + + + + diff --git a/node_modules/vant-weapp/lib/slider/index.wxss b/node_modules/vant-weapp/lib/slider/index.wxss new file mode 100644 index 0000000..f227c66 --- /dev/null +++ b/node_modules/vant-weapp/lib/slider/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-slider{position:relative;border-radius:999px;background-color:#e5e5e5}.van-slider__bar{position:relative;border-radius:inherit;background-color:#1989fa}.van-slider__button{width:20px;height:20px;border-radius:50%;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.5)}.van-slider__button-wrapper{position:absolute;top:50%;right:0;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper:after{content:"";position:absolute;width:200%;height:200%;top:-50%;left:-50%}.van-slider--disabled{opacity:.3} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/stepper/index.js b/node_modules/vant-weapp/lib/stepper/index.js new file mode 100644 index 0000000..bbe5776 --- /dev/null +++ b/node_modules/vant-weapp/lib/stepper/index.js @@ -0,0 +1,107 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + field: true, + classes: [ + 'input-class', + 'plus-class', + 'minus-class' + ], + props: { + value: null, + integer: Boolean, + disabled: Boolean, + inputWidth: String, + asyncChange: Boolean, + disableInput: Boolean, + min: { + type: null, + value: 1 + }, + max: { + type: null, + value: Number.MAX_SAFE_INTEGER + }, + step: { + type: null, + value: 1 + }, + showPlus: { + type: Boolean, + value: true + }, + showMinus: { + type: Boolean, + value: true + } + }, + computed: { + minusDisabled: function () { + return this.data.disabled || this.data.value <= this.data.min; + }, + plusDisabled: function () { + return this.data.disabled || this.data.value >= this.data.max; + } + }, + watch: { + value: function (value) { + if (value === '') { + return; + } + var newValue = this.range(value); + if (typeof newValue === 'number' && +this.data.value !== newValue) { + this.set({ value: newValue }); + } + } + }, + data: { + focus: false + }, + created: function () { + this.set({ + value: this.range(this.data.value) + }); + }, + methods: { + onFocus: function (event) { + this.$emit('focus', event.detail); + }, + onBlur: function (event) { + var value = this.range(this.data.value); + this.triggerInput(value); + this.$emit('blur', event.detail); + }, + // limit value range + range: function (value) { + value = String(value).replace(/[^0-9.-]/g, ''); + return Math.max(Math.min(this.data.max, value), this.data.min); + }, + onInput: function (event) { + var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a; + this.triggerInput(value); + }, + onChange: function (type) { + if (this.data[type + "Disabled"]) { + this.$emit('overlimit', type); + return; + } + var diff = type === 'minus' ? -this.data.step : +this.data.step; + var value = Math.round((+this.data.value + diff) * 100) / 100; + this.triggerInput(this.range(value)); + this.$emit(type); + }, + onMinus: function () { + this.onChange('minus'); + }, + onPlus: function () { + this.onChange('plus'); + }, + triggerInput: function (value) { + this.set({ + value: this.data.asyncChange ? this.data.value : value + }); + this.$emit('change', value); + } + } +}); diff --git a/node_modules/vant-weapp/lib/stepper/index.json b/node_modules/vant-weapp/lib/stepper/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/lib/stepper/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/stepper/index.wxml b/node_modules/vant-weapp/lib/stepper/index.wxml new file mode 100644 index 0000000..33c257e --- /dev/null +++ b/node_modules/vant-weapp/lib/stepper/index.wxml @@ -0,0 +1,29 @@ + + + + + + + diff --git a/node_modules/vant-weapp/lib/stepper/index.wxss b/node_modules/vant-weapp/lib/stepper/index.wxss new file mode 100644 index 0000000..e681a77 --- /dev/null +++ b/node_modules/vant-weapp/lib/stepper/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__minus,.van-stepper__plus{position:relative;display:inline-block;width:28px;height:28px;padding:5px;margin:1px;vertical-align:middle;background-color:#f2f3f5;border:0;box-sizing:border-box}.van-stepper__minus:before,.van-stepper__plus:before{width:9px;height:1px}.van-stepper__minus:after,.van-stepper__plus:after{width:1px;height:9px}.van-stepper__minus:after,.van-stepper__minus:before,.van-stepper__plus:after,.van-stepper__plus:before{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;background-color:#333;content:""}.van-stepper__minus--hover,.van-stepper__plus--hover{background-color:#e8e8e8}.van-stepper__minus--disabled,.van-stepper__plus--disabled{background-color:#f7f8fa}.van-stepper__minus--disabled:after,.van-stepper__minus--disabled:before,.van-stepper__plus--disabled:after,.van-stepper__plus--disabled:before{background-color:#c9c9c9}.van-stepper__minus--disabled.van-stepper__minus--hover,.van-stepper__minus--disabled.van-stepper__plus--hover,.van-stepper__plus--disabled.van-stepper__minus--hover,.van-stepper__plus--disabled.van-stepper__plus--hover{background-color:#f7f8fa}.van-stepper__minus{border-radius:4px 0 0 4px}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 4px 4px 0}.van-stepper__input{display:inline-block;width:30px;height:26px;padding:1px;margin:1px;font-size:14px;color:#333;text-align:center;vertical-align:middle;background-color:#f2f3f5;border:0;border-width:1px 0;border-radius:0;box-sizing:initial;-webkit-appearance:none}.van-stepper__input--disabled{color:#c9c9c9;background-color:#f2f3f5} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/steps/index.js b/node_modules/vant-weapp/lib/steps/index.js new file mode 100644 index 0000000..10e7411 --- /dev/null +++ b/node_modules/vant-weapp/lib/steps/index.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var color_1 = require("../common/color"); +component_1.VantComponent({ + props: { + icon: String, + steps: Array, + active: Number, + direction: { + type: String, + value: 'horizontal' + }, + activeColor: { + type: String, + value: color_1.GREEN + } + } +}); diff --git a/node_modules/vant-weapp/lib/steps/index.json b/node_modules/vant-weapp/lib/steps/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/node_modules/vant-weapp/lib/steps/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/lib/steps/index.wxml b/node_modules/vant-weapp/lib/steps/index.wxml new file mode 100644 index 0000000..508705d --- /dev/null +++ b/node_modules/vant-weapp/lib/steps/index.wxml @@ -0,0 +1,35 @@ + + + + + + + {{ item.text }} + {{ item.desc }} + + + + + + + + + + + +function get(index, active) { + if (index < active) { + return 'finish'; + } else if (index === active) { + return 'process'; + } + + return ''; +} + +module.exports = get; + diff --git a/node_modules/vant-weapp/lib/steps/index.wxss b/node_modules/vant-weapp/lib/steps/index.wxss new file mode 100644 index 0000000..8ffab00 --- /dev/null +++ b/node_modules/vant-weapp/lib/steps/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;color:#999}.van-step--finish{color:#333}.van-step__circle{width:5px;height:5px;background-color:#999;border-radius:50%}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;padding:0 8px;background-color:#fff;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0)}.van-step--horizontal .van-step__title{display:inline-block;font-size:12px;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:1px;background-color:#eee;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:#333}.van-step--horizontal.van-step--process .van-step__active{display:block;font-size:12px;line-height:1}.van-step--vertical{padding:10px 10px 10px 0;font-size:14px;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;background-color:#fff;content:""}.van-step--vertical .van-step__active,.van-step--vertical .van-step__circle,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__active{font-size:12px;line-height:1}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;background-color:#eee;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/submit-bar/index.js b/node_modules/vant-weapp/lib/submit-bar/index.js new file mode 100644 index 0000000..5430437 --- /dev/null +++ b/node_modules/vant-weapp/lib/submit-bar/index.js @@ -0,0 +1,57 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var safe_area_1 = require("../mixins/safe-area"); +component_1.VantComponent({ + mixins: [safe_area_1.safeArea()], + classes: [ + 'bar-class', + 'price-class', + 'button-class' + ], + props: { + tip: { + type: null, + observer: 'updateTip' + }, + tipIcon: String, + type: Number, + price: { + type: null, + observer: 'updatePrice' + }, + label: String, + loading: Boolean, + disabled: Boolean, + buttonText: String, + currency: { + type: String, + value: '¥' + }, + buttonType: { + type: String, + value: 'danger' + }, + decimalLength: { + type: Number, + value: 2, + observer: 'updatePrice' + }, + suffixLabel: String + }, + methods: { + updatePrice: function () { + var _a = this.data, price = _a.price, decimalLength = _a.decimalLength; + this.set({ + hasPrice: typeof price === 'number', + priceStr: (price / 100).toFixed(decimalLength) + }); + }, + updateTip: function () { + this.set({ hasTip: typeof this.data.tip === 'string' }); + }, + onSubmit: function (event) { + this.$emit('submit', event.detail); + } + } +}); diff --git a/node_modules/vant-weapp/lib/submit-bar/index.json b/node_modules/vant-weapp/lib/submit-bar/index.json new file mode 100644 index 0000000..bda9b8d --- /dev/null +++ b/node_modules/vant-weapp/lib/submit-bar/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-button": "../button/index", + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/lib/submit-bar/index.wxml b/node_modules/vant-weapp/lib/submit-bar/index.wxml new file mode 100644 index 0000000..a9c7f0e --- /dev/null +++ b/node_modules/vant-weapp/lib/submit-bar/index.wxml @@ -0,0 +1,42 @@ + + + + + + + + + {{ tip }} + + + + + + + + {{ label || '合计:' }} + + {{ currency }} + {{ priceStr }} + + {{ suffixLabel }} + + + {{ loading ? '' : buttonText }} + + + diff --git a/node_modules/vant-weapp/lib/submit-bar/index.wxss b/node_modules/vant-weapp/lib/submit-bar/index.wxss new file mode 100644 index 0000000..7e4694b --- /dev/null +++ b/node_modules/vant-weapp/lib/submit-bar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-submit-bar{position:fixed;bottom:0;left:0;z-index:100;width:100%;-webkit-user-select:none;user-select:none}.van-submit-bar__tip{padding:10px;font-size:12px;line-height:1.5;color:#f56723;background-color:#fff7cc}.van-submit-bar__tip:empty{display:none}.van-submit-bar__tip-icon{width:12px;height:12px;margin-right:4px;vertical-align:middle}.van-submit-bar__tip-text{display:inline;vertical-align:middle}.van-submit-bar__bar{display:-webkit-flex;display:flex;height:50px;font-size:14px;background-color:#fff;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end}.van-submit-bar__bar--safe{padding-bottom:34px}.van-submit-bar__text{padding-right:12px;font-weight:500;color:#333;-webkit-flex:1;flex:1;text-align:right}.van-submit-bar__price{font-size:18px;color:#f44}.van-submit-bar__currency{font-size:14px}.van-submit-bar__suffix-label{margin-left:5px}.van-submit-bar__button{width:110px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/swipe-cell/index.js b/node_modules/vant-weapp/lib/swipe-cell/index.js new file mode 100644 index 0000000..8deedb1 --- /dev/null +++ b/node_modules/vant-weapp/lib/swipe-cell/index.js @@ -0,0 +1,111 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var touch_1 = require("../mixins/touch"); +var THRESHOLD = 0.3; +component_1.VantComponent({ + props: { + disabled: Boolean, + leftWidth: { + type: Number, + value: 0 + }, + rightWidth: { + type: Number, + value: 0 + }, + asyncClose: Boolean + }, + mixins: [touch_1.touch], + data: { + catchMove: false + }, + created: function () { + this.offset = 0; + }, + methods: { + open: function (position) { + var _a = this.data, leftWidth = _a.leftWidth, rightWidth = _a.rightWidth; + var offset = position === 'left' ? leftWidth : -rightWidth; + this.swipeMove(offset); + }, + close: function () { + this.swipeMove(0); + }, + swipeMove: function (offset) { + if (offset === void 0) { offset = 0; } + this.offset = offset; + var transform = "translate3d(" + offset + "px, 0, 0)"; + var transition = this.draging + ? 'none' + : '.6s cubic-bezier(0.18, 0.89, 0.32, 1)'; + this.set({ + wrapperStyle: "\n -webkit-transform: " + transform + ";\n -webkit-transition: " + transition + ";\n transform: " + transform + ";\n transition: " + transition + ";\n " + }); + }, + swipeLeaveTransition: function () { + var _a = this.data, leftWidth = _a.leftWidth, rightWidth = _a.rightWidth; + var offset = this.offset; + if (rightWidth > 0 && -offset > rightWidth * THRESHOLD) { + this.open('right'); + } + else if (leftWidth > 0 && offset > leftWidth * THRESHOLD) { + this.open('left'); + } + else { + this.swipeMove(0); + } + this.set({ catchMove: false }); + }, + startDrag: function (event) { + if (this.data.disabled) { + return; + } + this.draging = true; + this.startOffset = this.offset; + this.firstDirection = ''; + this.touchStart(event); + }, + noop: function () { }, + onDrag: function (event) { + if (this.data.disabled) { + return; + } + this.touchMove(event); + if (!this.firstDirection) { + this.firstDirection = this.direction; + this.set({ catchMove: this.firstDirection === 'horizontal' }); + } + if (this.firstDirection === 'vertical') { + return; + } + var _a = this.data, leftWidth = _a.leftWidth, rightWidth = _a.rightWidth; + var offset = this.startOffset + this.deltaX; + if ((rightWidth > 0 && -offset > rightWidth) || + (leftWidth > 0 && offset > leftWidth)) { + return; + } + this.swipeMove(offset); + }, + endDrag: function () { + if (this.data.disabled) { + return; + } + this.draging = false; + this.swipeLeaveTransition(); + }, + onClick: function (event) { + var _a = event.currentTarget.dataset.key, position = _a === void 0 ? 'outside' : _a; + this.$emit('click', position); + if (!this.offset) { + return; + } + if (this.data.asyncClose) { + this.$emit('close', { position: position, instance: this }); + } + else { + this.swipeMove(0); + } + } + } +}); diff --git a/node_modules/vant-weapp/lib/swipe-cell/index.json b/node_modules/vant-weapp/lib/swipe-cell/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/lib/swipe-cell/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/lib/swipe-cell/index.wxml b/node_modules/vant-weapp/lib/swipe-cell/index.wxml new file mode 100644 index 0000000..0ce1e47 --- /dev/null +++ b/node_modules/vant-weapp/lib/swipe-cell/index.wxml @@ -0,0 +1,20 @@ + + + + + + + + + + + diff --git a/node_modules/vant-weapp/lib/swipe-cell/index.wxss b/node_modules/vant-weapp/lib/swipe-cell/index.wxss new file mode 100644 index 0000000..d615270 --- /dev/null +++ b/node_modules/vant-weapp/lib/swipe-cell/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-swipe-cell{position:relative;overflow:hidden}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/switch-cell/index.js b/node_modules/vant-weapp/lib/switch-cell/index.js new file mode 100644 index 0000000..48ba2b4 --- /dev/null +++ b/node_modules/vant-weapp/lib/switch-cell/index.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + field: true, + props: { + value: null, + icon: String, + title: String, + label: String, + border: Boolean, + checked: Boolean, + loading: Boolean, + disabled: Boolean, + activeColor: String, + inactiveColor: String, + useLabelSlot: Boolean, + size: { + type: String, + value: '24px' + }, + activeValue: { + type: null, + value: true + }, + inactiveValue: { + type: null, + value: false + } + }, + watch: { + checked: function (value) { + this.set({ value: value }); + } + }, + created: function () { + this.set({ value: this.data.checked }); + }, + methods: { + onChange: function (event) { + this.$emit('change', event.detail); + } + } +}); diff --git a/node_modules/vant-weapp/lib/switch-cell/index.json b/node_modules/vant-weapp/lib/switch-cell/index.json new file mode 100644 index 0000000..22e5342 --- /dev/null +++ b/node_modules/vant-weapp/lib/switch-cell/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index", + "van-switch": "../switch/index" + } +} diff --git a/node_modules/vant-weapp/lib/switch-cell/index.wxml b/node_modules/vant-weapp/lib/switch-cell/index.wxml new file mode 100644 index 0000000..49a653e --- /dev/null +++ b/node_modules/vant-weapp/lib/switch-cell/index.wxml @@ -0,0 +1,25 @@ + + + + + + diff --git a/node_modules/vant-weapp/lib/switch-cell/index.wxss b/node_modules/vant-weapp/lib/switch-cell/index.wxss new file mode 100644 index 0000000..2ad612e --- /dev/null +++ b/node_modules/vant-weapp/lib/switch-cell/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-switch-cell{padding-top:9px;padding-bottom:9px}.van-switch-cell__switch{vertical-align:middle} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/switch/index.js b/node_modules/vant-weapp/lib/switch/index.js new file mode 100644 index 0000000..67a8abd --- /dev/null +++ b/node_modules/vant-weapp/lib/switch/index.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + field: true, + classes: ['node-class'], + props: { + checked: null, + loading: Boolean, + disabled: Boolean, + activeColor: String, + inactiveColor: String, + size: { + type: String, + value: '30px' + }, + activeValue: { + type: null, + value: true + }, + inactiveValue: { + type: null, + value: false + } + }, + watch: { + checked: function (value) { + this.set({ value: value }); + } + }, + created: function () { + this.set({ value: this.data.checked }); + }, + methods: { + onClick: function () { + var _a = this.data, activeValue = _a.activeValue, inactiveValue = _a.inactiveValue; + if (!this.data.disabled && !this.data.loading) { + var checked = this.data.checked === activeValue; + var value = checked ? inactiveValue : activeValue; + this.$emit('input', value); + this.$emit('change', value); + } + } + } +}); diff --git a/node_modules/vant-weapp/lib/switch/index.json b/node_modules/vant-weapp/lib/switch/index.json new file mode 100644 index 0000000..01077f5 --- /dev/null +++ b/node_modules/vant-weapp/lib/switch/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-loading": "../loading/index" + } +} diff --git a/node_modules/vant-weapp/lib/switch/index.wxml b/node_modules/vant-weapp/lib/switch/index.wxml new file mode 100644 index 0000000..74ce520 --- /dev/null +++ b/node_modules/vant-weapp/lib/switch/index.wxml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/node_modules/vant-weapp/lib/switch/index.wxss b/node_modules/vant-weapp/lib/switch/index.wxss new file mode 100644 index 0000000..85cadf3 --- /dev/null +++ b/node_modules/vant-weapp/lib/switch/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-switch{display:inline-block;position:relative;width:2em;border:1px solid rgba(0,0,0,.1);border-radius:1em;box-sizing:initial;transition:background-color .3s}.van-switch,.van-switch__node{height:1em;background-color:#fff}.van-switch__node{top:0;left:0;position:absolute;border-radius:100%;width:1em;z-index:1;transition:.3s;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05)}.van-switch__loading{top:25%;left:25%;position:absolute!important}.van-switch--on{background-color:#1989fa}.van-switch--on .van-switch__node{-webkit-transform:translateX(1em);transform:translateX(1em)}.van-switch--disabled{opacity:.4} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/tab/index.js b/node_modules/vant-weapp/lib/tab/index.js new file mode 100644 index 0000000..92b523f --- /dev/null +++ b/node_modules/vant-weapp/lib/tab/index.js @@ -0,0 +1,37 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + relation: { + name: 'tabs', + type: 'ancestor' + }, + props: { + dot: Boolean, + info: null, + title: String, + disabled: Boolean, + titleStyle: String + }, + data: { + width: null, + inited: false, + active: false, + animated: false + }, + watch: { + title: 'update', + disabled: 'update', + dot: 'update', + info: 'update', + titleStyle: 'update' + }, + methods: { + update: function () { + var parent = this.getRelationNodes('../tabs/index')[0]; + if (parent) { + parent.updateTabs(); + } + } + } +}); diff --git a/node_modules/vant-weapp/lib/tab/index.json b/node_modules/vant-weapp/lib/tab/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/lib/tab/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/tab/index.wxml b/node_modules/vant-weapp/lib/tab/index.wxml new file mode 100644 index 0000000..b90f452 --- /dev/null +++ b/node_modules/vant-weapp/lib/tab/index.wxml @@ -0,0 +1,9 @@ + + + + + diff --git a/node_modules/vant-weapp/lib/tab/index.wxss b/node_modules/vant-weapp/lib/tab/index.wxss new file mode 100644 index 0000000..e2e67a9 --- /dev/null +++ b/node_modules/vant-weapp/lib/tab/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tab__pane{box-sizing:border-box;overflow-y:auto}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/tabbar-item/index.js b/node_modules/vant-weapp/lib/tabbar-item/index.js new file mode 100644 index 0000000..e34a9e5 --- /dev/null +++ b/node_modules/vant-weapp/lib/tabbar-item/index.js @@ -0,0 +1,51 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + props: { + info: null, + icon: String, + dot: Boolean, + name: { + type: [String, Number] + } + }, + relation: { + name: 'tabbar', + type: 'ancestor' + }, + data: { + active: false + }, + methods: { + onClick: function () { + if (this.parent) { + this.parent.onChange(this); + } + this.$emit('click'); + }, + updateFromParent: function () { + var parent = this.parent; + if (!parent) { + return; + } + var index = parent.children.indexOf(this); + var parentData = parent.data; + var data = this.data; + var active = (data.name || index) === parentData.active; + var patch = {}; + if (active !== data.active) { + patch.active = active; + } + if (parentData.activeColor !== data.activeColor) { + patch.activeColor = parentData.activeColor; + } + if (parentData.inactiveColor !== data.inactiveColor) { + patch.inactiveColor = parentData.inactiveColor; + } + return Object.keys(patch).length > 0 + ? this.set(patch) + : Promise.resolve(); + } + } +}); diff --git a/node_modules/vant-weapp/lib/tabbar-item/index.json b/node_modules/vant-weapp/lib/tabbar-item/index.json new file mode 100644 index 0000000..16f174c --- /dev/null +++ b/node_modules/vant-weapp/lib/tabbar-item/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-info": "../info/index" + } +} diff --git a/node_modules/vant-weapp/lib/tabbar-item/index.wxml b/node_modules/vant-weapp/lib/tabbar-item/index.wxml new file mode 100644 index 0000000..b2649ae --- /dev/null +++ b/node_modules/vant-weapp/lib/tabbar-item/index.wxml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + diff --git a/node_modules/vant-weapp/lib/tabbar-item/index.wxss b/node_modules/vant-weapp/lib/tabbar-item/index.wxss new file mode 100644 index 0000000..d2c9d16 --- /dev/null +++ b/node_modules/vant-weapp/lib/tabbar-item/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{color:#7d7e80;height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:12px;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-tabbar-item__icon{font-size:18px;margin-bottom:5px;position:relative}.van-tabbar-item__icon--dot:after{top:0;right:-8px;width:8px;height:8px;content:" ";position:absolute;border-radius:100%;background-color:#f44}.van-tabbar-item__icon image{width:30px;height:18px;display:block}.van-tabbar-item--active{color:#1989fa} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/tabbar/index.js b/node_modules/vant-weapp/lib/tabbar/index.js new file mode 100644 index 0000000..0ffc0ce --- /dev/null +++ b/node_modules/vant-weapp/lib/tabbar/index.js @@ -0,0 +1,65 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var safe_area_1 = require("../mixins/safe-area"); +component_1.VantComponent({ + mixins: [safe_area_1.safeArea()], + relation: { + name: 'tabbar-item', + type: 'descendant', + linked: function (target) { + this.children.push(target); + target.parent = this; + target.updateFromParent(); + }, + unlinked: function (target) { + this.children = this.children.filter(function (item) { return item !== target; }); + this.updateChildren(); + } + }, + props: { + active: { + type: [Number, String], + observer: 'updateChildren' + }, + activeColor: { + type: String, + observer: 'updateChildren' + }, + inactiveColor: { + type: String, + observer: 'updateChildren' + }, + fixed: { + type: Boolean, + value: true + }, + border: { + type: Boolean, + value: true + }, + zIndex: { + type: Number, + value: 1 + } + }, + beforeCreate: function () { + this.children = []; + }, + methods: { + updateChildren: function () { + var children = this.children; + if (!Array.isArray(children) || !children.length) { + return Promise.resolve(); + } + return Promise.all(children.map(function (child) { return child.updateFromParent(); })); + }, + onChange: function (child) { + var index = this.children.indexOf(child); + var active = child.data.name || index; + if (active !== this.data.active) { + this.$emit('change', active); + } + } + } +}); diff --git a/node_modules/vant-weapp/lib/tabbar/index.json b/node_modules/vant-weapp/lib/tabbar/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/vant-weapp/lib/tabbar/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/vant-weapp/lib/tabbar/index.wxml b/node_modules/vant-weapp/lib/tabbar/index.wxml new file mode 100644 index 0000000..0926b64 --- /dev/null +++ b/node_modules/vant-weapp/lib/tabbar/index.wxml @@ -0,0 +1,8 @@ + + + + + diff --git a/node_modules/vant-weapp/lib/tabbar/index.wxss b/node_modules/vant-weapp/lib/tabbar/index.wxss new file mode 100644 index 0000000..b07814c --- /dev/null +++ b/node_modules/vant-weapp/lib/tabbar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tabbar{display:-webkit-flex;display:flex;width:100%;height:50px;background-color:#fff}.van-tabbar--fixed{position:fixed;bottom:0;left:0}.van-tabbar--safe{padding-bottom:34px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/tabs/index.js b/node_modules/vant-weapp/lib/tabs/index.js new file mode 100644 index 0000000..d789fe8 --- /dev/null +++ b/node_modules/vant-weapp/lib/tabs/index.js @@ -0,0 +1,308 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var touch_1 = require("../mixins/touch"); +var utils_1 = require("../common/utils"); +component_1.VantComponent({ + mixins: [touch_1.touch], + classes: ['nav-class', 'tab-class', 'tab-active-class', 'line-class'], + relation: { + name: 'tab', + type: 'descendant', + linked: function (child) { + this.child.push(child); + this.updateTabs(this.data.tabs.concat(child.data)); + }, + unlinked: function (child) { + var index = this.child.indexOf(child); + var tabs = this.data.tabs; + tabs.splice(index, 1); + this.child.splice(index, 1); + this.updateTabs(tabs); + } + }, + props: { + color: String, + sticky: Boolean, + animated: Boolean, + swipeable: Boolean, + lineWidth: { + type: Number, + value: -1 + }, + lineHeight: { + type: Number, + value: -1 + }, + active: { + type: Number, + value: 0 + }, + type: { + type: String, + value: 'line' + }, + border: { + type: Boolean, + value: true + }, + duration: { + type: Number, + value: 0.3 + }, + zIndex: { + type: Number, + value: 1 + }, + swipeThreshold: { + type: Number, + value: 4 + }, + offsetTop: { + type: Number, + value: 0 + } + }, + data: { + tabs: [], + lineStyle: '', + scrollLeft: 0, + scrollable: false, + trackStyle: '', + wrapStyle: '', + position: '' + }, + watch: { + swipeThreshold: function () { + this.set({ + scrollable: this.child.length > this.data.swipeThreshold + }); + }, + color: 'setLine', + lineWidth: 'setLine', + lineHeight: 'setLine', + active: 'setActiveTab', + animated: 'setTrack', + offsetTop: 'setWrapStyle' + }, + beforeCreate: function () { + this.child = []; + }, + mounted: function () { + var _this = this; + this.setLine(true); + this.setTrack(); + this.scrollIntoView(); + this.getRect('.van-tabs__wrap').then(function (rect) { + _this.navHeight = rect.height; + _this.observerContentScroll(); + }); + }, + destroyed: function () { + // @ts-ignore + this.createIntersectionObserver().disconnect(); + }, + methods: { + updateTabs: function (tabs) { + tabs = tabs || this.data.tabs; + this.set({ + tabs: tabs, + scrollable: tabs.length > this.data.swipeThreshold + }); + this.setActiveTab(); + }, + trigger: function (eventName, index) { + this.$emit(eventName, { + index: index, + title: this.data.tabs[index].title + }); + }, + onTap: function (event) { + var index = event.currentTarget.dataset.index; + if (this.data.tabs[index].disabled) { + this.trigger('disabled', index); + } + else { + this.trigger('click', index); + this.setActive(index); + } + }, + setActive: function (active) { + if (active !== this.data.active) { + this.trigger('change', active); + this.set({ active: active }); + this.setActiveTab(); + } + }, + setLine: function (skipTransition) { + var _this = this; + if (this.data.type !== 'line') { + return; + } + var _a = this.data, color = _a.color, active = _a.active, duration = _a.duration, lineWidth = _a.lineWidth, lineHeight = _a.lineHeight; + this.getRect('.van-tab', true).then(function (rects) { + var rect = rects[active]; + var width = lineWidth !== -1 ? lineWidth : rect.width / 2; + var height = lineHeight !== -1 ? "height: " + lineHeight + "px;" : ''; + var left = rects + .slice(0, active) + .reduce(function (prev, curr) { return prev + curr.width; }, 0); + left += (rect.width - width) / 2; + var transition = skipTransition + ? '' + : "transition-duration: " + duration + "s; -webkit-transition-duration: " + duration + "s;"; + _this.set({ + lineStyle: "\n " + height + "\n width: " + width + "px;\n background-color: " + color + ";\n -webkit-transform: translateX(" + left + "px);\n transform: translateX(" + left + "px);\n " + transition + "\n " + }); + }); + }, + setTrack: function () { + var _this = this; + var _a = this.data, animated = _a.animated, active = _a.active, duration = _a.duration; + if (!animated) + return ''; + this.getRect('.van-tabs__content').then(function (rect) { + var width = rect.width; + _this.set({ + trackStyle: "\n width: " + width * _this.child.length + "px;\n left: " + -1 * active * width + "px;\n transition: left " + duration + "s;\n display: -webkit-box;\n display: flex;\n " + }); + var props = { width: width, animated: animated }; + _this.child.forEach(function (item) { + item.set(props); + }); + }); + }, + setActiveTab: function () { + var _this = this; + this.child.forEach(function (item, index) { + var data = { + active: index === _this.data.active + }; + if (data.active) { + data.inited = true; + } + if (data.active !== item.data.active) { + item.set(data); + } + }); + utils_1.nextTick(function () { + _this.setLine(); + _this.setTrack(); + _this.scrollIntoView(); + }); + }, + // scroll active tab into view + scrollIntoView: function () { + var _this = this; + var _a = this.data, active = _a.active, scrollable = _a.scrollable; + if (!scrollable) { + return; + } + Promise.all([ + this.getRect('.van-tab', true), + this.getRect('.van-tabs__nav') + ]).then(function (_a) { + var tabRects = _a[0], navRect = _a[1]; + var tabRect = tabRects[active]; + var offsetLeft = tabRects + .slice(0, active) + .reduce(function (prev, curr) { return prev + curr.width; }, 0); + _this.set({ + scrollLeft: offsetLeft - (navRect.width - tabRect.width) / 2 + }); + }); + }, + onTouchStart: function (event) { + if (!this.data.swipeable) + return; + this.touchStart(event); + }, + onTouchMove: function (event) { + if (!this.data.swipeable) + return; + this.touchMove(event); + }, + // watch swipe touch end + onTouchEnd: function () { + if (!this.data.swipeable) + return; + var _a = this.data, active = _a.active, tabs = _a.tabs; + var _b = this, direction = _b.direction, deltaX = _b.deltaX, offsetX = _b.offsetX; + var minSwipeDistance = 50; + if (direction === 'horizontal' && offsetX >= minSwipeDistance) { + if (deltaX > 0 && active !== 0) { + this.setActive(active - 1); + } + else if (deltaX < 0 && active !== tabs.length - 1) { + this.setActive(active + 1); + } + } + }, + setWrapStyle: function () { + var _a = this.data, offsetTop = _a.offsetTop, position = _a.position; + var wrapStyle; + switch (position) { + case 'top': + wrapStyle = "\n top: " + offsetTop + "px;\n position: fixed;\n "; + break; + case 'bottom': + wrapStyle = "\n top: auto;\n bottom: 0;\n "; + break; + default: + wrapStyle = ''; + } + // cut down `set` + if (wrapStyle === this.data.wrapStyle) + return; + this.set({ wrapStyle: wrapStyle }); + }, + observerContentScroll: function () { + var _this = this; + if (!this.data.sticky) { + return; + } + var offsetTop = this.data.offsetTop; + var windowHeight = wx.getSystemInfoSync().windowHeight; + // @ts-ignore + this.createIntersectionObserver().disconnect(); + // @ts-ignore + this.createIntersectionObserver() + .relativeToViewport({ top: -(this.navHeight + offsetTop) }) + .observe('.van-tabs', function (res) { + var top = res.boundingClientRect.top; + if (top > offsetTop) { + return; + } + var position = res.intersectionRatio > 0 ? 'top' : 'bottom'; + _this.$emit('scroll', { + scrollTop: top + offsetTop, + isFixed: position === 'top' + }); + _this.setPosition(position); + }); + // @ts-ignore + this.createIntersectionObserver() + .relativeToViewport({ bottom: -(windowHeight - 1 - offsetTop) }) + .observe('.van-tabs', function (res) { + var _a = res.boundingClientRect, top = _a.top, bottom = _a.bottom; + if (bottom < _this.navHeight) { + return; + } + var position = res.intersectionRatio > 0 ? 'top' : ''; + _this.$emit('scroll', { + scrollTop: top + offsetTop, + isFixed: position === 'top' + }); + _this.setPosition(position); + }); + }, + setPosition: function (position) { + var _this = this; + if (position !== this.data.position) { + this.set({ position: position }).then(function () { + _this.setWrapStyle(); + }); + } + } + } +}); diff --git a/node_modules/vant-weapp/lib/tabs/index.json b/node_modules/vant-weapp/lib/tabs/index.json new file mode 100644 index 0000000..bf0ebe0 --- /dev/null +++ b/node_modules/vant-weapp/lib/tabs/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-info": "../info/index" + } +} diff --git a/node_modules/vant-weapp/lib/tabs/index.wxml b/node_modules/vant-weapp/lib/tabs/index.wxml new file mode 100644 index 0000000..1618d64 --- /dev/null +++ b/node_modules/vant-weapp/lib/tabs/index.wxml @@ -0,0 +1,49 @@ + + + + + + + + + + + + {{ item.title }} + + + + + + + + + + + + + + diff --git a/node_modules/vant-weapp/lib/tabs/index.wxss b/node_modules/vant-weapp/lib/tabs/index.wxss new file mode 100644 index 0000000..5944afb --- /dev/null +++ b/node_modules/vant-weapp/lib/tabs/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{position:absolute;top:0;right:0;left:0;display:-webkit-flex;display:flex;background-color:#fff}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__scroll--card{border:1px solid #f44;border-radius:2px}.van-tabs__nav{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none}.van-tabs__nav--line{height:100%}.van-tabs__nav--card{height:30px}.van-tabs__nav--card .van-tab{line-height:30px;color:#f44;border-right:1px solid #f44}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;background-color:#f44}.van-tabs__line{position:absolute;bottom:0;left:0;z-index:1;height:3px;background-color:#f44;border-radius:3px}.van-tabs--line{padding-top:44px}.van-tabs--line .van-tabs__wrap{height:44px}.van-tabs--card{padding-top:30px;margin:0 15px}.van-tabs--card .van-tabs__wrap{height:30px}.van-tabs__content{overflow:hidden}.van-tab,.van-tabs__track{position:relative}.van-tab{min-width:0;padding:0 5px;font-size:14px;line-height:44px;color:#7d7e80;text-align:center;cursor:pointer;box-sizing:border-box;-webkit-flex:1;flex:1}.van-tab--active{font-weight:500;color:#333}.van-tab--disabled{color:#c9c9c9}.van-tab__title--dot:after{display:inline-block;width:8px;height:8px;vertical-align:middle;background-color:#f44;border-radius:100%;content:""}.van-tab__title__info{position:relative!important;top:-1px!important;display:inline-block;-webkit-transform:translateX(0)!important;transform:translateX(0)!important} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/tag/index.js b/node_modules/vant-weapp/lib/tag/index.js new file mode 100644 index 0000000..78a7890 --- /dev/null +++ b/node_modules/vant-weapp/lib/tag/index.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var color_1 = require("../common/color"); +var DEFAULT_COLOR = '#999'; +var COLOR_MAP = { + danger: color_1.RED, + primary: color_1.BLUE, + success: color_1.GREEN, + warning: color_1.ORANGE +}; +component_1.VantComponent({ + props: { + size: String, + type: String, + mark: Boolean, + color: String, + plain: Boolean, + round: Boolean, + textColor: String + }, + computed: { + style: function () { + var _a; + var color = this.data.color || COLOR_MAP[this.data.type] || DEFAULT_COLOR; + var key = this.data.plain ? 'color' : 'background-color'; + var style = (_a = {}, _a[key] = color, _a); + if (this.data.textColor) { + style.color = this.data.textColor; + } + return Object.keys(style).map(function (key) { return key + ": " + style[key]; }).join(';'); + } + } +}); diff --git a/node_modules/vant-weapp/lib/tag/index.json b/node_modules/vant-weapp/lib/tag/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/lib/tag/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/tag/index.wxml b/node_modules/vant-weapp/lib/tag/index.wxml new file mode 100644 index 0000000..e66580c --- /dev/null +++ b/node_modules/vant-weapp/lib/tag/index.wxml @@ -0,0 +1,8 @@ + + + + + diff --git a/node_modules/vant-weapp/lib/tag/index.wxss b/node_modules/vant-weapp/lib/tag/index.wxss new file mode 100644 index 0000000..fbd8fad --- /dev/null +++ b/node_modules/vant-weapp/lib/tag/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tag{color:#fff;font-size:10px;padding:.2em .5em;line-height:normal;border-radius:.2em;display:inline-block}.van-tag:after{border-color:currentColor;border-radius:.4em}.van-tag--mark{padding-right:.6em;border-radius:0 .8em .8em 0}.van-tag--mark:after{border-radius:0 1.6em 1.6em 0}.van-tag--round{border-radius:.8em}.van-tag--round:after{border-radius:1.6em}.van-tag--medium{font-size:12px}.van-tag--large{font-size:14px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/toast/index.js b/node_modules/vant-weapp/lib/toast/index.js new file mode 100644 index 0000000..bc37382 --- /dev/null +++ b/node_modules/vant-weapp/lib/toast/index.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +component_1.VantComponent({ + props: { + show: Boolean, + mask: Boolean, + message: String, + forbidClick: Boolean, + zIndex: { + type: Number, + value: 1000 + }, + type: { + type: String, + value: 'text' + }, + loadingType: { + type: String, + value: 'circular' + }, + position: { + type: String, + value: 'middle' + } + }, + methods: { + // for prevent touchmove + noop: function () { } + } +}); diff --git a/node_modules/vant-weapp/lib/toast/index.json b/node_modules/vant-weapp/lib/toast/index.json new file mode 100644 index 0000000..9b1b78c --- /dev/null +++ b/node_modules/vant-weapp/lib/toast/index.json @@ -0,0 +1,9 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-loading": "../loading/index", + "van-overlay": "../overlay/index", + "van-transition": "../transition/index" + } +} diff --git a/node_modules/vant-weapp/lib/toast/index.wxml b/node_modules/vant-weapp/lib/toast/index.wxml new file mode 100644 index 0000000..3e27e2d --- /dev/null +++ b/node_modules/vant-weapp/lib/toast/index.wxml @@ -0,0 +1,33 @@ + + + + + {{ message }} + + + + + + {{ message }} + + + + + diff --git a/node_modules/vant-weapp/lib/toast/index.wxss b/node_modules/vant-weapp/lib/toast/index.wxss new file mode 100644 index 0000000..c173620 --- /dev/null +++ b/node_modules/vant-weapp/lib/toast/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;color:#fff;font-size:14px;line-height:20px;border-radius:4px;word-break:break-all;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;box-sizing:initial;background-color:rgba(51,51,51,.88);white-space:pre-wrap}.van-toast__container{position:fixed;top:50%;left:50%;max-width:70%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-toast--text{padding:8px 12px;min-width:96px}.van-toast--icon{width:90px;padding:15px;min-height:90px}.van-toast--icon .van-toast__icon{font-size:48px}.van-toast--icon .van-toast__text{padding-top:5px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translateY(-30vh);transform:translateY(-30vh)}.van-toast--bottom{-webkit-transform:translateY(30vh);transform:translateY(30vh)} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/toast/toast.js b/node_modules/vant-weapp/lib/toast/toast.js new file mode 100644 index 0000000..731ee5d --- /dev/null +++ b/node_modules/vant-weapp/lib/toast/toast.js @@ -0,0 +1,81 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = require("../common/utils"); +var defaultOptions = { + type: 'text', + mask: false, + message: '', + show: true, + zIndex: 1000, + duration: 3000, + position: 'middle', + forbidClick: false, + loadingType: 'circular', + selector: '#van-toast' +}; +var queue = []; +var currentOptions = __assign({}, defaultOptions); +function parseOptions(message) { + return utils_1.isObj(message) ? message : { message: message }; +} +function getContext() { + var pages = getCurrentPages(); + return pages[pages.length - 1]; +} +function Toast(toastOptions) { + var options = __assign({}, currentOptions, parseOptions(toastOptions)); + var context = options.context || getContext(); + var toast = context.selectComponent(options.selector); + if (!toast) { + console.warn('未找到 van-toast 节点,请确认 selector 及 context 是否正确'); + return; + } + delete options.context; + delete options.selector; + toast.clear = function () { + toast.set({ show: false }); + if (options.onClose) { + options.onClose(); + } + }; + queue.push(toast); + toast.set(options); + clearTimeout(toast.timer); + if (options.duration > 0) { + toast.timer = setTimeout(function () { + toast.clear(); + queue = queue.filter(function (item) { return item !== toast; }); + }, options.duration); + } + return toast; +} +var createMethod = function (type) { return function (options) { + return Toast(__assign({ type: type }, parseOptions(options))); +}; }; +Toast.loading = createMethod('loading'); +Toast.success = createMethod('success'); +Toast.fail = createMethod('fail'); +Toast.clear = function () { + queue.forEach(function (toast) { + toast.clear(); + }); + queue = []; +}; +Toast.setDefaultOptions = function (options) { + Object.assign(currentOptions, options); +}; +Toast.resetDefaultOptions = function () { + currentOptions = __assign({}, defaultOptions); +}; +exports.default = Toast; diff --git a/node_modules/vant-weapp/lib/transition/index.js b/node_modules/vant-weapp/lib/transition/index.js new file mode 100644 index 0000000..d3f6c37 --- /dev/null +++ b/node_modules/vant-weapp/lib/transition/index.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var transition_1 = require("../mixins/transition"); +component_1.VantComponent({ + classes: [ + 'enter-class', + 'enter-active-class', + 'enter-to-class', + 'leave-class', + 'leave-active-class', + 'leave-to-class' + ], + mixins: [transition_1.transition(true)] +}); diff --git a/node_modules/vant-weapp/lib/transition/index.json b/node_modules/vant-weapp/lib/transition/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/vant-weapp/lib/transition/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/transition/index.wxml b/node_modules/vant-weapp/lib/transition/index.wxml new file mode 100644 index 0000000..412e8af --- /dev/null +++ b/node_modules/vant-weapp/lib/transition/index.wxml @@ -0,0 +1,8 @@ + + + diff --git a/node_modules/vant-weapp/lib/transition/index.wxss b/node_modules/vant-weapp/lib/transition/index.wxss new file mode 100644 index 0000000..adcbc5f --- /dev/null +++ b/node_modules/vant-weapp/lib/transition/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-fade-up-enter,.van-fade-up-leave-to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-fade-down-enter,.van-fade-down-leave-to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-fade-left-enter,.van-fade-left-leave-to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-fade-right-enter,.van-fade-right-leave-to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-slide-up-enter,.van-slide-up-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/tree-select/index.js b/node_modules/vant-weapp/lib/tree-select/index.js new file mode 100644 index 0000000..3dc1458 --- /dev/null +++ b/node_modules/vant-weapp/lib/tree-select/index.js @@ -0,0 +1,81 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var ITEM_HEIGHT = 44; +component_1.VantComponent({ + classes: [ + 'main-item-class', + 'content-item-class', + 'main-active-class', + 'content-active-class', + 'main-disabled-class', + 'content-disabled-class' + ], + props: { + items: Array, + mainActiveIndex: { + type: Number, + value: 0 + }, + activeId: { + type: [Number, String, Array] + }, + maxHeight: { + type: Number, + value: 300 + } + }, + data: { + subItems: [], + mainHeight: 0, + itemHeight: 0 + }, + watch: { + items: function () { + var _this = this; + this.updateSubItems().then(function () { + _this.updateMainHeight(); + }); + }, + maxHeight: function () { + this.updateItemHeight(this.data.subItems); + this.updateMainHeight(); + }, + mainActiveIndex: 'updateSubItems' + }, + methods: { + // 当一个子项被选择时 + onSelectItem: function (event) { + var item = event.currentTarget.dataset.item; + if (!item.disabled) { + this.$emit('click-item', item); + } + }, + // 当一个导航被点击时 + onClickNav: function (event) { + var index = event.currentTarget.dataset.index; + var item = this.data.items[index]; + if (!item.disabled) { + this.$emit('click-nav', { index: index }); + } + }, + // 更新子项列表 + updateSubItems: function () { + var _a = this.data, items = _a.items, mainActiveIndex = _a.mainActiveIndex; + var _b = (items[mainActiveIndex] || {}).children, children = _b === void 0 ? [] : _b; + this.updateItemHeight(children); + return this.set({ subItems: children }); + }, + // 更新组件整体高度,根据最大高度和当前组件需要展示的高度来决定 + updateMainHeight: function () { + var _a = this.data, _b = _a.items, items = _b === void 0 ? [] : _b, _c = _a.subItems, subItems = _c === void 0 ? [] : _c; + var maxHeight = Math.max(items.length * ITEM_HEIGHT, subItems.length * ITEM_HEIGHT); + this.set({ mainHeight: Math.min(maxHeight, this.data.maxHeight) }); + }, + // 更新子项列表高度,根据可展示的最大高度和当前子项列表的高度决定 + updateItemHeight: function (subItems) { + var itemHeight = Math.min(subItems.length * ITEM_HEIGHT, this.data.maxHeight); + return this.set({ itemHeight: itemHeight }); + } + } +}); diff --git a/node_modules/vant-weapp/lib/tree-select/index.json b/node_modules/vant-weapp/lib/tree-select/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/node_modules/vant-weapp/lib/tree-select/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/node_modules/vant-weapp/lib/tree-select/index.wxml b/node_modules/vant-weapp/lib/tree-select/index.wxml new file mode 100644 index 0000000..9ada914 --- /dev/null +++ b/node_modules/vant-weapp/lib/tree-select/index.wxml @@ -0,0 +1,40 @@ + + + + + + + {{ item.text }} + + + + + {{ item.text }} + + + + diff --git a/node_modules/vant-weapp/lib/tree-select/index.wxs b/node_modules/vant-weapp/lib/tree-select/index.wxs new file mode 100644 index 0000000..b1cbb39 --- /dev/null +++ b/node_modules/vant-weapp/lib/tree-select/index.wxs @@ -0,0 +1,12 @@ +/* eslint-disable */ +var array = require('../wxs/array.wxs'); + +function isActive (activeList, itemId) { + if (array.isArray(activeList)) { + return activeList.indexOf(itemId) > -1; + } + + return activeList === itemId; +} + +module.exports.isActive = isActive; diff --git a/node_modules/vant-weapp/lib/tree-select/index.wxss b/node_modules/vant-weapp/lib/tree-select/index.wxss new file mode 100644 index 0000000..da723a4 --- /dev/null +++ b/node_modules/vant-weapp/lib/tree-select/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-tree-select{position:relative;font-size:14px;-webkit-user-select:none;user-select:none}.van-tree-select__nav{position:absolute;top:0;bottom:0;left:0;width:35%;min-width:120px;background-color:#fafafa}.van-tree-select__nitem{position:relative;padding:0 9px 0 15px;line-height:44px}.van-tree-select__nitem--active:after{position:absolute;top:0;bottom:0;left:0;width:3.6px;background-color:#f44;content:""}.van-tree-select__nitem--active{font-weight:700;background-color:#fff}.van-tree-select__nitem--disabled{color:#999}.van-tree-select__content{width:65%;padding-left:15px;margin-left:35%;background-color:#fff;box-sizing:border-box}.van-tree-select__item{position:relative;font-weight:700;line-height:44px}.van-tree-select__item--active{color:#f44}.van-tree-select__item--disabled{color:#999}.van-tree-select__selected{position:absolute;top:0;right:15px;bottom:0;height:24px;margin:auto 0;line-height:24px} \ No newline at end of file diff --git a/node_modules/vant-weapp/lib/wxs/array.wxs b/node_modules/vant-weapp/lib/wxs/array.wxs new file mode 100644 index 0000000..610089c --- /dev/null +++ b/node_modules/vant-weapp/lib/wxs/array.wxs @@ -0,0 +1,5 @@ +function isArray(array) { + return array && array.constructor === 'Array'; +} + +module.exports.isArray = isArray; diff --git a/node_modules/vant-weapp/lib/wxs/bem.wxs b/node_modules/vant-weapp/lib/wxs/bem.wxs new file mode 100644 index 0000000..93b2777 --- /dev/null +++ b/node_modules/vant-weapp/lib/wxs/bem.wxs @@ -0,0 +1,38 @@ +var array = require('./array.wxs'); +var object = require('./object.wxs'); +var PREFIX = 'van-'; + +function join(name, mods) { + name = PREFIX + name; + mods = mods.map(function(mod) { + return name + '--' + mod; + }); + mods.unshift(name); + return mods.join(' '); +} + +function traversing(mods, conf) { + if (!conf) { + return; + } + + if (typeof conf === 'string' || typeof conf === 'number') { + mods.push(conf); + } else if (array.isArray(conf)) { + conf.forEach(function(item) { + traversing(mods, item); + }); + } else if (typeof conf === 'object') { + object.keys(conf).forEach(function(key) { + conf[key] && mods.push(key); + }); + } +} + +function bem(name, conf) { + var mods = []; + traversing(mods, conf); + return join(name, mods); +} + +module.exports.bem = bem; diff --git a/node_modules/vant-weapp/lib/wxs/memoize.wxs b/node_modules/vant-weapp/lib/wxs/memoize.wxs new file mode 100644 index 0000000..261ae67 --- /dev/null +++ b/node_modules/vant-weapp/lib/wxs/memoize.wxs @@ -0,0 +1,54 @@ +/** + * Simple memoize + * wxs doesn't support fn.apply, so this memoize only support up to 2 args + */ + +function isPrimitive(value) { + var type = typeof value; + return ( + type === 'boolean' || + type === 'number' || + type === 'string' || + type === 'undefined' || + value === null + ); +} + +// mock simple fn.call in wxs +function call(fn, args) { + if (args.length === 2) { + return fn(args[0], args[1]); + } + + if (args.length === 1) { + return fn(args[0]); + } + + return fn(); +} + +function serializer(args) { + if (args.length === 1 && isPrimitive(args[0])) { + return args[0]; + } + var obj = {}; + for (var i = 0; i < args.length; i++) { + obj['key' + i] = args[i]; + } + return JSON.stringify(obj); +} + +function memoize(fn) { + var cache = {}; + + return function() { + var key = serializer(arguments); + if (cache[key] === undefined) { + cache[key] = call(fn, arguments); + } + + return cache[key]; + }; +} + +module.exports.memoize = memoize; diff --git a/node_modules/vant-weapp/lib/wxs/object.wxs b/node_modules/vant-weapp/lib/wxs/object.wxs new file mode 100644 index 0000000..e077107 --- /dev/null +++ b/node_modules/vant-weapp/lib/wxs/object.wxs @@ -0,0 +1,13 @@ +/* eslint-disable */ +var REGEXP = getRegExp('{|}|"', 'g'); + +function keys(obj) { + return JSON.stringify(obj) + .replace(REGEXP, '') + .split(',') + .map(function(item) { + return item.split(':')[0]; + }); +} + +module.exports.keys = keys; diff --git a/node_modules/vant-weapp/lib/wxs/utils.wxs b/node_modules/vant-weapp/lib/wxs/utils.wxs new file mode 100644 index 0000000..8cced70 --- /dev/null +++ b/node_modules/vant-weapp/lib/wxs/utils.wxs @@ -0,0 +1,12 @@ +var bem = require('./bem.wxs').bem; +var memoize = require('./memoize.wxs').memoize; + +function isSrc(url) { + return url.indexOf('http') === 0 || url.indexOf('data:image') === 0 || url.indexOf('//') === 0; +} + +module.exports = { + bem: memoize(bem), + isSrc: isSrc, + memoize: memoize +}; diff --git a/node_modules/vant-weapp/package.json b/node_modules/vant-weapp/package.json new file mode 100644 index 0000000..87fdd89 --- /dev/null +++ b/node_modules/vant-weapp/package.json @@ -0,0 +1,98 @@ +{ + "_from": "vant-weapp", + "_id": "vant-weapp@0.5.22", + "_inBundle": false, + "_integrity": "sha1-v+r33Ot0hCRKNLKdJ+AAbZgO4V8=", + "_location": "/vant-weapp", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "vant-weapp", + "name": "vant-weapp", + "escapedName": "vant-weapp", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "http://r.cnpmjs.org/vant-weapp/download/vant-weapp-0.5.22.tgz", + "_shasum": "bfeaf7dceb7484244a34b29d27e0006d980ee15f", + "_spec": "vant-weapp", + "_where": "C:\\Users\\yuchen\\Desktop\\qqmini\\ucas", + "author": { + "name": "youzan" + }, + "bugs": { + "url": "https://github.com/youzan/vant-weapp/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "轻量、可靠的小程序 UI 组件库", + "devDependencies": { + "@babel/core": "^7.5.5", + "@babel/plugin-syntax-dynamic-import": "^7.2.0", + "@babel/preset-env": "^7.5.5", + "@vant/cli": "^1.0.3", + "@vant/doc": "^2.5.1", + "@vant/eslint-config": "^1.2.4", + "@vant/icons": "1.1.13", + "@vant/markdown-loader": "^2.2.0", + "autoprefixer": "^9.6.1", + "babel-loader": "8.0.6", + "cross-env": "^5.1.4", + "css-loader": "^3.2.0", + "cssnano": "^4.1.10", + "eslint": "^6.1.0", + "gh-pages": "^2.0.1", + "gulp": "^4.0.2", + "gulp-insert": "^0.5.0", + "gulp-less": "^4.0.1", + "gulp-postcss": "^8.0.0", + "gulp-rename": "^1.2.2", + "html-webpack-plugin": "^3.2.0", + "less": "^3.9.0", + "less-loader": "^5.0.0", + "miniprogram-api-typings": "2.7.7-2", + "postcss-loader": "^3.0.0", + "progress-bar-webpack-plugin": "^1.11.0", + "style-loader": "^1.0.0", + "typescript": "^3.5.3", + "vue": "2.6.10", + "vue-loader": "^15.7.1", + "vue-router": "^3.1.1", + "vue-template-compiler": "2.6.10", + "webpack": "^4.39.1", + "webpack-cli": "^3.3.6", + "webpack-serve": "^2.0.3" + }, + "files": [ + "dist", + "lib" + ], + "homepage": "https://github.com/youzan/vant-weapp#readme", + "husky": { + "hooks": { + "commit-msg": "vant commit-lint" + } + }, + "license": "MIT", + "miniprogram": "dist", + "name": "vant-weapp", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/youzan/vant-weapp.git" + }, + "scripts": { + "build:changelog": "vant changelog --tag v0.5.0 ./docs/markdown/changelog.generated.md", + "build:lib": "yarn && npx gulp -f build/compiler.js --series buildEs buildLib", + "dev": "node build/dev.js", + "lint": "eslint ./packages --ext .js,.ts", + "release": "sh build/release.sh", + "release:site": "sh build/release-site.sh" + }, + "version": "0.5.22" +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a06e0d6 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "ucas", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "vant-weapp": { + "version": "0.5.22", + "resolved": "http://r.cnpmjs.org/vant-weapp/download/vant-weapp-0.5.22.tgz", + "integrity": "sha1-v+r33Ot0hCRKNLKdJ+AAbZgO4V8=" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..c4fb790 --- /dev/null +++ b/package.json @@ -0,0 +1,14 @@ +{ + "name": "ucas", + "version": "1.0.0", + "description": "", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "vant-weapp": "^0.5.22" + } +} diff --git a/pages/advice/advice.js b/pages/advice/advice.js new file mode 100644 index 0000000..5b387ae --- /dev/null +++ b/pages/advice/advice.js @@ -0,0 +1,115 @@ +// pages/advice/advice.js +var util = require("../../utils/util.js") +Page({ + + /** + * 页面的初始数据 + */ + data: { + advice: "" + }, + + submitAdvice:function(){ + var that = this + if(this.data.advice == "") + { + wx.showToast({ + title: '建议不能为空!', + icon: "none", + duration: 2000 + }) + return + } + else{ + wx.request({ + data: util.json2Form({ + content: this.data.advice + }), + header: { + "Content-Type": "application/x-www-form-urlencoded" + }, + url: 'https://www.neumark.top/advice/add', + method: "POST", + success: (res) => { + if(res.data == 1){ + wx.showToast({ + title: '建议提交成功!', + icon: "none", + duration: 2000 + }) + that.setData({ + advice: "" + }) + } + else{ + wx.showToast({ + title: '未知错误!', + icon: "none", + duration: 2000 + }) + } + } + }) + } + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + + adviceInput: function(event){ + this.setData({advice: event.detail.value}) + } +}) \ No newline at end of file diff --git a/pages/advice/advice.json b/pages/advice/advice.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/advice/advice.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/advice/advice.wxml b/pages/advice/advice.wxml new file mode 100644 index 0000000..6867765 --- /dev/null +++ b/pages/advice/advice.wxml @@ -0,0 +1,7 @@ + + + + + + 提交建议 + \ No newline at end of file diff --git a/pages/advice/advice.wxss b/pages/advice/advice.wxss new file mode 100644 index 0000000..00ab765 --- /dev/null +++ b/pages/advice/advice.wxss @@ -0,0 +1 @@ +/* pages/advice/advice.wxss */ \ No newline at end of file diff --git a/pages/calendar/calendar.js b/pages/calendar/calendar.js new file mode 100644 index 0000000..ea9d155 --- /dev/null +++ b/pages/calendar/calendar.js @@ -0,0 +1,74 @@ +// pages/calendar/calendar.js +Page({ + + /** + * 页面的初始数据 + */ + + preview:function(){ + wx.previewImage({ + current: "http://www.neumark.top:8080/calendar.jpg", // 当前显示图片的http链接 + urls: ["http://www.neumark.top:8080/calendar.jpg"] // 需要预览的图片http链接列表 + }) + }, + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + +}) \ No newline at end of file diff --git a/pages/calendar/calendar.json b/pages/calendar/calendar.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/calendar/calendar.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/calendar/calendar.wxml b/pages/calendar/calendar.wxml new file mode 100644 index 0000000..bcb04d4 --- /dev/null +++ b/pages/calendar/calendar.wxml @@ -0,0 +1,5 @@ + + + + + diff --git a/pages/calendar/calendar.wxss b/pages/calendar/calendar.wxss new file mode 100644 index 0000000..4de20bf --- /dev/null +++ b/pages/calendar/calendar.wxss @@ -0,0 +1,11 @@ +/* pages/calendar/calendar.wxss */ +.imagesize{ + display:flex; + height: 100%; + justify-content: center; + align-items:center; +} + +page{ + height:100% +} \ No newline at end of file diff --git a/pages/curriculum/curriculum.js b/pages/curriculum/curriculum.js new file mode 100644 index 0000000..bdfbc3c --- /dev/null +++ b/pages/curriculum/curriculum.js @@ -0,0 +1,107 @@ +// pages/curriculum/curriculum.js +var util = require("../../utils/util.js") +Page({ + + /** + * 页面的初始数据 + */ + data: { + colorArrays: ["#85B8CF", "#90C652", "#D8AA5A", "#FC9F9D", "#0A9A84", "#61BC69", "#12AEF3", "#E29AAD"], + wlist: [] + }, + + showCardView: function(e){ + console.log(e.currentTarget.dataset.index) + wx.navigateTo({ + url: "/pages/lessoninfo/lessoninfo?lesson=" + JSON.stringify(this.data.wlist[e.currentTarget.dataset.index]) + }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + var that = this + + var ifbind = wx.getStorageSync("ifbind") + if(ifbind == ""){ + wx.showToast({ + title: '请先登录!', + icon: "none", + duration: 2000 + }) + this.setData({ + wlist: null + }) + } + else{ + + var openid = wx.getStorageSync("openid") + wx.request({ + data: util.json2Form({ + openid: openid + }), + header: { + "Content-Type": "application/x-www-form-urlencoded" + }, + url: 'https://www.neumark.top/lesson/get', + method: "POST", + success: (res) => { + console.log(res.data) + that.setData({ + wlist: res.data + }) + } + }) + } + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/curriculum/curriculum.json b/pages/curriculum/curriculum.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/curriculum/curriculum.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/curriculum/curriculum.wxml b/pages/curriculum/curriculum.wxml new file mode 100644 index 0000000..731c7db --- /dev/null +++ b/pages/curriculum/curriculum.wxml @@ -0,0 +1,25 @@ + + + 周{{item}} + + + + + + {{item}} + + + + + + + + + + + + {{item.kcmc}} + + + + diff --git a/pages/curriculum/curriculum.wxss b/pages/curriculum/curriculum.wxss new file mode 100644 index 0000000..cb80762 --- /dev/null +++ b/pages/curriculum/curriculum.wxss @@ -0,0 +1,51 @@ +/* pages/curriculum/curriculum.wxss */ +.flex-item { + width: 95rpx; + height: 100px; +} + +.kcb-item { + position: absolute; + justify-content: center; + display: flex; + align-items: center; + border-radius: 5px; +} + +.smalltext { + font-size: 8pt; + color: #fff; + padding-left: 2px; +} + +.top { + display: flex; + flex-direction: row; + margin-left: 35rpx; + background-color: #d2e6b3; + color: #7cba23; +} + +.top-text { + width: 100rpx; + height: 35rpx; + font-size: 9pt; + justify-content: center; + display: flex; + align-items: center; +} + +.scroll { + height: 1170rpx; + z-index: 101; + position: fixed; +} + +.left { + width: 35rpx; + height: 100rpx; + font-size: 9pt; + justify-content: center; + display: flex; + align-items: center; +} \ No newline at end of file diff --git a/pages/function/function.js b/pages/function/function.js new file mode 100644 index 0000000..70bfc26 --- /dev/null +++ b/pages/function/function.js @@ -0,0 +1,150 @@ +// pages/function/function.js + +var util = require("../../utils/util.js") + + +Page({ + + /** + * 页面的初始数据 + */ + + data: { + + }, + + openLecture:function(){ + var ifbind = wx.getStorageSync("ifbind") + if(ifbind == ""){ + wx.showToast({ + title: '未登录!', + icon: "none", + duration: 2000 + }) + return; + } + var openid = wx.getStorageSync("openid") + wx.request({ + data: util.json2Form({ + openid: openid, + state: "1" + }), + header: { + "Content-Type": "application/x-www-form-urlencoded" + }, + url: 'https://www.neumark.top/user/update_lecture_state', + method: "POST", + success: (res) => { + wx.showToast({ + title: '开启人文邮件通知服务!', + icon: "none", + duration: 2000 + }) + } + }) + }, + closeLecture:function(){ + var ifbind = wx.getStorageSync("ifbind") + if(ifbind == ""){ + wx.showToast({ + title: '未登录!', + icon: "none", + duration: 2000 + }) + return; + } + var openid = wx.getStorageSync("openid") + wx.request({ + data: util.json2Form({ + openid: openid, + state: "0" + }), + header: { + "Content-Type": "application/x-www-form-urlencoded" + }, + url: 'https://www.neumark.top/user/update_lecture_state', + method: "POST", + success: (res) => { + wx.showToast({ + title: '关闭人文邮件通知服务!', + icon: "none", + duration: 2000 + }) + } + }) + + }, + + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + console.log("这是百宝箱页面!") + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + + navigateToSchoolBus: function(){ + wx.navigateTo({ + url: '/pages/schoolbus/schoolbus' + }) + }, + navigateToCalendar: function(){ + wx.navigateTo({ + url: '/pages/calendar/calendar' + }) + }, + navigateToLibrary: function(){ + wx.navigateTo({ + url: '/pages/library/library' + }) + }, +}) \ No newline at end of file diff --git a/pages/function/function.json b/pages/function/function.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/function/function.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/function/function.wxml b/pages/function/function.wxml new file mode 100644 index 0000000..e961ff0 --- /dev/null +++ b/pages/function/function.wxml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/function/function.wxss b/pages/function/function.wxss new file mode 100644 index 0000000..0beb0ff --- /dev/null +++ b/pages/function/function.wxss @@ -0,0 +1 @@ +/* pages/function/function.wxss */ \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js new file mode 100644 index 0000000..02eeb8c --- /dev/null +++ b/pages/index/index.js @@ -0,0 +1,38 @@ +//index.js +//获取应用实例 +const app = getApp() + +Page({ + data: { + cardCur: 0, + swiperList: [{ + id: 0, + type: 'image', + url: 'http://www.neumark.top:8080/ucas0.jpg' + }, { + id: 1, + type: 'image', + url: 'http://www.neumark.top:8080/ucas1.jpg', + }, { + id: 2, + type: 'image', + url: 'http://www.neumark.top:8080/ucas2.jpg' + }, { + id: 3, + type: 'image', + url: 'http://www.neumark.top:8080/ucas3.jpg' + }, { + id: 4, + type: 'image', + url: 'http://www.neumark.top:8080/ucas4.jpg' + }, { + id: 5, + type: 'image', + url: 'http://www.neumark.top:8080/ucas5.jpg' + }, { + id: 6, + type: 'image', + url: 'http://www.neumark.top:8080/ucas6.jpg' + }], + } +}) diff --git a/pages/index/index.json b/pages/index/index.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/index/index.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml new file mode 100644 index 0000000..c092d82 --- /dev/null +++ b/pages/index/index.wxml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + 果壳儿是一款国科大校园生活小程序。 + 欢迎使用和提建议! + + + \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss new file mode 100644 index 0000000..dee8db1 --- /dev/null +++ b/pages/index/index.wxss @@ -0,0 +1,7 @@ +/**index.wxss**/ +Page{ + /* height: 100%; + display: flex; + flex-direction: row; + justify-content:center; */ +} \ No newline at end of file diff --git a/pages/lessoninfo/lessoninfo.js b/pages/lessoninfo/lessoninfo.js new file mode 100644 index 0000000..9f11614 --- /dev/null +++ b/pages/lessoninfo/lessoninfo.js @@ -0,0 +1,83 @@ +// pages/lessoninfo/lessoninfo.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + lesson: {}, + time:[] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + // console.log(JSON.parse(options.lesson)) + this.setData({ + lesson: JSON.parse(options.lesson) + }) + // console.log(options.lesson) + var _time = [] + for(var i = 0; i < this.data.lesson['time'].length; i++){ + var _t = {} + _t['time'] = this.data.lesson['time'][i]['上课时间'] + _t['week'] = this.data.lesson['time'][i]['上课周次'] + _t['place'] = this.data.lesson['time'][i]['上课地点'] + _time.push(_t) + } + + this.setData({ + time: _time + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/lessoninfo/lessoninfo.json b/pages/lessoninfo/lessoninfo.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/lessoninfo/lessoninfo.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/lessoninfo/lessoninfo.wxml b/pages/lessoninfo/lessoninfo.wxml new file mode 100644 index 0000000..f0a806e --- /dev/null +++ b/pages/lessoninfo/lessoninfo.wxml @@ -0,0 +1,13 @@ + + + + + + + + 上课时间: {{item.time}} + 上课周次: {{item.week}} + 上课地点: {{item.place}} + + + \ No newline at end of file diff --git a/pages/lessoninfo/lessoninfo.wxss b/pages/lessoninfo/lessoninfo.wxss new file mode 100644 index 0000000..5c1a72d --- /dev/null +++ b/pages/lessoninfo/lessoninfo.wxss @@ -0,0 +1 @@ +/* pages/lessoninfo/lessoninfo.wxss */ \ No newline at end of file diff --git a/pages/liblecture/liblecture.js b/pages/liblecture/liblecture.js new file mode 100644 index 0000000..c57a93b --- /dev/null +++ b/pages/liblecture/liblecture.js @@ -0,0 +1,85 @@ +// pages/liblecture/liblecture.js +var util = require("../../utils/util.js") +Page({ + + /** + * 页面的初始数据 + */ + + data: { + TabCur: 0, + scrollLeft:0, + list: [{"name":"未开始",index:0}, + {"name":"进行中",index:1}, + {"name":"已结束",index:2}], + lecturelist:[] + }, + tabSelect(e) { + // console.log(e.currentTarget.dataset) + this.setData({ + TabCur: e.currentTarget.dataset.id, + scrollLeft: (e.currentTarget.dataset.id-1)*60 + }) + console.log(this.data.list[this.data.TabCur].name) + }, + + + + + + + + + + + + + + + + + + + + + + /** + * 生命周期函数--监听页面加载 + */ + + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/liblecture/liblecture.json b/pages/liblecture/liblecture.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/liblecture/liblecture.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/liblecture/liblecture.wxml b/pages/liblecture/liblecture.wxml new file mode 100644 index 0000000..8e07b1b --- /dev/null +++ b/pages/liblecture/liblecture.wxml @@ -0,0 +1,7 @@ + + + + {{item.name}} + + + \ No newline at end of file diff --git a/pages/liblecture/liblecture.wxss b/pages/liblecture/liblecture.wxss new file mode 100644 index 0000000..e69de29 diff --git a/pages/library/library.js b/pages/library/library.js new file mode 100644 index 0000000..032b524 --- /dev/null +++ b/pages/library/library.js @@ -0,0 +1,182 @@ +// pages/library/library.js +var util = require("../../utils/util.js") +Page({ + + /** + * 页面的初始数据 + */ + data: { + booklist: [] + }, + + /** + * 生命周期函数--监听页面加载 + */ + + getBooks: function(){ + var ifbindlib = wx.getStorageSync("ifbindlibrary") + if(ifbindlib == ""){ + return + } + var openid = wx.getStorageSync("openid") + if(openid == ""){ + return + } + var that = this + wx.request({ + data: util.json2Form({ + openid: openid, + }), + header: { + "Content-Type": "application/x-www-form-urlencoded" + }, + url: 'https://www.neumark.top/library-user/query_borrowed_books', + method: "POST", + success: (res) => { + console.log(res.data) + that.setData({ + booklist: res.data + }) + } + }) + }, + + onLoad: function (options) { + this.getBooks() + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.getBooks() + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + + navigateToLecture: function(){ + var ifbind = wx.getStorageSync("ifbindlibrary") + if(ifbind == ""){ + wx.showToast({ + title: '请先登录!', + icon: "none", + duration: 2000 + }) + } + else{ + wx.navigateTo({ + url: '/pages/liblecture/liblecture', + }) + } + }, + + navigateToLogin: function(){ + var ifbind = wx.getStorageSync("ifbindlibrary") + if(ifbind == ""){ + wx.navigateTo({ + url: '/pages/librarylogin/librarylogin', + }) + } + else{ + wx.showToast({ + title: '已经绑定!', + icon: "none", + duration: 2000 + }) + } + }, + + quit:function(){ + var that = this + var ifbind = wx.getStorageSync("ifbindlibrary") + if(ifbind == ""){ + wx.showToast({ + title: '未登录!', + icon: "none", + duration: 2000 + }) + } + else{ + var openid = wx.getStorageSync("openid") + if(openid == ""){ + return + } + wx.request({ + data: util.json2Form({ + openid: openid + }), + header: { + "Content-Type": "application/x-www-form-urlencoded" + }, + url: 'https://www.neumark.top/library-user/logout', + method: "POST", + success: (res) => { + console.log(res.data) + if(res.data == 1){ + wx.removeStorage({ + key: 'ifbindlibrary', + success: function(res) { + wx.showToast({ + title: "解绑成功!", + icon: "none", + duration: 2000 + }) + that.setData({ + booklist: [] + }) + }, + }) + } + else if(0 == res.data){ + wx.showToast({ + title: "未登录!", + icon: "none", + duration: 2000 + }) + } + } + }) + } + } + +}) \ No newline at end of file diff --git a/pages/library/library.json b/pages/library/library.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/library/library.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/library/library.wxml b/pages/library/library.wxml new file mode 100644 index 0000000..9ddb938 --- /dev/null +++ b/pages/library/library.wxml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + 借书数量 + + + {{booklist[0]['book_count']}} + + + + + + + + + 书名: {{item.book_name}} + 出版年份: {{item.book_year}} + 应还日期: {{item.book_time}} + 作者: {{ item.book_author }} + + + + diff --git a/pages/library/library.wxss b/pages/library/library.wxss new file mode 100644 index 0000000..6afaec1 --- /dev/null +++ b/pages/library/library.wxss @@ -0,0 +1,5 @@ +/* pages/library/library.wxss */ +.scroll { + height: 3000px; + z-index: 101; +} \ No newline at end of file diff --git a/pages/librarylogin/librarylogin.js b/pages/librarylogin/librarylogin.js new file mode 100644 index 0000000..a2f3410 --- /dev/null +++ b/pages/librarylogin/librarylogin.js @@ -0,0 +1,122 @@ +// pages/librarylogin/librarylogin.js +var util = require("../../utils/util.js") +Page({ + + /** + * 页面的初始数据 + */ + data: { + password: '', + stuid: '' + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + stuidinput: function (event) { + this.setData({ stuid: event.detail }) + }, + + passwordinput: function (event) { + this.setData({ password: event.detail }) + }, + + login: function () { + var openid = wx.getStorageSync("openid") + if (openid == "" || this.data.stuid == "" || this.data.password == "") { + wx.showToast({ + title: '信息不完整!', + icon: "none", + duration: 2000 + }) + return + } + var msg + wx.request({ + data: util.json2Form({ + openid: openid, + username: this.data.stuid, + password: this.data.password + }), + header: { + "Content-Type": "application/x-www-form-urlencoded" + }, + url: 'https://www.neumark.top/library-user/login', + method: "POST", + success: (res) => { + if (res.data == "success") { + msg = "登录成功!" + + } else if (res.data == "error") { + msg = "登陆失败!" + } else { + msg = "未知错误!" + } + wx.showToast({ + title: msg, + icon: "none", + duration: 2000 + }) + if (msg == "登录成功!") { + wx.setStorageSync("ifbindlibrary", "yes") + wx.navigateBack({ + + }) + + } + } + }) + } +}) \ No newline at end of file diff --git a/pages/librarylogin/librarylogin.json b/pages/librarylogin/librarylogin.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/librarylogin/librarylogin.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/librarylogin/librarylogin.wxml b/pages/librarylogin/librarylogin.wxml new file mode 100644 index 0000000..4453a92 --- /dev/null +++ b/pages/librarylogin/librarylogin.wxml @@ -0,0 +1,27 @@ + + + + + + + + + 绑定图书馆账号 + + + diff --git a/pages/librarylogin/librarylogin.wxss b/pages/librarylogin/librarylogin.wxss new file mode 100644 index 0000000..44e18b8 --- /dev/null +++ b/pages/librarylogin/librarylogin.wxss @@ -0,0 +1 @@ +/* pages/librarylogin/librarylogin.wxss */ \ No newline at end of file diff --git a/pages/login/login.js b/pages/login/login.js new file mode 100644 index 0000000..85b030a --- /dev/null +++ b/pages/login/login.js @@ -0,0 +1,121 @@ +// pages/login/login.js +var util = require("../../utils/util.js") +Page({ + + /** + * 页面的初始数据 + */ + data: { + password: '', + mail: '' + }, + + mailinput: function (event) { + this.setData({ mail:event.detail }) + }, + + passwordinput: function (event) { + this.setData({ password:event.detail }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + login: function(){ + var openid = wx.getStorageSync("openid") + if(openid == "" || this.data.mail == "" || this.data.password == ""){ + wx.showToast({ + title: '信息不完整!', + icon: "none", + duration: 2000 + }) + return + } + var msg + wx.request({ + data: util.json2Form({ + openid: openid, + mail: this.data.mail, + password: this.data.password + }), + header: { + "Content-Type": "application/x-www-form-urlencoded" + }, + url: 'https://www.neumark.top/user/bind', + method: "POST", + success: (res) => { + if(res.data == true){ + msg = "登录成功!" + + }else if(res.data == false){ + msg = "登陆失败!" + }else{ + msg = "未知错误!" + } + wx.showToast({ + title: msg, + icon: "none", + duration: 2000 + }) + if(msg == "登录成功!"){ + wx.setStorageSync("ifbind", "yes") + wx.reLaunch({ + url: "/pages/index/index" + }) + } + } + }) + } +}) \ No newline at end of file diff --git a/pages/login/login.json b/pages/login/login.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/login/login.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/login/login.wxml b/pages/login/login.wxml new file mode 100644 index 0000000..100729c --- /dev/null +++ b/pages/login/login.wxml @@ -0,0 +1,27 @@ + + + + + + + + + 绑定邮箱 + + + \ No newline at end of file diff --git a/pages/login/login.wxss b/pages/login/login.wxss new file mode 100644 index 0000000..4827a66 --- /dev/null +++ b/pages/login/login.wxss @@ -0,0 +1 @@ +/* pages/login/login.wxss */ \ No newline at end of file diff --git a/pages/me/me.js b/pages/me/me.js new file mode 100644 index 0000000..7d91f83 --- /dev/null +++ b/pages/me/me.js @@ -0,0 +1,138 @@ +// pages/me/me.js +var util = require("../../utils/util.js") +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + navigateToLogin: function(){ + var ifbind = wx.getStorageSync("ifbind") + if(ifbind == ""){ + wx.navigateTo({ + url: '/pages/login/login', + }) + } + else{ + wx.showToast({ + title: '已经登录!', + icon: "none", + duration: 2000 + }) + } + + }, + navigateToAdvice: function () { + wx.navigateTo({ + url: '/pages/advice/advice', + }) + }, + quit:function(){ + var ifbind = wx.getStorageSync("ifbind") + if(ifbind == ""){ + wx.showToast({ + title: '未登录!', + icon: "none", + duration: 2000 + }) + } + else{ + var openid = wx.getStorageSync("openid") + if(openid == ""){ + return + } + wx.request({ + data: util.json2Form({ + openid: openid + }), + header: { + "Content-Type": "application/x-www-form-urlencoded" + }, + url: 'https://www.neumark.top/user/quit', + method: "POST", + success: (res) => { + console.log(res.data) + if(res.data == 1){ + wx.removeStorage({ + key: 'ifbind', + success: function(res) { + wx.showToast({ + title: "退出成功!", + icon: "none", + duration: 2000 + }) + }, + }) + } + else if(0 == res.data){ + wx.showToast({ + title: "未登录!", + icon: "none", + duration: 2000 + }) + } + } + }) + } + } + +}) \ No newline at end of file diff --git a/pages/me/me.json b/pages/me/me.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/me/me.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/me/me.wxml b/pages/me/me.wxml new file mode 100644 index 0000000..af3f8a2 --- /dev/null +++ b/pages/me/me.wxml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/me/me.wxss b/pages/me/me.wxss new file mode 100644 index 0000000..d31a0bf --- /dev/null +++ b/pages/me/me.wxss @@ -0,0 +1 @@ +/* pages/me/me.wxss */ \ No newline at end of file diff --git a/pages/schoolbus/schoolbus.js b/pages/schoolbus/schoolbus.js new file mode 100644 index 0000000..7aecb15 --- /dev/null +++ b/pages/schoolbus/schoolbus.js @@ -0,0 +1,73 @@ +// pages/schoolbus/schoolbus.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + preview:function(){ + wx.previewImage({ + current: "http://www.neumark.top:8080/schoolbus.jpg", // 当前显示图片的http链接 + urls: ["http://www.neumark.top:8080/schoolbus.jpg"] // 需要预览的图片http链接列表 + }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/schoolbus/schoolbus.json b/pages/schoolbus/schoolbus.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/schoolbus/schoolbus.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/schoolbus/schoolbus.wxml b/pages/schoolbus/schoolbus.wxml new file mode 100644 index 0000000..1389060 --- /dev/null +++ b/pages/schoolbus/schoolbus.wxml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pages/schoolbus/schoolbus.wxss b/pages/schoolbus/schoolbus.wxss new file mode 100644 index 0000000..e7ed29d --- /dev/null +++ b/pages/schoolbus/schoolbus.wxss @@ -0,0 +1,11 @@ +/* pages/schoolbus/schoolbus.wxss */ +.imagesize{ + display:flex; + height: 100%; + justify-content: center; + align-items:center; +} + +page{ + height:100% +} \ No newline at end of file diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..e1c43de --- /dev/null +++ b/project.config.json @@ -0,0 +1,54 @@ +{ + "description": "项目配置文件", + "packOptions": { + "ignore": [] + }, + "setting": { + "urlCheck": true, + "es6": true, + "postcss": true, + "minified": true, + "newFeature": true, + "coverView": true, + "autoAudits": false, + "checkInvalidKey": true, + "checkSiteMap": true, + "uploadWithSourceMap": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "nodeModules": true + }, + "compileType": "miniprogram", + "libVersion": "2.9.0", + "appid": "wx5b6d37536e9bbb25", + "projectname": "ucas", + "debugOptions": { + "hidedInDevtools": [] + }, + "isGameTourist": false, + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "qqappid": "1110006992", + "qqLibVersion": "1.8.0", + "condition": { + "search": { + "current": -1, + "list": [] + }, + "conversation": { + "current": -1, + "list": [] + }, + "game": { + "currentL": -1, + "list": [] + }, + "miniprogram": { + "current": -1, + "list": [] + } + } +} \ No newline at end of file diff --git a/sitemap.json b/sitemap.json new file mode 100644 index 0000000..ca02add --- /dev/null +++ b/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file diff --git a/utils/util.js b/utils/util.js new file mode 100644 index 0000000..f880482 --- /dev/null +++ b/utils/util.js @@ -0,0 +1,30 @@ +const formatTime = date => { + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDate() + const hour = date.getHours() + const minute = date.getMinutes() + const second = date.getSeconds() + + return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') +} + +const formatNumber = n => { + n = n.toString() + return n[1] ? n : '0' + n +} + +function json2Form(json) { + var str = []; + for (var p in json) { + str.push(encodeURIComponent(p) + "=" + encodeURIComponent(json[p])); + } + return str.join("&"); +} + + +module.exports = { + formatTime: formatTime, + json2Form:json2Form +} +