@hailin-zheng/editor-core 2.1.3 → 2.1.5
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/index-cjs.js +6 -4
- package/index-cjs.js.map +1 -1
- package/index.js +6 -4
- package/index.js.map +1 -1
- package/med_editor/framework/editor-calendar-vnode.d.ts +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -26398,9 +26398,10 @@ class EditorCalendarVNode {
|
|
26398
26398
|
this.currTime.value = null;
|
26399
26399
|
this.selectedTime.value = null;
|
26400
26400
|
}
|
26401
|
-
render(position, dataValue) {
|
26401
|
+
render(position, dataValue, format = 'YYYY-MM-DD HH:mm:ss') {
|
26402
|
+
format = format ?? 'YYYY-MM-DD HH:mm:ss';
|
26402
26403
|
if (!this.currentDate && dataValue) {
|
26403
|
-
const currDataValue = moment(dataValue);
|
26404
|
+
const currDataValue = moment(dataValue, format);
|
26404
26405
|
this.currYear.value = currDataValue.year();
|
26405
26406
|
this.currMonth.value = currDataValue.month();
|
26406
26407
|
this.selectedDate.value = currDataValue.format('YYYY-MM-DD');
|
@@ -28077,6 +28078,7 @@ class DocEditor {
|
|
28077
28078
|
const index = docRender.getIndex();
|
28078
28079
|
const cursorPos = DocumentCursor.getElementCursorPos(ele, 0, region, index);
|
28079
28080
|
//this.selectionState.resetRange(element, 0);
|
28081
|
+
this.documentEvent.mousedownPos = cursorPos.rect;
|
28080
28082
|
this.scrollToPosition(cursorPos.rect);
|
28081
28083
|
}
|
28082
28084
|
}
|
@@ -28560,7 +28562,7 @@ class DocEditor {
|
|
28560
28562
|
if (!dataEle.isValid(currVal)) {
|
28561
28563
|
currVal = '';
|
28562
28564
|
}
|
28563
|
-
return calendar.render(position, currVal);
|
28565
|
+
return calendar.render(position, currVal, dataEle.props.format);
|
28564
28566
|
}
|
28565
28567
|
calendar.reset();
|
28566
28568
|
return null;
|
@@ -28624,7 +28626,7 @@ class DocEditor {
|
|
28624
28626
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
28625
28627
|
}
|
28626
28628
|
version() {
|
28627
|
-
return "2.1.
|
28629
|
+
return "2.1.5";
|
28628
28630
|
}
|
28629
28631
|
}
|
28630
28632
|
|