Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2b89321c
authored
Jan 11, 2021
by
liuchuanming
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
复用UI报错,暂时去掉UI
1 parent
50862ed2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
37 deletions
linkwe-ui/src/views/material/components/PosterPage.vue
linkwe-ui/src/views/material/poster.vue
linkwe-ui/src/views/material/components/PosterPage.vue
View file @
2b89321
...
@@ -36,7 +36,7 @@ export default {
...
@@ -36,7 +36,7 @@ export default {
options
=
Object
.
assign
(
includeUIOptions
,
this
.
options
);
options
=
Object
.
assign
(
includeUIOptions
,
this
.
options
);
}
}
this
.
editorInstance
=
new
ImageEditor
(
this
.
$refs
.
tuiImageEditor
,
options
);
this
.
editorInstance
=
new
ImageEditor
(
this
.
$refs
.
tuiImageEditor
,
options
);
document
.
getElementsByClassName
(
'tui-image-editor-header'
)[
0
].
innerHTML
=
''
;
//
document.getElementsByClassName('tui-image-editor-header')[0].innerHTML = '';
if
(
window
.
localStorage
.
getItem
(
'record'
)){
if
(
window
.
localStorage
.
getItem
(
'record'
)){
let
list
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'record'
));
let
list
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'record'
));
...
@@ -71,16 +71,16 @@ export default {
...
@@ -71,16 +71,16 @@ export default {
this
.
activeObjectId
=
null
;
this
.
activeObjectId
=
null
;
// btns leftBtn
// btns leftBtn
this
.
btn_deleteAll
=
document
.
getElementsByClassName
(
'tie-btn-deleteAll'
)[
0
];
//
this.btn_deleteAll = document.getElementsByClassName('tie-btn-deleteAll')[0];
this
.
btn_deleteAll
.
name
=
'deleteAll'
;
//
this.btn_deleteAll.name = 'deleteAll';
this
.
btn_delete
=
document
.
getElementsByClassName
(
'tie-btn-delete'
)[
0
];
//
this.btn_delete = document.getElementsByClassName('tie-btn-delete')[0];
this
.
btn_delete
.
name
=
'delete'
;
//
this.btn_delete.name = 'delete';
this
.
btn_reset
=
document
.
getElementsByClassName
(
'tie-btn-reset'
)[
0
];
//
this.btn_reset = document.getElementsByClassName('tie-btn-reset')[0];
this
.
btn_reset
.
style
.
display
=
'none'
//
this.btn_reset.style.display = 'none'
this
.
btn_redo
=
document
.
getElementsByClassName
(
'tie-btn-redo'
)[
0
];
//
this.btn_redo = document.getElementsByClassName('tie-btn-redo')[0];
this
.
btn_redo
.
name
=
'redo'
;
//
this.btn_redo.name = 'redo';
this
.
btn_undo
=
document
.
getElementsByClassName
(
'tie-btn-undo'
)[
0
];
//
this.btn_undo = document.getElementsByClassName('tie-btn-undo')[0];
this
.
btn_undo
.
name
=
'undo'
;
//
this.btn_undo.name = 'undo';
// btns rightBtn
// btns rightBtn
this
.
btnText
=
document
.
getElementById
(
'btn-text'
);
this
.
btnText
=
document
.
getElementById
(
'btn-text'
);
...
@@ -125,14 +125,10 @@ export default {
...
@@ -125,14 +125,10 @@ export default {
}.
bind
(
this
));
}.
bind
(
this
));
},
},
addEventListener
()
{
addEventListener
()
{
// Object.keys(this.$listeners).forEach(eventName => {
// this.btn_deleteAll.addEventListener('click', this.mouseClickHandler.bind(this))
// this.editorInstance.on(eventName, (...args) => this.$emit(eventName, ...args));
// this.btn_delete.addEventListener('click', this.mouseClickHandler.bind(this))
// });
// this.btn_redo.addEventListener('click', this.mouseClickHandler.bind(this))
this
.
btn_deleteAll
.
addEventListener
(
'click'
,
this
.
mouseClickHandler
.
bind
(
this
))
// this.btn_undo.addEventListener('click', this.mouseClickHandler.bind(this))
this
.
btn_delete
.
addEventListener
(
'click'
,
this
.
mouseClickHandler
.
bind
(
this
))
// this.btn_reset.addEventListener('click', this.mouseClickHandler.bind(this))
this
.
btn_redo
.
addEventListener
(
'click'
,
this
.
mouseClickHandler
.
bind
(
this
))
this
.
btn_undo
.
addEventListener
(
'click'
,
this
.
mouseClickHandler
.
bind
(
this
))
this
.
btnText
.
addEventListener
(
'click'
,
this
.
mouseClickHandler
.
bind
(
this
))
this
.
btnText
.
addEventListener
(
'click'
,
this
.
mouseClickHandler
.
bind
(
this
))
this
.
btnImage
.
addEventListener
(
'click'
,
this
.
mouseClickHandler
.
bind
(
this
))
this
.
btnImage
.
addEventListener
(
'click'
,
this
.
mouseClickHandler
.
bind
(
this
))
...
@@ -182,6 +178,9 @@ export default {
...
@@ -182,6 +178,9 @@ export default {
imageEditor
.
showSubMenu
(
'text'
);
imageEditor
.
showSubMenu
(
'text'
);
imageEditor
.
setTextToolbar
(
obj
);
imageEditor
.
setTextToolbar
(
obj
);
imageEditor
.
activateTextMode
();
imageEditor
.
activateTextMode
();
}
else
{
// 目前就一个TEXT SUB
this
.
displayingSubMenu
&&
(
this
.
displayingSubMenu
.
style
.
display
=
'none'
);
}
}
},
},
//缩放
//缩放
...
@@ -192,20 +191,20 @@ export default {
...
@@ -192,20 +191,20 @@ export default {
}
}
},
},
onRedoStackChanged
(
length
)
{
onRedoStackChanged
(
length
)
{
if
(
length
)
{
//
if (length) {
this
.
btn_redo
.
classList
.
remove
(
'disabled'
);
//
this.btn_redo.classList.remove('disabled');
}
else
{
//
} else {
this
.
btn_redo
.
classList
.
add
(
'disabled'
);
//
this.btn_redo.classList.add('disabled');
}
//
}
this
.
resizeEditor
();
//
this.resizeEditor();
},
},
onUndoStackChanged
(
length
)
{
onUndoStackChanged
(
length
)
{
if
(
length
)
{
//
if (length) {
this
.
btn_undo
.
classList
.
remove
(
'disabled'
)
//
this.btn_undo.classList.remove('disabled')
}
else
{
//
} else {
this
.
btn_undo
.
classList
.
add
(
'disabled'
)
//
this.btn_undo.classList.add('disabled')
}
//
}
this
.
resizeEditor
();
//
this.resizeEditor();
},
},
mouseClickHandler
(
event
)
{
mouseClickHandler
(
event
)
{
let
name
=
event
.
currentTarget
.
name
;
let
name
=
event
.
currentTarget
.
name
;
...
@@ -417,7 +416,7 @@ export default {
...
@@ -417,7 +416,7 @@ export default {
// }.bind(this));
// }.bind(this));
this
.
editorInstance
this
.
editorInstance
.
addText
(
text
||
'双击输入文字'
,
{
.
addText
(
text
||
'双击输入文字'
,
{
position
:
pos
.
originPos
ition
,
position
:
position
,
})
})
.
then
(
function
(
objectProps
)
{
.
then
(
function
(
objectProps
)
{
console
.
log
(
objectProps
);
console
.
log
(
objectProps
);
...
...
linkwe-ui/src/views/material/poster.vue
View file @
2b89321
...
@@ -72,7 +72,7 @@ export default {
...
@@ -72,7 +72,7 @@ export default {
srcList
:
[],
srcList
:
[],
ids
:
[],
// 选中数组
ids
:
[],
// 选中数组
previewImg
:
''
,
// 预览图片地址
previewImg
:
''
,
// 预览图片地址
useDefaultUI
:
tru
e
,
useDefaultUI
:
fals
e
,
options
:
{
options
:
{
includeUI
:
{
includeUI
:
{
// initMenu: "text",
// initMenu: "text",
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
// },
// },
usageStatistics
:
false
,
usageStatistics
:
false
,
menuBarPosition
:
"right"
,
menuBarPosition
:
"right"
,
menu
:
[],
menu
:
[],
// FIXME 因为借用了CANVAS的UI 所以需要使用TEXT,需要额外注释,后面创建自己的UI在去掉
theme
:
{
theme
:
{
"common.bi.image"
:
""
,
"common.bi.image"
:
""
,
"common.bisize.width"
:
"251px"
,
"common.bisize.width"
:
"251px"
,
...
@@ -101,9 +101,7 @@ export default {
...
@@ -101,9 +101,7 @@ export default {
"menu.iconSize.width"
:
"34px"
,
"menu.iconSize.width"
:
"34px"
,
"menu.iconSize.height"
:
"34px"
,
"menu.iconSize.height"
:
"34px"
,
}
}
},
}
// cssMaxWidth: 640,
// cssMaxHeight: 1136
}
}
}
}
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment