|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
/* |
|
|
|
|
* @Author: 卜启缘 |
|
|
|
|
* @Date: 2021-05-04 05:36:58 |
|
|
|
|
* @LastEditTime: 2021-07-13 17:14:12 |
|
|
|
|
* @LastEditTime: 2021-07-14 10:31:10 |
|
|
|
|
* @LastEditors: 卜启缘 |
|
|
|
|
* @Description: 表单项类型 - 输入框 |
|
|
|
|
* @FilePath: \vite-vue3-lowcode\src\packages\base-widgets\input\index.tsx |
|
|
|
@ -18,7 +18,7 @@ export default { |
|
|
|
|
preview: () => ( |
|
|
|
|
<Field name="用户名" label="用户名" labelWidth={50} colon placeholder="请输入用户名" /> |
|
|
|
|
), |
|
|
|
|
render: ({ model, styles, block, props, custom }) => { |
|
|
|
|
render: ({ styles, block, props }) => { |
|
|
|
|
const { registerRef } = useGlobalProperties() |
|
|
|
|
|
|
|
|
|
let rules = [] |
|
|
|
@ -30,11 +30,9 @@ export default { |
|
|
|
|
<div style={styles}> |
|
|
|
|
<Field |
|
|
|
|
ref={(el) => registerRef(el, block._vid)} |
|
|
|
|
{...custom} |
|
|
|
|
{...props} |
|
|
|
|
{...model.default} |
|
|
|
|
v-model={props.modelValue} |
|
|
|
|
name={Array.isArray(props.name) ? props.name?.pop() : props.name} |
|
|
|
|
name={Array.isArray(props.name) ? [...props.name].pop() : props.name} |
|
|
|
|
rules={rules} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|