@tmagic/form 1.3.8 → 1.3.10

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.
@@ -0,0 +1,6 @@
1
+ .m-form-validate__warning {
2
+ color: var(--el-color-warning);
3
+ font-size: 12px;
4
+ width: 100%;
5
+ line-height: 1.4;
6
+ }
package/types/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { App } from 'vue';
2
+ import type { FormConfig } from './schema';
2
3
  import './theme/index.scss';
3
4
  export * from './schema';
4
5
  export * from './utils/form';
@@ -34,6 +35,7 @@ export { default as MLink } from './fields/Link.vue';
34
35
  export { default as MSelect } from './fields/Select.vue';
35
36
  export { default as MCascader } from './fields/Cascader.vue';
36
37
  export { default as MDynamicField } from './fields/DynamicField.vue';
38
+ export declare const createForm: (config: FormConfig) => FormConfig;
37
39
  export interface InstallOptions {
38
40
  [key: string]: any;
39
41
  }
package/types/schema.d.ts CHANGED
@@ -248,8 +248,9 @@ export interface TextConfig extends FormItem, Input {
248
248
  /** 后置元素,一般为标签或按钮 */
249
249
  append?: string | {
250
250
  text: string;
251
+ value?: 0 | 1;
251
252
  type: 'button';
252
- handler: (mForm: FormState | undefined, data: {
253
+ handler?: (mForm: FormState | undefined, data: {
253
254
  model: any;
254
255
  values: any;
255
256
  }) => void;
@@ -1,25 +0,0 @@
1
- /*
2
- * Tencent is pleased to support the open source community by making TMagicEditor available.
3
- *
4
- * Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved.
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- import { FormConfig } from '../schema';
20
-
21
- export const createForm = function (config: FormConfig) {
22
- return config;
23
- };
24
-
25
- export default createForm;
@@ -1,3 +0,0 @@
1
- import { FormConfig } from '../schema';
2
- export declare const createForm: (config: FormConfig) => FormConfig;
3
- export default createForm;