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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
212b4838
Commit
212b4838
authored
May 12, 2020
by
Paul Slaughter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate vue mount component helper
https://gitlab.com/groups/gitlab-org/-/epics/2445
parent
bd75e6ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
38 deletions
+27
-38
spec/frontend/helpers/vue_mount_component_helper.js
spec/frontend/helpers/vue_mount_component_helper.js
+25
-0
spec/javascripts/helpers/vue_mount_component_helper.js
spec/javascripts/helpers/vue_mount_component_helper.js
+2
-38
No files found.
spec/frontend/helpers/vue_mount_component_helper.js
View file @
212b4838
import
Vue
from
'
vue
'
;
/**
* Deprecated. Please do not use.
* Please see https://gitlab.com/groups/gitlab-org/-/epics/2445
*/
const
mountComponent
=
(
Component
,
props
=
{},
el
=
null
)
=>
new
Component
({
propsData
:
props
,
}).
$mount
(
el
);
/**
* Deprecated. Please do not use.
* Please see https://gitlab.com/groups/gitlab-org/-/epics/2445
*/
export
const
createComponentWithStore
=
(
Component
,
store
,
propsData
=
{})
=>
new
Component
({
store
,
propsData
,
});
/**
* Deprecated. Please do not use.
* Please see https://gitlab.com/groups/gitlab-org/-/epics/2445
*/
export
const
mountComponentWithStore
=
(
Component
,
{
el
,
props
,
store
})
=>
new
Component
({
store
,
propsData
:
props
||
{},
}).
$mount
(
el
);
/**
* Deprecated. Please do not use.
* Please see https://gitlab.com/groups/gitlab-org/-/epics/2445
*/
export
const
mountComponentWithSlots
=
(
Component
,
{
props
,
slots
})
=>
{
const
component
=
new
Component
({
propsData
:
props
||
{},
...
...
@@ -30,9 +46,18 @@ export const mountComponentWithSlots = (Component, { props, slots }) => {
/**
* Mount a component with the given render method.
*
* -----------------------------
* Deprecated. Please do not use.
* Please see https://gitlab.com/groups/gitlab-org/-/epics/2445
* -----------------------------
*
* This helps with inserting slots that need to be compiled.
*/
export
const
mountComponentWithRender
=
(
render
,
el
=
null
)
=>
mountComponent
(
Vue
.
extend
({
render
}),
{},
el
);
/**
* Deprecated. Please do not use.
* Please see https://gitlab.com/groups/gitlab-org/-/epics/2445
*/
export
default
mountComponent
;
spec/javascripts/helpers/vue_mount_component_helper.js
View file @
212b4838
import
Vue
from
'
vue
'
;
const
mountComponent
=
(
Component
,
props
=
{},
el
=
null
)
=>
new
Component
({
propsData
:
props
,
}).
$mount
(
el
);
export
const
createComponentWithStore
=
(
Component
,
store
,
propsData
=
{})
=>
new
Component
({
store
,
propsData
,
});
export
const
mountComponentWithStore
=
(
Component
,
{
el
,
props
,
store
})
=>
new
Component
({
store
,
propsData
:
props
||
{},
}).
$mount
(
el
);
export
const
mountComponentWithSlots
=
(
Component
,
{
props
,
slots
})
=>
{
const
component
=
new
Component
({
propsData
:
props
||
{},
});
component
.
$slots
=
slots
;
return
component
.
$mount
();
};
/**
* Mount a component with the given render method.
*
* This helps with inserting slots that need to be compiled.
*/
export
const
mountComponentWithRender
=
(
render
,
el
=
null
)
=>
mountComponent
(
Vue
.
extend
({
render
}),
{},
el
);
export
default
mountComponent
;
export
{
default
}
from
'
../../frontend/helpers/vue_mount_component_helper
'
;
export
*
from
'
../../frontend/helpers/vue_mount_component_helper
'
;
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