Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
trust Tomorrow
Awesome-Markdown-Editor
提交
ba243d20
Awesome-Markdown-Editor
项目概览
trust Tomorrow
/
Awesome-Markdown-Editor
与 Fork 源项目一致
Fork自
gitcode_dev / Awesome-Markdown-Editor
通知
2
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Awesome-Markdown-Editor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ba243d20
编写于
10月 09, 2021
作者:
璃白.
🌻
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:添加视频时长
上级
2074afcd
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
29 addition
and
4 deletion
+29
-4
src/App.vue
src/App.vue
+22
-0
src/assets/js/utils.js
src/assets/js/utils.js
+1
-1
src/assets/jupyter-render
src/assets/jupyter-render
+1
-1
src/components/header/components/table-select.vue
src/components/header/components/table-select.vue
+0
-1
src/main.js
src/main.js
+5
-0
webpack.config.js
webpack.config.js
+0
-1
未找到文件。
src/App.vue
浏览文件 @
ba243d20
...
@@ -443,6 +443,25 @@ export default {
...
@@ -443,6 +443,25 @@ export default {
html
:
this
.
html
html
:
this
.
html
});
});
},
},
getVideoList
(
callback
)
{
const
virtualDom
=
document
.
createElement
(
"
div
"
);
virtualDom
.
style
.
height
=
0
;
virtualDom
.
innerHTML
=
this
.
html
;
document
.
body
.
appendChild
(
virtualDom
);
const
vEls
=
Array
.
from
(
virtualDom
.
getElementsByTagName
(
"
video
"
));
const
list
=
vEls
.
map
(
item
=>
{
item
.
preload
=
true
;
return
new
Promise
((
res
,
rej
)
=>
{
item
.
oncanplay
=
function
()
{
res
(
item
.
duration
);
};
});
});
document
.
body
.
removeChild
(
virtualDom
);
Promise
.
all
(
list
).
then
(
res
=>
{
callback
(
res
);
});
},
queryUserList
(
keyWord
)
{
queryUserList
(
keyWord
)
{
const
_this
=
this
;
const
_this
=
this
;
this
.
$emit
(
"
queryUserList
"
,
{
this
.
$emit
(
"
queryUserList
"
,
{
...
@@ -491,6 +510,9 @@ export default {
...
@@ -491,6 +510,9 @@ export default {
item
.
linkType
=
linkEl
.
getAttribute
(
"
data-type
"
);
item
.
linkType
=
linkEl
.
getAttribute
(
"
data-type
"
);
linkEl
.
setAttribute
(
"
target
"
,
"
_blank
"
);
linkEl
.
setAttribute
(
"
target
"
,
"
_blank
"
);
linkEl
.
setAttribute
(
"
href
"
,
url
);
linkEl
.
setAttribute
(
"
href
"
,
url
);
if
(
item
.
url
.
includes
(
"
.ipynb
"
))
{
linkEl
.
className
=
"
jupyterEl
"
;
}
const
title
=
getLinkTitle
(
linkEl
,
item
);
const
title
=
getLinkTitle
(
linkEl
,
item
);
linkEl
.
innerHTML
=
renderLinkCard
(
title
,
item
);
linkEl
.
innerHTML
=
renderLinkCard
(
title
,
item
);
});
});
...
...
src/assets/js/utils.js
浏览文件 @
ba243d20
...
@@ -401,7 +401,7 @@ export function renderLinkCard(title, item) {
...
@@ -401,7 +401,7 @@ export function renderLinkCard(title, item) {
content
=
`<span class="md_link_url">
${
item
.
url
}
</span>`
;
content
=
`<span class="md_link_url">
${
item
.
url
}
</span>`
;
break
;
break
;
case
"
3
"
:
case
"
3
"
:
content
=
`<span class="
jupyter jupyterEl
">
${
item
.
url
}
</span>`
;
content
=
`<span class="">
${
item
.
url
}
</span>`
;
break
;
break
;
default
:
default
:
content
=
`<div class="md_link_card">
content
=
`<div class="md_link_card">
...
...
jupyter-render
@
0f667900
Subproject commit
cbd3992899f157f8804ef8c2720c7f3d56cff03b
Subproject commit
0f667900bbbc48bbe5dbd34ae2cc421f7566259e
src/components/header/components/table-select.vue
浏览文件 @
ba243d20
...
@@ -57,7 +57,6 @@ export default {
...
@@ -57,7 +57,6 @@ export default {
"
------ |
"
,
"
------ |
"
,
col
col
)}
\n
${
this
.
createStr
(
"
|
"
+
this
.
createStr
(
"
单元格 |
"
,
col
)
+
"
\n
"
,
row
)}
`
;
)}
\n
${
this
.
createStr
(
"
|
"
+
this
.
createStr
(
"
单元格 |
"
,
col
)
+
"
\n
"
,
row
)}
`
;
console
.
log
(
str
);
this
.
$emit
(
"
select
"
,
str
);
this
.
$emit
(
"
select
"
,
str
);
},
},
...
...
src/main.js
浏览文件 @
ba243d20
...
@@ -14,6 +14,7 @@ function initMdEditor(obj) {
...
@@ -14,6 +14,7 @@ function initMdEditor(obj) {
html
:
""
html
:
""
};
};
this
.
vEl
=
""
;
this
.
vEl
=
""
;
this
.
videoList
=
[];
let
{
let
{
el
,
el
,
onLoad
=
()
=>
{},
onLoad
=
()
=>
{},
...
@@ -144,6 +145,10 @@ function initMdEditor(obj) {
...
@@ -144,6 +145,10 @@ function initMdEditor(obj) {
})
})
}).
$mount
(
el
);
}).
$mount
(
el
);
this
.
getVideoList
=
function
(
callback
)
{
this
.
vEl
.
$children
[
0
].
getVideoList
(
callback
);
};
this
.
getValue
=
function
(
callback
)
{
this
.
getValue
=
function
(
callback
)
{
if
(
callback
)
{
if
(
callback
)
{
callback
(
this
.
value
);
callback
(
this
.
value
);
...
...
webpack.config.js
浏览文件 @
ba243d20
...
@@ -8,7 +8,6 @@ module.exports = {
...
@@ -8,7 +8,6 @@ module.exports = {
},
},
devServer
:
{
devServer
:
{
contentBase
:
path
.
resolve
(
__dirname
,
"
dist
"
),
contentBase
:
path
.
resolve
(
__dirname
,
"
dist
"
),
host
:
"
live.csdn.net
"
,
open
:
true
open
:
true
},
},
resolve
:
{
resolve
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录