未验证 提交 d31cb904 编写于 作者: W wangxiaoer5200 提交者: GitHub

fix: 修复控制台一些常见报错和警告 (#1750)

Co-authored-by: Nwangbin <18695686631@163.com>
上级 a542317d
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
--> -->
<template> <template>
<Dropdown <Dropdown
placement="bottomCenter" placement="bottom"
:trigger="['click']" :trigger="['click']"
:dropMenuList="localeList" :dropMenuList="localeList"
:selectedKeys="selectedKeys" :selectedKeys="selectedKeys"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<span>{{ t('component.table.settingDens') }}</span> <span>{{ t('component.table.settingDens') }}</span>
</template> </template>
<Dropdown placement="bottomCenter" :trigger="['click']" :getPopupContainer="getPopupContainer"> <Dropdown placement="bottom" :trigger="['click']" :getPopupContainer="getPopupContainer">
<ColumnHeightOutlined /> <ColumnHeightOutlined />
<template #overlay> <template #overlay>
<Menu @click="handleTitleClick" selectable v-model:selectedKeys="selectedKeysRef"> <Menu @click="handleTitleClick" selectable v-model:selectedKeys="selectedKeysRef">
......
...@@ -53,6 +53,9 @@ ...@@ -53,6 +53,9 @@
{ {
field: 'password', field: 'password',
label: t('layout.header.lockScreenPassword'), label: t('layout.header.lockScreenPassword'),
colProps: {
span: 24,
},
component: 'InputPassword', component: 'InputPassword',
required: true, required: true,
}, },
......
<template> <template>
<Dropdown :dropMenuList="getDropMenuList" :trigger="getTrigger" @menu-event="handleMenuEvent"> <Dropdown
:dropMenuList="getDropMenuList"
:trigger="getTrigger"
placement="bottom"
overlayClassName="multiple-tabs__dropdown"
@menu-event="handleMenuEvent"
>
<div :class="`${prefixCls}__info`" @contextmenu="handleContext" v-if="getIsTabs"> <div :class="`${prefixCls}__info`" @contextmenu="handleContext" v-if="getIsTabs">
<span class="ml-1">{{ getTitle }}</span> <span class="ml-1">{{ getTitle }}</span>
</div> </div>
......
...@@ -180,3 +180,9 @@ html[data-theme='light'] { ...@@ -180,3 +180,9 @@ html[data-theme='light'] {
} }
} }
} }
.multiple-tabs__dropdown {
.ant-dropdown-content {
width: 172px;
}
}
...@@ -39,28 +39,22 @@ ...@@ -39,28 +39,22 @@
splitNumber: 8, splitNumber: 8,
indicator: [ indicator: [
{ {
text: '电脑', name: '电脑',
max: 100,
}, },
{ {
text: '充电器', name: '充电器',
max: 100,
}, },
{ {
text: '耳机', name: '耳机',
max: 100,
}, },
{ {
text: '手机', name: '手机',
max: 100,
}, },
{ {
text: 'Ipad', name: 'Ipad',
max: 100,
}, },
{ {
text: '耳机', name: '耳机',
max: 100,
}, },
], ],
}, },
......
...@@ -39,28 +39,22 @@ ...@@ -39,28 +39,22 @@
splitNumber: 8, splitNumber: 8,
indicator: [ indicator: [
{ {
text: '2017', name: '2017',
max: 100,
}, },
{ {
text: '2017', name: '2017',
max: 100,
}, },
{ {
text: '2018', name: '2018',
max: 100,
}, },
{ {
text: '2019', name: '2019',
max: 100,
}, },
{ {
text: '2020', name: '2020',
max: 100,
}, },
{ {
text: '2021', name: '2021',
max: 100,
}, },
], ],
}, },
......
...@@ -43,28 +43,22 @@ ...@@ -43,28 +43,22 @@
splitNumber: 8, splitNumber: 8,
indicator: [ indicator: [
{ {
text: '2017', name: '2017',
max: 100,
}, },
{ {
text: '2017', name: '2017',
max: 100,
}, },
{ {
text: '2018', name: '2018',
max: 100,
}, },
{ {
text: '2019', name: '2019',
max: 100,
}, },
{ {
text: '2020', name: '2020',
max: 100,
}, },
{ {
text: '2021', name: '2021',
max: 100,
}, },
], ],
}, },
......
<template> <template>
<div class="request-box"> <div class="request-box">
<a-button @click="handleClick" color="primary"> 点击会重新发起请求5次 </a-button> <a-button @click="handleClick" type="primary"> 点击会重新发起请求5次 </a-button>
<p>打开浏览器的network面板,可以看到发出了六次请求</p> <p>打开浏览器的network面板,可以看到发出了六次请求</p>
</div> </div>
</template> </template>
......
import { FormSchema } from '/@/components/Form'; import { FormSchema } from '/@/components/Form';
const colProps = {
span: 8,
};
export const schemas: FormSchema[] = [ export const schemas: FormSchema[] = [
{ {
field: 'title', field: 'title',
component: 'Input', component: 'Input',
label: '标题', label: '标题',
colProps,
componentProps: { componentProps: {
placeholder: '给目标起个名字', placeholder: '给目标起个名字',
}, },
...@@ -14,12 +18,37 @@ export const schemas: FormSchema[] = [ ...@@ -14,12 +18,37 @@ export const schemas: FormSchema[] = [
field: 'time', field: 'time',
component: 'RangePicker', component: 'RangePicker',
label: '起止日期', label: '起止日期',
colProps,
required: true, required: true,
}, },
{
field: 'client',
component: 'Input',
colProps,
label: '客户',
helpMessage: '目标的服务对象',
subLabel: '( 选填 )',
componentProps: {
placeholder: '请描述你服务的客户,内部客户直接 @姓名/工号',
},
},
{
field: 'weights',
component: 'InputNumber',
label: '权重',
colProps,
subLabel: '( 选填 )',
componentProps: {
formatter: (value: string) => (value ? `${value}%` : ''),
parser: (value: string) => value.replace('%', ''),
placeholder: '请输入',
},
},
{ {
field: 'target', field: 'target',
component: 'InputTextArea', component: 'InputTextArea',
label: '目标描述', label: '目标描述',
colProps,
componentProps: { componentProps: {
placeholder: '请输入你的阶段性工作目标', placeholder: '请输入你的阶段性工作目标',
rows: 4, rows: 4,
...@@ -30,46 +59,33 @@ export const schemas: FormSchema[] = [ ...@@ -30,46 +59,33 @@ export const schemas: FormSchema[] = [
field: 'metrics', field: 'metrics',
component: 'InputTextArea', component: 'InputTextArea',
label: '衡量标准', label: '衡量标准',
colProps,
componentProps: { componentProps: {
placeholder: '请输入衡量标准', placeholder: '请输入衡量标准',
rows: 4, rows: 4,
}, },
required: true, required: true,
}, },
{
field: 'client',
component: 'Input',
label: '客户',
helpMessage: '目标的服务对象',
subLabel: '( 选填 )',
componentProps: {
placeholder: '请描述你服务的客户,内部客户直接 @姓名/工号',
},
},
{ {
field: 'inviteer', field: 'inviteer',
component: 'Input', component: 'Input',
label: '邀评人', label: '邀评人',
subLabel: '( 选填 )', colProps: {
componentProps: { span: 8,
placeholder: '请直接 @姓名/工号,最多可邀请 5 人',
}, },
},
{
field: 'weights',
component: 'InputNumber',
label: '权重',
subLabel: '( 选填 )', subLabel: '( 选填 )',
componentProps: { componentProps: {
formatter: (value: string) => (value ? `${value}%` : ''), placeholder: '请直接 @姓名/工号,最多可邀请 5 人',
parser: (value: string) => value.replace('%', ''),
placeholder: '请输入',
}, },
}, },
{ {
field: 'disclosure', field: 'disclosure',
component: 'RadioGroup', component: 'RadioGroup',
label: '目标公开', label: '目标公开',
colProps: {
span: 16,
},
itemProps: { itemProps: {
extra: '客户、邀评人默认被分享', extra: '客户、邀评人默认被分享',
}, },
...@@ -91,9 +107,12 @@ export const schemas: FormSchema[] = [ ...@@ -91,9 +107,12 @@ export const schemas: FormSchema[] = [
}, },
}, },
{ {
field: 'disclosurer', field: 'disclosure',
component: 'Select', component: 'Select',
label: ' ', label: ' ',
colProps: {
span: 8,
},
show: ({ model }) => { show: ({ model }) => {
return model.disclosure === '2'; return model.disclosure === '2';
}, },
......
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
span: 8, span: 8,
}, },
wrapperCol: { wrapperCol: {
span: 10, span: 15,
}, },
schemas: schemas, schemas: schemas,
actionColOptions: { actionColOptions: {
offset: 8, offset: 8,
span: 12, span: 23,
}, },
submitButtonOptions: { submitButtonOptions: {
text: '提交', text: '提交',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册