Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
c7d96803
提交
c7d96803
authored
3月 12, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(categorytree): 修复左侧树形组件
同上
上级
19cf5a15
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
18 行增加
和
14 行删除
+18
-14
Dockerfile
Dockerfile
+5
-2
default.conf
default.conf
+11
-10
index.vue
src/components/CategoryTree/index.vue
+2
-2
没有找到文件。
Dockerfile
浏览文件 @
c7d96803
# 设置依赖的基础镜像
# 设置依赖的基础
node
镜像
FROM
node:latest as admin-dev
FROM
node:latest as admin-dev
# 设置工作目录(相当于把你示例仓库里面的代码复制到这个目录下面)
# 设置工作目录(相当于把你示例仓库里面的代码复制到这个目录下面)
WORKDIR
/app
WORKDIR
/app
# 复制代码
COPY
. .
COPY
. .
# 添加依赖
# 添加依赖
RUN
npm
install
RUN
npm
install
# Dockerfile 比较特殊,每个命令都是一个独立的运行空间。彼此间毫无关联的(我先带入门,想深入还得好好研究)
# 打包 (我的项目命令,打包是这个命令)
# 打包 (我的项目命令,打包是这个命令)
# 判断环境变量,执行不同打包命令,让前端代码里走不同环境的参数
# 判断环境变量,执行不同打包命令,让前端代码里走不同环境的参数
...
@@ -25,8 +26,10 @@ RUN if [ "$ENV_TYPE" = "stage" ]; then \
...
@@ -25,8 +26,10 @@ RUN if [ "$ENV_TYPE" = "stage" ]; then \
# nginx
# nginx
FROM
nginx:latest
FROM
nginx:latest
# 把项目文件下的 default.conf (nginx的配置文件) 替换掉镜像内的
# 把项目文件下的 default.conf (nginx的配置文件) 替换掉镜像内的
COPY
default.conf /etc/nginx/conf.d/default.conf
COPY
default.conf /etc/nginx/conf.d/default.conf
# --from=admin-dev 可看第一行代码 我把第一个镜像起了一个别名 admin-dev
# --from=admin-dev 可看第一行代码 我把第一个镜像起了一个别名 admin-dev
# 从上一个镜像里面复制已经打包好的 dist 文件,到 /usr/share/nginx/html 目录
# 从上一个镜像里面复制已经打包好的 dist 文件,到 /usr/share/nginx/html 目录
COPY
--from=admin-dev /app/dist /usr/share/nginx/html
COPY
--from=admin-dev /app/dist /usr/share/nginx/html
...
...
default.conf
浏览文件 @
c7d96803
server
{
server
{
listen
80
;
listen
80
;
server_name
localhost
;
server_name
localhost
;
location
/ {
location
/ {
root
/
usr
/
share
/
nginx
/
html
;
root
/
usr
/
share
/
nginx
/
html
;
index
index
.
html
index
.
htm
;
index
index
.
html
index
.
htm
;
}
}
error_page
500
502
503
504
/
50
x
.
html
;
error_page
500
502
503
504
/
50
x
.
html
;
location
= /
50
x
.
html
{
location
= /
50
x
.
html
{
root
/
usr
/
share
/
nginx
/
html
;
root
/
usr
/
share
/
nginx
/
html
;
}
}
}
}
\ No newline at end of file
src/components/CategoryTree/index.vue
浏览文件 @
c7d96803
...
@@ -179,14 +179,14 @@ const cancelSel = () => {
...
@@ -179,14 +179,14 @@ const cancelSel = () => {
// 点击某行
// 点击某行
const
handleNodeClick
=
(
row
)
=>
{
const
handleNodeClick
=
(
row
)
=>
{
// 当前点击和上次点击一样->取消
// 当前点击和上次点击一样->取消
if
(
lastRow
[
props
.
nodeKey
]
===
row
[
props
.
nodeKey
]
)
{
if
(
lastRow
.
value
&&
(
lastRow
.
value
[
props
.
nodeKey
]
===
row
[
props
.
nodeKey
])
)
{
treeRef
.
value
.
setCurrentKey
(
null
)
treeRef
.
value
.
setCurrentKey
(
null
)
lastRow
.
value
=
null
lastRow
.
value
=
null
}
else
{
}
else
{
lastRow
.
value
=
row
lastRow
.
value
=
row
}
}
emits
(
'update:modelValue'
,
lastRow
.
value
?
row
[
props
.
nodeKey
]
:
''
)
emits
(
'update:modelValue'
,
lastRow
.
value
?
row
[
props
.
nodeKey
]
:
''
)
emits
(
'search'
,
row
)
emits
(
'search'
,
lastRow
.
value
)
}
}
// tree 筛选节点
// tree 筛选节点
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论