xs-common-plugins 1.4.13 → 1.4.15

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.
@@ -4,18 +4,84 @@
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="chore(common): 移除对话框点击遮罩关闭功能并更新包信息&#10;&#10;- 移除了 el-dialog close-on-click-modal 属性配置&#10;- 将包版本从 1.4.11 更新到 1.4.12&#10;- 清空了作者信息字段">
7
+ <list default="true" id="18da8823-8844-430e-8765-342a5b83382e" name="更改" comment="refactor(watermark): 将水印实现从Canvas改为SVG模式&#10;&#10;- 使用SVG pattern实现水印背景,替代原有的Canvas绘制方式&#10;- 移除watermarkUrl状态变量和updateWatermark方法&#10;- 添加tileWidth和tileHeight配置参数&#10;- 使用SVG text元素直接渲染用户名和时间信息&#10;- 更新样式设置,添加宽高覆盖整个视口&#10;- 简化组件生命周期逻辑,移除不必要的watch监听">
8
8
  <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/src/common/common.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/common/common.js" afterDir="false" />
10
9
  </list>
11
10
  <option name="SHOW_DIALOG" value="false" />
12
11
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
13
12
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14
13
  <option name="LAST_RESOLUTION" value="IGNORE" />
15
14
  </component>
15
+ <component name="EmbeddingIndexingInfo">
16
+ <option name="cachedIndexableFilesCount" value="209" />
17
+ <option name="fileBasedEmbeddingIndicesEnabled" value="true" />
18
+ </component>
16
19
  <component name="Git.Settings">
17
20
  <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
18
21
  </component>
22
+ <component name="McpProjectServerCommands">
23
+ <commands />
24
+ <urls />
25
+ </component>
26
+ <component name="NextEditCompletionFeaturesState">
27
+ <decayedCancelled>
28
+ <entry key="MS100" value="1.9265880618903708" />
29
+ <entry key="MS500" value="1.9848664428955507" />
30
+ <entry key="S2" value="1.9961949481330543" />
31
+ <entry key="S5" value="1.9984762383082793" />
32
+ <entry key="S10" value="1.9992378287015957" />
33
+ <entry key="S30" value="1.9997458783281803" />
34
+ <entry key="S60" value="1.9998729814565301" />
35
+ <entry key="M2" value="2.000160886554152" />
36
+ <entry key="M5" value="2.034682375355861" />
37
+ <entry key="M10" value="2.18628756191931" />
38
+ <entry key="M15" value="2.3261852932242633" />
39
+ <entry key="M30" value="2.5711295181350264" />
40
+ <entry key="H1" value="2.755731799529762" />
41
+ <entry key="H2" value="2.869328520343717" />
42
+ <entry key="H4" value="2.9323779233514786" />
43
+ <entry key="D1" value="2.988398321708533" />
44
+ <entry key="W1" value="2.9983343170823886" />
45
+ </decayedCancelled>
46
+ <decayedSelected>
47
+ <entry key="MS100" value="0.0" />
48
+ <entry key="MS500" value="0.0" />
49
+ <entry key="S2" value="1.9306798729709697E-221" />
50
+ <entry key="S5" value="5.179455518385939E-89" />
51
+ <entry key="S10" value="7.196843418045123E-45" />
52
+ <entry key="S30" value="1.9306965384839733E-15" />
53
+ <entry key="S60" value="4.39396920617791E-8" />
54
+ <entry key="M2" value="2.096179669345619E-4" />
55
+ <entry key="M5" value="0.03377313700557834" />
56
+ <entry key="M10" value="0.18377469087330373" />
57
+ <entry key="M15" value="0.32323903429147927" />
58
+ <entry key="M30" value="0.568541145645132" />
59
+ <entry key="H1" value="0.7540166746466105" />
60
+ <entry key="H2" value="0.8683413353322588" />
61
+ <entry key="H4" value="0.9318483435260582" />
62
+ <entry key="D1" value="0.9883047277954354" />
63
+ <entry key="W1" value="0.9983208114393636" />
64
+ </decayedSelected>
65
+ <decayedShown>
66
+ <entry key="MS100" value="1.0040697931365576" />
67
+ <entry key="MS500" value="1.584436399791107" />
68
+ <entry key="S2" value="1.8761489400287785" />
69
+ <entry key="S5" value="1.948608328329582" />
70
+ <entry key="S10" value="1.9739850215784476" />
71
+ <entry key="S30" value="1.9912564088095397" />
72
+ <entry key="S60" value="1.9956192405581563" />
73
+ <entry key="M2" value="1.9982346885790363" />
74
+ <entry key="M5" value="2.0671701009233714" />
75
+ <entry key="M10" value="2.3684536792556794" />
76
+ <entry key="M15" value="2.6477522591130955" />
77
+ <entry key="M30" value="3.1383066870721206" />
78
+ <entry key="H1" value="3.508866744111889" />
79
+ <entry key="H2" value="3.737167407776386" />
80
+ <entry key="H4" value="3.863957935029454" />
81
+ <entry key="D1" value="3.976655792463038" />
82
+ <entry key="W1" value="3.9966483132613475" />
83
+ </decayedShown>
84
+ </component>
19
85
  <component name="ProjectColorInfo">{
20
86
  &quot;associatedIndex&quot;: 3
21
87
  }</component>
