-
-
+
+
+
+
{{ props.data.id }}
diff --git a/src/views/home/versionTree/tree/view2/tools/tools.js b/src/views/home/versionTree/tree/view2/tools/tools.js
index d28814d..e758cd0 100644
--- a/src/views/home/versionTree/tree/view2/tools/tools.js
+++ b/src/views/home/versionTree/tree/view2/tools/tools.js
@@ -8,50 +8,79 @@ import { ref } from 'vue'
* It uses the `dagre` library to calculate the layout of the nodes and edges.
*/
export function useLayout() {
- const { findNode } = useVueFlow()
+ const { findNode } = useVueFlow()
- const graph = ref(new dagre.graphlib.Graph())
+ const graph = ref(new dagre.graphlib.Graph())
- const previousDirection = ref('LR')
+ const previousDirection = ref('LR')
- function layout(nodes, edges, direction) {
- // we create a new graph instance, in case some nodes/edges were removed, otherwise dagre would act as if they were still there
- const dagreGraph = new dagre.graphlib.Graph()
+ function layout(nodes, edges, direction = 'LR') {
+ // 验证和规范化方向参数
+ const validDirections = ['TB', 'BT', 'LR', 'RL']
+ const layoutDirection = validDirections.includes(direction) ? direction : 'LR'
- graph.value = dagreGraph
+ // we create a new graph instance, in case some nodes/edges were removed, otherwise dagre would act as if they were still there
+ const dagreGraph = new dagre.graphlib.Graph()
- dagreGraph.setDefaultEdgeLabel(() => ({}))
+ graph.value = dagreGraph
- const isHorizontal = direction === 'LR'
- dagreGraph.setGraph({ rankdir: direction })
+ dagreGraph.setDefaultEdgeLabel(() => ({}))
- previousDirection.value = direction
+ // 根据方向判断是否为水平布局
+ const isHorizontal = layoutDirection === 'LR' || layoutDirection === 'RL'
+ dagreGraph.setGraph({ rankdir: layoutDirection })
- for (const node of nodes) {
- // if you need width+height of nodes for your layout, you can use the dimensions property of the internal node (`GraphNode` type)
- const graphNode = findNode(node.id)
+ previousDirection.value = layoutDirection
- dagreGraph.setNode(node.id, { width: graphNode.dimensions.width || 150, height: graphNode.dimensions.height || 50 })
- }
+ for (const node of nodes) {
+ // if you need width+height of nodes for your layout, you can use the dimensions property of the internal node (`GraphNode` type)
+ const graphNode = findNode(node.id)
- for (const edge of edges) {
- dagreGraph.setEdge(edge.source, edge.target)
- }
+ dagreGraph.setNode(node.id, { width: graphNode.dimensions.width || 150, height: graphNode.dimensions.height || 50 })
+ }
- dagre.layout(dagreGraph)
+ for (const edge of edges) {
+ dagreGraph.setEdge(edge.source, edge.target)
+ }
- // set nodes with updated positions
- return nodes.map((node) => {
- const nodeWithPosition = dagreGraph.node(node.id)
+ dagre.layout(dagreGraph)
- return {
- ...node,
- targetPosition: isHorizontal ? Position.Left : Position.Top,
- sourcePosition: isHorizontal ? Position.Right : Position.Bottom,
- position: { x: nodeWithPosition.x, y: nodeWithPosition.y },
- }
- })
- }
+ // set nodes with updated positions
+ return nodes.map((node) => {
+ const nodeWithPosition = dagreGraph.node(node.id)
- return { graph, layout, previousDirection }
-}
+ // 根据方向动态计算连接点位置
+ let targetPosition, sourcePosition
+ switch (layoutDirection) {
+ case 'BT': // 从上到下 (Top to Bottom)
+ targetPosition = Position.Bottom // 目标节点连接点在下方
+ sourcePosition = Position.Top // 源节点连接点在上方
+ break
+ case 'TB': // 从下到上 (Bottom to Top)
+ targetPosition = Position.Top // 目标节点连接点在上方
+ sourcePosition = Position.Bottom // 源节点连接点在下方
+ break
+ case 'LR': // 从左到右 (Left to Right)
+ targetPosition = Position.Left
+ sourcePosition = Position.Right
+ break
+ case 'RL': // 从右到左 (Right to Left)
+ targetPosition = Position.Right
+ sourcePosition = Position.Left
+ break
+ default:
+ targetPosition = Position.Top
+ sourcePosition = Position.Bottom
+ }
+
+ return {
+ ...node,
+ targetPosition,
+ sourcePosition,
+ position: { x: nodeWithPosition.x, y: nodeWithPosition.y },
+ }
+ })
+ }
+
+ return { graph, layout, previousDirection }
+}
\ No newline at end of file
diff --git a/src/views/home/versionTree/tree/view2/tools/versionsData.js b/src/views/home/versionTree/tree/view2/tools/versionsData.js
index 63d043f..5050f32 100644
--- a/src/views/home/versionTree/tree/view2/tools/versionsData.js
+++ b/src/views/home/versionTree/tree/view2/tools/versionsData.js
@@ -4,27 +4,29 @@ export const versionsList = [
name:'V1',
child:[
{
- id: '1-1',
- name:'V1-1',
- child:[
- {
- id: '1-1-1',
- name:'V1-1-1',
- }
- ]
- },{
+ id: '1-1',
+ name:'V1-1',
+ child:[
+ {
+ id: '1-1-1',
+ name:'V1-1-1',
+ }
+ ]
+ },
+ {
id: '1-2',
name:'V1-2',
child:[
- {
- id: '1-2-1',
- name:'V1-2-1',
- },{
- id: '1-2-2',
- name:'V1-2-2',
- }
+ {
+ id: '1-2-1',
+ name:'V1-2-1',
+ },{
+ id: '1-2-2',
+ name:'V1-2-2',
+ }
]
- },{
+ },
+ {
id: '1-2',
name:'V1-2',
child:[
@@ -51,7 +53,8 @@ export const versionsList = [
]
},
]
- },{
+ },
+ {
id: '1-3',
name:'V1-3',
}
diff --git a/src/views/css/style.css b/src/views/login/css/style.css
similarity index 91%
rename from src/views/css/style.css
rename to src/views/login/css/style.css
index aba66b7..e6d0ada 100644
--- a/src/views/css/style.css
+++ b/src/views/login/css/style.css
@@ -5,6 +5,7 @@
overflow: hidden;
padding: 2.5rem;
display: flex;
+ user-select: none;
}
.register > .left,
.login > .left {
@@ -35,6 +36,7 @@
.login > .left > .logo > span {
font-weight: 600;
font-size: 3.3rem;
+ font-family: SemiBold;
}
.register > .right,
.login > .right {
@@ -96,8 +98,7 @@
.register > .right > .box > .tip,
.login > .right > .box > .tip {
font-weight: 400;
- font-family: General Sans Variable;
- font-style: Regular;
+ font-family: Regular;
font-size: 1.8rem;
color: #666;
margin-top: 0.4rem;
@@ -107,6 +108,10 @@
margin-top: 5rem;
width: 100%;
}
+.register > .right > .box > .el-form::v-deep,
+.login > .right > .box > .el-form::v-deep {
+ font-family: Regular;
+}
.register > .right > .box > .el-form::v-deep .el-form-item,
.login > .right > .box > .el-form::v-deep .el-form-item {
margin-bottom: 2rem;
@@ -116,6 +121,7 @@
color: #252727;
font-size: 1.8rem;
margin-bottom: 0.8rem;
+ font-family: Medium;
}
.register > .right > .box > .el-form::v-deep .el-input,
.login > .right > .box > .el-form::v-deep .el-input {
@@ -146,8 +152,8 @@
color: #666666;
font-weight: 400;
}
-.register > .right > .box > .el-form::v-deep .privacy .el-checkbox__label > span,
-.login > .right > .box > .el-form::v-deep .privacy .el-checkbox__label > span {
+.register > .right > .box > .el-form::v-deep .privacy .el-checkbox__label > div > span,
+.login > .right > .box > .el-form::v-deep .privacy .el-checkbox__label > div > span {
text-decoration: underline;
cursor: pointer;
}
@@ -165,15 +171,17 @@
border-radius: 0.8rem;
color: #fff;
font-weight: 600;
+ font-family: SemiBold;
}
.register > .right > .box > .tip-2,
.login > .right > .box > .tip-2 {
font-weight: 400;
font-size: 1.6rem;
color: #666;
+ font-family: Regular;
}
-.register > .right > .box > .tip-2 > span,
-.login > .right > .box > .tip-2 > span {
+.register > .right > .box > .tip-2::v-deep > span,
+.login > .right > .box > .tip-2::v-deep > span {
text-decoration: underline;
color: #FF7A50;
cursor: pointer;
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 48db8c9..4fe5c57 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -2,8 +2,8 @@
@@ -46,6 +46,7 @@
outline: none;
font-size: 2.2rem;
font-weight: 600;
+ font-family: SemiBold;
&:active {
opacity: 0.8;
}
diff --git a/src/views/login/style.less b/src/views/login/less/style.less
similarity index 89%
rename from src/views/login/style.less
rename to src/views/login/less/style.less
index 7903ac9..138b6d3 100644
--- a/src/views/login/style.less
+++ b/src/views/login/less/style.less
@@ -5,6 +5,7 @@
overflow: hidden;
padding: 2.5rem;
display: flex;
+ user-select: none;
>.left {
flex: 1;
@@ -32,6 +33,7 @@
>span {
font-weight: 600;
font-size: 3.3rem;
+ font-family: SemiBold;
}
}
}
@@ -93,8 +95,8 @@
>.tip {
font-weight: 400;
- font-family: General Sans Variable;
- font-style: Regular;
+ font-family: Regular;
+ // font-style: Regular;
font-size: 1.8rem;
color: #666;
margin-top: 0.4rem;
@@ -105,6 +107,8 @@
width: 100%;
&::v-deep {
+ font-family: Regular;
+
.el-form-item {
margin-bottom: 2rem;
}
@@ -113,6 +117,7 @@
color: #252727;
font-size: 1.8rem;
margin-bottom: 0.8rem;
+ font-family: Medium;
}
.el-input {
@@ -143,9 +148,11 @@
color: #666666;
font-weight: 400;
- >span {
- text-decoration: underline;
- cursor: pointer;
+ >div {
+ >span {
+ text-decoration: underline;
+ cursor: pointer;
+ }
}
}
}
@@ -163,6 +170,7 @@
border-radius: 0.8rem;
color: #fff;
font-weight: 600;
+ font-family: SemiBold;
}
}
}
@@ -171,8 +179,9 @@
font-weight: 400;
font-size: 1.6rem;
color: #666;
+ font-family: Regular;
- >span {
+ &::v-deep>span {
text-decoration: underline;
color: #FF7A50;
cursor: pointer;
diff --git a/src/views/login/login.vue b/src/views/login/login.vue
index 40b48e3..7a981e9 100644
--- a/src/views/login/login.vue
+++ b/src/views/login/login.vue
@@ -17,38 +17,42 @@
-
Log on to
+
{{ $t('Login.loginTo') }}
- A multi-agent canvas for rapid, trend driven design iteration.
+ {{ $t('Login.loginTitle') }}
-
-
+
+
-
+
- forget password?
+ {{ $t('Login.forgetPassword') }}
- I agree to the Terms, Policy and Fees.
+
- Log in
+ {{
+ $t('Login.login')
+ }}
-
- Don't have an account? Sign up
-
+
@@ -95,14 +99,10 @@
}
const onVerifyCode = (code: string) => {
console.log(code)
- router.push({ name: 'home' })
- }
- const onClickPrivacy = () => {}
- const onClickRegister = () => {
- router.push({ name: 'register' })
+ router.push({ name: 'mainInput' })
}
diff --git a/src/views/login/other-login.vue b/src/views/login/other-login.vue
index d2b6012..542057c 100644
--- a/src/views/login/other-login.vue
+++ b/src/views/login/other-login.vue
@@ -1,14 +1,14 @@
-
or continue with
+
{{ $t('Login.orContinueWith') }}
- Sign in with Google
+ {{ $t('Login.googleLogin') }}
- Sign in with Wechat
+ {{ $t('Login.wechatLogin') }}
@@ -30,7 +30,7 @@
align-items: center;
justify-content: center;
font-size: 1.6rem;
-
+ font-family: Regular;
&::before,
&::after {
content: '';
diff --git a/src/views/login/register.vue b/src/views/login/register.vue
index a5989fe..12975c0 100644
--- a/src/views/login/register.vue
+++ b/src/views/login/register.vue
@@ -17,38 +17,40 @@
-
Register for
+
{{ $t('Login.registerFor') }}
- A multi-agent canvas for rapid, trend driven design iteration.
+ {{ $t('Login.registerTip') }}
-
-
+
+
-
+
-
-
+
+
- I agree to the Terms, Policy and Fees.
+
- Register
+ {{ $t('Login.register') }}
-
- Already have an account? Log in
-
+
@@ -97,14 +99,10 @@
}
const onVerifyCode = (code: string) => {
console.log(code)
- router.push({ name: 'home' })
- }
- const onClickPrivacy = () => {}
- const onClickLogin = () => {
- router.push({ name: 'login' })
+ router.push({ name: 'nuic' })
}
diff --git a/src/views/login/tools.js b/src/views/login/tools.js
index 370df5c..b97754d 100644
--- a/src/views/login/tools.js
+++ b/src/views/login/tools.js
@@ -1,9 +1,11 @@
+import i18n from '@/lang'
+const t = i18n.global.t
export const validateName = (rule, value, callback) => {
var str = ""
if (!value) {
- str = 'Please input the name'
+ str = t('Login.pleaseInputName')
} else if (value.length < 2 || value.length > 20) {
- str = 'Name length must be between 2 and 20 characters'
+ str = t('Login.nameLengthError', { min: 2, max: 20 })
}
callback(str ? new Error(str) : undefined)
}
@@ -11,24 +13,24 @@ export const validateEmail = (rule, value, callback) => {
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(\.[a-zA-Z]{2,})?$/
var str = ''
if (!value) {
- str = 'Please input the email'
+ str = t('Login.pleaseInputEmail')
} else if (!emailRegex.test(value)) {
- str = 'Please input the email again'
+ str = t('Login.emailFormatError')
}
callback(str ? new Error(str) : undefined)
}
export const validatePass = (rule, value, callback) => {
var str = ''
if (!value) {
- str = 'Please input the password'
+ str = t('Login.pleaseInputPassword')
} else if (value.length < 6 || value.length > 20) {
- str = 'Password length must be between 6 and 20 characters'
+ str = t('Login.passwordLengthError', { min: 6, max: 20 })
}
callback(str ? new Error(str) : undefined)
}
export const validatePrivacy = (rule, value, callback) => {
if (!value) {
- callback(new Error('Please agree to the Terms, Policy and Fees'))
+ callback(new Error(t('Login.pleaseTermsPolicy')))
} else {
callback()
}
diff --git a/src/views/login/visible-code.vue b/src/views/login/visible-code.vue
index cd59601..73aeb50 100644
--- a/src/views/login/visible-code.vue
+++ b/src/views/login/visible-code.vue
@@ -1,13 +1,12 @@
-
Verify your email address
-
- A verification code has been sent to {{ email }}
-
+
{{ $t('Login.verifyEmail') }}
+
-
Verify
-
- Resend Code in {{ timeStr }}
+ {{ $t('Login.verify') }}
+
{{ $t('Login.resendCodeIn', { time: timeStr }) }}
+
+ {{ $t('Login.resendCode') }}
@@ -67,14 +66,16 @@
font-weight: 600;
font-size: 4rem;
color: #252727;
+ font-family: SemiBold;
}
> .tip {
margin-top: 2rem;
font-size: 1.8rem;
color: #666;
- > span {
+ font-family: Regular;
+ &::v-deep > span {
color: #252727;
- font-weight: 600;
+ font-family: Medium;
}
}
> .input-code {
@@ -88,17 +89,20 @@
border-radius: 0.8rem;
color: #fff;
font-weight: 600;
+ font-family: SemiBold;
}
> .time {
user-select: none;
margin-top: 2rem;
font-size: 1.6rem;
color: #666;
+ font-family: Regular;
> span {
color: #ff7a50;
text-decoration: underline;
cursor: pointer;
font-weight: 500;
+ font-family: Medium;
}
}
}
diff --git a/src/views/nuic/index.vue b/src/views/nuic/index.vue
new file mode 100644
index 0000000..bdb7c66
--- /dev/null
+++ b/src/views/nuic/index.vue
@@ -0,0 +1,155 @@
+
+
+
+
+
FiDA
+
+
+
+
+
+
+
+
+
diff --git a/src/views/nuic/nuic-1.vue b/src/views/nuic/nuic-1.vue
new file mode 100644
index 0000000..feaa532
--- /dev/null
+++ b/src/views/nuic/nuic-1.vue
@@ -0,0 +1,54 @@
+
+
+
+
{{ $t('Nuic.hiName', { name: 'Aaa' }) }}
+
+
+
+ {{ $t('Nuic.letsGo') }}
+ {{ $t('Nuic.skip') }}
+
+
+
+
+
+
+
diff --git a/src/views/nuic/nuic-2.vue b/src/views/nuic/nuic-2.vue
new file mode 100644
index 0000000..9c007b2
--- /dev/null
+++ b/src/views/nuic/nuic-2.vue
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+ 这是一段文字
+
+
+
+
+
+ {{ $t('Nuic.loadMore') }}
+
+
+
{{ $t('Nuic.next') }}
+
+
+
+
+
+
+
diff --git a/src/views/nuic/nuic-3.vue b/src/views/nuic/nuic-3.vue
new file mode 100644
index 0000000..b13e043
--- /dev/null
+++ b/src/views/nuic/nuic-3.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+
{{ $t('Nuic.basedIn') }}
+
+
+
+
+
+
{{ $t('Nuic.role') }}
+
+
+
+
+
+ {{ $t('Nuic.allSet') }}
+
+
+
+
+
+
+