zydx-plus 1.35.523 → 1.35.524

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.35.523",
3
+ "version": "1.35.524",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -28,7 +28,7 @@ export function butJson(editor, data) {
28
28
  key: 'switchingFormat',
29
29
  menuKeys: [
30
30
  {
31
- name: '自由排版',
31
+ name: '自由版式',
32
32
  key: 'freeTypesetting',
33
33
  menuKeys: [],
34
34
  html: ''
@@ -37,22 +37,22 @@ export function butJson(editor, data) {
37
37
  name: '图书版式',
38
38
  key: 'bookLayout',
39
39
  menuKeys: [],
40
- html: `<p data-signid="subject" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color:#000;line-height: 1;">请在此处输入一级标题</span></strong></p>
40
+ html: `<p data-signid="title-1" class="title bookLayout1" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color:#000;line-height: 1;">请在此处输入一级标题</span></strong></p>
41
41
  <p data-signid="text" class="text"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
42
- <p data-signid="title-1" style="text-align: center;" class="title ${randomId()}"><strong><span style="font-size: 20px; font-family: SimHei; color:#000">一、请在此处输入一级标题</span></strong></p>
42
+ <p data-signid="title-2" style="text-align: center;" class="title ${randomId()} bookLayout2"><strong><span style="font-size: 20px; font-family: SimHei; color:#000">一、请在此处输入一级标题</span></strong></p>
43
43
  <p data-signid="text" class="text"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
44
- <p data-signid="title-2" class="title ${randomId()} indent"><strong><span style="font-size: 16px; font-family: SimHei; color:#000">(一)请在此处输入二级标题</span></strong></p>
44
+ <p data-signid="title-3" class="title ${randomId()}"><strong><span style="font-size: 16px; font-family: SimHei; color:#000">(一)请在此处输入二级标题</span></strong></p>
45
45
  <p data-signid="text" class="text"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>`
46
46
  },
47
47
  {
48
48
  name: '公文版式',
49
49
  key: 'officialDocumentFormat',
50
50
  menuKeys: [],
51
- html: `<p style="text-align: center"><span style="font-size: 36px; color: rgb(225, 60, 57)">请在此输入红头名称</span></p>
51
+ html: `<p style="text-align: center"><span style="font-size: 48px; color: rgb(225, 60, 57)">请在此输入红头名称</span></p>
52
52
  <p data-signid="red" style="text-align: center"><span style="font-size: 16px; color: rgb(0, 0, 0)">请在此输入文件号xxx[xxx]xxxx号</span></p>
53
53
  <p contenteditable="false" class="solid"></p>
54
54
  <p data-signid="subject" style="text-align: center;margin: 80px 0 60px"><strong><span style="font-size: 24px; font-family: SimHei; color:#333333;line-height: 1;">请在此处输入标题</span></strong></p>
55
- <p data-signid="lookUp"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入抬头:</span></strong></p>
55
+ <p data-signid="lookUp"><strong><span style="font-size: 18px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入抬头:</span></strong></p>
56
56
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
57
57
  <p data-signid="title-1" style="text-align: center;" class="title ${randomId()}"><strong><span style="font-size: 18px; font-family: SimHei; color:#333333">一、请在此处输入一级标题</span></strong></p>
58
58
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
@@ -135,7 +135,7 @@ export function butJson(editor, data) {
135
135
  name: '抬&nbsp;&nbsp;&nbsp;头',
136
136
  key: 'lookUp',
137
137
  menuKeys: [],
138
- html: `<p data-signId="lookUp"><span style="color: rgb(0, 0, 0);font-size: 16px; font-family:SimHei;font-weight: 700;">请在此处输入抬头:</span><span> </span></p>`
138
+ html: `<p data-signId="lookUp"><span style="color: rgb(0, 0, 0);font-size: 18px; font-family:SimHei;font-weight: 700;">请在此处输入抬头:</span><span> </span></p>`
139
139
  },
140
140
  {
141
141
  name: '摘&nbsp;&nbsp;&nbsp;要',
@@ -231,7 +231,7 @@ export function butJson(editor, data) {
231
231
  name: '红&nbsp;&nbsp;&nbsp;头',
232
232
  key: 'redMenu',
233
233
  menuKeys: [],
234
- html: `<p style="text-align: center"><span style="font-size: 36px; color: rgb(225, 60, 57)">请在此输入红头名称</span></p><p data-signid="red" style="text-align: center"><span style="font-size: 16px; color: rgb(0, 0, 0)">请在此输入文件号xxx[xxx]xxxx号</span></p>`
234
+ html: `<p style="text-align: center"><span style="font-size: 48px; color: rgb(225, 60, 57)">请在此输入红头名称</span></p><p data-signid="red" style="text-align: center"><span style="font-size: 16px; color: rgb(0, 0, 0)">请在此输入文件号xxx[xxx]xxxx号</span></p>`
235
235
  },
236
236
  firstLevelHeading: {
237
237
  name: '一级标题',
@@ -840,7 +840,7 @@ export default {
840
840
  <p data-signid="red" style="text-align: center"><span style="font-size: 16px; color: rgb(0, 0, 0)">请在此输入文件号xxx[xxx]xxxx号</span></p>
841
841
  <p contenteditable="false" class="solid"></p>
842
842
  <p data-signid="subject" style="text-align: center;margin: 80px 0 60px"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);line-height: 1;">请在此处输入标题</span></strong></p>
843
- <p data-signid="lookUp"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入抬头:</span></strong></p>
843
+ <p data-signid="lookUp"><strong><span style="font-size: 18px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入抬头:</span></strong></p>
844
844
  <p class="indent"><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
845
845
  <p data-signid="title-1" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
846
846
  <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
@@ -1544,8 +1544,8 @@ export default {
1544
1544
  const html = htmlFormat.filter(item => item.key === this.templateType)[0].html
1545
1545
  this.editor.chain().setContent(html).run()
1546
1546
  this.toolbar = [
1547
- 'switchingFormat', 'signMenu', 'pageMargin', 'firstLevelHeading',
1548
- 'secondaryHeading', 'paragraphBody', 'paragraphMenu', 'alignmentMode',
1547
+ 'switchingFormat', 'signMenu', 'pageMargin', 'outlineMenu',
1548
+ 'paragraphMenu', 'alignmentMode',
1549
1549
  'titleMenu', 'color', 'interposition']
1550
1550
  this.organizeButton()
1551
1551
  this.interpositionData = []
@@ -1556,8 +1556,8 @@ export default {
1556
1556
  const html = htmlFormat.filter(item => item.key === this.templateType)[0].html
1557
1557
  this.editor.chain().setContent(html).run()
1558
1558
  this.toolbar = [
1559
- 'switchingFormat', 'signMenu', 'pageMargin', 'firstLevelHeading',
1560
- 'secondaryHeading', 'paragraphBody', 'ackMenu', 'paragraphMenu', 'alignmentMode',
1559
+ 'switchingFormat', 'signMenu', 'pageMargin', 'outlineMenu',
1560
+ 'ackMenu', 'paragraphMenu', 'alignmentMode',
1561
1561
  'titleMenu', 'color', 'interposition']
1562
1562
  this.organizeButton()
1563
1563
  this.interpositionData = []
@@ -2947,13 +2947,35 @@ export default {
2947
2947
  this.toolbar.forEach(item => {
2948
2948
  let obj = butJson(this.editor, this.menusText)[item.key === undefined ? item : item.key]
2949
2949
  if (obj) {
2950
- if (this.templateType === 'bookLayout' && obj.key === 'outlineMenu') {
2951
- obj.menuKeys = [
2952
- {name: '一级标题', key: 'title-1'},
2953
- {name: '二级标题', key: 'title-2'},
2954
- {name: '三级标题', key: 'title-3'},
2955
- // {name: '四级标题', key: 'title-4'},
2956
- {name: '正文文本', key: 'text'},]
2950
+ if (obj.key === 'outlineMenu') {
2951
+ if(this.templateType === 'bookLayout'||this.templateType === 'freeTypesetting'){
2952
+ obj.menuKeys = [
2953
+ {name: '一级标题', key: 'title-1'},
2954
+ {name: '二级标题', key: 'title-2'},
2955
+ {name: '三级标题', key: 'title-3'},
2956
+ // {name: '四级标题', key: 'title-4'},
2957
+ {name: '正文文本', key: 'text'},]
2958
+ }
2959
+ if(this.templateType === 'newsFormat'||this.templateType === 'paperFormat'){
2960
+ obj.menuKeys = [
2961
+ {
2962
+ name: '文章标题',
2963
+ key: 'subjectMenu',
2964
+ menuKeys: [],
2965
+ html: `<p data-signid="subject" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: #333333;">请在此处输入标题</span></strong></p>`
2966
+ },
2967
+ {
2968
+ name: '作者',
2969
+ key: 'authorMenu',
2970
+ menuKeys: [],
2971
+ html: `<p data-signid="author" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0);">请在此处输入作者/来源</span></p>`
2972
+ },
2973
+ {name: '一级标题', key: 'title-1'},
2974
+ {name: '二级标题', key: 'title-2'},
2975
+ // {name: '三级标题', key: 'title-3'},
2976
+ // {name: '四级标题', key: 'title-4'},
2977
+ {name: '正文文本', key: 'text'},]
2978
+ }
2957
2979
  this.butData.push(obj)
2958
2980
  return
2959
2981
  }