@@ -25,34 +91,43 @@
25
91
  <option name="hideEmptyMiddlePackages" value="true" />
26
92
  <option name="showLibraryContents" value="true" />
27
93
  </component>
28
- <component name="PropertiesComponent"><![CDATA[{
29
- "keyToString": {
30
- "ModuleVcsDetector.initialDetectionPerformed": "true",
31
- "RunOnceActivity.ShowReadmeOnStart": "true",
32
- "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
33
- "RunOnceActivity.git.unshallow": "true",
34
- "RunOnceActivity.typescript.service.memoryLimit.init": "true",
35
- "com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultAutoModeForALLUsers.v1": "true",
36
- "com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true",
37
- "git-widget-placeholder": "master",
38
- "javascript.preferred.runtime.type.id": "node",
39
- "junie.onboarding.icon.badge.shown": "true",
40
- "node.js.detected.package.eslint": "true",
41
- "node.js.detected.package.tslint": "true",
42
- "node.js.selected.package.eslint": "(autodetect)",
43
- "node.js.selected.package.tslint": "(autodetect)",
44
- "nodejs_interpreter_path": "node",
45
- "nodejs_package_manager_path": "npm",
46
- "settings.editor.selected.configurable": "editor.preferences.fonts.default",
47
- "to.speed.mode.migration.done": "true",
48
- "ts.external.directory.path": "/Applications/WebStorm.app/Contents/plugins/javascript-plugin/jsLanguageServicesImpl/external",
49
- "vue.rearranger.settings.migration": "true"
94
+ <component name="PropertiesComponent">{
95
+ &quot;keyToString&quot;: {
96
+ &quot;ModuleVcsDetector.initialDetectionPerformed&quot;: &quot;true&quot;,
97
+ &quot;RunOnceActivity.MCP Project settings loaded&quot;: &quot;true&quot;,
98
+ &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
99
+ &quot;RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252&quot;: &quot;true&quot;,
100
+ &quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
101
+ &quot;RunOnceActivity.typescript.service.memoryLimit.init&quot;: &quot;true&quot;,
102
+ &quot;codeWithMe.voiceChat.enabledByDefault&quot;: &quot;false&quot;,
103
+ &quot;com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultAutoModeForALLUsers.v1&quot;: &quot;true&quot;,
104
+ &quot;com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1&quot;: &quot;true&quot;,
105
+ &quot;git-widget-placeholder&quot;: &quot;master&quot;,
106
+ &quot;javascript.nodejs.core.library.configured.version&quot;: &quot;24.12.0&quot;,
107
+ &quot;javascript.nodejs.core.library.typings.version&quot;: &quot;24.12.4&quot;,
108
+ &quot;javascript.preferred.runtime.type.id&quot;: &quot;node&quot;,
109
+ &quot;junie.onboarding.icon.badge.shown&quot;: &quot;true&quot;,
110
+ &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
111
+ &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
112
+ &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
113
+ &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
114
+ &quot;nodejs_interpreter_path&quot;: &quot;node&quot;,
115
+ &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
116
+ &quot;settings.editor.selected.configurable&quot;: &quot;editor.preferences.fonts.default&quot;,
117
+ &quot;to.speed.mode.migration.done&quot;: &quot;true&quot;,
118
+ &quot;ts.external.directory.path&quot;: &quot;/Applications/WebStorm.app/Contents/plugins/javascript-plugin/jsLanguageServicesImpl/external&quot;,
119
+ &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
50
120
  }
51
- }]]></component>
121
+ }</component>
122
+ <component name="RecentsManager">
123
+ <key name="MoveFile.RECENT_KEYS">
124
+ <recent name="$PROJECT_DIR$/src/components" />
125
+ </key>
126
+ </component>
52
127
  <component name="SharedIndexes">
53
128
  <attachedChunks>
54
129
  <set>
55
- <option value="bundled-js-predefined-d6986cc7102b-9b0f141eb926-JavaScript-WS-253.31033.133" />
130
+ <option value="bundled-js-predefined-d6986cc7102b-31caf2ab9e3c-JavaScript-WS-261.24374.125" />
56
131
  </set>
57
132
  </attachedChunks>
58
133
  </component>
@@ -72,7 +147,13 @@
72
147
  <workItem from="1768291265910" duration="1000" />
73
148
  <workItem from="1772155854565" duration="1270000" />
74
149
  <workItem from="1772171331103" duration="200000" />
75
- <workItem from="1772172034321" duration="488000" />
150
+ <workItem from="1772172034321" duration="530000" />
151
+ <workItem from="1772172632388" duration="25000" />
152
+ <workItem from="1774575231644" duration="121000" />
153
+ <workItem from="1774576542082" duration="398000" />
154
+ <workItem from="1775201568213" duration="22000" />
155
+ <workItem from="1779783294183" duration="1782000" />
156
+ <workItem from="1779853203685" duration="783000" />
76
157
  </task>
77
158
  <task id="LOCAL-00001" summary="fix(table): 更新单元格分析逻辑以正确处理括号- 替换正则表达式检测为 includes 方法检测括号和 null&#10;- 确保只在包含成对括号且不含 null 时才匹配&#10;&#10;chore: 升级版本号至 1.4.9">
78
159
  <option name="closed" value="true" />
@@ -106,7 +187,39 @@
106
187
  <option name="project" value="LOCAL" />
107
188
  <updated>1772171500658</updated>
108
189
  </task>
109
- <option name="localTasksCounter" value="5" />
190
+ <task id="LOCAL-00005" summary="chore(common): 优化代码格式并更新版本号&#10;&#10;- 移除未使用的 router 导入&#10;- 统一导入语句格式,调整 OrgEnum 和 xs-request 导入格式&#10;- 标准化代码缩进和空格格式&#10;- 在 popup 方法中添加 dialogCfg 默认配置项&#10;- 更新 package.json 版本号从 1.4.12 到 1.4.13&#10;- 优化函数内部的代码格式和括号位置">
191
+ <option name="closed" value="true" />
192
+ <created>1772172563001</created>
193
+ <option name="number" value="00005" />
194
+ <option name="presentableId" value="LOCAL-00005" />
195
+ <option name="project" value="LOCAL" />
196
+ <updated>1772172563001</updated>
197
+ </task>
198
+ <task id="LOCAL-00006" summary="feat(App): 添加全局水印功能&#10;&#10;- 在 App.vue 中引入并注册 GlobalWatermark 组件&#10;- 创建 GlobalWatermark.vue 组件实现水印生成功能&#10;- 水印包含用户名和当前时间信息&#10;- 实现定时更新水印机制,每分钟刷新一次&#10;- 修复 common.js 中请求函数缺少返回值的问题&#10;- 更新项目版本号从 1.4.13 到 1.4.15">
199
+ <option name="closed" value="true" />
200
+ <created>1779784688358</created>
201
+ <option name="number" value="00006" />
202
+ <option name="presentableId" value="LOCAL-00006" />
203
+ <option name="project" value="LOCAL" />
204
+ <updated>1779784688358</updated>
205
+ </task>
206
+ <task id="LOCAL-00007" summary="chore(watermark): 移除水印组件中的调试日志&#10;&#10;- 删除了 console.log(dpr) 调试语句&#10;- 清理了水印绘制相关的冗余代码&#10;- 优化了组件性能表现">
207
+ <option name="closed" value="true" />
208
+ <created>1779784841440</created>
209
+ <option name="number" value="00007" />
210
+ <option name="presentableId" value="LOCAL-00007" />
211
+ <option name="project" value="LOCAL" />
212
+ <updated>1779784841440</updated>
213
+ </task>
214
+ <task id="LOCAL-00008" summary="refactor(watermark): 将水印实现从Canvas改为SVG模式&#10;&#10;- 使用SVG pattern实现水印背景,替代原有的Canvas绘制方式&#10;- 移除watermarkUrl状态变量和updateWatermark方法&#10;- 添加tileWidth和tileHeight配置参数&#10;- 使用SVG text元素直接渲染用户名和时间信息&#10;- 更新样式设置,添加宽高覆盖整个视口&#10;- 简化组件生命周期逻辑,移除不必要的watch监听">
215
+ <option name="closed" value="true" />
216
+ <created>1779862572209</created>
217
+ <option name="number" value="00008" />
218
+ <option name="presentableId" value="LOCAL-00008" />
219
+ <option name="project" value="LOCAL" />
220
+ <updated>1779862572209</updated>
221
+ </task>
222
+ <option name="localTasksCounter" value="9" />
110
223
  <servers />
111
224
  </component>
112
225
  <component name="TypeScriptGeneratedFilesManager">
@@ -117,7 +230,19 @@
117
230
  <map>
118
231
  <entry key="MAIN">
119
232
  <value>
120
- <State />
233
+ <State>
234
+ <option name="FILTERS">
235
+ <map>
236
+ <entry key="branch">
237
+ <value>
238
+ <list>
239
+ <option value="origin/master" />
240
+ </list>
241
+ </value>
242
+ </entry>
243
+ </map>
244
+ </option>
245
+ </State>
121
246
  </value>
122
247
  </entry>
123
248
  </map>
@@ -129,6 +254,11 @@
129
254
  <MESSAGE value="feat(common): 添加弹窗ESC关闭功能并优化OSS服务&#10;&#10;- 在popup函数中新增closeOnPressEscape参数,默认值为false&#10;- 将closeOnPressEscape参数传递给对话框配置&#10;- 优化OSS服务中的getOssToken函数,防止重复请求&#10;- 添加getIng变量控制请求状态&#10;-" />
130
255
  <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" />
131
256
  <MESSAGE value="chore(common): 移除对话框点击遮罩关闭功能并更新包信息&#10;&#10;- 移除了 el-dialog 的 close-on-click-modal 属性配置&#10;- 将包版本从 1.4.11 更新到 1.4.12&#10;- 清空了作者信息字段" />
132
- <option name="LAST_COMMIT_MESSAGE" value="chore(common): 移除对话框点击遮罩关闭功能并更新包信息&#10;&#10;- 移除了 el-dialog 的 close-on-click-modal 属性配置&#10;- 将包版本从 1.4.11 更新到 1.4.12&#10;- 清空了作者信息字段" />
257
+ <MESSAGE value="chore(common): 优化代码格式并更新版本号&#10;&#10;- 移除未使用的 router 导入&#10;- 统一导入语句格式,调整 OrgEnum xs-request 导入格式&#10;- 标准化代码缩进和空格格式&#10;- 在" />
258
+ <MESSAGE value="chore(common): 优化代码格式并更新版本号&#10;&#10;- 移除未使用的 router 导入&#10;- 统一导入语句格式,调整 OrgEnum 和 xs-request 导入格式&#10;- 标准化代码缩进和空格格式&#10;- 在 popup 方法中添加 dialogCfg 默认配置项&#10;- 更新 package.json 版本号从 1.4.12 到 1.4.13&#10;- 优化函数内部的代码格式和括号位置" />
259
+ <MESSAGE value="feat(App): 添加全局水印功能&#10;&#10;- 在 App.vue 中引入并注册 GlobalWatermark 组件&#10;- 创建 GlobalWatermark.vue 组件实现水印生成功能&#10;- 水印包含用户名和当前时间信息&#10;- 实现定时更新水印机制,每分钟刷新一次&#10;- 修复 common.js 中请求函数缺少返回值的问题&#10;- 更新项目版本号从 1.4.13 到 1.4.15" />
260
+ <MESSAGE value="chore(watermark): 移除水印组件中的调试日志&#10;&#10;- 删除了 console.log(dpr) 调试" />
261
+ <MESSAGE value="refactor(watermark): 将水印实现从Canvas改为SVG模式&#10;&#10;- 使用SVG pattern实现水印背景,替代原有的Canvas绘制方式&#10;- 移除watermarkUrl状态变量和updateWatermark方法&#10;- 添加tileWidth和tileHeight配置参数&#10;- 使用SVG text元素直接渲染用户名和时间信息&#10;- 更新样式设置,添加宽高覆盖整个视口&#10;- 简化组件生命周期逻辑,移除不必要的watch监听" />
262
+ <option name="LAST_COMMIT_MESSAGE" value="refactor(watermark): 将水印实现从Canvas改为SVG模式&#10;&#10;- 使用SVG pattern实现水印背景,替代原有的Canvas绘制方式&#10;- 移除watermarkUrl状态变量和updateWatermark方法&#10;- 添加tileWidth和tileHeight配置参数&#10;- 使用SVG text元素直接渲染用户名和时间信息&#10;- 更新样式设置,添加宽高覆盖整个视口&#10;- 简化组件生命周期逻辑,移除不必要的watch监听" />
133
263
  </component>
134
264
  </project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xs-common-plugins",
3
- "version": "1.4.13",
3
+ "version": "1.4.15",
4
4
  "description": "向上公共代码部分",
5
5
  "author": "",
6
6
  "main": "index.js",
@@ -12,4 +12,4 @@
12
12
  "type": "git",
13
13
  "url": "https://gitlab.365xs.cn/web/npm/xs-common-plugins.git"
14
14
  }
