hookehuyr

fix 表格控制优化

1 <!-- 1 <!--
2 * @Date: 2024-07-12 13:28:27 2 * @Date: 2024-07-12 13:28:27
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-08-02 13:51:12 4 + * @LastEditTime: 2024-08-06 18:01:50
5 * @FilePath: /data-table/src/components/TEditor/index.vue 5 * @FilePath: /data-table/src/components/TEditor/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -206,9 +206,11 @@ const tinymceOptions = { ...@@ -206,9 +206,11 @@ const tinymceOptions = {
206 // plugins: 'searchreplace autoresize link image code', 206 // plugins: 'searchreplace autoresize link image code',
207 plugins: 'searchreplace autoresize link image code table', 207 plugins: 'searchreplace autoresize link image code table',
208 autoresize_bottom_margin: 100, 208 autoresize_bottom_margin: 100,
209 - menubar: 'edit view insert format tools', 209 + menubar: 'none',
210 // fontselect fontsizeselect 210 // fontselect fontsizeselect
211 - toolbar: 'table', // 工具栏显示 211 + // toolbar: 'table', // 工具栏显示
212 + toolbar: '', // 工具栏显示
213 + table_toolbar: 'tableinsertrowbefore', // table_toolbar 配置
212 width: $('.table-field-page').width() + 'px', 214 width: $('.table-field-page').width() + 'px',
213 paste_data_images: false, //允许粘贴图像 215 paste_data_images: false, //允许粘贴图像
214 min_height: 300, 216 min_height: 300,
...@@ -233,6 +235,13 @@ const tinymceOptions = { ...@@ -233,6 +235,13 @@ const tinymceOptions = {
233 // // tinymce 使用 <iframe> 实现功能,当点击 tinymce 的输入框时应该让表单设计器选中对应的字段, 235 // // tinymce 使用 <iframe> 实现功能,当点击 tinymce 的输入框时应该让表单设计器选中对应的字段,
234 // // 所以需要把点击事件转发给 iframe 外面的 textarea 236 // // 所以需要把点击事件转发给 iframe 外面的 textarea
235 // document.getElementById(editor.id).click(); 237 // document.getElementById(editor.id).click();
238 + // let root = $('.tox.tox-silver-sink.tox-tinymce-aux').find('.tox-pop__dialog')
239 + // nextTick(() => {
240 + // setTimeout(() => {
241 +
242 + // console.warn(root);
243 + // }, 1000);
244 + // })
236 // }); 245 // });
237 // 初始化实例 246 // 初始化实例
238 handleSetContent(props.table_html); 247 handleSetContent(props.table_html);
...@@ -324,8 +333,9 @@ defineExpose({ ...@@ -324,8 +333,9 @@ defineExpose({
324 333
325 <style lang="less" scoped> 334 <style lang="less" scoped>
326 :deep(.tox-tinymce) { 335 :deep(.tox-tinymce) {
327 - border: 1px solid #dcdfe6; 336 + // border: 1px solid #dcdfe6;
328 - border-radius: 4px; 337 + // border-radius: 4px;
338 + border: 0;
329 339
330 .tox-statusbar { 340 .tox-statusbar {
331 display: none; 341 display: none;
......
1 <!-- 1 <!--
2 * @Date: 2022-08-29 14:31:20 2 * @Date: 2022-08-29 14:31:20
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-08-06 11:51:06 4 + * @LastEditTime: 2024-08-06 18:02:22
5 * @FilePath: /data-table/src/components/TableField/index.vue 5 * @FilePath: /data-table/src/components/TableField/index.vue
6 * @Description: 表格组件 6 * @Description: 表格组件
7 --> 7 -->
...@@ -189,13 +189,13 @@ defineExpose({ validTableEditor }); ...@@ -189,13 +189,13 @@ defineExpose({ validTableEditor });
189 font-size: 0.9rem; 189 font-size: 0.9rem;
190 font-weight: bold; 190 font-weight: bold;
191 } 191 }
192 - padding: 1rem; 192 + // padding: 1rem;
193 } 193 }
194 194
195 .tinymce-box { 195 .tinymce-box {
196 // width: 100%; 196 // width: 100%;
197 display: block; 197 display: block;
198 - margin-top: 1rem; 198 + // margin-top: 1rem;
199 } 199 }
200 200
201 :deep(.table-wrapper) { 201 :deep(.table-wrapper) {
......