xs-common-plugins 1.4.10 → 1.4.12

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.
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/xs-common-plugins.iml" filepath="$PROJECT_DIR$/.idea/xs-common-plugins.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -4,7 +4,7 @@
4
4
  <option name="autoReloadType" value="SELECTIVE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="18da8823-8844-430e-8765-342a5b83382e" name="更改" comment="fix(table): 更新单元格分析逻辑以正确处理括号- 替换正则表达式检测为 includes 方法检测括号和 null&#10;- 确保只在包含成对括号且不含 null 时才匹配&#10;&#10;chore: 升级版本号至 1.4.9">
7
+ <list default="true" id="18da8823-8844-430e-8765-342a5b83382e" name="更改" comment="feat(common): 添加弹窗ESC关闭功能并优化OSS服务&#10;&#10;- 在popup函数中新增closeOnPressEscape参数,默认值为false&#10;- 将closeOnPressEscape参数传递给对话框配置&#10;- 优化OSS服务中的getOssToken函数,防止重复请求&#10;- 添加getIng变量控制请求状态&#10;- 在请求完成后重置getIng状态&#10;- 更新版本号从1.4.10到1.4.11">
8
8
  <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
9
9
  <change beforePath="$PROJECT_DIR$/src/common/common.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/common/common.js" afterDir="false" />
10
10
  </list>
@@ -31,25 +31,28 @@
31
31
  "RunOnceActivity.ShowReadmeOnStart": "true",
32
32
  "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
33
33
  "RunOnceActivity.git.unshallow": "true",
34
+ "RunOnceActivity.typescript.service.memoryLimit.init": "true",
34
35
  "com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultAutoModeForALLUsers.v1": "true",
35
36
  "com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true",
36
37
  "git-widget-placeholder": "master",
38
+ "javascript.preferred.runtime.type.id": "node",
37
39
  "junie.onboarding.icon.badge.shown": "true",
38
40
  "node.js.detected.package.eslint": "true",
39
41
  "node.js.detected.package.tslint": "true",
40
42
  "node.js.selected.package.eslint": "(autodetect)",
41
43
  "node.js.selected.package.tslint": "(autodetect)",
42
- "nodejs_interpreter_path": "/Users/chengjiawei/Library/Application Support/JetBrains/WebStorm2025.2/node/versions/16.20.2/bin/node",
44
+ "nodejs_interpreter_path": "node",
43
45
  "nodejs_package_manager_path": "npm",
44
46
  "settings.editor.selected.configurable": "settings.nodejs",
45
47
  "to.speed.mode.migration.done": "true",
48
+ "ts.external.directory.path": "/Applications/WebStorm.app/Contents/plugins/javascript-plugin/jsLanguageServicesImpl/external",
46
49
  "vue.rearranger.settings.migration": "true"
47
50
  }
48
51
  }]]></component>
49
52
  <component name="SharedIndexes">
50
53
  <attachedChunks>
51
54
  <set>
52
- <option value="bundled-js-predefined-d6986cc7102b-3aa1da707db6-JavaScript-WS-252.27397.92" />
55
+ <option value="bundled-js-predefined-d6986cc7102b-9b0f141eb926-JavaScript-WS-253.31033.133" />
53
56
  </set>
54
57
  </attachedChunks>
55
58
  </component>
@@ -63,7 +66,12 @@
63
66
  <workItem from="1760946187282" duration="11000" />
64
67
  <workItem from="1760946201677" duration="480000" />
65
68
  <workItem from="1760946687182" duration="513000" />
66
- <workItem from="1761553442925" duration="558000" />
69
+ <workItem from="1761553442925" duration="579000" />
70
+ <workItem from="1766645463827" duration="4000" />
71
+ <workItem from="1766654268352" duration="129000" />
72
+ <workItem from="1768291265910" duration="1000" />
73
+ <workItem from="1772155854565" duration="1270000" />
74
+ <workItem from="1772171331103" duration="161000" />
67
75
  </task>
68
76
  <task id="LOCAL-00001" summary="fix(table): 更新单元格分析逻辑以正确处理括号- 替换正则表达式检测为 includes 方法检测括号和 null&#10;- 确保只在包含成对括号且不含 null 时才匹配&#10;&#10;chore: 升级版本号至 1.4.9">
