���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/rickpfrv/wiki.craftaro.com/resources/src/mediawiki.special.apisandbox/LimitParamWidget.js
���ѧ٧ѧ�
var TextParamMixin = require( './TextParamMixin.js' ); /** * A wrapper for OO.ui.TextInputWidget * * @class * @private * @constructor * @param {Object} config Configuration options */ function LimitParamWidget( config ) { LimitParamWidget.parent.call( this, config ); } OO.inheritClass( LimitParamWidget, OO.ui.TextInputWidget ); OO.mixinClass( LimitParamWidget, TextParamMixin ); /** * For a limit parameter, a value can either be "max" or a number * that is * - not NaN (not "Not-A-Number") * - finite * - not a decimal (identical to Math.floor with that number) * - at least the minimum set in paramInfo.min * - at most the maximum set in paramInfo.apiSandboxMax * * this.paramInfo should be set by the code using this widget, and * should have `min` and `apiSandboxMax` set as intergers * * @param {string} value * @return {boolean} */ LimitParamWidget.prototype.validate = function ( value ) { var n; if ( value === 'max' ) { return true; } else { n = +value; return !isNaN( n ) && isFinite( n ) && Math.floor( n ) === n && n >= this.paramInfo.min && n <= this.paramInfo.apiSandboxMax; } }; module.exports = LimitParamWidget;
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0.1 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