Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-editor
Project
Project
Details
Activity
Releases
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
zeroing-editor
Commits
99c79c3b
Commit
99c79c3b
authored
Nov 26, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
psd上传后使用文件名作为视图名
修复复制项目的问题
parent
f832154c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
3 deletions
+8
-3
psd瘦身.jsx
jsx/psd瘦身.jsx
+0
-0
自动合并.jsx
jsx/自动合并.jsx
+2
-1
Views.vue
src/views/Editor/Views.vue
+3
-1
DuplicateProjectDialog.vue
src/views/Home/DuplicateProjectDialog.vue
+3
-1
No files found.
psd瘦身.jsx
→
jsx/
psd瘦身.jsx
View file @
99c79c3b
File moved
自动合并.jsx
→
jsx/
自动合并.jsx
View file @
99c79c3b
...
...
@@ -3,12 +3,13 @@
*/
var
mergeFlagReg
=
/__m$/
;
var
extName
=
'.psd'
;
var
oldDocument
=
app
.
activeDocument
;
var
mergeLayers
=
[];
var
document
=
oldDocument
.
duplicate
(
oldDocument
.
name
+
'-合并'
,
0
);
var
document
=
oldDocument
.
duplicate
(
oldDocument
.
name
.
replace
(
extName
,
''
)
+
'-合并'
+
extName
,
0
);
app
.
activeDocument
=
document
;
merge
(
document
);
...
...
src/views/Editor/Views.vue
View file @
99c79c3b
...
...
@@ -22,7 +22,7 @@
:expand-on-click-node=
"false"
draggable
highlight-current
:default-expand-all=
"
tru
e"
:default-expand-all=
"
fals
e"
@
node-click=
"handleNodeClick"
empty-text=
""
:allow-drag=
"allowDrag"
...
...
@@ -136,6 +136,8 @@ export default {
console
.
log
(
'upload success'
,
response
);
const
{
view
,
assets
}
=
response
.
data
;
view
.
name
=
file
.
name
.
substring
(
0
,
file
.
name
.
lastIndexOf
(
'.'
));
this
.
importView
(
view
);
this
.
importAssets
(
assets
);
}
else
{
...
...
src/views/Home/DuplicateProjectDialog.vue
View file @
99c79c3b
...
...
@@ -22,7 +22,8 @@
return
{
visible
:
false
,
project
:
{
name
:
''
id
:
''
,
name
:
''
,
},
template
:
'blank'
,
templates
:
{
...
...
@@ -39,6 +40,7 @@
methods
:
{
async
show
(
project
)
{
this
.
project
.
name
=
project
.
name
+
'-'
+
this
.
$t
(
'copy'
)
+
'-'
+
Math
.
floor
(
Math
.
random
()
*
10000
);
this
.
project
.
id
=
project
.
id
;
this
.
visible
=
true
;
},
doCreateProject
()
{
...
...
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