Skip to content
代码片段 群组 项目
提交 e8180c3c 编辑于 作者: 刘剑桥's avatar 刘剑桥
浏览文件

更新readme,加上demo使用介绍

上级 d828e856
No related branches found
No related tags found
1 合并请求!1更新 src/components/QrCodeMVC1.vue
Pipeline #689904 等待手动操作
# qrcode-generator # 部署批准
This template should help get you started developing with Vue 3 in Vite. 这个项目中展示了如何使用部署审批
## Recommended IDE Setup ### 展示如何配置部署审批
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). 1. 设置 --> CI/CD --> 受保护的环境
2. 选择环境进行保护
## Type Support for `.vue` Imports in TS 3. 选择角色/人员 作为允许部署的人员
- 角色:Maintainer; Developer
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types. - 人员:项目组中具体的人
4. 保存,配置完成
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps: ### 只展示部署审批的使用方法
1. Disable the built-in TypeScript Extension 1. 通过一个Developer角色,创建一个新的分支。
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette 2. 通过Developer角色分支更新内容,可以更新`src/components/QrCodeMVC1.vue`的Line 90的时间,以方便看到效果。
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)` 3. 更新之后提交,等待流水线完成。
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette. 4. 流水线完成之后,可以转到环境界面(部署-->环境),查看production和testing环境的区别。
5. 展开production,点击批准选项,可以看到没有权限。
## Customize configuration 6. 换一个浏览器,该浏览器上面登录Maintainer的角色。并打开环境界面,点击批准选项,可以看到该用户可以批准。
7. 批准该部署。然后等待流水线完成(可以在流水线界面中查看)。
See [Vite Configuration Reference](https://vitejs.dev/config/). 8. 刷新环境界面,查看production和testing环境,可以发现他们变成一样的内容。
## Project Setup ## Project Setup
......
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
</script> </script>
<template> <template>
<h1>我是1117-22:05创建的环境</h1> <h1>我是1117-22:16创建的环境</h1>
<!-- Stub QRCode --> <!-- Stub QRCode -->
<!-- <el-image <!-- <el-image
style="width: 200px; height: 200px" style="width: 200px; height: 200px"
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册