打包地址
This commit is contained in:
Vendored
+101
@@ -0,0 +1,101 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-loading-icon",
|
||||
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$29],
|
||||
data() {
|
||||
return {
|
||||
// Array.form可以通过一个伪数组对象创建指定长度的数组
|
||||
// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from
|
||||
array12: Array.from({
|
||||
length: 12
|
||||
}),
|
||||
// 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行
|
||||
// 在iOS nvue上,则会一开始默认执行两个周期的动画
|
||||
aniAngel: 360,
|
||||
// 动画旋转角度
|
||||
webviewHide: false,
|
||||
// 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗
|
||||
loading: false
|
||||
// 是否运行中,针对nvue使用
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 当为circle类型时,给其另外三边设置一个更轻一些的颜色
|
||||
// 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色
|
||||
// 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好)
|
||||
otherBorderColor() {
|
||||
const lightColor = common_vendor.colorGradient(this.color, "#ffffff", 100)[80];
|
||||
if (this.mode === "circle") {
|
||||
return this.inactiveColor ? this.inactiveColor : lightColor;
|
||||
} else {
|
||||
return "transparent";
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
show(n) {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
addUnit: common_vendor.addUnit,
|
||||
addStyle: common_vendor.addStyle,
|
||||
init() {
|
||||
setTimeout(() => {
|
||||
}, 20);
|
||||
},
|
||||
// 监听webview的显示与隐藏
|
||||
addEventListenerToWebview() {
|
||||
const pages = getCurrentPages();
|
||||
const page = pages[pages.length - 1];
|
||||
const currentWebview = page.$getAppWebview();
|
||||
currentWebview.addEventListener("hide", () => {
|
||||
this.webviewHide = true;
|
||||
});
|
||||
currentWebview.addEventListener("show", () => {
|
||||
this.webviewHide = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.show
|
||||
}, _ctx.show ? common_vendor.e({
|
||||
b: !$data.webviewHide
|
||||
}, !$data.webviewHide ? common_vendor.e({
|
||||
c: _ctx.mode === "spinner"
|
||||
}, _ctx.mode === "spinner" ? {
|
||||
d: common_vendor.f($data.array12, (item, index, i0) => {
|
||||
return {
|
||||
a: index
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
e: common_vendor.n(`u-loading-icon__spinner--${_ctx.mode}`),
|
||||
f: _ctx.color,
|
||||
g: $options.addUnit(_ctx.size),
|
||||
h: $options.addUnit(_ctx.size),
|
||||
i: _ctx.color,
|
||||
j: $options.otherBorderColor,
|
||||
k: $options.otherBorderColor,
|
||||
l: $options.otherBorderColor,
|
||||
m: `${_ctx.duration}ms`,
|
||||
n: _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : ""
|
||||
}) : {}, {
|
||||
o: _ctx.text
|
||||
}, _ctx.text ? {
|
||||
p: common_vendor.t(_ctx.text),
|
||||
q: $options.addUnit(_ctx.textSize),
|
||||
r: _ctx.textColor
|
||||
} : {}, {
|
||||
s: common_vendor.s($options.addStyle(_ctx.customStyle)),
|
||||
t: common_vendor.n(_ctx.vertical && "u-loading-icon--vertical")
|
||||
}) : {});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-00752c6d"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-loading-icon/u-loading-icon.js.map
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
<view wx:if="{{a}}" style="{{s}}" class="{{['u-loading-icon', 'data-v-00752c6d', t]}}"><view wx:if="{{b}}" class="{{['u-loading-icon__spinner', 'data-v-00752c6d', e]}}" ref="ani" style="{{'color:' + f + ';' + ('width:' + g) + ';' + ('height:' + h) + ';' + ('border-top-color:' + i) + ';' + ('border-bottom-color:' + j) + ';' + ('border-left-color:' + k) + ';' + ('border-right-color:' + l) + ';' + ('animation-duration:' + m) + ';' + ('animation-timing-function:' + n)}}"><block wx:if="{{c}}"><view wx:for="{{d}}" wx:for-item="item" wx:key="a" class="u-loading-icon__dot data-v-00752c6d"></view></block></view><text wx:if="{{o}}" class="u-loading-icon__text data-v-00752c6d" style="{{'font-size:' + q + ';' + ('color:' + r)}}">{{p}}</text></view>
|
||||
Vendored
+181
@@ -0,0 +1,181 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.u-empty.data-v-00752c6d,
|
||||
.u-empty__wrap.data-v-00752c6d,
|
||||
.u-tabs.data-v-00752c6d,
|
||||
.u-tabs__wrapper.data-v-00752c6d,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-00752c6d,
|
||||
.u-tabs__wrapper__scroll-view.data-v-00752c6d,
|
||||
.u-tabs__wrapper__nav.data-v-00752c6d,
|
||||
.u-tabs__wrapper__nav__line.data-v-00752c6d,
|
||||
.up-empty.data-v-00752c6d,
|
||||
.up-empty__wrap.data-v-00752c6d,
|
||||
.up-tabs.data-v-00752c6d,
|
||||
.up-tabs__wrapper.data-v-00752c6d,
|
||||
.up-tabs__wrapper__scroll-view-wrapper.data-v-00752c6d,
|
||||
.up-tabs__wrapper__scroll-view.data-v-00752c6d,
|
||||
.up-tabs__wrapper__nav.data-v-00752c6d,
|
||||
.up-tabs__wrapper__nav__line.data-v-00752c6d {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-loading-icon.data-v-00752c6d {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #c8c9cc;
|
||||
}
|
||||
.u-loading-icon__text.data-v-00752c6d {
|
||||
margin-left: 4px;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.u-loading-icon__spinner.data-v-00752c6d {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
animation: u-rotate-00752c6d 1s linear infinite;
|
||||
}
|
||||
.u-loading-icon__spinner--semicircle.data-v-00752c6d {
|
||||
border-width: 2px;
|
||||
border-color: transparent;
|
||||
border-top-right-radius: 100px;
|
||||
border-top-left-radius: 100px;
|
||||
border-bottom-left-radius: 100px;
|
||||
border-bottom-right-radius: 100px;
|
||||
border-style: solid;
|
||||
}
|
||||
.u-loading-icon__spinner--circle.data-v-00752c6d {
|
||||
border-top-right-radius: 100px;
|
||||
border-top-left-radius: 100px;
|
||||
border-bottom-left-radius: 100px;
|
||||
border-bottom-right-radius: 100px;
|
||||
border-width: 2px;
|
||||
border-top-color: #e5e5e5;
|
||||
border-right-color: #e5e5e5;
|
||||
border-bottom-color: #e5e5e5;
|
||||
border-left-color: #e5e5e5;
|
||||
border-style: solid;
|
||||
}
|
||||
.u-loading-icon--vertical.data-v-00752c6d {
|
||||
flex-direction: column;
|
||||
}
|
||||
.data-v-00752c6d:host {
|
||||
font-size: 0px;
|
||||
line-height: 1;
|
||||
}
|
||||
.u-loading-icon__spinner--spinner.data-v-00752c6d {
|
||||
animation-timing-function: steps(12);
|
||||
}
|
||||
.u-loading-icon__text.data-v-00752c6d:empty {
|
||||
display: none;
|
||||
}
|
||||
.u-loading-icon--vertical .u-loading-icon__text.data-v-00752c6d {
|
||||
margin: 6px 0 0;
|
||||
color: #606266;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:before {
|
||||
display: block;
|
||||
width: 2px;
|
||||
height: 25%;
|
||||
margin: 0 auto;
|
||||
background-color: currentColor;
|
||||
border-radius: 40%;
|
||||
content: " ";
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:nth-of-type(1) {
|
||||
transform: rotate(30deg);
|
||||
opacity: 1;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:nth-of-type(2) {
|
||||
transform: rotate(60deg);
|
||||
opacity: 0.9375;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:nth-of-type(3) {
|
||||
transform: rotate(90deg);
|
||||
opacity: 0.875;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:nth-of-type(4) {
|
||||
transform: rotate(120deg);
|
||||
opacity: 0.8125;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:nth-of-type(5) {
|
||||
transform: rotate(150deg);
|
||||
opacity: 0.75;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:nth-of-type(6) {
|
||||
transform: rotate(180deg);
|
||||
opacity: 0.6875;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:nth-of-type(7) {
|
||||
transform: rotate(210deg);
|
||||
opacity: 0.625;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:nth-of-type(8) {
|
||||
transform: rotate(240deg);
|
||||
opacity: 0.5625;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:nth-of-type(9) {
|
||||
transform: rotate(270deg);
|
||||
opacity: 0.5;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:nth-of-type(10) {
|
||||
transform: rotate(300deg);
|
||||
opacity: 0.4375;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:nth-of-type(11) {
|
||||
transform: rotate(330deg);
|
||||
opacity: 0.375;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-00752c6d:nth-of-type(12) {
|
||||
transform: rotate(360deg);
|
||||
opacity: 0.3125;
|
||||
}
|
||||
@keyframes u-rotate-00752c6d {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(1turn);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user