Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions packages/taro-cli-convertor/report/static/js/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -8109,7 +8109,7 @@ module.exports = {"wxElifValueFormatError":{"msgTitle":"属性转换错误 wx:el
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
Expand All @@ -8123,14 +8123,14 @@ module.exports = {"wxElifValueFormatError":{"msgTitle":"属性转换错误 wx:el
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ !function() {
Expand All @@ -8143,7 +8143,7 @@ module.exports = {"wxElifValueFormatError":{"msgTitle":"属性转换错误 wx:el
/******/ return getter;
/******/ };
/******/ }();
/******/
/******/
/******/ /* webpack/runtime/create fake namespace object */
/******/ !function() {
/******/ var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };
Expand Down Expand Up @@ -8173,7 +8173,7 @@ module.exports = {"wxElifValueFormatError":{"msgTitle":"属性转换错误 wx:el
/******/ return ns;
/******/ };
/******/ }();
/******/
/******/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
Expand All @@ -8185,7 +8185,7 @@ module.exports = {"wxElifValueFormatError":{"msgTitle":"属性转换错误 wx:el
/******/ }
/******/ };
/******/ }();
/******/
/******/
/******/ /* webpack/runtime/global */
/******/ !function() {
/******/ __webpack_require__.g = (function() {
Expand All @@ -8197,12 +8197,12 @@ module.exports = {"wxElifValueFormatError":{"msgTitle":"属性转换错误 wx:el
/******/ }
/******/ })();
/******/ }();
/******/
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
Expand All @@ -8213,7 +8213,7 @@ module.exports = {"wxElifValueFormatError":{"msgTitle":"属性转换错误 wx:el
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
Expand Down Expand Up @@ -33760,8 +33760,8 @@ var Input = function Input(_ref, ref) {
_onMouseDown = _ref.onMouseDown,
_onChange = _ref.onChange,
onPaste = _ref.onPaste,
_onCompositionStart = _ref.onCompositionStart,
_onCompositionEnd = _ref.onCompositionEnd,
_onCompositionstart = _ref.onCompositionStart,
_onCompositionend = _ref.onCompositionEnd,
open = _ref.open,
attrs = _ref.attrs;
var inputNode = inputElement || /*#__PURE__*/react.createElement("input", null);
Expand Down Expand Up @@ -33820,13 +33820,13 @@ var Input = function Input(_ref, ref) {
}
},
onCompositionStart: function onCompositionStart(event) {
_onCompositionStart(event);
_onCompositionstart(event);
if (onOriginCompositionStart) {
onOriginCompositionStart(event);
}
},
onCompositionEnd: function onCompositionEnd(event) {
_onCompositionEnd(event);
_onCompositionend(event);
if (onOriginCompositionEnd) {
onOriginCompositionEnd(event);
}
Expand Down Expand Up @@ -51175,11 +51175,11 @@ var Search = /*#__PURE__*/react.forwardRef(function (props, ref) {
})];
}
var cls = classnames_default()(prefixCls, (_classNames = {}, defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), !!size), defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-with-button"), !!enterButton), _classNames), className);
var handleOnCompositionStart = function handleOnCompositionStart(e) {
var handleonCompositionstart = function handleonCompositionstart(e) {
composedRef.current = true;
onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e);
};
var handleOnCompositionEnd = function handleOnCompositionEnd(e) {
var handleonCompositionend = function handleonCompositionend(e) {
composedRef.current = false;
onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
};
Expand All @@ -51188,8 +51188,8 @@ var Search = /*#__PURE__*/react.forwardRef(function (props, ref) {
onPressEnter: onPressEnter
}, restProps, {
size: size,
onCompositionStart: handleOnCompositionStart,
onCompositionEnd: handleOnCompositionEnd,
onCompositionStart: handleonCompositionstart,
onCompositionEnd: handleonCompositionend,
prefixCls: inputPrefixCls,
addonAfter: button,
suffix: suffix,
Expand Down
9,799 changes: 9,798 additions & 1 deletion packages/taro-cli-convertor/report/static/js/bundle.js.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions packages/taro-components-react/src/components/input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ class Input extends React.Component<IProps, null> {
this.handleComposition = this.handleComposition.bind(this)
this.handleBeforeInput = this.handleBeforeInput.bind(this)
this.isOnComposition = false
this.onInputExcuted = false
this.onInputExecuted = false
}

inputRef: HTMLInputElement
isOnComposition: boolean
onInputExcuted: boolean
onInputExecuted: boolean

componentDidMount () {
// 修复无法选择文件
Expand Down Expand Up @@ -90,10 +90,10 @@ class Input extends React.Component<IProps, null> {
onInput
} = this.props

if (!this.isOnComposition && !this.onInputExcuted) {
if (!this.isOnComposition && !this.onInputExecuted) {
let { value } = e.target
const inputType = getTrueType(type, confirmType, password)
this.onInputExcuted = true
this.onInputExecuted = true
/* 修复 number 类型 maxLength 无效 */
if (inputType === 'number' && value && maxlength <= value.length) {
value = value.substring(0, maxlength)
Expand All @@ -115,14 +115,14 @@ class Input extends React.Component<IProps, null> {
// }

typeof onInput === 'function' && onInput(e)
this.onInputExcuted = false
this.onInputExecuted = false
}
}

handlePaste (e) {
e.stopPropagation()
const { onPaste } = this.props
this.onInputExcuted = false
this.onInputExecuted = false
Object.defineProperty(e, 'detail', {
value: {
value: e.target.value
Expand All @@ -134,7 +134,7 @@ class Input extends React.Component<IProps, null> {
handleFocus (e) {
e.stopPropagation()
const { onFocus } = this.props
this.onInputExcuted = false
this.onInputExecuted = false
Object.defineProperty(e, 'detail', {
value: {
value: e.target.value
Expand All @@ -159,7 +159,7 @@ class Input extends React.Component<IProps, null> {
const { onConfirm, onKeyDown } = this.props
const { value } = e.target
const keyCode = e.keyCode || e.code
this.onInputExcuted = false
this.onInputExecuted = false

if (typeof onKeyDown === 'function') {
Object.defineProperty(e, 'detail', {
Expand Down
22 changes: 11 additions & 11 deletions packages/taro-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,42 +56,42 @@
"node": ">= 18"
},
"dependencies": {
"@stencil/core": "2.22.3",
"hammerjs": "^2.0.8",
"@stencil/core": "3.4.2",
"@tarojs/runtime": "workspace:*",
"@tarojs/shared": "workspace:*",
"@tarojs/taro": "workspace:*",
"classnames": "^2.2.5",
"hammerjs": "^2.0.8",
"hls.js": "^1.1.5",
"resolve-pathname": "^3.0.0",
"swiper": "11.1.15",
"tslib": "^2.6.2"
},
"devDependencies": {
"@tarojs/helper": "workspace:*",
"@babel/generator": "^7.21.4",
"@babel/parser": "^7.23.0",
"@babel/traverse": "^7.21.4",
"@babel/types": "^7.23.0",
"@stencil/react-output-target": "0.4.0",
"@stencil/vue-output-target": "0.7.0",
"@tarojs/helper": "workspace:*",
"@types/jest": "^27.4.1",
"change-case": "^4.1.2",
"csstype": "^3.1.1",
"esbuild": "~0.21.0",
"jest": "27.5.1",
"jest-cli": "27.5.1",
"jest-environment-node": "27.5.1",
"jest-runner": "27.5.1",
"lightningcss": "^1.22.1",
"lodash": "^4.17.21",
"miniapp-types": "1.6.0",
"mkdirp": "^1.0.4",
"puppeteer": "^19.2.0",
"sass": "^1.58.3",
"tsconfig-paths": "^3.14.1",
"rollup-plugin-node-externals": "^5.0.0",
"puppeteer": "^20.9.0",
"rollup": "^3.29.4",
"jest": "27.5.1",
"jest-cli": "27.5.1",
"jest-runner": "27.5.1",
"jest-environment-node": "27.5.1"
"rollup-plugin-node-externals": "^5.0.0",
"sass": "^1.58.3",
"tsconfig-paths": "^3.14.1"
},
"peerDependenciesMeta": {
"@types/react": {
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-components/src/components/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ export class Input implements ComponentInterface {
onChange={this.handleChange}
onKeyDown={this.handleKeyDown}
onPaste={this.handlePaste}
onCompositionStart={this.handleComposition}
onCompositionEnd={this.handleComposition}
onCompositionstart={this.handleComposition}
onCompositionend={this.handleComposition}
{...nativeProps}
value={fixControlledValue(value)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class PullToRefresh implements ComponentInterface {

triggerPullDownRefresh = (flag: boolean) => {
// 在初始化时、用代码 自动 触发 pullDownRefresh
// 添加this._isMounted的判断,否则组建一实例化,currSt就会是finish
// 添加 this._isMounted 的判断,否则组件一实例化,currSt 就会是 finish
if (!this.dragOnEdge && this._isMounted) {
if (flag) {
this._lastScreenY = this.distanceToRefresh + 1
Expand All @@ -136,7 +136,14 @@ export class PullToRefresh implements ComponentInterface {
this.el.appendChild = child?.appendChild.bind(child)
this.el.insertBefore = child?.insertBefore.bind(child)
this.el.replaceChild = child?.replaceChild.bind(child)
this.el.removeChild = child?.removeChild.bind(child)

const originalRemoveChild = this.el.removeChild.bind(this.el)
this.el.removeChild = (node: Node) => {
if (child && node.parentNode === child) {
return child.removeChild(node)
}
return originalRemoveChild(node)
}
this._to = {
touchstart: this.onTouchStart.bind(this, ele),
touchmove: this.onTouchMove.bind(this, ele),
Expand All @@ -151,7 +158,7 @@ export class PullToRefresh implements ComponentInterface {
destroy = () => {
// fix 频繁切换页面,可能会导致 this._to 为空造成报错
if(!this._to) return

const ele = this.scrollContainer
Object.keys(this._to).forEach(key => {
ele.removeEventListener(key, this._to[key])
Expand Down Expand Up @@ -196,7 +203,7 @@ export class PullToRefresh implements ComponentInterface {

if (this.isEdge(ele)) {
if (!this.dragOnEdge) {
// 当用户开始往上滑的时候isEdge还是false的话,会导致this._ScreenY不是想要的,只有当isEdge为true时,再上滑,才有意义
// 当用户开始往上滑的时候 isEdge 还是 false 的话,会导致 this._ScreenY 不是想要的,只有当 isEdge 为 true 时,再上滑,才有意义
// 下面这行代码解决了上面这个问题
this._ScreenY = this._startScreenY = e.touches[0].screenY
this.dragOnEdge = true
Expand Down
Loading
Loading