tplus-components-mobile
Advanced tools
@@ -54,2 +54,6 @@ 'use strict'; | ||
| var _debounce = require('lodash/debounce'); | ||
| var _debounce2 = _interopRequireDefault(_debounce); | ||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -86,2 +90,5 @@ | ||
| // 引入 lodash 中的 debounce 函数 | ||
| //图标为false时不显示 | ||
@@ -110,3 +117,3 @@ var ActionControl = (_class = (_temp = _class2 = function (_Component) { | ||
| 'div', | ||
| { 'data-Name': Name, onClick: this.onClick, className: 'action' }, | ||
| { 'data-Name': Name, onClick: this.debouncedOnClick || this.onClick, className: 'action' }, | ||
| _react2.default.createElement('span', { className: 'icon iconfont ' + Src }), | ||
@@ -121,2 +128,14 @@ Title && _react2.default.createElement( | ||
| }, { | ||
| key: 'componentWillMount', | ||
| value: function componentWillMount() { | ||
| if (this.props.templateItem) { | ||
| var DebounceTime = this.props.templateItem.DebounceTime; // 假设 templateItem 中有 debounceTime 属性 | ||
| if (DebounceTime) { | ||
| this.debouncedOnClick = (0, _debounce2.default)(this.onClick, DebounceTime); | ||
| } | ||
| } | ||
| } | ||
| }, { | ||
| key: 'onClick', | ||
@@ -123,0 +142,0 @@ value: function onClick(e) { |
+1
-1
| { | ||
| "name": "tplus-components-mobile", | ||
| "version": "2.0.105", | ||
| "version": "2.0.106", | ||
| "description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1480710
0.08%16854
0.08%