提交 6ca07400 编写于 作者: 5 520MianXiangDuiXiang520

🎉 first push code

上级 e4325023
"# WeBlog"
# WeBlog
博客的微信小程序端
![junblog](./junblog.jpg)
### power
* [towxml](https://github.com/sbfkcel/towxml)
* [wux-weapp](https://github.com/wux-weapp/wux-weapp)
//app.js
const Towxml = require('/towxml/main');
App({
onLaunch: function () {
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
// 获取用户信息
wx.getSetting({
success: res => {
if (res.authSetting['scope.userInfo']) {
// 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
wx.getUserInfo({
success: res => {
// 可以将 res 发送给后台解码出 unionId
this.globalData.userInfo = res.userInfo
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况
if (this.userInfoReadyCallback) {
this.userInfoReadyCallback(res)
}
}
})
}
}
})
},
towxml: new Towxml(),
globalData: {
userInfo: null
}
})
\ No newline at end of file
{
"pages": [
"pages/index/index",
"pages/logs/logs",
"pages/about/about",
"pages/friendlink/friendlink",
"pages/detail/detail",
"pages/tagarticle/tagarticle"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "JuneBao",
"navigationBarTextStyle": "black"
},
"sitemapLocation": "sitemap.json",
"tabBar": {
"backgroundColor": "#f0f4f6",
"selectedColor": "77c0f7",
"list": [
{
"color": "#09bb07",
"pagePath": "pages/index/index",
"text": "博客",
"iconPath": "static/image/icon/blog.png",
"selectedIconPath": "static/image/icon/blog_c.png"
},
{
"color": "#09bb07",
"pagePath": "pages/friendlink/friendlink",
"text": "标签",
"iconPath": "static/image/icon/tagso.png",
"selectedIconPath": "static/image/icon/tagso_c.png"
},
{
"pagePath": "pages/about/about",
"text": "关于",
"iconPath": "static/image/icon/About.png",
"selectedIconPath": "static/image/icon/About_c.png"
}
]
}
}
\ No newline at end of file
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent"));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(0,_baseComponent.default)({relations:{"../accordion/index":{type:"child",observer:function(){this.debounce(this.updated)}}},properties:{prefixCls:{type:String,value:"wux-accordion-group"},cellGroupPrefixCls:{type:String,value:"wux-cell-group"},defaultCurrent:{type:Array,value:[]},current:{type:Array,value:[],observer:function(t){this.data.controlled&&this.updated(t)}},controlled:{type:Boolean,value:!1},accordion:{type:Boolean,value:!1},title:{type:String,value:""},label:{type:String,value:""}},data:{activeKey:"",keys:[]},methods:{updated:function(t){var e=0<arguments.length&&void 0!==t?t:this.data.activeKey;this.data.activeKey!==e&&this.setData({activeKey:e}),this.changeCurrent(e)},changeCurrent:function(n){var i=this,t=this.getRelationNodes("../accordion/index");0<t.length&&t.forEach(function(t,e){var r=t.data.key||String(e),a=i.data.accordion?n[0]===r:-1!==n.indexOf(r);t.changeCurrent(a,r)}),this.data.keys.length!==t.length&&this.setData({keys:t.map(function(t){return t.data})})},emitEvent:function(t){this.triggerEvent("change",{key:t,keys:this.data.keys})},setActiveKey:function(t){this.data.controlled||this.updated(t),this.emitEvent(this.data.accordion?t[0]:t)},onClickItem:function(e){var t=_toConsumableArray(this.data.activeKey);t=this.data.accordion?t[0]===e?[]:[e]:-1!==t.indexOf(e)?t.filter(function(t){return t!==e}):[].concat(_toConsumableArray(t),[e]),this.setActiveKey(t)}},ready:function(){var t=this.data,e=t.defaultCurrent,r=t.current,a=t.controlled?r:e;this.updated(a)}});
\ No newline at end of file
{
"component": true,
"usingComponents": {
"wux-cell-group": "../cell-group/index"
}
}
\ No newline at end of file
<wux-cell-group wux-class="{{ prefixCls }}" prefixCls="{{ cellGroupPrefixCls }}" title="{{ title }}" label="{{ label }}">
<slot></slot>
</wux-cell-group>
.wux-accordion-group{position:relative;border:none}
\ No newline at end of file
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/classNames"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(0,_baseComponent.default)({relations:{"../accordion-group/index":{type:"parent"}},properties:{prefixCls:{type:String,value:"wux-accordion"},key:{type:String,value:""},thumb:{type:String,value:""},title:{type:String,value:""},content:{type:String,value:""},disabled:{type:Boolean,value:!1},showArrow:{type:Boolean,value:!0}},data:{current:!1,index:"0"},computed:{classes:["prefixCls, current, disabled",function(e,t,n){var r;return{wrap:(0,_classNames2.default)(e,(_defineProperty(r={},"".concat(e,"--current"),t),_defineProperty(r,"".concat(e,"--disabled"),n),r)),hd:"".concat(e,"__hd"),thumb:"".concat(e,"__thumb"),title:"".concat(e,"__title"),arrow:"".concat(e,"__arrow"),bd:"".concat(e,"__bd"),content:"".concat(e,"__content")}}]},methods:{changeCurrent:function(e,t){this.setData({current:e,index:t})},onTap:function(){var e=this.data,t=e.index,n=e.disabled,r=this.getRelationNodes("../accordion-group/index")[0];!n&&r&&r.onClickItem(t)}}});
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="wux-class {{ classes.wrap }}">
<view class="{{ classes.hd }}" bindtap="onTap">
<block wx:if="{{ thumb }}">
<image class="{{ classes.thumb }}" src="{{ thumb }}" />
</block>
<block wx:if="{{ title }}">
<view class="{{ classes.title }}">{{ title }}</view>
</block>
<block wx:else>
<slot name="header"></slot>
</block>
<view class="{{ classes.arrow }}" wx:if="{{ showArrow }}"></view>
</view>
<view class="{{ classes.bd }}">
<view class="{{ classes.content }}" wx:if="{{ content }}">{{ content }}</view>
<slot></slot>
</view>
</view>
.wux-accordion__hd{position:relative;padding:20rpx 30rpx;color:#000;background-color:#fff;box-sizing:border-box;padding-right:60rpx;width:auto;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.wux-accordion__hd::after{content:" ";position:absolute;bottom:0;right:0;height:1PX;border-bottom:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 100%;transform:scaleY(.5);left:0}.wux-accordion__thumb{width:40rpx;height:40rpx;display:block;margin-right:10rpx}.wux-accordion__arrow{display:inline-block;width:30rpx;height:30rpx;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2226%22%20viewBox%3D%220%200%2016%2026%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2%200L0%202l11.5%2011L0%2024l2%202%2014-13z%22%20fill%3D%22%23c7c7cc%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E");background-size:contain;background-repeat:no-repeat;background-position:50% 50%;transform:rotate(90deg);transition:transform .2s ease;position:absolute;display:block;top:30rpx;right:30rpx}.wux-accordion--current>.wux-accordion__hd>.wux-accordion__arrow{transform:rotate(270deg)}.wux-accordion__bd{display:none;overflow:hidden;background:#fff;font-size:30rpx;color:rgba(0,0,0,.85);position:relative;padding:30rpx}.wux-accordion__bd::after{content:" ";position:absolute;bottom:0;right:0;height:1PX;border-bottom:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 100%;transform:scaleY(.5);left:0}.wux-accordion--current>.wux-accordion__bd{display:block}
\ No newline at end of file
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames7=_interopRequireDefault(require("../helpers/classNames"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(n,!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var defaults={prefixCls:"wux-actionsheet",theme:"ios",className:"",titleText:"",buttons:[],buttonClicked:function(){},cancelText:"取消",cancel:function(){}};(0,_baseComponent.default)({useFunc:!0,data:defaults,computed:{classes:["prefixCls, theme, buttons, cancelText",function(n,e,t,r){var o,c=(0,_classNames7.default)(n),a="".concat(n,"__popup"),s=(0,_classNames7.default)("".concat(n,"__content"),(_defineProperty(o={},"".concat(n,"__content--theme-").concat(e),e),_defineProperty(o,"".concat(n,"__content--has-cancel"),r),o)),i=(0,_classNames7.default)("".concat(n,"__group"),_defineProperty({},"".concat(n,"__group--options"),!0)),u="".concat(n,"__title"),d=(0,_classNames7.default)("".concat(n,"__button"),_defineProperty({},"".concat(n,"__button--destructive"),!0));return{wrap:c,popup:a,content:s,options:i,title:u,button:t.map(function(e){var t;return{wrap:(0,_classNames7.default)("".concat(n,"__button"),(_defineProperty(t={},"".concat(n,"__button--option"),!0),_defineProperty(t,"".concat(n,"__button--disabled"),e.disabled),_defineProperty(t,"".concat(e.className),e.className),t)),hover:e.hoverClass&&"default"!==e.hoverClass?e.hoverClass:"".concat(n,"__button--hover")}}),icon:"".concat(n,"__icon"),text:"".concat(n,"__text"),destructive:d,group:(0,_classNames7.default)("".concat(n,"__group"),_defineProperty({},"".concat(n,"__group--cancel"),!0)),cancel:(0,_classNames7.default)("".concat(n,"__button"),_defineProperty({},"".concat(n,"__button--cancel"),!0)),hover:"".concat(n,"__button--hover")}}]},methods:{showSheet:function(e){var t=0<arguments.length&&void 0!==e?e:{},n=this.$$mergeOptionsAndBindMethods(Object.assign({},defaults,t));return this.removed=!1,this.$$setData(_objectSpread({in:!0},n)),this.cancel.bind(this)},removeSheet:function(e){if(this.removed)return!1;this.removed=!0,this.$$setData({in:!1}),"function"==typeof e&&e(this.data.buttons)},buttonClicked:function(e){var t=e.currentTarget.dataset.index;!0===this.fns.buttonClicked(t,this.data.buttons[t])&&this.removeSheet()},destructiveButtonClicked:function(){!0===this.fns.destructiveButtonClicked()&&this.removeSheet()},cancel:function(){this.removeSheet(this.fns.cancel)},bindgetuserinfo:function(e){this.triggerEvent("getuserinfo",_objectSpread({},e.detail,{},e.currentTarget.dataset))},bindcontact:function(e){this.triggerEvent("contact",_objectSpread({},e.detail,{},e.currentTarget.dataset))},bindgetphonenumber:function(e){this.triggerEvent("getphonenumber",_objectSpread({},e.detail,{},e.currentTarget.dataset))},bindopensetting:function(e){this.triggerEvent("opensetting",_objectSpread({},e.detail,{},e.currentTarget.dataset))},onError:function(e){this.triggerEvent("error",_objectSpread({},e.detail,{},e.currentTarget.dataset))}}});
\ No newline at end of file
{
"component": true,
"usingComponents": {
"wux-popup": "../popup/index"
}
}
<wux-popup wux-content-class="{{ theme === 'ios' ? classes.popup : '' }}" position="bottom" visible="{{ in }}" safeArea="bottom" bind:close="cancel">
<view class="wux-class {{ classes.wrap }}">
<view class="{{ classes.content }}">
<view class="{{ classes.options }}">
<view class="{{ classes.title }}" wx:if="{{ titleText }}">{{ titleText }}</view>
<block wx:for="{{ buttons }}" wx:for-item="button" wx:key="index">
<button
class="{{ classes.button[index].wrap }}"
data-index="{{ index }}"
disabled="{{ button.disabled }}"
open-type="{{ button.openType }}"
hover-class="{{ !button.disabled ? classes.button[index].hover : 'none' }}"
hover-stop-propagation="{{ button.hoverStopPropagation }}"
hover-start-time="{{ button.hoverStartTime }}"
hover-stay-time="{{ button.hoverStayTime }}"
lang="{{ button.lang }}"
bindgetuserinfo="bindgetuserinfo"
session-from="{{ button.sessionFrom }}"
send-message-title="{{ button.sendMessageTitle }}"
send-message-path="{{ button.sendMessagePath }}"
send-message-img="{{ button.sendMessageImg }}"
show-message-card="{{ button.showMessageCard }}"
bindcontact="bindcontact"
bindgetphonenumber="bindgetphonenumber"
app-parameter="{{ button.appParameter }}"
binderror="onError"
bindopensetting="bindopensetting"
catchtap="buttonClicked"
>
<image class="{{ classes.icon }}" src="{{ button.icon }}" wx:if="{{ button.icon }}" />
<text class="{{ classes.text }}">{{ button.text }}</text>
</button>
</block>
<button class="{{ classes.destructive }}" wx:if="{{ destructiveText }}" catchtap="destructiveButtonClicked">{{ destructiveText }}</button>
</view>
<view class="{{ classes.group }}" wx:if="{{ cancelText }}">
<button class="{{ classes.cancel }}" hover-class="{{ classes.hover }}" catchtap="cancel">{{ cancelText }}</button>
</view>
</view>
</view>
</wux-popup>
.wux-actionsheet__popup{background-color:transparent}.wux-actionsheet__content{margin-left:16rpx;margin-right:16rpx;width:auto;overflow:hidden}.wux-actionsheet__content--theme-wx{margin-left:0;margin-right:0;margin-bottom:0}.wux-actionsheet__content--theme-wx .wux-actionsheet__group{border-radius:0;margin-bottom:12rpx}.wux-actionsheet__content--theme-wx .wux-actionsheet__group--options{background-color:#fff}.wux-actionsheet__content--theme-wx .wux-actionsheet__group--cancel{margin-bottom:0}.wux-actionsheet__content--theme-wx .wux-actionsheet__button{font-size:36rpx;color:#000}.wux-actionsheet__content--theme-wx .wux-actionsheet__button--cancel{font-weight:400}.wux-actionsheet__content--theme-wx.wux-actionsheet__content--has-cancel{background-color:#efeff4}.wux-actionsheet__group{margin-bottom:16rpx;border-radius:8rpx;background-color:#fff;overflow:hidden}.wux-actionsheet__group--options{background-color:#f1f2f3}.wux-actionsheet__title{padding:32rpx;color:#8f8f8f;text-align:center;font-size:26rpx}.wux-actionsheet__button{position:relative;display:block;margin:0;padding:0;min-width:104rpx;min-height:96rpx;vertical-align:top;text-align:center;text-overflow:ellipsis;cursor:pointer;width:100%;border-radius:0;background-color:transparent;color:#007aff;font-size:42rpx;line-height:96rpx;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.wux-actionsheet__button--hover{box-shadow:none;border-color:#d1d3d6;color:#007aff;background:#e4e5e7}.wux-actionsheet__button--destructive{color:#ff3b30!important}.wux-actionsheet__button--cancel{font-weight:500}.wux-actionsheet__button--disabled{opacity:.3!important}.wux-actionsheet__group .wux-actionsheet__button{border-top:none}.wux-actionsheet__group .wux-actionsheet__button::after{transform:none;transform-origin:none;border:none;border-radius:0;content:" ";position:absolute;left:0;top:0;right:0;height:1PX;border-top:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 0;transform:scaleY(.5)}.wux-actionsheet__group .wux-actionsheet__button:first-child:last-child::after{border-width:0}.wux-actionsheet__icon{width:48rpx;height:48rpx;display:inline-block;margin-right:20rpx}
\ No newline at end of file
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/classNames"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}(0,_baseComponent.default)({properties:{prefixCls:{type:String,value:"wux-alert"},classNames:{type:null,value:"wux-animate--fadeIn"},theme:{type:String,value:"balanced"},thumb:{type:String,value:""},title:{type:String,value:""},label:{type:String,value:""},closable:{type:Boolean,value:!1}},data:{visible:!0},computed:{classes:["prefixCls, theme",function(e,t){return{wrap:(0,_classNames2.default)(e,_defineProperty({},"".concat(e,"--").concat(t),t)),hd:"".concat(e,"__hd"),thumb:"".concat(e,"__thumb"),bd:"".concat(e,"__bd"),text:"".concat(e,"__text"),desc:"".concat(e,"__desc"),ft:"".concat(e,"__ft"),closable:"".concat(e,"__closable")}}]},methods:{onClose:function(){this.data.closable&&this.setData({visible:!1}),this.triggerEvent("click")},onClick:function(){this.triggerEvent("click")}}});
\ No newline at end of file
{
"component": true,
"usingComponents": {
"wux-animation-group": "../animation-group/index"
}
}
\ No newline at end of file
<wux-animation-group in="{{ visible }}" classNames="{{ classNames }}">
<view class="wux-class {{ classes.wrap }}" bindtap="onClick">
<view class="{{ classes.hd }}">
<block wx:if="{{ thumb }}">
<image class="{{ classes.thumb }}" src="{{ thumb }}" />
</block>
<block wx:else>
<slot name="header"></slot>
</block>
</view>
<view class="{{ classes.bd }}">
<view wx:if="{{ title }}" class="{{ classes.text }}">{{ title }}</view>
<view wx:if="{{ label }}" class="{{ classes.desc }}">{{ label }}</view>
<slot></slot>
</view>
<view class="{{ classes.ft }}">
<block wx:if="{{ closable }}">
<view class="{{ classes.closable }}" catchtap="onClose">×</view>
</block>
<block wx:else>
<slot name="footer"></slot>
</block>
</view>
</view>
</wux-animation-group>
\ No newline at end of file
.wux-alert{padding:20rpx 30rpx;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:4rpx;font-size:28rpx}.wux-alert__thumb{width:40rpx;height:40rpx;display:block;margin-right:10rpx}.wux-alert__bd{-ms-flex:1;flex:1}.wux-alert__text{text-align:left}.wux-alert__desc{text-align:left;line-height:1.2;font-size:24rpx}.wux-alert--light{color:#fff;background-color:#ddd}.wux-alert--stable{color:#fff;background-color:#b2b2b2}.wux-alert--positive{color:#fff;background-color:#387ef5}.wux-alert--calm{color:#fff;background-color:#11c1f3}.wux-alert--assertive{color:#fff;background-color:#ef473a}.wux-alert--balanced{color:#fff;background-color:#33cd5f}.wux-alert--energized{color:#fff;background-color:#ffc900}.wux-alert--royal{color:#fff;background-color:#886aea}.wux-alert--dark{color:#fff;background-color:#444}
\ No newline at end of file
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_styleToCssString=_interopRequireDefault(require("../helpers/styleToCssString"));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ENTER="enter",ENTERING="entering",ENTERED="entered",EXIT="exit",EXITING="exiting",EXITED="exited",UNMOUNTED="unmounted",TRANSITION="transition",ANIMATION="animation",TIMEOUT=1e3/60,defaultClassNames={enter:"",enterActive:"",enterDone:"",exit:"",exitActive:"",exitDone:""};(0,_baseComponent.default)({properties:{in:{type:Boolean,value:!1,observer:function(t){this.data.isMounting&&this.updated(t)}},classNames:{type:null,value:defaultClassNames},duration:{type:null,value:null},type:{type:String,value:TRANSITION},appear:{type:Boolean,value:!1},enter:{type:Boolean,value:!0},exit:{type:Boolean,value:!0},mountOnEnter:{type:Boolean,value:!0},unmountOnExit:{type:Boolean,value:!0},wrapCls:{type:String,value:""},wrapStyle:{type:[String,Object],value:"",observer:function(t){this.setData({extStyle:(0,_styleToCssString.default)(t)})}},disableScroll:{type:Boolean,value:!1}},data:{animateCss:"",animateStatus:EXITED,isMounting:!1,extStyle:""},methods:{addEventListener:function(){var t=this.data.animateStatus,e=this.getTimeouts(),a=e.enter,n=e.exit;t===ENTERING&&!a&&this.data.enter&&this.performEntered(),t===EXITING&&!n&&this.data.exit&&this.performExited()},onTransitionEnd:function(){this.data.type===TRANSITION&&this.addEventListener()},onAnimationEnd:function(){this.data.type===ANIMATION&&this.addEventListener()},updateStatus:function(t,e){var a=1<arguments.length&&void 0!==e&&e;null!==t&&(this.cancelNextCallback(),this.isAppearing=a,t===ENTERING?this.performEnter():this.performExit())},performEnter:function(){var t=this,e=this.getClassNames(ENTER),a=e.className,n=e.activeClassName,i=this.getTimeouts().enter,s={animateStatus:ENTER,animateCss:a},r={animateStatus:ENTERING,animateCss:"".concat(a," ").concat(n)};if(!this.isAppearing&&!this.data.enter)return this.performEntered();this.safeSetData(s,function(){t.triggerEvent("change",{animateStatus:ENTER}),t.triggerEvent(ENTER,{isAppearing:t.isAppearing}),t.delayHandler(TIMEOUT,function(){t.safeSetData(r,function(){t.triggerEvent("change",{animateStatus:ENTERING}),t.triggerEvent(ENTERING,{isAppearing:t.isAppearing}),i&&t.delayHandler(i,t.performEntered)})})})},performEntered:function(){var t=this,e=this.getClassNames(ENTER).doneClassName,a={animateStatus:ENTERED,animateCss:e};this.safeSetData(a,function(){t.triggerEvent("change",{animateStatus:ENTERED}),t.triggerEvent(ENTERED,{isAppearing:t.isAppearing})})},performExit:function(){var t=this,e=this.getClassNames(EXIT),a=e.className,n=e.activeClassName,i=this.getTimeouts().exit,s={animateStatus:EXIT,animateCss:a},r={animateStatus:EXITING,animateCss:"".concat(a," ").concat(n)};if(!this.data.exit)return this.performExited();this.safeSetData(s,function(){t.triggerEvent("change",{animateStatus:EXIT}),t.triggerEvent(EXIT),t.delayHandler(TIMEOUT,function(){t.safeSetData(r,function(){t.triggerEvent("change",{animateStatus:EXITING}),t.triggerEvent(EXITING),i&&t.delayHandler(i,t.performExited)})})})},performExited:function(){var t=this,e=this.getClassNames(EXIT).doneClassName,a={animateStatus:EXITED,animateCss:e};this.safeSetData(a,function(){t.triggerEvent("change",{animateStatus:EXITED}),t.triggerEvent(EXITED),t.data.unmountOnExit&&t.setData({animateStatus:UNMOUNTED},function(){t.triggerEvent("change",{animateStatus:UNMOUNTED})})})},getClassNames:function(t){var e=this.data.classNames;return{className:"string"!=typeof e?e[t]:"".concat(e,"-").concat(t),activeClassName:"string"!=typeof e?e["".concat(t,"Active")]:"".concat(e,"-").concat(t,"-active"),doneClassName:"string"!=typeof e?e["".concat(t,"Done")]:"".concat(e,"-").concat(t,"-done")}},getTimeouts:function(){var t=this.data.duration;return null!==t&&"object"===_typeof(t)?{enter:t.enter,exit:t.exit}:"number"==typeof t?{enter:t,exit:t}:{}},updated:function(t){var e=this,a=(this.pendingData||this.data).animateStatus,n=null;t?(a===UNMOUNTED&&(a=EXITED,this.setData({animateStatus:EXITED},function(){e.triggerEvent("change",{animateStatus:EXITED})})),a!==ENTER&&a!==ENTERING&&a!==ENTERED&&(n=ENTERING)):a!==ENTER&&a!==ENTERING&&a!==ENTERED||(n=EXITING),this.updateStatus(n)},delayHandler:function(t,e){t&&(this.setNextCallback(e),setTimeout(this.nextCallback,t))},onTap:function(){this.triggerEvent("click")},noop:function(){}},attached:function(){var t=this,e=null,a=null;this.data.in?this.data.appear?(e=EXITED,a=ENTERING):e=ENTERED:e=this.data.unmountOnExit||this.data.mountOnEnter?UNMOUNTED:EXITED,this.safeSetData({animateStatus:e,isMounting:!0},function(){t.triggerEvent("change",{animateStatus:e}),t.updateStatus(a,!0)})}});
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="wux-class {{ wrapCls }} {{ animateCss }}" bindtap="onTap" catchtouchmove="{{ disableScroll ? 'noop' : '' }}" bindtransitionend="onTransitionEnd" bindanimationend="onAnimationEnd" wx:if="{{ animateStatus !== 'unmounted' }}" style="{{ extStyle }}">
<slot></slot>
</view>
.wux-animate--fadeIn-enter{transition:opacity .3s;opacity:0}.wux-animate--fadeIn-enter-active,.wux-animate--fadeIn-enter-done{opacity:1}.wux-animate--fadeIn-exit{transition:opacity .3s;opacity:1}.wux-animate--fadeIn-exit-active,.wux-animate--fadeIn-exit-done{opacity:0}.wux-animate--fadeInDown-enter{transition:opacity .3s,transform .3s;opacity:0;transform:translate3d(0,-100%,0)}.wux-animate--fadeInDown-enter-active,.wux-animate--fadeInDown-enter-done{opacity:1;transform:none}.wux-animate--fadeInDown-exit{transition:opacity .3s,transform .3s;opacity:1;transform:none}.wux-animate--fadeInDown-exit-active,.wux-animate--fadeInDown-exit-done{opacity:0;transform:translate3d(0,-100%,0)}.wux-animate--fadeInLeft-enter{transition:opacity .3s,transform .3s;opacity:0;transform:translate3d(-100%,0,0)}.wux-animate--fadeInLeft-enter-active,.wux-animate--fadeInLeft-enter-done{opacity:1;transform:none}.wux-animate--fadeInLeft-exit{transition:opacity .3s,transform .3s;opacity:1;transform:none}.wux-animate--fadeInLeft-exit-active,.wux-animate--fadeInLeft-exit-done{opacity:0;transform:translate3d(-100%,0,0)}.wux-animate--fadeInRight-enter{transition:opacity .3s,transform .3s;opacity:0;transform:translate3d(100%,0,0)}.wux-animate--fadeInRight-enter-active,.wux-animate--fadeInRight-enter-done{opacity:1;transform:none}.wux-animate--fadeInRight-exit{transition:opacity .3s,transform .3s;opacity:1;transform:none}.wux-animate--fadeInRight-exit-active,.wux-animate--fadeInRight-exit-done{opacity:0;transform:translate3d(100%,0,0)}.wux-animate--fadeInUp-enter{transition:opacity .3s,transform .3s;opacity:0;transform:translate3d(0,100%,0)}.wux-animate--fadeInUp-enter-active,.wux-animate--fadeInUp-enter-done{opacity:1;transform:none}.wux-animate--fadeInUp-exit{transition:opacity .3s,transform .3s;opacity:1;transform:none}.wux-animate--fadeInUp-exit-active,.wux-animate--fadeInUp-exit-done{opacity:0;transform:translate3d(0,100%,0)}.wux-animate--slideInUp-enter{transition:transform .3s;transform:translate3d(0,100%,0);visibility:visible}.wux-animate--slideInUp-enter-active,.wux-animate--slideInUp-enter-done{transform:translateZ(0)}.wux-animate--slideInUp-exit{transition:transform .3s;transform:translateZ(0)}.wux-animate--slideInUp-exit-active,.wux-animate--slideInUp-exit-done{transform:translate3d(0,100%,0);visibility:visible}.wux-animate--slideInDown-enter{transition:transform .3s;transform:translate3d(0,-100%,0);visibility:visible}.wux-animate--slideInDown-enter-active,.wux-animate--slideInDown-enter-done{transform:translateZ(0)}.wux-animate--slideInDown-exit{transition:transform .3s;transform:translateZ(0)}.wux-animate--slideInDown-exit-active,.wux-animate--slideInDown-exit-done{transform:translate3d(0,-100%,0);visibility:visible}.wux-animate--slideInLeft-enter{transition:transform .3s;transform:translate3d(-100%,0,0);visibility:visible}.wux-animate--slideInLeft-enter-active,.wux-animate--slideInLeft-enter-done{transform:translateZ(0)}.wux-animate--slideInLeft-exit{transition:transform .3s;transform:translateZ(0)}.wux-animate--slideInLeft-exit-active,.wux-animate--slideInLeft-exit-done{transform:translate3d(-100%,0,0);visibility:visible}.wux-animate--slideInRight-enter{transition:transform .3s;transform:translate3d(100%,0,0);visibility:visible}.wux-animate--slideInRight-enter-active,.wux-animate--slideInRight-enter-done{transform:none}.wux-animate--slideInRight-exit{transition:transform .3s;transform:none}.wux-animate--slideInRight-exit-active,.wux-animate--slideInRight-exit-done{transform:translate3d(100%,0,0);visibility:visible}.wux-animate--zoom-enter{transition:all .3s cubic-bezier(.215,.61,.355,1);opacity:.01;transform:scale(.75)}.wux-animate--zoom-enter-active,.wux-animate--zoom-enter-done{opacity:1;transform:none}.wux-animate--zoom-exit{transition:all .25s linear;transform:none}.wux-animate--zoom-exit-active,.wux-animate--zoom-exit-done{opacity:.01;transform:scale(.75)}.wux-animate--punch-enter{transition:all .3s cubic-bezier(.215,.61,.355,1);opacity:.01;transform:scale(1.35)}.wux-animate--punch-enter-active,.wux-animate--punch-enter-done{opacity:1;transform:none}.wux-animate--punch-exit{transition:all .25s linear;transform:none}.wux-animate--punch-exit-active,.wux-animate--punch-exit-done{opacity:.01;transform:scale(1.35)}
\ No newline at end of file
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/classNames")),_styleToCssString=_interopRequireDefault(require("../helpers/styleToCssString"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(e,t){var r=[],n=!0,a=!1,i=void 0;try{for(var l,o=e[Symbol.iterator]();!(n=(l=o.next()).done)&&(r.push(l.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==o.return||o.return()}finally{if(a)throw i}}return r}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(0,_baseComponent.default)({properties:{prefixCls:{type:String,value:"wux-avatar"},shape:{type:String,value:"circle"},size:{type:String,value:"default"},src:{type:String,value:""},bodyStyle:{type:[String,Object],value:"",observer:function(e){this.setData({extStyle:(0,_styleToCssString.default)(e)})}},scale:{type:Boolean,value:!1}},data:{extStyle:"",childrenStyle:""},computed:{classes:["prefixCls, shape, size, src",function(e,t,r,n){var a;return{wrap:(0,_classNames2.default)(e,(_defineProperty(a={},"".concat(e,"--").concat(t),t),_defineProperty(a,"".concat(e,"--").concat(r),r),_defineProperty(a,"".concat(e,"--thumb"),n),a)),string:"".concat(e,"__string")}}]},methods:{setScale:function(){var l=this,e=this.data.prefixCls,t=wx.createSelectorQuery().in(this);t.select(".".concat(e)).boundingClientRect(),t.select(".".concat(e,"__string")).boundingClientRect(),t.exec(function(e){if(!e.filter(function(e){return!e}).length){var t=_slicedToArray(e,2),r=t[0],n=t[1],a=r.width-8<n.width?(r.width-8)/n.width:1,i=1!=a?"position: absolute; display: inline-block; transform: scale(".concat(a,"); left: calc(50% - ").concat(Math.round(n.width/2),"px)"):"";l.setData({childrenStyle:i})}})}},ready:function(){!this.data.src&&this.data.scale&&this.setScale()}});
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="wux-class {{ classes.wrap }}" style="{{ extStyle }}">
<image src="{{ src }}" wx:if="{{ src }}" />
<text class="{{ classes.string }}" style="{{ childrenStyle }}" wx:else>
<slot></slot>
</text>
</view>
.wux-avatar{box-sizing:border-box;display:inline-block;text-align:center;background:#ccc;color:#fff;white-space:nowrap;position:relative;overflow:hidden;vertical-align:middle;width:64rpx;height:64rpx;line-height:64rpx;border-radius:32rpx;font-size:36rpx}.wux-avatar .wux-avatar__string{line-height:64rpx}.wux-avatar--small{width:48rpx;height:48rpx;line-height:48rpx;border-radius:24rpx;font-size:28rpx}.wux-avatar--small .wux-avatar__string{line-height:48rpx}.wux-avatar--large{width:80rpx;height:80rpx;line-height:80rpx;border-radius:40rpx;font-size:48rpx}.wux-avatar--large .wux-avatar__string{line-height:80rpx}.wux-avatar--square{border-radius:8rpx}.wux-avatar--thumb{background:0 0}.wux-avatar>image{width:100%;height:100%}
\ No newline at end of file
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(0,_baseComponent.default)({properties:{prefixCls:{type:String,value:"wux-backdrop"},transparent:{type:Boolean,value:!1},zIndex:{type:Number,value:1e3},classNames:{type:null,value:"wux-animate--fadeIn"}},computed:{classes:["prefixCls, transparent",function(e,t){return{wrap:t?"".concat(e,"--transparent"):e}}]},methods:{retain:function(){"number"==typeof this.backdropHolds&&this.backdropHolds||(this.backdropHolds=0),this.backdropHolds=this.backdropHolds+1,1===this.backdropHolds&&this.setData({in:!0})},release:function(){1===this.backdropHolds&&this.setData({in:!1}),this.backdropHolds=Math.max(0,this.backdropHolds-1)},onClick:function(){this.triggerEvent("click")}}});
\ No newline at end of file
{
"component": true,
"usingComponents": {
"wux-animation-group": "../animation-group/index"
}
}
\ No newline at end of file
<wux-animation-group wux-class="{{ classes.wrap }}" in="{{ in }}" classNames="{{ classNames }}" bind:click="onClick" wrapStyle="{{ { zIndex } }}" disableScroll />
.wux-backdrop{background:rgba(0,0,0,.4)}.wux-backdrop,.wux-backdrop--transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}.wux-backdrop--transparent{background:0 0}
\ No newline at end of file
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/classNames"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}(0,_baseComponent.default)({externalClasses:["wux-class-badge"],properties:{prefixCls:{type:String,value:"wux-badge"},count:{type:Number,value:0,observer:"updated"},overflowCount:{type:Number,value:99},dot:{type:Boolean,value:!1},showZero:{type:Boolean,value:!1},status:{type:String,value:""},text:{type:String,value:""}},data:{finalCount:0},computed:{classes:["prefixCls, status",function(e,t){return{wrap:(0,_classNames2.default)(e),status:"".concat(e,"__status"),statusDot:(0,_classNames2.default)("".concat(e,"__status-dot"),_defineProperty({},"".concat(e,"__status-dot--").concat(t),t)),statusText:"".concat(e,"__status-text"),dot:"".concat(e,"__dot"),count:"".concat(e,"__count")}}]},methods:{updated:function(e){var t=0<arguments.length&&void 0!==e?e:this.data.count,a=this.data.overflowCount,s=a<=t?"".concat(a,"+"):t;this.setData({finalCount:s})}}});
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="wux-class {{ classes.wrap }}">
<slot></slot>
<view class="{{ classes.status }}" wx:if="{{ status }}">
<view class="{{ classes.statusDot }}"></view>
<view class="{{ classes.statusText }}" wx:if="{{ text }}">{{ text }}</view>
</view>
<view class="{{ classes.dot }}" wx:elif="{{ dot }}"></view>
<view class="{{ classes.count }} wux-class-badge" wx:elif="{{ showZero && count === 0 }}">{{ finalCount }}</view>
<view class="{{ classes.count }} wux-class-badge" wx:elif="{{ count !== 0 }}">{{ finalCount }}</view>
</view>
\ No newline at end of file
.wux-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.wux-badge__count{position:absolute;transform:translateX(50%);top:-12rpx;right:0;height:36rpx;border-radius:18rpx;min-width:36rpx;background:#ed3f14;color:#fff;line-height:36rpx;text-align:center;padding:0 10rpx;font-size:24rpx;white-space:nowrap;transform-origin:-10% center;z-index:10;box-shadow:0 0 0 2rpx #fff;box-sizing:border-box;text-rendering:optimizeLegibility}.wux-badge__dot{width:16rpx;height:16rpx;position:absolute;transform:translateX(-50%);transform-origin:0 center;top:-8rpx;right:-16rpx;border-radius:100%;background:#ed3f14;z-index:10;box-shadow:0 0 0 2rpx #fff}.wux-badge__status{line-height:inherit;vertical-align:baseline}.wux-badge__status-dot{width:12rpx;height:12rpx;display:inline-block;border-radius:50%;vertical-align:middle;position:relative;top:-2rpx}.wux-badge__status-dot--success{background-color:#52c41a}.wux-badge__status-dot--processing{background-color:#1890ff;position:relative}.wux-badge__status-dot--processing::after{position:absolute;top:-2rpx;left:-2rpx;width:100%;height:100%;border-radius:50%;border:2rpx solid #1890ff;content:"";animation:statusProcessing 1.2s infinite ease-in-out}.wux-badge__status-dot--default{background-color:#d9d9d9}.wux-badge__status-dot--error{background-color:#f5222d}.wux-badge__status-dot--warning{background-color:#faad14}.wux-badge__status-text{display:inline-block;color:rgba(0,0,0,.65);font-size:28rpx;margin-left:16rpx}@keyframes statusProcessing{0%{transform:scale(.8);opacity:.5}to{transform:scale(2.4);opacity:0}}
\ No newline at end of file
"use strict";var EAN13,pluginName;pluginName=null,EAN13=function(){function t(t,i,e,s){var n;if(this.id=t,this.number=i,this.ctx=s,this.settings={width:200,height:100,number:!0,prefix:!0,color:"black",debug:!1,onValid:function(){},onInvalid:function(){},onSuccess:function(){},onError:function(){}},e)for(n in e)this.settings[n]=e[n];this._name=pluginName,this.init()}return t.prototype.