ls-pro-common 1.0.35 → 1.0.36
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.
|
@@ -5,7 +5,7 @@ export declare type InputMultiLineProps = ProFormItemProps<InputProps> & {
|
|
|
5
5
|
/**@name 表单项name, 跟 form.item 的 name一致 */
|
|
6
6
|
name: string;
|
|
7
7
|
/**@name 表单值*/
|
|
8
|
-
|
|
8
|
+
defaultValue?: string;
|
|
9
9
|
/**@name 弹框宽度,默认为400 */
|
|
10
10
|
popWidth?: string;
|
|
11
11
|
/**@name 弹框位置,默认为bottom */
|
|
@@ -28,7 +28,7 @@ declare const InputMultiLine: React.ForwardRefExoticComponent<{
|
|
|
28
28
|
/**@name 表单项name, 跟 form.item 的 name一致 */
|
|
29
29
|
name: string;
|
|
30
30
|
/**@name 表单值*/
|
|
31
|
-
|
|
31
|
+
defaultValue?: string | undefined;
|
|
32
32
|
/**@name 弹框宽度,默认为400 */
|
|
33
33
|
popWidth?: string | undefined;
|
|
34
34
|
/**@name 弹框位置,默认为bottom */
|
|
@@ -6,7 +6,7 @@ import _Input from "antd/es/input";
|
|
|
6
6
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
7
7
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
8
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
9
|
-
var _excluded = ["name", "rows", "maxRows", "placement", "popWidth", "fieldProps", "
|
|
9
|
+
var _excluded = ["name", "rows", "maxRows", "placement", "popWidth", "fieldProps", "defaultValue", "allowClear"];
|
|
10
10
|
import React, { useRef, useState, useEffect, useContext, useMemo, useImperativeHandle } from 'react';
|
|
11
11
|
import { ProFormText, ProFormContext } from 'ls-pro-form';
|
|
12
12
|
import { UnorderedListOutlined } from '@ant-design/icons';
|
|
@@ -45,15 +45,15 @@ var InputMultiLine = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
45
45
|
_prop$popWidth = prop.popWidth,
|
|
46
46
|
popWidth = _prop$popWidth === void 0 ? '400px' : _prop$popWidth,
|
|
47
47
|
fieldProps = prop.fieldProps,
|
|
48
|
-
|
|
48
|
+
defaultValue = prop.defaultValue,
|
|
49
49
|
_prop$allowClear = prop.allowClear,
|
|
50
50
|
allowClear = _prop$allowClear === void 0 ? true : _prop$allowClear,
|
|
51
51
|
rest = _objectWithoutProperties(prop, _excluded); // 设置初始值
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
useEffect(function () {
|
|
55
|
-
if (
|
|
56
|
-
setText(
|
|
55
|
+
if (defaultValue) {
|
|
56
|
+
setText(defaultValue);
|
|
57
57
|
} else if (name) {
|
|
58
58
|
var _formRef$current;
|
|
59
59
|
|
|
@@ -5,7 +5,7 @@ export declare type InputMultiLineProps = ProFormItemProps<InputProps> & {
|
|
|
5
5
|
/**@name 表单项name, 跟 form.item 的 name一致 */
|
|
6
6
|
name: string;
|
|
7
7
|
/**@name 表单值*/
|
|
8
|
-
|
|
8
|
+
defaultValue?: string;
|
|
9
9
|
/**@name 弹框宽度,默认为400 */
|
|
10
10
|
popWidth?: string;
|
|
11
11
|
/**@name 弹框位置,默认为bottom */
|
|
@@ -28,7 +28,7 @@ declare const InputMultiLine: React.ForwardRefExoticComponent<{
|
|
|
28
28
|
/**@name 表单项name, 跟 form.item 的 name一致 */
|
|
29
29
|
name: string;
|
|
30
30
|
/**@name 表单值*/
|
|
31
|
-
|
|
31
|
+
defaultValue?: string | undefined;
|
|
32
32
|
/**@name 弹框宽度,默认为400 */
|
|
33
33
|
popWidth?: string | undefined;
|
|
34
34
|
/**@name 弹框位置,默认为bottom */
|
|
@@ -31,7 +31,7 @@ var _lsProForm = require("ls-pro-form");
|
|
|
31
31
|
|
|
32
32
|
var _icons = require("@ant-design/icons");
|
|
33
33
|
|
|
34
|
-
var _excluded = ["name", "rows", "maxRows", "placement", "popWidth", "fieldProps", "
|
|
34
|
+
var _excluded = ["name", "rows", "maxRows", "placement", "popWidth", "fieldProps", "defaultValue", "allowClear"];
|
|
35
35
|
|
|
36
36
|
var InputMultiLine = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
|
|
37
37
|
//@ts-ignore
|
|
@@ -67,14 +67,14 @@ var InputMultiLine = /*#__PURE__*/_react.default.forwardRef(function (prop, ref)
|
|
|
67
67
|
_prop$popWidth = prop.popWidth,
|
|
68
68
|
popWidth = _prop$popWidth === void 0 ? '400px' : _prop$popWidth,
|
|
69
69
|
fieldProps = prop.fieldProps,
|
|
70
|
-
|
|
70
|
+
defaultValue = prop.defaultValue,
|
|
71
71
|
_prop$allowClear = prop.allowClear,
|
|
72
72
|
allowClear = _prop$allowClear === void 0 ? true : _prop$allowClear,
|
|
73
73
|
rest = (0, _objectWithoutProperties2.default)(prop, _excluded); // 设置初始值
|
|
74
74
|
|
|
75
75
|
(0, _react.useEffect)(function () {
|
|
76
|
-
if (
|
|
77
|
-
setText(
|
|
76
|
+
if (defaultValue) {
|
|
77
|
+
setText(defaultValue);
|
|
78
78
|
} else if (name) {
|
|
79
79
|
var _formRef$current;
|
|
80
80
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ls-pro-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.36",
|
|
4
4
|
"description": "ls-pro-common",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@ant-design/icons": "^4.3.0",
|
|
31
|
-
"ls-pro-table": "2.62.
|
|
31
|
+
"ls-pro-table": "2.62.29",
|
|
32
32
|
"ls-pro-form": "1.52.25",
|
|
33
33
|
"@babel/runtime": "^7.16.3",
|
|
34
34
|
"classnames": "^2.2.6",
|