Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
c3195e83
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c3195e83
编写于
10月 12, 2017
作者:
J
Jacob Schatz
提交者:
Clement Ho
10月 12, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add create merge checkbox.
上级
3555252d
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
260 addition
and
68 deletion
+260
-68
app/assets/javascripts/api.js
app/assets/javascripts/api.js
+14
-0
app/assets/javascripts/lib/utils/url_utility.js
app/assets/javascripts/lib/utils/url_utility.js
+2
-2
app/assets/javascripts/repo/components/repo_commit_section.vue
...ssets/javascripts/repo/components/repo_commit_section.vue
+83
-8
app/assets/javascripts/repo/index.js
app/assets/javascripts/repo/index.js
+3
-0
app/assets/javascripts/repo/services/repo_service.js
app/assets/javascripts/repo/services/repo_service.js
+4
-0
app/assets/javascripts/repo/stores/repo_store.js
app/assets/javascripts/repo/stores/repo_store.js
+18
-0
app/assets/javascripts/vue_shared/components/popup_dialog.vue
...assets/javascripts/vue_shared/components/popup_dialog.vue
+12
-1
app/views/shared/repo/_repo.html.haml
app/views/shared/repo/_repo.html.haml
+2
-0
changelogs/unreleased/new-mr-repo-editor.yml
changelogs/unreleased/new-mr-repo-editor.yml
+5
-0
spec/javascripts/helpers/set_timeout_promise_helper.js
spec/javascripts/helpers/set_timeout_promise_helper.js
+3
-0
spec/javascripts/repo/components/repo_commit_section_spec.js
spec/javascripts/repo/components/repo_commit_section_spec.js
+114
-57
未找到文件。
app/assets/javascripts/api.js
浏览文件 @
c3195e83
...
...
@@ -15,6 +15,7 @@ const Api = {
issuableTemplatePath
:
'
/:namespace_path/:project_path/templates/:type/:key
'
,
usersPath
:
'
/api/:version/users.json
'
,
commitPath
:
'
/api/:version/projects/:id/repository/commits
'
,
branchSinglePath
:
'
/api/:version/projects/:id/repository/branches/:branch
'
,
group
(
groupId
,
callback
)
{
const
url
=
Api
.
buildUrl
(
Api
.
groupPath
)
...
...
@@ -123,6 +124,19 @@ const Api = {
});
},
branchSingle
(
id
,
branch
)
{
const
url
=
Api
.
buildUrl
(
Api
.
branchSinglePath
)
.
replace
(
'
:id
'
,
id
)
.
replace
(
'
:branch
'
,
branch
);
return
this
.
wrapAjaxCall
({
url
,
type
:
'
GET
'
,
contentType
:
'
application/json; charset=utf-8
'
,
dataType
:
'
json
'
,
});
},
// Return text for a specific license
licenseText
(
key
,
data
,
callback
)
{
const
url
=
Api
.
buildUrl
(
Api
.
licensePath
)
...
...
app/assets/javascripts/lib/utils/url_utility.js
浏览文件 @
c3195e83
...
...
@@ -85,7 +85,7 @@ w.gl.utils.getLocationHash = function(url) {
return
hashIndex
===
-
1
?
null
:
url
.
substring
(
hashIndex
+
1
);
};
w
.
gl
.
utils
.
refreshCurrentPage
=
()
=>
gl
.
utils
.
visitUrl
(
document
.
location
.
href
);
w
.
gl
.
utils
.
refreshCurrentPage
=
()
=>
gl
.
utils
.
visitUrl
(
window
.
location
.
href
);
// eslint-disable-next-line import/prefer-default-export
export
function
visitUrl
(
url
,
external
=
false
)
{
...
...
@@ -96,7 +96,7 @@ export function visitUrl(url, external = false) {
otherWindow
.
opener
=
null
;
otherWindow
.
location
=
url
;
}
else
{
document
.
location
.
href
=
url
;
window
.
location
.
href
=
url
;
}
}
...
...
app/assets/javascripts/repo/components/repo_commit_section.vue
浏览文件 @
c3195e83
...
...
@@ -3,11 +3,17 @@ import Flash from '../../flash';
import
Store
from
'
../stores/repo_store
'
;
import
RepoMixin
from
'
../mixins/repo_mixin
'
;
import
Service
from
'
../services/repo_service
'
;
import
PopupDialog
from
'
../../vue_shared/components/popup_dialog.vue
'
;
import
{
visitUrl
}
from
'
../../lib/utils/url_utility
'
;
export
default
{
mixins
:
[
RepoMixin
],
data
:
()
=>
Store
,
mixins
:
[
RepoMixin
],
components
:
{
PopupDialog
,
},
computed
:
{
showCommitable
()
{
...
...
@@ -28,7 +34,16 @@ export default {
},
methods
:
{
makeCommit
()
{
commitToNewBranch
(
status
)
{
if
(
status
)
{
this
.
showNewBranchDialog
=
false
;
this
.
tryCommit
(
null
,
true
,
true
);
}
else
{
// reset the state
}
},
makeCommit
(
newBranch
)
{
// see https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions
const
commitMessage
=
this
.
commitMessage
;
const
actions
=
this
.
changedFiles
.
map
(
f
=>
({
...
...
@@ -36,19 +51,63 @@ export default {
file_path
:
f
.
path
,
content
:
f
.
newContent
,
}));
const
branch
=
newBranch
?
`
${
this
.
currentBranch
}
-
${
this
.
currentShortHash
}
`
:
this
.
currentBranch
;
const
payload
=
{
branch
:
Store
.
currentBranch
,
branch
,
commit_message
:
commitMessage
,
actions
,
};
Store
.
submitCommitsLoading
=
true
;
if
(
newBranch
)
{
payload
.
start_branch
=
this
.
currentBranch
;
}
this
.
submitCommitsLoading
=
true
;
Service
.
commitFiles
(
payload
)
.
then
(
this
.
resetCommitState
)
.
catch
(()
=>
Flash
(
'
An error occurred while committing your changes
'
));
.
then
(()
=>
{
this
.
resetCommitState
();
if
(
this
.
startNewMR
)
{
this
.
redirectToNewMr
(
branch
);
}
else
{
this
.
redirectToBranch
(
branch
);
}
})
.
catch
(()
=>
{
Flash
(
'
An error occurred while committing your changes
'
);
});
},
tryCommit
(
e
,
skipBranchCheck
=
false
,
newBranch
=
false
)
{
if
(
skipBranchCheck
)
{
this
.
makeCommit
(
newBranch
);
}
else
{
Store
.
setBranchHash
()
.
then
(()
=>
{
if
(
Store
.
branchChanged
)
{
Store
.
showNewBranchDialog
=
true
;
return
;
}
this
.
makeCommit
(
newBranch
);
})
.
catch
(()
=>
{
Flash
(
'
An error occurred while committing your changes
'
);
});
}
},
redirectToNewMr
(
branch
)
{
visitUrl
(
this
.
newMrTemplateUrl
.
replace
(
'
{{source_branch}}
'
,
branch
));
},
redirectToBranch
(
branch
)
{
visitUrl
(
this
.
customBranchURL
.
replace
(
'
{{branch}}
'
,
branch
));
},
resetCommitState
()
{
this
.
submitCommitsLoading
=
false
;
this
.
openedFiles
=
this
.
openedFiles
.
map
((
file
)
=>
{
const
f
=
file
;
f
.
changed
=
false
;
return
f
;
});
this
.
changedFiles
=
[];
this
.
commitMessage
=
''
;
this
.
editMode
=
false
;
...
...
@@ -62,9 +121,17 @@ export default {
<div
v-if=
"showCommitable"
id=
"commit-area"
>
<popup-dialog
v-if=
"showNewBranchDialog"
:primary-button-label=
"__('Create new branch')"
kind=
"primary"
:title=
"__('Branch has changed')"
:text=
"__('This branch has changed since you started editing. Would you like to create a new branch?')"
@
submit=
"commitToNewBranch"
/>
<form
class=
"form-horizontal"
@
submit.prevent=
"
make
Commit"
>
@
submit.prevent=
"
try
Commit"
>
<fieldset>
<div
class=
"form-group"
>
<label
class=
"col-md-4 control-label staged-files"
>
...
...
@@ -117,7 +184,7 @@ export default {
class=
"btn btn-success"
>
<i
v-if=
"submitCommitsLoading"
class=
"fa fa-spinner fa-spin"
class=
"
js-commit-loading-icon
fa fa-spinner fa-spin"
aria-hidden=
"true"
aria-label=
"loading"
>
</i>
...
...
@@ -126,6 +193,14 @@ export default {
</span>
</button>
</div>
<div
class=
"col-md-offset-4 col-md-6"
>
<div
class=
"checkbox"
>
<label>
<input
type=
"checkbox"
v-model=
"startNewMR"
>
<span>
Start a
<strong>
new merge request
</strong>
with these changes
</span>
</label>
</div>
</div>
</fieldset>
</form>
</div>
...
...
app/assets/javascripts/repo/index.js
浏览文件 @
c3195e83
...
...
@@ -31,8 +31,11 @@ function setInitialStore(data) {
Store
.
projectUrl
=
data
.
projectUrl
;
Store
.
canCommit
=
data
.
canCommit
;
Store
.
onTopOfBranch
=
data
.
onTopOfBranch
;
Store
.
newMrTemplateUrl
=
decodeURIComponent
(
data
.
newMrTemplateUrl
);
Store
.
customBranchURL
=
decodeURIComponent
(
data
.
blobUrl
);
Store
.
currentBranch
=
$
(
'
button.dropdown-menu-toggle
'
).
attr
(
'
data-ref
'
);
Store
.
checkIsCommitable
();
Store
.
setBranchHash
();
}
function
initRepo
(
el
)
{
...
...
app/assets/javascripts/repo/services/repo_service.js
浏览文件 @
c3195e83
...
...
@@ -64,6 +64,10 @@ const RepoService = {
return
urlArray
.
join
(
'
/
'
);
},
getBranch
()
{
return
Api
.
branchSingle
(
Store
.
projectId
,
Store
.
currentBranch
);
},
commitFiles
(
payload
)
{
return
Api
.
commitMultiple
(
Store
.
projectId
,
payload
)
.
then
(
this
.
commitFlash
);
...
...
app/assets/javascripts/repo/stores/repo_store.js
浏览文件 @
c3195e83
...
...
@@ -23,6 +23,7 @@ const RepoStore = {
title
:
''
,
status
:
false
,
},
showNewBranchDialog
:
false
,
activeFile
:
Helper
.
getDefaultActiveFile
(),
activeFileIndex
:
0
,
activeLine
:
-
1
,
...
...
@@ -31,6 +32,12 @@ const RepoStore = {
isCommitable
:
false
,
binary
:
false
,
currentBranch
:
''
,
startNewMR
:
false
,
currentHash
:
''
,
currentShortHash
:
''
,
customBranchURL
:
''
,
newMrTemplateUrl
:
''
,
branchChanged
:
false
,
commitMessage
:
''
,
binaryTypes
:
{
png
:
false
,
...
...
@@ -49,6 +56,17 @@ const RepoStore = {
});
},
setBranchHash
()
{
return
Service
.
getBranch
()
.
then
((
data
)
=>
{
if
(
RepoStore
.
currentHash
!==
''
&&
data
.
commit
.
id
!==
RepoStore
.
currentHash
)
{
RepoStore
.
branchChanged
=
true
;
}
RepoStore
.
currentHash
=
data
.
commit
.
id
;
RepoStore
.
currentShortHash
=
data
.
commit
.
short_id
;
});
},
// mutations
checkIsCommitable
()
{
RepoStore
.
isCommitable
=
RepoStore
.
onTopOfBranch
&&
RepoStore
.
canCommit
;
...
...
app/assets/javascripts/vue_shared/components/popup_dialog.vue
浏览文件 @
c3195e83
...
...
@@ -16,6 +16,11 @@ export default {
required
:
false
,
default
:
'
primary
'
,
},
closeKind
:
{
type
:
String
,
required
:
false
,
default
:
'
default
'
,
},
closeButtonLabel
:
{
type
:
String
,
required
:
false
,
...
...
@@ -33,6 +38,11 @@ export default {
[
`btn-
${
this
.
kind
}
`
]:
true
,
};
},
btnCancelKindClass
()
{
return
{
[
`btn-
${
this
.
closeKind
}
`
]:
true
,
};
},
},
methods
:
{
...
...
@@ -70,7 +80,8 @@ export default {
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
class=
"btn"
:class=
"btnCancelKindClass"
@
click=
"emitSubmit(false)"
>
{{
closeButtonLabel
}}
</button>
...
...
app/views/shared/repo/_repo.html.haml
浏览文件 @
c3195e83
...
...
@@ -3,5 +3,7 @@
refs_url:
refs_project_path
(
project
,
format: :json
),
project_url:
project_path
(
project
),
project_id:
project
.
id
,
blob_url:
namespace_project_blob_path
(
project
.
namespace
,
project
,
'
{{
branch
}}
'
),
new_mr_template_url:
namespace_project_new_merge_request_path
(
project
.
namespace
,
project
,
merge_request:
{
source_branch:
'
{{
source_branch
}}
'
}),
can_commit:
(
!!
can_push_branch?
(
project
,
@ref
)).
to_s
,
on_top_of_branch:
(
!!
on_top_of_branch?
(
project
,
@ref
)).
to_s
}
}
changelogs/unreleased/new-mr-repo-editor.yml
0 → 100644
浏览文件 @
c3195e83
---
title
:
'
Repo
Editor:
Add
option
to
start
a
new
MR
directly
from
comit
section'
merge_request
:
14665
author
:
type
:
added
spec/javascripts/helpers/set_timeout_promise_helper.js
0 → 100644
浏览文件 @
c3195e83
export
default
(
time
=
0
)
=>
new
Promise
((
resolve
)
=>
{
setTimeout
(
resolve
,
time
);
});
spec/javascripts/repo/components/repo_commit_section_spec.js
浏览文件 @
c3195e83
...
...
@@ -2,29 +2,13 @@ import Vue from 'vue';
import
repoCommitSection
from
'
~/repo/components/repo_commit_section.vue
'
;
import
RepoStore
from
'
~/repo/stores/repo_store
'
;
import
RepoService
from
'
~/repo/services/repo_service
'
;
import
getSetTimeoutPromise
from
'
../../helpers/set_timeout_promise_helper
'
;
describe
(
'
RepoCommitSection
'
,
()
=>
{
const
branch
=
'
master
'
;
const
projectUrl
=
'
projectUrl
'
;
const
changedFiles
=
[{
id
:
0
,
changed
:
true
,
url
:
`/namespace/
${
projectUrl
}
/blob/
${
branch
}
/dir/file0.ext`
,
path
:
'
dir/file0.ext
'
,
newContent
:
'
a
'
,
},
{
id
:
1
,
changed
:
true
,
url
:
`/namespace/
${
projectUrl
}
/blob/
${
branch
}
/dir/file1.ext`
,
path
:
'
dir/file1.ext
'
,
newContent
:
'
b
'
,
}];
const
openedFiles
=
changedFiles
.
concat
([{
id
:
2
,
url
:
`/namespace/
${
projectUrl
}
/blob/
${
branch
}
/dir/file2.ext`
,
path
:
'
dir/file2.ext
'
,
changed
:
false
,
}]);
let
changedFiles
;
let
openedFiles
;
RepoStore
.
projectUrl
=
projectUrl
;
...
...
@@ -34,6 +18,29 @@ describe('RepoCommitSection', () => {
return
new
RepoCommitSection
().
$mount
(
el
);
}
beforeEach
(()
=>
{
// Create a copy for each test because these can get modified directly
changedFiles
=
[{
id
:
0
,
changed
:
true
,
url
:
`/namespace/
${
projectUrl
}
/blob/
${
branch
}
/dir/file0.ext`
,
path
:
'
dir/file0.ext
'
,
newContent
:
'
a
'
,
},
{
id
:
1
,
changed
:
true
,
url
:
`/namespace/
${
projectUrl
}
/blob/
${
branch
}
/dir/file1.ext`
,
path
:
'
dir/file1.ext
'
,
newContent
:
'
b
'
,
}];
openedFiles
=
changedFiles
.
concat
([{
id
:
2
,
url
:
`/namespace/
${
projectUrl
}
/blob/
${
branch
}
/dir/file2.ext`
,
path
:
'
dir/file2.ext
'
,
changed
:
false
,
}]);
});
it
(
'
renders a commit section
'
,
()
=>
{
RepoStore
.
isCommitable
=
true
;
RepoStore
.
currentBranch
=
branch
;
...
...
@@ -85,55 +92,104 @@ describe('RepoCommitSection', () => {
expect
(
vm
.
$el
.
innerHTML
).
toBeFalsy
();
});
it
(
'
shows commit submit and summary if commitMessage and spinner if submitCommitsLoading
'
,
(
done
)
=>
{
describe
(
'
when submitting
'
,
()
=>
{
let
el
;
let
vm
;
const
projectId
=
'
projectId
'
;
const
commitMessage
=
'
commitMessage
'
;
RepoStore
.
isCommitable
=
true
;
RepoStore
.
currentBranch
=
branch
;
RepoStore
.
targetBranch
=
branch
;
RepoStore
.
openedFiles
=
openedFiles
;
RepoStore
.
projectId
=
projectId
;
// We need to append to body to get form `submit` events working
// Otherwise we run into, "Form submission canceled because the form is not connected"
// See https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm
const
el
=
document
.
createElement
(
'
div
'
);
document
.
body
.
appendChild
(
el
);
const
vm
=
createComponent
(
el
);
const
commitMessageEl
=
vm
.
$el
.
querySelector
(
'
#commit-message
'
);
const
submitCommit
=
vm
.
$refs
.
submitCommit
;
beforeEach
((
done
)
=>
{
RepoStore
.
isCommitable
=
true
;
RepoStore
.
currentBranch
=
branch
;
RepoStore
.
targetBranch
=
branch
;
RepoStore
.
openedFiles
=
openedFiles
;
RepoStore
.
projectId
=
projectId
;
// We need to append to body to get form `submit` events working
// Otherwise we run into, "Form submission canceled because the form is not connected"
// See https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm
el
=
document
.
createElement
(
'
div
'
);
document
.
body
.
appendChild
(
el
);
vm
=
createComponent
(
el
);
vm
.
commitMessage
=
commitMessage
;
spyOn
(
vm
,
'
tryCommit
'
).
and
.
callThrough
();
spyOn
(
vm
,
'
redirectToNewMr
'
).
and
.
stub
();
spyOn
(
vm
,
'
redirectToBranch
'
).
and
.
stub
();
spyOn
(
RepoService
,
'
commitFiles
'
).
and
.
returnValue
(
Promise
.
resolve
());
spyOn
(
RepoService
,
'
getBranch
'
).
and
.
returnValue
(
Promise
.
resolve
({
commit
:
{
id
:
1
,
short_id
:
1
,
},
}));
// Wait for the vm data to be in place
Vue
.
nextTick
(()
=>
{
done
();
});
});
vm
.
commitMessage
=
commitMessage
;
afterEach
(()
=>
{
vm
.
$destroy
();
el
.
remove
();
});
Vue
.
nextTick
(()
=>
{
it
(
'
shows commit message
'
,
()
=>
{
const
commitMessageEl
=
vm
.
$el
.
querySelector
(
'
#commit-message
'
);
expect
(
commitMessageEl
.
value
).
toBe
(
commitMessage
);
expect
(
submitCommit
.
disabled
).
toBeFalsy
(
);
}
);
spyOn
(
vm
,
'
makeCommit
'
).
and
.
callThrough
();
spyOn
(
RepoService
,
'
commitFiles
'
).
and
.
callFake
(()
=>
Promise
.
resolve
());
it
(
'
allows you to submit
'
,
()
=>
{
const
submitCommit
=
vm
.
$refs
.
submitCommit
;
expect
(
submitCommit
.
disabled
).
toBeFalsy
();
});
it
(
'
shows commit submit and summary if commitMessage and spinner if submitCommitsLoading
'
,
(
done
)
=>
{
const
submitCommit
=
vm
.
$refs
.
submitCommit
;
submitCommit
.
click
();
Vue
.
nextTick
(()
=>
{
expect
(
vm
.
makeCommit
).
toHaveBeenCalled
();
expect
(
submitCommit
.
querySelector
(
'
.fa-spinner.fa-spin
'
)).
toBeTruthy
();
const
args
=
RepoService
.
commitFiles
.
calls
.
allArgs
()[
0
];
const
{
commit_message
,
actions
,
branch
:
payloadBranch
}
=
args
[
0
];
expect
(
commit_message
).
toBe
(
commitMessage
);
expect
(
actions
.
length
).
toEqual
(
2
);
expect
(
payloadBranch
).
toEqual
(
branch
);
expect
(
actions
[
0
].
action
).
toEqual
(
'
update
'
);
expect
(
actions
[
1
].
action
).
toEqual
(
'
update
'
);
expect
(
actions
[
0
].
content
).
toEqual
(
openedFiles
[
0
].
newContent
);
expect
(
actions
[
1
].
content
).
toEqual
(
openedFiles
[
1
].
newContent
);
expect
(
actions
[
0
].
file_path
).
toEqual
(
openedFiles
[
0
].
path
);
expect
(
actions
[
1
].
file_path
).
toEqual
(
openedFiles
[
1
].
path
);
// Wait for the branch check to finish
getSetTimeoutPromise
()
.
then
(()
=>
Vue
.
nextTick
())
.
then
(()
=>
{
expect
(
vm
.
tryCommit
).
toHaveBeenCalled
();
expect
(
submitCommit
.
querySelector
(
'
.js-commit-loading-icon
'
)).
toBeTruthy
();
expect
(
vm
.
redirectToBranch
).
toHaveBeenCalled
();
const
args
=
RepoService
.
commitFiles
.
calls
.
allArgs
()[
0
];
const
{
commit_message
,
actions
,
branch
:
payloadBranch
}
=
args
[
0
];
expect
(
commit_message
).
toBe
(
commitMessage
);
expect
(
actions
.
length
).
toEqual
(
2
);
expect
(
payloadBranch
).
toEqual
(
branch
);
expect
(
actions
[
0
].
action
).
toEqual
(
'
update
'
);
expect
(
actions
[
1
].
action
).
toEqual
(
'
update
'
);
expect
(
actions
[
0
].
content
).
toEqual
(
openedFiles
[
0
].
newContent
);
expect
(
actions
[
1
].
content
).
toEqual
(
openedFiles
[
1
].
newContent
);
expect
(
actions
[
0
].
file_path
).
toEqual
(
openedFiles
[
0
].
path
);
expect
(
actions
[
1
].
file_path
).
toEqual
(
openedFiles
[
1
].
path
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
done
();
});
it
(
'
redirects to MR creation page if start new MR checkbox checked
'
,
(
done
)
=>
{
vm
.
startNewMR
=
true
;
Vue
.
nextTick
()
.
then
(()
=>
{
const
submitCommit
=
vm
.
$refs
.
submitCommit
;
submitCommit
.
click
();
})
// Wait for the branch check to finish
.
then
(()
=>
getSetTimeoutPromise
())
.
then
(()
=>
{
expect
(
vm
.
redirectToNewMr
).
toHaveBeenCalled
();
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
});
...
...
@@ -143,6 +199,7 @@ describe('RepoCommitSection', () => {
const
vm
=
{
submitCommitsLoading
:
true
,
changedFiles
:
new
Array
(
10
),
openedFiles
:
new
Array
(
3
),
commitMessage
:
'
commitMessage
'
,
editMode
:
true
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录