keli-ui 0.0.9 → 0.0.11

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.
package/dist/keli-ui.js CHANGED
@@ -78209,21 +78209,19 @@ const msgTips = { alert, elNotification, tips };
78209
78209
  }
78210
78210
  })();
78211
78211
  function useCopyPaste(params) {
78212
- if (!params.rowConfig || !params.rowConfig.height) {
78212
+ if (!params.rowConfig || !params.rowConfig.height || !params.tableConfig || !params.tableConfig.paste) {
78213
78213
  return {
78214
- cellArea: () => {
78215
- },
78216
- leftFixedCellArea: () => {
78217
- },
78218
- rightFixedCellArea: () => {
78219
- },
78214
+ cellArea: null,
78215
+ leftFixedCellArea: null,
78216
+ rightFixedCellArea: null,
78220
78217
  addListener: () => {
78221
78218
  },
78222
78219
  removeListener: () => {
78223
78220
  },
78224
78221
  removeCopyShortcut: () => {
78225
78222
  },
78226
- removePasteShortcut
78223
+ removePasteShortcut: () => {
78224
+ }
78227
78225
  };
78228
78226
  }
78229
78227
  const isSelecting = ref(false);
@@ -79099,7 +79097,6 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
79099
79097
  // 当选择项发生变化时会触发该事件
79100
79098
  ], ["update:tablePagination"]),
79101
79099
  setup(__props, { emit: __emit }) {
79102
- var _a2;
79103
79100
  const props = __props;
79104
79101
  const emits = __emit;
79105
79102
  const pagination = useModel(__props, "tablePagination");
@@ -79125,8 +79122,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
79125
79122
  const btnClick = (data, button, rowIndex) => {
79126
79123
  useButtonExec(data, button, rowIndex);
79127
79124
  };
79128
- const fieldValueChanged = (fieldName, newValue, rowId) => {
79129
- emits("valueChange", fieldName, newValue, rowId);
79125
+ const fieldValueChanged = (fieldName, newValue, rowData) => {
79126
+ var _a2;
79127
+ emits("valueChange", fieldName, newValue, rowData[(_a2 = props.tableConfig) == null ? void 0 : _a2.rowKey]);
79130
79128
  };
79131
79129
  const queryClick = (data) => {
79132
79130
  queryData = data;
@@ -79142,20 +79140,32 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
79142
79140
  xGrid.value.openCustom();
79143
79141
  };
79144
79142
  const xGrid = ref();
79145
- const {
79146
- cellArea,
79147
- leftFixedCellArea,
79148
- rightFixedCellArea,
79149
- addListener,
79150
- removeListener,
79151
- removeCopyShortcut,
79152
- removePasteShortcut
79153
- } = useCopyPaste({
79154
- xGrid,
79155
- rowConfig: (_a2 = props.vxeGridOptions) == null ? void 0 : _a2.rowConfig,
79156
- fieldChange: fieldValueChanged
79157
- });
79143
+ let cellArea, leftFixedCellArea, rightFixedCellArea, addListener, removeListener, removeCopyShortcut, removePasteShortcut;
79144
+ const initCopy = () => {
79145
+ var _a2;
79146
+ const {
79147
+ cellArea: cellAreaX,
79148
+ leftFixedCellArea: leftFixedCellAreaX,
79149
+ rightFixedCellArea: rightFixedCellAreaX,
79150
+ addListener: addListenerX,
79151
+ removeListener: removeListenerX,
79152
+ removeCopyShortcut: removeCopyShortcutX,
79153
+ removePasteShortcut: removePasteShortcutX
79154
+ } = useCopyPaste({
79155
+ xGrid,
79156
+ rowConfig: (_a2 = props.vxeGridOptions) == null ? void 0 : _a2.rowConfig,
79157
+ fieldChange: fieldValueChanged
79158
+ });
79159
+ cellArea = cellAreaX;
79160
+ leftFixedCellArea = leftFixedCellAreaX;
79161
+ rightFixedCellArea = rightFixedCellAreaX;
79162
+ addListener = addListenerX;
79163
+ removeListener = removeListenerX;
79164
+ removeCopyShortcut = removeCopyShortcutX;
79165
+ removePasteShortcut = removePasteShortcutX;
79166
+ };
79158
79167
  onMounted(() => {
79168
+ initCopy();
79159
79169
  addListener();
79160
79170
  });
79161
79171
  onUnmounted(() => {