wordpress - 如何启用维度控制古腾堡?
问题描述
https://developer.wordpress.org/block-editor/reference-guides/components/dimension-control/
Docs 说DimensionControl
wp.blockEditor 使用它。但我没有DimensionControl
在 wp.blockEditor 或 wp.components 或 wp.element 中。该组件是默认启用还是需要手动启用?
解决方案
维度控制组件现在位于 @wordpress-components 库或包中。
// https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src
您也许可以像这样导入它。
import { DimensionControl } from '@wordpress/components';
或者
import { __experimentalDimensionControl } from '@wordpress/components';
显然它还不稳定,所以您可能需要等待,然后才能在生产中实际使用它。
推荐阅读
- uwsgi - 普罗米修斯无法抓取 uwsgi
- azure - 使用 Azure B2C 保护 BLOB 存储中的资产
- javascript - 有没有办法覆盖对象属性以将其变成特殊的东西
- java - 在 Windows 上使用 Groovy 模板引擎时编写 Unix 行结束符
- reactjs - 为什么我的块只保存前一个状态而不是当前状态?
- python - Selenium driver.find_elements_by_xpath;为什么没有返回数据
- encryption - 尝试加密 EKS 中的现有 PV
- java - 如何在不违反 SonarQube 的情况下抛出已检查异常?
- java - try 和 catch 是否被认为是 if 之后的一个语句?
- javascript - 如何反转这个命令?