chore(ci): 升级antv到1.6.5

This commit is contained in:
vben 2020-08-25 17:23:43 +08:00
parent bd3abc7c37
commit f770e70f70
17 changed files with 461 additions and 388 deletions

View File

@ -38,8 +38,8 @@
},
"dependencies": {
"@vue/composition-api": "^1.0.0-beta.10",
"ant-design-vue": "^1.6.4",
"axios": "^0.19.2",
"ant-design-vue": "^1.6.5",
"axios": "^0.20.0",
"core-js": "^3.6.5",
"crypto-js": "^3.3.0",
"driver.js": "^0.9.8",
@ -98,7 +98,7 @@
"clean-webpack-plugin": "^3.0.0",
"commitizen": "^4.1.2",
"compressing": "^1.5.1",
"compression-webpack-plugin": "^4.0.1",
"compression-webpack-plugin": "^5.0.1",
"conventional-changelog-cli": "^2.1.0",
"conventional-changelog-custom-config": "^0.3.1",
"copy-webpack-plugin": "^6.0.2",
@ -120,7 +120,7 @@
"koa": "^2.12.1",
"koa-static": "^5.0.0",
"less": "^3.12.0",
"less-loader": "^6.2.0",
"less-loader": "^7.0.0",
"less-plugin-functions": "^1.0.0",
"lint-staged": "^10.2.10",
"postcss-flexbugs-fixes": "^4.2.1",

View File

@ -7,7 +7,7 @@ export interface ContextMenuItem {
label: string;
icon?: string;
disabled?: boolean;
handler?: (...arg) => any;
handler?: Fn;
divider?: boolean;
children?: ContextMenuItem[];
}

View File

@ -1,5 +1,6 @@
import { VNode } from 'compatible-vue';
import { Form, Col } from 'ant-design-vue';
import { BaseHelp } from '@/components/base/index';
// import { FormModelItem } from './types/formModelItem';
import { FormProps, AllItemProps, FormSchema } from './types/form';
@ -211,6 +212,19 @@ function renderComponent(schemaItem: FormSchema, props: FormProps, allDefaultVal
</Comp>
);
}
function renderLabelHelpMessage(schemaItem: FormSchema) {
const { label, helpMessage, helpComponentProps } = schemaItem;
if (!helpMessage || (Array.isArray(helpMessage) && helpMessage.length === 0)) {
return label;
}
return (
<span>
{label}
<BaseHelp class="mx-1" text={helpMessage} {...helpComponentProps} />
</span>
);
}
/**
* @description:
*/
@ -222,7 +236,7 @@ export function renderFormModelItem(
): VNode {
const { labelCol, wrapperCol } = handleLabel(schemaItem, props);
const { selfUpdate = true, colon } = props;
const { label, itemProps, render, slot, field } = schemaItem;
const { itemProps, render, slot, field } = schemaItem;
// form-item 配置项
const formItemProps = {
@ -232,8 +246,9 @@ export function renderFormModelItem(
...itemProps,
labelCol,
wrapperCol,
label,
label: renderLabelHelpMessage(schemaItem),
};
const wrapComp = props.form.getFieldDecorator(
field,
handleDecorator(schemaItem, props, allDefaultValues)

View File

@ -28,12 +28,33 @@ export interface ValidateResult<T> {
export interface ComponentOn {
[key: string]: Function;
}
export interface HelpComponentProps {
maxWidth: string;
// 是否显示序号
showIndex: boolean;
// 文本列表
text: any;
// 颜色
color: string;
// 字体大小
fontSize: string;
icon: string;
absolute: boolean;
// 定位
position: any;
}
export interface FormSchema {
// 字段名
field: string;
// 标签名
label: string;
// 文本右侧帮助文本
helpMessage?: string | string[];
// BaseHelp组件props
helpComponentProps?: Partial<HelpComponentProps>;
// label宽度,有传的话 itemProps配置的 labelCol 和WrapperCol会失效
labelWidth?: string | number;

View File

@ -137,15 +137,24 @@
: [];
const columns: BasicColumn[] = cloneDeep(unref(getColumnsRef));
const index = columns.findIndex((item) => item.flag === 'INDEX');
const hasRowSummary = dataSource.some((item) => Reflect.has(item, '_row'));
const hasIndexSummary = dataSource.some((item) => Reflect.has(item, '_index'));
if (index !== -1) {
Reflect.deleteProperty(columns[index], 'customRender');
if (hasIndexSummary) {
columns[index].customRender = (d) => d._index;
columns[index].ellipsis = false;
} else {
Reflect.deleteProperty(columns[index], 'customRender');
}
}
if (unref(getRowSelectionRef)) {
if (unref(getRowSelectionRef) && hasRowSummary) {
columns.unshift({
width: 60,
title: 'total',
key: 'total',
customRender: () => '合计',
title: 'selection',
key: 'selectionKey',
align: 'center',
customRender: (d) => d._row,
});
}
dataSource.forEach((item, i) => {
@ -411,12 +420,20 @@
.ant-table-fixed-right .ant-table-header {
border-left: 1px solid @border-color;
.ant-table-fixed {
border-bottom: none;
}
}
.ant-table-fixed-left {
.ant-table-header {
overflow-y: hidden !important;
border-right: 1px solid @border-color;
// border-right: 1px solid @border-color;
}
.ant-table-fixed {
border-bottom: none;
}
// .ant-table-body-inner {
@ -478,6 +495,12 @@
}
}
.ant-table-footer {
.ant-table-wrapper {
padding: 0;
}
}
.table-form-container {
padding: 16px;

View File

@ -34,16 +34,15 @@ export const basicProps = {
beforeFetch: {
type: Function,
default: null,
} as PropOptions<(...arg) => any>,
} as PropOptions<Fn>,
afterFetch: {
type: Function,
default: null,
} as PropOptions<(...arg) => any>,
} as PropOptions<Fn>,
handleSearchInfoFn: {
type: Function,
default: null,
} as PropOptions<(...arg) => any>,
} as PropOptions<Fn>,
fetchSetting: {
type: Object,
default: () => {

View File

@ -14,7 +14,7 @@ export interface ColumnFilterItem {
export interface RenderEditableCellParams {
dataIndex: string;
component?: ComponentType;
componentOn?: { [key: string]: (...arg) => any };
componentOn?: { [key: string]: Fn };
componentProps?: any;
}
export interface Scroll {
@ -73,11 +73,11 @@ export interface BasicTableProps {
// 接口请求对象
api?: (...arg) => Promise<any>;
// 请求之前处理参数
beforeFetch?: (...arg) => any;
beforeFetch?: Fn;
// 自定义处理接口返回参数
afterFetch?: (...arg) => any;
afterFetch?: Fn;
// 查询条件请求之前处理
handleSearchInfoFn?: (...arg) => any;
handleSearchInfoFn?: Fn;
// 请求接口配置
fetchSetting?: FetchSetting;
// 立即请求接口

View File

@ -63,10 +63,6 @@ body {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
}
//信用指标表格提示长度调整
.el-tooltip__popper {
max-width: 50%;
}
// form-item 只读状态下,去除*号
.ant-form-item.deltag .ant-form-item-required::before {

View File

@ -17,10 +17,10 @@ body {
border-color: @info-color;
}
.setPlaceholder(~'input');
// .setPlaceholder(~'input');
.setPlaceholder(~'.ant-input');
.setPlaceholder(~'.ant-input-number-input');
// .setPlaceholder(~'.ant-input');
// .setPlaceholder(~'.ant-input-number-input');
.ant-input-disabled,
.ant-select-disabled .ant-select-selection,

View File

@ -1,7 +1,7 @@
import { onMounted, onUnmounted } from 'compatible-vue';
import eventBus from '@/utils/eventBus';
export function useEventBusListener(eventName: string, handler: (...arg) => any) {
export function useEventBusListener(eventName: string, handler: Fn) {
onMounted(() => eventBus.$on(eventName, handler));
onUnmounted(() => eventBus.$off(eventName, handler));
}

View File

@ -16,7 +16,7 @@ export function useBreakpoint() {
}
// 只要调用一次即可
export function createBreakpointListen(fn?: (...arg) => any) {
export function createBreakpointListen(fn?: Fn) {
const screenRef = ref<sizeEnum>(sizeEnum.XL);
const realWidthRef = ref(window.innerWidth);

View File

@ -59,7 +59,7 @@
//
createBreakpointListen();
let lockOn: { [key: string]: (...arg) => any } = {};
let lockOn: { [key: string]: Fn } = {};
if (canLockPage) {
const { on } = useLockPage();
lockOn = on;

View File

@ -54,7 +54,7 @@ export function treeMap(treeData: any[], opt) {
*/
export function treeMapEach(
data,
{ children = 'children', conversion }: { children: string; conversion: (...arg) => any }
{ children = 'children', conversion }: { children: string; conversion: Fn }
) {
const haveChildren = Array.isArray(data[children]) && data[children].length > 0;
const conversionData = conversion(data) || {};

View File

@ -30,6 +30,7 @@ export const basicSchema: FormSchema[] = [
field: 'field1',
label: '字段1',
component: 'Input',
helpMessage: '字段提示',
},
{
field: 'field2',

View File

@ -46,6 +46,8 @@
}, 0);
return [
{
_row: '合计',
_index: '平均值',
no: totalNo,
},
];

View File

@ -107,7 +107,7 @@
const { openLoginVerify } = appStore.getProjCfg;
return (
<div class={prefixCls}>
<h1>系统登</h1>
<h1>系统登</h1>
{openLoginVerify && (
<VerifyModal
src={headImg}

726
yarn.lock

File diff suppressed because it is too large Load Diff