Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
73c9122b
提交
73c9122b
authored
3月 05, 2026
作者:
hsx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
颜色定义加入样式页
上级
fb66f056
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
114 行增加
和
70 行删除
+114
-70
constStyle.vue
src/components/devStyle/components/constStyle.vue
+36
-0
index.vue
src/components/devStyle/components/index.vue
+10
-2
textStyle.vue
src/components/devStyle/components/textStyle.vue
+45
-62
company.js
src/router/modules/company.js
+4
-2
devStyle.js
src/router/modules/devStyle.js
+2
-2
descriptions.scss
src/styles/descriptions.scss
+5
-2
systemUtils.ts
src/utils/systemUtils.ts
+12
-0
没有找到文件。
src/components/devStyle/components/constStyle.vue
0 → 100644
浏览文件 @
73c9122b
<
script
setup
>
import
{
ElSpace
,
ElButton
}
from
'element-plus'
;
import
"@/styles/main.css"
import
{
copyToClipboardThenTip
}
from
'@/utils/systemUtils'
const
colors
=
[
{
title
:
"黑色90% / 主标题文字颜色"
,
name
:
"--text-primary-90-color"
},
{
title
:
"黑色80% / 小标题文字颜色"
,
name
:
"--text-primary-80-color"
},
{
title
:
"黑色65% / 正文颜色"
,
name
:
"--text-primary-65-color"
},
{
title
:
"黑色50%"
,
name
:
"--text-primary-50-color"
},
{
title
:
"黑色10%"
,
name
:
"--bg-black-10"
},
{
title
:
"黑色5% / 分割线颜色"
,
name
:
"--bg-black-5"
},
{
title
:
"黑色2% / 灰色背景色"
,
name
:
"--bg-black-2"
},
{
title
:
"白色主色"
,
name
:
"--bg-white-100"
},
{
title
:
"主色"
,
name
:
"--color-primary-100"
},
]
function
copyColorVar
(
item
)
{
const
color
=
`var(
${
item
.
name
}
)`
copyToClipboardThenTip
(
color
)
}
</
script
>
<
template
>
<el-space
direction=
"vertical"
alignment=
"flex-start"
>
<div
class=
"text-title-2"
>
颜色
</div>
<el-space>
<el-button
v-for=
"(item, index) in colors"
:key=
"index"
:color=
"`var($
{item.name})`"
v-on:click="copyColorVar(item)">
{{
item
.
title
}}
</el-button>
</el-space>
</el-space>
</
template
>
<
style
scoped
></
style
>
\ No newline at end of file
src/components/devStyle/components/index.vue
浏览文件 @
73c9122b
<
script
setup
lang=
"ts"
>
import
"@/styles/container.scss"
import
TextStyle
from
'./textStyle.vue'
;
import
{
ElScrollbar
}
from
"element-plus"
;
import
ConstStyle
from
'./constStyle.vue'
;
import
{
ElScrollbar
,
ElSpace
}
from
"element-plus"
;
</
script
>
<
template
>
<el-scrollbar>
<div
class=
"common-page"
>
<text-style></text-style>
<el-space
direction=
"vertical"
alignment=
"flex-start"
>
<div
class=
"text-title-0-show"
>
开发样式
</div>
<div
class=
"text-title-1-show"
>
样式变量
</div>
<const-style></const-style>
<div
class=
"text-title-1-show"
>
文字样式
</div>
<text-style></text-style>
</el-space>
</div>
</el-scrollbar>
</
template
>
\ No newline at end of file
src/components/devStyle/components/textStyle.vue
浏览文件 @
73c9122b
<
template
>
<div>
<div
class=
"text-title-1-show"
>
文字样式
</div>
<table
style=
"width: 100%; border-collapse: collapse; border: 1px solid #ebeef5;margin-top: 10px;"
>
<!-- 表头 -->
<thead>
<tr>
<th>
名称
</th>
<th>
类型名称
</th>
<th>
操作
</th>
<table
style=
"width: 100%; border-collapse: collapse; border: 1px solid #ebeef5;"
>
<!-- 表头 -->
<thead>
<tr
class=
"text-title-2"
>
<th>
名称
</th>
<th>
类型名称
</th>
<th>
操作
</th>
</tr>
</thead>
<!-- 表格内容 -->
<tbody>
<template
v-for=
"(row, index) in tableData"
:key=
"index"
>
<!-- 隔行变色效果 -->
<tr
:style=
"
{
height: '60px',
backgroundColor: index % 2 === 1 ? '#fafafa' : 'transparent'
}">
<!-- 名称列 -->
<td
style=
"padding: 12px; border: 1px solid #ebeef5;"
>
<div
:class=
"row.className"
>
{{
row
.
name
}}
</div>
</td>
<!-- 类型名称列(带复制功能) -->
<td
style=
"padding: 12px; border: 1px solid #ebeef5;"
>
<div
@
click=
"copyToClipboardThenTip(row.className)"
style=
"cursor: pointer;"
>
<span>
{{
row
.
className
}}
</span>
</div>
</td>
<!-- 操作列 -->
<td
style=
"padding: 12px; border: 1px solid #ebeef5; text-align: center;"
>
<el-button
type=
"primary"
link
@
click=
"copyToClipboardThenTip(row.className)"
>
<el-icon>
<DocumentCopy
/>
</el-icon>
复制
</el-button>
</td>
</tr>
</thead>
<!-- 表格内容 -->
<tbody>
<template
v-for=
"(row, index) in tableData"
:key=
"index"
>
<!-- 隔行变色效果 -->
<tr
:style=
"
{
height: '60px',
backgroundColor: index % 2 === 1 ? '#fafafa' : 'transparent'
}">
<!-- 名称列 -->
<td
style=
"padding: 12px; border: 1px solid #ebeef5;"
>
<div
:class=
"row.className"
>
{{
row
.
name
}}
</div>
</td>
<!-- 类型名称列(带复制功能) -->
<td
style=
"padding: 12px; border: 1px solid #ebeef5;"
>
<div
@
click=
"copyClassName(row.className)"
style=
"cursor: pointer;"
>
<span>
{{
row
.
className
}}
</span>
</div>
</td>
<!-- 操作列 -->
<td
style=
"padding: 12px; border: 1px solid #ebeef5; text-align: center;"
>
<el-button
type=
"primary"
link
@
click=
"copyClassName(row.className)"
>
<el-icon>
<DocumentCopy
/>
</el-icon>
复制
</el-button>
</td>
</tr>
</
template
>
</tbody>
</table>
</div>
</
template
>
</tbody>
</table>
</template>
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
ElMessage
,
}
from
'element-plus'
import
{
DocumentCopy
}
from
'@element-plus/icons-vue'
import
"@/styles/common.scss"
import
{
copyToClipboard
}
from
'@/utils/systemUtils'
import
{
copyToClipboard
ThenTip
}
from
'@/utils/systemUtils'
// 表格数据
const
tableData
=
ref
([
...
...
@@ -88,18 +84,6 @@ const tableData = ref([
{
name
:
'3级提示文字'
,
className
:
'text-tip-3'
},
])
// 复制类型名称到剪贴板
const
copyClassName
=
async
(
className
)
=>
{
const
{
status
,
message
}
=
await
copyToClipboard
(
className
)
if
(
status
)
{
ElMessage
.
success
(
message
)
}
else
{
ElMessage
.
error
(
message
)
}
}
</
script
>
<
style
scoped
></
style
>
\ No newline at end of file
src/router/modules/company.js
浏览文件 @
73c9122b
//企业主页
const
companyPages
=
()
=>
import
(
'@/views/companyPages/index.vue'
)
const
companyPages
=
()
=>
import
(
'@/views/companyPages2/index.vue'
)
const
companyPagesRoutes
=
[
// 智库系统的主要路由
...
...
@@ -9,7 +11,7 @@ const companyPagesRoutes = [
component
:
companyPages
,
meta
:
{
title
:
"企业主页"
,
dynamicTitle
:
true
dynamicTitle
:
true
}
},
...
...
src/router/modules/devStyle.js
浏览文件 @
73c9122b
//样式主页
import
stylePages
from
"@/components/devStyle/components/index.vue"
;
const
StylePages
=
()
=>
import
(
"@/components/devStyle/components/index.vue"
)
;
const
stylePagesRoutes
=
[
// 智库系统的主要路由
{
path
:
"/devStylePages"
,
name
:
"devStylePages"
,
component
:
s
tylePages
,
component
:
S
tylePages
,
meta
:
{
title
:
"开发样式"
,
dynamicTitle
:
true
...
...
src/styles/descriptions.scss
浏览文件 @
73c9122b
...
...
@@ -2,8 +2,10 @@
/***没有nav下划线***/
.common-descriptions
.el-descriptions__label
{
@extend
.text-
header
;
@extend
.text-
tip-1-bold
;
}
.common-descriptions
.el-descriptions__content
{
@extend
.text-base
@extend
.text-tip-1
;
color
:
var
(
--
text-primary-80-color
);
}
\ No newline at end of file
src/utils/systemUtils.ts
浏览文件 @
73c9122b
import
{
ElMessage
}
from
"element-plus"
;
interface
BaseReturn
{
status
:
boolean
;
message
:
string
;
...
...
@@ -26,3 +28,13 @@ export async function copyToClipboard(txet: string): Promise<BaseReturn> {
return
{
status
:
false
,
message
:
"复制失败,请手动复制"
};
}
}
// 复制类型名称到剪贴板
export
async
function
copyToClipboardThenTip
(
text
:
string
):
Promise
<
void
>
{
const
{
status
,
message
}
=
await
copyToClipboard
(
text
);
if
(
status
)
{
ElMessage
.
success
(
message
);
}
else
{
ElMessage
.
error
(
message
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论