@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.
- package/dist/style.css +11 -0
- package/dist/tmagic-form.js +401 -326
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +400 -324
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/containers/Container.vue +2 -1
- package/src/containers/GroupListItem.vue +4 -4
- package/src/containers/Panel.vue +1 -1
- package/src/containers/Table.vue +184 -170
- package/src/fields/Link.vue +1 -1
- package/src/fields/Text.vue +69 -25
- package/src/index.ts +5 -0
- package/src/schema.ts +2 -1
- package/src/theme/index.scss +1 -0
- package/src/theme/table.scss +4 -0
- package/src/theme/text.scss +6 -0
- package/types/index.d.ts +2 -0
- package/types/schema.d.ts +2 -1
- package/src/utils/createForm.ts +0 -25
- package/types/utils/createForm.d.ts +0 -3
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
|
|
253
|
+
handler?: (mForm: FormState | undefined, data: {
|
|
253
254
|
model: any;
|
|
254
255
|
values: any;
|
|
255
256
|
}) => void;
|
package/src/utils/createForm.ts
DELETED
|
@@ -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;
|