Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-mindMap
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
孙灵跃 Leon Sun
coopwire-mindMap
Commits
370c8bbc
Commit
370c8bbc
authored
Jul 18, 2024
by
孙灵跃 leon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-sly' of
ssh://gitlab.logwire.cn:13389/leon.sun/mindmap
into dev-sly
parents
1814ef51
4d7b7dcf
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
35 deletions
+59
-35
index.html
public/index.html
+26
-17
index.js
src/api/index.js
+3
-4
Export.vue
src/pages/Edit/components/Export.vue
+5
-5
Import.vue
src/pages/Edit/components/Import.vue
+1
-0
Toolbar.vue
src/pages/Edit/components/Toolbar.vue
+8
-8
ToolbarNodeBtnList.vue
src/pages/Edit/components/ToolbarNodeBtnList.vue
+16
-1
No files found.
public/index.html
View file @
370c8bbc
...
@@ -7,7 +7,9 @@
...
@@ -7,7 +7,9 @@
<link
rel=
"icon"
href=
"dist/logo.ico"
>
<link
rel=
"icon"
href=
"dist/logo.ico"
>
<title>
思绪思维导图
</title>
<title>
思绪思维导图
</title>
<script>
<script>
// 自定义静态资源的路径
window
.
externalPublicPath
=
'/mindmap/'
;
window
.
externalPublicPath
=
'/mindmap/'
;
window
.
takeOverApp
=
true
;
</script>
</script>
</head>
</head>
<body>
<body>
...
@@ -47,32 +49,39 @@
...
@@ -47,32 +49,39 @@
const setTakeOverAppMethods = (data) => {
const setTakeOverAppMethods = (data) => {
window.takeOverAppMethods = window.takeOverAppMethods || {}
window.takeOverAppMethods = window.takeOverAppMethods || {}
window.takeOverAppMethods['getMindMapData'] = ()=>{
window.takeOverAppMethods['getMindMapData'] = ()=>{
return data.mindMapData
return data.root ? data : data.mindMapData
}
if(!window.takeOverAppMethods['saveManualMindMapData']){
window.takeOverAppMethods['saveManualMindMapData'] = void 0
}
if(!window.takeOverAppMethods['manualCancel']){
window.takeOverAppMethods['manualCancel'] = ()=>void 0
}
window.takeOverAppMethods['saveMindMapData'] = ()=>{
}
}
window.takeOverAppMethods['saveMindMapData'] = ()=>{}
window.takeOverAppMethods['saveMindMapData'] = ()=>{}
window.takeOverAppMethods['getLanguage'] = ()=>{
window.takeOverAppMethods['getLanguage'] = ()=>{
return data.lang || 'zh'
return data.lang || 'zh'
}
}
}
window.takeOverAppMethods['saveLanguage'] = ()=>{
window.onload = async () => {
console.log('takeOverApp')
window.takeOverApp = false;
const getJson = function (str) {
if (typeof str == 'string') {
try {
return JSON.parse(str);
} catch (e) {
return false;
}
}
window.takeOverAppMethods['getLocalConfig'] = ()=>{
return data.localConfig
}
window.takeOverAppMethods['saveLocalConfig'] = ()=>{
}
}
}
}
const key = '[[miniMap]]miniMapData';
const miniMapData = window.sessionStorage.getItem(key);
window.onload = async () => {
if(!getJson(miniMapData)) return;
const key = "[mind]data";
const data = getJson(miniMapData) || await getDataFromBackend();
const dataStr = window.sessionStorage.getItem(key);
const data = dataStr ? JSON.parse(dataStr) : await getDataFromBackend();
setTakeOverAppMethods(data)
setTakeOverAppMethods(data)
window.initApp()
// 实例化页面
window.initApp();
}
}
</script> -->
</script> -->
</body>
</body>
...
...
src/api/index.js
View file @
370c8bbc
...
@@ -97,10 +97,9 @@ export const manualSaveConfig = config=>{
...
@@ -97,10 +97,9 @@ export const manualSaveConfig = config=>{
}
}
if
(
window
.
parent
){
if
(
window
.
parent
){
const
data
=
JSON
.
stringify
(
config
.
data
)
const
str
=
JSON
.
stringify
(
config
);
window
.
parent
.
postMessage
(
'
miniMap_save#*#'
+
data
)
window
.
parent
.
postMessage
(
'
[mind]save#*#'
+
str
)
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
}
}
...
@@ -113,7 +112,7 @@ export const manualCancel= ()=>{
...
@@ -113,7 +112,7 @@ export const manualCancel= ()=>{
}
}
if
(
window
.
parent
){
if
(
window
.
parent
){
window
.
parent
.
postMessage
(
'
miniMap_
close'
)
window
.
parent
.
postMessage
(
'
[mind]
close'
)
}
}
}
}
...
...
src/pages/Edit/components/Export.vue
View file @
370c8bbc
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<el-dialog
<el-dialog
class=
"nodeExportDialog"
class=
"nodeExportDialog"
:title=
"$t('export.title')"
:title=
"$t('export.title')"
:append-to-body=
"true"
:visible
.
sync=
"dialogVisible"
:visible
.
sync=
"dialogVisible"
width=
"700px"
width=
"700px"
v-loading
.
fullscreen
.
lock=
"loading"
v-loading
.
fullscreen
.
lock=
"loading"
...
@@ -188,11 +189,10 @@ export default {
...
@@ -188,11 +189,10 @@ export default {
this
.
$bus
.
$emit
(
'export'
,
this
.
exportType
,
true
,
this
.
fileName
)
this
.
$bus
.
$emit
(
'export'
,
this
.
exportType
,
true
,
this
.
fileName
)
}
}
// this.$notify.info({
this
.
$notify
.
info
({
// title: this.$t('export.notifyTitle'),
title
:
this
.
$t
(
'export.notifyTitle'
),
// message: this.$t('export.notifyMessage')
message
:
this
.
$t
(
'export.notifyMessage'
)
// })
})
this
.
cancel
()
this
.
cancel
()
}
}
}
}
...
...
src/pages/Edit/components/Import.vue
View file @
370c8bbc
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<el-dialog
<el-dialog
class=
"nodeImportDialog"
class=
"nodeImportDialog"
:title=
"$t('import.title')"
:title=
"$t('import.title')"
:append-to-body=
"true"
:visible
.
sync=
"dialogVisible"
:visible
.
sync=
"dialogVisible"
width=
"300px"
width=
"300px"
>
>
...
...
src/pages/Edit/components/Toolbar.vue
View file @
370c8bbc
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<div
class=
"toolbarBlock"
>
<div
class=
"toolbarBlock"
>
<ToolbarNodeBtnList
:list=
"horizontalList"
></ToolbarNodeBtnList>
<ToolbarNodeBtnList
:list=
"horizontalList"
></ToolbarNodeBtnList>
<!-- 更多 -->
<!-- 更多 -->
<el-popover
<
!--
<
el-popover
v-model=
"popoverShow"
v-model=
"popoverShow"
placement=
"bottom-end"
placement=
"bottom-end"
width=
"120"
width=
"120"
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<span
class=
"icon iconfont icongongshi"
></span>
<span
class=
"icon iconfont icongongshi"
></span>
<span
class=
"text"
>
{{
$t
(
'toolbar.more'
)
}}
</span>
<span
class=
"text"
>
{{
$t
(
'toolbar.more'
)
}}
</span>
</div>
</div>
</el-popover>
</el-popover>
-->
</div>
</div>
<!-- 导出 -->
<!-- 导出 -->
...
@@ -54,8 +54,8 @@
...
@@ -54,8 +54,8 @@
<NodeIcon></NodeIcon>
<NodeIcon></NodeIcon>
<NodeNote></NodeNote>
<NodeNote></NodeNote>
<NodeTag></NodeTag>
<NodeTag></NodeTag>
<Export></Export>
<
!--
<
Export></Export>
<Import></Import>
<Import></Import>
-->
</div>
</div>
</
template
>
</
template
>
...
@@ -65,8 +65,8 @@ import NodeHyperlink from './NodeHyperlink'
...
@@ -65,8 +65,8 @@ import NodeHyperlink from './NodeHyperlink'
import
NodeIcon
from
'./NodeIcon'
import
NodeIcon
from
'./NodeIcon'
import
NodeNote
from
'./NodeNote'
import
NodeNote
from
'./NodeNote'
import
NodeTag
from
'./NodeTag'
import
NodeTag
from
'./NodeTag'
import
Export
from
'./Export'
//
import Export from './Export'
import
Import
from
'./Import'
//
import Import from './Import'
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
'vuex'
import
{
Notification
}
from
'element-ui'
import
{
Notification
}
from
'element-ui'
import
exampleData
from
'simple-mind-map/example/exampleData'
import
exampleData
from
'simple-mind-map/example/exampleData'
...
@@ -88,8 +88,8 @@ export default {
...
@@ -88,8 +88,8 @@ export default {
NodeIcon
,
NodeIcon
,
NodeNote
,
NodeNote
,
NodeTag
,
NodeTag
,
Export
,
//
Export,
Import
,
//
Import,
ToolbarNodeBtnList
ToolbarNodeBtnList
},
},
data
()
{
data
()
{
...
...
src/pages/Edit/components/ToolbarNodeBtnList.vue
View file @
370c8bbc
...
@@ -157,6 +157,14 @@
...
@@ -157,6 +157,14 @@
<span
class=
"text"
>
{{
$t
(
'toolbar.formula'
)
}}
</span>
<span
class=
"text"
>
{{
$t
(
'toolbar.formula'
)
}}
</span>
</div>
</div>
</div>
</div>
<div
class=
"toolbarBtn"
@
click=
"$bus.$emit('showImport')"
>
<span
class=
"icon iconfont icondaoru"
></span>
<span
class=
"text"
>
{{
$t
(
'toolbar.import'
)
}}
</span>
</div>
<div
class=
"toolbarBtn"
@
click=
"$bus.$emit('showExport')"
>
<span
class=
"icon iconfont iconexport"
></span>
<span
class=
"text"
>
{{
$t
(
'toolbar.export'
)
}}
</span>
</div>
<div
class=
"toolbarBtn"
@
click=
"$bus.$emit('SAVE')"
>
<div
class=
"toolbarBtn"
@
click=
"$bus.$emit('SAVE')"
>
<span
class=
"icon mindIconfont mind-iconbaocun"
></span>
<span
class=
"icon mindIconfont mind-iconbaocun"
></span>
...
@@ -166,12 +174,15 @@
...
@@ -166,12 +174,15 @@
<span
class=
"icon mindIconfont mind-iconguanbi1"
></span>
<span
class=
"icon mindIconfont mind-iconguanbi1"
></span>
<span
class=
"text"
>
{{
$t
(
'toolbar.close'
)
}}
</span>
<span
class=
"text"
>
{{
$t
(
'toolbar.close'
)
}}
</span>
</div>
</div>
<Export></Export>
<Import></Import>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
mapState
,
mapMutations
}
from
'vuex'
import
{
mapState
,
mapMutations
}
from
'vuex'
import
Export
from
'./Export'
import
Import
from
'./Import'
export
default
{
export
default
{
props
:
{
props
:
{
dir
:
{
dir
:
{
...
@@ -185,6 +196,10 @@ export default {
...
@@ -185,6 +196,10 @@ export default {
}
}
}
}
},
},
components
:{
Export
,
Import
},
data
()
{
data
()
{
return
{
return
{
activeNodes
:
[],
activeNodes
:
[],
...
...
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