Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
64e159ad
Commit
64e159ad
authored
May 16, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created form component instead of using :is incorrectly
[ci skip]
parent
36df19e7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
47 deletions
+57
-47
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+18
-20
app/assets/javascripts/issue_show/components/form.vue
app/assets/javascripts/issue_show/components/form.vue
+30
-0
app/assets/javascripts/issue_show/components/title.vue
app/assets/javascripts/issue_show/components/title.vue
+9
-27
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
64e159ad
...
@@ -7,7 +7,7 @@ import Service from '../services/index';
...
@@ -7,7 +7,7 @@ import Service from '../services/index';
import
Store
from
'
../stores
'
;
import
Store
from
'
../stores
'
;
import
titleComponent
from
'
./title.vue
'
;
import
titleComponent
from
'
./title.vue
'
;
import
descriptionComponent
from
'
./description.vue
'
;
import
descriptionComponent
from
'
./description.vue
'
;
import
editActions
from
'
./edit_actions
.vue
'
;
import
formComponent
from
'
./form
.vue
'
;
export
default
{
export
default
{
props
:
{
props
:
{
...
@@ -56,9 +56,6 @@ export default {
...
@@ -56,9 +56,6 @@ export default {
};
};
},
},
computed
:
{
computed
:
{
elementType
()
{
return
this
.
showForm
?
'
form
'
:
'
div
'
;
},
formState
()
{
formState
()
{
return
this
.
store
.
formState
;
return
this
.
store
.
formState
;
},
},
...
@@ -66,7 +63,7 @@ export default {
...
@@ -66,7 +63,7 @@ export default {
components
:
{
components
:
{
descriptionComponent
,
descriptionComponent
,
titleComponent
,
titleComponent
,
editActions
,
formComponent
,
},
},
methods
:
{
methods
:
{
openForm
()
{
openForm
()
{
...
@@ -143,10 +140,13 @@ export default {
...
@@ -143,10 +140,13 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div
:is=
"elementType"
>
<div>
<title-component
<form-component
v-if=
"canUpdate && showForm"
:form-state=
"formState"
:form-state=
"formState"
:show-form=
"showForm"
:can-destroy=
"canDestroy"
/>
<div
v-else
>
<title-component
:issuable-ref=
"issuableRef"
:issuable-ref=
"issuableRef"
:title-html=
"state.titleHtml"
:title-html=
"state.titleHtml"
:title-text=
"state.titleText"
/>
:title-text=
"state.titleText"
/>
...
@@ -157,8 +157,6 @@ export default {
...
@@ -157,8 +157,6 @@ export default {
:description-text=
"state.descriptionText"
:description-text=
"state.descriptionText"
:updated-at=
"state.updatedAt"
:updated-at=
"state.updatedAt"
:task-status=
"state.taskStatus"
/>
:task-status=
"state.taskStatus"
/>
<edit-actions
</div>
v-if=
"canUpdate && showForm"
:can-destroy=
"canDestroy"
/>
</div>
</div>
</
template
>
</
template
>
app/assets/javascripts/issue_show/components/form.vue
0 → 100644
View file @
64e159ad
<
script
>
import
titleField
from
'
./fields/title.vue
'
;
import
editActions
from
'
./edit_actions.vue
'
;
export
default
{
props
:
{
canDestroy
:
{
type
:
Boolean
,
required
:
true
,
},
formState
:
{
type
:
Object
,
required
:
true
,
},
},
components
:
{
titleField
,
editActions
,
},
};
</
script
>
<
template
>
<form>
<title-field
:form-state=
"formState"
/>
<edit-actions
:can-destroy=
"canDestroy"
/>
</form>
</
template
>
app/assets/javascripts/issue_show/components/title.vue
View file @
64e159ad
<
script
>
<
script
>
import
animateMixin
from
'
../mixins/animate
'
;
import
animateMixin
from
'
../mixins/animate
'
;
import
titleField
from
'
./fields/title.vue
'
;
export
default
{
export
default
{
mixins
:
[
animateMixin
],
mixins
:
[
animateMixin
],
components
:
{
titleField
,
},
data
()
{
data
()
{
return
{
return
{
preAnimation
:
false
,
preAnimation
:
false
,
...
@@ -27,14 +23,6 @@
...
@@ -27,14 +23,6 @@
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
formState
:
{
type
:
Object
,
required
:
true
,
},
showForm
:
{
type
:
Boolean
,
required
:
true
,
},
},
},
watch
:
{
watch
:
{
titleHtml
()
{
titleHtml
()
{
...
@@ -53,12 +41,7 @@
...
@@ -53,12 +41,7 @@
</
script
>
</
script
>
<
template
>
<
template
>
<div>
<title-field
v-if=
"showForm"
:form-state=
"formState"
/>
<h2
<h2
v-else
class=
"title"
class=
"title"
:class=
"
{
:class=
"
{
'issue-realtime-pre-pulse': preAnimation,
'issue-realtime-pre-pulse': preAnimation,
...
@@ -67,5 +50,4 @@
...
@@ -67,5 +50,4 @@
v-html="titleHtml"
v-html="titleHtml"
>
>
</h2>
</h2>
</div>
</
template
>
</
template
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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