fix: improve filter item styling

This commit is contained in:
chenos 2022-07-04 20:32:18 +08:00
parent 075426471e
commit 592f6a423b
3 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import { css } from '@emotion/css';
import { createForm, onFieldValueChange } from '@formily/core';
import { connect, FieldContext, FormContext } from '@formily/react';
import { merge } from '@formily/shared';
@ -14,6 +15,9 @@ const VariableCascader = connect((props) => {
const { value, onChange } = props;
return (
<Cascader
className={css`
width: 160px;
`}
value={value ? value.split('.') : []}
fieldNames={{
label: 'title',

View File

@ -1,4 +1,5 @@
import { CloseCircleOutlined } from '@ant-design/icons';
import { css } from '@emotion/css';
import { observer } from '@formily/react';
import { Cascader, Select, Space } from 'antd';
import React, { useContext } from 'react';
@ -17,6 +18,9 @@ export const FilterItem = observer((props: any) => {
<div style={{ marginBottom: 8 }}>
<Space>
<Cascader
className={css`
width: 160px;
`}
fieldNames={{
label: 'title',
value: 'name',

View File

@ -5,7 +5,6 @@ export function parseToken(options?: { plugin: UsersPlugin }) {
return async function parseToken(ctx: Context, next: Next) {
const user = await findUserByToken(ctx, options.plugin);
if (user) {
console.log('appends', user.toJSON());
ctx.state.currentUser = user;
setCurrentRole(ctx);
}