xs-common-plugins 1.4.14 → 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.
- package/.idea/workspace.xml +102 -7
- package/package.json +1 -1
- package/src/App.vue +4 -1
- package/src/components/GlobalWatermark.vue +90 -0
package/.idea/workspace.xml
CHANGED
|
@@ -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="
|
|
7
|
+
<list default="true" id="18da8823-8844-430e-8765-342a5b83382e" name="更改" comment="refactor(watermark): 将水印实现从Canvas改为SVG模式 - 使用SVG pattern实现水印背景,替代原有的Canvas绘制方式 - 移除watermarkUrl状态变量和updateWatermark方法 - 添加tileWidth和tileHeight配置参数 - 使用SVG text元素直接渲染用户名和时间信息 - 更新样式设置,添加宽高覆盖整个视口 - 简化组件生命周期逻辑,移除不必要的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" />
|
|
@@ -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="
|
|
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.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>
|
|
27
85
|
<component name="ProjectColorInfo">{
|
|
28
86
|
"associatedIndex": 3
|
|
29
87
|
}</component>
|
|
@@ -45,6 +103,8 @@
|
|
|
45
103
|
"com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultAutoModeForALLUsers.v1": "true",
|
|
46
104
|
"com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true",
|
|
47
105
|
"git-widget-placeholder": "master",
|
|
106
|
+
"javascript.nodejs.core.library.configured.version": "24.12.0",
|
|
107
|
+
"javascript.nodejs.core.library.typings.version": "24.12.4",
|
|
48
108
|
"javascript.preferred.runtime.type.id": "node",
|
|
49
109
|
"junie.onboarding.icon.badge.shown": "true",
|
|
50
110
|
"node.js.detected.package.eslint": "true",
|
|
@@ -59,10 +119,15 @@
|
|
|
59
119
|
"vue.rearranger.settings.migration": "true"
|
|
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-
|
|
130
|
+
<option value="bundled-js-predefined-d6986cc7102b-31caf2ab9e3c-JavaScript-WS-261.24374.125" />
|
|
66
131
|
</set>
|
|
67
132
|
</attachedChunks>
|
|
68
133
|
</component>
|
|
@@ -85,7 +150,10 @@
|
|
|
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="
|
|
153
|
+
<workItem from="1774576542082" duration="398000" />
|
|
154
|
+
<workItem from="1775201568213" duration="22000" />
|
|
155
|
+
<workItem from="1779783294183" duration="1782000" />
|
|
156
|
+
<workItem from="1779853203685" duration="783000" />
|
|
89
157
|
</task>
|
|
90
158
|
<task id="LOCAL-00001" summary="fix(table): 更新单元格分析逻辑以正确处理括号- 替换正则表达式检测为 includes 方法检测括号和 null - 确保只在包含成对括号且不含 null 时才匹配 chore: 升级版本号至 1.4.9">
|
|
91
159
|
<option name="closed" value="true" />
|
|
@@ -127,7 +195,31 @@
|
|
|
127
195
|
<option name="project" value="LOCAL" />
|
|
128
196
|
<updated>1772172563001</updated>
|
|
129
197
|
</task>
|
|
130
|
-
<
|
|
198
|
+
<task id="LOCAL-00006" summary="feat(App): 添加全局水印功能 - 在 App.vue 中引入并注册 GlobalWatermark 组件 - 创建 GlobalWatermark.vue 组件实现水印生成功能 - 水印包含用户名和当前时间信息 - 实现定时更新水印机制,每分钟刷新一次 - 修复 common.js 中请求函数缺少返回值的问题 - 更新项目版本号从 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): 移除水印组件中的调试日志 - 删除了 console.log(dpr) 调试语句 - 清理了水印绘制相关的冗余代码 - 优化了组件性能表现">
|
|
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模式 - 使用SVG pattern实现水印背景,替代原有的Canvas绘制方式 - 移除watermarkUrl状态变量和updateWatermark方法 - 添加tileWidth和tileHeight配置参数 - 使用SVG text元素直接渲染用户名和时间信息 - 更新样式设置,添加宽高覆盖整个视口 - 简化组件生命周期逻辑,移除不必要的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" />
|
|
131
223
|
<servers />
|
|
132
224
|
</component>
|
|
133
225
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -164,6 +256,9 @@
|
|
|
164
256
|
<MESSAGE value="chore(common): 移除对话框点击遮罩关闭功能并更新包信息 - 移除了 el-dialog 的 close-on-click-modal 属性配置 - 将包版本从 1.4.11 更新到 1.4.12 - 清空了作者信息字段" />
|
|
165
257
|
<MESSAGE value="chore(common): 优化代码格式并更新版本号 - 移除未使用的 router 导入 - 统一导入语句格式,调整 OrgEnum 和 xs-request 导入格式 - 标准化代码缩进和空格格式 - 在" />
|
|
166
258
|
<MESSAGE value="chore(common): 优化代码格式并更新版本号 - 移除未使用的 router 导入 - 统一导入语句格式,调整 OrgEnum 和 xs-request 导入格式 - 标准化代码缩进和空格格式 - 在 popup 方法中添加 dialogCfg 默认配置项 - 更新 package.json 版本号从 1.4.12 到 1.4.13 - 优化函数内部的代码格式和括号位置" />
|
|
167
|
-
<
|
|
259
|
+
<MESSAGE value="feat(App): 添加全局水印功能 - 在 App.vue 中引入并注册 GlobalWatermark 组件 - 创建 GlobalWatermark.vue 组件实现水印生成功能 - 水印包含用户名和当前时间信息 - 实现定时更新水印机制,每分钟刷新一次 - 修复 common.js 中请求函数缺少返回值的问题 - 更新项目版本号从 1.4.13 到 1.4.15" />
|
|
260
|
+
<MESSAGE value="chore(watermark): 移除水印组件中的调试日志 - 删除了 console.log(dpr) 调试" />
|
|
261
|
+
<MESSAGE value="refactor(watermark): 将水印实现从Canvas改为SVG模式 - 使用SVG pattern实现水印背景,替代原有的Canvas绘制方式 - 移除watermarkUrl状态变量和updateWatermark方法 - 添加tileWidth和tileHeight配置参数 - 使用SVG text元素直接渲染用户名和时间信息 - 更新样式设置,添加宽高覆盖整个视口 - 简化组件生命周期逻辑,移除不必要的watch监听" />
|
|
262
|
+
<option name="LAST_COMMIT_MESSAGE" value="refactor(watermark): 将水印实现从Canvas改为SVG模式 - 使用SVG pattern实现水印背景,替代原有的Canvas绘制方式 - 移除watermarkUrl状态变量和updateWatermark方法 - 添加tileWidth和tileHeight配置参数 - 使用SVG text元素直接渲染用户名和时间信息 - 更新样式设置,添加宽高覆盖整个视口 - 简化组件生命周期逻辑,移除不必要的watch监听" />
|
|
168
263
|
</component>
|
|
169
264
|
</project>
|
package/package.json
CHANGED
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,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>
|