sh-view 2.4.10 → 2.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sh-view",
3
- "version": "2.4.10",
3
+ "version": "2.4.12",
4
4
  "description": "基于vxe-table二次封装",
5
5
  "main": "packages/index.js",
6
6
  "scripts": {
@@ -29,7 +29,7 @@
29
29
  "jszip": "^3.10.1",
30
30
  "popper.js": "^1.16.1",
31
31
  "resize-observer-polyfill": "^1.5.1",
32
- "sh-tools": "^1.6.0",
32
+ "sh-tools": "^2.0.0",
33
33
  "tinymce": "^5.10.5",
34
34
  "vue": "^3.3.4",
35
35
  "vue-masonry": "^0.16.0",
@@ -5,7 +5,7 @@ import dataProps from '../js/data-hook'
5
5
  import Spreadsheet from 'x-data-spreadsheet'
6
6
  import ExcelJS from 'exceljs'
7
7
  export default defineComponent({
8
- name: 'ShOfficeDocx',
8
+ name: 'ShExcel',
9
9
  props: dataProps,
10
10
  emits: ['rendered', 'error'],
11
11
  setup(props, { emit }) {
@@ -164,19 +164,766 @@ export default defineComponent({
164
164
  </script>
165
165
 
166
166
  <template>
167
- <div ref="rootRef" class="sh-office-docx"></div>
167
+ <div ref="rootRef" class="sh-office-excel"></div>
168
168
  </template>
169
169
 
170
- <style lang="less">
171
- @media screen and (max-width: 800px) {
172
- .sh-office-docx {
173
- .docx-wrapper {
174
- padding: 10px;
175
- > section.docx {
176
- padding: 10px !important;
177
- width: 100% !important;
178
- }
179
- }
170
+ <style lang="scss" scoped>
171
+ .x-spreadsheet {
172
+ font-size: 13px;
173
+ line-height: normal;
174
+ user-select: none;
175
+ -moz-user-select: none;
176
+ font-family: 'Lato', 'Source Sans Pro', Roboto, Helvetica, Arial, sans-serif;
177
+ box-sizing: content-box;
178
+ background: #fff;
179
+ -webkit-font-smoothing: antialiased;
180
+ }
181
+ .x-spreadsheet textarea {
182
+ font: 400 13px Arial, 'Lato', 'Source Sans Pro', Roboto, Helvetica, sans-serif;
183
+ }
184
+ .x-spreadsheet-sheet {
185
+ position: relative;
186
+ overflow: hidden;
187
+ }
188
+ .x-spreadsheet-table {
189
+ vertical-align: bottom;
190
+ }
191
+ .x-spreadsheet-tooltip {
192
+ font-family: inherit;
193
+ position: absolute;
194
+ padding: 5px 10px;
195
+ color: #fff;
196
+ border-radius: 1px;
197
+ background: #000000;
198
+ font-size: 12px;
199
+ z-index: 201;
200
+ }
201
+ .x-spreadsheet-tooltip:before {
202
+ pointer-events: none;
203
+ position: absolute;
204
+ left: calc(50% - 4px);
205
+ top: -4px;
206
+ content: '';
207
+ width: 8px;
208
+ height: 8px;
209
+ background: inherit;
210
+ -webkit-transform: rotate(45deg);
211
+ transform: rotate(45deg);
212
+ z-index: 1;
213
+ box-shadow: 1px 1px 3px -1px rgba(0, 0, 0, 0.3);
214
+ }
215
+ .x-spreadsheet-color-palette {
216
+ padding: 5px;
217
+ }
218
+ .x-spreadsheet-color-palette table {
219
+ margin: 0;
220
+ padding: 0;
221
+ border-collapse: separate;
222
+ background: #fff;
223
+ }
224
+ .x-spreadsheet-color-palette table td {
225
+ margin: 0;
226
+ cursor: pointer;
227
+ border: 1px solid transparent;
228
+ }
229
+ .x-spreadsheet-color-palette table td:hover {
230
+ border-color: #ddd;
231
+ }
232
+ .x-spreadsheet-color-palette table td .x-spreadsheet-color-palette-cell {
233
+ width: 16px;
234
+ height: 16px;
235
+ }
236
+ .x-spreadsheet-border-palette {
237
+ padding: 6px;
238
+ }
239
+ .x-spreadsheet-border-palette table {
240
+ margin: 0;
241
+ padding: 0;
242
+ border-collapse: separate;
243
+ border-spacing: 0;
244
+ background: #fff;
245
+ table-layout: fixed;
246
+ }
247
+ .x-spreadsheet-border-palette table td {
248
+ margin: 0;
249
+ }
250
+ .x-spreadsheet-border-palette .x-spreadsheet-border-palette-left {
251
+ border-right: 1px solid #eee;
252
+ padding-right: 6px;
253
+ }
254
+ .x-spreadsheet-border-palette .x-spreadsheet-border-palette-left .x-spreadsheet-border-palette-cell {
255
+ width: 30px;
256
+ height: 30px;
257
+ cursor: pointer;
258
+ text-align: center;
259
+ }
260
+ .x-spreadsheet-border-palette .x-spreadsheet-border-palette-left .x-spreadsheet-border-palette-cell:hover {
261
+ background-color: #eee;
262
+ }
263
+ .x-spreadsheet-border-palette .x-spreadsheet-border-palette-right {
264
+ padding-left: 6px;
265
+ }
266
+ .x-spreadsheet-border-palette .x-spreadsheet-border-palette-right .x-spreadsheet-line-type {
267
+ position: relative;
268
+ left: 0;
269
+ top: -3px;
270
+ }
271
+ .x-spreadsheet-dropdown {
272
+ position: relative;
273
+ }
274
+ .x-spreadsheet-dropdown .x-spreadsheet-dropdown-content {
275
+ position: absolute;
276
+ z-index: 200;
277
+ background: #fff;
278
+ box-shadow: 1px 2px 5px 2px rgba(51, 51, 51, 0.15);
279
+ }
280
+ .x-spreadsheet-dropdown.bottom-left .x-spreadsheet-dropdown-content {
281
+ top: calc(100% + 5px);
282
+ left: 0;
283
+ }
284
+ .x-spreadsheet-dropdown.bottom-right .x-spreadsheet-dropdown-content {
285
+ top: calc(100% + 5px);
286
+ right: 0;
287
+ }
288
+ .x-spreadsheet-dropdown.top-left .x-spreadsheet-dropdown-content {
289
+ bottom: calc(100% + 5px);
290
+ left: 0;
291
+ }
292
+ .x-spreadsheet-dropdown.top-right .x-spreadsheet-dropdown-content {
293
+ bottom: calc(100% + 5px);
294
+ right: 0;
295
+ }
296
+ .x-spreadsheet-dropdown .x-spreadsheet-dropdown-title {
297
+ padding: 0 5px;
298
+ display: inline-block;
299
+ }
300
+ /* resizer **/
301
+ .x-spreadsheet-resizer {
302
+ position: absolute;
303
+ z-index: 11;
304
+ }
305
+ .x-spreadsheet-resizer .x-spreadsheet-resizer-hover {
306
+ background-color: rgba(75, 137, 255, 0.25);
307
+ }
308
+ .x-spreadsheet-resizer .x-spreadsheet-resizer-line {
309
+ position: absolute;
310
+ }
311
+ .x-spreadsheet-resizer.horizontal {
312
+ cursor: row-resize;
313
+ }
314
+ .x-spreadsheet-resizer.horizontal .x-spreadsheet-resizer-line {
315
+ border-bottom: 2px dashed #4b89ff;
316
+ left: 0;
317
+ bottom: 0;
318
+ }
319
+ .x-spreadsheet-resizer.vertical {
320
+ cursor: col-resize;
321
+ }
322
+ .x-spreadsheet-resizer.vertical .x-spreadsheet-resizer-line {
323
+ border-right: 2px dashed #4b89ff;
324
+ top: 0;
325
+ right: 0;
326
+ }
327
+ /* scrollbar */
328
+ .x-spreadsheet-scrollbar {
329
+ position: absolute;
330
+ bottom: 0;
331
+ right: 0;
332
+ background-color: #f4f5f8;
333
+ opacity: 0.9;
334
+ z-index: 12;
335
+ }
336
+ .x-spreadsheet-scrollbar.horizontal {
337
+ right: 15px;
338
+ overflow-x: scroll;
339
+ overflow-y: hidden;
340
+ }
341
+ .x-spreadsheet-scrollbar.horizontal > div {
342
+ height: 1px;
343
+ background: #ddd;
344
+ }
345
+ .x-spreadsheet-scrollbar.vertical {
346
+ bottom: 15px;
347
+ overflow-x: hidden;
348
+ overflow-y: scroll;
349
+ }
350
+ .x-spreadsheet-scrollbar.vertical > div {
351
+ width: 1px;
352
+ background: #ddd;
353
+ }
354
+ /* @{css-prefix}-overlayer */
355
+ .x-spreadsheet-overlayer {
356
+ position: absolute;
357
+ left: 0;
358
+ top: 0;
359
+ z-index: 10;
360
+ }
361
+ .x-spreadsheet-overlayer .x-spreadsheet-overlayer-content {
362
+ position: absolute;
363
+ overflow: hidden;
364
+ pointer-events: none;
365
+ width: 100%;
366
+ height: 100%;
367
+ }
368
+ .x-spreadsheet-editor,
369
+ .x-spreadsheet-selector {
370
+ box-sizing: content-box;
371
+ position: absolute;
372
+ overflow: hidden;
373
+ pointer-events: none;
374
+ top: 0;
375
+ left: 0;
376
+ width: 100%;
377
+ height: 100%;
378
+ }
379
+ /* @{css-prefix}-selector */
380
+ .x-spreadsheet-selector .hide-input {
381
+ position: absolute;
382
+ z-index: 0;
383
+ }
384
+ .x-spreadsheet-selector .hide-input input {
385
+ padding: 0;
386
+ width: 0;
387
+ border: none !important;
388
+ }
389
+ .x-spreadsheet-selector .x-spreadsheet-selector-area {
390
+ position: absolute;
391
+ border: 2px solid #4b89ff;
392
+ background: rgba(75, 137, 255, 0.1);
393
+ z-index: 5;
394
+ }
395
+ .x-spreadsheet-selector .x-spreadsheet-selector-clipboard,
396
+ .x-spreadsheet-selector .x-spreadsheet-selector-autofill {
397
+ position: absolute;
398
+ background: transparent;
399
+ z-index: 100;
400
+ }
401
+ .x-spreadsheet-selector .x-spreadsheet-selector-clipboard {
402
+ border: 2px dashed #4b89ff;
403
+ }
404
+ .x-spreadsheet-selector .x-spreadsheet-selector-autofill {
405
+ border: 1px dashed rgba(0, 0, 0, 0.45);
406
+ }
407
+ .x-spreadsheet-selector .x-spreadsheet-selector-corner {
408
+ pointer-events: auto;
409
+ position: absolute;
410
+ cursor: crosshair;
411
+ font-size: 0;
412
+ height: 5px;
413
+ width: 5px;
414
+ right: -5px;
415
+ bottom: -5px;
416
+ border: 2px solid #ffffff;
417
+ background: #4b89ff;
418
+ }
419
+ .x-spreadsheet-editor {
420
+ z-index: 20;
421
+ }
422
+ .x-spreadsheet-editor .x-spreadsheet-editor-area {
423
+ position: absolute;
424
+ text-align: left;
425
+ border: 2px solid #4b89ff;
426
+ line-height: 0;
427
+ z-index: 100;
428
+ pointer-events: auto;
429
+ }
430
+ .x-spreadsheet-editor .x-spreadsheet-editor-area textarea {
431
+ box-sizing: content-box;
432
+ border: none;
433
+ padding: 0 3px;
434
+ outline: none;
435
+ resize: none;
436
+ text-align: start;
437
+ overflow-y: hidden;
438
+ font: 400 13px Arial, 'Lato', 'Source Sans Pro', Roboto, Helvetica, sans-serif;
439
+ color: inherit;
440
+ white-space: normal;
441
+ word-wrap: break-word;
442
+ line-height: 22px;
443
+ margin: 0;
444
+ }
445
+ .x-spreadsheet-editor .x-spreadsheet-editor-area .textline {
446
+ overflow: hidden;
447
+ visibility: hidden;
448
+ position: fixed;
449
+ top: 0;
450
+ left: 0;
451
+ }
452
+ .x-spreadsheet-item {
453
+ user-select: none;
454
+ background: 0;
455
+ border: 1px solid transparent;
456
+ outline: none;
457
+ height: 26px;
458
+ color: rgba(0, 0, 0, 0.9);
459
+ line-height: 26px;
460
+ list-style: none;
461
+ padding: 2px 10px;
462
+ cursor: default;
463
+ text-align: left;
464
+ overflow: hidden;
465
+ }
466
+ .x-spreadsheet-item.disabled {
467
+ pointer-events: none;
468
+ opacity: 0.5;
469
+ }
470
+ .x-spreadsheet-item:hover,
471
+ .x-spreadsheet-item.active {
472
+ background: rgba(0, 0, 0, 0.05);
473
+ }
474
+ .x-spreadsheet-item.divider {
475
+ height: 0;
476
+ padding: 0;
477
+ margin: 5px 0;
478
+ border: none;
479
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
480
+ }
481
+ .x-spreadsheet-item .label {
482
+ float: right;
483
+ opacity: 0.65;
484
+ font-size: 1em;
485
+ }
486
+ .x-spreadsheet-item.state,
487
+ .x-spreadsheet-header.state {
488
+ padding-left: 35px !important;
489
+ position: relative;
490
+ }
491
+ .x-spreadsheet-item.state:before,
492
+ .x-spreadsheet-header.state:before {
493
+ content: '';
494
+ position: absolute;
495
+ width: 10px;
496
+ height: 10px;
497
+ left: 12px;
498
+ top: calc(50% - 5px);
499
+ background: rgba(0, 0, 0, 0.08);
500
+ border-radius: 2px;
501
+ }
502
+ .x-spreadsheet-item.state.checked:before,
503
+ .x-spreadsheet-header.state.checked:before {
504
+ background: #4b89ff;
505
+ }
506
+ .x-spreadsheet-checkbox {
507
+ position: relative;
508
+ display: inline-block;
509
+ backface-visibility: hidden;
510
+ outline: 0;
511
+ vertical-align: baseline;
512
+ font-style: normal;
513
+ font-size: 1rem;
514
+ line-height: 1em;
515
+ }
516
+ .x-spreadsheet-checkbox > input {
517
+ position: absolute;
518
+ top: 0;
519
+ left: 0;
520
+ opacity: 0 !important;
521
+ outline: 0;
522
+ z-index: -1;
523
+ }
524
+ .x-spreadsheet-suggest,
525
+ .x-spreadsheet-contextmenu,
526
+ .x-spreadsheet-sort-filter {
527
+ position: absolute;
528
+ box-shadow: 1px 2px 5px 2px rgba(51, 51, 51, 0.15);
529
+ background: #fff;
530
+ z-index: 100;
531
+ width: 260px;
532
+ pointer-events: auto;
533
+ overflow: auto;
534
+ }
535
+ .x-spreadsheet-suggest {
536
+ width: 200px;
537
+ }
538
+ .x-spreadsheet-filter {
539
+ border: 1px solid #e9e9e9;
540
+ font-size: 12px;
541
+ margin: 10px;
542
+ }
543
+ .x-spreadsheet-filter .x-spreadsheet-header {
544
+ padding: 0.5em 0.75em;
545
+ background: #f8f8f9;
546
+ border-bottom: 1px solid #e9e9e9;
547
+ border-left: 1px solid transparent;
548
+ }
549
+ .x-spreadsheet-filter .x-spreadsheet-body {
550
+ height: 200px;
551
+ overflow-y: auto;
552
+ }
553
+ .x-spreadsheet-filter .x-spreadsheet-body .x-spreadsheet-item {
554
+ height: 20px;
555
+ line-height: 20px;
556
+ }
557
+ .x-spreadsheet-sort-filter .x-spreadsheet-buttons {
558
+ margin: 10px;
559
+ }
560
+ .x-spreadsheet-bottombar {
561
+ height: 40px;
562
+ padding: 0 30px;
563
+ text-align: left;
564
+ background: #f5f6f7;
565
+ display: flex;
566
+ }
567
+ .x-spreadsheet-bottombar {
568
+ position: relative;
569
+ border-top: 1px solid #e0e2e4;
570
+ }
571
+ .x-spreadsheet-bottombar .x-spreadsheet-menu > li {
572
+ line-height: 40px;
573
+ height: 40px;
574
+ padding-top: 0;
575
+ padding-bottom: 0;
576
+ vertical-align: middle;
577
+ border-right: 1px solid #e8eaed;
578
+ }
579
+ .x-spreadsheet-menu {
580
+ list-style: none;
581
+ margin: 0;
582
+ padding: 0;
583
+ user-select: none;
584
+ }
585
+ .x-spreadsheet-menu > li {
586
+ float: left;
587
+ line-height: 1.25em;
588
+ padding: 0.785em 1em;
589
+ margin: 0;
590
+ vertical-align: middle;
591
+ text-align: left;
592
+ color: #80868b;
593
+ white-space: nowrap;
594
+ cursor: pointer;
595
+ transition: all 0.3s;
596
+ font-weight: bold;
597
+ }
598
+ .x-spreadsheet-menu > li.active {
599
+ background-color: #fff;
600
+ color: rgba(0, 0, 0, 0.65);
601
+ }
602
+ .x-spreadsheet-menu > li .x-spreadsheet-dropdown {
603
+ display: inline-block;
604
+ }
605
+ .x-spreadsheet-print {
606
+ position: absolute;
607
+ left: 0;
608
+ top: 0;
609
+ z-index: 100;
610
+ width: 100%;
611
+ height: 100%;
612
+ display: flex;
613
+ flex-direction: column;
614
+ }
615
+ .x-spreadsheet-print-bar {
616
+ background: #424242;
617
+ height: 60px;
618
+ line-height: 60px;
619
+ padding: 0 30px;
620
+ }
621
+ .x-spreadsheet-print-bar .-title {
622
+ color: #fff;
623
+ font-weight: bold;
624
+ font-size: 1.2em;
625
+ float: left;
626
+ }
627
+ .x-spreadsheet-print-bar .-right {
628
+ float: right;
629
+ margin-top: 12px;
630
+ }
631
+ .x-spreadsheet-print-content {
632
+ display: flex;
633
+ flex: auto;
634
+ flex-direction: row;
635
+ background: #d0d0d0;
636
+ height: calc(100% - 60px);
637
+ }
638
+ .x-spreadsheet-print-content .-sider {
639
+ flex: 0 0 300px;
640
+ width: 300px;
641
+ border-left: 2px solid #ccc;
642
+ background: #fff;
643
+ }
644
+ .x-spreadsheet-print-content .-content {
645
+ flex: auto;
646
+ overflow-x: auto;
647
+ overflow-y: scroll;
648
+ height: 100%;
649
+ }
650
+ .x-spreadsheet-canvas-card-wraper {
651
+ margin: 40px 20px;
652
+ }
653
+ .x-spreadsheet-canvas-card {
654
+ background: #fff;
655
+ margin: auto;
656
+ page-break-before: auto;
657
+ page-break-after: always;
658
+ box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 5px 0 rgba(0, 0, 0, 0.2);
659
+ }
660
+ .x-spreadsheet-calendar {
661
+ color: rgba(0, 0, 0, 0.65);
662
+ background: #ffffff;
663
+ user-select: none;
664
+ }
665
+ .x-spreadsheet-calendar .calendar-header {
666
+ font-weight: 700;
667
+ line-height: 30px;
668
+ text-align: center;
669
+ width: 100%;
670
+ float: left;
671
+ background: #f9fafb;
672
+ }
673
+ .x-spreadsheet-calendar .calendar-header .calendar-header-left {
674
+ padding-left: 5px;
675
+ float: left;
676
+ }
677
+ .x-spreadsheet-calendar .calendar-header .calendar-header-right {
678
+ float: right;
679
+ }
680
+ .x-spreadsheet-calendar .calendar-header .calendar-header-right a {
681
+ padding: 3px 0;
682
+ margin-right: 2px;
683
+ border-radius: 2px;
684
+ }
685
+ .x-spreadsheet-calendar .calendar-header .calendar-header-right a:hover {
686
+ background: rgba(0, 0, 0, 0.08);
687
+ }
688
+ .x-spreadsheet-calendar .calendar-body {
689
+ border-collapse: collapse;
690
+ border-spacing: 0;
691
+ }
692
+ .x-spreadsheet-calendar .calendar-body th,
693
+ .x-spreadsheet-calendar .calendar-body td {
694
+ width: 14.28571429%;
695
+ min-width: 32px;
696
+ text-align: center;
697
+ font-weight: 700;
698
+ line-height: 30px;
699
+ padding: 0;
700
+ }
701
+ .x-spreadsheet-calendar .calendar-body td > .cell:hover {
702
+ background: #ecf6fd;
703
+ }
704
+ .x-spreadsheet-calendar .calendar-body td > .cell.active,
705
+ .x-spreadsheet-calendar .calendar-body td > .cell.active:hover {
706
+ background: #ecf6fd;
707
+ color: #2185d0;
708
+ }
709
+ .x-spreadsheet-calendar .calendar-body td > .cell.disabled {
710
+ pointer-events: none;
711
+ opacity: 0.5;
712
+ }
713
+ .x-spreadsheet-datepicker {
714
+ box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
715
+ position: absolute;
716
+ left: 0;
717
+ top: calc(100% + 5px);
718
+ z-index: 10;
719
+ width: auto;
720
+ }
721
+ .x-spreadsheet-buttons {
722
+ display: flex;
723
+ justify-content: flex-end;
724
+ }
725
+ .x-spreadsheet-buttons .x-spreadsheet-button {
726
+ margin-left: 8px;
727
+ }
728
+ .x-spreadsheet-button {
729
+ display: inline-block;
730
+ border-radius: 3px;
731
+ line-height: 1em;
732
+ min-height: 1em;
733
+ white-space: nowrap;
734
+ text-align: center;
735
+ cursor: pointer;
736
+ font-size: 1em;
737
+ font-weight: 700;
738
+ padding: 0.75em 1em;
739
+ color: rgba(0, 0, 0, 0.6);
740
+ background: #e0e1e2;
741
+ text-decoration: none;
742
+ font-family: 'Lato', 'proxima-nova', 'Helvetica Neue', Arial, sans-serif;
743
+ outline: none;
744
+ vertical-align: baseline;
745
+ zoom: 1;
746
+ user-select: none;
747
+ transition: all 0.1s linear;
748
+ }
749
+ .x-spreadsheet-button.active,
750
+ .x-spreadsheet-button:hover {
751
+ background-color: #c0c1c2;
752
+ color: rgba(0, 0, 0, 0.8);
753
+ }
754
+ .x-spreadsheet-button.primary {
755
+ color: #fff;
756
+ background-color: #2185d0;
757
+ }
758
+ .x-spreadsheet-button.primary:hover,
759
+ .x-spreadsheet-button.primary.active {
760
+ color: #fff;
761
+ background-color: #1678c2;
762
+ }
763
+ .x-spreadsheet-form-input {
764
+ font-size: 1em;
765
+ position: relative;
766
+ font-weight: 400;
767
+ display: inline-flex;
768
+ color: rgba(0, 0, 0, 0.87);
769
+ }
770
+ .x-spreadsheet-form-input input {
771
+ z-index: 1;
772
+ margin: 0;
773
+ max-width: 100%;
774
+ flex: 1 0 auto;
775
+ outline: 0;
776
+ -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
777
+ text-align: left;
778
+ line-height: 30px;
779
+ height: 30px;
780
+ padding: 0 8px;
781
+ background: #fff;
782
+ border: 1px solid #e9e9e9;
783
+ border-radius: 3px;
784
+ transition: box-shadow 0.1s ease, border-color 0.1s ease;
785
+ box-shadow: inset 0 1px 2px hsla(0, 0%, 4%, 0.06);
786
+ }
787
+ .x-spreadsheet-form-input input:focus {
788
+ border-color: #4b89ff;
789
+ box-shadow: inset 0 1px 2px rgba(75, 137, 255, 0.2);
790
+ }
791
+ .x-spreadsheet-form-select {
792
+ position: relative;
793
+ display: inline-block;
794
+ background: #fff;
795
+ border: 1px solid #e9e9e9;
796
+ border-radius: 2px;
797
+ cursor: pointer;
798
+ color: rgba(0, 0, 0, 0.87);
799
+ user-select: none;
800
+ box-shadow: inset 0 1px 2px hsla(0, 0%, 4%, 0.06);
801
+ }
802
+ .x-spreadsheet-form-select .input-text {
803
+ text-overflow: ellipsis;
804
+ white-space: nowrap;
805
+ min-width: 60px;
806
+ width: auto;
807
+ height: 30px;
808
+ line-height: 30px;
809
+ padding: 0 8px;
810
+ }
811
+ .x-spreadsheet-form-fields {
812
+ display: flex;
813
+ flex-direction: row;
814
+ flex-wrap: wrap;
815
+ }
816
+ .x-spreadsheet-form-fields .x-spreadsheet-form-field {
817
+ flex: 0 1 auto;
818
+ }
819
+ .x-spreadsheet-form-fields .x-spreadsheet-form-field .label {
820
+ display: inline-block;
821
+ margin: 0 10px 0 0;
822
+ }
823
+ .x-spreadsheet-form-field {
824
+ display: block;
825
+ vertical-align: middle;
826
+ margin-left: 10px;
827
+ margin-bottom: 10px;
828
+ }
829
+ .x-spreadsheet-form-field:first-child {
830
+ margin-left: 0;
831
+ }
832
+ .x-spreadsheet-form-field.error .x-spreadsheet-form-select,
833
+ .x-spreadsheet-form-field.error input {
834
+ border-color: #f04134;
835
+ }
836
+ .x-spreadsheet-form-field .tip {
837
+ color: #f04134;
838
+ font-size: 0.9em;
839
+ }
840
+ .x-spreadsheet-dimmer {
841
+ display: none;
842
+ position: absolute;
843
+ top: 0 !important;
844
+ left: 0 !important;
845
+ width: 100%;
846
+ height: 100%;
847
+ text-align: center;
848
+ vertical-align: middle;
849
+ background-color: rgba(0, 0, 0, 0.6);
850
+ opacity: 0;
851
+ -webkit-animation-fill-mode: both;
852
+ animation-fill-mode: both;
853
+ -webkit-animation-duration: 0.5s;
854
+ animation-duration: 0.5s;
855
+ transition: background-color 0.5s linear;
856
+ user-select: none;
857
+ z-index: 1000;
858
+ }
859
+ .x-spreadsheet-dimmer.active {
860
+ display: block;
861
+ opacity: 1;
862
+ }
863
+ .x-spreadsheet-modal,
864
+ .x-spreadsheet-toast {
865
+ font-size: 13px;
866
+ position: fixed;
867
+ z-index: 1001;
868
+ text-align: left;
869
+ line-height: 1.25em;
870
+ min-width: 360px;
871
+ color: rgba(0, 0, 0, 0.87);
872
+ font-family: 'Lato', 'Source Sans Pro', Roboto, Helvetica, Arial, sans-serif;
873
+ border-radius: 4px;
874
+ border: 1px solid rgba(0, 0, 0, 0.1);
875
+ background-color: #fff;
876
+ background-clip: padding-box;
877
+ box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 8px;
878
+ }
879
+ .x-spreadsheet-toast {
880
+ background-color: rgba(255, 255, 255, 0.85);
881
+ }
882
+ .x-spreadsheet-modal-header,
883
+ .x-spreadsheet-toast-header {
884
+ font-weight: 600;
885
+ background-clip: padding-box;
886
+ background-color: rgba(255, 255, 255, 0.85);
887
+ border-bottom: 1px solid rgba(0, 0, 0, 0.05);
888
+ border-radius: 4px 4px 0 0;
889
+ }
890
+
891
+ .x-spreadsheet-toast-header {
892
+ color: #f2711c;
893
+ }
894
+ .x-spreadsheet-modal-header {
895
+ border-bottom: 1px solid #e0e2e4;
896
+ background: rgba(0, 0, 0, 0.08);
897
+ font-size: 1.0785em;
898
+ }
899
+ .x-spreadsheet-modal-header,
900
+ .x-spreadsheet-modal-content,
901
+ .x-spreadsheet-toast-header,
902
+ .x-spreadsheet-toast-content {
903
+ padding: 0.75em 1em;
904
+ }
905
+
906
+ .x-spreadsheet-menu li:first-child {
907
+ display: none;
908
+ }
909
+ .sh-office-excel {
910
+ form fieldset {
911
+ border: none;
912
+ }
913
+ form fieldset label {
914
+ display: block;
915
+ margin-bottom: 0.5em;
916
+ font-size: 1em;
917
+ color: #666;
918
+ }
919
+ form fieldset select {
920
+ font-size: 1.1em;
921
+ width: 100%;
922
+ background-color: #fff;
923
+ border: none;
924
+ border-bottom: 2px solid #ddd;
925
+ padding: 0.5em 0.85em;
926
+ border-radius: 2px;
180
927
  }
181
928
  }
182
929
  </style>
@@ -4,7 +4,7 @@ import dataHook from '../js/data-hook'
4
4
  import dataProps from '../js/data-hook'
5
5
  import { renderAsync } from 'docx-preview'
6
6
  export default defineComponent({
7
- name: 'ShOfficeDocx',
7
+ name: 'ShWord',
8
8
  props: dataProps,
9
9
  emits: ['rendered', 'error'],
10
10
  setup(props, context) {
@@ -55,12 +55,12 @@ export default defineComponent({
55
55
  </script>
56
56
 
57
57
  <template>
58
- <div ref="rootRef" class="sh-office-docx"></div>
58
+ <div ref="rootRef" class="sh-office-word"></div>
59
59
  </template>
60
60
 
61
- <style lang="less">
61
+ <style lang="scss" scoped>
62
62
  @media screen and (max-width: 800px) {
63
- .sh-office-docx {
63
+ .sh-office-word {
64
64
  .docx-wrapper {
65
65
  padding: 10px;
66
66
  > section.docx {
@@ -39,9 +39,9 @@ export default defineComponent({
39
39
  const previewType = computed(() => (props.type && props.type.toLowerCase()) || (props.url && props.url.substr(props.url.lastIndexOf('.') + 1).toLowerCase()))
40
40
  const componentName = computed(() => {
41
41
  if (['word', 'doc', 'docx'].includes(previewType.value)) {
42
- return 'sh-word'
42
+ return 'ShWord'
43
43
  } else if (['excel', 'xlsx'].includes(previewType.value)) {
44
- return 'sh-excel'
44
+ return 'ShExcel'
45
45
  }
46
46
  return 'iframe'
47
47
  })
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <span class="vxe-render--inner" style="display: inline-block; width: 100%">
2
+ <span class="vxe-render--inner" style="display: inline-grid; width: 100%">
3
3
  <sh-table
4
4
  ref="shTableRef"
5
5
  :disabled="!redit && !isEditAll"