Skip to content

Commit 26ea604

Browse files
committed
Add placement arrows
1 parent 466348a commit 26ea604

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

client/packages/lowcoder/src/comps/comps/tourComp/tourComp.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
import { baseSelectRefMethods, TourChildrenMap, TourPropertyView } from "./tourCompConstants";
1313
import { TourInputCommonConfig } from "./tourInputConstants";
1414
import { Tour, TourProps } from "antd";
15+
import { PlacementType } from "@lowcoder-ee/comps/controls/tourStepControl";
1516

1617
/**
1718
* This component builds the Property Panel and the fake 'UI' for the Tour component
@@ -30,6 +31,8 @@ let TourBasicComp = (function () {
3031
title: step.title,
3132
description: step.description,
3233
target: step.target()?.current,
34+
// arrow: step.arrow,
35+
placement: step.placement as PlacementType,
3336
}
3437
})
3538

client/packages/lowcoder/src/comps/controls/tourStepControl.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import { controlItem, Option } from "lowcoder-design";
2121
import styled from "styled-components";
2222
import { getNextEntityName } from "util/stringUtils";
2323
import { TargetCompAction } from "@lowcoder-ee/comps/comps/tourComp/componentSelectorControl";
24+
// import { PlacementType } from "@rc-component"
25+
export type PlacementType = 'left' | 'leftTop' | 'leftBottom' | 'right' | 'rightTop' | 'rightBottom' | 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight' | 'center';
2426

2527
const OptionTypes = [
2628
{
@@ -233,8 +235,6 @@ const OptionTip = optionListDocUrl ? (
233235
);
234236

235237
type TourStepChildType = {
236-
// target: InstanceType<typeof TargetCompAction>,
237-
// target: InstanceType<typeof FunctionControl>,
238238
title: InstanceType<typeof StringControl>,
239239
};
240240
type TourStepControlType = new (params: CompParams<any>) => MultiBaseComp<
@@ -292,7 +292,7 @@ export function tourStepsControl<T extends TourStepControlType>(
292292
};
293293
}
294294

295-
const PlacementOptions = [
295+
const PlacementOptions: {label: string, value: PlacementType}[] = [
296296
{ label: "Center", value: "center"},
297297
{ label: "Left", value: "left"},
298298
{ label: "Left Top", value: "leftTop"},

0 commit comments

Comments
 (0)