amis 1.6.1 → 1.6.2
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/lib/SchemaRenderer.js +6 -3
- package/lib/SchemaRenderer.js.map +2 -2
- package/lib/actions/CmptAction.js +1 -1
- package/lib/actions/CmptAction.js.map +2 -2
- package/lib/components/Card.d.ts +20 -20
- package/lib/components/CodeMirror.d.ts +0 -1
- package/lib/components/CodeMirror.js +0 -1
- package/lib/components/CodeMirror.js.map +2 -2
- package/lib/components/DatePicker.d.ts +0 -1
- package/lib/components/DatePicker.js +9 -9
- package/lib/components/DatePicker.js.map +2 -2
- package/lib/components/RichText.d.ts +0 -2
- package/lib/components/RichText.js +0 -3
- package/lib/components/RichText.js.map +2 -2
- package/lib/components/Tinymce.d.ts +0 -1
- package/lib/components/Tinymce.js +1 -1
- package/lib/components/Tinymce.js.map +2 -2
- package/lib/components/condition-builder/Group.d.ts +1 -0
- package/lib/components/condition-builder/Group.js +7 -7
- package/lib/components/condition-builder/Group.js.map +2 -2
- package/lib/components/condition-builder/GroupOrItem.d.ts +1 -0
- package/lib/components/condition-builder/GroupOrItem.js +2 -2
- package/lib/components/condition-builder/GroupOrItem.js.map +2 -2
- package/lib/components/condition-builder/index.d.ts +1 -0
- package/lib/components/condition-builder/index.js +2 -2
- package/lib/components/condition-builder/index.js.map +2 -2
- package/lib/env.d.ts +2 -1
- package/lib/env.js.map +2 -2
- package/lib/factory.js +6 -2
- package/lib/factory.js.map +2 -2
- package/lib/index.js +1 -1
- package/lib/renderers/Form/InputCity.d.ts +84 -84
- package/lib/renderers/Form/InputImage.d.ts +0 -1
- package/lib/renderers/Form/InputImage.js +1 -1
- package/lib/renderers/Form/InputImage.js.map +2 -2
- package/lib/renderers/Pagination.js +2 -2
- package/lib/renderers/Pagination.js.map +2 -2
- package/lib/renderers/Video.d.ts +0 -1
- package/lib/renderers/Video.js +0 -2
- package/lib/renderers/Video.js.map +2 -2
- package/lib/themes/ang-ie11.css +10412 -0
- package/lib/themes/ang.css +10412 -0
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +10412 -0
- package/lib/themes/antd.css +10412 -0
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +10412 -0
- package/lib/themes/cxd.css +10412 -0
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +10412 -0
- package/lib/themes/dark.css +10412 -0
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default.css +10412 -0
- package/lib/themes/default.css.map +1 -1
- package/package.json +2 -2
- package/scss/_thirds.scss +7 -0
- package/scss/components/_condition-builder.scss +11 -0
- package/scss/themes/_common.scss +2 -0
- package/sdk/ang-ie11.css +12165 -12187
- package/sdk/ang.css +15347 -15369
- package/sdk/antd-ie11.css +12165 -12187
- package/sdk/antd.css +15489 -15511
- package/sdk/charts.js +17 -17
- package/sdk/codemirror.js +7 -7
- package/sdk/color-picker.js +69 -65
- package/sdk/cropperjs.js +3 -3
- package/sdk/cxd-ie11.css +12165 -12187
- package/sdk/cxd.css +15347 -15369
- package/sdk/dark-ie11.css +12165 -12187
- package/sdk/dark.css +15432 -15454
- package/sdk/exceljs.js +1 -1
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +1 -1
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +16 -20
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk-ie11.css +12165 -12187
- package/sdk/sdk.css +15347 -15369
- package/sdk/sdk.js +1270 -1342
- package/sdk/thirds/hls.js/hls.js +18 -18
- package/sdk/thirds/mpegts.js/mpegts.js +2 -2
- package/sdk/tinymce.js +57 -57
- package/src/SchemaRenderer.tsx +9 -3
- package/src/actions/CmptAction.ts +1 -1
- package/src/components/CodeMirror.tsx +1 -1
- package/src/components/DatePicker.tsx +63 -50
- package/src/components/RichText.tsx +2 -2
- package/src/components/Tinymce.tsx +1 -1
- package/src/components/condition-builder/Group.tsx +59 -42
- package/src/components/condition-builder/GroupOrItem.tsx +8 -1
- package/src/components/condition-builder/index.tsx +4 -1
- package/src/env.tsx +4 -1
- package/src/factory.tsx +8 -3
- package/src/renderers/Form/InputImage.tsx +1 -1
- package/src/renderers/Pagination.tsx +2 -2
- package/src/renderers/Video.tsx +1 -1
package/src/SchemaRenderer.tsx
CHANGED
@@ -85,7 +85,7 @@ class BroadcastCmpt extends React.Component<BroadcastCmptProps> {
|
|
85
85
|
e: React.MouseEvent<any>,
|
86
86
|
data: any
|
87
87
|
): Promise<RendererEvent<any> | undefined> {
|
88
|
-
return await this.props.env.dispatchEvent(e, this.ref, data);
|
88
|
+
return await this.props.env.dispatchEvent(e, this.ref, this.context, data);
|
89
89
|
}
|
90
90
|
|
91
91
|
@autobind
|
@@ -99,13 +99,19 @@ class BroadcastCmpt extends React.Component<BroadcastCmptProps> {
|
|
99
99
|
|
100
100
|
render() {
|
101
101
|
const {component: Component, ...rest} = this.props;
|
102
|
-
|
102
|
+
|
103
|
+
const isClassComponent = Component.prototype?.isReactComponent;
|
104
|
+
|
105
|
+
// 函数组件不支持 ref https://reactjs.org/docs/refs-and-the-dom.html#refs-and-function-components
|
106
|
+
|
107
|
+
return isClassComponent ? (
|
103
108
|
<Component
|
104
109
|
ref={this.childRef}
|
105
110
|
{...rest}
|
106
|
-
scoped={this.context}
|
107
111
|
dispatchEvent={this.triggerEvent}
|
108
112
|
/>
|
113
|
+
) : (
|
114
|
+
<Component {...rest} dispatchEvent={this.triggerEvent} />
|
109
115
|
);
|
110
116
|
}
|
111
117
|
}
|
@@ -24,7 +24,7 @@ export class CmptAction implements Action {
|
|
24
24
|
// 根据唯一ID查找指定组件
|
25
25
|
const component =
|
26
26
|
renderer.props.$schema.id !== action.componentId
|
27
|
-
?
|
27
|
+
? event.context.scoped?.getComponentById(action.componentId)
|
28
28
|
: renderer;
|
29
29
|
|
30
30
|
// 执行组件动作
|
@@ -14,7 +14,7 @@ import Overlay from './Overlay';
|
|
14
14
|
import {ClassNamesFn, themeable, ThemeProps} from '../theme';
|
15
15
|
import {PlainObject} from '../types';
|
16
16
|
import Calendar from './calendar/Calendar';
|
17
|
-
import 'react-datetime/css/react-datetime.css';
|
17
|
+
// import 'react-datetime/css/react-datetime.css';
|
18
18
|
import {localeable, LocaleProps, TranslateFn} from '../locale';
|
19
19
|
import {isMobile, ucFirst} from '../utils/helper';
|
20
20
|
import CalendarMobile from './CalendarMobile';
|
@@ -581,25 +581,36 @@ export class DatePicker extends React.Component<DateProps, DatePickerState> {
|
|
581
581
|
const isOpened = this.state.isOpened;
|
582
582
|
let date: moment.Moment | undefined = this.state.value;
|
583
583
|
|
584
|
-
const calendarMobile =
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
584
|
+
const calendarMobile = (
|
585
|
+
<CalendarMobile
|
586
|
+
isDatePicker={true}
|
587
|
+
timeFormat={timeFormat}
|
588
|
+
inputFormat={inputFormat}
|
589
|
+
startDate={date}
|
590
|
+
defaultDate={date}
|
591
|
+
minDate={minDate}
|
592
|
+
maxDate={maxDate}
|
593
|
+
dateFormat={dateFormat}
|
594
|
+
embed={embed}
|
595
|
+
viewMode={viewMode}
|
596
|
+
close={this.close}
|
597
|
+
confirm={this.handleChange}
|
598
|
+
footerExtra={this.renderShortCuts(shortcuts)}
|
599
|
+
showViewMode={
|
600
|
+
viewMode === 'quarters' || viewMode === 'months' ? 'years' : 'months'
|
601
|
+
}
|
602
|
+
timeConstraints={timeConstraints}
|
603
|
+
/>
|
604
|
+
);
|
605
|
+
const CalendarMobileTitle = (
|
606
|
+
<div className={`${ns}CalendarMobile-title`}>
|
607
|
+
{__('Calendar.datepicker')}
|
608
|
+
</div>
|
609
|
+
);
|
610
|
+
const useCalendarMobile =
|
611
|
+
useMobileUI &&
|
612
|
+
isMobile() &&
|
613
|
+
['days', 'months', 'quarters'].indexOf(viewMode) > -1;
|
603
614
|
|
604
615
|
if (embed) {
|
605
616
|
let schedulesData: DateProps['schedules'] = undefined;
|
@@ -736,8 +747,8 @@ export class DatePicker extends React.Component<DateProps, DatePickerState> {
|
|
736
747
|
</Overlay>
|
737
748
|
) : null}
|
738
749
|
{useMobileUI && isMobile() ? (
|
739
|
-
mobileCalendarMode === 'calendar' && useCalendarMobile
|
740
|
-
|
750
|
+
mobileCalendarMode === 'calendar' && useCalendarMobile ? (
|
751
|
+
<PopUp
|
741
752
|
isShow={isOpened}
|
742
753
|
className={cx(`${ns}CalendarMobile-pop`)}
|
743
754
|
onHide={this.close}
|
@@ -745,34 +756,36 @@ export class DatePicker extends React.Component<DateProps, DatePickerState> {
|
|
745
756
|
>
|
746
757
|
{calendarMobile}
|
747
758
|
</PopUp>
|
748
|
-
:
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
759
|
+
) : (
|
760
|
+
<PopUp
|
761
|
+
className={cx(`${ns}DatePicker-popup DatePicker-mobile`)}
|
762
|
+
container={popOverContainer}
|
763
|
+
isShow={isOpened}
|
764
|
+
showClose={false}
|
765
|
+
onHide={this.handleClick}
|
766
|
+
>
|
767
|
+
{this.renderShortCuts(shortcuts)}
|
768
|
+
|
769
|
+
<Calendar
|
770
|
+
value={date}
|
771
|
+
onChange={this.handleChange}
|
772
|
+
requiredConfirm={!!(dateFormat && timeFormat)}
|
773
|
+
dateFormat={dateFormat}
|
774
|
+
inputFormat={inputFormat}
|
775
|
+
timeFormat={timeFormat}
|
776
|
+
isValidDate={this.checkIsValidDate}
|
777
|
+
viewMode={viewMode}
|
778
|
+
timeConstraints={timeConstraints}
|
779
|
+
input={false}
|
780
|
+
onClose={this.close}
|
781
|
+
locale={locale}
|
782
|
+
minDate={minDate}
|
783
|
+
maxDate={maxDate}
|
784
|
+
useMobileUI={useMobileUI}
|
785
|
+
// utc={utc}
|
786
|
+
/>
|
787
|
+
</PopUp>
|
788
|
+
)
|
776
789
|
) : null}
|
777
790
|
</div>
|
778
791
|
);
|
@@ -42,8 +42,8 @@ import 'froala-editor/js/plugins/word_paste.min';
|
|
42
42
|
import 'froala-editor/js/languages/zh_cn.js';
|
43
43
|
|
44
44
|
// Require Editor CSS files.
|
45
|
-
import 'froala-editor/css/froala_style.min.css';
|
46
|
-
import 'froala-editor/css/froala_editor.pkgd.min.css';
|
45
|
+
// import 'froala-editor/css/froala_style.min.css';
|
46
|
+
// import 'froala-editor/css/froala_editor.pkgd.min.css';
|
47
47
|
|
48
48
|
export interface FroalaEditorComponentProps {
|
49
49
|
config: any;
|
@@ -6,7 +6,7 @@ import tinymce from 'tinymce/tinymce';
|
|
6
6
|
// A theme is also required
|
7
7
|
import 'tinymce/icons/default/index';
|
8
8
|
import 'tinymce/themes/silver';
|
9
|
-
import 'tinymce/skins/ui/oxide/skin.css';
|
9
|
+
// import 'tinymce/skins/ui/oxide/skin.css';
|
10
10
|
|
11
11
|
// Any plugins you want to use has to be imported
|
12
12
|
import 'tinymce/plugins/advlist';
|
@@ -9,6 +9,7 @@ import {Icon} from '../icons';
|
|
9
9
|
import {localeable, LocaleProps} from '../../locale';
|
10
10
|
|
11
11
|
export interface ConditionGroupProps extends ThemeProps, LocaleProps {
|
12
|
+
builderMode?: 'simple' | 'full';
|
12
13
|
config: Config;
|
13
14
|
value?: ConditionGroupValue;
|
14
15
|
fields: Fields;
|
@@ -114,6 +115,7 @@ export class ConditionGroup extends React.Component<ConditionGroupProps> {
|
|
114
115
|
|
115
116
|
render() {
|
116
117
|
const {
|
118
|
+
builderMode,
|
117
119
|
classnames: cx,
|
118
120
|
fieldClassName,
|
119
121
|
value,
|
@@ -129,55 +131,64 @@ export class ConditionGroup extends React.Component<ConditionGroupProps> {
|
|
129
131
|
searchable,
|
130
132
|
translate: __
|
131
133
|
} = this.props;
|
132
|
-
|
133
134
|
return (
|
134
135
|
<div className={cx('CBGroup')} data-group-id={value?.id}>
|
135
136
|
<div className={cx('CBGroup-toolbar')}>
|
136
|
-
|
137
|
-
{
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
<
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
137
|
+
{builderMode === 'simple' ? null : (
|
138
|
+
<div className={cx('CBGroup-toolbarCondition')}>
|
139
|
+
{showNot ? (
|
140
|
+
<Button
|
141
|
+
onClick={this.handleNotClick}
|
142
|
+
className="m-r-xs"
|
143
|
+
size="xs"
|
144
|
+
active={value?.not}
|
145
|
+
disabled={disabled}
|
146
|
+
>
|
147
|
+
{__('Condition.not')}
|
148
|
+
</Button>
|
149
|
+
) : null}
|
150
|
+
<div className={cx('ButtonGroup')}>
|
151
|
+
<Button
|
152
|
+
size="xs"
|
153
|
+
onClick={this.handleConjunctionClick}
|
154
|
+
active={value?.conjunction !== 'or'}
|
155
|
+
disabled={disabled}
|
156
|
+
>
|
157
|
+
{__('Condition.and')}
|
158
|
+
</Button>
|
159
|
+
<Button
|
160
|
+
size="xs"
|
161
|
+
onClick={this.handleConjunctionClick}
|
162
|
+
active={value?.conjunction === 'or'}
|
163
|
+
disabled={disabled}
|
164
|
+
>
|
165
|
+
{__('Condition.or')}
|
166
|
+
</Button>
|
167
|
+
</div>
|
165
168
|
</div>
|
166
|
-
|
167
|
-
<div
|
169
|
+
)}
|
170
|
+
<div
|
171
|
+
className={cx(
|
172
|
+
`CBGroup-toolbarConditionAdd${
|
173
|
+
builderMode === 'simple' ? '-simple' : ''
|
174
|
+
}`
|
175
|
+
)}
|
176
|
+
>
|
168
177
|
<div className={cx('ButtonGroup')}>
|
169
178
|
<Button onClick={this.handleAdd} size="xs" disabled={disabled}>
|
170
179
|
<Icon icon="plus" className="icon" />
|
171
180
|
{__('Condition.add_cond')}
|
172
181
|
</Button>
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
182
|
+
{builderMode === 'simple' ? null : (
|
183
|
+
<Button
|
184
|
+
onClick={this.handleAddGroup}
|
185
|
+
size="xs"
|
186
|
+
disabled={disabled}
|
187
|
+
>
|
188
|
+
<Icon icon="plus-cicle" className="icon" />
|
189
|
+
{__('Condition.add_cond_group')}
|
190
|
+
</Button>
|
191
|
+
)}
|
181
192
|
</div>
|
182
193
|
</div>
|
183
194
|
{removeable ? (
|
@@ -186,7 +197,6 @@ export class ConditionGroup extends React.Component<ConditionGroupProps> {
|
|
186
197
|
</a>
|
187
198
|
) : null}
|
188
199
|
</div>
|
189
|
-
|
190
200
|
<div className={cx('CBGroup-body')}>
|
191
201
|
{Array.isArray(value?.children) && value!.children.length ? (
|
192
202
|
value!.children.map((item, index) => (
|
@@ -205,10 +215,17 @@ export class ConditionGroup extends React.Component<ConditionGroupProps> {
|
|
205
215
|
data={data}
|
206
216
|
disabled={disabled}
|
207
217
|
searchable={searchable}
|
218
|
+
builderMode={builderMode}
|
208
219
|
/>
|
209
220
|
))
|
210
221
|
) : (
|
211
|
-
<div
|
222
|
+
<div
|
223
|
+
className={cx(
|
224
|
+
`CBGroup-placeholder ${
|
225
|
+
builderMode === 'simple' ? 'simple' : ''
|
226
|
+
}`
|
227
|
+
)}
|
228
|
+
>
|
212
229
|
{__('Condition.blank')}
|
213
230
|
</div>
|
214
231
|
)}
|
@@ -8,6 +8,7 @@ import ConditionGroup from './Group';
|
|
8
8
|
import ConditionItem from './Item';
|
9
9
|
|
10
10
|
export interface CBGroupOrItemProps extends ThemeProps {
|
11
|
+
builderMode?: 'simple' | 'full';
|
11
12
|
config: Config;
|
12
13
|
value?: ConditionGroupValue;
|
13
14
|
fields: Fields;
|
@@ -37,6 +38,7 @@ export class CBGroupOrItem extends React.Component<CBGroupOrItemProps> {
|
|
37
38
|
|
38
39
|
render() {
|
39
40
|
const {
|
41
|
+
builderMode,
|
40
42
|
classnames: cx,
|
41
43
|
fieldClassName,
|
42
44
|
value,
|
@@ -51,7 +53,12 @@ export class CBGroupOrItem extends React.Component<CBGroupOrItemProps> {
|
|
51
53
|
} = this.props;
|
52
54
|
|
53
55
|
return (
|
54
|
-
<div
|
56
|
+
<div
|
57
|
+
className={cx(
|
58
|
+
`CBGroupOrItem${builderMode === 'simple' ? '-simple' : ''}`
|
59
|
+
)}
|
60
|
+
data-id={value?.id}
|
61
|
+
>
|
55
62
|
<div className={cx('CBGroupOrItem-body')}>
|
56
63
|
{draggable ? (
|
57
64
|
<a
|
@@ -17,6 +17,7 @@ import {findDOMNode} from 'react-dom';
|
|
17
17
|
import animtion from '../../utils/Animation';
|
18
18
|
|
19
19
|
export interface ConditionBuilderProps extends ThemeProps, LocaleProps {
|
20
|
+
builderMode?: 'simple' | 'full'; // 简单模式|完整模式
|
20
21
|
fields: Fields;
|
21
22
|
funcs?: Funcs;
|
22
23
|
showNot?: boolean;
|
@@ -203,7 +204,8 @@ export class QueryBuilder extends React.Component<ConditionBuilderProps> {
|
|
203
204
|
showNot,
|
204
205
|
data,
|
205
206
|
disabled,
|
206
|
-
searchable
|
207
|
+
searchable,
|
208
|
+
builderMode
|
207
209
|
} = this.props;
|
208
210
|
|
209
211
|
const normalizedValue = Array.isArray(value?.children)
|
@@ -224,6 +226,7 @@ export class QueryBuilder extends React.Component<ConditionBuilderProps> {
|
|
224
226
|
|
225
227
|
return (
|
226
228
|
<ConditionGroup
|
229
|
+
builderMode={builderMode}
|
227
230
|
config={this.config}
|
228
231
|
funcs={funcs || this.config.funcs}
|
229
232
|
fields={fields || this.config.fields}
|
package/src/env.tsx
CHANGED
@@ -11,6 +11,7 @@ import {
|
|
11
11
|
RendererEventListener,
|
12
12
|
EventListeners
|
13
13
|
} from './utils/renderer-event';
|
14
|
+
import {IScopedContext} from './Scoped';
|
14
15
|
|
15
16
|
export interface RendererEnv {
|
16
17
|
fetcher: (api: Api, data?: any, options?: object) => Promise<Payload>;
|
@@ -73,7 +74,9 @@ export interface RendererEnv {
|
|
73
74
|
| React.TransitionEvent<any>
|
74
75
|
| React.MouseEvent<any>,
|
75
76
|
context: any,
|
76
|
-
|
77
|
+
scoped: IScopedContext,
|
78
|
+
data: any,
|
79
|
+
broadcast?: RendererEvent<any>
|
77
80
|
) => Promise<RendererEvent<any> | undefined>;
|
78
81
|
rendererEventListeners: RendererEventListener[];
|
79
82
|
[propName: string]: any;
|
package/src/factory.tsx
CHANGED
@@ -23,7 +23,7 @@ import {
|
|
23
23
|
PlainObject
|
24
24
|
} from './types';
|
25
25
|
import {observer} from 'mobx-react';
|
26
|
-
import Scoped from './Scoped';
|
26
|
+
import Scoped, {IScopedContext} from './Scoped';
|
27
27
|
import {getTheme, ThemeInstance, ThemeProps} from './theme';
|
28
28
|
import find from 'lodash/find';
|
29
29
|
import Alert from './components/Alert2';
|
@@ -360,6 +360,9 @@ const defaultOptions: RenderOptions = {
|
|
360
360
|
tracker(eventTrack: EventTrack, props: PlainObject) {},
|
361
361
|
// 返回解绑函数
|
362
362
|
bindEvent(renderer: any) {
|
363
|
+
if (!renderer) {
|
364
|
+
return undefined;
|
365
|
+
}
|
363
366
|
const listeners: EventListeners = renderer.props.$schema.onEvent;
|
364
367
|
if (listeners) {
|
365
368
|
// 暂存
|
@@ -384,8 +387,9 @@ const defaultOptions: RenderOptions = {
|
|
384
387
|
async dispatchEvent(
|
385
388
|
e: string | React.MouseEvent<any>,
|
386
389
|
renderer: React.Component<RendererProps>,
|
390
|
+
scoped: IScopedContext,
|
387
391
|
data: any,
|
388
|
-
broadcast
|
392
|
+
broadcast?: RendererEvent<any>
|
389
393
|
) {
|
390
394
|
const eventName = typeof e === 'string' ? e : e.type;
|
391
395
|
if (!broadcast) {
|
@@ -408,7 +412,8 @@ const defaultOptions: RenderOptions = {
|
|
408
412
|
createRendererEvent(eventName, {
|
409
413
|
env: this,
|
410
414
|
nativeEvent: e,
|
411
|
-
data
|
415
|
+
data,
|
416
|
+
scoped
|
412
417
|
});
|
413
418
|
|
414
419
|
// 过滤&排序
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, {Suspense} from 'react';
|
2
2
|
import {FormItem, FormControlProps, FormBaseControl} from './Item';
|
3
|
-
import 'cropperjs/dist/cropper.css';
|
3
|
+
// import 'cropperjs/dist/cropper.css';
|
4
4
|
const Cropper = React.lazy(() => import('react-cropper'));
|
5
5
|
import DropZone from 'react-dropzone';
|
6
6
|
import {FileRejection} from 'react-dropzone';
|
@@ -280,9 +280,9 @@ export default class Pagination extends React.Component<
|
|
280
280
|
}
|
281
281
|
|
282
282
|
render() {
|
283
|
-
const {
|
283
|
+
const {builderMode} = this.props;
|
284
284
|
|
285
|
-
return
|
285
|
+
return builderMode === 'simple' ? this.renderSimple() : this.renderNormal();
|
286
286
|
}
|
287
287
|
}
|
288
288
|
|
package/src/renderers/Video.tsx
CHANGED
@@ -18,7 +18,7 @@ import {Renderer, RendererProps} from '../factory';
|
|
18
18
|
import {resolveVariable} from '../utils/tpl-builtin';
|
19
19
|
import {filter} from '../utils/tpl';
|
20
20
|
// import css
|
21
|
-
import 'video-react/dist/video-react.css';
|
21
|
+
// import 'video-react/dist/video-react.css';
|
22
22
|
import {BaseSchema, SchemaClassName, SchemaUrlPath} from '../Schema';
|
23
23
|
|
24
24
|
/**
|