this.handleClear()} />
@@ -1025,6 +1037,39 @@ class RbFormDateTime extends RbFormElement {
}
}
+class RbFormTime extends RbFormDateTime {
+ constructor(props) {
+ super(props)
+ this._icon = 'time'
+ }
+
+ onEditModeChanged(destroy) {
+ if (destroy) {
+ super.onEditModeChanged(destroy)
+ } else if (!this.props.readonly) {
+ const format = (this.props.timeFormat || 'hh:ii:ss').replace('mm', 'ii').toLowerCase()
+ const minView = format.length === 2 ? 1 : 0
+
+ const that = this
+ this.__datetimepicker = $(this._fieldValue)
+ .datetimepicker({
+ format: format,
+ startView: 1,
+ minView: minView,
+ maxView: 1,
+ pickerPosition: this._getAutoPosition(),
+ title: $L('选择时间'),
+ })
+ .on('changeDate', function () {
+ const val = $(this).val()
+ that.handleChange({ target: { value: val } }, true)
+ })
+
+ $(this._fieldValue__icon).on('click', () => this.__datetimepicker.datetimepicker('show'))
+ }
+ }
+}
+
class RbFormImage extends RbFormElement {
constructor(props) {
super(props)
@@ -1371,7 +1416,8 @@ class RbFormReference extends RbFormElement {
componentWillUnmount() {
super.componentWillUnmount()
- if (this._ReferenceSearcher) {
+
+ if (this._ReferenceSearcher && !this._hasCascadingField) {
this._ReferenceSearcher.destroy()
this._ReferenceSearcher = null
}
@@ -1715,7 +1761,7 @@ class RbFormBool extends RbFormElement {