@gingkoo/pandora-explorer 0.0.1-alpha.61 → 0.0.1-alpha.62

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/lib/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @gingkoo/pandora-explorer v0.0.1-alpha.61
2
+ * @gingkoo/pandora-explorer v0.0.1-alpha.62
3
3
  */
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import cx$1 from 'classnames';
@@ -5156,6 +5156,7 @@ function Menu(props) {
5156
5156
  let edit = ['remove', 'copy', 'create', 'shear', 'paste', 'rename'];
5157
5157
  let download = ['download'];
5158
5158
  let upload = ['file-upload'];
5159
+ let delect = ['remove'];
5159
5160
  let arr = [];
5160
5161
  let _menu = menu.map(v => {
5161
5162
  let data = v;
@@ -5172,6 +5173,13 @@ function Menu(props) {
5172
5173
  });
5173
5174
  return;
5174
5175
  }
5176
+ if (!store.isDelect && delect.includes(v.key)) {
5177
+ arr.push({
5178
+ ...v,
5179
+ disabled: true
5180
+ });
5181
+ return;
5182
+ }
5175
5183
  if (!store.isDownload && download.includes(v.key)) {
5176
5184
  arr.push({
5177
5185
  ...v,
@@ -6621,11 +6629,11 @@ const SelectBox = props => {
6621
6629
  const items = e.dataTransfer.items;
6622
6630
  let files = [];
6623
6631
  let empty = [];
6624
- const getFile = item => new Promise((resolve, reject) => {
6632
+ const getFile = (item, path) => new Promise((resolve, reject) => {
6625
6633
  item.file(file => {
6626
6634
  resolve({
6627
6635
  file,
6628
- path: ''
6636
+ path: path
6629
6637
  }); // 假设路径为空字符串或根据需要调整
6630
6638
  }, reject);
6631
6639
  });
@@ -6633,7 +6641,7 @@ const SelectBox = props => {
6633
6641
  try {
6634
6642
  if (item.isFile) {
6635
6643
  // 使用自定义的 getFile 函数来获取文件
6636
- const fileInfo = await getFile(item);
6644
+ const fileInfo = await getFile(item, path);
6637
6645
  files.push(fileInfo);
6638
6646
  } else if (item.isDirectory) {
6639
6647
  const dirReader = item.createReader();
@@ -7375,7 +7383,10 @@ const Layout$1 = props => {
7375
7383
  store.setLog(arr);
7376
7384
  store.setLogIndex(arr.length);
7377
7385
  } else {
7378
- onDblclick?.(key, info);
7386
+ onDblclick?.(key, {
7387
+ info,
7388
+ isEdit: store.isEdit
7389
+ });
7379
7390
  }
7380
7391
  }
7381
7392
  function onRename(key, value, info) {
@@ -7440,6 +7451,7 @@ const Layout$1 = props => {
7440
7451
  columns: store.columns,
7441
7452
  checkType: store.checkType,
7442
7453
  isEdit: store.isEdit,
7454
+ isDelect: store.isDelect,
7443
7455
  isDownload: store.isDownload,
7444
7456
  isUpload: store.isDownload,
7445
7457
  height: height - 24,
@@ -8168,7 +8180,10 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
8168
8180
  reloadNode(param.key);
8169
8181
  return;
8170
8182
  }
8171
- _onMenuClick?.(key, param);
8183
+ _onMenuClick?.(key, {
8184
+ ...param,
8185
+ isEdit: isEdit
8186
+ });
8172
8187
  }
8173
8188
  function openMenu(props, param) {
8174
8189
  closeMenu();