fix: improve filter item styling
This commit is contained in:
parent
075426471e
commit
592f6a423b
@ -1,3 +1,4 @@
|
|||||||
|
import { css } from '@emotion/css';
|
||||||
import { createForm, onFieldValueChange } from '@formily/core';
|
import { createForm, onFieldValueChange } from '@formily/core';
|
||||||
import { connect, FieldContext, FormContext } from '@formily/react';
|
import { connect, FieldContext, FormContext } from '@formily/react';
|
||||||
import { merge } from '@formily/shared';
|
import { merge } from '@formily/shared';
|
||||||
@ -14,6 +15,9 @@ const VariableCascader = connect((props) => {
|
|||||||
const { value, onChange } = props;
|
const { value, onChange } = props;
|
||||||
return (
|
return (
|
||||||
<Cascader
|
<Cascader
|
||||||
|
className={css`
|
||||||
|
width: 160px;
|
||||||
|
`}
|
||||||
value={value ? value.split('.') : []}
|
value={value ? value.split('.') : []}
|
||||||
fieldNames={{
|
fieldNames={{
|
||||||
label: 'title',
|
label: 'title',
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { CloseCircleOutlined } from '@ant-design/icons';
|
import { CloseCircleOutlined } from '@ant-design/icons';
|
||||||
|
import { css } from '@emotion/css';
|
||||||
import { observer } from '@formily/react';
|
import { observer } from '@formily/react';
|
||||||
import { Cascader, Select, Space } from 'antd';
|
import { Cascader, Select, Space } from 'antd';
|
||||||
import React, { useContext } from 'react';
|
import React, { useContext } from 'react';
|
||||||
@ -17,6 +18,9 @@ export const FilterItem = observer((props: any) => {
|
|||||||
<div style={{ marginBottom: 8 }}>
|
<div style={{ marginBottom: 8 }}>
|
||||||
<Space>
|
<Space>
|
||||||
<Cascader
|
<Cascader
|
||||||
|
className={css`
|
||||||
|
width: 160px;
|
||||||
|
`}
|
||||||
fieldNames={{
|
fieldNames={{
|
||||||
label: 'title',
|
label: 'title',
|
||||||
value: 'name',
|
value: 'name',
|
||||||
|
@ -5,7 +5,6 @@ export function parseToken(options?: { plugin: UsersPlugin }) {
|
|||||||
return async function parseToken(ctx: Context, next: Next) {
|
return async function parseToken(ctx: Context, next: Next) {
|
||||||
const user = await findUserByToken(ctx, options.plugin);
|
const user = await findUserByToken(ctx, options.plugin);
|
||||||
if (user) {
|
if (user) {
|
||||||
console.log('appends', user.toJSON());
|
|
||||||
ctx.state.currentUser = user;
|
ctx.state.currentUser = user;
|
||||||
setCurrentRole(ctx);
|
setCurrentRole(ctx);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user