xe-utils icon indicating copy to clipboard operation
xe-utils copied to clipboard

javascript 函数库、工具类

Results 22 xe-utils issues
Sort by recently updated
recently updated
newest added

### 可复现的链接: https://codesandbox.io/s/vxe-table-3-x-vue-2-6-wen-ti-yan-shi-forked-5xcdj3?file=/src/main.js ### 问题描述与截图: ![image](https://user-images.githubusercontent.com/26641698/175506240-7be8757c-bf7b-4ffa-baef-5d0e5498173e.png) ![image](https://user-images.githubusercontent.com/26641698/175506321-cf3c60b4-a9c4-4b78-b0b5-a7c7066a1400.png) ### 期望的结果: true ### 操作系统: window10 ### 浏览器版本: chrome 102.0.5005.115

bug

### 这个需求解决了什么问题: 打包的时候会报错 ### 建议的 API 是什么样的: _No response_ ### 是否已有其他不错的替代方案: 现在只能webpack打包

enhancement

此throttle函数存储了最后一次触发事件时的参数arguments和context,导致如果后续不再触发此事件,那么上一次触发事件时的dom以及组件都无法被内存回收。 比如在vxe-table中,触发mouse-wheel后表格会被缓存,后面即使销毁了表格,其内存也无法被释放。当然因为mouse-wheel事件是注册在window上的,在空白区域再次滚动鼠标滚轮,内存就会得以释放,但是新的内容又会被缓存,再关闭另一个表格或者其他组件,内存同样无法被回收。 ![image](https://user-images.githubusercontent.com/18558054/176632777-3a84e569-6dc3-46bc-917e-6a38a44f0984.png) ![image](https://user-images.githubusercontent.com/18558054/176623321-cb9c98ef-39df-4e02-bee2-62f77f231076.png) ![image](https://user-images.githubusercontent.com/18558054/176624350-36877e73-433f-4c1e-809e-f3adccac8553.png)

Fix: deep clone a object that created by Object.create(null) will report a error

### 可复现的链接: none ### 问题描述与截图: ![code](https://github.com/x-extends/xe-utils/assets/71112636/130d6cd0-9144-4b5d-b0fb-cbf6cb33ebaf) 应该是 ![code](https://github.com/x-extends/xe-utils/assets/71112636/7e4bc837-c07e-4cc5-b51f-0a61be531841) 现在按需导入老是报红,希望更新 ### 期望的结果: _No response_ ### 操作系统: _No response_ ### 浏览器版本: _No response_

bug

### 可复现的链接: 111 ### 问题描述与截图: "xe-utils": "^3.5.18" XEUtils.toDateString(item.registration_time_str, 'yyyy') ![image](https://github.com/x-extends/xe-utils/assets/44463181/e382b468-c8f2-4caa-8b45-9c4d7f3a2642) ### 期望的结果: _No response_ ### 操作系统: _No response_ ### 浏览器版本: _No response_

bug

### 可复现的链接: https://vxetable.cn/xe-utils/#/?to=uniq ### 问题描述与截图: XEUtils.uniq([{a: 1, b: 11}, {a: 1, b: 22}, {a: 4, b: 33}, {a: 5, bb: 44}], 'a') 实际输出是// [{a: 1, b: 11}, {a: 1, b:...

bug

### 可复现的链接: XEUtils.toNumber('1,000.2') 当参数中函数有千分号时候,转换的结果有误 ### 问题描述与截图: XEUtils.toNumber('1,000.2') 当参数中函数有千分号时候,转换的结果有误 ### 期望的结果: 转换时候忽略千分号字符 ### 操作系统: _No response_ ### 浏览器版本: _No response_

bug
fix

https://github.com/x-extends/xe-utils/blob/468a6dc2d6ecc1b5f1aa9a7b3758307844fec664/func/toArrayTree.js#L15

fix

### 这个需求解决了什么问题: JS自带的replace中只能替换所有符合的字符,但是我想有一个可以替换指定位置的字符,就是只修改指定位置的那一个。 ### 建议的 API 是什么样的: replaceInposition ### 是否已有其他不错的替代方案: 这个是用JS实现的简单案例: let myString = "hello"; let indexToReplace = 1; // 字符串中第二个字符,即索引值为 1 myString = myString.substring(0, indexToReplace) + "a" + myString.substring(indexToReplace...

enhancement