@tmagic/form 1.5.0-beta.15 → 1.5.0-beta.16
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/tmagic-form.js +3 -1
- package/dist/tmagic-form.umd.cjs +2 -0
- package/package.json +3 -3
- package/src/Form.vue +3 -1
- package/src/schema.ts +4 -0
- package/types/index.d.ts +4 -1
package/dist/tmagic-form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { toRaw, defineComponent, inject, ref, computed, watchEffect, watch, resolveComponent, openBlock, createElementBlock, normalizeStyle, normalizeClass, createBlock, resolveDynamicComponent, Fragment, createVNode, unref, withCtx, createElementVNode, createCommentVNode, renderList, createTextVNode, toDisplayString, withDirectives, vShow, renderSlot, onMounted, Teleport, toRefs, mergeProps, getCurrentInstance, reactive, onBeforeUnmount, vModelText, provide, shallowRef, onBeforeMount, nextTick, resolveDirective, createSlots, withModifiers } from 'vue';
|
|
2
2
|
import { WarningFilled, CaretBottom, CaretRight, Delete, CaretTop, Grid, ArrowUp, ArrowDown, FullScreen } from '@element-plus/icons-vue';
|
|
3
3
|
import { cloneDeep, isEqual, isEmpty, debounce } from 'lodash-es';
|
|
4
|
-
import { TMagicFormItem, TMagicTooltip, TMagicIcon, TMagicButton, TMagicCheckbox, TMagicCard, TMagicCol, TMagicRow, TMagicSteps, TMagicStep, useZIndex, TMagicTable, TMagicTableColumn, TMagicUpload, TMagicPagination, tMagicMessage, getDesignConfig, TMagicBadge, TMagicCascader, TMagicCheckboxGroup, TMagicColorPicker, TMagicDatePicker, TMagicForm, TMagicInput, TMagicDialog, TMagicInputNumber, TMagicRadioGroup, TMagicRadio, TMagicSelect, TMagicSwitch, TMagicTimePicker, TMagicDrawer, TMagicScrollbar } from '@tmagic/design';
|
|
4
|
+
import { TMagicFormItem, TMagicTooltip, TMagicIcon, TMagicButton, TMagicCheckbox, TMagicCard, TMagicCol, TMagicRow, TMagicSteps, TMagicStep, useZIndex, TMagicTable, TMagicTableColumn, TMagicUpload, TMagicPagination, tMagicMessage, getDesignConfig, TMagicBadge, TMagicCascader, TMagicCheckboxGroup, TMagicColorPicker, TMagicDatePicker, TMagicForm, TMagicInput, tMagicMessageBox, TMagicDialog, TMagicInputNumber, TMagicRadioGroup, TMagicRadio, TMagicSelect, TMagicSwitch, TMagicTimePicker, TMagicDrawer, TMagicScrollbar } from '@tmagic/design';
|
|
5
5
|
import dayjs from 'dayjs';
|
|
6
6
|
import utc from 'dayjs/plugin/utc';
|
|
7
7
|
import Sortable from 'sortablejs';
|
|
@@ -2917,6 +2917,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2917
2917
|
setField: (prop, field) => fields.set(prop, field),
|
|
2918
2918
|
getField: (prop) => fields.get(prop),
|
|
2919
2919
|
deleteField: (prop) => fields.delete(prop),
|
|
2920
|
+
$messageBox: tMagicMessageBox,
|
|
2921
|
+
$message: tMagicMessage,
|
|
2920
2922
|
post: (options) => {
|
|
2921
2923
|
if (requestFuc) {
|
|
2922
2924
|
return requestFuc({
|
package/dist/tmagic-form.umd.cjs
CHANGED
|
@@ -2913,6 +2913,8 @@
|
|
|
2913
2913
|
setField: (prop, field) => fields.set(prop, field),
|
|
2914
2914
|
getField: (prop) => fields.get(prop),
|
|
2915
2915
|
deleteField: (prop) => fields.delete(prop),
|
|
2916
|
+
$messageBox: design.tMagicMessageBox,
|
|
2917
|
+
$message: design.tMagicMessage,
|
|
2916
2918
|
post: (options) => {
|
|
2917
2919
|
if (requestFuc) {
|
|
2918
2920
|
return requestFuc({
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.5.0-beta.
|
|
2
|
+
"version": "1.5.0-beta.16",
|
|
3
3
|
"name": "@tmagic/form",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"vue": ">=3.5.0",
|
|
59
59
|
"typescript": "*",
|
|
60
|
-
"@tmagic/utils": "1.5.0-beta.
|
|
61
|
-
"@tmagic/design": "1.5.0-beta.
|
|
60
|
+
"@tmagic/utils": "1.5.0-beta.16",
|
|
61
|
+
"@tmagic/design": "1.5.0-beta.16"
|
|
62
62
|
},
|
|
63
63
|
"peerDependenciesMeta": {
|
|
64
64
|
"typescript": {
|
package/src/Form.vue
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
import { provide, reactive, ref, shallowRef, toRaw, watch, watchEffect } from 'vue';
|
|
32
32
|
import { cloneDeep, isEqual } from 'lodash-es';
|
|
33
33
|
|
|
34
|
-
import { TMagicForm } from '@tmagic/design';
|
|
34
|
+
import { TMagicForm, tMagicMessage, tMagicMessageBox } from '@tmagic/design';
|
|
35
35
|
|
|
36
36
|
import Container from './containers/Container.vue';
|
|
37
37
|
import { getConfig } from './utils/config';
|
|
@@ -106,6 +106,8 @@ const formState: FormState = reactive<FormState>({
|
|
|
106
106
|
setField: (prop: string, field: any) => fields.set(prop, field),
|
|
107
107
|
getField: (prop: string) => fields.get(prop),
|
|
108
108
|
deleteField: (prop: string) => fields.delete(prop),
|
|
109
|
+
$messageBox: tMagicMessageBox,
|
|
110
|
+
$message: tMagicMessage,
|
|
109
111
|
post: (options: any) => {
|
|
110
112
|
if (requestFuc) {
|
|
111
113
|
return requestFuc({
|
package/src/schema.ts
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
import type { TMagicMessage, TMagicMessageBox } from '@tmagic/design';
|
|
20
|
+
|
|
19
21
|
export interface ValidateError {
|
|
20
22
|
message: string;
|
|
21
23
|
field: string;
|
|
@@ -59,6 +61,8 @@ export type FormState = {
|
|
|
59
61
|
setField: (prop: string, field: any) => void;
|
|
60
62
|
getField: (prop: string) => any;
|
|
61
63
|
deleteField: (prop: string) => any;
|
|
64
|
+
$messageBox: TMagicMessageBox;
|
|
65
|
+
$message: TMagicMessage;
|
|
62
66
|
[key: string]: any;
|
|
63
67
|
};
|
|
64
68
|
|
package/types/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { App } from 'vue';
|
|
3
|
+
import * as _tmagic_design from '@tmagic/design';
|
|
4
|
+
import { TMagicMessageBox, TMagicMessage } from '@tmagic/design';
|
|
3
5
|
import * as _tmagic_editor from '@tmagic/editor';
|
|
4
6
|
import * as _vue_reactivity from '@vue/reactivity';
|
|
5
|
-
import * as _tmagic_design from '@tmagic/design';
|
|
6
7
|
|
|
7
8
|
interface ValidateError {
|
|
8
9
|
message: string;
|
|
@@ -43,6 +44,8 @@ type FormState = {
|
|
|
43
44
|
setField: (prop: string, field: any) => void;
|
|
44
45
|
getField: (prop: string) => any;
|
|
45
46
|
deleteField: (prop: string) => any;
|
|
47
|
+
$messageBox: TMagicMessageBox;
|
|
48
|
+
$message: TMagicMessage;
|
|
46
49
|
[key: string]: any;
|
|
47
50
|
};
|
|
48
51
|
/**
|