-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 图片上传外观配置 #6648
feat: 图片上传外观配置 #6648
Conversation
👍 Thanks for this! Please review the labels and make any necessary changes. |
icon="plus-fine" | ||
className="icon" | ||
iconContent={cx( | ||
':ImageControl-addBtn-icon', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个:
作用是?
classPrefix: ns | ||
} = this.props; | ||
const editorDefaultData = getValueByPath(editorPath, themeConfig); | ||
const editorDefaultData = getValueByPath( | ||
editorPath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
editorPath
可以是一个组件内置的静态属性?不依赖外部传入
const editorDefaultData = getValueByPath(editorPath, themeConfig); | ||
const editorDefaultData = getValueByPath( | ||
editorPath, | ||
(window as any).themeConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
themeConfig
应该是一个从props.env下放的配置,不应该挂载在window
上
feat: 图片上传外观配置
feat: 图片上传外观配置 Co-authored-by: qkiroc <30946345+qkiroc@users.noreply.github.com>
What
🤖 Generated by Copilot at 9867cd0
This pull request adds a feature to the
amis
andamis-editor
packages that allows users to customize the style and icon of the input image control in the schema editor. It also simplifies some props and removes some redundant code in theInputText
andstyle-helper
files. It updates the CSS files and theItem
component to support the new feature. It modifies theeditor.ts
andThemeCssCode.tsx
files to handle the theme configuration data and the compound selectors.🤖 Generated by Copilot at 9867cd0
Why
How
🤖 Generated by Copilot at 9867cd0
themeCss
prop toItem
component to accept custom CSS styles from theme configuration (link)-icon
case toformatStyle
function to handle icon style properties in theme configuration (link)inputStateFunc
function and constants to generate schema for input image control based on theme configuration and state (link)ImageControlPlugin
schema to allow user to customize appearance and style of input image control (link)insertCustomStyle
import and function call toInputImage
component to insert custom CSS styles from theme configuration (link, link)InputImage
component and its sub-elements to apply custom CSS styles and icon content (link, link, link)_components.scss
and_image.scss
files to define and style default icon for input image control (link, link, link, link, link, link)getCssAndSetValue
function to handle compound selector with class selector for node selector (link)getValueByPath
function fromstyle-helper.ts
file to avoid duplication (link)themeCss
prop witheditorDefaultData
prop inMainStore
class to store default values of theme configuration (link)filterSchemaForEditor
function to check and assigneditorDefaultData
prop of schema based oneditorPath
prop (link)getValueByPath
function toutil.ts
file to provide utility function for getting default value of theme configuration by path (link)getValueByPath
import and useeditorDefaultData
prop instead inInputText
component (link, link)--Timeline-visible-border-radius
variable in_components.scss
file to improve readability and consistency (link)