@@ -3351,6 +3373,28 @@ export default {
3351
3373
  // 大纲级别
3352
3374
  if (data.key === 'outlineMenu') {
3353
3375
  const menusHtml = butJson(this.editor, this.menusText)[data.key].menuKeys
3376
+ if (this.templateType === 'newsFormat'||this.templateType === 'paperFormat'){
3377
+ const level = key.key.split('-')[1]
3378
+ // 一级标题
3379
+ if (level === '1') {
3380
+ const html = butJson(this.editor, this.menusText)['firstLevelHeading'].html
3381
+ this.editor.chain().focus().insertContentAt(this.selection(), html).run()
3382
+ this.$emit('changeOutlineMenu', this.changeOutlineMenu())
3383
+ }
3384
+ // 二级标题
3385
+ if (level === '2') {
3386
+ const html = butJson(this.editor, this.menusText)['secondaryHeading'].html
3387
+ this.editor.chain().focus().insertContentAt(this.selection(), html).run()
3388
+ this.$emit('changeOutlineMenu', this.changeOutlineMenu())
3389
+ }
3390
+ // 正文
3391
+ if (key.key === 'text') {
3392
+ const html = butJson(this.editor, this.menusText)['paragraphBody'].html
3393
+ this.editor.chain().focus().insertContentAt(this.selection(), html).run()
3394
+ }
3395
+ return
3396
+ }
3397
+
3354
3398
  // 题目
3355
3399
  if (key.key === 'subjectMenu') {
3356
3400
  const html = menusHtml.filter(item => item.key == key.key)[0].html
@@ -3381,6 +3425,27 @@ export default {
3381
3425
  if (r === -1) this.editor.chain().focus().insertContentAt(this.selectionPath('subject'), html).run()
3382
3426
  return
3383
3427
  }
3428
+ let sizeObj1 = {
3429
+ freeTypesetting:{size:'18px',color:'#000000',margin:'0 0 20px 0',textAlign:'left',bold:true},
3430
+ bookLayout:{size:'24px',color:'#333333',margin:'0 0 40px 0',textAlign:'center',bold:true},
3431
+ paperFormat:{size:'20px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3432
+ officialDocumentFormat:{size:'18px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3433
+ newsFormat:{size:'18px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3434
+ }
3435
+ let sizeObj2 = {
3436
+ freeTypesetting:{size:'16px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3437
+ bookLayout:{size:'20px',color:'#000000',margin:'0 0 20px 0',textAlign:'center',bold:true},
3438
+ paperFormat:{size:'18px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3439
+ officialDocumentFormat:{size:'16px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3440
+ newsFormat:{size:'16px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3441
+ }
3442
+ let sizeObj3 = {
3443
+ freeTypesetting:{size:'14px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3444
+ bookLayout:{size:'16px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3445
+ paperFormat:{size:'16px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3446
+ officialDocumentFormat:{size:'14px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3447
+ newsFormat:{size:'14px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3448
+ }
3384
3449
  if (key.key === 'text') {
3385
3450
  this.editor.commands.setNode('paragraph', {class: 'indent'})
3386
3451
  this.editor.commands.setTitleId(key.key)
@@ -3389,31 +3454,37 @@ export default {
3389
3454
  } else {
3390
3455
  const t = key.key.split('-')[0]
3391
3456
  const level = key.key.split('-')[1]
3392
- let size = this.templateType === 'bookLayout' ? '24px' : '18px'
3393
- let color = this.templateType === 'bookLayout' ? '#000000' : '#333333'
3394
3457
  if (level === '1') {
3395
- this.editor.commands.setNode('paragraph', {class: ''})
3458
+ let obj1 = sizeObj1[this.templateType]
3459
+ // this.editor.commands.setNode('paragraph', {class:{}})
3396
3460
  this.editor.commands.setTitleId(`${t} ${this.randomId()}`)
3397
3461
  this.editor.commands.setSignId(key.key)
3398
- this.editor.chain().setBold().setFontSize(size).setColor(color).setTextAlign('center').focus().run()
3462
+ if(this.templateType==='bookLayout'){
3463
+ this.editor.commands.setTitleId(`${t} ${this.randomId()} bookLayout1`)
3464
+ this.editor.chain().setBold().setFontSize(obj1.size).setColor(obj1.color).setTextAlign(obj1.textAlign).focus().run()
3465
+ return
3466
+ }
3467
+ if (obj1.margin==='0px'){
3468
+ this.editor.chain().setBold().setFontSize(obj1.size).setColor(obj1.color).setTextAlign(obj1.textAlign).focus().run()
3469
+ return
3470
+ }
3471
+ this.editor.chain().setBold().setFontSize(obj1.size).setColor(obj1.color).setTextAlign(obj1.textAlign).setMargin(obj1.margin).focus().run()
3399
3472
  } else if (level === '2') {
3400
- size = this.templateType === 'bookLayout' ? '20px' : '16px'
3401
- color = this.templateType === 'bookLayout' ? '#000000' : '#333333'
3402
- let align = this.templateType === 'bookLayout' ? 'center' : 'left'
3473
+ this.editor.commands.setNode('paragraph', {class: ''})
3474
+ let obj2 = sizeObj2[this.templateType]
3403
3475
  this.editor.commands.setSignId(key.key)
3404
3476
  if (this.templateType === 'bookLayout') {
3405
- this.editor.commands.setNode('paragraph', {class: ''})
3406
- this.editor.commands.setTitleId(`${t} ${this.randomId()}`)
3477
+ this.editor.commands.setTitleId(`${t} ${this.randomId()} bookLayout2`)
3407
3478
  } else {
3408
- this.editor.commands.setTitleId(`${t} ${this.randomId()} indent`)
3479
+ this.editor.commands.setTitleId(`${t} ${this.randomId()}`)
3409
3480
  }
3410
- this.editor.chain().setBold().setFontSize(size).setColor(color).setTextAlign(align).focus().run()
3481
+ this.editor.chain().setBold().setFontSize(obj2.size).setColor(obj2.color).setTextAlign(obj2.textAlign).focus().run()
3411
3482
  } else {
3412
- size = this.templateType === 'bookLayout' ? '16px' : '14px'
3413
- color = this.templateType === 'bookLayout' ? '#000000' : '#333333'
3483
+ this.editor.commands.setNode('paragraph', {class: ''})
3484
+ let obj3 = sizeObj3[this.templateType]
3414
3485
  this.editor.commands.setSignId(key.key)
3415
- this.editor.commands.setTitleId(`${t} ${this.randomId()} indent`)
3416
- this.editor.chain().setBold().setFontSize(size).setColor(color).setTextAlign('left').focus().run()
3486
+ this.editor.commands.setTitleId(`${t} ${this.randomId()}`)
3487
+ this.editor.chain().setBold().setFontSize(obj3.size).setColor(obj3.color).setTextAlign(obj3.textAlign).focus().run()
3417
3488
  }
3418
3489
  }
3419
3490
  this.$emit('changeOutlineMenu', this.changeOutlineMenu())
@@ -4329,7 +4400,7 @@ export default {
4329
4400
  }
4330
4401
 
4331
4402
  :deep(p[data-signid="subject"]) {
4332
- padding-bottom: 5px;
4403
+ padding-bottom: 2px;
4333
4404
  }
4334
4405
 
4335
4406
  :deep(.author) {
@@ -4559,6 +4630,7 @@ li {
4559
4630
  margin: 10px;
4560
4631
  max-height: 900px;
4561
4632
  overflow: auto;
4633
+ border: 1px solid #ccc;
4562
4634
  }
4563
4635
 
4564
4636
  .editor-content::-webkit-scrollbar {
@@ -4591,7 +4663,7 @@ li {
4591
4663
  position: relative;
4592
4664
  display: flex;
4593
4665
  align-items: center;
4594
- border: 1px solid #CCCCCC;
4666
+ /*border: 1px solid #CCCCCC;*/
4595
4667
  }
4596
4668
 
4597
4669
  .editing-cont {
@@ -5146,4 +5218,10 @@ li {
5146
5218
  :deep(.drag-down2){
5147
5219
  height: 20px;
5148
5220
  }
5221
+ :deep(.bookLayout1){
5222
+ margin-bottom: 40px;
5223
+ }
5224
+ :deep(.bookLayout2){
5225
+ margin-bottom: 20px;
5226
+ }
5149
5227
  </style>
@@ -88,12 +88,18 @@
88
88
  <div class="cal" v-if="item.type === 'calender'">
89
89
  <input type="text" :placeholder="item.placeholder" @focus="focus" :maxlength="item.maxlength"
90
90
  v-model="item.value" :disabled="item.disabled"/>
91
- <Calendar v-if="tip" style="top: 35px;" @confirm="confirm($event,item)"></Calendar>
91
+ <div class="empty" @click="emptyCal($event,item)">
92
+ <svg t="1747276919145" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4844" width="15" height="15"><path d="M511.333 127.333c51.868 0 102.15 10.144 149.451 30.15 45.719 19.337 86.792 47.034 122.078 82.321 35.287 35.286 62.983 76.359 82.321 122.078 20.006 47.3 30.15 97.583 30.15 149.451s-10.144 102.15-30.15 149.451c-19.337 45.719-47.034 86.792-82.321 122.078-35.286 35.287-76.359 62.983-122.078 82.321-47.3 20.006-97.583 30.15-149.451 30.15s-102.15-10.144-149.451-30.15c-45.719-19.337-86.792-47.034-122.078-82.321-35.287-35.286-62.983-76.359-82.321-122.078-20.006-47.3-30.15-97.583-30.15-149.451s10.144-102.15 30.15-149.451c19.337-45.719 47.034-86.792 82.321-122.078 35.286-35.287 76.359-62.983 122.078-82.321 47.301-20.006 97.583-30.15 149.451-30.15m0-64c-247.424 0-448 200.576-448 448s200.576 448 448 448 448-200.576 448-448-200.576-448-448-448z" fill="#999999" p-id="4845"></path><path d="M557.254 512l147.373-147.373c12.497-12.497 12.497-32.758 0-45.255-12.496-12.497-32.758-12.497-45.254 0L512 466.746 364.627 319.373c-12.497-12.497-32.758-12.497-45.255 0s-12.497 32.758 0 45.255L466.746 512 319.373 659.373c-12.497 12.496-12.497 32.758 0 45.254C325.621 710.876 333.811 714 342 714s16.379-3.124 22.627-9.373L512 557.254l147.373 147.373C665.621 710.876 673.811 714 682 714s16.379-3.124 22.627-9.373c12.497-12.496 12.497-32.758 0-45.254L557.254 512z" fill="#999999" p-id="4846"></path></svg>
93
+ </div>
94
+ <Calendar v-if="tip" style="top: 35px;" @cancel="cancelCal" @confirm="confirm($event,item)"></Calendar>
92
95
  </div>
93
96
  <div class="cal" v-if="item.type === 'calenderYear'">
94
97
  <input type="text" :placeholder="item.placeholder" @focus="focusYear" :maxlength="item.maxlength"
95
98
  v-model="item.value" :disabled="item.disabled"/>
96
- <Year v-if="tipYear" style="top: 35px;" @confirm="confirmYear($event,item)"></Year>
99
+ <div class="empty" @click="emptyYear($event,item)">
100
+ <svg t="1747276919145" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4844" width="15" height="15"><path d="M511.333 127.333c51.868 0 102.15 10.144 149.451 30.15 45.719 19.337 86.792 47.034 122.078 82.321 35.287 35.286 62.983 76.359 82.321 122.078 20.006 47.3 30.15 97.583 30.15 149.451s-10.144 102.15-30.15 149.451c-19.337 45.719-47.034 86.792-82.321 122.078-35.286 35.287-76.359 62.983-122.078 82.321-47.3 20.006-97.583 30.15-149.451 30.15s-102.15-10.144-149.451-30.15c-45.719-19.337-86.792-47.034-122.078-82.321-35.287-35.286-62.983-76.359-82.321-122.078-20.006-47.3-30.15-97.583-30.15-149.451s10.144-102.15 30.15-149.451c19.337-45.719 47.034-86.792 82.321-122.078 35.286-35.287 76.359-62.983 122.078-82.321 47.301-20.006 97.583-30.15 149.451-30.15m0-64c-247.424 0-448 200.576-448 448s200.576 448 448 448 448-200.576 448-448-200.576-448-448-448z" fill="#999999" p-id="4845"></path><path d="M557.254 512l147.373-147.373c12.497-12.497 12.497-32.758 0-45.255-12.496-12.497-32.758-12.497-45.254 0L512 466.746 364.627 319.373c-12.497-12.497-32.758-12.497-45.255 0s-12.497 32.758 0 45.255L466.746 512 319.373 659.373c-12.497 12.496-12.497 32.758 0 45.254C325.621 710.876 333.811 714 342 714s16.379-3.124 22.627-9.373L512 557.254l147.373 147.373C665.621 710.876 673.811 714 682 714s16.379-3.124 22.627-9.373c12.497-12.496 12.497-32.758 0-45.254L557.254 512z" fill="#999999" p-id="4846"></path></svg>
101
+ </div>
102
+ <Year v-if="tipYear" style="top: 35px;" @cancel="cancelYear" @confirm="confirmYear($event,item)"></Year>
97
103
  </div>
98
104
  <div v-if="item.type === 'text'" class="text" v-html="item.value"></div>
99
105
  <div v-if="item.type === 'code'" class="ph-code">
@@ -335,18 +341,44 @@ export default {
335
341
  data.value = e
336
342
  this.tipYear = false
337
343
  },
344
+ cancelYear() {
345
+ this.tipYear = false
346
+ },
338
347
  focus() {
339
348
  this.tip = true
340
349
  },
341
350
  confirm(e, data) {
342
351
  data.value = e.start
343
352
  this.tip = false
344
- }
353
+ },
354
+ emptyCal(e,data) {
355
+ data.value = ''
356
+ this.tip = true
357
+ this.tip = false
358
+ },
359
+ emptyYear(e,data) {
360
+ data.value = ''
361
+ this.tip = true
362
+ this.tip = false
363
+ },
364
+ cancelCal() {
365
+ this.tip = false
366
+ },
345
367
  }
346
368
  }
347
369
  </script>
348
370
 
349
371
  <style scoped>
372
+ .cal{
373
+ position: relative;
374
+ }
375
+ .empty{
376
+ position: absolute;
377
+ top: 8px;
378
+ right: 5px;
379
+ z-index: 1;
380
+ cursor: pointer;
381
+ }
350
382
  :deep(.text) {
351
383
  padding:0 10px;
352
384
  }
package/src/index.js CHANGED
@@ -89,7 +89,7 @@ function install(app) {
89
89
  }
90
90
 
91
91
  export default {
92
- version: '1.35.523',
92
+ version: '1.35.524',
93
93
  install,
94
94
  Calendar,
95
95
  Message,