zydx-plus 1.32.297 → 1.32.299

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": "zydx-plus",
3
- "version": "1.32.297",
3
+ "version": "1.32.299",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -32,7 +32,7 @@ let buttonNames = {
32
32
  },
33
33
  lowLevel: {
34
34
  default: "singletonClass",
35
- singletonClass: this.getCurrentPrefix(item) + '考勤',
35
+ singletonClass: '考  勤',
36
36
  score: '考勤成绩',
37
37
  analysis: '统计分析',
38
38
  power: '学习动力'
@@ -51,7 +51,7 @@ let buttonNames = {
51
51
  },
52
52
  lowLevel: {
53
53
  default: "singletonClass",
54
- singletonClass: this.getCurrentPrefix(item) + '考勤',
54
+ singletonClass: '考  勤',
55
55
  score: '考勤成绩',
56
56
  analysis: '统计分析',
57
57
  power: '学习动力'
@@ -110,7 +110,7 @@ let buttonNames = {
110
110
  },
111
111
  lowLevel: {
112
112
  default: "singletonClass",
113
- singletonClass: this.getPrefix(item) + '检测',
113
+ singletonClass: '实施检测',
114
114
  score: '检测成绩',
115
115
  analysis: '统计分析',
116
116
  power: '学习动力'
@@ -129,7 +129,7 @@ let buttonNames = {
129
129
  },
130
130
  lowLevel: {
131
131
  default: "singletonClass",
132
- singletonClass: this.getPrefix(item) + '检测',
132
+ singletonClass: '实施检测',
133
133
  score: '检测成绩',
134
134
  analysis: '统计分析',
135
135
  power: '学习动力'
@@ -154,7 +154,7 @@ let buttonNames = {
154
154
  },
155
155
  lowLevel: {
156
156
  default: "singletonClass",
157
- singletonClass: this.getCurrentPrefix(item) + '思政',
157
+ singletonClass: '思政主题',
158
158
  score: '思政成绩',
159
159
  analysis: '统计分析',
160
160
  power: '学习动力'
@@ -173,7 +173,7 @@ let buttonNames = {
173
173
  },
174
174
  lowLevel: {
175
175
  default: "singletonClass",
176
- singletonClass: this.getCurrentPrefix(item) + '思政',
176
+ singletonClass: '思政主题',
177
177
  score: '思政成绩',
178
178
  analysis: '统计分析',
179
179
  power: '学习动力'
@@ -245,7 +245,7 @@ let buttonNames = {
245
245
  },
246
246
  lowLevel: {
247
247
  default: "singletonClass",
248
- singletonClass: this.getCurrentPrefix(item) + '追问',
248
+ singletonClass: '追问主题',
249
249
  score: '回答成绩',
250
250
  analysis: '统计分析',
251
251
  power: '学习动力'
@@ -264,7 +264,7 @@ let buttonNames = {
264
264
  },
265
265
  lowLevel: {
266
266
  default: "singletonClass",
267
- singletonClass: this.getCurrentPrefix(item) + '追问',
267
+ singletonClass: '追问主题',
268
268
  score: '回答成绩',
269
269
  analysis: '统计分析',
270
270
  power: '学习动力'
@@ -289,7 +289,7 @@ let buttonNames = {
289
289
  },
290
290
  lowLevel: {
291
291
  default: "singletonClass",
292
- singletonClass: this.getCurrentPrefix(item) + '提问',
292
+ singletonClass: '发起提问',
293
293
  score: '回答成绩',
294
294
  analysis: '统计分析',
295
295
  power: '学习动力'
@@ -308,7 +308,7 @@ let buttonNames = {
308
308
  },
309
309
  lowLevel: {
310
310
  default: "singletonClass",
311
- singletonClass: this.getCurrentPrefix(item) + '提问',
311
+ singletonClass: '发起提问',
312
312
  score: '回答成绩',
313
313
  analysis: '统计分析',
314
314
  power: '学习动力'
@@ -426,7 +426,7 @@ let buttonNames = {
426
426
  },
427
427
  lowLevel: {
428
428
  default: "singletonClass",
429
- singletonClass: this.getCurrentPrefix(item) + '讨论',
429
+ singletonClass: '讨论题目',
430
430
  score: '讨论成绩',
431
431
  analysis: '统计分析',
432
432
  power: '学习动力'
@@ -445,7 +445,7 @@ let buttonNames = {
445
445
  },
446
446
  lowLevel: {
447
447
  default: "singletonClass",
448
- singletonClass: this.getCurrentPrefix(item) + '讨论',
448
+ singletonClass: '讨论题目',
449
449
  score: '讨论成绩',
450
450
  analysis: '统计分析',
451
451
  power: '学习动力'
@@ -470,7 +470,7 @@ let buttonNames = {
470
470
  },
471
471
  lowLevel: {
472
472
  default: "singletonClass",
473
- singletonClass: this.getCurrentPrefix(item) + '风暴',
473
+ singletonClass: '风暴题目',
474
474
  score: '风暴成绩',
475
475
  analysis: '统计分析',
476
476
  power: '学习动力'
@@ -489,7 +489,7 @@ let buttonNames = {
489
489
  },
490
490
  lowLevel: {
491
491
  default: "singletonClass",
492
- singletonClass: this.getCurrentPrefix(item) + '风暴',
492
+ singletonClass: '风暴题目',
493
493
  score: '风暴成绩',
494
494
  analysis: '统计分析',
495
495
  power: '学习动力'
@@ -514,7 +514,7 @@ let buttonNames = {
514
514
  },
515
515
  lowLevel: {
516
516
  default: "singletonClass",
517
- singletonClass: this.getPrefix(item) + '训练',
517
+ singletonClass: '实施训练',
518
518
  score: '训练成绩',
519
519
  analysis: '统计分析',
520
520
  power: '学习动力'
@@ -533,7 +533,7 @@ let buttonNames = {
533
533
  },
534
534
  lowLevel: {
535
535
  default: "singletonClass",
536
- singletonClass: this.getPrefix(item) + '训练',
536
+ singletonClass: '实施训练',
537
537
  score: '训练成绩',
538
538
  analysis: '统计分析',
539
539
  power: '学习动力'
@@ -558,8 +558,8 @@ let buttonNames = {
558
558
  },
559
559
  lowLevel: {
560
560
  default: "singletonClass",
561
- singletonClass: this.getCurrentPrefix(item) + '分析',
562
- score: '分析成绩',
561
+ singletonClass: '案析题目',
562
+ score: '案析成绩',
563
563
  analysis: '统计分析',
564
564
  power: '学习动力'
565
565
  },
@@ -577,8 +577,8 @@ let buttonNames = {
577
577
  },
578
578
  lowLevel: {
579
579
  default: "singletonClass",
580
- singletonClass: this.getCurrentPrefix(item) + '分析',
581
- score: '分析成绩',
580
+ singletonClass: '案析题目',
581
+ score: '案析成绩',
582
582
  analysis: '统计分析',
583
583
  power: '学习动力'
584
584
  },
@@ -602,7 +602,7 @@ let buttonNames = {
602
602
  },
603
603
  lowLevel: {
604
604
  default: "singletonClass",
605
- singletonClass: this.getCurrentPrefix(item) + '学习',
605
+ singletonClass: '学习任务',
606
606
  score: '学习成绩',
607
607
  analysis: '统计分析',
608
608
  power: '学习动力'
@@ -621,7 +621,7 @@ let buttonNames = {
621
621
  },
622
622
  lowLevel: {
623
623
  default: "singletonClass",
624
- singletonClass: this.getCurrentPrefix(item) + '学习',
624
+ singletonClass: '学习任务',
625
625
  score: '学习成绩',
626
626
  analysis: '统计分析',
627
627
  power: '学习动力'
@@ -693,7 +693,7 @@ let buttonNames = {
693
693
  },
694
694
  lowLevel: {
695
695
  default: "singletonClass",
696
- singletonClass: this.getPrefix(item) + '作业',
696
+ singletonClass: '作业任务',
697
697
  score: '作业成绩',
698
698
  analysis: '统计分析',
699
699
  power: '学习动力'
@@ -712,7 +712,7 @@ let buttonNames = {
712
712
  },
713
713
  lowLevel: {
714
714
  default: "singletonClass",
715
- singletonClass: this.getPrefix(item) + '作业',
715
+ singletonClass: '作业任务',
716
716
  score: '作业成绩',
717
717
  analysis: '统计分析',
718
718
  power: '学习动力'
@@ -737,7 +737,7 @@ let buttonNames = {
737
737
  },
738
738
  lowLevel: {
739
739
  default: "singletonClass",
740
- singletonClass: this.getCurrentPrefix(item) + '聆听',
740
+ singletonClass: '聆听题目',
741
741
  score: '聆听成绩',
742
742
  analysis: '统计分析',
743
743
  power: '学习动力'
@@ -756,7 +756,7 @@ let buttonNames = {
756
756
  },
757
757
  lowLevel: {
758
758
  default: "singletonClass",
759
- singletonClass: this.getCurrentPrefix(item) + '聆听',
759
+ singletonClass: '聆听题目',
760
760
  score: '聆听成绩',
761
761
  analysis: '统计分析',
762
762
  power: '学习动力'
@@ -781,7 +781,7 @@ let buttonNames = {
781
781
  },
782
782
  lowLevel: {
783
783
  default: "singletonClass",
784
- singletonClass: this.getCurrentPrefix(item) + '阅读',
784
+ singletonClass: '阅读主题',
785
785
  score: '阅读成绩',
786
786
  analysis: '统计分析',
787
787
  power: '学习动力'
@@ -800,7 +800,7 @@ let buttonNames = {
800
800
  },
801
801
  lowLevel: {
802
802
  default: "singletonClass",
803
- singletonClass: this.getCurrentPrefix(item) + '阅读',
803
+ singletonClass: '阅读主题',
804
804
  score: '阅读成绩',
805
805
  analysis: '统计分析',
806
806
  power: '学习动力'
@@ -824,7 +824,7 @@ let buttonNames = {
824
824
  },
825
825
  lowLevel: {
826
826
  default: "singletonClass",
827
- singletonClass: this.getCurrentPrefix(item) + '写作',
827
+ singletonClass: '写作主题',
828
828
  score: '写作成绩',
829
829
  analysis: '统计分析',
830
830
  power: '学习动力'
@@ -843,7 +843,7 @@ let buttonNames = {
843
843
  },
844
844
  lowLevel: {
845
845
  default: "singletonClass",
846
- singletonClass: this.getCurrentPrefix(item) + '写作',
846
+ singletonClass: '写作主题',
847
847
  score: '写作成绩',
848
848
  analysis: '统计分析',
849
849
  power: '学习动力'
@@ -868,7 +868,7 @@ let buttonNames = {
868
868
  },
869
869
  lowLevel: {
870
870
  default: "singletonClass",
871
- singletonClass: this.getCurrentPrefix(item) + '实践',
871
+ singletonClass: '实践项目',
872
872
  score: '实践成绩',
873
873
  analysis: '统计分析',
874
874
  power: '学习动力'
@@ -887,7 +887,7 @@ let buttonNames = {
887
887
  },
888
888
  lowLevel: {
889
889
  default: "singletonClass",
890
- singletonClass: this.getCurrentPrefix(item) + '实践',
890
+ singletonClass: '实践项目',
891
891
  score: '实践成绩',
892
892
  analysis: '统计分析',
893
893
  power: '学习动力'
@@ -912,7 +912,7 @@ let buttonNames = {
912
912
  },
913
913
  lowLevel: {
914
914
  default: "singletonClass",
915
- singletonClass: this.getCurrentPrefix(item) + '创新',
915
+ singletonClass: '创新主题',
916
916
  score: '创新成绩',
917
917
  analysis: '统计分析',
918
918
  power: '学习动力'
@@ -932,7 +932,7 @@ let buttonNames = {
932
932
  },
933
933
  lowLevel: {
934
934
  default: "singletonClass",
935
- singletonClass: this.getCurrentPrefix(item) + '创新',
935
+ singletonClass: '创新主题',
936
936
  score: '创新成绩',
937
937
  analysis: '统计分析',
938
938
  power: '学习动力'
@@ -1103,7 +1103,7 @@ let buttonNames = {
1103
1103
  },
1104
1104
  lowLevel: {
1105
1105
  default: "singletonClass",
1106
- singletonClass: this.getCurrentPrefix(item) + '项目',
1106
+ singletonClass: '学习项目',
1107
1107
  score: '项目成绩',
1108
1108
  analysis: '统计分析',
1109
1109
  power: '学习动力'
@@ -1122,7 +1122,7 @@ let buttonNames = {
1122
1122
  },
1123
1123
  lowLevel: {
1124
1124
  default: "singletonClass",
1125
- singletonClass: this.getCurrentPrefix(item) + '项目',
1125
+ singletonClass: '学习项目',
1126
1126
  score: '项目成绩',
1127
1127
  analysis: '统计分析',
1128
1128
  power: '学习动力'
@@ -1147,7 +1147,7 @@ let buttonNames = {
1147
1147
  },
1148
1148
  lowLevel: {
1149
1149
  default: "singletonClass",
1150
- singletonClass: this.getCurrentPrefix(item) + '实验',
1150
+ singletonClass: '实验项目',
1151
1151
  score: '实验成绩',
1152
1152
  analysis: '统计分析',
1153
1153
  power: '学习动力'
@@ -1167,7 +1167,7 @@ let buttonNames = {
1167
1167
  },
1168
1168
  lowLevel: {
1169
1169
  default: "singletonClass",
1170
- singletonClass: this.getCurrentPrefix(item) + '实验',
1170
+ singletonClass: '实验项目',
1171
1171
  score: '实验成绩',
1172
1172
  analysis: '统计分析',
1173
1173
  power: '学习动力'
@@ -1202,7 +1202,7 @@ let buttonNames = {
1202
1202
  },
1203
1203
  lowLevel: {
1204
1204
  default: "singletonClass",
1205
- singletonClass: this.getCurrentPrefix(item) + '考勤',
1205
+ singletonClass: '考  勤',
1206
1206
  score: '考勤成绩',
1207
1207
  analysis: '统计分析',
1208
1208
  power: '学习动力'
@@ -1247,7 +1247,7 @@ let buttonNames = {
1247
1247
  },
1248
1248
  lowLevel: {
1249
1249
  default: "singletonClass",
1250
- singletonClass: this.getPrefix(item) + '检测',
1250
+ singletonClass: '实施检测',
1251
1251
  score: '检测成绩',
1252
1252
  analysis: '统计分析',
1253
1253
  power: '学习动力'
@@ -1289,7 +1289,7 @@ let buttonNames = {
1289
1289
  },
1290
1290
  lowLevel: {
1291
1291
  default: "singletonClass",
1292
- singletonClass: this.getCurrentPrefix(item) + '思政',
1292
+ singletonClass: '思政主题',
1293
1293
  score: '思政成绩',
1294
1294
  analysis: '统计分析',
1295
1295
  power: '学习动力'
@@ -1314,7 +1314,7 @@ let buttonNames = {
1314
1314
  },
1315
1315
  lowLevel: {
1316
1316
  default: "setTask",
1317
- setTask: '任务时限',
1317
+ setTask: '任务信息',
1318
1318
  btnIndex1: '记录笔记',
1319
1319
  btnIndex2: '提交笔记',
1320
1320
  teacherReview: '教师评价',
@@ -1343,7 +1343,7 @@ let buttonNames = {
1343
1343
  },
1344
1344
  lowLevel: {
1345
1345
  default: "singletonClass",
1346
- singletonClass: this.getCurrentPrefix(item) + '追问',
1346
+ singletonClass: '教师追问',
1347
1347
  score: '学习成绩',
1348
1348
  analysis: '统计分析',
1349
1349
  power: '学习动力'
@@ -1368,7 +1368,7 @@ let buttonNames = {
1368
1368
  },
1369
1369
  lowLevel: {
1370
1370
  default: "singletonClass",
1371
- singletonClass: this.getCurrentPrefix(item) + '提问',
1371
+ singletonClass: '教师提问',
1372
1372
  score: '回答成绩',
1373
1373
  analysis: '统计分析',
1374
1374
  power: '学习动力'
@@ -1393,7 +1393,7 @@ let buttonNames = {
1393
1393
  },
1394
1394
  lowLevel: {
1395
1395
  default: "setTask",
1396
- setTask: '任务时限',
1396
+ setTask: '任务信息',
1397
1397
  btnIndex1: '提问问题',
1398
1398
  teacherReview: '教师评价',
1399
1399
  studentReview: '同学互评',
@@ -1422,7 +1422,7 @@ let buttonNames = {
1422
1422
  },
1423
1423
  lowLevel: {
1424
1424
  default: "setTask",
1425
- setTask: '任务时限',
1425
+ setTask: '任务信息',
1426
1426
  btnIndex1: '问  答',
1427
1427
  teacherReview: '教师评价',
1428
1428
  studentReview: '同学互评',
@@ -1450,7 +1450,7 @@ let buttonNames = {
1450
1450
  },
1451
1451
  lowLevel: {
1452
1452
  default: "singletonClass",
1453
- singletonClass: this.getCurrentPrefix(item) + '讨论',
1453
+ singletonClass: '讨论题目',
1454
1454
  score: '讨论成绩',
1455
1455
  analysis: '统计分析',
1456
1456
  power: '学习动力'
@@ -1475,7 +1475,7 @@ let buttonNames = {
1475
1475
  },
1476
1476
  lowLevel: {
1477
1477
  default: "singletonClass",
1478
- singletonClass: this.getCurrentPrefix(item) + '风暴',
1478
+ singletonClass: '风暴题目',
1479
1479
  score: '风暴成绩',
1480
1480
  analysis: '统计分析',
1481
1481
  power: '学习动力'
@@ -1500,7 +1500,7 @@ let buttonNames = {
1500
1500
  },
1501
1501
  lowLevel: {
1502
1502
  default: "singletonClass",
1503
- singletonClass: this.getPrefix(item) + '训练',
1503
+ singletonClass: '实施训练',
1504
1504
  score: '训练成绩',
1505
1505
  analysis: '统计分析',
1506
1506
  power: '学习动力'
@@ -1519,7 +1519,7 @@ let buttonNames = {
1519
1519
  },
1520
1520
  lowLevel: {
1521
1521
  default: "allClass",
1522
- allClass: this.getPrefix(item) + '训练',
1522
+ allClass: '实施训练',
1523
1523
  wrongItem: '重做试题',
1524
1524
  },
1525
1525
  }
@@ -1542,8 +1542,8 @@ let buttonNames = {
1542
1542
  },
1543
1543
  lowLevel: {
1544
1544
  default: "singletonClass",
1545
- singletonClass: this.getCurrentPrefix(item) + '分析',
1546
- score: '分析成绩',
1545
+ singletonClass: '案析题目',
1546
+ score: '案析成绩',
1547
1547
  analysis: '统计分析',
1548
1548
  power: '学习动力'
1549
1549
  },
@@ -1592,8 +1592,9 @@ let buttonNames = {
1592
1592
  },
1593
1593
  lowLevel: {
1594
1594
  default: "setTask",
1595
- setTask: '任务时限',
1596
- btnIndex1: '讲解文件',
1595
+ setTask: '任务信息',
1596
+ studyGroup: '小组成员',
1597
+ row4: '讲解学习',
1597
1598
  teacherReview: '教师评价',
1598
1599
  studentReview: '同学互评',
1599
1600
  analysis: '统计分析',
@@ -1620,7 +1621,7 @@ let buttonNames = {
1620
1621
  },
1621
1622
  lowLevel: {
1622
1623
  default: "singletonClass",
1623
- singletonClass: this.getPrefix(item) + '作业',
1624
+ singletonClass: '作业任务',
1624
1625
  score: '作业成绩',
1625
1626
  analysis: '统计分析',
1626
1627
  power: '学习动力'
@@ -1645,7 +1646,7 @@ let buttonNames = {
1645
1646
  },
1646
1647
  lowLevel: {
1647
1648
  default: "singletonClass",
1648
- singletonClass: this.getCurrentPrefix(item) + '聆听',
1649
+ singletonClass: '聆听题目',
1649
1650
  score: '聆听成绩',
1650
1651
  analysis: '统计分析',
1651
1652
  power: '学习动力'
@@ -1670,7 +1671,7 @@ let buttonNames = {
1670
1671
  },
1671
1672
  lowLevel: {
1672
1673
  default: "singletonClass",
1673
- singletonClass: this.getCurrentPrefix(item) + '阅读',
1674
+ singletonClass: '阅读任务',
1674
1675
  score: '阅读成绩',
1675
1676
  analysis: '统计分析',
1676
1677
  power: '学习动力'
@@ -1694,7 +1695,7 @@ let buttonNames = {
1694
1695
  },
1695
1696
  lowLevel: {
1696
1697
  default: "singletonClass",
1697
- singletonClass: this.getCurrentPrefix(item) + '写作',
1698
+ singletonClass: '写作任务',
1698
1699
  score: '写作成绩',
1699
1700
  analysis: '统计分析',
1700
1701
  power: '学习动力'
@@ -1719,7 +1720,7 @@ let buttonNames = {
1719
1720
  },
1720
1721
  lowLevel: {
1721
1722
  default: "singletonClass",
1722
- singletonClass: this.getCurrentPrefix(item) + '实践',
1723
+ singletonClass: '实践项目',
1723
1724
  score: '实践成绩',
1724
1725
  analysis: '统计分析',
1725
1726
  power: '学习动力'
@@ -1744,7 +1745,7 @@ let buttonNames = {
1744
1745
  },
1745
1746
  lowLevel: {
1746
1747
  default: "singletonClass",
1747
- singletonClass: this.getCurrentPrefix(item) + '创新',
1748
+ singletonClass: '创新主题',
1748
1749
  score: '创新成绩',
1749
1750
  analysis: '统计分析',
1750
1751
  power: '学习动力'
@@ -1864,7 +1865,7 @@ let buttonNames = {
1864
1865
  },
1865
1866
  lowLevel: {
1866
1867
  default: "singletonClass",
1867
- singletonClass: this.getCurrentPrefix(item) + '项目',
1868
+ singletonClass: '学习项目',
1868
1869
  score: '项目成绩',
1869
1870
  analysis: '统计分析',
1870
1871
  power: '学习动力'
@@ -1889,7 +1890,7 @@ let buttonNames = {
1889
1890
  },
1890
1891
  lowLevel: {
1891
1892
  default: "singletonClass",
1892
- singletonClass: this.getCurrentPrefix(item) + '实验',
1893
+ singletonClass: '实验项目',
1893
1894
  score: '实验成绩',
1894
1895
  analysis: '统计分析',
1895
1896
  power: '学习动力'
@@ -60,7 +60,7 @@
60
60
  </div>
61
61
  </template>
62
62
  <div v-if="actionConfig[actionId].isShowLaterScore" class="task_item_main" :class="getZindex(index)">
63
- <div class="task_text_desc">迟交1扣分:</div>
63
+ <div class="task_text_desc">迟交扣分:</div>
64
64
  <div class="width250">
65
65
  <zydxSelect :color="'#000000'" :readonly="readonly" :options="laterScoreOptions" v-model:value="laterScore"></zydxSelect>
66
66
  </div>
@@ -9,13 +9,13 @@ export function butJson (editor,data) {
9
9
  menuKeys: []
10
10
  },
11
11
  titleMenu: {
12
- name: '添加标题',
12
+ name: '字体',
13
13
  key: 'titleMenu',
14
14
  menuKeys: [
15
- {name: '(中)黑体小4号', key: 'blackCenter4'},
16
- {name: '(左)黑体小4号', key: 'blackLeft4'},
17
- {name: '(中)黑体5号', key: 'blackCenter5'},
18
- {name: '(左)黑体5号', key: 'blackLeft5'},
15
+ {name: '微软雅黑', key: 'Microsoft Yahei'},
16
+ {name: '楷体', key: 'Kaiti'},
17
+ {name: '仿宋', key: 'FangSong'},
18
+ {name: '黑体', key: 'SimHei'},
19
19
  ],
20
20
  html: {
21
21
  blackCenter4: `<p data-signId="title-1" class="title ${randomId()}" style="text-align: center;"><span style="font-weight: 700;color: rgb(0, 0, 0);font-size: 16px;font-family: SimHei">${menusData(data,'titleMenu').text}</span></p>`,
@@ -25,17 +25,38 @@ export function butJson (editor,data) {
25
25
  }
26
26
  },
27
27
  textMenu: {
28
- name: '添加正文',
28
+ name: '字号',
29
29
  key: 'textMenu',
30
30
  menuKeys: [
31
- {name: '宋体5号', key: 'Song5'},
32
- {name: '楷体5号', key: 'regular5'},
31
+ {name: '12', key: '12px'},
32
+ {name: '14', key: '14px'},
33
+ {name: '16', key: '16px'},
34
+ {name: '18', key: '18px'},
35
+ {name: '20', key: '20px'},
36
+ {name: '22', key: '22px'},
37
+ {name: '24', key: '24px'},
38
+ {name: '26', key: '26px'},
39
+ {name: '28', key: '28px'},
40
+ {name: '30', key: '30px'},
41
+ {name: '32', key: '32px'}
33
42
  ],
34
43
  html: {
35
44
  Song5: `<p class="text" style="text-align: left;"><span style="color: rgb(0, 0, 0);font-size: 14px;font-family: SimSun">请输入正文</span></p>`,
36
45
  regular5: `<p class="text" style="text-align: left;"><span style="color: rgb(0, 0, 0);font-size: 14px;font-family: KaiTi">请输入正文</span></p>`,
37
46
  }
38
47
  },
48
+ outlineMenu: {
49
+ name: '大纲级别',
50
+ key: 'outlineMenu',
51
+ menuKeys: [
52
+ {name: '一级标题', key: 'title-1'},
53
+ {name: '二级标题', key: 'title-2'},
54
+ {name: '三级标题', key: 'title-3'},
55
+ {name: '四级标题', key: 'title-4'},
56
+ {name: '正文文本', key: 'text'},
57
+ ],
58
+ html: {}
59
+ },
39
60
  redMenu: {
40
61
  name: '添加红头',
41
62
  key: 'redMenu',
@@ -85,7 +106,7 @@ export function butJson (editor,data) {
85
106
  name: '添加文献',
86
107
  key: 'literatureMenu',
87
108
  menuKeys: [],
88
- html: `<p><span style="color: rgb(0, 0, 0);font-size: 12px;font-family: SimSun">[1]作者.期刊论文名称IJ1.期刊名称,发表年份(第几期):页码</span></p><p><span style="color: rgb(0, 0, 0);font-size: 14px;font-family: SimSun">[2]作者.学位论文名称[D1.毕业院校所在城市:毕业院校,论文提交年份:页码</span></p><p><span style="color: rgb(0, 0, 0);font-size: 14px;font-family: SimSun">[3]作者.著作名称[M.出版社所在城市:出版社名称,出版年份:页码.</span></p><p data-signId="literature"><span style="color: rgb(0, 0, 0);font-size: 14px;font-family: SimSun">[4]作者.文章名称[N].报纸名称,发行日期(版面)</span></p>`
109
+ html: `<p class="literature"><span style="color: rgb(0, 0, 0);font-size: 14px;font-family: SimSun">[1]作者.期刊论文名称IJ1.期刊名称,发表年份(第几期):页码</span></p><p class="literature"><span style="color: rgb(0, 0, 0);font-size: 14px;font-family: SimSun">[2]作者.学位论文名称[D1.毕业院校所在城市:毕业院校,论文提交年份:页码</span></p><p class="literature"><span style="color: rgb(0, 0, 0);font-size: 14px;font-family: SimSun">[3]作者.著作名称[M.出版社所在城市:出版社名称,出版年份:页码.</span></p><p class="literature" data-signId="literature"><span style="color: rgb(0, 0, 0);font-size: 14px;font-family: SimSun">[4]作者.文章名称[N].报纸名称,发行日期(版面)</span></p>`
89
110
  },
90
111
  taggingMenu: {
91
112
  name: '添加标注',
@@ -130,7 +130,8 @@ export default {
130
130
  menusStyle: {
131
131
  top: '0px',
132
132
  left: '0px'
133
- }
133
+ },
134
+ menuStast: null
134
135
  }
135
136
  },
136
137
  props: {
@@ -236,7 +237,7 @@ export default {
236
237
  Superscript, // 上标
237
238
  titleId, // 标题id
238
239
  dataUrl,
239
- BubbleMenu.configure({
240
+ BubbleMenu.configure({ // 气泡菜单
240
241
  element: document.querySelector('.menu'),
241
242
  shouldShow: ({editor, view, state, oldState, from, to}) => {
242
243
  _this.encIndex = state.selection.$from.parent.attrs
@@ -277,23 +278,66 @@ export default {
277
278
  HTMLAttributes: {
278
279
  class: 'editor-img'
279
280
  }
280
- }),
281
+ })
281
282
  ],
282
- injectCSS: true
283
- })
284
- document.addEventListener('keydown', function (e) {
285
- if (e.keyCode === 13) {
286
- // 禁止标题回车
287
- const sid = _this.editor.state.selection.$anchor.path[3].attrs.signId
288
- const ca = _this.editor.state.selection.$anchor.path[3].attrs.titleId
289
- if (sid?.split('-')[0] === 'title') {
290
- const json = _this.editor.getJSON()
291
- for (let i = 0; i < json.content.length; i++) {
292
- if (json.content[i].attrs?.titleId === ca) {
293
- json.content.splice(i + 1, 1)
294
- _this.editor?.commands.setContent(json)
295
- break
283
+ injectCSS: true,
284
+ onBlur: () => {
285
+ _this.menuStast = null
286
+ _this.butDataName('outlineMenu','大纲级别')
287
+ _this.butDataName('textMenu','字号')
288
+ _this.butDataName('titleMenu','字体')
289
+ },
290
+ onTransaction: () => {
291
+ const index = _this.editor.state.selection.$anchor.path[1]
292
+ const json = _this.editor.getJSON()
293
+ for (let i = 0; i < json.content.length; i++) {
294
+ if(index === i) {
295
+ if(json.content[i].content === undefined) break
296
+ const attrs = json.content[i].attrs
297
+ if(attrs.titleId === 'text') {
298
+ _this.butDataName('正文文本')
296
299
  }
300
+ if(attrs.signId !== null) {
301
+ _this.butData.map(x => {
302
+ if(x.key === 'outlineMenu') {
303
+ x.name = '大纲级别'
304
+ if(attrs.signId === 'title-1') x.name = '一级标题'
305
+ if(attrs.signId === 'title-2') x.name = '二级标题'
306
+ if(attrs.signId === 'title-3') x.name = '三级标题'
307
+ if(attrs.signId === 'title-4') x.name = '四级标题'
308
+ }
309
+ })
310
+ }
311
+ if(json.content[i].content[0].marks === undefined) break
312
+ const style = json.content[i].content[0].marks
313
+ style.forEach(x => {
314
+ if(x.type === 'textStyle') {
315
+ if(x.attrs.fontSize !== null) {
316
+ if(_this.menuStast !== 'textMenu') {
317
+ _this.butData.map(y => {
318
+ if(y.key === 'textMenu') {
319
+ y.name = '字号'
320
+ y.name = '字号 ' + x.attrs.fontSize.replace(/px/g, '')
321
+ }
322
+ })
323
+ }
324
+ }
325
+ if(x.attrs.fontFamily !== null) {
326
+ if(_this.menuStast !== 'titleMenu') {
327
+ _this.butData.map(y => {
328
+ if(y.key === 'titleMenu') {
329
+ y.name = '字体'
330
+ if(x.attrs.fontFamily === 'Microsoft Yahei') y.name = '字体 雅黑'
331
+ if(x.attrs.fontFamily === 'Kaiti') y.name = '字体 楷体'
332
+ if(x.attrs.fontFamily === 'FangSong') y.name = '字体 仿宋'
333
+ if(x.attrs.fontFamily === 'SimHei') y.name = '字体 黑体'
334
+ }
335
+ })
336
+ }
337
+ }
338
+ }
339
+ })
340
+ break
297
341
  }
298
342
  }
299
343
  }
@@ -302,6 +346,11 @@ export default {
302
346
  },
303
347
  emits: ['confirm', 'enclosure', 'enlDownload', 'enlSee'],
304
348
  methods: {
349
+ butDataName(n,v) {
350
+ this.butData.map(x => {
351
+ if(x.key === n) x.name = v
352
+ })
353
+ },
305
354
  // 粘贴文本处理
306
355
  preventPaste(event) {
307
356
  const text = event.clipboardData.getData('text/plain');
@@ -790,13 +839,32 @@ export default {
790
839
  }
791
840
  // 标题
792
841
  if (data.key === 'titleMenu') {
793
- const html = butJson(this.editor, this.menusText)[data.key].html[key.key]
794
- this.editor.chain().focus().insertContentAt(this.selection(), html).run()
842
+ this.menuStast = 'titleMenu'
843
+ if(key.key === 'Microsoft Yahei') {
844
+ this.butDataName('titleMenu','字体 雅黑')
845
+ }else {
846
+ this.butDataName('titleMenu',`字体 ${key.name}`)
847
+ }
848
+ this.editor.commands.setFontFamily(key.key)
795
849
  }
796
850
  // 正文
797
851
  if (data.key === 'textMenu') {
798
- const html = butJson(this.editor, this.menusText)[data.key].html[key.key]
799
- this.editor.chain().focus().insertContentAt(this.selection(), html).run()
852
+ this.menuStast = 'textMenu'
853
+ this.butDataName('textMenu',`字号 ${key.name}`)
854
+ this.editor.commands.setFontSize(key.key)
855
+ }
856
+ // 大纲级别
857
+ if (data.key === 'outlineMenu') {
858
+ if (key.key === 'text') {
859
+ this.editor.commands.setTitleId(key.key)
860
+ this.editor.commands.unsetSignId()
861
+ this.editor.chain().focus().unsetBold().run()
862
+ }else {
863
+ const t = key.key.split('-')[0]
864
+ this.editor.commands.setSignId(key.key)
865
+ this.editor.commands.setTitleId(`${t} ${this.randomId()}`)
866
+ this.editor.chain().focus().setBold().run()
867
+ }
800
868
  }
801
869
  // 作者
802
870
  if (data.key === 'authorMenu') {
@@ -902,6 +970,9 @@ export default {
902
970
  this.imgPop = true
903
971
  }
904
972
  }
973
+ setTimeout(() => {
974
+ this.menuStast = null
975
+ },1000)
905
976
  },
906
977
  cursorPosition(data, index) {
907
978
  let num = 0
@@ -1135,7 +1206,7 @@ label {
1135
1206
  }
1136
1207
 
1137
1208
  .editing-cont :deep(p) {
1138
- line-height: 24px;
1209
+ line-height: 1.7;
1139
1210
  }
1140
1211
 
1141
1212
  .editing-cont :deep(img) {
@@ -46,4 +46,4 @@ export const FontSize = Extension.create({
46
46
  },
47
47
  }
48
48
  },
49
- })
49
+ })
@@ -29,5 +29,15 @@ export const signId = Extension.create({
29
29
  },
30
30
  },
31
31
  ]
32
- }
33
- })
32
+ },
33
+ addCommands() {
34
+ return {
35
+ setSignId: (alignment) => ({ commands }) => {
36
+ return commands.updateAttributes('paragraph', { signId: alignment })
37
+ },
38
+ unsetSignId: () => ({ commands }) => {
39
+ return commands.resetAttributes('paragraph', 'signId')
40
+ },
41
+ }
42
+ },
43
+ })
@@ -1,4 +1,4 @@
1
- import { Extension } from '@tiptap/core'
1
+ import { Extension, nodeInputRule } from '@tiptap/core'
2
2
 
3
3
  export const titleId = Extension.create({
4
4
  name: 'titleId',
@@ -29,5 +29,15 @@ export const titleId = Extension.create({
29
29
  },
30
30
  },
31
31
  ]
32
- }
33
- })
32
+ },
33
+ addCommands() {
34
+ return {
35
+ setTitleId: (alignment) => ({ commands }) => {
36
+ return commands.updateAttributes('paragraph', { titleId: alignment })
37
+ },
38
+ unsetTitleId: () => ({ commands }) => {
39
+ return commands.resetAttributes('paragraph', 'titleId')
40
+ },
41
+ }
42
+ },
43
+ })
package/src/index.js CHANGED
@@ -81,7 +81,7 @@ function install(app) {
81
81
  }
82
82
 
83
83
  export default {
84
- version: '1.32.297',
84
+ version: '1.32.299',
85
85
  install,
86
86
  Calendar,
87
87
  Message,