pixuireactcomponents 1.1.22 → 1.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -25,6 +25,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
25
25
|
return __assign.apply(this, arguments);
|
|
26
26
|
};
|
|
27
27
|
import { h, Component } from "preact";
|
|
28
|
+
//@ts-ignore
|
|
28
29
|
import SlapfaceLess from "./less/Slapface.less";
|
|
29
30
|
//默认配置项
|
|
30
31
|
var settingsitems = {
|
|
@@ -37,24 +38,24 @@ var jumpButton = {
|
|
|
37
38
|
pic_yaxia: '',
|
|
38
39
|
pic_xuanfu: ''
|
|
39
40
|
};
|
|
40
|
-
var
|
|
41
|
-
function
|
|
41
|
+
var slapfaceNode = /** @class */ (function () {
|
|
42
|
+
function slapfaceNode(par_index) {
|
|
42
43
|
if (par_index == undefined)
|
|
43
44
|
this.index = -1;
|
|
44
45
|
else
|
|
45
46
|
this.index = par_index;
|
|
46
47
|
this.next = null;
|
|
47
48
|
}
|
|
48
|
-
return
|
|
49
|
+
return slapfaceNode;
|
|
49
50
|
}());
|
|
50
|
-
var
|
|
51
|
-
function
|
|
52
|
-
this.head = new
|
|
51
|
+
var slapfaceNodeList = /** @class */ (function () {
|
|
52
|
+
function slapfaceNodeList(groupArr) {
|
|
53
|
+
this.head = new slapfaceNode();
|
|
53
54
|
var cur = this.head;
|
|
54
55
|
this.size = 0;
|
|
55
56
|
if (groupArr) {
|
|
56
57
|
for (var i = 0; i < groupArr.length; i++) {
|
|
57
|
-
cur.next = new
|
|
58
|
+
cur.next = new slapfaceNode(i);
|
|
58
59
|
cur = cur.next;
|
|
59
60
|
}
|
|
60
61
|
this.groupArr = groupArr;
|
|
@@ -62,13 +63,13 @@ var nodeList = /** @class */ (function () {
|
|
|
62
63
|
}
|
|
63
64
|
this.tail = cur;
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
-
this.tail.next = new
|
|
66
|
+
slapfaceNodeList.prototype.Add = function (index, next) {
|
|
67
|
+
this.tail.next = new slapfaceNode(index);
|
|
67
68
|
this.tail = this.tail.next;
|
|
68
69
|
++this.size;
|
|
69
70
|
return this.tail;
|
|
70
71
|
};
|
|
71
|
-
|
|
72
|
+
slapfaceNodeList.prototype.DeleteNext = function (curParam) {
|
|
72
73
|
if (curParam.next == null)
|
|
73
74
|
return;
|
|
74
75
|
else {
|
|
@@ -76,7 +77,7 @@ var nodeList = /** @class */ (function () {
|
|
|
76
77
|
}
|
|
77
78
|
--this.size;
|
|
78
79
|
};
|
|
79
|
-
|
|
80
|
+
slapfaceNodeList.prototype.CheckReady = function () {
|
|
80
81
|
var cur = this.head;
|
|
81
82
|
while (cur.next != null) {
|
|
82
83
|
if (this.groupArr[cur.next.index].isLoadDone) {
|
|
@@ -90,7 +91,7 @@ var nodeList = /** @class */ (function () {
|
|
|
90
91
|
}
|
|
91
92
|
return -1;
|
|
92
93
|
};
|
|
93
|
-
return
|
|
94
|
+
return slapfaceNodeList;
|
|
94
95
|
}());
|
|
95
96
|
var Slapface = /** @class */ (function (_super) {
|
|
96
97
|
__extends(Slapface, _super);
|
|
@@ -136,9 +137,10 @@ var Group = /** @class */ (function (_super) {
|
|
|
136
137
|
}
|
|
137
138
|
];
|
|
138
139
|
_this.groupArr = emptyGroup.concat(_this.props.LoadGroup);
|
|
139
|
-
_this.groupIndexList = new
|
|
140
|
+
_this.groupIndexList = new slapfaceNodeList(_this.groupArr);
|
|
140
141
|
_this.loadDisplay = "hidden";
|
|
141
142
|
_this.elseDisplay = "visible";
|
|
143
|
+
_this.firstFrameDisplay = "none";
|
|
142
144
|
_this.state = {
|
|
143
145
|
curIndex: _this.groupIndexList.CheckReady()
|
|
144
146
|
};
|
|
@@ -146,11 +148,15 @@ var Group = /** @class */ (function (_super) {
|
|
|
146
148
|
}
|
|
147
149
|
Group.prototype.componentDidMount = function () {
|
|
148
150
|
var _this = this;
|
|
149
|
-
if
|
|
151
|
+
// if(this.picBack.style.display == 'none'){
|
|
152
|
+
// setTimeout(()=>{this.picBack.style.display = 'flex';
|
|
153
|
+
// this.closeClick()},300)
|
|
154
|
+
// }
|
|
155
|
+
if (this.firstFrameDisplay == "none") {
|
|
150
156
|
setTimeout(function () {
|
|
151
|
-
_this.
|
|
157
|
+
_this.firstFrameDisplay = 'flex';
|
|
152
158
|
_this.closeClick();
|
|
153
|
-
},
|
|
159
|
+
}, 0);
|
|
154
160
|
}
|
|
155
161
|
};
|
|
156
162
|
Group.prototype.componentDidUpdate = function () {
|
|
@@ -164,10 +170,12 @@ var Group = /** @class */ (function (_super) {
|
|
|
164
170
|
}, 1000);
|
|
165
171
|
};
|
|
166
172
|
Group.prototype.closeClick = function (e) {
|
|
167
|
-
var _this = this;
|
|
168
173
|
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
169
174
|
var nextIndex = this.groupIndexList.CheckReady();
|
|
170
|
-
setTimeout(
|
|
175
|
+
// setTimeout(() => {
|
|
176
|
+
// this.loadDisplay = "visible"
|
|
177
|
+
// }, 1);
|
|
178
|
+
this.loadDisplay = "visible";
|
|
171
179
|
this.elseDisplay = "hidden";
|
|
172
180
|
if (nextIndex != -1) {
|
|
173
181
|
if (this.props.settingsitems.ani_switch_type == 2) {
|
|
@@ -184,7 +192,7 @@ var Group = /** @class */ (function (_super) {
|
|
|
184
192
|
if (this.state.curIndex == -1) {
|
|
185
193
|
this.setState({ curIndex: this.groupIndexList.CheckReady() });
|
|
186
194
|
}
|
|
187
|
-
return (h("div", { ref: function (div) { _this.picBack = div; }, style: { width: '100%', height: '100%', alignItems: 'center', justifyContent: 'center', position: 'absolute'
|
|
195
|
+
return (h("div", { ref: function (div) { _this.picBack = div; }, style: { width: '100%', height: '100%', alignItems: 'center', justifyContent: 'center', position: 'absolute' }, onAnimationEnd: function () { setTimeout(function () { _this.picBack.className = SlapfaceLess.groupBackReverse; }, 10); } },
|
|
188
196
|
h("div", { onClick: function () { if (_this.props.settingsitems.is_mask == false)
|
|
189
197
|
return; _this.closeClick(); }, style: { position: "absolute", width: "100%", height: "100%" } }),
|
|
190
198
|
h("div", null,
|
|
@@ -195,8 +203,9 @@ var Group = /** @class */ (function (_super) {
|
|
|
195
203
|
_this.forceUpdate();
|
|
196
204
|
} } }),
|
|
197
205
|
h("div", { ref: function (div) { _this.loadPic = div; }, className: SlapfaceLess.loading_anim, style: { backgroundImage: "url(".concat(this.props.pic_loading, ")"), width: this.groupArr[this.state.curIndex].width, height: this.groupArr[this.state.curIndex].height, position: "absolute", visibility: this.loadDisplay } }, " "),
|
|
198
|
-
h(
|
|
199
|
-
|
|
206
|
+
h("div", { style: { width: '100%', height: '100%', visibility: this.firstFrameDisplay } },
|
|
207
|
+
h(CloseButton, { btn_closeButton: this.props.btn_closeButton, elseDisplay: this.elseDisplay, onClick: function (e) { _this.closeClick(e); _this.loadDisplay = "hidden"; } }),
|
|
208
|
+
h(JumpButton, { elseDisplay: this.elseDisplay, jumpButton: this.props.jumpButton })))));
|
|
200
209
|
};
|
|
201
210
|
return Group;
|
|
202
211
|
}(Component));
|
|
@@ -206,7 +215,7 @@ var CloseButton = /** @class */ (function (_super) {
|
|
|
206
215
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
207
216
|
}
|
|
208
217
|
CloseButton.prototype.render = function () {
|
|
209
|
-
return (h("button", { className: SlapfaceLess.closeButton, style: { visibility: this.props.elseDisplay, backgroundImage: "url(".concat(this.props.btn_closeButton, ")") }, onClick: this.props.onClick }));
|
|
218
|
+
return (h("button", { className: SlapfaceLess.closeButton, style: { visibility: this.props.elseDisplay, backgroundSize: "contain", backgroundImage: "url(".concat(this.props.btn_closeButton, ")") }, onClick: this.props.onClick }));
|
|
210
219
|
};
|
|
211
220
|
return CloseButton;
|
|
212
221
|
}(Component));
|
|
@@ -217,7 +226,7 @@ var JumpButton = /** @class */ (function (_super) {
|
|
|
217
226
|
}
|
|
218
227
|
JumpButton.prototype.render = function () {
|
|
219
228
|
var _this = this;
|
|
220
|
-
return (h("div", { className: SlapfaceLess.jumpButton, style: { visibility: this.props.elseDisplay }, onMouseDown: function () { _this.jumpbtnImg.src = _this.props.jumpButton.pic_yaxia; }, onMouseUp: function () { _this.jumpbtnImg.src = _this.props.jumpButton.pic_xuanfu; }, onMouseOver: function () { _this.jumpbtnImg.src = _this.props.jumpButton.pic_xuanfu; }, onMouseOut: function () { _this.jumpbtnImg.src = _this.props.jumpButton.pic_changtai; } },
|
|
229
|
+
return (h("div", { className: SlapfaceLess.jumpButton, style: { visibility: this.props.elseDisplay }, onMouseDown: function () { _this.jumpbtnImg.src = _this.props.jumpButton.pic_yaxia; console.log("yaxia"); }, onMouseUp: function () { _this.jumpbtnImg.src = _this.props.jumpButton.pic_xuanfu; }, onMouseOver: function () { _this.jumpbtnImg.src = _this.props.jumpButton.pic_xuanfu; }, onMouseOut: function () { _this.jumpbtnImg.src = _this.props.jumpButton.pic_changtai; } },
|
|
221
230
|
h("img", { ref: function (img) { _this.jumpbtnImg = img; }, src: this.props.jumpButton.pic_changtai })));
|
|
222
231
|
};
|
|
223
232
|
return JumpButton;
|
|
@@ -81,19 +81,6 @@
|
|
|
81
81
|
top:50%;
|
|
82
82
|
transform:translate(-50%,-50%);
|
|
83
83
|
}
|
|
84
|
-
.frame {
|
|
85
|
-
border: 12px solid rgb(60, 65, 71);
|
|
86
|
-
display: flex;
|
|
87
|
-
/* flex-direction: row; */
|
|
88
|
-
/* flex-basis: content; */
|
|
89
|
-
/* justify-content: space-around; */
|
|
90
|
-
width: 1128px;
|
|
91
|
-
height: 604px;
|
|
92
|
-
position: relative;
|
|
93
|
-
top:-12px;
|
|
94
|
-
background-color: rgb(60, 65, 71);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
84
|
.mask{
|
|
98
85
|
// background:url(images/coupon-logo.gif) no-repeat;
|
|
99
86
|
height:100px;background-color:#fff;
|