@mc20230601/keep-up 1.0.23 → 1.0.28
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/es/components/codeEditor/index.d.ts +8 -8
- package/es/components/commonDrawer/index.d.ts +27 -15
- package/es/components/commonDrawer/index.mjs +11 -4
- package/es/components/commonDrawer/index.mjs.map +1 -1
- package/es/components/commonEditor/constants.d.ts +17 -0
- package/es/components/commonEditor/constants.mjs +16 -0
- package/es/components/commonEditor/constants.mjs.map +1 -0
- package/es/components/commonEditor/index.d.ts +181 -0
- package/es/components/commonEditor/index.mjs +193 -0
- package/es/components/commonEditor/index.mjs.map +1 -0
- package/es/components/commonEditor/index.module.mjs +4 -0
- package/es/components/commonEditor/index.module.mjs.map +1 -0
- package/es/components/commonEditor/interfaces.d.ts +46 -0
- package/es/components/commonEditor/interfaces.mjs +2 -0
- package/es/components/commonEditor/interfaces.mjs.map +1 -0
- package/es/components/commonEditor/useModeMap.d.ts +4 -0
- package/es/components/commonEditor/useModeMap.mjs +17 -0
- package/es/components/commonEditor/useModeMap.mjs.map +1 -0
- package/es/components/commonFilter/constants.d.ts +2 -0
- package/es/components/commonFilter/constants.mjs +4 -0
- package/es/components/commonFilter/constants.mjs.map +1 -0
- package/es/components/commonFilter/index.d.ts +107 -0
- package/es/components/commonFilter/index.mjs +103 -0
- package/es/components/commonFilter/index.mjs.map +1 -0
- package/es/components/commonFilter/index.module.mjs +4 -0
- package/es/components/commonFilter/index.module.mjs.map +1 -0
- package/es/components/commonFilter/interfaces.d.ts +75 -0
- package/es/components/commonFilter/interfaces.mjs +2 -0
- package/es/components/commonFilter/interfaces.mjs.map +1 -0
- package/es/components/commonFilter/props.d.ts +31 -0
- package/es/components/commonFilter/props.mjs +30 -0
- package/es/components/commonFilter/props.mjs.map +1 -0
- package/es/components/commonFilter/useCollapse.d.ts +2 -0
- package/es/components/commonFilter/useCollapse.mjs +28 -0
- package/es/components/commonFilter/useCollapse.mjs.map +1 -0
- package/es/components/commonFilter/useFieldsParser.d.ts +5 -0
- package/es/components/commonFilter/useFieldsParser.mjs +37 -0
- package/es/components/commonFilter/useFieldsParser.mjs.map +1 -0
- package/es/components/commonFilter/useKeepFilter.d.ts +3 -0
- package/es/components/commonFilter/useKeepFilter.mjs +33 -0
- package/es/components/commonFilter/useKeepFilter.mjs.map +1 -0
- package/es/components/commonFilter/utils.d.ts +3 -0
- package/es/components/commonFilter/utils.mjs +14 -0
- package/es/components/commonFilter/utils.mjs.map +1 -0
- package/es/components/commonJsonPretty/index.d.ts +31 -0
- package/es/components/commonJsonPretty/index.mjs +20 -0
- package/es/components/commonJsonPretty/index.mjs.map +1 -0
- package/es/components/commonLocations/index.d.ts +1 -1
- package/es/components/commonLocations/index.mjs.map +1 -1
- package/es/components/commonLocations/utils.mjs +3 -1
- package/es/components/commonLocations/utils.mjs.map +1 -1
- package/es/components/commonModal/index.d.ts +30 -0
- package/es/components/commonModal/index.mjs +56 -0
- package/es/components/commonModal/index.mjs.map +1 -0
- package/es/components/commonModal/index.module.mjs +4 -0
- package/es/components/commonModal/index.module.mjs.map +1 -0
- package/es/components/commonModal/interfaces.d.ts +7 -0
- package/es/components/commonModal/interfaces.mjs +2 -0
- package/es/components/commonModal/interfaces.mjs.map +1 -0
- package/es/components/commonPage/constants.d.ts +18 -0
- package/es/components/commonPage/constants.mjs +16 -0
- package/es/components/commonPage/constants.mjs.map +1 -0
- package/es/components/commonPage/index.d.ts +256 -0
- package/es/components/commonPage/index.mjs +462 -0
- package/es/components/commonPage/index.mjs.map +1 -0
- package/es/components/commonPage/index.module.mjs +4 -0
- package/es/components/commonPage/index.module.mjs.map +1 -0
- package/es/components/commonPage/interfaces.d.ts +113 -0
- package/es/components/commonPage/interfaces.mjs +2 -0
- package/es/components/commonPage/interfaces.mjs.map +1 -0
- package/es/components/commonPage/useAsyncDataSource.d.ts +4 -0
- package/es/components/commonPage/useAsyncDataSource.mjs +39 -0
- package/es/components/commonPage/useAsyncDataSource.mjs.map +1 -0
- package/es/components/commonPage/useLayout.d.ts +6 -0
- package/es/components/commonPage/useLayout.mjs +37 -0
- package/es/components/commonPage/useLayout.mjs.map +1 -0
- package/es/components/commonPage/usePage.d.ts +4 -0
- package/es/components/commonPage/usePage.mjs +64 -0
- package/es/components/commonPage/usePage.mjs.map +1 -0
- package/es/components/commonPage/usePageActions.d.ts +2 -0
- package/es/components/commonPage/usePageActions.mjs +66 -0
- package/es/components/commonPage/usePageActions.mjs.map +1 -0
- package/es/components/commonPage/usePagePreferences.d.ts +3 -0
- package/es/components/commonPage/usePagePreferences.mjs +54 -0
- package/es/components/commonPage/usePagePreferences.mjs.map +1 -0
- package/es/components/commonPage/utils.d.ts +4 -0
- package/es/components/commonPage/utils.mjs +11 -0
- package/es/components/commonPage/utils.mjs.map +1 -0
- package/es/components/commonSetter/components/draggableList/index.d.ts +31 -0
- package/es/components/commonSetter/components/draggableList/index.mjs +113 -0
- package/es/components/commonSetter/components/draggableList/index.mjs.map +1 -0
- package/es/components/commonSetter/components/draggableList/index.module.mjs +4 -0
- package/es/components/commonSetter/components/draggableList/index.module.mjs.map +1 -0
- package/es/components/commonSetter/constants.d.ts +7 -0
- package/es/components/commonSetter/constants.mjs +10 -0
- package/es/components/commonSetter/constants.mjs.map +1 -0
- package/es/components/commonSetter/index.d.ts +31 -0
- package/es/components/commonSetter/index.mjs +108 -0
- package/es/components/commonSetter/index.mjs.map +1 -0
- package/es/components/commonSetter/index.module.mjs +4 -0
- package/es/components/commonSetter/index.module.mjs.map +1 -0
- package/es/components/commonTable/constants.d.ts +11 -0
- package/es/components/commonTable/constants.mjs +14 -0
- package/es/components/commonTable/constants.mjs.map +1 -0
- package/es/components/commonTable/index.d.ts +22 -0
- package/es/components/commonTable/index.mjs +140 -0
- package/es/components/commonTable/index.mjs.map +1 -0
- package/es/components/commonTable/index.module.mjs +4 -0
- package/es/components/commonTable/index.module.mjs.map +1 -0
- package/es/components/commonTable/interfaces.d.ts +54 -0
- package/es/components/commonTable/interfaces.mjs +2 -0
- package/es/components/commonTable/interfaces.mjs.map +1 -0
- package/es/components/commonTable/props.d.ts +71 -0
- package/es/components/commonTable/props.mjs +72 -0
- package/es/components/commonTable/props.mjs.map +1 -0
- package/es/components/commonTable/usePagination.d.ts +3 -0
- package/es/components/commonTable/usePagination.mjs +41 -0
- package/es/components/commonTable/usePagination.mjs.map +1 -0
- package/es/components/commonTable/utils.d.ts +3 -0
- package/es/components/commonTable/utils.mjs +12 -0
- package/es/components/commonTable/utils.mjs.map +1 -0
- package/es/components/elIconPlus/index.d.ts +15 -0
- package/es/components/elIconPlus/index.mjs +31 -0
- package/es/components/elIconPlus/index.mjs.map +1 -0
- package/es/components/formTabs/index.d.ts +35 -0
- package/es/components/formTabs/index.mjs +60 -0
- package/es/components/formTabs/index.mjs.map +1 -0
- package/es/components/formilyCmps/formTab/index.mjs +1 -5
- package/es/components/formilyCmps/formTab/index.mjs.map +1 -1
- package/es/components/formilyCmps/formilyForm/index.d.ts +1 -1
- package/es/components/formilyCmps/formilyForm/index.mjs +2 -2
- package/es/components/formilyCmps/formilyForm/index.mjs.map +1 -1
- package/es/components/formilyCmps/formilyForm/interfaces.d.ts +2 -2
- package/es/components/formilyCmps/formilyForm/utils.d.ts +1 -1
- package/es/components/formilyCmps/formilyForm/utils.mjs.map +1 -1
- package/es/components/formilyCmps/sectionTitle/index.mjs.map +1 -1
- package/es/components/fragment/index.d.ts +4 -0
- package/es/components/fragment/index.mjs +16 -0
- package/es/components/fragment/index.mjs.map +1 -0
- package/es/components/iconFont/index.d.ts +36 -0
- package/es/components/iconFont/index.mjs +44 -0
- package/es/components/iconFont/index.mjs.map +1 -0
- package/es/components/index.d.ts +19 -0
- package/es/components/index.mjs +14 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/radioGroup/index.d.ts +9 -9
- package/es/components/space/index.d.ts +4 -4
- package/es/components/space/index.mjs +2 -2
- package/es/components/space/index.mjs.map +1 -1
- package/es/components/upload/formilyUpload.d.ts +73 -0
- package/es/components/upload/formilyUpload.mjs +90 -0
- package/es/components/upload/formilyUpload.mjs.map +1 -0
- package/es/components/upload/index.d.ts +271 -0
- package/es/components/upload/index.mjs +19 -0
- package/es/components/upload/index.mjs.map +1 -0
- package/es/components/upload/index.module.mjs +4 -0
- package/es/components/upload/index.module.mjs.map +1 -0
- package/es/components/upload/modalUpload.d.ts +36 -0
- package/es/components/upload/modalUpload.mjs +67 -0
- package/es/components/upload/modalUpload.mjs.map +1 -0
- package/es/components/upload/upload.d.ts +76 -0
- package/es/components/upload/upload.mjs +91 -0
- package/es/components/upload/upload.mjs.map +1 -0
- package/es/index.d.ts +13 -1
- package/es/index.mjs +14 -0
- package/es/index.mjs.map +1 -1
- package/es/interfaces/commonPage.d.ts +2 -2
- package/es/styles/index.css +253 -6
- package/es/utils/common.mjs.map +1 -1
- package/es/utils/shared.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import 'vue-json-pretty/lib/styles.css';
|
|
2
|
+
export declare const CommonJsonPretty: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export declare const FormilyCommonJsonPretty: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const _default: {
|
|
9
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
12
|
+
P: {};
|
|
13
|
+
B: {};
|
|
14
|
+
D: {};
|
|
15
|
+
C: {};
|
|
16
|
+
M: {};
|
|
17
|
+
Defaults: {};
|
|
18
|
+
}, Readonly<{}> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}>, {}, {}, {}, {}>;
|
|
21
|
+
__isFragment?: never;
|
|
22
|
+
__isTeleport?: never;
|
|
23
|
+
__isSuspense?: never;
|
|
24
|
+
} & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
27
|
+
FormilyCommonJsonPretty: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent, h } from 'vue';
|
|
2
|
+
import { connect, mapProps } from '@formily/vue';
|
|
3
|
+
import VueJsonPretty from 'vue-json-pretty';
|
|
4
|
+
import 'vue-json-pretty/lib/styles.css';
|
|
5
|
+
import { composeExpose } from '../../utils/shared.mjs';
|
|
6
|
+
|
|
7
|
+
const CommonJsonPretty = defineComponent({
|
|
8
|
+
name: "CommonJsonPretty",
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
setup(_, { attrs }) {
|
|
11
|
+
return () => h(VueJsonPretty, { ...attrs });
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
const FormilyCommonJsonPretty = connect(CommonJsonPretty, mapProps({ value: "data" }));
|
|
15
|
+
var index = composeExpose(CommonJsonPretty, {
|
|
16
|
+
FormilyCommonJsonPretty
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export { CommonJsonPretty, FormilyCommonJsonPretty, index as default };
|
|
20
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/commonJsonPretty/index.ts"],"sourcesContent":["import { defineComponent, h } from 'vue'\nimport { connect, mapProps } from '@formily/vue'\nimport VueJsonPretty from 'vue-json-pretty'\nimport 'vue-json-pretty/lib/styles.css'\nimport { composeExpose } from '../../utils/shared'\n\nexport const CommonJsonPretty = defineComponent({\n name: 'CommonJsonPretty',\n inheritAttrs: false,\n setup(_, { attrs }) {\n return () => h(VueJsonPretty, { ...attrs })\n },\n})\n\nexport const FormilyCommonJsonPretty = connect(CommonJsonPretty, mapProps({ value: 'data' }))\n\nexport default composeExpose(CommonJsonPretty, {\n FormilyCommonJsonPretty,\n})\n"],"names":[],"mappings":";;;;;;AAMO,MAAM,mBAAmB,eAAgB,CAAA;AAAA,EAC9C,IAAM,EAAA,kBAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAAA,EACd,KAAM,CAAA,CAAA,EAAG,EAAE,KAAA,EAAS,EAAA;AAClB,IAAA,OAAO,MAAM,CAAE,CAAA,aAAA,EAAe,EAAE,GAAG,OAAO,CAAA,CAAA;AAAA,GAC5C;AACF,CAAC,EAAA;AAEY,MAAA,uBAAA,GAA0B,QAAQ,gBAAkB,EAAA,QAAA,CAAS,EAAE,KAAO,EAAA,MAAA,EAAQ,CAAC,EAAA;AAE5F,YAAe,cAAc,gBAAkB,EAAA;AAAA,EAC7C,uBAAA;AACF,CAAC,CAAA;;;;"}
|
|
@@ -33,8 +33,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
33
33
|
default: boolean;
|
|
34
34
|
};
|
|
35
35
|
}>> & Readonly<{}>, {
|
|
36
|
-
value: string[];
|
|
37
36
|
disabled: boolean;
|
|
37
|
+
value: string[];
|
|
38
38
|
options: ILocationItem[];
|
|
39
39
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
40
40
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/commonLocations/index.tsx"],"sourcesContent":["import { defineComponent, watch } from 'vue'\nimport { useLocations } from './useLocations'\nimport { valueKey } from './constants'\nimport styles from './index.module.scss'\n\nimport type { PropType } from 'vue'\nimport type { ILocationItem } from './interfaces'\n\nconst props = {\n /** value */\n value: {\n type: Array as PropType<string[]>,\n default: () =>
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/commonLocations/index.tsx"],"sourcesContent":["import { defineComponent, watch } from 'vue'\nimport { useLocations } from './useLocations'\nimport { valueKey } from './constants'\nimport styles from './index.module.scss'\n\nimport type { PropType } from 'vue'\nimport type { ILocationItem } from './interfaces'\n\nconst props = {\n /** value */\n value: {\n type: Array as PropType<string[]>,\n default: () => [],\n },\n /** 主要用于做数据回显 */\n options: {\n type: Array as PropType<ILocationItem[]>,\n default: () => [],\n },\n /** 禁用 */\n disabled: {\n type: Boolean,\n default: false,\n },\n}\n\nexport default defineComponent({\n name: 'Locations',\n props,\n setup(props, { emit }) {\n const { locations, allLocations } = useLocations(props)\n\n /** 配合formily的value/change模式 */\n watch(\n () => allLocations.value.selectedChildren,\n (val) => {\n emit('change', val)\n },\n )\n\n return () => {\n return (\n <el-space\n class={styles.container}\n direction='column'\n alignment='space-between'\n fill={true}\n style={{ padding: '0 16px' }}\n >\n {Object.entries(locations.value)\n .sort(([aKey]) => (aKey === 'all' ? -1 : 0))\n .map(([k, v]) => (\n <div\n style={{\n width: '100%',\n display: 'flex',\n alignItems: 'flex-start',\n justifyContent: 'space-between',\n }}\n >\n <el-checkbox\n v-model={v.isAllChecked}\n indeterminate={v.isHalfChecked}\n disabled={props.disabled}\n onChange={v.onChange}\n >\n {v.label}\n </el-checkbox>\n <el-checkbox-group\n v-model={v.selectedChildren}\n disabled={props.disabled}\n style={{\n width: 'calc(100% - 132px - 8px)',\n }}\n >\n {v.children.map((v1) => (\n <el-checkbox\n key={v1.label}\n label={v1.label}\n value={v1[valueKey]}\n {...(v.label === '全选' ? { indeterminate: v1.isHalfChecked } : {})}\n onChange={v1.onChange}\n >\n {v1.label}\n </el-checkbox>\n ))}\n </el-checkbox-group>\n </div>\n ))}\n </el-space>\n )\n }\n },\n})\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","props","value","type","Array","default","options","disabled","Boolean","defineComponent","name","setup","emit","locations","allLocations","useLocations","watch","selectedChildren","val","_slot2","_createVNode","_resolveComponent","styles","container","padding","entries","sort","aKey","map","k","v","_slot","width","display","alignItems","justifyContent","isAllChecked","$event","isHalfChecked","onChange","label","children","v1","_mergeProps","valueKey","indeterminate"],"mappings":";;;;;AAGwC,SAAAA,QAAAC,CAAA,EAAA;AAAA,EAAA,OAAA,OAAAA,CAAAA,KAAA,UAAAC,IAAAA,MAAAA,CAAAC,SAAAC,CAAAA,QAAAA,CAAAC,IAAAJ,CAAAA,CAAA,CAAAK,KAAAA,iBAAAA,IAAAA,CAAAA,OAAAA,CAAAL,CAAA,CAAA,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AAAA,CAASb,GAAKc,CAAAA,CAAAA,EAAAA,KAAEtB,WAAAC,CAAAA,gBAAAA,iBAAAsB,UAAA,CAAA;AAAA,UAAA,OAEVD,EAAGF,CAAAA,KAAAA;AAAAA,UAAK,SACNE,EAAGF,CAAAA,KAAAA;AAAAA,UAAK,OAAA,EACRE,GAAGE,QAAQ,CAAA;AAAA,SAAC,EACdd,CAAEU,CAAAA,KAAAA,KAAU,cAAO,GAAA;AAAA,UAAEK,eAAeH,EAAGJ,CAAAA,aAAAA;AAAAA,SAAc,GAAI,EAAE,EAAA;AAAA,UAAA,YACtDI,EAAGH,CAAAA,QAAAA;AAAAA,SAAQ,CAAA,EAAA;AAAA,UAAAlC,OAAAA,EAAAA,MAEpBqC,CAAAA,EAAAA,CAAGF,KAAK,CAAA;AAAA,SAEZ,CAAA,CAAC,CAAA,GAAAT,KAAA,GAAA;AAAA,UAAA1B,OAAAA,EAAAA,MAAA,CAAA0B,KAAA,CAAA;AAAA,SAAA,CAAA,CAAA,CAAA,CAAA;AAAA,OAGP,CAAC,CAAA,GAAAZ,MAAA,GAAA;AAAA,QAAAd,OAAAA,EAAAA,MAAA,CAAAc,MAAA,CAAA;AAAA,OAAA,CAAA,CAAA;AAAA,KAGV,CAAA;AAAA,GACF;AACF,CAAC,CAAA;;;;"}
|
|
@@ -9,7 +9,9 @@ const getUtils = (locations, allLocations) => {
|
|
|
9
9
|
const target = (_a = locations.value.all) == null ? void 0 : _a.children.find((v) => v[key] === curItem[key]);
|
|
10
10
|
const index = (_b = locations.value.all) == null ? void 0 : _b.selectedChildren.findIndex((v) => v === target[valueKey]);
|
|
11
11
|
const sameAsnLeafs = allLocations.value.children.filter((v) => v[key] === target[key]);
|
|
12
|
-
const selectedLeafs = sameAsnLeafs.filter(
|
|
12
|
+
const selectedLeafs = sameAsnLeafs.filter(
|
|
13
|
+
(v) => allLocations.value.selectedChildren.includes(v[valueKey])
|
|
14
|
+
);
|
|
13
15
|
if (!(selectedLeafs == null ? void 0 : selectedLeafs.length)) {
|
|
14
16
|
target.isAllChecked = false;
|
|
15
17
|
target.isHalfChecked = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sources":["../../../../../packages/components/commonLocations/utils.ts"],"sourcesContent":["import { Type, TypeKey, valueKey } from './constants'\n\nimport type { Ref, ComputedRef } from 'vue'\nimport type {
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../../../../packages/components/commonLocations/utils.ts"],"sourcesContent":["import { Type, TypeKey, valueKey } from './constants'\n\nimport type { Ref, ComputedRef } from 'vue'\nimport type { ILocations, ILocationItem, ISelectedData } from './interfaces'\n\n/** 获取状态检查函数 */\nexport const getUtils = (locations: Ref<ILocations>, allLocations: ComputedRef<ISelectedData>) => {\n return {\n /** 运营商选中状态检查【运营商节点和all节点】 */\n ispNodeOnCheck(curItem: ILocationItem, type: Type) {\n /** 因为运营商的唯一值是asn,其余的叶子节点唯一值是regionId,所以在这里如果要把运营商模拟为叶子结点的话,需要把asn填进regionId */\n const key = TypeKey[type]\n const target = locations.value.all?.children.find((v) => v[key] === curItem[key]) // 当前节点\n const index = locations.value.all?.selectedChildren.findIndex((v) => v === target[valueKey]) // 当前节点在selectedChildren中的下标\n const sameAsnLeafs = allLocations.value.children.filter((v) => v[key] === target[key]) // 所有本运营商的leaf节点\n const selectedLeafs = sameAsnLeafs.filter((v) =>\n allLocations.value.selectedChildren.includes(v[valueKey]),\n ) // 本运营商中被选中的leaf节点\n if (!selectedLeafs?.length) {\n target.isAllChecked = false\n target.isHalfChecked = false\n if (locations.value.all?.selectedChildren.includes(target[valueKey])) {\n locations.value.all?.selectedChildren.splice(index, 1)\n }\n } else if (selectedLeafs.length > 0 && selectedLeafs?.length < sameAsnLeafs.length) {\n target.isAllChecked = false\n target.isHalfChecked = true\n if (locations.value.all?.selectedChildren.includes(target[valueKey])) {\n locations.value.all?.selectedChildren.splice(index, 1)\n }\n } else if (selectedLeafs.length === sameAsnLeafs.length) {\n target.isAllChecked = true\n target.isHalfChecked = false\n if (!locations.value.all?.selectedChildren.includes(target[valueKey])) {\n locations.value.all?.selectedChildren.push(target[valueKey])\n }\n }\n },\n /** 组节点选中状态检查 */\n groupNodeOnCheck(curItem: ILocationItem, type: Type) {\n const key = TypeKey[type]\n const target = locations.value[curItem[key]]\n if (!target.selectedChildren?.length) {\n target.isAllChecked = false\n target.isHalfChecked = false\n } else if (\n target.selectedChildren?.length > 0 &&\n target.selectedChildren?.length < target.children?.length\n ) {\n target.isAllChecked = false\n target.isHalfChecked = true\n } else if (target.selectedChildren?.length === target.children?.length) {\n target.isAllChecked = true\n target.isHalfChecked = false\n }\n },\n /** 全选节点选中状态检查 */\n allNodeOnCheck() {\n if (!allLocations.value.selectedChildren.length) {\n locations.value.all.isAllChecked = false\n locations.value.all.isHalfChecked = false\n } else if (\n allLocations.value.selectedChildren.length > 0 &&\n allLocations.value.selectedChildren.length < allLocations.value.children?.length\n ) {\n locations.value.all.isAllChecked = false\n locations.value.all.isHalfChecked = true\n } else if (\n allLocations.value.selectedChildren.length === allLocations.value.children?.length\n ) {\n locations.value.all.isAllChecked = true\n locations.value.all.isHalfChecked = false\n }\n },\n /** 调用组节点/运营商节点/全选节点的onCheck */\n dispatchAllNodesOnCheck() {\n ;(locations.value.all?.children || []).forEach((v) => v.onCheck())\n Object.entries(locations.value).forEach(([k, v]) => v.onCheck())\n },\n }\n}\n"],"names":[],"mappings":";;AAMa,MAAA,QAAA,GAAW,CAAC,SAAA,EAA4B,YAA6C,KAAA;AAChG,EAAO,OAAA;AAAA;AAAA,IAEL,cAAA,CAAe,SAAwB,IAAY,EAAA;AATvD,MAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AAWM,MAAM,MAAA,GAAA,GAAM,QAAQ,IAAI,CAAA,CAAA;AACxB,MAAA,MAAM,MAAS,GAAA,CAAA,EAAA,GAAA,SAA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ACjE;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export * from './interfaces';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
/** 标题 */
|
|
4
|
+
title: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
/** 宽度 */
|
|
9
|
+
size: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
/** 标题 */
|
|
15
|
+
title: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
/** 宽度 */
|
|
20
|
+
size: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{
|
|
25
|
+
onClose?: (...args: any[]) => any;
|
|
26
|
+
}>, {
|
|
27
|
+
title: string;
|
|
28
|
+
size: string;
|
|
29
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineComponent, ref, createVNode } from 'vue';
|
|
2
|
+
import { ElDialog } from 'element-plus';
|
|
3
|
+
import styles from './index.module.mjs';
|
|
4
|
+
|
|
5
|
+
const props = {
|
|
6
|
+
/** 标题 */
|
|
7
|
+
title: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
/** 宽度 */
|
|
12
|
+
size: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "42%"
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var CommonModal = defineComponent({
|
|
18
|
+
name: "CommonEditor",
|
|
19
|
+
props,
|
|
20
|
+
emits: ["close"],
|
|
21
|
+
setup(props2, {
|
|
22
|
+
emit,
|
|
23
|
+
expose,
|
|
24
|
+
slots
|
|
25
|
+
}) {
|
|
26
|
+
const visible = ref(false);
|
|
27
|
+
const onClose = () => {
|
|
28
|
+
emit("close");
|
|
29
|
+
};
|
|
30
|
+
const open = () => {
|
|
31
|
+
visible.value = true;
|
|
32
|
+
};
|
|
33
|
+
const close = () => {
|
|
34
|
+
visible.value = false;
|
|
35
|
+
};
|
|
36
|
+
expose({
|
|
37
|
+
open,
|
|
38
|
+
close
|
|
39
|
+
});
|
|
40
|
+
return () => createVNode(ElDialog, {
|
|
41
|
+
"modelValue": visible.value,
|
|
42
|
+
"onUpdate:modelValue": (modelValue) => {
|
|
43
|
+
visible.value = modelValue;
|
|
44
|
+
},
|
|
45
|
+
"title": props2.title || "\u9ED8\u8BA4\u6807\u9898",
|
|
46
|
+
"width": props2.size,
|
|
47
|
+
"class": styles.container,
|
|
48
|
+
"bodyClass": styles.content,
|
|
49
|
+
"destroyOnClose": true,
|
|
50
|
+
"onClose": onClose
|
|
51
|
+
}, slots);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export { CommonModal as default };
|
|
56
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/commonModal/index.tsx"],"sourcesContent":["import { defineComponent, ref } from 'vue'\nimport { ElDialog } from 'element-plus'\nimport styles from './index.module.scss'\n\nimport type { ICommonModalExpose } from './interfaces'\n\nconst props = {\n /** 标题 */\n title: {\n type: String,\n default: '',\n },\n /** 宽度 */\n size: {\n type: String,\n default: '42%',\n },\n}\n\nexport * from './interfaces'\nexport default defineComponent({\n name: 'CommonEditor',\n props,\n emits: ['close'],\n setup(props, { emit, expose, slots }) {\n const visible = ref(false)\n const onClose = () => {\n emit('close')\n }\n const open = () => {\n visible.value = true\n }\n const close = () => {\n visible.value = false\n }\n expose<ICommonModalExpose>({ open, close })\n return () => (\n <ElDialog\n modelValue={visible.value}\n onUpdate:modelValue={(modelValue: boolean) => {\n visible.value = modelValue\n }}\n title={props.title || '默认标题'}\n width={props.size}\n class={styles.container}\n bodyClass={styles.content}\n destroyOnClose\n onClose={onClose}\n v-slots={slots}\n />\n )\n },\n})\n"],"names":["props","title","type","String","default","size","defineComponent","name","emits","setup","emit","expose","slots","visible","ref","onClose","open","value","close","_createVNode","ElDialog","modelValue","styles","container","content"],"mappings":";;;;AAMA,MAAMA,KAAQ,GAAA;AAAA;AAAA,EAEZC,KAAO,EAAA;AAAA,IACLC,IAAMC,EAAAA,MAAAA;AAAAA,IACNC,OAAS,EAAA,EAAA;AAAA,GACX;AAAA;AAAA,EAEAC,IAAM,EAAA;AAAA,IACJH,IAAMC,EAAAA,MAAAA;AAAAA,IACNC,OAAS,EAAA,KAAA;AAAA,GACX;AACF,CAAA,CAAA;AAGA,kBAAeE,eAAgB,CAAA;AAAA,EAC7BC,IAAM,EAAA,cAAA;AAAA,EACNP,KAAAA;AAAAA,EACAQ,KAAAA,EAAO,CAAC,OAAO,CAAA;AAAA,EACfC,MAAMT,MAAO,EAAA;AAAA,IAAEU,IAAAA;AAAAA,IAAMC,MAAAA;AAAAA,IAAQC,KAAAA;AAAAA,GAAS,EAAA;AACpC,IAAMC,MAAAA,OAAAA,GAAUC,IAAI,KAAK,CAAA,CAAA;AACzB,IAAA,MAAMC,UAAUA,MAAM;AACpBL,MAAAA,IAAAA,CAAK,OAAO,CAAA,CAAA;AAAA,KACd,CAAA;AACA,IAAA,MAAMM,OAAOA,MAAM;AACjBH,MAAAA,OAAAA,CAAQI,KAAQ,GAAA,IAAA,CAAA;AAAA,KAClB,CAAA;AACA,IAAA,MAAMC,QAAQA,MAAM;AAClBL,MAAAA,OAAAA,CAAQI,KAAQ,GAAA,KAAA,CAAA;AAAA,KAClB,CAAA;AACAN,IAA2B,MAAA,CAAA;AAAA,MAAEK,IAAAA;AAAAA,MAAME,KAAAA;AAAAA,KAAO,CAAA,CAAA;AAC1C,IAAO,OAAA,MAAAC,YAAAC,QAAA,EAAA;AAAA,MAAA,cAESP,OAAQI,CAAAA,KAAAA;AAAAA,MAAK,uBACHI,CAAwB,UAAA,KAAA;AAC5CR,QAAAA,OAAAA,CAAQI,KAAQI,GAAAA,UAAAA,CAAAA;AAAAA,OAClB;AAAA,MAAC,OAAA,EACMrB,OAAMC,KAAS,IAAA,0BAAA;AAAA,MAAM,SACrBD,MAAMK,CAAAA,IAAAA;AAAAA,MAAI,SACViB,MAAOC,CAAAA,SAAAA;AAAAA,MAAS,aACZD,MAAOE,CAAAA,OAAAA;AAAAA,MAAO,gBAAA,EAAA,IAAA;AAAA,MAAA,SAEhBT,EAAAA,OAAAA;AAAAA,OACAH,KAAK,CAAA,CAAA;AAAA,GAGpB;AACF,CAAC,CAAA;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var styles = {"menuText":"#41464f","menuActiveText":"#007dff","subMenuActiveText":"#007dff","menuBg":"#f0f3f7","menuHover":"rgba(0, 125, 255, 0.1019607843)","subMenuBg":"#fff","subMenuHover":"#e6edfa","sideBarWidth":"220px","primaryColor":"#007dff","mainHorizontalPadding":"20px","container":"index-module_container__i8ob4","content":"index-module_content__LREdw"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
4
|
+
//# sourceMappingURL=index.module.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** commonFilter的provide key */
|
|
2
|
+
export declare const COMMON_FILTER_INJECTION_KEY = "COMMON_FILTER_INJECTION_KEY";
|
|
3
|
+
/** 页面偏好类型 */
|
|
4
|
+
export declare enum Common_Page_Preferences_Type {
|
|
5
|
+
/** 筛选项 */
|
|
6
|
+
FILTER = "FILTER",
|
|
7
|
+
/** 表格列 */
|
|
8
|
+
COLUMN = "COLUMN"
|
|
9
|
+
}
|
|
10
|
+
/** 页面偏好类型到key的映射 */
|
|
11
|
+
export declare const pagePreferencesToKeyMap: {
|
|
12
|
+
/** 筛选项 */
|
|
13
|
+
readonly FILTER: "filters";
|
|
14
|
+
/** 表格列 */
|
|
15
|
+
readonly COLUMN: "columns";
|
|
16
|
+
};
|
|
17
|
+
/** 页面偏好标识 */
|
|
18
|
+
export declare const PAGE_PREFERENCES_KEY = "PagePreferences";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const COMMON_FILTER_INJECTION_KEY = "COMMON_FILTER_INJECTION_KEY";
|
|
2
|
+
var Common_Page_Preferences_Type = /* @__PURE__ */ ((Common_Page_Preferences_Type2) => {
|
|
3
|
+
Common_Page_Preferences_Type2["FILTER"] = "FILTER";
|
|
4
|
+
Common_Page_Preferences_Type2["COLUMN"] = "COLUMN";
|
|
5
|
+
return Common_Page_Preferences_Type2;
|
|
6
|
+
})(Common_Page_Preferences_Type || {});
|
|
7
|
+
const pagePreferencesToKeyMap = {
|
|
8
|
+
/** 筛选项 */
|
|
9
|
+
["FILTER" /* FILTER */]: "filters",
|
|
10
|
+
/** 表格列 */
|
|
11
|
+
["COLUMN" /* COLUMN */]: "columns"
|
|
12
|
+
};
|
|
13
|
+
const PAGE_PREFERENCES_KEY = "PagePreferences";
|
|
14
|
+
|
|
15
|
+
export { COMMON_FILTER_INJECTION_KEY, Common_Page_Preferences_Type, PAGE_PREFERENCES_KEY, pagePreferencesToKeyMap };
|
|
16
|
+
//# sourceMappingURL=constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../../../../packages/components/commonPage/constants.ts"],"sourcesContent":["/** commonFilter的provide key */\nexport const COMMON_FILTER_INJECTION_KEY = 'COMMON_FILTER_INJECTION_KEY'\n\n/** 页面偏好类型 */\nexport enum Common_Page_Preferences_Type {\n /** 筛选项 */\n FILTER = 'FILTER',\n /** 表格列 */\n COLUMN = 'COLUMN',\n}\n\n/** 页面偏好类型到key的映射 */\nexport const pagePreferencesToKeyMap = {\n /** 筛选项 */\n [Common_Page_Preferences_Type.FILTER]: 'filters',\n /** 表格列 */\n [Common_Page_Preferences_Type.COLUMN]: 'columns',\n} as const\n\n/** 页面偏好标识 */\nexport const PAGE_PREFERENCES_KEY = 'PagePreferences'\n"],"names":["Common_Page_Preferences_Type"],"mappings":"AACO,MAAM,2BAA8B,GAAA,8BAAA;AAG/B,IAAA,4BAAA,qBAAAA,6BAAL,KAAA;AAEL,EAAAA,8BAAA,QAAS,CAAA,GAAA,QAAA,CAAA;AAET,EAAAA,8BAAA,QAAS,CAAA,GAAA,QAAA,CAAA;AAJC,EAAAA,OAAAA,6BAAAA,CAAAA;AAAA,CAAA,EAAA,4BAAA,IAAA,EAAA,EAAA;AAQL,MAAM,uBAA0B,GAAA;AAAA;AAAA,EAErC,CAAC,wBAAsC,SAAA;AAAA;AAAA,EAEvC,CAAC,wBAAsC,SAAA;AACzC,EAAA;AAGO,MAAM,oBAAuB,GAAA;;;;"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import type { PropType, Ref, VNode } from 'vue';
|
|
2
|
+
import type { IListApi, ICommonObj } from '../../interfaces/common';
|
|
3
|
+
import type { IField } from '../../interfaces/commonPage';
|
|
4
|
+
import type { IExpose, IExpandedRowRenderParams } from './interfaces';
|
|
5
|
+
import type { IEditorLayout } from '../commonEditor';
|
|
6
|
+
export * from './constants';
|
|
7
|
+
export * from '../commonEditor/constants';
|
|
8
|
+
export type { IField, IExpose };
|
|
9
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
|
+
/** fields */
|
|
11
|
+
fields: {
|
|
12
|
+
type: PropType<IField[] | Ref<IField[]>>;
|
|
13
|
+
default: () => any[];
|
|
14
|
+
};
|
|
15
|
+
/** 获取列表 */
|
|
16
|
+
listApi: {
|
|
17
|
+
type: PropType<IListApi>;
|
|
18
|
+
default: any;
|
|
19
|
+
};
|
|
20
|
+
/** 创建 */
|
|
21
|
+
createApi: {
|
|
22
|
+
type: PropType<(p: ICommonObj) => Promise<ICommonObj>>;
|
|
23
|
+
default: any;
|
|
24
|
+
};
|
|
25
|
+
/** 编辑 */
|
|
26
|
+
editApi: {
|
|
27
|
+
type: PropType<(p: ICommonObj) => Promise<ICommonObj>>;
|
|
28
|
+
default: any;
|
|
29
|
+
};
|
|
30
|
+
/** 下载 */
|
|
31
|
+
downloadApi: {
|
|
32
|
+
type: PropType<(p?: ICommonObj) => Promise<ICommonObj>>;
|
|
33
|
+
default: any;
|
|
34
|
+
};
|
|
35
|
+
/** 导出 */
|
|
36
|
+
exportApi: {
|
|
37
|
+
type: PropType<(p?: ICommonObj) => Promise<ICommonObj>>;
|
|
38
|
+
default: any;
|
|
39
|
+
};
|
|
40
|
+
/** 格式化列表接口入参 */
|
|
41
|
+
formatListParams: {
|
|
42
|
+
type: PropType<(p: any) => any>;
|
|
43
|
+
default: any;
|
|
44
|
+
};
|
|
45
|
+
/** 格式化创建&编辑接口入参 */
|
|
46
|
+
formatEditParams: {
|
|
47
|
+
type: PropType<(p: any) => any>;
|
|
48
|
+
default: any;
|
|
49
|
+
};
|
|
50
|
+
/** 格式化创建&编辑接口入参 */
|
|
51
|
+
formatExportParams: {
|
|
52
|
+
type: PropType<(p: any) => any>;
|
|
53
|
+
default: any;
|
|
54
|
+
};
|
|
55
|
+
/** 页面标识 */
|
|
56
|
+
pageKey: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
/** 行标识 */
|
|
61
|
+
rowKey: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
/** 可选择 */
|
|
66
|
+
selectable: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
/** 选择配置 */
|
|
71
|
+
selectOptions: {
|
|
72
|
+
type: PropType<(row?: any, index?: number) => boolean>;
|
|
73
|
+
default: () => boolean;
|
|
74
|
+
};
|
|
75
|
+
/** 选中值 */
|
|
76
|
+
selected: {
|
|
77
|
+
type: ArrayConstructor;
|
|
78
|
+
default: () => any[];
|
|
79
|
+
};
|
|
80
|
+
/** 表格展开区域渲染器 */
|
|
81
|
+
expandedRowRender: {
|
|
82
|
+
type: PropType<(p: IExpandedRowRenderParams) => VNode>;
|
|
83
|
+
default: any;
|
|
84
|
+
};
|
|
85
|
+
/** 需要分页 */
|
|
86
|
+
needPagination: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
90
|
+
/** 分页配置 */
|
|
91
|
+
paginationConfig: {
|
|
92
|
+
type: ObjectConstructor;
|
|
93
|
+
default: () => {};
|
|
94
|
+
};
|
|
95
|
+
/** 筛选区域栅格数量 */
|
|
96
|
+
filterColumns: {
|
|
97
|
+
type: NumberConstructor;
|
|
98
|
+
default: number;
|
|
99
|
+
};
|
|
100
|
+
/** 编辑器样式 */
|
|
101
|
+
editorLayout: {
|
|
102
|
+
type: PropType<IEditorLayout>;
|
|
103
|
+
default: () => {
|
|
104
|
+
columns: number;
|
|
105
|
+
labelStyle: {
|
|
106
|
+
width: string;
|
|
107
|
+
margin: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
/** 刷新 */
|
|
112
|
+
refreshable: {
|
|
113
|
+
type: BooleanConstructor;
|
|
114
|
+
default: boolean;
|
|
115
|
+
};
|
|
116
|
+
/** 单行操作栏 */
|
|
117
|
+
singleActionBar: {
|
|
118
|
+
type: BooleanConstructor;
|
|
119
|
+
default: boolean;
|
|
120
|
+
};
|
|
121
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
122
|
+
/** fields */
|
|
123
|
+
fields: {
|
|
124
|
+
type: PropType<IField[] | Ref<IField[]>>;
|
|
125
|
+
default: () => any[];
|
|
126
|
+
};
|
|
127
|
+
/** 获取列表 */
|
|
128
|
+
listApi: {
|
|
129
|
+
type: PropType<IListApi>;
|
|
130
|
+
default: any;
|
|
131
|
+
};
|
|
132
|
+
/** 创建 */
|
|
133
|
+
createApi: {
|
|
134
|
+
type: PropType<(p: ICommonObj) => Promise<ICommonObj>>;
|
|
135
|
+
default: any;
|
|
136
|
+
};
|
|
137
|
+
/** 编辑 */
|
|
138
|
+
editApi: {
|
|
139
|
+
type: PropType<(p: ICommonObj) => Promise<ICommonObj>>;
|
|
140
|
+
default: any;
|
|
141
|
+
};
|
|
142
|
+
/** 下载 */
|
|
143
|
+
downloadApi: {
|
|
144
|
+
type: PropType<(p?: ICommonObj) => Promise<ICommonObj>>;
|
|
145
|
+
default: any;
|
|
146
|
+
};
|
|
147
|
+
/** 导出 */
|
|
148
|
+
exportApi: {
|
|
149
|
+
type: PropType<(p?: ICommonObj) => Promise<ICommonObj>>;
|
|
150
|
+
default: any;
|
|
151
|
+
};
|
|
152
|
+
/** 格式化列表接口入参 */
|
|
153
|
+
formatListParams: {
|
|
154
|
+
type: PropType<(p: any) => any>;
|
|
155
|
+
default: any;
|
|
156
|
+
};
|
|
157
|
+
/** 格式化创建&编辑接口入参 */
|
|
158
|
+
formatEditParams: {
|
|
159
|
+
type: PropType<(p: any) => any>;
|
|
160
|
+
default: any;
|
|
161
|
+
};
|
|
162
|
+
/** 格式化创建&编辑接口入参 */
|
|
163
|
+
formatExportParams: {
|
|
164
|
+
type: PropType<(p: any) => any>;
|
|
165
|
+
default: any;
|
|
166
|
+
};
|
|
167
|
+
/** 页面标识 */
|
|
168
|
+
pageKey: {
|
|
169
|
+
type: StringConstructor;
|
|
170
|
+
default: string;
|
|
171
|
+
};
|
|
172
|
+
/** 行标识 */
|
|
173
|
+
rowKey: {
|
|
174
|
+
type: StringConstructor;
|
|
175
|
+
default: string;
|
|
176
|
+
};
|
|
177
|
+
/** 可选择 */
|
|
178
|
+
selectable: {
|
|
179
|
+
type: BooleanConstructor;
|
|
180
|
+
default: boolean;
|
|
181
|
+
};
|
|
182
|
+
/** 选择配置 */
|
|
183
|
+
selectOptions: {
|
|
184
|
+
type: PropType<(row?: any, index?: number) => boolean>;
|
|
185
|
+
default: () => boolean;
|
|
186
|
+
};
|
|
187
|
+
/** 选中值 */
|
|
188
|
+
selected: {
|
|
189
|
+
type: ArrayConstructor;
|
|
190
|
+
default: () => any[];
|
|
191
|
+
};
|
|
192
|
+
/** 表格展开区域渲染器 */
|
|
193
|
+
expandedRowRender: {
|
|
194
|
+
type: PropType<(p: IExpandedRowRenderParams) => VNode>;
|
|
195
|
+
default: any;
|
|
196
|
+
};
|
|
197
|
+
/** 需要分页 */
|
|
198
|
+
needPagination: {
|
|
199
|
+
type: BooleanConstructor;
|
|
200
|
+
default: boolean;
|
|
201
|
+
};
|
|
202
|
+
/** 分页配置 */
|
|
203
|
+
paginationConfig: {
|
|
204
|
+
type: ObjectConstructor;
|
|
205
|
+
default: () => {};
|
|
206
|
+
};
|
|
207
|
+
/** 筛选区域栅格数量 */
|
|
208
|
+
filterColumns: {
|
|
209
|
+
type: NumberConstructor;
|
|
210
|
+
default: number;
|
|
211
|
+
};
|
|
212
|
+
/** 编辑器样式 */
|
|
213
|
+
editorLayout: {
|
|
214
|
+
type: PropType<IEditorLayout>;
|
|
215
|
+
default: () => {
|
|
216
|
+
columns: number;
|
|
217
|
+
labelStyle: {
|
|
218
|
+
width: string;
|
|
219
|
+
margin: string;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
/** 刷新 */
|
|
224
|
+
refreshable: {
|
|
225
|
+
type: BooleanConstructor;
|
|
226
|
+
default: boolean;
|
|
227
|
+
};
|
|
228
|
+
/** 单行操作栏 */
|
|
229
|
+
singleActionBar: {
|
|
230
|
+
type: BooleanConstructor;
|
|
231
|
+
default: boolean;
|
|
232
|
+
};
|
|
233
|
+
}>> & Readonly<{}>, {
|
|
234
|
+
fields: IField[] | Ref<IField[], IField[]>;
|
|
235
|
+
pageKey: string;
|
|
236
|
+
rowKey: string;
|
|
237
|
+
listApi: IListApi;
|
|
238
|
+
formatListParams: (p: any) => any;
|
|
239
|
+
selectable: boolean;
|
|
240
|
+
selectOptions: (row?: any, index?: number) => boolean;
|
|
241
|
+
selected: unknown[];
|
|
242
|
+
expandedRowRender: (p: IExpandedRowRenderParams) => VNode;
|
|
243
|
+
paginationConfig: Record<string, any>;
|
|
244
|
+
needPagination: boolean;
|
|
245
|
+
createApi: (p: ICommonObj) => Promise<ICommonObj>;
|
|
246
|
+
editApi: (p: ICommonObj) => Promise<ICommonObj>;
|
|
247
|
+
formatEditParams: (p: any) => any;
|
|
248
|
+
downloadApi: (p?: ICommonObj) => Promise<ICommonObj>;
|
|
249
|
+
exportApi: (p?: ICommonObj) => Promise<ICommonObj>;
|
|
250
|
+
formatExportParams: (p: any) => any;
|
|
251
|
+
filterColumns: number;
|
|
252
|
+
editorLayout: IEditorLayout;
|
|
253
|
+
refreshable: boolean;
|
|
254
|
+
singleActionBar: boolean;
|
|
255
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
256
|
+
export default _default;
|