mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-04-15 20:11:52 +08:00
增加微信小程序版
This commit is contained in:
1
liferestartWX/utils/wux/loading/index.js
Normal file
1
liferestartWX/utils/wux/loading/index.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames3=_interopRequireDefault(require("../helpers/classNames")),_index=require("../index");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(r,!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}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}var defaults={prefixCls:"wux-loading",classNames:"wux-animate--fadeIn",text:"数据加载中",mask:!0,transparent:!0};(0,_baseComponent.default)({useFunc:!0,data:defaults,computed:{classes:["prefixCls",function(e){return{wrap:(0,_classNames3.default)(e),content:(0,_classNames3.default)("".concat(e,"__content"),_defineProperty({},"".concat(e,"__content--has-icon"),!0)),icon:(0,_classNames3.default)("".concat(e,"__icon"),_defineProperty({},"".concat(e,"__icon--loading"),!0)),text:"".concat(e,"__text")}}]},methods:{hide:function(){this.$$setData({in:!1}),this.$wuxBackdrop&&this.$wuxBackdrop.release()},show:function(e){var t=0<arguments.length&&void 0!==e?e:{},r=this.$$mergeOptionsAndBindMethods(Object.assign({},defaults,t));this.$$setData(_objectSpread({in:!0},r)),this.$wuxBackdrop&&this.$wuxBackdrop.retain()}},created:function(){this.data.mask&&(this.$wuxBackdrop=(0,_index.$wuxBackdrop)("#wux-backdrop",this))}});
|
||||
7
liferestartWX/utils/wux/loading/index.json
Normal file
7
liferestartWX/utils/wux/loading/index.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wux-animation-group": "../animation-group/index",
|
||||
"wux-backdrop": "../backdrop/index"
|
||||
}
|
||||
}
|
||||
7
liferestartWX/utils/wux/loading/index.wxml
Normal file
7
liferestartWX/utils/wux/loading/index.wxml
Normal file
@@ -0,0 +1,7 @@
|
||||
<wux-backdrop id="wux-backdrop" transparent="{{ transparent }}" wx:if="{{ mask }}" />
|
||||
<wux-animation-group wux-class="{{ classes.wrap }}" in="{{ in }}" classNames="{{ classNames }}">
|
||||
<view class="{{ classes.content }}">
|
||||
<view class="{{ classes.icon }}"></view>
|
||||
<view class="{{ classes.text }}">{{ text }}</view>
|
||||
</view>
|
||||
</wux-animation-group>
|
||||
1
liferestartWX/utils/wux/loading/index.wxss
Normal file
1
liferestartWX/utils/wux/loading/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
.wux-loading{position:fixed;z-index:5000;top:50%;left:50%;background:rgba(40,40,40,.75);font-size:28rpx;line-height:1.5;text-align:center;border-radius:8rpx;color:#fff;transform:translate3d(-50%,-50%,0)}.wux-loading__content{min-width:236rpx;padding:18rpx 30rpx;box-sizing:border-box}.wux-loading__content--has-icon{padding:30rpx}.wux-loading__content--has-icon .wux-loading__text{margin-top:12rpx}.wux-loading__icon{margin:0;display:block}.wux-loading__icon--loading{display:inline-block!important;vertical-align:middle;animation:loading 1s steps(12,end) infinite;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20100%20100%22%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h100v100H0z%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%2220%22%20x%3D%2246.5%22%20y%3D%2240%22%20fill%3D%22%23E9E9E9%22%20rx%3D%225%22%20ry%3D%225%22%20transform%3D%22translate(0%20-30)%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%2220%22%20x%3D%2246.5%22%20y%3D%2240%22%20fill%3D%22%23989697%22%20rx%3D%225%22%20ry%3D%225%22%20transform%3D%22rotate(30%20105.98%2065)%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%2220%22%20x%3D%2246.5%22%20y%3D%2240%22%20fill%3D%22%239B999A%22%20rx%3D%225%22%20ry%3D%225%22%20transform%3D%22rotate(60%2075.98%2065)%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%2220%22%20x%3D%2246.5%22%20y%3D%2240%22%20fill%3D%22%23A3A1A2%22%20rx%3D%225%22%20ry%3D%225%22%20transform%3D%22rotate(90%2065%2065)%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%2220%22%20x%3D%2246.5%22%20y%3D%2240%22%20fill%3D%22%23ABA9AA%22%20rx%3D%225%22%20ry%3D%225%22%20transform%3D%22rotate(120%2058.66%2065)%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%2220%22%20x%3D%2246.5%22%20y%3D%2240%22%20fill%3D%22%23B2B2B2%22%20rx%3D%225%22%20ry%3D%225%22%20transform%3D%22rotate(150%2054.02%2065)%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%2220%22%20x%3D%2246.5%22%20y%3D%2240%22%20fill%3D%22%23BAB8B9%22%20rx%3D%225%22%20ry%3D%225%22%20transform%3D%22rotate(180%2050%2065)%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%2220%22%20x%3D%2246.5%22%20y%3D%2240%22%20fill%3D%22%23C2C0C1%22%20rx%3D%225%22%20ry%3D%225%22%20transform%3D%22rotate(-150%2045.98%2065)%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%2220%22%20x%3D%2246.5%22%20y%3D%2240%22%20fill%3D%22%23CBCBCB%22%20rx%3D%225%22%20ry%3D%225%22%20transform%3D%22rotate(-120%2041.34%2065)%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%2220%22%20x%3D%2246.5%22%20y%3D%2240%22%20fill%3D%22%23D2D2D2%22%20rx%3D%225%22%20ry%3D%225%22%20transform%3D%22rotate(-90%2035%2065)%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%2220%22%20x%3D%2246.5%22%20y%3D%2240%22%20fill%3D%22%23DADADA%22%20rx%3D%225%22%20ry%3D%225%22%20transform%3D%22rotate(-60%2024.02%2065)%22%2F%3E%3Crect%20width%3D%227%22%20height%3D%2220%22%20x%3D%2246.5%22%20y%3D%2240%22%20fill%3D%22%23E2E2E2%22%20rx%3D%225%22%20ry%3D%225%22%20transform%3D%22rotate(-30%20-5.98%2065)%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-size:100%;margin:10rpx 0 0!important;width:76rpx;height:76rpx;vertical-align:baseline}@keyframes loading{0%{transform:rotate3d(0,0,1,0deg)}100%{transform:rotate3d(0,0,1,360deg)}}
|
||||
Reference in New Issue
Block a user