Demo: update
This commit is contained in:
parent
95d7a3ac41
commit
fd85085cb7
File diff suppressed because one or more lines are too long
2
dist/js/app.js
vendored
2
dist/js/app.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><link rel="icon" href="dist/logo.ico"><title>思绪思维导图</title><script>// 自定义静态资源的路径
|
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><link rel="icon" href="dist/logo.ico"><title>思绪思维导图</title><script>// 自定义静态资源的路径
|
||||||
window.externalPublicPath = './dist/'
|
window.externalPublicPath = './dist/'
|
||||||
// 接管应用
|
// 接管应用
|
||||||
window.takeOverApp = false</script><link href="dist/css/chunk-vendors.css?24f8b73deb3c00d9b87f" rel="stylesheet"><link href="dist/css/app.css?24f8b73deb3c00d9b87f" rel="stylesheet"></head><body><noscript><strong>We're sorry but thoughts doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script>const getDataFromBackend = () => {
|
window.takeOverApp = false</script><link href="dist/css/chunk-vendors.css?153f5047fdc3ef873534" rel="stylesheet"><link href="dist/css/app.css?153f5047fdc3ef873534" rel="stylesheet"></head><body><noscript><strong>We're sorry but thoughts doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script>const getDataFromBackend = () => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
resolve({
|
resolve({
|
||||||
@ -66,4 +66,4 @@
|
|||||||
// 可以通过window.$bus.$on()来监听应用的一些事件
|
// 可以通过window.$bus.$on()来监听应用的一些事件
|
||||||
// 实例化页面
|
// 实例化页面
|
||||||
window.initApp()
|
window.initApp()
|
||||||
}</script><script src="dist/js/chunk-vendors.js?24f8b73deb3c00d9b87f"></script><script src="dist/js/app.js?24f8b73deb3c00d9b87f"></script></body></html>
|
}</script><script src="dist/js/chunk-vendors.js?153f5047fdc3ef873534"></script><script src="dist/js/app.js?153f5047fdc3ef873534"></script></body></html>
|
||||||
@ -266,23 +266,29 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
dirHandle = node.data.handle
|
dirHandle = node.data.handle
|
||||||
}
|
}
|
||||||
const list = []
|
const dirList = []
|
||||||
|
const fileList = []
|
||||||
for await (const [key, value] of dirHandle.entries()) {
|
for await (const [key, value] of dirHandle.entries()) {
|
||||||
const isFile = value.kind === 'file'
|
const isFile = value.kind === 'file'
|
||||||
if (isFile && !/\.(smm|xmind|md|json)$/.test(value.name)) {
|
if (isFile && !/\.(smm|xmind|md|json)$/.test(value.name)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
const enableEdit = isFile && /\.smm$/.test(value.name)
|
const enableEdit = isFile && /\.smm$/.test(value.name)
|
||||||
list.push({
|
const data = {
|
||||||
id: key,
|
id: key,
|
||||||
name: value.name,
|
name: value.name,
|
||||||
type: value.kind,
|
type: value.kind,
|
||||||
handle: value,
|
handle: value,
|
||||||
leaf: isFile,
|
leaf: isFile,
|
||||||
enableEdit
|
enableEdit
|
||||||
})
|
}
|
||||||
|
if (isFile) {
|
||||||
|
fileList.push(data)
|
||||||
|
} else {
|
||||||
|
dirList.push(data)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
resolve(list)
|
resolve([...dirList, ...fileList])
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
this.fileTreeVisible = false
|
this.fileTreeVisible = false
|
||||||
@ -574,6 +580,7 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
|
box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.06);
|
||||||
|
|
||||||
&.expand {
|
&.expand {
|
||||||
height: 300px;
|
height: 300px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user