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
e953932d
Commit
e953932d
authored
Apr 15, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue-title-vue-sfc' into 'master'
Issue Title Vue: convert to .vue - use 'render' with 'createElement' in index See merge request !10625
parents
309bab43
8918433a
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 @
e953932d
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 @
e953932d
<
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 @
e953932d
...
...
@@ -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 @
e953932d
...
...
@@ -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 @
e953932d
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