cnhis-design-vue 3.1.7-beta.2 → 3.1.8-beta.1
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/env.d.ts +42 -38
- package/es/packages/big-table/index2.mjs +4 -4
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.mjs +3 -2
- package/es/packages/bpmn-workflow/index2.mjs +3 -3
- package/es/packages/button-print/index2.mjs +3 -3
- package/es/packages/chunk-upload/index2.mjs +3 -3
- package/es/packages/drag-layout/index2.mjs +3 -3
- package/es/packages/editor/index2.mjs +3 -3
- package/es/packages/field-set/index2.mjs +3 -3
- package/es/packages/form-render/index2.mjs +3 -3
- package/es/packages/form-render/src/FormRender.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/packages/form-render/src/components/cascader.d.ts +2 -2
- package/es/packages/form-render/src/components/cascader2.mjs +26 -12
- package/es/packages/form-render/src/components/collapse2.mjs +3 -3
- package/es/packages/form-render/src/components/combination2.mjs +7 -5
- package/es/packages/form-render/src/components/formItem2.mjs +1 -1
- package/es/packages/form-render/src/components/inputGroup2.mjs +1 -1
- package/es/packages/form-render/src/components/slider2.mjs +1 -1
- package/es/packages/form-render/src/hooks/useFieldList2Schema2.mjs +1 -1
- package/es/packages/form-render/src/hooks/useFormValidator2.mjs +1 -1
- package/es/packages/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/packages/form-render/style/index.css +21 -17
- package/es/packages/form-render/style/index.less +121 -116
- package/es/packages/form-table/index2.mjs +3 -3
- package/es/packages/grid/index2.mjs +3 -3
- package/es/packages/index.css +21 -17
- package/es/packages/index.d.ts +2 -2
- package/es/packages/index.less +121 -116
- package/es/packages/index.mjs +1 -1
- package/es/packages/index2.mjs +2 -2
- package/es/packages/info-header/index2.mjs +3 -3
- package/es/packages/map/index2.mjs +3 -3
- package/es/packages/scale-view/index2.mjs +7 -7
- package/es/packages/scale-view/src/ScaleView.vue_vue_type_script_setup_true_lang.mjs +27 -5
- package/es/packages/scale-view/src/components/AnswerParse.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/packages/scale-view/src/components/formitem/r-checkbox2.mjs +5 -4
- package/es/packages/scale-view/src/components/formitem/r-collection2.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-datetime2.mjs +5 -3
- package/es/packages/scale-view/src/components/formitem/r-radio2.mjs +6 -5
- package/es/packages/scale-view/src/components/formitem/r-select2.mjs +3 -3
- package/es/packages/scale-view/src/hooks/scaleview-computed.d.ts +1 -1
- package/es/packages/scale-view/src/hooks/scaleview-computed2.mjs +33 -13
- package/es/packages/scale-view/src/hooks/scaleview-props.d.ts +7 -3
- package/es/packages/scale-view/src/hooks/scaleview-props2.mjs +7 -3
- package/es/packages/scale-view/src/hooks/use-component2.mjs +4 -2
- package/es/packages/select-label/index2.mjs +4 -4
- package/es/packages/select-label/src/SelectLabel.vue_vue_type_script_setup_true_lang.mjs +7 -4
- package/es/packages/select-person/index2.mjs +3 -3
- package/es/packages/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/packages/time-line/index2.mjs +3 -3
- package/es/src/core/create2.mjs +2 -2
- package/es/src/global/variable.d.ts +1 -1
- package/es/src/global/variable.mjs +1 -1
- package/es/src/global/variable2.mjs +2 -2
- package/es/src/utils/index.d.ts +0 -1
- package/es/src/utils/index.mjs +1 -1
- package/es/src/utils/index2.mjs +1 -5
- package/memory-log.ts +62 -0
- package/package.json +12 -8
- package/sync.sh +13 -0
- package/md-plugin.ts +0 -201
- package/uno.config.ts +0 -22
package/env.d.ts
CHANGED
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
interface ImportMetaEnv {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface ImportMeta {
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
import * as Vue from 'vue';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
interface ImportMetaEnv {
|
|
4
|
+
readonly VITE_APP_TYPE: string;
|
|
5
|
+
// 更多环境变量...
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ImportMeta {
|
|
9
|
+
readonly env: ImportMetaEnv;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
import * as Vue from 'vue';
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
declare module '*.vue' {
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
import type { App, defineComponent } from 'vue';
|
|
18
|
+
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
19
|
+
// // const component: DefineComponent<{}, {}, any>
|
|
20
|
+
const component: ReturnType<typeof defineComponent> & {
|
|
21
|
+
install(app: App): void;
|
|
22
|
+
};
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
export default component;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
import { SlateDescendant, SlateElement, SlateText } from '@wangeditor/editor';
|
|
28
|
+
|
|
29
|
+
declare module '@wangeditor/editor' {
|
|
30
|
+
// 扩展 Text
|
|
31
|
+
interface SlateText {
|
|
32
|
+
text: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// 扩展 Element
|
|
36
|
+
interface SlateElement {
|
|
37
|
+
type: string;
|
|
38
|
+
children: SlateDescendant[];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare module '*.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { safeComponentRegister
|
|
1
|
+
import { COMPONENT_NAMESPACE } from 'cnhis-design-vue/es/src/global/variable';
|
|
2
|
+
import { safeComponentRegister } from 'cnhis-design-vue/es/src/utils';
|
|
3
3
|
import { loadVxeTable } from 'cnhis-design-vue/es/src/utils/loadVxe';
|
|
4
4
|
import { expandXEUtils } from 'cnhis-design-vue/es/src/utils/utilExpand';
|
|
5
5
|
import { CGrid } from 'cnhis-design-vue/es/packages/index';
|
|
@@ -8,8 +8,8 @@ import script from './src/BigTable.vue_vue_type_script_setup_true_lang.mjs';
|
|
|
8
8
|
|
|
9
9
|
const BigTable = script;
|
|
10
10
|
BigTable.install = function(app) {
|
|
11
|
-
safeComponentRegister(app, BigTable,
|
|
12
|
-
safeComponentRegister(app, CGrid,
|
|
11
|
+
safeComponentRegister(app, BigTable, COMPONENT_NAMESPACE + "BigTable");
|
|
12
|
+
safeComponentRegister(app, CGrid, COMPONENT_NAMESPACE + "Grid");
|
|
13
13
|
loadVxeTable(app);
|
|
14
14
|
expandXEUtils();
|
|
15
15
|
};
|
|
@@ -15,7 +15,7 @@ import SvgIcon from 'cnhis-design-vue/es/src/components/SvgIcon';
|
|
|
15
15
|
import { useMessage, NIcon, NTooltip, NPopconfirm, NButton, NInputGroup, NInput, NCheckbox, NCheckboxGroup, NSpace, NProgress, NDropdown, NSwitch, NPopover } from 'naive-ui';
|
|
16
16
|
import CGrid from 'cnhis-design-vue/es/packages/grid';
|
|
17
17
|
import vexutils from 'cnhis-design-vue/es/src/utils/vexutils';
|
|
18
|
-
import { handleTableHeight, setTableConfig, handleGroupColums, checkMethod, setTreeGroupTitle, handleName, handlerInitSearchItem, getEvaluate, getMapVal, getCandidateComponents, getageShowType, isLink, showFilter, reScrollFilterWrap, hideFilterWrap, mergeConObjFn, setDefaultFormData, handleImgArr, handleImgSrc, modalDetailImage, handleQrCodeContent, getInlineEditBtn, isCopy, setVisibleCheckAllWrap, setFilterStatus, handleTableImageSize, getRowStyle, getFooterGroup, flattenRow, intersectRow, removeCheckedDisabledRows } from './utils2.mjs';
|
|
18
|
+
import { handleTableHeight, setTableConfig, handleGroupColums, checkMethod, setTreeGroupTitle, handleName, generateEditRender, handlerInitSearchItem, getEvaluate, getMapVal, getCandidateComponents, getageShowType, isLink, showFilter, reScrollFilterWrap, hideFilterWrap, mergeConObjFn, setDefaultFormData, handleImgArr, handleImgSrc, modalDetailImage, handleQrCodeContent, getInlineEditBtn, isCopy, setVisibleCheckAllWrap, setFilterStatus, handleTableImageSize, getRowStyle, getFooterGroup, flattenRow, intersectRow, removeCheckedDisabledRows } from './utils2.mjs';
|
|
19
19
|
import xb_big from 'cnhis-design-vue/es/src/assets/img/xb_big.png';
|
|
20
20
|
import qr from 'cnhis-design-vue/es/src/assets/img/qr.png';
|
|
21
21
|
import script$1 from './components/NoData.vue_vue_type_script_setup_true_lang.mjs';
|
|
@@ -450,7 +450,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
450
450
|
return createVNode("span", null, [getDefaultValue(params, item)]);
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
}
|
|
453
|
+
},
|
|
454
|
+
editRender: isEdit ? {} : generateEditRender(item)
|
|
454
455
|
});
|
|
455
456
|
if (filterField && !props.isNestTable && !isScanMultiTable2) {
|
|
456
457
|
state.filterFields[item.columnName] = Object.assign({}, vexutils.clone(item, true), {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { safeComponentRegister
|
|
1
|
+
import { COMPONENT_NAMESPACE } from 'cnhis-design-vue/es/src/global/variable';
|
|
2
|
+
import { safeComponentRegister } from 'cnhis-design-vue/es/src/utils';
|
|
3
3
|
import './src/BpmnWorkflow2.mjs';
|
|
4
4
|
import script from './src/BpmnWorkflow.vue_vue_type_script_setup_true_lang.mjs';
|
|
5
5
|
|
|
6
6
|
const BpmnWorkflow = script;
|
|
7
7
|
BpmnWorkflow.install = function(app) {
|
|
8
|
-
safeComponentRegister(app, BpmnWorkflow,
|
|
8
|
+
safeComponentRegister(app, BpmnWorkflow, COMPONENT_NAMESPACE + "BpmnWorkflow");
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { BpmnWorkflow as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { safeComponentRegister
|
|
1
|
+
import { COMPONENT_NAMESPACE } from 'cnhis-design-vue/es/src/global/variable';
|
|
2
|
+
import { safeComponentRegister } from 'cnhis-design-vue/es/src/utils';
|
|
3
3
|
import './src/ButtonPrint2.mjs';
|
|
4
4
|
import script from './src/ButtonPrint.vue_vue_type_script_setup_true_lang.mjs';
|
|
5
5
|
|
|
6
6
|
const ButtonPrint = script;
|
|
7
7
|
ButtonPrint.install = function(app) {
|
|
8
|
-
safeComponentRegister(app, ButtonPrint,
|
|
8
|
+
safeComponentRegister(app, ButtonPrint, COMPONENT_NAMESPACE + "ButtonPrint");
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { ButtonPrint as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { COMPONENT_NAMESPACE } from 'cnhis-design-vue/es/src/global/variable';
|
|
2
2
|
import './src/vod-chunk-upload/vod-chunk-upload2.mjs';
|
|
3
3
|
import uploader from 'vue-simple-uploader';
|
|
4
4
|
import 'vue-simple-uploader/dist/style.css';
|
|
5
|
-
import { safeComponentRegister
|
|
5
|
+
import { safeComponentRegister } from 'cnhis-design-vue/es/src/utils';
|
|
6
6
|
import { expandXEUtils } from 'cnhis-design-vue/es/src/utils/utilExpand';
|
|
7
7
|
import script from './src/vod-chunk-upload/vod-chunk-upload.vue_vue_type_script_setup_true_lang.mjs';
|
|
8
8
|
|
|
9
9
|
const VodChunkUpload = script;
|
|
10
10
|
VodChunkUpload.install = function(app) {
|
|
11
11
|
app.use(uploader);
|
|
12
|
-
safeComponentRegister(app, VodChunkUpload,
|
|
12
|
+
safeComponentRegister(app, VodChunkUpload, COMPONENT_NAMESPACE + "VodChunkUpload");
|
|
13
13
|
expandXEUtils();
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { safeComponentRegister
|
|
1
|
+
import { COMPONENT_NAMESPACE } from 'cnhis-design-vue/es/src/global/variable';
|
|
2
|
+
import { safeComponentRegister } from 'cnhis-design-vue/es/src/utils';
|
|
3
3
|
import { expandXEUtils } from 'cnhis-design-vue/es/src/utils/utilExpand';
|
|
4
4
|
import './src/DragLayout2.mjs';
|
|
5
5
|
import script from './src/DragLayout.vue_vue_type_script_setup_true_lang.mjs';
|
|
6
6
|
|
|
7
7
|
const DragLayout = script;
|
|
8
8
|
DragLayout.install = function(app) {
|
|
9
|
-
safeComponentRegister(app, DragLayout,
|
|
9
|
+
safeComponentRegister(app, DragLayout, COMPONENT_NAMESPACE + "DragLayout");
|
|
10
10
|
expandXEUtils();
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { safeComponentRegister
|
|
1
|
+
import { COMPONENT_NAMESPACE } from 'cnhis-design-vue/es/src/global/variable';
|
|
2
|
+
import { safeComponentRegister } from 'cnhis-design-vue/es/src/utils';
|
|
3
3
|
import script from './src/Editor2.mjs';
|
|
4
4
|
|
|
5
5
|
const Editor = script;
|
|
6
6
|
Editor.install = function(app) {
|
|
7
|
-
safeComponentRegister(app, Editor,
|
|
7
|
+
safeComponentRegister(app, Editor, COMPONENT_NAMESPACE + "Editor");
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { Editor as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { safeComponentRegister
|
|
1
|
+
import { COMPONENT_NAMESPACE } from 'cnhis-design-vue/es/src/global/variable';
|
|
2
|
+
import { safeComponentRegister } from 'cnhis-design-vue/es/src/utils';
|
|
3
3
|
import './src/index3.mjs';
|
|
4
4
|
import script from './src/index.vue_vue_type_script_setup_true_lang2.mjs';
|
|
5
5
|
|
|
6
6
|
const FieldSet = script;
|
|
7
7
|
FieldSet.install = function(app) {
|
|
8
|
-
safeComponentRegister(app, FieldSet,
|
|
8
|
+
safeComponentRegister(app, FieldSet, COMPONENT_NAMESPACE + "FieldSet");
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { FieldSet as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { safeComponentRegister
|
|
1
|
+
import { COMPONENT_NAMESPACE } from 'cnhis-design-vue/es/src/global/variable';
|
|
2
|
+
import { safeComponentRegister } from 'cnhis-design-vue/es/src/utils';
|
|
3
3
|
import './src/FormRender2.mjs';
|
|
4
4
|
import '@formily/core';
|
|
5
5
|
import 'vue';
|
|
@@ -9,7 +9,7 @@ import script from './src/FormRender.vue_vue_type_script_setup_true_lang.mjs';
|
|
|
9
9
|
|
|
10
10
|
const FormRender = script;
|
|
11
11
|
FormRender.install = function(app) {
|
|
12
|
-
safeComponentRegister(app, FormRender,
|
|
12
|
+
safeComponentRegister(app, FormRender, COMPONENT_NAMESPACE + "FormRender");
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export { FormRender as default };
|
|
@@ -72,7 +72,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
72
72
|
});
|
|
73
73
|
return (_ctx, _cache) => {
|
|
74
74
|
return openBlock(), createElementBlock("section", {
|
|
75
|
-
class: "
|
|
75
|
+
class: "form-render__wrapper",
|
|
76
76
|
style: normalizeStyle({ "--column": __props.column })
|
|
77
77
|
}, [
|
|
78
78
|
createVNode(unref(FormProvider), { form: unref(formModel) }, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnyObject } from 'cnhis-design-vue/es/src/types';
|
|
2
|
-
import { FormRequestType } from
|
|
3
|
-
import { PropType } from
|
|
2
|
+
import { FormRequestType } from '../types';
|
|
3
|
+
import { PropType } from 'vue';
|
|
4
4
|
declare type UrlConfig = {
|
|
5
5
|
method: FormRequestType;
|
|
6
6
|
nameKey: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, inject, computed, watch, createVNode, mergeProps } from 'vue';
|
|
1
|
+
import { defineComponent, ref, inject, computed, watch, createVNode, Fragment, mergeProps } from 'vue';
|
|
2
2
|
import { InjectAsyncQueue } from '../constants/index2.mjs';
|
|
3
3
|
import { assignUpdateValue, formRenderLog } from '../utils/index2.mjs';
|
|
4
4
|
import { isObject } from '@vueuse/core';
|
|
@@ -37,7 +37,9 @@ const script = defineComponent({
|
|
|
37
37
|
if (!option && _options.value)
|
|
38
38
|
return;
|
|
39
39
|
const config = props.urlConfig;
|
|
40
|
-
if (!config
|
|
40
|
+
if (!config)
|
|
41
|
+
return;
|
|
42
|
+
if (!isObject(config)) {
|
|
41
43
|
formRenderLog(`invalid urlConfig (${config}) in CASCADER => ${title.value}`, "warn");
|
|
42
44
|
return;
|
|
43
45
|
}
|
|
@@ -80,24 +82,36 @@ const script = defineComponent({
|
|
|
80
82
|
}, {
|
|
81
83
|
immediate: true
|
|
82
84
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
function updateValue(v, _, options) {
|
|
86
|
+
var _a;
|
|
87
|
+
const payload = (_a = options == null ? void 0 : options.map((option) => option[labelKey.value])) == null ? void 0 : _a.join(" / ");
|
|
88
|
+
emit("update:value", payload);
|
|
86
89
|
}
|
|
90
|
+
const labelKey = computed(() => {
|
|
91
|
+
var _a, _b;
|
|
92
|
+
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.nameKey) != null ? _b : "text";
|
|
93
|
+
});
|
|
94
|
+
const valueKey = computed(() => {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.valueKey) != null ? _b : "value";
|
|
97
|
+
});
|
|
98
|
+
const _attrs = computed(() => {
|
|
99
|
+
return {
|
|
100
|
+
...attrs,
|
|
101
|
+
onChange: void 0
|
|
102
|
+
};
|
|
103
|
+
});
|
|
87
104
|
return () => {
|
|
88
|
-
|
|
89
|
-
return createVNode(NCascader, mergeProps({
|
|
90
|
-
"ref": cascaderRef
|
|
91
|
-
}, attrs, {
|
|
105
|
+
return createVNode(Fragment, null, [createVNode(NCascader, mergeProps(_attrs.value, {
|
|
92
106
|
"onUpdate:value": updateValue,
|
|
93
107
|
"remote": true,
|
|
94
|
-
"labelField":
|
|
95
|
-
"valueField":
|
|
108
|
+
"labelField": labelKey.value,
|
|
109
|
+
"valueField": valueKey.value,
|
|
96
110
|
"options": renderOptions.value,
|
|
97
111
|
"checkStrategy": "child",
|
|
98
112
|
"onLoad": fetchData,
|
|
99
113
|
"onUpdate:show": (show) => show && fetchData()
|
|
100
|
-
}), slots);
|
|
114
|
+
}), slots)]);
|
|
101
115
|
};
|
|
102
116
|
}
|
|
103
117
|
});
|
|
@@ -32,12 +32,12 @@ const script = defineComponent({
|
|
|
32
32
|
}
|
|
33
33
|
return () => {
|
|
34
34
|
return createVNode("section", {
|
|
35
|
-
"class": "
|
|
35
|
+
"class": "form-render__collapse"
|
|
36
36
|
}, [createVNode("header", {
|
|
37
|
-
"class": "
|
|
37
|
+
"class": "form-render__collapseHeader",
|
|
38
38
|
"onClick": toggleShow
|
|
39
39
|
}, [props.title]), createVNode(NCollapseTransition, {
|
|
40
|
-
"class": "
|
|
40
|
+
"class": "form-render__collapseItem",
|
|
41
41
|
"show": _show.value,
|
|
42
42
|
"appear": false
|
|
43
43
|
}, slots)]);
|
|
@@ -81,10 +81,12 @@ const script = defineComponent({
|
|
|
81
81
|
const FormRenderComponent = script$1;
|
|
82
82
|
return () => {
|
|
83
83
|
return createVNode("section", {
|
|
84
|
-
"class": "
|
|
84
|
+
"class": "form-render__combination"
|
|
85
85
|
}, [createVNode("header", {
|
|
86
|
-
"class": "
|
|
87
|
-
}, [createVNode("
|
|
86
|
+
"class": "form-render__combinationHeader"
|
|
87
|
+
}, [createVNode("div", {
|
|
88
|
+
"class": "form-render__combinationHeaderText"
|
|
89
|
+
}, [props.title]), createVNode(NButton, {
|
|
88
90
|
"onClick": add,
|
|
89
91
|
"type": "info",
|
|
90
92
|
"text": true
|
|
@@ -94,7 +96,7 @@ const script = defineComponent({
|
|
|
94
96
|
length: combinationRepeat.value
|
|
95
97
|
}).map((_, idx) => {
|
|
96
98
|
return createVNode("section", {
|
|
97
|
-
"class": "
|
|
99
|
+
"class": "form-render__combinationContent"
|
|
98
100
|
}, [createVNode(FormRenderComponent, {
|
|
99
101
|
"initialData": toRaw(_values.value[idx]) || {},
|
|
100
102
|
"schema": _schema.value,
|
|
@@ -104,7 +106,7 @@ const script = defineComponent({
|
|
|
104
106
|
"onChange": stop,
|
|
105
107
|
"onFormChange": (payload) => onChange(idx, payload)
|
|
106
108
|
}, null), idx !== 0 ? createVNode("i", {
|
|
107
|
-
"class": "
|
|
109
|
+
"class": "form-render__combinationClose",
|
|
108
110
|
"onClick": () => remove(idx)
|
|
109
111
|
}, ["-"]) : null]);
|
|
110
112
|
})]);
|
|
@@ -2,7 +2,7 @@ import { connect, mapProps } from '@formily/vue';
|
|
|
2
2
|
import { NInputGroup } from 'naive-ui';
|
|
3
3
|
|
|
4
4
|
const INPUT_GROUP = connect(NInputGroup, mapProps((props) => {
|
|
5
|
-
return { style: { "--column": props.span || 3 }, class: "
|
|
5
|
+
return { style: { "--column": props.span || 3 }, class: "form-render__inputGroup" };
|
|
6
6
|
}));
|
|
7
7
|
|
|
8
8
|
export { INPUT_GROUP };
|
|
@@ -6,7 +6,7 @@ const SLIDER = connect(NSlider, mapProps((props, field) => {
|
|
|
6
6
|
const _props = assignUpdateValue(props, field);
|
|
7
7
|
if (Array.isArray(_props.option)) {
|
|
8
8
|
_props.marks = _props.option.reduce((fin, option) => {
|
|
9
|
-
fin[option.value] =
|
|
9
|
+
fin[option.value] = option.text;
|
|
10
10
|
return fin;
|
|
11
11
|
}, {});
|
|
12
12
|
}
|
|
@@ -36,7 +36,7 @@ function useFormValidator() {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
if (max_length) {
|
|
39
|
-
rules.push({
|
|
39
|
+
rules.push({ max: max_length, message });
|
|
40
40
|
}
|
|
41
41
|
const ruleCreator = vali_obj && validateMap.get(vali_obj);
|
|
42
42
|
ruleCreator && rules.push(Object.assign({}, commonValidateConfig, ruleCreator(fieldItem)));
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
.
|
|
1
|
+
.form-render__wrapper {
|
|
2
2
|
display: grid !important;
|
|
3
3
|
grid-template-columns: repeat(var(--column), minmax(0px, 1fr));
|
|
4
4
|
gap: 0 8px;
|
|
5
5
|
}
|
|
6
|
-
.
|
|
6
|
+
.form-render__formItem {
|
|
7
7
|
grid-column: span var(--form-item-column) / span var(--form-item-column);
|
|
8
8
|
}
|
|
9
|
-
.
|
|
9
|
+
.form-render__formItem .n-date-picker {
|
|
10
10
|
width: 100%;
|
|
11
11
|
}
|
|
12
|
-
.
|
|
12
|
+
.form-render__collapse {
|
|
13
13
|
grid-column: span var(--column) / span var(--column);
|
|
14
14
|
}
|
|
15
|
-
.
|
|
15
|
+
.form-render__collapseHeader {
|
|
16
16
|
cursor: pointer;
|
|
17
17
|
display: flex;
|
|
18
18
|
background: #fafafa;
|
|
@@ -22,44 +22,48 @@
|
|
|
22
22
|
margin-bottom: 8px;
|
|
23
23
|
border: 1px solid #d9d9d9;
|
|
24
24
|
}
|
|
25
|
-
.
|
|
25
|
+
.form-render__collapseItem {
|
|
26
26
|
display: grid !important;
|
|
27
27
|
grid-template-columns: repeat(var(--column), minmax(0px, 1fr));
|
|
28
28
|
gap: 0 8px;
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.form-render__inputGroup {
|
|
31
31
|
grid-column: span var(--column) / span var(--column);
|
|
32
32
|
display: flex;
|
|
33
33
|
align-items: flex-end;
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.form-render__inputGroup > div {
|
|
36
36
|
flex: 1;
|
|
37
37
|
}
|
|
38
|
-
.
|
|
39
|
-
.
|
|
38
|
+
.form-render__inputGroup > div:not(:last-of-type) .n-input__border,
|
|
39
|
+
.form-render__inputGroup > div:not(:last-of-type) .n-base-selection__border {
|
|
40
40
|
border-right: 0;
|
|
41
41
|
border-bottom-right-radius: 0;
|
|
42
42
|
border-top-right-radius: 0;
|
|
43
43
|
}
|
|
44
|
-
.
|
|
45
|
-
.
|
|
44
|
+
.form-render__inputGroup > div:last-of-type .n-input__border,
|
|
45
|
+
.form-render__inputGroup > div:last-of-type .n-base-selection__border {
|
|
46
46
|
border-bottom-left-radius: 0;
|
|
47
47
|
border-top-left-radius: 0;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
.form-render__combination {
|
|
50
50
|
width: 100%;
|
|
51
51
|
}
|
|
52
|
-
.
|
|
52
|
+
.form-render__combinationHeader {
|
|
53
53
|
display: flex;
|
|
54
54
|
gap: 12px;
|
|
55
55
|
}
|
|
56
|
-
.
|
|
56
|
+
.form-render__combinationHeader > h3 {
|
|
57
57
|
font-size: 16px;
|
|
58
58
|
font-weight: 700;
|
|
59
59
|
padding: 0;
|
|
60
60
|
margin: 0;
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
.form-render__combinationHeaderText {
|
|
63
|
+
font-size: 16px;
|
|
64
|
+
font-weight: 500;
|
|
65
|
+
}
|
|
66
|
+
.form-render__combinationClose {
|
|
63
67
|
position: absolute;
|
|
64
68
|
right: 0;
|
|
65
69
|
top: 5px;
|
|
@@ -75,6 +79,6 @@
|
|
|
75
79
|
vertical-align: middle;
|
|
76
80
|
font-size: 16px;
|
|
77
81
|
}
|
|
78
|
-
.
|
|
82
|
+
.form-render__combinationContent {
|
|
79
83
|
position: relative;
|
|
80
84
|
}
|