@ai-table/grid 0.1.5 → 0.1.6

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.
@@ -10267,6 +10267,11 @@ class AITableGrid extends AITableGridBase {
10267
10267
  if (hasEditingCell) {
10268
10268
  return;
10269
10269
  }
10270
+ // 检查事件目标是否是输入框或文本区域
10271
+ const target = event.target;
10272
+ if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA') {
10273
+ return;
10274
+ }
10270
10275
  event.preventDefault();
10271
10276
  if (event.key === 'c') {
10272
10277
  this.copyCells();
@@ -10293,23 +10298,14 @@ class AITableGrid extends AITableGridBase {
10293
10298
  }
10294
10299
  pasteCells() {
10295
10300
  writeToAITable(this.aiTable, this.actions).then((result) => {
10301
+ if (result.isPasteOverMaxRecords || result.isPasteOverMaxFields) {
10302
+ return;
10303
+ }
10296
10304
  if (!result.isPasteSuccess) {
10297
10305
  this.notifyService.error(getI18nTextByKey(this.aiTable, AITableGridI18nKey.invalidPasteContent), undefined, {
10298
10306
  placement: 'bottomLeft'
10299
10307
  });
10300
10308
  }
10301
- if (result.isPasteOverMaxRecords) {
10302
- this.notifyService.error(getI18nTextByKey(this.aiTable, AITableGridI18nKey.pasteOverMaxRecords), undefined, {
10303
- placement: 'bottomLeft'
10304
- });
10305
- console.warn('Pasting exceeds maximum records limit');
10306
- }
10307
- if (result.isPasteOverMaxFields) {
10308
- this.notifyService.error(getI18nTextByKey(this.aiTable, AITableGridI18nKey.pasteOverMaxFields), undefined, {
10309
- placement: 'bottomLeft'
10310
- });
10311
- console.warn('Pasting exceeds maximum fields limit');
10312
- }
10313
10309
  });
10314
10310
  }
10315
10311
  handleFieldDragStart() {