BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8918433a
Commit
8918433a
authored
Apr 15, 2017
by
Regis Boudinot
Committed by
Phil Hughes
Apr 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue Title Vue: convert to .vue - use 'render' with 'createElement' in index
parent
309bab43
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
25 deletions
+24
-25
index.js
app/assets/javascripts/issue_show/index.js
+15
-21
issue_title.vue
app/assets/javascripts/issue_show/issue_title.vue
+6
-3
show.html.haml
app/views/projects/issues/show.html.haml
+1
-0
webpack.config.js
config/webpack.config.js
+1
-0
issue_title_spec.js
spec/javascripts/issue_show/issue_title_spec.js
+1
-1
No files found.
app/assets/javascripts/issue_show/index.js
View file @
8918433a
import
Vue
from
'vue'
;
import
IssueTitle
from
'./issue_title'
;
import
IssueTitle
from
'./issue_title
.vue
'
;
import
'../vue_shared/vue_resource_interceptor'
;
const
vueOptions
=
()
=>
({
el
:
'.issue-title-entrypoint'
,
components
:
{
IssueTitle
,
},
data
()
{
const
issueTitleData
=
document
.
querySelector
(
'.issue-title-data'
).
dataset
;
(()
=>
{
const
issueTitleData
=
document
.
querySelector
(
'.issue-title-data'
).
dataset
;
const
{
initialTitle
,
endpoint
}
=
issueTitleData
;
return
{
initialTitle
:
issueTitleData
.
initialTitle
,
endpoint
:
issueTitleData
.
endpoint
,
};
},
template
:
`
<IssueTitle
:initialTitle="initialTitle"
:endpoint="endpoint"
/>
`
,
});
const
vm
=
new
Vue
({
el
:
'.issue-title-entrypoint'
,
render
:
createElement
=>
createElement
(
IssueTitle
,
{
props
:
{
initialTitle
,
endpoint
,
},
}),
});
(()
=>
new
Vue
(
vueOptions
()))();
return
vm
;
})();
app/assets/javascripts/issue_show/issue_title.
js
→
app/assets/javascripts/issue_show/issue_title.
vue
View file @
8918433a
<
script
>
import
Visibility
from
'visibilityjs'
;
import
Poll
from
'./../lib/utils/poll'
;
import
Service
from
'./services/index'
;
...
...
@@ -72,7 +73,9 @@ export default {
created
()
{
this
.
fetch
();
},
template
:
`
<h2 class='title' v-html='title'></h2>
`
,
};
</
script
>
<
template
>
<h2
class=
"title"
v-html=
"title"
></h2>
</
template
>
app/views/projects/issues/show.html.haml
View file @
8918433a
...
...
@@ -79,4 +79,5 @@
=
render
'shared/issuable/sidebar'
,
issuable:
@issue
=
page_specific_javascript_bundle_tag
(
'common_vue'
)
=
page_specific_javascript_bundle_tag
(
'issue_show'
)
config/webpack.config.js
View file @
8918433a
...
...
@@ -125,6 +125,7 @@ var config = {
'notebook_viewer'
,
'pdf_viewer'
,
'vue_pipelines'
,
'issue_show'
,
],
minChunks
:
function
(
module
,
count
)
{
return
module
.
resource
&&
(
/vue_shared/
).
test
(
module
.
resource
);
...
...
spec/javascripts/issue_show/issue_title_spec.js
View file @
8918433a
import
Vue
from
'vue'
;
import
issueTitle
from
'~/issue_show/issue_title'
;
import
issueTitle
from
'~/issue_show/issue_title
.vue
'
;
describe
(
'Issue Title'
,
()
=>
{
let
IssueTitleComponent
;
...
...
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