Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
1093ec3e
提交
1093ec3e
authored
11月 09, 2020
作者:
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(tinymce): fixed multiple editors showing only one (#83)
上级
bc6214cd
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
15 行增加
和
8 行删除
+15
-8
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+6
-0
index.ts
build/vite/plugin/dynamicImport/index.ts
+0
-1
Editor.vue
src/components/Tinymce/src/Editor.vue
+9
-7
没有找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
1093ec3e
## Wip
### 🐛 Bug Fixes
-
修复多个富文本编辑器只显示一个
## 2.0.0-rc.9 (2020-11-9)
## 2.0.0-rc.9 (2020-11-9)
### ✨ Features
### ✨ Features
...
...
build/vite/plugin/dynamicImport/index.ts
浏览文件 @
1093ec3e
...
@@ -34,7 +34,6 @@ const dynamicImportTransform = function (env: any = {}): Transform {
...
@@ -34,7 +34,6 @@ const dynamicImportTransform = function (env: any = {}): Transform {
export default function (id) {
export default function (id) {
switch (id) {
switch (id) {
${
files
${
files
.
map
((
p
)
=>
.
map
((
p
)
=>
` case '
${
getPath
(
p
)}
': return () => import('
${
p
` case '
${
getPath
(
p
)}
': return () => import('
${
p
.
replace
(
'src/views'
,
'/@/views'
)
.
replace
(
'src/views'
,
'/@/views'
)
...
...
src/components/Tinymce/src/Editor.vue
浏览文件 @
1093ec3e
<
template
>
<
template
>
<div
class=
"tinymce-container"
:style=
"
{ width: containerWidth }">
<div
class=
"tinymce-container"
:style=
"
{ width: containerWidth }">
<textarea
:id=
"tinymceId"
ref=
"elRef"
></textarea>
<textarea
:id=
"tinymceId"
ref=
"elRef"
:style=
"
{ visibility: 'hidden' }"
>
</textarea>
</div>
</div>
</
template
>
</
template
>
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
watch
,
watch
,
onUnmounted
,
onUnmounted
,
onDeactivated
,
onDeactivated
,
watchEffect
,
}
from
'vue'
;
}
from
'vue'
;
import
{
basicProps
}
from
'./props'
;
import
{
basicProps
}
from
'./props'
;
import
toolbar
from
'./toolbar'
;
import
toolbar
from
'./toolbar'
;
...
@@ -36,12 +35,9 @@
...
@@ -36,12 +35,9 @@
emits
:
[
'change'
,
'update:modelValue'
],
emits
:
[
'change'
,
'update:modelValue'
],
setup
(
props
,
{
emit
,
attrs
})
{
setup
(
props
,
{
emit
,
attrs
})
{
const
editorRef
=
ref
<
any
>
(
null
);
const
editorRef
=
ref
<
any
>
(
null
);
const
tinymceId
=
ref
<
string
>
(
snowUuid
(
'tiny-vue'
));
const
elRef
=
ref
<
Nullable
<
HTMLElement
>>
(
null
);
const
elRef
=
ref
<
Nullable
<
HTMLElement
>>
(
null
);
const
tinymceId
=
computed
(()
=>
{
return
snowUuid
(
'tiny-vue'
);
});
const
tinymceContent
=
computed
(()
=>
{
const
tinymceContent
=
computed
(()
=>
{
return
props
.
modelValue
;
return
props
.
modelValue
;
});
});
...
@@ -118,12 +114,18 @@
...
@@ -118,12 +114,18 @@
function
init
()
{
function
init
()
{
toPromise
().
then
(()
=>
{
toPromise
().
then
(()
=>
{
initEditor
();
setTimeout
(()
=>
{
initEditor
();
},
0
);
});
});
}
}
function
initEditor
()
{
function
initEditor
()
{
getTinymce
().
PluginManager
.
add
(
'lineHeight'
,
lineHeight
(
getTinymce
()));
getTinymce
().
PluginManager
.
add
(
'lineHeight'
,
lineHeight
(
getTinymce
()));
const
el
=
unref
(
elRef
);
if
(
el
)
{
el
.
style
.
visibility
=
''
;
}
getTinymce
().
init
(
unref
(
initOptions
));
getTinymce
().
init
(
unref
(
initOptions
));
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论