Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Yuan Zhixiang
c-render-vue
Commits
076e4451
Commit
076e4451
authored
Apr 23, 2024
by
Yuan Zhixiang
Browse files
修改指令前缀
parent
20713ac9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/components/ControlPanel.vue
View file @
076e4451
...
@@ -14,7 +14,7 @@ const css_grid_template_columns = computed(() => {
...
@@ -14,7 +14,7 @@ const css_grid_template_columns = computed(() => {
return
`repeat(
${
total_steps
.
value
}
, 1fr)`
;
return
`repeat(
${
total_steps
.
value
}
, 1fr)`
;
})
})
const
command_available
=
computed
(()
=>
{
const
command_available
=
computed
(()
=>
{
return
stdin_input
.
value
.
startsWith
(
"
/
set
"
)
return
stdin_input
.
value
.
startsWith
(
"
/
"
)
})
})
...
...
src/components/buttons/CommandButton.vue
View file @
076e4451
...
@@ -5,24 +5,25 @@ import { computed, inject } from 'vue';
...
@@ -5,24 +5,25 @@ import { computed, inject } from 'vue';
const
{
stdin_input
,
feature_show_new_vars
}
=
inject
(
'
app
'
)
const
{
stdin_input
,
feature_show_new_vars
}
=
inject
(
'
app
'
)
const
command
=
computed
(()
=>
{
const
command
=
computed
(()
=>
{
if
(
stdin_input
.
value
.
length
<=
5
){
if
(
stdin_input
.
value
.
length
<=
1
){
return
''
return
''
}
else
{
}
else
{
return
stdin_input
.
value
.
slice
(
5
)
return
stdin_input
.
value
.
slice
(
1
)
}
}
})
})
function
click
(){
function
click
(){
const
cmd
=
command
.
value
const
cmd
=
command
.
value
if
(
cmd
==
'
help
'
){
console
.
log
(
cmd
)
stdin_input
.
value
=
'
available commands:
\n
/set show_new_vars
'
if
(
cmd
==
'
?
'
){
stdin_input
.
value
=
'
available commands:
\n
/show_new_vars
'
}
}
else
if
(
cmd
==
'
show_new_vars
'
){
else
if
(
cmd
==
'
show_new_vars
'
){
feature_show_new_vars
.
value
=
!
feature_show_new_vars
.
value
feature_show_new_vars
.
value
=
!
feature_show_new_vars
.
value
stdin_input
.
value
=
'
feature_show_new_vars:
'
+
feature_show_new_vars
.
value
stdin_input
.
value
=
'
feature_show_new_vars:
'
+
feature_show_new_vars
.
value
}
}
else
{
else
{
stdin_input
.
value
=
'
unknown command
\n
use /
set help
'
stdin_input
.
value
=
'
unknown command
\n
use /
?
'
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment