| title | description | spline |
|---|---|---|
Uni App Chat |
TDesign UniApp Chat is a UI component library for Uni App. |
explain |
Please use WeChat to scan the QR code to preview the TDesign UniApp example. ↓
Before using it, please make sure you have studied WeChat’s official Simple Tutorial on Mini Programs and Introduction to Custom Components.
TDesign MiniProgram already supports using NPM to install third-party packages. For details, see NPM Support
npm i tdesign-miniprogram -S --productionAfter installation, npm needs to be built in WeChat developer tools:
tool - build npm.(IfNPM packages not foundappears during the build, please go to theproject.config.jsonfile to add thepackNpmManuallyandpackNpmRelationListconfiguration items. For details, see NPM Support)
After the build is successful, check the box
Compile JS to ES5
Remove "style": "v2" in app.json.
Because v2 configuration means enabling a new version of component styles, it will cause TDesign component styles to be disordered.
If you use typescript to develop, you need to modify tsconfig.json to specify paths
{
"paths": {
"tdesign-miniprogram/*":["./miniprogram/miniprogram_npm/tdesign-miniprogram/*"]
}
}Taking the button component as an example, you only need to introduce the custom component corresponding to the button in the JSON file.
{
"usingComponents": {
"t-button": "tdesign-miniprogram/button/button"
}
}Then you can use the component directly in wxml.
<t-button theme="primary">按钮</t-button># Install project dependencies
npm install
# compile
npm run devOpen WeChat Developer Tools and add the _example directory to preview the example.
Minimum base library version ^2.12.0
| 组件 | API | 最低基础库 | 描述 |
|---|---|---|---|
| Upload | wx.previewMedia | 2.12.0 | - |
| Upload | wx.chooseMedia | 2.10.0 | - |
| Upload | wx.chooseMessageFile | 2.5.0 | - |
| Navbar | wx.getMenuButtonBoundingClientRect | 2.1.0 | - |

