@hailin-zheng/editor-core 2.1.3 → 2.1.4
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 +5 -4
- package/index-cjs.js.map +1 -1
- package/index.js +5 -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');
|
@@ -28560,7 +28561,7 @@ class DocEditor {
|
|
28560
28561
|
if (!dataEle.isValid(currVal)) {
|
28561
28562
|
currVal = '';
|
28562
28563
|
}
|
28563
|
-
return calendar.render(position, currVal);
|
28564
|
+
return calendar.render(position, currVal, dataEle.props.format);
|
28564
28565
|
}
|
28565
28566
|
calendar.reset();
|
28566
28567
|
return null;
|
@@ -28624,7 +28625,7 @@ class DocEditor {
|
|
28624
28625
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
28625
28626
|
}
|
28626
28627
|
version() {
|
28627
|
-
return "2.1.
|
28628
|
+
return "2.1.4";
|
28628
28629
|
}
|
28629
28630
|
}
|
28630
28631
|
|