Movatterモバイル変換


[0]ホーム

URL:


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

[FIX] GlobalCSS styles for Modals/Drawers#1588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
raheeliftikhar5 merged 5 commits intolowcoder-org:devfromiamfaran:dev
Mar 21, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,3 +18,4 @@ application-dev-localhost.yaml
server/api-service/lowcoder-server/src/main/resources/application-local-dev.yaml
translations/locales/node_modules/
server/api-service/lowcoder-server/src/main/resources/application-local-dev-ee.yaml
node_modules
2 changes: 1 addition & 1 deletionclient/packages/lowcoder-core/lib/index.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3331,7 +3331,7 @@ function styleNamespace(id) {
function evalStyle(id, css, globalStyle) {
var _a;
var styleId = styleNamespace(id);
var prefixId = globalStyle ? id : "#".concat(id);
var prefixId = globalStyle ? id : ".".concat(id);
var compiledCSS = "";
css.forEach(function (i) {
if (!i.trim()) {
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ function styleNamespace(id: string) {

export function evalStyle(id: string, css: string[], globalStyle?: boolean) {
const styleId = styleNamespace(id);
const prefixId = globalStyle ? id : `#${id}`
const prefixId = globalStyle ? id : `.${id}`;
let compiledCSS = "";
css.forEach((i) => {
if (!i.trim()) {
Expand Down
7 changes: 6 additions & 1 deletionclient/packages/lowcoder/src/comps/comps/rootComp.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,7 @@ import { useUserViewMode } from "util/hooks";
import React from "react";
import { isEqual } from "lodash";
import {LoadingBarHideTrigger} from "@lowcoder-ee/util/hideLoading";
import clsx from "clsx";
const EditorView = lazy(
() => import("pages/editor/editorView"),
);
Expand DownExpand Up@@ -130,7 +131,11 @@ const RootView = React.memo((props: RootViewProps) => {
}

return (
<div {...divProps} style={{height: '100%'}}>
<div {...divProps}
className={clsx(
divProps.id,
)}
style={{height: '100%'}}>
<PropertySectionContext.Provider value={propertySectionContextValue}>
<ThemeContext.Provider value={themeContextValue}>
<EditorContext.Provider value={editorState}>
Expand Down
5 changes: 4 additions & 1 deletionclient/packages/lowcoder/src/comps/hooks/drawerComp.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,6 +26,8 @@ import { isNumeric } from "util/stringUtils";
import { NameConfig, withExposingConfigs } from "../generators/withExposing";
import { title } from "process";
import { SliderControl } from "../controls/sliderControl";
import clsx from "clsx";
import { useApplicationId } from "util/hooks";

const EventOptions = [closeEvent] as const;

Expand DownExpand Up@@ -119,6 +121,7 @@ let TmpDrawerComp = (function () {
const isTopBom = ["top", "bottom"].includes(props.placement);
const { items, ...otherContainerProps } = props.container;
const userViewMode = useUserViewMode();
const appID = useApplicationId();
const resizable = !userViewMode && (!isTopBom || !props.autoHeight);
const onResizeStop = useCallback(
(
Expand DownExpand Up@@ -172,7 +175,7 @@ let TmpDrawerComp = (function () {
zIndex={Layers.drawer}
maskClosable={props.maskClosable}
mask={props.showMask}
className={props.className as string}
className={clsx(`app-${appID}`,props.className)}
data-testid={props.dataTestId as string}
>
{props.toggleClose && (
Expand Down
5 changes: 4 additions & 1 deletionclient/packages/lowcoder/src/comps/hooks/modalComp.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,6 +24,8 @@ import { BoolControl } from "comps/controls/boolControl";
import { withDefault } from "comps/generators";
import { SliderControl } from "../controls/sliderControl";
import { getBackgroundStyle } from "@lowcoder-ee/util/styleUtils";
import clsx from "clsx";
import { useApplicationId } from "util/hooks";

const EventOptions = [
{ label: trans("modalComp.open"), value: "open", description: trans("modalComp.openDesc") },
Expand DownExpand Up@@ -113,6 +115,7 @@ let TmpModalComp = (function () {
},
(props, dispatch) => {
const userViewMode = useUserViewMode();
const appID = useApplicationId();
const bodyStyle: CSSProperties = { padding: 0 };
const width = transToPxSize(props.width || DEFAULT_WIDTH);
let height = undefined;
Expand DownExpand Up@@ -177,7 +180,7 @@ let TmpModalComp = (function () {
zIndex={Layers.modal}
modalRender={(node) => <ModalStyled $style={props.style} $modalScrollbar={props.modalScrollbar}>{node}</ModalStyled>}
mask={props.showMask}
className={props.className as string}
className={clsx(`app-${appID}`,props.className)}
data-testid={props.dataTestId as string}
>
<InnerGrid
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp