mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-08 22:57:11 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
46
.gitee/ISSUE_TEMPLATE.zh-CN.md
Normal file
46
.gitee/ISSUE_TEMPLATE.zh-CN.md
Normal file
@@ -0,0 +1,46 @@
|
||||
<!--
|
||||
感谢您使用 ContiNew Admin!请您花些时间填写这份 Issue 调查,非常感谢您的反馈!
|
||||
-->
|
||||
|
||||
<!-- 在 [] 中输入 x 来勾选) -->
|
||||
|
||||
## Issue 类型
|
||||
|
||||
- [ ] 缺陷报告(Bug)
|
||||
- [ ] 需求建议(Feature)
|
||||
|
||||
## Issue 描述
|
||||
|
||||
<!-- 清楚而简洁地描述您遇到的问题。例如:在使用 xxx 功能时发现 xxx 问题。另外,非常欢迎您对此 Issue 提交 PR。 -->
|
||||
|
||||
## 复现步骤(如果是提交 Feature Issue,请删除本项)
|
||||
|
||||
<!-- 条理清晰的步骤或演示视频可以帮助快速定位问题。例如:1、xxx; 2、xxx; -->
|
||||
|
||||
## 预期结果(如果是提交 Feature Issue,请删除本项)
|
||||
|
||||
<!-- 清楚而简洁地描述您期望的结果。 -->
|
||||
|
||||
## 环境信息(如果是提交 Feature Issue,请删除本项)
|
||||
|
||||
<!-- 描述清楚您所使用的相关环境,例如:Node 版本:xxxx;框架版本:v1.0.0;其他可能与该 issue 相关的依赖版本。 -->
|
||||
|
||||
## 解决方案(如果是提交 Bug Issue,请删除本项)
|
||||
|
||||
<!-- 清楚而简洁地描述您想要的解决方案。 -->
|
||||
|
||||
## 替代方案(如果是提交 Bug Issue,请删除本项)
|
||||
|
||||
<!-- 清楚而简洁地描述您考虑过的任何替代解决方案或功能。 -->
|
||||
|
||||
## 额外补充
|
||||
|
||||
<!-- Bug:添加您的完整报错信息或屏幕截图,以及一切能帮助定位问题的信息。 -->
|
||||
<!-- Feature:添加您在其他框架或场景遇见的效果截图或链接,以及一切能帮助理解 Feature 的信息。 -->
|
||||
|
||||
## 提交前确认
|
||||
|
||||
<!-- 在提交 issue 之前,请确保执行过以下操作。 -->
|
||||
|
||||
- [ ] 阅读[文档](https://doc.charles7c.top/admin/other/faq.html)
|
||||
- [ ] 搜索是否有其他人提交过类似的 issue,如果对应 issue 尚未解决,您可以先订阅关注该 issue(为了方便后来者查找问题解决方法,请尽量避免创建重复的 issue)
|
53
.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md
Normal file
53
.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md
Normal file
@@ -0,0 +1,53 @@
|
||||
<!--
|
||||
非常感谢您的 PR!在提交之前,请务必确保您 PR 的代码经过了完整测试,并且通过了代码规范检查。
|
||||
-->
|
||||
|
||||
<!-- 在 [] 中输入 x 来勾选) -->
|
||||
|
||||
## PR 类型
|
||||
|
||||
<!-- 您的 PR 引入了哪种类型的变更? -->
|
||||
<!-- 只支持选择一种类型,如果有多种类型,可以在更新日志中增加 “类型” 列。 -->
|
||||
|
||||
- [ ] 新 feature
|
||||
- [ ] Bug 修复
|
||||
- [ ] 功能增强
|
||||
- [ ] 文档变更
|
||||
- [ ] 代码样式变更
|
||||
- [ ] 重构
|
||||
- [ ] 性能改进
|
||||
- [ ] 单元测试
|
||||
- [ ] CI/CD
|
||||
- [ ] 其他
|
||||
|
||||
## PR 目的
|
||||
|
||||
<!-- 描述一下您的 PR 解决了什么问题。如果可以,请链接到相关 issues。 -->
|
||||
|
||||
## 解决方案
|
||||
|
||||
<!-- 详细描述您是如何解决的问题 -->
|
||||
|
||||
## PR 测试
|
||||
|
||||
<!-- 如果可以,请为您的 PR 添加或更新单元测试。 -->
|
||||
<!-- 请描述一下您是如何测试 PR 的。例如:创建/更新单元测试或添加相关的截图。 -->
|
||||
|
||||
## Changelog
|
||||
|
||||
| 模块 | Changelog | Related issues |
|
||||
|-----|-----------| -------------- |
|
||||
| | | |
|
||||
|
||||
<!-- 如果有多种类型的变更,可以在变更日志表中增加 “类型” 列,该列的值与上方 “PR 类型” 相同。 -->
|
||||
<!-- Related issues 格式为 fixes #<issue号>,或者 resolves #<issue号>。 -->
|
||||
|
||||
## 其他信息
|
||||
|
||||
<!-- 请描述一下还有哪些注意事项。例如:如果引入了一个不向下兼容的变更,请描述其影响。 -->
|
||||
|
||||
## 提交前确认
|
||||
|
||||
- [ ] PR 代码经过了完整测试,并且通过了代码规范检查
|
||||
- [ ] 已经完整填写 Changelog,并链接到了相关 issues
|
||||
- [ ] PR 代码将要提交到 dev 分支
|
57
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
57
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: "\U0001F41E Bug 报告"
|
||||
description: Create a report to help us improve
|
||||
labels: ['bug: pending triage']
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
感谢您使用 ContiNew Admin!请您花些时间填写这份 Bug 报告。
|
||||
- type: textarea
|
||||
id: bug-description
|
||||
attributes:
|
||||
label: Bug 描述
|
||||
description: 清楚而简洁地描述您遇到的 Bug。另外,非常欢迎您对此 Bug 提交 PR。
|
||||
placeholder: 例如:在使用 xxx 功能时出现异常
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduction
|
||||
attributes:
|
||||
label: 复现步骤
|
||||
description: 条理清晰的步骤或演示视频可以帮助快速定位问题。
|
||||
placeholder: 例如:1、xxx; 2、xxx;
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: 预期结果
|
||||
description: 清楚而简洁地描述您期望的结果。
|
||||
placeholder: 预期结果
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: environment-info
|
||||
attributes:
|
||||
label: 环境信息
|
||||
description: 描述清楚您所使用的相关环境,例如:Node 版本:xxxx;框架版本:v1.0.0;其他可能与该 issue 相关的依赖版本。
|
||||
placeholder: Node 版本, 框架版本等
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: additional-context
|
||||
attributes:
|
||||
label: 额外补充
|
||||
description: 添加您的完整报错信息或屏幕截图,以及一切能帮助定位问题的信息。
|
||||
- type: checkboxes
|
||||
id: checkboxes
|
||||
attributes:
|
||||
label: 确认
|
||||
description: 在提交 issue 之前,请确保执行过以下操作。
|
||||
options:
|
||||
- label: 阅读[文档](https://doc.charles7c.top/admin/other/faq.html)
|
||||
required: true
|
||||
- label: 根据报错信息百度或 Google 一下
|
||||
required: true
|
||||
- label: 搜索是否有其他人提交过类似的 issue,如果对应 issue 尚未解决,您可以先订阅关注该 issue(为了方便后来者查找问题解决方法,请尽量避免创建重复的 issue)
|
||||
required: true
|
42
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
42
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: "\U0001F680 新 Feature 建议"
|
||||
description: Suggest an idea for this project
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
感谢您使用 ContiNew Admin!请您花些时间填写这份 Feature 调查。
|
||||
- type: textarea
|
||||
id: feature-description
|
||||
attributes:
|
||||
label: Feature 描述
|
||||
description: 清楚而简洁地描述您的 Feature。另外,非常欢迎您对此 Feature 提交 PR。
|
||||
placeholder: 例如:我希望增加 xxx 功能;现有的 xxx 功能不好用...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: suggested-solution
|
||||
attributes:
|
||||
label: 描述一下您想要的解决方案
|
||||
description: 清楚而简洁地描述您想要的解决方案。
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: alternative
|
||||
attributes:
|
||||
label: 描述一下您考虑过的替代方案
|
||||
description: 清楚而简洁地描述您考虑过的任何替代解决方案或功能。
|
||||
- type: textarea
|
||||
id: additional-context
|
||||
attributes:
|
||||
label: 额外补充
|
||||
description: 添加您在其他框架或场景遇见的效果截图或链接,以及一切能帮助理解 Feature 的信息。
|
||||
- type: checkboxes
|
||||
id: checkboxes
|
||||
attributes:
|
||||
label: 确认
|
||||
description: 在提交 issue 之前,请确保执行过以下操作。
|
||||
options:
|
||||
- label: 阅读[文档](https://doc.charles7c.top/admin/intro/require.html)
|
||||
required: true
|
||||
- label: 搜索是否有其他人提交过类似的 issue,如果对应 issue 尚未解决,您可以先订阅关注该 issue(为了方便后来者查找问题解决方法,请尽量避免创建重复的 issue)
|
||||
required: true
|
53
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
53
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
<!--
|
||||
非常感谢您的 PR!在提交之前,请务必确保您 PR 的代码经过了完整测试,并且通过了代码规范检查。
|
||||
-->
|
||||
|
||||
<!-- 在 [] 中输入 x 来勾选) -->
|
||||
|
||||
## PR 类型
|
||||
|
||||
<!-- 您的 PR 引入了哪种类型的变更? -->
|
||||
<!-- 只支持选择一种类型,如果有多种类型,可以在更新日志中增加 “类型” 列。 -->
|
||||
|
||||
- [ ] 新 feature
|
||||
- [ ] Bug 修复
|
||||
- [ ] 功能增强
|
||||
- [ ] 文档变更
|
||||
- [ ] 代码样式变更
|
||||
- [ ] 重构
|
||||
- [ ] 性能改进
|
||||
- [ ] 单元测试
|
||||
- [ ] CI/CD
|
||||
- [ ] 其他
|
||||
|
||||
## PR 目的
|
||||
|
||||
<!-- 描述一下您的 PR 解决了什么问题。如果可以,请链接到相关 issues。 -->
|
||||
|
||||
## 解决方案
|
||||
|
||||
<!-- 详细描述您是如何解决的问题 -->
|
||||
|
||||
## PR 测试
|
||||
|
||||
<!-- 如果可以,请为您的 PR 添加或更新单元测试。 -->
|
||||
<!-- 请描述一下您是如何测试 PR 的。例如:创建/更新单元测试或添加相关的截图。 -->
|
||||
|
||||
## Changelog
|
||||
|
||||
| 模块 | Changelog | Related issues |
|
||||
|-----|-----------| -------------- |
|
||||
| | | |
|
||||
|
||||
<!-- 如果有多种类型的变更,可以在变更日志表中增加 “类型” 列,该列的值与上方 “PR 类型” 相同。 -->
|
||||
<!-- Related issues 格式为 Closes #<issue号>,或者 Fixes #<issue号>,或者 Resolves #<issue号>。 -->
|
||||
|
||||
## 其他信息
|
||||
|
||||
<!-- 请描述一下还有哪些注意事项。例如:如果引入了一个不向下兼容的变更,请描述其影响。 -->
|
||||
|
||||
## 提交前确认
|
||||
|
||||
- [ ] PR 代码经过了完整测试,并且通过了代码规范检查
|
||||
- [ ] 已经完整填写 Changelog,并链接到了相关 issues
|
||||
- [ ] PR 代码将要提交到 dev 分支
|
2
pnpm-lock.yaml
generated
2
pnpm-lock.yaml
generated
@@ -6354,4 +6354,4 @@ packages:
|
||||
resolution: {integrity: sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==}
|
||||
dependencies:
|
||||
tslib: 2.3.0
|
||||
dev: false
|
||||
dev: false
|
@@ -22,3 +22,8 @@ export const getUserInfo = () => {
|
||||
export const getUserRoute = () => {
|
||||
return http.get<Auth.RouteItem[]>(`${BASE_URL}/route`)
|
||||
}
|
||||
|
||||
/** @desc 第三方登录授权 */
|
||||
export function socialAuth(source: string) {
|
||||
return http.get<Auth.SocialAuthAuthorizeResp>(`/oauth/${source}`)
|
||||
}
|
@@ -51,3 +51,8 @@ export interface AccountLoginReq {
|
||||
export interface LoginResp {
|
||||
token: string
|
||||
}
|
||||
|
||||
// 第三方登录授权类型
|
||||
export interface SocialAuthAuthorizeResp {
|
||||
authorizeUrl: string;
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
import { reactive, computed, ref, type Ref } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { Modal, Message, type FormInstance } from '@arco-design/web-vue'
|
||||
import { isEqual } from 'lodash'
|
||||
import { isEqual } from 'lodash-es'
|
||||
|
||||
type Option<T> = {
|
||||
key?: string
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { reactive } from 'vue'
|
||||
import _ from 'lodash'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
|
||||
export function useForm<F extends object>(initValue: F) {
|
||||
const getInitValue = () => _.cloneDeep(initValue)
|
||||
const getInitValue = () => cloneDeep(initValue)
|
||||
|
||||
const form = reactive(getInitValue())
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { isExternal } from '@/utils/validate'
|
||||
import { browse, mapTree } from 'xe-utils'
|
||||
import _ from 'lodash'
|
||||
import { upperFirst, camelCase } from 'lodash-es'
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
|
||||
export function getProperty<T, K extends keyof T>(obj: T, key: K): T[K] {
|
||||
@@ -184,7 +184,7 @@ export const randomHex = () => {
|
||||
export const transformPathToName = (path: string) => {
|
||||
if (!path) return ''
|
||||
if (isExternal(path)) return ''
|
||||
return _.upperFirst(_.camelCase(path))
|
||||
return upperFirst(camelCase(path))
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -39,7 +39,6 @@ const userStore = useUserStore()
|
||||
}
|
||||
|
||||
.card {
|
||||
margin-top: $margin;
|
||||
.content {
|
||||
padding: 8px 20px;
|
||||
.welcome {
|
||||
|
@@ -50,13 +50,24 @@
|
||||
<a-button type="primary" size="large" long :loading="loading" html-type="submit">登录</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
<div class="login-right__oauth">
|
||||
<a-divider orientation="center">其他登录方式</a-divider>
|
||||
<div class="list">
|
||||
<a class="item" title="使用 Gitee 账号登录" @click="onOauth('gitee')">
|
||||
<GiSvgIcon name="gitee" :size="24" />
|
||||
</a>
|
||||
<a class="item" title="使用 GitHub 账号登录" @click="onOauth('github')">
|
||||
<GiSvgIcon name="github" :size="24" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</a-form>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<GiThemeBtn class="theme-btn"></GiThemeBtn>
|
||||
<LoginBg></LoginBg>
|
||||
<GiThemeBtn class="theme-btn" />
|
||||
<LoginBg />
|
||||
|
||||
<!-- <div class="footer">
|
||||
<div class="beian">
|
||||
@@ -67,7 +78,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getImageCaptcha } from '@/apis'
|
||||
import { getImageCaptcha, socialAuth } from '@/apis'
|
||||
import { Message, type FormInstance } from '@arco-design/web-vue'
|
||||
import LoginBg from './components/LoginBg/index.vue'
|
||||
import { useAppStore, useUserStore } from '@/stores'
|
||||
@@ -147,6 +158,12 @@ const getCaptcha = () => {
|
||||
})
|
||||
}
|
||||
|
||||
// 第三方登录授权
|
||||
const onOauth = async (source: string) => {
|
||||
const { data } = await socialAuth(source);
|
||||
window.location.href = data.authorizeUrl;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getCaptcha()
|
||||
})
|
||||
@@ -230,6 +247,27 @@ onMounted(() => {
|
||||
font-size: 13px;
|
||||
color: var(--color-text-1);
|
||||
}
|
||||
&__oauth {
|
||||
margin-bottom: 20px;
|
||||
:deep(.arco-divider-text) {
|
||||
color: var(--color-text-4);
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
}
|
||||
:deep(.arco-divider-horizontal) {
|
||||
border-bottom: 1px solid rgb(229, 230, 235);
|
||||
}
|
||||
.list {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
.item {
|
||||
margin-right: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.theme-btn {
|
||||
|
@@ -1,13 +1,3 @@
|
||||
<script lang="ts" setup>
|
||||
import BasicSetting from './components/BasicSetting.vue'
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'Config'
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="gi_page">
|
||||
<a-card class="general-card" title="系统配置">
|
||||
@@ -21,6 +11,12 @@ export default {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import BasicSetting from './components/BasicSetting.vue'
|
||||
|
||||
defineOptions({ name: 'Config' })
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
:deep(.arco-tabs-content) {
|
||||
padding-top: 5px;
|
||||
|
@@ -4,7 +4,7 @@
|
||||
:title="title"
|
||||
:mask-closable="false"
|
||||
:esc-to-close="false"
|
||||
:width="width >= 600 ? 600 : '100%'"
|
||||
:width="width >= 580 ? 580 : '100%'"
|
||||
@before-ok="save"
|
||||
@close="reset"
|
||||
>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
:title="title"
|
||||
:mask-closable="false"
|
||||
:esc-to-close="false"
|
||||
:width="width >= 520 ? 520 : '100%'"
|
||||
:width="width >= 580 ? 580 : '100%'"
|
||||
@before-ok="save"
|
||||
@close="reset"
|
||||
>
|
||||
|
Reference in New Issue
Block a user