69
77
  <option name="closed" value="true" />
@@ -73,7 +81,23 @@
73
81
  <option name="project" value="LOCAL" />
74
82
  <updated>1760946269455</updated>
75
83
  </task>
76
- <option name="localTasksCounter" value="2" />
84
+ <task id="LOCAL-00002" summary="fix(table): 更新单元格分析逻辑以正确处理括号- 替换正则表达式检测为 includes 方法检测括号和 null&#10;- 确保只在包含成对括号且不含 null 时才匹配&#10;&#10;chore: 升级版本号至 1.4.9">
85
+ <option name="closed" value="true" />
86
+ <created>1761554010562</created>
87
+ <option name="number" value="00002" />
88
+ <option name="presentableId" value="LOCAL-00002" />
89
+ <option name="project" value="LOCAL" />
90
+ <updated>1761554010562</updated>
91
+ </task>
92
+ <task id="LOCAL-00003" summary="feat(common): 添加弹窗ESC关闭功能并优化OSS服务&#10;&#10;- 在popup函数中新增closeOnPressEscape参数,默认值为false&#10;- 将closeOnPressEscape参数传递给对话框配置&#10;- 优化OSS服务中的getOssToken函数,防止重复请求&#10;- 添加getIng变量控制请求状态&#10;- 在请求完成后重置getIng状态&#10;- 更新版本号从1.4.10到1.4.11">
93
+ <option name="closed" value="true" />
94
+ <created>1772155919495</created>
95
+ <option name="number" value="00003" />
96
+ <option name="presentableId" value="LOCAL-00003" />
97
+ <option name="project" value="LOCAL" />
98
+ <updated>1772155919495</updated>
99
+ </task>
100
+ <option name="localTasksCounter" value="4" />
77
101
  <servers />
78
102
  </component>
79
103
  <component name="TypeScriptGeneratedFilesManager">
@@ -93,6 +117,8 @@
93
117
  <component name="VcsManagerConfiguration">
94
118
  <MESSAGE value="fix(table): 更新单元格分析逻辑以正确处理括号- 替换正则表达式检测为 includes 方法检测括号和 null" />
95
119
  <MESSAGE value="fix(table): 更新单元格分析逻辑以正确处理括号- 替换正则表达式检测为 includes 方法检测括号和 null&#10;- 确保只在包含成对括号且不含 null 时才匹配&#10;&#10;chore: 升级版本号至 1.4.9" />
96
- <option name="LAST_COMMIT_MESSAGE" value="fix(table): 更新单元格分析逻辑以正确处理括号- 替换正则表达式检测为 includes 方法检测括号和 null&#10;- 确保只在包含成对括号且不含 null 时才匹配&#10;&#10;chore: 升级版本号至 1.4.9" />
120
+ <MESSAGE value="feat(common): 添加弹窗ESC关闭功能并优化OSS服务&#10;&#10;- 在popup函数中新增closeOnPressEscape参数,默认值为false&#10;- 将closeOnPressEscape参数传递给对话框配置&#10;- 优化OSS服务中的getOssToken函数,防止重复请求&#10;- 添加getIng变量控制请求状态&#10;-" />
121
+ <MESSAGE value="feat(common): 添加弹窗ESC关闭功能并优化OSS服务&#10;&#10;- 在popup函数中新增closeOnPressEscape参数,默认值为false&#10;- 将closeOnPressEscape参数传递给对话框配置&#10;- 优化OSS服务中的getOssToken函数,防止重复请求&#10;- 添加getIng变量控制请求状态&#10;- 在请求完成后重置getIng状态&#10;- 更新版本号从1.4.10到1.4.11" />
122
+ <option name="LAST_COMMIT_MESSAGE" value="feat(common): 添加弹窗ESC关闭功能并优化OSS服务&#10;&#10;- 在popup函数中新增closeOnPressEscape参数,默认值为false&#10;- 将closeOnPressEscape参数传递给对话框配置&#10;- 优化OSS服务中的getOssToken函数,防止重复请求&#10;- 添加getIng变量控制请求状态&#10;- 在请求完成后重置getIng状态&#10;- 更新版本号从1.4.10到1.4.11" />
97
123
  </component>
