taro-ui 3.1.0-beta.3 → 3.1.0-beta.4
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/dist/index.esm.js +8 -25
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -24
- package/dist/index.js.map +1 -1
- package/lib/components/button/index.js +2 -24
- package/lib/components/button/index.js.map +1 -1
- package/lib/components/divider/index.js +1 -1
- package/lib/components/divider/index.js.map +1 -1
- package/lib/components/search-bar/index.js +5 -0
- package/lib/components/search-bar/index.js.map +1 -1
- package/package.json +2 -2
- package/types/base.d.ts +2 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { View, Text, OpenData, Image, Button,
|
|
2
|
+
import { View, Text, OpenData, Image, Button, Switch, ScrollView, Form, Label, Input, Textarea, Slider, MovableArea, MovableView, Swiper, SwiperItem, Picker } from '@tarojs/components';
|
|
3
3
|
import Taro from '@tarojs/taro';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
@@ -1759,28 +1759,6 @@ var AtButton = /** @class */ (function (_super) {
|
|
|
1759
1759
|
AtButton.prototype.onOpenSetting = function (event) {
|
|
1760
1760
|
this.props.onOpenSetting && this.props.onOpenSetting(event);
|
|
1761
1761
|
};
|
|
1762
|
-
AtButton.prototype.onSumit = function (event) {
|
|
1763
|
-
if (this.state.isWEAPP || this.state.isWEB) {
|
|
1764
|
-
// TODO: 3.0 this.$scope
|
|
1765
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
1766
|
-
// @ts-ignore
|
|
1767
|
-
this.$scope.triggerEvent('submit', event.detail, {
|
|
1768
|
-
bubbles: true,
|
|
1769
|
-
composed: true
|
|
1770
|
-
});
|
|
1771
|
-
}
|
|
1772
|
-
};
|
|
1773
|
-
AtButton.prototype.onReset = function (event) {
|
|
1774
|
-
if (this.state.isWEAPP || this.state.isWEB) {
|
|
1775
|
-
// TODO: 3.0 this.$scope
|
|
1776
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
1777
|
-
// @ts-ignore
|
|
1778
|
-
this.$scope.triggerEvent('reset', event.detail, {
|
|
1779
|
-
bubbles: true,
|
|
1780
|
-
composed: true
|
|
1781
|
-
});
|
|
1782
|
-
}
|
|
1783
|
-
};
|
|
1784
1762
|
AtButton.prototype.render = function () {
|
|
1785
1763
|
var _a;
|
|
1786
1764
|
var _b = this.props, _c = _b.size, size = _c === void 0 ? 'normal' : _c, _d = _b.type, type = _d === void 0 ? '' : _d, circle = _b.circle, full = _b.full, loading = _b.loading, disabled = _b.disabled, customStyle = _b.customStyle, formType = _b.formType, openType = _b.openType, lang = _b.lang, sessionFrom = _b.sessionFrom, sendMessageTitle = _b.sendMessageTitle, sendMessagePath = _b.sendMessagePath, sendMessageImg = _b.sendMessageImg, showMessageCard = _b.showMessageCard, appParameter = _b.appParameter;
|
|
@@ -1805,7 +1783,7 @@ var AtButton = /** @class */ (function (_super) {
|
|
|
1805
1783
|
var button = (React.createElement(Button, { className: 'at-button__wxbutton', formType: formType, openType: openType, lang: lang, sessionFrom: sessionFrom, sendMessageTitle: sendMessageTitle, sendMessagePath: sendMessagePath, sendMessageImg: sendMessageImg, showMessageCard: showMessageCard, appParameter: appParameter, onGetUserInfo: this.onGetUserInfo.bind(this), onGetPhoneNumber: this.onGetPhoneNumber.bind(this), onOpenSetting: this.onOpenSetting.bind(this), onError: this.onError.bind(this), onContact: this.onContact.bind(this) }));
|
|
1806
1784
|
return (React.createElement(View, { className: classnames(rootClassName, classObject, this.props.className), style: customStyle, onClick: this.onClick.bind(this) },
|
|
1807
1785
|
isWEB && !disabled && webButton,
|
|
1808
|
-
isWEAPP && !disabled &&
|
|
1786
|
+
isWEAPP && !disabled && button,
|
|
1809
1787
|
isALIPAY && !disabled && button,
|
|
1810
1788
|
loadingComponent,
|
|
1811
1789
|
React.createElement(View, { className: 'at-button__text' }, this.props.children)));
|
|
@@ -5330,6 +5308,11 @@ var AtSearchBar = /** @class */ (function (_super) {
|
|
|
5330
5308
|
};
|
|
5331
5309
|
return _this;
|
|
5332
5310
|
}
|
|
5311
|
+
AtSearchBar.prototype.UNSAFE_componentWillReceiveProps = function (nextProps) {
|
|
5312
|
+
if (nextProps.focus !== this.props.focus) {
|
|
5313
|
+
this.setState({ isFocus: !!nextProps.focus });
|
|
5314
|
+
}
|
|
5315
|
+
};
|
|
5333
5316
|
AtSearchBar.prototype.render = function () {
|
|
5334
5317
|
var _a = this.props, value = _a.value, placeholder = _a.placeholder, maxLength = _a.maxLength, fixed = _a.fixed, disabled = _a.disabled, showActionButton = _a.showActionButton, _b = _a.actionName, actionName = _b === void 0 ? '搜索' : _b, inputType = _a.inputType, // 处理issue#464
|
|
5335
5318
|
className = _a.className, customStyle = _a.customStyle;
|
|
@@ -5462,7 +5445,7 @@ var AtDivider = /** @class */ (function (_super) {
|
|
|
5462
5445
|
};
|
|
5463
5446
|
var fontStyle = {
|
|
5464
5447
|
color: fontColor,
|
|
5465
|
-
'
|
|
5448
|
+
'fontSize': fontSize ? "" + pxTransform(Number(fontSize)) : ''
|
|
5466
5449
|
};
|
|
5467
5450
|
var lineStyle = {
|
|
5468
5451
|
backgroundColor: lineColor
|