@tdesign/theme-generator
v1.2.1
Published
TDesign主题配置生成器挂件
Downloads
2,644
Readme
English | 简体中文
TDesign theme generator plugin, which is tailored for the component library documentation site. It is used for real-time preview of color and style adjustments.
🔨 Usage
npm i @tdesign/theme-generatorimport '@tdesign/theme-generator';add
<td-theme-generator />in the application code
For mobile and mini-program platforms, you need to add the
deviceparameter, such as<td-theme-generator device="mobile" />.If you encounter issues where parameters cannot be passed correctly, you can try the following method to introduce the component:
const generator = document.createElement('td-theme-generator'); generator.setAttribute('device', 'mobile'); document.body.appendChild(generator);
🏗️ Develop
npm link
npm run build:watch # open the component library site with hot-reload preview