version:
antdv :3.2.20

环境版本:
$ node -v
v20.9.0
$ npm -v
10.1.0

制作过程:

  1. github下载压缩包
https://github.com/vueComponent/ant-design-vue/tree/3.x

code 的下拉中  downloadzip

2.删除pnpm-lock.yaml后安装依赖
2. 解压后修改package.json

  • 由于本机直接运行npm run site 会报 “.” is not xxx
  • 如果不修改能直接运行则直接运行site 命令
修改前
"site": "npm run routes && ./node_modules/vite/bin/vite.js build site --base=https://3x.antdv.com/",
修改后
"site2": "vite build site --base=/",
  1. 在site 目录下生成的dist 拷贝到nginx 的html 中
  2. 修改nginx 配置文件 如下
  • try_files $uri $uri/ /index.html; —解决刷新页面路由丢失问题
server {
        listen       8004;
        location / {
			try_files $uri $uri/ /index.html;
            root   html/dist;
            index  index.html index.htm;
        }
    }
  1. 启动nginx.exe 后访问 http://localhost:8004
  2. 点击english 切换语言 即可

备注:
如果语言切换不生效可修改源代码的src 中i18n.js 后重新打包
附件

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