feat: 卡片组件
This commit is contained in:
8
dist/base.wxml
vendored
8
dist/base.wxml
vendored
@@ -53,6 +53,14 @@
|
||||
</text>
|
||||
</template>
|
||||
|
||||
<template name="tmpl_0_13">
|
||||
<button size="{{xs.b(i.p18,'default')}}" type="{{i.p19}}" plain="{{xs.b(i.p12,!1)}}" disabled="{{i.p2}}" loading="{{xs.b(i.p9,!1)}}" form-type="{{i.p3}}" open-type="{{i.p11}}" hover-class="{{xs.b(i.p4,'button-hover')}}" hover-stop-propagation="{{xs.b(i.p7,!1)}}" hover-start-time="{{xs.b(i.p5,20)}}" hover-stay-time="{{xs.b(i.p6,70)}}" name="{{i.p10}}" bindtouchstart="eh" bindtouchmove="eh" bindtouchend="eh" bindtouchcancel="eh" bindlongpress="eh" lang="{{xs.b(i.p8,en)}}" session-from="{{i.p16}}" send-message-title="{{i.p15}}" send-message-path="{{i.p14}}" send-message-img="{{i.p13}}" app-parameter="{{i.p0}}" show-message-card="{{xs.b(i.p17,false)}}" business-id="{{i.p1}}" bindgetuserinfo="eh" bindcontact="eh" bindgetphonenumber="eh" bindchooseavatar="eh" binderror="eh" bindopensetting="eh" bindlaunchapp="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh" id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
|
||||
<block wx:for="{{i.cn}}" wx:key="sid">
|
||||
<template is="{{xs.e(cid+1)}}" data="{{i:item,l:l}}" />
|
||||
</block>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<template name="tmpl_0_48">
|
||||
<scroll-view scroll-x="{{xs.b(i.p18,!1)}}" scroll-y="{{xs.b(i.p19,!1)}}" upper-threshold="{{xs.b(i.p21,50)}}" lower-threshold="{{xs.b(i.p6,50)}}" scroll-top="{{i.p16}}" scroll-left="{{i.p15}}" scroll-into-view="{{i.p14}}" scroll-with-animation="{{xs.b(i.p17,!1)}}" enable-back-to-top="{{xs.b(i.p2,!1)}}" bindscrolltoupper="eh" bindscrolltolower="eh" bindscroll="eh" bindtouchstart="eh" bindtouchmove="eh" bindtouchend="eh" bindtouchcancel="eh" bindlongpress="eh" animation="{{i.p0}}" bindanimationstart="eh" bindanimationiteration="eh" bindanimationend="eh" bindtransitionend="eh" enable-flex="{{xs.b(i.p3,false)}}" scroll-anchoring="{{xs.b(i.p13,false)}}" refresher-enabled="{{xs.b(i.p10,false)}}" refresher-threshold="{{xs.b(i.p11,45)}}" refresher-default-style="{{xs.b(i.p9,'black')}}" refresher-background="{{xs.b(i.p8,'#FFF')}}" refresher-triggered="{{xs.b(i.p12,false)}}" enhanced="{{xs.b(i.p4,false)}}" bounces="{{xs.b(i.p1,true)}}" show-scrollbar="{{xs.b(i.p20,true)}}" paging-enabled="{{xs.b(i.p7,false)}}" fast-deceleration="{{xs.b(i.p5,false)}}" binddragstart="eh" binddragging="eh" binddragend="eh" bindrefresherpulling="eh" bindrefresherrefresh="eh" bindrefresherrestore="eh" bindrefresherabort="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh" id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
|
||||
<block wx:for="{{i.cn}}" wx:key="sid">
|
||||
|
||||
601
dist/pages/home/index.js
vendored
601
dist/pages/home/index.js
vendored
@@ -1,5 +1,217 @@
|
||||
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/home/index"],{
|
||||
|
||||
/***/ "./node_modules/@antmjs/vantui/es/card/index.js":
|
||||
/*!******************************************************!*\
|
||||
!*** ./node_modules/@antmjs/vantui/es/card/index.js ***!
|
||||
\******************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* unused harmony export Card */
|
||||
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
||||
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
|
||||
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
|
||||
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _wxs_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../wxs/utils */ "./node_modules/@antmjs/vantui/es/wxs/utils.js");
|
||||
/* harmony import */ var _common_jumpLink__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/jumpLink */ "./node_modules/@antmjs/vantui/es/common/jumpLink.js");
|
||||
/* harmony import */ var _tag__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tag */ "./node_modules/@antmjs/vantui/es/tag/index.js");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
|
||||
|
||||
|
||||
|
||||
var _excluded = ["tag", "num", "desc", "thumb", "title", "price", "centered", "lazyLoad", "thumbLink", "originPrice", "thumbMode", "currency", "renderFooter", "renderBottom", "renderNum", "renderOriginPrice", "renderPriceTop", "renderThumb", "renderPrice", "renderDesc", "renderTag", "renderTitle", "renderTags", "style", "className"];
|
||||
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Card(props) {
|
||||
var tag = props.tag,
|
||||
num = props.num,
|
||||
desc = props.desc,
|
||||
thumb = props.thumb,
|
||||
title = props.title,
|
||||
price = props.price,
|
||||
centered = props.centered,
|
||||
lazyLoad = props.lazyLoad,
|
||||
thumbLink = props.thumbLink,
|
||||
originPrice = props.originPrice,
|
||||
_props$thumbMode = props.thumbMode,
|
||||
thumbMode = _props$thumbMode === void 0 ? 'aspectFit' : _props$thumbMode,
|
||||
_props$currency = props.currency,
|
||||
currency = _props$currency === void 0 ? '¥' : _props$currency,
|
||||
renderFooter = props.renderFooter,
|
||||
renderBottom = props.renderBottom,
|
||||
renderNum = props.renderNum,
|
||||
renderOriginPrice = props.renderOriginPrice,
|
||||
renderPriceTop = props.renderPriceTop,
|
||||
renderThumb = props.renderThumb,
|
||||
renderPrice = props.renderPrice,
|
||||
renderDesc = props.renderDesc,
|
||||
renderTag = props.renderTag,
|
||||
renderTitle = props.renderTitle,
|
||||
renderTags = props.renderTags,
|
||||
style = props.style,
|
||||
className = props.className,
|
||||
others = (0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_6__["default"])(props, _excluded);
|
||||
|
||||
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({
|
||||
integerStr: '',
|
||||
decimalStr: ''
|
||||
}),
|
||||
_useState2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__["default"])(_useState, 2),
|
||||
state = _useState2[0],
|
||||
setState = _useState2[1];
|
||||
|
||||
var integerStr = state.integerStr,
|
||||
decimalStr = state.decimalStr;
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
||||
var priceArr = price.toString().split('.');
|
||||
setState(function (pre) {
|
||||
return _objectSpread(_objectSpread({}, pre), {}, {
|
||||
integerStr: priceArr[0],
|
||||
decimalStr: priceArr[1] ? ".".concat(priceArr[1]) : ''
|
||||
});
|
||||
});
|
||||
}, [price]);
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, _objectSpread(_objectSpread({
|
||||
className: "van-card ".concat(className || ''),
|
||||
style: style
|
||||
}, others), {}, {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: _wxs_utils__WEBPACK_IMPORTED_MODULE_2__.bem('card__header', {
|
||||
center: centered
|
||||
}),
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: "van-card__thumb",
|
||||
onClick: function onClick() {
|
||||
thumbLink && (0,_common_jumpLink__WEBPACK_IMPORTED_MODULE_3__.jumpLink)(thumbLink);
|
||||
},
|
||||
children: [thumb ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Image, {
|
||||
src: thumb,
|
||||
mode: thumbMode,
|
||||
lazyLoad: lazyLoad,
|
||||
className: "van-card__img thumb-class"
|
||||
}) : renderThumb, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
children: tag ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tag__WEBPACK_IMPORTED_MODULE_4__.Tag, {
|
||||
mark: true,
|
||||
type: "danger",
|
||||
className: "van-card__tag",
|
||||
children: tag
|
||||
}) : renderTag
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: 'van-card__content ' + _wxs_utils__WEBPACK_IMPORTED_MODULE_2__.bem('card__content', {
|
||||
center: centered
|
||||
}),
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
children: title ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: "van-card__title title-class",
|
||||
children: title
|
||||
}) : renderTitle
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
children: desc ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: "van-card__desc desc-class",
|
||||
children: desc
|
||||
}) : renderDesc
|
||||
}), renderTags]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: "van-card__bottom",
|
||||
children: [renderPriceTop, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
children: price ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: "van-card__price price-class",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
|
||||
children: currency
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
|
||||
className: "van-card__price-integer",
|
||||
children: integerStr
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
|
||||
className: "van-card__price-decimal",
|
||||
children: decimalStr
|
||||
})]
|
||||
}) : renderPrice
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
children: originPrice ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: "van-card__origin-price origin-price-class",
|
||||
children: currency + ' ' + originPrice
|
||||
}) : renderOriginPrice
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
children: num ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: "van-card__num num-class",
|
||||
children: 'x ' + num
|
||||
}) : renderNum
|
||||
}), renderBottom]
|
||||
})]
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: "van-card__footer",
|
||||
children: renderFooter
|
||||
})]
|
||||
}));
|
||||
}
|
||||
/* harmony default export */ __webpack_exports__["default"] = (Card);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@antmjs/vantui/es/common/jumpLink.js":
|
||||
/*!***********************************************************!*\
|
||||
!*** ./node_modules/@antmjs/vantui/es/common/jumpLink.js ***!
|
||||
\***********************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "jumpLink": function() { return /* binding */ jumpLink; }
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro");
|
||||
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__);
|
||||
|
||||
function jumpLink(url, linkType) {
|
||||
var _linkType;
|
||||
|
||||
linkType = (_linkType = linkType) !== null && _linkType !== void 0 ? _linkType : 'navigateTo';
|
||||
|
||||
if (url) {
|
||||
if (linkType === 'navigateTo' && (0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__.getCurrentPages)().length > 9) {
|
||||
(0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__.redirectTo)({
|
||||
url: url
|
||||
});
|
||||
} else {
|
||||
switch (linkType) {
|
||||
case 'navigateTo':
|
||||
(0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__.navigateTo)({
|
||||
url: url
|
||||
});
|
||||
break;
|
||||
|
||||
case 'reLaunch':
|
||||
(0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__.reLaunch)({
|
||||
url: url
|
||||
});
|
||||
break;
|
||||
|
||||
case 'redirectTo':
|
||||
(0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__.redirectTo)({
|
||||
url: url
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@antmjs/vantui/es/common/utils.js":
|
||||
/*!********************************************************!*\
|
||||
!*** ./node_modules/@antmjs/vantui/es/common/utils.js ***!
|
||||
@@ -338,6 +550,305 @@ function rootStyle(data) {
|
||||
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@antmjs/vantui/es/grid-item/index.js":
|
||||
/*!***********************************************************!*\
|
||||
!*** ./node_modules/@antmjs/vantui/es/grid-item/index.js ***!
|
||||
\***********************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* unused harmony export GridItem */
|
||||
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
|
||||
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
|
||||
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _common_jumpLink__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/jumpLink */ "./node_modules/@antmjs/vantui/es/common/jumpLink.js");
|
||||
/* harmony import */ var _wxs_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../wxs/utils */ "./node_modules/@antmjs/vantui/es/wxs/utils.js");
|
||||
/* harmony import */ var _icon_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icon/index */ "./node_modules/@antmjs/vantui/es/icon/index.js");
|
||||
/* harmony import */ var _wxs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./wxs */ "./node_modules/@antmjs/vantui/es/grid-item/wxs.js");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
|
||||
|
||||
|
||||
var _excluded = ["icon", "iconColor", "iconPrefix", "dot", "info", "badge", "text", "setChildrenInstance", "parentInstance", "index", "url", "linkType", "style", "className"];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function GridItem(props) {
|
||||
var icon = props.icon,
|
||||
iconColor = props.iconColor,
|
||||
_props$iconPrefix = props.iconPrefix,
|
||||
iconPrefix = _props$iconPrefix === void 0 ? 'van-icon' : _props$iconPrefix,
|
||||
dot = props.dot,
|
||||
info = props.info,
|
||||
badge = props.badge,
|
||||
text = props.text,
|
||||
setChildrenInstance = props.setChildrenInstance,
|
||||
parentInstance = props.parentInstance,
|
||||
index = props.index,
|
||||
url = props.url,
|
||||
linkType = props.linkType,
|
||||
style = props.style,
|
||||
className = props.className,
|
||||
others = (0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_6__["default"])(props, _excluded);
|
||||
|
||||
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({}),
|
||||
_useState2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__["default"])(_useState, 2),
|
||||
parentState = _useState2[0],
|
||||
setParentState = _useState2[1];
|
||||
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
||||
setChildrenInstance(index, {
|
||||
updateStyle: updateStyle
|
||||
});
|
||||
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[index, setChildrenInstance]);
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
||||
updateStyle(); // eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[parentInstance.columnNum]);
|
||||
var updateStyle = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
||||
var columnNum = parentInstance.columnNum,
|
||||
border = parentInstance.border,
|
||||
square = parentInstance.square,
|
||||
gutter = parentInstance.gutter,
|
||||
clickable = parentInstance.clickable,
|
||||
center = parentInstance.center,
|
||||
direction = parentInstance.direction,
|
||||
reverse = parentInstance.reverse,
|
||||
iconSize = parentInstance.iconSize;
|
||||
setParentState({
|
||||
center: center,
|
||||
border: border,
|
||||
square: square,
|
||||
gutter: gutter,
|
||||
clickable: clickable,
|
||||
direction: direction,
|
||||
reverse: reverse,
|
||||
iconSize: iconSize,
|
||||
index: index,
|
||||
columnNum: columnNum
|
||||
});
|
||||
}, [parentInstance, index]);
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: ' ' + _wxs_utils__WEBPACK_IMPORTED_MODULE_2__.bem('grid-item', {
|
||||
square: parentState === null || parentState === void 0 ? void 0 : parentState.square
|
||||
}) + ' ' + className,
|
||||
style: _wxs_utils__WEBPACK_IMPORTED_MODULE_2__.style([_wxs__WEBPACK_IMPORTED_MODULE_4__.wrapperStyle({
|
||||
square: parentState === null || parentState === void 0 ? void 0 : parentState.square,
|
||||
gutter: parentState === null || parentState === void 0 ? void 0 : parentState.gutter,
|
||||
columnNum: parentState === null || parentState === void 0 ? void 0 : parentState.columnNum,
|
||||
index: parentState === null || parentState === void 0 ? void 0 : parentState.index
|
||||
}), style]),
|
||||
onClick: function onClick(e) {
|
||||
var _others$onClick;
|
||||
|
||||
url && (0,_common_jumpLink__WEBPACK_IMPORTED_MODULE_1__.jumpLink)(url, linkType);
|
||||
others === null || others === void 0 ? void 0 : (_others$onClick = others.onClick) === null || _others$onClick === void 0 ? void 0 : _others$onClick.call(others, e);
|
||||
},
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: 'content-class ' + _wxs_utils__WEBPACK_IMPORTED_MODULE_2__.bem('grid-item__content', [parentState === null || parentState === void 0 ? void 0 : parentState.direction, {
|
||||
center: parentState === null || parentState === void 0 ? void 0 : parentState.center,
|
||||
square: parentState === null || parentState === void 0 ? void 0 : parentState.square,
|
||||
reverse: parentState === null || parentState === void 0 ? void 0 : parentState.reverse,
|
||||
clickable: parentState === null || parentState === void 0 ? void 0 : parentState.clickable,
|
||||
surround: (parentState === null || parentState === void 0 ? void 0 : parentState.border) && (parentState === null || parentState === void 0 ? void 0 : parentState.gutter)
|
||||
}]) + ' ' + (parentState !== null && parentState !== void 0 && parentState.border ? 'van-hairline--surround' : ''),
|
||||
style: _wxs__WEBPACK_IMPORTED_MODULE_4__.contentStyle({
|
||||
square: parentState === null || parentState === void 0 ? void 0 : parentState.square,
|
||||
gutter: parentState === null || parentState === void 0 ? void 0 : parentState.gutter
|
||||
}),
|
||||
children: others.children || /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: "van-grid-item__icon icon-class",
|
||||
children: icon ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_icon_index__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
||||
name: icon,
|
||||
color: iconColor,
|
||||
classPrefix: iconPrefix,
|
||||
dot: dot,
|
||||
info: badge || info,
|
||||
size: parentState === null || parentState === void 0 ? void 0 : parentState.iconSize
|
||||
}) : parentState.renderIcon
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, {
|
||||
className: "van-grid-item__text text-class",
|
||||
children: text ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, {
|
||||
children: text
|
||||
}) : parentState.renderText
|
||||
})]
|
||||
})
|
||||
})
|
||||
});
|
||||
}
|
||||
/* harmony default export */ __webpack_exports__["default"] = (GridItem);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@antmjs/vantui/es/grid-item/wxs.js":
|
||||
/*!*********************************************************!*\
|
||||
!*** ./node_modules/@antmjs/vantui/es/grid-item/wxs.js ***!
|
||||
\*********************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "wrapperStyle": function() { return /* binding */ wrapperStyle; },
|
||||
/* harmony export */ "contentStyle": function() { return /* binding */ contentStyle; }
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wxs_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../wxs/style */ "./node_modules/@antmjs/vantui/es/wxs/style.js");
|
||||
/* harmony import */ var _wxs_add_unit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../wxs/add-unit */ "./node_modules/@antmjs/vantui/es/wxs/add-unit.js");
|
||||
|
||||
|
||||
|
||||
function wrapperStyle(data) {
|
||||
var width = 100 / data.columnNum + '%';
|
||||
return (0,_wxs_style__WEBPACK_IMPORTED_MODULE_1__.style)({
|
||||
width: width,
|
||||
'padding-top': data.square ? width : null,
|
||||
'padding-right': (0,_wxs_add_unit__WEBPACK_IMPORTED_MODULE_0__.addUnit)(data.gutter),
|
||||
'margin-top': data.index >= data.columnNum && !data.square ? (0,_wxs_add_unit__WEBPACK_IMPORTED_MODULE_0__.addUnit)(data.gutter) : null
|
||||
});
|
||||
}
|
||||
|
||||
function contentStyle(data) {
|
||||
return data.square ? (0,_wxs_style__WEBPACK_IMPORTED_MODULE_1__.style)({
|
||||
right: (0,_wxs_add_unit__WEBPACK_IMPORTED_MODULE_0__.addUnit)(data.gutter),
|
||||
bottom: (0,_wxs_add_unit__WEBPACK_IMPORTED_MODULE_0__.addUnit)(data.gutter),
|
||||
height: 'auto'
|
||||
}) : '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@antmjs/vantui/es/grid/index.js":
|
||||
/*!******************************************************!*\
|
||||
!*** ./node_modules/@antmjs/vantui/es/grid/index.js ***!
|
||||
\******************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* unused harmony export Grid */
|
||||
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
|
||||
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wxs_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../wxs/utils */ "./node_modules/@antmjs/vantui/es/wxs/utils.js");
|
||||
/* harmony import */ var _wxs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./wxs */ "./node_modules/@antmjs/vantui/es/grid/wxs.js");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
|
||||
|
||||
var _excluded = ["gutter", "clickable", "columnNum", "center", "border", "direction", "iconSize", "square", "reverse", "className", "style"];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Grid(props) {
|
||||
var _props$gutter = props.gutter,
|
||||
gutter = _props$gutter === void 0 ? null : _props$gutter,
|
||||
clickable = props.clickable,
|
||||
_props$columnNum = props.columnNum,
|
||||
columnNum = _props$columnNum === void 0 ? 4 : _props$columnNum,
|
||||
_props$center = props.center,
|
||||
center = _props$center === void 0 ? true : _props$center,
|
||||
_props$border = props.border,
|
||||
border = _props$border === void 0 ? true : _props$border,
|
||||
direction = props.direction,
|
||||
_props$iconSize = props.iconSize,
|
||||
iconSize = _props$iconSize === void 0 ? '48' : _props$iconSize,
|
||||
square = props.square,
|
||||
_props$reverse = props.reverse,
|
||||
reverse = _props$reverse === void 0 ? false : _props$reverse,
|
||||
_props$className = props.className,
|
||||
className = _props$className === void 0 ? '' : _props$className,
|
||||
_props$style = props.style,
|
||||
style = _props$style === void 0 ? {} : _props$style,
|
||||
others = (0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_4__["default"])(props, _excluded);
|
||||
|
||||
var childrenInstance = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)([]);
|
||||
var updateChildren = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
||||
childrenInstance.current.forEach(function (child) {
|
||||
child.updateStyle();
|
||||
});
|
||||
}, []);
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
||||
updateChildren();
|
||||
}, [updateChildren]);
|
||||
var setChildrenInstance = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (index, instance) {
|
||||
childrenInstance.current[index] = instance;
|
||||
}, []);
|
||||
var ResetChildren = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
||||
var res = [];
|
||||
|
||||
if (others.children && Array.isArray(others.children)) {
|
||||
others.children.forEach(function (child, index) {
|
||||
res.push( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(child, {
|
||||
setChildrenInstance: setChildrenInstance,
|
||||
key: index,
|
||||
index: index,
|
||||
parentInstance: {
|
||||
columnNum: columnNum,
|
||||
border: border,
|
||||
square: square,
|
||||
gutter: gutter,
|
||||
clickable: clickable,
|
||||
center: center,
|
||||
direction: direction,
|
||||
reverse: reverse,
|
||||
iconSize: iconSize
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
return res;
|
||||
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[others.children, columnNum]);
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_5__.View, {
|
||||
className: 'van-grid ' + (border && !gutter ? 'van-hairline--top' : '') + ' ' + className,
|
||||
style: _wxs_utils__WEBPACK_IMPORTED_MODULE_1__.style([_wxs__WEBPACK_IMPORTED_MODULE_2__.rootStyle({
|
||||
gutter: gutter
|
||||
}), style]),
|
||||
children: ResetChildren
|
||||
});
|
||||
}
|
||||
/* harmony default export */ __webpack_exports__["default"] = (Grid);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@antmjs/vantui/es/grid/wxs.js":
|
||||
/*!****************************************************!*\
|
||||
!*** ./node_modules/@antmjs/vantui/es/grid/wxs.js ***!
|
||||
\****************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "rootStyle": function() { return /* binding */ rootStyle; }
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wxs_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../wxs/style */ "./node_modules/@antmjs/vantui/es/wxs/style.js");
|
||||
/* harmony import */ var _wxs_add_unit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../wxs/add-unit */ "./node_modules/@antmjs/vantui/es/wxs/add-unit.js");
|
||||
|
||||
|
||||
|
||||
function rootStyle(data) {
|
||||
return (0,_wxs_style__WEBPACK_IMPORTED_MODULE_1__.style)({
|
||||
'padding-left': (0,_wxs_add_unit__WEBPACK_IMPORTED_MODULE_0__.addUnit)(data.gutter)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@antmjs/vantui/es/icon/index.js":
|
||||
@@ -1686,7 +2197,9 @@ var Swiper_ = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.forwardRef)(Swi
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* unused harmony export Tag */
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "Tag": function() { return /* binding */ Tag; }
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
||||
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
|
||||
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
|
||||
@@ -2072,18 +2585,27 @@ var bem = (0,_memoize__WEBPACK_IMPORTED_MODULE_1__.memoize)(_bem__WEBPACK_IMPORT
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony import */ var _antmjs_vantui_es_divider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antmjs/vantui/es/divider */ "./node_modules/@antmjs/vantui/es/divider/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_swiper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antmjs/vantui/es/swiper */ "./node_modules/@antmjs/vantui/es/swiper/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_swiper_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antmjs/vantui/es/swiper-item */ "./node_modules/@antmjs/vantui/es/swiper-item/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_image__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antmjs/vantui/es/image */ "./node_modules/@antmjs/vantui/es/image/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_tag__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @antmjs/vantui/es/tag */ "./node_modules/@antmjs/vantui/es/tag/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_notice_bar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @antmjs/vantui/es/notice-bar */ "./node_modules/@antmjs/vantui/es/notice-bar/index.js");
|
||||
/* harmony import */ var _Users_eric_Desktop_citynew_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
|
||||
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__);
|
||||
/* harmony import */ var _antmjs_vantui_es_card__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antmjs/vantui/es/card */ "./node_modules/@antmjs/vantui/es/card/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_divider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antmjs/vantui/es/divider */ "./node_modules/@antmjs/vantui/es/divider/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @antmjs/vantui/es/grid */ "./node_modules/@antmjs/vantui/es/grid/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_grid_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @antmjs/vantui/es/grid-item */ "./node_modules/@antmjs/vantui/es/grid-item/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_swiper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @antmjs/vantui/es/swiper */ "./node_modules/@antmjs/vantui/es/swiper/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_swiper_item__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @antmjs/vantui/es/swiper-item */ "./node_modules/@antmjs/vantui/es/swiper-item/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_image__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @antmjs/vantui/es/image */ "./node_modules/@antmjs/vantui/es/image/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_tag__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @antmjs/vantui/es/tag */ "./node_modules/@antmjs/vantui/es/tag/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_notice_bar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @antmjs/vantui/es/notice-bar */ "./node_modules/@antmjs/vantui/es/notice-bar/index.js");
|
||||
/* harmony import */ var _Users_eric_Desktop_citynew_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
|
||||
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2103,25 +2625,25 @@ var bem = (0,_memoize__WEBPACK_IMPORTED_MODULE_1__.memoize)(_bem__WEBPACK_IMPORT
|
||||
|
||||
var Home = function Home() {
|
||||
// const { images } = COMMON
|
||||
var _react$useState = react__WEBPACK_IMPORTED_MODULE_6___default().useState(0),
|
||||
_react$useState2 = (0,_Users_eric_Desktop_citynew_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_react$useState, 2),
|
||||
var _react$useState = react__WEBPACK_IMPORTED_MODULE_9___default().useState(0),
|
||||
_react$useState2 = (0,_Users_eric_Desktop_citynew_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_11__["default"])(_react$useState, 2),
|
||||
initPage1 = _react$useState2[0],
|
||||
setInitPage1 = _react$useState2[1];
|
||||
var onChange = function onChange(e) {};
|
||||
var images = ["cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/download.jpg", "cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images.jpg"];
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_antmjs_vantui_es_notice_bar__WEBPACK_IMPORTED_MODULE_5__["default"], {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_12__.View, {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_antmjs_vantui_es_notice_bar__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
||||
leftIcon: "volume-o",
|
||||
text: "\u5728\u4EE3\u7801\u9605\u8BFB\u8FC7\u7A0B\u4E2D\u4EBA\u4EEC\u8BF4\u810F\u8BDD\u7684\u9891\u7387\u662F\u8861\u91CF\u4EE3\u7801\u8D28\u91CF\u7684\u552F\u4E00\u6807\u51C6\u3002"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_antmjs_vantui_es_tag__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_12__.View, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_antmjs_vantui_es_tag__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
||||
plain: true,
|
||||
type: "primary",
|
||||
children: "\u6DF1\u5733"
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_12__.View, {
|
||||
className: "demo-box",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_antmjs_vantui_es_swiper__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_antmjs_vantui_es_swiper__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
||||
height: 200,
|
||||
paginationColor: "#426543",
|
||||
autoPlay: "3000",
|
||||
@@ -2129,8 +2651,8 @@ var Home = function Home() {
|
||||
paginationVisible: true,
|
||||
onChange: onChange,
|
||||
children: images.map(function (item, index) {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_antmjs_vantui_es_swiper_item__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_antmjs_vantui_es_image__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_antmjs_vantui_es_swiper_item__WEBPACK_IMPORTED_MODULE_5__["default"], {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_antmjs_vantui_es_image__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
||||
src: item,
|
||||
fit: "cover",
|
||||
width: "100%",
|
||||
@@ -2139,11 +2661,40 @@ var Home = function Home() {
|
||||
}, "swiper#demo1".concat(index));
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_antmjs_vantui_es_divider__WEBPACK_IMPORTED_MODULE_0__["default"], {})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(_antmjs_vantui_es_grid__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_antmjs_vantui_es_grid_item__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
||||
icon: "photo-o",
|
||||
text: "\u6D3B\u52A8"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_antmjs_vantui_es_grid_item__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
||||
icon: "photo-o",
|
||||
text: "\u6D3B\u52A8"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_antmjs_vantui_es_grid_item__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
||||
icon: "photo-o",
|
||||
text: "\u6D3B\u52A8"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_antmjs_vantui_es_grid_item__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
||||
icon: "photo-o",
|
||||
text: "\u6D3B\u52A8"
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_12__.View, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_antmjs_vantui_es_divider__WEBPACK_IMPORTED_MODULE_1__["default"], {})
|
||||
}), [1, 2].map(function (item) {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_antmjs_vantui_es_card__WEBPACK_IMPORTED_MODULE_0__["default"], {
|
||||
num: "",
|
||||
price: "",
|
||||
desc: "\u62A5\u540D\u4E2D",
|
||||
title: "\u5468\u672B\u722C\u5C71",
|
||||
thumb: "cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images.jpg"
|
||||
// renderFooter={
|
||||
// <View>
|
||||
// <Button size="mini">按钮1</Button>
|
||||
// <Button size="mini">按钮2</Button>
|
||||
// </View>
|
||||
// }
|
||||
});
|
||||
})]
|
||||
});
|
||||
};
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = (Home);
|
||||
|
||||
/***/ }),
|
||||
|
||||
2
dist/pages/home/index.js.map
vendored
2
dist/pages/home/index.js.map
vendored
File diff suppressed because one or more lines are too long
36
dist/pages/home/index.wxss
vendored
36
dist/pages/home/index.wxss
vendored
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
import { Col, Divider, Row, Tag } from "@antmjs/vantui";
|
||||
import { Button, Card, Col, Divider, Grid, GridItem, Row, Tag } from "@antmjs/vantui";
|
||||
import { View } from "@tarojs/components";
|
||||
import React, { useCallback } from "react";
|
||||
import { Swiper, SwiperItem, Image } from "@antmjs/vantui";
|
||||
@@ -32,8 +32,8 @@ const Home = () => {
|
||||
<View>
|
||||
{/* <Tag type="primary">深圳</Tag> */}
|
||||
<Tag plain={true} type="primary">
|
||||
深圳
|
||||
</Tag>
|
||||
深圳
|
||||
</Tag>
|
||||
</View>
|
||||
{/* 轮播图 */}
|
||||
<View className="demo-box">
|
||||
@@ -52,10 +52,37 @@ const Home = () => {
|
||||
))}
|
||||
</Swiper>
|
||||
</View>
|
||||
|
||||
{/* 模块 */}
|
||||
<Grid>
|
||||
<GridItem icon="photo-o" text="活动" />
|
||||
<GridItem icon="photo-o" text="活动" />
|
||||
<GridItem icon="photo-o" text="活动" />
|
||||
<GridItem icon="photo-o" text="活动" />
|
||||
</Grid>
|
||||
|
||||
{/* 分割线 */}
|
||||
<View>
|
||||
<Divider />
|
||||
</View>
|
||||
|
||||
{[1, 2].map((item: any) => {
|
||||
return (
|
||||
<Card
|
||||
num=""
|
||||
price=""
|
||||
desc="报名中"
|
||||
title="周末爬山"
|
||||
thumb="cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images.jpg"
|
||||
// renderFooter={
|
||||
// <View>
|
||||
// <Button size="mini">按钮1</Button>
|
||||
// <Button size="mini">按钮2</Button>
|
||||
// </View>
|
||||
// }
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user