antd-mini-rpx
Advanced tools
Comparing version 0.0.7-beta.2 to 0.0.7
@@ -74,3 +74,3 @@ "use strict"; | ||
}); | ||
this.cOnChange(this.getInputValue(value)); | ||
this.cOnChange(this.getInputValue(value), this.getDataSet()); | ||
(_b = (_a = this.props).onBlur) === null || _b === void 0 ? void 0 : _b.call(_a, this.getInputValue(value)); | ||
@@ -85,3 +85,3 @@ } | ||
}); | ||
this.cOnChange(this.getInputValue(value)); | ||
this.cOnChange(this.getInputValue(value), this.getDataSet()); | ||
}, | ||
@@ -112,3 +112,3 @@ getInputValue: function (inputValue) { | ||
var minusTemp = (0, utils_1.downStep)(cValue, step, precision); | ||
this.cOnChange(Math.max(minusTemp, min)); | ||
this.cOnChange(Math.max(minusTemp, min), this.getDataSet()); | ||
} | ||
@@ -118,7 +118,16 @@ else if (mode === 'add') { | ||
var addTemp = (0, utils_1.upStep)(cValue, step, precision); | ||
this.cOnChange(Math.min(addTemp, max)); | ||
this.cOnChange(Math.min(addTemp, max), this.getDataSet()); | ||
} | ||
} | ||
}, | ||
getDataSet: function () { | ||
return Object.entries(this.props).reduce(function (prev, cur) { | ||
var key = cur[0], val = cur[1]; | ||
if (key.startsWith('data-')) { | ||
prev[key.replace('data-', '')] = val; | ||
} | ||
return prev; | ||
}, {}); | ||
} | ||
}, | ||
}); |
@@ -37,4 +37,16 @@ import { IBaseFormItemProps } from '../_base'; | ||
*/ | ||
inputWidth?: string; | ||
inputWidth?: string; | ||
/** | ||
* @description 输入框宽度 | ||
*/ | ||
onFocus?: ( e: number ) => void | ||
/** | ||
* @description 输入框宽度 | ||
*/ | ||
onBlur?: ( e: number ) => void | ||
/** | ||
* @description 输入框宽度 | ||
*/ | ||
onChange?: ( e: number, dataSet: Record<string, any> ) => void | ||
} | ||
export declare const StepperDefaultProps: Partial<IStepperProps>; |
@@ -164,3 +164,3 @@ "use strict"; | ||
if (onLeftButtonTap) { | ||
return onLeftButtonTap(index, text, type, extraInfo); | ||
return onLeftButtonTap(index, text, type, extraInfo, this.getDataSet()); | ||
} | ||
@@ -177,3 +177,3 @@ }, | ||
if (onRightButtonTap) { | ||
return onRightButtonTap(index, text, type, extraInfo); | ||
return onRightButtonTap(index, text, type, extraInfo, this.getDataSet()); | ||
} | ||
@@ -192,2 +192,11 @@ }, | ||
}, | ||
getDataSet: function () { | ||
return Object.entries(this.props).reduce(function (prev, cur) { | ||
var key = cur[0], val = cur[1]; | ||
if (key.startsWith('data-')) { | ||
prev[key.replace('data-', '')] = val; | ||
} | ||
return prev; | ||
}, {}); | ||
} | ||
}, | ||
@@ -194,0 +203,0 @@ ref: function () { |
@@ -62,3 +62,3 @@ import { IBaseProps } from '../_base'; | ||
onLeftButtonTap?: | ||
(index: number, text: string, type: string, extraInfo?: unknown) => void; | ||
(index: number, text: string, type: string, extraInfo: unknown, dateSet: Record<string, any>) => void; | ||
/** | ||
@@ -70,3 +70,3 @@ * @description 点击右侧按钮回调,extraInfo是一个对象, | ||
onRightButtonTap?: | ||
(index: number, text: string, type: string, extraInfo?: unknown) => void; | ||
(index: number, text: string, type: string, extraInfo: unknown, dateSet: Record<string, any>) => void; | ||
/** | ||
@@ -73,0 +73,0 @@ * @description 获取组件实例与设置滑动距离 |
{ | ||
"name": "antd-mini-rpx", | ||
"version": "0.0.7-beta.2", | ||
"version": "0.0.7", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "dev": "minidev dev --less --typescript --no-source-map", |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
353721
6333
0