sadais-piui 1.2.7-beta185 → 1.2.7-beta186

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -713,12 +713,12 @@ export default {
713
713
  },
714
714
  async handleDelete(index) {
715
715
  let val = null
716
- const beforeRemove = this.beforeRemove[PI_DEFAULT_FN_FLAG]
716
+ const beforeRemove = this.beforeRemove && this.beforeRemove[PI_DEFAULT_FN_FLAG]
717
717
  ? this.beforeRemove.fn
718
718
  : this.beforeRemove
719
719
  if (this.$pi.lang.isFunction(beforeRemove)) {
720
720
  // 删除之前的钩子, 如果定义了则使用钩子删除文件
721
- val = await beforeRemove(index)
721
+ val = await beforeRemove(index, this.val)
722
722
  } else {
723
723
  val = this.isValString ? '' : this.val.filter((_, i) => i !== index)
724
724
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sadais-piui",
3
- "version": "1.2.7-beta185",
3
+ "version": "1.2.7-beta186",
4
4
  "description": "piui组件库",
5
5
  "main": "index.js",
6
6
  "scripts": {