xs-common-plugins 1.4.14 → 1.4.16

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,9 +4,8 @@
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(common): 修复请求函数返回值问题&#10;&#10;- 添加return语句确保请求结果正确返回&#10;- 解决因缺少返回值导致的异步调用问题">
7
+ <list default="true" id="18da8823-8844-430e-8765-342a5b83382e" name="更改" comment="refactor(watermark): 优化全局水印组件的用户名获取逻辑&#10;&#10;- 移除 computed 属性 userName,改为 data 属性&#10;- 添加 refreshUserName 方法统一处理用户信息获取&#10;- 在 mounted、watch 和定时器中调用 refreshUserName 方法&#10;- 监听路由变化时刷新用户名信息&#10;- 确保用户名信息在组件初始化时正确设置&#10;- 保持定时器每分钟更新时间和用户名的逻辑不变">
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" />
@@ -14,7 +13,7 @@
14
13
  <option name="LAST_RESOLUTION" value="IGNORE" />
15
14
  </component>
16
15
  <component name="EmbeddingIndexingInfo">
17
- <option name="cachedIndexableFilesCount" value="208" />
16
+ <option name="cachedIndexableFilesCount" value="209" />
18
17
  <option name="fileBasedEmbeddingIndicesEnabled" value="true" />
19
18
  </component>
20
19
  <component name="Git.Settings">
@@ -24,6 +23,65 @@
24
23
  <commands />
25
24
  <urls />
26
25
  </component>
26
+ <component name="NextEditCompletionFeaturesState">
27
+ <decayedCancelled>
28
+ <entry key="MS100" value="1.6925547340554623" />
29
+ <entry key="MS500" value="1.9291606752764612" />
30
+ <entry key="S2" value="1.9913164687251685" />
31
+ <entry key="S5" value="2.228196127360991" />
32
+ <entry key="S10" value="2.6826515387547167" />
33
+ <entry key="S30" value="3.3989927857707447" />
34
+ <entry key="S60" value="3.6728374352850195" />
35
+ <entry key="M2" value="3.8293523873652333" />
36
+ <entry key="M5" value="3.9633222075658523" />
37
+ <entry key="M10" value="4.147612501926397" />
38
+ <entry key="M15" value="4.298673421303507" />
39
+ <entry key="M30" value="4.555882160065856" />
40
+ <entry key="H1" value="4.7475493697238775" />
41
+ <entry key="H2" value="4.865065708834042" />
42
+ <entry key="H4" value="4.930198931360794" />
43
+ <entry key="D1" value="4.988028112183831" />
44
+ <entry key="W1" value="4.998281251556462" />
45
+ </decayedCancelled>
46
+ <decayedSelected>
47
+ <entry key="MS100" value="0.0" />
48
+ <entry key="MS500" value="0.0" />
49
+ <entry key="S2" value="9.204843892829884E-224" />
50
+ <entry key="S5" value="6.103888209013316E-90" />
51
+ <entry key="S10" value="2.4706048265583302E-45" />
52
+ <entry key="S30" value="1.3518684373571047E-15" />
53
+ <entry key="S60" value="3.6767763562081173E-8" />
54
+ <entry key="M2" value="1.917492204992791E-4" />
55
+ <entry key="M5" value="0.032590681560671526" />
56
+ <entry key="M10" value="0.18052889397731192" />
57
+ <entry key="M15" value="0.3194217472422649" />
58
+ <entry key="M30" value="0.5651740857844286" />
59
+ <entry key="H1" value="0.7517806101413027" />
60
+ <entry key="H2" value="0.8670528300751359" />
61
+ <entry key="H4" value="0.9311567161735641" />
62
+ <entry key="D1" value="0.9881824349942093" />
63
+ <entry key="W1" value="0.998303163047543" />
64
+ </decayedSelected>
65
+ <decayedShown>
66
+ <entry key="MS100" value="1.370856897779298" />
67
+ <entry key="MS500" value="1.8544651031074177" />
68
+ <entry key="S2" value="1.9715231330006342" />
69
+ <entry key="S5" value="2.214586098327775" />
70
+ <entry key="S10" value="2.670108400574065" />
71
+ <entry key="S30" value="3.3917554443835813" />
72
+ <entry key="S60" value="3.668631270729069" />
73
+ <entry key="M2" value="3.82726697050226" />
74
+ <entry key="M5" value="3.9945431030437786" />
75
+ <entry key="M10" value="4.326496541070908" />
76
+ <entry key="M15" value="4.616399718184694" />
77
+ <entry key="M30" value="5.119678782647799" />
78
+ <entry key="H1" value="5.498440082372666" />
79
+ <entry key="H2" value="5.731611445446515" />
80
+ <entry key="H4" value="5.861084819276176" />
81
+ <entry key="D1" value="5.976162846722735" />
82
+ <entry key="W1" value="5.996577535283789" />
83
+ </decayedShown>
84
+ </component>
27
85
  <component name="ProjectColorInfo">{
28
86
  &quot;associatedIndex&quot;: 3
29
87
  }</component>
