Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
c6afc61c
Commit
c6afc61c
authored
3 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
fix(client): ウィジェットを追加できない問題を修正
Fix #7905
parent
4168addb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+7
-0
7 additions, 0 deletions
CHANGELOG.md
src/client/components/form/select.vue
+18
-15
18 additions, 15 deletions
src/client/components/form/select.vue
with
25 additions
and
15 deletions
CHANGELOG.md
+
7
−
0
View file @
c6afc61c
...
...
@@ -7,6 +7,13 @@
-->
## 12.x.x (unreleased)
### Improvements
### Bugfixes
-
クライアント: ウィジェットを追加できない問題を修正
## 12.93.1 (2021/10/23)
### Bugfixes
...
...
This diff is collapsed.
Click to expand it.
src/client/components/form/select.vue
+
18
−
15
View file @
c6afc61c
...
...
@@ -24,7 +24,7 @@
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
onMounted
,
onUnmounted
,
nextTick
,
ref
,
watch
,
computed
,
toRefs
}
from
'
vue
'
;
import
{
defineComponent
,
onMounted
,
onUnmounted
,
nextTick
,
ref
,
watch
,
computed
,
toRefs
,
VNode
}
from
'
vue
'
;
import
MkButton
from
'
@client/components/ui/button.vue
'
;
import
*
as
os
from
'
@client/os
'
;
...
...
@@ -140,6 +140,16 @@ export default defineComponent({
const
menu
=
[];
let
options
=
context
.
slots
.
default
();
const
pushOption
=
(
option
:
VNode
)
=>
{
menu
.
push
({
text
:
option
.
children
,
active
:
v
.
value
===
option
.
props
.
value
,
action
:
()
=>
{
v
.
value
=
option
.
props
.
value
;
},
});
};
for
(
const
optionOrOptgroup
of
options
)
{
if
(
optionOrOptgroup
.
type
===
'
optgroup
'
)
{
const
optgroup
=
optionOrOptgroup
;
...
...
@@ -148,23 +158,16 @@ export default defineComponent({
text
:
optgroup
.
props
.
label
,
});
for
(
const
option
of
optgroup
.
children
)
{
menu
.
push
({
text
:
option
.
children
,
active
:
v
.
value
===
option
.
props
.
value
,
action
:
()
=>
{
v
.
value
=
option
.
props
.
value
;
},
});
pushOption
(
option
);
}
}
else
if
(
Array
.
isArray
(
optionOrOptgroup
.
children
))
{
// 何故かフラグメントになってくることがある
const
fragment
=
optionOrOptgroup
;
for
(
const
option
of
fragment
.
children
)
{
pushOption
(
option
);
}
}
else
{
const
option
=
optionOrOptgroup
;
menu
.
push
({
text
:
option
.
children
,
active
:
v
.
value
===
option
.
props
.
value
,
action
:
()
=>
{
v
.
value
=
option
.
props
.
value
;
},
});
pushOption
(
option
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment