app-wxs.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. var __wxsModules={};
  2. __wxsModules["42613348"] = (() => {
  3. var __getOwnPropNames = Object.getOwnPropertyNames;
  4. var __commonJS = (cb, mod) => function __require() {
  5. return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  6. };
  7. // <stdin>
  8. var require_stdin = __commonJS({
  9. "<stdin>"(exports, module) {
  10. var currentDis = 0;
  11. var isPCFlag = -1;
  12. var startY = -1;
  13. function propObserver(newVal, oldVal, ownerIns, ins) {
  14. var state = ownerIns.getState() || {};
  15. state.currentIns = ins;
  16. var dataset = ins.getDataset();
  17. var loading = dataset.loading == true;
  18. if (newVal && newVal.indexOf("end") != -1) {
  19. var transition = newVal.split("end")[0];
  20. _setTransform("translateY(0px)", ins, false, transition);
  21. state.moveDis = 0;
  22. state.oldMoveDis = 0;
  23. currentDis = 0;
  24. } else if (newVal && newVal.indexOf("begin") != -1) {
  25. var refresherThreshold = ins.getDataset().refresherthreshold;
  26. _setTransformValue(refresherThreshold, ins, state, false);
  27. }
  28. }
  29. function touchstart(e, ownerIns) {
  30. var ins = _getIns(ownerIns);
  31. var state = {};
  32. var dataset = {};
  33. ownerIns.callMethod("_handleListTouchstart");
  34. if (ins) {
  35. state = ins.getState();
  36. dataset = ins.getDataset();
  37. if (_touchDisabled(e, ins, 0))
  38. return;
  39. }
  40. var isTouchEnded = state.isTouchEnded;
  41. state.oldMoveDis = 0;
  42. var touch = _getTouch(e);
  43. var loading = _isTrue(dataset.loading);
  44. state.startY = touch.touchY;
  45. startY = state.startY;
  46. state.lastTouch = touch;
  47. if (!loading && isTouchEnded) {
  48. state.isTouchmoving = false;
  49. }
  50. state.isTouchEnded = false;
  51. ownerIns.callMethod("_handleRefresherTouchstart", touch);
  52. }
  53. function touchmove(e, ownerIns) {
  54. var touch = _getTouch(e);
  55. var ins = _getIns(ownerIns);
  56. var dataset = ins.getDataset();
  57. var refresherThreshold = dataset.refresherthreshold;
  58. var refresherF2Threshold = dataset.refresherf2threshold;
  59. var refresherF2Enabled = _isTrue(dataset.refresherf2enabled);
  60. var isIos = _isTrue(dataset.isios);
  61. var state = ins.getState();
  62. var watchTouchDirectionChange = _isTrue(dataset.watchtouchdirectionchange);
  63. var moveDisObj = {};
  64. var moveDis = 0;
  65. var prevent = false;
  66. if (watchTouchDirectionChange) {
  67. moveDisObj = _getMoveDis(e, ins);
  68. moveDis = moveDisObj.currentDis;
  69. prevent = moveDisObj.isDown;
  70. var direction = prevent ? "top" : "bottom";
  71. if (prevent == state.oldTouchDirection && prevent != state.oldEmitedTouchDirection) {
  72. ownerIns.callMethod("_handleTouchDirectionChange", { direction });
  73. state.oldEmitedTouchDirection = prevent;
  74. }
  75. state.oldTouchDirection = prevent;
  76. }
  77. if (_touchDisabled(e, ins, 1)) {
  78. _handlePullingDown(state, ownerIns, false);
  79. return true;
  80. }
  81. if (!_getAngleIsInRange(e, touch, state, dataset)) {
  82. _handlePullingDown(state, ownerIns, false);
  83. return true;
  84. }
  85. moveDisObj = _getMoveDis(e, ins);
  86. moveDis = moveDisObj.currentDis;
  87. prevent = moveDisObj.isDown;
  88. if (moveDis < 0) {
  89. _setTransformValue(0, ins, state, false);
  90. _handlePullingDown(state, ownerIns, false);
  91. return true;
  92. }
  93. if (prevent && !state.disabledBounce) {
  94. ownerIns.callMethod("_handleScrollViewBounce", { bounce: false });
  95. state.disabledBounce = true;
  96. _handlePullingDown(state, ownerIns, prevent);
  97. return !prevent;
  98. }
  99. _setTransformValue(moveDis, ins, state, false);
  100. var oldRefresherStatus = state.refresherStatus;
  101. var oldIsTouchmoving = _isTrue(dataset.oldistouchmoving);
  102. var hasTouchmove = _isTrue(dataset.hastouchmove);
  103. var isTouchmoving = state.isTouchmoving;
  104. state.refresherStatus = moveDis >= refresherThreshold ? refresherF2Enabled && moveDis > refresherF2Threshold ? "goF2" : "releaseToRefresh" : "default";
  105. if (!isTouchmoving) {
  106. state.isTouchmoving = true;
  107. isTouchmoving = true;
  108. }
  109. if (state.isTouchEnded) {
  110. state.isTouchEnded = false;
  111. }
  112. if (hasTouchmove) {
  113. ownerIns.callMethod("_handleWxsPullingDown", { moveDis, diffDis: moveDisObj.diffDis });
  114. }
  115. if (oldRefresherStatus == void 0 || oldRefresherStatus != state.refresherStatus || oldIsTouchmoving != isTouchmoving) {
  116. ownerIns.callMethod("_handleRefresherTouchmove", moveDis, touch);
  117. }
  118. _handlePullingDown(state, ownerIns, prevent);
  119. return !prevent;
  120. }
  121. function touchend(e, ownerIns) {
  122. var touch = _getTouch(e);
  123. var ins = _getIns(ownerIns);
  124. var dataset = ins.getDataset();
  125. var state = ins.getState();
  126. if (state.disabledBounce) {
  127. ownerIns.callMethod("_handleScrollViewBounce", { bounce: true });
  128. state.disabledBounce = false;
  129. }
  130. if (_touchDisabled(e, ins, 2))
  131. return;
  132. state.reachMaxAngle = true;
  133. state.hitReachMaxAngleCount = 0;
  134. state.fixedIsTopHitCount = 0;
  135. if (!state.isTouchmoving)
  136. return;
  137. var oldRefresherStatus = state.refresherStatus;
  138. var oldMoveDis = state.moveDis;
  139. var refresherThreshold = ins.getDataset().refresherthreshold;
  140. var moveDis = _getMoveDis(e, ins).currentDis;
  141. if (!(moveDis >= refresherThreshold && oldRefresherStatus === "releaseToRefresh")) {
  142. state.isTouchmoving = false;
  143. }
  144. ownerIns.callMethod("_handleRefresherTouchend", moveDis);
  145. state.isTouchEnded = true;
  146. if (oldMoveDis < refresherThreshold)
  147. return;
  148. var animate = false;
  149. if (moveDis >= refresherThreshold) {
  150. moveDis = refresherThreshold;
  151. animate = true;
  152. }
  153. _setTransformValue(moveDis, ins, state, animate);
  154. }
  155. function isPC() {
  156. if (!navigator)
  157. return false;
  158. if (isPCFlag != -1)
  159. return isPCFlag;
  160. var agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
  161. isPCFlag = agents.every(function(item) {
  162. return navigator.userAgent.indexOf(item) < 0;
  163. });
  164. return isPCFlag;
  165. }
  166. var movable = false;
  167. function mousedown(e, ins) {
  168. if (!isPC())
  169. return;
  170. touchstart(e, ins);
  171. movable = true;
  172. }
  173. function mousemove(e, ins) {
  174. if (!isPC() || !movable)
  175. return;
  176. touchmove(e, ins);
  177. }
  178. function mouseup(e, ins) {
  179. if (!isPC())
  180. return;
  181. touchend(e, ins);
  182. movable = false;
  183. }
  184. function mouseleave(e, ins) {
  185. if (!isPC())
  186. return;
  187. movable = false;
  188. }
  189. function _setTransformValue(value, ins, state, animate) {
  190. value = value || 0;
  191. if (state.moveDis == value)
  192. return;
  193. state.moveDis = value;
  194. _setTransform("translateY(" + value + "px)", ins, animate, "");
  195. }
  196. function _setTransform(transform, ins, animate, transition) {
  197. var dataset = ins.getDataset();
  198. if (_isTrue(dataset.refreshernotransform))
  199. return;
  200. transform = transform == "translateY(0px)" ? "none" : transform;
  201. ins.requestAnimationFrame(function() {
  202. var stl = { "transform": transform };
  203. if (animate) {
  204. stl["transition"] = "transform .1s linear";
  205. }
  206. if (transition.length) {
  207. stl["transition"] = transition;
  208. }
  209. ins.setStyle(stl);
  210. });
  211. }
  212. function _getMoveDis(e, ins) {
  213. var state = ins.getState();
  214. var refresherThreshold = parseFloat(ins.getDataset().refresherthreshold);
  215. var refresherOutRate = parseFloat(ins.getDataset().refresheroutrate);
  216. var refresherPullRate = parseFloat(ins.getDataset().refresherpullrate);
  217. var touch = _getTouch(e);
  218. var currentStartY = !state.startY || state.startY == "NaN" ? startY : state.startY;
  219. var moveDis = touch.touchY - currentStartY;
  220. var oldMoveDis = state.oldMoveDis || 0;
  221. state.oldMoveDis = moveDis;
  222. var diffDis = moveDis - oldMoveDis;
  223. if (diffDis > 0) {
  224. diffDis = diffDis * refresherPullRate;
  225. if (currentDis > refresherThreshold) {
  226. diffDis = diffDis * (1 - refresherOutRate);
  227. }
  228. }
  229. diffDis = diffDis > 100 ? diffDis / 100 : diffDis > 20 ? diffDis / 2.2 : diffDis;
  230. currentDis += diffDis;
  231. currentDis = Math.max(0, currentDis);
  232. return {
  233. currentDis,
  234. diffDis,
  235. isDown: diffDis > 0
  236. };
  237. }
  238. function _getTouch(e) {
  239. var touch = e;
  240. if (e.touches && e.touches.length) {
  241. touch = e.touches[0];
  242. } else if (e.changedTouches && e.changedTouches.length) {
  243. touch = e.changedTouches[0];
  244. } else if (e.datail && e.datail != {}) {
  245. touch = e.datail;
  246. }
  247. return {
  248. touchX: touch.clientX,
  249. touchY: touch.clientY
  250. };
  251. }
  252. function _getIns(ownerIns) {
  253. var ins = ownerIns.getState().currentIns;
  254. if (!ins) {
  255. ownerIns.callMethod("_handlePropUpdate");
  256. }
  257. return ins;
  258. }
  259. function _touchDisabled(e, ins, processTag) {
  260. var dataset = ins.getDataset();
  261. var state = ins.getState();
  262. var loading = _isTrue(dataset.loading);
  263. var useChatRecordMode = _isTrue(dataset.usechatrecordmode);
  264. var refresherEnabled = _isTrue(dataset.refresherenabled);
  265. var useCustomRefresher = _isTrue(dataset.usecustomrefresher);
  266. var usePageScroll = _isTrue(dataset.usepagescroll);
  267. var pageScrollTop = parseFloat(dataset.pagescrolltop);
  268. var scrollTop = parseFloat(dataset.scrolltop);
  269. var finalScrollTop = usePageScroll ? pageScrollTop : scrollTop;
  270. var fixedIsTop = false;
  271. var handleFaultTolerantMove = false;
  272. if (handleFaultTolerantMove && finalScrollTop == (state.startScrollTop || 0) && finalScrollTop <= 105) {
  273. fixedIsTop = true;
  274. }
  275. var fixedIsTopHitCount = state.fixedIsTopHitCount || 0;
  276. if (fixedIsTop) {
  277. fixedIsTopHitCount++;
  278. if (fixedIsTopHitCount <= 2) {
  279. fixedIsTop = false;
  280. }
  281. state.fixedIsTopHitCount = fixedIsTopHitCount;
  282. } else {
  283. state.fixedIsTopHitCount = 0;
  284. }
  285. if (handleFaultTolerantMove && processTag === 0) {
  286. state.startScrollTop = finalScrollTop || 0;
  287. }
  288. if (handleFaultTolerantMove && processTag === 2) {
  289. fixedIsTop = true;
  290. }
  291. return loading || useChatRecordMode || !refresherEnabled || !useCustomRefresher || usePageScroll && useCustomRefresher && pageScrollTop > 5 && !fixedIsTop || !usePageScroll && useCustomRefresher && scrollTop > 5 && !fixedIsTop;
  292. }
  293. function _getAngleIsInRange(e, touch, state, dataset) {
  294. var maxAngle = dataset.refreshermaxangle;
  295. var refresherAecc = _isTrue(dataset.refresheraecc);
  296. var lastTouch = state.lastTouch;
  297. var reachMaxAngle = state.reachMaxAngle;
  298. var moveDis = state.oldMoveDis;
  299. if (!lastTouch)
  300. return true;
  301. if (maxAngle >= 0 && maxAngle <= 90 && lastTouch) {
  302. if ((!moveDis || moveDis < 1) && !refresherAecc && reachMaxAngle != null && !reachMaxAngle)
  303. return false;
  304. var x = Math.abs(touch.touchX - lastTouch.touchX);
  305. var y = Math.abs(touch.touchY - lastTouch.touchY);
  306. var z = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
  307. if ((x || y) && x > 1) {
  308. var angle = Math.asin(y / z) / Math.PI * 180;
  309. if (angle < maxAngle) {
  310. var hitReachMaxAngleCount = state.hitReachMaxAngleCount || 0;
  311. state.hitReachMaxAngleCount = ++hitReachMaxAngleCount;
  312. if (state.hitReachMaxAngleCount > 2) {
  313. state.lastTouch = touch;
  314. state.reachMaxAngle = false;
  315. }
  316. return false;
  317. }
  318. }
  319. }
  320. state.lastTouch = touch;
  321. return true;
  322. }
  323. function _handlePullingDown(state, ins, onPullingDown) {
  324. var oldOnPullingDown = state.onPullingDown || false;
  325. if (oldOnPullingDown != onPullingDown) {
  326. ins.callMethod("_handleWxsPullingDownStatusChange", onPullingDown);
  327. }
  328. state.onPullingDown = onPullingDown;
  329. }
  330. function _isTrue(value) {
  331. value = (typeof value === "string" ? JSON.parse(value) : value) || false;
  332. return value == true || value == "true";
  333. }
  334. module.exports = {
  335. touchstart,
  336. touchmove,
  337. touchend,
  338. mousedown,
  339. mousemove,
  340. mouseup,
  341. mouseleave,
  342. propObserver
  343. };
  344. }
  345. });
  346. return require_stdin();
  347. })();
  348. __wxsModules["0c1bc38e"] = (() => {
  349. var __getOwnPropNames = Object.getOwnPropertyNames;
  350. var __commonJS = (cb, mod) => function __require() {
  351. return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  352. };
  353. // <stdin>
  354. var require_stdin = __commonJS({
  355. "<stdin>"(exports, module) {
  356. function scroll(event, ownerInstance) {
  357. var detail = event.detail;
  358. var scrollWidth = detail.scrollWidth;
  359. var scrollLeft = detail.scrollLeft;
  360. var dataset = event.currentTarget.dataset;
  361. var scrollComponentWidth = dataset.scrollWidth || dataset.scrollwidth || 0;
  362. var indicatorWidth = dataset.indicatorWidth || dataset.indicatorwidth || 0;
  363. var barWidth = dataset.barWidth || dataset.barwidth || 0;
  364. var x = scrollLeft / (scrollWidth - scrollComponentWidth) * (indicatorWidth - barWidth);
  365. setBarStyle(ownerInstance, x);
  366. }
  367. function scrolltolower(event, ownerInstance) {
  368. ownerInstance.callMethod("scrollEvent", "right");
  369. var dataset = event.currentTarget.dataset;
  370. var indicatorWidth = dataset.indicatorWidth || dataset.indicatorwidth || 0;
  371. var barWidth = dataset.barWidth || dataset.barwidth || 0;
  372. setBarStyle(ownerInstance, indicatorWidth - barWidth);
  373. }
  374. function scrolltoupper(event, ownerInstance) {
  375. ownerInstance.callMethod("scrollEvent", "left");
  376. setBarStyle(ownerInstance, 0);
  377. }
  378. function setBarStyle(ownerInstance, x) {
  379. ownerInstance.selectComponent(".u-scroll-list__indicator__line__bar") && ownerInstance.selectComponent(".u-scroll-list__indicator__line__bar").setStyle({
  380. transform: "translateX(" + x + "px)"
  381. });
  382. }
  383. module.exports = {
  384. scroll,
  385. scrolltolower,
  386. scrolltoupper
  387. };
  388. }
  389. });
  390. return require_stdin();
  391. })();
  392. __wxsModules.f1d6d7d8 = (() => {
  393. var __getOwnPropNames = Object.getOwnPropertyNames;
  394. var __commonJS = (cb, mod) => function __require() {
  395. return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  396. };
  397. // <stdin>
  398. var require_stdin = __commonJS({
  399. "<stdin>"(exports, module) {
  400. function touchstart(event, ownerInstance) {
  401. var instance = event.instance;
  402. var state = instance.getState();
  403. if (state.disabled)
  404. return;
  405. var touches = event.touches;
  406. if (touches && touches.length > 1)
  407. return;
  408. state.moving = true;
  409. state.startX = touches[0].pageX;
  410. state.startY = touches[0].pageY;
  411. ownerInstance.callMethod("closeOther");
  412. }
  413. function touchmove(event, ownerInstance) {
  414. var instance = event.instance;
  415. var state = instance.getState();
  416. if (state.disabled || !state.moving)
  417. return;
  418. var touches = event.touches;
  419. var pageX = touches[0].pageX;
  420. var pageY = touches[0].pageY;
  421. var moveX = pageX - state.startX;
  422. var moveY = pageY - state.startY;
  423. var buttonsWidth = state.buttonsWidth;
  424. if (Math.abs(moveX) > Math.abs(moveY) || Math.abs(moveX) > state.threshold) {
  425. event.preventDefault && event.preventDefault();
  426. event.stopPropagation && event.stopPropagation();
  427. }
  428. if (Math.abs(moveX) < Math.abs(moveY))
  429. return;
  430. if (state.status === "open") {
  431. if (moveX < 0)
  432. moveX = 0;
  433. if (moveX > buttonsWidth)
  434. moveX = buttonsWidth;
  435. moveSwipeAction(-buttonsWidth + moveX, instance, ownerInstance);
  436. } else {
  437. if (moveX > 0)
  438. moveX = 0;
  439. if (Math.abs(moveX) > buttonsWidth)
  440. moveX = -buttonsWidth;
  441. moveSwipeAction(moveX, instance, ownerInstance);
  442. }
  443. }
  444. function touchend(event, ownerInstance) {
  445. var instance = event.instance;
  446. var state = instance.getState();
  447. if (!state.moving || state.disabled)
  448. return;
  449. var touches = event.changedTouches ? event.changedTouches[0] : {};
  450. var pageX = touches.pageX;
  451. var pageY = touches.pageY;
  452. var moveX = pageX - state.startX;
  453. if (state.status === "open") {
  454. if (moveX < 0)
  455. return;
  456. if (moveX === 0) {
  457. return closeSwipeAction(instance, ownerInstance);
  458. }
  459. if (Math.abs(moveX) < state.threshold) {
  460. openSwipeAction(instance, ownerInstance);
  461. } else {
  462. closeSwipeAction(instance, ownerInstance);
  463. }
  464. } else {
  465. if (moveX > 0)
  466. return;
  467. if (Math.abs(moveX) < state.threshold) {
  468. closeSwipeAction(instance, ownerInstance);
  469. } else {
  470. openSwipeAction(instance, ownerInstance);
  471. }
  472. }
  473. }
  474. function getDuration(value) {
  475. if (value.toString().indexOf("s") >= 0)
  476. return value;
  477. return value > 30 ? value + "ms" : value + "s";
  478. }
  479. function moveSwipeAction(moveX, instance, ownerInstance) {
  480. var state = instance.getState();
  481. var buttons = ownerInstance.selectAllComponents(".u-swipe-action-item__right__button");
  482. instance.requestAnimationFrame(function() {
  483. instance.setStyle({
  484. // 设置translateX的值
  485. "transition": "none",
  486. transform: "translateX(" + moveX + "px)",
  487. "-webkit-transform": "translateX(" + moveX + "px)"
  488. });
  489. });
  490. }
  491. function openSwipeAction(instance, ownerInstance) {
  492. var state = instance.getState();
  493. var buttons = ownerInstance.selectAllComponents(".u-swipe-action-item__right__button");
  494. var duration = getDuration(state.duration);
  495. var buttonsWidth = -state.buttonsWidth;
  496. instance.requestAnimationFrame(function() {
  497. instance.setStyle({
  498. "transition": "transform " + duration,
  499. "transform": "translateX(" + buttonsWidth + "px)",
  500. "-webkit-transform": "translateX(" + buttonsWidth + "px)"
  501. });
  502. });
  503. setStatus("open", instance, ownerInstance);
  504. }
  505. function setStatus(status, instance, ownerInstance) {
  506. var state = instance.getState();
  507. state.status = status;
  508. ownerInstance.callMethod("setState", status);
  509. }
  510. function closeSwipeAction(instance, ownerInstance) {
  511. var state = instance.getState();
  512. var buttons = ownerInstance.selectAllComponents(".u-swipe-action-item__right__button");
  513. var len = buttons.length;
  514. var duration = getDuration(state.duration);
  515. instance.requestAnimationFrame(function() {
  516. instance.setStyle({
  517. "transition": "transform " + duration,
  518. "transform": "translateX(0px)",
  519. "-webkit-transform": "translateX(0px)"
  520. });
  521. for (var i = len - 1; i >= 0; i--) {
  522. buttons[i].setStyle({
  523. "transition": "transform " + duration,
  524. "transform": "translateX(0px)",
  525. "-webkit-transform": "translateX(0px)"
  526. });
  527. }
  528. });
  529. setStatus("close", instance, ownerInstance);
  530. }
  531. function statusChange(newValue, oldValue, ownerInstance, instance) {
  532. var state = instance.getState();
  533. if (state.disabled)
  534. return;
  535. if (newValue === "close" && state.status === "open") {
  536. closeSwipeAction(instance, ownerInstance);
  537. } else if (newValue === "open" && state.status === "close") {
  538. openSwipeAction(instance, ownerInstance);
  539. }
  540. }
  541. function sizeChange(newValue, oldValue, ownerInstance, instance) {
  542. var state = instance.getState();
  543. if (!state || !newValue) {
  544. return;
  545. }
  546. state.disabled = newValue.disabled;
  547. state.duration = newValue.duration;
  548. state.show = newValue.show;
  549. state.threshold = newValue.threshold;
  550. state.buttons = newValue.buttons;
  551. if (state.buttons) {
  552. var len = state.buttons.length;
  553. var buttonsWidth = 0;
  554. var buttons = newValue.buttons;
  555. for (var i = 0; i < len; i++) {
  556. buttonsWidth += buttons[i].width;
  557. }
  558. }
  559. state.buttonsWidth = buttonsWidth;
  560. if (state.show) {
  561. openSwipeAction(instance, ownerInstance);
  562. }
  563. }
  564. module.exports = {
  565. touchstart,
  566. touchmove,
  567. touchend,
  568. sizeChange,
  569. statusChange
  570. };
  571. }
  572. });
  573. return require_stdin();
  574. })();
  575. __wxsModules["155ce918"] = (() => {
  576. var __getOwnPropNames = Object.getOwnPropertyNames;
  577. var __commonJS = (cb, mod) => function __require() {
  578. return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  579. };
  580. // <stdin>
  581. var require_stdin = __commonJS({
  582. "<stdin>"(exports, module) {
  583. var inlineTags = {
  584. abbr: true,
  585. b: true,
  586. big: true,
  587. code: true,
  588. del: true,
  589. em: true,
  590. i: true,
  591. ins: true,
  592. label: true,
  593. q: true,
  594. small: true,
  595. span: true,
  596. strong: true,
  597. sub: true,
  598. sup: true
  599. };
  600. module.exports = {
  601. isInline: function(tagName, style) {
  602. return inlineTags[tagName] || (style || "").indexOf("display:inline") !== -1;
  603. }
  604. };
  605. }
  606. });
  607. return require_stdin();
  608. })();