lu-lowcode-package-form 0.10.89 → 0.11.1
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/package.json +1 -1
- package/src/App.jsx +25 -1
- package/src/utils/formula.js +2 -4
package/package.json
CHANGED
package/src/App.jsx
CHANGED
@@ -196,9 +196,33 @@ function App() {
|
|
196
196
|
|
197
197
|
<FormContainerWrapper cols={cols} className="" ref={formRef} >
|
198
198
|
|
199
|
+
<Field.WithSingleSelect
|
200
|
+
ref={testRef}
|
201
|
+
request={async (params) => {
|
202
|
+
return {
|
203
|
+
code: 0, data: {
|
204
|
+
list:
|
205
|
+
[
|
206
|
+
{ label: '选项1', value: '1', routeType: 1 },
|
207
|
+
{ label: '选项2', value: '2' , routeType:2 },
|
208
|
+
{ label: '选项3', value: '3' }
|
209
|
+
]
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}}
|
213
|
+
option_label="label"
|
214
|
+
option_value="value"
|
215
|
+
fillRules={[
|
216
|
+
{
|
217
|
+
"id": "636d3924-0298-4e9b-809a-26d4a10d7b19",
|
218
|
+
"type": 0,
|
219
|
+
"source": "routeType",
|
220
|
+
"target": "routeType",
|
221
|
+
},
|
222
|
+
|
223
|
+
]} label="类型填充" __id="fill_routeType" />
|
199
224
|
<Field.RadioGroup
|
200
225
|
buttonStyle="solid"
|
201
|
-
optionType="button"
|
202
226
|
label="菜单类型"
|
203
227
|
__id="routeType"
|
204
228
|
options={[{ label: "菜单分组", value: 999 }, { label: "URL", value: 1 }, { label: "绑定表单", value: 2 }]} />
|
package/src/utils/formula.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
// 不安全的
|
1
|
+
// 不安全的Function函数,有时间的话需要重新编写公式编译器
|
2
|
+
// 可以使用库 expr-eval 来替换(undo)
|
2
3
|
const evalFormula =(formula) => {
|
3
4
|
let result = "";
|
4
5
|
let funcCode = "";
|
@@ -17,6 +18,3 @@ const evalFormula =(formula) => {
|
|
17
18
|
};
|
18
19
|
|
19
20
|
export {evalFormula};
|
20
|
-
|
21
|
-
|
22
|
-
|