@@ -45,6 +103,8 @@
45
103
  &quot;com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultAutoModeForALLUsers.v1&quot;: &quot;true&quot;,
46
104
  &quot;com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1&quot;: &quot;true&quot;,
47
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;,
48
108
  &quot;javascript.preferred.runtime.type.id&quot;: &quot;node&quot;,
49
109
  &quot;junie.onboarding.icon.badge.shown&quot;: &quot;true&quot;,
50
110
  &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
@@ -59,10 +119,15 @@
59
119
  &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
60
120
  }
61
121
  }</component>
122
+ <component name="RecentsManager">
123
+ <key name="MoveFile.RECENT_KEYS">
124
+ <recent name="$PROJECT_DIR$/src/components" />
125
+ </key>
126
+ </component>
62
127
  <component name="SharedIndexes">
63
128
  <attachedChunks>
64
129
  <set>
65
- <option value="bundled-js-predefined-d6986cc7102b-3bd3a6803838-JavaScript-WS-261.22158.274" />
130
+ <option value="bundled-js-predefined-d6986cc7102b-31caf2ab9e3c-JavaScript-WS-261.25134.101" />
66
131
  </set>
67
132
  </attachedChunks>
68
133
  </component>
@@ -85,7 +150,12 @@
85
150
  <workItem from="1772172034321" duration="530000" />
86
151
  <workItem from="1772172632388" duration="25000" />
87
152
  <workItem from="1774575231644" duration="121000" />
88
- <workItem from="1774576542082" duration="21000" />
153
+ <workItem from="1774576542082" duration="398000" />
154
+ <workItem from="1775201568213" duration="22000" />
155
+ <workItem from="1779783294183" duration="1782000" />
156
+ <workItem from="1779853203685" duration="885000" />
157
+ <workItem from="1779862937300" duration="772000" />
158
+ <workItem from="1781258005422" duration="651000" />
89
159
  </task>
90
160
  <task id="LOCAL-00001" summary="fix(table): 更新单元格分析逻辑以正确处理括号- 替换正则表达式检测为 includes 方法检测括号和 null&#10;- 确保只在包含成对括号且不含 null 时才匹配&#10;&#10;chore: 升级版本号至 1.4.9">
91
161
  <option name="closed" value="true" />
@@ -127,7 +197,55 @@
127
197
  <option name="project" value="LOCAL" />
128
198
  <updated>1772172563001</updated>
129
199
  </task>
