Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2024-08-21 10:50:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f9889c17048ac198e1f6c2ab6f28c29f18da19a3
f9889c17
1 parent
c17fa8ab
新增左右对齐的文字操作
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
src/components/TEditor/index.vue
src/components/TEditor/index.vue
View file @
f9889c1
<!--
* @Date: 2024-07-12 13:28:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-2
0 11:29:58
* @LastEditTime: 2024-08-2
1 10:40:56
* @FilePath: /data-table/src/components/TEditor/index.vue
* @Description: 文件描述
-->
...
...
@@ -9,10 +9,10 @@
<div style="height: 100%; overflow: hidden;">
<div v-if="isCursorInTable" style="padding: 0.5rem 1.25rem;">
<van-icon @click="addRow" name="https://cdn.ipadbiz.cn/custom_form/icon/add-line.png" />
<van-icon @click="textLeft" name="https://cdn.ipadbiz.cn/custom_form/icon/text-left.png" style="margin-left: 1rem;" />
<van-icon @click="textCenter" name="https://cdn.ipadbiz.cn/custom_form/icon/text-align.png" style="margin-left: 1rem;" />
<van-icon @click="textRight" name="https://cdn.ipadbiz.cn/custom_form/icon/text-right.png" style="margin-left: 1rem;" />
</div>
<!-- <div @click="addRow">新增一行</div>
<div @click="textCenter">文字居中</div> -->
<editor
api-key="no-api-key"
v-model="myValue"
...
...
@@ -367,6 +367,14 @@ const textCenter = () => {
tinymce.activeEditor.execCommand('JustifyCenter')
}
const textLeft = () => {
tinymce.activeEditor.execCommand('JustifyLeft')
}
const textRight = () => {
tinymce.activeEditor.execCommand('JustifyRight')
}
defineExpose({
handleSetContent,
handleGetContent,
...
...
Please
register
or
login
to post a comment