el-plus 0.0.19 → 0.0.21
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/CHANGELOG.md +12 -0
- package/dist/index.css +1 -1
- package/dist/index.full.js +107 -104
- package/dist/index.full.min.js +1 -1
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +1 -1
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +107 -104
- package/es/components/form/src/form-item-vue.d.ts +3 -0
- package/es/components/form/src/form-item.d.ts +1 -0
- package/es/components/form/src/form-item.mjs +2 -2
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/header/index.d.ts +3 -9
- package/es/components/header/src/header.d.ts +1 -2
- package/es/components/header/src/header.mjs +1 -2
- package/es/components/header/src/header.mjs.map +1 -1
- package/es/components/header/src/header.vue.d.ts +2 -5
- package/es/components/header/src/use-header.mjs +4 -7
- package/es/components/header/src/use-header.mjs.map +1 -1
- package/es/components/search-list-page/index.d.ts +0 -9
- package/es/components/search-list-page/src/search-list-page.d.ts +0 -3
- package/es/components/search-list-page/src/search-list-page.mjs +3 -6
- package/es/components/search-list-page/src/search-list-page.mjs.map +1 -1
- package/es/components/search-list-page/src/search-list-page.vue.d.ts +0 -6
- package/es/components/search-list-page/src/use-search-list-page.mjs +18 -18
- package/es/components/search-list-page/src/use-search-list-page.mjs.map +1 -1
- package/es/components/select/src/use-select.mjs +4 -4
- package/es/components/select/src/use-select.mjs.map +1 -1
- package/es/hooks/use-navigation.d.ts +5 -0
- package/es/hooks/use-navigation.mjs +14 -2
- package/es/hooks/use-navigation.mjs.map +1 -1
- package/es/package.json.mjs +1 -1
- package/lib/components/form/src/form-item-vue.d.ts +3 -0
- package/lib/components/form/src/form-item.d.ts +1 -0
- package/lib/components/form/src/form-item.js +2 -2
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/header/index.d.ts +3 -9
- package/lib/components/header/src/header.d.ts +1 -2
- package/lib/components/header/src/header.js +1 -2
- package/lib/components/header/src/header.js.map +1 -1
- package/lib/components/header/src/header.vue.d.ts +2 -5
- package/lib/components/header/src/use-header.js +3 -6
- package/lib/components/header/src/use-header.js.map +1 -1
- package/lib/components/search-list-page/index.d.ts +0 -9
- package/lib/components/search-list-page/src/search-list-page.d.ts +0 -3
- package/lib/components/search-list-page/src/search-list-page.js +3 -6
- package/lib/components/search-list-page/src/search-list-page.js.map +1 -1
- package/lib/components/search-list-page/src/search-list-page.vue.d.ts +0 -6
- package/lib/components/search-list-page/src/use-search-list-page.js +18 -18
- package/lib/components/search-list-page/src/use-search-list-page.js.map +1 -1
- package/lib/components/select/src/use-select.js +4 -4
- package/lib/components/select/src/use-select.js.map +1 -1
- package/lib/hooks/use-navigation.d.ts +5 -0
- package/lib/hooks/use-navigation.js +13 -1
- package/lib/hooks/use-navigation.js.map +1 -1
- package/lib/package.json.js +1 -1
- package/package.json +1 -1
- package/theme-chalk/base.css +1 -1
- package/theme-chalk/header.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/base.scss +1 -0
- package/theme-chalk/src/common/common.scss +4 -0
- package/theme-chalk/src/header.scss +1 -0
package/dist/index.full.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! ElPlus v0.0.
|
|
1
|
+
/*! ElPlus v0.0.21 */
|
|
2
2
|
|
|
3
3
|
import { useAttrs, getCurrentInstance, inject, provide, ref, nextTick, defineComponent, computed, createVNode, Fragment, withDirectives, resolveComponent, mergeProps, resolveDirective, useTemplateRef, createTextVNode, h, mergeModels, useModel, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createCommentVNode, withCtx, renderSlot, renderList, createBlock, vShow, toDisplayString, reactive, useSlots, watch, onMounted, createSlots, normalizeProps, guardReactiveProps, markRaw, Transition, shallowReactive, isVNode, render, createElementVNode, toRaw } from 'vue';
|
|
4
4
|
import { buttonProps, useLocale as useLocale$1, ElLoading, ElMessage, ElMessageBox, formProps as formProps$1, formEmits as formEmits$1, ElTooltip, formItemProps as formItemProps$1, ElFormItem, ElForm, ElRow, ElCol, inputProps as inputProps$1, inputEmits as inputEmits$1, ElDialog, ElButton, ElTable, ElIcon, selectProps as selectProps$1, selectEmits as selectEmits$1, ElPageHeader, datePickerProps, linkProps as linkProps$1 } from 'element-plus';
|
|
@@ -984,8 +984,8 @@ const useFormItemRules = (props) => {
|
|
|
984
984
|
|
|
985
985
|
const expandFormItemProps = {
|
|
986
986
|
type: {
|
|
987
|
-
type: String
|
|
988
|
-
|
|
987
|
+
type: String,
|
|
988
|
+
default: "EpInput"
|
|
989
989
|
},
|
|
990
990
|
col: Number,
|
|
991
991
|
render: Function,
|
|
@@ -2519,12 +2519,9 @@ const searchListPageProps = {
|
|
|
2519
2519
|
},
|
|
2520
2520
|
add: Function,
|
|
2521
2521
|
// 新增
|
|
2522
|
-
templateDownloadApi: String,
|
|
2523
|
-
//
|
|
2524
|
-
|
|
2525
|
-
// 导入
|
|
2526
|
-
exportApi: String,
|
|
2527
|
-
// 导出
|
|
2522
|
+
// templateDownloadApi: String, // 模板下载
|
|
2523
|
+
// importApi: String, // 导入
|
|
2524
|
+
// exportApi: String, // 导出
|
|
2528
2525
|
// 表格额外距离
|
|
2529
2526
|
offsetTop: {
|
|
2530
2527
|
type: Number,
|
|
@@ -2655,25 +2652,25 @@ const useButtons$1 = (props, { validate, resetFields, tableRef }) => {
|
|
|
2655
2652
|
onClick: () => {
|
|
2656
2653
|
props.add?.();
|
|
2657
2654
|
}
|
|
2658
|
-
},
|
|
2659
|
-
{
|
|
2660
|
-
name: t("ep.searchListPage.templateDownload"),
|
|
2661
|
-
prop: "templateDownload",
|
|
2662
|
-
permission: props.name ? `${props.name}:TEMPLATEDOWNLOAD` : "",
|
|
2663
|
-
show: !!props.templateDownloadApi
|
|
2664
|
-
},
|
|
2665
|
-
{
|
|
2666
|
-
name: t("ep.searchListPage.import"),
|
|
2667
|
-
prop: "import",
|
|
2668
|
-
permission: props.name ? `${props.name}:IMPORT` : "",
|
|
2669
|
-
show: !!props.importApi
|
|
2670
|
-
},
|
|
2671
|
-
{
|
|
2672
|
-
name: t("ep.searchListPage.export"),
|
|
2673
|
-
prop: "export",
|
|
2674
|
-
permission: props.name ? `${props.name}:EXPORT` : "",
|
|
2675
|
-
show: !!props.exportApi
|
|
2676
2655
|
}
|
|
2656
|
+
// {
|
|
2657
|
+
// name: t('ep.searchListPage.templateDownload'),
|
|
2658
|
+
// prop: 'templateDownload',
|
|
2659
|
+
// permission: props.name ? `${props.name}:TEMPLATEDOWNLOAD` : '',
|
|
2660
|
+
// show: !!props.templateDownloadApi,
|
|
2661
|
+
// },
|
|
2662
|
+
// {
|
|
2663
|
+
// name: t('ep.searchListPage.import'),
|
|
2664
|
+
// prop: 'import',
|
|
2665
|
+
// permission: props.name ? `${props.name}:IMPORT` : '',
|
|
2666
|
+
// show: !!props.importApi,
|
|
2667
|
+
// },
|
|
2668
|
+
// {
|
|
2669
|
+
// name: t('ep.searchListPage.export'),
|
|
2670
|
+
// prop: 'export',
|
|
2671
|
+
// permission: props.name ? `${props.name}:EXPORT` : '',
|
|
2672
|
+
// show: !!props.exportApi,
|
|
2673
|
+
// },
|
|
2677
2674
|
];
|
|
2678
2675
|
const list = mergeListByKey(defaultButtons, props.leftButtons);
|
|
2679
2676
|
if (props.customColumnModule) {
|
|
@@ -2871,13 +2868,13 @@ function useSelect(props, emit) {
|
|
|
2871
2868
|
};
|
|
2872
2869
|
const getSelectItem = (value) => {
|
|
2873
2870
|
if (Array.isArray(value)) {
|
|
2874
|
-
if (!
|
|
2875
|
-
return
|
|
2871
|
+
if (!customOptions.value) return [];
|
|
2872
|
+
return customOptions.value.filter((item) => {
|
|
2876
2873
|
return value.indexOf(item[props.valueKey]) > -1;
|
|
2877
2874
|
});
|
|
2878
2875
|
}
|
|
2879
|
-
if (!
|
|
2880
|
-
return
|
|
2876
|
+
if (!customOptions.value) return {};
|
|
2877
|
+
return customOptions.value.find((item) => {
|
|
2881
2878
|
return item[props.valueKey] === value;
|
|
2882
2879
|
}) || {};
|
|
2883
2880
|
};
|
|
@@ -3109,8 +3106,7 @@ const EpTitle = withInstall(_sfc_main$3);
|
|
|
3109
3106
|
const headerProps = {
|
|
3110
3107
|
// 页面模式
|
|
3111
3108
|
mode: {
|
|
3112
|
-
type: String
|
|
3113
|
-
default: "add"
|
|
3109
|
+
type: String
|
|
3114
3110
|
},
|
|
3115
3111
|
allowBack: {
|
|
3116
3112
|
type: Boolean,
|
|
@@ -3131,6 +3127,81 @@ const headerProps = {
|
|
|
3131
3127
|
};
|
|
3132
3128
|
const headerEmits = {};
|
|
3133
3129
|
|
|
3130
|
+
const useNavigation = () => {
|
|
3131
|
+
const router = useRouter();
|
|
3132
|
+
const $goto = (r) => {
|
|
3133
|
+
const item = {
|
|
3134
|
+
id: Date.now(),
|
|
3135
|
+
name: "",
|
|
3136
|
+
url: ""
|
|
3137
|
+
};
|
|
3138
|
+
const openTab = window.parent.openMenuSelect;
|
|
3139
|
+
if (r.url) {
|
|
3140
|
+
item.url = r.url;
|
|
3141
|
+
item.name = r.name;
|
|
3142
|
+
if (openTab) {
|
|
3143
|
+
openTab(item);
|
|
3144
|
+
} else {
|
|
3145
|
+
window.open(item.url);
|
|
3146
|
+
}
|
|
3147
|
+
return;
|
|
3148
|
+
}
|
|
3149
|
+
const routes = router.getRoutes() || [];
|
|
3150
|
+
const projectRootPath = window.location.pathname;
|
|
3151
|
+
const findRoute = (routes2, distRoute) => {
|
|
3152
|
+
let queen = [...routes2];
|
|
3153
|
+
while (queen.length) {
|
|
3154
|
+
const first = queen.shift();
|
|
3155
|
+
if (first.children) {
|
|
3156
|
+
queen = queen.concat(first.children);
|
|
3157
|
+
}
|
|
3158
|
+
if (first.name == distRoute.name) {
|
|
3159
|
+
return first;
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
};
|
|
3163
|
+
const route = findRoute(routes, r);
|
|
3164
|
+
if (route) {
|
|
3165
|
+
item.id = r.id || item.id;
|
|
3166
|
+
item.name = r.title || (window.$hxt ? window.$hxt(route.meta.title) : route.meta.title);
|
|
3167
|
+
item.url = `${projectRootPath}#${route.path}${qs.stringify(r.query, { encode: false })}`;
|
|
3168
|
+
if (openTab) {
|
|
3169
|
+
openTab(item);
|
|
3170
|
+
} else {
|
|
3171
|
+
router.push(r);
|
|
3172
|
+
}
|
|
3173
|
+
} else {
|
|
3174
|
+
console.error("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u7684\u8DEF\u7531");
|
|
3175
|
+
}
|
|
3176
|
+
};
|
|
3177
|
+
const $closeTag = () => {
|
|
3178
|
+
if (!window.parent.selectedRouterTags) {
|
|
3179
|
+
return;
|
|
3180
|
+
}
|
|
3181
|
+
const currentRouterTagIndex = window.parent.currentRouterTagIndex;
|
|
3182
|
+
const preIndex = window.parent.currentRouterTagIndex - 1;
|
|
3183
|
+
const currentTag = window.parent.selectedRouterTags[currentRouterTagIndex];
|
|
3184
|
+
const preTag = window.parent.selectedRouterTags[preIndex];
|
|
3185
|
+
window.parent?.closeTag?.(currentTag);
|
|
3186
|
+
window.parent?.openMenuSelect?.(preTag);
|
|
3187
|
+
};
|
|
3188
|
+
const mode = computed(() => {
|
|
3189
|
+
const { query } = useRoute();
|
|
3190
|
+
return query.mode;
|
|
3191
|
+
});
|
|
3192
|
+
const isBrowse = computed(() => mode.value === "browse");
|
|
3193
|
+
const isEdit = computed(() => mode.value === "edit");
|
|
3194
|
+
const isAdd = computed(() => mode.value === "add");
|
|
3195
|
+
return {
|
|
3196
|
+
$goto,
|
|
3197
|
+
$closeTag,
|
|
3198
|
+
mode,
|
|
3199
|
+
isBrowse,
|
|
3200
|
+
isEdit,
|
|
3201
|
+
isAdd
|
|
3202
|
+
};
|
|
3203
|
+
};
|
|
3204
|
+
|
|
3134
3205
|
const useHeader = (props, emit) => {
|
|
3135
3206
|
const router = useRouter();
|
|
3136
3207
|
const isShowBack = computed(() => {
|
|
@@ -3152,13 +3223,9 @@ const useHeader = (props, emit) => {
|
|
|
3152
3223
|
};
|
|
3153
3224
|
const useButtons = (props, emit) => {
|
|
3154
3225
|
const { t } = useLocale();
|
|
3226
|
+
const { mode: defaultMode } = useNavigation();
|
|
3155
3227
|
const mode = computed(() => {
|
|
3156
|
-
|
|
3157
|
-
let mode2 = props.mode;
|
|
3158
|
-
if (query.mode) {
|
|
3159
|
-
mode2 = query.mode;
|
|
3160
|
-
}
|
|
3161
|
-
return mode2;
|
|
3228
|
+
return props.mode || defaultMode;
|
|
3162
3229
|
});
|
|
3163
3230
|
let defaultButtons = [
|
|
3164
3231
|
{
|
|
@@ -3452,7 +3519,7 @@ var components = [
|
|
|
3452
3519
|
EpLink
|
|
3453
3520
|
];
|
|
3454
3521
|
|
|
3455
|
-
var version = "0.0.
|
|
3522
|
+
var version = "0.0.21";
|
|
3456
3523
|
|
|
3457
3524
|
var globalProperties = {
|
|
3458
3525
|
install(app) {
|
|
@@ -3524,70 +3591,6 @@ const useChooseDialog = (options = {}) => {
|
|
|
3524
3591
|
});
|
|
3525
3592
|
};
|
|
3526
3593
|
|
|
3527
|
-
const useNavigation = () => {
|
|
3528
|
-
const router = useRouter();
|
|
3529
|
-
const $goto = (r) => {
|
|
3530
|
-
const item = {
|
|
3531
|
-
id: Date.now(),
|
|
3532
|
-
name: "",
|
|
3533
|
-
url: ""
|
|
3534
|
-
};
|
|
3535
|
-
const openTab = window.parent.openMenuSelect;
|
|
3536
|
-
if (r.url) {
|
|
3537
|
-
item.url = r.url;
|
|
3538
|
-
item.name = r.name;
|
|
3539
|
-
if (openTab) {
|
|
3540
|
-
openTab(item);
|
|
3541
|
-
} else {
|
|
3542
|
-
window.open(item.url);
|
|
3543
|
-
}
|
|
3544
|
-
return;
|
|
3545
|
-
}
|
|
3546
|
-
const routes = router.getRoutes() || [];
|
|
3547
|
-
const projectRootPath = window.location.pathname;
|
|
3548
|
-
const findRoute = (routes2, distRoute) => {
|
|
3549
|
-
let queen = [...routes2];
|
|
3550
|
-
while (queen.length) {
|
|
3551
|
-
const first = queen.shift();
|
|
3552
|
-
if (first.children) {
|
|
3553
|
-
queen = queen.concat(first.children);
|
|
3554
|
-
}
|
|
3555
|
-
if (first.name == distRoute.name) {
|
|
3556
|
-
return first;
|
|
3557
|
-
}
|
|
3558
|
-
}
|
|
3559
|
-
};
|
|
3560
|
-
const route = findRoute(routes, r);
|
|
3561
|
-
if (route) {
|
|
3562
|
-
item.id = r.id || item.id;
|
|
3563
|
-
item.name = r.title || (window.$hxt ? window.$hxt(route.meta.title) : route.meta.title);
|
|
3564
|
-
item.url = `${projectRootPath}#${route.path}${qs.stringify(r.query, { encode: false })}`;
|
|
3565
|
-
if (openTab) {
|
|
3566
|
-
openTab(item);
|
|
3567
|
-
} else {
|
|
3568
|
-
router.push(r);
|
|
3569
|
-
}
|
|
3570
|
-
} else {
|
|
3571
|
-
console.error("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u7684\u8DEF\u7531");
|
|
3572
|
-
}
|
|
3573
|
-
};
|
|
3574
|
-
const $closeTag = () => {
|
|
3575
|
-
if (!window.parent.selectedRouterTags) {
|
|
3576
|
-
return;
|
|
3577
|
-
}
|
|
3578
|
-
const currentRouterTagIndex = window.parent.currentRouterTagIndex;
|
|
3579
|
-
const preIndex = window.parent.currentRouterTagIndex - 1;
|
|
3580
|
-
const currentTag = window.parent.selectedRouterTags[currentRouterTagIndex];
|
|
3581
|
-
const preTag = window.parent.selectedRouterTags[preIndex];
|
|
3582
|
-
window.parent?.closeTag?.(currentTag);
|
|
3583
|
-
window.parent?.openMenuSelect?.(preTag);
|
|
3584
|
-
};
|
|
3585
|
-
return {
|
|
3586
|
-
$goto,
|
|
3587
|
-
$closeTag
|
|
3588
|
-
};
|
|
3589
|
-
};
|
|
3590
|
-
|
|
3591
3594
|
const INSTALLED_KEY = /* @__PURE__ */ Symbol("INSTALLED_KEY");
|
|
3592
3595
|
const install = (app, options) => {
|
|
3593
3596
|
if (app[INSTALLED_KEY]) return;
|
|
@@ -21,6 +21,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
21
21
|
};
|
|
22
22
|
readonly type: {
|
|
23
23
|
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
24
25
|
};
|
|
25
26
|
readonly col: NumberConstructor;
|
|
26
27
|
readonly render: import("vue").PropType<(...args: any[]) => import("vue").VNode>;
|
|
@@ -82,6 +83,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
82
83
|
};
|
|
83
84
|
readonly type: {
|
|
84
85
|
type: StringConstructor;
|
|
86
|
+
default: string;
|
|
85
87
|
};
|
|
86
88
|
readonly col: NumberConstructor;
|
|
87
89
|
readonly render: import("vue").PropType<(...args: any[]) => import("vue").VNode>;
|
|
@@ -121,6 +123,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
121
123
|
__epPropKey: true;
|
|
122
124
|
};
|
|
123
125
|
}>> & Readonly<{}>, {
|
|
126
|
+
readonly type: string;
|
|
124
127
|
readonly required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
125
128
|
readonly isShowLabel: boolean;
|
|
126
129
|
readonly hideRequiredAsterisk: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-item.mjs","sources":["../../../../../../packages/components/form/src/form-item.ts"],"sourcesContent":["import { formItemProps as elFormItemProps } from 'element-plus'\nimport { visibleProps, disabledProps } from '@el-plus/utils/props'\nimport { CSSProperties } from 'vue'\nimport type {\n VNode,\n PropType,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n} from 'vue'\nconst expandFormItemProps = {\n type: {\n type: String,\n
|
|
1
|
+
{"version":3,"file":"form-item.mjs","sources":["../../../../../../packages/components/form/src/form-item.ts"],"sourcesContent":["import { formItemProps as elFormItemProps } from 'element-plus'\nimport { visibleProps, disabledProps } from '@el-plus/utils/props'\nimport { CSSProperties } from 'vue'\nimport type {\n VNode,\n PropType,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n} from 'vue'\nconst expandFormItemProps = {\n type: {\n type: String,\n default: 'EpInput',\n },\n col: Number,\n render: Function as PropType<(...args: any[]) => VNode>,\n labelRender: Function as PropType<\n ({ label }: { label: string | undefined }) => VNode\n >,\n props: Object,\n ...visibleProps,\n ...disabledProps,\n class: String,\n style: {\n type: [String, Object] as PropType<string | CSSProperties>,\n },\n isShowLabel: {\n type: Boolean,\n default: true,\n },\n hideRequiredAsterisk: Boolean,\n tableProp: String, // 用于table里的表单需要绑定的prop\n}\nexport const formItemProps = {\n ...elFormItemProps,\n ...expandFormItemProps,\n prop: String,\n} as const\nexport type FormItemProps = ExtractPublicPropTypes<typeof formItemProps>\nexport const expandFormItemPropsKeys = Object.keys(expandFormItemProps)\n"],"names":["elFormItemProps"],"mappings":";;;AASA,MAAM,mBAAA,GAAsB;AAAA,EAC1B,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,GAAA,EAAK,MAAA;AAAA,EACL,MAAA,EAAQ,QAAA;AAAA,EACR,WAAA,EAAa,QAAA;AAAA,EAGb,KAAA,EAAO,MAAA;AAAA,EACP,GAAG,YAAA;AAAA,EACH,GAAG,aAAA;AAAA,EACH,KAAA,EAAO,MAAA;AAAA,EACP,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM;AAAA,GACvB;AAAA,EACA,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,oBAAA,EAAsB,OAAA;AAAA,EACtB,SAAA,EAAW;AAAA;AACb,CAAA;AACO,MAAM,aAAA,GAAgB;AAAA,EAC3B,GAAGA,eAAA;AAAA,EACH,GAAG,mBAAA;AAAA,EACH,IAAA,EAAM;AACR;AAEO,MAAM,uBAAA,GAA0B,MAAA,CAAO,IAAA,CAAK,mBAAmB;;;;"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export declare const EpHeader: {
|
|
2
2
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
3
3
|
readonly mode: {
|
|
4
|
-
readonly type: import("vue").PropType<import("
|
|
5
|
-
readonly default: "add";
|
|
4
|
+
readonly type: import("vue").PropType<import("packages/hooks/use-navigation.js").PageMode>;
|
|
6
5
|
};
|
|
7
6
|
readonly allowBack: {
|
|
8
7
|
readonly type: BooleanConstructor;
|
|
@@ -31,7 +30,6 @@ export declare const EpHeader: {
|
|
|
31
30
|
};
|
|
32
31
|
readonly workflowId: StringConstructor;
|
|
33
32
|
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
34
|
-
readonly mode: import("./src/header").PageMode;
|
|
35
33
|
readonly buttons: Partial<Omit<import("element-plus").ButtonProps, "disabled"> & {
|
|
36
34
|
name: string;
|
|
37
35
|
prop: string;
|
|
@@ -56,8 +54,7 @@ export declare const EpHeader: {
|
|
|
56
54
|
Defaults: {};
|
|
57
55
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
58
56
|
readonly mode: {
|
|
59
|
-
readonly type: import("vue").PropType<import("
|
|
60
|
-
readonly default: "add";
|
|
57
|
+
readonly type: import("vue").PropType<import("packages/hooks/use-navigation.js").PageMode>;
|
|
61
58
|
};
|
|
62
59
|
readonly allowBack: {
|
|
63
60
|
readonly type: BooleanConstructor;
|
|
@@ -86,7 +83,6 @@ export declare const EpHeader: {
|
|
|
86
83
|
};
|
|
87
84
|
readonly workflowId: StringConstructor;
|
|
88
85
|
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
89
|
-
readonly mode: import("./src/header").PageMode;
|
|
90
86
|
readonly buttons: Partial<Omit<import("element-plus").ButtonProps, "disabled"> & {
|
|
91
87
|
name: string;
|
|
92
88
|
prop: string;
|
|
@@ -108,8 +104,7 @@ export declare const EpHeader: {
|
|
|
108
104
|
__isSuspense?: never;
|
|
109
105
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
110
106
|
readonly mode: {
|
|
111
|
-
readonly type: import("vue").PropType<import("
|
|
112
|
-
readonly default: "add";
|
|
107
|
+
readonly type: import("vue").PropType<import("packages/hooks/use-navigation.js").PageMode>;
|
|
113
108
|
};
|
|
114
109
|
readonly allowBack: {
|
|
115
110
|
readonly type: BooleanConstructor;
|
|
@@ -126,7 +121,6 @@ export declare const EpHeader: {
|
|
|
126
121
|
};
|
|
127
122
|
readonly workflowId: StringConstructor;
|
|
128
123
|
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
129
|
-
readonly mode: import("./src/header").PageMode;
|
|
130
124
|
readonly buttons: Partial<Omit<import("element-plus").ButtonProps, "disabled"> & {
|
|
131
125
|
name: string;
|
|
132
126
|
prop: string;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import type { PageMode } from 'el-plus/es/hooks/use-navigation';
|
|
2
3
|
export type defaultButtonsProps = 'modify' | 'save' | 'cancel' | 'refresh' | 'auditLog';
|
|
3
|
-
export type PageMode = 'add' | 'edit' | 'browse';
|
|
4
4
|
export declare const headerProps: {
|
|
5
5
|
readonly mode: {
|
|
6
6
|
readonly type: PropType<PageMode>;
|
|
7
|
-
readonly default: "add";
|
|
8
7
|
};
|
|
9
8
|
readonly allowBack: {
|
|
10
9
|
readonly type: BooleanConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.mjs","sources":["../../../../../../packages/components/header/src/header.ts"],"sourcesContent":["import type { ExtractPropTypes, PropType } from 'vue'\nimport { buttonsProps } from '@el-plus/components/buttons'\nexport type defaultButtonsProps =\n | 'modify'\n | 'save'\n | 'cancel'\n | 'refresh'\n | 'auditLog'\
|
|
1
|
+
{"version":3,"file":"header.mjs","sources":["../../../../../../packages/components/header/src/header.ts"],"sourcesContent":["import type { ExtractPropTypes, PropType } from 'vue'\nimport { buttonsProps } from '@el-plus/components/buttons'\nimport type { PageMode } from '@el-plus/hooks/use-navigation'\nexport type defaultButtonsProps =\n | 'modify'\n | 'save'\n | 'cancel'\n | 'refresh'\n | 'auditLog'\n\nexport const headerProps = {\n // 页面模式\n mode: {\n type: String as PropType<PageMode>,\n },\n allowBack: {\n type: Boolean,\n default: true,\n },\n buttons: {\n ...buttonsProps.list,\n },\n name: String, // 权限前缀\n // 要展示的默认按钮\n defaultButtons: {\n type: Array as PropType<defaultButtonsProps[]>,\n default: () => [],\n },\n // 工作流id\n workflowId: String,\n} as const\nexport type HeaderProps = ExtractPropTypes<typeof headerProps>\n\nexport const headerEmits = {}\nexport type HeaderEmits = typeof headerEmits\n"],"names":[],"mappings":";;AAUO,MAAM,WAAA,GAAc;AAAA;AAAA,EAEzB,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM;AAAA,GACR;AAAA,EACA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,OAAA,EAAS;AAAA,IACP,GAAG,YAAA,CAAa;AAAA,GAClB;AAAA,EACA,IAAA,EAAM,MAAA;AAAA;AAAA;AAAA,EAEN,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM,KAAA;AAAA,IACN,OAAA,EAAS,MAAM;AAAC,GAClB;AAAA;AAAA,EAEA,UAAA,EAAY;AACd;AAGO,MAAM,cAAc;;;;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
2
|
readonly mode: {
|
|
3
|
-
readonly type: import("vue").PropType<import("
|
|
4
|
-
readonly default: "add";
|
|
3
|
+
readonly type: import("vue").PropType<import("packages/hooks").PageMode>;
|
|
5
4
|
};
|
|
6
5
|
readonly allowBack: {
|
|
7
6
|
readonly type: BooleanConstructor;
|
|
@@ -19,8 +18,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
19
18
|
readonly workflowId: StringConstructor;
|
|
20
19
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
20
|
readonly mode: {
|
|
22
|
-
readonly type: import("vue").PropType<import("
|
|
23
|
-
readonly default: "add";
|
|
21
|
+
readonly type: import("vue").PropType<import("packages/hooks").PageMode>;
|
|
24
22
|
};
|
|
25
23
|
readonly allowBack: {
|
|
26
24
|
readonly type: BooleanConstructor;
|
|
@@ -37,7 +35,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
37
35
|
};
|
|
38
36
|
readonly workflowId: StringConstructor;
|
|
39
37
|
}>> & Readonly<{}>, {
|
|
40
|
-
readonly mode: import("./header").PageMode;
|
|
41
38
|
readonly buttons: Partial<Omit<import("element-plus").ButtonProps, "disabled"> & {
|
|
42
39
|
name: string;
|
|
43
40
|
prop: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { computed } from 'vue';
|
|
2
|
-
import { useRouter
|
|
2
|
+
import { useRouter } from 'vue-router';
|
|
3
3
|
import { useLocale } from '../../../hooks/use-locale.mjs';
|
|
4
|
+
import { useNavigation } from '../../../hooks/use-navigation.mjs';
|
|
4
5
|
import { gotoTaskTrace } from '../../../utils/navigation.mjs';
|
|
5
6
|
import { mergeListByKey } from '../../../utils/utils.mjs';
|
|
6
7
|
|
|
@@ -25,13 +26,9 @@ const useHeader = (props, emit) => {
|
|
|
25
26
|
};
|
|
26
27
|
const useButtons = (props, emit) => {
|
|
27
28
|
const { t } = useLocale();
|
|
29
|
+
const { mode: defaultMode } = useNavigation();
|
|
28
30
|
const mode = computed(() => {
|
|
29
|
-
|
|
30
|
-
let mode2 = props.mode;
|
|
31
|
-
if (query.mode) {
|
|
32
|
-
mode2 = query.mode;
|
|
33
|
-
}
|
|
34
|
-
return mode2;
|
|
31
|
+
return props.mode || defaultMode;
|
|
35
32
|
});
|
|
36
33
|
let defaultButtons = [
|
|
37
34
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-header.mjs","sources":["../../../../../../packages/components/header/src/use-header.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { useRouter, useRoute } from 'vue-router'\nimport type { HeaderProps
|
|
1
|
+
{"version":3,"file":"use-header.mjs","sources":["../../../../../../packages/components/header/src/use-header.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { useRouter, useRoute } from 'vue-router'\nimport type { HeaderProps } from '@el-plus/components/header'\nimport type { ButtonsProps } from '@el-plus/components/buttons'\nimport { mergeListByKey, gotoTaskTrace } from '@el-plus/utils'\nimport { useLocale } from '@el-plus/hooks/use-locale'\nimport { useNavigation } from '@el-plus/hooks/use-navigation'\nexport const useHeader = (props, emit) => {\n const router = useRouter()\n const isShowBack = computed(() => {\n if (!props.allowBack) {\n return false\n }\n if (window.parent.openMenuSelect) {\n return false\n }\n return true\n })\n const goBack = () => {\n router?.back()\n }\n return {\n isShowBack,\n goBack,\n }\n}\nexport const useButtons = (props: HeaderProps, emit) => {\n const { t } = useLocale()\n const { mode: defaultMode } = useNavigation()\n const mode = computed(() => {\n return props.mode || defaultMode\n })\n let defaultButtons: ButtonsProps['list'] = [\n {\n name: t('ep.header.edit'),\n prop: 'modify',\n permission: props.name ? `${props.name}:UPDATE` : '',\n disabled: () => {\n return mode.value !== 'browse'\n },\n },\n {\n name: t('ep.header.save'),\n prop: 'save',\n permission: props.name ? `${props.name}:SAVE` : '',\n disabled: () => {\n return !(mode.value === 'edit' || mode.value === 'add')\n },\n },\n {\n name: t('ep.header.cancel'),\n prop: 'cancel',\n disabled: () => {\n return mode.value !== 'edit'\n },\n },\n {\n name: t('ep.header.refresh'),\n prop: 'refresh',\n permission: props.name ? `${props.name}:REFRESH` : '',\n disabled: () => {\n return mode.value !== 'browse'\n },\n },\n {\n name: t('ep.header.approvalLog'),\n prop: 'approvalLog',\n permission: props.name ? `${props.name}:APPROVALLOG` : '',\n show: () => {\n return !!props.workflowId\n },\n onClick: () => {\n gotoTaskTrace(props.workflowId!)\n },\n },\n ]\n // 过滤要显示的\n if (props.defaultButtons.length) {\n defaultButtons = defaultButtons.filter((item) => {\n return props.defaultButtons.some((item1) => item1 === item.prop)\n })\n }\n const buttons = mergeListByKey(defaultButtons, props.buttons)\n\n return {\n buttons,\n }\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -87,9 +87,6 @@ export declare const EpSearchListPage: {
|
|
|
87
87
|
readonly default: true;
|
|
88
88
|
};
|
|
89
89
|
readonly add: FunctionConstructor;
|
|
90
|
-
readonly templateDownloadApi: StringConstructor;
|
|
91
|
-
readonly importApi: StringConstructor;
|
|
92
|
-
readonly exportApi: StringConstructor;
|
|
93
90
|
readonly offsetTop: {
|
|
94
91
|
readonly type: NumberConstructor;
|
|
95
92
|
readonly default: 0;
|
|
@@ -2689,9 +2686,6 @@ export declare const EpSearchListPage: {
|
|
|
2689
2686
|
readonly default: true;
|
|
2690
2687
|
};
|
|
2691
2688
|
readonly add: FunctionConstructor;
|
|
2692
|
-
readonly templateDownloadApi: StringConstructor;
|
|
2693
|
-
readonly importApi: StringConstructor;
|
|
2694
|
-
readonly exportApi: StringConstructor;
|
|
2695
2689
|
readonly offsetTop: {
|
|
2696
2690
|
readonly type: NumberConstructor;
|
|
2697
2691
|
readonly default: 0;
|
|
@@ -5239,9 +5233,6 @@ export declare const EpSearchListPage: {
|
|
|
5239
5233
|
readonly default: true;
|
|
5240
5234
|
};
|
|
5241
5235
|
readonly add: FunctionConstructor;
|
|
5242
|
-
readonly templateDownloadApi: StringConstructor;
|
|
5243
|
-
readonly importApi: StringConstructor;
|
|
5244
|
-
readonly exportApi: StringConstructor;
|
|
5245
5236
|
readonly offsetTop: {
|
|
5246
5237
|
readonly type: NumberConstructor;
|
|
5247
5238
|
readonly default: 0;
|
|
@@ -38,9 +38,6 @@ export declare const searchListPageProps: {
|
|
|
38
38
|
readonly default: true;
|
|
39
39
|
};
|
|
40
40
|
readonly add: FunctionConstructor;
|
|
41
|
-
readonly templateDownloadApi: StringConstructor;
|
|
42
|
-
readonly importApi: StringConstructor;
|
|
43
|
-
readonly exportApi: StringConstructor;
|
|
44
41
|
readonly offsetTop: {
|
|
45
42
|
readonly type: NumberConstructor;
|
|
46
43
|
readonly default: 0;
|
|
@@ -48,12 +48,9 @@ const searchListPageProps = {
|
|
|
48
48
|
},
|
|
49
49
|
add: Function,
|
|
50
50
|
// 新增
|
|
51
|
-
templateDownloadApi: String,
|
|
52
|
-
//
|
|
53
|
-
|
|
54
|
-
// 导入
|
|
55
|
-
exportApi: String,
|
|
56
|
-
// 导出
|
|
51
|
+
// templateDownloadApi: String, // 模板下载
|
|
52
|
+
// importApi: String, // 导入
|
|
53
|
+
// exportApi: String, // 导出
|
|
57
54
|
// 表格额外距离
|
|
58
55
|
offsetTop: {
|
|
59
56
|
type: Number,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-list-page.mjs","sources":["../../../../../../packages/components/search-list-page/src/search-list-page.ts"],"sourcesContent":["import type { PropType, ExtractPublicPropTypes } from 'vue'\nimport { apiProps } from '@el-plus/utils/props'\nimport { formProps } from '@el-plus/components/form'\nimport { buttonsProps } from '@el-plus/components/buttons'\nimport { tableProps } from '@el-plus/components/table'\nimport { customColumnProps } from '@el-plus/components/custom-column'\n\nexport const searchListPageProps = {\n ...apiProps,\n // 自定义列模块\n customColumnModule: {\n ...customColumnProps.module,\n },\n showOperationColumn: Boolean, // 是否显示操作列\n // 表单列表\n formItemList: {\n ...formProps.formItemList,\n },\n // 左侧按钮\n leftButtons: {\n ...buttonsProps.list,\n },\n // 表格列\n columns: {\n ...tableProps.columns,\n },\n // 列最小宽度\n minWidth: {\n ...tableProps.minWidth,\n },\n // 操作列宽度\n actionColWidth: {\n ...tableProps.actionColWidth,\n },\n // 操作列\n actionButtons: {\n ...tableProps.actionButtons,\n },\n // 格式化列\n formatColumns: {\n ...tableProps.formatColumns,\n },\n showSelectionCol: Boolean,\n showSingleSelectionCol: Boolean,\n showIndexCol: {\n type: Boolean,\n default: true,\n },\n add: Function, // 新增\n templateDownloadApi: String, // 模板下载\n importApi: String, // 导入\n exportApi: String, // 导出\n // 表格额外距离\n offsetTop: {\n type: Number,\n default: 0,\n },\n formData: {\n type: Object,\n default: () => ({}),\n },\n tableProps: Object,\n formProps: Object,\n buttonsProps: Object,\n name: String, // 权限前缀\n // 是否初始化加载数据\n isInitSearch: {\n type: Boolean,\n default: true,\n },\n} as const\nexport type SearchListPageProps = ExtractPublicPropTypes<\n typeof searchListPageProps\n>\n"],"names":[],"mappings":";;;;;;AAOO,MAAM,mBAAA,GAAsB;AAAA,EACjC,GAAG,QAAA;AAAA;AAAA,EAEH,kBAAA,EAAoB;AAAA,IAClB,GAAG,iBAAA,CAAkB;AAAA,GACvB;AAAA,EACA,mBAAA,EAAqB,OAAA;AAAA;AAAA;AAAA,EAErB,YAAA,EAAc;AAAA,IACZ,GAAG,SAAA,CAAU;AAAA,GACf;AAAA;AAAA,EAEA,WAAA,EAAa;AAAA,IACX,GAAG,YAAA,CAAa;AAAA,GAClB;AAAA;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,GAAG,UAAA,CAAW;AAAA,GAChB;AAAA;AAAA,EAEA,QAAA,EAAU;AAAA,IACR,GAAG,UAAA,CAAW;AAAA,GAChB;AAAA;AAAA,EAEA,cAAA,EAAgB;AAAA,IACd,GAAG,UAAA,CAAW;AAAA,GAChB;AAAA;AAAA,EAEA,aAAA,EAAe;AAAA,IACb,GAAG,UAAA,CAAW;AAAA,GAChB;AAAA;AAAA,EAEA,aAAA,EAAe;AAAA,IACb,GAAG,UAAA,CAAW;AAAA,GAChB;AAAA,EACA,gBAAA,EAAkB,OAAA;AAAA,EAClB,sBAAA,EAAwB,OAAA;AAAA,EACxB,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,GAAA,EAAK,QAAA;AAAA;AAAA
|
|
1
|
+
{"version":3,"file":"search-list-page.mjs","sources":["../../../../../../packages/components/search-list-page/src/search-list-page.ts"],"sourcesContent":["import type { PropType, ExtractPublicPropTypes } from 'vue'\nimport { apiProps } from '@el-plus/utils/props'\nimport { formProps } from '@el-plus/components/form'\nimport { buttonsProps } from '@el-plus/components/buttons'\nimport { tableProps } from '@el-plus/components/table'\nimport { customColumnProps } from '@el-plus/components/custom-column'\n\nexport const searchListPageProps = {\n ...apiProps,\n // 自定义列模块\n customColumnModule: {\n ...customColumnProps.module,\n },\n showOperationColumn: Boolean, // 是否显示操作列\n // 表单列表\n formItemList: {\n ...formProps.formItemList,\n },\n // 左侧按钮\n leftButtons: {\n ...buttonsProps.list,\n },\n // 表格列\n columns: {\n ...tableProps.columns,\n },\n // 列最小宽度\n minWidth: {\n ...tableProps.minWidth,\n },\n // 操作列宽度\n actionColWidth: {\n ...tableProps.actionColWidth,\n },\n // 操作列\n actionButtons: {\n ...tableProps.actionButtons,\n },\n // 格式化列\n formatColumns: {\n ...tableProps.formatColumns,\n },\n showSelectionCol: Boolean,\n showSingleSelectionCol: Boolean,\n showIndexCol: {\n type: Boolean,\n default: true,\n },\n add: Function, // 新增\n // templateDownloadApi: String, // 模板下载\n // importApi: String, // 导入\n // exportApi: String, // 导出\n // 表格额外距离\n offsetTop: {\n type: Number,\n default: 0,\n },\n formData: {\n type: Object,\n default: () => ({}),\n },\n tableProps: Object,\n formProps: Object,\n buttonsProps: Object,\n name: String, // 权限前缀\n // 是否初始化加载数据\n isInitSearch: {\n type: Boolean,\n default: true,\n },\n} as const\nexport type SearchListPageProps = ExtractPublicPropTypes<\n typeof searchListPageProps\n>\n"],"names":[],"mappings":";;;;;;AAOO,MAAM,mBAAA,GAAsB;AAAA,EACjC,GAAG,QAAA;AAAA;AAAA,EAEH,kBAAA,EAAoB;AAAA,IAClB,GAAG,iBAAA,CAAkB;AAAA,GACvB;AAAA,EACA,mBAAA,EAAqB,OAAA;AAAA;AAAA;AAAA,EAErB,YAAA,EAAc;AAAA,IACZ,GAAG,SAAA,CAAU;AAAA,GACf;AAAA;AAAA,EAEA,WAAA,EAAa;AAAA,IACX,GAAG,YAAA,CAAa;AAAA,GAClB;AAAA;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,GAAG,UAAA,CAAW;AAAA,GAChB;AAAA;AAAA,EAEA,QAAA,EAAU;AAAA,IACR,GAAG,UAAA,CAAW;AAAA,GAChB;AAAA;AAAA,EAEA,cAAA,EAAgB;AAAA,IACd,GAAG,UAAA,CAAW;AAAA,GAChB;AAAA;AAAA,EAEA,aAAA,EAAe;AAAA,IACb,GAAG,UAAA,CAAW;AAAA,GAChB;AAAA;AAAA,EAEA,aAAA,EAAe;AAAA,IACb,GAAG,UAAA,CAAW;AAAA,GAChB;AAAA,EACA,gBAAA,EAAkB,OAAA;AAAA,EAClB,sBAAA,EAAwB,OAAA;AAAA,EACxB,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,GAAA,EAAK,QAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKL,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS,OAAO,EAAC;AAAA,GACnB;AAAA,EACA,UAAA,EAAY,MAAA;AAAA,EACZ,SAAA,EAAW,MAAA;AAAA,EACX,YAAA,EAAc,MAAA;AAAA,EACd,IAAA,EAAM,MAAA;AAAA;AAAA;AAAA,EAEN,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb;;;;"}
|
|
@@ -42,9 +42,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
42
42
|
readonly default: true;
|
|
43
43
|
};
|
|
44
44
|
readonly add: FunctionConstructor;
|
|
45
|
-
readonly templateDownloadApi: StringConstructor;
|
|
46
|
-
readonly importApi: StringConstructor;
|
|
47
|
-
readonly exportApi: StringConstructor;
|
|
48
45
|
readonly offsetTop: {
|
|
49
46
|
readonly type: NumberConstructor;
|
|
50
47
|
readonly default: 0;
|
|
@@ -2451,9 +2448,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
2451
2448
|
readonly default: true;
|
|
2452
2449
|
};
|
|
2453
2450
|
readonly add: FunctionConstructor;
|
|
2454
|
-
readonly templateDownloadApi: StringConstructor;
|
|
2455
|
-
readonly importApi: StringConstructor;
|
|
2456
|
-
readonly exportApi: StringConstructor;
|
|
2457
2451
|
readonly offsetTop: {
|
|
2458
2452
|
readonly type: NumberConstructor;
|
|
2459
2453
|
readonly default: 0;
|
|
@@ -112,25 +112,25 @@ const useButtons = (props, { validate, resetFields, tableRef }) => {
|
|
|
112
112
|
onClick: () => {
|
|
113
113
|
props.add?.();
|
|
114
114
|
}
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: t("ep.searchListPage.templateDownload"),
|
|
118
|
-
prop: "templateDownload",
|
|
119
|
-
permission: props.name ? `${props.name}:TEMPLATEDOWNLOAD` : "",
|
|
120
|
-
show: !!props.templateDownloadApi
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
name: t("ep.searchListPage.import"),
|
|
124
|
-
prop: "import",
|
|
125
|
-
permission: props.name ? `${props.name}:IMPORT` : "",
|
|
126
|
-
show: !!props.importApi
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
name: t("ep.searchListPage.export"),
|
|
130
|
-
prop: "export",
|
|
131
|
-
permission: props.name ? `${props.name}:EXPORT` : "",
|
|
132
|
-
show: !!props.exportApi
|
|
133
115
|
}
|
|
116
|
+
// {
|
|
117
|
+
// name: t('ep.searchListPage.templateDownload'),
|
|
118
|
+
// prop: 'templateDownload',
|
|
119
|
+
// permission: props.name ? `${props.name}:TEMPLATEDOWNLOAD` : '',
|
|
120
|
+
// show: !!props.templateDownloadApi,
|
|
121
|
+
// },
|
|
122
|
+
// {
|
|
123
|
+
// name: t('ep.searchListPage.import'),
|
|
124
|
+
// prop: 'import',
|
|
125
|
+
// permission: props.name ? `${props.name}:IMPORT` : '',
|
|
126
|
+
// show: !!props.importApi,
|
|
127
|
+
// },
|
|
128
|
+
// {
|
|
129
|
+
// name: t('ep.searchListPage.export'),
|
|
130
|
+
// prop: 'export',
|
|
131
|
+
// permission: props.name ? `${props.name}:EXPORT` : '',
|
|
132
|
+
// show: !!props.exportApi,
|
|
133
|
+
// },
|
|
134
134
|
];
|
|
135
135
|
const list = mergeListByKey(defaultButtons, props.leftButtons);
|
|
136
136
|
if (props.customColumnModule) {
|