130
- <option name="localTasksCounter" value="6" />
200
+ <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">
201
+ <option name="closed" value="true" />
202
+ <created>1779784688358</created>
203
+ <option name="number" value="00006" />
204
+ <option name="presentableId" value="LOCAL-00006" />
205
+ <option name="project" value="LOCAL" />
206
+ <updated>1779784688358</updated>
207
+ </task>
208
+ <task id="LOCAL-00007" summary="chore(watermark): 移除水印组件中的调试日志&#10;&#10;- 删除了 console.log(dpr) 调试语句&#10;- 清理了水印绘制相关的冗余代码&#10;- 优化了组件性能表现">
209
+ <option name="closed" value="true" />
210
+ <created>1779784841440</created>
211
+ <option name="number" value="00007" />
212
+ <option name="presentableId" value="LOCAL-00007" />
213
+ <option name="project" value="LOCAL" />
214
+ <updated>1779784841440</updated>
215
+ </task>
216
+ <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监听">
217
+ <option name="closed" value="true" />
218
+ <created>1779862572209</created>
219
+ <option name="number" value="00008" />
220
+ <option name="presentableId" value="LOCAL-00008" />
221
+ <option name="project" value="LOCAL" />
222
+ <updated>1779862572209</updated>
223
+ </task>
224
+ <task id="LOCAL-00009" summary="chore(release): 更新版本号到 1.4.16&#10;&#10;- 将 package.json 中的版本从 1.4.15 更新为 1.4.16">
225
+ <option name="closed" value="true" />
226
+ <created>1779862613631</created>
227
+ <option name="number" value="00009" />
228
+ <option name="presentableId" value="LOCAL-00009" />
229
+ <option name="project" value="LOCAL" />
230
+ <updated>1779862613631</updated>
231
+ </task>
232
+ <task id="LOCAL-00010" summary="chore(release): 回滚版本号从 1.4.16 到 1.4.15&#10;&#10;- 将 package.json 中的版本号从 1.4.16 修改为 1.4.15&#10;- 撤销之前的发布版本以解决相关问题">
233
+ <option name="closed" value="true" />
234
+ <created>1779862637170</created>
235
+ <option name="number" value="00010" />
236
+ <option name="presentableId" value="LOCAL-00010" />
237
+ <option name="project" value="LOCAL" />
238
+ <updated>1779862637170</updated>
239
+ </task>
240
+ <task id="LOCAL-00011" summary="refactor(watermark): 优化全局水印组件的用户名获取逻辑&#10;&#10;- 移除 computed 属性 userName,改为 data 属性&#10;- 添加 refreshUserName 方法统一处理用户信息获取&#10;- 在 mounted、watch 和定时器中调用 refreshUserName 方法&#10;- 监听路由变化时刷新用户名信息&#10;- 确保用户名信息在组件初始化时正确设置&#10;- 保持定时器每分钟更新时间和用户名的逻辑不变">
241
+ <option name="closed" value="true" />
242
+ <created>1781258649835</created>
243
+ <option name="number" value="00011" />
244
+ <option name="presentableId" value="LOCAL-00011" />
245
+ <option name="project" value="LOCAL" />
246
+ <updated>1781258649835</updated>
247
+ </task>
248
+ <option name="localTasksCounter" value="12" />
131
249
  <servers />
132
250
  </component>
133
251
  <component name="TypeScriptGeneratedFilesManager">
@@ -164,6 +282,12 @@
164
282
  <MESSAGE value="chore(common): 移除对话框点击遮罩关闭功能并更新包信息&#10;&#10;- 移除了 el-dialog 的 close-on-click-modal 属性配置&#10;- 将包版本从 1.4.11 更新到 1.4.12&#10;- 清空了作者信息字段" />
165
283
  <MESSAGE value="chore(common): 优化代码格式并更新版本号&#10;&#10;- 移除未使用的 router 导入&#10;- 统一导入语句格式,调整 OrgEnum 和 xs-request 导入格式&#10;- 标准化代码缩进和空格格式&#10;- 在" />
166
284
  <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;- 优化函数内部的代码格式和括号位置" />