98
124
  </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="WEB_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="inheritedJdk" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ </component>
8
+ </module>
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "xs-common-plugins",
3
- "version": "1.4.10",
3
+ "version": "1.4.12",
4
4
  "description": "向上公共代码部分",
5
- "author": "祝玲云 <1902733517@qq.com>",
5
+ "author": "",
6
6
  "main": "index.js",
7
7
  "scripts": {
8
8
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -249,7 +249,7 @@ common.confirm = (that, message, title, callBack) => {
249
249
  */
250
250
  common.popup = (options) => {
251
251
  if (!options) return;
252
- const { title, component, srcData, width, showButton, callBack, props, dialogCfg } = common.clone(options);
252
+ const { title, component, srcData, width, showButton, callBack, props, dialogCfg,closeOnPressEscape = false } = common.clone(options);
253
253
  if (!component) return;
254
254
 
255
255
  const div = document.createElement("div");
@@ -328,7 +328,7 @@ common.popup = (options) => {
328
328
  },
329
329
  template: `
330
330
  <div>
331
- <el-dialog :title="title" :close-on-click-modal="closeOnPressEscape" :close-on-press-escape="closeOnPressEscape" v-el-drag-dialog :visible.sync="visible" :width="width" :before-close="beforeClose" v-bind="dialogCfg" append-to-body>
331
+ <el-dialog :title="title" :close-on-press-escape="closeOnPressEscape" v-el-drag-dialog :visible.sync="visible" :width="width" :before-close="beforeClose" v-bind="dialogCfg" append-to-body>
332
332
  <child ref="child" :srcData="srcData" v-bind="props" @close="close" @cancel="cancel"/>
333
333
  <div v-if="showButton" style="text-align: right;margin-top: 10px">
334
334
  <el-button size="medium" type="primary" @click="confirm" v-loading="loading">确认</el-button>
@@ -352,6 +352,7 @@ common.popup = (options) => {
352
352
  callBack,
353
353
  props,
354
354
  dialogCfg,
355
+ closeOnPressEscape
355
356
  },
356
357
  });
357
358
  },
@@ -6,9 +6,12 @@ import { getConfig } from '@/utils/global-config'
6
6
 
7
7
  let ossCfg = {}
8
8
 
9
+ let getIng = null
10
+
9
11
  // 去哪个服务下 获取 token 信息
10
12
  function getOssToken() {
11
- return axios
13
+ if (getIng) return getIng
14
+ getIng = axios
12
15
  .get('@commng/UserCur/Oss/Config/' + getConfig('CLIENT_ID'))
13
16
  .then(({ data }) => {
14
17
  let timestamp = new Date().getTime()
@@ -24,18 +27,22 @@ function getOssToken() {
24
27
  })
25
28
  .catch(err => {
26
29
  console.log('获取Token错误', err)
30
+ }).finally(() => {
31
+ getIng = null
27
32
  })
33
+
34
+ return getIng
28
35
  }
29
36
 
30
37
  //自动刷新token
31
- const initOssToken = function (time) {
38
+ const initOssToken = function(time) {
32
39
  setTimeout(() => {
33
40
  getOssToken()
34
41
  }, time)
35
42
  }
36
43
 
37
44
  // 从 vuex 中 获取初始化值
38
- const initToken = async function () {
45
+ const initToken = async function() {
39
46
  ossCfg = store.getters.ossCfg
40
47
  let timestamp = new Date().getTime()
41
48
  // 有效期内不发送获取token 请求
@@ -47,7 +54,7 @@ const initToken = async function () {
47
54
  return getOssToken()
48
55
  }
49
56
 
50
- const newFileName = function (id = getConfig('CLIENT_ID'), userid = getLocalStorage('userProfile').id) {
57
+ const newFileName = function(id = getConfig('CLIENT_ID'), userid = getLocalStorage('userProfile').id) {
51
58
  let dt = new Date()
52
59
  let y = dt.getFullYear()
53
60
  let m = dt.getMonth() + 1 < 10 ? '0' + (dt.getMonth() + 1) : dt.getMonth() + 1