15
- }
15
+ }
package/src/App.vue CHANGED
@@ -1,14 +1,17 @@
1
1
  <template>
2
2
  <div id="app">
3
+ <GlobalWatermark></GlobalWatermark>
3
4
  <router-view/>
4
5
  <router-view name="websocket"/>
5
6
  </div>
6
7
  </template>
7
8
 
8
9
  <script>
10
+ import GlobalWatermark from '@/components/GlobalWatermark.vue'
11
+
9
12
  export default {
10
13
  name: 'App',
11
- components: {}
14
+ components: { GlobalWatermark }
12
15
  }
13
16
 
14
17
  </script>
@@ -32,7 +32,7 @@ common.getList = (that, url, query, callBack) => {
32
32
  newQuery = obj
33
33
  }
34
34
  let request = common.getObject(url)
35
- request(query ? query : newQuery).then((res) => {
35
+ return request(query ? query : newQuery).then((res) => {
36
36
  if (callBack) {
37
37
  callBack(res)
38
38
  return
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <svg
3
+ class="global-watermark"
4
+ aria-hidden="true"
5
+ focusable="false"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ width="100%"
8
+ height="100%"
9
+ >
10
+ <defs>
11
+ <pattern
12
+ id="global-watermark-pattern"
13
+ :width="tileWidth"
14
+ :height="tileHeight"
15
+ patternUnits="userSpaceOnUse"
16
+ >
17
+ <g :transform="`rotate(-18 ${tileWidth / 2} ${tileHeight / 2})`">
18
+ <text
19
+ :x="tileWidth / 2"
20
+ :y="tileHeight / 2"
21
+ text-anchor="middle"
22
+ dominant-baseline="middle"
23
+ fill="#000000"
24
+ fill-opacity="0.1"
25
+ font-family="PingFang SC, Hiragino Sans GB, Microsoft YaHei, 微软雅黑, Arial, sans-serif"
26
+ font-size="14"
27
+ >
28
+ {{ watermarkLabel }}
29
+ </text>
30
+ </g>
31
+ </pattern>
32
+ </defs>
33
+
34
+ <rect width="100%" height="100%" fill="url(#global-watermark-pattern)" />
35
+ </svg>
36
+ </template>
37
+
38
+ <script>
39
+ import moment from 'moment'
40
+ import { getLocalStorage } from '@/utils/localStorage'
41
+
42
+ export default {
43
+ name: 'GlobalWatermark',
44
+
45
+ data() {
46
+ return {
47
+ now: Date.now(),
48
+ timer: null,
49
+ tileWidth: 400,
50
+ tileHeight: 250
51
+ }
52
+ },
53
+
54
+ computed: {
55
+ userName() {
56
+ const token = getLocalStorage('userProfile') || {}
57
+ return token.real_name || token.nickname || token.phone_number || '未登录用户'
58
+ },
59
+
60
+ watermarkLabel() {
61
+ return `${this.userName} | ${moment(this.now).format('YYYY-MM-DD HH:mm')}`
62
+ }
63
+ },
64
+
65
+ mounted() {
66
+ this.timer = window.setInterval(() => {
67
+ this.now = Date.now()
68
+ }, 60 * 1000)
69
+ },
70
+
71
+ beforeDestroy() {
72
+ if (this.timer) {
73
+ window.clearInterval(this.timer)
74
+ this.timer = null
75
+ }
76
+ }
77
+ }
78
+ </script>
79
+
80
+ <style lang="scss" scoped>
81
+ .global-watermark {
82
+ position: fixed;
83
+ inset: 0;
84
+ z-index: 99999;
85
+ width: 100vw;
86
+ height: 100vh;
87
+ pointer-events: none;
88
+ user-select: none;
89
+ }
90
+ </style>