167
- <option name="LAST_COMMIT_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;- 优化函数内部的代码格式和括号位置" />
285
+ <MESSAGE value="feat(App): 添加全局水印功能&#10;&#10;- App.vue 中引入并注册 GlobalWatermark 组件&#10;- 创建 GlobalWatermark.vue 组件实现水印生成功能&#10;- 水印包含用户名和当前时间信息&#10;- 实现定时更新水印机制,每分钟刷新一次&#10;- 修复 common.js 中请求函数缺少返回值的问题&#10;- 更新项目版本号从 1.4.13 到 1.4.15" />
286
+ <MESSAGE value="chore(watermark): 移除水印组件中的调试日志&#10;&#10;- 删除了 console.log(dpr) 调试" />
287
+ <MESSAGE value="refactor(watermark): 将水印实现从Canvas改为SVG模式&#10;&#10;- 使用SVG pattern实现水印背景,替代原有的Canvas绘制方式&#10;- 移除watermarkUrl状态变量和updateWatermark方法&#10;- 添加tileWidth和tileHeight配置参数&#10;- 使用SVG text元素直接渲染用户名和时间信息&#10;- 更新样式设置,添加宽高覆盖整个视口&#10;- 简化组件生命周期逻辑,移除不必要的watch监听" />
288
+ <MESSAGE value="chore(release): 更新版本号到 1.4.16&#10;&#10;- 将 package.json 中的版本从 1.4.15 更新为 1.4.16" />
289
+ <MESSAGE value="chore(release): 回滚版本号从 1.4.16 到 1.4.15&#10;&#10;- 将 package.json 中的版本号从 1.4.16 修改为 1.4.15&#10;- 撤销之前的发布版本以解决相关问题" />
290
+ <MESSAGE value="refactor(watermark): 优化全局水印组件的用户名获取逻辑&#10;&#10;- 移除 computed 属性 userName,改为 data 属性&#10;- 添加 refreshUserName 方法统一处理用户信息获取&#10;- 在 mounted、watch 和定时器中调用 refreshUserName 方法&#10;- 监听路由变化时刷新用户名信息&#10;- 确保用户名信息在组件初始化时正确设置&#10;- 保持定时器每分钟更新时间和用户名的逻辑不变" />
291
+ <option name="LAST_COMMIT_MESSAGE" value="refactor(watermark): 优化全局水印组件的用户名获取逻辑&#10;&#10;- 移除 computed 属性 userName,改为 data 属性&#10;- 添加 refreshUserName 方法统一处理用户信息获取&#10;- 在 mounted、watch 和定时器中调用 refreshUserName 方法&#10;- 监听路由变化时刷新用户名信息&#10;- 确保用户名信息在组件初始化时正确设置&#10;- 保持定时器每分钟更新时间和用户名的逻辑不变" />
168
292
  </component>
169
293
  </project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xs-common-plugins",
3
- "version": "1.4.14",
3
+ "version": "1.4.16",
4
4
  "description": "向上公共代码部分",
5
5
  "author": "",
6
6
  "main": "index.js",
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>
@@ -0,0 +1,105 @@
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
+ userName: '',
49
+ timer: null,
50
+ tileWidth: 400,
51
+ tileHeight: 250
52
+ }
53
+ },
54
+
55
+ computed: {
56
+ watermarkLabel() {
57
+ return `${this.userName} | ${moment(this.now).format('YYYY-MM-DD HH:mm')}`
58
+ }
59
+ },
60
+
61
+ watch: {
62
+ '$route'() {
63
+ this.refreshUserName()
64
+ }
65
+ },
66
+
67
+ mounted() {
68
+ this.refreshUserName()
69
+ this.timer = window.setInterval(() => {
70
+ this.now = Date.now()
71
+ this.refreshUserName()
72
+ }, 60 * 1000)
73
+ },
74
+
75
+ methods: {
76
+ refreshUserName() {
77
+ const profile = getLocalStorage('userProfile') || {}
78
+ this.userName =
79
+ profile.real_name ||
80
+ profile.nickname ||
81
+ profile.phone_number ||
82
+ '未登录用户'
83
+ }
84
+ },
85
+
86
+ beforeDestroy() {
87
+ if (this.timer) {
88
+ window.clearInterval(this.timer)
89
+ this.timer = null
90
+ }
91
+ }
92
+ }
93
+ </script>
94
+
95
+ <style lang="scss" scoped>
96
+ .global-watermark {
97
+ position: fixed;
98
+ inset: 0;
99
+ z-index: 99999;
100
+ width: 100vw;
101
+ height: 100vh;
102
+ pointer-events: none;
103
+ user-select: none;
104
+ }
105
+ </style>