mirror of
https://github.com/palxiao/poster-design
synced 2024-11-22 16:17:59 +00:00
Merge pull request #104 from JeremyYu-cn/feat-upgrade-vue3
Merge: main branch
This commit is contained in:
commit
b3a70d270a
@ -67,7 +67,8 @@ function blurInput() {
|
||||
}
|
||||
}
|
||||
function getValue(value: string) {
|
||||
return value.replace(/\n|\r\n/g, '<br/>').replace(/ /g, ' ')
|
||||
return value
|
||||
// return value.replace(/\n|\r\n/g, '<br/>').replace(/ /g, ' ')
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -164,8 +164,7 @@ function updateRecord() {
|
||||
}
|
||||
|
||||
function updateText(e?: Event) {
|
||||
const value = e && e.target ? (e.target as HTMLElement).innerHTML : props.params.text.replace(/\n/g, '<br/>')
|
||||
// const value = (e ? e.target.innerText : props.params.text).replace(/<br\/>/g, '\r\n').replace(/ /g, ' ')
|
||||
const value = e && e.target ? (e.target as HTMLElement).innerHTML : props.params.text//.replace(/\n/g, '<br/>')
|
||||
if (value !== props.params.text) {
|
||||
store.dispatch('updateWidgetData', {
|
||||
uuid: props.params.uuid,
|
||||
@ -242,7 +241,7 @@ defineExpose({
|
||||
.edit-text {
|
||||
outline: none;
|
||||
word-break: break-word;
|
||||
// white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
margin: 0;
|
||||
}
|
||||
.effect-text {
|
||||
|
@ -77,12 +77,14 @@ function paste() {
|
||||
* 撤销
|
||||
*/
|
||||
function undo(shiftKey: any) {
|
||||
console.log(store.getters.dHistoryParams);
|
||||
|
||||
if (shiftKey) {
|
||||
if (!(store.getters.dHistoryParams.index === store.getters.dHistoryParams.length - 1)) {
|
||||
// this.handleHistory('redo')
|
||||
store.dispatch('handleHistory', 'redo')
|
||||
}
|
||||
} else if (!(store.getters.dHistoryParams.index === -1 || (store.getters.dHistoryParams === 0 && store.getters.dHistoryParams.length === 10))) {
|
||||
} else if (store.getters.dHistoryParams.index !== -1) {
|
||||
// this.handleHistory('undo')
|
||||
store.dispatch('handleHistory', 'undo')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user