Skip to content

Commit

Permalink
fix: 评审问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yxh01132861 committed Nov 8, 2023
1 parent 5f33e01 commit b25e160
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-ignore
import { implementLayer } from '@antv/li-sdk';
import React from 'react';
import component from './Component';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { FieldSelectOptionType } from '@antv/li-p2';

export default (fieldList: FieldSelectOptionType[]) => {
export default () => {
return {
type: 'void',
'x-component': 'FormCollapse',
Expand All @@ -26,7 +24,7 @@ export default (fieldList: FieldSelectOptionType[]) => {
'x-component-props': {
min: -Infinity,
max: Infinity,
sliderVisible: false,
showSlider: false,
},
},

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { RasterLayerProps } from '@antv/larkmap';
// @ts-ignore
import type { LayerRegisterForm, LayerRegisterFormProps, LayerRegisterFormResultType } from '@antv/li-sdk';
import getSchema from './schema';

Expand Down Expand Up @@ -73,7 +72,7 @@ const fromValues = (

export default (props: LayerRegisterFormProps): LayerRegisterForm<SingleBandRasterLayerStyleAttributeValue> => {
// 属性面板表单的 Schema 定义,来自表单库 formily 的 Schema
const schema = getSchema(props.datasetFields);
const schema = getSchema();
return {
schema,
toValues,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import otherAttributesCollapse from '@antv/li-p2/dist/esm/LayerAttribute/common-schema/other-attributes-collapse';
import domainCollapse from './domain-collapse';

export default (fieldList: any) => {
export default () => {
return {
collapseItem_domain: domainCollapse(fieldList),
collapseItem_domain: domainCollapse(),
collapseItem_style: {
type: 'void',
'x-component': 'FormCollapse',
Expand Down
6 changes: 3 additions & 3 deletions packages/li-p2/src/components/Formily/SliderRange/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const defaultConfig = {
};

type InternalSliderRangeProps = SliderRangeProps & {
sliderVisible: boolean;
showSlider?: boolean;
};

const InternalSliderRange: React.FC<InternalSliderRangeProps> = (props) => {
const prefixCls = usePrefixCls('formily-slider-range', props);
const { sliderVisible = true, ...otherProps } = props;
const { showSlider = true, ...otherProps } = props;
const [wrapSSR, hashId] = useStyle(prefixCls);
const config = { ...defaultConfig, ...otherProps };
const range = isArray(props.value) ? props.value : props.defaultValue || [0, 100];
Expand All @@ -30,7 +30,7 @@ const InternalSliderRange: React.FC<InternalSliderRangeProps> = (props) => {

return wrapSSR(
<div className={cls(`${prefixCls}`, hashId)}>
{sliderVisible && (
{showSlider && (
<AntdSlider
{...config}
range={true}
Expand Down

0 comments on commit b25e160

Please sign in to comment.