wlwy-package 3.2.3-httpOnlyCookie.0 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor/index.es.js +1 -1
- package/dist/{editor-core-C7ZO3umt.js → editor-core-DizrH1p6.js} +2 -2
- package/dist/{index-BPPIVUm2.js → index-DVGXAKlY.js} +1 -1
- package/dist/{index-DtK1XQdW.js → index-KquGST1J.js} +40 -22
- package/dist/style.css +1 -1
- package/dist/types/packages/axios/service.d.ts +2 -2
- package/dist/types/packages/axios/types/index.d.ts +1 -4
- package/dist/types/packages/components/table/warnDeprecated.d.ts +2 -0
- package/dist/types/packages/hooks/private/src/useRenderCell.d.ts +6 -4
- package/dist/types/packages/utils/formatCellValue.d.ts +5 -1
- package/dist/wlwy-package.es.js +53 -24
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@ export declare class service {
|
|
|
5
5
|
private readonly interceptors?;
|
|
6
6
|
private readonly showLoading?;
|
|
7
7
|
private spinning?;
|
|
8
|
-
private readonly
|
|
8
|
+
private readonly tokenKey;
|
|
9
9
|
constructor(config: ServiceOptions);
|
|
10
10
|
request<T = any>(config: RequestConfig, spinning?: boolean): Promise<AxiosResponse<T>>;
|
|
11
11
|
options<T = any>(url: string, config: RequestConfig, spinning?: boolean): Promise<ApiResponse<T>>;
|
|
@@ -18,4 +18,4 @@ export declare class service {
|
|
|
18
18
|
EXPORT<T = any>(url: string, data?: any, config?: RequestConfig, spinning?: boolean): Promise<ApiResponse<T>>;
|
|
19
19
|
}
|
|
20
20
|
export default service;
|
|
21
|
-
export type ServiceType = Omit<InstanceType<typeof service>, 'interceptors' | 'showLoading' | '
|
|
21
|
+
export type ServiceType = Omit<InstanceType<typeof service>, 'interceptors' | 'showLoading' | 'tokenKey' | 'config' | 'instance' | 'spinning'>;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { AxiosError, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios';
|
|
2
2
|
export type TokenKeys = 'ttoken' | 'ctoken' | 'ptoken';
|
|
3
|
-
export type SystemType = 'P' | 'C' | 'T' | 'S';
|
|
4
3
|
export interface ServiceOptions extends RequestConfig {
|
|
5
|
-
/** @deprecated HttpOnly Cookie模式下运行时不再读取tokenKey */
|
|
6
4
|
tokenKey?: TokenKeys;
|
|
7
|
-
systemType?: SystemType;
|
|
8
5
|
interceptors?: RequestInterceptors;
|
|
9
6
|
showLoading?: boolean;
|
|
10
7
|
}
|
|
@@ -17,9 +14,9 @@ export type RequestInterceptors = {
|
|
|
17
14
|
export interface RequestConfig extends Omit<AxiosRequestConfig, 'headers'> {
|
|
18
15
|
headers?: AxiosRequestConfig['headers'] & {
|
|
19
16
|
OriginalResponse?: boolean;
|
|
17
|
+
Satoken?: string;
|
|
20
18
|
Language?: string;
|
|
21
19
|
'System-Type'?: string;
|
|
22
|
-
'X-CSRF-Protection'?: string;
|
|
23
20
|
timezone?: string;
|
|
24
21
|
warehouse_id?: string;
|
|
25
22
|
};
|
|
@@ -4,3 +4,5 @@ export declare function warnPropConflict(key: string, namespace: 'toolbar' | 'pa
|
|
|
4
4
|
export declare function warnShowToolbarConflict(): void;
|
|
5
5
|
/** toolbar slot 与显式关闭工具栏冲突时,以 slot 为准 */
|
|
6
6
|
export declare function warnToolbarSlotConflict(source: 'showToolbar' | 'toolbar.hideToolbar'): void;
|
|
7
|
+
/** 默认单元格渲染依赖 field 取值,缺失时仅开发环境报错,不阻塞运行 */
|
|
8
|
+
export declare function warnMissingFieldForDefaultCell(title?: string): void;
|
|
@@ -14,7 +14,7 @@ export type RenderCellFormatByType = {
|
|
|
14
14
|
type: 'datetime';
|
|
15
15
|
} & TemporalExtra) | ({
|
|
16
16
|
type: 'number';
|
|
17
|
-
} & Pick<FormatCellNumberOptions, 'precision'>) | ({
|
|
17
|
+
} & Pick<FormatCellNumberOptions, 'precision' | 'useGrouping'>) | ({
|
|
18
18
|
type: 'percent';
|
|
19
19
|
} & Pick<FormatCellPercentOptions, 'valueScale'>) | ({
|
|
20
20
|
type: 'boolean';
|
|
@@ -26,10 +26,10 @@ export type RenderCellFormatByType = {
|
|
|
26
26
|
}) | ({
|
|
27
27
|
type: 'i18n';
|
|
28
28
|
} & Pick<FormatCellI18nOptions, 'values'>)
|
|
29
|
-
/**
|
|
30
|
-
| {
|
|
29
|
+
/** 金额:等价于 `number` + 默认 `precision: 2` + 千分位;有 `precision` 时以传入为准 */
|
|
30
|
+
| ({
|
|
31
31
|
type: 'amount';
|
|
32
|
-
};
|
|
32
|
+
} & Pick<FormatCellNumberOptions, 'precision'>);
|
|
33
33
|
/** @deprecated 旧版平铺 props,由 {@link toFormatCellOptions} 自动映射 */
|
|
34
34
|
export type RenderCellLegacyProps = {
|
|
35
35
|
/** @deprecated 请改用 `format` */
|
|
@@ -51,6 +51,8 @@ export type RenderCellLegacyProps = {
|
|
|
51
51
|
export type RenderCellFormatType = NonNullable<RenderCellFormatByType['type']>;
|
|
52
52
|
export type RenderCellProps = {
|
|
53
53
|
field?: FieldPath;
|
|
54
|
+
/** 空值占位符,默认由 {@link formatCellValue} 处理为 `-` */
|
|
55
|
+
emptyPlaceholder?: string;
|
|
54
56
|
} & RenderCellFormatByType & Partial<RenderCellLegacyProps>;
|
|
55
57
|
export declare function resolveLegacyEnumMap(props: RenderCellProps, context: {
|
|
56
58
|
translate: (key: string) => string;
|
|
@@ -20,6 +20,8 @@ export interface FormatCellNumberOptions {
|
|
|
20
20
|
type: 'number';
|
|
21
21
|
/** 小数位数:0 为整数,1 为一位小数,以此类推 */
|
|
22
22
|
precision?: number;
|
|
23
|
+
/** 是否使用千分位分组;未传则跟随 `Intl.NumberFormat` 默认(通常为 true) */
|
|
24
|
+
useGrouping?: boolean;
|
|
23
25
|
}
|
|
24
26
|
export interface FormatCellPercentOptions {
|
|
25
27
|
type: 'percent';
|
|
@@ -78,5 +80,7 @@ export declare function formatCellValueCore(value: unknown, options: FormatCellO
|
|
|
78
80
|
/**
|
|
79
81
|
* 表格/描述列表等场景的单元格格式化:按 `options.type` 输出字符串;
|
|
80
82
|
* 无法识别为日期/数字等时 **原样字符串化**,不使用 `Invalid Date`。
|
|
83
|
+
*
|
|
84
|
+
* @param emptyPlaceholder 空值占位符,默认 `-`;日期/时间类型额外将 `0` / `'0'` 视为空
|
|
81
85
|
*/
|
|
82
|
-
export declare function formatCellValue(value: unknown, options: FormatCellOptions): string;
|
|
86
|
+
export declare function formatCellValue(value: unknown, options: FormatCellOptions, emptyPlaceholder?: string): string;
|
package/dist/wlwy-package.es.js
CHANGED
|
@@ -2,12 +2,12 @@ import { h, reactive, toRefs, markRaw, ref, computed, unref, nextTick, watch, on
|
|
|
2
2
|
import { App, message, theme, Tooltip, Switch, ConfigProvider, Spin, Button, Card, Row, DatePicker, Descriptions, Modal, Select, Statistic, Form, UploadDragger, Upload, Space, Col, FormItem, Input, InputPassword, InputNumber, Textarea, CheckboxGroup, Checkbox, RadioGroup, RangePicker, TimePicker, InputGroup, Image as Image$1, Dropdown, Menu, Progress, PageHeader, MenuItem, Tabs, TabPane, SubMenu, LayoutSider, LayoutFooter, Badge, Drawer, Alert, List, ListItem, LayoutHeader, Avatar, MenuDivider, Skeleton, Layout, LayoutContent } from "ant-design-vue";
|
|
3
3
|
import zhCn from "ant-design-vue/es/locale/zh_CN.js";
|
|
4
4
|
import enUs from "ant-design-vue/es/locale/en_US.js";
|
|
5
|
-
import { u as useI18n, a as useCommonStore, A as API, c as config, b as useLocale, d as useTabsNavStoreWithOut, e as useUserPermissionStoreWithOut, f as useDictStoreWithOut, _ as _sfc_main$19, g as useCommonStoreWithOut, h as useFormStorage, i as formatCellValue, k as kebabToCamel, j as useFormItemProps, p as pickMultiple, l as isExternalLink, n as newWin, m as useLanguageStoreWithOut, o as _sfc_main$1a, s as setConfig } from "./index-
|
|
6
|
-
import { D, E, r, t, C, z, x, y, B, q, v, w } from "./index-
|
|
5
|
+
import { u as useI18n, a as useCommonStore, A as API, c as config, b as useLocale, d as useTabsNavStoreWithOut, e as useUserPermissionStoreWithOut, f as useDictStoreWithOut, _ as _sfc_main$19, g as useCommonStoreWithOut, h as useFormStorage, i as formatCellValue, k as kebabToCamel, j as useFormItemProps, p as pickMultiple, l as isExternalLink, n as newWin, m as useLanguageStoreWithOut, o as _sfc_main$1a, s as setConfig } from "./index-KquGST1J.js";
|
|
6
|
+
import { D, E, r, t, C, z, x, y, B, q, v, w } from "./index-KquGST1J.js";
|
|
7
7
|
import { clone, debounce, omit, get, pick, merge, isEmpty, set } from "xe-utils";
|
|
8
8
|
import { RouterLink, useRouter } from "vue-router";
|
|
9
|
-
import { _ as _export_sfc } from "./index-
|
|
10
|
-
import { E as E2 } from "./index-
|
|
9
|
+
import { _ as _export_sfc } from "./index-DVGXAKlY.js";
|
|
10
|
+
import { E as E2 } from "./index-DVGXAKlY.js";
|
|
11
11
|
import { DownOutlined, UpOutlined } from "@ant-design/icons-vue";
|
|
12
12
|
import * as VxeUITable from "vxe-table";
|
|
13
13
|
import { VxeColumn, VxeUI, VxeToolbar, VxeTable } from "vxe-table";
|
|
@@ -2367,7 +2367,12 @@ function toFormatCellOptions(props, context) {
|
|
|
2367
2367
|
const legacy = props;
|
|
2368
2368
|
const temporalFormat = resolveTemporalFormat(props);
|
|
2369
2369
|
if (renderType === "amount") {
|
|
2370
|
-
|
|
2370
|
+
const p = props;
|
|
2371
|
+
return {
|
|
2372
|
+
type: "number",
|
|
2373
|
+
precision: p.precision ?? legacy.precision ?? 2,
|
|
2374
|
+
useGrouping: true
|
|
2375
|
+
};
|
|
2371
2376
|
}
|
|
2372
2377
|
if (renderType) {
|
|
2373
2378
|
switch (renderType) {
|
|
@@ -2387,7 +2392,11 @@ function toFormatCellOptions(props, context) {
|
|
|
2387
2392
|
}
|
|
2388
2393
|
case "number": {
|
|
2389
2394
|
const p = props;
|
|
2390
|
-
return {
|
|
2395
|
+
return {
|
|
2396
|
+
type: "number",
|
|
2397
|
+
precision: p.precision ?? legacy.precision,
|
|
2398
|
+
useGrouping: p.useGrouping
|
|
2399
|
+
};
|
|
2391
2400
|
}
|
|
2392
2401
|
case "percent": {
|
|
2393
2402
|
const p = props;
|
|
@@ -2464,7 +2473,7 @@ function useRenderCell(props) {
|
|
|
2464
2473
|
if (value === "" || value === null || value === void 0) return void 0;
|
|
2465
2474
|
return String(value);
|
|
2466
2475
|
}
|
|
2467
|
-
return formatCellValue(value, options);
|
|
2476
|
+
return formatCellValue(value, options, props.emptyPlaceholder);
|
|
2468
2477
|
}
|
|
2469
2478
|
return {
|
|
2470
2479
|
getRenderValue
|
|
@@ -2482,10 +2491,12 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
2482
2491
|
__name: "descriptions-item",
|
|
2483
2492
|
props: {
|
|
2484
2493
|
field: {},
|
|
2494
|
+
emptyPlaceholder: {},
|
|
2485
2495
|
type: {},
|
|
2486
2496
|
format: {},
|
|
2487
2497
|
timeZone: {},
|
|
2488
2498
|
precision: {},
|
|
2499
|
+
useGrouping: { type: Boolean },
|
|
2489
2500
|
valueScale: {},
|
|
2490
2501
|
trueText: {},
|
|
2491
2502
|
falseText: {},
|
|
@@ -3357,6 +3368,9 @@ const WTABLE_VXE_DEFAULT_CONFIG = {
|
|
|
3357
3368
|
pageSizes: [10, 20, 50, 100, 200, 500]
|
|
3358
3369
|
}
|
|
3359
3370
|
};
|
|
3371
|
+
function warnMissingFieldForDefaultCell(title) {
|
|
3372
|
+
return;
|
|
3373
|
+
}
|
|
3360
3374
|
function camelToKebab(key) {
|
|
3361
3375
|
return key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
3362
3376
|
}
|
|
@@ -3981,9 +3995,11 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3981
3995
|
},
|
|
3982
3996
|
__name: "column",
|
|
3983
3997
|
props: {
|
|
3998
|
+
emptyPlaceholder: {},
|
|
3984
3999
|
format: {},
|
|
3985
4000
|
timeZone: {},
|
|
3986
4001
|
precision: {},
|
|
4002
|
+
useGrouping: { type: Boolean },
|
|
3987
4003
|
valueScale: {},
|
|
3988
4004
|
trueText: {},
|
|
3989
4005
|
falseText: {},
|
|
@@ -4020,6 +4036,32 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
4020
4036
|
const props = __props;
|
|
4021
4037
|
const attrs = useAttrs();
|
|
4022
4038
|
const slots = useSlots();
|
|
4039
|
+
const DEFAULT_CELL_EDIT_RENDER_NAMES = [
|
|
4040
|
+
"input",
|
|
4041
|
+
"$input",
|
|
4042
|
+
"VxeInput",
|
|
4043
|
+
"textarea",
|
|
4044
|
+
"$textarea",
|
|
4045
|
+
"VxeTextarea"
|
|
4046
|
+
];
|
|
4047
|
+
function shouldUseDefaultCellRender(editRender) {
|
|
4048
|
+
if (!editRender) return true;
|
|
4049
|
+
const name = editRender.name;
|
|
4050
|
+
return !!name && DEFAULT_CELL_EDIT_RENDER_NAMES.includes(name);
|
|
4051
|
+
}
|
|
4052
|
+
const usesDefaultCellRender = computed(() => {
|
|
4053
|
+
return !slots.default && !["seq", "checkbox", "radio", "expand", "html"].includes(props.type ?? "") && !props.formatter && shouldUseDefaultCellRender(props.editRender);
|
|
4054
|
+
});
|
|
4055
|
+
watch(
|
|
4056
|
+
() => [usesDefaultCellRender.value, props.field],
|
|
4057
|
+
([need, field]) => {
|
|
4058
|
+
if (!need) return;
|
|
4059
|
+
if (field === void 0 || field === null || field === "") {
|
|
4060
|
+
warnMissingFieldForDefaultCell(props.title);
|
|
4061
|
+
}
|
|
4062
|
+
},
|
|
4063
|
+
{ immediate: true }
|
|
4064
|
+
);
|
|
4023
4065
|
const extraSlotNames = computed(() => Object.keys(slots).filter((name) => name !== "default"));
|
|
4024
4066
|
const columnShowOverflow = computed(() => {
|
|
4025
4067
|
const explicit = attrs.showOverflow ?? attrs["show-overflow"];
|
|
@@ -4111,19 +4153,6 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
4111
4153
|
}
|
|
4112
4154
|
return isNaN(width2) ? 100 : width2;
|
|
4113
4155
|
}
|
|
4114
|
-
const DEFAULT_CELL_EDIT_RENDER_NAMES = [
|
|
4115
|
-
"input",
|
|
4116
|
-
"$input",
|
|
4117
|
-
"VxeInput",
|
|
4118
|
-
"textarea",
|
|
4119
|
-
"$textarea",
|
|
4120
|
-
"VxeTextarea"
|
|
4121
|
-
];
|
|
4122
|
-
function shouldUseDefaultCellRender(editRender) {
|
|
4123
|
-
if (!editRender) return true;
|
|
4124
|
-
const name = editRender.name;
|
|
4125
|
-
return !!name && DEFAULT_CELL_EDIT_RENDER_NAMES.includes(name);
|
|
4126
|
-
}
|
|
4127
4156
|
const editRanderTypeExtend = ["VxeTextarea"];
|
|
4128
4157
|
const headerClassName = (params) => {
|
|
4129
4158
|
if (typeof props.headerClassName === "string") {
|
|
@@ -4195,7 +4224,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
4195
4224
|
}, 1536)) : renderSlot(_ctx.$slots, "default", normalizeProps(mergeProps({ key: 1 }, { ...data })))
|
|
4196
4225
|
]),
|
|
4197
4226
|
key: "1"
|
|
4198
|
-
} :
|
|
4227
|
+
} : usesDefaultCellRender.value ? {
|
|
4199
4228
|
name: "default",
|
|
4200
4229
|
fn: withCtx((data) => [
|
|
4201
4230
|
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ ...data })), () => [
|
|
@@ -11106,7 +11135,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11106
11135
|
},
|
|
11107
11136
|
setup(__props) {
|
|
11108
11137
|
useCssVars((_ctx) => ({
|
|
11109
|
-
"
|
|
11138
|
+
"e8971a06": unref(token).colorPrimary
|
|
11110
11139
|
}));
|
|
11111
11140
|
const { t: t3 } = useI18n();
|
|
11112
11141
|
const defaultsOption = [
|
|
@@ -11142,7 +11171,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11142
11171
|
Modal.confirm({
|
|
11143
11172
|
title: t3("lang.com_msg_2684"),
|
|
11144
11173
|
onOk: async () => {
|
|
11145
|
-
const { success } = await API.
|
|
11174
|
+
const { success } = await API.GET("/auth/cas/logout");
|
|
11146
11175
|
if (success) {
|
|
11147
11176
|
API.GET("/auth/cas/isLogin");
|
|
11148
11177
|
}
|
|
@@ -11271,7 +11300,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11271
11300
|
};
|
|
11272
11301
|
}
|
|
11273
11302
|
});
|
|
11274
|
-
const WLayoutHeader = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
11303
|
+
const WLayoutHeader = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-69e34512"]]);
|
|
11275
11304
|
const _hoisted_1$1 = { class: "skeleton-list" };
|
|
11276
11305
|
const _hoisted_2$1 = { class: "search-form" };
|
|
11277
11306
|
const _hoisted_3 = { class: "label" };
|