Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 17f8b9f

Browse files
More small cleanup
1 parent 02a0ae4 commit 17f8b9f

File tree

4 files changed

+17
-48
lines changed

4 files changed

+17
-48
lines changed

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

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
import { RecordConstructorToComp } from "lowcoder-core";
22
import { BoolControl } from "../../controls/boolControl";
3-
import { LabelControl } from "../../controls/labelControl";
4-
import { AlkjdfControl, ArrowControl, BoolCodeControl, MaskControl, StringControl } from "../../controls/codeControl";
5-
import { Section, sectionNames } from "lowcoder-design";
6-
import { SelectEventHandlerControl } from "../../controls/eventHandlerControl";
7-
import { stateComp } from "../../generators";
8-
import { RefControl } from "comps/controls/refControl";
9-
import { BaseSelectRef } from "rc-select";
10-
import { refMethods } from "comps/generators/withMethodExposing";
11-
import { blurMethod, focusMethod } from "comps/utils/methodUtils";
3+
import { ArrowControl, BoolCodeControl, MaskControl } from "../../controls/codeControl";
4+
import { Section } from "lowcoder-design";
125
import { TourStepControl } from "@lowcoder-ee/comps/controls/tourStepControl";
136
import { booleanExposingStateControl, dropdownControl } from "lowcoder-sdk";
147
import { trans } from "i18n";
158
import { PlacementOptions, TypeOptions } from "@lowcoder-ee/comps/comps/tourComp/tourControlConstants";
169
import {
17-
IndicatorsRenderTooltip,TourArrowTooltip,
10+
TourArrowTooltip,
1811
TourMaskTooltip,
19-
TourPlacementTooltip,TourStepArrowTooltip,TourStepMaskTooltip
12+
TourPlacementTooltip
2013
} from "@lowcoder-ee/comps/comps/tourComp/tourTooltips";
2114

2215
export const TourChildrenMap = {
@@ -40,7 +33,7 @@ export const TourPropertyView = (
4033
// }
4134
) => (
4235
<>
43-
<Section name={sectionNames.basic}>
36+
<Section name={trans("tour.section1Title")}>
4437
{children.options.propertyView({})}
4538
</Section>
4639

@@ -82,7 +75,3 @@ export const TourPropertyView = (
8275
</>
8376
);
8477

85-
// export const baseSelectRefMethods = refMethods<BaseSelectRef>([
86-
// focusMethod,
87-
// blurMethod,
88-
// ]);

‎client/packages/lowcoder/src/comps/controls/codeControl.tsx‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -508,15 +508,15 @@ export const FunctionControl = codeControl<CodeFunction>(
508508
{ codeType: "Function", evalWithMethods: true }
509509
);
510510

511-
export const AlkjdfControl = codeControl<(current: number, total: number)=>ReactNode>(
512-
(value) => {
513-
// if (typeof value === "function") {
514-
// return value;
515-
// }
516-
return (current,total) => (value as (current: number, total: number)=>ReactNode)(current,total);
517-
},
518-
{ codeType: "Function", evalWithMethods: true }
519-
);
511+
// export const AlkjdfControl = codeControl<(current: number, total: number)=>ReactNode>(
512+
// (value) => {
513+
// if (typeof value === "function") {
514+
// return value;
515+
// }
516+
// return (current,total) => (value as (current: number, total: number)=>ReactNode)(current,total);
517+
// },
518+
// { codeType: "Function", evalWithMethods: true }
519+
// );
520520

521521
export const TransformerCodeControl = codeControl<JSONValue>(
522522
(value) => {

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

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,8 @@ import {
2929
TourStepMaskTooltip
3030
} from "@lowcoder-ee/comps/comps/tourComp/tourTooltips";
3131

32-
const OptionTypes = [
33-
{
34-
label: trans("prop.manual"),
35-
value: "manual",
36-
},
37-
{
38-
label: trans("prop.map"),
39-
value: "map",
40-
},
41-
] as const;
42-
4332
// All options must contain label
4433
type OptionChildType = { label: InstanceType<typeof StringControl> };
45-
type TourControlType = new (params: CompParams<any>) => MultiBaseComp<
46-
OptionChildType,
47-
any,
48-
any
49-
> &
50-
Comp<any, any, any>;
5134
type OptionControlParam = {
5235
// list title
5336
title?: string;
@@ -157,7 +140,7 @@ export function manualTourStepsControl<T extends TourStepControlType>(
157140
propertyView(param: OptionControlParam) {
158141
const manualComp = this.children.manual;
159142
const { autoIncField } = config;
160-
const title = param.title ?? trans("optionsControl.optionList");
143+
const title = param.title ?? trans("tour.section1Subtitle");
161144

162145
return controlItem(
163146
{ filterText: title },
@@ -233,7 +216,6 @@ export function tourStepsControl<T extends TourStepControlType>(
233216

234217
const TmpOptionControl = new MultiCompBuilder(
235218
{
236-
optionType: dropdownControl(OptionTypes, "manual"),
237219
manual: manualTourStepsControl(VariantComp, {
238220
initOptions: config.initOptions,
239221
}),
@@ -257,10 +239,6 @@ export function tourStepsControl<T extends TourStepControlType>(
257239
return controlItem(
258240
{ searchChild: true },
259241
<>
260-
{this.children.optionType.propertyView({
261-
radioButton: true,
262-
type: "oneline",
263-
})}
264242
{item}
265243
</>
266244
);

‎client/packages/lowcoder/src/i18n/locales/en.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2826,6 +2826,8 @@ export const en = {
28262826
},
28272827

28282828
tour: {
2829+
section1Title: "Steps",
2830+
section1Subtitle: "Steps",
28292831
tooltipExampleHeader: "Example:",
28302832
tooltipSignatureHeader: "Signature:",
28312833
options: {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /