urit-qf-ui 0.0.3 → 0.0.4
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/components/UInput/config.d.ts +17 -0
- package/dist/components/USelect/USelect.vue.d.ts +50 -0
- package/dist/components/USelect/config.d.ts +28 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2283 -2199
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/ufrom/UDesigner.vue.d.ts +11 -26
- package/dist/ufrom/URender.vue.d.ts +10 -36
- package/dist/ufrom/designer-components.d.ts +44 -15
- package/dist/ufrom/types.d.ts +28 -0
- package/package.json +1 -1
- /package/dist/components/{UInput.vue.d.ts → UInput/UInput.vue.d.ts} +0 -0
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.u-input[data-v-
|
|
1
|
+
.u-input[data-v-52ab7cd5]{display:flex;width:100%}.u-input.u-input-label-left .u-input-label[data-v-52ab7cd5]{padding-top:10px;flex-shrink:0;text-align:right;padding-right:12px;font-size:14px;color:#606266}.u-input.u-input-label-left .u-input-field[data-v-52ab7cd5]{flex:1}.u-input.u-input-label-top[data-v-52ab7cd5]{flex-direction:column}.u-input.u-input-label-top .u-input-label[data-v-52ab7cd5]{font-size:14px;color:#606266;margin-bottom:4px}.u-select[data-v-71f6d35a]{display:flex;width:100%}.u-select.u-select-label-left .u-select-label[data-v-71f6d35a]{padding-top:10px;flex-shrink:0;text-align:right;padding-right:12px;font-size:14px;color:#606266}.u-select.u-select-label-left .u-select-field[data-v-71f6d35a]{flex:1}.u-select.u-select-label-top[data-v-71f6d35a]{flex-direction:column}.u-select.u-select-label-top .u-select-label[data-v-71f6d35a]{font-size:14px;color:#606266;margin-bottom:4px}.u-designer[data-v-eff86d95]{display:flex;flex-direction:column;height:100%;width:100%;background:#f5f5f5}.u-designer-header[data-v-eff86d95]{height:50px;background:#fff;border-bottom:1px solid #e8e8e8;display:flex;align-items:center;padding:0 16px}.u-designer-header .header-title[data-v-eff86d95]{font-size:16px;font-weight:600;color:#333}.u-designer-body[data-v-eff86d95]{flex:1;display:flex;overflow:hidden}.u-designer-left[data-v-eff86d95]{width:200px;background:#fff;border-right:1px solid #e8e8e8;display:flex;flex-direction:column}.u-designer-left .panel-title[data-v-eff86d95]{padding:12px;font-size:14px;font-weight:600;color:#333;border-bottom:1px solid #e8e8e8}.u-designer-left .component-list[data-v-eff86d95]{flex:1;overflow-y:auto;padding:8px}.u-designer-left .component-item[data-v-eff86d95]{display:flex;align-items:center;gap:8px;padding:10px 12px;margin-bottom:4px;border-radius:4px;cursor:pointer;transition:background .2s}.u-designer-left .component-item[data-v-eff86d95]:hover{background:#f0f7ff}.u-designer-left .component-item span[data-v-eff86d95]{font-size:13px;color:#333}.u-designer-center[data-v-eff86d95]{flex:1;display:flex;flex-direction:column;overflow:hidden}.u-designer-center .preview-area[data-v-eff86d95]{flex:1;overflow:auto;padding:20px}.u-designer-center .preview-content[data-v-eff86d95]{min-height:100%;background:#fff;border-radius:4px;padding:20px}.u-designer-center .preview-widget[data-v-eff86d95]{position:relative;padding:8px;margin-bottom:8px;border:2px solid transparent;border-radius:4px;cursor:pointer;transition:all .2s}.u-designer-center .preview-widget[data-v-eff86d95]:hover{border-color:#e8e8e8}.u-designer-center .preview-widget.selected[data-v-eff86d95]{border-color:#1976d2;background:#f0f7ff}.u-designer-center .preview-widget .widget-preview[data-v-eff86d95]{display:flex;align-items:center;gap:12px}.u-designer-center .preview-widget .widget-label[data-v-eff86d95]{min-width:80px;text-align:right;font-size:14px;color:#606266}.u-designer-center .preview-widget .widget-actions[data-v-eff86d95]{position:absolute;top:4px;right:4px;display:none;gap:4px}.u-designer-center .preview-widget:hover .widget-actions[data-v-eff86d95]{display:flex}.u-designer-center .empty-tip[data-v-eff86d95]{text-align:center;padding:60px 20px;color:#999;font-size:14px}.u-designer-right[data-v-eff86d95]{width:280px;background:#fff;border-left:1px solid #e8e8e8;display:flex;flex-direction:column}.u-designer-right .panel-title[data-v-eff86d95]{padding:12px;font-size:14px;font-weight:600;color:#333;border-bottom:1px solid #e8e8e8}.u-designer-right .property-panel[data-v-eff86d95]{flex:1;overflow-y:auto;padding:12px}.u-designer-right .property-section[data-v-eff86d95]{margin-bottom:16px}.u-designer-right .property-section .section-title[data-v-eff86d95]{font-size:13px;font-weight:600;color:#333;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid #f0f0f0}.u-designer-right .property-section .property-item[data-v-eff86d95]{margin-bottom:12px}.u-designer-right .property-section .action-buttons[data-v-eff86d95]{display:flex;gap:8px}.u-designer-right .empty-property[data-v-eff86d95]{flex:1;display:flex;align-items:center;justify-content:center;color:#999;font-size:13px}
|
|
@@ -1,32 +1,17 @@
|
|
|
1
|
-
import { ComponentRegister } from './
|
|
2
|
-
interface LayoutWidget {
|
|
3
|
-
id: string;
|
|
4
|
-
type: string;
|
|
5
|
-
field: string;
|
|
6
|
-
label: string;
|
|
7
|
-
props: Record<string, any>;
|
|
8
|
-
}
|
|
9
|
-
interface FormConfig {
|
|
10
|
-
labelWidth: number;
|
|
11
|
-
labelPosition: 'left' | 'top';
|
|
12
|
-
}
|
|
13
|
-
interface UFormJson {
|
|
14
|
-
formConfig: FormConfig;
|
|
15
|
-
widgetList: LayoutWidget[];
|
|
16
|
-
}
|
|
1
|
+
import { WidgetConfig, ComponentRegister } from './types';
|
|
17
2
|
interface Props {
|
|
18
|
-
|
|
19
|
-
components?: ComponentRegister[];
|
|
3
|
+
components: ComponentRegister[];
|
|
20
4
|
}
|
|
21
5
|
declare const _default: import('vue').DefineComponent<Props, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
6
|
+
getWidgetList: () => {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
field: string;
|
|
9
|
+
type: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}[];
|
|
12
|
+
setWidgetList: (list: WidgetConfig[]) => void;
|
|
13
|
+
clearDesigner: () => void;
|
|
14
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
30
15
|
components: ComponentRegister[];
|
|
31
16
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
32
17
|
export default _default;
|
|
@@ -1,43 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
id: string;
|
|
3
|
-
type: string;
|
|
4
|
-
field: string;
|
|
5
|
-
label: string;
|
|
6
|
-
props: Record<string, any>;
|
|
7
|
-
}
|
|
8
|
-
interface FormConfig {
|
|
9
|
-
labelWidth: number;
|
|
10
|
-
labelPosition: 'left' | 'top';
|
|
11
|
-
}
|
|
12
|
-
interface UFormJson {
|
|
13
|
-
formConfig: FormConfig;
|
|
14
|
-
widgetList: LayoutWidget[];
|
|
15
|
-
}
|
|
1
|
+
import { WidgetConfig } from './types';
|
|
16
2
|
interface Props {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
widgetList?: WidgetConfig[];
|
|
4
|
+
componentMap?: Record<string, string>;
|
|
5
|
+
modelValue?: Record<string, any>;
|
|
20
6
|
}
|
|
21
7
|
declare const _default: import('vue').DefineComponent<Props, {
|
|
22
|
-
getFormData: () =>
|
|
23
|
-
|
|
24
|
-
getFormJson: () => {
|
|
25
|
-
formConfig: {
|
|
26
|
-
labelWidth: number;
|
|
27
|
-
labelPosition: "left" | "top";
|
|
28
|
-
};
|
|
29
|
-
widgetList: {
|
|
30
|
-
id: string;
|
|
31
|
-
type: string;
|
|
32
|
-
field: string;
|
|
33
|
-
label: string;
|
|
34
|
-
props: Record<string, any>;
|
|
35
|
-
}[];
|
|
8
|
+
getFormData: () => {
|
|
9
|
+
[x: string]: any;
|
|
36
10
|
};
|
|
37
|
-
|
|
11
|
+
setFormData: (data: Record<string, any>) => void;
|
|
38
12
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
13
|
+
modelValue: Record<string, any>;
|
|
14
|
+
widgetList: WidgetConfig[];
|
|
15
|
+
componentMap: Record<string, string>;
|
|
42
16
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
43
17
|
export default _default;
|
|
@@ -1,22 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* UForm 设计器组件注册表
|
|
3
|
-
*
|
|
2
|
+
* UForm 设计器组件注册表
|
|
3
|
+
* 汇总各组件的设计器配置
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
|
|
5
|
+
export type { PropertyConfig, ComponentRegister } from './types';
|
|
6
|
+
export declare function generateId(): string;
|
|
7
|
+
export declare const componentMap: Record<string, string>;
|
|
8
|
+
export declare const designerComponents: ({
|
|
9
|
+
type: string;
|
|
7
10
|
label: string;
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
icon: string;
|
|
12
|
+
component: string;
|
|
13
|
+
properties: ({
|
|
14
|
+
name: string;
|
|
15
|
+
label: string;
|
|
16
|
+
type: string;
|
|
17
|
+
defaultValue: string;
|
|
18
|
+
} | {
|
|
19
|
+
name: string;
|
|
10
20
|
label: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
export interface ComponentRegister {
|
|
21
|
+
type: string;
|
|
22
|
+
defaultValue: boolean;
|
|
23
|
+
})[];
|
|
24
|
+
} | {
|
|
16
25
|
type: string;
|
|
17
26
|
label: string;
|
|
18
27
|
icon: string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
component: string;
|
|
29
|
+
properties: ({
|
|
30
|
+
name: string;
|
|
31
|
+
label: string;
|
|
32
|
+
type: string;
|
|
33
|
+
defaultValue: string;
|
|
34
|
+
options?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
name: string;
|
|
37
|
+
label: string;
|
|
38
|
+
type: string;
|
|
39
|
+
options: {
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
}[];
|
|
43
|
+
defaultValue?: undefined;
|
|
44
|
+
} | {
|
|
45
|
+
name: string;
|
|
46
|
+
label: string;
|
|
47
|
+
type: string;
|
|
48
|
+
defaultValue: boolean;
|
|
49
|
+
options?: undefined;
|
|
50
|
+
})[];
|
|
51
|
+
})[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface WidgetConfig {
|
|
2
|
+
field: string;
|
|
3
|
+
type: string;
|
|
4
|
+
label: string;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
export interface PropertyConfig {
|
|
8
|
+
name: string;
|
|
9
|
+
label: string;
|
|
10
|
+
type: 'string' | 'number' | 'boolean' | 'select';
|
|
11
|
+
options?: {
|
|
12
|
+
label: string;
|
|
13
|
+
value: any;
|
|
14
|
+
}[];
|
|
15
|
+
defaultValue?: any;
|
|
16
|
+
}
|
|
17
|
+
export interface ComponentRegister {
|
|
18
|
+
type: string;
|
|
19
|
+
label: string;
|
|
20
|
+
icon: string;
|
|
21
|
+
component: string;
|
|
22
|
+
properties: PropertyConfig[];
|
|
23
|
+
}
|
|
24
|
+
export interface UDesignerRef {
|
|
25
|
+
getWidgetList: () => WidgetConfig[];
|
|
26
|
+
setWidgetList: (list: WidgetConfig[]) => void;
|
|
27
|
+
clearDesigner: () => void;
|
|
28
|
+
}
|
package/package.json
CHANGED
|
File without changes
|