form-driver 0.1.0 → 0.1.3
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/README.md +1 -0
- package/dist/m3.js +1 -1
- package/es/m3.js +65 -34
- package/lib/m3.js +65 -34
- package/package.json +12 -6
- package/src/framework/Schema.ts +3 -0
- package/src/ui/editor/basic/ARadio.tsx +1 -1
- package/src/ui/editor/basic/ARemoteSelector.tsx +17 -2
- package/src/ui/editor/basic/ASpecInputBox.tsx +11 -2
- package/src/ui/editor/complex/AArrayGrid.tsx +36 -26
- package/types/plugins/richtext/demo/src/TestForm.d.ts +5 -0
- package/types/plugins/richtext/demo/src/debug.d.ts +1 -0
- package/types/plugins/richtext/src/RichText.d.ts +17 -0
- package/types/plugins/richtext/src/RichType.d.ts +2 -0
- package/types/plugins/richtext/src/RichViewer.d.ts +4 -0
- package/types/plugins/richtext/src/index.d.ts +9 -0
- package/types/{framework → src/framework}/Ajax.d.ts +0 -0
- package/types/{framework → src/framework}/Assembly.d.ts +0 -0
- package/types/{framework → src/framework}/Init.d.ts +0 -0
- package/types/{framework → src/framework}/M3.d.ts +0 -0
- package/types/{framework → src/framework}/MContext.d.ts +0 -0
- package/types/{framework → src/framework}/MFieldViewer.d.ts +0 -0
- package/types/{framework → src/framework}/MUtil.d.ts +0 -1
- package/types/{framework → src/framework}/MViewer.d.ts +0 -0
- package/types/{framework → src/framework}/MViewerDebug.d.ts +0 -0
- package/types/{framework → src/framework}/Persistant.d.ts +0 -0
- package/types/{framework → src/framework}/Schema.d.ts +2 -1
- package/types/{framework → src/framework}/SchemaFunc.d.ts +0 -0
- package/types/{framework → src/framework}/Validator.d.ts +0 -0
- package/types/{framework → src/framework}/editorMap.d.ts +0 -0
- package/types/{index.d.ts → src/index.d.ts} +0 -0
- package/types/{types → src/types}/MArrayType.d.ts +0 -0
- package/types/{types → src/types}/MCascadeType.d.ts +0 -0
- package/types/{types → src/types}/MCnAddressType.d.ts +0 -0
- package/types/{types → src/types}/MDateRangeType.d.ts +0 -0
- package/types/{types → src/types}/MDateTimeType.d.ts +0 -0
- package/types/{types → src/types}/MDecorationType.d.ts +3 -3
- package/types/{types → src/types}/MEnumType.d.ts +0 -0
- package/types/{types → src/types}/MExperienceType.d.ts +0 -0
- package/types/{types → src/types}/MFloatType.d.ts +0 -0
- package/types/{types → src/types}/MGB2260Type.d.ts +0 -0
- package/types/{types → src/types}/MIntDiffType.d.ts +0 -0
- package/types/{types → src/types}/MIntType.d.ts +0 -0
- package/types/{types → src/types}/MKvSetType.d.ts +0 -0
- package/types/{types → src/types}/MMatrixType.d.ts +0 -0
- package/types/{types → src/types}/MObjectType.d.ts +0 -0
- package/types/{types → src/types}/MSetType.d.ts +0 -0
- package/types/{types → src/types}/MStringType.d.ts +0 -0
- package/types/{types → src/types}/MTelType.d.ts +0 -0
- package/types/{types → src/types}/MType.d.ts +0 -0
- package/types/{types → src/types}/MVLPairType.d.ts +0 -0
- package/types/{ui → src/ui}/BaseViewer.d.ts +0 -0
- package/types/{ui → src/ui}/editor/basic/ACascadePicker.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/ACheckBox.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/ADatetimePicker.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/AGB2260.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/AInputBox.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/AIntBox.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/AKvSet.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/ARadio.d.ts +1 -2
- package/types/{ui → src/ui}/editor/basic/ARangePicker.d.ts +0 -0
- package/types/{ui → src/ui}/editor/basic/ARate.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/ARemoteSelector.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/ASelector.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/ASetSelector.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/ASpecInputBox.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/ATreeSelect.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/AUpload.d.ts +0 -1
- package/types/{ui → src/ui}/editor/basic/NPS.d.ts +0 -1
- package/types/{ui → src/ui}/editor/complex/AArray.d.ts +0 -1
- package/types/{ui → src/ui}/editor/complex/AArrayGrid.d.ts +0 -1
- package/types/{ui → src/ui}/editor/complex/ACnAddress.d.ts +0 -1
- package/types/{ui → src/ui}/editor/complex/ADialogForm.d.ts +0 -1
- package/types/{ui → src/ui}/editor/complex/AExperience.d.ts +0 -1
- package/types/{ui → src/ui}/editor/complex/AForm.d.ts +0 -1
- package/types/{ui → src/ui}/editor/complex/AIntDiff.d.ts +0 -1
- package/types/{ui → src/ui}/editor/complex/AMatrix.d.ts +0 -1
- package/types/{ui → src/ui}/editor/complex/ATable.d.ts +0 -1
- package/types/{ui → src/ui}/editor/complex/JsonEditor.d.ts +0 -1
- package/types/{ui → src/ui}/readable/A.d.ts +0 -1
- package/types/{ui → src/ui}/readable/ArrayViewer.d.ts +0 -1
- package/types/{ui → src/ui}/readable/DecorationViewer.d.ts +0 -1
- package/types/{ui → src/ui}/readable/DivViewer.d.ts +0 -1
- package/types/{ui → src/ui}/widget/Collapsible.d.ts +0 -0
- package/types/{ui → src/ui}/widget/Segment.d.ts +0 -0
- package/types/{ui → src/ui}/widget/SegmentEditSwitch.d.ts +0 -1
- /package/types/{ui → src/ui}/widget/SelectBox.d.ts +0 -0
- /package/types/{ui → src/ui}/widget/UnderlineInputBox.d.ts +0 -0
- package/src/.DS_Store +0 -0
- package/src/ui/editor/.DS_Store +0 -0
- package/src/ui/editor/basic/.DS_Store +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "form-driver",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "An efficient framework for creating forms.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"authors": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"clean": "rimraf lib dist es coverage types",
|
|
13
13
|
"build": "rollup -c",
|
|
14
14
|
"b": "npm run clean && npm run build",
|
|
15
|
-
"i": "
|
|
15
|
+
"i": "yarn",
|
|
16
16
|
"ri": "rm -rf node_modules && npm run i",
|
|
17
17
|
"pub": "npm run b && npm version patch && npm publish && git push",
|
|
18
18
|
"patch": "npm version patch && npm publish && git push",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"docs:start": "cd docs && dumi dev",
|
|
26
26
|
"docs:build": "cd docs && dumi build",
|
|
27
27
|
"docs:upload": "cd docs && hp upload ./dist m3/ --free",
|
|
28
|
-
"docs:pub": "cd docs && npm run build && npm run upload"
|
|
28
|
+
"docs:pub": "cd docs && npm run build && npm run upload",
|
|
29
|
+
"update": "git add . && git commit -m 'update' && git push"
|
|
29
30
|
},
|
|
30
31
|
"keywords": [
|
|
31
32
|
"m3",
|
|
@@ -58,12 +59,11 @@
|
|
|
58
59
|
"@testing-library/jest-dom": "^5.11.4",
|
|
59
60
|
"@testing-library/react": "^11.1.0",
|
|
60
61
|
"@testing-library/user-event": "^12.1.10",
|
|
61
|
-
"antd": "^4.16.5",
|
|
62
|
-
"antd-mobile": "^2.3.4",
|
|
63
62
|
"lodash": "^4.17.20",
|
|
64
63
|
"moment": "^2.29.1",
|
|
65
64
|
"react": "^17.0.1",
|
|
66
|
-
"react-dom": "^17.0.1"
|
|
65
|
+
"react-dom": "^17.0.1",
|
|
66
|
+
"yarn": "^1.22.17"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@ant-design/tools": "^13.5.0-beta.1",
|
|
@@ -87,6 +87,8 @@
|
|
|
87
87
|
"@types/react": "^17.0.0",
|
|
88
88
|
"@types/react-dom": "^17.0.0",
|
|
89
89
|
"babel-core": "^7.0.0-0",
|
|
90
|
+
"antd": "^4.16.5",
|
|
91
|
+
"antd-mobile": "^2.3.4",
|
|
90
92
|
"babel-eslint": "^8.0.1",
|
|
91
93
|
"babel-jest": "^22.2.2",
|
|
92
94
|
"babel-loader": "^7.1.2",
|
|
@@ -126,6 +128,10 @@
|
|
|
126
128
|
"webpack-cli": "^3.1.0",
|
|
127
129
|
"webpack-dev-server": "^3.1.11"
|
|
128
130
|
},
|
|
131
|
+
"peerDependencies": {
|
|
132
|
+
"antd": "^4.16.5",
|
|
133
|
+
"antd-mobile": "^2.3.4"
|
|
134
|
+
},
|
|
129
135
|
"engines": {
|
|
130
136
|
"node": ">=v14.15.4"
|
|
131
137
|
}
|
package/src/framework/Schema.ts
CHANGED
|
@@ -14,7 +14,7 @@ const OPEN_ENUM_RADIO_VALUE = -1;
|
|
|
14
14
|
* 单选框,用于enum
|
|
15
15
|
* 支持开放选项。
|
|
16
16
|
* 定义示例:
|
|
17
|
-
* {label:"1.1 您的性别是", name:"gendar", type:"enum", option: [{label:"男", value:"M"},{label:"女", value:"F"}]
|
|
17
|
+
* {label:"1.1 您的性别是", name:"gendar", type:"enum", option: [{label:"男", value:"M"},{label:"女", value:"F"}]},
|
|
18
18
|
* {label:"1.1 您的性别是", name:"gendar", type:"enum", option:"男 女"},
|
|
19
19
|
*/
|
|
20
20
|
export class ARadio extends BaseViewer {
|
|
@@ -70,6 +70,13 @@ export class ARemoteSelector extends Viewer<State> {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
const p = this.props.schema.props ?? {};
|
|
73
|
+
const deepCloneP = _.cloneDeep(p)
|
|
74
|
+
const selfDisabled = p.disabled
|
|
75
|
+
delete deepCloneP.disabled
|
|
76
|
+
const selfOnChange = p.onChange
|
|
77
|
+
delete deepCloneP.onChange
|
|
78
|
+
|
|
79
|
+
|
|
73
80
|
return <Select
|
|
74
81
|
key={this.props.path}
|
|
75
82
|
showSearch
|
|
@@ -102,13 +109,21 @@ export class ARemoteSelector extends Viewer<State> {
|
|
|
102
109
|
else super.changeValue(null);
|
|
103
110
|
break;
|
|
104
111
|
}
|
|
112
|
+
selfOnChange && selfOnChange(v)
|
|
105
113
|
}}
|
|
106
|
-
{...
|
|
114
|
+
{...deepCloneP}
|
|
107
115
|
>
|
|
108
116
|
{
|
|
109
117
|
this.state.candidate?.map(d => {
|
|
110
118
|
const v = MUtil.get(d, this.props.schema.remote.valuePath);
|
|
111
|
-
return
|
|
119
|
+
return (
|
|
120
|
+
<Select.Option
|
|
121
|
+
key={v}
|
|
122
|
+
value={v}
|
|
123
|
+
disabled={d[selfDisabled]}
|
|
124
|
+
>
|
|
125
|
+
{labelExpr(d, this.props.schema.remote)}
|
|
126
|
+
</Select.Option>)
|
|
112
127
|
})
|
|
113
128
|
}
|
|
114
129
|
</Select>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import _ from "lodash"
|
|
2
3
|
import { Input } from "antd";
|
|
3
4
|
import { BaseViewer } from '../../BaseViewer';
|
|
4
5
|
|
|
@@ -9,12 +10,20 @@ import { BaseViewer } from '../../BaseViewer';
|
|
|
9
10
|
export class ASpecInputBox extends BaseViewer {
|
|
10
11
|
element() {
|
|
11
12
|
const p = this.props.schema.props ?? {};
|
|
13
|
+
const deepCloneP = _.cloneDeep(p)
|
|
14
|
+
const selfOnChange = p.onChange
|
|
15
|
+
delete deepCloneP.onChange
|
|
16
|
+
|
|
12
17
|
return <Input
|
|
13
18
|
{...super.antProp()}
|
|
14
19
|
defaultValue={super.getValue()}
|
|
15
20
|
onBlur={() => this.changeValueEx(super.getValue(), false, true)}
|
|
16
|
-
onChange={(v) =>
|
|
17
|
-
|
|
21
|
+
onChange={(v) => {
|
|
22
|
+
this.changeValueEx(v.target.value, false, false);
|
|
23
|
+
selfOnChange && selfOnChange(v)
|
|
24
|
+
}}
|
|
25
|
+
{...deepCloneP}
|
|
18
26
|
/>;
|
|
19
27
|
}
|
|
20
28
|
}
|
|
29
|
+
|
|
@@ -20,18 +20,18 @@ export class AArrayGrid extends BaseViewer {
|
|
|
20
20
|
element() {
|
|
21
21
|
const schema = this.props.schema;
|
|
22
22
|
|
|
23
|
-
if(!schema.arrayMember) {
|
|
23
|
+
if (!schema.arrayMember) {
|
|
24
24
|
return MUtil.error("arrayMember未定义", schema);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const members = schema.arrayMember.objectFields // 成员是复杂结构
|
|
28
|
-
|| [{name:undefined, ...schema.arrayMember}]; // 成员是简单结构
|
|
28
|
+
|| [{ name: undefined, ...schema.arrayMember }]; // 成员是简单结构
|
|
29
29
|
// if(!members) {
|
|
30
30
|
// return MUtil.error("AArrayGrid只适用于对象数组", schema);
|
|
31
31
|
// }
|
|
32
32
|
|
|
33
33
|
let data = super.getValue();
|
|
34
|
-
if(!_.isArray(data)){ // 只接受数组
|
|
34
|
+
if (!_.isArray(data)) { // 只接受数组
|
|
35
35
|
data = [];
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -40,70 +40,80 @@ export class AArrayGrid extends BaseViewer {
|
|
|
40
40
|
//let headTh = [<td key=":操作栏" width="40px" align="center" style={{backgroundImage: "linear-gradient(to bottom left, transparent calc(50% - 1px), #d3d3d3, transparent calc(50% + 1px))"}}></td>]
|
|
41
41
|
|
|
42
42
|
let rows = [];
|
|
43
|
-
for(let idx = 0; idx < data.length; idx
|
|
43
|
+
for (let idx = 0; idx < data.length; idx++) {
|
|
44
44
|
const i = idx;
|
|
45
45
|
rows.push(<tr key={i}>
|
|
46
46
|
{/* 各个字段 */}
|
|
47
47
|
{
|
|
48
|
-
members.map((f,idx)=>
|
|
48
|
+
members.map((f, idx) =>
|
|
49
49
|
<td key={f.name + idx}>
|
|
50
|
-
<MFieldViewer key={this.state.ctrlVersion + "." + f.name} parent={schema} morph={this.props.morph} schema={f} database={data} path={MUtil.jsonPath("[" + i + "]", f.name)} hideBorder={true} afterChange={(path, v, final):void => {
|
|
50
|
+
<MFieldViewer key={this.state.ctrlVersion + "." + f.name} parent={schema} morph={this.props.morph} schema={f} database={data} path={MUtil.jsonPath("[" + i + "]", f.name)} hideBorder={true} afterChange={(path, v, final): void => {
|
|
51
51
|
super.changeValueEx(data, false, final);
|
|
52
|
-
}}/>
|
|
52
|
+
}} />
|
|
53
53
|
</td>)
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
{/* 操作栏 */}
|
|
57
57
|
<td key=":option" align="center">
|
|
58
|
-
<CaretUpOutlined style={{display: "block"}}
|
|
59
|
-
if(i === 0){
|
|
58
|
+
<CaretUpOutlined style={{ display: "block" }} hidden={data.length <= 1} onClick={() => {
|
|
59
|
+
if (i === 0) {
|
|
60
60
|
message.warn("已经到顶了");
|
|
61
61
|
} else {
|
|
62
|
-
const prev = data[i-1];
|
|
63
|
-
data[i-1] = data[i];
|
|
62
|
+
const prev = data[i - 1];
|
|
63
|
+
data[i - 1] = data[i];
|
|
64
64
|
data[i] = prev;
|
|
65
65
|
super.changeValueEx(data, true, true);
|
|
66
66
|
}
|
|
67
|
-
}}/>
|
|
67
|
+
}} />
|
|
68
68
|
<Popconfirm
|
|
69
69
|
title="确定要删除吗这一项吗?"
|
|
70
|
-
onConfirm={()=>{
|
|
71
|
-
data.splice(i,1);
|
|
70
|
+
onConfirm={() => {
|
|
71
|
+
data.splice(i, 1);
|
|
72
72
|
super.changeValueEx(data, true, true);
|
|
73
73
|
}}
|
|
74
74
|
okText="删除"
|
|
75
75
|
cancelText="不删">
|
|
76
|
-
<CloseOutlined style={{display: "block"}} hidden={
|
|
76
|
+
<CloseOutlined style={{ display: "block" }} hidden={data.length == (schema.min ?? 0)} />
|
|
77
77
|
</Popconfirm>
|
|
78
|
-
<CaretDownOutlined style={{display: "block"}} hidden={data.length <= 1} onClick={()=>{
|
|
79
|
-
if(i === data.length - 1){
|
|
78
|
+
<CaretDownOutlined style={{ display: "block" }} hidden={data.length <= 1} onClick={() => {
|
|
79
|
+
if (i === data.length - 1) {
|
|
80
80
|
message.warn("已经到底了");
|
|
81
81
|
} else {
|
|
82
|
-
const prev = data[i+1];
|
|
83
|
-
data[i+1] = data[i];
|
|
82
|
+
const prev = data[i + 1];
|
|
83
|
+
data[i + 1] = data[i];
|
|
84
84
|
data[i] = prev;
|
|
85
85
|
super.changeValueEx(data, true, true);
|
|
86
86
|
}
|
|
87
|
-
}}/>
|
|
87
|
+
}} />
|
|
88
88
|
</td>
|
|
89
89
|
</tr>);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
const isMax = data.length >= (schema.max ?? Number.MAX_VALUE);
|
|
93
93
|
return (
|
|
94
|
-
<table key={this.props.path} className="AExperience M3_table" style={{width: "100%"}}><tbody>
|
|
94
|
+
<table key={this.props.path} className="AExperience M3_table" style={{ width: "100%" }}><tbody>
|
|
95
95
|
<tr key=":header">
|
|
96
|
-
{members.map((f,i)
|
|
96
|
+
{members.map((f, i) => <th key={f.name + i + ":first"}>{f.label ?? f.name}</th>)}
|
|
97
97
|
<td key=":操作栏" width="40px" align="center"></td>
|
|
98
98
|
</tr>
|
|
99
99
|
{rows}
|
|
100
100
|
<tr key=":footer">
|
|
101
101
|
{/* 增加按钮 */}
|
|
102
102
|
<th key=":add" colSpan={cols}>
|
|
103
|
-
<Button disabled={isMax}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
)
|
|
103
|
+
<Button disabled={isMax} key=":add" onClick={() => {
|
|
104
|
+
let newItem = assembly.types[schema.arrayMember.type]?.createDefaultValue(assembly, schema.arrayMember)
|
|
105
|
+
{/* 新增时支持要带入上一项的数据 */}
|
|
106
|
+
if (schema.arrayMember.copyFields && data.length > 0) {
|
|
107
|
+
const last = data[data.length - 1]
|
|
108
|
+
if (last) {
|
|
109
|
+
newItem = {}
|
|
110
|
+
schema.arrayMember.copyFields.forEach(item => {
|
|
111
|
+
newItem[item] = last[item]
|
|
112
|
+
})
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
data.push(newItem);
|
|
116
|
+
console.log('data', data)
|
|
107
117
|
super.changeValue(data);
|
|
108
118
|
}}>增加一项</Button>
|
|
109
119
|
{this.props.extra}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function injectTestCookie(): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import './RichText.less';
|
|
2
|
+
import 'quill/dist/quill.snow.css';
|
|
3
|
+
import { Viewer, ViewerState } from 'form-driver';
|
|
4
|
+
interface State extends ViewerState {
|
|
5
|
+
quillEditorId: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 基于 Quill 封装的富文本输入框
|
|
9
|
+
*/
|
|
10
|
+
export declare class RichText extends Viewer<State> {
|
|
11
|
+
private _quill;
|
|
12
|
+
private options;
|
|
13
|
+
constructor(p: any);
|
|
14
|
+
componentDidMount(): void;
|
|
15
|
+
element(): JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { MORPH, VIEWER, Assembly } from './Assembly';
|
|
3
2
|
export declare type ValueConst = string | boolean | number;
|
|
4
3
|
export interface MEnumField {
|
|
@@ -116,6 +115,8 @@ export interface MFieldSchema {
|
|
|
116
115
|
};
|
|
117
116
|
/** 数组成员类型 */
|
|
118
117
|
arrayMember?: MFieldSchemaAnonymity;
|
|
118
|
+
/** 组件 AArrayGrid 新增时指定带下来的字段 */
|
|
119
|
+
copyFields?: string[];
|
|
119
120
|
/** 数组增加一项的按钮文案 */
|
|
120
121
|
arrayAddLabel?: string;
|
|
121
122
|
/** experience类型配置 */
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** HTML装饰物,并不修改数据 */
|
|
2
2
|
export declare const MDecorationType: {
|
|
3
3
|
validators: any[];
|
|
4
|
-
createDefaultValue: (assembly: import("..").Assembly, s: Pick<import("..").MFieldSchema, "type" | "label" | "editor" | "readable" | "option" | "enumFields" | "setFields" | "openOption" | "enumOpen" | "setOpen" | "defaultValue" | "props" | "stringLines" | "min" | "max" | "required" | "showIf" | "column" | "toReadable" | "tolerate" | "screenAdaption" | "postfix" | "popoverDesc" | "requiredMessage" | "placeholder" | "objectFields" | "objectLabelFields" | "stringAllowSpaceOnly" | "matrix" | "arrayMember" | "arrayAddLabel" | "experience" | "dateRange" | "dataFormat" | "intDiff" | "css" | "removeConfirm" | "mcs" | "uispec" | "hpOrg" | "ossFile" | "decoration" | "remote" | "a" | "style" | "layoutHint" | "options" | "bizData">) => any;
|
|
5
|
-
standardValue: (assembly: import("..").Assembly, s: Pick<import("..").MFieldSchema, "type" | "label" | "editor" | "readable" | "option" | "enumFields" | "setFields" | "openOption" | "enumOpen" | "setOpen" | "defaultValue" | "props" | "stringLines" | "min" | "max" | "required" | "showIf" | "column" | "toReadable" | "tolerate" | "screenAdaption" | "postfix" | "popoverDesc" | "requiredMessage" | "placeholder" | "objectFields" | "objectLabelFields" | "stringAllowSpaceOnly" | "matrix" | "arrayMember" | "arrayAddLabel" | "experience" | "dateRange" | "dataFormat" | "intDiff" | "css" | "removeConfirm" | "mcs" | "uispec" | "hpOrg" | "ossFile" | "decoration" | "remote" | "a" | "style" | "layoutHint" | "options" | "bizData">, v: any, strict: boolean) => any;
|
|
6
|
-
toReadable: (assembly: import("..").Assembly, s: Pick<import("..").MFieldSchema, "type" | "label" | "editor" | "readable" | "option" | "enumFields" | "setFields" | "openOption" | "enumOpen" | "setOpen" | "defaultValue" | "props" | "stringLines" | "min" | "max" | "required" | "showIf" | "column" | "toReadable" | "tolerate" | "screenAdaption" | "postfix" | "popoverDesc" | "requiredMessage" | "placeholder" | "objectFields" | "objectLabelFields" | "stringAllowSpaceOnly" | "matrix" | "arrayMember" | "arrayAddLabel" | "experience" | "dateRange" | "dataFormat" | "intDiff" | "css" | "removeConfirm" | "mcs" | "uispec" | "hpOrg" | "ossFile" | "decoration" | "remote" | "a" | "style" | "layoutHint" | "options" | "bizData">, vs: any) => string;
|
|
4
|
+
createDefaultValue: (assembly: import("..").Assembly, s: Pick<import("..").MFieldSchema, "type" | "label" | "editor" | "readable" | "option" | "enumFields" | "setFields" | "openOption" | "enumOpen" | "setOpen" | "defaultValue" | "props" | "stringLines" | "min" | "max" | "required" | "showIf" | "column" | "toReadable" | "tolerate" | "screenAdaption" | "postfix" | "popoverDesc" | "requiredMessage" | "placeholder" | "objectFields" | "objectLabelFields" | "stringAllowSpaceOnly" | "matrix" | "arrayMember" | "copyFields" | "arrayAddLabel" | "experience" | "dateRange" | "dataFormat" | "intDiff" | "css" | "removeConfirm" | "mcs" | "uispec" | "hpOrg" | "ossFile" | "decoration" | "remote" | "a" | "style" | "layoutHint" | "options" | "bizData">) => any;
|
|
5
|
+
standardValue: (assembly: import("..").Assembly, s: Pick<import("..").MFieldSchema, "type" | "label" | "editor" | "readable" | "option" | "enumFields" | "setFields" | "openOption" | "enumOpen" | "setOpen" | "defaultValue" | "props" | "stringLines" | "min" | "max" | "required" | "showIf" | "column" | "toReadable" | "tolerate" | "screenAdaption" | "postfix" | "popoverDesc" | "requiredMessage" | "placeholder" | "objectFields" | "objectLabelFields" | "stringAllowSpaceOnly" | "matrix" | "arrayMember" | "copyFields" | "arrayAddLabel" | "experience" | "dateRange" | "dataFormat" | "intDiff" | "css" | "removeConfirm" | "mcs" | "uispec" | "hpOrg" | "ossFile" | "decoration" | "remote" | "a" | "style" | "layoutHint" | "options" | "bizData">, v: any, strict: boolean) => any;
|
|
6
|
+
toReadable: (assembly: import("..").Assembly, s: Pick<import("..").MFieldSchema, "type" | "label" | "editor" | "readable" | "option" | "enumFields" | "setFields" | "openOption" | "enumOpen" | "setOpen" | "defaultValue" | "props" | "stringLines" | "min" | "max" | "required" | "showIf" | "column" | "toReadable" | "tolerate" | "screenAdaption" | "postfix" | "popoverDesc" | "requiredMessage" | "placeholder" | "objectFields" | "objectLabelFields" | "stringAllowSpaceOnly" | "matrix" | "arrayMember" | "copyFields" | "arrayAddLabel" | "experience" | "dateRange" | "dataFormat" | "intDiff" | "css" | "removeConfirm" | "mcs" | "uispec" | "hpOrg" | "ossFile" | "decoration" | "remote" | "a" | "style" | "layoutHint" | "options" | "bizData">, vs: any) => string;
|
|
7
7
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { BaseViewer } from '../../BaseViewer';
|
|
3
2
|
/**
|
|
4
3
|
* 单选框,用于enum
|
|
5
4
|
* 支持开放选项。
|
|
6
5
|
* 定义示例:
|
|
7
|
-
* {label:"1.1 您的性别是", name:"gendar", type:"enum", option: [{label:"男", value:"M"},{label:"女", value:"F"}]
|
|
6
|
+
* {label:"1.1 您的性别是", name:"gendar", type:"enum", option: [{label:"男", value:"M"},{label:"女", value:"F"}]},
|
|
8
7
|
* {label:"1.1 您的性别是", name:"gendar", type:"enum", option:"男 女"},
|
|
9
8
|
*/
|
|
10
9
|
export declare class ARadio extends BaseViewer {
|
|
File without changes
|