commit c5af079d8c915f0410e818b48d421bf9a6ea27c5
Author: lingxiao865 <1060369102@qq.com>
Date: Tue Feb 10 08:05:03 2026 +0800
first commit
diff --git a/App.vue b/App.vue
new file mode 100644
index 0000000..b555cb1
--- /dev/null
+++ b/App.vue
@@ -0,0 +1,76 @@
+
+
+
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..b5d330d
--- /dev/null
+++ b/index.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/main.js b/main.js
new file mode 100644
index 0000000..6def51e
--- /dev/null
+++ b/main.js
@@ -0,0 +1,24 @@
+import App from './App'
+
+// #ifndef VUE3
+import Vue from 'vue'
+import './uni.promisify.adaptor'
+import '@tdesign/uniapp/common/style/theme/index.css';
+
+Vue.config.productionTip = false
+App.mpType = 'app'
+const app = new Vue({
+ ...App
+})
+app.$mount()
+// #endif
+
+// #ifdef VUE3
+import { createSSRApp } from 'vue'
+export function createApp() {
+ const app = createSSRApp(App)
+ return {
+ app
+ }
+}
+// #endif
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..0ae6fe3
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,80 @@
+{
+ "name" : "yu",
+ "appid" : "__UNI__90009A1",
+ "description" : "",
+ "versionName" : "1.0.0",
+ "versionCode" : "100",
+ "transformPx" : false,
+ /* 5+App特有相关 */
+ "app-plus" : {
+ "usingComponents" : true,
+ "nvueStyleCompiler" : "uni-app",
+ "compilerVersion" : 3,
+ "splashscreen" : {
+ "alwaysShowBeforeRender" : true,
+ "waiting" : true,
+ "autoclose" : true,
+ "delay" : 0
+ },
+ /* 模块配置 */
+ "modules" : {},
+ /* 应用发布信息 */
+ "distribute" : {
+ /* android打包配置 */
+ "android" : {
+ "permissions" : [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ]
+ },
+ /* ios打包配置 */
+ "ios" : {},
+ /* SDK配置 */
+ "sdkConfigs" : {}
+ }
+ },
+ /* 快应用特有相关 */
+ "quickapp" : {},
+ /* 小程序特有相关 */
+ "mp-weixin" : {
+ "appid" : "wx7677406cd2dfb7ac",
+ "setting" : {
+ "urlCheck" : false,
+ "minified" : true
+ },
+ "usingComponents" : true
+ },
+ "mp-alipay" : {
+ "usingComponents" : true
+ },
+ "mp-baidu" : {
+ "usingComponents" : true
+ },
+ "mp-toutiao" : {
+ "usingComponents" : true
+ },
+ "uniStatistics" : {
+ "enable" : false
+ },
+ "vueVersion" : "3",
+ "h5" : {
+ "optimization" : {
+ "treeShaking" : {
+ "enable" : true
+ }
+ }
+ }
+}
diff --git a/pages.json b/pages.json
new file mode 100644
index 0000000..d5aaedd
--- /dev/null
+++ b/pages.json
@@ -0,0 +1,47 @@
+{
+ "easycom": {
+ "autoscan": true,
+ "custom": {
+ "^t-(.*)": "@/uni_modules/tdesign-uniapp/components/$1/$1.vue"
+ }
+ },
+ "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+ {
+ "path": "pages/index/index",
+ "style": {
+ "navigationBarTitleText": "预约系统"
+ }
+ },
+ {
+ "path": "pages/login/login",
+ "style": {
+ "navigationBarTitleText": "登录"
+ }
+ },
+ {
+ "path": "pages/register/register",
+ "style": {
+ "navigationBarTitleText": "注册"
+ }
+ },
+ {
+ "path": "pages/booking/booking",
+ "style": {
+ "navigationBarTitleText": "我要预约"
+ }
+ },
+ {
+ "path": "pages/appointments/appointments",
+ "style": {
+ "navigationBarTitleText": "我的预约"
+ }
+ }
+ ],
+ "globalStyle": {
+ "navigationBarTextStyle": "white",
+ "navigationBarTitleText": "预约系统",
+ "navigationBarBackgroundColor": "#FF7A00",
+ "backgroundColor": "#F8F8F8"
+ },
+ "uniIdRouter": {}
+}
diff --git a/pages/appointments/appointments.vue b/pages/appointments/appointments.vue
new file mode 100644
index 0000000..14d4872
--- /dev/null
+++ b/pages/appointments/appointments.vue
@@ -0,0 +1,237 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 时间段:
+
+ {{ appointment.time_slot ? (appointment.time_slot.date).split('T')[0] : '' }}
+ {{ appointment.time_slot ? formatTime(appointment.time_slot.start_time) : '' }} -
+ {{ appointment.time_slot ? formatTime(appointment.time_slot.end_time) : '' }}
+
+
+
+ 人数:
+ {{ appointment.people_count }}人
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/booking/booking.vue b/pages/booking/booking.vue
new file mode 100644
index 0000000..dd8f397
--- /dev/null
+++ b/pages/booking/booking.vue
@@ -0,0 +1,533 @@
+
+
+
+
+
+
+ {{ day }}
+
+
+
+ {{ day.day }}
+
+ {{ day.bookingCount }}人
+
+
+
+
+
+
+
+
+
+ {{ selectedDate }} 可选时间段
+
+ (总预约: {{ totalBookingCount }}人)
+
+
+
+
+
+
+
+
+
+
+ {{ formatTime(slot.start_time) }} - {{ formatTime(slot.end_time) }}
+
+
+
+ {{ slot.current_people }}/{{ slot.max_people }}
+
+
+
+
+ {{ slot.current_people >= slot.max_people ? '已满' : '预约' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 日期:
+ {{ selectedDate }}
+
+
+ 时间段:
+ {{ selectedSlot?.start_time ? formatTime(selectedSlot.start_time) : '' }} - {{
+ selectedSlot?.end_time ? formatTime(selectedSlot.end_time) : '' }}
+
+
+ 人数:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
new file mode 100644
index 0000000..4f4d35e
--- /dev/null
+++ b/pages/index/index.vue
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.icon }}
+ {{ item.text }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/login/login.vue b/pages/login/login.vue
new file mode 100644
index 0000000..365c4f9
--- /dev/null
+++ b/pages/login/login.vue
@@ -0,0 +1,264 @@
+
+
+
+
+
+
+
+
+
+ 📱
+
+
+
+
+
+
+
+
+ 🔐
+
+
+
+ {{ codeButtonText }}
+
+
+
+
+
+
+
+
+ 验证码登录
+
+
+
+ 一键登录
+
+
+
+
+
+ {{ loginType === 'code' ? '使用一键登录' : '使用验证码登录' }}
+
+ 注册新账号
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/register/register.vue b/pages/register/register.vue
new file mode 100644
index 0000000..4bfad29
--- /dev/null
+++ b/pages/register/register.vue
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+ 📱
+
+
+
+
+
+
+
+ 👤
+
+
+
+
+
+
+ 注册
+
+
+
+
+ 已有账号?去登录
+
+
+
+
+
+
+
+
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..b21a762
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,24 @@
+{
+ "compilerOptions": {
+ "target": "ES2020",
+ "module": "ESNext",
+ "moduleResolution": "node",
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
+ "jsx": "preserve",
+ "strict": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "allowJs": true,
+ "noEmit": true,
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "baseUrl": ".",
+ "paths": {
+ "@/*": ["*"],
+ "@tdesign/uniapp/*": ["./uni_modules/tdesign-uniapp/*"]
+ },
+ "types": ["@dcloudio/types"]
+ },
+ "include": ["**/*.ts", "**/*.tsx", "**/*.vue"],
+ "exclude": ["node_modules", "unpackage"]
+}
diff --git a/uni.promisify.adaptor.js b/uni.promisify.adaptor.js
new file mode 100644
index 0000000..5fec4f3
--- /dev/null
+++ b/uni.promisify.adaptor.js
@@ -0,0 +1,13 @@
+uni.addInterceptor({
+ returnValue (res) {
+ if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) {
+ return res;
+ }
+ return new Promise((resolve, reject) => {
+ res.then((res) => {
+ if (!res) return resolve(res)
+ return res[0] ? reject(res[0]) : resolve(res[1])
+ });
+ });
+ },
+});
\ No newline at end of file
diff --git a/uni.scss b/uni.scss
new file mode 100644
index 0000000..b9249e9
--- /dev/null
+++ b/uni.scss
@@ -0,0 +1,76 @@
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+
+/* 颜色变量 */
+
+/* 行为相关颜色 */
+$uni-color-primary: #007aff;
+$uni-color-success: #4cd964;
+$uni-color-warning: #f0ad4e;
+$uni-color-error: #dd524d;
+
+/* 文字基本颜色 */
+$uni-text-color:#333;//基本色
+$uni-text-color-inverse:#fff;//反色
+$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
+$uni-text-color-placeholder: #808080;
+$uni-text-color-disable:#c0c0c0;
+
+/* 背景颜色 */
+$uni-bg-color:#ffffff;
+$uni-bg-color-grey:#f8f8f8;
+$uni-bg-color-hover:#f1f1f1;//点击状态颜色
+$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
+
+/* 边框颜色 */
+$uni-border-color:#c8c7cc;
+
+/* 尺寸变量 */
+
+/* 文字尺寸 */
+$uni-font-size-sm:12px;
+$uni-font-size-base:14px;
+$uni-font-size-lg:16px;
+
+/* 图片尺寸 */
+$uni-img-size-sm:20px;
+$uni-img-size-base:26px;
+$uni-img-size-lg:40px;
+
+/* Border Radius */
+$uni-border-radius-sm: 2px;
+$uni-border-radius-base: 3px;
+$uni-border-radius-lg: 6px;
+$uni-border-radius-circle: 50%;
+
+/* 水平间距 */
+$uni-spacing-row-sm: 5px;
+$uni-spacing-row-base: 10px;
+$uni-spacing-row-lg: 15px;
+
+/* 垂直间距 */
+$uni-spacing-col-sm: 4px;
+$uni-spacing-col-base: 8px;
+$uni-spacing-col-lg: 12px;
+
+/* 透明度 */
+$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
+
+/* 文章场景相关 */
+$uni-color-title: #2C405A; // 文章标题颜色
+$uni-font-size-title:20px;
+$uni-color-subtitle: #555555; // 二级标题颜色
+$uni-font-size-subtitle:26px;
+$uni-color-paragraph: #3F536E; // 文章段落颜色
+$uni-font-size-paragraph:15px;
diff --git a/uni_modules/tdesign-uniapp/changelog.md b/uni_modules/tdesign-uniapp/changelog.md
new file mode 100644
index 0000000..a963fa8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/changelog.md
@@ -0,0 +1,212 @@
+## 0.7.0(2026-02-02)
+### Features
+
+- `ActionSheet`: `item` 属性补充 `description` 字段 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Badge`:
+ - `shape` 属性新增 `ribbon-right/ribbon-left/triangle-right/triangle-left` 可选项,其中 `ribbon` 与 `ribbon-right` 等效 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 优化 `ribbon` 实现,改用 `background: linear-gradient()`,移除伪元素相关样式 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Calendar`: 新增 `allowSameDay` 属性,允许 `type='range'` 场景的起止时间相同 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Cascader`:
+ - 支持通过 `keys` 属性定义 `children / disabled` 在 `options` 中对应的字段别名 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 新增 `middle-content` 插槽,用于自定义中间区域内容 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `CollapsePanel`: 新增 `--td-collapse-disabled-color` 和 `--td-collapse-left-icon-color`,用于自定义禁用态颜色和左侧图标颜色 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `ImageViewer`: 新增 `image-props` 属性 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Navbar`: 新增 `placeholder` 属性,默认值为 `false`;新增 `zIndex` 属性,默认值为 `1` @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Picker`:
+ - 优化性能减少掉帧 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 优化大量数据时列表滚动性能 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - `itemHeight` 默认单位改用 `px`,避免单位转换带来的精度问题 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 新增 `visibleItemCount` 属性,可自定义可视区域 `PickerItem` 的子项个数 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Popover`:
+ - 新增 `fixed` API,适用于触发元素为 `fixed` 场景。当触发元素为 `fixed` 时,除了需要显示指定 `fixed` 属性为 `true`,还需在触发元素层添加 `t-popover-wrapper--fixed` 类,用于定位触发元素 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 新增 `--td-popover-[theme]-color` 和 `--td-popover-[theme]-bg-color` 系列 `CSS Vars` @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `QRCode`: 组件新增 `init()`,用于外部调用,重新绘制二维码 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Search`:
+ - 确保点击清空按钮后,组件内容清空但保持聚焦 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 新增 `cursor-color` 属性 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `SidebarItem`:
+ - 新增默认插槽,可自定义侧边栏子项内容 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 支持由标签内容撑开高度 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 完善激活项的前缀和后缀元素显示逻辑 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `TabBar`: 新增 `placeholder` 属性,默认值为 `false`;新增 `zIndex` 属性,默认值为 `1` @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+
+### Bug Fixes
+
+- `ActionSheet`:
+ - 修复左对齐场景下,子项 `border` 左间距错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复 `grid` 主题 + 无 `description` 描述文本场景下,顶部间距错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - `list` 主题最后一项不应设置底边框 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复 `item` 属性的 `disabled` 配置无效 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `BackTop`: 修复文本字重错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Badge`: 修复 `count` 插槽异常 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Calendar`:
+ - 修复 `value[]` 结合 `swich-mode` 时,初始化错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复翻页按钮状态错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Checkbox`: 修复 `icon` 属性使用 `svg` 资源时在 `iOS` 上不显示 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `CollapsePanel`:
+ - 修复深色模式下面板右侧图标颜色错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复左侧图标颜色错误,默认主题色,支持使用 `css vars` 自定义 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `ColorPicker`: 修复组件深色模式背景、边框、文本色错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `DateTimePicker`: 修复插槽名重复导致的控制台告警 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `DropdownItem`: 修复在 `iOS 26` 中弹窗定位不准 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Fab`: 修复 `yBounds` 未传值时,控制台报错问题 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Grid`: 修复 `column` 小于 4 或大于 4 时,文本字号大小错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Message`: 修复 `error` 主题图标错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Picker`:
+ - 修复 `autoClose` 为 `false` 时,点击遮罩层会重置选项为拨动前选项值的问题 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复平铺模式 `value` 变化未能准确监听 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复 `keys` 动态变更时,子项列表数据不显示 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复 `popupProps.showOverlay` 无效 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Popup`: 修复 `duration` 参数无效的问题 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Progress`:
+ - 修复深色模式下环形进度条内部背景色错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复环形进度条内部文本间距错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复深色模式下环形进度条内部背景色错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复环形进度条内部文本间距错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Slider`: 修复受控 + 双游标滑块模式下陷入死循环的问题 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `SwipeCell`: 消除 `IntersectionObserver is using slowest path` 警告 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `TabBar`: 修复子项背景色叠加的问题 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Tabs`: 消除 `IntersectionObserver is using slowest path` 警告 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Toast`:
+ - 修复 `Toast` 嵌套调用时 `close` 回调陷入循环的问题 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复弹窗与遮罩消失不同步的问题 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复圆角样式错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复 `showOverlay` 和 `preventScrollThrough` 均为 `true` 时,遮罩背景色错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `Upload`:
+ - 修复企业微信/桌面端环境中部分机型无法唤起上传 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复当 `request-method` 返回 `Promise` 时,无法上传的问题 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复 `draggable` 值变换时组件显示错误 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+ - 修复拖拽结束后拖拽元素 `zIndex` 异常 @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+
+### Others
+
+- `改用 Font token`,调整部分组件的 CSS Vars @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+- `--td-xx-icon-font-size` 统一更名为 `--td-xx-icon-size` @novlan1 ([#4201](https://github.com/Tencent/tdesign-miniprogram/pull/4201))
+
+## 0.6.3(2026-01-05)
+### Features
+- `Form`: 支持 `change` 类型 `trigger` @novlan1 ([#143](https://github.com/novlan1/tdesign-uniapp/pull/143))
+- `Image`: 点击事件不禁用冒泡 @novlan1 ([#142](https://github.com/novlan1/tdesign-uniapp/pull/142))
+
+## 0.6.2(2025-12-30)
+### Bug Fixes
+- `DateTimePicker`: 修复滚动日期时其他列向上跳动问题 @novlan1 ([#138](https://github.com/novlan1/tdesign-uniapp/pull/138))
+## 0.6.1(2025-12-29)
+### Features
+- `Navbar`: 增加 `right` 插槽 @novlan1 ([#136](https://github.com/novlan1/tdesign-uniapp/pull/136))
+
+### Bug Fixes
+- `Upload`: 修复小程序下图片点击事件不触发问题 @novlan1 ([#136](https://github.com/novlan1/tdesign-uniapp/pull/136))
+
+## 0.6.0(2025-12-17)
+### Features
+- `Popover`: 新增组件 @novlan1 ([#126](https://github.com/novlan1/tdesign-uniapp/pull/126))
+## 0.5.9(2025-12-11)
+### Bug Fixes
+- `Input`: 修复数据回显问题 @novlan1 ([#121](https://github.com/novlan1/tdesign-uniapp/pull/121))
+
+
+## 0.5.8(2025-12-01)
+#### Features
+- `Form`: 新增 `contentAlign` 属性 @novlan1 ([#115](https://github.com/novlan1/tdesign-uniapp/pull/115))
+
+#### Bug Fixes
+- `SwipeCell`: 修复多个组件共存时的复位问题 @novlan1 ([#114](https://github.com/novlan1/tdesign-uniapp/pull/114))
+- `Form`: 修复 `help/label` 插槽不存在的问题 @novlan1 ([#115](https://github.com/novlan1/tdesign-uniapp/pull/115))
+
+## 0.5.7(2025-11-27)
+#### Features
+- `Textarea`: 支持 `v-model:value` @novlan1 ([#102](https://github.com/novlan1/tdesign-uniapp/pull/102))
+- `Toast`: 函数式调用组件时,支持组件 Dom 预埋在页面下 @novlan1 ([#103](https://github.com/novlan1/tdesign-uniapp/pull/103))
+
+#### Bug Fixes
+- `Input`: 修复 `clear` 事件的意外冒泡问题 @novlan1 ([#100](https://github.com/novlan1/tdesign-uniapp/pull/100))
+- `Calendar`: 修复 `switchMode` 为 `year-month` 时的编译问题 @novlan1 ([#106](https://github.com/novlan1/tdesign-uniapp/pull/106))
+
+## 0.5.6(2025-11-25)
+#### Features
+- `Popup`: 支持 `v-model:visible` @novlan1 ([#90](https://github.com/novlan1/tdesign-uniapp/pull/90))
+- `Form`: 支持 `validate` 方法传参 @novlan1 ([#90](https://github.com/novlan1/tdesign-uniapp/pull/90))
+- `Input`: 支持 `v-model:value` @novlan1 ([#89](https://github.com/novlan1/tdesign-uniapp/pull/89))
+
+#### Bug Fixes
+- `Form`: 修复深色模式背景错误问题 @novlan1 ([#91](https://github.com/novlan1/tdesign-uniapp/pull/91))
+
+## 0.5.5(2025-11-18)
+#### Features
+- `Picker`: 支持 `v-model:visible` 语法糖 @novlan1 ([#77](https://github.com/novlan1/tdesign-uniapp/pull/77))
+- `PullDownRefresh`: 修改 `dragstart/dragging/dragend` 事件参数为 `TouchEvent` @novlan1 ([#63](https://github.com/novlan1/tdesign-uniapp/pull/63))
+
+#### Bug Fixes
+- `Input`: 修复 `readonly` 时点击无效问题 @novlan1 ([#76](https://github.com/novlan1/tdesign-uniapp/pull/76))
+- `PullDownRefresh`: 修复加载中再次点击时触发的 `value` 变化问题 @novlan1 ([#63](https://github.com/novlan1/tdesign-uniapp/pull/63))
+## 0.5.4(2025-11-14)
+#### Bug Fixes
+- `DropdownMenu`: 修复使用自带导航栏时的高度错误 @novlan1 ([#56](https://github.com/novlan1/tdesign-uniapp/pull/56))
+## 0.5.3.beta-4(2025-11-12)
+#### 🐞 Bug Fixes
+- `Form`: 修复 `FormItem` 中 `padding` 错误问题 @novlan1
+
+#### 🚧 Others
+- site: 使用 `history` 模式 @novlan1 ([#35](https://github.com/novlan1/tdesign-uniapp/pull/35))
+- ci: 使用多种 CI @novlan1 ([#42](https://github.com/novlan1/tdesign-uniapp/pull/42))
+
+## 0.5.3.beta-3(2025-11-12)
+#### Bug Fixes
+- `Form`: 修复 `FormItem` 中 `padding` 错误问题 @novlan1
+
+#### Others
+- site: 使用 `history` 模式 @novlan1 ([#35](https://github.com/novlan1/tdesign-uniapp/pull/35))
+- ci: 使用多种 CI @novlan1 ([#42](https://github.com/novlan1/tdesign-uniapp/pull/42))
+
+## 0.5.3.beta-2(2025-11-12)
+### Bug Fixes
+- `Form`: 修复 `FormItem` 中 `padding` 错误问题 @novlan1
+
+### Others
+- site: 使用 `history` 模式 @novlan1 ([#35](https://github.com/novlan1/tdesign-uniapp/pull/35))
+- ci: 使用多种 CI @novlan1 ([#42](https://github.com/novlan1/tdesign-uniapp/pull/42))
+
+## 0.5.3.beta-1(2025-11-12)
+### Bug Fixes
+- `Form`: 修复 `FormItem` 中 `padding` 错误问题 @novlan1
+### Others
+- site: 使用 `history` 模式 @novlan1 ([#35](https://github.com/novlan1/tdesign-uniapp/pull/35))
+- ci: 使用多种 CI @novlan1 ([#42](https://github.com/novlan1/tdesign-uniapp/pull/42))
+
+## 0.5.3(2025-11-12)
+🐞 Bug Fixes
+- `Form`: 修复 `FormItem` 中 `padding` 错误问题 @novlan1
+
+🚧 Others
+- site: 使用 `history` 模式 @novlan1 ([#35](https://github.com/novlan1/tdesign-uniapp/pull/35))
+- ci: 使用多种 CI @novlan1 ([#42](https://github.com/novlan1/tdesign-uniapp/pull/42))
+
+## 0.5.2(2025-11-10)
+- Popup: 修复滚动穿透问题
+- Tabs:修复scroll-view事件参数问题
+## 0.5.1(2025-11-07)
+- PullDownRefresh: 支持 successDuration 属性
+## 0.5.0(2025-11-07)
+- 支持类型提示
+## 0.4.2(2025-11-01)
+- 优化多个组件在支付宝小程序的表现
+## 0.4.0(2025-10-31)
+- 支持支付宝小程序
+## 0.3.2(2025-10-30)
+- `Calendar`: 修复引入问题
+## 0.3.1(2025-10-27)
+- Calendar: 支持 title 和 confirm-btn 的 slot
+## 0.3.0(2025-10-25)
+- `Guide`: 新增组件
+- `Watermark`: 新增组件
+## 0.2.5(2025-10-22)
+- 统一多个组件的事件参数
+## 0.2.3(2025-10-22)
+### 🚀 Features
+
+- `ColorPicker`: 支持 APP-PLUS
+- `Collapse`: 支持 APP-PLUS
+- `QRCode`: 支持 APP-PLUS
+## 0.2.2(2025-10-17)
+- Swiper: 新增组件
diff --git a/uni_modules/tdesign-uniapp/components/action-sheet/README.en-US.md b/uni_modules/tdesign-uniapp/components/action-sheet/README.en-US.md
new file mode 100644
index 0000000..653c503
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/action-sheet/README.en-US.md
@@ -0,0 +1,60 @@
+:: BASE_DOC ::
+
+## API
+
+### ActionSheet Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+align | String | center | options: center/left | N
+cancel-text | String | - | \- | N
+count | Number | 8 | \- | N
+description | String | - | \- | N
+items | Array | [] | Typescript: `Array` `interface ActionSheetItem { label: string; description?: string; color?: string; disabled?: boolean; icon?: string; suffixIcon?: string }`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
+popup-props | Object | {} | Typescript: `PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
+show-cancel | Boolean | true | \- | N
+show-overlay | Boolean | true | \- | N
+theme | String | list | options: list/grid | N
+using-custom-navbar | Boolean | false | \- | N
+visible | Boolean | false | `v-model:visible` is supported | N
+default-visible | Boolean | false | uncontrolled property | N
+
+### ActionSheet Events
+
+name | params | description
+-- | -- | --
+cancel | \- | \-
+close | `(context: { trigger: ActionSheetTriggerSource })` | [see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts)。
`type ActionSheetTriggerSource = 'overlay' \| 'command' \| 'select' `
+selected | `(context: { selected: ActionSheetItem \| string, index: number })` | \-
+
+### ActionSheet Slots
+
+name | Description
+-- | --
+\- | \-
+
+### ActionSheet External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-cancel | \-
+t-class-content | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-action-sheet-border-color | @component-stroke | -
+--td-action-sheet-border-radius | @radius-extraLarge | -
+--td-action-sheet-cancel-color | @text-color-primary | -
+--td-action-sheet-color | @text-color-primary | -
+--td-action-sheet-description-color | @text-color-placeholder | -
+--td-action-sheet-description-font | @font-body-medium | -
+--td-action-sheet-disabled-color | @text-color-disabled | -
+--td-action-sheet-dot-active-color | @brand-color | -
+--td-action-sheet-dot-color | @text-color-disabled | -
+--td-action-sheet-dot-size | 16rpx | -
+--td-action-sheet-gap-color | @bg-color-page | -
diff --git a/uni_modules/tdesign-uniapp/components/action-sheet/README.md b/uni_modules/tdesign-uniapp/components/action-sheet/README.md
new file mode 100644
index 0000000..7ea4d87
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/action-sheet/README.md
@@ -0,0 +1,131 @@
+---
+title: ActionSheet 动作面板
+description: 由用户操作后触发的一种特定的模态弹出框 ,呈现一组与当前情境相关的两个或多个选项。
+spline: data
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TActionSheet from '@tdesign/uniapp/action-sheet/action-sheet.vue';
+```
+
+
+### 组件类型
+
+列表型动作面板
+
+{{ list }}
+
+宫格型动作面板
+
+{{ grid }}
+
+### 组件状态
+
+宫格型动作面板
+
+{{ status }}
+
+### 组件样式
+
+列表型对齐方式
+
+{{ align }}
+
+### 支持指令调用
+
+```javascript
+import ActionSheet, { ActionSheetTheme } from '@tdesign/uniapp/action-sheet/index';
+
+// 指令调用不同于组件引用不需要传入visible
+const basicListOption: ActionSheetShowOption = {
+ theme: ActionSheetTheme.List,
+ selector: '#t-action-sheet',
+ items: [
+ {
+ label: '默认选项',
+ },
+ {
+ label: '失效选项',
+ disabled: true,
+ },
+ {
+ label: '警告选项',
+ color: '#e34d59',
+ },
+ ],
+};
+
+const handler = ActionSheet.show(basicListOption);
+```
+
+指令调用的关闭如下
+
+```javascript
+handler.close();
+```
+
+
+## API
+
+### ActionSheet Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+align | String | center | 水平对齐方式。可选项:center/left | N
+cancel-text | String | - | 设置取消按钮的文本 | N
+count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有效 | N
+description | String | - | 动作面板描述文字 | N
+items | Array | [] | 菜单项。TS 类型:`Array` `interface ActionSheetItem { label: string; description?: string; color?: string; disabled?: boolean; icon?: string; suffixIcon?: string }`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
+popup-props | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts) | N
+show-cancel | Boolean | true | 是否显示取消按钮 | N
+show-overlay | Boolean | true | 是否显示遮罩层 | N
+theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N
+using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
+visible | Boolean | false | 显示与隐藏。支持语法糖 `v-model:visible` | N
+default-visible | Boolean | false | 显示与隐藏。非受控属性 | N
+
+### ActionSheet Events
+
+名称 | 参数 | 描述
+-- | -- | --
+cancel | \- | 点击取消按钮时触发
+close | `(context: { trigger: ActionSheetTriggerSource })` | 关闭时触发。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/action-sheet/type.ts)。
`type ActionSheetTriggerSource = 'overlay' \| 'command' \| 'select' `
+selected | `(context: { selected: ActionSheetItem \| string, index: number })` | 选择菜单项时触发
+
+### ActionSheet Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+
+### ActionSheet External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-cancel | 取消样式类
+t-class-content | 内容样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-action-sheet-border-color | @component-stroke | -
+--td-action-sheet-border-radius | @radius-extraLarge | -
+--td-action-sheet-cancel-color | @text-color-primary | -
+--td-action-sheet-color | @text-color-primary | -
+--td-action-sheet-description-color | @text-color-placeholder | -
+--td-action-sheet-description-font | @font-body-medium | -
+--td-action-sheet-disabled-color | @text-color-disabled | -
+--td-action-sheet-dot-active-color | @brand-color | -
+--td-action-sheet-dot-color | @text-color-disabled | -
+--td-action-sheet-dot-size | 16rpx | -
+--td-action-sheet-gap-color | @bg-color-page | -
diff --git a/uni_modules/tdesign-uniapp/components/action-sheet/action-sheet.css b/uni_modules/tdesign-uniapp/components/action-sheet/action-sheet.css
new file mode 100644
index 0000000..fb1c05a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/action-sheet/action-sheet.css
@@ -0,0 +1,162 @@
+.t-action-sheet__content {
+ color: var(--td-action-sheet-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ border-top-left-radius: var(--td-action-sheet-border-radius, var(--td-radius-extraLarge, 24rpx));
+ border-top-right-radius: var(--td-action-sheet-border-radius, var(--td-radius-extraLarge, 24rpx));
+ background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+ overflow: hidden;
+}
+.t-action-sheet__content:focus {
+ outline: 0;
+}
+.t-action-sheet--grid {
+ padding-top: var(--td-spacer, 16rpx);
+}
+.t-action-sheet--grid .t-action-sheet__description::after {
+ display: none;
+}
+.t-action-sheet--left .t-action-sheet__description {
+ text-align: left;
+}
+.t-action-sheet--left .t-action-sheet__list-item-content,
+.t-action-sheet--left .t-action-sheet__list-item-desc {
+ justify-content: start;
+}
+.t-action-sheet--left .t-action-sheet__list-item-icon--suffix {
+ margin-left: auto;
+}
+.t-action-sheet__grid {
+ padding-bottom: 16rpx;
+}
+.t-action-sheet__grid--swiper {
+ padding-bottom: 48rpx;
+}
+.t-action-sheet__description {
+ color: var(--td-action-sheet-description-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ font: var(--td-action-sheet-description-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ text-align: center;
+ padding: var(--td-spacer-1, 24rpx) var(--td-spacer-2, 32rpx);
+ position: relative;
+}
+.t-action-sheet__description:focus {
+ outline: 0;
+}
+.t-action-sheet__description::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: unset;
+ bottom: 0;
+ left: unset;
+ right: unset;
+ background-color: var(--td-action-sheet-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-action-sheet__description::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-action-sheet__list-item {
+ flex-direction: column;
+ padding: var(--td-spacer-2, 32rpx);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.t-action-sheet__list-item:not(:last-child) {
+ position: relative;
+}
+.t-action-sheet__list-item:not(:last-child)::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: unset;
+ bottom: 0;
+ left: unset;
+ right: unset;
+ background-color: var(--td-action-sheet-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-action-sheet__list-item:not(:last-child)::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-action-sheet__list-item:focus {
+ outline: 0;
+}
+.t-action-sheet__list-item--disabled {
+ color: var(--td-action-sheet-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-action-sheet__list-item-content,
+.t-action-sheet__list-item-desc {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.t-action-sheet__list-item-text {
+ font: var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
+.t-action-sheet__list-item-desc {
+ font: var(--td-font-body-small, 24rpx / 40rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+ color: var(--td-action-sheet-description-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ margin-top: var(--td-spacer, 16rpx);
+}
+.t-action-sheet__list-item-text,
+.t-action-sheet__list-item-desc {
+ word-wrap: normal;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.t-action-sheet__list-item-icon {
+ font-size: 48rpx;
+ margin-right: var(--td-spacer, 16rpx);
+}
+.t-action-sheet__list-item-icon--suffix {
+ margin-right: 0;
+ margin-left: var(--td-spacer, 16rpx);
+}
+.t-action-sheet__swiper-wrap {
+ margin-top: 8rpx;
+ position: relative;
+}
+.t-action-sheet__footer {
+ background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+}
+.t-action-sheet__gap-list {
+ height: 16rpx;
+ background-color: var(--td-action-sheet-gap-color, var(--td-bg-color-page, var(--td-gray-color-1, #f3f3f3)));
+}
+.t-action-sheet__gap-grid {
+ height: 1rpx;
+ background-color: var(--td-action-sheet-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-action-sheet__cancel {
+ padding: var(--td-spacer-1, 24rpx) var(--td-spacer-2, 32rpx);
+ font: var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+ color: var(--td-action-sheet-cancel-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.t-action-sheet__dots {
+ position: absolute;
+ left: 50%;
+ bottom: var(--td-spacer-2, 32rpx);
+ transform: translateX(-50%);
+ display: flex;
+ flex-direction: row;
+}
+.t-action-sheet__dots-item {
+ width: var(--td-action-sheet-dot-size, 16rpx);
+ height: var(--td-action-sheet-dot-size, 16rpx);
+ background-color: var(--td-action-sheet-dot-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+ border-radius: 50%;
+ margin: 0 var(--td-spacer, 16rpx);
+ transition: all 0.4s ease-in;
+}
+.t-action-sheet__dots-item.t-is-active {
+ background-color: var(--td-action-sheet-dot-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
diff --git a/uni_modules/tdesign-uniapp/components/action-sheet/action-sheet.vue b/uni_modules/tdesign-uniapp/components/action-sheet/action-sheet.vue
new file mode 100644
index 0000000..086eeb1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/action-sheet/action-sheet.vue
@@ -0,0 +1,350 @@
+
+
+
+
+
+ {{ dataDescription }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ onSelect(item, { index })"
+ >
+
+
+
+ {{ item.label || item }}
+
+
+
+
+ {{ item.description }}
+
+
+
+
+
+
+
+
+
+ {{ dataCancelText || '取消' }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/action-sheet/computed.js b/uni_modules/tdesign-uniapp/components/action-sheet/computed.js
new file mode 100644
index 0000000..129bfc1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/action-sheet/computed.js
@@ -0,0 +1,15 @@
+export const getListThemeItemClass = function (props) {
+ const { classPrefix } = props;
+ const { item } = props;
+ const { prefix } = props;
+ const classList = [`${classPrefix}__list-item`];
+ if (item.disabled) {
+ classList.push(`${prefix}-is-disabled`);
+ }
+ return classList.join(' ');
+};
+
+export const isImage = function (name) {
+ return name.indexOf('/') !== -1;
+};
+
diff --git a/uni_modules/tdesign-uniapp/components/action-sheet/index.d.ts b/uni_modules/tdesign-uniapp/components/action-sheet/index.d.ts
new file mode 100644
index 0000000..fdeb9a7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/action-sheet/index.d.ts
@@ -0,0 +1,11 @@
+import type { ActionSheetItem, ActionSheetTheme, ActionSheetShowOption } from './show.d.ts';
+
+export { ActionSheetItem, ActionSheetTheme, ActionSheetShowOption };
+
+declare type Instance = any;
+
+declare const Handler: {
+ show(options: ActionSheetShowOption): Instance;
+ close(options: ActionSheetShowOption): void;
+};
+export default Handler;
diff --git a/uni_modules/tdesign-uniapp/components/action-sheet/index.js b/uni_modules/tdesign-uniapp/components/action-sheet/index.js
new file mode 100644
index 0000000..1f2fd57
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/action-sheet/index.js
@@ -0,0 +1,13 @@
+import { show, close, ActionSheetTheme, actionSheetTheme } from './show';
+
+export { ActionSheetTheme, actionSheetTheme };
+
+export default {
+ show(options) {
+ return show(options);
+ },
+
+ close(options) {
+ return close(options);
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/action-sheet/props.ts b/uni_modules/tdesign-uniapp/components/action-sheet/props.ts
new file mode 100644
index 0000000..7cba641
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/action-sheet/props.ts
@@ -0,0 +1,86 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdActionSheetProps } from './type';
+export default {
+ /** 水平对齐方式 */
+ align: {
+ type: String,
+ default: 'center' as TdActionSheetProps['align'],
+ validator(val: TdActionSheetProps['align']): boolean {
+ if (!val) return true;
+ return ['center', 'left'].includes(val);
+ },
+ },
+ /** 设置取消按钮的文本 */
+ cancelText: {
+ type: String,
+ default: '',
+ },
+ /** 设置每页展示菜单的数量,仅当 type=grid 时有效 */
+ count: {
+ type: Number,
+ default: 8,
+ },
+ /** 动作面板描述文字 */
+ description: {
+ type: String,
+ default: '',
+ },
+ /** 菜单项 */
+ items: {
+ type: Array,
+ default: (): TdActionSheetProps['items'] => [],
+ },
+ /** 透传 Popup 组件全部属性 */
+ popupProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 是否显示取消按钮 */
+ showCancel: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否显示遮罩层 */
+ showOverlay: {
+ type: Boolean,
+ default: true,
+ },
+ /** 展示类型,列表和表格形式展示 */
+ theme: {
+ type: String,
+ default: 'list' as TdActionSheetProps['theme'],
+ validator(val: TdActionSheetProps['theme']): boolean {
+ if (!val) return true;
+ return ['list', 'grid'].includes(val);
+ },
+ },
+ /** 是否使用了自定义导航栏 */
+ usingCustomNavbar: Boolean,
+ /** 显示与隐藏 */
+ visible: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 显示与隐藏,非受控属性 */
+ defaultVisible: Boolean,
+ /** 点击取消按钮时触发 */
+ onCancel: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 关闭时触发 */
+ onClose: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 选择菜单项时触发 */
+ onSelected: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/action-sheet/show.d.ts b/uni_modules/tdesign-uniapp/components/action-sheet/show.d.ts
new file mode 100644
index 0000000..43c2cd1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/action-sheet/show.d.ts
@@ -0,0 +1,28 @@
+import { ActionSheetItem } from './type';
+
+export { ActionSheetItem };
+declare type Instance = any;
+declare type Context = any;
+
+export declare enum ActionSheetTheme {
+ List = 'list',
+ Grid = 'grid'
+}
+
+interface ActionSheetProps {
+ align: 'center' | 'left';
+ cancelText?: string;
+ count?: number;
+ description: string;
+ items: Array;
+ showCancel?: boolean;
+ theme?: ActionSheetTheme;
+ visible: boolean;
+ defaultVisible?: boolean;
+}
+export interface ActionSheetShowOption extends Omit {
+ context?: Context;
+ selector?: string;
+}
+export declare const show: (options: ActionSheetShowOption) => Instance;
+export declare const close: (options: ActionSheetShowOption) => void;
diff --git a/uni_modules/tdesign-uniapp/components/action-sheet/show.js b/uni_modules/tdesign-uniapp/components/action-sheet/show.js
new file mode 100644
index 0000000..8fafac9
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/action-sheet/show.js
@@ -0,0 +1,33 @@
+import { getInstance } from '../common/utils';
+
+
+export const ActionSheetTheme = {
+ List: 'list',
+ Grid: 'grid',
+};
+
+
+export const actionSheetTheme = {
+ List: ActionSheetTheme.List,
+ Grid: ActionSheetTheme.Grid,
+} ;
+
+export const show = function (options) {
+ const { context, selector = '#t-action-sheet', ...otherOptions } = { ...options };
+ const instance = getInstance(context, selector);
+ if (instance) {
+ instance.show({
+ ...otherOptions,
+ });
+ return instance;
+ }
+ console.error('未找到组件,请确认 selector && context 是否正确');
+};
+
+export const close = function (options) {
+ const { context, selector = '#t-action-sheet' } = { ...options };
+ const instance = getInstance(context, selector);
+ if (instance) {
+ instance.close();
+ }
+};
diff --git a/uni_modules/tdesign-uniapp/components/action-sheet/type.ts b/uni_modules/tdesign-uniapp/components/action-sheet/type.ts
new file mode 100644
index 0000000..49d6b93
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/action-sheet/type.ts
@@ -0,0 +1,93 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdPopupProps as PopupProps } from '../popup/type';
+
+export interface TdActionSheetProps {
+ /**
+ * 水平对齐方式
+ * @default center
+ */
+ align?: 'center' | 'left';
+ /**
+ * 设置取消按钮的文本
+ * @default ''
+ */
+ cancelText?: string;
+ /**
+ * 设置每页展示菜单的数量,仅当 type=grid 时有效
+ * @default 8
+ */
+ count?: number;
+ /**
+ * 动作面板描述文字
+ * @default ''
+ */
+ description?: string;
+ /**
+ * 菜单项
+ * @default []
+ */
+ items?: Array;
+ /**
+ * 透传 Popup 组件全部属性
+ * @default {}
+ */
+ popupProps?: PopupProps;
+ /**
+ * 是否显示取消按钮
+ * @default true
+ */
+ showCancel?: boolean;
+ /**
+ * 是否显示遮罩层
+ * @default true
+ */
+ showOverlay?: boolean;
+ /**
+ * 展示类型,列表和表格形式展示
+ * @default list
+ */
+ theme?: 'list' | 'grid';
+ /**
+ * 是否使用了自定义导航栏
+ * @default false
+ */
+ usingCustomNavbar?: boolean;
+ /**
+ * 显示与隐藏
+ * @default false
+ */
+ visible?: boolean;
+ /**
+ * 显示与隐藏,非受控属性
+ * @default false
+ */
+ defaultVisible?: boolean;
+ /**
+ * 点击取消按钮时触发
+ */
+ onCancel?: () => void;
+ /**
+ * 关闭时触发
+ */
+ onClose?: (context: { trigger: ActionSheetTriggerSource }) => void;
+ /**
+ * 选择菜单项时触发
+ */
+ onSelected?: (context: { selected: ActionSheetItem | string; index: number }) => void;
+}
+
+export interface ActionSheetItem {
+ label: string;
+ description?: string;
+ color?: string;
+ disabled?: boolean;
+ icon?: string;
+ suffixIcon?: string;
+}
+
+export type ActionSheetTriggerSource = 'overlay' | 'command' | 'select';
diff --git a/uni_modules/tdesign-uniapp/components/avatar-group/avatar-group.css b/uni_modules/tdesign-uniapp/components/avatar-group/avatar-group.css
new file mode 100644
index 0000000..a11e948
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/avatar-group/avatar-group.css
@@ -0,0 +1,187 @@
+.t-avatar-group {
+ display: inline-flex;
+ flex-wrap: wrap;
+ align-items: center;
+}
+.t-avatar-group-offset-left .t-avatar__wrapper,
+.t-avatar-group-offset-right .t-avatar__wrapper {
+ padding: var(--td-avatar-group-line-spacing, 4rpx) 0;
+}
+.t-avatar-group-offset-left-small,
+.t-avatar-group-offset-right-small {
+ --td-avatar-margin-left: var(--td-avatar-group-margin-left-small, -16rpx);
+}
+.t-avatar-group-offset-left-medium,
+.t-avatar-group-offset-right-medium {
+ --td-avatar-margin-left: var(--td-avatar-group-margin-left-medium, -16rpx);
+}
+.t-avatar-group-offset-left-large,
+.t-avatar-group-offset-right-large {
+ --td-avatar-margin-left: var(--td-avatar-group-margin-left-large, -16rpx);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(1) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 1);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(2) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 2);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(3) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 3);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(4) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 4);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(5) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 5);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(6) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 6);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(7) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 7);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(8) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 8);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(9) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 9);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(10) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 10);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(11) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 11);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(12) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 12);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(13) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 13);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(14) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 14);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(15) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 15);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(16) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 16);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(17) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 17);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(18) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 18);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(19) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 19);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(20) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 20);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(21) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 21);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(22) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 22);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(23) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 23);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(24) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 24);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(25) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 25);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(26) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 26);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(27) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 27);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(28) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 28);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(29) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 29);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(30) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 30);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(31) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 31);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(32) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 32);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(33) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 33);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(34) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 34);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(35) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 35);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(36) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 36);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(37) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 37);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(38) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 38);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(39) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 39);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(40) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 40);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(41) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 41);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(42) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 42);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(43) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 43);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(44) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 44);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(45) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 45);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(46) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 46);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(47) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 47);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(48) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 48);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(49) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 49);
+}
+.t-avatar-group-offset-left .t-avatar__wrapper:nth-child(50) {
+ z-index: calc(var(--td-avatar-group-init-z-index, 50) - 50);
+}
+.t-avatar-group__collapse--slot,
+.t-avatar-group__collapse--default {
+ z-index: 0;
+ font-weight: 600;
+}
+.t-avatar-group__collapse--slot {
+ float: left;
+}
+.t-avatar-group__collapse--slot:not(:empty) + .t-avatar-group__collapse--default {
+ display: none;
+ float: left;
+}
+.t-avatar-group__collapse--slot:empty + .t-avatar-group__collapse--default {
+ display: block;
+ float: left;
+}
diff --git a/uni_modules/tdesign-uniapp/components/avatar-group/avatar-group.vue b/uni_modules/tdesign-uniapp/components/avatar-group/avatar-group.vue
new file mode 100644
index 0000000..d32c539
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/avatar-group/avatar-group.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+ {{ collapseAvatar }}
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/avatar-group/props.ts b/uni_modules/tdesign-uniapp/components/avatar-group/props.ts
new file mode 100644
index 0000000..d20b734
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/avatar-group/props.ts
@@ -0,0 +1,44 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdAvatarGroupProps } from './type';
+export default {
+ /** 图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上 */
+ cascading: {
+ type: String,
+ default: 'left-up' as TdAvatarGroupProps['cascading'],
+ validator(val: TdAvatarGroupProps['cascading']): boolean {
+ if (!val) return true;
+ return ['left-up', 'right-up'].includes(val);
+ },
+ },
+ /** 头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多` */
+ collapseAvatar: {
+ type: String,
+ },
+ /** 能够同时显示的最多头像数量 */
+ max: {
+ type: Number,
+ },
+ /** 形状。优先级低于 Avatar.shape */
+ shape: {
+ type: String,
+ validator(val: TdAvatarGroupProps['shape']): boolean {
+ if (!val) return true;
+ return ['circle', 'round'].includes(val);
+ },
+ },
+ /** 尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size */
+ size: {
+ type: String,
+ default: '',
+ },
+ /** 点击头像折叠元素触发 */
+ onCollapsedItemClick: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/avatar-group/type.ts b/uni_modules/tdesign-uniapp/components/avatar-group/type.ts
new file mode 100644
index 0000000..8e91848
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/avatar-group/type.ts
@@ -0,0 +1,38 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { ShapeEnum } from '../common/common';
+
+export interface TdAvatarGroupProps {
+ /**
+ * 图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上
+ * @default 'left-up'
+ */
+ cascading?: CascadingValue;
+ /**
+ * 头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多`
+ */
+ collapseAvatar?: string;
+ /**
+ * 能够同时显示的最多头像数量
+ */
+ max?: number;
+ /**
+ * 形状。优先级低于 Avatar.shape
+ */
+ shape?: ShapeEnum;
+ /**
+ * 尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size
+ * @default ''
+ */
+ size?: string;
+ /**
+ * 点击头像折叠元素触发
+ */
+ onCollapsedItemClick?: (e: MouseEvent) => void;
+}
+
+export type CascadingValue = 'left-up' | 'right-up';
diff --git a/uni_modules/tdesign-uniapp/components/avatar/README.en-US.md b/uni_modules/tdesign-uniapp/components/avatar/README.en-US.md
new file mode 100644
index 0000000..6101e75
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/avatar/README.en-US.md
@@ -0,0 +1,102 @@
+:: BASE_DOC ::
+
+## API
+
+### Avatar Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+alt | String | - | show it when url is not valid | N
+badge-props | Object | {} | Typescript:`BadgeProps`,[Badge API Documents](./badge?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/avatar/type.ts) | N
+bordered | Boolean | false | \- | N
+hide-on-load-failed | Boolean | false | hide image when loading image failed | N
+icon | String / Object | - | \- | N
+image | String | - | images url | N
+image-props | Object | - | Typescript:`ImageProps`,[Image API Documents](./image?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/avatar/type.ts) | N
+shape | String | - | shape。options: circle/round。Typescript:`ShapeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+size | String | - | size | N
+
+### Avatar Events
+
+name | params | description
+-- | -- | --
+error | `(e: Event)` | trigger on image load failed
+
+### Avatar Slots
+
+name | Description
+-- | --
+\- | \-
+
+### Avatar External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-alt | \-
+t-class-content | \-
+t-class-icon | \-
+t-class-image | \-
+
+
+### AvatarGroup Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+cascading | String | 'left-up' | multiple images cascading。options: left-up/right-up。Typescript:`CascadingValue` `type CascadingValue = 'left-up' \| 'right-up'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/avatar-group/type.ts) | N
+collapse-avatar | String | - | \- | N
+max | Number | - | \- | N
+shape | String | - | shape。options: circle/round。Typescript:`ShapeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+size | String | - | size | N
+
+### AvatarGroup Events
+
+name | params | description
+-- | -- | --
+collapsed-item-click | `(e: MouseEvent)` | \-
+
+### AvatarGroup Slots
+
+name | Description
+-- | --
+\- | \-
+collapse-avatar | \-
+
+### AvatarGroup External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-content | \-
+t-class-image | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-avatar-group-init-z-index | @avatar-group-init-zIndex | -
+--td-avatar-group-line-spacing | 4rpx | -
+--td-avatar-group-margin-left-large | -16rpx | -
+--td-avatar-group-margin-left-medium | -16rpx | -
+--td-avatar-group-margin-left-small | -16rpx | -
+--td-avatar-bg-color | @brand-color-light-active | -
+--td-avatar-border-color | #fff | -
+--td-avatar-border-width-large | 6rpx | -
+--td-avatar-border-width-medium | 4rpx | -
+--td-avatar-border-width-small | 2rpx | -
+--td-avatar-circle-border-radius | @radius-circle | -
+--td-avatar-content-color | @brand-color | -
+--td-avatar-icon-large-font-size | 64rpx | -
+--td-avatar-icon-medium-font-size | 48rpx | -
+--td-avatar-icon-small-font-size | 40rpx | -
+--td-avatar-large-width | 128rpx | -
+--td-avatar-margin-left | 0 | -
+--td-avatar-medium-width | 96rpx | -
+--td-avatar-round-border-radius | @radius-default | -
+--td-avatar-small-width | 80rpx | -
+--td-avatar-text-large-font-size | @font-size-xl | -
+--td-avatar-text-medium-font-size | @font-size-m | -
+--td-avatar-text-small-font-size | @font-size-base | -
diff --git a/uni_modules/tdesign-uniapp/components/avatar/README.md b/uni_modules/tdesign-uniapp/components/avatar/README.md
new file mode 100644
index 0000000..897972f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/avatar/README.md
@@ -0,0 +1,152 @@
+---
+title: Avatar 头像
+description: 用于展示用户头像信息,除了纯展示也可点击进入个人详情等操作。
+spline: data
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TAvatar from '@tdesign/uniapp/avatar/avatar.vue';
+import TAvatarGroup from '@tdesign/uniapp/avatar-group/avatar-group.vue';
+```
+
+### 头像类型
+
+图片头像
+
+{{ image-avatar }}
+
+字符头像
+
+{{ character-avatar }}
+
+图标头像
+
+{{ icon-avatar }}
+
+徽标头像
+
+{{ badge-avatar }}
+
+
+### 组合头像
+
+纯展示
+
+{{ exhibition }}
+
+带操作
+
+{{ action }}
+
+### 头像尺寸
+
+头像 large/medium/small 尺寸
+
+{{ size }}
+
+## API
+
+### Avatar Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+alt | String | - | 头像替换文本,仅当图片加载失败时有效 | N
+badge-props | Object | {} | 头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字。TS 类型:`BadgeProps`,[Badge API Documents](./badge?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/avatar/type.ts) | N
+bordered | Boolean | false | 已废弃。是否显示外边框 | N
+hide-on-load-failed | Boolean | false | 加载失败时隐藏图片 | N
+icon | String / Object | - | 图标。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` | N
+image | String | - | 图片地址 | N
+image-props | Object | - | 透传至 Image 组件。TS 类型:`ImageProps`,[Image API Documents](./image?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/avatar/type.ts) | N
+shape | String | - | 形状。优先级高于 AvatarGroup.shape 。Avatar 单独存在时,默认值为 circle。如果父组件 AvatarGroup 存在,默认值便由 AvatarGroup.shape 决定。可选项:circle/round。TS 类型:`ShapeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+size | String | - | 尺寸,示例值:small/medium/large/24px/38px 等。优先级高于 AvatarGroup.size 。Avatar 单独存在时,默认值为 medium。如果父组件 AvatarGroup 存在,默认值便由 AvatarGroup.size 决定 | N
+
+### Avatar Events
+
+名称 | 参数 | 描述
+-- | -- | --
+error | `(e: Event)` | 图片加载失败时触发
+
+### Avatar Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+
+### Avatar External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-alt | 替代文本样式类
+t-class-content | 内容样式类
+t-class-icon | 图标样式类
+t-class-image | 图片样式类
+
+
+### AvatarGroup Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+cascading | String | 'left-up' | 图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上。可选项:left-up/right-up。TS 类型:`CascadingValue` `type CascadingValue = 'left-up' \| 'right-up'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/avatar-group/type.ts) | N
+collapse-avatar | String | - | 头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多` | N
+max | Number | - | 能够同时显示的最多头像数量 | N
+shape | String | - | 形状。优先级低于 Avatar.shape。可选项:circle/round。TS 类型:`ShapeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+size | String | - | 尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size | N
+
+### AvatarGroup Events
+
+名称 | 参数 | 描述
+-- | -- | --
+collapsed-item-click | `(e: MouseEvent)` | 点击头像折叠元素触发
+
+### AvatarGroup Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+collapse-avatar | 自定义 `collapse-avatar` 显示内容
+
+### AvatarGroup External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-content | 内容样式类
+t-class-image | 图片样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-avatar-group-init-z-index | @avatar-group-init-zIndex | -
+--td-avatar-group-line-spacing | 4rpx | -
+--td-avatar-group-margin-left-large | -16rpx | -
+--td-avatar-group-margin-left-medium | -16rpx | -
+--td-avatar-group-margin-left-small | -16rpx | -
+--td-avatar-bg-color | @brand-color-light-active | -
+--td-avatar-border-color | #fff | -
+--td-avatar-border-width-large | 6rpx | -
+--td-avatar-border-width-medium | 4rpx | -
+--td-avatar-border-width-small | 2rpx | -
+--td-avatar-circle-border-radius | @radius-circle | -
+--td-avatar-content-color | @brand-color | -
+--td-avatar-icon-large-font-size | 64rpx | -
+--td-avatar-icon-medium-font-size | 48rpx | -
+--td-avatar-icon-small-font-size | 40rpx | -
+--td-avatar-large-width | 128rpx | -
+--td-avatar-margin-left | 0 | -
+--td-avatar-medium-width | 96rpx | -
+--td-avatar-round-border-radius | @radius-default | -
+--td-avatar-small-width | 80rpx | -
+--td-avatar-text-large-font-size | @font-size-xl | -
+--td-avatar-text-medium-font-size | @font-size-m | -
+--td-avatar-text-small-font-size | @font-size-base | -
diff --git a/uni_modules/tdesign-uniapp/components/avatar/avatar.css b/uni_modules/tdesign-uniapp/components/avatar/avatar.css
new file mode 100644
index 0000000..3718b14
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/avatar/avatar.css
@@ -0,0 +1,77 @@
+.t-avatar {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ background-color: var(--td-avatar-bg-color, var(--td-brand-color-light-active, var(--td-primary-color-2, #d9e1ff)));
+ color: var(--td-avatar-content-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-avatar__wrapper {
+ display: inline-flex;
+ position: relative;
+ vertical-align: top;
+ margin-left: var(--td-avatar-margin-left, 0);
+}
+.t-avatar--large {
+ width: var(--td-avatar-large-width, 128rpx);
+ height: var(--td-avatar-large-width, 128rpx);
+ font-size: var(--td-avatar-text-large-font-size, var(--td-font-size-xl, 40rpx));
+}
+.t-avatar--large .t-avatar__icon {
+ font-size: var(--td-avatar-icon-large-font-size, 64rpx);
+}
+.t-avatar--medium {
+ width: var(--td-avatar-medium-width, 96rpx);
+ height: var(--td-avatar-medium-width, 96rpx);
+ font-size: var(--td-avatar-text-medium-font-size, var(--td-font-size-m, 32rpx));
+}
+.t-avatar--medium .t-avatar__icon {
+ font-size: var(--td-avatar-icon-medium-font-size, 48rpx);
+}
+.t-avatar--small {
+ width: var(--td-avatar-small-width, 80rpx);
+ height: var(--td-avatar-small-width, 80rpx);
+ font-size: var(--td-avatar-text-small-font-size, var(--td-font-size-base, 28rpx));
+}
+.t-avatar--small .t-avatar__icon {
+ font-size: var(--td-avatar-icon-small-font-size, 40rpx);
+}
+.t-avatar .t-image,
+.t-avatar__image {
+ width: 100%;
+ height: 100%;
+}
+.t-avatar--circle {
+ border-radius: var(--td-avatar-circle-border-radius, var(--td-radius-circle, 50%));
+ overflow: hidden;
+}
+.t-avatar--round {
+ border-radius: var(--td-avatar-round-border-radius, var(--td-radius-default, 12rpx));
+ overflow: hidden;
+}
+.t-avatar__text,
+.t-avatar__icon {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.t-avatar__text:empty,
+.t-avatar__icon:empty {
+ width: 0;
+ height: 0;
+}
+.t-avatar--border {
+ border-color: var(--td-avatar-border-color, #fff);
+ border-style: solid;
+}
+.t-avatar--border-small {
+ border-width: var(--td-avatar-border-width-small, 2rpx);
+}
+.t-avatar--border-medium {
+ border-width: var(--td-avatar-border-width-medium, 4rpx);
+}
+.t-avatar--border-large {
+ border-width: var(--td-avatar-border-width-large, 6rpx);
+}
diff --git a/uni_modules/tdesign-uniapp/components/avatar/avatar.vue b/uni_modules/tdesign-uniapp/components/avatar/avatar.vue
new file mode 100644
index 0000000..926f85c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/avatar/avatar.vue
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/avatar/computed.js b/uni_modules/tdesign-uniapp/components/avatar/computed.js
new file mode 100644
index 0000000..c7da167
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/avatar/computed.js
@@ -0,0 +1,30 @@
+import { getRegExp } from '../common/runtime/wxs-polyfill';
+
+export function getClass(classPrefix, size, shape, bordered) {
+ const hasPx = (size || '').indexOf('px') > -1;
+ const borderSize = hasPx ? 'medium' : size;
+ const classNames = [
+ classPrefix,
+ classPrefix + (shape === 'round' ? '--round' : '--circle'),
+ bordered ? `${classPrefix}--border ${classPrefix}--border-${borderSize}` : '',
+ hasPx ? '' : `${classPrefix}--${size}`,
+ ];
+ return classNames.join(' ');
+}
+
+export function getSize(size = 'medium', windowWidth) {
+ const res = getRegExp('^([0-9]+)(px|rpx)$').exec(size);
+
+ if (res && res.length >= 3) {
+ let px = res[1];
+ if (res[2] === 'rpx') {
+ px = Math.floor((windowWidth * res[1]) / 750);
+ }
+
+ return `width:${size};height:${size};font-size:${(px / 8) * 3 + 2}px`;
+ }
+}
+
+export function getStyles(isShow) {
+ return isShow ? '' : 'display: none;';
+}
diff --git a/uni_modules/tdesign-uniapp/components/avatar/props.ts b/uni_modules/tdesign-uniapp/components/avatar/props.ts
new file mode 100644
index 0000000..0d4e6e0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/avatar/props.ts
@@ -0,0 +1,54 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdAvatarProps } from './type';
+export default {
+ /** 头像替换文本,仅当图片加载失败时有效 */
+ alt: {
+ type: String,
+ default: '',
+ },
+ /** 头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字 */
+ badgeProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 已废弃。是否显示外边框 */
+ bordered: Boolean,
+ /** 加载失败时隐藏图片 */
+ hideOnLoadFailed: Boolean,
+ /** 图标。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` */
+ icon: {
+ type: [String, Object],
+ },
+ /** 图片地址 */
+ image: {
+ type: String,
+ default: '',
+ },
+ /** 透传至 Image 组件 */
+ imageProps: {
+ type: Object,
+ },
+ /** 形状。优先级高于 AvatarGroup.shape 。Avatar 单独存在时,默认值为 circle。如果父组件 AvatarGroup 存在,默认值便由 AvatarGroup.shape 决定 */
+ shape: {
+ type: String,
+ validator(val: TdAvatarProps['shape']): boolean {
+ if (!val) return true;
+ return ['circle', 'round'].includes(val);
+ },
+ },
+ /** 尺寸,示例值:small/medium/large/24px/38px 等。优先级高于 AvatarGroup.size 。Avatar 单独存在时,默认值为 medium。如果父组件 AvatarGroup 存在,默认值便由 AvatarGroup.size 决定 */
+ size: {
+ type: String,
+ default: '',
+ },
+ /** 图片加载失败时触发 */
+ onError: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/avatar/type.ts b/uni_modules/tdesign-uniapp/components/avatar/type.ts
new file mode 100644
index 0000000..c7695c0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/avatar/type.ts
@@ -0,0 +1,58 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdBadgeProps as BadgeProps } from '../badge/type';
+import type { TdImageProps as ImageProps } from '../image/type';
+import type { ShapeEnum } from '../common/common';
+
+export interface TdAvatarProps {
+ /**
+ * 头像替换文本,仅当图片加载失败时有效
+ * @default ''
+ */
+ alt?: string;
+ /**
+ * 头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字
+ * @default {}
+ */
+ badgeProps?: BadgeProps;
+ /**
+ * 已废弃。是否显示外边框
+ * @default false
+ */
+ bordered?: boolean;
+ /**
+ * 加载失败时隐藏图片
+ * @default false
+ */
+ hideOnLoadFailed?: boolean;
+ /**
+ * 图标。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon`
+ */
+ icon?: string | object;
+ /**
+ * 图片地址
+ * @default ''
+ */
+ image?: string;
+ /**
+ * 透传至 Image 组件
+ */
+ imageProps?: ImageProps;
+ /**
+ * 形状。优先级高于 AvatarGroup.shape 。Avatar 单独存在时,默认值为 circle。如果父组件 AvatarGroup 存在,默认值便由 AvatarGroup.shape 决定
+ */
+ shape?: ShapeEnum;
+ /**
+ * 尺寸,示例值:small/medium/large/24px/38px 等。优先级高于 AvatarGroup.size 。Avatar 单独存在时,默认值为 medium。如果父组件 AvatarGroup 存在,默认值便由 AvatarGroup.size 决定
+ * @default ''
+ */
+ size?: string;
+ /**
+ * 图片加载失败时触发
+ */
+ onError?: (e: Event) => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/back-top/README.en-US.md b/uni_modules/tdesign-uniapp/components/back-top/README.en-US.md
new file mode 100644
index 0000000..7321518
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/back-top/README.en-US.md
@@ -0,0 +1,49 @@
+:: BASE_DOC ::
+
+## API
+
+### BackTop Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+fixed | Boolean | true | \- | N
+icon | String / Boolean / Object | true | \- | N
+scroll-top | Number | 0 | \- | N
+text | String | '' | \- | N
+theme | String | round | options: round/half-round/round-dark/half-round-dark | N
+visibility-height | Number | 200 | \- | N
+
+### BackTop Events
+
+name | params | description
+-- | -- | --
+to-top | \- | \-
+
+### BackTop Slots
+
+name | Description
+-- | --
+\- | \-
+icon | \-
+
+### BackTop External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-icon | \-
+t-class-text | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-back-top-half-round-border-radius | @radius-round | -
+--td-back-top-round-bg-color | @bg-color-container | -
+--td-back-top-round-border-color | @component-border | -
+--td-back-top-round-border-radius | @radius-circle | -
+--td-back-top-round-color | @text-color-primary | -
+--td-back-top-round-dark-bg-color | @gray-color-13 | -
+--td-back-top-round-dark-color | @text-color-anti | -
diff --git a/uni_modules/tdesign-uniapp/components/back-top/README.md b/uni_modules/tdesign-uniapp/components/back-top/README.md
new file mode 100644
index 0000000..5e5f84a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/back-top/README.md
@@ -0,0 +1,67 @@
+---
+title: BackTop 返回顶部
+description: 用于当页面过长往下滑动时,帮助用户快速回到页面顶部。
+spline: navigation
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TBackTop from '@tdesign/uniapp/back-top/back-top.vue';
+```
+
+### 基础返回顶部
+
+{{ base }}
+
+## API
+
+### BackTop Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+fixed | Boolean | true | 是否绝对定位固定到屏幕右下方 | N
+icon | String / Boolean / Object | true | 图标。值为 `false` 表示不显示图标。不传表示使用默认图标 `'backtop'` | N
+scroll-top | Number | 0 | 页面滚动距离 | N
+text | String | '' | 文案 | N
+theme | String | round | 预设的样式类型。可选项:round/half-round/round-dark/half-round-dark | N
+visibility-height | Number | 200 | 滚动高度达到此参数值才出现 | N
+
+### BackTop Events
+
+名称 | 参数 | 描述
+-- | -- | --
+to-top | \- | 点击触发
+
+### BackTop Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+icon | 自定义图标内容
+
+### BackTop External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-icon | 图标样式类
+t-class-text | 文本样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-back-top-half-round-border-radius | @radius-round | -
+--td-back-top-round-bg-color | @bg-color-container | -
+--td-back-top-round-border-color | @component-border | -
+--td-back-top-round-border-radius | @radius-circle | -
+--td-back-top-round-color | @text-color-primary | -
+--td-back-top-round-dark-bg-color | @gray-color-13 | -
+--td-back-top-round-dark-color | @text-color-anti | -
diff --git a/uni_modules/tdesign-uniapp/components/back-top/back-top.css b/uni_modules/tdesign-uniapp/components/back-top/back-top.css
new file mode 100644
index 0000000..b2d1c8f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/back-top/back-top.css
@@ -0,0 +1,65 @@
+.t-back-top {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ background-color: transparent;
+ overflow: hidden;
+ box-sizing: border-box;
+ transition: height 0.2s;
+ height: auto;
+}
+.t-back-top--fixed {
+ position: fixed;
+ right: var(--td-spacer, 16rpx);
+ bottom: calc(var(--td-spacer-2, 32rpx) + env(safe-area-inset-bottom));
+}
+.t-back-top--round,
+.t-back-top--round-dark {
+ width: 96rpx;
+ height: 96rpx;
+ border-radius: var(--td-back-top-round-border-radius, var(--td-radius-circle, 50%));
+}
+.t-back-top--round,
+.t-back-top--half-round {
+ color: var(--td-back-top-round-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ border: 1rpx solid var(--td-back-top-round-border-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+ background-color: var(--td-back-top-round-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-back-top--round-dark,
+.t-back-top--half-round-dark {
+ color: var(--td-back-top-round-dark-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+ background-color: var(--td-back-top-round-dark-bg-color, var(--td-gray-color-13, #242424));
+}
+.t-back-top--half-round,
+.t-back-top--half-round-dark {
+ width: 120rpx;
+ height: 80rpx;
+ border-radius: 0;
+ border-top-left-radius: var(--td-back-top-half-round-border-radius, var(--td-radius-round, 999px));
+ border-bottom-left-radius: var(--td-back-top-half-round-border-radius, var(--td-radius-round, 999px));
+ flex-direction: row;
+ right: 0;
+}
+.t-back-top__text--round,
+.t-back-top__text--round-dark,
+.t-back-top__text--half-round,
+.t-back-top__text--half-round-dark {
+ font-weight: 600;
+ font-size: var(--td-font-size, 20rpx);
+ line-height: 24rpx;
+}
+.t-back-top__text--half-round,
+.t-back-top__text--half-round-dark {
+ width: 48rpx;
+}
+.t-back-top__icon:not(:empty) + .t-back-top__text--half-round,
+.t-back-top__icon:not(:empty) + .t-back-top__text--half-round-dark {
+ margin-left: 8rpx;
+}
+.t-back-top__icon {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 44rpx;
+}
diff --git a/uni_modules/tdesign-uniapp/components/back-top/back-top.vue b/uni_modules/tdesign-uniapp/components/back-top/back-top.vue
new file mode 100644
index 0000000..2bd54b7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/back-top/back-top.vue
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/back-top/props.ts b/uni_modules/tdesign-uniapp/components/back-top/props.ts
new file mode 100644
index 0000000..3ad55cf
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/back-top/props.ts
@@ -0,0 +1,48 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdBackTopProps } from './type';
+export default {
+ /** 是否绝对定位固定到屏幕右下方 */
+ fixed: {
+ type: Boolean,
+ default: true,
+ },
+ /** 图标。值为 `false` 表示不显示图标。不传表示使用默认图标 `'backtop'` */
+ icon: {
+ type: [String, Boolean, Object],
+ default: true as TdBackTopProps['icon'],
+ },
+ /** 页面滚动距离 */
+ scrollTop: {
+ type: Number,
+ default: 0,
+ },
+ /** 文案 */
+ text: {
+ type: String,
+ default: '',
+ },
+ /** 预设的样式类型 */
+ theme: {
+ type: String,
+ default: 'round' as TdBackTopProps['theme'],
+ validator(val: TdBackTopProps['theme']): boolean {
+ if (!val) return true;
+ return ['round', 'half-round', 'round-dark', 'half-round-dark'].includes(val);
+ },
+ },
+ /** 滚动高度达到此参数值才出现 */
+ visibilityHeight: {
+ type: Number,
+ default: 200,
+ },
+ /** 点击触发 */
+ onToTop: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/back-top/type.ts b/uni_modules/tdesign-uniapp/components/back-top/type.ts
new file mode 100644
index 0000000..8e28115
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/back-top/type.ts
@@ -0,0 +1,42 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdBackTopProps {
+ /**
+ * 是否绝对定位固定到屏幕右下方
+ * @default true
+ */
+ fixed?: boolean;
+ /**
+ * 图标。值为 `false` 表示不显示图标。不传表示使用默认图标 `'backtop'`
+ * @default true
+ */
+ icon?: string | boolean | object;
+ /**
+ * 页面滚动距离
+ * @default 0
+ */
+ scrollTop?: number;
+ /**
+ * 文案
+ * @default ''
+ */
+ text?: string;
+ /**
+ * 预设的样式类型
+ * @default round
+ */
+ theme?: 'round' | 'half-round' | 'round-dark' | 'half-round-dark';
+ /**
+ * 滚动高度达到此参数值才出现
+ * @default 200
+ */
+ visibilityHeight?: number;
+ /**
+ * 点击触发
+ */
+ onToTop?: () => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/badge/README.en-US.md b/uni_modules/tdesign-uniapp/components/badge/README.en-US.md
new file mode 100644
index 0000000..9fb489d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/badge/README.en-US.md
@@ -0,0 +1,54 @@
+:: BASE_DOC ::
+
+## API
+
+### Badge Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+color | String | - | \- | N
+content | String | - | \- | N
+count | String / Number | 0 | \- | N
+dot | Boolean | false | \- | N
+max-count | Number | 99 | \- | N
+offset | Array | - | Typescript: `Array` | N
+shape | String | circle | options: circle/square/bubble/ribbon/ribbon-right/ribbon-left/triangle-right/triangle-left | N
+show-zero | Boolean | false | \- | N
+size | String | medium | options: medium/large | N
+
+### Badge Slots
+
+name | Description
+-- | --
+\- | \-
+count | \-
+
+### Badge External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-content | \-
+t-class-count | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-badge-basic-height | 32rpx | -
+--td-badge-basic-padding | 8rpx | -
+--td-badge-basic-width | 32rpx | -
+--td-badge-bg-color | @error-color | -
+--td-badge-border-radius | 4rpx | -
+--td-badge-bubble-border-radius | 20rpx 20rpx 20rpx 1px | -
+--td-badge-content-text-color | @text-color-primary | -
+--td-badge-dot-size | 16rpx | -
+--td-badge-font | @font-mark-extraSmall | -
+--td-badge-large-font | @font-mark-small | -
+--td-badge-large-height | 40rpx | -
+--td-badge-large-padding | 10rpx | -
+--td-badge-text-color | @text-color-anti | -
+--td-line-height-mark-extraSmall | 32rpx | -
+--td-line-height-mark-small | 40rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/badge/README.md b/uni_modules/tdesign-uniapp/components/badge/README.md
new file mode 100644
index 0000000..84ed05d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/badge/README.md
@@ -0,0 +1,85 @@
+---
+title: Badge 徽标
+description: 用于告知用户,该区域的状态变化或者待处理任务的数量。
+spline: data
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TBadge from '@tdesign/uniapp/badge/badge.vue';
+```
+
+### 组件类型
+
+{{ base }}
+
+### 组件样式
+
+{{ theme }}
+
+### 组件尺寸
+
+{{ size }}
+
+## FAQ
+
+### 如何处理由 ribbon 徽标溢出导致页面出现横向滚动?
+角标溢出问题建议从父容器组件处理。如 #3063 ,可以给父容器 `cell` 组件添加 `overflow: hidden`,处理溢出造成页面出现横向滚动的问题。
+
+## API
+
+### Badge Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+color | String | - | 颜色 | N
+content | String | - | 徽标内容,示例:`content='自定义内容'`。也可以使用默认插槽定义 | N
+count | String / Number | 0 | 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染 | N
+dot | Boolean | false | 是否为红点 | N
+max-count | Number | 99 | 封顶的数字值 | N
+offset | Array | - | 设置状态点的位置偏移,示例:[-10, 20] 或 ['10em', '8rem']。TS 类型:`Array` | N
+shape | String | circle | 徽标形状,其中 ribbon 和 ribbon-right 等效。可选项:circle/square/bubble/ribbon/ribbon-right/ribbon-left/triangle-right/triangle-left | N
+show-zero | Boolean | false | 当数值为 0 时,是否展示徽标 | N
+size | String | medium | 尺寸。可选项:medium/large | N
+
+### Badge Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+count | 徽标右上角内容
+
+### Badge External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-content | 内容样式类
+t-class-count | 计数样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-badge-basic-height | 32rpx | -
+--td-badge-basic-padding | 8rpx | -
+--td-badge-basic-width | 32rpx | -
+--td-badge-bg-color | @error-color | -
+--td-badge-border-radius | 4rpx | -
+--td-badge-bubble-border-radius | 20rpx 20rpx 20rpx 1px | -
+--td-badge-content-text-color | @text-color-primary | -
+--td-badge-dot-size | 16rpx | -
+--td-badge-font | @font-mark-extraSmall | -
+--td-badge-large-font | @font-mark-small | -
+--td-badge-large-height | 40rpx | -
+--td-badge-large-padding | 10rpx | -
+--td-badge-text-color | @text-color-anti | -
+--td-line-height-mark-extraSmall | 32rpx | -
+--td-line-height-mark-small | 40rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/badge/badge.css b/uni_modules/tdesign-uniapp/components/badge/badge.css
new file mode 100644
index 0000000..fd9b162
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/badge/badge.css
@@ -0,0 +1,140 @@
+.t-badge {
+ position: relative;
+ display: inline-flex;
+ align-items: start;
+}
+.t-badge--basic {
+ z-index: 100;
+ padding: 0 var(--td-badge-basic-padding, 8rpx);
+ font: var(--td-badge-font, var(--td-font-mark-extraSmall, 600 20rpx / 32rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-badge-text-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+ background-color: var(--td-badge-bg-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+ text-align: center;
+ height: var(--td-badge-basic-height, 32rpx);
+ border-radius: var(--td-badge-border-radius, 4rpx);
+}
+.t-badge--dot {
+ height: var(--td-badge-dot-size, 16rpx);
+ border-radius: 50%;
+ min-width: var(--td-badge-dot-size, 16rpx);
+ padding: 0;
+}
+.t-badge--count {
+ min-width: var(--td-badge-basic-width, 32rpx);
+ white-space: nowrap;
+ box-sizing: border-box;
+}
+.t-badge--circle {
+ border-radius: calc(var(--td-badge-basic-height, 32rpx) / 2);
+}
+.t-badge__ribbon-outer,
+.t-badge__ribbon-right-outer,
+.t-badge__triangle-right-outer,
+.t-badge__ribbon-left-outer,
+.t-badge__triangle-left-outer {
+ position: absolute;
+ top: 0;
+}
+.t-badge__ribbon-outer,
+.t-badge__ribbon-right-outer,
+.t-badge__triangle-right-outer {
+ right: 0;
+}
+.t-badge__ribbon-left-outer,
+.t-badge__triangle-left-outer {
+ left: 0;
+}
+.t-badge--bubble {
+ border-radius: var(--td-badge-bubble-border-radius, 20rpx 20rpx 20rpx 1px);
+}
+.t-badge--ribbon,
+.t-badge--ribbon-right,
+.t-badge--ribbon-left,
+.t-badge--triangle-left,
+.t-badge--triangle-right {
+ width: calc(var(--td-badge-basic-height, 32rpx) * 2);
+ height: calc(var(--td-badge-basic-height, 32rpx) * 2);
+ border-radius: 0;
+ padding: 0;
+ position: absolute;
+ top: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ overflow: hidden;
+}
+.t-badge--ribbon,
+.t-badge--ribbon-right {
+ background: linear-gradient(45deg, transparent 50%, var(--td-badge-bg-color, var(--td-error-color, var(--td-error-color-6, #d54941))) 50%, var(--td-badge-bg-color, var(--td-error-color, var(--td-error-color-6, #d54941))) 85%, transparent 85%);
+}
+.t-badge--triangle-right {
+ background: linear-gradient(45deg, transparent 50%, var(--td-badge-bg-color, var(--td-error-color, var(--td-error-color-6, #d54941))) 50%);
+}
+.t-badge--ribbon,
+.t-badge--ribbon-right,
+.t-badge--triangle-right {
+ right: 0;
+}
+.t-badge--ribbon .t-badge__count,
+.t-badge--ribbon-right .t-badge__count,
+.t-badge--triangle-right .t-badge__count {
+ transform: rotate(45deg) translateY(calc(-1 * var(--td-line-height-mark-extraSmall, 32rpx) / 2 + 1rpx));
+}
+.t-badge--ribbon-left {
+ background: linear-gradient(-45deg, transparent 50%, var(--td-badge-bg-color, var(--td-error-color, var(--td-error-color-6, #d54941))) 50%, var(--td-badge-bg-color, var(--td-error-color, var(--td-error-color-6, #d54941))) 85%, transparent 85%);
+}
+.t-badge--triangle-left {
+ background: linear-gradient(-45deg, transparent 50%, var(--td-badge-bg-color, var(--td-error-color, var(--td-error-color-6, #d54941))) 50%);
+}
+.t-badge--ribbon-left,
+.t-badge--triangle-left {
+ left: 0;
+}
+.t-badge--ribbon-left .t-badge__count,
+.t-badge--triangle-left .t-badge__count {
+ transform: rotate(-45deg) translateY(calc(-1 * var(--td-line-height-mark-extraSmall, 32rpx) / 2 + 1rpx));
+}
+.t-badge--large {
+ font: var(--td-badge-large-font, var(--td-font-mark-small, 600 24rpx / 40rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ height: var(--td-badge-large-height, 40rpx);
+ min-width: var(--td-badge-large-height, 40rpx);
+ padding: 0 var(--td-badge-large-padding, 10rpx);
+}
+.t-badge--large.t-badge--circle {
+ border-radius: calc(var(--td-badge-large-height, 40rpx) / 2);
+}
+.t-badge--large.t-badge--ribbon,
+.t-badge--large.t-badge--ribbon-right,
+.t-badge--large.t-badge--ribbon-left,
+.t-badge--large.t-badge--triangle-right,
+.t-badge--large.t-badge--triangle-left {
+ width: calc(var(--td-badge-large-height, 40rpx) * 2);
+ height: calc(var(--td-badge-large-height, 40rpx) * 2);
+ padding: 0;
+}
+.t-badge--large.t-badge--ribbon .t-badge__count,
+.t-badge--large.t-badge--ribbon-right .t-badge__count,
+.t-badge--large.t-badge--triangle-right .t-badge__count {
+ transform: rotate(45deg) translateY(calc(-1 * var(--td-line-height-mark-small, 40rpx) / 2 + 3rpx));
+}
+.t-badge--large.t-badge--ribbon-left .t-badge__count,
+.t-badge--large.t-badge--triangle-left .t-badge__count {
+ transform: rotate(-45deg) translateY(calc(-1 * var(--td-line-height-mark-small, 40rpx) / 2 + 3rpx));
+}
+.t-badge__content:not(:empty) + .t-badge--bubble.t-has-count,
+.t-badge__content:not(:empty) + .t-badge--circle.t-has-count,
+.t-badge__content:not(:empty) + .t-badge--square.t-has-count {
+ transform-origin: center center;
+ transform: translate(-50%, -50%);
+ position: absolute;
+ top: 0;
+ left: 100%;
+}
+.t-badge__content-text {
+ display: block;
+ font: var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+ color: var(--td-badge-content-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-badge__count:empty {
+ display: none;
+}
diff --git a/uni_modules/tdesign-uniapp/components/badge/badge.vue b/uni_modules/tdesign-uniapp/components/badge/badge.vue
new file mode 100644
index 0000000..2194017
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/badge/badge.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ content }}
+
+
+
+
+
+ {{ getBadgeValue({ dot, count, maxCount }) }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/badge/computed.js b/uni_modules/tdesign-uniapp/components/badge/computed.js
new file mode 100644
index 0000000..f4602d4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/badge/computed.js
@@ -0,0 +1,63 @@
+export const getBadgeValue = function (props) {
+ if (props.dot) {
+ return '';
+ }
+ // eslint-disable-next-line no-restricted-globals
+ if (isNaN(props.count) || isNaN(props.maxCount)) {
+ return props.count;
+ }
+ return parseInt(props.count, 10) > props.maxCount ? `${props.maxCount}+` : props.count;
+};
+
+export const hasUnit = function (unit) {
+ return (
+ unit.indexOf('px') > 0
+ || unit.indexOf('rpx') > 0
+ || unit.indexOf('em') > 0
+ || unit.indexOf('rem') > 0
+ || unit.indexOf('%') > 0
+ || unit.indexOf('vh') > 0
+ || unit.indexOf('vm') > 0
+ );
+};
+
+export const getBadgeStyles = function (props) {
+ let styleStr = '';
+ if (props.color) {
+ styleStr += `background:${props.color};`;
+ }
+ if (props.offset?.[0]) {
+ styleStr
+ += `left: calc(100% + ${hasUnit(props.offset[0].toString()) ? props.offset[0] : `${props.offset[0]}px`});`;
+ }
+ if (props.offset?.[1]) {
+ styleStr += `top:${hasUnit(props.offset[1].toString()) ? props.offset[1] : `${props.offset[1]}px`};`;
+ }
+ return styleStr;
+};
+
+
+export const getBadgeInnerClass = function (props) {
+ const baseClass = props.classPrefix;
+ const classNames = [
+ `${baseClass}--basic`,
+ props.dot ? `${baseClass}--dot` : '',
+ `${baseClass}--${props.size}`,
+ `${baseClass}--${props.shape}`,
+ !props.dot ? `${baseClass}--count` : '',
+ ];
+ return classNames.join(' ');
+};
+
+export const isShowBadge = function (props) {
+ if (props.dot) {
+ return true;
+ }
+ // eslint-disable-next-line no-restricted-globals
+ if (!props.showZero && !isNaN(props.count) && parseInt(props.count, 10) === 0) {
+ return false;
+ }
+ if (props.count == null) return false;
+ return true;
+};
+
diff --git a/uni_modules/tdesign-uniapp/components/badge/props.ts b/uni_modules/tdesign-uniapp/components/badge/props.ts
new file mode 100644
index 0000000..885a841
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/badge/props.ts
@@ -0,0 +1,55 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdBadgeProps } from './type';
+export default {
+ /** 颜色 */
+ color: {
+ type: String,
+ default: '',
+ },
+ /** 徽标内容,示例:`content='自定义内容'`。也可以使用默认插槽定义 */
+ content: {
+ type: String,
+ default: '',
+ },
+ /** 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染 */
+ count: {
+ type: [String, Number],
+ default: 0 as TdBadgeProps['count'],
+ },
+ /** 是否为红点 */
+ dot: Boolean,
+ /** 封顶的数字值 */
+ maxCount: {
+ type: Number,
+ default: 99,
+ },
+ /** 设置状态点的位置偏移,示例:[-10, 20] 或 ['10em', '8rem'] */
+ offset: {
+ type: Array,
+ },
+ /** 徽标形状,其中 ribbon 和 ribbon-right 等效 */
+ shape: {
+ type: String,
+ default: 'circle' as TdBadgeProps['shape'],
+ validator(val: TdBadgeProps['shape']): boolean {
+ if (!val) return true;
+ return ['circle', 'square', 'bubble', 'ribbon', 'ribbon-right', 'ribbon-left', 'triangle-right', 'triangle-left'].includes(val);
+ },
+ },
+ /** 当数值为 0 时,是否展示徽标 */
+ showZero: Boolean,
+ /** 尺寸 */
+ size: {
+ type: String,
+ default: 'medium' as TdBadgeProps['size'],
+ validator(val: TdBadgeProps['size']): boolean {
+ if (!val) return true;
+ return ['medium', 'large'].includes(val);
+ },
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/badge/type.ts b/uni_modules/tdesign-uniapp/components/badge/type.ts
new file mode 100644
index 0000000..bceb098
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/badge/type.ts
@@ -0,0 +1,60 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdBadgeProps {
+ /**
+ * 颜色
+ * @default ''
+ */
+ color?: string;
+ /**
+ * 徽标内容,示例:`content='自定义内容'`。也可以使用默认插槽定义
+ * @default ''
+ */
+ content?: string;
+ /**
+ * 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染
+ * @default 0
+ */
+ count?: string | number;
+ /**
+ * 是否为红点
+ * @default false
+ */
+ dot?: boolean;
+ /**
+ * 封顶的数字值
+ * @default 99
+ */
+ maxCount?: number;
+ /**
+ * 设置状态点的位置偏移,示例:[-10, 20] 或 ['10em', '8rem']
+ */
+ offset?: Array;
+ /**
+ * 徽标形状,其中 ribbon 和 ribbon-right 等效
+ * @default circle
+ */
+ shape?:
+ | 'circle'
+ | 'square'
+ | 'bubble'
+ | 'ribbon'
+ | 'ribbon-right'
+ | 'ribbon-left'
+ | 'triangle-right'
+ | 'triangle-left';
+ /**
+ * 当数值为 0 时,是否展示徽标
+ * @default false
+ */
+ showZero?: boolean;
+ /**
+ * 尺寸
+ * @default medium
+ */
+ size?: 'medium' | 'large';
+}
diff --git a/uni_modules/tdesign-uniapp/components/button/README.en-US.md b/uni_modules/tdesign-uniapp/components/button/README.en-US.md
new file mode 100644
index 0000000..c07c5fb
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/button/README.en-US.md
@@ -0,0 +1,238 @@
+---
+title: Button
+description: Buttons are used to open a closed-loop task, such as "delete" an object, "buy" an item, etc.
+spline: base
+isComponent: true
+---
+
+
+
+
+## Usage
+
+For global import, configure it in `app.json` in the root directory of the miniprogram. For local import, configure it in `index.json` of the page or component that needs to be imported.
+
+```json
+"usingComponents": {
+ "t-button": "tdesign-miniprogram/button/button"
+}
+```
+
+
+## Code Demo
+
+### 01 Component Type
+
+#### Basic Buttons
+
+{{ base }}
+
+#### Icon Button
+
+{{ icon-btn }}
+
+#### Ghost Button
+
+{{ ghost-btn }}
+
+#### Combination Button
+
+{{ group-btn }}
+
+#### Banner Button
+
+{{ block-btn }}
+
+### 02 Component State
+
+#### Buttons for different states
+
+{{ disabled }}
+
+### 03 Component Style
+
+#### Different sizes of buttons
+
+{{ size }}
+
+#### Different shaped buttons
+
+{{ shape }}
+
+#### Different color theme buttons
+
+{{ theme }}
+
+
+
+## API
+
+### Button Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+app-parameter | String | - | \- | N
+block | Boolean | false | make button to be a block-level element | N
+content | String | - | button's children elements | N
+custom-dataset | String / Number / Boolean / Object / Array | {} | Typescript:`string \| number \| boolean \| object \| Array` | N
+disabled | Boolean | undefined | disable the button, make it can not be clicked | N
+ghost | Boolean | false | make background-color to be transparent | N
+hover-class | String | - | \- | N
+hover-start-time | Number | 20 | \- | N
+hover-stay-time | Number | 70 | \- | N
+hover-stop-propagation | Boolean | false | \- | N
+icon | String / Object | - | icon name | N
+lang | String | - | message language。options: en/zh_CN/zh_TW | N
+loading | Boolean | false | set button to be loading state | N
+loading-props | Object | {} | Typescript:`LoadingProps`,[Loading API Documents](./loading?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/button/type.ts) | N
+open-type | String | - | open type of button, [Miniprogram Button](https://developers.weixin.qq.com/miniprogram/dev/component/button.html)。options: contact/share/getPhoneNumber/getUserInfo/launchApp/openSetting/feedback/chooseAvatar/agreePrivacyAuthorization | N
+phone-number-no-quota-toast | Boolean | true | \- | N
+send-message-img | String | 截图 | \- | N
+send-message-path | String | 当前分享路径 | \- | N
+send-message-title | String | 当前标题 | \- | N
+session-from | String | - | \- | N
+shape | String | rectangle | button shape。options: rectangle/square/round/circle | N
+show-message-card | Boolean | false | \- | N
+size | String | medium | a button has four size。options: extra-small/small/medium/large | N
+t-id | String | - | id | N
+theme | String | default | button theme。options: default/primary/danger/light | N
+type | String | - | type of button element, same as formType of Miniprogram。options: submit/reset | N
+variant | String | base | variant of button。options: base/outline/dashed/text | N
+
+### Button Events
+
+name | params | description
+-- | -- | --
+agreeprivacyauthorization | \- | \-
+chooseavatar | \- | \-
+click | `(e: MouseEvent)` | trigger on click
+contact | \- | \-
+createliveactivity | \- | \-
+error | \- | \-
+getphonenumber | \- | \-
+getrealtimephonenumber | \- | \-
+getuserinfo | \- | \-
+launchapp | \- | \-
+opensetting | \- | \-
+
+### Button Slots
+
+name | Description
+-- | --
+\- | \-
+content | button's children elements
+suffix | \-
+
+### Button External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-icon | class name of icon
+t-class-loading | class name of loading
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-button-border-radius | @radius-default | -
+--td-button-border-width | 4rpx | -
+--td-button-danger-active-bg-color | @error-color-active | -
+--td-button-danger-active-border-color | @error-color-active | -
+--td-button-danger-bg-color | @error-color | -
+--td-button-danger-border-color | @error-color | -
+--td-button-danger-color | @text-color-anti | -
+--td-button-danger-dashed-border-color | @button-danger-dashed-color | -
+--td-button-danger-dashed-color | @error-color | -
+--td-button-danger-dashed-disabled-color | @button-danger-disabled-color | -
+--td-button-danger-disabled-bg | @error-color-3 | -
+--td-button-danger-disabled-border-color | @error-color-3 | -
+--td-button-danger-disabled-color | @font-white-1 | -
+--td-button-danger-outline-active-bg-color | @bg-color-container-active | -
+--td-button-danger-outline-active-border-color | @error-color-active | -
+--td-button-danger-outline-border-color | @button-danger-outline-color | -
+--td-button-danger-outline-color | @error-color | -
+--td-button-danger-outline-disabled-color | @error-color-3 | -
+--td-button-danger-text-active-bg-color | @bg-color-container-active | -
+--td-button-danger-text-color | @error-color | -
+--td-button-danger-text-disabled-color | @button-danger-disabled-color | -
+--td-button-default-active-bg-color | @bg-color-component-active | -
+--td-button-default-active-border-color | @bg-color-component-active | -
+--td-button-default-bg-color | @bg-color-component | -
+--td-button-default-border-color | @bg-color-component | -
+--td-button-default-color | @text-color-primary | -
+--td-button-default-disabled-bg | @bg-color-component-disabled | -
+--td-button-default-disabled-border-color | @bg-color-component-disabled | -
+--td-button-default-disabled-color | @text-color-disabled | -
+--td-button-default-outline-active-bg-color | @bg-color-container-active | -
+--td-button-default-outline-active-border-color | @component-border | -
+--td-button-default-outline-border-color | @component-border | -
+--td-button-default-outline-color | @text-color-primary | -
+--td-button-default-outline-disabled-color | @component-border | -
+--td-button-default-text-active-bg-color | @bg-color-container-active | -
+--td-button-extra-small-font-size | @font-size-base | -
+--td-button-extra-small-height | 56rpx | -
+--td-button-extra-small-icon-size | 36rpx | -
+--td-button-extra-small-padding-horizontal | 16rpx | -
+--td-button-font-weight | 600 | -
+--td-button-ghost-border-color | @button-ghost-color | -
+--td-button-ghost-color | @text-color-anti | -
+--td-button-ghost-danger-border-color | @error-color | -
+--td-button-ghost-danger-color | @error-color | -
+--td-button-ghost-danger-hover-color | @error-color-active | -
+--td-button-ghost-disabled-color | @font-white-4 | -
+--td-button-ghost-hover-color | @font-white-2 | -
+--td-button-ghost-primary-border-color | @brand-color | -
+--td-button-ghost-primary-color | @brand-color | -
+--td-button-ghost-primary-hover-color | @brand-color-active | -
+--td-button-icon-border-radius | 8rpx | -
+--td-button-icon-spacer | @spacer | -
+--td-button-large-font-size | @font-size-m | -
+--td-button-large-height | 96rpx | -
+--td-button-large-icon-size | 48rpx | -
+--td-button-large-padding-horizontal | 40rpx | -
+--td-button-light-active-bg-color | @brand-color-light-active | -
+--td-button-light-active-border-color | @brand-color-light-active | -
+--td-button-light-bg-color | @brand-color-light | -
+--td-button-light-border-color | @brand-color-light | -
+--td-button-light-color | @brand-color | -
+--td-button-light-disabled-bg | @brand-color-light | -
+--td-button-light-disabled-border-color | @brand-color-light | -
+--td-button-light-disabled-color | @brand-color-disabled | -
+--td-button-light-outline-active-bg-color | @brand-color-light-active | -
+--td-button-light-outline-active-border-color | @brand-color-active | -
+--td-button-light-outline-bg-color | @brand-color-light | -
+--td-button-light-outline-border-color | @button-light-outline-color | -
+--td-button-light-outline-color | @brand-color | -
+--td-button-light-outline-disabled-color | @brand-color-disabled | -
+--td-button-light-text-active-bg-color | @bg-color-container-active | -
+--td-button-light-text-color | @brand-color | -
+--td-button-medium-font-size | @font-size-m | -
+--td-button-medium-height | 80rpx | -
+--td-button-medium-icon-size | 40rpx | -
+--td-button-medium-padding-horizontal | 32rpx | -
+--td-button-primary-active-bg-color | @brand-color-active | -
+--td-button-primary-active-border-color | @brand-color-active | -
+--td-button-primary-bg-color | @brand-color | -
+--td-button-primary-border-color | @brand-color | -
+--td-button-primary-color | @text-color-anti | -
+--td-button-primary-dashed-border-color | @button-primary-dashed-color | -
+--td-button-primary-dashed-color | @brand-color | -
+--td-button-primary-dashed-disabled-color | @brand-color-disabled | -
+--td-button-primary-disabled-bg | @brand-color-disabled | -
+--td-button-primary-disabled-border-color | @brand-color-disabled | -
+--td-button-primary-disabled-color | @text-color-anti | -
+--td-button-primary-outline-active-bg-color | @bg-color-container-active | -
+--td-button-primary-outline-active-border-color | @brand-color-active | -
+--td-button-primary-outline-border-color | @button-primary-outline-color | -
+--td-button-primary-outline-color | @brand-color | -
+--td-button-primary-outline-disabled-color | @brand-color-disabled | -
+--td-button-primary-text-active-bg-color | @bg-color-container-active | -
+--td-button-primary-text-color | @brand-color | -
+--td-button-primary-text-disabled-color | @brand-color-disabled | -
+--td-button-small-font-size | @font-size-base | -
+--td-button-small-height | 64rpx | -
+--td-button-small-icon-size | 36rpx | -
+--td-button-small-padding-horizontal | 24rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/button/README.md b/uni_modules/tdesign-uniapp/components/button/README.md
new file mode 100644
index 0000000..7cabd4f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/button/README.md
@@ -0,0 +1,229 @@
+---
+title: Button 按钮
+description: 用于开启一个闭环的操作任务,如“删除”对象、“购买”商品等。
+spline: base
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TButton from '@tdesign/uniapp/button/button.vue';
+```
+
+### 01 组件类型
+
+#### 基础按钮
+
+{{ base }}
+
+#### 图标按钮
+
+{{ icon-btn }}
+
+#### 幽灵按钮
+
+{{ ghost-btn }}
+
+#### 组合按钮
+
+{{ group-btn }}
+
+#### 通栏按钮
+
+{{ block-btn }}
+
+### 02 组件状态
+
+#### 按钮禁用态
+
+{{ disabled }}
+
+### 03 组件样式
+
+#### 按钮尺寸
+
+{{ size }}
+
+#### 按钮形状
+
+{{ shape }}
+
+#### 按钮主题
+
+{{ theme }}
+
+## API
+
+### Button Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+app-parameter | String | - | 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 | N
+block | Boolean | false | 是否为块级元素 | N
+content | String | - | 按钮内容 | N
+custom-dataset | String / Number / Boolean / Object / Array | {} | 自定义 dataset,可通过 event.currentTarget.dataset.custom 获取。TS 类型:`string \| number \| boolean \| object \| Array` | N
+disabled | Boolean | undefined | 禁用状态。优先级:Button.disabled > Form.disabled | N
+ghost | Boolean | false | 是否为幽灵按钮(镂空按钮) | N
+hover-class | String | - | 指定按钮按下去的样式类,按钮不为加载或禁用状态时有效。当 `hover-class="none"` 时,没有点击态效果 | N
+hover-start-time | Number | 20 | 按住后多久出现点击态,单位毫秒 | N
+hover-stay-time | Number | 70 | 手指松开后点击态保留时间,单位毫秒 | N
+hover-stop-propagation | Boolean | false | 指定是否阻止本节点的祖先节点出现点击态 | N
+icon | String / Object | - | 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` | N
+lang | String | - | 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。
具体释义:
`en` 英文;
`zh_CN` 简体中文;
`zh_TW` 繁体中文。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html)。可选项:en/zh_CN/zh_TW | N
+loading | Boolean | false | 是否显示为加载状态 | N
+loading-props | Object | {} | 透传 Loading 组件全部属性。TS 类型:`LoadingProps`,[Loading API Documents](./loading?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/button/type.ts) | N
+open-type | String | - | 微信开放能力。
具体释义:
`contact` 打开客服会话,如果用户在会话中点击消息卡片后返回小程序,可以从 bindcontact 回调中获得具体信息,具体说明 (*鸿蒙 OS 暂不支持*);
`liveActivity` 通过前端获取新的一次性订阅消息下发机制使用的 code;
`share` 触发用户转发,使用前建议先阅读使用指引;
`getPhoneNumber` 获取用户手机号,可以从 bindgetphonenumber 回调中获取到用户信息,具体说明 (*小程序插件中不能使用*);
`getUserInfo` 获取用户信息,可以从 bindgetuserinfo 回调中获取到用户信息 (*小程序插件中不能使用*);
`launchApp` 打开APP,可以通过 app-parameter 属性设定向 APP 传的参数具体说明;
`openSetting` 打开授权设置页;
`feedback` 打开“意见反馈”页面,用户可提交反馈内容并上传日志,开发者可以登录小程序管理后台后进入左侧菜单“客服反馈”页面获取到反馈内容;
`chooseAvatar` 获取用户头像,可以从 bindchooseavatar 回调中获取到头像信息;
`agreePrivacyAuthorization`用户同意隐私协议按钮。用户点击一次此按钮后,所有隐私接口可以正常调用。可通过`bindagreeprivacyauthorization`监听用户同意隐私协议事件。隐私合规开发指南详情可见《小程序隐私协议开发指南》。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html)。可选项:contact/share/getPhoneNumber/getUserInfo/launchApp/openSetting/feedback/chooseAvatar/agreePrivacyAuthorization | N
+phone-number-no-quota-toast | Boolean | true | 原生按钮属性,当手机号快速验证或手机号实时验证额度用尽时,是否对用户展示“申请获取你的手机号,但该功能使用次数已达当前小程序上限,暂时无法使用”的提示,默认展示,open-type="getPhoneNumber" 或 open-type="getRealtimePhoneNumber" 时有效 | N
+send-message-img | String | 截图 | 会话内消息卡片图片,open-type="contact"时有效 | N
+send-message-path | String | 当前分享路径 | 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效 | N
+send-message-title | String | 当前标题 | 会话内消息卡片标题,open-type="contact"时有效 | N
+session-from | String | - | 会话来源,open-type="contact"时有效 | N
+shape | String | rectangle | 按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形。可选项:rectangle/square/round/circle | N
+show-message-card | Boolean | false | 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,open-type="contact"时有效 | N
+size | String | medium | 组件尺寸。可选项:extra-small/small/medium/large | N
+t-id | String | - | 按钮标签id | N
+theme | String | default | 组件风格,依次为品牌色、危险色。可选项:default/primary/danger/light | N
+type | String | - | 同小程序的 formType。可选项:submit/reset | N
+variant | String | base | 按钮形式,基础、线框、虚线、文字。可选项:base/outline/dashed/text | N
+
+### Button Events
+
+名称 | 参数 | 描述
+-- | -- | --
+agreeprivacyauthorization | \- | 原生按钮属性,用户同意隐私协议事件回调,open-type=agreePrivacyAuthorization时有效 (Tips: 如果使用 onNeedPrivacyAuthorization 接口,需要在 bindagreeprivacyauthorization 触发后再调用 resolve({ event: "agree", buttonId }))
+chooseavatar | \- | 原生按钮属性,获取用户头像回调,`open-type=chooseAvatar` 时有效。返回 `e.detail.avatarUrl` 为头像临时文件链接
+click | `(e: MouseEvent)` | 点击时触发
+contact | \- | 原生按钮属性,客服消息回调,`open-type="contact"` 时有效
+createliveactivity | \- | 新的一次性订阅消息下发机制回调,`open-type=liveActivity` 时有效
+error | \- | 原生按钮属性,当使用开放能力时,发生错误的回调,`open-type=launchApp` 时有效
+getphonenumber | \- | 原生按钮属性,手机号快速验证回调,open-type=getPhoneNumber时有效。Tips:在触发 bindgetphonenumber 回调后应立即隐藏手机号按钮组件,或置为 disabled 状态,避免用户重复授权手机号产生额外费用
+getrealtimephonenumber | \- | 原生按钮属性,手机号实时验证回调,open-type=getRealtimePhoneNumber 时有效。Tips:在触发 bindgetrealtimephonenumber 回调后应立即隐藏手机号按钮组件,或置为 disabled 状态,避免用户重复授权手机号产生额外费用
+getuserinfo | \- | 原生按钮属性,用户点击该按钮时,会返回获取到的用户信息,回调的detail数据与wx.getUserInfo返回的一致,open-type="getUserInfo"时有效
+launchapp | \- | 打开 APP 成功的回调,`open-type=launchApp` 时有效
+opensetting | \- | 原生按钮属性,在打开授权设置页后回调,open-type=openSetting时有效
+
+### Button Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,作用同 `content` 插槽
+content | 自定义 `content` 显示内容
+suffix | 右侧内容,可用于定义右侧图标
+
+### Button External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-icon | 图标样式类
+t-class-loading | 加载样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-button-border-radius | @radius-default | -
+--td-button-border-width | 4rpx | -
+--td-button-danger-active-bg-color | @error-color-active | -
+--td-button-danger-active-border-color | @error-color-active | -
+--td-button-danger-bg-color | @error-color | -
+--td-button-danger-border-color | @error-color | -
+--td-button-danger-color | @text-color-anti | -
+--td-button-danger-dashed-border-color | @button-danger-dashed-color | -
+--td-button-danger-dashed-color | @error-color | -
+--td-button-danger-dashed-disabled-color | @button-danger-disabled-color | -
+--td-button-danger-disabled-bg | @error-color-3 | -
+--td-button-danger-disabled-border-color | @error-color-3 | -
+--td-button-danger-disabled-color | @font-white-1 | -
+--td-button-danger-outline-active-bg-color | @bg-color-container-active | -
+--td-button-danger-outline-active-border-color | @error-color-active | -
+--td-button-danger-outline-border-color | @button-danger-outline-color | -
+--td-button-danger-outline-color | @error-color | -
+--td-button-danger-outline-disabled-color | @error-color-3 | -
+--td-button-danger-text-active-bg-color | @bg-color-container-active | -
+--td-button-danger-text-color | @error-color | -
+--td-button-danger-text-disabled-color | @button-danger-disabled-color | -
+--td-button-default-active-bg-color | @bg-color-component-active | -
+--td-button-default-active-border-color | @bg-color-component-active | -
+--td-button-default-bg-color | @bg-color-component | -
+--td-button-default-border-color | @bg-color-component | -
+--td-button-default-color | @text-color-primary | -
+--td-button-default-disabled-bg | @bg-color-component-disabled | -
+--td-button-default-disabled-border-color | @bg-color-component-disabled | -
+--td-button-default-disabled-color | @text-color-disabled | -
+--td-button-default-outline-active-bg-color | @bg-color-container-active | -
+--td-button-default-outline-active-border-color | @component-border | -
+--td-button-default-outline-border-color | @component-border | -
+--td-button-default-outline-color | @text-color-primary | -
+--td-button-default-outline-disabled-color | @component-border | -
+--td-button-default-text-active-bg-color | @bg-color-container-active | -
+--td-button-extra-small-font-size | @font-size-base | -
+--td-button-extra-small-height | 56rpx | -
+--td-button-extra-small-icon-size | 36rpx | -
+--td-button-extra-small-padding-horizontal | 16rpx | -
+--td-button-font-weight | 600 | -
+--td-button-ghost-border-color | @button-ghost-color | -
+--td-button-ghost-color | @text-color-anti | -
+--td-button-ghost-danger-border-color | @error-color | -
+--td-button-ghost-danger-color | @error-color | -
+--td-button-ghost-danger-hover-color | @error-color-active | -
+--td-button-ghost-disabled-color | @font-white-4 | -
+--td-button-ghost-hover-color | @font-white-2 | -
+--td-button-ghost-primary-border-color | @brand-color | -
+--td-button-ghost-primary-color | @brand-color | -
+--td-button-ghost-primary-hover-color | @brand-color-active | -
+--td-button-icon-border-radius | 8rpx | -
+--td-button-icon-spacer | @spacer | -
+--td-button-large-font-size | @font-size-m | -
+--td-button-large-height | 96rpx | -
+--td-button-large-icon-size | 48rpx | -
+--td-button-large-padding-horizontal | 40rpx | -
+--td-button-light-active-bg-color | @brand-color-light-active | -
+--td-button-light-active-border-color | @brand-color-light-active | -
+--td-button-light-bg-color | @brand-color-light | -
+--td-button-light-border-color | @brand-color-light | -
+--td-button-light-color | @brand-color | -
+--td-button-light-disabled-bg | @brand-color-light | -
+--td-button-light-disabled-border-color | @brand-color-light | -
+--td-button-light-disabled-color | @brand-color-disabled | -
+--td-button-light-outline-active-bg-color | @brand-color-light-active | -
+--td-button-light-outline-active-border-color | @brand-color-active | -
+--td-button-light-outline-bg-color | @brand-color-light | -
+--td-button-light-outline-border-color | @button-light-outline-color | -
+--td-button-light-outline-color | @brand-color | -
+--td-button-light-outline-disabled-color | @brand-color-disabled | -
+--td-button-light-text-active-bg-color | @bg-color-container-active | -
+--td-button-light-text-color | @brand-color | -
+--td-button-medium-font-size | @font-size-m | -
+--td-button-medium-height | 80rpx | -
+--td-button-medium-icon-size | 40rpx | -
+--td-button-medium-padding-horizontal | 32rpx | -
+--td-button-primary-active-bg-color | @brand-color-active | -
+--td-button-primary-active-border-color | @brand-color-active | -
+--td-button-primary-bg-color | @brand-color | -
+--td-button-primary-border-color | @brand-color | -
+--td-button-primary-color | @text-color-anti | -
+--td-button-primary-dashed-border-color | @button-primary-dashed-color | -
+--td-button-primary-dashed-color | @brand-color | -
+--td-button-primary-dashed-disabled-color | @brand-color-disabled | -
+--td-button-primary-disabled-bg | @brand-color-disabled | -
+--td-button-primary-disabled-border-color | @brand-color-disabled | -
+--td-button-primary-disabled-color | @text-color-anti | -
+--td-button-primary-outline-active-bg-color | @bg-color-container-active | -
+--td-button-primary-outline-active-border-color | @brand-color-active | -
+--td-button-primary-outline-border-color | @button-primary-outline-color | -
+--td-button-primary-outline-color | @brand-color | -
+--td-button-primary-outline-disabled-color | @brand-color-disabled | -
+--td-button-primary-text-active-bg-color | @bg-color-container-active | -
+--td-button-primary-text-color | @brand-color | -
+--td-button-primary-text-disabled-color | @brand-color-disabled | -
+--td-button-small-font-size | @font-size-base | -
+--td-button-small-height | 64rpx | -
+--td-button-small-icon-size | 36rpx | -
+--td-button-small-padding-horizontal | 24rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/button/button.css b/uni_modules/tdesign-uniapp/components/button/button.css
new file mode 100644
index 0000000..7c566fb
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/button/button.css
@@ -0,0 +1,514 @@
+.t-button--size-extra-small {
+ font-size: var(--td-button-extra-small-font-size, var(--td-font-size-base, 28rpx));
+ padding-left: var(--td-button-extra-small-padding-horizontal, 16rpx);
+ padding-right: var(--td-button-extra-small-padding-horizontal, 16rpx);
+ height: var(--td-button-extra-small-height, 56rpx);
+ line-height: var(--td-button-extra-small-height, 56rpx);
+}
+.t-button--size-extra-small .t-button__icon {
+ font-size: var(--td-button-extra-small-icon-size, 36rpx);
+}
+.t-button--size-small {
+ font-size: var(--td-button-small-font-size, var(--td-font-size-base, 28rpx));
+ padding-left: var(--td-button-small-padding-horizontal, 24rpx);
+ padding-right: var(--td-button-small-padding-horizontal, 24rpx);
+ height: var(--td-button-small-height, 64rpx);
+ line-height: var(--td-button-small-height, 64rpx);
+}
+.t-button--size-small .t-button__icon {
+ font-size: var(--td-button-small-icon-size, 36rpx);
+}
+.t-button--size-medium {
+ font-size: var(--td-button-medium-font-size, var(--td-font-size-m, 32rpx));
+ padding-left: var(--td-button-medium-padding-horizontal, 32rpx);
+ padding-right: var(--td-button-medium-padding-horizontal, 32rpx);
+ height: var(--td-button-medium-height, 80rpx);
+ line-height: var(--td-button-medium-height, 80rpx);
+}
+.t-button--size-medium .t-button__icon {
+ font-size: var(--td-button-medium-icon-size, 40rpx);
+}
+.t-button--size-large {
+ font-size: var(--td-button-large-font-size, var(--td-font-size-m, 32rpx));
+ padding-left: var(--td-button-large-padding-horizontal, 40rpx);
+ padding-right: var(--td-button-large-padding-horizontal, 40rpx);
+ height: var(--td-button-large-height, 96rpx);
+ line-height: var(--td-button-large-height, 96rpx);
+}
+.t-button--size-large .t-button__icon {
+ font-size: var(--td-button-large-icon-size, 48rpx);
+}
+.t-button--default {
+ color: var(--td-button-default-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ background-color: var(--td-button-default-bg-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ border-color: var(--td-button-default-border-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-button--default::after {
+ border-width: var(--td-button-border-width, 4rpx);
+ border-color: var(--td-button-default-border-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-button--default.t-button--hover {
+ z-index: 0;
+}
+.t-button--default.t-button--hover,
+.t-button--default.t-button--hover::after {
+ background-color: var(--td-button-default-active-bg-color, var(--td-bg-color-component-active, var(--td-gray-color-6, #a6a6a6)));
+ border-color: var(--td-button-default-active-border-color, var(--td-bg-color-component-active, var(--td-gray-color-6, #a6a6a6)));
+}
+.t-button--default.t-button--disabled {
+ color: var(--td-button-default-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+ background-color: var(--td-button-default-disabled-bg, var(--td-bg-color-component-disabled, var(--td-gray-color-2, #eeeeee)));
+}
+.t-button--default.t-button--disabled,
+.t-button--default.t-button--disabled::after {
+ border-color: var(--td-button-default-disabled-border-color, var(--td-bg-color-component-disabled, var(--td-gray-color-2, #eeeeee)));
+}
+.t-button--primary {
+ color: var(--td-button-primary-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+ background-color: var(--td-button-primary-bg-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ border-color: var(--td-button-primary-border-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-button--primary::after {
+ border-width: var(--td-button-border-width, 4rpx);
+ border-color: var(--td-button-primary-border-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-button--primary.t-button--hover {
+ z-index: 0;
+}
+.t-button--primary.t-button--hover,
+.t-button--primary.t-button--hover::after {
+ background-color: var(--td-button-primary-active-bg-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
+ border-color: var(--td-button-primary-active-border-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
+}
+.t-button--primary.t-button--disabled {
+ color: var(--td-button-primary-disabled-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+ background-color: var(--td-button-primary-disabled-bg, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-button--primary.t-button--disabled,
+.t-button--primary.t-button--disabled::after {
+ border-color: var(--td-button-primary-disabled-border-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-button--light {
+ color: var(--td-button-light-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ background-color: var(--td-button-light-bg-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+ border-color: var(--td-button-light-border-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+}
+.t-button--light::after {
+ border-width: var(--td-button-border-width, 4rpx);
+ border-color: var(--td-button-light-border-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+}
+.t-button--light.t-button--hover {
+ z-index: 0;
+}
+.t-button--light.t-button--hover,
+.t-button--light.t-button--hover::after {
+ background-color: var(--td-button-light-active-bg-color, var(--td-brand-color-light-active, var(--td-primary-color-2, #d9e1ff)));
+ border-color: var(--td-button-light-active-border-color, var(--td-brand-color-light-active, var(--td-primary-color-2, #d9e1ff)));
+}
+.t-button--light.t-button--disabled {
+ color: var(--td-button-light-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+ background-color: var(--td-button-light-disabled-bg, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+}
+.t-button--light.t-button--disabled,
+.t-button--light.t-button--disabled::after {
+ border-color: var(--td-button-light-disabled-border-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+}
+.t-button--danger {
+ color: var(--td-button-danger-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+ background-color: var(--td-button-danger-bg-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+ border-color: var(--td-button-danger-border-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
+.t-button--danger::after {
+ border-width: var(--td-button-border-width, 4rpx);
+ border-color: var(--td-button-danger-border-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
+.t-button--danger.t-button--hover {
+ z-index: 0;
+}
+.t-button--danger.t-button--hover,
+.t-button--danger.t-button--hover::after {
+ background-color: var(--td-button-danger-active-bg-color, var(--td-error-color-active, var(--td-error-color-7, #ad352f)));
+ border-color: var(--td-button-danger-active-border-color, var(--td-error-color-active, var(--td-error-color-7, #ad352f)));
+}
+.t-button--danger.t-button--disabled {
+ color: var(--td-button-danger-disabled-color, var(--td-font-white-1, #ffffff));
+ background-color: var(--td-button-danger-disabled-bg, var(--td-error-color-3, #ffb9b0));
+}
+.t-button--danger.t-button--disabled,
+.t-button--danger.t-button--disabled::after {
+ border-color: var(--td-button-danger-disabled-border-color, var(--td-error-color-3, #ffb9b0));
+}
+.t-button {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ position: relative;
+ white-space: nowrap;
+ text-align: center;
+ background-image: none;
+ transition: all 0.3s;
+ touch-action: manipulation;
+ border-radius: var(--td-button-border-radius, var(--td-radius-default, 12rpx));
+ outline: none;
+ font-family: PingFang SC, Microsoft YaHei, Arial Regular;
+ font-weight: var(--td-button-font-weight, 600);
+ vertical-align: top;
+ box-sizing: border-box;
+ cursor: pointer;
+ -webkit-tap-highlight-color: transparent;
+ -webkit-user-select: none;
+ user-select: none;
+ /* stylelint-disable-next-line */
+ -webkit-appearance: none;
+}
+.t-button::after {
+ border-radius: calc(var(--td-button-border-radius, var(--td-radius-default, 12rpx)) * 2);
+}
+.t-button--text {
+ color: var(--td-button-default-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ background-color: transparent;
+}
+.t-button--text,
+.t-button--text::after {
+ border: 0;
+}
+.t-button--text.t-button--hover,
+.t-button--text.t-button--hover::after {
+ background-color: var(--td-button-default-text-active-bg-color, var(--td-bg-color-container-active, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-button--text.t-button--primary {
+ color: var(--td-button-primary-text-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ background-color: transparent;
+}
+.t-button--text.t-button--primary.t-button--hover,
+.t-button--text.t-button--primary.t-button--hover::after {
+ background-color: var(--td-button-primary-text-active-bg-color, var(--td-bg-color-container-active, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-button--text.t-button--primary.t-button--disabled {
+ color: var(--td-button-primary-text-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+ background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+}
+.t-button--text.t-button--danger {
+ color: var(--td-button-danger-text-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+ background-color: transparent;
+}
+.t-button--text.t-button--danger.t-button--hover,
+.t-button--text.t-button--danger.t-button--hover::after {
+ background-color: var(--td-button-danger-text-active-bg-color, var(--td-bg-color-container-active, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-button--text.t-button--danger.t-button--disabled {
+ color: var(--td-button-danger-text-disabled-color, var(--td-button-danger-disabled-color, var(--td-font-white-1, #ffffff)));
+ background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+}
+.t-button--text.t-button--light {
+ color: var(--td-button-light-text-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ background-color: transparent;
+}
+.t-button--text.t-button--light.t-button--hover,
+.t-button--text.t-button--light.t-button--hover::after {
+ background-color: var(--td-button-light-text-active-bg-color, var(--td-bg-color-container-active, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-button--text.t-button--disabled {
+ color: var(--td-button-default-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-button--outline {
+ color: var(--td-button-default-outline-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+}
+.t-button--outline,
+.t-button--outline::after {
+ border-color: var(--td-button-default-outline-border-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+}
+.t-button--outline.t-button--hover,
+.t-button--outline.t-button--hover::after {
+ background-color: var(--td-button-default-outline-active-bg-color, var(--td-bg-color-container-active, var(--td-gray-color-3, #e7e7e7)));
+ border-color: var(--td-button-default-outline-active-border-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+}
+.t-button--outline.t-button--disabled {
+ color: var(--td-button-default-outline-disabled-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+}
+.t-button--outline.t-button--disabled,
+.t-button--outline.t-button--disabled::after {
+ border-color: var(--td-button-default-outline-disabled-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+}
+.t-button--outline.t-button--primary {
+ color: var(--td-button-primary-outline-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-button--outline.t-button--primary,
+.t-button--outline.t-button--primary::after {
+ border-color: var(--td-button-primary-outline-border-color, var(--td-button-primary-outline-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9))));
+}
+.t-button--outline.t-button--primary.t-button--hover {
+ color: var(--td-button-primary-outline-active-border-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
+}
+.t-button--outline.t-button--primary.t-button--hover::after {
+ background-color: var(--td-button-primary-outline-active-bg-color, var(--td-bg-color-container-active, var(--td-gray-color-3, #e7e7e7)));
+ border-color: var(--td-button-primary-outline-active-border-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
+}
+.t-button--outline.t-button--primary.t-button--disabled {
+ background-color: transparent;
+ color: var(--td-button-primary-outline-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-button--outline.t-button--primary.t-button--disabled,
+.t-button--outline.t-button--primary.t-button--disabled::after {
+ border-color: var(--td-button-primary-outline-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-button--outline.t-button--danger {
+ color: var(--td-button-danger-outline-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
+.t-button--outline.t-button--danger,
+.t-button--outline.t-button--danger::after {
+ border-color: var(--td-button-danger-outline-border-color, var(--td-button-danger-outline-color, var(--td-error-color, var(--td-error-color-6, #d54941))));
+}
+.t-button--outline.t-button--danger.t-button--hover {
+ color: var(--td-button-danger-outline-active-border-color, var(--td-error-color-active, var(--td-error-color-7, #ad352f)));
+}
+.t-button--outline.t-button--danger.t-button--hover::after {
+ background-color: var(--td-button-danger-outline-active-bg-color, var(--td-bg-color-container-active, var(--td-gray-color-3, #e7e7e7)));
+ border-color: var(--td-button-danger-outline-active-border-color, var(--td-error-color-active, var(--td-error-color-7, #ad352f)));
+}
+.t-button--outline.t-button--danger.t-button--disabled {
+ background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+ color: var(--td-button-danger-outline-disabled-color, var(--td-error-color-3, #ffb9b0));
+}
+.t-button--outline.t-button--danger.t-button--disabled,
+.t-button--outline.t-button--danger.t-button--disabled::after {
+ border-color: var(--td-button-danger-outline-disabled-color, var(--td-error-color-3, #ffb9b0));
+}
+.t-button--outline.t-button--light {
+ color: var(--td-button-light-outline-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ background-color: var(--td-button-light-outline-bg-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+}
+.t-button--outline.t-button--light,
+.t-button--outline.t-button--light::after {
+ border-color: var(--td-button-light-outline-border-color, var(--td-button-light-outline-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9))));
+}
+.t-button--outline.t-button--light.t-button--hover {
+ color: var(--td-button-light-outline-active-border-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
+}
+.t-button--outline.t-button--light.t-button--hover,
+.t-button--outline.t-button--light.t-button--hover::after {
+ background-color: var(--td-button-light-outline-active-bg-color, var(--td-brand-color-light-active, var(--td-primary-color-2, #d9e1ff)));
+ border-color: var(--td-button-light-outline-active-border-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
+}
+.t-button--outline.t-button--light.t-button--disabled {
+ background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+ color: var(--td-button-light-outline-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-button--outline.t-button--light.t-button--disabled,
+.t-button--outline.t-button--light.t-button--disabled::after {
+ border-color: var(--td-button-light-outline-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-button--dashed {
+ background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+ border-style: dashed;
+ border-width: 2rpx;
+}
+.t-button--dashed::after {
+ border: 0;
+}
+.t-button--dashed.t-button--hover,
+.t-button--dashed.t-button--hover::after {
+ background-color: var(--td-button-default-outline-active-bg-color, var(--td-bg-color-container-active, var(--td-gray-color-3, #e7e7e7)));
+ border-color: var(--td-button-default-outline-active-border-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+}
+.t-button--dashed.t-button--primary {
+ color: var(--td-button-primary-dashed-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-button--dashed.t-button--primary,
+.t-button--dashed.t-button--primary::after {
+ border-color: var(--td-button-primary-dashed-border-color, var(--td-button-primary-dashed-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9))));
+}
+.t-button--dashed.t-button--primary.t-button--disabled {
+ background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+ color: var(--td-button-primary-dashed-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-button--dashed.t-button--primary.t-button--disabled,
+.t-button--dashed.t-button--primary.t-button--disabled::after {
+ border-color: var(--td-button-primary-dashed-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-button--dashed.t-button--danger {
+ color: var(--td-button-danger-dashed-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
+.t-button--dashed.t-button--danger,
+.t-button--dashed.t-button--danger::after {
+ border-color: var(--td-button-danger-dashed-border-color, var(--td-button-danger-dashed-color, var(--td-error-color, var(--td-error-color-6, #d54941))));
+}
+.t-button--dashed.t-button--danger.t-button--disabled {
+ background-color: transparent;
+ color: var(--td-button-danger-dashed-disabled-color, var(--td-button-danger-disabled-color, var(--td-font-white-1, #ffffff)));
+}
+.t-button--dashed.t-button--danger.t-button--disabled::after {
+ border-color: var(--td-button-danger-dashed-disabled-color, var(--td-button-danger-disabled-color, var(--td-font-white-1, #ffffff)));
+}
+.t-button--ghost {
+ background-color: transparent;
+ color: var(--td-button-ghost-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+}
+.t-button--ghost,
+.t-button--ghost::after {
+ border-color: var(--td-button-ghost-border-color, var(--td-button-ghost-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff))));
+}
+.t-button--ghost.t-button--default.t-button--hover {
+ color: var(--td-button-ghost-hover-color, var(--td-font-white-2, rgba(255, 255, 255, 0.55)));
+}
+.t-button--ghost.t-button--default.t-button--hover,
+.t-button--ghost.t-button--default.t-button--hover::after {
+ background-color: transparent;
+ border-color: var(--td-button-ghost-hover-color, var(--td-font-white-2, rgba(255, 255, 255, 0.55)));
+}
+.t-button--ghost.t-button--primary {
+ color: var(--td-button-ghost-primary-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-button--ghost.t-button--primary,
+.t-button--ghost.t-button--primary::after {
+ border-color: var(--td-button-ghost-primary-border-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-button--ghost.t-button--primary.t-button--hover {
+ color: var(--td-button-ghost-primary-hover-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
+}
+.t-button--ghost.t-button--primary.t-button--hover,
+.t-button--ghost.t-button--primary.t-button--hover::after {
+ background-color: transparent;
+ border-color: var(--td-button-ghost-primary-hover-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
+}
+.t-button--ghost.t-button--primary.t-button--text.t-button--hover,
+.t-button--ghost.t-button--primary.t-button--text.t-button--hover::after {
+ background-color: var(--td-gray-color-10, #4b4b4b);
+}
+.t-button--ghost.t-button--primary.t-button--disabled {
+ background-color: transparent;
+ color: var(--td-button-ghost-disabled-color, var(--td-font-white-4, rgba(255, 255, 255, 0.22)));
+}
+.t-button--ghost.t-button--primary.t-button--disabled,
+.t-button--ghost.t-button--primary.t-button--disabled::after {
+ border-color: var(--td-button-ghost-disabled-color, var(--td-font-white-4, rgba(255, 255, 255, 0.22)));
+}
+.t-button--ghost.t-button--danger {
+ color: var(--td-button-ghost-danger-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
+.t-button--ghost.t-button--danger,
+.t-button--ghost.t-button--danger::after {
+ border-color: var(--td-button-ghost-danger-border-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
+.t-button--ghost.t-button--danger.t-button--hover {
+ color: var(--td-button-ghost-danger-hover-color, var(--td-error-color-active, var(--td-error-color-7, #ad352f)));
+}
+.t-button--ghost.t-button--danger.t-button--hover,
+.t-button--ghost.t-button--danger.t-button--hover::after {
+ background-color: transparent;
+ border-color: var(--td-button-ghost-danger-hover-color, var(--td-error-color-active, var(--td-error-color-7, #ad352f)));
+}
+.t-button--ghost.t-button--danger.t-button--text.t-button--hover,
+.t-button--ghost.t-button--danger.t-button--text.t-button--hover::after {
+ background-color: var(--td-gray-color-10, #4b4b4b);
+}
+.t-button--ghost.t-button--danger.t-button--disabled {
+ background-color: transparent;
+ color: var(--td-button-ghost-disabled-color, var(--td-font-white-4, rgba(255, 255, 255, 0.22)));
+}
+.t-button--ghost.t-button--danger.t-button--disabled,
+.t-button--ghost.t-button--danger.t-button--disabled::after {
+ border-color: var(--td-button-ghost-disabled-color, var(--td-font-white-4, rgba(255, 255, 255, 0.22)));
+}
+.t-button--ghost.t-button--default.t-button--text.t-button--hover,
+.t-button--ghost.t-button--default.t-button--text.t-button--hover::after {
+ background-color: var(--td-gray-color-10, #4b4b4b);
+}
+.t-button--ghost.t-button--default.t-button--disabled {
+ background-color: transparent;
+ color: var(--td-button-ghost-disabled-color, var(--td-font-white-4, rgba(255, 255, 255, 0.22)));
+}
+.t-button--ghost.t-button--default.t-button--disabled,
+.t-button--ghost.t-button--default.t-button--disabled::after {
+ border-color: var(--td-button-ghost-disabled-color, var(--td-font-white-4, rgba(255, 255, 255, 0.22)));
+}
+.t-button__loading + .t-button__content:not(:empty),
+.t-button__icon + .t-button__content:not(:empty) {
+ margin-left: 8rpx;
+}
+.t-button__icon {
+ border-radius: var(--td-button-icon-border-radius, 8rpx);
+}
+.t-button--round.t-button--size-large {
+ border-radius: calc(var(--td-button-large-height, 96rpx) / 2);
+}
+.t-button--round.t-button--size-large::after {
+ border-radius: var(--td-button-large-height, 96rpx);
+}
+.t-button--round.t-button--size-medium {
+ border-radius: calc(var(--td-button-medium-height, 80rpx) / 2);
+}
+.t-button--round.t-button--size-medium::after {
+ border-radius: var(--td-button-medium-height, 80rpx);
+}
+.t-button--round.t-button--size-small {
+ border-radius: calc(var(--td-button-small-height, 64rpx) / 2);
+}
+.t-button--round.t-button--size-small::after {
+ border-radius: var(--td-button-small-height, 64rpx);
+}
+.t-button--round.t-button--size-extra-small {
+ border-radius: calc(var(--td-button-extra-small-height, 56rpx) / 2);
+}
+.t-button--round.t-button--size-extra-small::after {
+ border-radius: var(--td-button-extra-small-height, 56rpx);
+}
+.t-button--square {
+ padding: 0;
+}
+.t-button--square.t-button--size-large {
+ width: var(--td-button-large-height, 96rpx);
+}
+.t-button--square.t-button--size-medium {
+ width: var(--td-button-medium-height, 80rpx);
+}
+.t-button--square.t-button--size-small {
+ width: var(--td-button-small-height, 64rpx);
+}
+.t-button--square.t-button--size-extra-small {
+ width: var(--td-button-extra-small-height, 56rpx);
+}
+.t-button--circle {
+ padding: 0;
+ border-radius: 50%;
+}
+.t-button--circle.t-button--size-large {
+ width: var(--td-button-large-height, 96rpx);
+}
+.t-button--circle.t-button--size-large::after {
+ border-radius: 50%;
+}
+.t-button--circle.t-button--size-medium {
+ width: var(--td-button-medium-height, 80rpx);
+}
+.t-button--circle.t-button--size-medium::after {
+ border-radius: 50%;
+}
+.t-button--circle.t-button--size-small {
+ width: var(--td-button-small-height, 64rpx);
+}
+.t-button--circle.t-button--size-small::after {
+ border-radius: 50%;
+}
+.t-button--circle.t-button--size-extra-small {
+ width: var(--td-button-extra-small-height, 56rpx);
+}
+.t-button--circle.t-button--size-extra-small::after {
+ border-radius: 50%;
+}
+.t-button--block {
+ display: flex;
+ width: 100%;
+}
+.t-button--disabled {
+ cursor: not-allowed;
+}
+.t-button__loading--wrapper {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.t-button.t-button--hover::after {
+ z-index: -1;
+}
diff --git a/uni_modules/tdesign-uniapp/components/button/button.vue b/uni_modules/tdesign-uniapp/components/button/button.vue
new file mode 100644
index 0000000..94a951a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/button/button.vue
@@ -0,0 +1,244 @@
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/button/props.ts b/uni_modules/tdesign-uniapp/components/button/props.ts
new file mode 100644
index 0000000..c16b053
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/button/props.ts
@@ -0,0 +1,207 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdButtonProps } from './type';
+export default {
+ /** 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 */
+ appParameter: {
+ type: String,
+ default: '',
+ },
+ /** 是否为块级元素 */
+ block: Boolean,
+ /** 按钮内容 */
+ content: {
+ type: String,
+ },
+ /** 自定义 dataset,可通过 event.currentTarget.dataset.custom 获取 */
+ customDataset: {
+ type: [String, Number, Boolean, Object, Array],
+ default: () => ({}) as TdButtonProps['customDataset'],
+ },
+ /** 禁用状态。优先级:Button.disabled > Form.disabled */
+ disabled: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 是否为幽灵按钮(镂空按钮) */
+ ghost: Boolean,
+ /** 指定按钮按下去的样式类,按钮不为加载或禁用状态时有效。当 `hover-class="none"` 时,没有点击态效果 */
+ hoverClass: {
+ type: String,
+ default: '',
+ },
+ /** 按住后多久出现点击态,单位毫秒 */
+ hoverStartTime: {
+ type: Number,
+ default: 20,
+ },
+ /** 手指松开后点击态保留时间,单位毫秒 */
+ hoverStayTime: {
+ type: Number,
+ default: 70,
+ },
+ /** 指定是否阻止本节点的祖先节点出现点击态 */
+ hoverStopPropagation: Boolean,
+ /** 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` */
+ icon: {
+ type: [String, Object],
+ },
+ /** 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。
具体释义:
`en` 英文;
`zh_CN` 简体中文;
`zh_TW` 繁体中文。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html) */
+ lang: {
+ type: String,
+ validator(val: TdButtonProps['lang']): boolean {
+ if (!val) return true;
+ return ['en', 'zh_CN', 'zh_TW'].includes(val);
+ },
+ },
+ /** 是否显示为加载状态 */
+ loading: Boolean,
+ /** 透传 Loading 组件全部属性 */
+ loadingProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 微信开放能力。
具体释义:
`contact` 打开客服会话,如果用户在会话中点击消息卡片后返回小程序,可以从 bindcontact 回调中获得具体信息,具体说明 (*鸿蒙 OS 暂不支持*);
`liveActivity` 通过前端获取新的一次性订阅消息下发机制使用的 code;
`share` 触发用户转发,使用前建议先阅读使用指引;
`getPhoneNumber` 获取用户手机号,可以从 bindgetphonenumber 回调中获取到用户信息,具体说明 (*小程序插件中不能使用*);
`getUserInfo` 获取用户信息,可以从 bindgetuserinfo 回调中获取到用户信息 (*小程序插件中不能使用*);
`launchApp` 打开APP,可以通过 app-parameter 属性设定向 APP 传的参数具体说明;
`openSetting` 打开授权设置页;
`feedback` 打开“意见反馈”页面,用户可提交反馈内容并上传日志,开发者可以登录小程序管理后台后进入左侧菜单“客服反馈”页面获取到反馈内容;
`chooseAvatar` 获取用户头像,可以从 bindchooseavatar 回调中获取到头像信息;
`agreePrivacyAuthorization`用户同意隐私协议按钮。用户点击一次此按钮后,所有隐私接口可以正常调用。可通过`bindagreeprivacyauthorization`监听用户同意隐私协议事件。隐私合规开发指南详情可见《小程序隐私协议开发指南》。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html) */
+ openType: {
+ type: String,
+ validator(val: TdButtonProps['openType']): boolean {
+ if (!val) return true;
+ return ['contact', 'share', 'getPhoneNumber', 'getUserInfo', 'launchApp', 'openSetting', 'feedback', 'chooseAvatar', 'agreePrivacyAuthorization'].includes(val);
+ },
+ },
+ /** 原生按钮属性,当手机号快速验证或手机号实时验证额度用尽时,是否对用户展示“申请获取你的手机号,但该功能使用次数已达当前小程序上限,暂时无法使用”的提示,默认展示,open-type="getPhoneNumber" 或 open-type="getRealtimePhoneNumber" 时有效 */
+ phoneNumberNoQuotaToast: {
+ type: Boolean,
+ default: true,
+ },
+ /** 会话内消息卡片图片,open-type="contact"时有效 */
+ sendMessageImg: {
+ type: String,
+ default: '截图',
+ },
+ /** 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效 */
+ sendMessagePath: {
+ type: String,
+ default: '当前分享路径',
+ },
+ /** 会话内消息卡片标题,open-type="contact"时有效 */
+ sendMessageTitle: {
+ type: String,
+ default: '当前标题',
+ },
+ /** 会话来源,open-type="contact"时有效 */
+ sessionFrom: {
+ type: String,
+ default: '',
+ },
+ /** 按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形 */
+ shape: {
+ type: String,
+ default: 'rectangle' as TdButtonProps['shape'],
+ validator(val: TdButtonProps['shape']): boolean {
+ if (!val) return true;
+ return ['rectangle', 'square', 'round', 'circle'].includes(val);
+ },
+ },
+ /** 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,open-type="contact"时有效 */
+ showMessageCard: Boolean,
+ /** 组件尺寸 */
+ size: {
+ type: String,
+ default: 'medium' as TdButtonProps['size'],
+ validator(val: TdButtonProps['size']): boolean {
+ if (!val) return true;
+ return ['extra-small', 'small', 'medium', 'large'].includes(val);
+ },
+ },
+ /** 按钮标签id */
+ tId: {
+ type: String,
+ default: '',
+ },
+ /** 组件风格,依次为品牌色、危险色 */
+ theme: {
+ type: String,
+ default: 'default' as TdButtonProps['theme'],
+ validator(val: TdButtonProps['theme']): boolean {
+ if (!val) return true;
+ return ['default', 'primary', 'danger', 'light'].includes(val);
+ },
+ },
+ /** 同小程序的 formType */
+ type: {
+ type: String,
+ validator(val: TdButtonProps['type']): boolean {
+ if (!val) return true;
+ return ['submit', 'reset'].includes(val);
+ },
+ },
+ /** 按钮形式,基础、线框、虚线、文字 */
+ variant: {
+ type: String,
+ default: 'base' as TdButtonProps['variant'],
+ validator(val: TdButtonProps['variant']): boolean {
+ if (!val) return true;
+ return ['base', 'outline', 'dashed', 'text'].includes(val);
+ },
+ },
+ /** 原生按钮属性,用户同意隐私协议事件回调,open-type=agreePrivacyAuthorization时有效 (Tips: 如果使用 onNeedPrivacyAuthorization 接口,需要在 bindagreeprivacyauthorization 触发后再调用 resolve({ event: "agree", buttonId })) */
+ onAgreeprivacyauthorization: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 原生按钮属性,获取用户头像回调,`open-type=chooseAvatar` 时有效。返回 `e.detail.avatarUrl` 为头像临时文件链接 */
+ onChooseavatar: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击时触发 */
+ onClick: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 原生按钮属性,客服消息回调,`open-type="contact"` 时有效 */
+ onContact: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 新的一次性订阅消息下发机制回调,`open-type=liveActivity` 时有效 */
+ onCreateliveactivity: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 原生按钮属性,当使用开放能力时,发生错误的回调,`open-type=launchApp` 时有效 */
+ onError: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 原生按钮属性,手机号快速验证回调,open-type=getPhoneNumber时有效。Tips:在触发 bindgetphonenumber 回调后应立即隐藏手机号按钮组件,或置为 disabled 状态,避免用户重复授权手机号产生额外费用 */
+ onGetphonenumber: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 原生按钮属性,手机号实时验证回调,open-type=getRealtimePhoneNumber 时有效。Tips:在触发 bindgetrealtimephonenumber 回调后应立即隐藏手机号按钮组件,或置为 disabled 状态,避免用户重复授权手机号产生额外费用 */
+ onGetrealtimephonenumber: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 原生按钮属性,用户点击该按钮时,会返回获取到的用户信息,回调的detail数据与wx.getUserInfo返回的一致,open-type="getUserInfo"时有效 */
+ onGetuserinfo: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 打开 APP 成功的回调,`open-type=launchApp` 时有效 */
+ onLaunchapp: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 原生按钮属性,在打开授权设置页后回调,open-type=openSetting时有效 */
+ onOpensetting: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/button/type.ts b/uni_modules/tdesign-uniapp/components/button/type.ts
new file mode 100644
index 0000000..5d62b14
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/button/type.ts
@@ -0,0 +1,192 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdLoadingProps as LoadingProps } from '../loading/type';
+
+export interface TdButtonProps {
+ /**
+ * 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
+ * @default ''
+ */
+ appParameter?: string;
+ /**
+ * 是否为块级元素
+ * @default false
+ */
+ block?: boolean;
+ /**
+ * 按钮内容
+ */
+ content?: string;
+ /**
+ * 自定义 dataset,可通过 event.currentTarget.dataset.custom 获取
+ * @default {}
+ */
+ customDataset?: string | number | boolean | object | Array;
+ /**
+ * 禁用状态。优先级:Button.disabled > Form.disabled
+ */
+ disabled?: boolean;
+ /**
+ * 是否为幽灵按钮(镂空按钮)
+ * @default false
+ */
+ ghost?: boolean;
+ /**
+ * 指定按钮按下去的样式类,按钮不为加载或禁用状态时有效。当 `hover-class="none"` 时,没有点击态效果
+ * @default ''
+ */
+ hoverClass?: string;
+ /**
+ * 按住后多久出现点击态,单位毫秒
+ * @default 20
+ */
+ hoverStartTime?: number;
+ /**
+ * 手指松开后点击态保留时间,单位毫秒
+ * @default 70
+ */
+ hoverStayTime?: number;
+ /**
+ * 指定是否阻止本节点的祖先节点出现点击态
+ * @default false
+ */
+ hoverStopPropagation?: boolean;
+ /**
+ * 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon`
+ */
+ icon?: string | object;
+ /**
+ * 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。
具体释义:
`en` 英文;
`zh_CN` 简体中文;
`zh_TW` 繁体中文。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html)
+ */
+ lang?: 'en' | 'zh_CN' | 'zh_TW';
+ /**
+ * 是否显示为加载状态
+ * @default false
+ */
+ loading?: boolean;
+ /**
+ * 透传 Loading 组件全部属性
+ * @default {}
+ */
+ loadingProps?: LoadingProps;
+ /**
+ * 微信开放能力。
具体释义:
`contact` 打开客服会话,如果用户在会话中点击消息卡片后返回小程序,可以从 bindcontact 回调中获得具体信息,具体说明 (*鸿蒙 OS 暂不支持*);
`liveActivity` 通过前端获取新的一次性订阅消息下发机制使用的 code;
`share` 触发用户转发,使用前建议先阅读使用指引;
`getPhoneNumber` 获取用户手机号,可以从 bindgetphonenumber 回调中获取到用户信息,具体说明 (*小程序插件中不能使用*);
`getUserInfo` 获取用户信息,可以从 bindgetuserinfo 回调中获取到用户信息 (*小程序插件中不能使用*);
`launchApp` 打开APP,可以通过 app-parameter 属性设定向 APP 传的参数具体说明;
`openSetting` 打开授权设置页;
`feedback` 打开“意见反馈”页面,用户可提交反馈内容并上传日志,开发者可以登录小程序管理后台后进入左侧菜单“客服反馈”页面获取到反馈内容;
`chooseAvatar` 获取用户头像,可以从 bindchooseavatar 回调中获取到头像信息;
`agreePrivacyAuthorization`用户同意隐私协议按钮。用户点击一次此按钮后,所有隐私接口可以正常调用。可通过`bindagreeprivacyauthorization`监听用户同意隐私协议事件。隐私合规开发指南详情可见《小程序隐私协议开发指南》。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html)
+ */
+ openType?:
+ | 'contact'
+ | 'share'
+ | 'getPhoneNumber'
+ | 'getUserInfo'
+ | 'launchApp'
+ | 'openSetting'
+ | 'feedback'
+ | 'chooseAvatar'
+ | 'agreePrivacyAuthorization';
+ /**
+ * 原生按钮属性,当手机号快速验证或手机号实时验证额度用尽时,是否对用户展示“申请获取你的手机号,但该功能使用次数已达当前小程序上限,暂时无法使用”的提示,默认展示,open-type="getPhoneNumber" 或 open-type="getRealtimePhoneNumber" 时有效
+ * @default true
+ */
+ phoneNumberNoQuotaToast?: boolean;
+ /**
+ * 会话内消息卡片图片,open-type="contact"时有效
+ * @default 截图
+ */
+ sendMessageImg?: string;
+ /**
+ * 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
+ * @default 当前分享路径
+ */
+ sendMessagePath?: string;
+ /**
+ * 会话内消息卡片标题,open-type="contact"时有效
+ * @default 当前标题
+ */
+ sendMessageTitle?: string;
+ /**
+ * 会话来源,open-type="contact"时有效
+ * @default ''
+ */
+ sessionFrom?: string;
+ /**
+ * 按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形
+ * @default rectangle
+ */
+ shape?: 'rectangle' | 'square' | 'round' | 'circle';
+ /**
+ * 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,open-type="contact"时有效
+ * @default false
+ */
+ showMessageCard?: boolean;
+ /**
+ * 组件尺寸
+ * @default medium
+ */
+ size?: 'extra-small' | 'small' | 'medium' | 'large';
+ /**
+ * 按钮标签id
+ * @default ''
+ */
+ tId?: string;
+ /**
+ * 组件风格,依次为品牌色、危险色
+ * @default default
+ */
+ theme?: 'default' | 'primary' | 'danger' | 'light';
+ /**
+ * 同小程序的 formType
+ */
+ type?: 'submit' | 'reset';
+ /**
+ * 按钮形式,基础、线框、虚线、文字
+ * @default base
+ */
+ variant?: 'base' | 'outline' | 'dashed' | 'text';
+ /**
+ * 原生按钮属性,用户同意隐私协议事件回调,open-type=agreePrivacyAuthorization时有效 (Tips: 如果使用 onNeedPrivacyAuthorization 接口,需要在 bindagreeprivacyauthorization 触发后再调用 resolve({ event: "agree", buttonId }))
+ */
+ onAgreeprivacyauthorization?: () => void;
+ /**
+ * 原生按钮属性,获取用户头像回调,`open-type=chooseAvatar` 时有效。返回 `e.detail.avatarUrl` 为头像临时文件链接
+ */
+ onChooseavatar?: () => void;
+ /**
+ * 点击时触发
+ */
+ onClick?: (e: MouseEvent) => void;
+ /**
+ * 原生按钮属性,客服消息回调,`open-type="contact"` 时有效
+ */
+ onContact?: () => void;
+ /**
+ * 新的一次性订阅消息下发机制回调,`open-type=liveActivity` 时有效
+ */
+ onCreateliveactivity?: () => void;
+ /**
+ * 原生按钮属性,当使用开放能力时,发生错误的回调,`open-type=launchApp` 时有效
+ */
+ onError?: () => void;
+ /**
+ * 原生按钮属性,手机号快速验证回调,open-type=getPhoneNumber时有效。Tips:在触发 bindgetphonenumber 回调后应立即隐藏手机号按钮组件,或置为 disabled 状态,避免用户重复授权手机号产生额外费用
+ */
+ onGetphonenumber?: () => void;
+ /**
+ * 原生按钮属性,手机号实时验证回调,open-type=getRealtimePhoneNumber 时有效。Tips:在触发 bindgetrealtimephonenumber 回调后应立即隐藏手机号按钮组件,或置为 disabled 状态,避免用户重复授权手机号产生额外费用
+ */
+ onGetrealtimephonenumber?: () => void;
+ /**
+ * 原生按钮属性,用户点击该按钮时,会返回获取到的用户信息,回调的detail数据与wx.getUserInfo返回的一致,open-type="getUserInfo"时有效
+ */
+ onGetuserinfo?: () => void;
+ /**
+ * 打开 APP 成功的回调,`open-type=launchApp` 时有效
+ */
+ onLaunchapp?: () => void;
+ /**
+ * 原生按钮属性,在打开授权设置页后回调,open-type=openSetting时有效
+ */
+ onOpensetting?: () => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/calendar/README.en-US.md b/uni_modules/tdesign-uniapp/components/calendar/README.en-US.md
new file mode 100644
index 0000000..64669c9
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/calendar/README.en-US.md
@@ -0,0 +1,63 @@
+:: BASE_DOC ::
+
+## API
+
+### Calendar Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+allow-same-day | Boolean | false | \- | N
+auto-close | Boolean | true | \- | N
+confirm-btn | String / Object | '' | [see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/calendar/type.ts) | N
+first-day-of-week | Number | 0 | \- | N
+format | Function | - | Typescript: `CalendarFormatType ` `type CalendarFormatType = (day: TDate) => TDate` `type TDateType = 'selected' \| 'disabled' \| 'start' \| 'start-end' \|'centre' \| 'end' \| ''` `interface TDate { date: Date; day: number; type: TDateType; className?: string; prefix?: string; suffix?: string;}`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/calendar/type.ts) | N
+locale-text | Object | - | Typescript: `CalendarLocaleText` `interface CalendarLocaleText {title?: string; weekdays?: string[]; monthTitle?: string; months?: string[]; confirm?: string;}`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/calendar/type.ts) | N
+max-date | Number | - | \- | N
+min-date | Number | - | \- | N
+readonly | Boolean | - | \- | N
+switch-mode | String | none | options: none/month/year-month | N
+title | String | - | \- | N
+type | String | single | options: single/multiple/range | N
+use-popup | Boolean | true | \- | N
+using-custom-navbar | Boolean | false | \- | N
+value | Number / Array | - | `v-model:value` is supported。Typescript: `number \| number[]` | N
+default-value | Number / Array | - | uncontrolled property。Typescript: `number \| number[]` | N
+visible | Boolean | false | \- | N
+
+### Calendar Events
+
+name | params | description
+-- | -- | --
+change | `(context: { value: number \| number[] })` | \-
+close | `(context: { trigger: CalendarTrigger })` | [see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/calendar/type.ts)。
`type CalendarTrigger = 'close-btn' \| 'confirm-btn' \| 'overlay' \| 'auto-close'`
+confirm | `(context: { value: number \| number[] })` | \-
+panel-change | `(context: { year: number, month: number })` | \-
+scroll | `(context: {scrollLeft: number, scrollTop: number, scrollHeight: number, scrollWidth: number, deltaX: number, deltaY: number})` | triggered when scrolling
+select | `(context: { value: number \| number[] })` | \-
+
+### Calendar Slots
+
+name | Description
+-- | --
+confirm-btn | \-
+title | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-calendar-active-color | @brand-color | -
+--td-calendar-bg-color | @bg-color-container | -
+--td-calendar-days-color | @text-color-secondary | -
+--td-calendar-item-centre-color | @brand-color-light | -
+--td-calendar-item-disabled-color | @text-color-disabled | -
+--td-calendar-item-suffix-color | @text-color-placeholder | -
+--td-calendar-radius | 24rpx | -
+--td-calendar-selected-border-radius | @radius-default | -
+--td-calendar-selected-color | @text-color-anti | -
+--td-calendar-switch-mode-icon-color | @text-color-secondary | -
+--td-calendar-switch-mode-icon-disabled-color | @text-color-disabled | -
+--td-calendar-title-color | @text-color-primary | -
+--td-calendar-title-font | @font-title-large | -
diff --git a/uni_modules/tdesign-uniapp/components/calendar/README.md b/uni_modules/tdesign-uniapp/components/calendar/README.md
new file mode 100644
index 0000000..80dd052
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/calendar/README.md
@@ -0,0 +1,113 @@
+---
+title: Calendar 日历
+description: 按照日历形式展示数据或日期的容器。
+spline: form
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TCalendar from '@tdesign/uniapp/calendar/calendar.vue';
+```
+
+### 组件类型
+
+#### 单个选择日历
+
+{{ base }}
+
+#### 多个选择日历
+
+{{ multiple }}
+
+#### 带单行/双行描述的日历
+
+{{ custom-text }}
+
+#### 带翻页功能的日历
+
+{{ switch-mode }}
+
+#### 可选择区间日期的日历
+
+{{ range }}
+
+### 组件样式
+
+#### 国际化
+
+{{ local-text }}
+
+#### 含不可选的日历
+
+{{ custom-range }}
+
+#### 不使用 Popup
+
+{{ without-popup }}
+
+## API
+
+### Calendar Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+allow-same-day | Boolean | false | 是否允许区间选择日历的起止时间相同,仅当 `type='range'` 时有效 | N
+auto-close | Boolean | true | 自动关闭;在点击关闭按钮、确认按钮、遮罩层时自动关闭,不需要手动设置 visible | N
+confirm-btn | String / Object | '' | 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/calendar/type.ts) | N
+first-day-of-week | Number | 0 | 第一天从星期几开始,默认 0 = 周日 | N
+format | Function | - | 用于格式化日期的函数。TS 类型:`CalendarFormatType ` `type CalendarFormatType = (day: TDate) => TDate` `type TDateType = 'selected' \| 'disabled' \| 'start' \| 'start-end' \|'centre' \| 'end' \| ''` `interface TDate { date: Date; day: number; type: TDateType; className?: string; prefix?: string; suffix?: string;}`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/calendar/type.ts) | N
+locale-text | Object | - | 国际化文案。TS 类型:`CalendarLocaleText` `interface CalendarLocaleText {title?: string; weekdays?: string[]; monthTitle?: string; months?: string[]; confirm?: string;}`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/calendar/type.ts) | N
+max-date | Number | - | 最大可选的日期,不传则默认半年后 | N
+min-date | Number | - | 最小可选的日期,不传则默认今天 | N
+readonly | Boolean | - | 是否只读,只读状态下不能选择日期 | N
+switch-mode | String | none | 切换模式。 `none` 表示平铺展示所有月份; `month` 表示支持按月切换, `year-month` 表示既按年切换,也支持按月切换。可选项:none/month/year-month | N
+title | String | - | 标题,不传默认为“请选择日期” | N
+type | String | single | 日历的选择类型,single = 单选;multiple = 多选; range = 区间选择。可选项:single/multiple/range | N
+use-popup | Boolean | true | 是否使用弹出层包裹日历 | N
+using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
+value | Number / Array | - | 当前选择的日期,不传则选用 minDate 属性值或今天,优先级:minDate > today。当 type = multiple 或 range 时传入数组。支持语法糖 `v-model:value`。TS 类型:`number \| number[]` | N
+default-value | Number / Array | - | 当前选择的日期,不传则选用 minDate 属性值或今天,优先级:minDate > today。当 type = multiple 或 range 时传入数组。非受控属性。TS 类型:`number \| number[]` | N
+visible | Boolean | false | 是否显示日历;`usePopup` 为 true 时有效 | N
+
+### Calendar Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { value: number \| number[] })` | 不显示 confirm-btn 时,完成选择时触发(暂不支持 type = multiple)
+close | `(context: { trigger: CalendarTrigger })` | 关闭按钮时触发。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/calendar/type.ts)。
`type CalendarTrigger = 'close-btn' \| 'confirm-btn' \| 'overlay' \| 'auto-close'`
+confirm | `(context: { value: number \| number[] })` | 点击确认按钮时触发
+panel-change | `(context: { year: number, month: number })` | 切换月或年时触发(switch-mode 不为 none 时有效)
+scroll | `(context: {scrollLeft: number, scrollTop: number, scrollHeight: number, scrollWidth: number, deltaX: number, deltaY: number})` | 滚动时触发
+select | `(context: { value: number \| number[] })` | 点击日期时触发
+
+### Calendar Slots
+
+名称 | 描述
+-- | --
+confirm-btn | 确认按钮
+title | 标题
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-calendar-active-color | @brand-color | -
+--td-calendar-bg-color | @bg-color-container | -
+--td-calendar-days-color | @text-color-secondary | -
+--td-calendar-item-centre-color | @brand-color-light | -
+--td-calendar-item-disabled-color | @text-color-disabled | -
+--td-calendar-item-suffix-color | @text-color-placeholder | -
+--td-calendar-radius | 24rpx | -
+--td-calendar-selected-border-radius | @radius-default | -
+--td-calendar-selected-color | @text-color-anti | -
+--td-calendar-switch-mode-icon-color | @text-color-secondary | -
+--td-calendar-switch-mode-icon-disabled-color | @text-color-disabled | -
+--td-calendar-title-color | @text-color-primary | -
+--td-calendar-title-font | @font-title-large | -
diff --git a/uni_modules/tdesign-uniapp/components/calendar/calendar-header.props.js b/uni_modules/tdesign-uniapp/components/calendar/calendar-header.props.js
new file mode 100644
index 0000000..e30be21
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/calendar/calendar-header.props.js
@@ -0,0 +1,42 @@
+export default {
+ tClass: {
+ type: String,
+ default: '',
+ },
+ classPrefix: {
+ type: String,
+ default: '',
+ },
+ switchMode: {
+ type: String,
+ default: '',
+ },
+ title: {
+ type: String,
+ default: '',
+ },
+ preYearBtnDisable: {
+ type: Boolean,
+ },
+ prevMonthBtnDisable: {
+ type: Boolean,
+ },
+ nextYearBtnDisable: {
+ type: Boolean,
+ },
+ nextMonthBtnDisable: {
+ type: Boolean,
+ },
+ tId: {
+ type: String,
+ default: '',
+ },
+ // realLocalText: {
+ // type: Object,
+ // default: () => ({}),
+ // },
+ // currentMonth: {
+ // type: Array,
+ // default: () => ([]),
+ // },
+};
diff --git a/uni_modules/tdesign-uniapp/components/calendar/calendar-header.vue b/uni_modules/tdesign-uniapp/components/calendar/calendar-header.vue
new file mode 100644
index 0000000..633ffcf
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/calendar/calendar-header.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/calendar/calendar.css b/uni_modules/tdesign-uniapp/components/calendar/calendar.css
new file mode 100644
index 0000000..e735cac
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/calendar/calendar.css
@@ -0,0 +1,205 @@
+.t-calendar {
+ width: inherit;
+ position: relative;
+ z-index: 9999;
+ background: var(--td-calendar-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ overflow-x: hidden;
+}
+.t-calendar--popup {
+ border-top-left-radius: var(--td-calendar-radius, 24rpx);
+ border-top-right-radius: var(--td-calendar-radius, 24rpx);
+}
+.t-calendar__title {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font: var(--td-calendar-title-font, var(--td-font-title-large, 600 36rpx / 52rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-calendar-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ padding: var(--td-spacer-2, 32rpx);
+}
+.t-calendar__title:focus {
+ outline: 0;
+}
+.t-calendar__close-btn {
+ position: absolute;
+ top: var(--td-spacer-2, 32rpx);
+ right: var(--td-spacer-2, 32rpx);
+ margin: calc(-1 * var(--td-spacer-1, 24rpx));
+ padding: var(--td-spacer-1, 24rpx);
+ color: var(--td-calendar-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-calendar__days {
+ display: grid;
+ grid-template-columns: repeat(7, 1fr);
+ grid-column-gap: 8rpx;
+ padding: 0 32rpx;
+ text-align: center;
+ line-height: 92rpx;
+}
+.t-calendar__days-item {
+ height: 92rpx;
+ font-size: 28rpx;
+ color: var(--td-calendar-days-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
+}
+.t-calendar__content {
+ min-height: 400rpx;
+ display: flex;
+ flex-direction: column;
+}
+.t-calendar__month {
+ font: var(--td-font-title-small, 600 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+ color: var(--td-calendar-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ padding: 32rpx 0 0;
+}
+.t-calendar__months {
+ height: 712rpx;
+ padding: 0 32rpx 32rpx;
+ box-sizing: border-box;
+}
+.t-calendar__months::-webkit-scrollbar {
+ display: none;
+}
+.t-calendar__dates {
+ flex: 1;
+ display: grid;
+ grid-template-columns: repeat(7, 1fr);
+ grid-column-gap: 8rpx;
+}
+.t-calendar__dates-item {
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font: var(--td-font-title-medium, 600 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+ border-radius: var(--td-calendar-selected-border-radius, var(--td-radius-default, 12rpx));
+ height: 120rpx;
+ margin-top: 16rpx;
+ color: var(--td-calendar-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ cursor: pointer;
+ -webkit-tap-highlight-color: transparent;
+ -webkit-user-select: none;
+ user-select: none;
+}
+.t-calendar__dates-item-prefix,
+.t-calendar__dates-item-suffix {
+ position: absolute;
+ font: var(--td-font-body-extraSmall, 20rpx / 32rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+ width: 100%;
+ text-align: center;
+}
+.t-calendar__dates-item-prefix {
+ top: 8rpx;
+}
+.t-calendar__dates-item-suffix {
+ bottom: 8rpx;
+ color: var(--td-calendar-item-suffix-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+}
+.t-calendar__dates-item-suffix--selected,
+.t-calendar__dates-item-suffix--start,
+.t-calendar__dates-item-suffix--end {
+ color: var(--td-calendar-selected-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+}
+.t-calendar__dates-item-suffix--disabled {
+ color: var(--td-calendar-item-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-calendar__dates-item--selected,
+.t-calendar__dates-item--start-end,
+.t-calendar__dates-item--start,
+.t-calendar__dates-item--end {
+ background: var(--td-calendar-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ color: var(--td-calendar-selected-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+ border-radius: var(--td-calendar-selected-border-radius, var(--td-radius-default, 12rpx));
+}
+.t-calendar__dates-item--start {
+ border-radius: var(--td-calendar-selected-border-radius, var(--td-radius-default, 12rpx)) 0 0 var(--td-calendar-selected-border-radius, var(--td-radius-default, 12rpx));
+}
+.t-calendar__dates-item--end {
+ border-radius: 0 var(--td-calendar-selected-border-radius, var(--td-radius-default, 12rpx)) var(--td-calendar-selected-border-radius, var(--td-radius-default, 12rpx)) 0;
+}
+.t-calendar__dates-item--start + .t-calendar__dates-item--end::before {
+ content: '';
+ display: block;
+ position: absolute;
+ top: 0;
+ width: 8rpx;
+ height: 100%;
+ background: var(--td-calendar-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-calendar__dates-item--start + .t-calendar__dates-item--end:before {
+ left: -8rpx;
+}
+.t-calendar__dates-item--centre {
+ border-radius: 0;
+ background-color: var(--td-calendar-item-centre-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+}
+.t-calendar__dates-item--centre::before,
+.t-calendar__dates-item--centre::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: 0;
+ width: 8rpx;
+ height: 100%;
+ background-color: var(--td-calendar-item-centre-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+}
+.t-calendar__dates-item--centre:before {
+ left: -8rpx;
+}
+.t-calendar__dates-item--centre:after {
+ right: -8rpx;
+}
+.t-calendar__dates-item--disabled {
+ color: var(--td-calendar-item-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+ cursor: default;
+}
+.t-calendar__footer {
+ padding: 32rpx;
+}
+.t-calendar-switch-mode--none > .t-calendar__months {
+ height: 60vh;
+}
+.t-calendar-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.t-calendar-header__with-action {
+ padding: 0rpx 32rpx 16rpx 32rpx;
+ box-sizing: border-box;
+ position: relative;
+}
+.t-calendar-header__with-action::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: unset;
+ bottom: 0;
+ left: unset;
+ right: unset;
+ background-color: var(--td-border-color, var(--td-gray-color-3, #e7e7e7));
+}
+.t-calendar-header__with-action::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-calendar-header__with-action .t-calendar-header__title {
+ flex: 1;
+ text-align: center;
+ font: var(--td-font-title-small, 600 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
+.t-calendar-header__action {
+ display: flex;
+ font-size: 40rpx;
+ color: var(--td-calendar-switch-mode-icon-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
+}
+.t-calendar-header__icon {
+ padding: 16rpx;
+}
+.t-calendar-header__icon--disabled {
+ color: var(--td-calendar-switch-mode-icon-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-calendar-header__title {
+ text-align: left;
+}
diff --git a/uni_modules/tdesign-uniapp/components/calendar/calendar.vue b/uni_modules/tdesign-uniapp/components/calendar/calendar.vue
new file mode 100644
index 0000000..063cbcf
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/calendar/calendar.vue
@@ -0,0 +1,454 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/calendar/computed.js b/uni_modules/tdesign-uniapp/components/calendar/computed.js
new file mode 100644
index 0000000..14f0245
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/calendar/computed.js
@@ -0,0 +1,42 @@
+import { getRegExp } from '../common/runtime/wxs-polyfill';
+
+
+export function isDateSelected(dateItem) {
+ return ['start', 'end', 'selected', 'centre'].indexOf(dateItem.type) >= 0;
+}
+
+export function getMonthTitle(year, month, pattern = '') {
+ // prettier-ignore
+ const REGEXP = getRegExp('\\{year\\}|\\{month\\}', 'g');
+
+ return pattern.replace(REGEXP, (match) => {
+ const replacements = {
+ '{year}': year,
+ '{month}': month < 10 ? `0${month}` : month,
+ };
+ return replacements[match] || match;
+ });
+}
+
+
+export function getDateLabel(monthItem, dateItem) {
+ const weekdayText = ['日', '一', '二', '三', '四', '五', '六'];
+ const weekday = (monthItem.weekdayOfFirstDay + dateItem.day - 1) % 7;
+ let label = `${monthItem.month + 1}月${dateItem.day}日, 星期${weekdayText[weekday]}`;
+ if (dateItem.type === 'start') {
+ label = `开始日期:${label}`;
+ }
+ if (dateItem.type === 'end') {
+ label = `结束日期:${label}`;
+ }
+ if (isDateSelected(dateItem)) {
+ label = `已选中, ${label}`;
+ }
+ if (dateItem.prefix) {
+ label += `, ${dateItem.prefix}`;
+ }
+ if (dateItem.suffix) {
+ label += `, ${dateItem.suffix}`;
+ }
+ return label;
+}
diff --git a/uni_modules/tdesign-uniapp/components/calendar/props.ts b/uni_modules/tdesign-uniapp/components/calendar/props.ts
new file mode 100644
index 0000000..379ca85
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/calendar/props.ts
@@ -0,0 +1,113 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdCalendarProps } from './type';
+export default {
+ /** 是否允许区间选择日历的起止时间相同,仅当 `type='range'` 时有效 */
+ allowSameDay: Boolean,
+ /** 自动关闭;在点击关闭按钮、确认按钮、遮罩层时自动关闭,不需要手动设置 visible */
+ autoClose: {
+ type: Boolean,
+ default: true,
+ },
+ /** 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性 */
+ confirmBtn: {
+ type: [String, Object],
+ default: '' as TdCalendarProps['confirmBtn'],
+ },
+ /** 第一天从星期几开始,默认 0 = 周日 */
+ firstDayOfWeek: {
+ type: Number,
+ default: 0,
+ },
+ /** 用于格式化日期的函数 */
+ format: {
+ type: Function,
+ },
+ /** 国际化文案 */
+ localeText: {
+ type: Object,
+ },
+ /** 最大可选的日期,不传则默认半年后 */
+ maxDate: {
+ type: Number,
+ },
+ /** 最小可选的日期,不传则默认今天 */
+ minDate: {
+ type: Number,
+ },
+ /** 是否只读,只读状态下不能选择日期 */
+ readonly: Boolean,
+ /** 切换模式。 `none` 表示平铺展示所有月份; `month` 表示支持按月切换, `year-month` 表示既按年切换,也支持按月切换 */
+ switchMode: {
+ type: String,
+ default: 'none' as TdCalendarProps['switchMode'],
+ validator(val: TdCalendarProps['switchMode']): boolean {
+ if (!val) return true;
+ return ['none', 'month', 'year-month'].includes(val);
+ },
+ },
+ /** 标题,不传默认为“请选择日期” */
+ title: {
+ type: String,
+ },
+ /** 日历的选择类型,single = 单选;multiple = 多选; range = 区间选择 */
+ type: {
+ type: String,
+ default: 'single' as TdCalendarProps['type'],
+ validator(val: TdCalendarProps['type']): boolean {
+ if (!val) return true;
+ return ['single', 'multiple', 'range'].includes(val);
+ },
+ },
+ /** 是否使用弹出层包裹日历 */
+ usePopup: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否使用了自定义导航栏 */
+ usingCustomNavbar: Boolean,
+ /** 当前选择的日期,不传则选用 minDate 属性值或今天,优先级:minDate > today。当 type = multiple 或 range 时传入数组 */
+ value: {
+ type: [Number, Array],
+ },
+ /** 当前选择的日期,不传则选用 minDate 属性值或今天,优先级:minDate > today。当 type = multiple 或 range 时传入数组,非受控属性 */
+ defaultValue: {
+ type: [Number, Array],
+ },
+ /** 是否显示日历;`usePopup` 为 true 时有效 */
+ visible: Boolean,
+ /** 不显示 confirm-btn 时,完成选择时触发(暂不支持 type = multiple) */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 关闭按钮时触发 */
+ onClose: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击确认按钮时触发 */
+ onConfirm: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 切换月或年时触发(switch-mode 不为 none 时有效) */
+ onPanelChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 滚动时触发 */
+ onScroll: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击日期时触发 */
+ onSelect: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/calendar/template.props.js b/uni_modules/tdesign-uniapp/components/calendar/template.props.js
new file mode 100644
index 0000000..c421f33
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/calendar/template.props.js
@@ -0,0 +1,57 @@
+export default {
+ classPrefix: {
+ type: String,
+ default: '',
+ },
+ usePopup: {
+ type: Boolean,
+ },
+ switchMode: {
+ type: String,
+ default: '',
+ },
+ tClass: {
+ type: String,
+ default: '',
+ },
+ customStyle: {
+ type: [String, Object],
+ default: '',
+ },
+ title: {
+ type: String,
+ default: '',
+ },
+ realLocalText: {
+ type: Object,
+ default: () => ({}),
+ },
+ months: {
+ type: Array,
+ default: () => ([]),
+ },
+ currentMonth: {
+ type: [Array, Object],
+ default: () => ([]),
+ },
+ actionButtons: {
+ type: Object,
+ default: () => ({}),
+ },
+ days: {
+ type: Array,
+ default: () => ([]),
+ },
+ scrollIntoView: {
+ type: String,
+ default: '',
+ },
+ firstDayOfWeek: {
+ type: Number,
+ default: 0,
+ },
+ innerConfirmBtn: {
+ type: [Object, String],
+ default: '',
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/calendar/template.vue b/uni_modules/tdesign-uniapp/components/calendar/template.vue
new file mode 100644
index 0000000..52e767d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/calendar/template.vue
@@ -0,0 +1,261 @@
+
+
+
+
+
+ {{ title || realLocalText.title }}
+
+
+
+
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dateItem.prefix }}
+
+ {{ dateItem.day }}
+
+ {{ dateItem.suffix }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/calendar/type.ts b/uni_modules/tdesign-uniapp/components/calendar/type.ts
new file mode 100644
index 0000000..888089d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/calendar/type.ts
@@ -0,0 +1,141 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdButtonProps as ButtonProps } from '../button/type';
+
+export interface TdCalendarProps {
+ /**
+ * 是否允许区间选择日历的起止时间相同,仅当 `type='range'` 时有效
+ * @default false
+ */
+ allowSameDay?: boolean;
+ /**
+ * 自动关闭;在点击关闭按钮、确认按钮、遮罩层时自动关闭,不需要手动设置 visible
+ * @default true
+ */
+ autoClose?: boolean;
+ /**
+ * 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性
+ * @default ''
+ */
+ confirmBtn?: string | ButtonProps | null;
+ /**
+ * 第一天从星期几开始,默认 0 = 周日
+ * @default 0
+ */
+ firstDayOfWeek?: number;
+ /**
+ * 用于格式化日期的函数
+ */
+ format?: CalendarFormatType;
+ /**
+ * 国际化文案
+ */
+ localeText?: CalendarLocaleText;
+ /**
+ * 最大可选的日期,不传则默认半年后
+ */
+ maxDate?: number;
+ /**
+ * 最小可选的日期,不传则默认今天
+ */
+ minDate?: number;
+ /**
+ * 是否只读,只读状态下不能选择日期
+ */
+ readonly?: boolean;
+ /**
+ * 切换模式。 `none` 表示平铺展示所有月份; `month` 表示支持按月切换, `year-month` 表示既按年切换,也支持按月切换
+ * @default none
+ */
+ switchMode?: 'none' | 'month' | 'year-month';
+ /**
+ * 标题,不传默认为“请选择日期”
+ */
+ title?: string;
+ /**
+ * 日历的选择类型,single = 单选;multiple = 多选; range = 区间选择
+ * @default single
+ */
+ type?: 'single' | 'multiple' | 'range';
+ /**
+ * 是否使用弹出层包裹日历
+ * @default true
+ */
+ usePopup?: boolean;
+ /**
+ * 是否使用了自定义导航栏
+ * @default false
+ */
+ usingCustomNavbar?: boolean;
+ /**
+ * 当前选择的日期,不传则选用 minDate 属性值或今天,优先级:minDate > today。当 type = multiple 或 range 时传入数组
+ */
+ value?: number | number[];
+ /**
+ * 当前选择的日期,不传则选用 minDate 属性值或今天,优先级:minDate > today。当 type = multiple 或 range 时传入数组,非受控属性
+ */
+ defaultValue?: number | number[];
+ /**
+ * 是否显示日历;`usePopup` 为 true 时有效
+ * @default false
+ */
+ visible?: boolean;
+ /**
+ * 不显示 confirm-btn 时,完成选择时触发(暂不支持 type = multiple)
+ */
+ onChange?: (context: { value: number | number[] }) => void;
+ /**
+ * 关闭按钮时触发
+ */
+ onClose?: (context: { trigger: CalendarTrigger }) => void;
+ /**
+ * 点击确认按钮时触发
+ */
+ onConfirm?: (context: { value: number | number[] }) => void;
+ /**
+ * 切换月或年时触发(switch-mode 不为 none 时有效)
+ */
+ onPanelChange?: (context: { year: number; month: number }) => void;
+ /**
+ * 滚动时触发
+ */
+ onScroll?: (context: {
+ scrollLeft: number;
+ scrollTop: number;
+ scrollHeight: number;
+ scrollWidth: number;
+ deltaX: number;
+ deltaY: number;
+ }) => void;
+ /**
+ * 点击日期时触发
+ */
+ onSelect?: (context: { value: number | number[] }) => void;
+}
+
+export type CalendarFormatType = (day: TDate) => TDate;
+
+export type TDateType = 'selected' | 'disabled' | 'start' | 'start-end' | 'centre' | 'end' | '';
+
+export interface TDate {
+ date: Date;
+ day: number;
+ type: TDateType;
+ className?: string;
+ prefix?: string;
+ suffix?: string;
+}
+
+export interface CalendarLocaleText {
+ title?: string;
+ weekdays?: string[];
+ monthTitle?: string;
+ months?: string[];
+ confirm?: string;
+}
+
+export type CalendarTrigger = 'close-btn' | 'confirm-btn' | 'overlay' | 'auto-close';
diff --git a/uni_modules/tdesign-uniapp/components/calendar/utils.js b/uni_modules/tdesign-uniapp/components/calendar/utils.js
new file mode 100644
index 0000000..aa2c2d8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/calendar/utils.js
@@ -0,0 +1,16 @@
+export function getMonthByOffset(date, offset) {
+ const _date = new Date(date);
+ _date.setMonth(_date.getMonth() + offset);
+ return _date;
+}
+
+export function getYearByOffset(date, offset) {
+ const _date = new Date(date);
+ _date.setFullYear(_date.getFullYear() + offset);
+ return _date;
+}
+
+export const getPrevMonth = date => getMonthByOffset(date, -1);
+export const getNextMonth = date => getMonthByOffset(date, 1);
+export const getPrevYear = date => getYearByOffset(date, -1);
+export const getNextYear = date => getYearByOffset(date, 1);
diff --git a/uni_modules/tdesign-uniapp/components/cascader/README.en-US.md b/uni_modules/tdesign-uniapp/components/cascader/README.en-US.md
new file mode 100644
index 0000000..694e0a8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cascader/README.en-US.md
@@ -0,0 +1,56 @@
+:: BASE_DOC ::
+
+## API
+
+### Cascader Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+check-strictly | Boolean | false | \- | N
+close-btn | Boolean | true | \- | N
+keys | Object | - | Typescript: `CascaderKeysType` `type CascaderKeysType = TreeKeysType`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/common/common.ts)。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/cascader/type.ts) | N
+options | Array | [] | Typescript: `Array` | N
+placeholder | String | 选择选项 | \- | N
+sub-titles | Array | [] | Typescript: `Array` | N
+theme | String | step | options: step/tab | N
+title | String | - | \- | N
+value | String / Number | - | `v-model:value` is supported | N
+default-value | String / Number | - | uncontrolled property | N
+visible | Boolean | false | \- | N
+
+### Cascader Events
+
+name | params | description
+-- | -- | --
+change | `(context: { value: string \| number, selectedOptions: string[] })` | \-
+close | `(context: { trigger: CascaderTriggerSource })` | [see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/cascader/type.ts)。
`type CascaderTriggerSource = 'overlay' \| 'close-btn' \| 'finish'`
+pick | `(context: { value: string \| number, label: string, index: number, level: number })` | \-
+
+### Cascader Slots
+
+name | Description
+-- | --
+close-btn | \-
+header | \-
+middle-content | \-
+title | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-cascader-active-color | @brand-color | -
+--td-cascader-bg-color | @bg-color-container | -
+--td-cascader-border-color | @component-stroke | -
+--td-cascader-content-height | 78vh | -
+--td-cascader-disabled-color | @text-color-disabled | -
+--td-cascader-options-height | calc(100% - @cascader-step-height) | -
+--td-cascader-options-title-color | @text-color-placeholder | -
+--td-cascader-step-arrow-color | @text-color-placeholder | -
+--td-cascader-step-dot-size | 16rpx | -
+--td-cascader-step-height | 88rpx | -
+--td-cascader-title-color | @text-color-primary | -
+--td-cascader-title-font | @font-title-large | -
+--td-cascader-title-padding | @spacer-2 | -
diff --git a/uni_modules/tdesign-uniapp/components/cascader/README.md b/uni_modules/tdesign-uniapp/components/cascader/README.md
new file mode 100644
index 0000000..51472aa
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cascader/README.md
@@ -0,0 +1,96 @@
+---
+title: Cascader 级联选择器
+description: 级联选择器适用于有清晰层级结构的数据集合,用户可以通过逐级查看并选择。
+spline: form
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TCascader from '@tdesign/uniapp/cascader/cascader.vue';
+```
+
+### 基础用法
+
+{{ base }}
+
+### 选项卡风格
+
+{{ theme-tab }}
+
+### 进阶
+
+#### 带初始值
+
+{{ with-value }}
+
+#### 自定义 keys
+
+{{ keys }}
+
+#### 使用次级标题
+
+{{ with-title }}
+
+#### 选择任意一项
+
+{{ check-strictly }}
+
+## API
+
+### Cascader Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+check-strictly | Boolean | false | 父子节点选中状态不再关联,可各自选中或取消 | N
+close-btn | Boolean | true | 关闭按钮 | N
+keys | Object | - | 用来定义 value / label / children / disabled 在 `options` 中对应的字段别名。TS 类型:`CascaderKeysType` `type CascaderKeysType = TreeKeysType`。[通用类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/common/common.ts)。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/cascader/type.ts) | N
+options | Array | [] | 可选项数据源。TS 类型:`Array` | N
+placeholder | String | 选择选项 | 未选中时的提示文案 | N
+sub-titles | Array | [] | 每级展示的次标题。TS 类型:`Array` | N
+theme | String | step | 展示风格。可选项:step/tab | N
+title | String | - | 标题 | N
+value | String / Number | - | 选项值。支持语法糖 `v-model:value` | N
+default-value | String / Number | - | 选项值。非受控属性 | N
+visible | Boolean | false | 是否展示 | N
+
+### Cascader Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { value: string \| number, selectedOptions: string[] })` | 值发生变更时触发
+close | `(context: { trigger: CascaderTriggerSource })` | 关闭时触发。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/cascader/type.ts)。
`type CascaderTriggerSource = 'overlay' \| 'close-btn' \| 'finish'`
+pick | `(context: { value: string \| number, label: string, index: number, level: number })` | 选择后触发
+
+### Cascader Slots
+
+名称 | 描述
+-- | --
+close-btn | 自定义 `close-btn` 显示内容
+header | 头部
+middle-content | 中间内容
+title | 自定义 `title` 显示内容
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-cascader-active-color | @brand-color | -
+--td-cascader-bg-color | @bg-color-container | -
+--td-cascader-border-color | @component-stroke | -
+--td-cascader-content-height | 78vh | -
+--td-cascader-disabled-color | @text-color-disabled | -
+--td-cascader-options-height | calc(100% - @cascader-step-height) | -
+--td-cascader-options-title-color | @text-color-placeholder | -
+--td-cascader-step-arrow-color | @text-color-placeholder | -
+--td-cascader-step-dot-size | 16rpx | -
+--td-cascader-step-height | 88rpx | -
+--td-cascader-title-color | @text-color-primary | -
+--td-cascader-title-font | @font-title-large | -
+--td-cascader-title-padding | @spacer-2 | -
diff --git a/uni_modules/tdesign-uniapp/components/cascader/cascader.css b/uni_modules/tdesign-uniapp/components/cascader/cascader.css
new file mode 100644
index 0000000..54dea53
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cascader/cascader.css
@@ -0,0 +1,102 @@
+.t-cascader {
+ display: flex;
+ flex-direction: column;
+ background-color: var(--td-cascader-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ color: var(--td-cascader-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ border-radius: var(--td-radius-extraLarge, 24rpx) var(--td-radius-extraLarge, 24rpx) 0 0;
+ --td-radio-icon-checked-color: var(--td-cascader-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ --td-tab-item-active-color: var(--td-cascader-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ --td-tab-track-color: var(--td-cascader-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-cascader__close-btn {
+ right: var(--td-spacer-2, 32rpx);
+ top: var(--td-spacer-2, 32rpx);
+ position: absolute;
+}
+.t-cascader__title {
+ position: relative;
+ font: var(--td-cascader-title-font, var(--td-font-title-large, 600 36rpx / 52rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ text-align: center;
+ padding: var(--td-cascader-title-padding, var(--td-spacer-2, 32rpx));
+}
+.t-cascader__content {
+ width: 100%;
+ height: var(--td-cascader-content-height, 78vh);
+ display: flex;
+ flex-direction: column;
+}
+.t-cascader__options {
+ width: 100vw;
+}
+.t-cascader__options-title {
+ color: var(--td-cascader-options-title-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ font: var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+ padding-top: 40rpx;
+ padding-left: var(--td-spacer-2, 32rpx);
+ box-sizing: border-box;
+}
+.t-cascader__options-container {
+ flex: 1;
+ display: flex;
+ transition: all ease 0.3s;
+}
+.t-cascader__step {
+ display: flex;
+ align-items: center;
+ height: var(--td-cascader-step-height, 88rpx);
+}
+.t-cascader__steps {
+ padding: 0 32rpx 10rpx;
+ position: relative;
+}
+.t-cascader__steps::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: unset;
+ bottom: 0;
+ left: unset;
+ right: unset;
+ background-color: var(--td-cascader-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-cascader__steps::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-cascader__step-dot {
+ position: relative;
+ width: var(--td-cascader-step-dot-size, 16rpx);
+ height: var(--td-cascader-step-dot-size, 16rpx);
+ border-radius: 50%;
+ border: 2rpx solid var(--td-cascader-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ box-sizing: border-box;
+}
+.t-cascader__step-dot:not(.t-cascader__step-dot--last)::after {
+ content: '';
+ display: block;
+ position: absolute;
+ left: 50%;
+ top: calc(var(--td-cascader-step-dot-size, 16rpx) + 14rpx);
+ height: 36rpx;
+ width: 2rpx;
+ background: var(--td-cascader-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ transform: translateX(-50%);
+}
+.t-cascader__step-dot--active {
+ background: var(--td-cascader-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ border-color: var(--td-cascader-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-cascader__step-label {
+ padding-left: var(--td-spacer-2, 32rpx);
+ font: var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
+.t-cascader__step-label--active {
+ color: var(--td-cascader-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ font-weight: 600;
+}
+.t-cascader__step-arrow {
+ color: var(--td-cascader-step-arrow-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ margin-left: auto;
+}
diff --git a/uni_modules/tdesign-uniapp/components/cascader/cascader.vue b/uni_modules/tdesign-uniapp/components/cascader/cascader.vue
new file mode 100644
index 0000000..a0c4eb6
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cascader/cascader.vue
@@ -0,0 +1,519 @@
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
+
+
+ onStepClick(index)"
+ >
+
+
+
+ {{ item }}
+
+
+
+
+
+
+ onTabChange(value)"
+ >
+
+
+
+
+
+
+
+ {{ subTitles[stepIndex] }}
+
+
+
+
+
+ handleSelect($event, { level: index, value })"
+ />
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/cascader/props.ts b/uni_modules/tdesign-uniapp/components/cascader/props.ts
new file mode 100644
index 0000000..4de54aa
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cascader/props.ts
@@ -0,0 +1,73 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdCascaderProps } from './type';
+export default {
+ /** 父子节点选中状态不再关联,可各自选中或取消 */
+ checkStrictly: Boolean,
+ /** 关闭按钮 */
+ closeBtn: {
+ type: Boolean,
+ default: true as TdCascaderProps['closeBtn'],
+ },
+ /** 用来定义 value / label / children / disabled 在 `options` 中对应的字段别名 */
+ keys: {
+ type: Object,
+ },
+ /** 可选项数据源 */
+ options: {
+ type: Array,
+ default: (): TdCascaderProps['options'] => [],
+ },
+ /** 未选中时的提示文案 */
+ placeholder: {
+ type: String,
+ default: '选择选项',
+ },
+ /** 每级展示的次标题 */
+ subTitles: {
+ type: Array,
+ default: (): TdCascaderProps['subTitles'] => [],
+ },
+ /** 展示风格 */
+ theme: {
+ type: String,
+ default: 'step' as TdCascaderProps['theme'],
+ validator(val: TdCascaderProps['theme']): boolean {
+ if (!val) return true;
+ return ['step', 'tab'].includes(val);
+ },
+ },
+ /** 标题 */
+ title: {
+ type: String,
+ },
+ /** 选项值 */
+ value: {
+ type: [String, Number],
+ },
+ /** 选项值,非受控属性 */
+ defaultValue: {
+ type: [String, Number],
+ },
+ /** 是否展示 */
+ visible: Boolean,
+ /** 值发生变更时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 关闭时触发 */
+ onClose: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 选择后触发 */
+ onPick: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/cascader/type.ts b/uni_modules/tdesign-uniapp/components/cascader/type.ts
new file mode 100644
index 0000000..cfd9e36
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cascader/type.ts
@@ -0,0 +1,77 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TreeOptionData, TreeKeysType } from '../common/common';
+
+export interface TdCascaderProps {
+ /**
+ * 父子节点选中状态不再关联,可各自选中或取消
+ * @default false
+ */
+ checkStrictly?: boolean;
+ /**
+ * 关闭按钮
+ * @default true
+ */
+ closeBtn?: boolean;
+ /**
+ * 用来定义 value / label / children / disabled 在 `options` 中对应的字段别名
+ */
+ keys?: CascaderKeysType;
+ /**
+ * 可选项数据源
+ * @default []
+ */
+ options?: Array;
+ /**
+ * 未选中时的提示文案
+ * @default 选择选项
+ */
+ placeholder?: string;
+ /**
+ * 每级展示的次标题
+ * @default []
+ */
+ subTitles?: Array;
+ /**
+ * 展示风格
+ * @default step
+ */
+ theme?: 'step' | 'tab';
+ /**
+ * 标题
+ */
+ title?: string;
+ /**
+ * 选项值
+ */
+ value?: string | number;
+ /**
+ * 选项值,非受控属性
+ */
+ defaultValue?: string | number;
+ /**
+ * 是否展示
+ * @default false
+ */
+ visible?: boolean;
+ /**
+ * 值发生变更时触发
+ */
+ onChange?: (context: { value: string | number; selectedOptions: string[] }) => void;
+ /**
+ * 关闭时触发
+ */
+ onClose?: (context: { trigger: CascaderTriggerSource }) => void;
+ /**
+ * 选择后触发
+ */
+ onPick?: (context: { value: string | number; label: string; index: number; level: number }) => void;
+}
+
+export type CascaderKeysType = TreeKeysType;
+
+export type CascaderTriggerSource = 'overlay' | 'close-btn' | 'finish';
diff --git a/uni_modules/tdesign-uniapp/components/cell-group/cell-group.css b/uni_modules/tdesign-uniapp/components/cell-group/cell-group.css
new file mode 100644
index 0000000..a031b8a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cell-group/cell-group.css
@@ -0,0 +1,44 @@
+.t-cell-group {
+ position: relative;
+}
+.t-cell-group__title {
+ font-family: PingFangSC-Regular;
+ font-size: var(--td-cell-group-title-font-size, 28rpx);
+ color: var(--td-cell-group-title-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ text-align: left;
+ line-height: var(--td-cell-group-title-line-height, 90rpx);
+ background-color: var(--td-cell-group-title-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+ padding-left: var(--td-cell-group-title-padding-left, 32rpx);
+}
+.t-cell-group--bordered::before {
+ position: absolute;
+ box-sizing: border-box;
+ content: ' ';
+ pointer-events: none;
+ right: 0;
+ left: 0;
+ top: 0;
+ border-top: 1px solid var(--td-cell-group-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
+ transform: scaleY(0.5);
+ transform-origin: 0 0;
+ transform-origin: top;
+ z-index: 1;
+}
+.t-cell-group--bordered::after {
+ position: absolute;
+ box-sizing: border-box;
+ content: ' ';
+ pointer-events: none;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ border-bottom: 1px solid var(--td-cell-group-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
+ transform: scaleY(0.5);
+ transform-origin: bottom;
+ z-index: 1;
+}
+.t-cell-group--card {
+ margin: 0 32rpx;
+ border-radius: var(--td-radius-large, 18rpx);
+ overflow: hidden;
+}
diff --git a/uni_modules/tdesign-uniapp/components/cell-group/cell-group.vue b/uni_modules/tdesign-uniapp/components/cell-group/cell-group.vue
new file mode 100644
index 0000000..2c38b72
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cell-group/cell-group.vue
@@ -0,0 +1,69 @@
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/cell-group/props.ts b/uni_modules/tdesign-uniapp/components/cell-group/props.ts
new file mode 100644
index 0000000..490c8a1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cell-group/props.ts
@@ -0,0 +1,25 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdCellGroupProps } from './type';
+export default {
+ /** 是否显示组边框 */
+ bordered: Boolean,
+ /** 单元格组风格 */
+ theme: {
+ type: String,
+ default: 'default' as TdCellGroupProps['theme'],
+ validator(val: TdCellGroupProps['theme']): boolean {
+ if (!val) return true;
+ return ['default', 'card'].includes(val);
+ },
+ },
+ /** 单元格组标题 */
+ title: {
+ type: String,
+ default: '',
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/cell-group/type.ts b/uni_modules/tdesign-uniapp/components/cell-group/type.ts
new file mode 100644
index 0000000..76ed34b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cell-group/type.ts
@@ -0,0 +1,23 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdCellGroupProps {
+ /**
+ * 是否显示组边框
+ * @default false
+ */
+ bordered?: boolean;
+ /**
+ * 单元格组风格
+ * @default default
+ */
+ theme?: 'default' | 'card';
+ /**
+ * 单元格组标题
+ * @default ''
+ */
+ title?: string;
+}
diff --git a/uni_modules/tdesign-uniapp/components/cell/README.en-US.md b/uni_modules/tdesign-uniapp/components/cell/README.en-US.md
new file mode 100644
index 0000000..07c2ccd
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cell/README.en-US.md
@@ -0,0 +1,116 @@
+:: BASE_DOC ::
+
+## API
+
+### Cell Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+align | String | middle | options: top/middle/bottom | N
+arrow | Boolean / Object | false | \- | N
+bordered | Boolean | true | \- | N
+description | String | - | \- | N
+hover | Boolean | - | \- | N
+image | String | - | \- | N
+jump-type | String | navigateTo | options: switchTab/reLaunch/redirectTo/navigateTo | N
+left-icon | String / Object | - | \- | N
+note | String | - | \- | N
+note-style | String / Object | - | \- | N
+required | Boolean | false | \- | N
+right-icon | String / Object | - | \- | N
+right-icon-style | String / Object | - | \- | N
+title | String | - | \- | N
+title-style | String / Object | - | \- | N
+url | String | - | \- | N
+
+### Cell Events
+
+name | params | description
+-- | -- | --
+click | `(e: MouseEvent)` | \-
+
+### Cell Slots
+
+name | Description
+-- | --
+description | \-
+image | \-
+left-icon | \-
+note | \-
+right-icon | \-
+title | \-
+
+### Cell External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-center | \-
+t-class-description | \-
+t-class-hover | \-
+t-class-image | \-
+t-class-left | \-
+t-class-left-icon | \-
+t-class-note | \-
+t-class-right | \-
+t-class-right-icon | \-
+t-class-title | \-
+
+
+### CellGroup Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+bordered | Boolean | false | \- | N
+theme | String | default | options: default/card | N
+title | String | - | \- | N
+
+### CellGroup Slots
+
+name | Description
+-- | --
+\- | \-
+
+### CellGroup External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-title | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-cell-group-border-color | @component-stroke | -
+--td-cell-group-title-bg-color | @bg-color-secondarycontainer | -
+--td-cell-group-title-color | @text-color-placeholder | -
+--td-cell-group-title-font-size | 28rpx | -
+--td-cell-group-title-line-height | 90rpx | -
+--td-cell-group-title-padding-left | 32rpx | -
+--td-cell-bg-color | @bg-color-container | -
+--td-cell-border-color | @component-stroke | -
+--td-cell-border-left-space | @cell-horizontal-padding | -
+--td-cell-border-right-space | 0 | -
+--td-cell-border-width | 1px | -
+--td-cell-description-color | @text-color-secondary | -
+--td-cell-description-font | @font-body-medium | -
+--td-cell-height | auto | -
+--td-cell-horizontal-padding | 32rpx | -
+--td-cell-hover-color | @bg-color-secondarycontainer | -
+--td-cell-image-height | 96rpx | -
+--td-cell-image-width | 96rpx | -
+--td-cell-left-icon-color | @brand-color | -
+--td-cell-left-icon-size | 48rpx | -
+--td-cell-note-color | @text-color-placeholder | -
+--td-cell-note-font-size | @font-size-m | -
+--td-cell-required-color | @error-color | -
+--td-cell-required-font-size | @font-size-m | -
+--td-cell-right-icon-color | @text-color-placeholder | -
+--td-cell-right-icon-size | 48rpx | -
+--td-cell-title-color | @text-color-primary | -
+--td-cell-title-font | @font-body-large | -
+--td-cell-vertical-padding | 32rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/cell/README.md b/uni_modules/tdesign-uniapp/components/cell/README.md
new file mode 100644
index 0000000..6f13955
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cell/README.md
@@ -0,0 +1,147 @@
+---
+title: Cell 单元格
+description: 用于各个类别行的信息展示。
+spline: data
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TCell from '@tdesign/uniapp/cell/cell.vue';
+import TCellGroup from '@tdesign/uniapp/cell-group/cell-group.vue';
+```
+
+### 类型
+
+单行单元格
+
+{{ base }}
+
+多行单元格
+
+{{ multiple }}
+
+### 样式
+
+卡片单元格
+
+{{ theme }}
+
+## API
+
+### Cell Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+align | String | middle | 右侧内容的对齐方式,默认居中对齐。可选项:top/middle/bottom | N
+arrow | Boolean / Object | false | 是否显示右侧箭头 | N
+bordered | Boolean | true | 是否显示下边框 | N
+description | String | - | 下方内容描述 | N
+hover | Boolean | - | 是否开启点击反馈 | N
+image | String | - | 主图 | N
+jump-type | String | navigateTo | 链接跳转类型。可选项:switchTab/reLaunch/redirectTo/navigateTo | N
+left-icon | String / Object | - | 左侧图标,出现在单元格标题的左侧 | N
+note | String | - | 和标题同行的说明文字 | N
+note-style | String / Object | - | 说明文字自定义样式 | N
+required | Boolean | false | 是否显示表单必填星号 | N
+right-icon | String / Object | - | 最右侧图标 | N
+right-icon-style | String / Object | - | 右侧图标自定义样式 | N
+title | String | - | 标题 | N
+title-style | String / Object | - | 标题自定义样式 | N
+url | String | - | 点击后跳转链接地址。如果值为空,则表示不需要跳转 | N
+
+### Cell Events
+
+名称 | 参数 | 描述
+-- | -- | --
+click | `(e: MouseEvent)` | 右侧内容
+
+### Cell Slots
+
+名称 | 描述
+-- | --
+description | 自定义 `description` 显示内容
+image | 自定义 `image` 显示内容
+left-icon | 自定义 `left-icon` 显示内容
+note | 自定义 `note` 显示内容
+right-icon | 自定义 `right-icon` 显示内容
+title | 自定义 `title` 显示内容
+
+### Cell External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-center | 中间(`title`, `description`)内容样式类
+t-class-description | 下方描述内容样式类
+t-class-hover | 悬停样式类
+t-class-image | 图片样式类
+t-class-left | 左侧内容样式类
+t-class-left-icon | 左侧图标样式类
+t-class-note | 右侧说明文字样式类
+t-class-right | 右侧内容样式类
+t-class-right-icon | 右侧图标样式类
+t-class-title | 标题样式类
+
+
+### CellGroup Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+bordered | Boolean | false | 是否显示组边框 | N
+theme | String | default | 单元格组风格。可选项:default/card | N
+title | String | - | 单元格组标题 | N
+
+### CellGroup Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+
+### CellGroup External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-title | 标题样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-cell-group-border-color | @component-stroke | -
+--td-cell-group-title-bg-color | @bg-color-secondarycontainer | -
+--td-cell-group-title-color | @text-color-placeholder | -
+--td-cell-group-title-font-size | 28rpx | -
+--td-cell-group-title-line-height | 90rpx | -
+--td-cell-group-title-padding-left | 32rpx | -
+--td-cell-bg-color | @bg-color-container | -
+--td-cell-border-color | @component-stroke | -
+--td-cell-border-left-space | @cell-horizontal-padding | -
+--td-cell-border-right-space | 0 | -
+--td-cell-border-width | 1px | -
+--td-cell-description-color | @text-color-secondary | -
+--td-cell-description-font | @font-body-medium | -
+--td-cell-height | auto | -
+--td-cell-horizontal-padding | 32rpx | -
+--td-cell-hover-color | @bg-color-secondarycontainer | -
+--td-cell-image-height | 96rpx | -
+--td-cell-image-width | 96rpx | -
+--td-cell-left-icon-color | @brand-color | -
+--td-cell-left-icon-size | 48rpx | -
+--td-cell-note-color | @text-color-placeholder | -
+--td-cell-note-font-size | @font-size-m | -
+--td-cell-required-color | @error-color | -
+--td-cell-required-font-size | @font-size-m | -
+--td-cell-right-icon-color | @text-color-placeholder | -
+--td-cell-right-icon-size | 48rpx | -
+--td-cell-title-color | @text-color-primary | -
+--td-cell-title-font | @font-body-large | -
+--td-cell-vertical-padding | 32rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/cell/cell.css b/uni_modules/tdesign-uniapp/components/cell/cell.css
new file mode 100644
index 0000000..cfa66a0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cell/cell.css
@@ -0,0 +1,94 @@
+.t-cell {
+ position: relative;
+ display: flex;
+ box-sizing: border-box;
+ width: 100%;
+ padding: var(--td-cell-vertical-padding, 32rpx) var(--td-cell-horizontal-padding, 32rpx);
+ height: var(--td-cell-height, auto);
+ background-color: var(--td-cell-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-cell--bordered::after {
+ position: absolute;
+ box-sizing: border-box;
+ content: ' ';
+ pointer-events: none;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ border-bottom: var(--td-cell-border-width, 1px) solid var(--td-cell-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
+ transform: scaleY(0.5);
+ transform-origin: bottom;
+ left: var(--td-cell-border-left-space, var(--td-cell-horizontal-padding, 32rpx));
+ right: var(--td-cell-border-right-space, 0);
+}
+.t-cell__description {
+ font: var(--td-cell-description-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-cell-description-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
+}
+.t-cell__description-text {
+ margin-top: calc(var(--td-spacer, 16rpx) / 2);
+}
+.t-cell__note {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ color: var(--td-cell-note-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ font-size: var(--td-cell-note-font-size, var(--td-font-size-m, 32rpx));
+}
+.t-cell__title {
+ margin-right: var(--td-spacer-2, 32rpx);
+}
+.t-cell__title,
+.t-cell__note {
+ flex: 1 1 auto;
+}
+.t-cell__title:empty,
+.t-cell__note:empty {
+ display: none;
+}
+.t-cell__title-text {
+ display: flex;
+ font: var(--td-cell-title-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-cell-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-cell__left,
+.t-cell__right {
+ align-self: stretch;
+}
+.t-cell__left:not(:empty) {
+ margin-right: var(--td-spacer-1, 24rpx);
+}
+.t-cell__left-icon {
+ color: var(--td-cell-left-icon-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ font-size: var(--td-cell-left-icon-size, 48rpx);
+}
+.t-cell__left-image {
+ height: var(--td-cell-image-height, 96rpx);
+ width: var(--td-cell-image-width, 96rpx);
+}
+.t-cell__note:not(:empty) + .t-cell__right {
+ margin-left: calc(var(--td-spacer, 16rpx) / 2);
+}
+.t-cell__right {
+ display: flex;
+}
+.t-cell__right-icon {
+ color: var(--td-cell-right-icon-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ font-size: var(--td-cell-right-icon-size, 48rpx);
+}
+.t-cell__right--middle {
+ align-items: center;
+}
+.t-cell__right--top {
+ align-items: flex-start;
+}
+.t-cell__right--bottom {
+ align-items: flex-end;
+}
+.t-cell--hover {
+ background-color: var(--td-cell-hover-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+}
+.t-cell--required {
+ font-size: var(--td-cell-required-font-size, var(--td-font-size-m, 32rpx));
+ color: var(--td-cell-required-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
diff --git a/uni_modules/tdesign-uniapp/components/cell/cell.vue b/uni_modules/tdesign-uniapp/components/cell/cell.vue
new file mode 100644
index 0000000..3dc43ff
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cell/cell.vue
@@ -0,0 +1,260 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+ *
+
+
+
+
+
+ {{ description }}
+
+
+
+
+
+
+ {{ note }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/cell/props.ts b/uni_modules/tdesign-uniapp/components/cell/props.ts
new file mode 100644
index 0000000..b137491
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cell/props.ts
@@ -0,0 +1,87 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdCellProps } from './type';
+export default {
+ /** 右侧内容的对齐方式,默认居中对齐 */
+ align: {
+ type: String,
+ default: 'middle' as TdCellProps['align'],
+ validator(val: TdCellProps['align']): boolean {
+ if (!val) return true;
+ return ['top', 'middle', 'bottom'].includes(val);
+ },
+ },
+ /** 是否显示右侧箭头 */
+ arrow: {
+ type: [Boolean, Object],
+ default: false as TdCellProps['arrow'],
+ },
+ /** 是否显示下边框 */
+ bordered: {
+ type: Boolean,
+ default: true,
+ },
+ /** 下方内容描述 */
+ description: {
+ type: String,
+ },
+ /** 是否开启点击反馈 */
+ hover: Boolean,
+ /** 主图 */
+ image: {
+ type: String,
+ },
+ /** 链接跳转类型 */
+ jumpType: {
+ type: String,
+ default: 'navigateTo' as TdCellProps['jumpType'],
+ validator(val: TdCellProps['jumpType']): boolean {
+ if (!val) return true;
+ return ['switchTab', 'reLaunch', 'redirectTo', 'navigateTo'].includes(val);
+ },
+ },
+ /** 左侧图标,出现在单元格标题的左侧 */
+ leftIcon: {
+ type: [String, Object],
+ },
+ /** 和标题同行的说明文字 */
+ note: {
+ type: String,
+ },
+ /** 说明文字自定义样式 */
+ noteStyle: {
+ type: [String, Object],
+ },
+ /** 是否显示表单必填星号 */
+ required: Boolean,
+ /** 最右侧图标 */
+ rightIcon: {
+ type: [String, Object],
+ },
+ /** 右侧图标自定义样式 */
+ rightIconStyle: {
+ type: [String, Object],
+ },
+ /** 标题 */
+ title: {
+ type: String,
+ },
+ /** 标题自定义样式 */
+ titleStyle: {
+ type: [String, Object],
+ },
+ /** 点击后跳转链接地址。如果值为空,则表示不需要跳转 */
+ url: {
+ type: String,
+ default: '',
+ },
+ /** 右侧内容 */
+ onClick: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/cell/type.ts b/uni_modules/tdesign-uniapp/components/cell/type.ts
new file mode 100644
index 0000000..915dab7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/cell/type.ts
@@ -0,0 +1,82 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdCellProps {
+ /**
+ * 右侧内容的对齐方式,默认居中对齐
+ * @default middle
+ */
+ align?: 'top' | 'middle' | 'bottom';
+ /**
+ * 是否显示右侧箭头
+ * @default false
+ */
+ arrow?: boolean | object;
+ /**
+ * 是否显示下边框
+ * @default true
+ */
+ bordered?: boolean;
+ /**
+ * 下方内容描述
+ */
+ description?: string;
+ /**
+ * 是否开启点击反馈
+ */
+ hover?: boolean;
+ /**
+ * 主图
+ */
+ image?: string;
+ /**
+ * 链接跳转类型
+ * @default navigateTo
+ */
+ jumpType?: 'switchTab' | 'reLaunch' | 'redirectTo' | 'navigateTo';
+ /**
+ * 左侧图标,出现在单元格标题的左侧
+ */
+ leftIcon?: string | object;
+ /**
+ * 和标题同行的说明文字
+ */
+ note?: string;
+ /**
+ * 说明文字自定义样式
+ */
+ noteStyle?: string | object;
+ /**
+ * 是否显示表单必填星号
+ * @default false
+ */
+ required?: boolean;
+ /**
+ * 最右侧图标
+ */
+ rightIcon?: string | object;
+ /**
+ * 右侧图标自定义样式
+ */
+ rightIconStyle?: string | object;
+ /**
+ * 标题
+ */
+ title?: string;
+ /**
+ * 标题自定义样式
+ */
+ titleStyle?: string | object;
+ /**
+ * 点击后跳转链接地址。如果值为空,则表示不需要跳转
+ * @default ''
+ */
+ url?: string;
+ /**
+ * 右侧内容
+ */
+ onClick?: (e: MouseEvent) => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/check-tag/check-tag.css b/uni_modules/tdesign-uniapp/components/check-tag/check-tag.css
new file mode 100644
index 0000000..19f29d9
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/check-tag/check-tag.css
@@ -0,0 +1,197 @@
+.t-tag {
+ display: inline-flex;
+ align-items: center;
+ border: 2rpx solid transparent;
+ box-sizing: border-box;
+ border-radius: var(--td-tag-square-border-radius, 8rpx);
+ user-select: none;
+ vertical-align: middle;
+}
+.t-tag__text {
+ word-wrap: normal;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.t-tag__icon {
+ display: flex;
+ align-items: center;
+}
+.t-tag__icon:not(:empty) + .t-tag__text:not(:empty) {
+ margin-left: 8rpx;
+}
+.t-tag--small {
+ padding: var(--td-tag-small-padding, 2rpx 10rpx);
+ font: var(--td-tag-small-font, var(--td-font-body-extraSmall, 20rpx / 32rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-tag--small .t-icon,
+.t-tag--small .t-icon-close {
+ font-size: var(--td-tag-small-icon-size, 24rpx);
+}
+.t-tag--medium {
+ padding: var(--td-tag-medium-padding, 2rpx 14rpx);
+ font: var(--td-tag-medium-font, var(--td-font-body-small, 24rpx / 40rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-tag--medium .t-icon,
+.t-tag--medium .t-icon-close {
+ font-size: var(--td-tag-medium-icon-size, 28rpx);
+}
+.t-tag--large {
+ padding: var(--td-tag-large-padding, 4rpx 14rpx);
+ font: var(--td-tag-large-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-tag--large .t-icon,
+.t-tag--large .t-icon-close {
+ font-size: var(--td-tag-large-icon-size, 32rpx);
+}
+.t-tag--extra-large {
+ padding: var(--td-tag-extra-large-padding, 16rpx 30rpx);
+ font: var(--td-tag-extra-large-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-tag--extra-large .t-icon,
+.t-tag--extra-large .t-icon-close {
+ font-size: var(--td-tag-extra-large-icon-size, 32rpx);
+}
+.t-tag.t-tag--square {
+ border-radius: var(--td-tag-square-border-radius, 8rpx);
+}
+.t-tag.t-tag--round {
+ border-radius: var(--td-tag-round-border-radius, 999px);
+}
+.t-tag.t-tag--mark {
+ border-radius: 0 var(--td-tag-mark-border-radius, var(--td-tag-round-border-radius, 999px)) var(--td-tag-mark-border-radius, var(--td-tag-round-border-radius, 999px)) 0;
+}
+.t-tag--dark.t-tag--default {
+ color: var(--td-text-color-anti, var(--td-font-white-1, #ffffff));
+ border-color: var(--td-tag-default-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ background-color: var(--td-tag-default-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-tag--dark.t-tag--primary {
+ color: var(--td-text-color-anti, var(--td-font-white-1, #ffffff));
+ border-color: var(--td-tag-primary-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ background-color: var(--td-tag-primary-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-tag--dark.t-tag--success {
+ color: var(--td-text-color-anti, var(--td-font-white-1, #ffffff));
+ border-color: var(--td-tag-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+ background-color: var(--td-tag-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+}
+.t-tag--dark.t-tag--warning {
+ color: var(--td-text-color-anti, var(--td-font-white-1, #ffffff));
+ border-color: var(--td-tag-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+ background-color: var(--td-tag-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+}
+.t-tag--dark.t-tag--danger {
+ color: var(--td-text-color-anti, var(--td-font-white-1, #ffffff));
+ border-color: var(--td-tag-danger-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+ background-color: var(--td-tag-danger-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
+.t-tag--dark.t-tag--default {
+ color: var(--td-tag-default-font-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-tag--outline.t-tag--default {
+ color: var(--td-tag-default-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ border-color: var(--td-tag-default-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ background-color: var(--td-tag-default-light-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+}
+.t-tag--outline.t-tag--primary {
+ color: var(--td-tag-primary-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ border-color: var(--td-tag-primary-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ background-color: var(--td-tag-primary-light-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+}
+.t-tag--outline.t-tag--success {
+ color: var(--td-tag-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+ border-color: var(--td-tag-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+ background-color: var(--td-tag-success-light-color, var(--td-success-color-1, #e3f9e9));
+}
+.t-tag--outline.t-tag--warning {
+ color: var(--td-tag-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+ border-color: var(--td-tag-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+ background-color: var(--td-tag-warning-light-color, var(--td-warning-color-1, #fff1e9));
+}
+.t-tag--outline.t-tag--danger {
+ color: var(--td-tag-danger-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+ border-color: var(--td-tag-danger-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+ background-color: var(--td-tag-danger-light-color, var(--td-error-color-1, #fff0ed));
+}
+.t-tag--outline.t-tag--default {
+ color: var(--td-tag-default-font-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-tag--outline.t-tag--default {
+ background-color: var(--td-tag-outline-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-tag--outline.t-tag--primary {
+ background-color: var(--td-tag-outline-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-tag--outline.t-tag--success {
+ background-color: var(--td-tag-outline-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-tag--outline.t-tag--warning {
+ background-color: var(--td-tag-outline-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-tag--outline.t-tag--danger {
+ background-color: var(--td-tag-outline-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-tag--light.t-tag--default {
+ color: var(--td-tag-default-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ border-color: var(--td-tag-default-light-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+ background-color: var(--td-tag-default-light-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+}
+.t-tag--light.t-tag--primary {
+ color: var(--td-tag-primary-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ border-color: var(--td-tag-primary-light-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+ background-color: var(--td-tag-primary-light-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+}
+.t-tag--light.t-tag--success {
+ color: var(--td-tag-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+ border-color: var(--td-tag-success-light-color, var(--td-success-color-1, #e3f9e9));
+ background-color: var(--td-tag-success-light-color, var(--td-success-color-1, #e3f9e9));
+}
+.t-tag--light.t-tag--warning {
+ color: var(--td-tag-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+ border-color: var(--td-tag-warning-light-color, var(--td-warning-color-1, #fff1e9));
+ background-color: var(--td-tag-warning-light-color, var(--td-warning-color-1, #fff1e9));
+}
+.t-tag--light.t-tag--danger {
+ color: var(--td-tag-danger-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+ border-color: var(--td-tag-danger-light-color, var(--td-error-color-1, #fff0ed));
+ background-color: var(--td-tag-danger-light-color, var(--td-error-color-1, #fff0ed));
+}
+.t-tag--light.t-tag--default {
+ color: var(--td-tag-default-font-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-tag--light-outline.t-tag--default {
+ color: var(--td-tag-default-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ border-color: var(--td-tag-default-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ background-color: var(--td-tag-default-light-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+}
+.t-tag--light-outline.t-tag--primary {
+ color: var(--td-tag-primary-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ border-color: var(--td-tag-primary-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ background-color: var(--td-tag-primary-light-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+}
+.t-tag--light-outline.t-tag--success {
+ color: var(--td-tag-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+ border-color: var(--td-tag-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+ background-color: var(--td-tag-success-light-color, var(--td-success-color-1, #e3f9e9));
+}
+.t-tag--light-outline.t-tag--warning {
+ color: var(--td-tag-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+ border-color: var(--td-tag-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+ background-color: var(--td-tag-warning-light-color, var(--td-warning-color-1, #fff1e9));
+}
+.t-tag--light-outline.t-tag--danger {
+ color: var(--td-tag-danger-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+ border-color: var(--td-tag-danger-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+ background-color: var(--td-tag-danger-light-color, var(--td-error-color-1, #fff0ed));
+}
+.t-tag--light-outline.t-tag--default {
+ color: var(--td-tag-default-font-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ border-color: var(--td-component-border, var(--td-gray-color-4, #dcdcdc));
+}
+.t-tag.t-tag--closable.t-tag--disabled {
+ cursor: not-allowed;
+ color: var(--td-tag-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+ background-color: var(--td-tag-disabled-background-color, var(--td-bg-color-component-disabled, var(--td-gray-color-2, #eeeeee)));
+ border-color: var(--td-tag-disabled-border-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+}
diff --git a/uni_modules/tdesign-uniapp/components/check-tag/check-tag.vue b/uni_modules/tdesign-uniapp/components/check-tag/check-tag.vue
new file mode 100644
index 0000000..d6a9844
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/check-tag/check-tag.vue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dataChecked ? content[0] : content[1] }}
+
+
+ {{ content }}
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/check-tag/props.ts b/uni_modules/tdesign-uniapp/components/check-tag/props.ts
new file mode 100644
index 0000000..fa4e78a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/check-tag/props.ts
@@ -0,0 +1,67 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdCheckTagProps } from './type';
+export default {
+ /** 标签选中的状态,默认风格(theme=default)才有选中态 */
+ checked: Boolean,
+ /** 标签选中的状态,默认风格(theme=default)才有选中态,非受控属性 */
+ defaultChecked: Boolean,
+ /** 标签是否可关闭 */
+ closable: Boolean,
+ /** 组件子元素;传入数组时:[选中内容,非选中内容] */
+ content: {
+ type: [String, Number, Array],
+ },
+ /** 标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态 */
+ disabled: Boolean,
+ /** 标签图标 */
+ icon: {
+ type: [String, Object],
+ },
+ /** 标签类型,有三种:方形、圆角方形、标记型 */
+ shape: {
+ type: String,
+ default: 'square' as TdCheckTagProps['shape'],
+ validator(val: TdCheckTagProps['shape']): boolean {
+ if (!val) return true;
+ return ['square', 'round', 'mark'].includes(val);
+ },
+ },
+ /** 标签尺寸 */
+ size: {
+ type: String,
+ default: 'medium' as TdCheckTagProps['size'],
+ validator(val: TdCheckTagProps['size']): boolean {
+ if (!val) return true;
+ return ['small', 'medium', 'large'].includes(val);
+ },
+ },
+ /** 标签风格变体 */
+ variant: {
+ type: String,
+ default: 'dark' as TdCheckTagProps['variant'],
+ validator(val: TdCheckTagProps['variant']): boolean {
+ if (!val) return true;
+ return ['dark', 'light', 'outline', 'light-outline'].includes(val);
+ },
+ },
+ /** 状态切换时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击标签时触发 */
+ onClick: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 如果关闭按钮存在,点击关闭按钮时触发 */
+ onClose: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/check-tag/type.ts b/uni_modules/tdesign-uniapp/components/check-tag/type.ts
new file mode 100644
index 0000000..7fe35c5
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/check-tag/type.ts
@@ -0,0 +1,63 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { SizeEnum } from '../common/common';
+
+export interface TdCheckTagProps {
+ /**
+ * 标签选中的状态,默认风格(theme=default)才有选中态
+ */
+ checked?: boolean;
+ /**
+ * 标签选中的状态,默认风格(theme=default)才有选中态,非受控属性
+ */
+ defaultChecked?: boolean;
+ /**
+ * 标签是否可关闭
+ * @default false
+ */
+ closable?: boolean;
+ /**
+ * 组件子元素;传入数组时:[选中内容,非选中内容]
+ */
+ content?: string | number | string[];
+ /**
+ * 标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态
+ * @default false
+ */
+ disabled?: boolean;
+ /**
+ * 标签图标
+ */
+ icon?: string | object;
+ /**
+ * 标签类型,有三种:方形、圆角方形、标记型
+ * @default square
+ */
+ shape?: 'square' | 'round' | 'mark';
+ /**
+ * 标签尺寸
+ * @default medium
+ */
+ size?: SizeEnum;
+ /**
+ * 标签风格变体
+ * @default dark
+ */
+ variant?: 'dark' | 'light' | 'outline' | 'light-outline';
+ /**
+ * 状态切换时触发
+ */
+ onChange?: (context: { checked: boolean }) => void;
+ /**
+ * 点击标签时触发
+ */
+ onClick?: () => void;
+ /**
+ * 如果关闭按钮存在,点击关闭按钮时触发
+ */
+ onClose?: () => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/checkbox-group/checkbox-group.css b/uni_modules/tdesign-uniapp/components/checkbox-group/checkbox-group.css
new file mode 100644
index 0000000..e69de29
diff --git a/uni_modules/tdesign-uniapp/components/checkbox-group/checkbox-group.vue b/uni_modules/tdesign-uniapp/components/checkbox-group/checkbox-group.vue
new file mode 100644
index 0000000..ce4bffe
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/checkbox-group/checkbox-group.vue
@@ -0,0 +1,261 @@
+
+
+
+ handleInnerChildChange($event, { item, checked })"
+ />
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/checkbox-group/props.ts b/uni_modules/tdesign-uniapp/components/checkbox-group/props.ts
new file mode 100644
index 0000000..18179ae
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/checkbox-group/props.ts
@@ -0,0 +1,58 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdCheckboxGroupProps } from './type';
+export default {
+ /** 是否开启无边框模式。优先级低于 Checkbox.borderless */
+ borderless: Boolean,
+ /** 是否禁用组件。优先级:Form.disabled < CheckboxGroup.disabled < Checkbox.disabled */
+ disabled: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 用来定义 value / label / disabled 在 `options` 中对应的字段别名 */
+ keys: {
+ type: Object,
+ },
+ /** 支持最多选中的数量 */
+ max: {
+ type: Number,
+ default: undefined,
+ },
+ /** 统一设置内部复选框 HTML 属性 */
+ name: {
+ type: String,
+ default: '',
+ },
+ /** 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」 */
+ options: {
+ type: Array,
+ default: (): TdCheckboxGroupProps['options'] => [],
+ },
+ /** 只读状态 */
+ readonly: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** -1 时代表独立,不再寻找 parent,用于头条小程序 */
+ relationKey: {
+ type: String,
+ default: '',
+ },
+ /** 选中值 */
+ value: {
+ type: Array,
+ },
+ /** 选中值,非受控属性 */
+ defaultValue: {
+ type: Array,
+ },
+ /** 值变化时触发。`context` 表示当前点击项内容 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/checkbox-group/type.ts b/uni_modules/tdesign-uniapp/components/checkbox-group/type.ts
new file mode 100644
index 0000000..004c68c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/checkbox-group/type.ts
@@ -0,0 +1,72 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { KeysType } from '../common/common';
+
+export interface TdCheckboxGroupProps {
+ /**
+ * 是否开启无边框模式。优先级低于 Checkbox.borderless
+ * @default false
+ */
+ borderless?: boolean;
+ /**
+ * 是否禁用组件。优先级:Form.disabled < CheckboxGroup.disabled < Checkbox.disabled
+ */
+ disabled?: boolean;
+ /**
+ * 用来定义 value / label / disabled 在 `options` 中对应的字段别名
+ */
+ keys?: KeysType;
+ /**
+ * 支持最多选中的数量
+ */
+ max?: number;
+ /**
+ * 统一设置内部复选框 HTML 属性
+ * @default ''
+ */
+ name?: string;
+ /**
+ * 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」
+ * @default []
+ */
+ options?: Array;
+ /**
+ * 只读状态
+ */
+ readonly?: boolean;
+ /**
+ * -1 时代表独立,不再寻找 parent,用于头条小程序
+ * @default ''
+ */
+ relationKey?: string;
+ /**
+ * 选中值
+ */
+ value?: T;
+ /**
+ * 选中值,非受控属性
+ */
+ defaultValue?: T;
+ /**
+ * 值变化时触发。`context` 表示当前点击项内容
+ */
+ onChange?: (context: {
+ value: CheckboxGroupValue;
+ context: { value: boolean | number | string; label: boolean | number | string };
+ }) => void;
+}
+
+export type CheckboxOption = string | number | CheckboxOptionObj;
+
+export interface CheckboxOptionObj {
+ label?: string;
+ value?: string | number;
+ disabled?: boolean;
+ checkAll?: true;
+}
+
+export type CheckboxGroupValue = Array;
diff --git a/uni_modules/tdesign-uniapp/components/checkbox/README.en-US.md b/uni_modules/tdesign-uniapp/components/checkbox/README.en-US.md
new file mode 100644
index 0000000..40ae09b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/checkbox/README.en-US.md
@@ -0,0 +1,103 @@
+:: BASE_DOC ::
+
+## API
+
+### Checkbox Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+block | Boolean | true | \- | N
+borderless | Boolean | undefined | \- | N
+check-all | Boolean | false | \- | N
+checked | Boolean | - | `v-model:checked` is supported | N
+default-checked | Boolean | - | uncontrolled property | N
+content | String | - | \- | N
+content-disabled | Boolean | - | \- | N
+disabled | Boolean | undefined | \- | N
+icon | String / Array | 'circle' | Typescript:`'circle' \| 'line' \| 'rectangle' \| string[]` | N
+indeterminate | Boolean | false | \- | N
+label | String | - | \- | N
+max-content-row | Number | 5 | \- | N
+max-label-row | Number | 3 | \- | N
+name | String | - | \- | N
+placement | String | left | options: left/right | N
+readonly | Boolean | undefined | \- | N
+relation-key | String | - | \- | N
+value | String / Number / Boolean | - | value of checkbox。Typescript:`string \| number \| boolean` | N
+
+### Checkbox Events
+
+name | params | description
+-- | -- | --
+change | `(context: { checked: boolean, context: { value: boolean\|number\|string, label: boolean\|number\|string }})` | \-
+
+### Checkbox Slots
+
+name | Description
+-- | --
+\- | \-
+content | \-
+label | \-
+
+### Checkbox External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-border | \-
+t-class-content | \-
+t-class-icon | \-
+t-class-label | \-
+
+
+### CheckboxGroup Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+borderless | Boolean | false | \- | N
+disabled | Boolean | undefined | \- | N
+keys | Object | - | Typescript:`KeysType`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+max | Number | undefined | \- | N
+name | String | - | \- | N
+options | Array | [] | Typescript:`Array` `type CheckboxOption = string \| number \| CheckboxOptionObj` `interface CheckboxOptionObj { label?: string; value?: string \| number; disabled?: boolean; checkAll?: true }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/checkbox-group/type.ts) | N
+readonly | Boolean | undefined | \- | N
+relation-key | String | - | \- | N
+value | Array | - | `v-model:value` is supported。Typescript:`T` `type CheckboxGroupValue = Array`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/checkbox-group/type.ts) | N
+default-value | Array | - | uncontrolled property。Typescript:`T` `type CheckboxGroupValue = Array`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/checkbox-group/type.ts) | N
+
+### CheckboxGroup Events
+
+name | params | description
+-- | -- | --
+change | `(context: { value: CheckboxGroupValue, context: { value: boolean\|number\|string, label: boolean\|number\|string }})` | \-
+
+### CheckboxGroup Slots
+
+name | Description
+-- | --
+\- | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-checkbox-bg-color | @bg-color-container | -
+--td-checkbox-border-color | @component-stroke | -
+--td-checkbox-description-color | @text-color-secondary | -
+--td-checkbox-description-disabled-color | @text-color-disabled | -
+--td-checkbox-description-font | @font-body-medium | -
+--td-checkbox-icon-checked-color | @brand-color | -
+--td-checkbox-icon-color | @component-border | -
+--td-checkbox-icon-disabled-bg-color | @bg-color-component-disabled | -
+--td-checkbox-icon-disabled-color | @brand-color-disabled | -
+--td-checkbox-icon-size | 48rpx | -
+--td-checkbox-tag-active-bg-color | @brand-color-light | -
+--td-checkbox-tag-active-color | @brand-color | -
+--td-checkbox-title-color | @text-color-primary | -
+--td-checkbox-title-disabled-color | @text-color-disabled | -
+--td-checkbox-title-font | @font-body-large | -
+--td-checkbox-title-line-height | 48rpx | -
+--td-checkbox-vertical-padding | @spacer-2 | -
diff --git a/uni_modules/tdesign-uniapp/components/checkbox/README.md b/uni_modules/tdesign-uniapp/components/checkbox/README.md
new file mode 100644
index 0000000..f43a1fc
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/checkbox/README.md
@@ -0,0 +1,158 @@
+---
+title: Checkbox 多选框
+description: 用于预设的一组选项中执行多项选择,并呈现选择结果。
+spline: form
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TCheckbox from '@tdesign/uniapp/checkbox/checkbox.vue';
+import TCheckboxGroup from '@tdesign/uniapp/checkbox-group/checkbox-group.vue';
+```
+
+### 组件类型
+
+纵向多选框
+
+{{ base }}
+
+横向多选框
+
+{{ horizontal }}
+
+带全选多选框
+
+{{ all }}
+
+### 组件状态
+
+多选框状态
+
+{{ status }}
+
+### 组件样式
+
+勾选样式
+
+{{ type }}
+
+勾选显示位置
+
+{{ right }}
+
+非通栏多选样式
+
+{{ card }}
+
+### 组件规格
+
+多选框尺寸规格
+
+{{ special }}
+
+## API
+
+### Checkbox Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+block | Boolean | true | 是否为块级元素 | N
+borderless | Boolean | undefined | 是否开启无边框模式 | N
+check-all | Boolean | false | 用于标识是否为「全选选项」。单独使用无效,需在 CheckboxGroup 中使用 | N
+checked | Boolean | - | 是否选中。支持语法糖 `v-model:checked` | N
+default-checked | Boolean | - | 是否选中。非受控属性 | N
+content | String | - | 多选框内容 | N
+content-disabled | Boolean | - | 是否禁用组件内容(content)触发选中 | N
+disabled | Boolean | undefined | 是否禁用组件。如果父组件存在 CheckboxGroup,默认值由 CheckboxGroup.disabled 控制。优先级:Checkbox.disabled > CheckboxGroup.disabled > Form.disabled | N
+icon | String / Array | 'circle' | 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标,半选中态图标]`。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标。TS 类型:`'circle' \| 'line' \| 'rectangle' \| string[]` | N
+indeterminate | Boolean | false | 是否为半选 | N
+label | String | - | 主文案 | N
+max-content-row | Number | 5 | 内容最大行数限制 | N
+max-label-row | Number | 3 | 主文案最大行数限制 | N
+name | String | - | HTML 元素原生属性 | N
+placement | String | left | 多选框和内容相对位置。可选项:left/right | N
+readonly | Boolean | undefined | 只读状态 | N
+relation-key | String | - | -1 时代表独立,不再寻找 parent,用于头条小程序 | N
+value | String / Number / Boolean | - | 多选框的值。TS 类型:`string \| number \| boolean` | N
+
+### Checkbox Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { checked: boolean, context: { value: boolean\|number\|string, label: boolean\|number\|string }})` | 值变化时触发。`context` 表示当前点击项内容
+
+### Checkbox Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,主文案
+content | 自定义 `content` 显示内容
+label | 自定义 `label` 显示内容
+
+### Checkbox External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-border | 边框样式类
+t-class-content | 内容样式类
+t-class-icon | 图标样式类
+t-class-label | 标签样式类
+
+
+### CheckboxGroup Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+borderless | Boolean | false | 是否开启无边框模式。优先级低于 Checkbox.borderless | N
+disabled | Boolean | undefined | 是否禁用组件。优先级:Form.disabled < CheckboxGroup.disabled < Checkbox.disabled | N
+keys | Object | - | 用来定义 value / label / disabled 在 `options` 中对应的字段别名。TS 类型:`KeysType`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+max | Number | undefined | 支持最多选中的数量 | N
+name | String | - | 统一设置内部复选框 HTML 属性 | N
+options | Array | [] | 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」。TS 类型:`Array` `type CheckboxOption = string \| number \| CheckboxOptionObj` `interface CheckboxOptionObj { label?: string; value?: string \| number; disabled?: boolean; checkAll?: true }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/checkbox-group/type.ts) | N
+readonly | Boolean | undefined | 只读状态 | N
+relation-key | String | - | -1 时代表独立,不再寻找 parent,用于头条小程序 | N
+value | Array | - | 选中值。支持语法糖 `v-model:value`。TS 类型:`T` `type CheckboxGroupValue = Array`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/checkbox-group/type.ts) | N
+default-value | Array | - | 选中值。非受控属性。TS 类型:`T` `type CheckboxGroupValue = Array`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/checkbox-group/type.ts) | N
+
+### CheckboxGroup Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { value: CheckboxGroupValue, context: { value: boolean\|number\|string, label: boolean\|number\|string }})` | 值变化时触发。`context` 表示当前点击项内容
+
+### CheckboxGroup Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,多选框组内容
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-checkbox-bg-color | @bg-color-container | -
+--td-checkbox-border-color | @component-stroke | -
+--td-checkbox-description-color | @text-color-secondary | -
+--td-checkbox-description-disabled-color | @text-color-disabled | -
+--td-checkbox-description-font | @font-body-medium | -
+--td-checkbox-icon-checked-color | @brand-color | -
+--td-checkbox-icon-color | @component-border | -
+--td-checkbox-icon-disabled-bg-color | @bg-color-component-disabled | -
+--td-checkbox-icon-disabled-color | @brand-color-disabled | -
+--td-checkbox-icon-size | 48rpx | -
+--td-checkbox-tag-active-bg-color | @brand-color-light | -
+--td-checkbox-tag-active-color | @brand-color | -
+--td-checkbox-title-color | @text-color-primary | -
+--td-checkbox-title-disabled-color | @text-color-disabled | -
+--td-checkbox-title-font | @font-body-large | -
+--td-checkbox-title-line-height | 48rpx | -
+--td-checkbox-vertical-padding | @spacer-2 | -
diff --git a/uni_modules/tdesign-uniapp/components/checkbox/checkbox.css b/uni_modules/tdesign-uniapp/components/checkbox/checkbox.css
new file mode 100644
index 0000000..1b8ebe3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/checkbox/checkbox.css
@@ -0,0 +1,174 @@
+.t-checkbox {
+ display: inline-flex;
+ vertical-align: middle;
+ position: relative;
+ background: var(--td-checkbox-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-checkbox:focus {
+ outline: 0;
+}
+.t-checkbox--block {
+ display: flex;
+ padding: var(--td-checkbox-vertical-padding, var(--td-spacer-2, 32rpx));
+}
+.t-checkbox--right {
+ flex-direction: row-reverse;
+}
+.t-checkbox .limit-title-row {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+}
+.t-checkbox .image-center {
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+}
+.t-checkbox__icon-left {
+ margin-right: 20rpx;
+ width: 40rpx;
+}
+.t-checkbox__icon-right {
+ right: 0px;
+ display: contents;
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+}
+.t-checkbox__icon-image {
+ width: var(--td-checkbox-icon-size, 48rpx);
+ height: var(--td-checkbox-icon-size, 48rpx);
+ vertical-align: top;
+}
+.t-checkbox__icon {
+ position: relative;
+ display: block;
+ width: var(--td-checkbox-icon-size, 48rpx);
+ height: var(--td-checkbox-icon-size, 48rpx);
+ color: var(--td-checkbox-icon-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+ font-size: var(--td-checkbox-icon-size, 48rpx);
+ margin-top: calc((var(--td-checkbox-title-line-height, 48rpx) - var(--td-checkbox-icon-size, 48rpx)) / 2);
+}
+.t-checkbox__icon:empty {
+ display: none;
+}
+.t-checkbox__icon--checked {
+ color: var(--td-checkbox-icon-checked-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-checkbox__icon--disabled {
+ cursor: not-allowed;
+ color: var(--td-checkbox-icon-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-checkbox__icon--left {
+ margin-right: 16rpx;
+}
+.t-checkbox__icon-circle {
+ width: calc((var(--td-checkbox-icon-size, 48rpx) - 4rpx) * 2);
+ height: calc((var(--td-checkbox-icon-size, 48rpx) - 4rpx) * 2);
+ border: calc(4rpx * 2) solid var(--td-checkbox-icon-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+ border-radius: 50%;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%) scale(0.5);
+ box-sizing: border-box;
+}
+.t-checkbox__icon-circle--disabled {
+ background: var(--td-checkbox-icon-disabled-bg-color, var(--td-bg-color-component-disabled, var(--td-gray-color-2, #eeeeee)));
+}
+.t-checkbox__icon-rectangle {
+ width: calc((var(--td-checkbox-icon-size, 48rpx) - 4rpx * 2) * 2);
+ height: calc((var(--td-checkbox-icon-size, 48rpx) - 4rpx * 2) * 2);
+ border: calc(4rpx * 2) solid var(--td-checkbox-icon-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%) scale(0.5);
+ box-sizing: border-box;
+}
+.t-checkbox__icon-rectangle--disabled {
+ background: var(--td-checkbox-icon-disabled-bg-color, var(--td-bg-color-component-disabled, var(--td-gray-color-2, #eeeeee)));
+}
+.t-checkbox__icon-line::before,
+.t-checkbox__icon-line::after {
+ content: '';
+ display: block;
+ position: absolute;
+ width: 5rpx;
+ border-radius: 2rpx;
+ background: var(--td-checkbox-icon-checked-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ transform-origin: top center;
+}
+.t-checkbox__icon-line::before {
+ height: 16rpx;
+ left: 8rpx;
+ top: 22rpx;
+ transform: rotate(-45deg);
+}
+.t-checkbox__icon-line::after {
+ height: 26rpx;
+ right: 8rpx;
+ top: 14rpx;
+ transform: rotate(45deg);
+}
+.t-checkbox__icon-line--disabled::before,
+.t-checkbox__icon-line--disabled::after {
+ background: var(--td-checkbox-icon-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-checkbox__content {
+ flex: 1;
+}
+.t-checkbox__title {
+ color: var(--td-checkbox-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font: var(--td-checkbox-title-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ line-height: var(--td-checkbox-title-line-height, 48rpx);
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+}
+.t-checkbox__title--disabled {
+ color: var(--td-checkbox-title-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-checkbox__description {
+ color: var(--td-checkbox-description-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ font: var(--td-checkbox-description-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-checkbox__description--disabled {
+ color: var(--td-checkbox-description-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-checkbox__title + .t-checkbox__description:not(:empty) {
+ margin-top: 8rpx;
+}
+.t-checkbox__border {
+ position: absolute;
+ bottom: 0;
+ left: 96rpx;
+ right: 0;
+ height: 1px;
+ background: var(--td-checkbox-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
+ transform: scaleY(0.5);
+}
+.t-checkbox__border--right {
+ left: 32rpx;
+}
+.t-checkbox--tag {
+ font-size: 28rpx;
+ padding-top: 16rpx;
+ padding-bottom: 16rpx;
+ text-align: center;
+ background-color: var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3));
+ border-radius: 12rpx;
+}
+.t-checkbox--tag.t-checkbox--checked {
+ color: var(--td-checkbox-tag-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ background-color: var(--td-checkbox-tag-active-bg-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+}
+.t-checkbox--tag .t-checkbox__title--checked {
+ color: var(--td-checkbox-tag-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-checkbox--tag .t-checkbox__content {
+ margin-right: 0;
+}
diff --git a/uni_modules/tdesign-uniapp/components/checkbox/checkbox.vue b/uni_modules/tdesign-uniapp/components/checkbox/checkbox.vue
new file mode 100644
index 0000000..0f08ebb
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/checkbox/checkbox.vue
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+ {{ content }}
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/checkbox/props.ts b/uni_modules/tdesign-uniapp/components/checkbox/props.ts
new file mode 100644
index 0000000..34410cd
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/checkbox/props.ts
@@ -0,0 +1,90 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdCheckboxProps } from './type';
+export default {
+ /** 是否为块级元素 */
+ block: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否开启无边框模式 */
+ borderless: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 用于标识是否为「全选选项」。单独使用无效,需在 CheckboxGroup 中使用 */
+ checkAll: Boolean,
+ /** 是否选中 */
+ checked: Boolean,
+ /** 是否选中,非受控属性 */
+ defaultChecked: Boolean,
+ /** 多选框内容 */
+ content: {
+ type: String,
+ },
+ /** 是否禁用组件内容(content)触发选中 */
+ contentDisabled: Boolean,
+ /** 是否禁用组件。如果父组件存在 CheckboxGroup,默认值由 CheckboxGroup.disabled 控制。优先级:Checkbox.disabled > CheckboxGroup.disabled > Form.disabled */
+ disabled: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标,半选中态图标]`。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标 */
+ icon: {
+ type: [String, Array],
+ default: 'circle' as TdCheckboxProps['icon'],
+ },
+ /** 是否为半选 */
+ indeterminate: Boolean,
+ /** 主文案 */
+ label: {
+ type: String,
+ },
+ /** 内容最大行数限制 */
+ maxContentRow: {
+ type: Number,
+ default: 5,
+ },
+ /** 主文案最大行数限制 */
+ maxLabelRow: {
+ type: Number,
+ default: 3,
+ },
+ /** HTML 元素原生属性 */
+ name: {
+ type: String,
+ default: '',
+ },
+ /** 多选框和内容相对位置 */
+ placement: {
+ type: String,
+ default: 'left' as TdCheckboxProps['placement'],
+ validator(val: TdCheckboxProps['placement']): boolean {
+ if (!val) return true;
+ return ['left', 'right'].includes(val);
+ },
+ },
+ /** 只读状态 */
+ readonly: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** -1 时代表独立,不再寻找 parent,用于头条小程序 */
+ relationKey: {
+ type: String,
+ default: '',
+ },
+ /** 多选框的值 */
+ value: {
+ type: [String, Number, Boolean],
+ },
+ /** 值变化时触发。`context` 表示当前点击项内容 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/checkbox/type.ts b/uni_modules/tdesign-uniapp/components/checkbox/type.ts
new file mode 100644
index 0000000..d5b9659
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/checkbox/type.ts
@@ -0,0 +1,96 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdCheckboxProps {
+ /**
+ * 是否为块级元素
+ * @default true
+ */
+ block?: boolean;
+ /**
+ * 是否开启无边框模式
+ */
+ borderless?: boolean;
+ /**
+ * 用于标识是否为「全选选项」。单独使用无效,需在 CheckboxGroup 中使用
+ * @default false
+ */
+ checkAll?: boolean;
+ /**
+ * 是否选中
+ */
+ checked?: boolean;
+ /**
+ * 是否选中,非受控属性
+ */
+ defaultChecked?: boolean;
+ /**
+ * 多选框内容
+ */
+ content?: string;
+ /**
+ * 是否禁用组件内容(content)触发选中
+ */
+ contentDisabled?: boolean;
+ /**
+ * 是否禁用组件。如果父组件存在 CheckboxGroup,默认值由 CheckboxGroup.disabled 控制。优先级:Checkbox.disabled > CheckboxGroup.disabled > Form.disabled
+ */
+ disabled?: boolean;
+ /**
+ * 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标,半选中态图标]`。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标
+ * @default 'circle'
+ */
+ icon?: 'circle' | 'line' | 'rectangle' | string[];
+ /**
+ * 是否为半选
+ * @default false
+ */
+ indeterminate?: boolean;
+ /**
+ * 主文案
+ */
+ label?: string;
+ /**
+ * 内容最大行数限制
+ * @default 5
+ */
+ maxContentRow?: number;
+ /**
+ * 主文案最大行数限制
+ * @default 3
+ */
+ maxLabelRow?: number;
+ /**
+ * HTML 元素原生属性
+ * @default ''
+ */
+ name?: string;
+ /**
+ * 多选框和内容相对位置
+ * @default left
+ */
+ placement?: 'left' | 'right';
+ /**
+ * 只读状态
+ */
+ readonly?: boolean;
+ /**
+ * -1 时代表独立,不再寻找 parent,用于头条小程序
+ * @default ''
+ */
+ relationKey?: string;
+ /**
+ * 多选框的值
+ */
+ value?: string | number | boolean;
+ /**
+ * 值变化时触发。`context` 表示当前点击项内容
+ */
+ onChange?: (context: {
+ checked: boolean;
+ context: { value: boolean | number | string; label: boolean | number | string };
+ }) => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/col/README.en-US.md b/uni_modules/tdesign-uniapp/components/col/README.en-US.md
new file mode 100644
index 0000000..2fd9278
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/col/README.en-US.md
@@ -0,0 +1,31 @@
+:: BASE_DOC ::
+
+## API
+
+### Col Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+offset | String / Number | - | \- | N
+span | String / Number | - | \- | N
+
+### Col Slots
+
+name | Description
+-- | --
+\- | \-
+
+
+### Row Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+gutter | String / Number | - | \- | N
+
+### Row Slots
+
+name | Description
+-- | --
+\- | \-
diff --git a/uni_modules/tdesign-uniapp/components/col/README.md b/uni_modules/tdesign-uniapp/components/col/README.md
new file mode 100644
index 0000000..eb6dd93
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/col/README.md
@@ -0,0 +1,60 @@
+---
+title: Layout 布局
+description: 以规则的网格阵列来指导和规范页面中的版面布局以及信息分布,提高界面内布局的一致性,节约成本。
+spline: base
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+
+```js
+import TRow from '@tdesign/uniapp/row/row.vue';
+import TCol from '@tdesign/uniapp/col/col.vue';
+```
+
+### 组件类型
+
+基础
+
+{{ base }}
+
+
+增加间距
+
+{{ offset }}
+
+
+
+## API
+
+### Col Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+offset | String / Number | - | 列的偏移量(默认单位px) | N
+span | String / Number | - | 列的宽度(默认单位px) | N
+
+### Col Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,列内容
+
+
+### Row Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+gutter | String / Number | - | 列之间的间距(默认单位px) | N
+
+### Row Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,行内容
diff --git a/uni_modules/tdesign-uniapp/components/col/col.css b/uni_modules/tdesign-uniapp/components/col/col.css
new file mode 100644
index 0000000..1eb610c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/col/col.css
@@ -0,0 +1,149 @@
+.t-col {
+ display: block;
+ box-sizing: border-box;
+ min-height: 1px;
+}
+.t-col--1 {
+ width: 4.16666667%;
+}
+.t-col--offset-1 {
+ margin-left: 4.16666667%;
+}
+.t-col--2 {
+ width: 8.33333333%;
+}
+.t-col--offset-2 {
+ margin-left: 8.33333333%;
+}
+.t-col--3 {
+ width: 12.5%;
+}
+.t-col--offset-3 {
+ margin-left: 12.5%;
+}
+.t-col--4 {
+ width: 16.66666667%;
+}
+.t-col--offset-4 {
+ margin-left: 16.66666667%;
+}
+.t-col--5 {
+ width: 20.83333333%;
+}
+.t-col--offset-5 {
+ margin-left: 20.83333333%;
+}
+.t-col--6 {
+ width: 25%;
+}
+.t-col--offset-6 {
+ margin-left: 25%;
+}
+.t-col--7 {
+ width: 29.16666667%;
+}
+.t-col--offset-7 {
+ margin-left: 29.16666667%;
+}
+.t-col--8 {
+ width: 33.33333333%;
+}
+.t-col--offset-8 {
+ margin-left: 33.33333333%;
+}
+.t-col--9 {
+ width: 37.5%;
+}
+.t-col--offset-9 {
+ margin-left: 37.5%;
+}
+.t-col--10 {
+ width: 41.66666667%;
+}
+.t-col--offset-10 {
+ margin-left: 41.66666667%;
+}
+.t-col--11 {
+ width: 45.83333333%;
+}
+.t-col--offset-11 {
+ margin-left: 45.83333333%;
+}
+.t-col--12 {
+ width: 50%;
+}
+.t-col--offset-12 {
+ margin-left: 50%;
+}
+.t-col--13 {
+ width: 54.16666667%;
+}
+.t-col--offset-13 {
+ margin-left: 54.16666667%;
+}
+.t-col--14 {
+ width: 58.33333333%;
+}
+.t-col--offset-14 {
+ margin-left: 58.33333333%;
+}
+.t-col--15 {
+ width: 62.5%;
+}
+.t-col--offset-15 {
+ margin-left: 62.5%;
+}
+.t-col--16 {
+ width: 66.66666667%;
+}
+.t-col--offset-16 {
+ margin-left: 66.66666667%;
+}
+.t-col--17 {
+ width: 70.83333333%;
+}
+.t-col--offset-17 {
+ margin-left: 70.83333333%;
+}
+.t-col--18 {
+ width: 75%;
+}
+.t-col--offset-18 {
+ margin-left: 75%;
+}
+.t-col--19 {
+ width: 79.16666667%;
+}
+.t-col--offset-19 {
+ margin-left: 79.16666667%;
+}
+.t-col--20 {
+ width: 83.33333333%;
+}
+.t-col--offset-20 {
+ margin-left: 83.33333333%;
+}
+.t-col--21 {
+ width: 87.5%;
+}
+.t-col--offset-21 {
+ margin-left: 87.5%;
+}
+.t-col--22 {
+ width: 91.66666667%;
+}
+.t-col--offset-22 {
+ margin-left: 91.66666667%;
+}
+.t-col--23 {
+ width: 95.83333333%;
+}
+.t-col--offset-23 {
+ margin-left: 95.83333333%;
+}
+.t-col--24 {
+ width: 100%;
+}
+.t-col--offset-24 {
+ margin-left: 100%;
+}
diff --git a/uni_modules/tdesign-uniapp/components/col/col.vue b/uni_modules/tdesign-uniapp/components/col/col.vue
new file mode 100644
index 0000000..d7ba015
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/col/col.vue
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/col/computed.js b/uni_modules/tdesign-uniapp/components/col/computed.js
new file mode 100644
index 0000000..1aa29e8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/col/computed.js
@@ -0,0 +1,14 @@
+import utils from '../common/utils.wxs';
+
+export function getColStyles(gutter, customStyle) {
+ let _style = '';
+ if (gutter) {
+ _style = utils._style({
+ 'padding-right': utils.addUnit(gutter / 2),
+ 'padding-left': utils.addUnit(gutter / 2),
+ });
+ }
+
+ return utils._style([customStyle]) + _style;
+}
+
diff --git a/uni_modules/tdesign-uniapp/components/col/props.ts b/uni_modules/tdesign-uniapp/components/col/props.ts
new file mode 100644
index 0000000..eacc90d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/col/props.ts
@@ -0,0 +1,16 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export default {
+ /** 列的偏移量(默认单位px) */
+ offset: {
+ type: [String, Number],
+ },
+ /** 列的宽度(默认单位px) */
+ span: {
+ type: [String, Number],
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/col/type.ts b/uni_modules/tdesign-uniapp/components/col/type.ts
new file mode 100644
index 0000000..b8f348f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/col/type.ts
@@ -0,0 +1,16 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdColProps {
+ /**
+ * 列的偏移量(默认单位px)
+ */
+ offset?: string | number;
+ /**
+ * 列的宽度(默认单位px)
+ */
+ span?: string | number;
+}
diff --git a/uni_modules/tdesign-uniapp/components/collapse-panel/collapse-panel.css b/uni_modules/tdesign-uniapp/components/collapse-panel/collapse-panel.css
new file mode 100644
index 0000000..9bdd3cc
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/collapse-panel/collapse-panel.css
@@ -0,0 +1,154 @@
+.t-collapse-panel {
+ background-color: var(--td-collapse-panel-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-collapse-panel--disabled {
+ pointer-events: none;
+}
+.t-collapse-panel--disabled .t-collapse-panel__content,
+.t-collapse-panel--disabled .t-collapse-panel__header {
+ opacity: 0.3;
+}
+.t-collapse-panel--top {
+ display: flex;
+ flex-direction: column-reverse;
+}
+.t-collapse-panel__header {
+ position: relative;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-left: var(--td-collapse-horizontal-padding, 32rpx);
+ height: var(--td-collapse-header-height, auto);
+}
+.t-collapse-panel__header--top {
+ position: relative;
+}
+.t-collapse-panel__header--top::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: 0;
+ bottom: unset;
+ left: unset;
+ right: unset;
+ background-color: var(--td-collapse-border-color, var(--td-border-level-1-color, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-collapse-panel__header--top::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-collapse-panel__header--bottom {
+ position: relative;
+}
+.t-collapse-panel__header--bottom::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: unset;
+ bottom: 0;
+ left: unset;
+ right: unset;
+ background-color: var(--td-collapse-border-color, var(--td-border-level-1-color, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-collapse-panel__header--bottom::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-collapse-panel__header::after {
+ left: var(--td-spacer-2, 32rpx);
+}
+.t-collapse-panel__extra {
+ font: var(--td-collapse-extra-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-collapse-panel__body {
+ position: relative;
+}
+.t-collapse-panel__body::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: unset;
+ bottom: 0;
+ left: unset;
+ right: unset;
+ background-color: var(--td-collapse-border-color, var(--td-border-level-1-color, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-collapse-panel__body::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-collapse-panel__wrapper {
+ height: 0;
+ overflow: hidden;
+}
+.t-collapse-panel__content {
+ color: var(--td-collapse-content-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font: var(--td-collapse-content-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ padding: var(--td-collapse-content-padding, 32rpx);
+}
+.t-collapse-panel__content--disabled {
+ color: var(--td-collapse-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-collapse-panel__content--expanded.t-collapse-panel__content--bottom {
+ position: relative;
+}
+.t-collapse-panel__content--expanded.t-collapse-panel__content--bottom::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: unset;
+ bottom: 0;
+ left: unset;
+ right: unset;
+ background-color: var(--td-collapse-border-color, var(--td-border-level-1-color, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-collapse-panel__content--expanded.t-collapse-panel__content--bottom::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-collapse-panel__content--expanded.t-collapse-panel__content--top {
+ position: relative;
+}
+.t-collapse-panel__content--expanded.t-collapse-panel__content--top::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: 0;
+ bottom: unset;
+ left: unset;
+ right: unset;
+ background-color: var(--td-collapse-border-color, var(--td-border-level-1-color, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-collapse-panel__content--expanded.t-collapse-panel__content--top::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-collapse-panel__arrow--top {
+ transform: rotate(180deg);
+}
+.class-title {
+ font: var(--td-collapse-title-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-collapse-header-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.class-left-icon {
+ color: var(--td-collapse-left-icon-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.class-right-icon {
+ color: var(--td-collapse-icon-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+}
+.class-title--disabled,
+.class-note--disabled,
+.class-left-icon--disabled,
+.class-right-icon--disabled {
+ color: var(--td-collapse-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
diff --git a/uni_modules/tdesign-uniapp/components/collapse-panel/collapse-panel.vue b/uni_modules/tdesign-uniapp/components/collapse-panel/collapse-panel.vue
new file mode 100644
index 0000000..27eaef7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/collapse-panel/collapse-panel.vue
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ content }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/collapse-panel/props.ts b/uni_modules/tdesign-uniapp/components/collapse-panel/props.ts
new file mode 100644
index 0000000..fc62766
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/collapse-panel/props.ts
@@ -0,0 +1,48 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdCollapsePanelProps } from './type';
+export default {
+ /** 折叠面板内容 */
+ content: {
+ type: String,
+ },
+ /** 禁止当前面板展开,优先级大于 Collapse 的同名属性 */
+ disabled: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 当前折叠面板展开图标,优先级大于 Collapse 的同名属性 */
+ expandIcon: {
+ type: Boolean,
+ default: undefined as TdCollapsePanelProps['expandIcon'],
+ },
+ /** 面板头内容 */
+ header: {
+ type: String,
+ },
+ /** 面板头左侧图标 */
+ headerLeftIcon: {
+ type: String,
+ },
+ /** 面板头的右侧区域,一般用于呈现面板操作 */
+ headerRightContent: {
+ type: String,
+ },
+ /** 选项卡内容的位置 */
+ placement: {
+ type: String,
+ default: 'bottom' as TdCollapsePanelProps['placement'],
+ validator(val: TdCollapsePanelProps['placement']): boolean {
+ if (!val) return true;
+ return ['bottom', 'top'].includes(val);
+ },
+ },
+ /** 当前面板唯一标识,如果值为空则取当前面下标兜底作为唯一标识 */
+ value: {
+ type: [String, Number],
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/collapse-panel/type.ts b/uni_modules/tdesign-uniapp/components/collapse-panel/type.ts
new file mode 100644
index 0000000..636ea81
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/collapse-panel/type.ts
@@ -0,0 +1,41 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdCollapsePanelProps {
+ /**
+ * 折叠面板内容
+ */
+ content?: string;
+ /**
+ * 禁止当前面板展开,优先级大于 Collapse 的同名属性
+ */
+ disabled?: boolean;
+ /**
+ * 当前折叠面板展开图标,优先级大于 Collapse 的同名属性
+ */
+ expandIcon?: boolean;
+ /**
+ * 面板头内容
+ */
+ header?: string;
+ /**
+ * 面板头左侧图标
+ */
+ headerLeftIcon?: string;
+ /**
+ * 面板头的右侧区域,一般用于呈现面板操作
+ */
+ headerRightContent?: string;
+ /**
+ * 选项卡内容的位置
+ * @default bottom
+ */
+ placement?: 'bottom' | 'top';
+ /**
+ * 当前面板唯一标识,如果值为空则取当前面下标兜底作为唯一标识
+ */
+ value?: string | number;
+}
diff --git a/uni_modules/tdesign-uniapp/components/collapse/README.en-US.md b/uni_modules/tdesign-uniapp/components/collapse/README.en-US.md
new file mode 100644
index 0000000..a43fefc
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/collapse/README.en-US.md
@@ -0,0 +1,82 @@
+:: BASE_DOC ::
+
+## API
+
+### Collapse Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+default-expand-all | Boolean | false | \- | N
+disabled | Boolean | - | \- | N
+expand-icon | Boolean | true | \- | N
+expand-mutex | Boolean | false | \- | N
+theme | String | default | options: default/card | N
+value | Array | - | `v-model:value` is supported。Typescript:`CollapseValue` `type CollapseValue = Array`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/collapse/type.ts) | N
+default-value | Array | - | uncontrolled property。Typescript:`CollapseValue` `type CollapseValue = Array`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/collapse/type.ts) | N
+
+### Collapse Events
+
+name | params | description
+-- | -- | --
+change | `(context: { value: CollapseValue, context: { e: MouseEvent }})` | \-
+
+### Collapse Slots
+
+name | Description
+-- | --
+\- | \-
+
+
+### CollapsePanel Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+content | String | - | \- | N
+disabled | Boolean | undefined | \- | N
+expand-icon | Boolean | undefined | \- | N
+header | String | - | \- | N
+header-left-icon | String | - | \- | N
+header-right-content | String | - | \- | N
+placement | String | bottom | options: bottom/top | N
+value | String / Number | - | \- | N
+
+### CollapsePanel Slots
+
+name | Description
+-- | --
+\- | \-
+content | \-
+expand-icon | \-
+header | \-
+header-left-icon | \-
+header-right-content | \-
+
+### CollapsePanel External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-content | \-
+t-class-header | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-collapse-border-color | @border-level-1-color | -
+--td-collapse-content-font | @font-body-medium | -
+--td-collapse-content-padding | 32rpx | -
+--td-collapse-content-text-color | @text-color-primary | -
+--td-collapse-disabled-color | @text-color-disabled | -
+--td-collapse-extra-font | @font-body-large | -
+--td-collapse-header-height | auto | -
+--td-collapse-header-text-color | @text-color-primary | -
+--td-collapse-header-text-disabled-color | @collapse-disabled-color | -
+--td-collapse-horizontal-padding | 32rpx | -
+--td-collapse-icon-color | @text-color-placeholder | -
+--td-collapse-left-icon-color | @brand-color | -
+--td-collapse-panel-bg-color | @bg-color-container | -
+--td-collapse-title-font | @font-body-large | -
diff --git a/uni_modules/tdesign-uniapp/components/collapse/README.md b/uni_modules/tdesign-uniapp/components/collapse/README.md
new file mode 100644
index 0000000..0643e01
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/collapse/README.md
@@ -0,0 +1,119 @@
+---
+title: Collapse 折叠面板
+description: 用于对复杂区域进行分组和隐藏 常用于订单信息展示等
+spline: data
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TCollapse from '@tdesign/uniapp/collapse/collapse.vue';
+import TCollapsePanel from '@tdesign/uniapp/collapse-panel/collapse-panel.vue';
+```
+
+### 类型
+
+基础折叠面板
+
+{{ base }}
+
+
+带操作说明
+
+{{ action }}
+
+手风琴模式
+
+{{ accordion }}
+
+### 样式
+
+卡片折叠面板
+
+{{ theme }}
+
+## API
+
+### Collapse Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+default-expand-all | Boolean | false | 默认是否展开全部 | N
+disabled | Boolean | - | 是否禁用面板展开/收起操作 | N
+expand-icon | Boolean | true | 展开图标 | N
+expand-mutex | Boolean | false | 每个面板互斥展开,每次只展开一个面板 | N
+theme | String | default | 折叠面板风格。可选项:default/card | N
+value | Array | - | 展开的面板集合。支持语法糖 `v-model:value`。TS 类型:`CollapseValue` `type CollapseValue = Array`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/collapse/type.ts) | N
+default-value | Array | - | 展开的面板集合。非受控属性。TS 类型:`CollapseValue` `type CollapseValue = Array`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/collapse/type.ts) | N
+
+### Collapse Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { value: CollapseValue, context: { e: MouseEvent }})` | 切换面板时触发,返回变化的值
+
+### Collapse Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+
+
+### CollapsePanel Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+content | String | - | 折叠面板内容 | N
+disabled | Boolean | undefined | 禁止当前面板展开,优先级大于 Collapse 的同名属性 | N
+expand-icon | Boolean | undefined | 当前折叠面板展开图标,优先级大于 Collapse 的同名属性 | N
+header | String | - | 面板头内容 | N
+header-left-icon | String | - | 面板头左侧图标 | N
+header-right-content | String | - | 面板头的右侧区域,一般用于呈现面板操作 | N
+placement | String | bottom | 选项卡内容的位置。可选项:bottom/top | N
+value | String / Number | - | 当前面板唯一标识,如果值为空则取当前面下标兜底作为唯一标识 | N
+
+### CollapsePanel Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,作用同 `content` 插槽
+content | 自定义 `content` 显示内容
+expand-icon | 自定义 `expand-icon` 显示内容
+header | 自定义 `header` 显示内容
+header-left-icon | 自定义 `header-left-icon` 显示内容
+header-right-content | 自定义 `header-right-content` 显示内容
+
+### CollapsePanel External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-content | 内容样式类
+t-class-header | 头部样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-collapse-border-color | @border-level-1-color | -
+--td-collapse-content-font | @font-body-medium | -
+--td-collapse-content-padding | 32rpx | -
+--td-collapse-content-text-color | @text-color-primary | -
+--td-collapse-disabled-color | @text-color-disabled | -
+--td-collapse-extra-font | @font-body-large | -
+--td-collapse-header-height | auto | -
+--td-collapse-header-text-color | @text-color-primary | -
+--td-collapse-header-text-disabled-color | @collapse-disabled-color | -
+--td-collapse-horizontal-padding | 32rpx | -
+--td-collapse-icon-color | @text-color-placeholder | -
+--td-collapse-left-icon-color | @brand-color | -
+--td-collapse-panel-bg-color | @bg-color-container | -
+--td-collapse-title-font | @font-body-large | -
diff --git a/uni_modules/tdesign-uniapp/components/collapse/collapse.css b/uni_modules/tdesign-uniapp/components/collapse/collapse.css
new file mode 100644
index 0000000..75a9bd0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/collapse/collapse.css
@@ -0,0 +1,5 @@
+.t-collapse--card {
+ margin: 0 32rpx;
+ border-radius: var(--td-radius-large, 18rpx);
+ overflow: hidden;
+}
diff --git a/uni_modules/tdesign-uniapp/components/collapse/collapse.vue b/uni_modules/tdesign-uniapp/components/collapse/collapse.vue
new file mode 100644
index 0000000..232f92a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/collapse/collapse.vue
@@ -0,0 +1,119 @@
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/collapse/props.ts b/uni_modules/tdesign-uniapp/components/collapse/props.ts
new file mode 100644
index 0000000..0182195
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/collapse/props.ts
@@ -0,0 +1,42 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdCollapseProps } from './type';
+export default {
+ /** 默认是否展开全部 */
+ defaultExpandAll: Boolean,
+ /** 是否禁用面板展开/收起操作 */
+ disabled: Boolean,
+ /** 展开图标 */
+ expandIcon: {
+ type: Boolean,
+ default: true,
+ },
+ /** 每个面板互斥展开,每次只展开一个面板 */
+ expandMutex: Boolean,
+ /** 折叠面板风格 */
+ theme: {
+ type: String,
+ default: 'default' as TdCollapseProps['theme'],
+ validator(val: TdCollapseProps['theme']): boolean {
+ if (!val) return true;
+ return ['default', 'card'].includes(val);
+ },
+ },
+ /** 展开的面板集合 */
+ value: {
+ type: Array,
+ },
+ /** 展开的面板集合,非受控属性 */
+ defaultValue: {
+ type: Array,
+ },
+ /** 切换面板时触发,返回变化的值 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/collapse/type.ts b/uni_modules/tdesign-uniapp/components/collapse/type.ts
new file mode 100644
index 0000000..0600170
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/collapse/type.ts
@@ -0,0 +1,46 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdCollapseProps {
+ /**
+ * 默认是否展开全部
+ * @default false
+ */
+ defaultExpandAll?: boolean;
+ /**
+ * 是否禁用面板展开/收起操作
+ */
+ disabled?: boolean;
+ /**
+ * 展开图标
+ * @default true
+ */
+ expandIcon?: boolean;
+ /**
+ * 每个面板互斥展开,每次只展开一个面板
+ * @default false
+ */
+ expandMutex?: boolean;
+ /**
+ * 折叠面板风格
+ * @default default
+ */
+ theme?: 'default' | 'card';
+ /**
+ * 展开的面板集合
+ */
+ value?: CollapseValue;
+ /**
+ * 展开的面板集合,非受控属性
+ */
+ defaultValue?: CollapseValue;
+ /**
+ * 切换面板时触发,返回变化的值
+ */
+ onChange?: (context: { value: CollapseValue; context: { e: MouseEvent } }) => void;
+}
+
+export type CollapseValue = Array;
diff --git a/uni_modules/tdesign-uniapp/components/color-picker/README.en-US.md b/uni_modules/tdesign-uniapp/components/color-picker/README.en-US.md
new file mode 100644
index 0000000..d147a8b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/color-picker/README.en-US.md
@@ -0,0 +1,62 @@
+:: BASE_DOC ::
+
+## API
+
+### ColorPicker Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+auto-close | Boolean | true | \- | N
+enable-alpha | Boolean | false | \- | N
+fixed | Boolean | false | \- | N
+format | String | RGB | When `enableAlpha` is true, `HEX8/RGBA/HSLA/HSVA` are valid。options: HEX/HEX8/RGB/RGBA/HSL/HSLA/HSV/HSVA/CMYK/CSS | N
+popup-props | Object | {} | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/color-picker/type.ts) | N
+swatch-colors | Array | undefined | swatch colors。Typescript:`Array \| null \| undefined` | N
+type | String | base | options: base/multiple。Typescript:`TypeEnum ` `type TypeEnum = 'base' \| 'multiple'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/color-picker/type.ts) | N
+use-popup | Boolean | false | \- | N
+value | String | - | color value。`v-model:value` is supported | N
+default-value | String | - | color value。uncontrolled property | N
+visible | Boolean | false | \- | N
+
+### ColorPicker Events
+
+name | params | description
+-- | -- | --
+change | `(context: { value: string, context: { color: ColorObject; trigger: ColorPickerChangeTrigger }})` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/color-picker/type.ts)。
`type ColorPickerChangeTrigger = 'palette-hue-bar' \| 'palette-alpha-bar' \| 'preset' `
+close | `(context: { trigger: ColorPickerTrigger })` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/color-picker/type.ts)。
`type ColorPickerTrigger = 'overlay'`
+palette-bar-change | `(context: { color: ColorObject })` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/color-picker/type.ts)。
`interface ColorObject { alpha: number; css: string; hex: string; hex8: string; hsl: string; hsla: string; hsv: string; hsva: string; rgb: string; rgba: string; value: number;}`
+
+### ColorPicker Slots
+
+name | Description
+-- | --
+footer | \-
+header | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-color-picker-gradient-preview-height | 56rpx | -
+--td-color-picker-gradient-preview-radius | 6rpx | -
+--td-color-picker-gradient-preview-width | 56rpx | -
+--td-color-picker-input-format-margin-left | 48rpx | -
+--td-color-picker-panel-background | @bg-color-container | -
+--td-color-picker-panel-padding | 32rpx | -
+--td-color-picker-panel-radius | 24rpx | -
+--td-color-picker-panel-width | 750rpx | -
+--td-color-picker-saturation-height | 288rpx | -
+--td-color-picker-saturation-radius | 12rpx | -
+--td-color-picker-saturation-thumb-size | 48rpx | -
+--td-color-picker-slider-height | 16rpx | -
+--td-color-picker-slider-thumb-padding | 6rpx | -
+--td-color-picker-slider-thumb-size | 48rpx | -
+--td-color-picker-slider-thumb-transform-x | -18rpx | -
+--td-color-picker-slider-wrapper-padding | 0 18rpx | -
+--td-color-picker-swatch-border-radius | @radius-small | -
+--td-color-picker-swatch-height | 48rpx | -
+--td-color-picker-swatch-padding | 0 | -
+--td-color-picker-swatch-width | 48rpx | -
+--td-color-picker-swatches-title-font | @font-title-medium | -
diff --git a/uni_modules/tdesign-uniapp/components/color-picker/README.md b/uni_modules/tdesign-uniapp/components/color-picker/README.md
new file mode 100644
index 0000000..25ed41c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/color-picker/README.md
@@ -0,0 +1,110 @@
+---
+title: ColorPicker 颜色选择器
+description: 用于颜色选择,支持多种格式。
+spline: data
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TColorPicker from '@tdesign/uniapp/color-picker/color-picker.vue';
+```
+
+## 代码演示
+
+### 组件类型
+
+#### 基础颜色选择器
+
+{{ base }}
+
+#### 带色板的颜色选择器
+
+{{ multiple }}
+
+### 组件状态
+
+{{ format }}
+
+## FAQ
+
+如果使用场景为 `scroll-view`,除了需要显示指定 `fixed` 属性为 `true`,还需要手动调用组件的 debouncedUpdateEleRect() 事件。
+
+```html
+
+
+
+```
+
+```js
+onScroll(e) {
+ if (!this.colorPicker) this.colorPicker = this.selectComponent('#ColorPicker');
+ this.colorPicker.debouncedUpdateEleRect(e);
+}
+```
+
+## API
+
+### ColorPicker Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+auto-close | Boolean | true | 自动关闭。在点击遮罩层时自动关闭,不需要手动设置 visible | N
+enable-alpha | Boolean | false | 是否开启透明通道 | N
+fixed | Boolean | false | 如果 color-picker 是在一个 `position:fixed` 的区域,需要显式指定属性 fixed 为 true | N
+format | String | RGB | 格式化色值。`enableAlpha` 为真时,`HEX8/RGBA/HSLA/HSVA` 有效。可选项:HEX/HEX8/RGB/RGBA/HSL/HSLA/HSV/HSVA/CMYK/CSS | N
+popup-props | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/color-picker/type.ts) | N
+swatch-colors | Array | undefined | 系统预设的颜色样例,值为 `null` 或 `[]` 则不显示系统色,值为 `undefined` 会显示组件内置的系统默认色。TS 类型:`Array \| null \| undefined` | N
+type | String | base | 颜色选择器类型。(base 表示仅展示系统预设内容; multiple 表示展示色板和系统预设内容。可选项:base/multiple。TS 类型:`TypeEnum ` `type TypeEnum = 'base' \| 'multiple'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/color-picker/type.ts) | N
+use-popup | Boolean | false | 是否使用弹出层包裹颜色选择器 | N
+value | String | - | 色值。支持语法糖 `v-model:value` | N
+default-value | String | - | 色值。非受控属性 | N
+visible | Boolean | false | 是否显示颜色选择器。`usePopup` 为 true 时有效 | N
+
+### ColorPicker Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { value: string, context: { color: ColorObject; trigger: ColorPickerChangeTrigger }})` | 选中的色值发生变化时触发,第一个参数 `value` 表示新色值,`context.color` 表示当前调色板控制器的色值,`context.trigger` 表示触发颜色变化的来源。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/color-picker/type.ts)。
`type ColorPickerChangeTrigger = 'palette-hue-bar' \| 'palette-alpha-bar' \| 'preset' `
+close | `(context: { trigger: ColorPickerTrigger })` | 关闭按钮时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/color-picker/type.ts)。
`type ColorPickerTrigger = 'overlay'`
+palette-bar-change | `(context: { color: ColorObject })` | 调色板控制器的值变化时触发,`context.color` 指调色板控制器的值。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/color-picker/type.ts)。
`interface ColorObject { alpha: number; css: string; hex: string; hex8: string; hsl: string; hsla: string; hsv: string; hsva: string; rgb: string; rgba: string; value: number;}`
+
+### ColorPicker Slots
+
+名称 | 描述
+-- | --
+footer | 底部插槽,仅在 `usePopup` 为 `true` 时有效
+header | 顶部插槽,仅在 `usePopup` 为 `true` 时有效
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-color-picker-gradient-preview-height | 56rpx | -
+--td-color-picker-gradient-preview-radius | 6rpx | -
+--td-color-picker-gradient-preview-width | 56rpx | -
+--td-color-picker-input-format-margin-left | 48rpx | -
+--td-color-picker-panel-background | @bg-color-container | -
+--td-color-picker-panel-padding | 32rpx | -
+--td-color-picker-panel-radius | 24rpx | -
+--td-color-picker-panel-width | 750rpx | -
+--td-color-picker-saturation-height | 288rpx | -
+--td-color-picker-saturation-radius | 12rpx | -
+--td-color-picker-saturation-thumb-size | 48rpx | -
+--td-color-picker-slider-height | 16rpx | -
+--td-color-picker-slider-thumb-padding | 6rpx | -
+--td-color-picker-slider-thumb-size | 48rpx | -
+--td-color-picker-slider-thumb-transform-x | -18rpx | -
+--td-color-picker-slider-wrapper-padding | 0 18rpx | -
+--td-color-picker-swatch-border-radius | @radius-small | -
+--td-color-picker-swatch-height | 48rpx | -
+--td-color-picker-swatch-padding | 0 | -
+--td-color-picker-swatch-width | 48rpx | -
+--td-color-picker-swatches-title-font | @font-title-medium | -
diff --git a/uni_modules/tdesign-uniapp/components/color-picker/color-picker.css b/uni_modules/tdesign-uniapp/components/color-picker/color-picker.css
new file mode 100644
index 0000000..c209d5e
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/color-picker/color-picker.css
@@ -0,0 +1,271 @@
+.t-color-picker__panel {
+ padding: 0;
+ width: var(--td-color-picker-panel-width, 750rpx);
+ background: var(--td-color-picker-panel-background, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ border-top-left-radius: var(--td-color-picker-panel-radius, 24rpx);
+ border-top-right-radius: var(--td-color-picker-panel-radius, 24rpx);
+ user-select: none;
+}
+.t-color-picker__body {
+ padding: var(--td-color-picker-panel-padding, 32rpx);
+ padding-bottom: 56rpx;
+}
+.t-color-picker__thumb {
+ position: absolute;
+ z-index: 1;
+ outline: none;
+ width: var(--td-color-picker-slider-thumb-size, 48rpx);
+ height: var(--td-color-picker-slider-thumb-size, 48rpx);
+ border-radius: var(--td-radius-circle, 50%);
+ box-shadow: var(--td-shadow-1, 0 1px 10px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.12));
+ color: var(--td-text-color-brand, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ box-sizing: border-box;
+}
+.t-color-picker__thumb::before,
+.t-color-picker__thumb::after {
+ content: '';
+ position: absolute;
+ border-radius: var(--td-radius-circle, 50%);
+ box-sizing: border-box;
+ display: block;
+ border: 1px solid var(--td-component-border, var(--td-gray-color-4, #dcdcdc));
+}
+.t-color-picker__thumb::before {
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ background-color: #fff;
+}
+.t-color-picker__thumb::after {
+ left: 3px;
+ top: 3px;
+ width: calc(100% - 6px);
+ height: calc(100% - 6px);
+ padding: var(--td-color-picker-slider-thumb-padding, 6rpx);
+ background: currentcolor;
+}
+.t-color-picker__saturation {
+ height: var(--td-color-picker-saturation-height, 288rpx);
+ border-radius: var(--td-color-picker-saturation-radius, 12rpx);
+ position: relative;
+ overflow: hidden;
+ background: transparent;
+}
+.t-color-picker__saturation::before,
+.t-color-picker__saturation::after {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+.t-color-picker__saturation::before {
+ /* stylelint-disable-next-line color-no-hex */
+ background: linear-gradient(90deg, #fff, transparent);
+}
+.t-color-picker__saturation::after {
+ /* stylelint-disable-next-line color-no-hex */
+ background: linear-gradient(0deg, #000, transparent);
+}
+.t-color-picker__saturation .t-color-picker__thumb {
+ width: var(--td-color-picker-saturation-thumb-size, 48rpx);
+ height: var(--td-color-picker-saturation-thumb-size, 48rpx);
+ border-radius: var(--td-radius-circle, 50%);
+ transform: translate(-50%, -50%);
+}
+.t-color-picker__slider-wrapper {
+ border-radius: calc(var(--td-color-picker-slider-height, 16rpx) / 2);
+ padding: var(--td-color-picker-slider-wrapper-padding, 0 18rpx);
+ position: relative;
+}
+.t-color-picker__slider-wrapper--hue-type {
+ /* stylelint-disable-next-line color-named */
+ background: linear-gradient(90deg, red, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red);
+ margin: 16rpx 0;
+}
+.t-color-picker__slider-wrapper--alpha-type {
+ background: var(--td-text-color-anti, var(--td-font-white-1, #ffffff));
+ margin: 40rpx 0 16rpx 0;
+ /* stylelint-disable-next-line color-no-hex */
+ background-image: linear-gradient(45deg, #c5c5c5 25%, transparent 0, transparent 75%, #c5c5c5 0, #c5c5c5), linear-gradient(45deg, #c5c5c5 25%, transparent 0, transparent 75%, #c5c5c5 0, #c5c5c5);
+ background-size: 6px 6px;
+ background-position: 0 0, 3px 3px;
+}
+.t-color-picker__slider-wrapper--alpha-type .t-color-picker__rail {
+ background: linear-gradient(to right, transparent, currentcolor);
+}
+.t-color-picker__slider-padding {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: var(--td-color-picker-slider-height, 16rpx);
+ border-radius: calc(var(--td-color-picker-slider-height, 16rpx) / 2);
+}
+.t-color-picker__slider {
+ height: var(--td-color-picker-slider-height, 16rpx);
+ position: relative;
+ border-radius: calc(var(--td-color-picker-slider-height, 16rpx) / 2);
+ color: transparent;
+ outline: none;
+ z-index: 1;
+}
+.t-color-picker__slider .t-color-picker__thumb {
+ transform: translate(var(--td-color-picker-slider-thumb-transform-x, -18rpx), -50%);
+ top: 50%;
+}
+.t-color-picker__slider .t-color-picker__rail {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ border-radius: inherit;
+}
+.t-color-picker__sliders-wrapper {
+ display: flex;
+ align-items: center;
+ margin: 32rpx 0 40rpx;
+}
+.t-color-picker__sliders {
+ width: 100%;
+}
+.t-color-picker__sliders-preview {
+ flex-shrink: 0;
+ margin-left: var(--td-spacer-1, 24rpx);
+ width: var(--td-color-picker-gradient-preview-width, 56rpx);
+ height: var(--td-color-picker-gradient-preview-height, 56rpx);
+ border-radius: var(--td-color-picker-gradient-preview-radius, 6rpx);
+ overflow: hidden;
+ background: var(--td-text-color-anti, var(--td-font-white-1, #ffffff));
+ /* stylelint-disable-next-line color-no-hex */
+ background-image: linear-gradient(45deg, #c5c5c5 25%, transparent 0, transparent 75%, #c5c5c5 0, #c5c5c5), linear-gradient(45deg, #c5c5c5 25%, transparent 0, transparent 75%, #c5c5c5 0, #c5c5c5);
+ background-size: 6px 6px;
+ background-position: 0 0, 3px 3px;
+}
+.t-color-picker__sliders-preview-inner {
+ display: block;
+ width: 100%;
+ height: 100%;
+}
+.t-color-picker__format {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ color: var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4)));
+ text-align: center;
+}
+.t-color-picker__format:not(:empty) + .t-color-picker__swatches-wrap:not(:empty) {
+ margin-top: 56rpx;
+}
+.t-color-picker__format-item {
+ font: var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
+.t-color-picker__format-item--first {
+ flex-shrink: 0;
+ width: 136rpx;
+ border: 2rpx solid var(--td-component-border, var(--td-gray-color-4, #dcdcdc));
+ border-radius: var(--td-radius-default, 12rpx);
+ padding: 6rpx 0;
+ margin-right: 24rpx;
+}
+.t-color-picker__format-item--second {
+ flex: 1;
+}
+.t-color-picker__format-inputs {
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+}
+.t-color-picker__format-input {
+ flex: 1;
+ width: 0;
+ margin-left: -2rpx;
+ padding: 6rpx 0;
+ border: 1px solid var(--td-component-border, var(--td-gray-color-4, #dcdcdc));
+ border-radius: var(--td-radius-default, 12rpx);
+}
+.t-color-picker__format-input:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+.t-color-picker__format-input:first-child:not(:last-child) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+.t-color-picker__format-input:last-child:not(:first-child) {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.t-color-picker__format-input--fixed {
+ flex-shrink: 0;
+ flex-grow: 0;
+ flex-basis: 133rpx;
+}
+.t-color-picker__swatches-wrap {
+ position: relative;
+}
+.t-color-picker__swatches + .t-color-picker__swatches {
+ margin-top: var(--td-spacer-1, 24rpx);
+}
+.t-color-picker__swatches-title {
+ font: var(--td-color-picker-swatches-title-font, var(--td-font-title-medium, 600 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ padding: 0;
+ color: var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.t-color-picker__swatches-items {
+ margin-top: 24rpx;
+ width: 100%;
+ list-style: none;
+ display: flex;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+.t-color-picker__swatches-items::-webkit-scrollbar {
+ display: none;
+ width: 0;
+ height: 0;
+ color: transparent;
+}
+.t-color-picker__swatches-item {
+ width: var(--td-color-picker-swatch-width, 48rpx);
+ height: var(--td-color-picker-swatch-height, 48rpx);
+ border-radius: var(--td-radius-small, 6rpx);
+ padding: var(--td-color-picker-swatch-padding, 0);
+ overflow: hidden;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: relative;
+ transform-origin: center;
+ transition: all var(--td-anim-duration-base, 0.2s) var(--td-anim-time-fn-easing, cubic-bezier(0.38, 0, 0.24, 1));
+ box-sizing: border-box;
+ flex-shrink: 0;
+ margin-right: 24rpx;
+ border-radius: var(--td-color-picker-swatch-border-radius, var(--td-radius-small, 6rpx));
+}
+.t-color-picker__swatches-item::after {
+ content: '';
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+ opacity: 0;
+ background: rgba(0, 0, 0, 0.2);
+}
+.t-color-picker__swatches-item:active::after {
+ opacity: 1;
+}
+.t-color-picker__swatches-inner {
+ width: 100%;
+ height: 100%;
+ display: block;
+ border-radius: var(--td-color-picker-swatch-border-radius, var(--td-radius-small, 6rpx));
+ position: relative;
+}
diff --git a/uni_modules/tdesign-uniapp/components/color-picker/color-picker.vue b/uni_modules/tdesign-uniapp/components/color-picker/color-picker.vue
new file mode 100644
index 0000000..a774c3b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/color-picker/color-picker.vue
@@ -0,0 +1,501 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/color-picker/constants.ts b/uni_modules/tdesign-uniapp/components/color-picker/constants.ts
new file mode 100644
index 0000000..72f64af
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/color-picker/constants.ts
@@ -0,0 +1,26 @@
+/** 常量 */
+
+// 默认颜色
+export const DEFAULT_COLOR = '#001F97';
+
+// 默认系统色彩
+export const DEFAULT_SYSTEM_SWATCH_COLORS = [
+ '#F2F3FF',
+ '#D9E1FF',
+ '#B5C7FF',
+ '#8EABFF',
+ '#618DFF',
+ '#366EF4',
+ '#0052D9',
+ '#003CAB',
+ '#002A7C',
+ '#001A57',
+];
+
+// saturation-panel default rect
+export const SATURATION_PANEL_DEFAULT_WIDTH = 343;
+export const SATURATION_PANEL_DEFAULT_HEIGHT = 144;
+export const SLIDER_DEFAULT_WIDTH = 303;
+
+export const HUE_MAX = 360;
+export const ALPHA_MAX = 100;
diff --git a/uni_modules/tdesign-uniapp/components/color-picker/props.ts b/uni_modules/tdesign-uniapp/components/color-picker/props.ts
new file mode 100644
index 0000000..c0c35dd
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/color-picker/props.ts
@@ -0,0 +1,75 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdColorPickerProps } from './type';
+export default {
+ /** 自动关闭。在点击遮罩层时自动关闭,不需要手动设置 visible */
+ autoClose: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否开启透明通道 */
+ enableAlpha: Boolean,
+ /** 如果 color-picker 是在一个 `position:fixed` 的区域,需要显式指定属性 fixed 为 true */
+ fixed: Boolean,
+ /** 格式化色值。`enableAlpha` 为真时,`HEX8/RGBA/HSLA/HSVA` 有效 */
+ format: {
+ type: String,
+ default: 'RGB' as TdColorPickerProps['format'],
+ validator(val: TdColorPickerProps['format']): boolean {
+ if (!val) return true;
+ return ['HEX', 'HEX8', 'RGB', 'RGBA', 'HSL', 'HSLA', 'HSV', 'HSVA', 'CMYK', 'CSS'].includes(val);
+ },
+ },
+ /** 透传 Popup 组件全部属性 */
+ popupProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 系统预设的颜色样例,值为 `null` 或 `[]` 则不显示系统色,值为 `undefined` 会显示组件内置的系统默认色 */
+ swatchColors: {
+ type: Array,
+ default: undefined as TdColorPickerProps['swatchColors'],
+ },
+ /** 颜色选择器类型。(base 表示仅展示系统预设内容; multiple 表示展示色板和系统预设内容 */
+ type: {
+ type: String,
+ default: 'base' as TdColorPickerProps['type'],
+ validator(val: TdColorPickerProps['type']): boolean {
+ if (!val) return true;
+ return ['base', 'multiple'].includes(val);
+ },
+ },
+ /** 是否使用弹出层包裹颜色选择器 */
+ usePopup: Boolean,
+ /** 色值 */
+ value: {
+ type: String,
+ default: '',
+ },
+ /** 色值,非受控属性 */
+ defaultValue: {
+ type: String,
+ default: '',
+ },
+ /** 是否显示颜色选择器。`usePopup` 为 true 时有效 */
+ visible: Boolean,
+ /** 选中的色值发生变化时触发,第一个参数 `value` 表示新色值,`context.color` 表示当前调色板控制器的色值,`context.trigger` 表示触发颜色变化的来源 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 关闭按钮时触发 */
+ onClose: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 调色板控制器的值变化时触发,`context.color` 指调色板控制器的值 */
+ onPaletteBarChange: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/color-picker/template.props.js b/uni_modules/tdesign-uniapp/components/color-picker/template.props.js
new file mode 100644
index 0000000..971fa24
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/color-picker/template.props.js
@@ -0,0 +1,58 @@
+export default {
+ classPrefix: {
+ type: String,
+ default: '',
+ },
+ customStyle: {
+ type: [String, Object],
+ default: '',
+ },
+ isMultiple: {
+ type: Boolean,
+ default: false,
+ },
+ type: {
+ type: String,
+ default: '',
+ },
+ sliderInfo: {
+ type: Object,
+ default: () => ({}),
+ },
+ saturationThumbStyle: {
+ type: [String, Object],
+ default: '',
+ },
+ hueSliderStyle: {
+ type: [String, Object],
+ default: '',
+ },
+ enableAlpha: {
+ type: Boolean,
+ default: false,
+ },
+ alphaSliderStyle: {
+ type: [String, Object],
+ default: '',
+ },
+ showPrimaryColorPreview: {
+ type: Boolean,
+ default: false,
+ },
+ previewColor: {
+ type: String,
+ default: '',
+ },
+ formatList: {
+ type: Array,
+ default: () => ([]),
+ },
+ innerSwatchList: {
+ type: Array,
+ default: () => ([]),
+ },
+ format: {
+ type: String,
+ default: 'RGB',
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/color-picker/template.vue b/uni_modules/tdesign-uniapp/components/color-picker/template.vue
new file mode 100644
index 0000000..0cb51f1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/color-picker/template.vue
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ format }}
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+ 系统预设色彩
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/color-picker/type.ts b/uni_modules/tdesign-uniapp/components/color-picker/type.ts
new file mode 100644
index 0000000..2583507
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/color-picker/type.ts
@@ -0,0 +1,96 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdPopupProps as PopupProps } from '../popup/type';
+
+export interface TdColorPickerProps {
+ /**
+ * 自动关闭。在点击遮罩层时自动关闭,不需要手动设置 visible
+ * @default true
+ */
+ autoClose?: boolean;
+ /**
+ * 是否开启透明通道
+ * @default false
+ */
+ enableAlpha?: boolean;
+ /**
+ * 如果 color-picker 是在一个 `position:fixed` 的区域,需要显式指定属性 fixed 为 true
+ * @default false
+ */
+ fixed?: boolean;
+ /**
+ * 格式化色值。`enableAlpha` 为真时,`HEX8/RGBA/HSLA/HSVA` 有效
+ * @default RGB
+ */
+ format?: 'HEX' | 'HEX8' | 'RGB' | 'RGBA' | 'HSL' | 'HSLA' | 'HSV' | 'HSVA' | 'CMYK' | 'CSS';
+ /**
+ * 透传 Popup 组件全部属性
+ * @default {}
+ */
+ popupProps?: PopupProps;
+ /**
+ * 系统预设的颜色样例,值为 `null` 或 `[]` 则不显示系统色,值为 `undefined` 会显示组件内置的系统默认色
+ */
+ swatchColors?: Array | null | undefined;
+ /**
+ * 颜色选择器类型。(base 表示仅展示系统预设内容; multiple 表示展示色板和系统预设内容
+ * @default base
+ */
+ type?: TypeEnum;
+ /**
+ * 是否使用弹出层包裹颜色选择器
+ * @default false
+ */
+ usePopup?: boolean;
+ /**
+ * 色值
+ * @default ''
+ */
+ value?: string;
+ /**
+ * 色值,非受控属性
+ * @default ''
+ */
+ defaultValue?: string;
+ /**
+ * 是否显示颜色选择器。`usePopup` 为 true 时有效
+ * @default false
+ */
+ visible?: boolean;
+ /**
+ * 选中的色值发生变化时触发,第一个参数 `value` 表示新色值,`context.color` 表示当前调色板控制器的色值,`context.trigger` 表示触发颜色变化的来源
+ */
+ onChange?: (context: { value: string; context: { color: ColorObject; trigger: ColorPickerChangeTrigger } }) => void;
+ /**
+ * 关闭按钮时触发
+ */
+ onClose?: (context: { trigger: ColorPickerTrigger }) => void;
+ /**
+ * 调色板控制器的值变化时触发,`context.color` 指调色板控制器的值
+ */
+ onPaletteBarChange?: (context: { color: ColorObject }) => void;
+}
+
+export type TypeEnum = 'base' | 'multiple';
+
+export type ColorPickerChangeTrigger = 'palette-hue-bar' | 'palette-alpha-bar' | 'preset';
+
+export type ColorPickerTrigger = 'overlay';
+
+export interface ColorObject {
+ alpha: number;
+ css: string;
+ hex: string;
+ hex8: string;
+ hsl: string;
+ hsla: string;
+ hsv: string;
+ hsva: string;
+ rgb: string;
+ rgba: string;
+ value: number;
+}
diff --git a/uni_modules/tdesign-uniapp/components/color-picker/utils.js b/uni_modules/tdesign-uniapp/components/color-picker/utils.js
new file mode 100644
index 0000000..c985ed7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/color-picker/utils.js
@@ -0,0 +1 @@
+export * from '../common/shared/color-picker/index';
diff --git a/uni_modules/tdesign-uniapp/components/common/bus.js b/uni_modules/tdesign-uniapp/components/common/bus.js
new file mode 100644
index 0000000..8535007
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/bus.js
@@ -0,0 +1,84 @@
+export default class Bus {
+ constructor() {
+ this.listeners = new Map();
+ this.emitted = new Map(); // 改为Map存储事件参数
+ this.onceListeners = new Map();
+ }
+
+ on(evtName, listener) {
+ const target = this.listeners.get(evtName) || [];
+ target.push(listener);
+ this.listeners.set(evtName, target);
+
+ // 如果事件已触发过,用保存的参数立即执行
+ if (this.emitted.has(evtName)) {
+ listener(...this.emitted.get(evtName));
+ }
+ }
+
+ once(evtName, listener) {
+ // 如果事件已经触发过,立即执行并返回
+ if (this.emitted.has(evtName)) {
+ listener(...this.emitted.get(evtName));
+ return;
+ }
+
+ // 封装自移除函数
+ const onceWrapper = (...args) => {
+ listener(...args);
+ this.off(evtName, onceWrapper);
+ };
+
+ // 存储原始监听器用于精准移除
+ const onceMap = this.onceListeners.get(evtName) || new Map();
+ onceMap.set(listener, onceWrapper);
+ this.onceListeners.set(evtName, onceMap);
+
+ // 注册封装函数
+ this.on(evtName, onceWrapper);
+ }
+
+ emit(evtName, ...args) {
+ // 保存事件参数
+ this.emitted.set(evtName, args);
+
+ const listeners = this.listeners.get(evtName) || [];
+ // 使用副本避免执行时修改数组
+ [...listeners].forEach(func => func(...args));
+ }
+
+ off(evtName, listener) {
+ if (listener) {
+ // 处理一次性监听器的原始引用
+ const onceMap = this.onceListeners.get(evtName);
+ if (onceMap && onceMap.has(listener)) {
+ const wrapper = onceMap.get(listener);
+ this._removeListener(evtName, wrapper);
+ onceMap.delete(listener);
+ return;
+ }
+
+ // 处理普通监听器
+ this._removeListener(evtName, listener);
+ } else {
+ // 移除所有监听器
+ this.listeners.delete(evtName);
+ this.onceListeners.delete(evtName);
+ this.emitted.delete(evtName);
+ }
+ }
+
+ // 私有方法:从指定事件中移除单个监听器
+ _removeListener(evtName, listener) {
+ const listeners = this.listeners.get(evtName);
+ if (!listeners) return;
+
+ const index = listeners.indexOf(listener);
+ if (index > -1) {
+ listeners.splice(index, 1);
+ if (listeners.length === 0) {
+ this.listeners.delete(evtName);
+ }
+ }
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/canvas/index.js b/uni_modules/tdesign-uniapp/components/common/canvas/index.js
new file mode 100644
index 0000000..1299b62
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/canvas/index.js
@@ -0,0 +1,53 @@
+export async function loadImage({
+ canvas,
+ src,
+}) {
+ let result = null;
+ if (!src || !canvas) {
+ return result;
+ }
+
+ // #ifdef MP
+ // 小程序环境:使用 canvas.createImage
+ if (canvas.createImage) {
+ result = new Promise((resolve, reject) => {
+ const img = canvas.createImage();
+ // 必须先设置 onload 和 onerror,再设置 src
+ img.onload = () => resolve(img);
+ img.onerror = (err) => {
+ console.error('创建图片对象失败:', err);
+ reject(err);
+ };
+ img.src = src;
+ });
+ }
+ // #endif
+
+ // #ifdef APP-PLUS
+ result = new Promise((resolve) => {
+ uni.getImageInfo({
+ src,
+ success: (res) => {
+ const imgPath = res.path; // 本地临时路径
+ resolve(imgPath);
+ },
+ });
+ });
+ // #endif
+
+ // #ifdef H5
+ // H5 环境:创建 Image 对象(参考 TSX 实现)
+ result = new Promise((resolve, reject) => {
+ const img = new Image();
+ img.crossOrigin = 'anonymous';
+ img.onload = () => resolve(img);
+ img.onerror = (err) => {
+ console.error('图标加载失败:', err);
+ reject(err);
+ };
+ img.src = src;
+ });
+ // #endif
+
+ return result;
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/common.ts b/uni_modules/tdesign-uniapp/components/common/common.ts
new file mode 100644
index 0000000..11387f0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/common.ts
@@ -0,0 +1,173 @@
+export type Classes = Array;
+
+export interface Styles {
+ [css: string]: string | number;
+}
+
+export type ImageEvent = any;
+
+export type PlainObject = { [key: string]: any };
+
+export type OptionData = {
+ label?: string;
+ value?: string | number;
+} & PlainObject;
+
+export type TreeOptionData = {
+ children?: Array> | boolean;
+ /** option label content */
+ label?: string;
+ /** option search text */
+ text?: string;
+ /** option value */
+ value?: T;
+ /** option node content */
+ content?: string;
+} & PlainObject;
+
+export type FormResetEvent = Event;
+
+export type FormSubmitEvent = Event;
+
+/**
+ * 移除 on 前缀并可选地去掉可选修饰符
+ * @param T - 原始类型
+ * @param MakeRequired - 是否将属性变为必需(默认 false)
+ */
+export type TransformEventHandlers<
+ T,
+ MakeRequired extends boolean = false
+> = MakeRequired extends true
+ ? {
+ [K in keyof T as K extends `on${infer Event}`
+ ? Uncapitalize
+ : never
+ ]-?: T[K]
+ }
+ : {
+ [K in keyof T as K extends `on${infer Event}`
+ ? Uncapitalize
+ : never
+ ]: T[K]
+ };
+
+
+type WrapWithContext any> =
+ T extends (...args: infer P) => infer R
+ ? (context: { [K in keyof P]: P[K] }) => R
+ : never;
+
+
+export type WrapParamsWithContext = {
+ [K in keyof T]: T[K] extends (...args: any[]) => any
+ ? WrapWithContext
+ : T[K];
+};
+
+
+// 提取非 on 开头的属性
+export type ExtractNonOnProps = {
+ [K in keyof T as K extends `on${string}` ? never : K]: T[K]
+};
+
+export interface IsEmailOptions {
+ allow_display_name?: boolean;
+ require_display_name?: boolean;
+ allow_utf8_local_part?: boolean;
+ require_tld?: boolean;
+ allow_ip_dot?: boolean;
+ domain_specific_validation?: boolean;
+ host_blacklist?: string[];
+ ignore_max_length?: boolean;
+}
+
+export interface IsURLOptions {
+ protocols?: string[];
+ require_tld?: boolean;
+ require_protocol?: boolean;
+ require_host?: boolean;
+ require_port?: boolean;
+ require_valid_protocol?: boolean;
+ allow_underscores?: boolean;
+ host_whitelist?: (string | RegExp)[];
+ host_blacklist?: (string | RegExp)[];
+ allow_trailing_dot?: boolean;
+ allow_protocol_relative_urls?: boolean;
+ disallow_auth?: boolean;
+ validate_length?: boolean;
+}
+/**
+ * 通用全局类型
+ * */
+export type SizeEnum = 'small' | 'medium' | 'large';
+
+export type ShapeEnum = 'circle' | 'round';
+
+export type HorizontalAlignEnum = 'left' | 'center' | 'right';
+
+export type VerticalAlignEnum = 'top' | 'middle' | 'bottom';
+
+export type LayoutEnum = 'vertical' | 'horizontal';
+
+export type ClassName = { [className: string]: any } | ClassName[] | string;
+
+export type CSSSelector = string;
+
+export interface KeysType {
+ value?: string;
+ label?: string;
+ disabled?: string;
+}
+
+export interface TreeKeysType extends KeysType {
+ children?: string;
+}
+
+export interface HTMLElementAttributes {
+ [attribute: string]: string;
+}
+
+export interface TScroll {
+ /**
+ * 表示除可视区域外,额外渲染的行数,避免快速滚动过程中,新出现的内容来不及渲染从而出现空白
+ * @default 20
+ */
+ bufferSize?: number;
+ /**
+ * 表示每行内容是否同一个固定高度,仅在 `scroll.type` 为 `virtual` 时有效,该属性设置为 `true` 时,可用于简化虚拟滚动内部计算逻辑,提升性能,此时则需要明确指定 `scroll.rowHeight` 属性的值
+ * @default false
+ */
+ isFixedRowHeight?: boolean;
+ /**
+ * 行高,不会给元素添加样式高度,仅作为滚动时的行高参考。一般情况不需要设置该属性。如果设置,可尽量将该属性设置为每行平均高度,从而使得滚动过程更加平滑
+ */
+ rowHeight?: number;
+ /**
+ * 启动虚拟滚动的阈值。为保证组件收益最大化,当数据量小于阈值 `scroll.threshold` 时,无论虚拟滚动的配置是否存在,组件内部都不会开启虚拟滚动
+ * @default 100
+ */
+ threshold?: number;
+ /**
+ * 滚动加载类型,有两种:懒加载和虚拟滚动。
值为 `lazy` ,表示滚动时会进行懒加载,非可视区域内的内容将不会默认渲染,直到该内容可见时,才会进行渲染,并且已渲染的内容滚动到不可见时,不会被销毁;
值为`virtual`时,表示会进行虚拟滚动,无论滚动条滚动到哪个位置,同一时刻,仅渲染该可视区域内的内容,当需要展示的数据量较大时,建议开启该特性
+ */
+ type: 'lazy' | 'virtual';
+}
+
+/**
+ * @deprecated use TScroll instead
+ */
+export type InfinityScroll = TScroll;
+
+export interface ScrollToElementParams {
+ /** 跳转元素下标 */
+ index?: number;
+ /** 跳转元素距离顶部的距离 */
+ top?: number;
+ /** 单个元素高度非固定场景下,即 isFixedRowHeight = false。延迟设置元素位置,一般用于依赖不同高度异步渲染等场景,单位:毫秒 */
+ time?: number;
+ behavior?: 'auto' | 'smooth';
+}
+
+export interface ComponentScrollToElementParams extends ScrollToElementParams {
+ key?: string | number;
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/config.js b/uni_modules/tdesign-uniapp/components/common/config.js
new file mode 100644
index 0000000..79606c4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/config.js
@@ -0,0 +1,9 @@
+export default {
+ data() {
+ return {};
+ },
+ prefix: 't',
+};
+export const prefix = 't';
+
+export const ISOLATED_RELATION_KEY = '-1';
diff --git a/uni_modules/tdesign-uniapp/components/common/dom/index.js b/uni_modules/tdesign-uniapp/components/common/dom/index.js
new file mode 100644
index 0000000..d0f0586
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/dom/index.js
@@ -0,0 +1 @@
+export { selectComponent } from './select-component';
diff --git a/uni_modules/tdesign-uniapp/components/common/dom/select-component.js b/uni_modules/tdesign-uniapp/components/common/dom/select-component.js
new file mode 100644
index 0000000..f71ced7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/dom/select-component.js
@@ -0,0 +1,26 @@
+export function selectComponent(context, selector) {
+ if (!selector || !context) return;
+
+ if (typeof selector === 'function') {
+ return selector(context);
+ }
+
+ let attribute = selector;
+ if (attribute.match(/^[^\w]/)) {
+ attribute = attribute.slice(1);
+ }
+
+ if (
+ context.$refs && context.$refs[attribute]) {
+ return context.$refs[attribute];
+ }
+
+ if (context && typeof context.$selectComponent === 'function') {
+ const res = context.$selectComponent(selector);
+ return res;
+ }
+
+ return context && context.selectComponent && context.selectComponent(selector);
+}
+
+
diff --git a/uni_modules/tdesign-uniapp/components/common/event/dynamic.js b/uni_modules/tdesign-uniapp/components/common/event/dynamic.js
new file mode 100644
index 0000000..3d8a4b8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/event/dynamic.js
@@ -0,0 +1,10 @@
+/**
+ * 解析事件里的动态函数名,这种没有()的函数名,在uniapp不被执行
+ * 比如:立即
+ * @param {*} exp
+ */
+export function parseEventDynamicCode(e, exp, ...args) {
+ if (typeof(this[exp]) === 'function') {
+ this[exp](e, ...args);
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/functional/mixin.js b/uni_modules/tdesign-uniapp/components/common/functional/mixin.js
new file mode 100644
index 0000000..bbda343
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/functional/mixin.js
@@ -0,0 +1,51 @@
+function formatPropKey(key) {
+ return key.replace(/^(\w)/, (a, b) => `data${b.toUpperCase()}`);
+}
+
+
+function getPropsWatch(props) {
+ const watchProps = Object.keys(props).reduce((acc, item) => {
+ acc[item] = {
+ handler(val) {
+ this[formatPropKey(item)] = val;
+ },
+ };
+ return acc;
+ }, {});
+ return watchProps;
+}
+
+
+function getPropsData(context, props) {
+ const propsData = Object.keys(props).reduce((acc, item) => {
+ acc[formatPropKey(item)] = context[item];
+ return acc;
+ }, {});
+ return propsData;
+}
+
+
+function setPropsToData(data) {
+ Object.keys(data).forEach((key) => {
+ this[formatPropKey(key)] = data[key];
+ });
+}
+
+
+export function getFunctionalMixin(dialogProps) {
+ return {
+ data() {
+ return {
+ ...getPropsData(this, dialogProps),
+ };
+ },
+ watch: {
+ ...getPropsWatch(dialogProps),
+ },
+ methods: {
+ setData(data) {
+ setPropsToData.call(this, data);
+ },
+ },
+ };
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/relation/index.js b/uni_modules/tdesign-uniapp/components/common/relation/index.js
new file mode 100644
index 0000000..039e982
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/relation/index.js
@@ -0,0 +1,6 @@
+export { RELATION_MAP } from './parent-map';
+
+export {
+ ChildrenMixin,
+ ParentMixin,
+} from './relation';
diff --git a/uni_modules/tdesign-uniapp/components/common/relation/parent-map.js b/uni_modules/tdesign-uniapp/components/common/relation/parent-map.js
new file mode 100644
index 0000000..7e3fec5
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/relation/parent-map.js
@@ -0,0 +1,26 @@
+export const RELATION_MAP = {
+ CollapsePanel: 'Collapse',
+ TabPanel: 'Tabs',
+
+ StepItem: 'Steps',
+ TabBarItem: 'TabBar',
+ SideBarItem: 'SideBar',
+ GridItem: 'Grid',
+ DropdownItem: 'DropdownMenu',
+
+ Radio: 'RadioGroup',
+ Checkbox: 'CheckboxGroup',
+ Cell: 'CellGroup',
+ Avatar: 'AvatarGroup',
+ PickerItem: 'Picker',
+
+ IndexesAnchor: 'Indexes',
+ SwiperNav: 'Swiper',
+
+ Col: 'Row',
+ BackTop: 'PullDownRefresh',
+
+ FormItem: 'Form',
+
+ FormKey: 'FormKey',
+};
diff --git a/uni_modules/tdesign-uniapp/components/common/relation/relation.js b/uni_modules/tdesign-uniapp/components/common/relation/relation.js
new file mode 100644
index 0000000..9a45a9d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/relation/relation.js
@@ -0,0 +1,213 @@
+// #ifdef H5
+// import { sortChildren } from '../../common/dom/vnodes-h5';
+// #endif
+// #ifndef H5
+// import { sortMPChildren } from '../../common/dom/vnodes-mp';
+// #endif
+
+function findNearListParent(children = [], name) {
+ let temp;
+ for (const item of children) {
+ // console.log('__nodeId__', item, item.$options.name, parentRelationKey, thisRelationKey);
+ const parentRelationKey = item.$props && item.$props.relationKey;
+ const thisRelationKey = this.$props && this.$props.relationKey;
+ if (item.$options.name === name && parentRelationKey === thisRelationKey) {
+ temp = item;
+ }
+ if (item === this && temp) {
+ // console.log('item === this', item);
+ return temp;
+ }
+ const foundInChildren = findNearListParent.call(this, item.$children, name);
+ if (foundInChildren) {
+ return foundInChildren;
+ }
+ }
+
+ return temp;
+}
+
+
+function getParentInToutiao(name) {
+ let parent = this.$parent;
+ if (!parent) {
+ const pages = getCurrentPages();
+ parent = pages[pages.length - 1]?.$vm;
+ }
+
+ if (parent && !parent.$parent) {
+ const children = parent.$children;
+ if (!children || !children.length) return;
+ const result = findNearListParent.call(this, children, name);
+ // const result2 = children.find(item => item.$options.name === name);
+ // console.log('result2', result2, result2.__nodeId__);
+ // console.log('result', result, result.__nodeId__);
+ return result;
+ }
+}
+
+
+function getParent(name = '') {
+ const found = getParentInToutiao.call(this, name);
+ if (found) {
+ return found;
+ }
+
+ let parent = this.$parent;
+
+ if (!parent) {
+ return;
+ }
+
+ let parentName = parent.$options.name;
+ while (parentName !== name) {
+ parent = parent.$parent;
+ if (!parent) return false;
+ parentName = parent.$options.name;
+ }
+ return parent;
+}
+
+
+export function ChildrenMixin(parent, options = {}) {
+ const indexKey = options.indexKey || 'index';
+
+ return {
+ inject: {
+ // #ifndef MP-TOUTIAO
+ [parent]: {
+ default: null,
+ },
+ // #endif
+ },
+ data() {
+ return {
+ // #ifdef MP-TOUTIAO
+ [parent]: null,
+ // #endif
+ };
+ },
+ computed: {
+ // 会造成循环引用
+ // parent() {
+ // if (this.disableBindRelation) {
+ // return null;
+ // }
+
+ // return this[parent];
+ // },
+
+ [indexKey]() {
+ const that = this;
+
+ that.bindRelation();
+
+ if (that[parent]) {
+ return that[parent].children.indexOf(this);
+ }
+
+ return null;
+ },
+ },
+
+ watch: {
+ disableBindRelation(val) {
+ const that = this;
+ if (!val) {
+ that.bindRelation();
+ }
+ },
+ },
+
+ created() {
+ // 循环引用调试代码
+ // this[parent].children.push(this);
+ // #ifndef H5
+ const that = this;
+ that.bindRelation();
+ // #endif
+ },
+
+
+ mounted() {
+ // #ifdef H5
+ const that = this;
+ that.bindRelation();
+ // #endif
+ },
+
+ // #ifdef VUE2
+ beforeDestroy() {
+ const that = this;
+ that.onBeforeMount();
+ },
+ // #endif
+
+ // #ifdef VUE3
+ beforeUnmount() {
+ const that = this;
+ that.onBeforeMount();
+ },
+ // #endif
+
+ methods: {
+ bindRelation() {
+ // #ifdef MP-TOUTIAO
+ const parentComponentName = `T${parent}`;
+ this[parent] = getParent.call(this, parentComponentName);
+ // #endif
+ if (!this[parent] || (this[parent].children && this[parent].children.indexOf(this) !== -1)) {
+ return;
+ }
+
+ const children = [...(this[parent].children || []), this];
+
+
+ // #ifdef H5
+ try {
+ // sortChildren(children, this[parent]);
+ } catch (err) {
+ console.log('err', err);
+ }
+ // #endif
+
+ // #ifndef H5
+ // sortMPChildren(children);
+ // #endif
+
+ this[parent].children = children;
+ this.innerAfterLinked?.(this);
+ this[parent].innerAfterLinked?.(this);
+
+ // console.log('bindRelation.children', children);
+ },
+ onBeforeMount() {
+ const that = this;
+ if (that[parent]) {
+ that[parent].children = that[parent].children.filter(item => item !== that);
+ this[parent].innerAfterUnLinked?.(this);
+ this.innerAfterUnLinked?.(this);
+
+ that?.destroyCallback?.();
+ }
+ },
+ },
+ };
+}
+
+export function ParentMixin(parent) {
+ return {
+ provide() {
+ return {
+ [parent]: this,
+ };
+ },
+
+ data() {
+ return {
+ // 会造成循环引用
+ // children: [],
+ };
+ },
+ };
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/route.js b/uni_modules/tdesign-uniapp/components/common/route.js
new file mode 100644
index 0000000..52d084a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/route.js
@@ -0,0 +1,13 @@
+export function goBackOrGoHome(home = '/pages/home/home') {
+ const pages = getCurrentPages();
+
+ if (pages.length > 1) {
+ uni.navigateBack();
+ } else {
+ uni.navigateTo({
+ url: home,
+ });
+ }
+}
+
+export default goBackOrGoHome;
diff --git a/uni_modules/tdesign-uniapp/components/common/runtime/index.js b/uni_modules/tdesign-uniapp/components/common/runtime/index.js
new file mode 100644
index 0000000..4b4f3d5
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/runtime/index.js
@@ -0,0 +1,5 @@
+export function initTDesign() {
+ return {
+ };
+}
+
diff --git a/uni_modules/tdesign-uniapp/components/common/runtime/relation.js b/uni_modules/tdesign-uniapp/components/common/runtime/relation.js
new file mode 100644
index 0000000..e69de29
diff --git a/uni_modules/tdesign-uniapp/components/common/runtime/wxs-polyfill.js b/uni_modules/tdesign-uniapp/components/common/runtime/wxs-polyfill.js
new file mode 100644
index 0000000..5c972ee
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/runtime/wxs-polyfill.js
@@ -0,0 +1,16 @@
+function getRegExp() {
+ const args = Array.prototype.slice.call(arguments);
+ args.unshift(RegExp);
+ return new (Function.prototype.bind.apply(RegExp, args))();
+}
+
+/**
+ * wxs getDate
+ */
+function getDate() {
+ const args = Array.prototype.slice.call(arguments);
+ args.unshift(Date);
+ return new (Function.prototype.bind.apply(Date, args))();
+}
+
+export { getDate, getRegExp };
diff --git a/uni_modules/tdesign-uniapp/components/common/shared/calendar/index.js b/uni_modules/tdesign-uniapp/components/common/shared/calendar/index.js
new file mode 100644
index 0000000..186d6cb
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/shared/calendar/index.js
@@ -0,0 +1,128 @@
+import { getDateRect, isSameDate, getMonthDateRect, isValidDate, getDate } from '../date';
+
+export default class TCalendar {
+ constructor(options = {}) {
+ this.type = 'single';
+ Object.assign(this, options);
+ if (!this.minDate) this.minDate = getDate();
+ if (!this.maxDate) this.maxDate = getDate(6);
+ }
+
+ getTrimValue() {
+ const { value, type } = this;
+ const format = (val) => {
+ if (val instanceof Date) return val;
+ if (typeof val === 'number') return new Date(val);
+ return new Date();
+ };
+ if (type === 'single' && isValidDate(value)) return format(value);
+ if (type === 'multiple' || type === 'range') {
+ if (Array.isArray(value)) {
+ const isValid = value.every(item => isValidDate(item));
+ return isValid ? value.map(item => format(item)) : [];
+ }
+ return [];
+ }
+ }
+
+ getDays(weekdays) {
+ const ans = [];
+ let i = this.firstDayOfWeek % 7;
+ while (ans.length < 7) {
+ ans.push(weekdays[i]);
+ i = (i + 1) % 7;
+ }
+ return ans;
+ }
+
+ getMonths() {
+ const ans = [];
+ const selectedDate = this.getTrimValue();
+ const { minDate, maxDate, type, allowSameDay, format } = this;
+ const minDateRect = getDateRect(minDate);
+ let { year: minYear, month: minMonth } = minDateRect;
+ const { time: minTime } = minDateRect;
+ const { year: maxYear, month: maxMonth, time: maxTime } = getDateRect(maxDate);
+ const calcType = (year, month, date) => {
+ const curDate = new Date(year, month, date, 23, 59, 59);
+
+ if (type === 'single' && selectedDate) {
+ if (isSameDate({ year, month, date }, selectedDate)) return 'selected';
+ }
+ if (type === 'multiple' && selectedDate) {
+ const hit = selectedDate.some(item => isSameDate({ year, month, date }, item));
+ if (hit) {
+ return 'selected';
+ }
+ }
+ if (type === 'range' && selectedDate) {
+ if (Array.isArray(selectedDate)) {
+ const [startDate, endDate] = selectedDate;
+ const compareWithStart = startDate && isSameDate({ year, month, date }, startDate);
+ const compareWithEnd = endDate && isSameDate({ year, month, date }, endDate);
+
+ if (compareWithStart && compareWithEnd && allowSameDay) return 'start-end';
+ if (compareWithStart) return 'start';
+ if (compareWithEnd) return 'end';
+ if (startDate && endDate && curDate.getTime() > startDate.getTime() && curDate.getTime() < endDate.getTime()) return 'centre';
+ }
+ }
+
+ const minCurDate = new Date(year, month, date, 0, 0, 0);
+ if (curDate.getTime() < minTime || minCurDate.getTime() > maxTime) {
+ return 'disabled';
+ }
+ return '';
+ };
+
+ while (minYear < maxYear || (minYear === maxYear && minMonth <= maxMonth)) {
+ const target = getMonthDateRect(new Date(minYear, minMonth, 1));
+ const months = [];
+ for (let i = 1; i <= 31; i += 1) {
+ if (i > target.lastDate) break;
+ const dateObj = {
+ date: new Date(minYear, minMonth, i),
+ day: i,
+ type: calcType(minYear, minMonth, i),
+ };
+ months.push(format ? format(dateObj) : dateObj);
+ }
+ ans.push({
+ year: minYear,
+ month: minMonth,
+ months,
+ weekdayOfFirstDay: target.weekdayOfFirstDay,
+ });
+ const curDate = getDateRect(new Date(minYear, minMonth + 1, 1));
+ minYear = curDate.year;
+ minMonth = curDate.month;
+ }
+
+ return ans;
+ }
+
+ select({ cellType, year, month, date }) {
+ const { type } = this;
+ const selectedDate = this.getTrimValue();
+ if (cellType === 'disabled') return;
+ const selected = new Date(year, month, date);
+ this.value = selected;
+ if (type === 'range' && Array.isArray(selectedDate)) {
+ if (selectedDate.length === 1 && selected >= selectedDate[0]) {
+ this.value = [selectedDate[0], selected];
+ } else {
+ this.value = [selected];
+ }
+ } else if (type === 'multiple' && Array.isArray(selectedDate)) {
+ const newVal = [...selectedDate];
+ const index = selectedDate.findIndex(item => isSameDate(item, selected));
+ if (index > -1) {
+ newVal.splice(index, 1);
+ } else {
+ newVal.push(selected);
+ }
+ this.value = newVal;
+ }
+ return this.value;
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/shared/calendar/type.ts b/uni_modules/tdesign-uniapp/components/common/shared/calendar/type.ts
new file mode 100644
index 0000000..0fd05cd
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/shared/calendar/type.ts
@@ -0,0 +1,14 @@
+export type TCalendarValue = number | Date;
+
+export type TDateType = 'selected' | 'disabled' | 'start-end' | 'start' | 'centre' | 'end' | '';
+
+export type TCalendarType = 'single' | 'multiple' | 'range';
+
+export interface TDate {
+ date: Date;
+ day: number;
+ type: TDateType;
+ className?: string;
+ prefix?: string;
+ suffix?: string;
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/shared/color-picker/cmyk.js b/uni_modules/tdesign-uniapp/components/common/shared/color-picker/cmyk.js
new file mode 100644
index 0000000..531c727
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/shared/color-picker/cmyk.js
@@ -0,0 +1,78 @@
+/**
+ * rgb 转 cmyk
+ * @param red
+ * @param green
+ * @param blue
+ * @returns
+ */
+export const rgb2cmyk = (red, green, blue) => {
+ let computedC = 0;
+ let computedM = 0;
+ let computedY = 0;
+ let computedK = 0;
+ const r = parseInt(`${red}`.replace(/\s/g, ''), 10);
+ const g = parseInt(`${green}`.replace(/\s/g, ''), 10);
+ const b = parseInt(`${blue}`.replace(/\s/g, ''), 10);
+ if (r === 0 && g === 0 && b === 0) {
+ computedK = 1;
+ return [0, 0, 0, 1];
+ }
+ computedC = 1 - r / 255;
+ computedM = 1 - g / 255;
+ computedY = 1 - b / 255;
+ const minCMY = Math.min(computedC, Math.min(computedM, computedY));
+ computedC = (computedC - minCMY) / (1 - minCMY);
+ computedM = (computedM - minCMY) / (1 - minCMY);
+ computedY = (computedY - minCMY) / (1 - minCMY);
+ computedK = minCMY;
+ return [computedC, computedM, computedY, computedK];
+};
+/**
+ * cmyk 转 rgb
+ * @param cyan
+ * @param magenta
+ * @param yellow
+ * @param black
+ * @returns
+ */
+export const cmyk2rgb = (cyan, magenta, yellow, black) => {
+ let c = cyan / 100;
+ let m = magenta / 100;
+ let y = yellow / 100;
+ const k = black / 100;
+ c = c * (1 - k) + k;
+ m = m * (1 - k) + k;
+ y = y * (1 - k) + k;
+ let r = 1 - c;
+ let g = 1 - m;
+ let b = 1 - y;
+ r = Math.round(255 * r);
+ g = Math.round(255 * g);
+ b = Math.round(255 * b);
+ return {
+ r,
+ g,
+ b,
+ };
+};
+const REG_CMYK_STRING = /cmyk\((\d+%?),(\d+%?),(\d+%?),(\d+%?)\)/;
+const toNumber = str => Math.max(0, Math.min(255, parseInt(str, 10)));
+/**
+ * 输入色转rgb
+ * @param input
+ * @returns
+ */
+export const cmykInputToColor = (input) => {
+ if (/cmyk/i.test(input)) {
+ const str = input.replace(/\s/g, '');
+ const match = str.match(REG_CMYK_STRING);
+ const c = toNumber(match[1]);
+ const m = toNumber(match[2]);
+ const y = toNumber(match[3]);
+ const k = toNumber(match[4]);
+ const { r, g, b } = cmyk2rgb(c, m, y, k);
+ return `rgb(${r}, ${g}, ${b})`;
+ }
+ return input;
+};
+
diff --git a/uni_modules/tdesign-uniapp/components/common/shared/color-picker/color.js b/uni_modules/tdesign-uniapp/components/common/shared/color-picker/color.js
new file mode 100644
index 0000000..74b123c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/shared/color-picker/color.js
@@ -0,0 +1,428 @@
+import tinyColor from '../../../npm/tinycolor2/esm/tinycolor.js';
+import { cmykInputToColor, rgb2cmyk } from './cmyk';
+import { parseGradientString, isGradientColor } from './gradient';
+
+const mathRound = Math.round;
+const hsv2rgba = states => tinyColor(states).toRgb();
+const hsv2hsva = states => tinyColor(states).toHsv();
+const hsv2hsla = states => tinyColor(states).toHsl();
+/**
+ * 将渐变对象转换成字符串
+ * @param object
+ * @returns
+ */
+export const gradientColors2string = (object) => {
+ const { points, degree } = object;
+ const colorsStop = points
+ .sort((pA, pB) => pA.left - pB.left)
+ .map(p => `${p.color} ${Math.round(p.left * 100) / 100}%`);
+ return `linear-gradient(${degree}deg,${colorsStop.join(',')})`;
+};
+/**
+ * 去除颜色的透明度
+ * @param color
+ * @returns
+ */
+export const getColorWithoutAlpha = color => tinyColor(color).setAlpha(1)
+ .toHexString();
+// 生成一个随机ID
+export const genId = () => (1 + Math.random() * 4294967295).toString(16);
+/**
+ * 生成一个渐变颜色
+ * @param left
+ * @param color
+ * @returns
+ */
+export const genGradientPoint = (left, color) => ({
+ id: genId(),
+ left,
+ color,
+});
+export class Color {
+ constructor(input) {
+ this.states = {
+ s: 100,
+ v: 100,
+ h: 100,
+ a: 1,
+ };
+ this.gradientStates = {
+ colors: [],
+ degree: 0,
+ selectedId: null,
+ css: '',
+ };
+ this.update(input);
+ }
+
+ update(input) {
+ let _a; let _b;
+ const gradientColors = parseGradientString(input);
+ if (this.isGradient && !gradientColors) {
+ // 处理gradient模式下切换不同格式时的交互问题,输入的不是渐变字符串才使用当前处理
+ const colorHsv = tinyColor(input).toHsv();
+ this.states = colorHsv;
+ this.updateCurrentGradientColor();
+ return;
+ }
+ this.originColor = input;
+ this.isGradient = false;
+ let colorInput = input;
+ if (gradientColors) {
+ this.isGradient = true;
+ const object = gradientColors;
+ const points = object.points.map(c => genGradientPoint(c.left, c.color));
+ this.gradientStates = {
+ colors: points,
+ degree: object.degree,
+ selectedId: ((_a = points[0]) === null || _a === void 0 ? void 0 : _a.id) || null,
+ };
+ this.gradientStates.css = this.linearGradient;
+ colorInput = (_b = this.gradientSelectedPoint) === null || _b === void 0 ? void 0 : _b.color;
+ }
+ this.updateStates(colorInput);
+ }
+
+ get saturation() {
+ return this.states.s;
+ }
+
+ set saturation(value) {
+ this.states.s = Math.max(0, Math.min(100, value));
+ this.updateCurrentGradientColor();
+ }
+
+ get value() {
+ return this.states.v;
+ }
+
+ set value(value) {
+ this.states.v = Math.max(0, Math.min(100, value));
+ this.updateCurrentGradientColor();
+ }
+
+ get hue() {
+ return this.states.h;
+ }
+
+ set hue(value) {
+ this.states.h = Math.max(0, Math.min(360, value));
+ this.updateCurrentGradientColor();
+ }
+
+ get alpha() {
+ return this.states.a;
+ }
+
+ set alpha(value) {
+ this.states.a = Math.max(0, Math.min(1, Math.round(value * 100) / 100));
+ this.updateCurrentGradientColor();
+ }
+
+ get rgb() {
+ const { r, g, b } = hsv2rgba(this.states);
+ return `rgb(${mathRound(r)}, ${mathRound(g)}, ${mathRound(b)})`;
+ }
+
+ get rgba() {
+ const { r, g, b, a } = hsv2rgba(this.states);
+ return `rgba(${mathRound(r)}, ${mathRound(g)}, ${mathRound(b)}, ${a})`;
+ }
+
+ get hsv() {
+ const { h, s, v } = this.getHsva();
+ return `hsv(${h}, ${s}%, ${v}%)`;
+ }
+
+ get hsva() {
+ const { h, s, v, a } = this.getHsva();
+ return `hsva(${h}, ${s}%, ${v}%, ${a})`;
+ }
+
+ get hsl() {
+ const { h, s, l } = this.getHsla();
+ return `hsl(${h}, ${s}%, ${l}%)`;
+ }
+
+ get hsla() {
+ const { h, s, l, a } = this.getHsla();
+ return `hsla(${h}, ${s}%, ${l}%, ${a})`;
+ }
+
+ get hex() {
+ return tinyColor(this.states).toHexString();
+ }
+
+ get hex8() {
+ return tinyColor(this.states).toHex8String();
+ }
+
+ get cmyk() {
+ const { c, m, y, k } = this.getCmyk();
+ return `cmyk(${c}, ${m}, ${y}, ${k})`;
+ }
+
+ get css() {
+ if (this.isGradient) {
+ return this.linearGradient;
+ }
+ return this.rgba;
+ }
+
+ get linearGradient() {
+ const { gradientColors, gradientDegree } = this;
+ return gradientColors2string({
+ points: gradientColors,
+ degree: gradientDegree,
+ });
+ }
+
+ get gradientColors() {
+ return this.gradientStates.colors;
+ }
+
+ set gradientColors(colors) {
+ this.gradientStates.colors = colors;
+ this.gradientStates.css = this.linearGradient;
+ }
+
+ get gradientSelectedId() {
+ return this.gradientStates.selectedId;
+ }
+
+ set gradientSelectedId(id) {
+ let _a;
+ if (id === this.gradientSelectedId) {
+ return;
+ }
+ this.gradientStates.selectedId = id;
+ this.updateStates((_a = this.gradientSelectedPoint) === null || _a === void 0 ? void 0 : _a.color);
+ }
+
+ get gradientDegree() {
+ return this.gradientStates.degree;
+ }
+
+ set gradientDegree(degree) {
+ this.gradientStates.degree = Math.max(0, Math.min(360, degree));
+ this.gradientStates.css = this.linearGradient;
+ }
+
+ get gradientSelectedPoint() {
+ const { gradientColors, gradientSelectedId } = this;
+ return gradientColors.find(color => color.id === gradientSelectedId);
+ }
+
+ getFormatsColorMap() {
+ return {
+ HEX: this.hex,
+ CMYK: this.cmyk,
+ RGB: this.rgb,
+ RGBA: this.rgba,
+ HSL: this.hsl,
+ HSLA: this.hsla,
+ HSV: this.hsv,
+ HSVA: this.hsva,
+ CSS: this.css,
+ HEX8: this.hex8,
+ };
+ }
+
+ updateCurrentGradientColor() {
+ const { isGradient, gradientColors, gradientSelectedId } = this;
+ const { length } = gradientColors;
+ const current = this.gradientSelectedPoint;
+ if (!isGradient || length === 0 || !current) {
+ return false;
+ }
+ const index = gradientColors.findIndex(color => color.id === gradientSelectedId);
+ const newColor = { ...current, color: this.rgba };
+ gradientColors.splice(index, 1, newColor);
+ this.gradientColors = gradientColors.slice();
+ return this;
+ }
+
+ updateStates(input) {
+ const color = tinyColor(cmykInputToColor(input));
+ const hsva = color.toHsv();
+ this.states = hsva;
+ }
+
+ getRgba() {
+ const { r, g, b, a } = hsv2rgba(this.states);
+ return {
+ r: mathRound(r),
+ g: mathRound(g),
+ b: mathRound(b),
+ a,
+ };
+ }
+
+ getCmyk() {
+ const { r, g, b } = this.getRgba();
+ const [c, m, y, k] = rgb2cmyk(r, g, b);
+ return {
+ c: mathRound(c * 100),
+ m: mathRound(m * 100),
+ y: mathRound(y * 100),
+ k: mathRound(k * 100),
+ };
+ }
+
+ getHsva() {
+ let { h, s, v, a } = hsv2hsva(this.states);
+ h = mathRound(h);
+ s = mathRound(s * 100);
+ v = mathRound(v * 100);
+ a *= 1;
+ return {
+ h,
+ s,
+ v,
+ a,
+ };
+ }
+
+ getHsla() {
+ let { h, s, l, a } = hsv2hsla(this.states);
+ h = mathRound(h);
+ s = mathRound(s * 100);
+ l = mathRound(l * 100);
+ a *= 1;
+ return {
+ h,
+ s,
+ l,
+ a,
+ };
+ }
+
+ /**
+ * 判断输入色是否与当前色相同
+ * @param color
+ * @returns
+ */
+ equals(color) {
+ return tinyColor.equals(this.rgba, color);
+ }
+
+ /**
+ * 校验输入色是否是一个有效颜色
+ * @param color
+ * @returns
+ */
+ static isValid(color) {
+ if (parseGradientString(color)) {
+ return true;
+ }
+ return tinyColor(color).isValid();
+ }
+
+ static hsva2color(h, s, v, a) {
+ return tinyColor({
+ h,
+ s,
+ v,
+ a,
+ }).toHsvString();
+ }
+
+ static hsla2color(h, s, l, a) {
+ return tinyColor({
+ h,
+ s,
+ l,
+ a,
+ }).toHslString();
+ }
+
+ static rgba2color(r, g, b, a) {
+ return tinyColor({
+ r,
+ g,
+ b,
+ a,
+ }).toHsvString();
+ }
+
+ static hex2color(hex, a) {
+ const color = tinyColor(hex);
+ color.setAlpha(a);
+ return color.toHexString();
+ }
+
+ /**
+ * 对象转颜色字符串
+ * @param object
+ * @param format
+ * @returns
+ */
+ static object2color(object, format) {
+ if (format === 'CMYK') {
+ const { c, m, y, k } = object;
+ return `cmyk(${c}, ${m}, ${y}, ${k})`;
+ }
+ const color = tinyColor(object, {
+ format,
+ });
+ return color.toRgbString();
+ }
+}
+/**
+ * 是否是渐变色
+ * @param input
+ * @returns
+ */
+Color.isGradientColor = input => !!isGradientColor(input);
+/**
+ * 比较两个颜色是否相同
+ * @param color1
+ * @param color2
+ * @returns
+ */
+Color.compare = (color1, color2) => {
+ const isGradientColor1 = Color.isGradientColor(color1);
+ const isGradientColor2 = Color.isGradientColor(color2);
+ if (isGradientColor1 && isGradientColor2) {
+ const gradientColor1 = gradientColors2string(parseGradientString(color1));
+ const gradientColor2 = gradientColors2string(parseGradientString(color2));
+ return gradientColor1 === gradientColor2;
+ }
+ if (!isGradientColor1 && !isGradientColor2) {
+ return tinyColor.equals(color1, color2);
+ }
+ return false;
+};
+const COLOR_OBJECT_OUTPUT_KEYS = [
+ 'alpha',
+ 'css',
+ 'hex',
+ 'hex8',
+ 'hsl',
+ 'hsla',
+ 'hsv',
+ 'hsva',
+ 'rgb',
+ 'rgba',
+ 'saturation',
+ 'value',
+ 'isGradient',
+];
+/**
+ * 获取对外输出的color对象
+ * @param color
+ * @returns
+ */
+export const getColorObject = (color) => {
+ if (!color) {
+ return null;
+ }
+ const colorObject = Object.create(null);
+ // eslint-disable-next-line no-return-assign
+ COLOR_OBJECT_OUTPUT_KEYS.forEach(key => (colorObject[key] = color[key]));
+ if (color.isGradient) {
+ colorObject.linearGradient = color.linearGradient;
+ }
+ return colorObject;
+};
+export default Color;
diff --git a/uni_modules/tdesign-uniapp/components/common/shared/color-picker/gradient.js b/uni_modules/tdesign-uniapp/components/common/shared/color-picker/gradient.js
new file mode 100644
index 0000000..c2fffe9
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/shared/color-picker/gradient.js
@@ -0,0 +1,180 @@
+/**
+ * 用于反解析渐变字符串为对象
+ * https://stackoverflow.com/questions/20215440/parse-css-gradient-rule-with-javascript-regex
+ */
+import tinyColor from '../../../npm/tinycolor2/esm/tinycolor.js';
+import { isString, isNull } from '../../validator';
+/** ../../validator.js
+ * Utility combine multiple regular expressions.
+ *
+ * @param {RegExp[]|string[]} regexpList List of regular expressions or strings.
+ * @param {string} flags Normal RegExp flags.
+ */
+const combineRegExp = (regexpList, flags) => {
+ let source = '';
+ for (let i = 0; i < regexpList.length; i += 1) {
+ if (isString(regexpList[i])) {
+ source += regexpList[i];
+ } else {
+ source += regexpList[i].source;
+ }
+ }
+ return new RegExp(source, flags);
+};
+/**
+ * Generate the required regular expressions once.
+ *
+ * Regular Expressions are easier to manage this way and can be well described.
+ *
+ * @result {object} Object containing regular expressions.
+ */
+const generateRegExp = () => {
+ // Note any variables with "Capture" in name include capturing bracket set(s).
+ const searchFlags = 'gi'; // ignore case for angles, "rgb" etc
+ const rAngle = /(?:[+-]?\d*\.?\d+)(?:deg|grad|rad|turn)/; // Angle +ive, -ive and angle types
+ // optional 2nd part
+ const rSideCornerCapture = /to\s+((?:(?:left|right|top|bottom)(?:\s+(?:top|bottom|left|right))?))/;
+ const rComma = /\s*,\s*/; // Allow space around comma.
+ const rColorHex = /#(?:[a-f0-9]{6}|[a-f0-9]{3})/; // 3 or 6 character form
+ const rDigits3 = /\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*\)/;
+ const // "(1, 2, 3)"
+ rDigits4 = /\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*,\s*\d*\.?\d+\)/;
+ const // "(1, 2, 3, 4)"
+ rValue = /(?:[+-]?\d*\.?\d+)(?:%|[a-z]+)?/;
+ const // ".9", "-5px", "100%".
+ rKeyword = /[_a-z-][_a-z0-9-]*/;
+ const // "red", "transparent".
+ rColor = combineRegExp(['(?:', rColorHex, '|', '(?:rgb|hsl)', rDigits3, '|', '(?:rgba|hsla)', rDigits4, '|', rKeyword, ')'], '');
+ const rColorStop = combineRegExp([rColor, '(?:\\s+', rValue, '(?:\\s+', rValue, ')?)?'], '');
+ const // Single Color Stop, optional %, optional length.
+ rColorStopList = combineRegExp(['(?:', rColorStop, rComma, ')*', rColorStop], '');
+ const // List of color stops min 1.
+ rLineCapture = combineRegExp(['(?:(', rAngle, ')|', rSideCornerCapture, ')'], '');
+ const // Angle or SideCorner
+ rGradientSearch = combineRegExp(['(?:(', rLineCapture, ')', rComma, ')?(', rColorStopList, ')'], searchFlags);
+ const // Capture 1:"line", 2:"angle" (optional), 3:"side corner" (optional) and 4:"stop list".
+ rColorStopSearch = combineRegExp(['\\s*(', rColor, ')', '(?:\\s+', '(', rValue, '))?', '(?:', rComma, '\\s*)?'], searchFlags); // Capture 1:"color" and 2:"position" (optional).
+ return {
+ gradientSearch: rGradientSearch,
+ colorStopSearch: rColorStopSearch,
+ };
+};
+/**
+ * Actually parse the input gradient parameters string into an object for reusability.
+ *
+ *
+ * @note Really this only supports the standard syntax not historical versions, see MDN for details
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient
+ *
+ * @param regExpLib
+ * @param {string} input
+ * @returns {object|undefined}
+ */
+const parseGradient = (regExpLib, input) => {
+ let result;
+ let matchColorStop;
+ let stopResult;
+ // reset search position, because we reuse regex.
+ regExpLib.gradientSearch.lastIndex = 0;
+ const matchGradient = regExpLib.gradientSearch.exec(input);
+ if (!isNull(matchGradient)) {
+ result = {
+ original: matchGradient[0],
+ colorStopList: [],
+ };
+ // Line (Angle or Side-Corner).
+ if (matchGradient[1]) {
+ // eslint-disable-next-line prefer-destructuring
+ result.line = matchGradient[1];
+ }
+ // Angle or undefined if side-corner.
+ if (matchGradient[2]) {
+ // eslint-disable-next-line prefer-destructuring
+ result.angle = matchGradient[2];
+ }
+ // Side-corner or undefined if angle.
+ if (matchGradient[3]) {
+ // eslint-disable-next-line prefer-destructuring
+ result.sideCorner = matchGradient[3];
+ }
+ // reset search position, because we reuse regex.
+ regExpLib.colorStopSearch.lastIndex = 0;
+ // Loop though all the color-stops.
+ matchColorStop = regExpLib.colorStopSearch.exec(matchGradient[4]);
+ while (!isNull(matchColorStop)) {
+ stopResult = {
+ color: matchColorStop[1],
+ };
+ // Position (optional).
+ if (matchColorStop[2]) {
+ // eslint-disable-next-line prefer-destructuring
+ stopResult.position = matchColorStop[2];
+ }
+ result.colorStopList.push(stopResult);
+ // Continue searching from previous position.
+ matchColorStop = regExpLib.colorStopSearch.exec(matchGradient[4]);
+ }
+ }
+ // Can be undefined if match not found.
+ return result;
+};
+const REGEXP_LIB = generateRegExp();
+const REG_GRADIENT = /.*gradient\s*\(((?:\([^)]*\)|[^)(]*)*)\)/gim;
+/**
+ * 验证是否是渐变字符串
+ * @param input
+ * @returns
+ */
+export const isGradientColor = (input) => {
+ REG_GRADIENT.lastIndex = 0;
+ return REG_GRADIENT.exec(input);
+};
+// 边界字符串和角度关系
+const sideCornerDegreeMap = {
+ top: 0,
+ right: 90,
+ bottom: 180,
+ left: 270,
+ 'top left': 225,
+ 'left top': 225,
+ 'top right': 135,
+ 'right top': 135,
+ 'bottom left': 315,
+ 'left bottom': 315,
+ 'bottom right': 45,
+ 'right bottom': 45,
+};
+/**
+ * 解析渐变字符串为 GradientColors 对象
+ * @param input
+ * @returns
+ */
+export const parseGradientString = (input) => {
+ const match = isGradientColor(input);
+ if (!match) {
+ return false;
+ }
+ const gradientColors = {
+ points: [],
+ degree: 0,
+ };
+ const result = parseGradient(REGEXP_LIB, match[1]);
+ if (result.original.trim() !== match[1].trim()) {
+ return false;
+ }
+ const points = result.colorStopList.map(({ color, position }) => {
+ const point = Object.create(null);
+ point.color = tinyColor(color).toRgbString();
+ point.left = parseFloat(position);
+ return point;
+ });
+ gradientColors.points = points;
+ let degree = parseInt(result.angle, 10);
+ if (Number.isNaN(degree)) {
+ degree = sideCornerDegreeMap[result.sideCorner] || 90;
+ }
+ gradientColors.degree = degree;
+ return gradientColors;
+};
+export default parseGradientString;
+
diff --git a/uni_modules/tdesign-uniapp/components/common/shared/color-picker/index.js b/uni_modules/tdesign-uniapp/components/common/shared/color-picker/index.js
new file mode 100644
index 0000000..ad18475
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/shared/color-picker/index.js
@@ -0,0 +1,3 @@
+export * from './cmyk';
+export * from './color';
+export * from './gradient';
diff --git a/uni_modules/tdesign-uniapp/components/common/shared/date.js b/uni_modules/tdesign-uniapp/components/common/shared/date.js
new file mode 100644
index 0000000..5d59db8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/shared/date.js
@@ -0,0 +1,46 @@
+
+export const getDateRect = (date) => {
+ const _date = new Date(date);
+
+ return {
+ year: _date.getFullYear(),
+ month: _date.getMonth(),
+ date: _date.getDate(),
+ day: _date.getDay(),
+ time: _date.getTime(),
+ };
+};
+
+export const isSameDate = (date1, date2) => {
+ if (date1 instanceof Date || typeof date1 === 'number') date1 = getDateRect(date1);
+ if (date2 instanceof Date || typeof date2 === 'number') date2 = getDateRect(date2);
+ const keys = ['year', 'month', 'date'];
+ return keys.every(key => date1[key] === date2[key]);
+};
+
+export const getMonthDateRect = (date) => {
+ const { year, month } = getDateRect(date);
+ const firstDay = new Date(year, month, 1);
+ const weekdayOfFirstDay = firstDay.getDay();
+ const lastDate = new Date(+new Date(year, month + 1, 1) - 24 * 3600 * 1000).getDate();
+
+ return {
+ year,
+ month,
+ weekdayOfFirstDay,
+ lastDate,
+ };
+};
+
+export const isValidDate = val => typeof val === 'number' || val instanceof Date;
+
+export const getDate = (...args) => {
+ const now = new Date();
+ if (args.length === 0) return now;
+ if (args.length === 1 && args[0] <= 1000) {
+ const { year, month, date } = getDateRect(now);
+ return new Date(year, month + args[0], date);
+ }
+ // eslint-disable-next-line prefer-spread
+ return Date.apply(null, args);
+};
diff --git a/uni_modules/tdesign-uniapp/components/common/shared/qrcode/qrcodegen.js b/uni_modules/tdesign-uniapp/components/common/shared/qrcode/qrcodegen.js
new file mode 100644
index 0000000..b75846b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/shared/qrcode/qrcodegen.js
@@ -0,0 +1,884 @@
+/* eslint-disable */
+// Copyright (c) Project Nayuki. (MIT License)
+// https://www.nayuki.io/page/qr-code-generator-library
+// Modification with code reorder and prettier
+// --------------------------------------------
+// Appends the given number of low-order bits of the given value
+// to the given buffer. Requires 0 <= len <= 31 and 0 <= val < 2^len.
+function appendBits(val, len, bb) {
+ if (len < 0 || len > 31 || val >>> len !== 0) {
+ throw new RangeError('Value out of range');
+ }
+ for (let i = len - 1; i >= 0; i-- // Append bit by bit
+ ) {
+ bb.push((val >>> i) & 1);
+ }
+}
+// Returns true iff the i'th bit of x is set to 1.
+function getBit(x, i) {
+ return ((x >>> i) & 1) !== 0;
+}
+// Throws an exception if the given condition is false.
+function assert(cond) {
+ if (!cond) {
+ throw new Error('Assertion error');
+ }
+}
+/* ---- Public helper enumeration ----*/
+/*
+ * Describes how a segment's data bits are numbererpreted. Immutable.
+ */
+export class Mode {
+ constructor(modeBits, numBitsCharCount) {
+ this.modeBits = modeBits;
+ this.numBitsCharCount = numBitsCharCount;
+ }
+ /* -- Method --*/
+ // (Package-private) Returns the bit width of the character count field for a segment in
+ // this mode in a QR Code at the given version number. The result is in the range [0, 16].
+ numCharCountBits(ver) {
+ return this.numBitsCharCount[Math.floor((ver + 7) / 17)];
+ }
+}
+/* -- Constants --*/
+Mode.NUMERIC = new Mode(0x1, [10, 12, 14]);
+Mode.ALPHANUMERIC = new Mode(0x2, [9, 11, 13]);
+Mode.BYTE = new Mode(0x4, [8, 16, 16]);
+Mode.KANJI = new Mode(0x8, [8, 10, 12]);
+Mode.ECI = new Mode(0x7, [0, 0, 0]);
+/* ---- Public helper enumeration ----*/
+/*
+ * The error correction level in a QR Code symbol. Immutable.
+ */
+export class Ecc {
+ constructor(ordinal, formatBits) {
+ this.ordinal = ordinal;
+ this.formatBits = formatBits;
+ }
+}
+/* -- Constants --*/
+Ecc.LOW = new Ecc(0, 1); // The QR Code can tolerate about 7% erroneous codewords
+Ecc.MEDIUM = new Ecc(1, 0); // The QR Code can tolerate about 15% erroneous codewords
+Ecc.QUARTILE = new Ecc(2, 3); // The QR Code can tolerate about 25% erroneous codewords
+Ecc.HIGH = new Ecc(3, 2); // The QR Code can tolerate about 30% erroneous codewords
+/*
+ * A segment of character/binary/control data in a QR Code symbol.
+ * Instances of this class are immutable.
+ * The mid-level way to create a segment is to take the payload data
+ * and call a static factory function such as QrSegment.makeNumeric().
+ * The low-level way to create a segment is to custom-make the bit buffer
+ * and call the QrSegment() constructor with appropriate values.
+ * This segment class imposes no length restrictions, but QR Codes have restrictions.
+ * Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.
+ * Any segment longer than this is meaningless for the purpose of generating QR Codes.
+ */
+export class QrSegment {
+ // Creates a new QR Code segment with the given attributes and data.
+ // The character count (numChars) must agree with the mode and the bit buffer length,
+ // but the constranumber isn't checked. The given bit buffer is cloned and stored.
+ constructor(mode, numChars, bitData) {
+ this.mode = mode;
+ this.numChars = numChars;
+ this.bitData = bitData;
+ if (numChars < 0) {
+ throw new RangeError('Invalid argument');
+ }
+ this.bitData = bitData.slice(); // Make defensive copy
+ }
+ /* -- Static factory functions (mid level) --*/
+ // Returns a segment representing the given binary data encoded in
+ // byte mode. All input byte arrays are acceptable. Any text string
+ // can be converted to UTF-8 bytes and encoded as a byte mode segment.
+ static makeBytes(data) {
+ const bb = [];
+ for (const b of data) {
+ appendBits(b, 8, bb);
+ }
+ return new QrSegment(Mode.BYTE, data.length, bb);
+ }
+ // Returns a segment representing the given string of decimal digits encoded in numeric mode.
+ static makeNumeric(digits) {
+ if (!QrSegment.isNumeric(digits)) {
+ throw new RangeError('String contains non-numeric characters');
+ }
+ const bb = [];
+ for (let i = 0; i < digits.length;) {
+ // Consume up to 3 digits per iteration
+ const n = Math.min(digits.length - i, 3);
+ appendBits(parseInt(digits.substring(i, i + n), 10), n * 3 + 1, bb);
+ i += n;
+ }
+ return new QrSegment(Mode.NUMERIC, digits.length, bb);
+ }
+ // Returns a segment representing the given text string encoded in alphanumeric mode.
+ // The characters allowed are: 0 to 9, A to Z (uppercase only), space,
+ // dollar, percent, asterisk, plus, hyphen, period, slash, colon.
+ static makeAlphanumeric(text) {
+ if (!QrSegment.isAlphanumeric(text)) {
+ throw new RangeError('String contains unencodable characters in alphanumeric mode');
+ }
+ const bb = [];
+ let i;
+ for (i = 0; i + 2 <= text.length; i += 2) {
+ // Process groups of 2
+ let temp = QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)) * 45;
+ temp += QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i + 1));
+ appendBits(temp, 11, bb);
+ }
+ if (i < text.length) {
+ // 1 character remaining
+ appendBits(QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)), 6, bb);
+ }
+ return new QrSegment(Mode.ALPHANUMERIC, text.length, bb);
+ }
+ // Returns a new mutable list of zero or more segments to represent the given Unicode text string.
+ // The result may use various segment modes and switch modes to optimize the length of the bit stream.
+ static makeSegments(text) {
+ // Select the most efficient segment encoding automatically
+ if (text === '') {
+ return [];
+ }
+ if (QrSegment.isNumeric(text)) {
+ return [QrSegment.makeNumeric(text)];
+ }
+ if (QrSegment.isAlphanumeric(text)) {
+ return [QrSegment.makeAlphanumeric(text)];
+ }
+ return [QrSegment.makeBytes(QrSegment.toUtf8ByteArray(text))];
+ }
+ // Returns a segment representing an Extended Channel Interpretation
+ // (ECI) designator with the given assignment value.
+ static makeEci(assignVal) {
+ const bb = [];
+ if (assignVal < 0) {
+ throw new RangeError('ECI assignment value out of range');
+ }
+ else if (assignVal < 1 << 7) {
+ appendBits(assignVal, 8, bb);
+ }
+ else if (assignVal < 1 << 14) {
+ appendBits(0b10, 2, bb);
+ appendBits(assignVal, 14, bb);
+ }
+ else if (assignVal < 1000000) {
+ appendBits(0b110, 3, bb);
+ appendBits(assignVal, 21, bb);
+ }
+ else {
+ throw new RangeError('ECI assignment value out of range');
+ }
+ return new QrSegment(Mode.ECI, 0, bb);
+ }
+ // Tests whether the given string can be encoded as a segment in numeric mode.
+ // A string is encodable iff each character is in the range 0 to 9.
+ static isNumeric(text) {
+ return QrSegment.NUMERIC_REGEX.test(text);
+ }
+ // Tests whether the given string can be encoded as a segment in alphanumeric mode.
+ // A string is encodable iff each character is in the following set: 0 to 9, A to Z
+ // (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.
+ static isAlphanumeric(text) {
+ return QrSegment.ALPHANUMERIC_REGEX.test(text);
+ }
+ /* -- Methods --*/
+ // Returns a new copy of the data bits of this segment.
+ getData() {
+ return this.bitData.slice(); // Make defensive copy
+ }
+ // (Package-private) Calculates and returns the number of bits needed to encode the given segments at
+ // the given version. The result is infinity if a segment has too many characters to fit its length field.
+ static getTotalBits(segs, version) {
+ let result = 0;
+ for (const seg of segs) {
+ const ccbits = seg.mode.numCharCountBits(version);
+ if (seg.numChars >= 1 << ccbits) {
+ return Infinity; // The segment's length doesn't fit the field's bit width
+ }
+ result += 4 + ccbits + seg.bitData.length;
+ }
+ return result;
+ }
+ // Returns a new array of bytes representing the given string encoded in UTF-8.
+ static toUtf8ByteArray(input) {
+ const str = encodeURI(input);
+ const result = [];
+ for (let i = 0; i < str.length; i++) {
+ if (str.charAt(i) !== '%') {
+ result.push(str.charCodeAt(i));
+ }
+ else {
+ result.push(parseInt(str.substring(i + 1, i + 3), 16));
+ i += 2;
+ }
+ }
+ return result;
+ }
+}
+/* -- Constants --*/
+// Describes precisely all strings that are encodable in numeric mode.
+QrSegment.NUMERIC_REGEX = /^[0-9]*$/;
+// Describes precisely all strings that are encodable in alphanumeric mode.
+QrSegment.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\/:-]*$/;
+// The set of all legal characters in alphanumeric mode,
+// where each character value maps to the index in the string.
+QrSegment.ALPHANUMERIC_CHARSET = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:';
+/*
+ * A QR Code symbol, which is a type of two-dimension barcode.
+ * Invented by Denso Wave and described in the ISO/IEC 18004 standard.
+ * Instances of this class represent an immutable square grid of dark and light cells.
+ * The class provides static factory functions to create a QR Code from text or binary data.
+ * The class covers the QR Code Model 2 specification, supporting all versions (sizes)
+ * from 1 to 40, all 4 error correction levels, and 4 character encoding modes.
+ *
+ * Ways to create a QR Code object:
+ * - High level: Take the payload data and call QrCode.encodeText() or QrCode.encodeBinary().
+ * - Mid level: Custom-make the list of segments and call QrCode.encodeSegments().
+ * - Low level: Custom-make the array of data codeword bytes (including
+ * segment headers and final padding, excluding error correction codewords),
+ * supply the appropriate version number, and call the QrCode() constructor.
+ * (Note that all ways require supplying the desired error correction level.)
+ */
+export class QrCode {
+ // Creates a new QR Code with the given version number,
+ // error correction level, data codeword bytes, and mask number.
+ // This is a low-level API that most users should not use directly.
+ // A mid-level API is the encodeSegments() function.
+ constructor(
+ // The version number of this QR Code, which is between 1 and 40 (inclusive).
+ // This determines the size of this barcode.
+ version,
+ // The error correction level used in this QR Code.
+ errorCorrectionLevel, dataCodewords, oriMsk) {
+ // The modules of this QR Code (false = light, true = dark).
+ // Immutable after constructor finishes. Accessed through getModule().
+ this.modules = [];
+ // Indicates function modules that are not subjected to masking. Discarded when constructor finishes.
+ this.isFunction = [];
+ let msk = oriMsk;
+ this.version = version;
+ this.errorCorrectionLevel = errorCorrectionLevel;
+ // Check scalar arguments
+ if (version < QrCode.MIN_VERSION || version > QrCode.MAX_VERSION) {
+ throw new RangeError('Version value out of range');
+ }
+ if (msk < -1 || msk > 7) {
+ throw new RangeError('Mask value out of range');
+ }
+ this.size = version * 4 + 17;
+ // Initialize both grids to be size*size arrays of Boolean false
+ const row = [];
+ for (let i = 0; i < this.size; i++) {
+ row.push(false);
+ }
+ for (let i = 0; i < this.size; i++) {
+ this.modules.push(row.slice()); // Initially all light
+ this.isFunction.push(row.slice());
+ }
+ // Compute ECC, draw modules
+ this.drawFunctionPatterns();
+ const allCodewords = this.addEccAndInterleave(dataCodewords);
+ this.drawCodewords(allCodewords);
+ // Do masking
+ if (msk === -1) {
+ // Automatically choose best mask
+ let minPenalty = 1000000000;
+ for (let i = 0; i < 8; i++) {
+ this.applyMask(i);
+ this.drawFormatBits(i);
+ const penalty = this.getPenaltyScore();
+ if (penalty < minPenalty) {
+ msk = i;
+ minPenalty = penalty;
+ }
+ this.applyMask(i); // Undoes the mask due to XOR
+ }
+ }
+ assert(msk >= 0 && msk <= 7);
+ this.mask = msk;
+ this.applyMask(msk); // Apply the final choice of mask
+ this.drawFormatBits(msk); // Overwrite old format bits
+ this.isFunction = [];
+ }
+ /* -- Static factory functions (high level) --*/
+ // Returns a QR Code representing the given Unicode text string at the given error correction level.
+ // As a conservative upper bound, this function is guaranteed to succeed for strings that have 738 or fewer
+ // Unicode code ponumbers (not UTF-16 code units) if the low error correction level is used. The smallest possible
+ // QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the
+ // ecl argument if it can be done without increasing the version.
+ static encodeText(text, ecl) {
+ const segs = QrSegment.makeSegments(text);
+ return QrCode.encodeSegments(segs, ecl);
+ }
+ // Returns a QR Code representing the given binary data at the given error correction level.
+ // This function always encodes using the binary segment mode, not any text mode. The maximum number of
+ // bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output.
+ // The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.
+ static encodeBinary(data, ecl) {
+ const seg = QrSegment.makeBytes(data);
+ return QrCode.encodeSegments([seg], ecl);
+ }
+ /* -- Static factory functions (mid level) --*/
+ // Returns a QR Code representing the given segments with the given encoding parameters.
+ // The smallest possible QR Code version within the given range is automatically
+ // chosen for the output. Iff boostEcl is true, then the ECC level of the result
+ // may be higher than the ecl argument if it can be done without increasing the
+ // version. The mask number is either between 0 to 7 (inclusive) to force that
+ // mask, or -1 to automatically choose an appropriate mask (which may be slow).
+ // This function allows the user to create a custom sequence of segments that switches
+ // between modes (such as alphanumeric and byte) to encode text in less space.
+ // This is a mid-level API; the high-level API is encodeText() and encodeBinary().
+ static encodeSegments(segs, oriEcl, minVersion = 1, maxVersion = 40, mask = -1, boostEcl = true) {
+ if (!(QrCode.MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= QrCode.MAX_VERSION) ||
+ mask < -1 ||
+ mask > 7) {
+ throw new RangeError('Invalid value');
+ }
+ // Find the minimal version number to use
+ let version;
+ let dataUsedBits;
+ for (version = minVersion;; version++) {
+ const dataCapacityBits = QrCode.getNumDataCodewords(version, oriEcl) * 8; // Number of data bits available
+ const usedBits = QrSegment.getTotalBits(segs, version);
+ if (usedBits <= dataCapacityBits) {
+ dataUsedBits = usedBits;
+ break; // This version number is found to be suitable
+ }
+ if (version >= maxVersion) {
+ // All versions in the range could not fit the given data
+ throw new RangeError('Data too long');
+ }
+ }
+ let ecl = oriEcl;
+ // Increase the error correction level while the data still fits in the current version number
+ for (const newEcl of [Ecc.MEDIUM, Ecc.QUARTILE, Ecc.HIGH]) {
+ // From low to high
+ if (boostEcl && dataUsedBits <= QrCode.getNumDataCodewords(version, newEcl) * 8) {
+ ecl = newEcl;
+ }
+ }
+ // Concatenate all segments to create the data bit string
+ const bb = [];
+ for (const seg of segs) {
+ appendBits(seg.mode.modeBits, 4, bb);
+ appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb);
+ for (const b of seg.getData()) {
+ bb.push(b);
+ }
+ }
+ assert(bb.length === dataUsedBits);
+ // Add terminator and pad up to a byte if applicable
+ const dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8;
+ assert(bb.length <= dataCapacityBits);
+ appendBits(0, Math.min(4, dataCapacityBits - bb.length), bb);
+ appendBits(0, (8 - (bb.length % 8)) % 8, bb);
+ assert(bb.length % 8 === 0);
+ // Pad with alternating bytes until data capacity is reached
+ for (let padByte = 0xec; bb.length < dataCapacityBits; padByte ^= 0xec ^ 0x11) {
+ appendBits(padByte, 8, bb);
+ }
+ // Pack bits numbero bytes in big endian
+ const dataCodewords = [];
+ while (dataCodewords.length * 8 < bb.length) {
+ dataCodewords.push(0);
+ }
+ bb.forEach((b, i) => {
+ dataCodewords[i >>> 3] |= b << (7 - (i & 7));
+ });
+ // Create the QR Code object
+ return new QrCode(version, ecl, dataCodewords, mask);
+ }
+ /* -- Accessor methods --*/
+ // Returns the color of the module (pixel) at the given coordinates, which is false
+ // for light or true for dark. The top left corner has the coordinates (x=0, y=0).
+ // If the given coordinates are out of bounds, then false (light) is returned.
+ getModule(x, y) {
+ return x >= 0 && x < this.size && y >= 0 && y < this.size && this.modules[y][x];
+ }
+ // Modified to expose modules for easy access
+ getModules() {
+ return this.modules;
+ }
+ /* -- Private helper methods for constructor: Drawing function modules --*/
+ // Reads this object's version field, and draws and marks all function modules.
+ drawFunctionPatterns() {
+ // Draw horizontal and vertical timing patterns
+ for (let i = 0; i < this.size; i++) {
+ this.setFunctionModule(6, i, i % 2 === 0);
+ this.setFunctionModule(i, 6, i % 2 === 0);
+ }
+ // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)
+ this.drawFinderPattern(3, 3);
+ this.drawFinderPattern(this.size - 4, 3);
+ this.drawFinderPattern(3, this.size - 4);
+ // Draw numerous alignment patterns
+ const alignPatPos = this.getAlignmentPatternPositions();
+ const numAlign = alignPatPos.length;
+ for (let i = 0; i < numAlign; i++) {
+ for (let j = 0; j < numAlign; j++) {
+ // Don't draw on the three finder corners
+ if (!((i === 0 && j === 0) || (i === 0 && j === numAlign - 1) || (i === numAlign - 1 && j === 0))) {
+ this.drawAlignmentPattern(alignPatPos[i], alignPatPos[j]);
+ }
+ }
+ }
+ // Draw configuration data
+ this.drawFormatBits(0); // Dummy mask value; overwritten later in the constructor
+ this.drawVersion();
+ }
+ // Draws two copies of the format bits (with its own error correction code)
+ // based on the given mask and this object's error correction level field.
+ drawFormatBits(mask) {
+ // Calculate error correction code and pack bits
+ const data = (this.errorCorrectionLevel.formatBits << 3) | mask; // errCorrLvl is unumber2, mask is unumber3
+ let rem = data;
+ for (let i = 0; i < 10; i++) {
+ rem = (rem << 1) ^ ((rem >>> 9) * 0x537);
+ }
+ const bits = ((data << 10) | rem) ^ 0x5412; // unumber15
+ assert(bits >>> 15 === 0);
+ // Draw first copy
+ for (let i = 0; i <= 5; i++) {
+ this.setFunctionModule(8, i, getBit(bits, i));
+ }
+ this.setFunctionModule(8, 7, getBit(bits, 6));
+ this.setFunctionModule(8, 8, getBit(bits, 7));
+ this.setFunctionModule(7, 8, getBit(bits, 8));
+ for (let i = 9; i < 15; i++) {
+ this.setFunctionModule(14 - i, 8, getBit(bits, i));
+ }
+ // Draw second copy
+ for (let i = 0; i < 8; i++) {
+ this.setFunctionModule(this.size - 1 - i, 8, getBit(bits, i));
+ }
+ for (let i = 8; i < 15; i++) {
+ this.setFunctionModule(8, this.size - 15 + i, getBit(bits, i));
+ }
+ this.setFunctionModule(8, this.size - 8, true); // Always dark
+ }
+ // Draws two copies of the version bits (with its own error correction code),
+ // based on this object's version field, iff 7 <= version <= 40.
+ drawVersion() {
+ if (this.version < 7) {
+ return;
+ }
+ // Calculate error correction code and pack bits
+ let rem = this.version; // version is unumber6, in the range [7, 40]
+ for (let i = 0; i < 12; i++) {
+ rem = (rem << 1) ^ ((rem >>> 11) * 0x1f25);
+ }
+ const bits = (this.version << 12) | rem; // unumber18
+ assert(bits >>> 18 === 0);
+ // Draw two copies
+ for (let i = 0; i < 18; i++) {
+ const color = getBit(bits, i);
+ const a = this.size - 11 + (i % 3);
+ const b = Math.floor(i / 3);
+ this.setFunctionModule(a, b, color);
+ this.setFunctionModule(b, a, color);
+ }
+ }
+ // Draws a 9*9 finder pattern including the border separator,
+ // with the center module at (x, y). Modules can be out of bounds.
+ drawFinderPattern(x, y) {
+ for (let dy = -4; dy <= 4; dy++) {
+ for (let dx = -4; dx <= 4; dx++) {
+ const dist = Math.max(Math.abs(dx), Math.abs(dy)); // Chebyshev/infinity norm
+ const xx = x + dx;
+ const yy = y + dy;
+ if (xx >= 0 && xx < this.size && yy >= 0 && yy < this.size) {
+ this.setFunctionModule(xx, yy, dist !== 2 && dist !== 4);
+ }
+ }
+ }
+ }
+ // Draws a 5*5 alignment pattern, with the center module
+ // at (x, y). All modules must be in bounds.
+ drawAlignmentPattern(x, y) {
+ for (let dy = -2; dy <= 2; dy++) {
+ for (let dx = -2; dx <= 2; dx++) {
+ this.setFunctionModule(x + dx, y + dy, Math.max(Math.abs(dx), Math.abs(dy)) !== 1);
+ }
+ }
+ }
+ // Sets the color of a module and marks it as a function module.
+ // Only used by the constructor. Coordinates must be in bounds.
+ setFunctionModule(x, y, isDark) {
+ this.modules[y][x] = isDark;
+ this.isFunction[y][x] = true;
+ }
+ /* -- Private helper methods for constructor: Codewords and masking --*/
+ // Returns a new byte string representing the given data with the appropriate error correction
+ // codewords appended to it, based on this object's version and error correction level.
+ addEccAndInterleave(data) {
+ const ver = this.version;
+ const ecl = this.errorCorrectionLevel;
+ if (data.length !== QrCode.getNumDataCodewords(ver, ecl)) {
+ throw new RangeError('Invalid argument');
+ }
+ // Calculate parameter numbers
+ const numBlocks = QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];
+ const blockEccLen = QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver];
+ const rawCodewords = Math.floor(QrCode.getNumRawDataModules(ver) / 8);
+ const numShortBlocks = numBlocks - (rawCodewords % numBlocks);
+ const shortBlockLen = Math.floor(rawCodewords / numBlocks);
+ // Split data numbero blocks and append ECC to each block
+ const blocks = [];
+ const rsDiv = QrCode.reedSolomonComputeDivisor(blockEccLen);
+ for (let i = 0, k = 0; i < numBlocks; i++) {
+ const dat = data.slice(k, k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1));
+ k += dat.length;
+ const ecc = QrCode.reedSolomonComputeRemainder(dat, rsDiv);
+ if (i < numShortBlocks) {
+ dat.push(0);
+ }
+ blocks.push(dat.concat(ecc));
+ }
+ // Interleave (not concatenate) the bytes from every block numbero a single sequence
+ const result = [];
+ for (let i = 0; i < blocks[0].length; i++) {
+ blocks.forEach((block, j) => {
+ // Skip the padding byte in short blocks
+ if (i !== shortBlockLen - blockEccLen || j >= numShortBlocks) {
+ result.push(block[i]);
+ }
+ });
+ }
+ assert(result.length === rawCodewords);
+ return result;
+ }
+ // Draws the given sequence of 8-bit codewords (data and error correction) onto the entire
+ // data area of this QR Code. Function modules need to be marked off before this is called.
+ drawCodewords(data) {
+ if (data.length !== Math.floor(QrCode.getNumRawDataModules(this.version) / 8)) {
+ throw new RangeError('Invalid argument');
+ }
+ let i = 0; // Bit index numbero the data
+ // Do the funny zigzag scan
+ for (let right = this.size - 1; right >= 1; right -= 2) {
+ // Index of right column in each column pair
+ if (right === 6) {
+ right = 5;
+ }
+ for (let vert = 0; vert < this.size; vert++) {
+ // Vertical counter
+ for (let j = 0; j < 2; j++) {
+ const x = right - j; // Actual x coordinate
+ const upward = ((right + 1) & 2) === 0;
+ const y = upward ? this.size - 1 - vert : vert; // Actual y coordinate
+ if (!this.isFunction[y][x] && i < data.length * 8) {
+ this.modules[y][x] = getBit(data[i >>> 3], 7 - (i & 7));
+ i++;
+ }
+ // If this QR Code has any remainder bits (0 to 7), they were assigned as
+ // 0/false/light by the constructor and are left unchanged by this method
+ }
+ }
+ }
+ assert(i === data.length * 8);
+ }
+ // XORs the codeword modules in this QR Code with the given mask pattern.
+ // The function modules must be marked and the codeword bits must be drawn
+ // before masking. Due to the arithmetic of XOR, calling applyMask() with
+ // the same mask value a second time will undo the mask. A final well-formed
+ // QR Code needs exactly one (not zero, two, etc.) mask applied.
+ applyMask(mask) {
+ if (mask < 0 || mask > 7) {
+ throw new RangeError('Mask value out of range');
+ }
+ for (let y = 0; y < this.size; y++) {
+ for (let x = 0; x < this.size; x++) {
+ let invert;
+ switch (mask) {
+ case 0:
+ invert = (x + y) % 2 === 0;
+ break;
+ case 1:
+ invert = y % 2 === 0;
+ break;
+ case 2:
+ invert = x % 3 === 0;
+ break;
+ case 3:
+ invert = (x + y) % 3 === 0;
+ break;
+ case 4:
+ invert = (Math.floor(x / 3) + Math.floor(y / 2)) % 2 === 0;
+ break;
+ case 5:
+ invert = ((x * y) % 2) + ((x * y) % 3) === 0;
+ break;
+ case 6:
+ invert = (((x * y) % 2) + ((x * y) % 3)) % 2 === 0;
+ break;
+ case 7:
+ invert = (((x + y) % 2) + ((x * y) % 3)) % 2 === 0;
+ break;
+ default:
+ throw new Error('Unreachable');
+ }
+ if (!this.isFunction[y][x] && invert) {
+ this.modules[y][x] = !this.modules[y][x];
+ }
+ }
+ }
+ }
+ // Calculates and returns the penalty score based on state of this QR Code's current modules.
+ // This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.
+ getPenaltyScore() {
+ let result = 0;
+ // Adjacent modules in row having same color, and finder-like patterns
+ for (let y = 0; y < this.size; y++) {
+ let runColor = false;
+ let runX = 0;
+ const runHistory = [0, 0, 0, 0, 0, 0, 0];
+ for (let x = 0; x < this.size; x++) {
+ if (this.modules[y][x] === runColor) {
+ runX++;
+ if (runX === 5) {
+ result += QrCode.PENALTY_N1;
+ }
+ else if (runX > 5) {
+ result++;
+ }
+ }
+ else {
+ this.finderPenaltyAddHistory(runX, runHistory);
+ if (!runColor) {
+ result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;
+ }
+ runColor = this.modules[y][x];
+ runX = 1;
+ }
+ }
+ result += this.finderPenaltyTerminateAndCount(runColor, runX, runHistory) * QrCode.PENALTY_N3;
+ }
+ // Adjacent modules in column having same color, and finder-like patterns
+ for (let x = 0; x < this.size; x++) {
+ let runColor = false;
+ let runY = 0;
+ const runHistory = [0, 0, 0, 0, 0, 0, 0];
+ for (let y = 0; y < this.size; y++) {
+ if (this.modules[y][x] === runColor) {
+ runY++;
+ if (runY === 5) {
+ result += QrCode.PENALTY_N1;
+ }
+ else if (runY > 5) {
+ result++;
+ }
+ }
+ else {
+ this.finderPenaltyAddHistory(runY, runHistory);
+ if (!runColor) {
+ result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;
+ }
+ runColor = this.modules[y][x];
+ runY = 1;
+ }
+ }
+ result += this.finderPenaltyTerminateAndCount(runColor, runY, runHistory) * QrCode.PENALTY_N3;
+ }
+ // 2*2 blocks of modules having same color
+ for (let y = 0; y < this.size - 1; y++) {
+ for (let x = 0; x < this.size - 1; x++) {
+ const color = this.modules[y][x];
+ if (color === this.modules[y][x + 1] &&
+ color === this.modules[y + 1][x] &&
+ color === this.modules[y + 1][x + 1]) {
+ result += QrCode.PENALTY_N2;
+ }
+ }
+ }
+ // Balance of dark and light modules
+ let dark = 0;
+ for (const row of this.modules) {
+ dark = row.reduce((sum, color) => sum + (color ? 1 : 0), dark);
+ }
+ const total = this.size * this.size; // Note that size is odd, so dark/total !== 1/2
+ // Compute the smallest numbereger k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%
+ const k = Math.ceil(Math.abs(dark * 20 - total * 10) / total) - 1;
+ assert(k >= 0 && k <= 9);
+ result += k * QrCode.PENALTY_N4;
+ assert(result >= 0 && result <= 2568888); // Non-tight upper bound based on default values of PENALTY_N1, ..., N4
+ return result;
+ }
+ /* -- Private helper functions --*/
+ // Returns an ascending list of positions of alignment patterns for this version number.
+ // Each position is in the range [0,177), and are used on both the x and y axes.
+ // This could be implemented as lookup table of 40 variable-length lists of numberegers.
+ getAlignmentPatternPositions() {
+ if (this.version === 1) {
+ return [];
+ }
+ const numAlign = Math.floor(this.version / 7) + 2;
+ const step = this.version === 32 ? 26 : Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2;
+ const result = [6];
+ for (let pos = this.size - 7; result.length < numAlign; pos -= step) {
+ result.splice(1, 0, pos);
+ }
+ return result;
+ }
+ // Returns the number of data bits that can be stored in a QR Code of the given version number, after
+ // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.
+ // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.
+ static getNumRawDataModules(ver) {
+ if (ver < QrCode.MIN_VERSION || ver > QrCode.MAX_VERSION) {
+ throw new RangeError('Version number out of range');
+ }
+ let result = (16 * ver + 128) * ver + 64;
+ if (ver >= 2) {
+ const numAlign = Math.floor(ver / 7) + 2;
+ result -= (25 * numAlign - 10) * numAlign - 55;
+ if (ver >= 7) {
+ result -= 36;
+ }
+ }
+ assert(result >= 208 && result <= 29648);
+ return result;
+ }
+ // Returns the number of 8-bit data (i.e. not error correction) codewords contained in any
+ // QR Code of the given version number and error correction level, with remainder bits discarded.
+ // This stateless pure function could be implemented as a (40*4)-cell lookup table.
+ static getNumDataCodewords(ver, ecl) {
+ return (Math.floor(QrCode.getNumRawDataModules(ver) / 8) -
+ QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver] * QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver]);
+ }
+ // Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be
+ // implemented as a lookup table over all possible parameter values, instead of as an algorithm.
+ static reedSolomonComputeDivisor(degree) {
+ if (degree < 1 || degree > 255) {
+ throw new RangeError('Degree out of range');
+ }
+ // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1.
+ // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the unumber8 array [255, 8, 93].
+ const result = [];
+ for (let i = 0; i < degree - 1; i++) {
+ result.push(0);
+ }
+ result.push(1); // Start off with the monomial x^0
+ // Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}),
+ // and drop the highest monomial term which is always 1x^degree.
+ // Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).
+ let root = 1;
+ for (let i = 0; i < degree; i++) {
+ // Multiply the current product by (x - r^i)
+ for (let j = 0; j < result.length; j++) {
+ result[j] = QrCode.reedSolomonMultiply(result[j], root);
+ if (j + 1 < result.length) {
+ result[j] ^= result[j + 1];
+ }
+ }
+ root = QrCode.reedSolomonMultiply(root, 0x02);
+ }
+ return result;
+ }
+ // Returns the Reed-Solomon error correction codeword for the given data and divisor polynomials.
+ static reedSolomonComputeRemainder(data, divisor) {
+ const result = divisor.map(() => 0);
+ for (const b of data) {
+ // Polynomial division
+ const factor = b ^ result.shift();
+ result.push(0);
+ divisor.forEach((coef, i) => {
+ result[i] ^= QrCode.reedSolomonMultiply(coef, factor);
+ });
+ }
+ return result;
+ }
+ // Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result
+ // are unsigned 8-bit numberegers. This could be implemented as a lookup table of 256*256 entries of unumber8.
+ static reedSolomonMultiply(x, y) {
+ if (x >>> 8 !== 0 || y >>> 8 !== 0) {
+ throw new RangeError('Byte out of range');
+ }
+ // Russian peasant multiplication
+ let z = 0;
+ for (let i = 7; i >= 0; i--) {
+ z = (z << 1) ^ ((z >>> 7) * 0x11d);
+ z ^= ((y >>> i) & 1) * x;
+ }
+ assert(z >>> 8 === 0);
+ return z;
+ }
+ // Can only be called immediately after a light run is added, and
+ // returns either 0, 1, or 2. A helper function for getPenaltyScore().
+ finderPenaltyCountPatterns(runHistory) {
+ const n = runHistory[1];
+ assert(n <= this.size * 3);
+ const core = n > 0 && runHistory[2] === n && runHistory[3] === n * 3 && runHistory[4] === n && runHistory[5] === n;
+ return ((core && runHistory[0] >= n * 4 && runHistory[6] >= n ? 1 : 0) +
+ (core && runHistory[6] >= n * 4 && runHistory[0] >= n ? 1 : 0));
+ }
+ // Must be called at the end of a line (row or column) of modules. A helper function for getPenaltyScore().
+ finderPenaltyTerminateAndCount(currentRunColor, oriCurrentRunLength, runHistory) {
+ let currentRunLength = oriCurrentRunLength;
+ if (currentRunColor) {
+ // Terminate dark run
+ this.finderPenaltyAddHistory(currentRunLength, runHistory);
+ currentRunLength = 0;
+ }
+ currentRunLength += this.size; // Add light border to final run
+ this.finderPenaltyAddHistory(currentRunLength, runHistory);
+ return this.finderPenaltyCountPatterns(runHistory);
+ }
+ // Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().
+ finderPenaltyAddHistory(oriCurrentRunLength, runHistory) {
+ let currentRunLength = oriCurrentRunLength;
+ if (runHistory[0] === 0) {
+ currentRunLength += this.size; // Add light border to initial run
+ }
+ runHistory.pop();
+ runHistory.unshift(currentRunLength);
+ }
+}
+/* -- Constants and tables --*/
+// The minimum version number supported in the QR Code Model 2 standard.
+QrCode.MIN_VERSION = 1;
+// The maximum version number supported in the QR Code Model 2 standard.
+QrCode.MAX_VERSION = 40;
+// For use in getPenaltyScore(), when evaluating which mask is best.
+QrCode.PENALTY_N1 = 3;
+QrCode.PENALTY_N2 = 3;
+QrCode.PENALTY_N3 = 40;
+QrCode.PENALTY_N4 = 10;
+QrCode.ECC_CODEWORDS_PER_BLOCK = [
+ // Version: (note that index 0 is for padding, and is set to an illegal value)
+ // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level
+ [
+ -1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30,
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ ],
+ [
+ -1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+ ],
+ [
+ -1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30,
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ ],
+ [
+ -1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30,
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ ], // High
+];
+QrCode.NUM_ERROR_CORRECTION_BLOCKS = [
+ // Version: (note that index 0 is for padding, and is set to an illegal value)
+ // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level
+ [
+ -1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18,
+ 19, 19, 20, 21, 22, 24, 25,
+ ],
+ [
+ -1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31,
+ 33, 35, 37, 38, 40, 43, 45, 47, 49,
+ ],
+ [
+ -1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40,
+ 43, 45, 48, 51, 53, 56, 59, 62, 65, 68,
+ ],
+ [
+ -1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48,
+ 51, 54, 57, 60, 63, 66, 70, 74, 77, 81,
+ ], // High
+];
+
diff --git a/uni_modules/tdesign-uniapp/components/common/shared/qrcode/utils.js b/uni_modules/tdesign-uniapp/components/common/shared/qrcode/utils.js
new file mode 100644
index 0000000..66f8ab1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/shared/qrcode/utils.js
@@ -0,0 +1,124 @@
+import { Ecc } from './qrcodegen';
+// =================== ERROR_LEVEL ==========================
+export const ERROR_LEVEL_MAP = {
+ L: Ecc.LOW,
+ M: Ecc.MEDIUM,
+ Q: Ecc.QUARTILE,
+ H: Ecc.HIGH,
+};
+// =================== DEFAULT_VALUE ==========================
+export const DEFAULT_SIZE = 160;
+export const DEFAULT_LEVEL = 'M';
+export const DEFAULT_BACKGROUND_COLOR = '#FFFFFF';
+export const DEFAULT_FRONT_COLOR = '#000000';
+export const DEFAULT_NEED_MARGIN = false;
+export const DEFAULT_MINVERSION = 1;
+export const SPEC_MARGIN_SIZE = 4;
+export const DEFAULT_MARGIN_SIZE = 0;
+export const DEFAULT_IMG_SCALE = 0.1;
+// =================== UTILS ==========================
+/**
+ * Generate a path string from modules
+ * @param modules
+ * @param margin
+ * @returns
+ */
+export const generatePath = (modules, margin = 0) => {
+ const ops = [];
+ modules.forEach((row, y) => {
+ let start = null;
+ row.forEach((cell, x) => {
+ if (!cell && start !== null) {
+ ops.push(`M${start + margin} ${y + margin}h${x - start}v1H${start + margin}z`);
+ start = null;
+ return;
+ }
+ if (x === row.length - 1) {
+ if (!cell) {
+ return;
+ }
+ if (start === null) {
+ ops.push(`M${x + margin},${y + margin} h1v1H${x + margin}z`);
+ } else {
+ ops.push(`M${start + margin},${y + margin} h${x + 1 - start}v1H${start + margin}z`);
+ }
+ return;
+ }
+ if (cell && start === null) {
+ start = x;
+ }
+ });
+ });
+ return ops.join('');
+};
+/**
+ * Excavate modules
+ * @param modules
+ * @param excavation
+ * @returns
+ */
+export const excavateModules = (modules, excavation) => modules.slice().map((row, y) => {
+ if (y < excavation.y || y >= excavation.y + excavation.h) {
+ return row;
+ }
+ return row.map((cell, x) => {
+ if (x < excavation.x || x >= excavation.x + excavation.w) {
+ return cell;
+ }
+ return false;
+ });
+});
+/**
+ * Get image settings
+ * @param cells The modules of the QR code
+ * @param size The size of the QR code
+ * @param margin
+ * @param imageSettings
+ * @returns
+ */
+export const getImageSettings = (cells, size, margin, imageSettings) => {
+ if (imageSettings == null) {
+ return null;
+ }
+ const numCells = cells.length + margin * 2;
+ const defaultSize = Math.floor(size * DEFAULT_IMG_SCALE);
+ const scale = numCells / size;
+ const w = (imageSettings.width || defaultSize) * scale;
+ const h = (imageSettings.height || defaultSize) * scale;
+ const x = imageSettings.x == null ? cells.length / 2 - w / 2 : imageSettings.x * scale;
+ const y = imageSettings.y == null ? cells.length / 2 - h / 2 : imageSettings.y * scale;
+ const opacity = imageSettings.opacity == null ? 1 : imageSettings.opacity;
+ let excavation = null;
+ if (imageSettings.excavate) {
+ const floorX = Math.floor(x);
+ const floorY = Math.floor(y);
+ const ceilW = Math.ceil(w + x - floorX);
+ const ceilH = Math.ceil(h + y - floorY);
+ excavation = { x: floorX, y: floorY, w: ceilW, h: ceilH };
+ }
+ const { crossOrigin } = imageSettings;
+ return { x, y, h, w, excavation, opacity, crossOrigin };
+};
+/**
+ * Get margin size
+ * @param needMargin Whether need margin
+ * @param marginSize Custom margin size
+ * @returns
+ */
+export const getMarginSize = (needMargin, marginSize) => {
+ if (marginSize != null) {
+ return Math.max(Math.floor(marginSize), 0);
+ }
+ return needMargin ? SPEC_MARGIN_SIZE : DEFAULT_MARGIN_SIZE;
+};
+/**
+ * Check if Path2D is supported
+ */
+export const isSupportPath2d = (() => {
+ try {
+ new Path2D().addPath(new Path2D());
+ } catch (_a) {
+ return false;
+ }
+ return true;
+})();
diff --git a/uni_modules/tdesign-uniapp/components/common/src/control.js b/uni_modules/tdesign-uniapp/components/common/src/control.js
new file mode 100644
index 0000000..777c09f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/src/control.js
@@ -0,0 +1,66 @@
+const defaultOption = {
+ valueKey: 'value',
+ defaultValueKey: 'defaultValue',
+ changeEventName: 'change',
+ strict: true,
+};
+/**
+ * 受控函数
+ * 用法示例:
+ * {
+ * attached() {
+ * this.control = useControl.call(this);
+ * }
+ * }
+ * 注意事项:
+ * 1:命名规范:约束value等命名,一般不需要改。内部属性统一命名以_开头。
+ * 2:value默认值:小程序number类型未传值(undefined)会初始化为0,导致无法判断。建议默认值设置为null
+ * 3:prop变化:需要开发者自己监听,observers = { value(val):{ this.control.set(val) } }
+ * @param this 页面实例
+ * @param option 配置项 参见ControlOption
+ * @returns
+ */
+function useControl(option) {
+ const { valueKey, defaultValueKey, changeEventName, strict } = {
+ ...defaultOption,
+ ...option,
+ };
+ const props = this.properties || {};
+ const value = props[valueKey];
+ // 半受控时,不需要defaultValueKey,默认值与valueKey相同
+ const defaultValue = props[strict ? defaultValueKey : valueKey];
+ let controlled = false;
+ // 完全受控模式:检查受控属性,判断是否受控
+ if (strict && typeof value !== 'undefined' && value !== null) {
+ controlled = true;
+ }
+ const set = (newVal, extObj, fn) => {
+ this.setData(
+ {
+ [`_${valueKey}`]: newVal,
+ ...extObj,
+ },
+ fn,
+ );
+ };
+ return {
+ controlled,
+ initValue: controlled ? value : defaultValue,
+ set,
+ get: () => this.data[`_${valueKey}`],
+ change: (newVal, customChangeData, customUpdateFn) => {
+ this.$emit(changeEventName, typeof customChangeData !== 'undefined' ? customChangeData : newVal);
+ // 完全受控模式,使用了受控属性,必须配合change事件来更新
+ if (controlled) {
+ return;
+ }
+ if (typeof customUpdateFn === 'function') {
+ customUpdateFn();
+ } else {
+ set(newVal);
+ }
+ },
+ };
+}
+
+export { useControl };
diff --git a/uni_modules/tdesign-uniapp/components/common/src/flatTool.js b/uni_modules/tdesign-uniapp/components/common/src/flatTool.js
new file mode 100644
index 0000000..7828119
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/src/flatTool.js
@@ -0,0 +1,99 @@
+import { isObject } from '../validator';
+
+/** ****************************************************************
+ MIT License https://github.com/qiu8310/minapp/blob/v1.0.0-alpha.1/packages/minapp-core/src/system/util/object.ts
+ Author Mora (https://github.com/qiu8310)
+****************************************************************** */
+
+export const getPrototypeOf = function (obj) {
+ return Object.getPrototypeOf ? Object.getPrototypeOf(obj) : obj.__proto__;
+};
+
+/**
+ * 遍历继承关系类的 prototype
+ *
+ * @export
+ * @param {Function} callback - 回调函数,函数参数是遍历的每个实例的 prototype,函数如果返回 false,会终止遍历
+ * @param {any} fromCtor - 要遍历的起始 class 或 prototype
+ * @param {any} toCtor - 要遍历的结束 class 或 prototype
+ * @param {boolean} [includeToCtor=true] - 是否要包含结束 toCtor 本身
+ *
+ * @example
+ * A -> B -> C
+ *
+ * 在 C 中调用: iterateInheritedPrototype(fn, A, C, true)
+ * 则,fn 会被调用三次,分别是 fn(A.prototype) fn(B.prototype) fn(C.prototype)
+ */
+export const iterateInheritedPrototype = function iterateInheritedPrototype(
+ callback,
+ fromCtor,
+ toCtor,
+ includeToCtor = true,
+) {
+ let proto = fromCtor.prototype || fromCtor;
+ const toProto = toCtor.prototype || toCtor;
+
+ while (proto) {
+ if (!includeToCtor && proto === toProto) break;
+ if (callback(proto) === false) break;
+ if (proto === toProto) break;
+ proto = getPrototypeOf(proto);
+ }
+};
+
+
+/**
+ *
+ * 将一个可能包含原型链的对象扁平化成单个对象
+ *
+ * 如,现有这样的类的继承关系 A -> B -> C,当创建一个实例 a = new A() 时
+ *
+ * a 实例会存有 B、C 的原型链,使用此函数 newa = toObject(a) 之后,
+ * newa 就会变成一个 PlainObject,但它有 A、B、C 上的所有属性和方法,
+ * 当然不包括静态属性或方法
+ *
+ * 注意1:用此方法的话,尽量避免在类中使用胖函数,胖函数的 this 死死的绑定
+ * 在原对象中,无法重新绑定
+ *
+ * 注意2:类继承的时候不要在函数中调用 super,toObject 之后是扁平的,没有 super 之说
+ */
+export const toObject = function toObject(
+ something,
+ options = {},
+) {
+ const obj = {};
+ if (!isObject(something)) return obj;
+
+ const excludes = options.excludes || ['constructor'];
+ const { enumerable = true, configurable = 0, writable = 0 } = options;
+ const defaultDesc = {};
+ if (enumerable !== 0) defaultDesc.enumerable = enumerable;
+ if (configurable !== 0) defaultDesc.configurable = configurable;
+ if (writable !== 0) defaultDesc.writable = writable;
+
+ iterateInheritedPrototype(
+ (proto) => {
+ Object.getOwnPropertyNames(proto).forEach((key) => {
+ if (excludes.indexOf(key) >= 0) return;
+ if (Object.prototype.hasOwnProperty.call(obj, key)) return;
+ const desc = Object.getOwnPropertyDescriptor(proto, key);
+
+ const fnKeys = ['get', 'set', 'value'];
+ fnKeys.forEach((k) => {
+ if (typeof desc[k] === 'function') {
+ const oldFn = desc[k];
+ desc[k] = function (...args) {
+ return oldFn.apply(Object.prototype.hasOwnProperty.call(options, 'bindTo') ? options.bindTo : this, args);
+ };
+ }
+ });
+ Object.defineProperty(obj, key, { ...desc, ...defaultDesc });
+ });
+ },
+ something,
+ options.till || Object,
+ false,
+ );
+
+ return obj;
+};
diff --git a/uni_modules/tdesign-uniapp/components/common/src/index.js b/uni_modules/tdesign-uniapp/components/common/src/index.js
new file mode 100644
index 0000000..94e7ce1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/src/index.js
@@ -0,0 +1,4 @@
+export * from './superComponent';
+export * from './flatTool';
+export * from './instantiationDecorator';
+export * from './control';
diff --git a/uni_modules/tdesign-uniapp/components/common/src/instantiationDecorator.js b/uni_modules/tdesign-uniapp/components/common/src/instantiationDecorator.js
new file mode 100644
index 0000000..c099aec
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/src/instantiationDecorator.js
@@ -0,0 +1,251 @@
+/* eslint-disable no-param-reassign */
+import { isPlainObject } from '../validator';
+import { canUseVirtualHost } from '../version';
+import { toCamel, toPascal, hyphenate } from '../utils';
+
+const getInnerControlledValue = key => `data${key.replace(/^(\w)/, (e, t) => t.toUpperCase())}`;
+const getDefaultKey = key => `default${key.replace(/^(\w)/, (e, t) => t.toUpperCase())}`;
+
+const ARIAL_PROPS = [
+ { key: 'ariaHidden', type: Boolean },
+ { key: 'ariaRole', type: String },
+ { key: 'ariaLabel', type: String },
+ { key: 'ariaLabelledby', type: String },
+ { key: 'ariaDescribedby', type: String },
+ { key: 'ariaBusy', type: Boolean },
+];
+
+const getPropsDefault = (type, disableBoolean = false) => {
+ if (type === Boolean && !disableBoolean) {
+ return false;
+ }
+ if (type === String) {
+ return '';
+ }
+ return undefined;
+};
+
+const COMMON_PROPS = {
+ ...ARIAL_PROPS.reduce((acc, item) => ({
+ ...acc,
+ [item.key]: {
+ type: item.type,
+ default: getPropsDefault(item.type),
+ },
+ }), {}),
+
+ customStyle: { type: [String, Object], default: '' },
+};
+
+
+export const toComponent = function (options) {
+ if (!options.properties && options.props) {
+ options.properties = options.props;
+ }
+
+ if (options.properties) {
+ Object.keys(options.properties).forEach((k) => {
+ let opt = options.properties[k];
+ // 如果不是 Object 类型,则默认指定 type = options.properties[k];
+ if (!isPlainObject(opt)) {
+ opt = { type: opt };
+ }
+ options.properties[k] = opt;
+ });
+ }
+
+ if (!options.methods) options.methods = {};
+
+ if (!options.lifetimes) options.lifetimes = {};
+
+ const oldCreated = options.created;
+ const { controlledProps = [] } = options;
+
+ options.created = function (...args) {
+ if (oldCreated) {
+ oldCreated.apply(this, args);
+ }
+ controlledProps.forEach(({ key }) => {
+ const defaultKey = getDefaultKey(key);
+ const tDataKey = getInnerControlledValue(key);
+ this[tDataKey] = this[key];
+
+ if (this[key] == null) {
+ this._selfControlled = true;
+ }
+
+ if (this[key] == null && this[defaultKey] != null) {
+ this[tDataKey] = this[defaultKey];
+ }
+ });
+ };
+
+ options.methods._trigger = function (evtName, detail, opts) {
+ const target = controlledProps.find(item => item.event === evtName);
+
+ if (target) {
+ const { key } = target;
+ if (this._selfControlled) {
+ const tDataKey = getInnerControlledValue(key);
+ this[tDataKey] = detail[key];
+ }
+ this.$emit(
+ `update:${key}`,
+ detail[key],
+ opts,
+ );
+ }
+
+ this.$emit(
+ evtName,
+ detail,
+ opts,
+ );
+ };
+ return options;
+};
+
+
+/**
+ * 将一个继承了 BaseComponent 的类转化成 小程序 Component 的调用
+ * 根据最新的微信 d.ts 描述文件,Component 在实例化的时候,会忽略不支持的自定义属性
+ */
+export const wxComponent = function wxComponent() {
+ return function (baseConstructor) {
+ class WxComponent extends baseConstructor {
+ // 暂时移除了冗余的代码,后续补充
+ }
+
+ const current = new WxComponent();
+
+ current.options = current.options || {};
+
+ // 所有组件默认都开启css作用域
+ // 写到这里是为了防止组件设置 options 时无意覆盖掉了 addGlobalClass
+ // 使用 "styleIsolation": "apply-shared" 代替 addGlobalClass: true,see https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/glass-easel/migration.html#JSON-%E9%85%8D%E7%BD%AE
+ // if (current.options.addGlobalClass === undefined) {
+ // current.options.addGlobalClass = true;
+ // }
+
+ if (canUseVirtualHost() && current.options.virtualHost == null) {
+ current.options.virtualHost = true;
+ }
+
+ const obj = toComponent(current);
+
+ return obj;
+ };
+};
+
+function sortPropsType(type) {
+ if (!Array.isArray(type)) {
+ return type;
+ }
+ type.sort((a, b) => {
+ if (a === Boolean) {
+ return -1;
+ }
+ if (b === Boolean) {
+ return 1;
+ }
+ return 0;
+ });
+ return type;
+}
+
+function filterProps(props, controlledProps) {
+ const newProps = {};
+ const emits = [];
+ const reg = /^on[A-Z][a-z]/;
+ const controlledKeys = Object.values(controlledProps).map(item => item.key);
+ const unControlledKeys = controlledKeys.map(key => getDefaultKey(key));
+
+ Object.keys(props).forEach((key) => {
+ const curType = props[key].type || props[key];
+
+ if (reg.test(key) && props[key].type === Function) {
+ const str = key.replace(/^on/, '');
+ const eventName = str.charAt(0).toLowerCase() + str.slice(1);
+ emits.push(...[hyphenate(eventName), eventName]);
+ } else if (controlledKeys.indexOf(key) > -1
+ || unControlledKeys.indexOf(key) > -1
+ ) {
+ const newType = Array.isArray(curType) ? curType : [curType];
+ newProps[key] = {
+ type: [null, ...newType],
+ default: null,
+ };
+ } else if (
+ [Boolean, String].indexOf(props[key].type) > -1
+ && props[key].default === undefined
+ ) {
+ newProps[key] = {
+ ...props[key],
+ default: getPropsDefault(props[key].type, true),
+ };
+ } else {
+ newProps[key] = {
+ ...(typeof props[key] === 'object' ? props[key] : {}),
+ type: sortPropsType(curType),
+ };
+ }
+ });
+
+ return {
+ newProps,
+ emits,
+ };
+}
+
+const getEmitsByControlledProps = controlledProps => Object.values(controlledProps).map(item => `update:${item.key}`);
+
+export const uniComponent = function (info) {
+ const { newProps, emits } = filterProps(info.props || {}, info.controlledProps || {});
+ info.props = {
+ ...getExternalClasses(info),
+ ...newProps,
+ ...COMMON_PROPS,
+ };
+ info.emits = Array.from(new Set([
+ ...(info.emits || []),
+
+ ...(getEmitsByControlledProps(info.controlledProps || {})),
+ ...emits,
+ ]));
+
+ info.options = {
+ ...(info.options || {}),
+ multipleSlots: true,
+ };
+
+ if (canUseVirtualHost() && info.options.virtualHost == null) {
+ info.options.virtualHost = true;
+ }
+
+ if (!info.options.styleIsolation) {
+ info.options.styleIsolation = 'shared';
+ }
+ if (info.name) {
+ info.name = toPascal(info.name);
+ }
+
+ const obj = toComponent(info);
+ return obj;
+};
+
+
+export function getExternalClasses(info) {
+ if (!info.externalClasses) {
+ return {};
+ }
+ const { externalClasses } = info;
+ const list = Array.isArray(externalClasses) ? externalClasses : [externalClasses];
+
+ return list.reduce((acc, item) => ({
+ ...acc,
+ [toCamel(item)]: {
+ type: String,
+ default: '',
+ },
+ }), {});
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/src/superComponent.js b/uni_modules/tdesign-uniapp/components/common/src/superComponent.js
new file mode 100644
index 0000000..3f85068
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/src/superComponent.js
@@ -0,0 +1,5 @@
+export class SuperComponent {
+ constructor() {
+ this.app = getApp();
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/_variables.less b/uni_modules/tdesign-uniapp/components/common/style/_variables.less
new file mode 100644
index 0000000..9bdf019
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/_variables.less
@@ -0,0 +1,232 @@
+// 公共前缀
+@prefix: t;
+
+@primary-color-1: var(--td-primary-color-1, #f2f3ff);
+@primary-color-2: var(--td-primary-color-2, #d9e1ff);
+@primary-color-3: var(--td-primary-color-3, #b5c7ff);
+@primary-color-4: var(--td-primary-color-4, #8eabff);
+@primary-color-5: var(--td-primary-color-5, #618dff);
+@primary-color-6: var(--td-primary-color-6, #366ef4);
+@primary-color-7: var(--td-primary-color-7, #0052d9);
+@primary-color-8: var(--td-primary-color-8, #003cab);
+@primary-color-9: var(--td-primary-color-9, #002a7c);
+@primary-color-10: var(--td-primary-color-10, #001a57);
+
+@error-color-1: var(--td-error-color-1, #fff0ed);
+@error-color-2: var(--td-error-color-2, #ffd8d2);
+@error-color-3: var(--td-error-color-3, #ffb9b0);
+@error-color-4: var(--td-error-color-4, #ff9285);
+@error-color-5: var(--td-error-color-5, #f6685d);
+@error-color-6: var(--td-error-color-6, #d54941);
+@error-color-7: var(--td-error-color-7, #ad352f);
+@error-color-8: var(--td-error-color-8, #881f1c);
+@error-color-9: var(--td-error-color-9, #68070a);
+@error-color-10: var(--td-error-color-10, #490002);
+
+@warning-color-1: var(--td-warning-color-1, #fff1e9);
+@warning-color-2: var(--td-warning-color-2, #ffd9c2);
+@warning-color-3: var(--td-warning-color-3, #ffb98c);
+@warning-color-4: var(--td-warning-color-4, #fa9550);
+@warning-color-5: var(--td-warning-color-5, #e37318);
+@warning-color-6: var(--td-warning-color-6, #be5a00);
+@warning-color-7: var(--td-warning-color-7, #954500);
+@warning-color-8: var(--td-warning-color-8, #713300);
+@warning-color-9: var(--td-warning-color-9, #532300);
+@warning-color-10: var(--td-warning-color-10, #3b1700);
+
+@success-color-1: var(--td-success-color-1, #e3f9e9);
+@success-color-2: var(--td-success-color-2, #c6f3d7);
+@success-color-3: var(--td-success-color-3, #92dab2);
+@success-color-4: var(--td-success-color-4, #56c08d);
+@success-color-5: var(--td-success-color-5, #2ba471);
+@success-color-6: var(--td-success-color-6, #008858);
+@success-color-7: var(--td-success-color-7, #006c45);
+@success-color-8: var(--td-success-color-8, #005334);
+@success-color-9: var(--td-success-color-9, #003b23);
+@success-color-10: var(--td-success-color-10, #002515);
+
+@gray-color-1: var(--td-gray-color-1, #f3f3f3);
+@gray-color-2: var(--td-gray-color-2, #eeeeee);
+@gray-color-3: var(--td-gray-color-3, #e7e7e7);
+@gray-color-4: var(--td-gray-color-4, #dcdcdc);
+@gray-color-5: var(--td-gray-color-5, #c5c5c5);
+@gray-color-6: var(--td-gray-color-6, #a6a6a6);
+@gray-color-7: var(--td-gray-color-7, #8b8b8b);
+@gray-color-8: var(--td-gray-color-8, #777777);
+@gray-color-9: var(--td-gray-color-9, #5e5e5e);
+@gray-color-10: var(--td-gray-color-10, #4b4b4b);
+@gray-color-11: var(--td-gray-color-11, #383838);
+@gray-color-12: var(--td-gray-color-12, #2c2c2c);
+@gray-color-13: var(--td-gray-color-13, #242424);
+@gray-color-14: var(--td-gray-color-14, #181818);
+
+@font-gray-1: var(--td-font-gray-1, rgba(0, 0, 0, 0.9));
+@font-gray-2: var(--td-font-gray-2, rgba(0, 0, 0, 0.6));
+@font-gray-3: var(--td-font-gray-3, rgba(0, 0, 0, 0.4));
+@font-gray-4: var(--td-font-gray-4, rgba(0, 0, 0, 0.26));
+
+@font-white-1: var(--td-font-white-1, rgba(255, 255, 255, 1));
+@font-white-2: var(--td-font-white-2, rgba(255, 255, 255, 0.55));
+@font-white-3: var(--td-font-white-3, rgba(255, 255, 255, 0.35));
+@font-white-4: var(--td-font-white-4, rgba(255, 255, 255, 0.22));
+
+// 边框色
+@border-color: var(--td-border-color, @gray-color-3);
+
+// Spacer
+@spacer: var(--td-spacer, 16rpx);
+@spacer-1: var(--td-spacer-1, 24rpx); // 间距-小-x
+@spacer-2: var(--td-spacer-2, 32rpx); // 间距-小
+@spacer-3: var(--td-spacer-3, 48rpx); // 间距-中
+@spacer-4: var(--td-spacer-4, 64rpx); // 间距-大
+@spacer-5: var(--td-spacer-5, 96rpx); // 间距-大-x
+@spacer-6: var(--td-spacer-6, 160rpx); // 间距-大-xx
+
+@text-line-height: var(--td-line-height-body-extraSmall, 16px);
+@text-line-height-xs: var(--td-line-height-body-extraSmall, @text-line-height);
+@text-line-height-s: var(--td-line-height-body-small, 20px);
+@text-line-height-base: var(--td-line-height-title-small, 22px);
+@text-line-height-m: var(--td-line-height-title-medium, 24px);
+@text-line-height-l: var(--td-line-height-title-large, 26px);
+@text-line-height-xl: var(--td-line-height-title-extraLarge, 28px);
+@text-line-height-xxl: var(--td-line-height-headline-large, 44px);
+
+// Font
+@font-size: var(--td-font-size, 20rpx);
+@font-size-xs: var(--td-font-size-xs, @font-size); // 字号-一级字号
+@font-size-s: var(--td-font-size-s, 24rpx); // 字号-二级字号
+@font-size-base: var(--td-font-size-base, 28rpx); // 字号-三级字号
+@font-size-m: var(--td-font-size-m, 32rpx); // 字号-二级字号
+@font-size-l: var(--td-font-size-l, 36rpx); // 字号-四级字号
+@font-size-xl: var(--td-font-size-xl, 40rpx); // 字号-五级字号
+@font-size-xxl: var(--td-font-size-xxl, 72rpx);
+
+@font-family: var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular); // 字体-磅数-常规
+@font-family-medium: var(--td-font-family-medium, PingFang SC, Microsoft YaHei, Arial Medium); // 字体-磅数-粗体
+
+// 使用以下与Design Token对应的font token开发组件对应字体、行高
+@font-link-small: var(--td-font-link-small, 24rpx / 40rpx @font-family);
+@font-link-medium: var(--td-font-link-medium, 28rpx / 44rpx @font-family);
+@font-link-large: var(--td-font-link-large, 32rpx / 48rpx @font-family);
+@font-mark-extraSmall: var(--td-font-mark-extraSmall, 600 20rpx / 32rpx @font-family);
+@font-mark-small: var(--td-font-mark-small, 600 24rpx / 40rpx @font-family);
+@font-mark-medium: var(--td-font-mark-medium, 600 28rpx / 44rpx @font-family);
+@font-mark-large: var(--td-font-mark-large, 600 32rpx / 48rpx @font-family);
+@font-body-extraSmall: var(--td-font-body-extraSmall, 20rpx / 32rpx @font-family);
+@font-body-small: var(--td-font-body-small, 24rpx / 40rpx @font-family);
+@font-body-medium: var(--td-font-body-medium, 28rpx / 44rpx @font-family);
+@font-body-large: var(--td-font-body-large, 32rpx / 48rpx @font-family);
+@font-title-small: var(--td-font-title-small, 600 28rpx / 44rpx @font-family);
+@font-title-medium: var(--td-font-title-medium, 600 32rpx / 48rpx @font-family);
+@font-title-large: var(--td-font-title-large, 600 36rpx / 52rpx @font-family);
+@font-title-extraLarge: var(--td-font-title-extraLarge, 600 40rpx / 56rpx @font-family);
+@font-headline-small: var(--td-font-headline-small, 600 48rpx / 64rpx @font-family);
+@font-headline-medium: var(--td-font-headline-medium, 600 56rpx / 72rpx @font-family);
+@font-headline-large: var(--td-font-headline-large, 600 72rpx / 88rpx @font-family);
+@font-display-medium: var(--td-font-display-medium, 600 96rpx / 112rpx @font-family);
+@font-display-large: var(--td-font-display-large, 600 128rpx / 144rpx @font-family);
+
+// 圆角
+@radius-small: var(--td-radius-small, 6rpx);
+@radius-default: var(--td-radius-default, 12rpx);
+@radius-large: var(--td-radius-large, 18rpx);
+@radius-extraLarge: var(--td-radius-extraLarge, 24rpx);
+@radius-round: var(--td-radius-round, 999px);
+@radius-circle: var(--td-radius-circle, 50%);
+
+// 阴影
+@shadow-1: var(
+ --td-shadow-1,
+ 0 1px 10px rgba(0, 0, 0, 5%),
+ 0 4px 5px rgba(0, 0, 0, 8%),
+ 0 2px 4px -1px rgba(0, 0, 0, 12%)
+);
+@shadow-2: var(
+ --td-shadow-2,
+ 0 3px 14px 2px rgba(0, 0, 0, 5%),
+ 0 8px 10px 1px rgba(0, 0, 0, 6%),
+ 0 5px 5px -3px rgba(0, 0, 0, 10%)
+);
+@shadow-3: var(
+ --td-shadow-3,
+ 0 6px 30px 5px rgba(0, 0, 0, 5%),
+ 0 16px 24px 2px rgba(0, 0, 0, 4%),
+ 0 8px 10px -5px rgba(0, 0, 0, 8%)
+);
+@shadow-4: var(--td-shadow-4, 0 2px 8px 0 rgba(0, 0, 0, 0.06));
+
+// 动画
+@anim-time-fn-easing: var(--td-anim-time-fn-easing, cubic-bezier(0.38, 0, 0.24, 1));
+@anim-time-fn-ease-out: var(--td-anim-time-fn-ease-out, cubic-bezier(0, 0, 0.15, 1));
+@anim-time-fn-ease-in: var(--td-anim-time-fn-ease-in, cubic-bezier(0.82, 0, 1, 0.9));
+@anim-duration-base: var(--td-anim-duration-base, 0.2s);
+@anim-duration-moderate: var(--td-anim-duration-moderate, 0.24s);
+@anim-duration-slow: var(--td-anim-duration-slow, 0.28s);
+
+// 容器
+@bg-color-page: var(--td-bg-color-page, @gray-color-1);
+@bg-color-container: var(--td-bg-color-container, @font-white-1);
+@bg-color-container-active: var(--td-bg-color-container-active, @gray-color-3);
+
+@bg-color-secondarycontainer: var(--td-bg-color-secondarycontainer, @gray-color-1);
+@bg-color-secondarycontainer-active: var(--td-bg-color-secondarycontainer-active, @gray-color-4);
+
+@bg-color-component: var(--td-bg-color-component, @gray-color-3);
+@bg-color-component-active: var(--td-bg-color-component-active, @gray-color-6);
+@bg-color-component-disabled: var(--td-bg-color-component-disabled, @gray-color-2);
+
+@bg-color-secondarycomponent: var(--td-bg-color-secondarycomponent, @gray-color-4);
+@bg-color-secondarycomponent-active: var(--td-bg-color-secondarycomponent-active, @gray-color-6);
+
+// 特殊组件背景色,目前只用于 button、input 组件多主题场景,浅色主题下固定为白色,深色主题下为 transparent 适配背景颜色
+@bg-color-specialcomponent: var(--td-bg-color-specialcomponent, #fff);
+
+@component-stroke: var(--td-component-stroke, @gray-color-3);
+@border-level-1-color: var(--td-border-level-1-color, @gray-color-3);
+@component-border: var(--td-component-border, @gray-color-4);
+@border-level-2-color: var(--td-border-level-2-color, @gray-color-4);
+
+// 主题
+@brand-color: var(--td-brand-color, @primary-color-7);
+@brand-color-active: var(--td-brand-color-active, @primary-color-8);
+@brand-color-disabled: var(--td-brand-color-disabled, @primary-color-3);
+@brand-color-focus: var(--td-brand-color-focus, @primary-color-1);
+@brand-color-light: var(--td-brand-color-light, @primary-color-1);
+@brand-color-light-active: var(--td-brand-color-light-active, @primary-color-2);
+
+@error-color: var(--td-error-color, @error-color-6);
+@error-color-active: var(--td-error-color-active, @error-color-7);
+@error-color-disabled: var(--td-error-color-disabled, @error-color-3);
+@error-color-focus: var(--td-error-color-focus, @error-color-2);
+@error-color-light: var(--td-error-color-light, @error-color-1);
+
+@warning-color: var(--td-warning-color, @warning-color-5);
+@warning-color-active: var(--td-warning-color-active, @warning-color-6);
+@warning-color-disabled: var(--td-warning-color-disabled, @warning-color-3);
+@warning-color-focus: var(--td-warning-color-focus, @warning-color-2);
+@warning-color-light: var(--td-warning-color-light, @warning-color-1);
+
+@success-color: var(--td-success-color, @success-color-5);
+@success-color-active: var(--td-success-color-active, @success-color-6);
+@success-color-disabled: var(--td-success-color-disabled, @success-color-3);
+@success-color-focus: var(--td-success-color-focus, @success-color-2);
+@success-color-light: var(--td-success-color-light, @success-color-1);
+
+// 文字
+@text-color-primary: var(--td-text-color-primary, @font-gray-1);
+@text-color-secondary: var(--td-text-color-secondary, @font-gray-2);
+@text-color-placeholder: var(--td-text-color-placeholder, @font-gray-3);
+@text-color-disabled: var(--td-text-color-disabled, @font-gray-4);
+@text-color-anti: var(--td-text-color-anti, @font-white-1);
+@text-color-brand: var(--td-text-color-brand, @brand-color);
+@text-color-link: var(--td-text-color-link, @brand-color);
+
+// 定位
+@position-fixed-top: var(--td-position-fixed-top, 0);
+
+// 遮罩
+@mask-active: var(--td-mask-active, rgba(0, 0, 0, 0.6)); // 遮罩-弹出
+@mask-disabled: var(--td-mask-disabled, rgba(255, 255, 255, 0.6)); // 遮罩-禁用
+@mask-bg: var(--td-mask-background, rgba(255, 255, 255, 0.96)); // 二维码遮罩
+
+@text-line-height: 1.5;
diff --git a/uni_modules/tdesign-uniapp/components/common/style/base.less b/uni_modules/tdesign-uniapp/components/common/style/base.less
new file mode 100644
index 0000000..4b8938f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/base.less
@@ -0,0 +1,4 @@
+// 变量
+@import './_variables.less';
+
+@import './mixins/_index.less';
diff --git a/uni_modules/tdesign-uniapp/components/common/style/icons.css b/uni_modules/tdesign-uniapp/components/common/style/icons.css
new file mode 100644
index 0000000..e69de29
diff --git a/uni_modules/tdesign-uniapp/components/common/style/index.css b/uni_modules/tdesign-uniapp/components/common/style/index.css
new file mode 100644
index 0000000..5eb332d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/index.css
@@ -0,0 +1,13 @@
+.hotspot-expanded.relative {
+ position: relative;
+}
+.hotspot-expanded::after {
+ content: '';
+ display: block;
+ position: absolute;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ transform: scale(1.5);
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/mixins/_border.less b/uni_modules/tdesign-uniapp/components/common/style/mixins/_border.less
new file mode 100644
index 0000000..d765a92
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/mixins/_border.less
@@ -0,0 +1,34 @@
+@import '../_variables.less';
+
+.border(@position: bottom, @border-color: @component-border) {
+ position: relative;
+
+ &::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: if(@position = top, 0, unset);
+ bottom: if(@position = bottom, 0, unset);
+ left: if(@position = left, 0, unset);
+ right: if(@position = right, 0, unset);
+ background-color: @border-color;
+ }
+}
+
+.border(@position: bottom, @border-color: @gray-color-1) when(@position = bottom) , (@position = top) {
+ &::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+ }
+}
+
+.border(@position: bottom, @border-color: @gray-color-1) when(@position = left),(@position = right) {
+ &::after {
+ width: 1px;
+ top: 0;
+ bottom: 0;
+ transform: scaleX(0.5);
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/mixins/_clearfix.less b/uni_modules/tdesign-uniapp/components/common/style/mixins/_clearfix.less
new file mode 100644
index 0000000..c9f0cb1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/mixins/_clearfix.less
@@ -0,0 +1,7 @@
+.clearfix() {
+ &::after {
+ display: table;
+ clear: both;
+ content: '';
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/mixins/_cursor.less b/uni_modules/tdesign-uniapp/components/common/style/mixins/_cursor.less
new file mode 100644
index 0000000..c1e5882
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/mixins/_cursor.less
@@ -0,0 +1,6 @@
+.cursor-pointer() {
+ cursor: pointer;
+ -webkit-tap-highlight-color: transparent;
+ -webkit-user-select: none;
+ user-select: none;
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/mixins/_ellipsis.less b/uni_modules/tdesign-uniapp/components/common/style/mixins/_ellipsis.less
new file mode 100644
index 0000000..6501e6e
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/mixins/_ellipsis.less
@@ -0,0 +1,15 @@
+.ellipsis(@w:auto) {
+ width: @w;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ word-wrap: normal;
+}
+
+.ellipsisLn(@line) {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ -webkit-line-clamp: @line;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/mixins/_hairline.less b/uni_modules/tdesign-uniapp/components/common/style/mixins/_hairline.less
new file mode 100644
index 0000000..41ca8db
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/mixins/_hairline.less
@@ -0,0 +1,55 @@
+@import '../_variables.less';
+
+.hairline-base() {
+ position: absolute;
+ box-sizing: border-box;
+ content: ' ';
+ pointer-events: none;
+}
+
+.hairline(@color: @border-level-1-color) {
+ .hairline-base();
+ top: -50%;
+ right: -50%;
+ bottom: -50%;
+ left: -50%;
+ border: 1px solid @color;
+ transform: scale(0.5);
+}
+
+.hairline-top(@color: @border-level-1-color) {
+ .hairline-base();
+ right: 0;
+ left: 0;
+ top: 0;
+ border-top: 1px solid @color;
+ transform: scaleY(0.5);
+ transform-origin: 0 0;
+}
+
+.hairline-bottom(@color: @border-level-1-color, @width: 1px) {
+ .hairline-base();
+ right: 0;
+ left: 0;
+ bottom: 0;
+ border-bottom: @width solid @color;
+ transform: scaleY(0.5);
+}
+
+.hairline-left(@color: @border-level-1-color) {
+ .hairline-base();
+ top: 0;
+ bottom: 0;
+ left: 0;
+ border-left: 1px solid @color;
+ transform: scaleX(0.5);
+}
+
+.hairline-right(@color: @border-level-1-color) {
+ .hairline-base();
+ top: 0;
+ bottom: 0;
+ right: 0;
+ border-right: 1px solid @color;
+ transform: scaleX(0.5);
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/mixins/_index.less b/uni_modules/tdesign-uniapp/components/common/style/mixins/_index.less
new file mode 100644
index 0000000..b1d4c49
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/mixins/_index.less
@@ -0,0 +1,6 @@
+@import './_clearfix.less';
+@import './_hairline.less';
+@import './_ellipsis.less';
+@import './_cursor.less';
+@import './_border.less';
+@import './_other.less';
diff --git a/uni_modules/tdesign-uniapp/components/common/style/mixins/_other.less b/uni_modules/tdesign-uniapp/components/common/style/mixins/_other.less
new file mode 100644
index 0000000..05a5b7b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/mixins/_other.less
@@ -0,0 +1,14 @@
+// 屏幕中不显示, 但可被读屏
+.sr-only() {
+ &--sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ white-space: nowrap;
+ clip-path: inset(50%);
+ border: 0;
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/theme/index.css b/uni_modules/tdesign-uniapp/components/common/style/theme/index.css
new file mode 100644
index 0000000..05530bf
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/theme/index.css
@@ -0,0 +1,519 @@
+
+/* ./raw/_light.less */
+@media (prefers-color-scheme: light) {
+ /* #ifdef H5 */
+ :root,
+ /* #endif */
+ page,
+ .page {
+ --td-brand-color-1: #f2f3ff;
+ --td-brand-color-2: #d9e1ff;
+ --td-brand-color-3: #b5c7ff;
+ --td-brand-color-4: #8eabff;
+ --td-brand-color-5: #618dff;
+ --td-brand-color-6: #366ef4;
+ --td-brand-color-7: #0052d9;
+ --td-brand-color-8: #003cab;
+ --td-brand-color-9: #002a7c;
+ --td-brand-color-10: #001a57;
+
+ --td-primary-color-1: var(--td-brand-color-1);
+ --td-primary-color-2: var(--td-brand-color-2);
+ --td-primary-color-3: var(--td-brand-color-3);
+ --td-primary-color-4: var(--td-brand-color-4);
+ --td-primary-color-5: var(--td-brand-color-5);
+ --td-primary-color-6: var(--td-brand-color-6);
+ --td-primary-color-7: var(--td-brand-color-7);
+ --td-primary-color-8: var(--td-brand-color-8);
+ --td-primary-color-9: var(--td-brand-color-9);
+ --td-primary-color-10: var(--td-brand-color-10);
+
+ --td-warning-color-1: #fff1e9;
+ --td-warning-color-2: #ffd9c2;
+ --td-warning-color-3: #ffb98c;
+ --td-warning-color-4: #fa9550;
+ --td-warning-color-5: #e37318;
+ --td-warning-color-6: #be5a00;
+ --td-warning-color-7: #954500;
+ --td-warning-color-8: #713300;
+ --td-warning-color-9: #532300;
+ --td-warning-color-10: #3b1700;
+
+ --td-error-color-1: #fff0ed;
+ --td-error-color-2: #ffd8d2;
+ --td-error-color-3: #ffb9b0;
+ --td-error-color-4: #ff9285;
+ --td-error-color-5: #f6685d;
+ --td-error-color-6: #d54941;
+ --td-error-color-7: #ad352f;
+ --td-error-color-8: #881f1c;
+ --td-error-color-9: #68070a;
+ --td-error-color-10: #490002;
+
+ --td-success-color-1: #e3f9e9;
+ --td-success-color-2: #c6f3d7;
+ --td-success-color-3: #92dab2;
+ --td-success-color-4: #56c08d;
+ --td-success-color-5: #2ba471;
+ --td-success-color-6: #008858;
+ --td-success-color-7: #006c45;
+ --td-success-color-8: #005334;
+ --td-success-color-9: #003b23;
+ --td-success-color-10: #002515;
+
+ --td-gray-color-1: #f3f3f3;
+ --td-gray-color-2: #eeeeee;
+ --td-gray-color-3: #e7e7e7;
+ --td-gray-color-4: #dcdcdc;
+ --td-gray-color-5: #c5c5c5;
+ --td-gray-color-6: #a6a6a6;
+ --td-gray-color-7: #8b8b8b;
+ --td-gray-color-8: #777777;
+ --td-gray-color-9: #5e5e5e;
+ --td-gray-color-10: #4b4b4b;
+ --td-gray-color-11: #383838;
+ --td-gray-color-12: #2c2c2c;
+ --td-gray-color-13: #242424;
+ --td-gray-color-14: #181818;
+
+ // 文字 & 图标 颜色
+ --td-font-white-1: rgba(255, 255, 255, 1);
+ --td-font-white-2: rgba(255, 255, 255, 0.55);
+ --td-font-white-3: rgba(255, 255, 255, 0.35);
+ --td-font-white-4: rgba(255, 255, 255, 0.22);
+ --td-font-gray-1: rgba(0, 0, 0, 0.9);
+ --td-font-gray-2: rgba(0, 0, 0, 0.6);
+ --td-font-gray-3: rgba(0, 0, 0, 0.4);
+ --td-font-gray-4: rgba(0, 0, 0, 0.26);
+
+ // 基础颜色
+ --td-brand-color: var(--td-primary-color-7);
+ --td-warning-color: var(--td-warning-color-5);
+ --td-error-color: var(--td-error-color-6);
+ --td-success-color: var(--td-success-color-5);
+
+ // 基础颜色的扩展 用于 聚焦 / 禁用 / 点击 等状态
+ --td-brand-color-focus: var(--td-primary-color-1);
+ --td-brand-color-active: var(--td-primary-color-8);
+ --td-brand-color-disabled: var(--td-primary-color-3);
+ --td-brand-color-light: var(--td-primary-color-1);
+ --td-brand-color-light-active: var(--td-primary-color-2);
+
+ // 警告色扩展
+ --td-warning-color-active: var(--td-warning-color-6);
+ --td-warning-color-disabled: var(--td-warning-color-3);
+ --td-warning-color-focus: var(--td-warning-color-2);
+ --td-warning-color-light: var(--td-warning-color-1);
+ --td-warning-color-light-active: var(--td-warning-color-2);
+
+ // 失败/错误色扩展
+ --td-error-color-focus: var(--td-error-color-2);
+ --td-error-color-active: var(--td-error-color-7);
+ --td-error-color-disabled: var(--td-error-color-3);
+ --td-error-color-light: var(--td-error-color-1);
+ --td-error-color-light-active: var(--td-error-color-2);
+
+ // 成功色扩展
+ --td-success-color-focus: var(--td-success-color-2);
+ --td-success-color-active: var(--td-success-color-6);
+ --td-success-color-disabled: var(--td-success-color-3);
+ --td-success-color-light: var(--td-success-color-1);
+ --td-success-color-light-active: var(--td-success-color-2);
+
+ // 遮罩
+ --td-mask-active: rgba(0, 0, 0, 60%); // 遮罩-弹出
+ --td-mask-disabled: rgba(255, 255, 255, 60%); // 遮罩-禁用
+ --td-mask-background: rgba(255, 255, 255, 96%); // 二维码遮罩
+
+ // 背景色
+ --td-bg-color-page: var(--td-gray-color-1);
+ --td-bg-color-container: var(--td-font-white-1);
+ --td-bg-color-container-active: var(--td-gray-color-3);
+ --td-bg-color-secondarycontainer: var(--td-gray-color-1);
+ --td-bg-color-secondarycontainer-active: var(--td-gray-color-4);
+ --td-bg-color-component: var(--td-gray-color-3);
+ --td-bg-color-component-active: var(--td-gray-color-6);
+ --td-bg-color-component-disabled: var(--td-gray-color-2);
+ --td-bg-color-secondarycomponent: var(--td-gray-color-4);
+ --td-bg-color-secondarycomponent-active: var(--td-gray-color-6);
+
+ // 特殊组件背景色,目前只用于 button、input 组件多主题场景,浅色主题下固定为白色,深色主题下为 transparent 适配背景颜色
+ --td-bg-color-specialcomponent: #fff;
+
+ // 文本颜色
+ --td-text-color-primary: var(--td-font-gray-1);
+ --td-text-color-secondary: var(--td-font-gray-2);
+ --td-text-color-placeholder: var(--td-font-gray-3);
+ --td-text-color-disabled: var(--td-font-gray-4);
+ --td-text-color-anti: var(--td-font-white-1);
+ --td-text-color-brand: var(--td-brand-color);
+ --td-text-color-link: var(--td-brand-color);
+
+ // 分割线
+ --td-border-level-1-color: var(--td-gray-color-3);
+ --td-component-stroke: var(--td-gray-color-3);
+ // 边框
+ --td-border-level-2-color: var(--td-gray-color-4);
+ --td-component-border: var(--td-gray-color-4);
+
+ // 基础/下层 投影 hover 使用的组件包括:表格 /
+ --td-shadow-1: 0 1px 10px rgba(0, 0, 0, 5%), 0 4px 5px rgba(0, 0, 0, 8%), 0 2px 4px -1px rgba(0, 0, 0, 12%);
+ // 中层投影 下拉 使用的组件包括:下拉菜单 / 气泡确认框 / 选择器 /
+ --td-shadow-2: 0 3px 14px 2px rgba(0, 0, 0, 5%), 0 8px 10px 1px rgba(0, 0, 0, 6%), 0 5px 5px -3px rgba(0, 0, 0, 10%);
+ // 上层投影(警示/弹窗)使用的组件包括:全局提示 / 消息通知
+ --td-shadow-3: 0 6px 30px 5px rgba(0, 0, 0, 5%), 0 16px 24px 2px rgba(0, 0, 0, 4%),
+ 0 8px 10px -5px rgba(0, 0, 0, 8%);
+ --td-shadow-4: 0 2px 8px 0 rgba(0, 0, 0, 0.06);
+
+ // 内投影 用于弹窗类组件(气泡确认框 / 全局提示 / 消息通知)的内描边
+ --td-shadow-inset-top: inset 0 0.5px 0 #dcdcdc;
+ --td-shadow-inset-right: inset 0.5px 0 0 #dcdcdc;
+ --td-shadow-inset-bottom: inset 0 -0.5px 0 #dcdcdc;
+ --td-shadow-inset-left: inset -0.5px 0 0 #dcdcdc;
+
+ // table 特定阴影
+ --td-table-shadow-color: rgba(0, 0, 0, 8%);
+
+ // 滚动条颜色
+ --td-scrollbar-color: rgba(0, 0, 0, 10%);
+ // 滚动条悬浮颜色( hover )
+ --td-scrollbar-hover-color: rgba(0, 0, 0, 30%);
+ // 滚动条轨道颜色,不能是带透明度,否则纵向滚动时,横向滚动条会穿透
+ --td-scroll-track-color: #fff;
+ }
+}
+
+
+/* ./raw/_dark.less */
+@media (prefers-color-scheme: dark) {
+ /* #ifdef H5 */
+ :root,
+ /* #endif */
+ page,
+ .page {
+ --td-brand-color-1: #1b2f51;
+ --td-brand-color-2: #173463;
+ --td-brand-color-3: #143975;
+ --td-brand-color-4: #103d88;
+ --td-brand-color-5: #0d429a;
+ --td-brand-color-6: #054bbe;
+ --td-brand-color-7: #2667d4;
+ --td-brand-color-8: #4582e6;
+ --td-brand-color-9: #699ef5;
+ --td-brand-color-10: #96bbf8;
+
+ --td-primary-color-1: var(--td-brand-color-1);
+ --td-primary-color-2: var(--td-brand-color-2);
+ --td-primary-color-3: var(--td-brand-color-3);
+ --td-primary-color-4: var(--td-brand-color-4);
+ --td-primary-color-5: var(--td-brand-color-5);
+ --td-primary-color-6: var(--td-brand-color-6);
+ --td-primary-color-7: var(--td-brand-color-7);
+ --td-primary-color-8: var(--td-brand-color-8);
+ --td-primary-color-9: var(--td-brand-color-9);
+ --td-primary-color-10: var(--td-brand-color-10);
+
+ --td-warning-color-1: #4f2a1d;
+ --td-warning-color-2: #582f21;
+ --td-warning-color-3: #733c23;
+ --td-warning-color-4: #a75d2b;
+ --td-warning-color-5: #cf6e2d;
+ --td-warning-color-6: #dc7633;
+ --td-warning-color-7: #e8935c;
+ --td-warning-color-8: #ecbf91;
+ --td-warning-color-9: #eed7bf;
+ --td-warning-color-10: #f3e9dc;
+
+ --td-error-color-1: #472324;
+ --td-error-color-2: #5e2a2d;
+ --td-error-color-3: #703439;
+ --td-error-color-4: #83383e;
+ --td-error-color-5: #a03f46;
+ --td-error-color-6: #c64751;
+ --td-error-color-7: #de6670;
+ --td-error-color-8: #ec888e;
+ --td-error-color-9: #edb1b6;
+ --td-error-color-10: #eeced0;
+
+ --td-success-color-1: #193a2a;
+ --td-success-color-2: #1a4230;
+ --td-success-color-3: #17533d;
+ --td-success-color-4: #0d7a55;
+ --td-success-color-5: #059465;
+ --td-success-color-6: #43af8a;
+ --td-success-color-7: #46bf96;
+ --td-success-color-8: #80d2b6;
+ --td-success-color-9: #b4e1d3;
+ --td-success-color-10: #deede8;
+
+ --td-gray-color-1: #f3f3f3;
+ --td-gray-color-2: #eee;
+ --td-gray-color-3: #e8e8e8;
+ --td-gray-color-4: #ddd;
+ --td-gray-color-5: #c6c6c6;
+ --td-gray-color-6: #a6a6a6;
+ --td-gray-color-7: #8b8b8b;
+ --td-gray-color-8: #777;
+ --td-gray-color-9: #5e5e5e;
+ --td-gray-color-10: #4b4b4b;
+ --td-gray-color-11: #383838;
+ --td-gray-color-12: #2c2c2c;
+ --td-gray-color-13: #242424;
+ --td-gray-color-14: #181818;
+
+ // 文字 & 图标 颜色
+ --td-font-white-1: rgba(255, 255, 255, 90%);
+ --td-font-white-2: rgba(255, 255, 255, 55%);
+ --td-font-white-3: rgba(255, 255, 255, 35%);
+ --td-font-white-4: rgba(255, 255, 255, 22%);
+ --td-font-gray-1: rgba(0, 0, 0, 90%);
+ --td-font-gray-2: rgba(0, 0, 0, 60%);
+ --td-font-gray-3: rgba(0, 0, 0, 40%);
+ --td-font-gray-4: rgba(0, 0, 0, 26%);
+
+ // 基础颜色
+ --td-brand-color: var(--td-primary-color-8); // 色彩-品牌-可操作
+ --td-warning-color: var(--td-warning-color-5); // 色彩-功能-警告
+ --td-error-color: var(--td-error-color-6); // 色彩-功能-失败
+ --td-success-color: var(--td-success-color-5); // 色彩-功能-成功
+
+ // 基础颜色的扩展 用于 聚焦 / 禁用 / 点击 等状态
+ --td-brand-color-focus: var(--td-primary-color-1); // focus态,包括鼠标和键盘
+ --td-brand-color-active: var(--td-primary-color-9); // 点击态
+ --td-brand-color-disabled: var(--td-primary-color-3); // 禁用态
+ --td-brand-color-light: var(--td-primary-color-1); // 浅色的选中态
+ --td-brand-color-light-active: var(--td-primary-color-2); // 浅色的选中态
+
+ // 警告色扩展
+ --td-warning-color-focus: var(--td-warning-color-2);
+ --td-warning-color-active: var(--td-warning-color-4);
+ --td-warning-color-disabled: var(--td-warning-color-3);
+ --td-warning-color-light: var(--td-warning-color-1);
+ --td-warning-color-light-active: var(--td-warning-color-2);
+
+ // 失败/错误色扩展
+ --td-error-color-focus: var(--td-error-color-2);
+ --td-error-color-active: var(--td-error-color-5);
+ --td-error-color-disabled: var(--td-error-color-3);
+ --td-error-color-light: var(--td-error-color-1);
+ --td-error-color-light-active: var(--td-error-color-2);
+
+ // 成功色扩展
+ --td-success-color-focus: var(--td-success-color-2);
+ --td-success-color-active: var(--td-success-color-4);
+ --td-success-color-disabled: var(--td-success-color-3);
+ --td-success-color-light: var(--td-success-color-1);
+ --td-success-color-light-active: var(--td-success-color-2);
+
+ // 遮罩
+ --td-mask-active: rgba(0, 0, 0, 40%); // 遮罩-弹出
+ --td-mask-disabled: rgba(0, 0, 0, 60%); // 遮罩-禁用
+ --td-mask-background: rgba(36, 36, 36, 96%); // 二维码遮罩
+
+ // 背景色
+ --td-bg-color-page: var(--td-gray-color-14); // 色彩 - page
+ --td-bg-color-container: var(--td-gray-color-13); // 色彩 - 容器
+ --td-bg-color-secondarycontainer: var(--td-gray-color-12); // 色彩 - 次级容器
+ --td-bg-color-component: var(--td-gray-color-11); // 色彩 - 组件
+ --td-bg-color-container-active: var(--td-gray-color-12); // 色彩 - 容器 - active
+ --td-bg-color-secondarycontainer-active: var(--td-gray-color-11); // 色彩 - 次级容器 - active
+ --td-bg-color-component-active: var(--td-gray-color-10); // 色彩 - 组件 - active
+ --td-bg-color-component-disabled: var(--td-gray-color-12); // 色彩 - 组件 - disabled
+ --td-bg-color-secondarycomponent: var(--td-gray-color-10); // 色彩 - 次级组件
+ --td-bg-color-secondarycomponent-active: var(--td-gray-color-8); // 色彩 - 次级组件 - active
+
+ // 特殊组件背景色,目前只用于 button、input 组件多主题场景,浅色主题下固定为白色,深色主题下为 transparent 适配背景颜色
+ --td-bg-color-specialcomponent: transparent;
+
+ // 文本颜色
+ --td-text-color-primary: var(--td-font-white-1); // 色彩-文字-主要
+ --td-text-color-secondary: var(--td-font-white-2); // 色彩-文字-次要
+ --td-text-color-placeholder: var(--td-font-white-3); // 色彩-文字-占位符/说明
+ --td-text-color-disabled: var(--td-font-white-4); // 色彩-文字-禁用
+ --td-text-color-anti: var(--td-font-white-1); // 色彩-文字-反色
+ --td-text-color-brand: var(--td-primary-color-8); // 色彩-文字-品牌
+ --td-text-color-link: var(--td-primary-color-8); // 色彩-文字-链接
+
+ // 分割线
+ --td-border-level-1-color: var(--td-gray-color-11);
+ --td-component-stroke: var(--td-gray-color-11);
+ // 边框
+ --td-border-level-2-color: var(--td-gray-color-9);
+ --td-component-border: var(--td-gray-color-9);
+
+ // 基础/下层 投影 hover 使用的组件包括:表格 /
+ --td-shadow-1: 0 4px 6px rgba(0, 0, 0, 6%), 0 1px 10px rgba(0, 0, 0, 8%), 0 2px 4px rgba(0, 0, 0, 12%);
+ // 中层投影 下拉 使用的组件包括:下拉菜单 / 气泡确认框 / 选择器 /
+ --td-shadow-2: 0 8px 10px rgba(0, 0, 0, 12%), 0 3px 14px rgba(0, 0, 0, 10%), 0 5px 5px rgba(0, 0, 0, 16%);
+ // 上层投影(警示/弹窗)使用的组件包括:全局提示 / 消息通知
+ --td-shadow-3: 0 16px 24px rgba(0, 0, 0, 14%), 0 6px 30px rgba(0, 0, 0, 12%), 0 8px 10px rgba(0, 0, 0, 20%);
+ // 内投影 用于弹窗类组件(气泡确认框 / 全局提示 / 消息通知)的内描边
+
+ --td-shadow-inset-top: inset 0 0.5px 0 #5e5e5e;
+ --td-shadow-inset-right: inset 0.5px 0 0 #5e5e5e;
+ --td-shadow-inset-bottom: inset 0 -0.5px 0 #5e5e5e;
+ --td-shadow-inset-left: inset -0.5px 0 0 #5e5e5e;
+
+ // table 特定阴影
+ --td-table-shadow-color: rgba(0, 0, 0, 55%);
+
+ // 滚动条颜色
+ --td-scrollbar-color: rgba(255, 255, 255, 10%);
+ // 滚动条轨道颜色,不能是带透明度,否则纵向滚动时,横向滚动条会穿透
+ --td-scroll-track-color: #333;
+ }
+}
+
+
+/* ./raw/_radius.less */
+page,
+.page {
+ // 圆角
+ --td-radius-small: 12px;
+ --td-radius-default: 24px;
+ --td-radius-large: 36px;
+ --td-radius-extraLarge: 48px;
+ --td-radius-round: 999px;
+ --td-radius-circle: 50%;
+}
+
+
+/* ./raw/_font.less */
+page,
+.page {
+ // 字体family token
+ --td-font-family: PingFang SC, Microsoft YaHei, Arial Regular; // 字体-磅数-常规
+ --td-font-family-medium: PingFang SC, Microsoft YaHei, Arial Medium; // 字体-磅数-粗体
+
+ --td-font-size-link-small: 48px;
+ --td-font-size-link-medium: 56px;
+ --td-font-size-link-large: 64px;
+ --td-font-size-mark-extraSmall: 40px;
+ --td-font-size-mark-small: 48px;
+ --td-font-size-mark-medium: 56px;
+ --td-font-size-mark-large: 64px;
+ --td-font-size-body-extraSmall: 40px;
+ --td-font-size-body-small: 48px;
+ --td-font-size-body-medium: 56px;
+ --td-font-size-body-large: 64px;
+ --td-font-size-title-small: 56px;
+ --td-font-size-title-medium: 64px;
+ --td-font-size-title-large: 72px;
+ --td-font-size-title-extraLarge: 80px;
+ --td-font-size-headline-small: 96px;
+ --td-font-size-headline-medium: 112px;
+ --td-font-size-headline-large: 144px;
+ --td-font-size-display-medium: 192px;
+ --td-font-size-display-large: 256px;
+
+ // 字体行高 token
+ --td-line-height-link-small: 80px;
+ --td-line-height-link-medium: 88px;
+ --td-line-height-link-large: 96px;
+ --td-line-height-mark-extraSmall: 64px;
+ --td-line-height-mark-small: 80px;
+ --td-line-height-mark-medium: 88px;
+ --td-line-height-mark-large: 96px;
+ --td-line-height-body-extraSmall: 64px;
+ --td-line-height-body-small: 80px;
+ --td-line-height-body-medium: 88px;
+ --td-line-height-body-large: 96px;
+ --td-line-height-title-small: 88px;
+ --td-line-height-title-medium: 96px;
+ --td-line-height-title-large: 104px;
+ --td-line-height-title-extraLarge: 112px;
+ --td-line-height-headline-small: 128px;
+ --td-line-height-headline-medium: 144px;
+ --td-line-height-headline-large: 176px;
+ --td-line-height-display-medium: 224px;
+ --td-line-height-display-large: 288px;
+
+ // font token
+ --td-font-link-small: var(--td-font-size-link-small) / var(--td-line-height-link-small) var(--td-font-family);
+ --td-font-link-medium: var(--td-font-size-link-medium) / var(--td-line-height-link-medium) var(--td-font-family);
+ --td-font-link-large: var(--td-font-size-link-large) / var(--td-line-height-link-large) var(--td-font-family);
+ --td-font-mark-extraSmall: 600 var(--td-font-size-mark-extraSmall) / var(--td-line-height-mark-extraSmall)
+ var(--td-font-family);
+ --td-font-mark-small: 600 var(--td-font-size-mark-small) / var(--td-line-height-mark-small) var(--td-font-family);
+ --td-font-mark-medium: 600 var(--td-font-size-mark-medium) / var(--td-line-height-mark-medium) var(--td-font-family);
+ --td-font-mark-large: 600 var(--td-font-size-mark-large) / var(--td-line-height-mark-large) var(--td-font-family);
+ --td-font-body-extraSmall: var(--td-font-size-body-extraSmall) / var(--td-line-height-body-extraSmall)
+ var(--td-font-family);
+ --td-font-body-small: var(--td-font-size-body-small) / var(--td-line-height-body-small) var(--td-font-family);
+ --td-font-body-medium: var(--td-font-size-body-medium) / var(--td-line-height-body-medium) var(--td-font-family);
+ --td-font-body-large: var(--td-font-size-body-large) / var(--td-line-height-body-large) var(--td-font-family);
+ --td-font-title-small: 600 var(--td-font-size-title-small) / var(--td-line-height-title-small) var(--td-font-family);
+ --td-font-title-medium: 600 var(--td-font-size-title-medium) / var(--td-line-height-title-medium)
+ var(--td-font-family);
+ --td-font-title-large: 600 var(--td-font-size-title-large) / var(--td-line-height-title-large) var(--td-font-family);
+ --td-font-title-extraLarge: 600 var(--td-font-size-title-extraLarge) / var(--td-line-height-title-extraLarge)
+ var(--td-font-family);
+ --td-font-headline-small: 600 var(--td-font-size-headline-small) / var(--td-line-height-headline-small)
+ var(--td-font-family);
+ --td-font-headline-medium: 600 var(--td-font-size-headline-medium) / var(--td-line-height-headline-medium)
+ var(--td-font-family);
+ --td-font-headline-large: 600 var(--td-font-size-headline-large) / var(--td-line-height-headline-large)
+ var(--td-font-family);
+ --td-font-display-medium: 600 var(--td-font-size-display-medium) / var(--td-line-height-display-medium)
+ var(--td-font-family);
+ --td-font-display-large: 600 var(--td-font-size-display-large) / var(--td-line-height-display-large)
+ var(--td-font-family);
+
+ // 字体大小 token
+ --td-font-size: 40px;
+ --td-font-size-xs: var(--td-font-size-body-extraSmall);
+ --td-font-size-s: var(--td-font-size-body-small);
+ --td-font-size-base: var(--td-font-size-title-small);
+ --td-font-size-m: var(--td-font-size-title-medium);
+ --td-font-size-l: var(--td-font-size-title-large);
+ --td-font-size-xl: var(--td-font-size-title-extraLarge);
+ --td-font-size-xxl: var(--td-font-size-headline-large);
+}
+
+
+/* ./raw/_spacer.less */
+page,
+.page {
+ // Spacer
+ --td-spacer: 32px;
+ --td-spacer-1: 48px; // 间距-小-x
+ --td-spacer-2: 64px; // 间距-小
+ --td-spacer-3: 96px; // 间距-中
+ --td-spacer-4: 128px; // 间距-大
+ --td-spacer-5: 192px; // 间距-大-x
+ --td-spacer-6: 320px; // 间距-大-xx
+}
+
+
+/* ./raw/_components.less */
+// 部分特殊处理的组件级 token
+@media (prefers-color-scheme: light) {
+ page,
+ .page {
+ --td-picker-transparent-color: rgba(255, 255, 255, 0);
+
+ --td-switch-dot-disabled-color: var(--td-font-white-1);
+ --td-switch-loading-color: var(--td-brand-color);
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ page,
+ .page {
+ --td-button-primary-disabled-color: var(--td-font-white-4);
+
+ --td-skeleton-animation-gradient: rgba(255, 255, 255, 6%);
+
+ --td-slider-dot-bg-color: var(--td-gray-color-4);
+ --td-slider-dot-disabled-bg-color: var(--td-gray-color-11);
+ --td-slider-dot-disabled-border-color: var(--td-gray-color-12);
+
+ --td-picker-transparent-color: transparent;
+
+ --td-switch-dot-disabled-color: var(--td-font-white-2);
+ --td-switch-loading-color: var(--td-font-white-1);
+
+ --td-progress-circle-inner-bg-color: var(--bg-color-page);
+ }
+}
+
diff --git a/uni_modules/tdesign-uniapp/components/common/style/theme/index.less b/uni_modules/tdesign-uniapp/components/common/style/theme/index.less
new file mode 100644
index 0000000..e77439c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/theme/index.less
@@ -0,0 +1,11 @@
+@import './raw/_light.less';
+
+@import './raw/_dark.less';
+
+@import './raw/_radius.less';
+
+@import './raw/_font.less';
+
+@import './raw/_spacer.less';
+
+@import './raw/_components.less';
diff --git a/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_components.less b/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_components.less
new file mode 100644
index 0000000..a99107d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_components.less
@@ -0,0 +1,30 @@
+// 部分特殊处理的组件级 token
+@media (prefers-color-scheme: light) {
+ page,
+ .page {
+ --td-picker-transparent-color: rgba(255, 255, 255, 0);
+
+ --td-switch-dot-disabled-color: var(--td-font-white-1);
+ --td-switch-loading-color: var(--td-brand-color);
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ page,
+ .page {
+ --td-button-primary-disabled-color: var(--td-font-white-4);
+
+ --td-skeleton-animation-gradient: rgba(255, 255, 255, 6%);
+
+ --td-slider-dot-bg-color: var(--td-gray-color-4);
+ --td-slider-dot-disabled-bg-color: var(--td-gray-color-11);
+ --td-slider-dot-disabled-border-color: var(--td-gray-color-12);
+
+ --td-picker-transparent-color: transparent;
+
+ --td-switch-dot-disabled-color: var(--td-font-white-2);
+ --td-switch-loading-color: var(--td-font-white-1);
+
+ --td-progress-circle-inner-bg-color: var(--bg-color-page);
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_dark.less b/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_dark.less
new file mode 100644
index 0000000..6c08ea9
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_dark.less
@@ -0,0 +1,178 @@
+@media (prefers-color-scheme: dark) {
+ /* #ifdef H5 */
+ :root,
+ /* #endif */
+ page,
+ .page {
+ --td-brand-color-1: #1b2f51;
+ --td-brand-color-2: #173463;
+ --td-brand-color-3: #143975;
+ --td-brand-color-4: #103d88;
+ --td-brand-color-5: #0d429a;
+ --td-brand-color-6: #054bbe;
+ --td-brand-color-7: #2667d4;
+ --td-brand-color-8: #4582e6;
+ --td-brand-color-9: #699ef5;
+ --td-brand-color-10: #96bbf8;
+
+ --td-primary-color-1: var(--td-brand-color-1);
+ --td-primary-color-2: var(--td-brand-color-2);
+ --td-primary-color-3: var(--td-brand-color-3);
+ --td-primary-color-4: var(--td-brand-color-4);
+ --td-primary-color-5: var(--td-brand-color-5);
+ --td-primary-color-6: var(--td-brand-color-6);
+ --td-primary-color-7: var(--td-brand-color-7);
+ --td-primary-color-8: var(--td-brand-color-8);
+ --td-primary-color-9: var(--td-brand-color-9);
+ --td-primary-color-10: var(--td-brand-color-10);
+
+ --td-warning-color-1: #4f2a1d;
+ --td-warning-color-2: #582f21;
+ --td-warning-color-3: #733c23;
+ --td-warning-color-4: #a75d2b;
+ --td-warning-color-5: #cf6e2d;
+ --td-warning-color-6: #dc7633;
+ --td-warning-color-7: #e8935c;
+ --td-warning-color-8: #ecbf91;
+ --td-warning-color-9: #eed7bf;
+ --td-warning-color-10: #f3e9dc;
+
+ --td-error-color-1: #472324;
+ --td-error-color-2: #5e2a2d;
+ --td-error-color-3: #703439;
+ --td-error-color-4: #83383e;
+ --td-error-color-5: #a03f46;
+ --td-error-color-6: #c64751;
+ --td-error-color-7: #de6670;
+ --td-error-color-8: #ec888e;
+ --td-error-color-9: #edb1b6;
+ --td-error-color-10: #eeced0;
+
+ --td-success-color-1: #193a2a;
+ --td-success-color-2: #1a4230;
+ --td-success-color-3: #17533d;
+ --td-success-color-4: #0d7a55;
+ --td-success-color-5: #059465;
+ --td-success-color-6: #43af8a;
+ --td-success-color-7: #46bf96;
+ --td-success-color-8: #80d2b6;
+ --td-success-color-9: #b4e1d3;
+ --td-success-color-10: #deede8;
+
+ --td-gray-color-1: #f3f3f3;
+ --td-gray-color-2: #eee;
+ --td-gray-color-3: #e8e8e8;
+ --td-gray-color-4: #ddd;
+ --td-gray-color-5: #c6c6c6;
+ --td-gray-color-6: #a6a6a6;
+ --td-gray-color-7: #8b8b8b;
+ --td-gray-color-8: #777;
+ --td-gray-color-9: #5e5e5e;
+ --td-gray-color-10: #4b4b4b;
+ --td-gray-color-11: #383838;
+ --td-gray-color-12: #2c2c2c;
+ --td-gray-color-13: #242424;
+ --td-gray-color-14: #181818;
+
+ // 文字 & 图标 颜色
+ --td-font-white-1: rgba(255, 255, 255, 90%);
+ --td-font-white-2: rgba(255, 255, 255, 55%);
+ --td-font-white-3: rgba(255, 255, 255, 35%);
+ --td-font-white-4: rgba(255, 255, 255, 22%);
+ --td-font-gray-1: rgba(0, 0, 0, 90%);
+ --td-font-gray-2: rgba(0, 0, 0, 60%);
+ --td-font-gray-3: rgba(0, 0, 0, 40%);
+ --td-font-gray-4: rgba(0, 0, 0, 26%);
+
+ // 基础颜色
+ --td-brand-color: var(--td-primary-color-8); // 色彩-品牌-可操作
+ --td-warning-color: var(--td-warning-color-5); // 色彩-功能-警告
+ --td-error-color: var(--td-error-color-6); // 色彩-功能-失败
+ --td-success-color: var(--td-success-color-5); // 色彩-功能-成功
+
+ // 基础颜色的扩展 用于 聚焦 / 禁用 / 点击 等状态
+ --td-brand-color-focus: var(--td-primary-color-1); // focus态,包括鼠标和键盘
+ --td-brand-color-active: var(--td-primary-color-9); // 点击态
+ --td-brand-color-disabled: var(--td-primary-color-3); // 禁用态
+ --td-brand-color-light: var(--td-primary-color-1); // 浅色的选中态
+ --td-brand-color-light-active: var(--td-primary-color-2); // 浅色的选中态
+
+ // 警告色扩展
+ --td-warning-color-focus: var(--td-warning-color-2);
+ --td-warning-color-active: var(--td-warning-color-4);
+ --td-warning-color-disabled: var(--td-warning-color-3);
+ --td-warning-color-light: var(--td-warning-color-1);
+ --td-warning-color-light-active: var(--td-warning-color-2);
+
+ // 失败/错误色扩展
+ --td-error-color-focus: var(--td-error-color-2);
+ --td-error-color-active: var(--td-error-color-5);
+ --td-error-color-disabled: var(--td-error-color-3);
+ --td-error-color-light: var(--td-error-color-1);
+ --td-error-color-light-active: var(--td-error-color-2);
+
+ // 成功色扩展
+ --td-success-color-focus: var(--td-success-color-2);
+ --td-success-color-active: var(--td-success-color-4);
+ --td-success-color-disabled: var(--td-success-color-3);
+ --td-success-color-light: var(--td-success-color-1);
+ --td-success-color-light-active: var(--td-success-color-2);
+
+ // 遮罩
+ --td-mask-active: rgba(0, 0, 0, 40%); // 遮罩-弹出
+ --td-mask-disabled: rgba(0, 0, 0, 60%); // 遮罩-禁用
+ --td-mask-background: rgba(36, 36, 36, 96%); // 二维码遮罩
+
+ // 背景色
+ --td-bg-color-page: var(--td-gray-color-14); // 色彩 - page
+ --td-bg-color-container: var(--td-gray-color-13); // 色彩 - 容器
+ --td-bg-color-secondarycontainer: var(--td-gray-color-12); // 色彩 - 次级容器
+ --td-bg-color-component: var(--td-gray-color-11); // 色彩 - 组件
+ --td-bg-color-container-active: var(--td-gray-color-12); // 色彩 - 容器 - active
+ --td-bg-color-secondarycontainer-active: var(--td-gray-color-11); // 色彩 - 次级容器 - active
+ --td-bg-color-component-active: var(--td-gray-color-10); // 色彩 - 组件 - active
+ --td-bg-color-component-disabled: var(--td-gray-color-12); // 色彩 - 组件 - disabled
+ --td-bg-color-secondarycomponent: var(--td-gray-color-10); // 色彩 - 次级组件
+ --td-bg-color-secondarycomponent-active: var(--td-gray-color-8); // 色彩 - 次级组件 - active
+
+ // 特殊组件背景色,目前只用于 button、input 组件多主题场景,浅色主题下固定为白色,深色主题下为 transparent 适配背景颜色
+ --td-bg-color-specialcomponent: transparent;
+
+ // 文本颜色
+ --td-text-color-primary: var(--td-font-white-1); // 色彩-文字-主要
+ --td-text-color-secondary: var(--td-font-white-2); // 色彩-文字-次要
+ --td-text-color-placeholder: var(--td-font-white-3); // 色彩-文字-占位符/说明
+ --td-text-color-disabled: var(--td-font-white-4); // 色彩-文字-禁用
+ --td-text-color-anti: var(--td-font-white-1); // 色彩-文字-反色
+ --td-text-color-brand: var(--td-primary-color-8); // 色彩-文字-品牌
+ --td-text-color-link: var(--td-primary-color-8); // 色彩-文字-链接
+
+ // 分割线
+ --td-border-level-1-color: var(--td-gray-color-11);
+ --td-component-stroke: var(--td-gray-color-11);
+ // 边框
+ --td-border-level-2-color: var(--td-gray-color-9);
+ --td-component-border: var(--td-gray-color-9);
+
+ // 基础/下层 投影 hover 使用的组件包括:表格 /
+ --td-shadow-1: 0 4px 6px rgba(0, 0, 0, 6%), 0 1px 10px rgba(0, 0, 0, 8%), 0 2px 4px rgba(0, 0, 0, 12%);
+ // 中层投影 下拉 使用的组件包括:下拉菜单 / 气泡确认框 / 选择器 /
+ --td-shadow-2: 0 8px 10px rgba(0, 0, 0, 12%), 0 3px 14px rgba(0, 0, 0, 10%), 0 5px 5px rgba(0, 0, 0, 16%);
+ // 上层投影(警示/弹窗)使用的组件包括:全局提示 / 消息通知
+ --td-shadow-3: 0 16px 24px rgba(0, 0, 0, 14%), 0 6px 30px rgba(0, 0, 0, 12%), 0 8px 10px rgba(0, 0, 0, 20%);
+ // 内投影 用于弹窗类组件(气泡确认框 / 全局提示 / 消息通知)的内描边
+
+ --td-shadow-inset-top: inset 0 0.5px 0 #5e5e5e;
+ --td-shadow-inset-right: inset 0.5px 0 0 #5e5e5e;
+ --td-shadow-inset-bottom: inset 0 -0.5px 0 #5e5e5e;
+ --td-shadow-inset-left: inset -0.5px 0 0 #5e5e5e;
+
+ // table 特定阴影
+ --td-table-shadow-color: rgba(0, 0, 0, 55%);
+
+ // 滚动条颜色
+ --td-scrollbar-color: rgba(255, 255, 255, 10%);
+ // 滚动条轨道颜色,不能是带透明度,否则纵向滚动时,横向滚动条会穿透
+ --td-scroll-track-color: #333;
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_font.less b/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_font.less
new file mode 100644
index 0000000..3e0d0d7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_font.less
@@ -0,0 +1,90 @@
+page,
+.page {
+ // 字体family token
+ --td-font-family: PingFang SC, Microsoft YaHei, Arial Regular; // 字体-磅数-常规
+ --td-font-family-medium: PingFang SC, Microsoft YaHei, Arial Medium; // 字体-磅数-粗体
+
+ --td-font-size-link-small: 24rpx;
+ --td-font-size-link-medium: 28rpx;
+ --td-font-size-link-large: 32rpx;
+ --td-font-size-mark-extraSmall: 20rpx;
+ --td-font-size-mark-small: 24rpx;
+ --td-font-size-mark-medium: 28rpx;
+ --td-font-size-mark-large: 32rpx;
+ --td-font-size-body-extraSmall: 20rpx;
+ --td-font-size-body-small: 24rpx;
+ --td-font-size-body-medium: 28rpx;
+ --td-font-size-body-large: 32rpx;
+ --td-font-size-title-small: 28rpx;
+ --td-font-size-title-medium: 32rpx;
+ --td-font-size-title-large: 36rpx;
+ --td-font-size-title-extraLarge: 40rpx;
+ --td-font-size-headline-small: 48rpx;
+ --td-font-size-headline-medium: 56rpx;
+ --td-font-size-headline-large: 72rpx;
+ --td-font-size-display-medium: 96rpx;
+ --td-font-size-display-large: 128rpx;
+
+ // 字体行高 token
+ --td-line-height-link-small: 40rpx;
+ --td-line-height-link-medium: 44rpx;
+ --td-line-height-link-large: 48rpx;
+ --td-line-height-mark-extraSmall: 32rpx;
+ --td-line-height-mark-small: 40rpx;
+ --td-line-height-mark-medium: 44rpx;
+ --td-line-height-mark-large: 48rpx;
+ --td-line-height-body-extraSmall: 32rpx;
+ --td-line-height-body-small: 40rpx;
+ --td-line-height-body-medium: 44rpx;
+ --td-line-height-body-large: 48rpx;
+ --td-line-height-title-small: 44rpx;
+ --td-line-height-title-medium: 48rpx;
+ --td-line-height-title-large: 52rpx;
+ --td-line-height-title-extraLarge: 56rpx;
+ --td-line-height-headline-small: 64rpx;
+ --td-line-height-headline-medium: 72rpx;
+ --td-line-height-headline-large: 88rpx;
+ --td-line-height-display-medium: 112rpx;
+ --td-line-height-display-large: 144rpx;
+
+ // font token
+ --td-font-link-small: var(--td-font-size-link-small) / var(--td-line-height-link-small) var(--td-font-family);
+ --td-font-link-medium: var(--td-font-size-link-medium) / var(--td-line-height-link-medium) var(--td-font-family);
+ --td-font-link-large: var(--td-font-size-link-large) / var(--td-line-height-link-large) var(--td-font-family);
+ --td-font-mark-extraSmall: 600 var(--td-font-size-mark-extraSmall) / var(--td-line-height-mark-extraSmall)
+ var(--td-font-family);
+ --td-font-mark-small: 600 var(--td-font-size-mark-small) / var(--td-line-height-mark-small) var(--td-font-family);
+ --td-font-mark-medium: 600 var(--td-font-size-mark-medium) / var(--td-line-height-mark-medium) var(--td-font-family);
+ --td-font-mark-large: 600 var(--td-font-size-mark-large) / var(--td-line-height-mark-large) var(--td-font-family);
+ --td-font-body-extraSmall: var(--td-font-size-body-extraSmall) / var(--td-line-height-body-extraSmall)
+ var(--td-font-family);
+ --td-font-body-small: var(--td-font-size-body-small) / var(--td-line-height-body-small) var(--td-font-family);
+ --td-font-body-medium: var(--td-font-size-body-medium) / var(--td-line-height-body-medium) var(--td-font-family);
+ --td-font-body-large: var(--td-font-size-body-large) / var(--td-line-height-body-large) var(--td-font-family);
+ --td-font-title-small: 600 var(--td-font-size-title-small) / var(--td-line-height-title-small) var(--td-font-family);
+ --td-font-title-medium: 600 var(--td-font-size-title-medium) / var(--td-line-height-title-medium)
+ var(--td-font-family);
+ --td-font-title-large: 600 var(--td-font-size-title-large) / var(--td-line-height-title-large) var(--td-font-family);
+ --td-font-title-extraLarge: 600 var(--td-font-size-title-extraLarge) / var(--td-line-height-title-extraLarge)
+ var(--td-font-family);
+ --td-font-headline-small: 600 var(--td-font-size-headline-small) / var(--td-line-height-headline-small)
+ var(--td-font-family);
+ --td-font-headline-medium: 600 var(--td-font-size-headline-medium) / var(--td-line-height-headline-medium)
+ var(--td-font-family);
+ --td-font-headline-large: 600 var(--td-font-size-headline-large) / var(--td-line-height-headline-large)
+ var(--td-font-family);
+ --td-font-display-medium: 600 var(--td-font-size-display-medium) / var(--td-line-height-display-medium)
+ var(--td-font-family);
+ --td-font-display-large: 600 var(--td-font-size-display-large) / var(--td-line-height-display-large)
+ var(--td-font-family);
+
+ // 字体大小 token
+ --td-font-size: 20rpx;
+ --td-font-size-xs: var(--td-font-size-body-extraSmall);
+ --td-font-size-s: var(--td-font-size-body-small);
+ --td-font-size-base: var(--td-font-size-title-small);
+ --td-font-size-m: var(--td-font-size-title-medium);
+ --td-font-size-l: var(--td-font-size-title-large);
+ --td-font-size-xl: var(--td-font-size-title-extraLarge);
+ --td-font-size-xxl: var(--td-font-size-headline-large);
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_light.less b/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_light.less
new file mode 100644
index 0000000..537f921
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_light.less
@@ -0,0 +1,182 @@
+@media (prefers-color-scheme: light) {
+ /* #ifdef H5 */
+ :root,
+ /* #endif */
+ page,
+ .page {
+ --td-brand-color-1: #f2f3ff;
+ --td-brand-color-2: #d9e1ff;
+ --td-brand-color-3: #b5c7ff;
+ --td-brand-color-4: #8eabff;
+ --td-brand-color-5: #618dff;
+ --td-brand-color-6: #366ef4;
+ --td-brand-color-7: #0052d9;
+ --td-brand-color-8: #003cab;
+ --td-brand-color-9: #002a7c;
+ --td-brand-color-10: #001a57;
+
+ --td-primary-color-1: var(--td-brand-color-1);
+ --td-primary-color-2: var(--td-brand-color-2);
+ --td-primary-color-3: var(--td-brand-color-3);
+ --td-primary-color-4: var(--td-brand-color-4);
+ --td-primary-color-5: var(--td-brand-color-5);
+ --td-primary-color-6: var(--td-brand-color-6);
+ --td-primary-color-7: var(--td-brand-color-7);
+ --td-primary-color-8: var(--td-brand-color-8);
+ --td-primary-color-9: var(--td-brand-color-9);
+ --td-primary-color-10: var(--td-brand-color-10);
+
+ --td-warning-color-1: #fff1e9;
+ --td-warning-color-2: #ffd9c2;
+ --td-warning-color-3: #ffb98c;
+ --td-warning-color-4: #fa9550;
+ --td-warning-color-5: #e37318;
+ --td-warning-color-6: #be5a00;
+ --td-warning-color-7: #954500;
+ --td-warning-color-8: #713300;
+ --td-warning-color-9: #532300;
+ --td-warning-color-10: #3b1700;
+
+ --td-error-color-1: #fff0ed;
+ --td-error-color-2: #ffd8d2;
+ --td-error-color-3: #ffb9b0;
+ --td-error-color-4: #ff9285;
+ --td-error-color-5: #f6685d;
+ --td-error-color-6: #d54941;
+ --td-error-color-7: #ad352f;
+ --td-error-color-8: #881f1c;
+ --td-error-color-9: #68070a;
+ --td-error-color-10: #490002;
+
+ --td-success-color-1: #e3f9e9;
+ --td-success-color-2: #c6f3d7;
+ --td-success-color-3: #92dab2;
+ --td-success-color-4: #56c08d;
+ --td-success-color-5: #2ba471;
+ --td-success-color-6: #008858;
+ --td-success-color-7: #006c45;
+ --td-success-color-8: #005334;
+ --td-success-color-9: #003b23;
+ --td-success-color-10: #002515;
+
+ --td-gray-color-1: #f3f3f3;
+ --td-gray-color-2: #eeeeee;
+ --td-gray-color-3: #e7e7e7;
+ --td-gray-color-4: #dcdcdc;
+ --td-gray-color-5: #c5c5c5;
+ --td-gray-color-6: #a6a6a6;
+ --td-gray-color-7: #8b8b8b;
+ --td-gray-color-8: #777777;
+ --td-gray-color-9: #5e5e5e;
+ --td-gray-color-10: #4b4b4b;
+ --td-gray-color-11: #383838;
+ --td-gray-color-12: #2c2c2c;
+ --td-gray-color-13: #242424;
+ --td-gray-color-14: #181818;
+
+ // 文字 & 图标 颜色
+ --td-font-white-1: rgba(255, 255, 255, 1);
+ --td-font-white-2: rgba(255, 255, 255, 0.55);
+ --td-font-white-3: rgba(255, 255, 255, 0.35);
+ --td-font-white-4: rgba(255, 255, 255, 0.22);
+ --td-font-gray-1: rgba(0, 0, 0, 0.9);
+ --td-font-gray-2: rgba(0, 0, 0, 0.6);
+ --td-font-gray-3: rgba(0, 0, 0, 0.4);
+ --td-font-gray-4: rgba(0, 0, 0, 0.26);
+
+ // 基础颜色
+ --td-brand-color: var(--td-primary-color-7);
+ --td-warning-color: var(--td-warning-color-5);
+ --td-error-color: var(--td-error-color-6);
+ --td-success-color: var(--td-success-color-5);
+
+ // 基础颜色的扩展 用于 聚焦 / 禁用 / 点击 等状态
+ --td-brand-color-focus: var(--td-primary-color-1);
+ --td-brand-color-active: var(--td-primary-color-8);
+ --td-brand-color-disabled: var(--td-primary-color-3);
+ --td-brand-color-light: var(--td-primary-color-1);
+ --td-brand-color-light-active: var(--td-primary-color-2);
+
+ // 警告色扩展
+ --td-warning-color-active: var(--td-warning-color-6);
+ --td-warning-color-disabled: var(--td-warning-color-3);
+ --td-warning-color-focus: var(--td-warning-color-2);
+ --td-warning-color-light: var(--td-warning-color-1);
+ --td-warning-color-light-active: var(--td-warning-color-2);
+
+ // 失败/错误色扩展
+ --td-error-color-focus: var(--td-error-color-2);
+ --td-error-color-active: var(--td-error-color-7);
+ --td-error-color-disabled: var(--td-error-color-3);
+ --td-error-color-light: var(--td-error-color-1);
+ --td-error-color-light-active: var(--td-error-color-2);
+
+ // 成功色扩展
+ --td-success-color-focus: var(--td-success-color-2);
+ --td-success-color-active: var(--td-success-color-6);
+ --td-success-color-disabled: var(--td-success-color-3);
+ --td-success-color-light: var(--td-success-color-1);
+ --td-success-color-light-active: var(--td-success-color-2);
+
+ // 遮罩
+ --td-mask-active: rgba(0, 0, 0, 60%); // 遮罩-弹出
+ --td-mask-disabled: rgba(255, 255, 255, 60%); // 遮罩-禁用
+ --td-mask-background: rgba(255, 255, 255, 96%); // 二维码遮罩
+
+ // 背景色
+ --td-bg-color-page: var(--td-gray-color-1);
+ --td-bg-color-container: var(--td-font-white-1);
+ --td-bg-color-container-active: var(--td-gray-color-3);
+ --td-bg-color-secondarycontainer: var(--td-gray-color-1);
+ --td-bg-color-secondarycontainer-active: var(--td-gray-color-4);
+ --td-bg-color-component: var(--td-gray-color-3);
+ --td-bg-color-component-active: var(--td-gray-color-6);
+ --td-bg-color-component-disabled: var(--td-gray-color-2);
+ --td-bg-color-secondarycomponent: var(--td-gray-color-4);
+ --td-bg-color-secondarycomponent-active: var(--td-gray-color-6);
+
+ // 特殊组件背景色,目前只用于 button、input 组件多主题场景,浅色主题下固定为白色,深色主题下为 transparent 适配背景颜色
+ --td-bg-color-specialcomponent: #fff;
+
+ // 文本颜色
+ --td-text-color-primary: var(--td-font-gray-1);
+ --td-text-color-secondary: var(--td-font-gray-2);
+ --td-text-color-placeholder: var(--td-font-gray-3);
+ --td-text-color-disabled: var(--td-font-gray-4);
+ --td-text-color-anti: var(--td-font-white-1);
+ --td-text-color-brand: var(--td-brand-color);
+ --td-text-color-link: var(--td-brand-color);
+
+ // 分割线
+ --td-border-level-1-color: var(--td-gray-color-3);
+ --td-component-stroke: var(--td-gray-color-3);
+ // 边框
+ --td-border-level-2-color: var(--td-gray-color-4);
+ --td-component-border: var(--td-gray-color-4);
+
+ // 基础/下层 投影 hover 使用的组件包括:表格 /
+ --td-shadow-1: 0 1px 10px rgba(0, 0, 0, 5%), 0 4px 5px rgba(0, 0, 0, 8%), 0 2px 4px -1px rgba(0, 0, 0, 12%);
+ // 中层投影 下拉 使用的组件包括:下拉菜单 / 气泡确认框 / 选择器 /
+ --td-shadow-2: 0 3px 14px 2px rgba(0, 0, 0, 5%), 0 8px 10px 1px rgba(0, 0, 0, 6%), 0 5px 5px -3px rgba(0, 0, 0, 10%);
+ // 上层投影(警示/弹窗)使用的组件包括:全局提示 / 消息通知
+ --td-shadow-3: 0 6px 30px 5px rgba(0, 0, 0, 5%), 0 16px 24px 2px rgba(0, 0, 0, 4%),
+ 0 8px 10px -5px rgba(0, 0, 0, 8%);
+ --td-shadow-4: 0 2px 8px 0 rgba(0, 0, 0, 0.06);
+
+ // 内投影 用于弹窗类组件(气泡确认框 / 全局提示 / 消息通知)的内描边
+ --td-shadow-inset-top: inset 0 0.5px 0 #dcdcdc;
+ --td-shadow-inset-right: inset 0.5px 0 0 #dcdcdc;
+ --td-shadow-inset-bottom: inset 0 -0.5px 0 #dcdcdc;
+ --td-shadow-inset-left: inset -0.5px 0 0 #dcdcdc;
+
+ // table 特定阴影
+ --td-table-shadow-color: rgba(0, 0, 0, 8%);
+
+ // 滚动条颜色
+ --td-scrollbar-color: rgba(0, 0, 0, 10%);
+ // 滚动条悬浮颜色( hover )
+ --td-scrollbar-hover-color: rgba(0, 0, 0, 30%);
+ // 滚动条轨道颜色,不能是带透明度,否则纵向滚动时,横向滚动条会穿透
+ --td-scroll-track-color: #fff;
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_radius.less b/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_radius.less
new file mode 100644
index 0000000..4d69c6c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_radius.less
@@ -0,0 +1,10 @@
+page,
+.page {
+ // 圆角
+ --td-radius-small: 6rpx;
+ --td-radius-default: 12rpx;
+ --td-radius-large: 18rpx;
+ --td-radius-extraLarge: 24rpx;
+ --td-radius-round: 999px;
+ --td-radius-circle: 50%;
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_spacer.less b/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_spacer.less
new file mode 100644
index 0000000..dcb07d9
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/theme/raw/_spacer.less
@@ -0,0 +1,11 @@
+page,
+.page {
+ // Spacer
+ --td-spacer: 16rpx;
+ --td-spacer-1: 24rpx; // 间距-小-x
+ --td-spacer-2: 32rpx; // 间距-小
+ --td-spacer-3: 48rpx; // 间距-中
+ --td-spacer-4: 64rpx; // 间距-大
+ --td-spacer-5: 96rpx; // 间距-大-x
+ --td-spacer-6: 160rpx; // 间距-大-xx
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/style/utilities/index.css b/uni_modules/tdesign-uniapp/components/common/style/utilities/index.css
new file mode 100644
index 0000000..5eb332d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/style/utilities/index.css
@@ -0,0 +1,13 @@
+.hotspot-expanded.relative {
+ position: relative;
+}
+.hotspot-expanded::after {
+ content: '';
+ display: block;
+ position: absolute;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ transform: scale(1.5);
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/utils.js b/uni_modules/tdesign-uniapp/components/common/utils.js
new file mode 100644
index 0000000..c832ef2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/utils.js
@@ -0,0 +1,358 @@
+import { prefix } from './config';
+import { isString, isNumeric, isDef, isBoolean, isObject } from './validator';
+import { getWindowInfo, getAppBaseInfo, getDeviceInfo } from './wechat';
+
+export { getWindowInfo };
+
+export const systemInfo = getWindowInfo();
+
+export const appBaseInfo = getAppBaseInfo();
+
+export const deviceInfo = getDeviceInfo();
+
+
+/**
+ * 多参数空值合并函数
+ * @param {...any} args - 任意数量的参数
+ * @returns {any} 第一个非null/undefined的参数值
+ */
+export function coalesce(...args) {
+ // 遍历所有参数
+ for (let i = 0; i < args.length; i += 1) {
+ // 返回第一个非null且非undefined的值
+ if (args[i] !== null && args[i] !== undefined) {
+ return args[i];
+ }
+ }
+ // 如果所有参数都是null/undefined,返回最后一个参数
+ return args[args.length - 1];
+}
+
+
+export const debounce = function (func, wait = 500) {
+ let timerId;
+ return function (...rest) {
+ if (timerId) {
+ clearTimeout(timerId);
+ }
+ timerId = setTimeout(() => {
+ func.apply(this, rest);
+ }, wait);
+ };
+};
+
+export const throttle = (func, wait = 100, options = null) => {
+ let previous = 0;
+ let timerid = null;
+
+ if (!options) {
+ options = {
+ leading: true,
+ };
+ }
+
+ return function (...args) {
+ const now = Date.now();
+
+ if (!previous && !options.leading) previous = now;
+
+ const remaining = wait - (now - previous);
+ const context = this;
+
+ if (remaining <= 0) {
+ if (timerid) {
+ clearTimeout(timerid);
+ timerid = null;
+ }
+ previous = now;
+ func.apply(context, args);
+ }
+ };
+};
+
+export const classNames = function (...args) {
+ const hasOwn = {}.hasOwnProperty;
+ const classes = [];
+
+ args.forEach((arg) => {
+ // for (let i = 0; i < args.length; i++) {
+ // eslint-disable-next-line
+ // const arg = args[i]
+ if (!arg) return;
+
+ const argType = typeof arg;
+
+ if (argType === 'string' || argType === 'number') {
+ classes.push(arg);
+ } else if (Array.isArray(arg) && arg.length) {
+ const inner = classNames(...arg);
+ if (inner) {
+ classes.push(inner);
+ }
+ } else if (argType === 'object') {
+ // eslint-disable-next-line
+ for (const key in arg) {
+ if (hasOwn.call(arg, key) && arg[key]) {
+ classes.push(key);
+ }
+ }
+ }
+ });
+
+ return classes.join(' ');
+};
+
+export const styles = function (styleObj) {
+ return Object.keys(styleObj)
+ .map(styleKey => `${styleKey}: ${styleObj[styleKey]}`)
+ .join('; ');
+};
+
+export const getAnimationFrame = function (context, cb) {
+ return uni
+ .createSelectorQuery()
+ .in(context)
+ .selectViewport()
+ .boundingClientRect()
+ .exec(() => {
+ cb();
+ });
+};
+
+export const getRect = function (context, selector, needAll = false, useH5Origin = false) {
+ let result;
+ // #ifdef H5
+ if (useH5Origin) {
+ result = document[needAll ? 'querySelectorAll' : 'querySelector'](selector)?.getBoundingClientRect();
+ }
+ // #endif
+ if (result) {
+ return result;
+ }
+
+ return new Promise((resolve, reject) => {
+ uni
+ .createSelectorQuery()
+ .in(context)
+ // eslint-disable-next-line no-unexpected-multiline
+ [needAll ? 'selectAll' : 'select'](selector)
+ .boundingClientRect((rect) => {
+ if (rect) {
+ resolve(rect);
+ } else {
+ reject(rect);
+ }
+ })
+ .exec();
+ });
+};
+
+
+export const getTreeDepth = (tree, key) => tree.reduce((maxDepth, node) => {
+ const keyName = coalesce(key, 'children');
+ if (node[keyName] && node[keyName].length > 0) {
+ return Math.max(maxDepth, getTreeDepth(node[keyName], key) + 1);
+ }
+ return Math.max(maxDepth, 1);
+}, 0);
+
+export const isIOS = function () {
+ return !!(deviceInfo?.system?.toLowerCase().search('ios') + 1);
+};
+
+/**
+ * 判断是否是为企微环境
+ * 企微环境 wx.getSystemInfoSync() 接口会额外返回 environment 字段(微信中不返回)
+ * https://developer.work.weixin.qq.com/document/path/91511
+ */
+export const isWxWork = deviceInfo?.environment === 'wxwork';
+
+export const isPC = ['mac', 'windows'].includes(deviceInfo?.platform);
+
+export const addUnit = function (value) {
+ if (!isDef(value)) {
+ return undefined;
+ }
+ value = String(value);
+ return isNumeric(value) ? `${value}px` : value;
+};
+
+/**
+ * 计算字符串字符的长度并可以截取字符串。
+ * @param char 传入字符串(maxcharacter条件下,一个汉字表示两个字符)
+ * @param max 规定最大字符串长度
+ * @returns 当没有传入maxCharacter/maxLength 时返回字符串字符长度,当传入maxCharacter/maxLength时返回截取之后的字符串和长度。
+ */
+export const getCharacterLength = (type, char, max) => {
+ const str = String(coalesce(char, ''));
+
+ if (str.length === 0) {
+ return {
+ length: 0,
+ characters: '',
+ };
+ }
+
+ if (type === 'maxcharacter') {
+ let len = 0;
+ for (let i = 0; i < str.length; i += 1) {
+ let currentStringLength = 0;
+ if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
+ currentStringLength = 2;
+ } else {
+ currentStringLength = 1;
+ }
+ if (len + currentStringLength > max) {
+ return {
+ length: len,
+ characters: str.slice(0, i),
+ };
+ }
+ len += currentStringLength;
+ }
+ return {
+ length: len,
+ characters: str,
+ };
+ }
+
+ if (type === 'maxlength') {
+ const length = str.length > max ? max : str.length;
+ return {
+ length,
+ characters: str.slice(0, length),
+ };
+ }
+
+ return {
+ length: str.length,
+ characters: str,
+ };
+};
+
+export const chunk = (arr, size) => Array.from({ length: Math.ceil(arr.length / size) }, (v, i) => arr.slice(i * size, i * size + size));
+
+
+const getPageContext = () => {
+ const pages = getCurrentPages();
+ const page = pages[pages.length - 1];
+ return (page).$$basePage || page;
+};
+
+
+const findInstance = (context, pageContext, pureSelector) => {
+ if (context && context.$refs[pureSelector]) {
+ return context.$refs[pureSelector];
+ }
+ if (pageContext && pageContext.$refs[pureSelector]) {
+ return pageContext.$refs[pureSelector];
+ }
+ return null;
+};
+
+export const getInstance = function (context, selector) {
+ const pageContext = getPageContext();
+ const pureSelector = /^[.#]/.test(selector) ? selector.slice(1) : selector;
+ const instance = findInstance(context, pageContext, pureSelector);
+
+ if (!instance) {
+ console.warn('未找到组件,请检查 selector 是否正确');
+ return null;
+ }
+ return instance;
+};
+
+export const unitConvert = (value) => {
+ if (typeof value === 'string') {
+ if (value.includes('rpx')) {
+ return (parseInt(value, 10) * (coalesce(systemInfo?.screenWidth, 750))) / 750;
+ }
+ return parseInt(value, 10);
+ }
+ return coalesce(value, 0);
+};
+
+export const setIcon = (iconName, icon, defaultIcon) => {
+ if (icon) {
+ if (typeof icon === 'string') {
+ return {
+ [`${iconName}Name`]: icon,
+ [`${iconName}Data`]: {},
+ };
+ }
+ if (typeof icon === 'object') {
+ return {
+ [`${iconName}Name`]: '',
+ [`${iconName}Data`]: icon,
+ };
+ }
+ return {
+ [`${iconName}Name`]: defaultIcon,
+ [`${iconName}Data`]: {},
+ };
+ }
+ return {
+ [`${iconName}Name`]: '',
+ [`${iconName}Data`]: {},
+ };
+};
+
+export const toCamel = str => str.replace(/-(\w)/g, (match, m1) => m1.toUpperCase());
+export const toPascal = name => name
+ .split('-')
+ .map(part => part.charAt(0).toUpperCase() + part.slice(1))
+ .join('');
+
+export function hyphenate(str) {
+ const hyphenateRE = /\B([A-Z])/g;
+ return str.replace(hyphenateRE, '-$1').toLowerCase();
+}
+export const getCurrentPage = function () {
+ const pages = getCurrentPages();
+ return pages[pages.length - 1];
+};
+
+export const uniqueFactory = (compName) => {
+ let number = 0;
+ return () => {
+ const uniqueId = `${prefix}_${compName}_${number}`;
+ number += 1;
+ return uniqueId;
+ };
+};
+
+export const calcIcon = (icon, defaultIcon) => {
+ if (icon && ((isBoolean(icon) && defaultIcon) || isString(icon))) {
+ return { name: isBoolean(icon) ? defaultIcon : icon };
+ }
+ if (isObject(icon)) {
+ return icon;
+ }
+ return null;
+};
+
+export const isOverSize = (size, sizeLimit) => {
+ if (!sizeLimit) return false;
+
+ const base = 1000;
+ const unitMap = {
+ B: 1,
+ KB: base,
+ MB: base * base,
+ GB: base * base * base,
+ };
+ const computedSize = typeof sizeLimit === 'number'
+ ? sizeLimit * base
+ : sizeLimit?.size * unitMap[coalesce(sizeLimit?.unit, 'KB')]; // 单位 KB
+
+ return size > computedSize;
+};
+
+export const rpx2px = rpx => Math.floor((systemInfo.windowWidth * rpx) / 750);
+
+export const nextTick = () => new Promise((resolve) => {
+ setTimeout(() => {
+ resolve();
+ }, 33);
+});
+
diff --git a/uni_modules/tdesign-uniapp/components/common/utils.wxs.js b/uni_modules/tdesign-uniapp/components/common/utils.wxs.js
new file mode 100644
index 0000000..bab875d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/utils.wxs.js
@@ -0,0 +1,139 @@
+import { getRegExp } from './runtime/wxs-polyfill';
+/* utils */
+
+/**
+ * addUnit */
+// 为 css 添加单位
+function addUnit(value) {
+ const REGEXP = getRegExp('^-?\\d+(.\\d+)?$');
+ if (value == null) {
+ return undefined;
+ }
+ return REGEXP.test(`${value}`) ? `${value}px` : value;
+}
+
+function isString(string) {
+ return typeof string === 'string';
+}
+
+function isArray(array) {
+ return Array.isArray(array);
+}
+
+function isObject(x) {
+ const type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+function isBoolean(value) {
+ return typeof value === 'boolean';
+}
+
+const isNoEmptyObj = function (obj) {
+ return isObject(obj) && JSON.stringify(obj) !== '{}';
+};
+
+function includes(arr, value) {
+ if (!arr || !isArray(arr)) return false;
+
+ let i = 0;
+ const len = arr.length;
+
+ for (; i < len; i++) {
+ if (arr[i] === value) return true;
+ }
+ return false;
+}
+
+function cls(base, arr) {
+ const res = [base];
+ let i = 0;
+ for (let size = arr.length; i < size; i++) {
+ const item = arr[i];
+
+ if (item && Array.isArray(item)) {
+ const key = arr[i][0];
+ const value = arr[i][1];
+
+ if (value) {
+ res.push(`${base}--${key}`);
+ }
+ } else if (typeof item === 'string' || typeof item === 'number') {
+ if (item) {
+ res.push(`${base}--${item}`);
+ }
+ }
+ }
+ return res.join(' ');
+}
+
+function getBadgeAriaLabel(options) {
+ const maxCount = options.maxCount || 99;
+ if (options.dot) {
+ return '有新的消息';
+ }
+ if (options.count === '...') {
+ return '有很多消息';
+ }
+ if (isNaN(options.count)) {
+ return options.count;
+ }
+ const str1 = `有${maxCount}+条消息`;
+ const str2 = `有${options.count}条消息`;
+ return Number(options.count) > maxCount ? str1 : str2;
+}
+
+function endsWith(str, endStr) {
+ return str.slice(-endStr.length) === endStr ? str : str + endStr;
+}
+
+function keys(obj) {
+ return JSON.stringify(obj)
+ .replace(getRegExp('{|}|"', 'g'), '')
+ .split(',')
+ .map(item => item.split(':')[0]);
+}
+
+function kebabCase(str) {
+ return str
+ .replace(getRegExp('[A-Z]', 'g'), ele => `-${ele}`)
+ .toLowerCase();
+}
+
+// eslint-disable-next-line no-underscore-dangle
+function _style(styles) {
+ if (isArray(styles)) {
+ return styles
+ .filter(item => item != null && item !== '')
+ .map(item => ((isArray(item) || isObject(item)) ? _style(item) : endsWith(item, ';')))
+ .join(' ');
+ }
+
+ if (isObject(styles)) {
+ return keys(styles)
+ .filter(key => styles[key] != null && styles[key] !== '')
+ .map(key => [kebabCase(key), [styles[key]]].join(':'))
+ .join(';');
+ }
+
+ return styles;
+}
+
+function isValidIconName(str) {
+ // prettier-ignore
+ return getRegExp('^[A-Za-z0-9-_]+$').test(str);
+}
+
+export default {
+ addUnit,
+ isString,
+ isArray,
+ isObject,
+ isBoolean,
+ isNoEmptyObj,
+ includes,
+ cls,
+ getBadgeAriaLabel,
+ _style,
+ isValidIconName,
+};
diff --git a/uni_modules/tdesign-uniapp/components/common/validator.js b/uni_modules/tdesign-uniapp/components/common/validator.js
new file mode 100644
index 0000000..8c7bdf7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/validator.js
@@ -0,0 +1,38 @@
+export function isFunction(val) {
+ return typeof val === 'function';
+}
+
+export const isString = val => typeof val === 'string';
+
+export const isNull = value => value === null;
+
+export const isUndefined = value => value === undefined;
+
+export function isDef(value) {
+ return !isUndefined(value) && !isNull(value);
+}
+
+export function isInteger(value) {
+ return Number.isInteger(value);
+}
+
+export function isNumeric(value) {
+ return !Number.isNaN(Number(value));
+}
+
+export function isNumber(value) {
+ return typeof value === 'number';
+}
+
+export function isBoolean(value) {
+ return typeof value === 'boolean';
+}
+
+export function isObject(x) {
+ const type = typeof x;
+ return x !== null && (type === 'object' || type === 'function');
+}
+
+export function isPlainObject(val) {
+ return val !== null && typeof val === 'object' && Object.prototype.toString.call(val) === '[object Object]';
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/version.js b/uni_modules/tdesign-uniapp/components/common/version.js
new file mode 100644
index 0000000..36791b4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/version.js
@@ -0,0 +1,66 @@
+import { getAppBaseInfo } from './wechat';
+
+let systemInfo;
+
+// 获取系统信息
+function getSystemInfo() {
+ if (systemInfo == null) {
+ systemInfo = getAppBaseInfo();
+ }
+ return systemInfo;
+}
+
+// 版本号比较, 参考:https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html
+export function compareVersion(v1, v2) {
+ v1 = v1.split('.');
+ v2 = v2.split('.');
+ const len = Math.max(v1.length, v2.length);
+
+ while (v1.length < len) {
+ v1.push('0');
+ }
+ while (v2.length < len) {
+ v2.push('0');
+ }
+
+ for (let i = 0; i < len; i += 1) {
+ const num1 = parseInt(v1[i], 10);
+ const num2 = parseInt(v2[i], 10);
+
+ if (num1 > num2) {
+ return 1;
+ }
+ if (num1 < num2) {
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+function judgeByVersion(version) {
+ const currentSDKVersion = getSystemInfo().SDKVersion;
+ return compareVersion(currentSDKVersion, version) >= 0;
+}
+
+export function canIUseFormFieldButton() {
+ return judgeByVersion('2.10.3');
+}
+
+export function canUseVirtualHost() {
+ let result = false;
+
+ // #ifdef MP-WEIXIN
+ result = judgeByVersion('2.19.2');
+ // #endif
+
+ // #ifdef H5 || APP-PLUS || MP-ALIPAY
+ result = true;
+ // #endif
+
+ return result;
+}
+
+export function canUseProxyScrollView() {
+ return judgeByVersion('2.19.2');
+}
diff --git a/uni_modules/tdesign-uniapp/components/common/wechat.js b/uni_modules/tdesign-uniapp/components/common/wechat.js
new file mode 100644
index 0000000..0d1df43
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/common/wechat.js
@@ -0,0 +1,22 @@
+export const getObserver = (context, selector) => new Promise((resolve) => {
+ uni
+ .createIntersectionObserver(context, {
+ nativeMode: true,
+ })
+ .relativeToViewport()
+ .observe(selector, (res) => {
+ resolve(res);
+ });
+});
+
+/**
+ * 背景:单页模式下, getWindowInfo、getAppBaseInfo、getDeviceInfo 等接口均返回 undefined。
+ * 复现路径:分享到朋友圈,再打开单页模式的该页面,uni.getWindowInfo() 等接口返回 undefined
+ * 代码片段:https://developers.weixin.qq.com/s/mzvZ8FmH7vVW
+ */
+
+export const getWindowInfo = () => (uni.getWindowInfo ? uni.getWindowInfo() || uni.getSystemInfoSync() : uni.getSystemInfoSync());
+
+export const getAppBaseInfo = () => (uni.getAppBaseInfo ? uni.getAppBaseInfo() || uni.getSystemInfoSync() : uni.getSystemInfoSync());
+
+export const getDeviceInfo = () => (uni.getDeviceInfo ? uni.getDeviceInfo() || uni.getSystemInfoSync() : uni.getSystemInfoSync());
diff --git a/uni_modules/tdesign-uniapp/components/count-down/README.en-US.md b/uni_modules/tdesign-uniapp/components/count-down/README.en-US.md
new file mode 100644
index 0000000..8f50543
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/count-down/README.en-US.md
@@ -0,0 +1,50 @@
+:: BASE_DOC ::
+
+## API
+
+### CountDown Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+auto-start | Boolean | true | \- | N
+content | String | 'default' | \- | N
+format | String | HH:mm:ss | \- | N
+millisecond | Boolean | false | \- | N
+size | String | 'medium' | options: small/medium/large | N
+split-with-unit | Boolean | false | \- | N
+theme | String | 'default' | options: default/round/square | N
+time | Number | 0 | required | Y
+
+### CountDown Events
+
+name | params | description
+-- | -- | --
+change | `(time: TimeData)` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/count-down/type.ts)。
`interface TimeData { days: number; hours: number; minutes: number; seconds: number; milliseconds: number }`
+finish | \- | \-
+
+### CountDown Slots
+
+name | Description
+-- | --
+\- | \-
+content | \-
+
+### CountDown External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-count | \-
+t-class-split | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-countdown-bg-color | @error-color | -
+--td-countdown-default-color | @text-color-primary | -
+--td-countdown-round-border-radius | @radius-circle | -
+--td-countdown-round-color | @text-color-anti | -
+--td-countdown-square-border-radius | @radius-small | -
diff --git a/uni_modules/tdesign-uniapp/components/count-down/README.md b/uni_modules/tdesign-uniapp/components/count-down/README.md
new file mode 100644
index 0000000..36c613c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/count-down/README.md
@@ -0,0 +1,76 @@
+---
+title: CountDown 倒计时
+description: 用于实时展示倒计时数值。
+spline: data
+isComponent: true
+---
+
+
+> CountDown 组件用于实时展示倒计时数值。
+如果需要与站点演示一致的数字字体效果,推荐您到 数字字体章节,将 TCloudNumber 字体下载并将包含的 TCloudNumberVF.ttf 做为 TCloudNumber 字体资源引入到具体项目中使用。
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TCountDown from '@tdesign/uniapp/count-down/count-down.vue';
+```
+
+### 基础倒计时
+
+{{ base }}
+
+### 调整尺寸
+
+{{ size }}
+
+## API
+
+### CountDown Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+auto-start | Boolean | true | 是否自动开始倒计时 | N
+content | String | 'default' | 最终倒计时的展示内容,值为'default'时使用默认的格式,否则使用自定义样式插槽 | N
+format | String | HH:mm:ss | 时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒 | N
+millisecond | Boolean | false | 是否开启毫秒级渲染 | N
+size | String | 'medium' | 倒计时尺寸。可选项:small/medium/large | N
+split-with-unit | Boolean | false | 使用时间单位分割 | N
+theme | String | 'default' | 倒计时风格。可选项:default/round/square | N
+time | Number | 0 | 必需。倒计时时长,单位毫秒 | Y
+
+### CountDown Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(time: TimeData)` | 时间变化时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/count-down/type.ts)。
`interface TimeData { days: number; hours: number; minutes: number; seconds: number; milliseconds: number }`
+finish | \- | 倒计时结束时触发
+
+### CountDown Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,作用同 `content` 插槽
+content | 自定义 `content` 显示内容
+
+### CountDown External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-count | 计数样式类
+t-class-split | 分隔线样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-countdown-bg-color | @error-color | -
+--td-countdown-default-color | @text-color-primary | -
+--td-countdown-round-border-radius | @radius-circle | -
+--td-countdown-round-color | @text-color-anti | -
+--td-countdown-square-border-radius | @radius-small | -
diff --git a/uni_modules/tdesign-uniapp/components/count-down/computed.js b/uni_modules/tdesign-uniapp/components/count-down/computed.js
new file mode 100644
index 0000000..f48dcd3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/count-down/computed.js
@@ -0,0 +1,3 @@
+export const format = function (num) {
+ return num < 10 ? `0${num}` : num;
+};
diff --git a/uni_modules/tdesign-uniapp/components/count-down/count-down.css b/uni_modules/tdesign-uniapp/components/count-down/count-down.css
new file mode 100644
index 0000000..31c38f8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/count-down/count-down.css
@@ -0,0 +1,110 @@
+.t-count-down--small.t-count-down--default {
+ font-size: var(--td-font-size-base, 28rpx);
+}
+.t-count-down--small.t-count-down--round > .t-count-down__item {
+ font-size: var(--td-font-size-s, 24rpx);
+}
+.t-count-down--small.t-count-down--square > .t-count-down__item {
+ font-size: var(--td-font-size-s, 24rpx);
+}
+.t-count-down--small.t-count-down--round > .t-count-down__item,
+.t-count-down--small.t-count-down--square > .t-count-down__item {
+ width: 40rpx;
+ height: 40rpx;
+}
+.t-count-down--small.t-count-down--round > .t-count-down__split--dot,
+.t-count-down--small.t-count-down--square > .t-count-down__split--dot {
+ margin: 0 4rpx;
+ font-size: var(--td-font-size-base, 28rpx);
+ font-weight: 700;
+}
+.t-count-down--small.t-count-down--round > .t-count-down__split--text,
+.t-count-down--small.t-count-down--square > .t-count-down__split--text {
+ margin: 0 8rpx;
+ font-size: var(--td-font-size, 20rpx);
+}
+.t-count-down--medium.t-count-down--default {
+ font-size: var(--td-font-size-m, 32rpx);
+}
+.t-count-down--medium.t-count-down--round > .t-count-down__item {
+ font-size: var(--td-font-size-base, 28rpx);
+}
+.t-count-down--medium.t-count-down--square > .t-count-down__item {
+ font-size: var(--td-font-size-base, 28rpx);
+}
+.t-count-down--medium.t-count-down--round > .t-count-down__item,
+.t-count-down--medium.t-count-down--square > .t-count-down__item {
+ width: 48rpx;
+ height: 48rpx;
+}
+.t-count-down--medium.t-count-down--round > .t-count-down__split--dot,
+.t-count-down--medium.t-count-down--square > .t-count-down__split--dot {
+ margin: 0 6rpx;
+ font-size: var(--td-font-size-m, 32rpx);
+ font-weight: 700;
+}
+.t-count-down--medium.t-count-down--round > .t-count-down__split--text,
+.t-count-down--medium.t-count-down--square > .t-count-down__split--text {
+ margin: 0 10rpx;
+ font-size: var(--td-font-size-s, 24rpx);
+}
+.t-count-down--large.t-count-down--default {
+ font-size: 36rpx;
+}
+.t-count-down--large.t-count-down--round > .t-count-down__item {
+ font-size: var(--td-font-size-m, 32rpx);
+}
+.t-count-down--large.t-count-down--square > .t-count-down__item {
+ font-size: var(--td-font-size-m, 32rpx);
+}
+.t-count-down--large.t-count-down--round > .t-count-down__item,
+.t-count-down--large.t-count-down--square > .t-count-down__item {
+ width: 56rpx;
+ height: 56rpx;
+}
+.t-count-down--large.t-count-down--round > .t-count-down__split--dot,
+.t-count-down--large.t-count-down--square > .t-count-down__split--dot {
+ margin: 0 12rpx;
+ font-size: 36rpx;
+ font-weight: 700;
+}
+.t-count-down--large.t-count-down--round > .t-count-down__split--text,
+.t-count-down--large.t-count-down--square > .t-count-down__split--text {
+ margin: 0 12rpx;
+ font-size: var(--td-font-size-base, 28rpx);
+}
+.t-count-down {
+ font-family: TCloudNumber, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Source Han Sans CN, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
+ display: flex;
+}
+.t-count-down .t-count-down__item,
+.t-count-down .t-count-down__split {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.t-count-down--square > .t-count-down__split--dot,
+.t-count-down--round > .t-count-down__split--dot {
+ color: var(--td-error-color, var(--td-error-color-6, #d54941));
+}
+.t-count-down--square > .t-count-down__split--text,
+.t-count-down--round > .t-count-down__split--text {
+ color: var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
+}
+.t-count-down--default {
+ color: var(--td-countdown-default-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-count-down--square {
+ color: var(--td-countdown-round-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+}
+.t-count-down--square > .t-count-down__item {
+ border-radius: var(--td-countdown-square-border-radius, var(--td-radius-small, 6rpx));
+ background: var(--td-countdown-bg-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
+.t-count-down--round {
+ color: var(--td-countdown-round-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+}
+.t-count-down--round > .t-count-down__item {
+ border-radius: var(--td-countdown-round-border-radius, var(--td-radius-circle, 50%));
+ background: var(--td-countdown-bg-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
diff --git a/uni_modules/tdesign-uniapp/components/count-down/count-down.vue b/uni_modules/tdesign-uniapp/components/count-down/count-down.vue
new file mode 100644
index 0000000..7d7846a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/count-down/count-down.vue
@@ -0,0 +1,166 @@
+
+
+
+
+
+ {{ formattedTime }}
+
+
+
+
+ {{ formatUtil(timeData[timeRange[index]]) }}
+
+
+
+ {{ splitWithUnit ? timeDataUnit[timeRange[index]] : ':' }}
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/count-down/props.ts b/uni_modules/tdesign-uniapp/components/count-down/props.ts
new file mode 100644
index 0000000..f0a2f41
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/count-down/props.ts
@@ -0,0 +1,62 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdCountDownProps } from './type';
+export default {
+ /** 是否自动开始倒计时 */
+ autoStart: {
+ type: Boolean,
+ default: true,
+ },
+ /** 最终倒计时的展示内容,值为'default'时使用默认的格式,否则使用自定义样式插槽 */
+ content: {
+ type: String,
+ default: 'default' as TdCountDownProps['content'],
+ },
+ /** 时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒 */
+ format: {
+ type: String,
+ default: 'HH:mm:ss',
+ },
+ /** 是否开启毫秒级渲染 */
+ millisecond: Boolean,
+ /** 倒计时尺寸 */
+ size: {
+ type: String,
+ default: 'medium' as TdCountDownProps['size'],
+ validator(val: TdCountDownProps['size']): boolean {
+ if (!val) return true;
+ return ['small', 'medium', 'large'].includes(val);
+ },
+ },
+ /** 使用时间单位分割 */
+ splitWithUnit: Boolean,
+ /** 倒计时风格 */
+ theme: {
+ type: String,
+ default: 'default' as TdCountDownProps['theme'],
+ validator(val: TdCountDownProps['theme']): boolean {
+ if (!val) return true;
+ return ['default', 'round', 'square'].includes(val);
+ },
+ },
+ /** 倒计时时长,单位毫秒 */
+ time: {
+ type: Number,
+ default: 0,
+ required: true,
+ },
+ /** 时间变化时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 倒计时结束时触发 */
+ onFinish: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/count-down/type.ts b/uni_modules/tdesign-uniapp/components/count-down/type.ts
new file mode 100644
index 0000000..4023138
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/count-down/type.ts
@@ -0,0 +1,64 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdCountDownProps {
+ /**
+ * 是否自动开始倒计时
+ * @default true
+ */
+ autoStart?: boolean;
+ /**
+ * 最终倒计时的展示内容,值为'default'时使用默认的格式,否则使用自定义样式插槽
+ * @default 'default'
+ */
+ content?: string;
+ /**
+ * 时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒
+ * @default HH:mm:ss
+ */
+ format?: string;
+ /**
+ * 是否开启毫秒级渲染
+ * @default false
+ */
+ millisecond?: boolean;
+ /**
+ * 倒计时尺寸
+ * @default 'medium'
+ */
+ size?: 'small' | 'medium' | 'large';
+ /**
+ * 使用时间单位分割
+ * @default false
+ */
+ splitWithUnit?: boolean;
+ /**
+ * 倒计时风格
+ * @default 'default'
+ */
+ theme?: 'default' | 'round' | 'square';
+ /**
+ * 倒计时时长,单位毫秒
+ * @default 0
+ */
+ time: number;
+ /**
+ * 时间变化时触发
+ */
+ onChange?: (time: TimeData) => void;
+ /**
+ * 倒计时结束时触发
+ */
+ onFinish?: () => void;
+}
+
+export interface TimeData {
+ days: number;
+ hours: number;
+ minutes: number;
+ seconds: number;
+ milliseconds: number;
+}
diff --git a/uni_modules/tdesign-uniapp/components/count-down/utils.js b/uni_modules/tdesign-uniapp/components/count-down/utils.js
new file mode 100644
index 0000000..334e37a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/count-down/utils.js
@@ -0,0 +1,72 @@
+export const TimeDataUnit = {
+ DD: '天',
+ HH: '时',
+ mm: '分',
+ ss: '秒',
+ SSS: '毫秒',
+};
+
+const SECOND = 1000;
+const MINUTE = 60 * SECOND;
+const HOUR = 60 * MINUTE;
+const DAY = 24 * HOUR;
+
+export const parseTimeData = function (time) {
+ const days = Math.floor(time / DAY);
+ const hours = Math.floor((time % DAY) / HOUR);
+ const minutes = Math.floor((time % HOUR) / MINUTE);
+ const seconds = Math.floor((time % MINUTE) / SECOND);
+ const milliseconds = Math.floor(time % SECOND);
+ return {
+ DD: days,
+ HH: hours,
+ mm: minutes,
+ ss: seconds,
+ SSS: milliseconds,
+ };
+};
+
+export const isSameSecond = function (time1, time2) {
+ return Math.floor(time1 / 1000) === Math.floor(time2 / 1000);
+};
+
+
+/**
+ *
+ * @param time 倒计时时间,毫秒单位
+ * @param format 倒计时格式化字符串,例如:dd天hh小时mm分ss秒SSS毫秒,hh:mm:ss.SSS,hh:mm:ss
+ */
+export const parseFormat = function (time, format) {
+ const obj = {
+ 'D+': Math.floor(time / 86400000), // 日
+ 'H+': Math.floor((time % 86400000) / 3600000), // 小时
+ 'm+': Math.floor((time % 3600000) / 60000), // 分
+ 's+': Math.floor((time % 60000) / 1000), // 秒
+ 'S+': Math.floor(time % 1000), // 毫秒
+ };
+ const timeList = [];
+ let timeText = format;
+
+ Object.keys(obj).forEach((prop) => {
+ if (new RegExp(`(${prop})`).test(timeText)) {
+ timeText = timeText.replace(RegExp.$1, (match, offset, source) => {
+ const v = `${(obj)[prop]}`;
+ let digit = v;
+ if (match.length > 1) {
+ digit = (match.replace(new RegExp(match[0], 'g'), '0') + v).substr(v.length);
+ }
+ const unit = source.substr(offset + match.length);
+ const last = timeList[timeList.length - 1];
+ if (last) {
+ const index = last.unit.indexOf(match);
+ if (index !== -1) {
+ last.unit = last.unit.substr(0, index);
+ }
+ }
+ timeList.push({ digit, unit, match });
+ return digit;
+ });
+ }
+ });
+ return { timeText, timeList };
+};
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/README.en-US.md b/uni_modules/tdesign-uniapp/components/date-time-picker/README.en-US.md
new file mode 100644
index 0000000..4a4718b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/README.en-US.md
@@ -0,0 +1,61 @@
+:: BASE_DOC ::
+
+## API
+
+### DateTimePicker Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+auto-close | Boolean | false | \- | N
+cancel-btn | String | 取消 | \- | N
+confirm-btn | String | - | \- | N
+custom-locale | String | zh | \- | N
+end | String / Number | - | \- | N
+filter | Function | - | Typescript:`(type: TimeModeValues, columns: DateTimePickerColumn) => DateTimePickerColumn` `type DateTimePickerColumn = DateTimePickerColumnItem[]` `interface DateTimePickerColumnItem { label: string,value: string}`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/date-time-picker/type.ts) | N
+format | String | 'YYYY-MM-DD HH:mm:ss' | \- | N
+formatter | Function | - | Typescript:`(option: DateTimePickerColumnItem, columnIndex: number) => DateTimePickerColumnItem` | N
+header | Boolean | true | \- | N
+mode | String / Array | 'date' | Typescript:`DateTimePickerMode` `type DateTimePickerMode = TimeModeValues \| Array ` `type TimeModeValues = 'year' \| 'month' \| 'date' \| 'hour' \| 'minute' \| 'second' \| 'null'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/date-time-picker/type.ts) | N
+popup-props | Object | {} | popup properties。Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/date-time-picker/type.ts) | N
+show-week | Boolean | false | \- | N
+start | String / Number | - | \- | N
+steps | Object | {} | Typescript:`{ [key in TimeModeValues]?: number }` | N
+title | String | - | title of picker | N
+use-popup | Boolean | true | \- | N
+value | String / Number | - | `v-model:value` is supported。Typescript:`DateValue` `type DateValue = string \| number`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/date-time-picker/type.ts) | N
+default-value | String / Number | - | uncontrolled property。Typescript:`DateValue` `type DateValue = string \| number`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/date-time-picker/type.ts) | N
+visible | Boolean | false | \- | N
+
+### DateTimePicker Events
+
+name | params | description
+-- | -- | --
+cancel | \- | \-
+change | `(context: { value: DateValue })` | \-
+close | `(context: { trigger: DateTimePickerTriggerSource })` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/date-time-picker/type.ts)。
`type DateTimePickerTriggerSource = 'overlay' \| 'cancel-btn' \| 'confirm-btn'`
+confirm | `(context: { value: DateValue })` | \-
+pick | `(context: { value: DateValue })` | \-
+
+### DateTimePicker Slots
+
+name | Description
+-- | --
+footer | \-
+header | \-
+
+### DateTimePicker External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-cancel | \-
+t-class-confirm | \-
+t-class-title | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-data-time-picker-year-width | 128rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/README.md b/uni_modules/tdesign-uniapp/components/date-time-picker/README.md
new file mode 100644
index 0000000..60d18af
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/README.md
@@ -0,0 +1,105 @@
+---
+title: DateTimePicker 时间选择器
+description: 用于选择一个时间点或者一个时间段。
+spline: form
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TDateTimePicker from '@tdesign/uniapp/date-time-picker/date-time-picker.vue';
+```
+
+### 组件类型
+
+#### 年月日选择器
+
+{{ year-month-date }}
+
+#### 年月选择器
+
+{{ year-month }}
+
+### 时间选择器
+
+包括:`时分秒`、`时分`两个示例
+
+{{ time }}
+
+#### 年月日时分秒选择器
+
+{{ date-all }}
+
+### 组件用法
+
+#### 调整步数
+
+{{ steps }}
+
+#### 不使用 Popup
+
+{{ without-popup }}
+
+## API
+
+### DateTimePicker Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+auto-close | Boolean | false | 自动关闭;在确认、取消、点击遮罩层自动关闭,不需要手动设置 visible | N
+cancel-btn | String | 取消 | 取消按钮文字 | N
+confirm-btn | String | - | 确定按钮文字 | N
+custom-locale | String | zh | 组件国际化语言,目前支持: 简体中文(zh)、(tc)、英文(en)、日语(ja)、韩语(ko)、俄语(ru)等六种语言 | N
+end | String / Number | - | 选择器的最大可选时间,默认为当前时间+10年 | N
+filter | Function | - | 列选项过滤函数,支持自定义列内容。(type 值可为: year, month, date, hour, minute, second)。TS 类型:`(type: TimeModeValues, columns: DateTimePickerColumn) => DateTimePickerColumn` `type DateTimePickerColumn = DateTimePickerColumnItem[]` `interface DateTimePickerColumnItem { label: string,value: string}`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/date-time-picker/type.ts) | N
+format | String | 'YYYY-MM-DD HH:mm:ss' | 用于格式化 pick、change、confirm 事件返回的值,[详细文档](https://day.js.org/docs/en/display/format) | N
+formatter | Function | - | 格式化标签。TS 类型:`(option: DateTimePickerColumnItem, columnIndex: number) => DateTimePickerColumnItem` | N
+header | Boolean | true | 头部内容。值为 true 显示空白头部,值为 false 不显示任何内容 | N
+mode | String / Array | 'date' | year = 年;month = 年月;date = 年月日;hour = 年月日时; minute = 年月日时分;当类型为数组时,第一个值控制年月日,第二个值控制时分秒。TS 类型:`DateTimePickerMode` `type DateTimePickerMode = TimeModeValues \| Array ` `type TimeModeValues = 'year' \| 'month' \| 'date' \| 'hour' \| 'minute' \| 'second' \| 'null'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/date-time-picker/type.ts) | N
+popup-props | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/date-time-picker/type.ts) | N
+show-week | Boolean | false | 是否在日期旁边显示周几(如周一,周二,周日等) | N
+start | String / Number | - | 选择器的最小可选时间,默认为当前时间-10年 | N
+steps | Object | {} | 时间间隔步数,示例:`{ minute: 5 }`。TS 类型:`{ [key in TimeModeValues]?: number }` | N
+title | String | - | 标题 | N
+use-popup | Boolean | true | 是否使用弹出层包裹 | N
+value | String / Number | - | 选中值。支持语法糖 `v-model:value`。TS 类型:`DateValue` `type DateValue = string \| number`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/date-time-picker/type.ts) | N
+default-value | String / Number | - | 选中值。非受控属性。TS 类型:`DateValue` `type DateValue = string \| number`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/date-time-picker/type.ts) | N
+visible | Boolean | false | 是否显示 | N
+
+### DateTimePicker Events
+
+名称 | 参数 | 描述
+-- | -- | --
+cancel | \- | 取消按钮点击时触发
+change | `(context: { value: DateValue })` | 确认按钮点击时触发
+close | `(context: { trigger: DateTimePickerTriggerSource })` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/date-time-picker/type.ts)。
`type DateTimePickerTriggerSource = 'overlay' \| 'cancel-btn' \| 'confirm-btn'`
+confirm | `(context: { value: DateValue })` | 确认按钮点击时触发
+pick | `(context: { value: DateValue })` | 选中值发生变化时触发
+
+### DateTimePicker Slots
+
+名称 | 描述
+-- | --
+footer | 底部内容
+header | 自定义 `header` 显示内容
+
+### DateTimePicker External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-cancel | 取消样式类
+t-class-confirm | 确认样式类
+t-class-title | 标题样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-data-time-picker-year-width | 128rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/date-time-picker.css b/uni_modules/tdesign-uniapp/components/date-time-picker/date-time-picker.css
new file mode 100644
index 0000000..8c605be
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/date-time-picker.css
@@ -0,0 +1,4 @@
+.t-date-time-picker__item--roomly {
+ width: var(--td-data-time-picker-year-width, 128rpx);
+ flex: 0 0 var(--td-data-time-picker-year-width, 128rpx);
+}
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/date-time-picker.vue b/uni_modules/tdesign-uniapp/components/date-time-picker/date-time-picker.vue
new file mode 100644
index 0000000..6ba453b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/date-time-picker.vue
@@ -0,0 +1,570 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/locale/dayjs.js b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/dayjs.js
new file mode 100644
index 0000000..7092915
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/dayjs.js
@@ -0,0 +1,81 @@
+// dayjs 语言包
+import * as enLocale from '../../npm/dayjs/esm/locale/en';
+import * as zhLocale from '../../npm/dayjs/esm/locale/zh-cn';
+import * as tcLocale from '../../npm/dayjs/esm/locale/zh-tw'; // 繁体
+import * as koLocale from '../../npm/dayjs/esm/locale/ko'; // 韩语
+import * as jaLocale from '../../npm/dayjs/esm/locale/ja'; // 日语
+import * as ruLocale from '../../npm/dayjs/esm/locale/ru'; // 俄语
+
+// 本地语言包
+import en from './en';
+import zh from './zh';
+import tc from './tc';
+import ko from './ko';
+import ja from './ja';
+import ru from './ru';
+
+export default {
+ default: {
+ key: 'zh-cn',
+ label: '简体中文',
+ locale: zhLocale,
+ i18n: zh,
+ },
+ en: {
+ key: 'en',
+ label: 'English',
+ locale: enLocale,
+ i18n: en,
+ },
+ 'zh-cn': {
+ key: 'zh-cn',
+ label: '简体中文',
+ locale: zhLocale,
+ i18n: zh,
+ },
+ // 容错处理
+ zh: {
+ key: 'zh-cn',
+ label: '简体中文',
+ locale: zhLocale,
+ i18n: zh,
+ },
+ 'zh-tw': {
+ key: 'zh-tw',
+ label: '繁体中文',
+ locale: tcLocale,
+ i18n: tc,
+ },
+ // 容错处理
+ tc: {
+ key: 'zh-tw',
+ label: '繁体中文',
+ locale: tcLocale,
+ i18n: tc,
+ },
+ ko: {
+ key: 'ko',
+ label: '한국어',
+ locale: koLocale,
+ i18n: ko,
+ },
+ // 容错处理
+ kr: {
+ key: 'ko',
+ label: '한국어',
+ locale: koLocale,
+ i18n: ko,
+ },
+ ja: {
+ key: 'ja',
+ label: '日本語',
+ locale: jaLocale,
+ i18n: ja,
+ },
+ ru: {
+ key: 'ru',
+ label: 'русский',
+ locale: ruLocale,
+ i18n: ru,
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/locale/en.js b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/en.js
new file mode 100644
index 0000000..59f5a03
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/en.js
@@ -0,0 +1,12 @@
+export default {
+ year: '',
+ month: '',
+ date: '',
+ hour: '',
+ minute: '',
+ second: '',
+ am: 'AM',
+ pm: 'PM',
+ confirm: 'confirm',
+ cancel: 'cancel',
+};
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/locale/ja.js b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/ja.js
new file mode 100644
index 0000000..0756974
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/ja.js
@@ -0,0 +1,12 @@
+export default {
+ year: '年',
+ month: '月',
+ date: '日',
+ hour: '時',
+ minute: '分',
+ second: '秒',
+ am: '午前',
+ pm: '午後',
+ confirm: '確認',
+ cancel: 'キャンセル',
+};
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/locale/ko.js b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/ko.js
new file mode 100644
index 0000000..76a3953
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/ko.js
@@ -0,0 +1,12 @@
+export default {
+ year: '년',
+ month: '월',
+ date: '일',
+ hour: '시',
+ minute: '분',
+ second: '초',
+ am: '오전',
+ pm: '오후',
+ confirm: '확인',
+ cancel: '취소',
+};
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/locale/ru.js b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/ru.js
new file mode 100644
index 0000000..23c707c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/ru.js
@@ -0,0 +1,12 @@
+export default {
+ year: '',
+ month: '',
+ date: '',
+ hour: '',
+ minute: '',
+ second: '',
+ am: 'до полудня',
+ pm: 'после полудня',
+ confirm: 'подтвердить',
+ cancel: 'отменить',
+};
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/locale/tc.js b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/tc.js
new file mode 100644
index 0000000..58e7cbf
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/tc.js
@@ -0,0 +1,12 @@
+export default {
+ year: '年',
+ month: '月',
+ date: '日',
+ hour: '時',
+ minute: '分',
+ second: '秒',
+ am: '上午',
+ pm: '下午',
+ confirm: '確定',
+ cancel: '取消',
+};
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/locale/zh.js b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/zh.js
new file mode 100644
index 0000000..6656674
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/locale/zh.js
@@ -0,0 +1,12 @@
+export default {
+ year: '年',
+ month: '月',
+ date: '日',
+ hour: '时',
+ minute: '分',
+ second: '秒',
+ am: '上午',
+ pm: '下午',
+ confirm: '确定',
+ cancel: '取消',
+};
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/props.ts b/uni_modules/tdesign-uniapp/components/date-time-picker/props.ts
new file mode 100644
index 0000000..c5eb351
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/props.ts
@@ -0,0 +1,114 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdDateTimePickerProps } from './type';
+export default {
+ /** 自动关闭;在确认、取消、点击遮罩层自动关闭,不需要手动设置 visible */
+ autoClose: Boolean,
+ /** 取消按钮文字 */
+ cancelBtn: {
+ type: String,
+ default: '取消',
+ },
+ /** 确定按钮文字 */
+ confirmBtn: {
+ type: String,
+ default: '',
+ },
+ /** 组件国际化语言,目前支持: 简体中文(zh)、(tc)、英文(en)、日语(ja)、韩语(ko)、俄语(ru)等六种语言 */
+ customLocale: {
+ type: String,
+ default: 'zh',
+ },
+ /** 选择器的最大可选时间,默认为当前时间+10年 */
+ end: {
+ type: [String, Number],
+ },
+ /** 列选项过滤函数,支持自定义列内容。(type 值可为: year, month, date, hour, minute, second) */
+ filter: {
+ type: Function,
+ },
+ /** 用于格式化 pick、change、confirm 事件返回的值,[详细文档](https://day.js.org/docs/en/display/format) */
+ format: {
+ type: String,
+ default: 'YYYY-MM-DD HH:mm:ss',
+ },
+ /** 格式化标签 */
+ formatter: {
+ type: Function,
+ },
+ /** 头部内容。值为 true 显示空白头部,值为 false 不显示任何内容 */
+ header: {
+ type: Boolean,
+ default: true as TdDateTimePickerProps['header'],
+ },
+ /** year = 年;month = 年月;date = 年月日;hour = 年月日时; minute = 年月日时分;当类型为数组时,第一个值控制年月日,第二个值控制时分秒 */
+ mode: {
+ type: [String, Array],
+ default: 'date' as TdDateTimePickerProps['mode'],
+ },
+ /** 透传 Popup 组件全部属性 */
+ popupProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 是否在日期旁边显示周几(如周一,周二,周日等) */
+ showWeek: Boolean,
+ /** 选择器的最小可选时间,默认为当前时间-10年 */
+ start: {
+ type: [String, Number],
+ },
+ /** 时间间隔步数,示例:`{ minute: 5 }` */
+ steps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 标题 */
+ title: {
+ type: String,
+ default: '',
+ },
+ /** 是否使用弹出层包裹 */
+ usePopup: {
+ type: Boolean,
+ default: true,
+ },
+ /** 选中值 */
+ value: {
+ type: [String, Number],
+ },
+ /** 选中值,非受控属性 */
+ defaultValue: {
+ type: [String, Number],
+ },
+ /** 是否显示 */
+ visible: Boolean,
+ /** 取消按钮点击时触发 */
+ onCancel: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 确认按钮点击时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 关闭时触发 */
+ onClose: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 确认按钮点击时触发 */
+ onConfirm: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 选中值发生变化时触发 */
+ onPick: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/date-time-picker/type.ts b/uni_modules/tdesign-uniapp/components/date-time-picker/type.ts
new file mode 100644
index 0000000..dda2a98
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/date-time-picker/type.ts
@@ -0,0 +1,134 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdPopupProps as PopupProps } from '../popup/type';
+
+export interface TdDateTimePickerProps {
+ /**
+ * 自动关闭;在确认、取消、点击遮罩层自动关闭,不需要手动设置 visible
+ * @default false
+ */
+ autoClose?: boolean;
+ /**
+ * 取消按钮文字
+ * @default 取消
+ */
+ cancelBtn?: string;
+ /**
+ * 确定按钮文字
+ * @default ''
+ */
+ confirmBtn?: string;
+ /**
+ * 组件国际化语言,目前支持: 简体中文(zh)、(tc)、英文(en)、日语(ja)、韩语(ko)、俄语(ru)等六种语言
+ * @default zh
+ */
+ customLocale?: string;
+ /**
+ * 选择器的最大可选时间,默认为当前时间+10年
+ */
+ end?: string | number;
+ /**
+ * 列选项过滤函数,支持自定义列内容。(type 值可为: year, month, date, hour, minute, second)
+ */
+ filter?: (type: TimeModeValues, columns: DateTimePickerColumn) => DateTimePickerColumn;
+ /**
+ * 用于格式化 pick、change、confirm 事件返回的值,[详细文档](https://day.js.org/docs/en/display/format)
+ * @default 'YYYY-MM-DD HH:mm:ss'
+ */
+ format?: string;
+ /**
+ * 格式化标签
+ */
+ formatter?: (option: DateTimePickerColumnItem, columnIndex: number) => DateTimePickerColumnItem;
+ /**
+ * 头部内容。值为 true 显示空白头部,值为 false 不显示任何内容
+ * @default true
+ */
+ header?: boolean;
+ /**
+ * year = 年;month = 年月;date = 年月日;hour = 年月日时; minute = 年月日时分;当类型为数组时,第一个值控制年月日,第二个值控制时分秒
+ * @default 'date'
+ */
+ mode?: DateTimePickerMode;
+ /**
+ * 透传 Popup 组件全部属性
+ * @default {}
+ */
+ popupProps?: PopupProps;
+ /**
+ * 是否在日期旁边显示周几(如周一,周二,周日等)
+ * @default false
+ */
+ showWeek?: boolean;
+ /**
+ * 选择器的最小可选时间,默认为当前时间-10年
+ */
+ start?: string | number;
+ /**
+ * 时间间隔步数,示例:`{ minute: 5 }`
+ * @default {}
+ */
+ steps?: { [key in TimeModeValues]?: number };
+ /**
+ * 标题
+ * @default ''
+ */
+ title?: string;
+ /**
+ * 是否使用弹出层包裹
+ * @default true
+ */
+ usePopup?: boolean;
+ /**
+ * 选中值
+ */
+ value?: DateValue;
+ /**
+ * 选中值,非受控属性
+ */
+ defaultValue?: DateValue;
+ /**
+ * 是否显示
+ * @default false
+ */
+ visible?: boolean;
+ /**
+ * 取消按钮点击时触发
+ */
+ onCancel?: () => void;
+ /**
+ * 确认按钮点击时触发
+ */
+ onChange?: (context: { value: DateValue }) => void;
+ /**
+ * 关闭时触发
+ */
+ onClose?: (context: { trigger: DateTimePickerTriggerSource }) => void;
+ /**
+ * 确认按钮点击时触发
+ */
+ onConfirm?: (context: { value: DateValue }) => void;
+ /**
+ * 选中值发生变化时触发
+ */
+ onPick?: (context: { value: DateValue }) => void;
+}
+
+export type DateTimePickerColumn = DateTimePickerColumnItem[];
+
+export interface DateTimePickerColumnItem {
+ label: string;
+ value: string;
+}
+
+export type DateTimePickerMode = TimeModeValues | Array;
+
+export type TimeModeValues = 'year' | 'month' | 'date' | 'hour' | 'minute' | 'second' | 'null';
+
+export type DateValue = string | number;
+
+export type DateTimePickerTriggerSource = 'overlay' | 'cancel-btn' | 'confirm-btn';
diff --git a/uni_modules/tdesign-uniapp/components/demo-header/demo-header.vue b/uni_modules/tdesign-uniapp/components/demo-header/demo-header.vue
new file mode 100644
index 0000000..e1cf5dc
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/demo-header/demo-header.vue
@@ -0,0 +1,60 @@
+
+
+
+
+ {{ title }}
+
+
+ {{ desc }}
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/demo-header/index.css b/uni_modules/tdesign-uniapp/components/demo-header/index.css
new file mode 100644
index 0000000..e69de29
diff --git a/uni_modules/tdesign-uniapp/components/demo-navbar/demo-navbar.vue b/uni_modules/tdesign-uniapp/components/demo-navbar/demo-navbar.vue
new file mode 100644
index 0000000..19d7753
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/demo-navbar/demo-navbar.vue
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/demo/demo.vue b/uni_modules/tdesign-uniapp/components/demo/demo.vue
new file mode 100644
index 0000000..407c45e
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/demo/demo.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
+ {{ operItem.title }}
+
+
+
+ {{ btnItem.text }}
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/demo/index.css b/uni_modules/tdesign-uniapp/components/demo/index.css
new file mode 100644
index 0000000..5365e6f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/demo/index.css
@@ -0,0 +1,46 @@
+.demo-block {
+ margin: var(--td-spacer-4, 64rpx) 0 0;
+}
+.demo-block__header {
+ color: var(--bg-color-demo-title);
+ margin: 0 var(--td-spacer-2, 32rpx);
+}
+.demo-block__header-title {
+ font-weight: 700;
+ font-size: 36rpx;
+ line-height: 52rpx;
+}
+.demo-block__header-desc {
+ margin-top: var(--td-spacer, 16rpx);
+ font-size: var(--td-font-size-base, 28rpx);
+ white-space: pre-line;
+ color: var(--bg-color-demo-desc);
+ line-height: 22px;
+}
+.demo-block__oper {
+ margin-top: var(--td-spacer, 16rpx);
+}
+.demo-block__oper-subtitle {
+ font-size: var(--td-font-size-s, 24rpx);
+ margin-bottom: var(--td-spacer-2, 32rpx);
+ opacity: 0.4;
+}
+.demo-block__oper-btn {
+ margin: 0 0 var(--td-spacer-2, 32rpx) 0;
+ height: 96rpx;
+}
+.demo-block__slot {
+ margin-top: var(--td-spacer-2, 32rpx);
+}
+.demo-block__slot.with-padding {
+ margin-top: var(--td-spacer-2, 32rpx);
+ margin-left: var(--td-spacer-2, 32rpx);
+ margin-right: var(--td-spacer-2, 32rpx);
+ margin-bottom: 0;
+}
+.demo-block_notitle {
+ margin-top: 0px;
+}
+.demo-block_notitle .demo-block_subtitle {
+ margin-top: var(--td-spacer-3, 48rpx);
+}
diff --git a/uni_modules/tdesign-uniapp/components/dialog/README.en-US.md b/uni_modules/tdesign-uniapp/components/dialog/README.en-US.md
new file mode 100644
index 0000000..4ca4aea
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dialog/README.en-US.md
@@ -0,0 +1,69 @@
+:: BASE_DOC ::
+
+## API
+
+### Dialog Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+actions | Array | - | Typescript:`Array`,[Button API Documents](./button?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dialog/type.ts) | N
+button-layout | String | horizontal | options: horizontal/vertical | N
+cancel-btn | String / Object | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dialog/type.ts) | N
+close-btn | Boolean / Object | false | Typescript:`boolean \| ButtonProps \| null`,[Button API Documents](./button?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dialog/type.ts) | N
+close-on-overlay-click | Boolean | false | \- | N
+confirm-btn | String / Object | - | \- | N
+content | String | - | \- | N
+overlay-props | Object | {} | Typescript:`OverlayProps`,[Overlay API Documents](./overlay?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dialog/type.ts) | N
+prevent-scroll-through | Boolean | true | \- | N
+show-overlay | Boolean | true | \- | N
+title | String | - | \- | N
+using-custom-navbar | Boolean | false | \- | N
+visible | Boolean | - | \- | N
+z-index | Number | 11500 | \- | N
+
+### Dialog Events
+
+name | params | description
+-- | -- | --
+action | `(context: { index: number })` | \-
+cancel | `(context: { e: MouseEvent })` | \-
+close | `(context: { trigger: DialogEventSource })` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dialog/type.ts)。
`type DialogEventSource = 'cancel' \| 'overlay' \| 'close-btn'`
+confirm | `(context: { e: MouseEvent })` | \-
+overlay-click | `(context: { e: MouseEvent })` | \-
+
+### Dialog Slots
+
+name | Description
+-- | --
+actions | \-
+cancel-btn | \-
+confirm-btn | \-
+content | \-
+middle | \-
+title | \-
+top | \-
+
+### Dialog External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-action | \-
+t-class-cancel | \-
+t-class-confirm | \-
+t-class-content | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-dialog-body-max-height | 912rpx | -
+--td-dialog-border-radius | @radius-extraLarge | -
+--td-dialog-close-color | @text-color-placeholder | -
+--td-dialog-content-color | @text-color-secondary | -
+--td-dialog-content-font | @font-body-large | -
+--td-dialog-title-color | @text-color-primary | -
+--td-dialog-title-font | @font-title-large | -
+--td-dialog-width | 622rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/dialog/README.md b/uni_modules/tdesign-uniapp/components/dialog/README.md
new file mode 100644
index 0000000..be102f3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dialog/README.md
@@ -0,0 +1,120 @@
+---
+title: Dialog 对话框
+description: 用于显示重要提示或请求用户进行重要操作,一种打断当前操作的模态视图。
+spline: message
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TDialog from '@tdesign/uniapp/dialog/dialog.vue';
+```
+
+### 组件类型
+
+按钮的样式,默认使用 `variant = text`,如果任意按钮改变了 `variant`,那么全部按钮都改变成这个。
+
+#### 反馈类对话框
+
+{{ base }}
+
+> 使用这种方式,对话框的 `visible` 是受控的,需要手动设置额 `visible` 为 `false` 才会关闭对话框。
+
+#### 确认类对话框
+
+{{ confirm }}
+
+#### 输入类对话框
+
+{{ with-input }}
+
+#### 带图片对话框
+
+{{ with-image }}
+
+### 组件状态
+
+{{ status }}
+
+### 组件用法
+#### 命令调用
+
+{{ command }}
+
+#### 开放能力按钮
+
+当传入的按钮类型为对象时,整个对象都将透传至 `t-button`,因此按钮可以直接使用开放能力
+
+{{ button }}
+
+## API
+
+### Dialog Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+actions | Array | - | 操作栏。TS 类型:`Array`,[Button API Documents](./button?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dialog/type.ts) | N
+button-layout | String | horizontal | 多按钮排列方式。可选项:horizontal/vertical | N
+cancel-btn | String / Object | - | 取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 Slot 自定义按钮时,需自行控制取消事件。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dialog/type.ts) | N
+close-btn | Boolean / Object | false | 是否展示关闭按钮,值为 `true` 显示默认关闭按钮;值为 `false` 则不显示关闭按钮;使用 Object 时透传至图标组件。TS 类型:`boolean \| ButtonProps \| null`,[Button API Documents](./button?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dialog/type.ts) | N
+close-on-overlay-click | Boolean | false | 点击蒙层时是否触发关闭事件 | N
+confirm-btn | String / Object | - | 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 Slot 自定义按钮时,需自行控制确认事件 | N
+content | String | - | 内容 | N
+overlay-props | Object | {} | 透传至 Overlay 组件。TS 类型:`OverlayProps`,[Overlay API Documents](./overlay?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dialog/type.ts) | N
+prevent-scroll-through | Boolean | true | 防止滚动穿透 | N
+show-overlay | Boolean | true | 是否显示遮罩层 | N
+title | String | - | 标题 | N
+using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
+visible | Boolean | - | 控制对话框是否显示 | N
+z-index | Number | 11500 | 对话框层级,Web 侧样式默认为 2500,移动端样式默认 2500,小程序样式默认为 11500 | N
+
+### Dialog Events
+
+名称 | 参数 | 描述
+-- | -- | --
+action | `(context: { index: number })` | 点击多按钮中的其中一个时触发
+cancel | `(context: { e: MouseEvent })` | 如果“取消”按钮存在,则点击“取消”按钮时触发,同时触发关闭事件
+close | `(context: { trigger: DialogEventSource })` | 关闭事件,点击 取消按钮 或 点击蒙层 时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dialog/type.ts)。
`type DialogEventSource = 'cancel' \| 'overlay' \| 'close-btn'`
+confirm | `(context: { e: MouseEvent })` | 如果“确认”按钮存在,则点击“确认”按钮时触发
+overlay-click | `(context: { e: MouseEvent })` | 如果蒙层存在,点击蒙层时触发
+
+### Dialog Slots
+
+名称 | 描述
+-- | --
+actions | 自定义 `actions` 显示内容
+cancel-btn | 自定义 `cancel-btn` 显示内容
+confirm-btn | 自定义 `confirm-btn` 显示内容
+content | 自定义 `content` 显示内容
+middle | 中间自定义内容
+title | 自定义 `title` 显示内容
+top | 顶部自定义内容
+
+### Dialog External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-action | 操作样式类
+t-class-cancel | 取消样式类
+t-class-confirm | 确认样式类
+t-class-content | 内容样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-dialog-body-max-height | 912rpx | -
+--td-dialog-border-radius | @radius-extraLarge | -
+--td-dialog-close-color | @text-color-placeholder | -
+--td-dialog-content-color | @text-color-secondary | -
+--td-dialog-content-font | @font-body-large | -
+--td-dialog-title-color | @text-color-primary | -
+--td-dialog-title-font | @font-title-large | -
+--td-dialog-width | 622rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/dialog/computed.js b/uni_modules/tdesign-uniapp/components/dialog/computed.js
new file mode 100644
index 0000000..777c714
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dialog/computed.js
@@ -0,0 +1,15 @@
+import { coalesce } from '../common/utils';
+
+export const getTypeof = function (obj) {
+ return typeof obj;
+};
+
+export const getActionClass = function (prefix, buttonLayout, actionItem, tClassAction) {
+ const cls = [`${prefix}__button`, `${prefix}__button--action`];
+
+ if (buttonLayout) {
+ cls.push(`${prefix}__button--${buttonLayout}`);
+ }
+
+ return `${cls.join(' ')} ${coalesce(actionItem.tClass, tClassAction)}`;
+};
diff --git a/uni_modules/tdesign-uniapp/components/dialog/dialog.css b/uni_modules/tdesign-uniapp/components/dialog/dialog.css
new file mode 100644
index 0000000..dd676e4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dialog/dialog.css
@@ -0,0 +1,102 @@
+.t-dialog {
+ overflow: hidden;
+ width: var(--td-dialog-width, 622rpx);
+ border-radius: var(--td-dialog-border-radius, var(--td-radius-extraLarge, 24rpx));
+ background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+}
+.t-dialog__wrapper {
+ --td-popup-border-radius: var(--td-dialog-border-radius, var(--td-radius-extraLarge, 24rpx));
+}
+.t-dialog__close-btn {
+ position: absolute;
+ top: var(--td-spacer, 16rpx);
+ right: var(--td-spacer, 16rpx);
+ color: var(--td-dialog-close-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ z-index: 1;
+ /* skyline适配新增 */
+}
+.t-dialog__content {
+ padding-top: var(--td-spacer-3, 48rpx);
+ padding-right: var(--td-spacer-3, 48rpx);
+ padding-bottom: 0;
+ padding-left: var(--td-spacer-3, 48rpx);
+ max-height: var(--td-dialog-body-max-height, 912rpx);
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ font-size: var(--td-font-size-m, 32rpx);
+}
+.t-dialog__content:empty {
+ display: none;
+}
+.t-dialog__header {
+ text-align: center;
+ font: var(--td-dialog-title-font, var(--td-font-title-large, 600 36rpx / 52rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-dialog-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-dialog__header + .t-dialog__body {
+ margin-top: var(--td-spacer, 16rpx);
+}
+.t-dialog__body {
+ overflow-y: scroll;
+ text-align: center;
+ -webkit-overflow-scrolling: touch;
+ font: var(--td-dialog-content-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-dialog-content-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
+}
+.t-dialog__body-text {
+ word-wrap: break-word;
+}
+.t-dialog__body--left {
+ text-align: left;
+}
+.t-dialog__body--right {
+ text-align: right;
+}
+.t-dialog__footer {
+ display: flex;
+ padding: var(--td-spacer-3, 48rpx);
+}
+.t-dialog__footer--column {
+ flex-flow: column-reverse;
+}
+.t-dialog__footer--column :deep(.t-dialog__button) {
+ width: 100%;
+}
+.t-dialog__footer--full {
+ padding: var(--td-spacer-4, 64rpx) 0 0;
+}
+:deep(.t-dialog__button) {
+ position: relative;
+ flex: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+:deep(.t-dialog__button)--horizontal:not(:first-child) {
+ margin-left: var(--td-spacer-1, 24rpx);
+}
+:deep(.t-dialog__button)--vertical:not(:first-child) {
+ margin-bottom: var(--td-spacer-1, 24rpx);
+}
+:deep(.t-dialog__button)--text {
+ flex: 1;
+ --td-button-border-radius: 0;
+ --td-button-medium-height: 112rpx;
+ border-radius: 0;
+}
+:deep(.t-dialog__button)--text:before {
+ content: ' ';
+ position: absolute;
+ box-sizing: border-box;
+ top: 0;
+ left: 0;
+ border-top: 1px solid var(--td-border-level-1-color, var(--td-gray-color-3, #e7e7e7));
+ border-left: 1px solid var(--td-border-level-1-color, var(--td-gray-color-3, #e7e7e7));
+ transform: scale(0.5);
+ transform-origin: 0 0;
+ width: 200%;
+ height: 200%;
+ border-radius: 0;
+}
diff --git a/uni_modules/tdesign-uniapp/components/dialog/dialog.vue b/uni_modules/tdesign-uniapp/components/dialog/dialog.vue
new file mode 100644
index 0000000..8b741c7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dialog/dialog.vue
@@ -0,0 +1,422 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dataTitle }}
+
+
+
+
+ {{ dataContent }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/dialog/index.d.ts b/uni_modules/tdesign-uniapp/components/dialog/index.d.ts
new file mode 100644
index 0000000..28a3150
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dialog/index.d.ts
@@ -0,0 +1,42 @@
+declare type Context = any;
+interface DialogAlertOptionsType {
+ context?: Context;
+ selector?: string;
+ title?: string;
+ content?: string;
+ zIndex?: number;
+ asyncClose?: boolean;
+ confirmButtonText?: string;
+ textAlign?: string;
+ cancelBtn?: string | object;
+ confirmBtn?: string | object;
+ showOverlay?: boolean;
+ closeOnOverlayClick?: boolean;
+ preventScrollThrough?: boolean;
+}
+interface DialogConfirmOptionsType extends DialogAlertOptionsType {
+ cancelButtonText?: string;
+}
+interface Action {
+ content: string;
+ theme?: 'default' | 'primary' | 'danger' | 'light';
+}
+interface DialogActionOptionsType {
+ context?: Context;
+ selector?: string;
+ title?: string;
+ content: string;
+ zIndex?: number;
+ asyncClose?: boolean;
+ actions?: Action[];
+ buttonLayout?: 'vertical' | 'horizontal';
+}
+declare const Handler: {
+ alert(options: DialogAlertOptionsType): Promise;
+ confirm(options: DialogConfirmOptionsType): Promise;
+ close(options?: DialogConfirmOptionsType): Promise;
+ action(options: DialogActionOptionsType): Promise<{
+ index: number;
+ }>;
+};
+export default Handler;
diff --git a/uni_modules/tdesign-uniapp/components/dialog/index.js b/uni_modules/tdesign-uniapp/components/dialog/index.js
new file mode 100644
index 0000000..ffe6afb
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dialog/index.js
@@ -0,0 +1,90 @@
+import props from './props';
+import { getInstance } from '../common/utils';
+
+
+const defaultOptions = {
+ actions: [],
+ buttonLayout: props.buttonLayout.default,
+ cancelBtn: props.cancelBtn.default,
+ closeOnOverlayClick: props.closeOnOverlayClick.default,
+ confirmBtn: props.confirmBtn.value,
+ content: '',
+ preventScrollThrough: props.preventScrollThrough.default,
+ showOverlay: props.showOverlay.default,
+ title: '',
+ visible: props.visible.default,
+};
+
+export default {
+ alert(options) {
+ const { context, selector = '#t-dialog', ...otherOptions } = { ...options };
+ const instance = getInstance(context, selector);
+ if (!instance) return Promise.reject();
+
+ return new Promise((resolve) => {
+ const mergedOptions = {
+ ...defaultOptions,
+ ...instance.properties,
+ ...otherOptions,
+ };
+ instance.setData({
+ cancelBtn: '',
+ ...mergedOptions,
+ visible: true,
+ });
+ instance._onConfirm = resolve;
+ });
+ },
+ confirm(options) {
+ const { context, selector = '#t-dialog', ...otherOptions } = { ...options };
+ const instance = getInstance(context, selector);
+ if (!instance) return Promise.reject();
+
+ return new Promise((resolve, reject) => {
+ const mergedOptions = {
+ ...defaultOptions,
+ ...instance.properties,
+ ...otherOptions,
+ };
+ instance.setData({
+ ...mergedOptions,
+ visible: true,
+ });
+ instance._onConfirm = resolve;
+ instance._onCancel = reject;
+ });
+ },
+ close(options) {
+ const { context, selector = '#t-dialog' } = { ...options };
+ const instance = getInstance(context, selector);
+ if (instance) {
+ instance.close();
+ return Promise.resolve();
+ }
+ return Promise.reject();
+ },
+ action(options) {
+ const { context, selector = '#t-dialog', ...otherOptions } = { ...options };
+ const instance = getInstance(context, selector);
+ if (!instance) return Promise.reject();
+ const { buttonLayout = 'vertical', actions = instance.properties.actions } = options;
+ const maxLengthSuggestion = buttonLayout === 'vertical' ? 7 : 3;
+ if (!actions || (typeof actions === 'object' && (actions.length === 0 || actions.length > maxLengthSuggestion))) {
+ console.warn(`action 数量建议控制在1至${maxLengthSuggestion}个`);
+ }
+
+ return new Promise((resolve) => {
+ const mergedOptions = {
+ ...defaultOptions,
+ ...instance.properties,
+ ...otherOptions,
+ };
+ instance.setData({
+ ...mergedOptions,
+ buttonLayout,
+ visible: true,
+ });
+ instance._onAction = resolve;
+ });
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/dialog/props.ts b/uni_modules/tdesign-uniapp/components/dialog/props.ts
new file mode 100644
index 0000000..d822c4d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dialog/props.ts
@@ -0,0 +1,94 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdDialogProps } from './type';
+export default {
+ /** 操作栏 */
+ actions: {
+ type: Array,
+ },
+ /** 多按钮排列方式 */
+ buttonLayout: {
+ type: String,
+ default: 'horizontal' as TdDialogProps['buttonLayout'],
+ validator(val: TdDialogProps['buttonLayout']): boolean {
+ if (!val) return true;
+ return ['horizontal', 'vertical'].includes(val);
+ },
+ },
+ /** 取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 Slot 自定义按钮时,需自行控制取消事件 */
+ cancelBtn: {
+ type: [String, Object],
+ },
+ /** 是否展示关闭按钮,值为 `true` 显示默认关闭按钮;值为 `false` 则不显示关闭按钮;使用 Object 时透传至图标组件 */
+ closeBtn: {
+ type: [Boolean, Object],
+ default: false as TdDialogProps['closeBtn'],
+ },
+ /** 点击蒙层时是否触发关闭事件 */
+ closeOnOverlayClick: Boolean,
+ /** 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 Slot 自定义按钮时,需自行控制确认事件 */
+ confirmBtn: {
+ type: [String, Object],
+ },
+ /** 内容 */
+ content: {
+ type: String,
+ },
+ /** 透传至 Overlay 组件 */
+ overlayProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 防止滚动穿透 */
+ preventScrollThrough: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否显示遮罩层 */
+ showOverlay: {
+ type: Boolean,
+ default: true,
+ },
+ /** 标题 */
+ title: {
+ type: String,
+ },
+ /** 是否使用了自定义导航栏 */
+ usingCustomNavbar: Boolean,
+ /** 控制对话框是否显示 */
+ visible: Boolean,
+ /** 对话框层级,Web 侧样式默认为 2500,移动端样式默认 2500,小程序样式默认为 11500 */
+ zIndex: {
+ type: Number,
+ default: 11500,
+ },
+ /** 点击多按钮中的其中一个时触发 */
+ onAction: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 如果“取消”按钮存在,则点击“取消”按钮时触发,同时触发关闭事件 */
+ onCancel: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 关闭事件,点击 取消按钮 或 点击蒙层 时触发 */
+ onClose: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 如果“确认”按钮存在,则点击“确认”按钮时触发 */
+ onConfirm: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 如果蒙层存在,点击蒙层时触发 */
+ onOverlayClick: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/dialog/type.ts b/uni_modules/tdesign-uniapp/components/dialog/type.ts
new file mode 100644
index 0000000..f07a26e
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dialog/type.ts
@@ -0,0 +1,97 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdButtonProps as ButtonProps } from '../button/type';
+import type { TdOverlayProps as OverlayProps } from '../overlay/type';
+
+export interface TdDialogProps {
+ /**
+ * 操作栏
+ */
+ actions?: Array;
+ /**
+ * 多按钮排列方式
+ * @default horizontal
+ */
+ buttonLayout?: 'horizontal' | 'vertical';
+ /**
+ * 取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 Slot 自定义按钮时,需自行控制取消事件
+ */
+ cancelBtn?: string | ButtonProps | null;
+ /**
+ * 是否展示关闭按钮,值为 `true` 显示默认关闭按钮;值为 `false` 则不显示关闭按钮;使用 Object 时透传至图标组件
+ * @default false
+ */
+ closeBtn?: boolean | ButtonProps | null;
+ /**
+ * 点击蒙层时是否触发关闭事件
+ * @default false
+ */
+ closeOnOverlayClick?: boolean;
+ /**
+ * 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 Slot 自定义按钮时,需自行控制确认事件
+ */
+ confirmBtn?: string | ButtonProps | null;
+ /**
+ * 内容
+ */
+ content?: string;
+ /**
+ * 透传至 Overlay 组件
+ * @default {}
+ */
+ overlayProps?: OverlayProps;
+ /**
+ * 防止滚动穿透
+ * @default true
+ */
+ preventScrollThrough?: boolean;
+ /**
+ * 是否显示遮罩层
+ * @default true
+ */
+ showOverlay?: boolean;
+ /**
+ * 标题
+ */
+ title?: string;
+ /**
+ * 是否使用了自定义导航栏
+ * @default false
+ */
+ usingCustomNavbar?: boolean;
+ /**
+ * 控制对话框是否显示
+ */
+ visible?: boolean;
+ /**
+ * 对话框层级,Web 侧样式默认为 2500,移动端样式默认 2500,小程序样式默认为 11500
+ * @default 11500
+ */
+ zIndex?: number;
+ /**
+ * 点击多按钮中的其中一个时触发
+ */
+ onAction?: (context: { index: number }) => void;
+ /**
+ * 如果“取消”按钮存在,则点击“取消”按钮时触发,同时触发关闭事件
+ */
+ onCancel?: (context: { e: MouseEvent }) => void;
+ /**
+ * 关闭事件,点击 取消按钮 或 点击蒙层 时触发
+ */
+ onClose?: (context: { trigger: DialogEventSource }) => void;
+ /**
+ * 如果“确认”按钮存在,则点击“确认”按钮时触发
+ */
+ onConfirm?: (context: { e: MouseEvent }) => void;
+ /**
+ * 如果蒙层存在,点击蒙层时触发
+ */
+ onOverlayClick?: (context: { e: MouseEvent }) => void;
+}
+
+export type DialogEventSource = 'cancel' | 'overlay' | 'close-btn';
diff --git a/uni_modules/tdesign-uniapp/components/divider/README.en-US.md b/uni_modules/tdesign-uniapp/components/divider/README.en-US.md
new file mode 100644
index 0000000..e21874c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/divider/README.en-US.md
@@ -0,0 +1,40 @@
+:: BASE_DOC ::
+
+## API
+
+### Divider Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+align | String | center | options: left/right/center | N
+content | String | - | \- | N
+dashed | Boolean | false | \- | N
+layout | String | horizontal | options: horizontal/vertical | N
+
+### Divider Slots
+
+name | Description
+-- | --
+content | \-
+
+### Divider External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-content | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-divider-border-width | 2rpx | -
+--td-divider-color | @bg-color-component | -
+--td-divider-content-color | @text-color-placeholder | -
+--td-divider-content-font | @font-body-small | -
+--td-divider-content-line-style | solid | -
+--td-divider-content-margin | @spacer-1 | -
+--td-divider-horizontal-margin | 20rpx | -
+--td-divider-vertical-margin | @spacer | -
diff --git a/uni_modules/tdesign-uniapp/components/divider/README.md b/uni_modules/tdesign-uniapp/components/divider/README.md
new file mode 100644
index 0000000..10fd486
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/divider/README.md
@@ -0,0 +1,64 @@
+---
+title: Divider 分割线
+description: 用于分割、组织、细化有一定逻辑的组织元素内容和页面结构。
+spline: message
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TDivider from '@tdesign/uniapp/divider/divider.vue';
+```
+
+### 基础分割符
+
+分割符主要是由直线和文字组成,通过`slot`传入分割线文案或者其他自定义内容,通过`layout`控制分隔符是垂直还是横向
+
+{{ base }}
+
+### 虚线样式
+
+{{ theme }}
+
+## API
+
+### Divider Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+align | String | center | 文本位置(仅在水平分割线有效)。可选项:left/right/center | N
+content | String | - | 子元素 | N
+dashed | Boolean | false | 是否虚线(仅在水平分割线有效) | N
+layout | String | horizontal | 分隔线类型有两种:水平和垂直。可选项:horizontal/vertical | N
+
+### Divider Slots
+
+名称 | 描述
+-- | --
+content | 自定义 `content` 显示内容
+
+### Divider External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-content | 内容样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-divider-border-width | 2rpx | -
+--td-divider-color | @bg-color-component | -
+--td-divider-content-color | @text-color-placeholder | -
+--td-divider-content-font | @font-body-small | -
+--td-divider-content-line-style | solid | -
+--td-divider-content-margin | @spacer-1 | -
+--td-divider-horizontal-margin | 20rpx | -
+--td-divider-vertical-margin | @spacer | -
diff --git a/uni_modules/tdesign-uniapp/components/divider/divider.css b/uni_modules/tdesign-uniapp/components/divider/divider.css
new file mode 100644
index 0000000..f7b9fe9
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/divider/divider.css
@@ -0,0 +1,56 @@
+.t-divider {
+ display: flex;
+ color: var(--td-divider-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ border-color: var(--td-divider-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ border-style: var(--td-divider-content-line-style, solid);
+ border-width: 0;
+}
+.t-divider::before,
+.t-divider::after {
+ content: '';
+ display: block;
+ flex: 1;
+ box-sizing: border-box;
+ border: inherit;
+ border-color: inherit;
+ border-style: inherit;
+}
+.t-divider--horizontal {
+ align-items: center;
+ margin: var(--td-divider-horizontal-margin, 20rpx) 0;
+}
+.t-divider--horizontal::before,
+.t-divider--horizontal::after {
+ border-top-width: var(--td-divider-border-width, 2rpx);
+ transform: scaleY(0.5);
+ transform-origin: center;
+}
+.t-divider--horizontal .t-divider__content:not(:empty) {
+ margin: 0 var(--td-divider-content-margin, var(--td-spacer-1, 24rpx));
+}
+.t-divider--vertical {
+ flex-direction: column;
+ height: 28rpx;
+ margin: 0 var(--td-divider-vertical-margin, var(--td-spacer, 16rpx));
+}
+.t-divider--vertical::before,
+.t-divider--vertical::after {
+ border-left-width: var(--td-divider-border-width, 2rpx);
+ transform: scaleX(0.5);
+ transform-origin: center;
+}
+.t-divider--vertical-center {
+ align-items: center;
+ height: 100%;
+}
+.t-divider--dashed {
+ border-style: dashed;
+}
+.t-divider__content {
+ font: var(--td-divider-content-font, var(--td-font-body-small, 24rpx / 40rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-divider-content-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+}
+.t-divider--left::before,
+.t-divider--right::after {
+ max-width: 60rpx;
+}
diff --git a/uni_modules/tdesign-uniapp/components/divider/divider.vue b/uni_modules/tdesign-uniapp/components/divider/divider.vue
new file mode 100644
index 0000000..944b15f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/divider/divider.vue
@@ -0,0 +1,79 @@
+
+
+
+
+
+ {{ content }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/divider/props.ts b/uni_modules/tdesign-uniapp/components/divider/props.ts
new file mode 100644
index 0000000..0474070
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/divider/props.ts
@@ -0,0 +1,33 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdDividerProps } from './type';
+export default {
+ /** 文本位置(仅在水平分割线有效) */
+ align: {
+ type: String,
+ default: 'center' as TdDividerProps['align'],
+ validator(val: TdDividerProps['align']): boolean {
+ if (!val) return true;
+ return ['left', 'right', 'center'].includes(val);
+ },
+ },
+ /** 子元素 */
+ content: {
+ type: String,
+ },
+ /** 是否虚线(仅在水平分割线有效) */
+ dashed: Boolean,
+ /** 分隔线类型有两种:水平和垂直 */
+ layout: {
+ type: String,
+ default: 'horizontal' as TdDividerProps['layout'],
+ validator(val: TdDividerProps['layout']): boolean {
+ if (!val) return true;
+ return ['horizontal', 'vertical'].includes(val);
+ },
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/divider/type.ts b/uni_modules/tdesign-uniapp/components/divider/type.ts
new file mode 100644
index 0000000..22acac7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/divider/type.ts
@@ -0,0 +1,27 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdDividerProps {
+ /**
+ * 文本位置(仅在水平分割线有效)
+ * @default center
+ */
+ align?: 'left' | 'right' | 'center';
+ /**
+ * 子元素
+ */
+ content?: string;
+ /**
+ * 是否虚线(仅在水平分割线有效)
+ * @default false
+ */
+ dashed?: boolean;
+ /**
+ * 分隔线类型有两种:水平和垂直
+ * @default horizontal
+ */
+ layout?: 'horizontal' | 'vertical';
+}
diff --git a/uni_modules/tdesign-uniapp/components/draggable/draggable.css b/uni_modules/tdesign-uniapp/components/draggable/draggable.css
new file mode 100644
index 0000000..84c77e0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/draggable/draggable.css
@@ -0,0 +1,16 @@
+.hotspot-expanded.relative {
+ position: relative;
+}
+.hotspot-expanded::after {
+ content: '';
+ display: block;
+ position: absolute;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ transform: scale(1.5);
+}
+.t-draggable {
+ position: fixed;
+}
diff --git a/uni_modules/tdesign-uniapp/components/draggable/draggable.vue b/uni_modules/tdesign-uniapp/components/draggable/draggable.vue
new file mode 100644
index 0000000..1a46bd1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/draggable/draggable.vue
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/draggable/props.js b/uni_modules/tdesign-uniapp/components/draggable/props.js
new file mode 100644
index 0000000..9542dae
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/draggable/props.js
@@ -0,0 +1,19 @@
+const props = {
+ direction: {
+ type: String,
+ value: 'all',
+ },
+ tClass: {
+ type: String,
+ default: '',
+ },
+ tClassButton: {
+ type: String,
+ default: '',
+ },
+ customStyle: {
+ type: [String, Object],
+ default: '',
+ },
+};
+export default props;
diff --git a/uni_modules/tdesign-uniapp/components/drawer/README.en-US.md b/uni_modules/tdesign-uniapp/components/drawer/README.en-US.md
new file mode 100644
index 0000000..fe75fc2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/drawer/README.en-US.md
@@ -0,0 +1,54 @@
+:: BASE_DOC ::
+
+## API
+
+### Drawer Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+close-on-overlay-click | Boolean | true | \- | N
+destroy-on-close | Boolean | false | \- | N
+items | Array | - | Typescript:`DrawerItem[]` `interface DrawerItem { title: string; icon: string; }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/drawer/type.ts) | N
+overlay-props | Object | {} | Typescript:`OverlayProps`,[Overlay API Documents](./overlay?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/drawer/type.ts) | N
+placement | String | right | options: left/right | N
+show-overlay | Boolean | true | \- | N
+title | String | - | \- | N
+using-custom-navbar | Boolean | false | \- | N
+visible | Boolean | false | \- | N
+z-index | Number | 11500 | \- | N
+
+### Drawer Events
+
+name | params | description
+-- | -- | --
+close | `(context: { trigger: DrawerTriggerSource })` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/drawer/type.ts)。
`type DrawerTriggerSource = 'overlay'`
+item-click | `(context: { index: number; item: DrawerItem })` | \-
+overlay-click | \- | \-
+update-visible | `(context: { visible: boolean })` | \-
+
+### Drawer Slots
+
+name | Description
+-- | --
+\- | \-
+footer | \-
+title | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-drawer-bg-color | @bg-color-container | -
+--td-drawer-border-color | @border-level-1-color | -
+--td-drawer-footer-padding-bottom | 40rpx | -
+--td-drawer-hover-color | @bg-color-secondarycontainer | -
+--td-drawer-item-icon-color | @drawer-title-color | -
+--td-drawer-item-icon-size | 48rpx | -
+--td-drawer-item-padding | 32rpx | -
+--td-drawer-sidebar-height | 70vh | -
+--td-drawer-title-color | @text-color-primary | -
+--td-drawer-title-font | @font-title-large | -
+--td-drawer-title-padding | 48rpx 32rpx 16rpx | -
+--td-drawer-width | 560rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/drawer/README.md b/uni_modules/tdesign-uniapp/components/drawer/README.md
new file mode 100644
index 0000000..eed12c6
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/drawer/README.md
@@ -0,0 +1,80 @@
+---
+title: Drawer 抽屉
+description: 用作一组平行关系页面/内容的切换器,相较于Tab,同屏可展示更多的选项数量。
+spline: message
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TDrawer from '@tdesign/uniapp/drawer/drawer.vue';
+```
+
+
+### 基础抽屉
+{{ base }}
+
+### 带图标的抽屉
+{{ icon-drawer }}
+
+>Drawer的 `visible` 是受控的,需要手动设置 `visible` 为 `true` 才会开启抽屉
+
+
+
+## API
+
+### Drawer Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+close-on-overlay-click | Boolean | true | 点击蒙层时是否触发抽屉关闭事件 | N
+destroy-on-close | Boolean | false | 抽屉关闭时是否销毁节点 | N
+items | Array | - | 抽屉里的列表项。TS 类型:`DrawerItem[]` `interface DrawerItem { title: string; icon: string; }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/drawer/type.ts) | N
+overlay-props | Object | {} | 遮罩层的属性,透传至 overlay。TS 类型:`OverlayProps`,[Overlay API Documents](./overlay?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/drawer/type.ts) | N
+placement | String | right | 抽屉方向。可选项:left/right | N
+show-overlay | Boolean | true | 是否显示遮罩层 | N
+title | String | - | 抽屉的标题 | N
+using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
+visible | Boolean | false | 组件是否可见。支持语法糖 `v-model:visible` | N
+z-index | Number | 11500 | 抽屉层级,样式默认为 11500 | N
+
+### Drawer Events
+
+名称 | 参数 | 描述
+-- | -- | --
+close | `(context: { trigger: DrawerTriggerSource })` | 关闭时触发。。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/drawer/type.ts)。
`type DrawerTriggerSource = 'overlay'`
+item-click | `(context: { index: number; item: DrawerItem })` | 点击抽屉里的列表项
+overlay-click | \- | 如果蒙层存在,点击蒙层时触发
+update-visible | `(context: { visible: boolean })` | 更新可见性
+
+### Drawer Slots
+
+名称 | 描述
+-- | --
+\- | 自定义抽屉的底部
+footer | 抽屉的底部
+title | 自定义 `title` 显示内容
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-drawer-bg-color | @bg-color-container | -
+--td-drawer-border-color | @border-level-1-color | -
+--td-drawer-footer-padding-bottom | 40rpx | -
+--td-drawer-hover-color | @bg-color-secondarycontainer | -
+--td-drawer-item-icon-color | @drawer-title-color | -
+--td-drawer-item-icon-size | 48rpx | -
+--td-drawer-item-padding | 32rpx | -
+--td-drawer-sidebar-height | 70vh | -
+--td-drawer-title-color | @text-color-primary | -
+--td-drawer-title-font | @font-title-large | -
+--td-drawer-title-padding | 48rpx 32rpx 16rpx | -
+--td-drawer-width | 560rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/drawer/drawer.css b/uni_modules/tdesign-uniapp/components/drawer/drawer.css
new file mode 100644
index 0000000..127da13
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/drawer/drawer.css
@@ -0,0 +1,62 @@
+.t-drawer {
+ background: var(--td-drawer-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ width: var(--td-drawer-width, 560rpx);
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+}
+.t-drawer--hover {
+ background-color: var(--td-drawer-hover-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+}
+.t-drawer__title {
+ font: var(--td-drawer-title-font, var(--td-font-title-large, 600 36rpx / 52rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ padding: 48rpx 32rpx 16rpx;
+ color: var(--td-drawer-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-drawer__sidebar {
+ height: var(--td-drawer-sidebar-height, 70vh);
+}
+.t-drawer__sidebar-item {
+ display: flex;
+ align-items: center;
+ position: relative;
+ padding-top: var(--td-drawer-item-padding, 32rpx);
+ padding-right: 0;
+ padding-bottom: var(--td-drawer-item-padding, 32rpx);
+ padding-left: var(--td-drawer-item-padding, 32rpx);
+ font: var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
+.t-drawer__sidebar-item::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: unset;
+ bottom: 0;
+ left: unset;
+ right: unset;
+ background-color: var(--td-drawer-border-color, var(--td-border-level-1-color, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-drawer__sidebar-item::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-drawer__sidebar-item::after {
+ left: var(--td-drawer-item-padding, 32rpx);
+}
+.t-drawer__sidebar-item-title {
+ flex: 1;
+ color: var(--td-drawer-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-drawer__sidebar-item-icon {
+ padding-right: 16rpx;
+ color: var(--td-drawer-item-icon-color, var(--td-drawer-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)))));
+ font-size: var(--td-drawer-item-icon-size, 48rpx);
+}
+.t-drawer__footer {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ padding-bottom: var(--td-drawer-footer-padding-bottom, 40rpx);
+}
diff --git a/uni_modules/tdesign-uniapp/components/drawer/drawer.vue b/uni_modules/tdesign-uniapp/components/drawer/drawer.vue
new file mode 100644
index 0000000..c314a1b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/drawer/drawer.vue
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/drawer/props.ts b/uni_modules/tdesign-uniapp/components/drawer/props.ts
new file mode 100644
index 0000000..ee0b693
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/drawer/props.ts
@@ -0,0 +1,72 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdDrawerProps } from './type';
+export default {
+ /** 点击蒙层时是否触发抽屉关闭事件 */
+ closeOnOverlayClick: {
+ type: Boolean,
+ default: true,
+ },
+ /** 抽屉关闭时是否销毁节点 */
+ destroyOnClose: Boolean,
+ /** 抽屉里的列表项 */
+ items: {
+ type: Array,
+ },
+ /** 遮罩层的属性,透传至 overlay */
+ overlayProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 抽屉方向 */
+ placement: {
+ type: String,
+ default: 'right' as TdDrawerProps['placement'],
+ validator(val: TdDrawerProps['placement']): boolean {
+ if (!val) return true;
+ return ['left', 'right'].includes(val);
+ },
+ },
+ /** 是否显示遮罩层 */
+ showOverlay: {
+ type: Boolean,
+ default: true,
+ },
+ /** 抽屉的标题 */
+ title: {
+ type: String,
+ },
+ /** 是否使用了自定义导航栏 */
+ usingCustomNavbar: Boolean,
+ /** 组件是否可见。支持语法糖 `v-model:visible` */
+ visible: Boolean,
+ /** 抽屉层级,样式默认为 11500 */
+ zIndex: {
+ type: Number,
+ default: 11500,
+ },
+ /** 关闭时触发。 */
+ onClose: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击抽屉里的列表项 */
+ onItemClick: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 如果蒙层存在,点击蒙层时触发 */
+ onOverlayClick: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 更新可见性 */
+ onUpdateVisible: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/drawer/type.ts b/uni_modules/tdesign-uniapp/components/drawer/type.ts
new file mode 100644
index 0000000..837d783
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/drawer/type.ts
@@ -0,0 +1,81 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdOverlayProps as OverlayProps } from '../overlay/type';
+
+export interface TdDrawerProps {
+ /**
+ * 点击蒙层时是否触发抽屉关闭事件
+ * @default true
+ */
+ closeOnOverlayClick?: boolean;
+ /**
+ * 抽屉关闭时是否销毁节点
+ * @default false
+ */
+ destroyOnClose?: boolean;
+ /**
+ * 抽屉里的列表项
+ */
+ items?: DrawerItem[];
+ /**
+ * 遮罩层的属性,透传至 overlay
+ * @default {}
+ */
+ overlayProps?: OverlayProps;
+ /**
+ * 抽屉方向
+ * @default right
+ */
+ placement?: 'left' | 'right';
+ /**
+ * 是否显示遮罩层
+ * @default true
+ */
+ showOverlay?: boolean;
+ /**
+ * 抽屉的标题
+ */
+ title?: string;
+ /**
+ * 是否使用了自定义导航栏
+ * @default false
+ */
+ usingCustomNavbar?: boolean;
+ /**
+ * 组件是否可见。支持语法糖 `v-model:visible`
+ * @default false
+ */
+ visible?: boolean;
+ /**
+ * 抽屉层级,样式默认为 11500
+ * @default 11500
+ */
+ zIndex?: number;
+ /**
+ * 关闭时触发。
+ */
+ onClose?: (context: { trigger: DrawerTriggerSource }) => void;
+ /**
+ * 点击抽屉里的列表项
+ */
+ onItemClick?: (context: { index: number; item: DrawerItem }) => void;
+ /**
+ * 如果蒙层存在,点击蒙层时触发
+ */
+ onOverlayClick?: () => void;
+ /**
+ * 更新可见性
+ */
+ onUpdateVisible?: (context: { visible: boolean }) => void;
+}
+
+export interface DrawerItem {
+ title: string;
+ icon: string;
+}
+
+export type DrawerTriggerSource = 'overlay';
diff --git a/uni_modules/tdesign-uniapp/components/dropdown-item/computed.js b/uni_modules/tdesign-uniapp/components/dropdown-item/computed.js
new file mode 100644
index 0000000..e8886ef
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dropdown-item/computed.js
@@ -0,0 +1,6 @@
+export function getStyles(top, zIndex) {
+ const topStyle = top ? `top:${top}px;` : '';
+ const zIndexStyle = zIndex ? `z-index:${zIndex};` : '';
+ return topStyle + zIndexStyle;
+}
+
diff --git a/uni_modules/tdesign-uniapp/components/dropdown-item/dropdown-item.css b/uni_modules/tdesign-uniapp/components/dropdown-item/dropdown-item.css
new file mode 100644
index 0000000..e38e9fd
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dropdown-item/dropdown-item.css
@@ -0,0 +1,97 @@
+/** dropdown-item */
+.t-dropdown-item {
+ position: fixed;
+ right: 0;
+ left: 0;
+ top: 0;
+ overflow: hidden;
+ bottom: 0;
+}
+.t-dropdown-item__content {
+ display: flex;
+ flex-direction: column;
+ z-index: 11600;
+ overflow: hidden;
+}
+.t-dropdown-item__popup-host {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ position: absolute;
+ left: 0;
+ top: 0;
+}
+.t-dropdown-item__body {
+ flex: 1;
+ background: var(--td-dropdown-menu-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ overflow: auto;
+ max-height: var(--td-dropdown-body-max-height, 560rpx);
+}
+.t-dropdown-item__body--tree {
+ display: flex;
+ overflow: hidden;
+}
+.t-dropdown-item__body--multi {
+ padding-top: var(--td-spacer, 16rpx);
+ padding-bottom: var(--td-spacer, 16rpx);
+ overflow-y: auto;
+}
+.t-dropdown-item__scroll {
+ max-height: var(--td-dropdown-body-max-height, 560rpx);
+}
+.t-dropdown-item__footer {
+ display: flex;
+ background: var(--td-dropdown-menu-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ padding: 32rpx;
+ position: relative;
+}
+.t-dropdown-item__footer::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: 0;
+ bottom: unset;
+ left: unset;
+ right: unset;
+ background-color: var(--td-component-border, var(--td-gray-color-4, #dcdcdc));
+}
+.t-dropdown-item__footer::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+:deep(.t-dropdown-item__footer-btn) {
+ flex: 1;
+}
+:deep(.t-dropdown-item__footer-btn + .t-dropdown-item__footer-btn) {
+ margin-left: 32rpx;
+}
+.t-dropdown-item__body:empty,
+.t-dropdown-item__footer:empty {
+ display: none;
+}
+.t-dropdown-item__radio,
+.t-dropdown-item__checkbox {
+ width: 100%;
+ overflow: scroll;
+ box-sizing: border-box;
+}
+.t-dropdown-item__radio-group,
+.t-dropdown-item__checkbox-group {
+ display: grid;
+ grid-gap: 24rpx;
+}
+.t-dropdown-item__radio-group {
+ display: grid;
+ grid-gap: 0rpx;
+}
+.t-dropdown-item__checkbox-group {
+ padding: 32rpx;
+}
+.t-dropdown-item__mask {
+ position: fixed;
+ width: 100vh;
+ top: 0;
+ left: 0;
+}
diff --git a/uni_modules/tdesign-uniapp/components/dropdown-item/dropdown-item.vue b/uni_modules/tdesign-uniapp/components/dropdown-item/dropdown-item.vue
new file mode 100644
index 0000000..71e3a02
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dropdown-item/dropdown-item.vue
@@ -0,0 +1,403 @@
+
+
+
+
+
+
+
+
+ onRadioChange(e, item[valueAlias])"
+ />
+
+
+
+
+
+
+ onCheckboxChange(e, item[valueAlias])"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/dropdown-item/props.ts b/uni_modules/tdesign-uniapp/components/dropdown-item/props.ts
new file mode 100644
index 0000000..7ba6c44
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dropdown-item/props.ts
@@ -0,0 +1,71 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdDropdownItemProps } from './type';
+export default {
+ /** 是否禁用操作项 */
+ disabled: Boolean,
+ /** 用来定义 value / label / disabled 在 `options` 中对应的字段别名 */
+ keys: {
+ type: Object,
+ },
+ /** 标题 */
+ label: {
+ type: String,
+ default: '',
+ },
+ /** 是否多选 */
+ multiple: Boolean,
+ /** 选项数据 */
+ options: {
+ type: Array,
+ default: (): TdDropdownItemProps['options'] => [],
+ },
+ /** 选项分栏(1-3) */
+ optionsColumns: {
+ type: [String, Number],
+ default: 1 as TdDropdownItemProps['optionsColumns'],
+ },
+ /** 复选框和内容相对位置,仅单选菜单栏有效 */
+ placement: {
+ type: String,
+ default: 'left' as TdDropdownItemProps['placement'],
+ validator(val: TdDropdownItemProps['placement']): boolean {
+ if (!val) return true;
+ return ['left', 'right'].includes(val);
+ },
+ },
+ /** 选中值 */
+ value: {
+ type: [String, Number, Array],
+ default: undefined as TdDropdownItemProps['value'],
+ },
+ /** 选中值,非受控属性 */
+ defaultValue: {
+ type: [String, Number, Array],
+ default: undefined as TdDropdownItemProps['defaultValue'],
+ },
+ /** 值改变时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 关闭时触发 */
+ onClose: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击确认时触发 */
+ onConfirm: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击重置时触发 */
+ onReset: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/dropdown-item/type.ts b/uni_modules/tdesign-uniapp/components/dropdown-item/type.ts
new file mode 100644
index 0000000..c4ba0ce
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dropdown-item/type.ts
@@ -0,0 +1,76 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { KeysType } from '../common/common';
+
+export interface TdDropdownItemProps {
+ /**
+ * 是否禁用操作项
+ * @default false
+ */
+ disabled?: boolean;
+ /**
+ * 用来定义 value / label / disabled 在 `options` 中对应的字段别名
+ */
+ keys?: KeysType;
+ /**
+ * 标题
+ * @default ''
+ */
+ label?: string;
+ /**
+ * 是否多选
+ * @default false
+ */
+ multiple?: boolean;
+ /**
+ * 选项数据
+ * @default []
+ */
+ options?: Array;
+ /**
+ * 选项分栏(1-3)
+ * @default 1
+ */
+ optionsColumns?: string | number;
+ /**
+ * 复选框和内容相对位置,仅单选菜单栏有效
+ * @default left
+ */
+ placement?: 'left' | 'right';
+ /**
+ * 选中值
+ */
+ value?: DropdownValue;
+ /**
+ * 选中值,非受控属性
+ */
+ defaultValue?: DropdownValue;
+ /**
+ * 值改变时触发
+ */
+ onChange?: (context: { value: DropdownValue }) => void;
+ /**
+ * 关闭时触发
+ */
+ onClose?: () => void;
+ /**
+ * 点击确认时触发
+ */
+ onConfirm?: (context: { value: DropdownValue }) => void;
+ /**
+ * 点击重置时触发
+ */
+ onReset?: () => void;
+}
+
+export interface DropdownOption {
+ label: string;
+ disabled: boolean;
+ value: DropdownValue;
+}
+
+export type DropdownValue = string | number | Array;
diff --git a/uni_modules/tdesign-uniapp/components/dropdown-menu/README.en-US.md b/uni_modules/tdesign-uniapp/components/dropdown-menu/README.en-US.md
new file mode 100644
index 0000000..b5681ea
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dropdown-menu/README.en-US.md
@@ -0,0 +1,95 @@
+:: BASE_DOC ::
+
+## API
+
+### DropdownMenu Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+arrow-icon | String / Object | 'caret-down-small' | \- | N
+close-on-click-overlay | Boolean | true | \- | N
+duration | String / Number | 200 | \- | N
+show-overlay | Boolean | true | \- | N
+z-index | Number | 11600 | \- | N
+
+### DropdownMenu Events
+
+name | params | description
+-- | -- | --
+close | \- | \-
+open | \- | \-
+
+### DropdownMenu Slots
+
+name | Description
+-- | --
+\- | \-
+
+### DropdownMenu External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-icon | \-
+t-class-item | \-
+t-class-label | \-
+
+
+### DropdownItem Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+disabled | Boolean | false | \- | N
+keys | Object | - | Typescript:`KeysType`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+label | String | - | \- | N
+multiple | Boolean | false | \- | N
+options | Array | [] | Typescript:`Array` `interface DropdownOption { label: string; disabled: boolean; value: DropdownValue; }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dropdown-item/type.ts) | N
+options-columns | String / Number | 1 | \- | N
+options-layout | String | columns | `deprecated` | N
+placement | String | left | options: left/right | N
+value | String / Number / Array | undefined | `v-model:value` is supported。Typescript:`DropdownValue ` `type DropdownValue = string \| number \| Array;`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dropdown-item/type.ts) | N
+default-value | String / Number / Array | undefined | uncontrolled property。Typescript:`DropdownValue ` `type DropdownValue = string \| number \| Array;`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dropdown-item/type.ts) | N
+
+### DropdownItem Events
+
+name | params | description
+-- | -- | --
+change | `(context: { value: DropdownValue })` | \-
+close | \- | \-
+confirm | `(context: { value: DropdownValue })` | \-
+reset | \- | \-
+
+### DropdownItem Slots
+
+name | Description
+-- | --
+\- | \-
+footer | \-
+
+### DropdownItem External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-column | \-
+t-class-column-item | \-
+t-class-column-item-label | \-
+t-class-content | \-
+t-class-footer | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-dropdown-menu-active-color | @brand-color | -
+--td-dropdown-menu-bg-color | @bg-color-container | -
+--td-dropdown-menu-border-width | 1px | -
+--td-dropdown-menu-color | @text-color-primary | -
+--td-dropdown-menu-disabled-color | @text-color-disabled | -
+--td-dropdown-menu-font-size | 28rpx | -
+--td-dropdown-menu-height | 96rpx | -
+--td-dropdown-menu-icon-size | 40rpx | -
+--td-dropdown-body-max-height | 560rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/dropdown-menu/README.md b/uni_modules/tdesign-uniapp/components/dropdown-menu/README.md
new file mode 100644
index 0000000..3114c5d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dropdown-menu/README.md
@@ -0,0 +1,125 @@
+---
+title: DropdownMenu 下拉菜单
+description: 菜单呈现数个并列的选项类目,用于整个页面的内容筛选,由菜单面板和菜单选项组成。
+spline: message
+isComponent: true
+---
+
+
+
+## 引入
+
+### 引入组件
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import DropdownMenu from '@tdesign/uniapp/dropdown-menu/dropdown-menu.vue';
+import DropdownItem from '@tdesign/uniapp/dropdown-item/dropdown-item.vue';
+```
+
+### 单选下拉菜单
+
+{{ single }}
+
+### 多列下拉菜单
+
+{{ multi }}
+
+### 树形下拉菜单
+
+{{ tree }}
+
+## API
+
+### DropdownMenu Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+arrow-icon | String / Object | 'caret-down-small' | 自定义箭头图标 | N
+close-on-click-overlay | Boolean | true | 是否在点击遮罩层后关闭菜单 | N
+duration | String / Number | 200 | 动画时长 | N
+show-overlay | Boolean | true | 是否显示遮罩层 | N
+z-index | Number | 11600 | 菜单栏 z-index 层级 | N
+
+### DropdownMenu Events
+
+名称 | 参数 | 描述
+-- | -- | --
+close | \- | 菜单关闭时触发
+open | \- | 菜单展开时触发
+
+### DropdownMenu Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+
+### DropdownMenu External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-icon | 图标样式类
+t-class-item | 选项样式类
+t-class-label | 标签样式类
+
+
+### DropdownItem Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+disabled | Boolean | false | 是否禁用操作项 | N
+keys | Object | - | 用来定义 value / label / disabled 在 `options` 中对应的字段别名。TS 类型:`KeysType`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+label | String | - | 标题 | N
+multiple | Boolean | false | 是否多选 | N
+options | Array | [] | 选项数据。TS 类型:`Array` `interface DropdownOption { label: string; disabled: boolean; value: DropdownValue; }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dropdown-item/type.ts) | N
+options-columns | String / Number | 1 | 选项分栏(1-3) | N
+options-layout | String | columns | 已废弃。选项排列;不再支持 tree 布局,可与 treeSelect 配合使用 | N
+placement | String | left | 复选框和内容相对位置,仅单选菜单栏有效。可选项:left/right | N
+value | String / Number / Array | undefined | 选中值。支持语法糖 `v-model:value`。TS 类型:`DropdownValue ` `type DropdownValue = string \| number \| Array;`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dropdown-item/type.ts) | N
+default-value | String / Number / Array | undefined | 选中值。非受控属性。TS 类型:`DropdownValue ` `type DropdownValue = string \| number \| Array;`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/dropdown-item/type.ts) | N
+
+### DropdownItem Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { value: DropdownValue })` | 值改变时触发
+close | \- | 关闭时触发
+confirm | `(context: { value: DropdownValue })` | 点击确认时触发
+reset | \- | 点击重置时触发
+
+### DropdownItem Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+footer | 底部
+
+### DropdownItem External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-column | 菜单列样式类
+t-class-column-item | 菜单列选项样式类
+t-class-column-item-label | 菜单列选项标签样式类
+t-class-content | 内容样式类
+t-class-footer | 底部样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-dropdown-menu-active-color | @brand-color | -
+--td-dropdown-menu-bg-color | @bg-color-container | -
+--td-dropdown-menu-border-width | 1px | -
+--td-dropdown-menu-color | @text-color-primary | -
+--td-dropdown-menu-disabled-color | @text-color-disabled | -
+--td-dropdown-menu-font-size | 28rpx | -
+--td-dropdown-menu-height | 96rpx | -
+--td-dropdown-menu-icon-size | 40rpx | -
+--td-dropdown-body-max-height | 560rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/dropdown-menu/dropdown-menu.css b/uni_modules/tdesign-uniapp/components/dropdown-menu/dropdown-menu.css
new file mode 100644
index 0000000..4919ba2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dropdown-menu/dropdown-menu.css
@@ -0,0 +1,59 @@
+.t-dropdown-menu {
+ display: flex;
+ height: var(--td-dropdown-menu-height, 96rpx);
+ background: var(--td-dropdown-menu-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ position: relative;
+}
+.t-dropdown-menu::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: unset;
+ bottom: 0;
+ left: unset;
+ right: unset;
+ background-color: var(--td-component-border, var(--td-gray-color-4, #dcdcdc));
+}
+.t-dropdown-menu::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-dropdown-menu:after {
+ height: var(--td-dropdown-menu-border-width, 1px);
+}
+.t-dropdown-menu__item {
+ display: flex;
+ flex: 1;
+ align-items: center;
+ justify-content: center;
+ padding: 0 var(--td-spacer, 16rpx);
+ position: relative;
+ overflow: hidden;
+ color: var(--td-dropdown-menu-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-dropdown-menu__item--active {
+ color: var(--td-dropdown-menu-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-dropdown-menu__item--disabled {
+ color: var(--td-dropdown-menu-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+:deep(.t-dropdown-menu__icon) {
+ font-size: var(--td-dropdown-menu-icon-size, 40rpx);
+ padding: 4rpx;
+ box-sizing: border-box;
+ transition: transform 240ms ease;
+}
+:deep(.t-dropdown-menu__icon)--active {
+ transform: rotate(180deg);
+}
+:deep(.t-dropdown-menu__icon):not(:empty) {
+ margin-left: 8rpx;
+}
+.t-dropdown-menu__title {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ font-size: var(--td-dropdown-menu-font-size, 28rpx);
+}
diff --git a/uni_modules/tdesign-uniapp/components/dropdown-menu/dropdown-menu.vue b/uni_modules/tdesign-uniapp/components/dropdown-menu/dropdown-menu.vue
new file mode 100644
index 0000000..bca222b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dropdown-menu/dropdown-menu.vue
@@ -0,0 +1,188 @@
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/dropdown-menu/props.ts b/uni_modules/tdesign-uniapp/components/dropdown-menu/props.ts
new file mode 100644
index 0000000..d23729b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dropdown-menu/props.ts
@@ -0,0 +1,44 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdDropdownMenuProps } from './type';
+export default {
+ /** 自定义箭头图标 */
+ arrowIcon: {
+ type: [String, Object],
+ default: 'caret-down-small' as TdDropdownMenuProps['arrowIcon'],
+ },
+ /** 是否在点击遮罩层后关闭菜单 */
+ closeOnClickOverlay: {
+ type: Boolean,
+ default: true,
+ },
+ /** 动画时长 */
+ duration: {
+ type: [String, Number],
+ default: 200 as TdDropdownMenuProps['duration'],
+ },
+ /** 是否显示遮罩层 */
+ showOverlay: {
+ type: Boolean,
+ default: true,
+ },
+ /** 菜单栏 z-index 层级 */
+ zIndex: {
+ type: Number,
+ default: 11600,
+ },
+ /** 菜单关闭时触发 */
+ onClose: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 菜单展开时触发 */
+ onOpen: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/dropdown-menu/type.ts b/uni_modules/tdesign-uniapp/components/dropdown-menu/type.ts
new file mode 100644
index 0000000..12be3fe
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/dropdown-menu/type.ts
@@ -0,0 +1,41 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdDropdownMenuProps {
+ /**
+ * 自定义箭头图标
+ * @default 'caret-down-small'
+ */
+ arrowIcon?: string | object;
+ /**
+ * 是否在点击遮罩层后关闭菜单
+ * @default true
+ */
+ closeOnClickOverlay?: boolean;
+ /**
+ * 动画时长
+ * @default 200
+ */
+ duration?: string | number;
+ /**
+ * 是否显示遮罩层
+ * @default true
+ */
+ showOverlay?: boolean;
+ /**
+ * 菜单栏 z-index 层级
+ * @default 11600
+ */
+ zIndex?: number;
+ /**
+ * 菜单关闭时触发
+ */
+ onClose?: () => void;
+ /**
+ * 菜单展开时触发
+ */
+ onOpen?: () => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/empty/README.en-US.md b/uni_modules/tdesign-uniapp/components/empty/README.en-US.md
new file mode 100644
index 0000000..26cbf89
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/empty/README.en-US.md
@@ -0,0 +1,39 @@
+:: BASE_DOC ::
+
+## API
+
+### Empty Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+description | String | - | empty component description | N
+icon | String / Object | - | \- | N
+image | String | - | image url, or Image component props, or custom any node you need | N
+
+### Empty Slots
+
+name | Description
+-- | --
+action | action block
+description | empty component description
+image | image url, or Image component props, or custom any node you need
+
+### Empty External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-description | \-
+t-class-image | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-empty-action-margin-top | @spacer-4 | -
+--td-empty-description-color | @text-color-placeholder | -
+--td-empty-description-font | @font-body-medium | -
+--td-empty-description-margin-top | @spacer-2 | -
+--td-empty-icon-color | @text-color-placeholder | -
diff --git a/uni_modules/tdesign-uniapp/components/empty/README.md b/uni_modules/tdesign-uniapp/components/empty/README.md
new file mode 100644
index 0000000..ac5c1b1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/empty/README.md
@@ -0,0 +1,69 @@
+---
+title: Empty 空状态
+description: 用于空状态时的占位提示。
+spline: data
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TEmpty from '@tdesign/uniapp/empty/empty.vue';
+```
+
+### 类型
+
+图标空状态
+
+{{ base }}
+
+自定义图片空状态
+
+{{ imageEmpty }}
+
+带操作空状态
+
+{{ buttonEmpty }}
+
+
+
+## API
+
+### Empty Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+description | String | - | 描述文字 | N
+icon | String / Object | - | 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` | N
+image | String | - | 图片地址 | N
+
+### Empty Slots
+
+名称 | 描述
+-- | --
+action | 操作按钮
+description | 自定义 `description` 显示内容
+image | 自定义 `image` 显示内容
+
+### Empty External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-description | 描述样式类
+t-class-image | 图片样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-empty-action-margin-top | @spacer-4 | -
+--td-empty-description-color | @text-color-placeholder | -
+--td-empty-description-font | @font-body-medium | -
+--td-empty-description-margin-top | @spacer-2 | -
+--td-empty-icon-color | @text-color-placeholder | -
diff --git a/uni_modules/tdesign-uniapp/components/empty/empty.css b/uni_modules/tdesign-uniapp/components/empty/empty.css
new file mode 100644
index 0000000..f480240
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/empty/empty.css
@@ -0,0 +1,21 @@
+.t-empty {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+:deep(.t-empty__icon) {
+ font-size: 192rpx;
+ color: var(--td-empty-icon-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+}
+.t-empty__thumb + .t-empty__description:not(:empty) {
+ margin-top: var(--td-empty-description-margin-top, var(--td-spacer-2, 32rpx));
+}
+.t-empty__description {
+ text-align: center;
+ color: var(--td-empty-description-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ font: var(--td-empty-description-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ white-space: pre-wrap;
+}
+.t-empty__description + .t-empty__actions:not(:empty) {
+ margin-top: var(--td-empty-action-margin-top, var(--td-spacer-4, 64rpx));
+}
diff --git a/uni_modules/tdesign-uniapp/components/empty/empty.vue b/uni_modules/tdesign-uniapp/components/empty/empty.vue
new file mode 100644
index 0000000..d3691b1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/empty/empty.vue
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ description }}
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/empty/props.ts b/uni_modules/tdesign-uniapp/components/empty/props.ts
new file mode 100644
index 0000000..3baf404
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/empty/props.ts
@@ -0,0 +1,20 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export default {
+ /** 描述文字 */
+ description: {
+ type: String,
+ },
+ /** 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` */
+ icon: {
+ type: [String, Object],
+ },
+ /** 图片地址 */
+ image: {
+ type: String,
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/empty/type.ts b/uni_modules/tdesign-uniapp/components/empty/type.ts
new file mode 100644
index 0000000..d63f873
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/empty/type.ts
@@ -0,0 +1,20 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdEmptyProps {
+ /**
+ * 描述文字
+ */
+ description?: string;
+ /**
+ * 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon`
+ */
+ icon?: string | object;
+ /**
+ * 图片地址
+ */
+ image?: string;
+}
diff --git a/uni_modules/tdesign-uniapp/components/fab/README.en-US.md b/uni_modules/tdesign-uniapp/components/fab/README.en-US.md
new file mode 100644
index 0000000..ebe5778
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/fab/README.en-US.md
@@ -0,0 +1,37 @@
+:: BASE_DOC ::
+
+## API
+
+### Fab Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+button-props | Object | - | Typescript:`ButtonProps`,[Button API Documents](./button?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/fab/type.ts) | N
+draggable | String / Boolean | false | Typescript:`boolean \| FabDirectionEnum ` `type FabDirectionEnum = 'all' \| 'vertical' \| 'horizontal'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/fab/type.ts) | N
+icon | String | - | \- | N
+style | String | right: 16px; bottom: 32px; | \- | N
+text | String | - | \- | N
+using-custom-navbar | Boolean | false | \- | N
+y-bounds | Array | - | Typescript:`Array` | N
+
+### Fab Events
+
+name | params | description
+-- | -- | --
+click | `(context: {e: Event})` | \-
+drag-end | `(context: { e: TouchEvent })` | \-
+drag-start | `(context: { e: TouchEvent })` | \-
+
+### Fab Slots
+
+name | Description
+-- | --
+\- | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-fab-shadow | @shadow-2 | -
diff --git a/uni_modules/tdesign-uniapp/components/fab/README.md b/uni_modules/tdesign-uniapp/components/fab/README.md
new file mode 100644
index 0000000..35dac06
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/fab/README.md
@@ -0,0 +1,81 @@
+---
+title: Fab 悬浮按钮
+description: 当功能使用图标即可表意清楚时,可使用纯图标悬浮按钮,例如:添加、发布。
+spline: form
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TFab from '@tdesign/uniapp/fab/fab.vue';
+```
+
+### 基础使用
+
+{{ base }}
+
+### 进阶使用
+
+{{ advance }}
+
+### 可移动悬浮按钮
+
+{{ draggable }}
+
+### 带自动收缩功能
+
+{{ collapsible }}
+
+## FAQ
+
+### 为什么通过 style/customStyle 设置 top/left 调整初试定位后,会使页面内容无法点击以及拖拽异常?
+
+由于 `position: fixed;` 会使得元素脱离文档流,它将悬浮于页面上方。同时,元素没有设置宽高,当同时使用 `top`、`right`、`bottom` 和 `left` 属性时,浏览器会根据给定的 `top`、`right`、`bottom` 和 `left` 创建一个矩形框来容纳元素及其内容,所以会出现元素覆盖页面内容及拖拽异常等问题。
+
+Fab 组件默认定位 `right: 16px; bottom: 32px;`,且拖拽功能也是通过调整 `right` 与 `bottom` 属性值实现,因此在使用 `Fab` 组件时,仅支持通过 `style/customStyle` 属性设置 `right/bottom` 来调整初试位置, 避免使用 `top/left`。
+
+### 开启 Skyline 渲染引擎后,组件所在页面崩溃?
+
+因为 Skyline 还不支持多层阴影,要等微信官方处理。当下可参考 [#2865](https://github.com/Tencent/tdesign-miniprogram/issues/2865) 进行规避处理
+
+
+## API
+
+### Fab Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+button-props | Object | - | 透传至 Button 组件。TS 类型:`ButtonProps`,[Button API Documents](./button?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/fab/type.ts) | N
+draggable | String / Boolean | false | 是否可拖拽。`true` / `'all'`可拖动
`'vertical'`可垂直拖动
`'horizontal'`可水平拖动
`false`禁止拖动。TS 类型:`boolean \| FabDirectionEnum ` `type FabDirectionEnum = 'all' \| 'vertical' \| 'horizontal'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/fab/type.ts) | N
+icon | String | - | 图标 | N
+style | String | right: 16px; bottom: 32px; | 悬浮按钮的样式,常用于调整位置(即将废弃,建议使用 `style`) | N
+text | String | - | 文本内容 | N
+using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
+y-bounds | Array | - | 设置垂直方向边界限制,示例:[48, 48] 或 ['96px', 80]。TS 类型:`Array` | N
+
+### Fab Events
+
+名称 | 参数 | 描述
+-- | -- | --
+click | `(context: {e: Event})` | 悬浮按钮点击事件
+drag-end | `(context: { e: TouchEvent })` | 结束拖拽时触发
+drag-start | `(context: { e: TouchEvent })` | 开始拖拽时触发
+
+### Fab Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,按钮内容
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-fab-shadow | @shadow-2 | -
diff --git a/uni_modules/tdesign-uniapp/components/fab/fab.css b/uni_modules/tdesign-uniapp/components/fab/fab.css
new file mode 100644
index 0000000..d68b87a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/fab/fab.css
@@ -0,0 +1,9 @@
+.t-fab {
+ position: fixed;
+}
+.t-fab__button {
+ box-shadow: var(--td-fab-shadow, var(--td-shadow-2, 0 3px 14px 2px rgba(0, 0, 0, 0.05), 0 8px 10px 1px rgba(0, 0, 0, 0.06), 0 5px 5px -3px rgba(0, 0, 0, 0.1)));
+}
+.t-fab__draggable {
+ position: fixed;
+}
diff --git a/uni_modules/tdesign-uniapp/components/fab/fab.vue b/uni_modules/tdesign-uniapp/components/fab/fab.vue
new file mode 100644
index 0000000..95f3aff
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/fab/fab.vue
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/fab/props.ts b/uni_modules/tdesign-uniapp/components/fab/props.ts
new file mode 100644
index 0000000..ffc95a7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/fab/props.ts
@@ -0,0 +1,54 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdFabProps } from './type';
+export default {
+ /** 透传至 Button 组件 */
+ buttonProps: {
+ type: Object,
+ },
+ /** 是否可拖拽。`true` / `'all'`可拖动
`'vertical'`可垂直拖动
`'horizontal'`可水平拖动
`false`禁止拖动 */
+ draggable: {
+ type: [String, Boolean],
+ default: false as TdFabProps['draggable'],
+ },
+ /** 图标 */
+ icon: {
+ type: String,
+ default: '',
+ },
+ /** 悬浮按钮的样式,常用于调整位置(即将废弃,建议使用 `style`) */
+ style: {
+ type: String,
+ default: 'right: 16px; bottom: 32px;',
+ },
+ /** 文本内容 */
+ text: {
+ type: String,
+ default: '',
+ },
+ /** 是否使用了自定义导航栏 */
+ usingCustomNavbar: Boolean,
+ /** 设置垂直方向边界限制,示例:[48, 48] 或 ['96px', 80] */
+ yBounds: {
+ type: Array,
+ },
+ /** 悬浮按钮点击事件 */
+ onClick: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 结束拖拽时触发 */
+ onDragEnd: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 开始拖拽时触发 */
+ onDragStart: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/fab/type.ts b/uni_modules/tdesign-uniapp/components/fab/type.ts
new file mode 100644
index 0000000..856fe76
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/fab/type.ts
@@ -0,0 +1,57 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdButtonProps as ButtonProps } from '../button/type';
+
+export interface TdFabProps {
+ /**
+ * 透传至 Button 组件
+ */
+ buttonProps?: ButtonProps;
+ /**
+ * 是否可拖拽。`true` / `'all'`可拖动
`'vertical'`可垂直拖动
`'horizontal'`可水平拖动
`false`禁止拖动
+ * @default false
+ */
+ draggable?: boolean | FabDirectionEnum;
+ /**
+ * 图标
+ * @default ''
+ */
+ icon?: string;
+ /**
+ * 悬浮按钮的样式,常用于调整位置(即将废弃,建议使用 `style`)
+ * @default right: 16px; bottom: 32px;
+ */
+ style?: string;
+ /**
+ * 文本内容
+ * @default ''
+ */
+ text?: string;
+ /**
+ * 是否使用了自定义导航栏
+ * @default false
+ */
+ usingCustomNavbar?: boolean;
+ /**
+ * 设置垂直方向边界限制,示例:[48, 48] 或 ['96px', 80]
+ */
+ yBounds?: Array;
+ /**
+ * 悬浮按钮点击事件
+ */
+ onClick?: (context: { e: Event }) => void;
+ /**
+ * 结束拖拽时触发
+ */
+ onDragEnd?: (context: { e: TouchEvent }) => void;
+ /**
+ * 开始拖拽时触发
+ */
+ onDragStart?: (context: { e: TouchEvent }) => void;
+}
+
+export type FabDirectionEnum = 'all' | 'vertical' | 'horizontal';
diff --git a/uni_modules/tdesign-uniapp/components/footer/README.en-US.md b/uni_modules/tdesign-uniapp/components/footer/README.en-US.md
new file mode 100644
index 0000000..da371c6
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/footer/README.en-US.md
@@ -0,0 +1,33 @@
+:: BASE_DOC ::
+
+## API
+
+### Footer Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+copyright | String | '' | `deprecated` | N
+links | Array | [] | Typescript:`Array` `interface LinkObj { name: string; url?: string; openType?: 'navigate' \| 'redirect' \| 'relaunch' \| 'switchTab' \| 'navigateBack' }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/footer/type.ts) | N
+logo | Object | - | Typescript:`FooterLogo` `interface FooterLogo { icon: string; title?: string; url?: string }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/footer/type.ts) | N
+text | String | '' | \- | N
+text-link-list | Array | [] | `deprecated`。Typescript:`Array` `interface LinkObj { name: string; url?: string; openType?: 'navigate' \| 'redirect' \| 'relaunch' \| 'switchTab' \| 'navigateBack' }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/footer/type.ts) | N
+theme | String | 'text' | `deprecated`。options: text/logo | N
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-footer-link-color | @brand-color | -
+--td-footer-link-dividing-line-color | @text-color-placeholder | -
+--td-footer-link-dividing-line-padding | @spacer-1 | -
+--td-footer-link-font | @font-body-medium | -
+--td-footer-logo-icon-height | 48rpx | -
+--td-footer-logo-icon-margin-right | @spacer | -
+--td-footer-logo-icon-width | 48rpx | -
+--td-footer-logo-title-font | @font-title-medium | -
+--td-footer-logo-title-url-width | 256rpx | -
+--td-footer-text-color | @text-color-placeholder | -
+--td-footer-text-font | @font-body-small | -
+--td-footer-text-margin-top | 8rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/footer/README.md b/uni_modules/tdesign-uniapp/components/footer/README.md
new file mode 100644
index 0000000..72d7fff
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/footer/README.md
@@ -0,0 +1,61 @@
+---
+title: Footer 页脚
+description: 用于基础列表展示,可附带文字、品牌 logo、操作,常用商详、个人中心、设置等页面。
+spline: data
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TFooter from '@tdesign/uniapp/footer/footer.vue';
+```
+
+### 类型
+
+基础页脚
+
+{{ base }}
+
+基础加链接页脚
+
+{{ link }}
+
+品牌页脚
+
+{{ logo }}
+
+## API
+
+### Footer Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+copyright | String | '' | 已废弃。版权信息,type 为`text`生效 | N
+links | Array | [] | 链接列表。name 表示链接名称, url 表示链接 page 路径,目前只支持小程序内部跳转,openType 表示跳转方式。TS 类型:`Array` `interface LinkObj { name: string; url?: string; openType?: 'navigate' \| 'redirect' \| 'relaunch' \| 'switchTab' \| 'navigateBack' }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/footer/type.ts) | N
+logo | Object | - | 图标配置。`logo.icon` 表示图标链接地址,`logo.title` 表示标题文本,`logo.url` 表示链接。TS 类型:`FooterLogo` `interface FooterLogo { icon: string; title?: string; url?: string }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/footer/type.ts) | N
+text | String | '' | 版权信息 | N
+text-link-list | Array | [] | 已废弃。链接列表,type 为`text`生效。name 表示链接名称, url 表示链接 page 路径,目前只支持小程序内部跳转,openType 表示跳转方式。TS 类型:`Array` `interface LinkObj { name: string; url?: string; openType?: 'navigate' \| 'redirect' \| 'relaunch' \| 'switchTab' \| 'navigateBack' }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/footer/type.ts) | N
+theme | String | 'text' | 已废弃。页脚展示类型。可选项:text/logo | N
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-footer-link-color | @brand-color | -
+--td-footer-link-dividing-line-color | @text-color-placeholder | -
+--td-footer-link-dividing-line-padding | @spacer-1 | -
+--td-footer-link-font | @font-body-medium | -
+--td-footer-logo-icon-height | 48rpx | -
+--td-footer-logo-icon-margin-right | @spacer | -
+--td-footer-logo-icon-width | 48rpx | -
+--td-footer-logo-title-font | @font-title-medium | -
+--td-footer-logo-title-url-width | 256rpx | -
+--td-footer-text-color | @text-color-placeholder | -
+--td-footer-text-font | @font-body-small | -
+--td-footer-text-margin-top | 8rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/footer/footer.css b/uni_modules/tdesign-uniapp/components/footer/footer.css
new file mode 100644
index 0000000..1f3b78f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/footer/footer.css
@@ -0,0 +1,47 @@
+.t-footer {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: flex-start;
+}
+.t-footer__text {
+ font: var(--td-footer-text-font, var(--td-font-body-small, 24rpx / 40rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-footer-text-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+}
+.t-footer__link-list + .t-footer__text:not(:empty) {
+ margin-top: var(--td-footer-text-margin-top, 8rpx);
+}
+.t-footer__link-list {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+.t-footer__link-item {
+ color: var(--td-footer-link-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ font: var(--td-footer-link-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ text-decoration: underline;
+}
+.t-footer__link-line {
+ font-size: 24rpx;
+ color: var(--td-footer-link-dividing-line-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ display: inline-block;
+ padding: 0 var(--td-footer-link-dividing-line-padding, var(--td-spacer-1, 24rpx));
+}
+.t-footer__logo {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+.t-footer__icon {
+ width: var(--td-footer-logo-icon-width, 48rpx);
+ height: var(--td-footer-logo-icon-height, 48rpx);
+ margin-right: var(--td-footer-logo-icon-margin-right, var(--td-spacer, 16rpx));
+}
+.t-footer__title {
+ color: var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
+ font: var(--td-footer-logo-title-font, var(--td-font-title-medium, 600 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ font-style: italic;
+}
+.t-footer__title-url {
+ width: var(--td-footer-logo-title-url-width, 256rpx);
+}
diff --git a/uni_modules/tdesign-uniapp/components/footer/footer.vue b/uni_modules/tdesign-uniapp/components/footer/footer.vue
new file mode 100644
index 0000000..13926af
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/footer/footer.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+ {{ logo.title }}
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+ |
+
+
+
+
+ {{ text }}
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/footer/props.ts b/uni_modules/tdesign-uniapp/components/footer/props.ts
new file mode 100644
index 0000000..90084d5
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/footer/props.ts
@@ -0,0 +1,23 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdFooterProps } from './type';
+export default {
+ /** 链接列表。name 表示链接名称, url 表示链接 page 路径,目前只支持小程序内部跳转,openType 表示跳转方式 */
+ links: {
+ type: Array,
+ default: (): TdFooterProps['links'] => [],
+ },
+ /** 图标配置。`logo.icon` 表示图标链接地址,`logo.title` 表示标题文本,`logo.url` 表示链接 */
+ logo: {
+ type: Object,
+ },
+ /** 版权信息 */
+ text: {
+ type: String,
+ default: '',
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/footer/type.ts b/uni_modules/tdesign-uniapp/components/footer/type.ts
new file mode 100644
index 0000000..d9881ba
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/footer/type.ts
@@ -0,0 +1,34 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdFooterProps {
+ /**
+ * 链接列表。name 表示链接名称, url 表示链接 page 路径,目前只支持小程序内部跳转,openType 表示跳转方式
+ * @default []
+ */
+ links?: Array;
+ /**
+ * 图标配置。`logo.icon` 表示图标链接地址,`logo.title` 表示标题文本,`logo.url` 表示链接
+ */
+ logo?: FooterLogo;
+ /**
+ * 版权信息
+ * @default ''
+ */
+ text?: string;
+}
+
+export interface LinkObj {
+ name: string;
+ url?: string;
+ openType?: 'navigate' | 'redirect' | 'relaunch' | 'switchTab' | 'navigateBack';
+}
+
+export interface FooterLogo {
+ icon: string;
+ title?: string;
+ url?: string;
+}
diff --git a/uni_modules/tdesign-uniapp/components/form-item/README.en-US.md b/uni_modules/tdesign-uniapp/components/form-item/README.en-US.md
new file mode 100644
index 0000000..74cba68
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form-item/README.en-US.md
@@ -0,0 +1,37 @@
+:: BASE_DOC ::
+
+## API
+
+### FormItem Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+arrow | Boolean | false | \- | N
+content-align | String | - | options: left/right | N
+for | String | - | \- | N
+help | String | - | \- | N
+label | String | '' | \- | N
+label-align | String | - | options: left/right/top | N
+label-width | String / Number | - | \- | N
+name | String | - | \- | N
+required-mark | Boolean | undefined | \- | N
+rules | Array | - | Typescript: `Array` | N
+show-error-message | Boolean | undefined | \- | N
+
+### FormItem Slots
+
+name | Description
+-- | --
+help | \-
+label | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-form-item-horizontal-padding | 32rpx | -
+--td-form-item-justify-content | space-between | -
+--td-form-item-label-width | 160rpx | -
+--td-form-item-vertical-padding | 32rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/form-item/README.md b/uni_modules/tdesign-uniapp/components/form-item/README.md
new file mode 100644
index 0000000..ea0a629
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form-item/README.md
@@ -0,0 +1,37 @@
+:: BASE_DOC ::
+
+## API
+
+### FormItem Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+arrow | Boolean | false | 是否显示右侧箭头 | N
+content-align | String | - | 表单内容对齐方式,优先级高于 Form.contentAlign。可选项:left/right | N
+for | String | - | label 原生属性 | N
+help | String | - | 表单项说明内容 | N
+label | String | '' | 字段标签名称 | N
+label-align | String | - | 表单字段标签对齐方式:左对齐、右对齐、顶部对齐。默认使用 Form 的对齐方式,优先级高于 Form.labelAlign。可选项:left/right/top | N
+label-width | String / Number | - | 可以整体设置标签宽度,优先级高于 Form.labelWidth | N
+name | String | - | 表单字段名称 | N
+required-mark | Boolean | undefined | 是否显示必填符号(*),优先级高于 Form.requiredMark | N
+rules | Array | - | 表单字段校验规则。TS 类型:`Array` | N
+show-error-message | Boolean | undefined | 校验不通过时,是否显示错误提示信息,优先级高于 `Form.showErrorMessage` | N
+
+### FormItem Slots
+
+名称 | 描述
+-- | --
+help | 自定义 `help` 显示内容
+label | 自定义 `label` 显示内容
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-form-item-horizontal-padding | 32rpx | -
+--td-form-item-justify-content | space-between | -
+--td-form-item-label-width | 160rpx | -
+--td-form-item-vertical-padding | 32rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/form-item/form-item.css b/uni_modules/tdesign-uniapp/components/form-item/form-item.css
new file mode 100644
index 0000000..3845630
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form-item/form-item.css
@@ -0,0 +1,120 @@
+/* Less 支持测试 - 监听功能验证 */
+.t-form-item {
+ position: relative;
+ display: flex;
+ align-items: flex-start;
+ justify-content: var(--td-form-item-justify-content, space-between);
+ width: 100%;
+ padding: var(--td-form-item-horizontal-padding, 32rpx) var(--td-form-item-vertical-padding, 32rpx);
+ background-color: #ffffff;
+ --td-input-vertical-padding: 0rpx;
+ --td-textarea-vertical-padding: 0rpx;
+ --td-textarea-horizontal-padding: 0rpx;
+ box-sizing: border-box;
+}
+.t-form-item--top {
+ display: flex;
+ flex-direction: column;
+}
+.t-form-item--bordered {
+ border-bottom: 1rpx solid var(--td-border-color, var(--td-gray-color-3, #e7e7e7));
+}
+.t-form-item--error .t-form-item__error {
+ color: var(--td-error-color, var(--td-error-color-6, #d54941));
+}
+.t-form-item--success .t-form-item__success {
+ color: var(--td-success-color, var(--td-success-color-5, #2ba471));
+}
+.t-form-item__label {
+ position: relative;
+ display: flex;
+ align-items: center;
+ width: var(--td-form-item-label-width, 160rpx);
+ margin-right: 16rpx;
+ font-size: var(--td-font-size-m, 32rpx);
+ color: var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
+ line-height: 1.5;
+}
+.t-form-item__label--required {
+ color: var(--td-error-color, var(--td-error-color-6, #d54941));
+ margin-right: 4rpx;
+}
+.t-form-item__label--colon {
+ margin-left: 4rpx;
+}
+.t-form-item__label--left {
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+}
+.t-form-item__label--right {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+}
+.t-form-item__label--top {
+ position: relative;
+ margin-right: 0;
+ width: 100%;
+}
+.t-form-item__controls {
+ flex: 1;
+ width: 100%;
+ margin-top: 8rpx;
+}
+.t-form-item__controls--left {
+ text-align: left;
+}
+.t-form-item__controls--right {
+ text-align: right;
+}
+.t-form-item__controls-content {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.t-form-item__help {
+ font-size: var(--td-font-size-m, 32rpx);
+ color: var(--td-font-gray-1, rgba(0, 0, 0, 0.9));
+ line-height: 1.4;
+}
+.t-form-item__desc-link {
+ margin-top: 8rpx;
+ color: var(--td-primary-color-7, #0052d9);
+ font-size: var(--td-font-size-s, 24rpx);
+ line-height: 1.4;
+}
+.t-form-item__error {
+ margin-top: 4rpx;
+ font-size: var(--td-font-size-s, 24rpx);
+ line-height: 1.4;
+}
+.t-form-item__error--error {
+ color: var(--td-error-color, var(--td-error-color-6, #d54941));
+}
+.t-form-item__error--warning {
+ color: var(--td-warning-color, var(--td-warning-color-5, #e37318));
+}
+.t-form-item__success {
+ margin-top: 4rpx;
+ font-size: var(--td-font-size-s, 24rpx);
+ color: var(--td-success-color, var(--td-success-color-5, #2ba471));
+ line-height: 1.4;
+}
+.t-form-item__arrow {
+ display: flex;
+ align-items: center;
+ margin-left: 8rpx;
+ color: var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4)));
+}
+.t-form-item__extra {
+ margin-left: 16rpx;
+}
+.desc-wrapper {
+ display: flex;
+ align-items: center;
+ gap: 12rpx;
+ height: 50rpx;
+ --td-button-font-weight: 400;
+}
diff --git a/uni_modules/tdesign-uniapp/components/form-item/form-item.vue b/uni_modules/tdesign-uniapp/components/form-item/form-item.vue
new file mode 100644
index 0000000..5160ebc
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form-item/form-item.vue
@@ -0,0 +1,396 @@
+
+
+
+
+ *
+
+
+
+ {{ label }}
+
+
+
+ *
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ help }}
+
+
+
+
+ {{ errorList[0].message }}
+
+
+ {{ successList[0].message }}
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/form-item/form-model.ts b/uni_modules/tdesign-uniapp/components/form-item/form-model.ts
new file mode 100644
index 0000000..dd57bae
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form-item/form-model.ts
@@ -0,0 +1,198 @@
+// 验证结果接口
+interface ValidateResult {
+ result: boolean;
+ message?: string;
+ type?: string;
+}
+
+// 工具函数:安全获取rule属性的实际值
+function getRuleValue(field: any, key?: string): any {
+ if (field && typeof field === 'object' && 'type' in field) {
+ // 针对type字段,过滤掉'error'和'warning'
+ if (key === 'type') {
+ const { value } = field;
+ if (value === 'error' || value === 'warning') {
+ return undefined;
+ }
+ return value;
+ }
+ return field.value;
+ }
+ // type字段只允许string
+ if (key === 'type') {
+ if (field === 'error' || field === 'warning') {
+ return undefined;
+ }
+ }
+ return field;
+}
+
+// 验证状态枚举
+export const ValidateStatus = {
+ TO_BE_VALIDATED: 0,
+ SUCCESS: 1,
+ FAIL: 2,
+};
+
+// 执行单个验证规则
+async function executeRule(value: any, rule: any): Promise {
+ const result: ValidateResult = {
+ result: true,
+ };
+
+ // 必填验证
+ const required = getRuleValue(rule.required);
+ if (required && (value === undefined || value === null || value === '' || value.length === 0)) {
+ result.result = false;
+ result.message = getRuleValue(rule.message) || '此字段为必填项';
+ result.type = 'error';
+ return result;
+ }
+
+ // 如果值为空且不是必填,则跳过其他验证
+ if (value === undefined || value === null || value === '' || value.length === 0) {
+ return result;
+ }
+
+ // 列表最小值验证
+ const min = getRuleValue(rule.min);
+ if (min !== undefined) {
+ const val = Array.isArray(value) ? value.length : Number(value);
+ if (val < Number(min)) {
+ result.result = false;
+ result.message = getRuleValue(rule.message) || `不能小于 ${min}`;
+ result.type = 'error';
+ return result;
+ }
+ }
+
+ // 列表最大值验证
+ const max = getRuleValue(rule.max);
+ if (max !== undefined) {
+ const val = Array.isArray(value) ? value.length : Number(value);
+ if (val > Number(max)) {
+ result.result = false;
+ result.message = getRuleValue(rule.message) || `不能大于 ${max}`;
+ result.type = 'error';
+ return result;
+ }
+ }
+ // 字符串最大长度验证
+ const maxLength = getRuleValue(rule.maxLength);
+ if (maxLength !== undefined) {
+ const len = String(value).length;
+ if (len > Number(maxLength)) {
+ result.result = false;
+ result.message = getRuleValue(rule.message) || `长度不能超过 ${maxLength}`;
+ result.type = 'error';
+ return result;
+ }
+ }
+
+ // 字符串最小长度验证
+ const minLength = getRuleValue(rule.minLength);
+ if (minLength !== undefined) {
+ const len = String(value).length;
+ if (len < Number(minLength)) {
+ result.result = false;
+ result.message = getRuleValue(rule.message) || `长度不能少于 ${minLength}`;
+ result.type = 'error';
+ return result;
+ }
+ }
+
+ // 固定长度验证
+ const len = getRuleValue(rule.len);
+ if (len !== undefined) {
+ const strValue = String(value);
+ if (strValue.length !== Number(len)) {
+ result.result = false;
+ result.message = getRuleValue(rule.message) || `长度必须为 ${len}`;
+ result.type = 'error';
+ return result;
+ }
+ }
+
+ // 正则验证
+ const pattern = getRuleValue(rule.pattern);
+ if (pattern) {
+ let regex;
+ if (pattern instanceof RegExp) {
+ regex = pattern;
+ } else if (typeof pattern === 'string') {
+ regex = new RegExp(pattern);
+ } else if (pattern && typeof pattern === 'object' && 'test' in pattern) {
+ regex = pattern;
+ } else {
+ result.result = false;
+ result.message = getRuleValue(rule.message) || '格式不正确';
+ result.type = 'error';
+ return result;
+ }
+ if (!regex.test(String(value))) {
+ result.result = false;
+ result.message = getRuleValue(rule.message) || '格式不正确';
+ result.type = 'error';
+ return result;
+ }
+ }
+
+ // 类型验证
+ const type = getRuleValue(rule.type, 'type');
+ if (typeof type === 'string') {
+ let isValid = true;
+ if (type === 'email') {
+ isValid = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(value));
+ if (!isValid) {
+ result.result = false;
+ result.message = getRuleValue(rule.message) || `${type} 格式不正确`;
+ result.type = 'error';
+ return result;
+ }
+ } else if (type === 'url') {
+ try {
+ const url = new URL(String(value));
+ isValid = !!url;
+ } catch (err) {
+ isValid = false;
+ }
+ if (!isValid) {
+ result.result = false;
+ result.message = getRuleValue(rule.message) || `${type} 格式不正确`;
+ result.type = 'error';
+ return result;
+ }
+ } else if (type === 'number') {
+ isValid = !Number.isNaN(Number(value));
+ if (!isValid) {
+ result.result = false;
+ result.message = getRuleValue(rule.message) || `${type} 格式不正确`;
+ result.type = 'error';
+ return result;
+ }
+ }
+ }
+ // 自定义验证
+ const validator = getRuleValue(rule.validator);
+ if (validator) {
+ const validateResult = await validator(value);
+ if (!validateResult) {
+ result.result = false;
+ result.message = getRuleValue(rule.message) || '验证失败';
+ result.type = 'error';
+ return result;
+ }
+ }
+ return result;
+}
+
+// 验证函数
+export async function validate(value: any, rules: any[]): Promise {
+ const results: ValidateResult[] = [];
+
+ const promises = rules.map(rule => executeRule(value, rule));
+ const ruleResults = await Promise.all(promises);
+ results.push(...ruleResults);
+
+ return results;
+}
diff --git a/uni_modules/tdesign-uniapp/components/form-item/props.ts b/uni_modules/tdesign-uniapp/components/form-item/props.ts
new file mode 100644
index 0000000..8827384
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form-item/props.ts
@@ -0,0 +1,64 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdFormItemProps } from './type';
+export default {
+ /** 是否显示右侧箭头 */
+ arrow: Boolean,
+ /** 表单内容对齐方式,优先级高于 Form.contentAlign */
+ contentAlign: {
+ type: String,
+ validator(val: TdFormItemProps['contentAlign']): boolean {
+ if (!val) return true;
+ return ['left', 'right'].includes(val);
+ },
+ },
+ /** label 原生属性 */
+ for: {
+ type: String,
+ default: '',
+ },
+ /** 表单项说明内容 */
+ help: {
+ type: String,
+ },
+ /** 字段标签名称 */
+ label: {
+ type: String,
+ default: '' as TdFormItemProps['label'],
+ },
+ /** 表单字段标签对齐方式:左对齐、右对齐、顶部对齐。默认使用 Form 的对齐方式,优先级高于 Form.labelAlign */
+ labelAlign: {
+ type: String,
+ validator(val: TdFormItemProps['labelAlign']): boolean {
+ if (!val) return true;
+ return ['left', 'right', 'top'].includes(val);
+ },
+ },
+ /** 可以整体设置标签宽度,优先级高于 Form.labelWidth */
+ labelWidth: {
+ type: [String, Number],
+ },
+ /** 表单字段名称 */
+ name: {
+ type: String,
+ default: '',
+ },
+ /** 是否显示必填符号(*),优先级高于 Form.requiredMark */
+ requiredMark: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 表单字段校验规则 */
+ rules: {
+ type: Array,
+ },
+ /** 校验不通过时,是否显示错误提示信息,优先级高于 `Form.showErrorMessage` */
+ showErrorMessage: {
+ type: Boolean,
+ default: undefined,
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/form-item/type.ts b/uni_modules/tdesign-uniapp/components/form-item/type.ts
new file mode 100644
index 0000000..8977529
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form-item/type.ts
@@ -0,0 +1,7 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export type { TdFormItemProps} from '../form/type';
diff --git a/uni_modules/tdesign-uniapp/components/form/README.en-US.md b/uni_modules/tdesign-uniapp/components/form/README.en-US.md
new file mode 100644
index 0000000..30725b3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form/README.en-US.md
@@ -0,0 +1,137 @@
+---
+title: Form
+description: Form consists of input, radio, select, checkbox and so on. With form, you can collect, verify and submit data.
+spline: base
+isComponent: true
+toc: false
+---
+
+### 01 Component Type
+
+Base form
+
+{{ horizontal }}
+
+{{ vertical }}
+
+## API
+
+### Form Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+colon | Boolean | false | \- | N
+content-align | String | left | options: left/right | N
+data | Object | {} | Typescript: `FormData` | N
+disabled | Boolean | undefined | \- | N
+error-message | Object | - | Typescript: `FormErrorMessage` | N
+label-align | String | right | options: left/right/top | N
+label-width | String / Number | '81px' | \- | N
+readonly | Boolean | undefined | \- | N
+required-mark | Boolean | undefined | \- | N
+required-mark-position | String | - | Display position of required symbols。options: left/right | N
+reset-type | String | empty | options: empty/initial | N
+rules | Object | - | Typescript: `FormRules` `type FormRules = { [field in keyof T]?: Array }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts) | N
+scroll-to-first-error | String | - | options: ''/smooth/auto | N
+show-error-message | Boolean | true | \- | N
+submit-with-warning-message | Boolean | false | \- | N
+
+### Form Events
+
+name | params | description
+-- | -- | --
+reset | `(context: { e?: FormResetEvent })` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts)
+submit | `(context: SubmitContext)` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts)。
`interface SubmitContext { e?: FormSubmitEvent; validateResult: FormValidateResult; firstError?: string; fields?: any }`
`type FormValidateResult = boolean \| ValidateResultObj`
`type ValidateResultObj = { [key in keyof T]: boolean \| ValidateResultList }`
`type ValidateResultList = Array`
`type AllValidateResult = CustomValidateObj \| ValidateResultType`
`interface ValidateResultType extends FormRule { result: boolean }`
`type ValidateResult = { [key in keyof T]: boolean \| ErrorList }`
`type ErrorList = Array`
+validate | `(result: ValidateResultContext)` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts)。
`type ValidateResultContext = Omit, 'e'>`
+
+### FormInstanceFunctions 组件实例方法
+
+name | params | return | description
+-- | -- | -- | --
+clear-validate | `(fields?: Array)` | \- | required
+reset | `(params?: FormResetParams)` | \- | required。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts)。
`interface FormResetParams { type?: 'initial' \| 'empty'; fields?: Array }`
+set-validate-message | `(message: FormValidateMessage)` | \- | required。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts)。
`type FormValidateMessage = { [field in keyof FormData]: FormItemValidateMessage[] }`
`interface FormItemValidateMessage { type: 'warning' \| 'error'; message: string }`
+submit | `(params?: { showErrorMessage?: boolean })` | \- | required
+validate | `(params?: FormValidateParams)` | `Promise>` | required。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts)。
`interface FormValidateParams { fields?: Array; showErrorMessage?: boolean; trigger?: ValidateTriggerType }`
`type ValidateTriggerType = 'blur' \| 'change' \| 'submit' \| 'all'`
+
+
+### FormItem Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+arrow | Boolean | false | \- | N
+content-align | String | - | options: left/right | N
+for | String | - | \- | N
+help | String | - | \- | N
+label | String | '' | \- | N
+label-align | String | - | options: left/right/top | N
+label-width | String / Number | - | \- | N
+name | String | - | \- | N
+required-mark | Boolean | undefined | \- | N
+rules | Array | - | Typescript: `Array` | N
+show-error-message | Boolean | undefined | \- | N
+
+### FormItem Slots
+
+name | Description
+-- | --
+help | \-
+label | \-
+
+### FormRule
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+boolean | Boolean | - | \- | N
+date | Boolean / Object | - | Typescript: `boolean \| IsDateOptions` `interface IsDateOptions { format: string; strictMode: boolean; delimiters: string[] }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts) | N
+email | Boolean / Object | - | Typescript: `boolean \| IsEmailOptions` `import type { IsEmailOptions } from '../common/common'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts) | N
+enum | Array | - | Typescript: `Array` | N
+idcard | Boolean | - | \- | N
+len | Number / Boolean | - | \- | N
+max | Number / Boolean | - | \- | N
+message | String | - | \- | N
+min | Number / Boolean | - | \- | N
+number | Boolean | - | \- | N
+pattern | String / Object | - | Typescript: `RegExp \| string` | N
+required | Boolean | - | \- | N
+telnumber | Boolean | - | \- | N
+trigger | String | change | Typescript: `ValidateTriggerType` | N
+type | String | error | options: error/warning | N
+url | Boolean / Object | - | Typescript: `boolean \| IsURLOptions` `import type { IsURLOptions } from '../common/common'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts) | N
+validator | Function | - | Typescript: `CustomValidator` `type CustomValidator = (val: ValueType) => CustomValidateResolveType \| Promise` `type CustomValidateResolveType = boolean \| CustomValidateObj` `interface CustomValidateObj { result: boolean; message: string; type?: 'error' \| 'warning' \| 'success' }` `type ValueType = any`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts) | N
+whitespace | Boolean | - | \- | N
+
+### FormErrorMessage
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+boolean | String | - | \- | N
+date | String | - | \- | N
+enum | String | - | \- | N
+idcard | String | - | \- | N
+len | String | - | \- | N
+max | String | - | \- | N
+min | String | - | \- | N
+number | String | - | \- | N
+pattern | String | - | \- | N
+required | String | - | \- | N
+telnumber | String | - | \- | N
+url | String | - | \- | N
+validator | String | - | \- | N
+whitespace | String | - | \- | N
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-form-bg-color | @bg-color-container | -
+--td-form-border-radius | 0 | -
+--td-form-padding | 0 | -
+--td-form-readonly-bg-color | @bg-color-secondarycontainer | -
+--td-form-item-horizontal-padding | 32rpx | -
+--td-form-item-justify-content | space-between | -
+--td-form-item-label-width | 160rpx | -
+--td-form-item-vertical-padding | 32rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/form/README.md b/uni_modules/tdesign-uniapp/components/form/README.md
new file mode 100644
index 0000000..212c134
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form/README.md
@@ -0,0 +1,146 @@
+---
+title: Form 表单
+description: 用以收集、校验和提交数据,一般由输入框、单选框、复选框、选择器等控件组成。
+spline: base
+isComponent: true
+toc: false
+---
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TForm from '@tdesign/uniapp/form/form.vue';
+import TFormItem from '@tdesign/uniapp/form-item/form-item.vue';
+```
+
+### 01 组件类型
+
+基础表单
+
+{{ horizontal }}
+
+{{ vertical }}
+
+## API
+
+### Form Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+colon | Boolean | false | 是否在表单标签字段右侧显示冒号 | N
+content-align | String | left | 表单内容对齐方式:左对齐、右对齐。可选项:left/right | N
+data | Object | {} | 表单数据。TS 类型:`FormData` | N
+disabled | Boolean | undefined | 是否禁用整个表单 | N
+error-message | Object | - | 表单错误信息配置,示例:`{ idcard: '请输入正确的身份证号码', max: '字符长度不能超过 ${max}' }`。TS 类型:`FormErrorMessage` | N
+label-align | String | right | 表单字段标签对齐方式:左对齐、右对齐、顶部对齐。可选项:left/right/top | N
+label-width | String / Number | '81px' | 可以整体设置label标签宽度,默认为81px | N
+readonly | Boolean | undefined | 是否整个表单只读 | N
+required-mark | Boolean | undefined | 是否显示必填符号(*),默认显示 | N
+required-mark-position | String | - | 表单必填符号(*)显示位置。可选项:left/right | N
+reset-type | String | empty | 重置表单的方式,值为 empty 表示重置表单为空,值为 initial 表示重置表单数据为初始值。可选项:empty/initial | N
+rules | Object | - | 表单字段校验规则。TS 类型:`FormRules` `type FormRules = { [field in keyof T]?: Array }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts) | N
+scroll-to-first-error | String | - | 表单校验不通过时,是否自动滚动到第一个校验不通过的字段,平滑滚动或是瞬间直达。值为空则表示不滚动。可选项:''/smooth/auto | N
+show-error-message | Boolean | true | 校验不通过时,是否显示错误提示信息,统一控制全部表单项。如果希望控制单个表单项,请给 FormItem 设置该属性 | N
+submit-with-warning-message | Boolean | false | 【讨论中】当校验结果只有告警信息时,是否触发 `submit` 提交事件 | N
+
+### Form Events
+
+名称 | 参数 | 描述
+-- | -- | --
+reset | `(context: { e?: FormResetEvent })` | 表单重置时触发。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts)
+submit | `(context: SubmitContext)` | 表单提交时触发。其中 `context.validateResult` 表示校验结果,`context.firstError` 表示校验不通过的第一个规则提醒。`context.validateResult` 值为 `true` 表示校验通过;如果校验不通过,`context.validateResult` 值为校验结果列表。
【注意】⚠️ 默认情况,输入框按下 Enter 键会自动触发提交事件,如果希望禁用这个默认行为,可以给输入框添加 enter 事件,并在事件中设置 `e.preventDefault()`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts)。
`interface SubmitContext { e?: FormSubmitEvent; validateResult: FormValidateResult; firstError?: string; fields?: any }`
`type FormValidateResult = boolean \| ValidateResultObj`
`type ValidateResultObj = { [key in keyof T]: boolean \| ValidateResultList }`
`type ValidateResultList = Array`
`type AllValidateResult = CustomValidateObj \| ValidateResultType`
`interface ValidateResultType extends FormRule { result: boolean }`
`type ValidateResult = { [key in keyof T]: boolean \| ErrorList }`
`type ErrorList = Array`
+validate | `(result: ValidateResultContext)` | 校验结束后触发,result 值为 true 表示校验通过;如果校验不通过,result 值为校验结果列表。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts)。
`type ValidateResultContext = Omit, 'e'>`
+
+### FormInstanceFunctions 组件实例方法
+
+名称 | 参数 | 返回值 | 描述
+-- | -- | -- | --
+clear-validate | `(fields?: Array)` | \- | 必需。清空校验结果。可使用 fields 指定清除部分字段的校验结果,fields 值为空则表示清除所有字段校验结果。清除邮箱校验结果示例:`clearValidate(['email'])`
+reset | `(params?: FormResetParams)` | \- | 必需。重置表单,表单里面没有重置按钮``时可以使用该方法,默认重置全部字段为空,该方法会触发 `reset` 事件。
如果表单属性 `resetType='empty'` 或者 `reset.type='empty'` 会重置为空;
如果表单属性 `resetType='initial'` 或者 `reset.type='initial'` 会重置为表单初始值。
`reset.fields` 用于设置具体重置哪些字段,示例:`reset({ type: 'initial', fields: ['name', 'age'] })`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts)。
`interface FormResetParams { type?: 'initial' \| 'empty'; fields?: Array }`
+set-validate-message | `(message: FormValidateMessage)` | \- | 必需。设置自定义校验结果,如远程校验信息直接呈现。注意需要在组件挂载结束后使用该方法。`FormData` 指表单数据泛型。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts)。
`type FormValidateMessage = { [field in keyof FormData]: FormItemValidateMessage[] }`
`interface FormItemValidateMessage { type: 'warning' \| 'error'; message: string }`
+submit | `(params?: { showErrorMessage?: boolean })` | \- | 必需。提交表单,表单里面没有提交按钮``时可以使用该方法。`showErrorMessage` 表示是否在提交校验不通过时显示校验不通过的原因,默认显示。该方法会触发 `submit` 事件
+validate | `(params?: FormValidateParams)` | `Promise>` | 必需。校验函数,包含错误文本提示等功能。泛型 `FormData` 表示表单数据 TS 类型。
【关于参数】`params.fields` 表示校验字段,如果设置了 `fields`,本次校验将仅对这些字段进行校验。`params.trigger` 表示本次触发校验的范围,'params.trigger = blur' 表示只触发校验规则设定为 trigger='blur' 的字段,'params.trigger = change' 表示只触发校验规则设定为 trigger='change' 的字段,默认触发全范围校验。`params.showErrorMessage` 表示校验结束后是否显示错误文本提示,默认显示。
【关于返回值】返回值为 true 表示校验通过;如果校验不通过,返回值为校验结果列表。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts)。
`interface FormValidateParams { fields?: Array; showErrorMessage?: boolean; trigger?: ValidateTriggerType }`
`type ValidateTriggerType = 'blur' \| 'change' \| 'submit' \| 'all'`
+
+
+### FormItem Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+arrow | Boolean | false | 是否显示右侧箭头 | N
+content-align | String | - | 表单内容对齐方式,优先级高于 Form.contentAlign。可选项:left/right | N
+for | String | - | label 原生属性 | N
+help | String | - | 表单项说明内容 | N
+label | String | '' | 字段标签名称 | N
+label-align | String | - | 表单字段标签对齐方式:左对齐、右对齐、顶部对齐。默认使用 Form 的对齐方式,优先级高于 Form.labelAlign。可选项:left/right/top | N
+label-width | String / Number | - | 可以整体设置标签宽度,优先级高于 Form.labelWidth | N
+name | String | - | 表单字段名称 | N
+required-mark | Boolean | undefined | 是否显示必填符号(*),优先级高于 Form.requiredMark | N
+rules | Array | - | 表单字段校验规则。TS 类型:`Array` | N
+show-error-message | Boolean | undefined | 校验不通过时,是否显示错误提示信息,优先级高于 `Form.showErrorMessage` | N
+
+### FormItem Slots
+
+名称 | 描述
+-- | --
+help | 自定义 `help` 显示内容
+label | 自定义 `label` 显示内容
+
+### FormRule
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+boolean | Boolean | - | 内置校验方法,校验值类型是否为布尔类型,示例:`{ boolean: true, message: '数据类型必须是布尔类型' }` | N
+date | Boolean / Object | - | 内置校验方法,校验值是否为日期格式,[参数文档](https://github.com/validatorjs/validator.js),示例:`{ date: { delimiters: '-' }, message: '日期分隔线必须是短横线(-)' }`。TS 类型:`boolean \| IsDateOptions` `interface IsDateOptions { format: string; strictMode: boolean; delimiters: string[] }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts) | N
+email | Boolean / Object | - | 内置校验方法,校验值是否为邮件格式,[参数文档](https://github.com/validatorjs/validator.js),示例:`{ email: { ignore_max_length: true }, message: '请输入正确的邮箱地址' }`。TS 类型:`boolean \| IsEmailOptions` `import type { IsEmailOptions } from '../common/common'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts) | N
+enum | Array | - | 内置校验方法,校验值是否属于枚举值中的值。示例:`{ enum: ['primary', 'info', 'warning'], message: '值只能是 primary/info/warning 中的一种' }`。TS 类型:`Array` | N
+idcard | Boolean | - | 内置校验方法,校验值是否为身份证号码,组件校验正则为 `/^(\\d{18,18}\|\\d{15,15}\|\\d{17,17}x)$/i`,示例:`{ idcard: true, message: '请输入正确的身份证号码' }` | N
+len | Number / Boolean | - | 内置校验方法,校验值固定长度,如:len: 10 表示值的字符长度只能等于 10 ,中文表示 2 个字符,英文为 1 个字符。示例:`{ len: 10, message: '内容长度不对' }`。
如果希望字母和中文都是同样的长度,示例:`{ validator: (val) => val.length === 10, message: '内容文本长度只能是 10 个字' }` | N
+max | Number / Boolean | - | 内置校验方法,校验值最大长度,如:max: 100 表示值最多不能超过 100 个字符,中文表示 2 个字符,英文为 1 个字符。示例:`{ max: 10, message: '内容超出' }`。
如果希望字母和中文都是同样的长度,示例:`{ validator: (val) => val.length <= 10, message: '内容文本长度不能超过 10 个字' }`
如果数据类型数字(Number),则自动变为数字大小的比对 | N
+message | String | - | 校验未通过时呈现的错误信息,值为空则不显示 | N
+min | Number / Boolean | - | 内置校验方法,校验值最小长度,如:min: 10 表示值最多不能少于 10 个字符,中文表示 2 个字符,英文为 1 个字符。示例:`{ min: 10, message: '内容长度不够' }`。
如果希望字母和中文都是同样的长度,示例:`{ validator: (val) => val.length >= 10, message: '内容文本长度至少为 10 个字' }`。
如果数据类型数字(Number),则自动变为数字大小的比对 | N
+number | Boolean | - | 内置校验方法,校验值是否为数字(1.2 、 1e5 都算数字),示例:`{ number: true, message: '请输入数字' }` | N
+pattern | String / Object | - | 内置校验方法,校验值是否符合正则表达式匹配结果,示例:`{ pattern: /@qq.com/, message: '请输入 QQ 邮箱' }`。TS 类型:`RegExp \| string` | N
+required | Boolean | - | 内置校验方法,校验值是否已经填写。该值为 true,默认显示必填标记,可通过设置 `requiredMark: false` 隐藏必填标记 | N
+telnumber | Boolean | - | 内置校验方法,校验值是否为手机号码,校验正则为 `/^1[3-9]\d{9}$/`,示例:`{ telnumber: true, message: '请输入正确的手机号码' }` | N
+trigger | String | change | 校验触发方式。TS 类型:`ValidateTriggerType` | N
+type | String | error | 校验未通过时呈现的错误信息类型,有 告警信息提示 和 错误信息提示 等两种。可选项:error/warning | N
+url | Boolean / Object | - | 内置校验方法,校验值是否为网络链接地址,[参数文档](https://github.com/validatorjs/validator.js),示例:`{ url: { protocols: ['http','https','ftp'] }, message: '请输入正确的 Url 地址' }`。TS 类型:`boolean \| IsURLOptions` `import type { IsURLOptions } from '../common/common'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts) | N
+validator | Function | - | 自定义校验规则,示例:`{ validator: (val) => val.length > 0, message: '请输入内容'}`。TS 类型:`CustomValidator` `type CustomValidator = (val: ValueType) => CustomValidateResolveType \| Promise` `type CustomValidateResolveType = boolean \| CustomValidateObj` `interface CustomValidateObj { result: boolean; message: string; type?: 'error' \| 'warning' \| 'success' }` `type ValueType = any`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/form/type.ts) | N
+whitespace | Boolean | - | 内置校验方法,校验值是否为空格。示例:`{ whitespace: true, message: '值不能为空' }` | N
+
+### FormErrorMessage
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+boolean | String | - | 布尔类型校验不通过时的表单项显示文案,全局配置默认是:`'${name}数据类型必须是布尔类型'` | N
+date | String | - | 日期校验规则不通过时的表单项显示文案,全局配置默认是:`'请输入正确的${name}'` | N
+enum | String | - | 枚举值校验规则不通过时的表单项显示文案,全局配置默认是:`${name}只能是${validate}等` | N
+idcard | String | - | 身份证号码校验不通过时的表单项显示文案,全局配置默认是:`'请输入正确的${name}'` | N
+len | String | - | 值长度校验不通过时的表单项显示文案,全局配置默认是:`'${name}字符长度必须是 ${validate}'` | N
+max | String | - | 值的长度太长或值本身太大时,校验不通过的表单项显示文案,全局配置默认是:`'${name}字符长度不能超过 ${validate} 个字符,一个中文等于两个字符'` | N
+min | String | - | 值的长度太短或值本身太小时,校验不通过的表单项显示文案,全局配置默认是:`'${name}字符长度不能少于 ${validate} 个字符,一个中文等于两个字符'` | N
+number | String | - | 数字类型校验不通过时的表单项显示文案,全局配置默认是:`'${name}必须是数字'` | N
+pattern | String | - | 正则表达式校验不通过时的表单项显示文案,全局配置默认是:`'请输入正确的${name}'` | N
+required | String | - | 没有填写必填项时的表单项显示文案,全局配置默认是:`'${name}必填'` | N
+telnumber | String | - | 手机号号码校验不通过时的表单项显示文案,全局配置默认是:`'请输入正确的${name}'` | N
+url | String | - | 链接校验规则不通过时的表单项显示文案,全局配置默认是:`'请输入正确的${name}'` | N
+validator | String | - | 自定义校验规则校验不通过时的表单项显示文案,全局配置默认是:'${name}不符合要求' | N
+whitespace | String | - | 值为空格校验不通过时表单项显示文案,全局配置默认是:`'${name}不能为空` | N
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-form-bg-color | @bg-color-container | -
+--td-form-border-radius | 0 | -
+--td-form-padding | 0 | -
+--td-form-readonly-bg-color | @bg-color-secondarycontainer | -
+--td-form-item-horizontal-padding | 32rpx | -
+--td-form-item-justify-content | space-between | -
+--td-form-item-label-width | 160rpx | -
+--td-form-item-vertical-padding | 32rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/form/form-item-props.ts b/uni_modules/tdesign-uniapp/components/form/form-item-props.ts
new file mode 100644
index 0000000..d3fe96f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form/form-item-props.ts
@@ -0,0 +1,56 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdFormItemProps } from '../form/type';
+export default {
+ /** 是否显示右侧箭头 */
+ arrow: Boolean,
+ /** label 原生属性 */
+ for: {
+ type: String,
+ default: '',
+ },
+ /** 表单项说明内容 */
+ help: {
+ type: String,
+ },
+ /** 字段标签名称 */
+ label: {
+ type: String,
+ default: '' as TdFormItemProps['label'],
+ },
+ /** 表单字段标签对齐方式:左对齐、右对齐、顶部对齐。默认使用 Form 的对齐方式,优先级高于 Form.labelAlign */
+ labelAlign: {
+ type: String,
+ validator(val: TdFormItemProps['labelAlign']): boolean {
+ if (!val) return true;
+ return ['left', 'right', 'top'].includes(val);
+ },
+ },
+ /** 可以整体设置标签宽度,优先级高于 Form.labelWidth */
+ labelWidth: {
+ type: [String, Number],
+ },
+ /** 表单字段名称 */
+ name: {
+ type: String,
+ default: '',
+ },
+ /** 是否显示必填符号(*),优先级高于 Form.requiredMark */
+ requiredMark: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 表单字段校验规则 */
+ rules: {
+ type: Array,
+ },
+ /** 校验不通过时,是否显示错误提示信息,优先级高于 `Form.showErrorMessage` */
+ showErrorMessage: {
+ type: Boolean,
+ default: undefined,
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/form/form.css b/uni_modules/tdesign-uniapp/components/form/form.css
new file mode 100644
index 0000000..4d0b688
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form/form.css
@@ -0,0 +1,169 @@
+.t-form {
+ position: relative;
+ width: 100%;
+ background-color: var(--td-form-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ padding: var(--td-form-padding, 0);
+ border-radius: var(--td-form-border-radius, 0);
+ box-sizing: border-box;
+ min-height: 100%;
+}
+.t-form--label-left .t-form__item .t-form__label {
+ text-align: left;
+ justify-content: flex-start;
+}
+.t-form--label-right .t-form__item .t-form__label {
+ text-align: right;
+ justify-content: flex-end;
+}
+.t-form--label-top .t-form__item {
+ flex-direction: column;
+ align-items: flex-start;
+}
+.t-form--label-top .t-form__item .t-form__label {
+ width: 100%;
+ margin-bottom: var(--td-spacer, 16rpx);
+ text-align: left;
+ justify-content: flex-start;
+}
+.t-form--label-top .t-form__item .t-form__controls {
+ width: 100%;
+ margin-top: 0;
+}
+.t-form--disabled {
+ opacity: 0.6;
+ pointer-events: none;
+ cursor: not-allowed;
+}
+.t-form--disabled .t-form__item .t-form__label,
+.t-form--disabled .t-form__item .t-form__controls,
+.t-form--disabled .t-form__item .t-form__help,
+.t-form--disabled .t-form__item .t-form__extra {
+ color: var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26)));
+}
+.t-form--readonly {
+ background-color: var(--td-form-readonly-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+}
+.t-form--readonly .t-form__item .t-form__label,
+.t-form--readonly .t-form__item .t-form__controls,
+.t-form--readonly .t-form__item .t-form__help,
+.t-form--readonly .t-form__item .t-form__extra {
+ color: var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6)));
+}
+.t-form__item {
+ position: relative;
+ display: flex;
+ align-items: flex-start;
+ width: 100%;
+ margin-bottom: var(--td-spacer-2, 32rpx);
+}
+.t-form__item:last-child {
+ margin-bottom: 0;
+}
+.t-form__label {
+ position: relative;
+ display: flex;
+ align-items: center;
+ min-width: 160rpx;
+ max-width: 300rpx;
+ margin-right: var(--td-spacer-2, 32rpx);
+ font-size: var(--td-font-size-m, 32rpx);
+ color: var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
+ line-height: 1.5;
+ word-break: break-all;
+ box-sizing: border-box;
+}
+.t-form__label--required::before {
+ content: '*';
+ color: var(--td-error-color, var(--td-error-color-6, #d54941));
+ margin-right: 4rpx;
+ font-size: var(--td-font-size-m, 32rpx);
+ line-height: 1;
+}
+.t-form__label--colon::after {
+ content: ':';
+ margin-left: 4rpx;
+ color: var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
+}
+.t-form__label--required-mark-left::before {
+ content: '*';
+ color: var(--td-error-color, var(--td-error-color-6, #d54941));
+ margin-right: 4rpx;
+ font-size: var(--td-font-size-m, 32rpx);
+ line-height: 1;
+}
+.t-form__label--required-mark-right::after {
+ content: '*';
+ color: var(--td-error-color, var(--td-error-color-6, #d54941));
+ margin-left: 4rpx;
+ font-size: var(--td-font-size-m, 32rpx);
+ line-height: 1;
+}
+.t-form__controls {
+ flex: 1;
+ width: 100%;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+}
+.t-form__help {
+ margin-top: var(--td-spacer, 16rpx);
+ font-size: var(--td-font-size-s, 24rpx);
+ color: var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6)));
+ line-height: 1.4;
+}
+.t-form__extra {
+ margin-left: var(--td-spacer-2, 32rpx);
+ font-size: var(--td-font-size-s, 24rpx);
+ color: var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6)));
+ line-height: 1.4;
+}
+.t-form--error .t-form__label {
+ color: var(--td-error-color, var(--td-error-color-6, #d54941));
+}
+.t-form--error .t-form__help {
+ color: var(--td-error-color, var(--td-error-color-6, #d54941));
+}
+.t-form--success .t-form__label {
+ color: var(--td-success-color, var(--td-success-color-5, #2ba471));
+}
+.t-form--success .t-form__help {
+ color: var(--td-success-color, var(--td-success-color-5, #2ba471));
+}
+.t-form--warning .t-form__label {
+ color: var(--td-warning-color, var(--td-warning-color-5, #e37318));
+}
+.t-form--warning .t-form__help {
+ color: var(--td-warning-color, var(--td-warning-color-5, #e37318));
+}
+@media (max-width: 750rpx) {
+ .t-form__label {
+ min-width: 120rpx;
+ max-width: 200rpx;
+ font-size: var(--td-font-size-base, 28rpx);
+ }
+ .t-form__item {
+ margin-bottom: var(--td-spacer, 16rpx);
+ }
+}
+.t-form--compact .t-form__item {
+ margin-bottom: var(--td-spacer, 16rpx);
+}
+.t-form--compact .t-form__label {
+ min-width: 120rpx;
+ font-size: var(--td-font-size-base, 28rpx);
+}
+.t-form--compact .t-form__help {
+ margin-top: calc(var(--td-spacer, 16rpx) / 2);
+ font-size: var(--td-font-size-xs, var(--td-font-size, 20rpx));
+}
+.t-form--loose .t-form__item {
+ margin-bottom: var(--td-spacer-3, 48rpx);
+}
+.t-form--loose .t-form__label {
+ min-width: 200rpx;
+ font-size: var(--td-font-size-l, 36rpx);
+}
+.t-form--loose .t-form__help {
+ margin-top: var(--td-spacer-2, 32rpx);
+ font-size: var(--td-font-size-m, 32rpx);
+}
diff --git a/uni_modules/tdesign-uniapp/components/form/form.vue b/uni_modules/tdesign-uniapp/components/form/form.vue
new file mode 100644
index 0000000..34730e8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form/form.vue
@@ -0,0 +1,287 @@
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/form/props.ts b/uni_modules/tdesign-uniapp/components/form/props.ts
new file mode 100644
index 0000000..d6e4d61
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form/props.ts
@@ -0,0 +1,109 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdFormProps } from './type';
+export default {
+ /** 是否在表单标签字段右侧显示冒号 */
+ colon: Boolean,
+ /** 表单内容对齐方式:左对齐、右对齐 */
+ contentAlign: {
+ type: String,
+ default: 'left' as TdFormProps['contentAlign'],
+ validator(val: TdFormProps['contentAlign']): boolean {
+ if (!val) return true;
+ return ['left', 'right'].includes(val);
+ },
+ },
+ /** 表单数据 */
+ data: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 是否禁用整个表单 */
+ disabled: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 表单错误信息配置,示例:`{ idcard: '请输入正确的身份证号码', max: '字符长度不能超过 ${max}' }` */
+ errorMessage: {
+ type: Object,
+ },
+ /** 表单字段标签对齐方式:左对齐、右对齐、顶部对齐 */
+ labelAlign: {
+ type: String,
+ default: 'right' as TdFormProps['labelAlign'],
+ validator(val: TdFormProps['labelAlign']): boolean {
+ if (!val) return true;
+ return ['left', 'right', 'top'].includes(val);
+ },
+ },
+ /** 可以整体设置label标签宽度,默认为81px */
+ labelWidth: {
+ type: [String, Number],
+ default: '81px' as TdFormProps['labelWidth'],
+ },
+ /** 是否整个表单只读 */
+ readonly: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 是否显示必填符号(*),默认显示 */
+ requiredMark: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 表单必填符号(*)显示位置 */
+ requiredMarkPosition: {
+ type: String,
+ validator(val: TdFormProps['requiredMarkPosition']): boolean {
+ if (!val) return true;
+ return ['left', 'right'].includes(val);
+ },
+ },
+ /** 重置表单的方式,值为 empty 表示重置表单为空,值为 initial 表示重置表单数据为初始值 */
+ resetType: {
+ type: String,
+ default: 'empty' as TdFormProps['resetType'],
+ validator(val: TdFormProps['resetType']): boolean {
+ if (!val) return true;
+ return ['empty', 'initial'].includes(val);
+ },
+ },
+ /** 表单字段校验规则 */
+ rules: {
+ type: Object,
+ },
+ /** 表单校验不通过时,是否自动滚动到第一个校验不通过的字段,平滑滚动或是瞬间直达。值为空则表示不滚动 */
+ scrollToFirstError: {
+ type: String,
+ validator(val: TdFormProps['scrollToFirstError']): boolean {
+ if (!val) return true;
+ return ['', 'smooth', 'auto'].includes(val);
+ },
+ },
+ /** 校验不通过时,是否显示错误提示信息,统一控制全部表单项。如果希望控制单个表单项,请给 FormItem 设置该属性 */
+ showErrorMessage: {
+ type: Boolean,
+ default: true,
+ },
+ /** 【讨论中】当校验结果只有告警信息时,是否触发 `submit` 提交事件 */
+ submitWithWarningMessage: Boolean,
+ /** 表单重置时触发 */
+ onReset: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 表单提交时触发。其中 `context.validateResult` 表示校验结果,`context.firstError` 表示校验不通过的第一个规则提醒。`context.validateResult` 值为 `true` 表示校验通过;如果校验不通过,`context.validateResult` 值为校验结果列表。
【注意】⚠️ 默认情况,输入框按下 Enter 键会自动触发提交事件,如果希望禁用这个默认行为,可以给输入框添加 enter 事件,并在事件中设置 `e.preventDefault()` */
+ onSubmit: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 校验结束后触发,result 值为 true 表示校验通过;如果校验不通过,result 值为校验结果列表 */
+ onValidate: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/form/type.ts b/uni_modules/tdesign-uniapp/components/form/type.ts
new file mode 100644
index 0000000..11b9f1b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/form/type.ts
@@ -0,0 +1,387 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { IsEmailOptions } from '../common/common';
+import type { IsURLOptions } from '../common/common';
+import type { FormResetEvent, FormSubmitEvent } from '../common/common';
+
+export interface TdFormProps {
+ /**
+ * 是否在表单标签字段右侧显示冒号
+ * @default false
+ */
+ colon?: boolean;
+ /**
+ * 表单内容对齐方式:左对齐、右对齐
+ * @default left
+ */
+ contentAlign?: 'left' | 'right';
+ /**
+ * 表单数据
+ * @default {}
+ */
+ data?: FormData;
+ /**
+ * 是否禁用整个表单
+ */
+ disabled?: boolean;
+ /**
+ * 表单错误信息配置,示例:`{ idcard: '请输入正确的身份证号码', max: '字符长度不能超过 ${max}' }`
+ */
+ errorMessage?: FormErrorMessage;
+ /**
+ * 表单字段标签对齐方式:左对齐、右对齐、顶部对齐
+ * @default right
+ */
+ labelAlign?: 'left' | 'right' | 'top';
+ /**
+ * 可以整体设置label标签宽度,默认为81px
+ * @default '81px'
+ */
+ labelWidth?: string | number;
+ /**
+ * 是否整个表单只读
+ */
+ readonly?: boolean;
+ /**
+ * 是否显示必填符号(*),默认显示
+ */
+ requiredMark?: boolean;
+ /**
+ * 表单必填符号(*)显示位置
+ */
+ requiredMarkPosition?: 'left' | 'right';
+ /**
+ * 重置表单的方式,值为 empty 表示重置表单为空,值为 initial 表示重置表单数据为初始值
+ * @default empty
+ */
+ resetType?: 'empty' | 'initial';
+ /**
+ * 表单字段校验规则
+ */
+ rules?: FormRules;
+ /**
+ * 表单校验不通过时,是否自动滚动到第一个校验不通过的字段,平滑滚动或是瞬间直达。值为空则表示不滚动
+ */
+ scrollToFirstError?: '' | 'smooth' | 'auto';
+ /**
+ * 校验不通过时,是否显示错误提示信息,统一控制全部表单项。如果希望控制单个表单项,请给 FormItem 设置该属性
+ * @default true
+ */
+ showErrorMessage?: boolean;
+ /**
+ * 【讨论中】当校验结果只有告警信息时,是否触发 `submit` 提交事件
+ * @default false
+ */
+ submitWithWarningMessage?: boolean;
+ /**
+ * 表单重置时触发
+ */
+ onReset?: (context: { e?: FormResetEvent }) => void;
+ /**
+ * 表单提交时触发。其中 `context.validateResult` 表示校验结果,`context.firstError` 表示校验不通过的第一个规则提醒。`context.validateResult` 值为 `true` 表示校验通过;如果校验不通过,`context.validateResult` 值为校验结果列表。
【注意】⚠️ 默认情况,输入框按下 Enter 键会自动触发提交事件,如果希望禁用这个默认行为,可以给输入框添加 enter 事件,并在事件中设置 `e.preventDefault()`
+ */
+ onSubmit?: (context: SubmitContext) => void;
+ /**
+ * 校验结束后触发,result 值为 true 表示校验通过;如果校验不通过,result 值为校验结果列表
+ */
+ onValidate?: (result: ValidateResultContext) => void;
+}
+
+/** 组件实例方法 */
+export interface FormInstanceFunctions {
+ /**
+ * 清空校验结果。可使用 fields 指定清除部分字段的校验结果,fields 值为空则表示清除所有字段校验结果。清除邮箱校验结果示例:`clearValidate(['email'])`
+ */
+ clearValidate: (fields?: Array) => void;
+ /**
+ * 重置表单,表单里面没有重置按钮``时可以使用该方法,默认重置全部字段为空,该方法会触发 `reset` 事件。
如果表单属性 `resetType='empty'` 或者 `reset.type='empty'` 会重置为空;
如果表单属性 `resetType='initial'` 或者 `reset.type='initial'` 会重置为表单初始值。
`reset.fields` 用于设置具体重置哪些字段,示例:`reset({ type: 'initial', fields: ['name', 'age'] })`
+ */
+ reset: (params?: FormResetParams) => void;
+ /**
+ * 设置自定义校验结果,如远程校验信息直接呈现。注意需要在组件挂载结束后使用该方法。`FormData` 指表单数据泛型
+ */
+ setValidateMessage: (message: FormValidateMessage) => void;
+ /**
+ * 提交表单,表单里面没有提交按钮``时可以使用该方法。`showErrorMessage` 表示是否在提交校验不通过时显示校验不通过的原因,默认显示。该方法会触发 `submit` 事件
+ */
+ submit: (params?: { showErrorMessage?: boolean }) => void;
+ /**
+ * 校验函数,包含错误文本提示等功能。泛型 `FormData` 表示表单数据 TS 类型。
【关于参数】`params.fields` 表示校验字段,如果设置了 `fields`,本次校验将仅对这些字段进行校验。`params.trigger` 表示本次触发校验的范围,'params.trigger = blur' 表示只触发校验规则设定为 trigger='blur' 的字段,'params.trigger = change' 表示只触发校验规则设定为 trigger='change' 的字段,默认触发全范围校验。`params.showErrorMessage` 表示校验结束后是否显示错误文本提示,默认显示。
【关于返回值】返回值为 true 表示校验通过;如果校验不通过,返回值为校验结果列表
+ */
+ validate: (params?: FormValidateParams) => Promise>;
+}
+
+
+export interface TdFormItemProps {
+ /**
+ * 是否显示右侧箭头
+ * @default false
+ */
+ arrow?: boolean;
+ /**
+ * 表单内容对齐方式,优先级高于 Form.contentAlign
+ */
+ contentAlign?: 'left' | 'right';
+ /**
+ * label 原生属性
+ * @default ''
+ */
+ for?: string;
+ /**
+ * 表单项说明内容
+ */
+ help?: string;
+ /**
+ * 字段标签名称
+ * @default ''
+ */
+ label?: string;
+ /**
+ * 表单字段标签对齐方式:左对齐、右对齐、顶部对齐。默认使用 Form 的对齐方式,优先级高于 Form.labelAlign
+ */
+ labelAlign?: 'left' | 'right' | 'top';
+ /**
+ * 可以整体设置标签宽度,优先级高于 Form.labelWidth
+ */
+ labelWidth?: string | number;
+ /**
+ * 表单字段名称
+ * @default ''
+ */
+ name?: string;
+ /**
+ * 是否显示必填符号(*),优先级高于 Form.requiredMark
+ */
+ requiredMark?: boolean;
+ /**
+ * 表单字段校验规则
+ */
+ rules?: Array;
+ /**
+ * 校验不通过时,是否显示错误提示信息,优先级高于 `Form.showErrorMessage`
+ */
+ showErrorMessage?: boolean;
+}
+
+export interface FormRule {
+ /**
+ * 内置校验方法,校验值类型是否为布尔类型,示例:`{ boolean: true, message: '数据类型必须是布尔类型' }`
+ */
+ boolean?: boolean;
+ /**
+ * 内置校验方法,校验值是否为日期格式,[参数文档](https://github.com/validatorjs/validator.js),示例:`{ date: { delimiters: '-' }, message: '日期分隔线必须是短横线(-)' }`
+ */
+ date?: boolean | IsDateOptions;
+ /**
+ * 内置校验方法,校验值是否为邮件格式,[参数文档](https://github.com/validatorjs/validator.js),示例:`{ email: { ignore_max_length: true }, message: '请输入正确的邮箱地址' }`
+ */
+ email?: boolean | IsEmailOptions;
+ /**
+ * 内置校验方法,校验值是否属于枚举值中的值。示例:`{ enum: ['primary', 'info', 'warning'], message: '值只能是 primary/info/warning 中的一种' }`
+ */
+ enum?: Array;
+ /**
+ * 内置校验方法,校验值是否为身份证号码,组件校验正则为 `/^(\\d{18,18}|\\d{15,15}|\\d{17,17}x)$/i`,示例:`{ idcard: true, message: '请输入正确的身份证号码' }`
+ */
+ idcard?: boolean;
+ /**
+ * 内置校验方法,校验值固定长度,如:len: 10 表示值的字符长度只能等于 10 ,中文表示 2 个字符,英文为 1 个字符。示例:`{ len: 10, message: '内容长度不对' }`。
如果希望字母和中文都是同样的长度,示例:`{ validator: (val) => val.length === 10, message: '内容文本长度只能是 10 个字' }`
+ */
+ len?: number | boolean;
+ /**
+ * 内置校验方法,校验值最大长度,如:max: 100 表示值最多不能超过 100 个字符,中文表示 2 个字符,英文为 1 个字符。示例:`{ max: 10, message: '内容超出' }`。
如果希望字母和中文都是同样的长度,示例:`{ validator: (val) => val.length <= 10, message: '内容文本长度不能超过 10 个字' }`
如果数据类型数字(Number),则自动变为数字大小的比对
+ */
+ max?: number | boolean;
+ /**
+ * 校验未通过时呈现的错误信息,值为空则不显示
+ * @default ''
+ */
+ message?: string;
+ /**
+ * 内置校验方法,校验值最小长度,如:min: 10 表示值最多不能少于 10 个字符,中文表示 2 个字符,英文为 1 个字符。示例:`{ min: 10, message: '内容长度不够' }`。
如果希望字母和中文都是同样的长度,示例:`{ validator: (val) => val.length >= 10, message: '内容文本长度至少为 10 个字' }`。
如果数据类型数字(Number),则自动变为数字大小的比对
+ */
+ min?: number | boolean;
+ /**
+ * 内置校验方法,校验值是否为数字(1.2 、 1e5 都算数字),示例:`{ number: true, message: '请输入数字' }`
+ */
+ number?: boolean;
+ /**
+ * 内置校验方法,校验值是否符合正则表达式匹配结果,示例:`{ pattern: /@qq.com/, message: '请输入 QQ 邮箱' }`
+ */
+ pattern?: RegExp | string;
+ /**
+ * 内置校验方法,校验值是否已经填写。该值为 true,默认显示必填标记,可通过设置 `requiredMark: false` 隐藏必填标记
+ */
+ required?: boolean;
+ /**
+ * 内置校验方法,校验值是否为手机号码,校验正则为 `/^1[3-9]\d{9}$/`,示例:`{ telnumber: true, message: '请输入正确的手机号码' }`
+ */
+ telnumber?: boolean;
+ /**
+ * 校验触发方式
+ * @default change
+ */
+ trigger?: ValidateTriggerType;
+ /**
+ * 校验未通过时呈现的错误信息类型,有 告警信息提示 和 错误信息提示 等两种
+ * @default error
+ */
+ type?: 'error' | 'warning';
+ /**
+ * 内置校验方法,校验值是否为网络链接地址,[参数文档](https://github.com/validatorjs/validator.js),示例:`{ url: { protocols: ['http','https','ftp'] }, message: '请输入正确的 Url 地址' }`
+ */
+ url?: boolean | IsURLOptions;
+ /**
+ * 自定义校验规则,示例:`{ validator: (val) => val.length > 0, message: '请输入内容'}`
+ */
+ validator?: CustomValidator;
+ /**
+ * 内置校验方法,校验值是否为空格。示例:`{ whitespace: true, message: '值不能为空' }`
+ */
+ whitespace?: boolean;
+}
+
+export interface FormErrorMessage {
+ /**
+ * 布尔类型校验不通过时的表单项显示文案,全局配置默认是:`'${name}数据类型必须是布尔类型'`
+ * @default ''
+ */
+ boolean?: string;
+ /**
+ * 日期校验规则不通过时的表单项显示文案,全局配置默认是:`'请输入正确的${name}'`
+ * @default ''
+ */
+ date?: string;
+ /**
+ * 枚举值校验规则不通过时的表单项显示文案,全局配置默认是:`${name}只能是${validate}等`
+ * @default ''
+ */
+ enum?: string;
+ /**
+ * 身份证号码校验不通过时的表单项显示文案,全局配置默认是:`'请输入正确的${name}'`
+ * @default ''
+ */
+ idcard?: string;
+ /**
+ * 值长度校验不通过时的表单项显示文案,全局配置默认是:`'${name}字符长度必须是 ${validate}'`
+ * @default ''
+ */
+ len?: string;
+ /**
+ * 值的长度太长或值本身太大时,校验不通过的表单项显示文案,全局配置默认是:`'${name}字符长度不能超过 ${validate} 个字符,一个中文等于两个字符'`
+ * @default ''
+ */
+ max?: string;
+ /**
+ * 值的长度太短或值本身太小时,校验不通过的表单项显示文案,全局配置默认是:`'${name}字符长度不能少于 ${validate} 个字符,一个中文等于两个字符'`
+ * @default ''
+ */
+ min?: string;
+ /**
+ * 数字类型校验不通过时的表单项显示文案,全局配置默认是:`'${name}必须是数字'`
+ * @default ''
+ */
+ number?: string;
+ /**
+ * 正则表达式校验不通过时的表单项显示文案,全局配置默认是:`'请输入正确的${name}'`
+ * @default ''
+ */
+ pattern?: string;
+ /**
+ * 没有填写必填项时的表单项显示文案,全局配置默认是:`'${name}必填'`
+ * @default ''
+ */
+ required?: string;
+ /**
+ * 手机号号码校验不通过时的表单项显示文案,全局配置默认是:`'请输入正确的${name}'`
+ * @default ''
+ */
+ telnumber?: string;
+ /**
+ * 链接校验规则不通过时的表单项显示文案,全局配置默认是:`'请输入正确的${name}'`
+ * @default ''
+ */
+ url?: string;
+ /**
+ * 自定义校验规则校验不通过时的表单项显示文案,全局配置默认是:'${name}不符合要求'
+ * @default ''
+ */
+ validator?: string;
+ /**
+ * 值为空格校验不通过时表单项显示文案,全局配置默认是:`'${name}不能为空`
+ * @default ''
+ */
+ whitespace?: string;
+}
+
+export type FormRules = { [field in keyof T]?: Array };
+
+export interface SubmitContext {
+ e?: FormSubmitEvent;
+ validateResult: FormValidateResult;
+ firstError?: string;
+ fields?: any;
+}
+
+export type FormValidateResult = boolean | ValidateResultObj;
+
+export type ValidateResultObj = { [key in keyof T]: boolean | ValidateResultList };
+
+export type ValidateResultList = Array;
+
+export type AllValidateResult = CustomValidateObj | ValidateResultType;
+
+export interface ValidateResultType extends FormRule {
+ result: boolean;
+}
+
+export type ValidateResult = { [key in keyof T]: boolean | ErrorList };
+
+export type ErrorList = Array;
+
+export type ValidateResultContext = Omit, 'e'>;
+
+export interface FormResetParams {
+ type?: 'initial' | 'empty';
+ fields?: Array;
+}
+
+export type FormValidateMessage = { [field in keyof FormData]: FormItemValidateMessage[] };
+
+export interface FormItemValidateMessage {
+ type: 'warning' | 'error';
+ message: string;
+}
+
+export interface FormValidateParams {
+ fields?: Array;
+ showErrorMessage?: boolean;
+ trigger?: ValidateTriggerType;
+}
+
+export type ValidateTriggerType = 'blur' | 'change' | 'submit' | 'all';
+
+export type Data = { [key: string]: any };
+
+export interface IsDateOptions {
+ format: string;
+ strictMode: boolean;
+ delimiters: string[];
+}
+
+export type CustomValidator = (val: ValueType) => CustomValidateResolveType | Promise;
+
+export type CustomValidateResolveType = boolean | CustomValidateObj;
+
+export interface CustomValidateObj {
+ result: boolean;
+ message: string;
+ type?: 'error' | 'warning' | 'success';
+}
+
+export type ValueType = any;
+
diff --git a/uni_modules/tdesign-uniapp/components/grid-item/README.en-US.md b/uni_modules/tdesign-uniapp/components/grid-item/README.en-US.md
new file mode 100644
index 0000000..222df88
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/grid-item/README.en-US.md
@@ -0,0 +1,65 @@
+:: BASE_DOC ::
+
+## API
+
+### GridItem Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+badgeProps | Object | null | Typescript:`BadgeProps`,[Badge API Documents](./badge?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/grid-item/type.ts) | N
+description | String / TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+icon | String / Object | - | \- | N
+image | String / TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+imageProps | Object | - | Typescript:`ImageProps`,[Image API Documents](./image?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/grid-item/type.ts) | N
+jumpType | String | navigate-to | options: redirect-to/switch-tab/relaunch/navigate-to | N
+layout | String | vertical | options: vertical/horizontal | N
+text | String / TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+url | String | - | \- | N
+onClick | Function | | Typescript:`() => void`
| N
+
+### GridItem Events
+
+name | params | description
+-- | -- | --
+click | \- | \-
+
+### GridItem Slots
+
+name | Description
+-- | --
+- | \-
+description | \-
+image | \-
+text | \-
+
+### GridItem External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-content | \-
+t-class-description | \-
+t-class-image | \-
+t-class-text | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-grid-item-bg-color | @bg-color-container | -
+--td-grid-item-description-color | @text-color-placeholder | -
+--td-grid-item-description-font | @font-body-small | -
+--td-grid-item-description-padding-top | 0 | -
+--td-grid-item-horizontal-text-description-top | 0 | -
+--td-grid-item-horizontal-text-padding-left | 0 | -
+--td-grid-item-hover-bg-color | @bg-color-secondarycontainer | -
+--td-grid-item-image-middle-width | 80rpx | -
+--td-grid-item-image-small-width | 64rpx | -
+--td-grid-item-image-width | 96rpx | -
+--td-grid-item-padding | 32rpx | -
+--td-grid-item-text-color | @text-color-primary | -
+--td-grid-item-text-font | @font-body-medium | -
+--td-grid-item-text-middle-font | @font-body-small | -
+--td-grid-item-text-padding-top | 16rpx | -
+--td-grid-item-text-small-font | @font-body-extraSmall | -
diff --git a/uni_modules/tdesign-uniapp/components/grid-item/README.md b/uni_modules/tdesign-uniapp/components/grid-item/README.md
new file mode 100644
index 0000000..61d40da
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/grid-item/README.md
@@ -0,0 +1,65 @@
+:: BASE_DOC ::
+
+## API
+
+### GridItem Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+badgeProps | Object | null | 透传至 Badge 属性。TS 类型:`BadgeProps`,[Badge API Documents](./badge?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/grid-item/type.ts) | N
+description | String / TNode | - | 文本以外的更多描述,辅助信息。可以通过 Props 传入文本,也可以自定义标题节点。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+icon | String / Object | - | 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` | N
+image | String / TNode | - | 图片,可以是图片地址,也可以自定义图片节点,值为 slot 的时候才能使用插槽。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+imageProps | Object | - | 透传至 Image 组件。TS 类型:`ImageProps`,[Image API Documents](./image?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/grid-item/type.ts) | N
+jumpType | String | navigate-to | 链接跳转类型。可选项:redirect-to/switch-tab/relaunch/navigate-to | N
+layout | String | vertical | 内容布局方式。可选项:vertical/horizontal | N
+text | String / TNode | - | 文本,可以通过 Props 传入文本,也可以自定义标题节点。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+url | String | - | 点击后的跳转链接 | N
+onClick | Function | | TS 类型:`() => void`
点击子项后触发 | N
+
+### GridItem Events
+
+名称 | 参数 | 描述
+-- | -- | --
+click | \- | 点击子项后触发
+
+### GridItem Slots
+
+名称 | 描述
+-- | --
+- | 默认插槽,自定义内容区域内容
+description | 自定义 `description` 模块内容
+image | 自定义 `image` 模块内容
+text | 自定义 `text` 模块内容
+
+### GridItem External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-content | 内容样式类
+t-class-description | 描述样式类
+t-class-image | 图片样式类
+t-class-text | 文本样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-grid-item-bg-color | @bg-color-container | -
+--td-grid-item-description-color | @text-color-placeholder | -
+--td-grid-item-description-font | @font-body-small | -
+--td-grid-item-description-padding-top | 0 | -
+--td-grid-item-horizontal-text-description-top | 0 | -
+--td-grid-item-horizontal-text-padding-left | 0 | -
+--td-grid-item-hover-bg-color | @bg-color-secondarycontainer | -
+--td-grid-item-image-middle-width | 80rpx | -
+--td-grid-item-image-small-width | 64rpx | -
+--td-grid-item-image-width | 96rpx | -
+--td-grid-item-padding | 32rpx | -
+--td-grid-item-text-color | @text-color-primary | -
+--td-grid-item-text-font | @font-body-medium | -
+--td-grid-item-text-middle-font | @font-body-small | -
+--td-grid-item-text-padding-top | 16rpx | -
+--td-grid-item-text-small-font | @font-body-extraSmall | -
diff --git a/uni_modules/tdesign-uniapp/components/grid-item/grid-item.css b/uni_modules/tdesign-uniapp/components/grid-item/grid-item.css
new file mode 100644
index 0000000..980443a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/grid-item/grid-item.css
@@ -0,0 +1,103 @@
+.t-grid-item {
+ box-sizing: border-box;
+ height: 100%;
+ display: inline-block;
+ vertical-align: top;
+ background-color: var(--td-grid-item-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-grid-item--hover {
+ background-color: var(--td-grid-item-hover-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+}
+.t-grid-item--auto-size {
+ width: 168rpx;
+}
+.t-grid-item__content {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ overflow: hidden;
+ position: relative;
+ padding: var(--td-grid-item-padding, 32rpx) 0 24rpx;
+}
+.t-grid-item__content--horizontal {
+ flex-direction: row;
+ padding-left: var(--td-grid-item-padding, 32rpx);
+}
+.t-grid-item__content--left {
+ justify-self: flex-start;
+ align-items: flex-start;
+}
+.t-grid-item__content--left .t-grid-item__words {
+ text-align: left;
+}
+.t-grid-item__words {
+ width: 100%;
+ text-align: center;
+ position: relative;
+ flex-direction: column;
+ display: flex;
+ flex: 1;
+ justify-content: center;
+ align-items: center;
+}
+.t-grid-item__words--horizontal {
+ margin-left: 24rpx;
+}
+.t-grid-item__words:empty {
+ display: none;
+}
+:deep(.t-grid-item__image):not(:empty) {
+ width: var(--td-grid-item-image-width, 96rpx);
+ height: var(--td-grid-item-image-width, 96rpx);
+}
+:deep(.t-grid-item__image):not(:empty).t-grid-item__image--small {
+ width: var(--td-grid-item-image-small-width, 64rpx);
+ height: var(--td-grid-item-image-small-width, 64rpx);
+}
+:deep(.t-grid-item__image):not(:empty).t-grid-item__image--middle {
+ width: var(--td-grid-item-image-middle-width, 80rpx);
+ height: var(--td-grid-item-image-middle-width, 80rpx);
+}
+:deep(.t-grid-item__image):not(:empty) .t-grid__image {
+ width: 100%;
+ height: 100%;
+}
+:deep(.t-grid-item__image)--icon {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3));
+ border-radius: var(--td-radius-default, 12rpx);
+}
+.t-grid-item__text {
+ width: inherit;
+ color: var(--td-grid-item-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ padding-top: var(--td-grid-item-text-padding-top, 16rpx);
+}
+.t-grid-item__text--small {
+ font: var(--td-grid-item-text-small-font, var(--td-font-body-extraSmall, 20rpx / 32rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-grid-item__text--middle {
+ font: var(--td-grid-item-text-middle-font, var(--td-font-body-small, 24rpx / 40rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-grid-item__text--large {
+ font: var(--td-grid-item-text-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-grid-item__text--horizontal {
+ padding-top: 0;
+ text-align: left;
+}
+.t-grid-item__description {
+ padding-top: var(--td-grid-item-description-padding-top, 0);
+ width: inherit;
+ color: var(--td-grid-item-description-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ font: var(--td-grid-item-description-font, var(--td-font-body-small, 24rpx / 40rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-grid-item__description--horizontal {
+ margin-top: var(--td-grid-item-horizontal-text-description-top, 0);
+ padding-left: var(--td-grid-item-horizontal-text-padding-left, 0);
+ text-align-last: left;
+}
+:deep(.t-grid-item__icon) {
+ font-size: 48rpx;
+}
diff --git a/uni_modules/tdesign-uniapp/components/grid-item/grid-item.vue b/uni_modules/tdesign-uniapp/components/grid-item/grid-item.vue
new file mode 100644
index 0000000..82867be
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/grid-item/grid-item.vue
@@ -0,0 +1,292 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+
+ {{ description }}
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/grid-item/props.ts b/uni_modules/tdesign-uniapp/components/grid-item/props.ts
new file mode 100644
index 0000000..a25dc26
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/grid-item/props.ts
@@ -0,0 +1,63 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdGridItemProps } from './type';
+export default {
+ /** 透传至 Badge 属性 */
+ badgeProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 文本以外的更多描述,辅助信息。可以通过 Props 传入文本,也可以自定义标题节点 */
+ description: {
+ type: String,
+ },
+ /** 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` */
+ icon: {
+ type: [String, Object],
+ },
+ /** 图片,可以是图片地址,也可以自定义图片节点,值为 slot 的时候才能使用插槽 */
+ image: {
+ type: String,
+ },
+ /** 透传至 Image 组件 */
+ imageProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 链接跳转类型 */
+ jumpType: {
+ type: String,
+ default: 'navigate-to' as TdGridItemProps['jumpType'],
+ validator(val: TdGridItemProps['jumpType']): boolean {
+ if (!val) return true;
+ return ['redirect-to', 'switch-tab', 'relaunch', 'navigate-to'].includes(val);
+ },
+ },
+ /** 内容布局方式 */
+ layout: {
+ type: String,
+ default: 'vertical' as TdGridItemProps['layout'],
+ validator(val: TdGridItemProps['layout']): boolean {
+ if (!val) return true;
+ return ['vertical', 'horizontal'].includes(val);
+ },
+ },
+ /** 文本,可以通过 Props 传入文本,也可以自定义标题节点 */
+ text: {
+ type: String,
+ },
+ /** 点击后的跳转链接 */
+ url: {
+ type: String,
+ default: '',
+ },
+ /** 点击子项后触发 */
+ onClick: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/grid-item/type.ts b/uni_modules/tdesign-uniapp/components/grid-item/type.ts
new file mode 100644
index 0000000..3f45087
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/grid-item/type.ts
@@ -0,0 +1,56 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdBadgeProps as BadgeProps } from '../badge/type';
+import type { TdImageProps as ImageProps } from '../image/type';
+
+export interface TdGridItemProps {
+ /**
+ * 透传至 Badge 属性
+ * @default {}
+ */
+ badgeProps?: BadgeProps;
+ /**
+ * 文本以外的更多描述,辅助信息。可以通过 Props 传入文本,也可以自定义标题节点
+ */
+ description?: string;
+ /**
+ * 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon`
+ */
+ icon?: string | object;
+ /**
+ * 图片,可以是图片地址,也可以自定义图片节点,值为 slot 的时候才能使用插槽
+ */
+ image?: string;
+ /**
+ * 透传至 Image 组件
+ * @default {}
+ */
+ imageProps?: ImageProps;
+ /**
+ * 链接跳转类型
+ * @default navigate-to
+ */
+ jumpType?: 'redirect-to' | 'switch-tab' | 'relaunch' | 'navigate-to';
+ /**
+ * 内容布局方式
+ * @default vertical
+ */
+ layout?: 'vertical' | 'horizontal';
+ /**
+ * 文本,可以通过 Props 传入文本,也可以自定义标题节点
+ */
+ text?: string;
+ /**
+ * 点击后的跳转链接
+ * @default ''
+ */
+ url?: string;
+ /**
+ * 点击子项后触发
+ */
+ onClick?: () => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/grid/README.en-US.md b/uni_modules/tdesign-uniapp/components/grid/README.en-US.md
new file mode 100644
index 0000000..524ebd1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/grid/README.en-US.md
@@ -0,0 +1,92 @@
+:: BASE_DOC ::
+
+## API
+
+### Grid Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+align | String | center | options: left/center | N
+border | Boolean / Object | false | Typescript:`boolean \| { color?: string; width?: string; style?: 'solid' \| 'dashed' \| 'dotted' \| 'double' \| 'groove' \| 'inset' \| 'outset' }` | N
+column | Number | 4 | \- | N
+gutter | Number | - | \- | N
+hover | Boolean | false | \- | N
+theme | String | default | options: default/card | N
+
+### Grid Slots
+
+name | Description
+-- | --
+\- | \-
+
+### Grid External Classes
+
+className | Description
+-- | --
+t-class | \-
+
+
+### GridItem Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+badge-props | Object | {} | Typescript:`BadgeProps`,[Badge API Documents](./badge?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/grid-item/type.ts) | N
+description | String | - | \- | N
+icon | String / Object | - | \- | N
+image | String | - | \- | N
+image-props | Object | {} | Typescript:`ImageProps`,[Image API Documents](./image?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/grid-item/type.ts) | N
+jump-type | String | navigate-to | options: redirect-to/switch-tab/relaunch/navigate-to | N
+layout | String | vertical | options: vertical/horizontal | N
+text | String | - | \- | N
+url | String | - | \- | N
+
+### GridItem Events
+
+name | params | description
+-- | -- | --
+click | \- | \-
+
+### GridItem Slots
+
+name | Description
+-- | --
+\- | \-
+description | \-
+image | \-
+text | \-
+
+### GridItem External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-content | \-
+t-class-description | \-
+t-class-image | \-
+t-class-text | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-grid-bg-color | @bg-color-container | -
+--td-grid-card-radius | @radius-large | -
+--td-grid-item-bg-color | @bg-color-container | -
+--td-grid-item-description-color | @text-color-placeholder | -
+--td-grid-item-description-font | @font-body-small | -
+--td-grid-item-description-padding-top | 0 | -
+--td-grid-item-horizontal-text-description-top | 0 | -
+--td-grid-item-horizontal-text-padding-left | 0 | -
+--td-grid-item-hover-bg-color | @bg-color-secondarycontainer | -
+--td-grid-item-image-middle-width | 80rpx | -
+--td-grid-item-image-small-width | 64rpx | -
+--td-grid-item-image-width | 96rpx | -
+--td-grid-item-padding | 32rpx | -
+--td-grid-item-text-color | @text-color-primary | -
+--td-grid-item-text-font | @font-body-medium | -
+--td-grid-item-text-middle-font | @font-body-small | -
+--td-grid-item-text-padding-top | 16rpx | -
+--td-grid-item-text-small-font | @font-body-extraSmall | -
diff --git a/uni_modules/tdesign-uniapp/components/grid/README.md b/uni_modules/tdesign-uniapp/components/grid/README.md
new file mode 100644
index 0000000..908236f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/grid/README.md
@@ -0,0 +1,143 @@
+---
+title: Grid 宫格
+description: 用于功能入口布局,将页面或特定区域切分成若干等大的区块,形成若干功能入口。
+spline: data
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TGrid from '@tdesign/uniapp/grid/grid.vue';
+import TGridItem from '@tdesign/uniapp/grid-item/grid-item.vue';
+```
+
+### 组件类型
+基础宫格
+
+{{ base }}
+
+带说明的宫格
+
+{{ description }}
+
+带边框的宫格
+
+{{ border }}
+
+带徽章的宫格
+
+{{ badge }}
+
+可滑动的宫格
+
+{{ scroll }}
+
+### 组件样式
+
+可传图标的宫格
+
+{{ icon-grid }}
+
+多行宫格
+
+{{ multiple }}
+
+卡片宫格
+
+{{ card }}
+
+
+## API
+
+### Grid Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+align | String | center | 内容对齐方式。可选项:left/center | N
+border | Boolean / Object | false | 边框,默认不显示。值为 true 则显示默认边框,值类型为 object 则表示自定义边框样式。TS 类型:`boolean \| { color?: string; width?: string; style?: 'solid' \| 'dashed' \| 'dotted' \| 'double' \| 'groove' \| 'inset' \| 'outset' }` | N
+column | Number | 4 | 每一行的列数量;为 0 时等于固定大小 | N
+gutter | Number | - | 间隔大小 | N
+hover | Boolean | false | 是否开启点击反馈 | N
+theme | String | default | 宫格的风格。可选项:default/card | N
+
+### Grid Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+
+### Grid External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+
+
+### GridItem Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+badge-props | Object | {} | 透传至 Badge 属性。TS 类型:`BadgeProps`,[Badge API Documents](./badge?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/grid-item/type.ts) | N
+description | String | - | 文本以外的更多描述,辅助信息。可以通过 Props 传入文本,也可以自定义标题节点 | N
+icon | String / Object | - | 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` | N
+image | String | - | 图片,可以是图片地址,也可以自定义图片节点,值为 slot 的时候才能使用插槽 | N
+image-props | Object | {} | 透传至 Image 组件。TS 类型:`ImageProps`,[Image API Documents](./image?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/grid-item/type.ts) | N
+jump-type | String | navigate-to | 链接跳转类型。可选项:redirect-to/switch-tab/relaunch/navigate-to | N
+layout | String | vertical | 内容布局方式。可选项:vertical/horizontal | N
+text | String | - | 文本,可以通过 Props 传入文本,也可以自定义标题节点 | N
+url | String | - | 点击后的跳转链接 | N
+
+### GridItem Events
+
+名称 | 参数 | 描述
+-- | -- | --
+click | \- | 点击子项后触发
+
+### GridItem Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+description | 自定义 `description` 模块内容
+image | 自定义 `image` 模块内容
+text | 自定义 `text` 模块内容
+
+### GridItem External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-content | 内容样式类
+t-class-description | 描述样式类
+t-class-image | 图片样式类
+t-class-text | 文本样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-grid-bg-color | @bg-color-container | -
+--td-grid-card-radius | @radius-large | -
+--td-grid-item-bg-color | @bg-color-container | -
+--td-grid-item-description-color | @text-color-placeholder | -
+--td-grid-item-description-font | @font-body-small | -
+--td-grid-item-description-padding-top | 0 | -
+--td-grid-item-horizontal-text-description-top | 0 | -
+--td-grid-item-horizontal-text-padding-left | 0 | -
+--td-grid-item-hover-bg-color | @bg-color-secondarycontainer | -
+--td-grid-item-image-middle-width | 80rpx | -
+--td-grid-item-image-small-width | 64rpx | -
+--td-grid-item-image-width | 96rpx | -
+--td-grid-item-padding | 32rpx | -
+--td-grid-item-text-color | @text-color-primary | -
+--td-grid-item-text-font | @font-body-medium | -
+--td-grid-item-text-middle-font | @font-body-small | -
+--td-grid-item-text-padding-top | 16rpx | -
+--td-grid-item-text-small-font | @font-body-extraSmall | -
diff --git a/uni_modules/tdesign-uniapp/components/grid/grid.css b/uni_modules/tdesign-uniapp/components/grid/grid.css
new file mode 100644
index 0000000..526231d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/grid/grid.css
@@ -0,0 +1,13 @@
+.t-grid {
+ position: relative;
+ overflow: hidden;
+ background-color: var(--td-grid-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-grid__content {
+ width: auto;
+}
+.t-grid--card {
+ margin: 0 32rpx;
+ border-radius: var(--td-grid-card-radius, var(--td-radius-large, 18rpx));
+ overflow: hidden;
+}
diff --git a/uni_modules/tdesign-uniapp/components/grid/grid.vue b/uni_modules/tdesign-uniapp/components/grid/grid.vue
new file mode 100644
index 0000000..84e2bf1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/grid/grid.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/grid/props.ts b/uni_modules/tdesign-uniapp/components/grid/props.ts
new file mode 100644
index 0000000..88c055a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/grid/props.ts
@@ -0,0 +1,43 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdGridProps } from './type';
+export default {
+ /** 内容对齐方式 */
+ align: {
+ type: String,
+ default: 'center' as TdGridProps['align'],
+ validator(val: TdGridProps['align']): boolean {
+ if (!val) return true;
+ return ['left', 'center'].includes(val);
+ },
+ },
+ /** 边框,默认不显示。值为 true 则显示默认边框,值类型为 object 则表示自定义边框样式 */
+ border: {
+ type: [Boolean, Object],
+ default: false as TdGridProps['border'],
+ },
+ /** 每一行的列数量;为 0 时等于固定大小 */
+ column: {
+ type: Number,
+ default: 4,
+ },
+ /** 间隔大小 */
+ gutter: {
+ type: Number,
+ },
+ /** 是否开启点击反馈 */
+ hover: Boolean,
+ /** 宫格的风格 */
+ theme: {
+ type: String,
+ default: 'default' as TdGridProps['theme'],
+ validator(val: TdGridProps['theme']): boolean {
+ if (!val) return true;
+ return ['default', 'card'].includes(val);
+ },
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/grid/type.ts b/uni_modules/tdesign-uniapp/components/grid/type.ts
new file mode 100644
index 0000000..e26ee44
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/grid/type.ts
@@ -0,0 +1,43 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdGridProps {
+ /**
+ * 内容对齐方式
+ * @default center
+ */
+ align?: 'left' | 'center';
+ /**
+ * 边框,默认不显示。值为 true 则显示默认边框,值类型为 object 则表示自定义边框样式
+ * @default false
+ */
+ border?:
+ | boolean
+ | {
+ color?: string;
+ width?: string;
+ style?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'inset' | 'outset';
+ };
+ /**
+ * 每一行的列数量;为 0 时等于固定大小
+ * @default 4
+ */
+ column?: number;
+ /**
+ * 间隔大小
+ */
+ gutter?: number;
+ /**
+ * 是否开启点击反馈
+ * @default false
+ */
+ hover?: boolean;
+ /**
+ * 宫格的风格
+ * @default default
+ */
+ theme?: 'default' | 'card';
+}
diff --git a/uni_modules/tdesign-uniapp/components/guide/README.en-US.md b/uni_modules/tdesign-uniapp/components/guide/README.en-US.md
new file mode 100644
index 0000000..1e34b63
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/guide/README.en-US.md
@@ -0,0 +1,103 @@
+:: BASE_DOC ::
+
+## API
+
+### Guide Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+back-button-props | Object | - | Typescript:`ButtonProps` | N
+counter | String / Function | - | Typescript:`string \| ((params: { total: number; current: number }) => string)` | N
+current | Number | - | `v-model:current` is supported | N
+default-current | Number | - | uncontrolled property | N
+finish-button-props | Object | - | Typescript:`ButtonProps` | N
+hide-back | Boolean | false | \- | N
+hide-counter | Boolean | false | \- | N
+hide-skip | Boolean | false | \- | N
+highlight-padding | Number | 16 | \- | N
+mode | String | popover | options: popover/dialog | N
+next-button-props | Object | - | Typescript:`ButtonProps`,[Button API Documents](./button?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/guide/type.ts) | N
+show-overlay | Boolean | true | \- | N
+skip-button-props | Object | - | Typescript:`ButtonProps` | N
+steps | Array | - | Typescript:`Array` | N
+using-custom-navbar | Boolean | false | \- | N
+z-index | Number | 999999 | \- | N
+
+### Guide Events
+
+name | params | description
+-- | -- | --
+back | `(context: { e: MouseEvent, current: number, total: number })` | \-
+change | `(current: number, context?: { e: MouseEvent, total: number })` | \-
+finish | `(context: { e: MouseEvent, current: number, total: number })` | \-
+next-step-click | `(context: { e: MouseEvent, next: number, current: number, total: number })` | \-
+skip | `(context: { e: MouseEvent, current: number, total: number })` | \-
+
+### Guide External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-back | \-
+t-class-body | \-
+t-class-finish | \-
+t-class-footer | \-
+t-class-next | \-
+t-class-popover | \-
+t-class-reference | \-
+t-class-skip | \-
+t-class-title | \-
+t-class-tooltip | \-
+
+### GuideStep
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+back-button-props | Object | - | Typescript:`ButtonProps` | N
+body | String | - | \- | N
+element | Function | - | required。Typescript:`StepElement` `type StepElement = () => Promise`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/guide/type.ts) | Y
+finish-button-props | Object | - | Typescript:`ButtonProps` | N
+highlight-padding | Number | - | \- | N
+mode | String | - | options: popover/dialog | N
+next-button-props | Object | - | Typescript:`ButtonProps` | N
+offset | Array | - | this api is in discussing. do not use it。Typescript:`Array` | N
+placement | String | 'top' | Typescript:`StepPopoverPlacement ` `type StepPopoverPlacement = 'top'\|'left'\|'right'\|'bottom'\|'top-left'\|'top-right'\|'bottom-left'\|'bottom-right'\|'left-top'\|'left-bottom'\|'right-top'\|'right-bottom'\|'center'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/guide/type.ts) | N
+show-overlay | Boolean | true | \- | N
+skip-button-props | Object | - | Typescript:`ButtonProps` | N
+title | String | - | title of current step | N
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-guide-body-color | @text-color-secondary | -
+--td-guide-dialog-body-font | @font-body-large | -
+--td-guide-dialog-body-margin-top | 16rpx | -
+--td-guide-dialog-body-text-align | center | -
+--td-guide-dialog-border-radius | @radius-extraLarge | -
+--td-guide-dialog-footer-button-padding | 0 @spacer-3 | -
+--td-guide-dialog-padding | @spacer-3 0 | -
+--td-guide-dialog-title-font | @font-title-large | -
+--td-guide-dialog-title-text-align | center | -
+--td-guide-dialog-width | 622rpx | -
+--td-guide-footer-button-space | @spacer-1 | -
+--td-guide-footer-margin-top | @spacer-3 | -
+--td-guide-footer-text-align | right | -
+--td-guide-popover-bg-color | @bg-color-container | -
+--td-guide-popover-body-font | @font-body-medium | -
+--td-guide-popover-body-margin-top | 8rpx | -
+--td-guide-popover-body-text-align | left | -
+--td-guide-popover-border | 2rpx solid @component-border | -
+--td-guide-popover-border-radius | @radius-large | -
+--td-guide-popover-max-width | 540rpx | -
+--td-guide-popover-min-width | 480rpx | -
+--td-guide-popover-padding | @spacer-2 | -
+--td-guide-popover-shadow | @shadow-3 | -
+--td-guide-popover-title-font | @font-title-medium | -
+--td-guide-popover-title-text-align | left | -
+--td-guide-reference-border | 4rpx solid @brand-color | -
+--td-guide-reference-border-radius | @radius-default | -
+--td-guide-reference-mask-color | @font-gray-2 | -
+--td-guide-title-color | @text-color-primary | -
diff --git a/uni_modules/tdesign-uniapp/components/guide/README.md b/uni_modules/tdesign-uniapp/components/guide/README.md
new file mode 100644
index 0000000..1269a95
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/guide/README.md
@@ -0,0 +1,140 @@
+---
+title: Guide 按钮
+description: 逐步骤进行指引或解释说明的组件,常用于用户不熟悉的或需进行特别强调的页面。
+spline: base
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TGuide from '@tdesign/uniapp/guide/guide.vue';
+```
+
+### 01 组件类型
+
+#### 基础按钮
+
+{{ base }}
+
+#### 不带遮罩的引导
+
+{{ no-mask }}
+
+#### 弹窗形式的引导
+
+{{ dialog }}
+
+#### 气泡与弹窗混合的引导
+
+{{ multiple }}
+
+#### 自定义气泡
+
+{{ content }}
+
+## API
+
+### Guide Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+back-button-props | Object | - | 透传 返回按钮 的全部属性,示例:`{ content: '返回', theme: 'default' }`。TS 类型:`ButtonProps` | N
+counter | String / Function | - | 用于自定义渲染计数部分。TS 类型:`string \| ((params: { total: number; current: number }) => string)` | N
+current | Number | - | 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景。支持语法糖 `v-model:current` | N
+default-current | Number | - | 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景。非受控属性 | N
+finish-button-props | Object | - | 透传 完成按钮 的全部属性,示例:`{ content: '完成', theme: 'primary' }`。TS 类型:`ButtonProps` | N
+hide-back | Boolean | false | 是否隐藏返回按钮 | N
+hide-counter | Boolean | false | 是否隐藏计数 | N
+hide-skip | Boolean | false | 是否隐藏跳过按钮 | N
+highlight-padding | Number | 16 | 高亮框的内边距,单位rpx | N
+mode | String | popover | 引导框的类型。可选项:popover/dialog | N
+next-button-props | Object | - | 透传 下一步按钮 的全部属性,示例:{ content: '下一步', theme: 'primary' }。TS 类型:`ButtonProps`,[Button API Documents](./button?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/guide/type.ts) | N
+show-overlay | Boolean | true | 是否出现遮罩层 | N
+skip-button-props | Object | - | 透传 跳过按钮 的全部属性,{ content: '跳过', theme: 'default' }。TS 类型:`ButtonProps` | N
+steps | Array | - | 用于定义每个步骤的内容,包括高亮的节点、相对位置和具体的文案内容等。TS 类型:`Array` | N
+using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
+z-index | Number | 999999 | 提示框的层级 | N
+
+### Guide Events
+
+名称 | 参数 | 描述
+-- | -- | --
+back | `(context: { e: MouseEvent, current: number, total: number })` | 点击返回按钮时触发
+change | `(current: number, context?: { e: MouseEvent, total: number })` | 当前步骤发生变化时触发
+finish | `(context: { e: MouseEvent, current: number, total: number })` | 点击完成按钮时触发
+next-step-click | `(context: { e: MouseEvent, next: number, current: number, total: number })` | 点击下一步时触发
+skip | `(context: { e: MouseEvent, current: number, total: number })` | 点击跳过按钮时触发
+
+### Guide External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-back | 返回按钮样式类
+t-class-body | 高亮框提示内容主体样式类
+t-class-finish | 结束按钮样式类
+t-class-footer | 高亮框底部操作区域样式类
+t-class-next | 下一步按钮样式类
+t-class-popover | 引导框样式类
+t-class-reference | 高亮框样式类
+t-class-skip | 跳过按钮样式类
+t-class-title | 高亮框提示内容标题样式类
+t-class-tooltip | 高亮框提示内容区域样式类
+
+### GuideStep
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+back-button-props | Object | - | 用于自定义当前引导框的返回按钮的内容。TS 类型:`ButtonProps` | N
+body | String | - | 当前步骤提示框的内容,支持插槽:slot="body-{{index}}" (1、当要显示body-{{index}}插槽时,请将body设置为空;2、当要显示content-{{index}}插槽完全自定义内容时,请将body和title都设置为空) | N
+element | Function | - | 必需。高亮的节点。示例: `() => new Promise((resolve) => this.createSelectorQuery().select('#tdesign').boundingClientRect((rect) => resolve(rect)).exec())`。TS 类型:`StepElement` `type StepElement = () => Promise`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/guide/type.ts) | Y
+finish-button-props | Object | - | 透传 完成 的全部属性,示例:`{ content: '完成', theme: 'primary' }`。TS 类型:`ButtonProps` | N
+highlight-padding | Number | - | 高亮框的内边距,单位rpx | N
+mode | String | - | 引导框的类型。可选项:popover/dialog | N
+next-button-props | Object | - | 用于自定义当前引导框的下一步按钮的内容。TS 类型:`ButtonProps` | N
+offset | Array | - | 相对于 placement 的偏移量[left, top],默认单位rpx,示例:[-10, 20] 或 ['10px', '8px'] 或 ['20rpx', '16rpx'] (仅当 `mode` 为 `popover` 时生效)。TS 类型:`Array` | N
+placement | String | 'top' | 引导框相对于高亮元素出现的位置,(仅当 `mode` 为 `popover` 时生效)。TS 类型:`StepPopoverPlacement ` `type StepPopoverPlacement = 'top'\|'left'\|'right'\|'bottom'\|'top-left'\|'top-right'\|'bottom-left'\|'bottom-right'\|'left-top'\|'left-bottom'\|'right-top'\|'right-bottom'\|'center'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/guide/type.ts) | N
+show-overlay | Boolean | true | 是否出现遮罩层 | N
+skip-button-props | Object | - | 用于自定义当前步骤引导框的跳过按钮的内容。TS 类型:`ButtonProps` | N
+title | String | - | 当前步骤的标题内容,支持插槽:slot="title-{{index}}" (1、当要显示body-{{index}}插槽时,请将title设置为空;2、当要显示content-{{index}}插槽完全自定义内容时,请将body和title都设置为空) | N
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-guide-body-color | @text-color-secondary | -
+--td-guide-dialog-body-font | @font-body-large | -
+--td-guide-dialog-body-margin-top | 16rpx | -
+--td-guide-dialog-body-text-align | center | -
+--td-guide-dialog-border-radius | @radius-extraLarge | -
+--td-guide-dialog-footer-button-padding | 0 @spacer-3 | -
+--td-guide-dialog-padding | @spacer-3 0 | -
+--td-guide-dialog-title-font | @font-title-large | -
+--td-guide-dialog-title-text-align | center | -
+--td-guide-dialog-width | 622rpx | -
+--td-guide-footer-button-space | @spacer-1 | -
+--td-guide-footer-margin-top | @spacer-3 | -
+--td-guide-footer-text-align | right | -
+--td-guide-popover-bg-color | @bg-color-container | -
+--td-guide-popover-body-font | @font-body-medium | -
+--td-guide-popover-body-margin-top | 8rpx | -
+--td-guide-popover-body-text-align | left | -
+--td-guide-popover-border | 2rpx solid @component-border | -
+--td-guide-popover-border-radius | @radius-large | -
+--td-guide-popover-max-width | 540rpx | -
+--td-guide-popover-min-width | 480rpx | -
+--td-guide-popover-padding | @spacer-2 | -
+--td-guide-popover-shadow | @shadow-3 | -
+--td-guide-popover-title-font | @font-title-medium | -
+--td-guide-popover-title-text-align | left | -
+--td-guide-reference-border | 4rpx solid @brand-color | -
+--td-guide-reference-border-radius | @radius-default | -
+--td-guide-reference-mask-color | @font-gray-2 | -
+--td-guide-title-color | @text-color-primary | -
diff --git a/uni_modules/tdesign-uniapp/components/guide/content.vue b/uni_modules/tdesign-uniapp/components/guide/content.vue
new file mode 100644
index 0000000..7f607a6
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/guide/content.vue
@@ -0,0 +1,325 @@
+
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+ {{ body }}
+
+
+
+
+
+ onTplButtonTap(e, { type: skipButton.type })"
+ @getuserinfo="(e) => onTplButtonTap(e, { type: skipButton.type })"
+ @contact="(e) => onTplButtonTap(e, { type: skipButton.type })"
+ @getphonenumber="(e) => onTplButtonTap(e, { type: skipButton.type })"
+ @error="(e) => onTplButtonTap(e, { type: skipButton.type })"
+ @opensetting="(e) => onTplButtonTap(e, { type: skipButton.type })"
+ @launchapp="(e) => onTplButtonTap(e, { type: skipButton.type })"
+ @agreeprivacyauthorization="(e) => onTplButtonTap(e, { type: skipButton.type })"
+ />
+
+
+ onTplButtonTap(e, { type: backButton.type })"
+ @getuserinfo="(e) => onTplButtonTap(e, { type: backButton.type })"
+ @contact="(e) => onTplButtonTap(e, { type: backButton.type })"
+ @getphonenumber="(e) => onTplButtonTap(e, { type: backButton.type })"
+ @error="(e) => onTplButtonTap(e, { type: backButton.type })"
+ @opensetting="(e) => onTplButtonTap(e, { type: backButton.type })"
+ @launchapp="(e) => onTplButtonTap(e, { type: backButton.type })"
+ @agreeprivacyauthorization="(e) => onTplButtonTap(e, { type: backButton.type })"
+ />
+
+
+ onTplButtonTap(e, { type: nextButton.type })"
+ @getuserinfo="(e) => onTplButtonTap(e, { type: nextButton.type })"
+ @contact="(e) => onTplButtonTap(e, { type: nextButton.type })"
+ @getphonenumber="(e) => onTplButtonTap(e, { type: nextButton.type })"
+ @error="(e) => onTplButtonTap(e, { type: nextButton.type })"
+ @opensetting="(e) => onTplButtonTap(e, { type: nextButton.type })"
+ @launchapp="(e) => onTplButtonTap(e, { type: nextButton.type })"
+ @agreeprivacyauthorization="(e) => onTplButtonTap(e, { type: nextButton.type })"
+ />
+
+
+ onTplButtonTap(e, { type: finishButton.type })"
+ @getuserinfo="(e) => onTplButtonTap(e, { type: finishButton.type })"
+ @contact="(e) => onTplButtonTap(e, { type: finishButton.type })"
+ @getphonenumber="(e) => onTplButtonTap(e, { type: finishButton.type })"
+ @error="(e) => onTplButtonTap(e, { type: finishButton.type })"
+ @opensetting="(e) => onTplButtonTap(e, { type: finishButton.type })"
+ @launchapp="(e) => onTplButtonTap(e, { type: finishButton.type })"
+ @agreeprivacyauthorization="(e) => onTplButtonTap(e, { type: finishButton.type })"
+ />
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/guide/guide.css b/uni_modules/tdesign-uniapp/components/guide/guide.css
new file mode 100644
index 0000000..8705530
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/guide/guide.css
@@ -0,0 +1,64 @@
+.t-guide__reference {
+ position: absolute;
+ box-shadow: 0 0 0 0 var(--td-guide-reference-mask-color, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))), var(--td-guide-reference-mask-color, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))) 0 0 0 5000px;
+ border-radius: var(--td-guide-reference-border-radius, var(--td-radius-default, 12rpx));
+ transition: all var(--td-anim-duration-base, 0.2s) var(--td-anim-time-fn-ease-out, cubic-bezier(0, 0, 0.15, 1));
+}
+.t-guide__reference--nonoverlay {
+ box-shadow: none;
+ border: var(--td-guide-reference-border, 4rpx solid var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-guide__container {
+ display: inline-block;
+}
+.t-guide__container--popover {
+ background-color: var(--td-guide-popover-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ border: var(--td-guide-popover-border, 2rpx solid var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+ border-radius: var(--td-guide-popover-border-radius, var(--td-radius-large, 18rpx));
+ box-shadow: var(--td-guide-popover-shadow, var(--td-shadow-3, 0 6px 30px 5px rgba(0, 0, 0, 0.05), 0 16px 24px 2px rgba(0, 0, 0, 0.04), 0 8px 10px -5px rgba(0, 0, 0, 0.08)));
+ padding: var(--td-guide-popover-padding, var(--td-spacer-2, 32rpx));
+ min-width: var(--td-guide-popover-min-width, 480rpx);
+ max-width: var(--td-guide-popover-max-width, 540rpx);
+}
+.t-guide__container--dialog {
+ background-color: var(--td-guide-popover-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ border-radius: var(--td-guide-dialog-border-radius, var(--td-radius-extraLarge, 24rpx));
+ padding: var(--td-guide-dialog-padding, var(--td-spacer-3, 48rpx) 0);
+ width: var(--td-guide-dialog-width, 622rpx);
+}
+.t-guide__title--popover {
+ text-align: var(--td-guide-popover-title-text-align, left);
+ color: var(--td-guide-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font: var(--td-guide-popover-title-font, var(--td-font-title-medium, 600 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-guide__title--dialog {
+ text-align: var(--td-guide-dialog-title-text-align, center);
+ color: var(--td-guide-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font: var(--td-guide-dialog-title-font, var(--td-font-title-large, 600 36rpx / 52rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-guide__body--popover {
+ margin-top: var(--td-guide-popover-body-margin-top, 8rpx);
+ text-align: var(--td-guide-popover-body-text-align, left);
+ color: var(--td-guide-body-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
+ font: var(--td-guide-popover-body-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-guide__body--dialog {
+ margin-top: var(--td-guide-dialog-body-margin-top, 16rpx);
+ text-align: var(--td-guide-dialog-body-text-align, center);
+ color: var(--td-guide-body-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
+ font: var(--td-guide-dialog-body-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-guide__footer {
+ text-align: var(--td-guide-footer-text-align, right);
+ margin-top: var(--td-guide-footer-margin-top, var(--td-spacer-3, 48rpx));
+}
+.t-guide__footer :deep(.t-guide__button + .t-guide__button) {
+ margin-left: var(--td-guide-footer-button-space, var(--td-spacer-1, 24rpx));
+}
+.t-guide__footer--dialog {
+ display: flex;
+ padding: var(--td-guide-dialog-footer-button-padding, 0 var(--td-spacer-3, 48rpx));
+}
+.t-guide__footer--dialog :deep(.t-guide__button:last-child) {
+ flex-grow: 1;
+}
diff --git a/uni_modules/tdesign-uniapp/components/guide/guide.vue b/uni_modules/tdesign-uniapp/components/guide/guide.vue
new file mode 100644
index 0000000..499e2a3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/guide/guide.vue
@@ -0,0 +1,544 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/guide/props.ts b/uni_modules/tdesign-uniapp/components/guide/props.ts
new file mode 100644
index 0000000..6006d48
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/guide/props.ts
@@ -0,0 +1,98 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdGuideProps } from './type';
+export default {
+ /** 透传 返回按钮 的全部属性,示例:`{ content: '返回', theme: 'default' }` */
+ backButtonProps: {
+ type: Object,
+ },
+ /** 用于自定义渲染计数部分 */
+ counter: {
+ type: [String, Function],
+ },
+ /** 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景 */
+ current: {
+ type: Number,
+ },
+ /** 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景,非受控属性 */
+ defaultCurrent: {
+ type: Number,
+ },
+ /** 透传 完成按钮 的全部属性,示例:`{ content: '完成', theme: 'primary' }` */
+ finishButtonProps: {
+ type: Object,
+ },
+ /** 是否隐藏返回按钮 */
+ hideBack: Boolean,
+ /** 是否隐藏计数 */
+ hideCounter: Boolean,
+ /** 是否隐藏跳过按钮 */
+ hideSkip: Boolean,
+ /** 高亮框的内边距,单位rpx */
+ highlightPadding: {
+ type: Number,
+ default: 16,
+ },
+ /** 引导框的类型 */
+ mode: {
+ type: String,
+ default: 'popover' as TdGuideProps['mode'],
+ validator(val: TdGuideProps['mode']): boolean {
+ if (!val) return true;
+ return ['popover', 'dialog'].includes(val);
+ },
+ },
+ /** 透传 下一步按钮 的全部属性,示例:{ content: '下一步', theme: 'primary' } */
+ nextButtonProps: {
+ type: Object,
+ },
+ /** 是否出现遮罩层 */
+ showOverlay: {
+ type: Boolean,
+ default: true,
+ },
+ /** 透传 跳过按钮 的全部属性,{ content: '跳过', theme: 'default' } */
+ skipButtonProps: {
+ type: Object,
+ },
+ /** 用于定义每个步骤的内容,包括高亮的节点、相对位置和具体的文案内容等 */
+ steps: {
+ type: Array,
+ },
+ /** 是否使用了自定义导航栏 */
+ usingCustomNavbar: Boolean,
+ /** 提示框的层级 */
+ zIndex: {
+ type: Number,
+ default: 999999,
+ },
+ /** 点击返回按钮时触发 */
+ onBack: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 当前步骤发生变化时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击完成按钮时触发 */
+ onFinish: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击下一步时触发 */
+ onNextStepClick: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击跳过按钮时触发 */
+ onSkip: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/guide/type.ts b/uni_modules/tdesign-uniapp/components/guide/type.ts
new file mode 100644
index 0000000..78a5217
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/guide/type.ts
@@ -0,0 +1,174 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdButtonProps as ButtonProps } from '../button/type';
+
+export interface TdGuideProps {
+ /**
+ * 透传 返回按钮 的全部属性,示例:`{ content: '返回', theme: 'default' }`
+ */
+ backButtonProps?: ButtonProps;
+ /**
+ * 用于自定义渲染计数部分
+ */
+ counter?: string | ((params: { total: number; current: number }) => string);
+ /**
+ * 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景
+ */
+ current?: number;
+ /**
+ * 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景,非受控属性
+ */
+ defaultCurrent?: number;
+ /**
+ * 透传 完成按钮 的全部属性,示例:`{ content: '完成', theme: 'primary' }`
+ */
+ finishButtonProps?: ButtonProps;
+ /**
+ * 是否隐藏返回按钮
+ * @default false
+ */
+ hideBack?: boolean;
+ /**
+ * 是否隐藏计数
+ * @default false
+ */
+ hideCounter?: boolean;
+ /**
+ * 是否隐藏跳过按钮
+ * @default false
+ */
+ hideSkip?: boolean;
+ /**
+ * 高亮框的内边距,单位rpx
+ * @default 16
+ */
+ highlightPadding?: number;
+ /**
+ * 引导框的类型
+ * @default popover
+ */
+ mode?: 'popover' | 'dialog';
+ /**
+ * 透传 下一步按钮 的全部属性,示例:{ content: '下一步', theme: 'primary' }
+ */
+ nextButtonProps?: ButtonProps;
+ /**
+ * 是否出现遮罩层
+ * @default true
+ */
+ showOverlay?: boolean;
+ /**
+ * 透传 跳过按钮 的全部属性,{ content: '跳过', theme: 'default' }
+ */
+ skipButtonProps?: ButtonProps;
+ /**
+ * 用于定义每个步骤的内容,包括高亮的节点、相对位置和具体的文案内容等
+ */
+ steps?: Array;
+ /**
+ * 是否使用了自定义导航栏
+ * @default false
+ */
+ usingCustomNavbar?: boolean;
+ /**
+ * 提示框的层级
+ * @default 999999
+ */
+ zIndex?: number;
+ /**
+ * 点击返回按钮时触发
+ */
+ onBack?: (context: { e: MouseEvent; current: number; total: number }) => void;
+ /**
+ * 当前步骤发生变化时触发
+ */
+ onChange?: (current: number, context?: { e: MouseEvent; total: number }) => void;
+ /**
+ * 点击完成按钮时触发
+ */
+ onFinish?: (context: { e: MouseEvent; current: number; total: number }) => void;
+ /**
+ * 点击下一步时触发
+ */
+ onNextStepClick?: (context: { e: MouseEvent; next: number; current: number; total: number }) => void;
+ /**
+ * 点击跳过按钮时触发
+ */
+ onSkip?: (context: { e: MouseEvent; current: number; total: number }) => void;
+}
+
+export interface GuideStep {
+ /**
+ * 用于自定义当前引导框的返回按钮的内容
+ */
+ backButtonProps?: ButtonProps;
+ /**
+ * 当前步骤提示框的内容,支持插槽:slot="body-{{index}}" (1、当要显示body-{{index}}插槽时,请将body设置为空;2、当要显示content-{{index}}插槽完全自定义内容时,请将body和title都设置为空)
+ * @default ''
+ */
+ body?: string;
+ /**
+ * 高亮的节点。示例: `() => new Promise((resolve) => this.createSelectorQuery().select('#tdesign').boundingClientRect((rect) => resolve(rect)).exec())`
+ */
+ element: StepElement;
+ /**
+ * 透传 完成 的全部属性,示例:`{ content: '完成', theme: 'primary' }`
+ */
+ finishButtonProps?: ButtonProps;
+ /**
+ * 高亮框的内边距,单位rpx
+ */
+ highlightPadding?: number;
+ /**
+ * 引导框的类型
+ */
+ mode?: 'popover' | 'dialog';
+ /**
+ * 用于自定义当前引导框的下一步按钮的内容
+ */
+ nextButtonProps?: ButtonProps;
+ /**
+ * 相对于 placement 的偏移量[left, top],默认单位rpx,示例:[-10, 20] 或 ['10px', '8px'] 或 ['20rpx', '16rpx'] (仅当 `mode` 为 `popover` 时生效)
+ */
+ offset?: Array;
+ /**
+ * 引导框相对于高亮元素出现的位置,(仅当 `mode` 为 `popover` 时生效)
+ * @default 'top'
+ */
+ placement?: StepPopoverPlacement;
+ /**
+ * 是否出现遮罩层
+ * @default true
+ */
+ showOverlay?: boolean;
+ /**
+ * 用于自定义当前步骤引导框的跳过按钮的内容
+ */
+ skipButtonProps?: ButtonProps;
+ /**
+ * 当前步骤的标题内容,支持插槽:slot="title-{{index}}" (1、当要显示body-{{index}}插槽时,请将title设置为空;2、当要显示content-{{index}}插槽完全自定义内容时,请将body和title都设置为空)
+ * @default ''
+ */
+ title?: string;
+}
+
+export type StepElement = () => any;
+
+export type StepPopoverPlacement =
+ | 'top'
+ | 'left'
+ | 'right'
+ | 'bottom'
+ | 'top-left'
+ | 'top-right'
+ | 'bottom-left'
+ | 'bottom-right'
+ | 'left-top'
+ | 'left-bottom'
+ | 'right-top'
+ | 'right-bottom'
+ | 'center';
diff --git a/uni_modules/tdesign-uniapp/components/icon/README.en-US.md b/uni_modules/tdesign-uniapp/components/icon/README.en-US.md
new file mode 100644
index 0000000..d849416
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/icon/README.en-US.md
@@ -0,0 +1,32 @@
+:: BASE_DOC ::
+
+## API
+
+### Icon Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+color | String | - | \- | N
+name | String | - | required | Y
+prefix | String | - | \- | N
+size | String / Number | '' | \- | N
+
+### Icon Events
+
+name | params | description
+-- | -- | --
+click | \- | \-
+
+### Icon External Classes
+
+className | Description
+-- | --
+t-class | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+ant: norma | ant: norma | -
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/icon/README.md b/uni_modules/tdesign-uniapp/components/icon/README.md
new file mode 100644
index 0000000..a1932c8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/icon/README.md
@@ -0,0 +1,109 @@
+---
+title: Icon 图标
+description: 图标。
+spline: base
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TIcon from '@tdesign/uniapp/icon/icon.vue';
+```
+
+## 常见问题
+
+
+
+ 控制台告警:Failed to load font
+ 👇
+
+
+ 告警属于开发者工具的 bug,可以忽略,具体可以看 官网文档
+
+
+
+
+### 基础组件图标
+
+{{ base }}
+
+### 自定义组件图标
+
+{{ custom }}
+
+自定义图标用法,下面以 `iconfont` 为例
+
+#### 准备图标文件
+
+文件后缀应为`.wxss`,如下方代码块所示:
+
+```css
+@font-face {
+ font-family: 'icon'; // 使用自定义的字体名称
+ ···
+}
+
+.icon {
+ font-family: 'icon' !important; // 字体名称
+ ···
+}
+
+.icon-a-0:before { // icon 图标。注意 FontClass 前缀与 font-family 保持一致
+ content: '\e64d';
+}
+```
+- 添加所需图标,下载图标。图标库一般会提供 **在线链接** 或者 **下载至本地** 等使用方式。**在线链接** 方式会指向一个 `.css` 文件,可以下载或复制其内容,将其修改成后缀名为 `.wxss` 的文件
+- 将 `.wxss` 文件中的 `FontClass/Symbol前缀` 与 `Font Family` 两项内容保持一致,如: `FontClass/Symbol` 前缀为 `icon-`,则 `Font Family` 为 `icon`。
+
+> 注:若是采用 `下载至本地` 方式,需关注 `.css` 和 `.ttf` 文件。由于微信小程序不支持处理 `ttf、woff、eot` 等文件,但支持 `base64`,所以需要将 `.ttf` 文件转换为 `base64` (可借助转换工具,如 [transfonter.org](https://transfonter.org/),会得到一个 `stylesheet.css` 文件),然后将 `.css` 文件中的 `@font-face {}` 内容替换为 `stylesheet.css` 中的 `base64` 内容,最后将 `.css` 文件修改后缀为 `.wxss`
+
+#### 引入自定义图标
+
+- 全局引入:在项目 `app.wxss`,使用 `@import` 引入上述的 `.wxss` 文件
+- 局部引入:在 `page` 对应的 `.wxss` 中,使用 `@import` 引入上述的 `.wxss` 文件
+
+#### 自定义图标的使用
+
+ `` 组件中的 `prefix` 属性值与前面设置的 `Font Family` 保持一致,即 `prefix="icon"`,`name` 属性值为自定义图标名称,如图标的 `className` 为 `icon-a-1h`,则 `name="a-1h"`。
+
+### 图片链接
+
+{{ iconImage }}
+
+
+
+## API
+
+### Icon Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+color | String | - | 图标颜色 | N
+name | String | - | 必需。图标名称或图片链接 | Y
+prefix | String | - | 自定义图标前缀 | N
+size | String / Number | '' | 图标大小, 如 `20`, `20px`, `48rpx`, 默认单位是 `px` | N
+
+### Icon Events
+
+名称 | 参数 | 描述
+-- | -- | --
+click | \- | 点击图标时触发
+
+### Icon External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+| 名称 | 默认值 | 描述 |
+| -- | -- | -- |
+| ant: norma | ant: norma | - |
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/icon/icon.css b/uni_modules/tdesign-uniapp/components/icon/icon.css
new file mode 100644
index 0000000..3615545
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/icon/icon.css
@@ -0,0 +1,7073 @@
+@font-face {
+ font-family: t;
+ src: url('https://tdesign.gtimg.com/icon/0.4.1/fonts/t.eot'), url('https://tdesign.gtimg.com/icon/0.4.1/fonts/t.eot?#iefix') format('ded-opentype'), url('https://tdesign.gtimg.com/icon/0.4.1/fonts/t.woff') format('woff'), url('https://tdesign.gtimg.com/icon/0.4.1/fonts/t.ttf') format('truetype'), url('https://tdesign.gtimg.com/icon/0.4.1/fonts/t.svg') format('svg');
+ /* iOS 4.1- */
+ font-weight: normal;
+ font-style: normal;
+}
+.t-icon--image {
+ width: 100%;
+ height: 100%;
+}
+.t-icon__image {
+ vertical-align: top;
+ width: 100%;
+ height: 100%;
+}
+.t-icon-base {
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ text-transform: none;
+ line-height: 1;
+ text-align: center;
+ display: block;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+.t-icon {
+ /* stylelint-disable-next-line declaration-no-important */
+ font-family: t !important;
+ /* prevent issues with browser extensions that change fonts */
+}
+.t-icon-ability-open:before {
+ content: '\E001';
+}
+.t-icon-abstract-filled:before {
+ content: '\E002';
+}
+.t-icon-abstract:before {
+ content: '\E003';
+}
+.t-icon-accessibility-filled:before {
+ content: '\E004';
+}
+.t-icon-accessibility:before {
+ content: '\E005';
+}
+.t-icon-activity-filled:before {
+ content: '\E006';
+}
+.t-icon-activity:before {
+ content: '\E007';
+}
+.t-icon-add-and-subtract:before {
+ content: '\E008';
+}
+.t-icon-add-circle-filled:before {
+ content: '\E009';
+}
+.t-icon-add-circle:before {
+ content: '\E00A';
+}
+.t-icon-add-rectangle-filled:before {
+ content: '\E00B';
+}
+.t-icon-add-rectangle:before {
+ content: '\E00C';
+}
+.t-icon-add:before {
+ content: '\E00D';
+}
+.t-icon-address-book-filled:before {
+ content: '\E00E';
+}
+.t-icon-address-book:before {
+ content: '\E00F';
+}
+.t-icon-adjustment-filled:before {
+ content: '\E010';
+}
+.t-icon-adjustment:before {
+ content: '\E011';
+}
+.t-icon-ai-1-filled:before {
+ content: '\E012';
+}
+.t-icon-ai-1:before {
+ content: '\E013';
+}
+.t-icon-ai-article-filled:before {
+ content: '\E014';
+}
+.t-icon-ai-article:before {
+ content: '\E015';
+}
+.t-icon-ai-book-open-filled:before {
+ content: '\E016';
+}
+.t-icon-ai-book-open:before {
+ content: '\E017';
+}
+.t-icon-ai-chart-bar-filled:before {
+ content: '\E018';
+}
+.t-icon-ai-chart-bar:before {
+ content: '\E019';
+}
+.t-icon-ai-coordinate-system-filled:before {
+ content: '\E01A';
+}
+.t-icon-ai-coordinate-system:before {
+ content: '\E01B';
+}
+.t-icon-ai-cut:before {
+ content: '\E01C';
+}
+.t-icon-ai-edit-1-filled:before {
+ content: '\E01D';
+}
+.t-icon-ai-edit-1:before {
+ content: '\E01E';
+}
+.t-icon-ai-edit-filled:before {
+ content: '\E01F';
+}
+.t-icon-ai-edit:before {
+ content: '\E020';
+}
+.t-icon-ai-education-filled:before {
+ content: '\E021';
+}
+.t-icon-ai-education:before {
+ content: '\E022';
+}
+.t-icon-ai-git-branch-filled:before {
+ content: '\E023';
+}
+.t-icon-ai-git-branch:before {
+ content: '\E024';
+}
+.t-icon-ai-image-1-filled:before {
+ content: '\E025';
+}
+.t-icon-ai-image-1:before {
+ content: '\E026';
+}
+.t-icon-ai-image-filled:before {
+ content: '\E027';
+}
+.t-icon-ai-image:before {
+ content: '\E028';
+}
+.t-icon-ai-layout-filled:before {
+ content: '\E029';
+}
+.t-icon-ai-layout:before {
+ content: '\E02A';
+}
+.t-icon-ai-music-filled:before {
+ content: '\E02B';
+}
+.t-icon-ai-music:before {
+ content: '\E02C';
+}
+.t-icon-ai-screenshot:before {
+ content: '\E02D';
+}
+.t-icon-ai-search-filled:before {
+ content: '\E02E';
+}
+.t-icon-ai-search:before {
+ content: '\E02F';
+}
+.t-icon-ai-terminal-1-filled:before {
+ content: '\E030';
+}
+.t-icon-ai-terminal-1:before {
+ content: '\E031';
+}
+.t-icon-ai-terminal-filled:before {
+ content: '\E032';
+}
+.t-icon-ai-terminal:before {
+ content: '\E033';
+}
+.t-icon-ai-textformat-italic:before {
+ content: '\E034';
+}
+.t-icon-ai-tool-filled:before {
+ content: '\E035';
+}
+.t-icon-ai-tool:before {
+ content: '\E036';
+}
+.t-icon-ai-video-filled:before {
+ content: '\E037';
+}
+.t-icon-ai-video:before {
+ content: '\E038';
+}
+.t-icon-ai:before {
+ content: '\E039';
+}
+.t-icon-airplay-wave-filled:before {
+ content: '\E03A';
+}
+.t-icon-airplay-wave:before {
+ content: '\E03B';
+}
+.t-icon-alarm-add-filled:before {
+ content: '\E03C';
+}
+.t-icon-alarm-add:before {
+ content: '\E03D';
+}
+.t-icon-alarm-filled:before {
+ content: '\E03E';
+}
+.t-icon-alarm-off-filled:before {
+ content: '\E03F';
+}
+.t-icon-alarm-off:before {
+ content: '\E040';
+}
+.t-icon-alarm:before {
+ content: '\E041';
+}
+.t-icon-align-bottom:before {
+ content: '\E042';
+}
+.t-icon-align-top:before {
+ content: '\E043';
+}
+.t-icon-align-vertical:before {
+ content: '\E044';
+}
+.t-icon-alpha:before {
+ content: '\E045';
+}
+.t-icon-analytics-filled:before {
+ content: '\E046';
+}
+.t-icon-analytics:before {
+ content: '\E047';
+}
+.t-icon-anchor:before {
+ content: '\E048';
+}
+.t-icon-angry-filled:before {
+ content: '\E049';
+}
+.t-icon-angry:before {
+ content: '\E04A';
+}
+.t-icon-animation-1-filled:before {
+ content: '\E04B';
+}
+.t-icon-animation-1:before {
+ content: '\E04C';
+}
+.t-icon-animation-filled:before {
+ content: '\E04D';
+}
+.t-icon-animation:before {
+ content: '\E04E';
+}
+.t-icon-anticlockwise-filled:before {
+ content: '\E04F';
+}
+.t-icon-anticlockwise:before {
+ content: '\E050';
+}
+.t-icon-api:before {
+ content: '\E051';
+}
+.t-icon-app-filled:before {
+ content: '\E052';
+}
+.t-icon-app:before {
+ content: '\E053';
+}
+.t-icon-apple-filled:before {
+ content: '\E054';
+}
+.t-icon-apple:before {
+ content: '\E055';
+}
+.t-icon-application-filled:before {
+ content: '\E056';
+}
+.t-icon-application:before {
+ content: '\E057';
+}
+.t-icon-architecture-hui-style-filled:before {
+ content: '\E058';
+}
+.t-icon-architecture-hui-style:before {
+ content: '\E059';
+}
+.t-icon-archway-1-filled:before {
+ content: '\E05A';
+}
+.t-icon-archway-1:before {
+ content: '\E05B';
+}
+.t-icon-archway-filled:before {
+ content: '\E05C';
+}
+.t-icon-archway:before {
+ content: '\E05D';
+}
+.t-icon-arrow-down-circle-filled:before {
+ content: '\E05E';
+}
+.t-icon-arrow-down-circle:before {
+ content: '\E05F';
+}
+.t-icon-arrow-down-rectangle-filled:before {
+ content: '\E060';
+}
+.t-icon-arrow-down-rectangle:before {
+ content: '\E061';
+}
+.t-icon-arrow-down:before {
+ content: '\E062';
+}
+.t-icon-arrow-left-circle-filled:before {
+ content: '\E063';
+}
+.t-icon-arrow-left-circle:before {
+ content: '\E064';
+}
+.t-icon-arrow-left-down-circle-filled:before {
+ content: '\E065';
+}
+.t-icon-arrow-left-down-circle:before {
+ content: '\E066';
+}
+.t-icon-arrow-left-down:before {
+ content: '\E067';
+}
+.t-icon-arrow-left-right-1:before {
+ content: '\E068';
+}
+.t-icon-arrow-left-right-2:before {
+ content: '\E069';
+}
+.t-icon-arrow-left-right-3:before {
+ content: '\E06A';
+}
+.t-icon-arrow-left-right-circle-filled:before {
+ content: '\E06B';
+}
+.t-icon-arrow-left-right-circle:before {
+ content: '\E06C';
+}
+.t-icon-arrow-left-up-circle-filled:before {
+ content: '\E06D';
+}
+.t-icon-arrow-left-up-circle:before {
+ content: '\E06E';
+}
+.t-icon-arrow-left-up:before {
+ content: '\E06F';
+}
+.t-icon-arrow-left:before {
+ content: '\E070';
+}
+.t-icon-arrow-right-circle-filled:before {
+ content: '\E071';
+}
+.t-icon-arrow-right-circle:before {
+ content: '\E072';
+}
+.t-icon-arrow-right-down-circle-filled:before {
+ content: '\E073';
+}
+.t-icon-arrow-right-down-circle:before {
+ content: '\E074';
+}
+.t-icon-arrow-right-down:before {
+ content: '\E075';
+}
+.t-icon-arrow-right-up-circle-filled:before {
+ content: '\E076';
+}
+.t-icon-arrow-right-up-circle:before {
+ content: '\E077';
+}
+.t-icon-arrow-right-up:before {
+ content: '\E078';
+}
+.t-icon-arrow-right:before {
+ content: '\E079';
+}
+.t-icon-arrow-triangle-down-filled:before {
+ content: '\E07A';
+}
+.t-icon-arrow-triangle-down:before {
+ content: '\E07B';
+}
+.t-icon-arrow-triangle-up-filled:before {
+ content: '\E07C';
+}
+.t-icon-arrow-triangle-up:before {
+ content: '\E07D';
+}
+.t-icon-arrow-up-circle-filled:before {
+ content: '\E07E';
+}
+.t-icon-arrow-up-circle:before {
+ content: '\E07F';
+}
+.t-icon-arrow-up-down-1:before {
+ content: '\E080';
+}
+.t-icon-arrow-up-down-2:before {
+ content: '\E081';
+}
+.t-icon-arrow-up-down-3:before {
+ content: '\E082';
+}
+.t-icon-arrow-up-down-circle-filled:before {
+ content: '\E083';
+}
+.t-icon-arrow-up-down-circle:before {
+ content: '\E084';
+}
+.t-icon-arrow-up:before {
+ content: '\E085';
+}
+.t-icon-artboard:before {
+ content: '\E086';
+}
+.t-icon-article-filled:before {
+ content: '\E087';
+}
+.t-icon-article:before {
+ content: '\E088';
+}
+.t-icon-assignment-checked-filled:before {
+ content: '\E089';
+}
+.t-icon-assignment-checked:before {
+ content: '\E08A';
+}
+.t-icon-assignment-code-filled:before {
+ content: '\E08B';
+}
+.t-icon-assignment-code:before {
+ content: '\E08C';
+}
+.t-icon-assignment-error-filled:before {
+ content: '\E08D';
+}
+.t-icon-assignment-error:before {
+ content: '\E08E';
+}
+.t-icon-assignment-filled:before {
+ content: '\E08F';
+}
+.t-icon-assignment-user-filled:before {
+ content: '\E090';
+}
+.t-icon-assignment-user:before {
+ content: '\E091';
+}
+.t-icon-assignment:before {
+ content: '\E092';
+}
+.t-icon-attach:before {
+ content: '\E093';
+}
+.t-icon-attachment-list:before {
+ content: '\E094';
+}
+.t-icon-attic-1-filled:before {
+ content: '\E095';
+}
+.t-icon-attic-1:before {
+ content: '\E096';
+}
+.t-icon-attic-filled:before {
+ content: '\E097';
+}
+.t-icon-attic:before {
+ content: '\E098';
+}
+.t-icon-audio-filled:before {
+ content: '\E099';
+}
+.t-icon-audio:before {
+ content: '\E09A';
+}
+.t-icon-automatic-numbering:before {
+ content: '\E09B';
+}
+.t-icon-automation-filled:before {
+ content: '\E09C';
+}
+.t-icon-automation:before {
+ content: '\E09D';
+}
+.t-icon-awkward-filled:before {
+ content: '\E09E';
+}
+.t-icon-awkward:before {
+ content: '\E09F';
+}
+.t-icon-backtop-rectangle-filled:before {
+ content: '\E0A0';
+}
+.t-icon-backtop-rectangle:before {
+ content: '\E0A1';
+}
+.t-icon-backtop:before {
+ content: '\E0A2';
+}
+.t-icon-backup-filled:before {
+ content: '\E0A3';
+}
+.t-icon-backup:before {
+ content: '\E0A4';
+}
+.t-icon-backward-filled:before {
+ content: '\E0A5';
+}
+.t-icon-backward:before {
+ content: '\E0A6';
+}
+.t-icon-bad-laugh-filled:before {
+ content: '\E0A7';
+}
+.t-icon-bad-laugh:before {
+ content: '\E0A8';
+}
+.t-icon-bamboo-shoot-filled:before {
+ content: '\E0A9';
+}
+.t-icon-bamboo-shoot:before {
+ content: '\E0AA';
+}
+.t-icon-banana-filled:before {
+ content: '\E0AB';
+}
+.t-icon-banana:before {
+ content: '\E0AC';
+}
+.t-icon-barbecue-filled:before {
+ content: '\E0AD';
+}
+.t-icon-barbecue:before {
+ content: '\E0AE';
+}
+.t-icon-barcode-1:before {
+ content: '\E0AF';
+}
+.t-icon-barcode:before {
+ content: '\E0B0';
+}
+.t-icon-base-station:before {
+ content: '\E0B1';
+}
+.t-icon-battery-add-filled:before {
+ content: '\E0B2';
+}
+.t-icon-battery-add:before {
+ content: '\E0B3';
+}
+.t-icon-battery-charging-filled:before {
+ content: '\E0B4';
+}
+.t-icon-battery-charging:before {
+ content: '\E0B5';
+}
+.t-icon-battery-filled:before {
+ content: '\E0B6';
+}
+.t-icon-battery-low-filled:before {
+ content: '\E0B7';
+}
+.t-icon-battery-low:before {
+ content: '\E0B8';
+}
+.t-icon-battery:before {
+ content: '\E0B9';
+}
+.t-icon-bean-filled:before {
+ content: '\E0BA';
+}
+.t-icon-bean:before {
+ content: '\E0BB';
+}
+.t-icon-beer-filled:before {
+ content: '\E0BC';
+}
+.t-icon-beer:before {
+ content: '\E0BD';
+}
+.t-icon-beta:before {
+ content: '\E0BE';
+}
+.t-icon-bifurcate-filled:before {
+ content: '\E0BF';
+}
+.t-icon-bifurcate:before {
+ content: '\E0C0';
+}
+.t-icon-bill-filled:before {
+ content: '\E0C1';
+}
+.t-icon-bill:before {
+ content: '\E0C2';
+}
+.t-icon-bluetooth:before {
+ content: '\E0C3';
+}
+.t-icon-bone-filled:before {
+ content: '\E0C4';
+}
+.t-icon-bone:before {
+ content: '\E0C5';
+}
+.t-icon-book-filled:before {
+ content: '\E0C6';
+}
+.t-icon-book-open-filled:before {
+ content: '\E0C7';
+}
+.t-icon-book-open:before {
+ content: '\E0C8';
+}
+.t-icon-book-unknown-filled:before {
+ content: '\E0C9';
+}
+.t-icon-book-unknown:before {
+ content: '\E0CA';
+}
+.t-icon-book:before {
+ content: '\E0CB';
+}
+.t-icon-bookmark-add-filled:before {
+ content: '\E0CC';
+}
+.t-icon-bookmark-add:before {
+ content: '\E0CD';
+}
+.t-icon-bookmark-checked-filled:before {
+ content: '\E0CE';
+}
+.t-icon-bookmark-checked:before {
+ content: '\E0CF';
+}
+.t-icon-bookmark-double-filled:before {
+ content: '\E0D0';
+}
+.t-icon-bookmark-double:before {
+ content: '\E0D1';
+}
+.t-icon-bookmark-filled:before {
+ content: '\E0D2';
+}
+.t-icon-bookmark-minus-filled:before {
+ content: '\E0D3';
+}
+.t-icon-bookmark-minus:before {
+ content: '\E0D4';
+}
+.t-icon-bookmark:before {
+ content: '\E0D5';
+}
+.t-icon-braces:before {
+ content: '\E0D6';
+}
+.t-icon-brackets:before {
+ content: '\E0D7';
+}
+.t-icon-bread-filled:before {
+ content: '\E0D8';
+}
+.t-icon-bread:before {
+ content: '\E0D9';
+}
+.t-icon-bridge-1-filled:before {
+ content: '\E0DA';
+}
+.t-icon-bridge-1:before {
+ content: '\E0DB';
+}
+.t-icon-bridge-2-filled:before {
+ content: '\E0DC';
+}
+.t-icon-bridge-2:before {
+ content: '\E0DD';
+}
+.t-icon-bridge-3:before {
+ content: '\E0DE';
+}
+.t-icon-bridge-4:before {
+ content: '\E0DF';
+}
+.t-icon-bridge-5-filled:before {
+ content: '\E0E0';
+}
+.t-icon-bridge-5:before {
+ content: '\E0E1';
+}
+.t-icon-bridge-6-filled:before {
+ content: '\E0E2';
+}
+.t-icon-bridge-6:before {
+ content: '\E0E3';
+}
+.t-icon-bridge:before {
+ content: '\E0E4';
+}
+.t-icon-brightness-1-filled:before {
+ content: '\E0E5';
+}
+.t-icon-brightness-1:before {
+ content: '\E0E6';
+}
+.t-icon-brightness-filled:before {
+ content: '\E0E7';
+}
+.t-icon-brightness:before {
+ content: '\E0E8';
+}
+.t-icon-broccoli-filled:before {
+ content: '\E0E9';
+}
+.t-icon-broccoli:before {
+ content: '\E0EA';
+}
+.t-icon-browse-filled:before {
+ content: '\E0EB';
+}
+.t-icon-browse-gallery-filled:before {
+ content: '\E0EC';
+}
+.t-icon-browse-gallery:before {
+ content: '\E0ED';
+}
+.t-icon-browse-off-filled:before {
+ content: '\E0EE';
+}
+.t-icon-browse-off:before {
+ content: '\E0EF';
+}
+.t-icon-browse:before {
+ content: '\E0F0';
+}
+.t-icon-brush-filled:before {
+ content: '\E0F1';
+}
+.t-icon-brush:before {
+ content: '\E0F2';
+}
+.t-icon-bug-filled:before {
+ content: '\E0F3';
+}
+.t-icon-bug-report-filled:before {
+ content: '\E0F4';
+}
+.t-icon-bug-report:before {
+ content: '\E0F5';
+}
+.t-icon-bug:before {
+ content: '\E0F6';
+}
+.t-icon-building-1-filled:before {
+ content: '\E0F7';
+}
+.t-icon-building-1:before {
+ content: '\E0F8';
+}
+.t-icon-building-2-filled:before {
+ content: '\E0F9';
+}
+.t-icon-building-2:before {
+ content: '\E0FA';
+}
+.t-icon-building-3-filled:before {
+ content: '\E0FB';
+}
+.t-icon-building-3:before {
+ content: '\E0FC';
+}
+.t-icon-building-4-filled:before {
+ content: '\E0FD';
+}
+.t-icon-building-4:before {
+ content: '\E0FE';
+}
+.t-icon-building-5-filled:before {
+ content: '\E0FF';
+}
+.t-icon-building-5:before {
+ content: '\E100';
+}
+.t-icon-building-filled:before {
+ content: '\E101';
+}
+.t-icon-building:before {
+ content: '\E102';
+}
+.t-icon-bulletpoint:before {
+ content: '\E103';
+}
+.t-icon-button-filled:before {
+ content: '\E104';
+}
+.t-icon-button:before {
+ content: '\E105';
+}
+.t-icon-cabbage-filled:before {
+ content: '\E106';
+}
+.t-icon-cabbage:before {
+ content: '\E107';
+}
+.t-icon-cake-filled:before {
+ content: '\E108';
+}
+.t-icon-cake:before {
+ content: '\E109';
+}
+.t-icon-calculation-1-filled:before {
+ content: '\E10A';
+}
+.t-icon-calculation-1:before {
+ content: '\E10B';
+}
+.t-icon-calculation:before {
+ content: '\E10C';
+}
+.t-icon-calculator-1:before {
+ content: '\E10D';
+}
+.t-icon-calculator-filled:before {
+ content: '\E10E';
+}
+.t-icon-calculator:before {
+ content: '\E10F';
+}
+.t-icon-calendar-1-filled:before {
+ content: '\E110';
+}
+.t-icon-calendar-1:before {
+ content: '\E111';
+}
+.t-icon-calendar-2-filled:before {
+ content: '\E112';
+}
+.t-icon-calendar-2:before {
+ content: '\E113';
+}
+.t-icon-calendar-3-filled:before {
+ content: '\E114';
+}
+.t-icon-calendar-3:before {
+ content: '\E115';
+}
+.t-icon-calendar-edit-filled:before {
+ content: '\E116';
+}
+.t-icon-calendar-edit:before {
+ content: '\E117';
+}
+.t-icon-calendar-event-filled:before {
+ content: '\E118';
+}
+.t-icon-calendar-event:before {
+ content: '\E119';
+}
+.t-icon-calendar-filled:before {
+ content: '\E11A';
+}
+.t-icon-calendar:before {
+ content: '\E11B';
+}
+.t-icon-call-1-filled:before {
+ content: '\E11C';
+}
+.t-icon-call-1:before {
+ content: '\E11D';
+}
+.t-icon-call-cancel-filled:before {
+ content: '\E11E';
+}
+.t-icon-call-cancel:before {
+ content: '\E11F';
+}
+.t-icon-call-filled:before {
+ content: '\E120';
+}
+.t-icon-call-forwarded-filled:before {
+ content: '\E121';
+}
+.t-icon-call-forwarded:before {
+ content: '\E122';
+}
+.t-icon-call-incoming-filled:before {
+ content: '\E123';
+}
+.t-icon-call-incoming:before {
+ content: '\E124';
+}
+.t-icon-call-off-filled:before {
+ content: '\E125';
+}
+.t-icon-call-off:before {
+ content: '\E126';
+}
+.t-icon-call:before {
+ content: '\E127';
+}
+.t-icon-calm-1-filled:before {
+ content: '\E128';
+}
+.t-icon-calm-1:before {
+ content: '\E129';
+}
+.t-icon-calm-filled:before {
+ content: '\E12A';
+}
+.t-icon-calm:before {
+ content: '\E12B';
+}
+.t-icon-camera-1-filled:before {
+ content: '\E12C';
+}
+.t-icon-camera-1:before {
+ content: '\E12D';
+}
+.t-icon-camera-2-filled:before {
+ content: '\E12E';
+}
+.t-icon-camera-2:before {
+ content: '\E12F';
+}
+.t-icon-camera-filled:before {
+ content: '\E130';
+}
+.t-icon-camera-off-filled:before {
+ content: '\E131';
+}
+.t-icon-camera-off:before {
+ content: '\E132';
+}
+.t-icon-camera:before {
+ content: '\E133';
+}
+.t-icon-candy-filled:before {
+ content: '\E134';
+}
+.t-icon-candy:before {
+ content: '\E135';
+}
+.t-icon-card-filled:before {
+ content: '\E136';
+}
+.t-icon-card:before {
+ content: '\E137';
+}
+.t-icon-cardmembership-filled:before {
+ content: '\E138';
+}
+.t-icon-cardmembership:before {
+ content: '\E139';
+}
+.t-icon-caret-down-small:before {
+ content: '\E13A';
+}
+.t-icon-caret-down:before {
+ content: '\E13B';
+}
+.t-icon-caret-left-small:before {
+ content: '\E13C';
+}
+.t-icon-caret-left:before {
+ content: '\E13D';
+}
+.t-icon-caret-right-small:before {
+ content: '\E13E';
+}
+.t-icon-caret-right:before {
+ content: '\E13F';
+}
+.t-icon-caret-up-small:before {
+ content: '\E140';
+}
+.t-icon-caret-up:before {
+ content: '\E141';
+}
+.t-icon-cart-add-filled:before {
+ content: '\E142';
+}
+.t-icon-cart-add:before {
+ content: '\E143';
+}
+.t-icon-cart-filled:before {
+ content: '\E144';
+}
+.t-icon-cart:before {
+ content: '\E145';
+}
+.t-icon-cast-filled:before {
+ content: '\E146';
+}
+.t-icon-cast:before {
+ content: '\E147';
+}
+.t-icon-castle-1-filled:before {
+ content: '\E148';
+}
+.t-icon-castle-1:before {
+ content: '\E149';
+}
+.t-icon-castle-2-filled:before {
+ content: '\E14A';
+}
+.t-icon-castle-2:before {
+ content: '\E14B';
+}
+.t-icon-castle-3-filled:before {
+ content: '\E14C';
+}
+.t-icon-castle-3:before {
+ content: '\E14D';
+}
+.t-icon-castle-4-filled:before {
+ content: '\E14E';
+}
+.t-icon-castle-4:before {
+ content: '\E14F';
+}
+.t-icon-castle-5-filled:before {
+ content: '\E150';
+}
+.t-icon-castle-5:before {
+ content: '\E151';
+}
+.t-icon-castle-6-filled:before {
+ content: '\E152';
+}
+.t-icon-castle-6:before {
+ content: '\E153';
+}
+.t-icon-castle-7-filled:before {
+ content: '\E154';
+}
+.t-icon-castle-7:before {
+ content: '\E155';
+}
+.t-icon-castle-filled:before {
+ content: '\E156';
+}
+.t-icon-castle:before {
+ content: '\E157';
+}
+.t-icon-cat-filled:before {
+ content: '\E158';
+}
+.t-icon-cat:before {
+ content: '\E159';
+}
+.t-icon-catalog-1:before {
+ content: '\E15A';
+}
+.t-icon-catalog-filled:before {
+ content: '\E15B';
+}
+.t-icon-catalog:before {
+ content: '\E15C';
+}
+.t-icon-cd-filled:before {
+ content: '\E15D';
+}
+.t-icon-cd:before {
+ content: '\E15E';
+}
+.t-icon-celsius:before {
+ content: '\E15F';
+}
+.t-icon-center-focus-strong-filled:before {
+ content: '\E160';
+}
+.t-icon-center-focus-strong:before {
+ content: '\E161';
+}
+.t-icon-centimeter:before {
+ content: '\E162';
+}
+.t-icon-certificate-1-filled:before {
+ content: '\E163';
+}
+.t-icon-certificate-1:before {
+ content: '\E164';
+}
+.t-icon-certificate-filled:before {
+ content: '\E165';
+}
+.t-icon-certificate:before {
+ content: '\E166';
+}
+.t-icon-chart-3d-filled:before {
+ content: '\E167';
+}
+.t-icon-chart-3d:before {
+ content: '\E168';
+}
+.t-icon-chart-add-filled:before {
+ content: '\E169';
+}
+.t-icon-chart-add:before {
+ content: '\E16A';
+}
+.t-icon-chart-analytics:before {
+ content: '\E16B';
+}
+.t-icon-chart-area-filled:before {
+ content: '\E16C';
+}
+.t-icon-chart-area-multi-filled:before {
+ content: '\E16D';
+}
+.t-icon-chart-area-multi:before {
+ content: '\E16E';
+}
+.t-icon-chart-area:before {
+ content: '\E16F';
+}
+.t-icon-chart-bar-filled:before {
+ content: '\E170';
+}
+.t-icon-chart-bar:before {
+ content: '\E171';
+}
+.t-icon-chart-bubble-filled:before {
+ content: '\E172';
+}
+.t-icon-chart-bubble:before {
+ content: '\E173';
+}
+.t-icon-chart-column-filled:before {
+ content: '\E174';
+}
+.t-icon-chart-column:before {
+ content: '\E175';
+}
+.t-icon-chart-combo-filled:before {
+ content: '\E176';
+}
+.t-icon-chart-combo:before {
+ content: '\E177';
+}
+.t-icon-chart-draw-io-filled:before {
+ content: '\E178';
+}
+.t-icon-chart-draw-io:before {
+ content: '\E179';
+}
+.t-icon-chart-filled:before {
+ content: '\E17A';
+}
+.t-icon-chart-line-board-filled:before {
+ content: '\E17B';
+}
+.t-icon-chart-line-board:before {
+ content: '\E17C';
+}
+.t-icon-chart-line-data-1:before {
+ content: '\E17D';
+}
+.t-icon-chart-line-data:before {
+ content: '\E17E';
+}
+.t-icon-chart-line-multi:before {
+ content: '\E17F';
+}
+.t-icon-chart-line:before {
+ content: '\E180';
+}
+.t-icon-chart-maximum:before {
+ content: '\E181';
+}
+.t-icon-chart-median:before {
+ content: '\E182';
+}
+.t-icon-chart-minimum:before {
+ content: '\E183';
+}
+.t-icon-chart-pie-filled:before {
+ content: '\E184';
+}
+.t-icon-chart-pie:before {
+ content: '\E185';
+}
+.t-icon-chart-radar-filled:before {
+ content: '\E186';
+}
+.t-icon-chart-radar:before {
+ content: '\E187';
+}
+.t-icon-chart-radial:before {
+ content: '\E188';
+}
+.t-icon-chart-ring-1-filled:before {
+ content: '\E189';
+}
+.t-icon-chart-ring-1:before {
+ content: '\E18A';
+}
+.t-icon-chart-ring-filled:before {
+ content: '\E18B';
+}
+.t-icon-chart-ring:before {
+ content: '\E18C';
+}
+.t-icon-chart-scatter:before {
+ content: '\E18D';
+}
+.t-icon-chart-stacked-filled:before {
+ content: '\E18E';
+}
+.t-icon-chart-stacked:before {
+ content: '\E18F';
+}
+.t-icon-chart:before {
+ content: '\E190';
+}
+.t-icon-chat-add-filled:before {
+ content: '\E191';
+}
+.t-icon-chat-add:before {
+ content: '\E192';
+}
+.t-icon-chat-bubble-1-filled:before {
+ content: '\E193';
+}
+.t-icon-chat-bubble-1:before {
+ content: '\E194';
+}
+.t-icon-chat-bubble-add-filled:before {
+ content: '\E195';
+}
+.t-icon-chat-bubble-add:before {
+ content: '\E196';
+}
+.t-icon-chat-bubble-error-filled:before {
+ content: '\E197';
+}
+.t-icon-chat-bubble-error:before {
+ content: '\E198';
+}
+.t-icon-chat-bubble-filled:before {
+ content: '\E199';
+}
+.t-icon-chat-bubble-help-filled:before {
+ content: '\E19A';
+}
+.t-icon-chat-bubble-help:before {
+ content: '\E19B';
+}
+.t-icon-chat-bubble-history-filled:before {
+ content: '\E19C';
+}
+.t-icon-chat-bubble-history:before {
+ content: '\E19D';
+}
+.t-icon-chat-bubble-locked-filled:before {
+ content: '\E19E';
+}
+.t-icon-chat-bubble-locked:before {
+ content: '\E19F';
+}
+.t-icon-chat-bubble-smile-filled:before {
+ content: '\E1A0';
+}
+.t-icon-chat-bubble-smile:before {
+ content: '\E1A1';
+}
+.t-icon-chat-bubble:before {
+ content: '\E1A2';
+}
+.t-icon-chat-checked-filled:before {
+ content: '\E1A3';
+}
+.t-icon-chat-checked:before {
+ content: '\E1A4';
+}
+.t-icon-chat-clear-filled:before {
+ content: '\E1A5';
+}
+.t-icon-chat-clear:before {
+ content: '\E1A6';
+}
+.t-icon-chat-double-filled:before {
+ content: '\E1A7';
+}
+.t-icon-chat-double:before {
+ content: '\E1A8';
+}
+.t-icon-chat-error-filled:before {
+ content: '\E1A9';
+}
+.t-icon-chat-error:before {
+ content: '\E1AA';
+}
+.t-icon-chat-filled:before {
+ content: '\E1AB';
+}
+.t-icon-chat-heart-filled:before {
+ content: '\E1AC';
+}
+.t-icon-chat-heart:before {
+ content: '\E1AD';
+}
+.t-icon-chat-message-filled:before {
+ content: '\E1AE';
+}
+.t-icon-chat-message:before {
+ content: '\E1AF';
+}
+.t-icon-chat-off-filled:before {
+ content: '\E1B0';
+}
+.t-icon-chat-off:before {
+ content: '\E1B1';
+}
+.t-icon-chat-poll-filled:before {
+ content: '\E1B2';
+}
+.t-icon-chat-poll:before {
+ content: '\E1B3';
+}
+.t-icon-chat-setting-filled:before {
+ content: '\E1B4';
+}
+.t-icon-chat-setting:before {
+ content: '\E1B5';
+}
+.t-icon-chat:before {
+ content: '\E1B6';
+}
+.t-icon-check-circle-filled:before {
+ content: '\E1B7';
+}
+.t-icon-check-circle:before {
+ content: '\E1B8';
+}
+.t-icon-check-double:before {
+ content: '\E1B9';
+}
+.t-icon-check-rectangle-filled:before {
+ content: '\E1BA';
+}
+.t-icon-check-rectangle:before {
+ content: '\E1BB';
+}
+.t-icon-check:before {
+ content: '\E1BC';
+}
+.t-icon-cheese-filled:before {
+ content: '\E1BD';
+}
+.t-icon-cheese:before {
+ content: '\E1BE';
+}
+.t-icon-cherry-filled:before {
+ content: '\E1BF';
+}
+.t-icon-cherry:before {
+ content: '\E1C0';
+}
+.t-icon-chevron-down-circle-filled:before {
+ content: '\E1C1';
+}
+.t-icon-chevron-down-circle:before {
+ content: '\E1C2';
+}
+.t-icon-chevron-down-double-s:before {
+ content: '\E1C3';
+}
+.t-icon-chevron-down-double:before {
+ content: '\E1C4';
+}
+.t-icon-chevron-down-rectangle-filled:before {
+ content: '\E1C5';
+}
+.t-icon-chevron-down-rectangle:before {
+ content: '\E1C6';
+}
+.t-icon-chevron-down-s:before {
+ content: '\E1C7';
+}
+.t-icon-chevron-down:before {
+ content: '\E1C8';
+}
+.t-icon-chevron-left-circle-filled:before {
+ content: '\E1C9';
+}
+.t-icon-chevron-left-circle:before {
+ content: '\E1CA';
+}
+.t-icon-chevron-left-double-s:before {
+ content: '\E1CB';
+}
+.t-icon-chevron-left-double:before {
+ content: '\E1CC';
+}
+.t-icon-chevron-left-rectangle-filled:before {
+ content: '\E1CD';
+}
+.t-icon-chevron-left-rectangle:before {
+ content: '\E1CE';
+}
+.t-icon-chevron-left-s:before {
+ content: '\E1CF';
+}
+.t-icon-chevron-left:before {
+ content: '\E1D0';
+}
+.t-icon-chevron-right-circle-filled:before {
+ content: '\E1D1';
+}
+.t-icon-chevron-right-circle:before {
+ content: '\E1D2';
+}
+.t-icon-chevron-right-double-s:before {
+ content: '\E1D3';
+}
+.t-icon-chevron-right-double:before {
+ content: '\E1D4';
+}
+.t-icon-chevron-right-rectangle-filled:before {
+ content: '\E1D5';
+}
+.t-icon-chevron-right-rectangle:before {
+ content: '\E1D6';
+}
+.t-icon-chevron-right-s:before {
+ content: '\E1D7';
+}
+.t-icon-chevron-right:before {
+ content: '\E1D8';
+}
+.t-icon-chevron-up-circle-filled:before {
+ content: '\E1D9';
+}
+.t-icon-chevron-up-circle:before {
+ content: '\E1DA';
+}
+.t-icon-chevron-up-double-s:before {
+ content: '\E1DB';
+}
+.t-icon-chevron-up-double:before {
+ content: '\E1DC';
+}
+.t-icon-chevron-up-rectangle-filled:before {
+ content: '\E1DD';
+}
+.t-icon-chevron-up-rectangle:before {
+ content: '\E1DE';
+}
+.t-icon-chevron-up-s:before {
+ content: '\E1DF';
+}
+.t-icon-chevron-up:before {
+ content: '\E1E0';
+}
+.t-icon-chicken:before {
+ content: '\E1E1';
+}
+.t-icon-chili-filled:before {
+ content: '\E1E2';
+}
+.t-icon-chili:before {
+ content: '\E1E3';
+}
+.t-icon-chimney-1-filled:before {
+ content: '\E1E4';
+}
+.t-icon-chimney-1:before {
+ content: '\E1E5';
+}
+.t-icon-chimney-2-filled:before {
+ content: '\E1E6';
+}
+.t-icon-chimney-2:before {
+ content: '\E1E7';
+}
+.t-icon-chimney-filled:before {
+ content: '\E1E8';
+}
+.t-icon-chimney:before {
+ content: '\E1E9';
+}
+.t-icon-chinese-cabbage-filled:before {
+ content: '\E1EA';
+}
+.t-icon-chinese-cabbage:before {
+ content: '\E1EB';
+}
+.t-icon-chinese-rectangle-filled:before {
+ content: '\E1EC';
+}
+.t-icon-chinese-rectangle:before {
+ content: '\E1ED';
+}
+.t-icon-church-filled:before {
+ content: '\E1EE';
+}
+.t-icon-church:before {
+ content: '\E1EF';
+}
+.t-icon-circle-filled:before {
+ content: '\E1F0';
+}
+.t-icon-circle:before {
+ content: '\E1F1';
+}
+.t-icon-city-1-filled:before {
+ content: '\E1F2';
+}
+.t-icon-city-1:before {
+ content: '\E1F3';
+}
+.t-icon-city-10-filled:before {
+ content: '\E1F4';
+}
+.t-icon-city-10:before {
+ content: '\E1F5';
+}
+.t-icon-city-11-filled:before {
+ content: '\E1F6';
+}
+.t-icon-city-11:before {
+ content: '\E1F7';
+}
+.t-icon-city-12-filled:before {
+ content: '\E1F8';
+}
+.t-icon-city-12:before {
+ content: '\E1F9';
+}
+.t-icon-city-13-filled:before {
+ content: '\E1FA';
+}
+.t-icon-city-13:before {
+ content: '\E1FB';
+}
+.t-icon-city-14-filled:before {
+ content: '\E1FC';
+}
+.t-icon-city-14:before {
+ content: '\E1FD';
+}
+.t-icon-city-15-filled:before {
+ content: '\E1FE';
+}
+.t-icon-city-15:before {
+ content: '\E1FF';
+}
+.t-icon-city-2-filled:before {
+ content: '\E200';
+}
+.t-icon-city-2:before {
+ content: '\E201';
+}
+.t-icon-city-3-filled:before {
+ content: '\E202';
+}
+.t-icon-city-3:before {
+ content: '\E203';
+}
+.t-icon-city-4-filled:before {
+ content: '\E204';
+}
+.t-icon-city-4:before {
+ content: '\E205';
+}
+.t-icon-city-5-filled:before {
+ content: '\E206';
+}
+.t-icon-city-5:before {
+ content: '\E207';
+}
+.t-icon-city-6-filled:before {
+ content: '\E208';
+}
+.t-icon-city-6:before {
+ content: '\E209';
+}
+.t-icon-city-7-filled:before {
+ content: '\E20A';
+}
+.t-icon-city-7:before {
+ content: '\E20B';
+}
+.t-icon-city-8-filled:before {
+ content: '\E20C';
+}
+.t-icon-city-8:before {
+ content: '\E20D';
+}
+.t-icon-city-9-filled:before {
+ content: '\E20E';
+}
+.t-icon-city-9:before {
+ content: '\E20F';
+}
+.t-icon-city-ancient-1-filled:before {
+ content: '\E210';
+}
+.t-icon-city-ancient-1:before {
+ content: '\E211';
+}
+.t-icon-city-ancient-2-filled:before {
+ content: '\E212';
+}
+.t-icon-city-ancient-2:before {
+ content: '\E213';
+}
+.t-icon-city-ancient-filled:before {
+ content: '\E214';
+}
+.t-icon-city-ancient:before {
+ content: '\E215';
+}
+.t-icon-city-filled:before {
+ content: '\E216';
+}
+.t-icon-city:before {
+ content: '\E217';
+}
+.t-icon-clear-filled:before {
+ content: '\E218';
+}
+.t-icon-clear-formatting-1-filled:before {
+ content: '\E219';
+}
+.t-icon-clear-formatting-1:before {
+ content: '\E21A';
+}
+.t-icon-clear-formatting-filled:before {
+ content: '\E21B';
+}
+.t-icon-clear-formatting:before {
+ content: '\E21C';
+}
+.t-icon-clear:before {
+ content: '\E21D';
+}
+.t-icon-close-circle-filled:before {
+ content: '\E21E';
+}
+.t-icon-close-circle:before {
+ content: '\E21F';
+}
+.t-icon-close-octagon-filled:before {
+ content: '\E220';
+}
+.t-icon-close-octagon:before {
+ content: '\E221';
+}
+.t-icon-close-rectangle-filled:before {
+ content: '\E222';
+}
+.t-icon-close-rectangle:before {
+ content: '\E223';
+}
+.t-icon-close:before {
+ content: '\E224';
+}
+.t-icon-cloud-download:before {
+ content: '\E225';
+}
+.t-icon-cloud-filled:before {
+ content: '\E226';
+}
+.t-icon-cloud-upload:before {
+ content: '\E227';
+}
+.t-icon-cloud:before {
+ content: '\E228';
+}
+.t-icon-cloudy-day-filled:before {
+ content: '\E229';
+}
+.t-icon-cloudy-day:before {
+ content: '\E22A';
+}
+.t-icon-cloudy-night-filled:before {
+ content: '\E22B';
+}
+.t-icon-cloudy-night-rain-filled:before {
+ content: '\E22C';
+}
+.t-icon-cloudy-night-rain:before {
+ content: '\E22D';
+}
+.t-icon-cloudy-night:before {
+ content: '\E22E';
+}
+.t-icon-cloudy-rain-filled:before {
+ content: '\E22F';
+}
+.t-icon-cloudy-rain:before {
+ content: '\E230';
+}
+.t-icon-cloudy-sunny-filled:before {
+ content: '\E231';
+}
+.t-icon-cloudy-sunny:before {
+ content: '\E232';
+}
+.t-icon-code-1:before {
+ content: '\E233';
+}
+.t-icon-code-off:before {
+ content: '\E234';
+}
+.t-icon-code:before {
+ content: '\E235';
+}
+.t-icon-cola-filled:before {
+ content: '\E236';
+}
+.t-icon-cola:before {
+ content: '\E237';
+}
+.t-icon-collage-filled:before {
+ content: '\E238';
+}
+.t-icon-collage:before {
+ content: '\E239';
+}
+.t-icon-collapsible-block:before {
+ content: '\E23A';
+}
+.t-icon-collection-1-filled:before {
+ content: '\E23B';
+}
+.t-icon-collection-1:before {
+ content: '\E23C';
+}
+.t-icon-collection-filled:before {
+ content: '\E23D';
+}
+.t-icon-collection:before {
+ content: '\E23E';
+}
+.t-icon-color-invert-filled:before {
+ content: '\E23F';
+}
+.t-icon-color-invert:before {
+ content: '\E240';
+}
+.t-icon-column-layout-filled:before {
+ content: '\E241';
+}
+.t-icon-column-layout:before {
+ content: '\E242';
+}
+.t-icon-combination-filled:before {
+ content: '\E243';
+}
+.t-icon-combination:before {
+ content: '\E244';
+}
+.t-icon-command:before {
+ content: '\E245';
+}
+.t-icon-compass-1-filled:before {
+ content: '\E246';
+}
+.t-icon-compass-1:before {
+ content: '\E247';
+}
+.t-icon-compass-filled:before {
+ content: '\E248';
+}
+.t-icon-compass:before {
+ content: '\E249';
+}
+.t-icon-component-breadcrumb-filled:before {
+ content: '\E24A';
+}
+.t-icon-component-breadcrumb:before {
+ content: '\E24B';
+}
+.t-icon-component-checkbox-filled:before {
+ content: '\E24C';
+}
+.t-icon-component-checkbox:before {
+ content: '\E24D';
+}
+.t-icon-component-divider-horizontal-filled:before {
+ content: '\E24E';
+}
+.t-icon-component-divider-horizontal:before {
+ content: '\E24F';
+}
+.t-icon-component-divider-vertical-filled:before {
+ content: '\E250';
+}
+.t-icon-component-divider-vertical:before {
+ content: '\E251';
+}
+.t-icon-component-dropdown-filled:before {
+ content: '\E252';
+}
+.t-icon-component-dropdown:before {
+ content: '\E253';
+}
+.t-icon-component-grid-filled:before {
+ content: '\E254';
+}
+.t-icon-component-grid:before {
+ content: '\E255';
+}
+.t-icon-component-input-filled:before {
+ content: '\E256';
+}
+.t-icon-component-input:before {
+ content: '\E257';
+}
+.t-icon-component-layout-filled:before {
+ content: '\E258';
+}
+.t-icon-component-layout:before {
+ content: '\E259';
+}
+.t-icon-component-radio:before {
+ content: '\E25A';
+}
+.t-icon-component-space-filled:before {
+ content: '\E25B';
+}
+.t-icon-component-space:before {
+ content: '\E25C';
+}
+.t-icon-component-steps-1-filled:before {
+ content: '\E25D';
+}
+.t-icon-component-steps-1:before {
+ content: '\E25E';
+}
+.t-icon-component-steps-filled:before {
+ content: '\E25F';
+}
+.t-icon-component-steps:before {
+ content: '\E260';
+}
+.t-icon-component-stickytool-filled:before {
+ content: '\E261';
+}
+.t-icon-component-stickytool:before {
+ content: '\E262';
+}
+.t-icon-component-switch-filled:before {
+ content: '\E263';
+}
+.t-icon-component-switch:before {
+ content: '\E264';
+}
+.t-icon-constraint:before {
+ content: '\E265';
+}
+.t-icon-contrast-1-filled:before {
+ content: '\E266';
+}
+.t-icon-contrast-1:before {
+ content: '\E267';
+}
+.t-icon-contrast-filled:before {
+ content: '\E268';
+}
+.t-icon-contrast:before {
+ content: '\E269';
+}
+.t-icon-contribute-filled:before {
+ content: '\E26A';
+}
+.t-icon-contribute:before {
+ content: '\E26B';
+}
+.t-icon-control-platform-filled:before {
+ content: '\E26C';
+}
+.t-icon-control-platform:before {
+ content: '\E26D';
+}
+.t-icon-cooperate-filled:before {
+ content: '\E26E';
+}
+.t-icon-cooperate:before {
+ content: '\E26F';
+}
+.t-icon-coordinate-system-filled:before {
+ content: '\E270';
+}
+.t-icon-coordinate-system:before {
+ content: '\E271';
+}
+.t-icon-copy-filled:before {
+ content: '\E272';
+}
+.t-icon-copy:before {
+ content: '\E273';
+}
+.t-icon-copyright-filled:before {
+ content: '\E274';
+}
+.t-icon-copyright:before {
+ content: '\E275';
+}
+.t-icon-corn-filled:before {
+ content: '\E276';
+}
+.t-icon-corn:before {
+ content: '\E277';
+}
+.t-icon-correct-filled:before {
+ content: '\E278';
+}
+.t-icon-correct:before {
+ content: '\E279';
+}
+.t-icon-coupon-filled:before {
+ content: '\E27A';
+}
+.t-icon-coupon:before {
+ content: '\E27B';
+}
+.t-icon-course-filled:before {
+ content: '\E27C';
+}
+.t-icon-course:before {
+ content: '\E27D';
+}
+.t-icon-cpu-filled:before {
+ content: '\E27E';
+}
+.t-icon-cpu:before {
+ content: '\E27F';
+}
+.t-icon-crack-filled:before {
+ content: '\E280';
+}
+.t-icon-crack:before {
+ content: '\E281';
+}
+.t-icon-creditcard-add-filled:before {
+ content: '\E282';
+}
+.t-icon-creditcard-add:before {
+ content: '\E283';
+}
+.t-icon-creditcard-filled:before {
+ content: '\E284';
+}
+.t-icon-creditcard-off-filled:before {
+ content: '\E285';
+}
+.t-icon-creditcard-off:before {
+ content: '\E286';
+}
+.t-icon-creditcard:before {
+ content: '\E287';
+}
+.t-icon-crooked-smile-filled:before {
+ content: '\E288';
+}
+.t-icon-crooked-smile:before {
+ content: '\E289';
+}
+.t-icon-cry-and-laugh-filled:before {
+ content: '\E28A';
+}
+.t-icon-cry-and-laugh:before {
+ content: '\E28B';
+}
+.t-icon-cry-loudly-filled:before {
+ content: '\E28C';
+}
+.t-icon-cry-loudly:before {
+ content: '\E28D';
+}
+.t-icon-css3-filled:before {
+ content: '\E28E';
+}
+.t-icon-css3:before {
+ content: '\E28F';
+}
+.t-icon-cucumber:before {
+ content: '\E290';
+}
+.t-icon-currency-exchange:before {
+ content: '\E291';
+}
+.t-icon-cursor-filled:before {
+ content: '\E292';
+}
+.t-icon-cursor:before {
+ content: '\E293';
+}
+.t-icon-curtain-filled:before {
+ content: '\E294';
+}
+.t-icon-curtain:before {
+ content: '\E295';
+}
+.t-icon-curve:before {
+ content: '\E296';
+}
+.t-icon-cut-1:before {
+ content: '\E297';
+}
+.t-icon-cut:before {
+ content: '\E298';
+}
+.t-icon-dam-1-filled:before {
+ content: '\E299';
+}
+.t-icon-dam-1:before {
+ content: '\E29A';
+}
+.t-icon-dam-2-filled:before {
+ content: '\E29B';
+}
+.t-icon-dam-2:before {
+ content: '\E29C';
+}
+.t-icon-dam-3-filled:before {
+ content: '\E29D';
+}
+.t-icon-dam-3:before {
+ content: '\E29E';
+}
+.t-icon-dam-4-filled:before {
+ content: '\E29F';
+}
+.t-icon-dam-4:before {
+ content: '\E2A0';
+}
+.t-icon-dam-5-filled:before {
+ content: '\E2A1';
+}
+.t-icon-dam-5:before {
+ content: '\E2A2';
+}
+.t-icon-dam-6-filled:before {
+ content: '\E2A3';
+}
+.t-icon-dam-6:before {
+ content: '\E2A4';
+}
+.t-icon-dam-7-filled:before {
+ content: '\E2A5';
+}
+.t-icon-dam-7:before {
+ content: '\E2A6';
+}
+.t-icon-dam-filled:before {
+ content: '\E2A7';
+}
+.t-icon-dam:before {
+ content: '\E2A8';
+}
+.t-icon-dart-board-filled:before {
+ content: '\E2A9';
+}
+.t-icon-dart-board:before {
+ content: '\E2AA';
+}
+.t-icon-dashboard-1-filled:before {
+ content: '\E2AB';
+}
+.t-icon-dashboard-1:before {
+ content: '\E2AC';
+}
+.t-icon-dashboard-filled:before {
+ content: '\E2AD';
+}
+.t-icon-dashboard:before {
+ content: '\E2AE';
+}
+.t-icon-data-base-filled:before {
+ content: '\E2AF';
+}
+.t-icon-data-base:before {
+ content: '\E2B0';
+}
+.t-icon-data-checked-filled:before {
+ content: '\E2B1';
+}
+.t-icon-data-checked:before {
+ content: '\E2B2';
+}
+.t-icon-data-display:before {
+ content: '\E2B3';
+}
+.t-icon-data-error-filled:before {
+ content: '\E2B4';
+}
+.t-icon-data-error:before {
+ content: '\E2B5';
+}
+.t-icon-data-filled:before {
+ content: '\E2B6';
+}
+.t-icon-data-search-filled:before {
+ content: '\E2B7';
+}
+.t-icon-data-search:before {
+ content: '\E2B8';
+}
+.t-icon-data:before {
+ content: '\E2B9';
+}
+.t-icon-delete-1-filled:before {
+ content: '\E2BA';
+}
+.t-icon-delete-1:before {
+ content: '\E2BB';
+}
+.t-icon-delete-filled:before {
+ content: '\E2BC';
+}
+.t-icon-delete-time-filled:before {
+ content: '\E2BD';
+}
+.t-icon-delete-time:before {
+ content: '\E2BE';
+}
+.t-icon-delete:before {
+ content: '\E2BF';
+}
+.t-icon-delta-filled:before {
+ content: '\E2C0';
+}
+.t-icon-delta:before {
+ content: '\E2C1';
+}
+.t-icon-depressed-filled:before {
+ content: '\E2C2';
+}
+.t-icon-depressed:before {
+ content: '\E2C3';
+}
+.t-icon-desktop-1-filled:before {
+ content: '\E2C4';
+}
+.t-icon-desktop-1:before {
+ content: '\E2C5';
+}
+.t-icon-desktop-filled:before {
+ content: '\E2C6';
+}
+.t-icon-desktop:before {
+ content: '\E2C7';
+}
+.t-icon-despise-filled:before {
+ content: '\E2C8';
+}
+.t-icon-despise:before {
+ content: '\E2C9';
+}
+.t-icon-device-filled:before {
+ content: '\E2CA';
+}
+.t-icon-device:before {
+ content: '\E2CB';
+}
+.t-icon-dialog-history-filled:before {
+ content: '\E2CC';
+}
+.t-icon-dialog-history:before {
+ content: '\E2CD';
+}
+.t-icon-discount-filled:before {
+ content: '\E2CE';
+}
+.t-icon-discount-list-filled:before {
+ content: '\E2CF';
+}
+.t-icon-discount-list:before {
+ content: '\E2D0';
+}
+.t-icon-discount:before {
+ content: '\E2D1';
+}
+.t-icon-dissatisfaction-filled:before {
+ content: '\E2D2';
+}
+.t-icon-dissatisfaction:before {
+ content: '\E2D3';
+}
+.t-icon-divide:before {
+ content: '\E2D4';
+}
+.t-icon-dividers-1:before {
+ content: '\E2D5';
+}
+.t-icon-dividers:before {
+ content: '\E2D6';
+}
+.t-icon-document-location-filled:before {
+ content: '\E2D7';
+}
+.t-icon-document-location:before {
+ content: '\E2D8';
+}
+.t-icon-document-popular-filled:before {
+ content: '\E2D9';
+}
+.t-icon-document-popular:before {
+ content: '\E2DA';
+}
+.t-icon-document-update-filled:before {
+ content: '\E2DB';
+}
+.t-icon-document-update:before {
+ content: '\E2DC';
+}
+.t-icon-doge-filled:before {
+ content: '\E2DD';
+}
+.t-icon-doge:before {
+ content: '\E2DE';
+}
+.t-icon-double-storey-filled:before {
+ content: '\E2DF';
+}
+.t-icon-double-storey:before {
+ content: '\E2E0';
+}
+.t-icon-download-1:before {
+ content: '\E2E1';
+}
+.t-icon-download-2-filled:before {
+ content: '\E2E2';
+}
+.t-icon-download-2:before {
+ content: '\E2E3';
+}
+.t-icon-download:before {
+ content: '\E2E4';
+}
+.t-icon-downscale:before {
+ content: '\E2E5';
+}
+.t-icon-draft-filled:before {
+ content: '\E2E6';
+}
+.t-icon-draft:before {
+ content: '\E2E7';
+}
+.t-icon-drag-drop:before {
+ content: '\E2E8';
+}
+.t-icon-drag-move:before {
+ content: '\E2E9';
+}
+.t-icon-drink-filled:before {
+ content: '\E2EA';
+}
+.t-icon-drink:before {
+ content: '\E2EB';
+}
+.t-icon-drumstick-filled:before {
+ content: '\E2EC';
+}
+.t-icon-drumstick:before {
+ content: '\E2ED';
+}
+.t-icon-dv-filled:before {
+ content: '\E2EE';
+}
+.t-icon-dv:before {
+ content: '\E2EF';
+}
+.t-icon-dvd-filled:before {
+ content: '\E2F0';
+}
+.t-icon-dvd:before {
+ content: '\E2F1';
+}
+.t-icon-earphone-filled:before {
+ content: '\E2F2';
+}
+.t-icon-earphone:before {
+ content: '\E2F3';
+}
+.t-icon-earth-filled:before {
+ content: '\E2F4';
+}
+.t-icon-earth:before {
+ content: '\E2F5';
+}
+.t-icon-edit-1-filled:before {
+ content: '\E2F6';
+}
+.t-icon-edit-1:before {
+ content: '\E2F7';
+}
+.t-icon-edit-2-filled:before {
+ content: '\E2F8';
+}
+.t-icon-edit-2:before {
+ content: '\E2F9';
+}
+.t-icon-edit-filled:before {
+ content: '\E2FA';
+}
+.t-icon-edit-off-filled:before {
+ content: '\E2FB';
+}
+.t-icon-edit-off:before {
+ content: '\E2FC';
+}
+.t-icon-edit:before {
+ content: '\E2FD';
+}
+.t-icon-education-filled:before {
+ content: '\E2FE';
+}
+.t-icon-education:before {
+ content: '\E2FF';
+}
+.t-icon-eggplant-filled:before {
+ content: '\E300';
+}
+.t-icon-eggplant:before {
+ content: '\E301';
+}
+.t-icon-ellipsis:before {
+ content: '\E302';
+}
+.t-icon-emo-emotional-filled:before {
+ content: '\E303';
+}
+.t-icon-emo-emotional:before {
+ content: '\E304';
+}
+.t-icon-english-rectangle-filled:before {
+ content: '\E305';
+}
+.t-icon-english-rectangle:before {
+ content: '\E306';
+}
+.t-icon-enter:before {
+ content: '\E307';
+}
+.t-icon-equal:before {
+ content: '\E308';
+}
+.t-icon-error-circle-filled:before {
+ content: '\E309';
+}
+.t-icon-error-circle:before {
+ content: '\E30A';
+}
+.t-icon-error-triangle-filled:before {
+ content: '\E30B';
+}
+.t-icon-error-triangle:before {
+ content: '\E30C';
+}
+.t-icon-error:before {
+ content: '\E30D';
+}
+.t-icon-excited-1-filled:before {
+ content: '\E30E';
+}
+.t-icon-excited-1:before {
+ content: '\E30F';
+}
+.t-icon-excited-filled:before {
+ content: '\E310';
+}
+.t-icon-excited:before {
+ content: '\E311';
+}
+.t-icon-expand-down-filled:before {
+ content: '\E312';
+}
+.t-icon-expand-down:before {
+ content: '\E313';
+}
+.t-icon-expand-horizontal:before {
+ content: '\E314';
+}
+.t-icon-expand-up-filled:before {
+ content: '\E315';
+}
+.t-icon-expand-up:before {
+ content: '\E316';
+}
+.t-icon-expand-vertical:before {
+ content: '\E317';
+}
+.t-icon-explore-filled:before {
+ content: '\E318';
+}
+.t-icon-explore-off-filled:before {
+ content: '\E319';
+}
+.t-icon-explore-off:before {
+ content: '\E31A';
+}
+.t-icon-explore:before {
+ content: '\E31B';
+}
+.t-icon-export:before {
+ content: '\E31C';
+}
+.t-icon-exposure-filled:before {
+ content: '\E31D';
+}
+.t-icon-exposure:before {
+ content: '\E31E';
+}
+.t-icon-extension-filled:before {
+ content: '\E31F';
+}
+.t-icon-extension-off-filled:before {
+ content: '\E320';
+}
+.t-icon-extension-off:before {
+ content: '\E321';
+}
+.t-icon-extension:before {
+ content: '\E322';
+}
+.t-icon-face-retouching-filled:before {
+ content: '\E323';
+}
+.t-icon-face-retouching:before {
+ content: '\E324';
+}
+.t-icon-fact-check-filled:before {
+ content: '\E325';
+}
+.t-icon-fact-check:before {
+ content: '\E326';
+}
+.t-icon-fahrenheit-scale:before {
+ content: '\E327';
+}
+.t-icon-feel-at-ease-filled:before {
+ content: '\E328';
+}
+.t-icon-feel-at-ease:before {
+ content: '\E329';
+}
+.t-icon-ferocious-filled:before {
+ content: '\E32A';
+}
+.t-icon-ferocious:before {
+ content: '\E32B';
+}
+.t-icon-ferris-wheel-filled:before {
+ content: '\E32C';
+}
+.t-icon-ferris-wheel:before {
+ content: '\E32D';
+}
+.t-icon-file-1-filled:before {
+ content: '\E32E';
+}
+.t-icon-file-1:before {
+ content: '\E32F';
+}
+.t-icon-file-add-1-filled:before {
+ content: '\E330';
+}
+.t-icon-file-add-1:before {
+ content: '\E331';
+}
+.t-icon-file-add-filled:before {
+ content: '\E332';
+}
+.t-icon-file-add:before {
+ content: '\E333';
+}
+.t-icon-file-attachment-filled:before {
+ content: '\E334';
+}
+.t-icon-file-attachment:before {
+ content: '\E335';
+}
+.t-icon-file-blocked-filled:before {
+ content: '\E336';
+}
+.t-icon-file-blocked:before {
+ content: '\E337';
+}
+.t-icon-file-code-1-filled:before {
+ content: '\E338';
+}
+.t-icon-file-code-1:before {
+ content: '\E339';
+}
+.t-icon-file-code-filled:before {
+ content: '\E33A';
+}
+.t-icon-file-code:before {
+ content: '\E33B';
+}
+.t-icon-file-copy-filled:before {
+ content: '\E33C';
+}
+.t-icon-file-copy:before {
+ content: '\E33D';
+}
+.t-icon-file-csv-filled:before {
+ content: '\E33E';
+}
+.t-icon-file-csv:before {
+ content: '\E33F';
+}
+.t-icon-file-download-filled:before {
+ content: '\E340';
+}
+.t-icon-file-download:before {
+ content: '\E341';
+}
+.t-icon-file-edit-filled:before {
+ content: '\E342';
+}
+.t-icon-file-edit:before {
+ content: '\E343';
+}
+.t-icon-file-excel-filled:before {
+ content: '\E344';
+}
+.t-icon-file-excel:before {
+ content: '\E345';
+}
+.t-icon-file-export-filled:before {
+ content: '\E346';
+}
+.t-icon-file-export:before {
+ content: '\E347';
+}
+.t-icon-file-filled:before {
+ content: '\E348';
+}
+.t-icon-file-icon-filled:before {
+ content: '\E349';
+}
+.t-icon-file-icon:before {
+ content: '\E34A';
+}
+.t-icon-file-image-filled:before {
+ content: '\E34B';
+}
+.t-icon-file-image:before {
+ content: '\E34C';
+}
+.t-icon-file-import-filled:before {
+ content: '\E34D';
+}
+.t-icon-file-import:before {
+ content: '\E34E';
+}
+.t-icon-file-json-filled:before {
+ content: '\E34F';
+}
+.t-icon-file-json:before {
+ content: '\E350';
+}
+.t-icon-file-locked-filled:before {
+ content: '\E351';
+}
+.t-icon-file-locked:before {
+ content: '\E352';
+}
+.t-icon-file-markdown-filled:before {
+ content: '\E353';
+}
+.t-icon-file-markdown:before {
+ content: '\E354';
+}
+.t-icon-file-minus-filled:before {
+ content: '\E355';
+}
+.t-icon-file-minus:before {
+ content: '\E356';
+}
+.t-icon-file-music-filled:before {
+ content: '\E357';
+}
+.t-icon-file-music:before {
+ content: '\E358';
+}
+.t-icon-file-onenote-filled:before {
+ content: '\E359';
+}
+.t-icon-file-onenote:before {
+ content: '\E35A';
+}
+.t-icon-file-outlook-filled:before {
+ content: '\E35B';
+}
+.t-icon-file-outlook:before {
+ content: '\E35C';
+}
+.t-icon-file-paste-filled:before {
+ content: '\E35D';
+}
+.t-icon-file-paste:before {
+ content: '\E35E';
+}
+.t-icon-file-pdf-filled:before {
+ content: '\E35F';
+}
+.t-icon-file-pdf:before {
+ content: '\E360';
+}
+.t-icon-file-powerpoint-filled:before {
+ content: '\E361';
+}
+.t-icon-file-powerpoint:before {
+ content: '\E362';
+}
+.t-icon-file-restore-filled:before {
+ content: '\E363';
+}
+.t-icon-file-restore:before {
+ content: '\E364';
+}
+.t-icon-file-safety-filled:before {
+ content: '\E365';
+}
+.t-icon-file-safety:before {
+ content: '\E366';
+}
+.t-icon-file-search-filled:before {
+ content: '\E367';
+}
+.t-icon-file-search:before {
+ content: '\E368';
+}
+.t-icon-file-setting-filled:before {
+ content: '\E369';
+}
+.t-icon-file-setting:before {
+ content: '\E36A';
+}
+.t-icon-file-teams-filled:before {
+ content: '\E36B';
+}
+.t-icon-file-teams:before {
+ content: '\E36C';
+}
+.t-icon-file-transmit-double-filled:before {
+ content: '\E36D';
+}
+.t-icon-file-transmit-double:before {
+ content: '\E36E';
+}
+.t-icon-file-transmit-filled:before {
+ content: '\E36F';
+}
+.t-icon-file-transmit:before {
+ content: '\E370';
+}
+.t-icon-file-txt-filled:before {
+ content: '\E371';
+}
+.t-icon-file-txt:before {
+ content: '\E372';
+}
+.t-icon-file-unknown-filled:before {
+ content: '\E373';
+}
+.t-icon-file-unknown:before {
+ content: '\E374';
+}
+.t-icon-file-unlocked-filled:before {
+ content: '\E375';
+}
+.t-icon-file-unlocked:before {
+ content: '\E376';
+}
+.t-icon-file-word-filled:before {
+ content: '\E377';
+}
+.t-icon-file-word:before {
+ content: '\E378';
+}
+.t-icon-file-yaml-filled:before {
+ content: '\E379';
+}
+.t-icon-file-yaml:before {
+ content: '\E37A';
+}
+.t-icon-file-zip-filled:before {
+ content: '\E37B';
+}
+.t-icon-file-zip:before {
+ content: '\E37C';
+}
+.t-icon-file:before {
+ content: '\E37D';
+}
+.t-icon-fill-color-1-filled:before {
+ content: '\E37E';
+}
+.t-icon-fill-color-1:before {
+ content: '\E37F';
+}
+.t-icon-fill-color-filled:before {
+ content: '\E380';
+}
+.t-icon-fill-color:before {
+ content: '\E381';
+}
+.t-icon-film-1-filled:before {
+ content: '\E382';
+}
+.t-icon-film-1:before {
+ content: '\E383';
+}
+.t-icon-film-filled:before {
+ content: '\E384';
+}
+.t-icon-film:before {
+ content: '\E385';
+}
+.t-icon-filter-1-filled:before {
+ content: '\E386';
+}
+.t-icon-filter-1:before {
+ content: '\E387';
+}
+.t-icon-filter-2-filled:before {
+ content: '\E388';
+}
+.t-icon-filter-2:before {
+ content: '\E389';
+}
+.t-icon-filter-3-filled:before {
+ content: '\E38A';
+}
+.t-icon-filter-3:before {
+ content: '\E38B';
+}
+.t-icon-filter-clear-filled:before {
+ content: '\E38C';
+}
+.t-icon-filter-clear:before {
+ content: '\E38D';
+}
+.t-icon-filter-filled:before {
+ content: '\E38E';
+}
+.t-icon-filter-off-filled:before {
+ content: '\E38F';
+}
+.t-icon-filter-off:before {
+ content: '\E390';
+}
+.t-icon-filter-sort-filled:before {
+ content: '\E391';
+}
+.t-icon-filter-sort:before {
+ content: '\E392';
+}
+.t-icon-filter:before {
+ content: '\E393';
+}
+.t-icon-fingerprint-1:before {
+ content: '\E394';
+}
+.t-icon-fingerprint-2:before {
+ content: '\E395';
+}
+.t-icon-fingerprint-3:before {
+ content: '\E396';
+}
+.t-icon-fingerprint:before {
+ content: '\E397';
+}
+.t-icon-fish-filled:before {
+ content: '\E398';
+}
+.t-icon-fish:before {
+ content: '\E399';
+}
+.t-icon-flag-1-filled:before {
+ content: '\E39A';
+}
+.t-icon-flag-1:before {
+ content: '\E39B';
+}
+.t-icon-flag-2-filled:before {
+ content: '\E39C';
+}
+.t-icon-flag-2:before {
+ content: '\E39D';
+}
+.t-icon-flag-3-filled:before {
+ content: '\E39E';
+}
+.t-icon-flag-3:before {
+ content: '\E39F';
+}
+.t-icon-flag-4-filled:before {
+ content: '\E3A0';
+}
+.t-icon-flag-4:before {
+ content: '\E3A1';
+}
+.t-icon-flag-filled:before {
+ content: '\E3A2';
+}
+.t-icon-flag:before {
+ content: '\E3A3';
+}
+.t-icon-flashlight-filled:before {
+ content: '\E3A4';
+}
+.t-icon-flashlight:before {
+ content: '\E3A5';
+}
+.t-icon-flight-landing-filled:before {
+ content: '\E3A6';
+}
+.t-icon-flight-landing:before {
+ content: '\E3A7';
+}
+.t-icon-flight-takeoff-filled:before {
+ content: '\E3A8';
+}
+.t-icon-flight-takeoff:before {
+ content: '\E3A9';
+}
+.t-icon-flip-smiling-face-filled:before {
+ content: '\E3AA';
+}
+.t-icon-flip-smiling-face:before {
+ content: '\E3AB';
+}
+.t-icon-flip-to-back-filled:before {
+ content: '\E3AC';
+}
+.t-icon-flip-to-back:before {
+ content: '\E3AD';
+}
+.t-icon-flip-to-front-filled:before {
+ content: '\E3AE';
+}
+.t-icon-flip-to-front:before {
+ content: '\E3AF';
+}
+.t-icon-flowchart-filled:before {
+ content: '\E3B0';
+}
+.t-icon-flowchart:before {
+ content: '\E3B1';
+}
+.t-icon-focus-filled:before {
+ content: '\E3B2';
+}
+.t-icon-focus:before {
+ content: '\E3B3';
+}
+.t-icon-fog-filled:before {
+ content: '\E3B4';
+}
+.t-icon-fog-night-filled:before {
+ content: '\E3B5';
+}
+.t-icon-fog-night:before {
+ content: '\E3B6';
+}
+.t-icon-fog-sunny-filled:before {
+ content: '\E3B7';
+}
+.t-icon-fog-sunny:before {
+ content: '\E3B8';
+}
+.t-icon-fog:before {
+ content: '\E3B9';
+}
+.t-icon-folder-1-filled:before {
+ content: '\E3BA';
+}
+.t-icon-folder-1:before {
+ content: '\E3BB';
+}
+.t-icon-folder-add-1-filled:before {
+ content: '\E3BC';
+}
+.t-icon-folder-add-1:before {
+ content: '\E3BD';
+}
+.t-icon-folder-add-filled:before {
+ content: '\E3BE';
+}
+.t-icon-folder-add:before {
+ content: '\E3BF';
+}
+.t-icon-folder-blocked-filled:before {
+ content: '\E3C0';
+}
+.t-icon-folder-blocked:before {
+ content: '\E3C1';
+}
+.t-icon-folder-details-filled:before {
+ content: '\E3C2';
+}
+.t-icon-folder-details:before {
+ content: '\E3C3';
+}
+.t-icon-folder-export-filled:before {
+ content: '\E3C4';
+}
+.t-icon-folder-export:before {
+ content: '\E3C5';
+}
+.t-icon-folder-filled:before {
+ content: '\E3C6';
+}
+.t-icon-folder-import-filled:before {
+ content: '\E3C7';
+}
+.t-icon-folder-import:before {
+ content: '\E3C8';
+}
+.t-icon-folder-locked-filled:before {
+ content: '\E3C9';
+}
+.t-icon-folder-locked:before {
+ content: '\E3CA';
+}
+.t-icon-folder-minus-filled:before {
+ content: '\E3CB';
+}
+.t-icon-folder-minus:before {
+ content: '\E3CC';
+}
+.t-icon-folder-move-filled:before {
+ content: '\E3CD';
+}
+.t-icon-folder-move:before {
+ content: '\E3CE';
+}
+.t-icon-folder-off-filled:before {
+ content: '\E3CF';
+}
+.t-icon-folder-off:before {
+ content: '\E3D0';
+}
+.t-icon-folder-open-1-filled:before {
+ content: '\E3D1';
+}
+.t-icon-folder-open-1:before {
+ content: '\E3D2';
+}
+.t-icon-folder-open-filled:before {
+ content: '\E3D3';
+}
+.t-icon-folder-open:before {
+ content: '\E3D4';
+}
+.t-icon-folder-search-filled:before {
+ content: '\E3D5';
+}
+.t-icon-folder-search:before {
+ content: '\E3D6';
+}
+.t-icon-folder-setting-filled:before {
+ content: '\E3D7';
+}
+.t-icon-folder-setting:before {
+ content: '\E3D8';
+}
+.t-icon-folder-shared-filled:before {
+ content: '\E3D9';
+}
+.t-icon-folder-shared:before {
+ content: '\E3DA';
+}
+.t-icon-folder-unlocked-filled:before {
+ content: '\E3DB';
+}
+.t-icon-folder-unlocked:before {
+ content: '\E3DC';
+}
+.t-icon-folder-zip-filled:before {
+ content: '\E3DD';
+}
+.t-icon-folder-zip:before {
+ content: '\E3DE';
+}
+.t-icon-folder:before {
+ content: '\E3DF';
+}
+.t-icon-font-background-filled:before {
+ content: '\E3E0';
+}
+.t-icon-font-background:before {
+ content: '\E3E1';
+}
+.t-icon-forest-filled:before {
+ content: '\E3E2';
+}
+.t-icon-forest:before {
+ content: '\E3E3';
+}
+.t-icon-fork-filled:before {
+ content: '\E3E4';
+}
+.t-icon-fork:before {
+ content: '\E3E5';
+}
+.t-icon-form-filled:before {
+ content: '\E3E6';
+}
+.t-icon-form:before {
+ content: '\E3E7';
+}
+.t-icon-format-horizontal-align-bottom:before {
+ content: '\E3E8';
+}
+.t-icon-format-horizontal-align-center:before {
+ content: '\E3E9';
+}
+.t-icon-format-horizontal-align-top:before {
+ content: '\E3EA';
+}
+.t-icon-format-painter-filled:before {
+ content: '\E3EB';
+}
+.t-icon-format-painter:before {
+ content: '\E3EC';
+}
+.t-icon-format-vertical-align-center:before {
+ content: '\E3ED';
+}
+.t-icon-format-vertical-align-left:before {
+ content: '\E3EE';
+}
+.t-icon-format-vertical-align-right:before {
+ content: '\E3EF';
+}
+.t-icon-formula:before {
+ content: '\E3F0';
+}
+.t-icon-forum-filled:before {
+ content: '\E3F1';
+}
+.t-icon-forum:before {
+ content: '\E3F2';
+}
+.t-icon-forward-filled:before {
+ content: '\E3F3';
+}
+.t-icon-forward:before {
+ content: '\E3F4';
+}
+.t-icon-frame-1-filled:before {
+ content: '\E3F5';
+}
+.t-icon-frame-1:before {
+ content: '\E3F6';
+}
+.t-icon-frame-filled:before {
+ content: '\E3F7';
+}
+.t-icon-frame:before {
+ content: '\E3F8';
+}
+.t-icon-fries-filled:before {
+ content: '\E3F9';
+}
+.t-icon-fries:before {
+ content: '\E3FA';
+}
+.t-icon-fullscreen-1:before {
+ content: '\E3FB';
+}
+.t-icon-fullscreen-2:before {
+ content: '\E3FC';
+}
+.t-icon-fullscreen-exit-1:before {
+ content: '\E3FD';
+}
+.t-icon-fullscreen-exit:before {
+ content: '\E3FE';
+}
+.t-icon-fullscreen:before {
+ content: '\E3FF';
+}
+.t-icon-function-curve:before {
+ content: '\E400';
+}
+.t-icon-functions-1:before {
+ content: '\E401';
+}
+.t-icon-functions:before {
+ content: '\E402';
+}
+.t-icon-gamepad-1-filled:before {
+ content: '\E403';
+}
+.t-icon-gamepad-1:before {
+ content: '\E404';
+}
+.t-icon-gamepad-filled:before {
+ content: '\E405';
+}
+.t-icon-gamepad:before {
+ content: '\E406';
+}
+.t-icon-gamma:before {
+ content: '\E407';
+}
+.t-icon-garlic-filled:before {
+ content: '\E408';
+}
+.t-icon-garlic:before {
+ content: '\E409';
+}
+.t-icon-gender-female:before {
+ content: '\E40A';
+}
+.t-icon-gender-male:before {
+ content: '\E40B';
+}
+.t-icon-gesture-applause-filled:before {
+ content: '\E40C';
+}
+.t-icon-gesture-applause:before {
+ content: '\E40D';
+}
+.t-icon-gesture-click-filled:before {
+ content: '\E40E';
+}
+.t-icon-gesture-click:before {
+ content: '\E40F';
+}
+.t-icon-gesture-down-filled:before {
+ content: '\E410';
+}
+.t-icon-gesture-down:before {
+ content: '\E411';
+}
+.t-icon-gesture-expansion-filled:before {
+ content: '\E412';
+}
+.t-icon-gesture-expansion:before {
+ content: '\E413';
+}
+.t-icon-gesture-left-filled:before {
+ content: '\E414';
+}
+.t-icon-gesture-left-slip-filled:before {
+ content: '\E415';
+}
+.t-icon-gesture-left-slip:before {
+ content: '\E416';
+}
+.t-icon-gesture-left:before {
+ content: '\E417';
+}
+.t-icon-gesture-open-filled:before {
+ content: '\E418';
+}
+.t-icon-gesture-open:before {
+ content: '\E419';
+}
+.t-icon-gesture-pray-filled:before {
+ content: '\E41A';
+}
+.t-icon-gesture-pray:before {
+ content: '\E41B';
+}
+.t-icon-gesture-press-filled:before {
+ content: '\E41C';
+}
+.t-icon-gesture-press:before {
+ content: '\E41D';
+}
+.t-icon-gesture-ranslation-filled:before {
+ content: '\E41E';
+}
+.t-icon-gesture-ranslation:before {
+ content: '\E41F';
+}
+.t-icon-gesture-right-filled:before {
+ content: '\E420';
+}
+.t-icon-gesture-right-slip-filled:before {
+ content: '\E421';
+}
+.t-icon-gesture-right-slip:before {
+ content: '\E422';
+}
+.t-icon-gesture-right:before {
+ content: '\E423';
+}
+.t-icon-gesture-slide-left-and-right-filled:before {
+ content: '\E424';
+}
+.t-icon-gesture-slide-left-and-right:before {
+ content: '\E425';
+}
+.t-icon-gesture-slide-up-filled:before {
+ content: '\E426';
+}
+.t-icon-gesture-slide-up:before {
+ content: '\E427';
+}
+.t-icon-gesture-typing-filled:before {
+ content: '\E428';
+}
+.t-icon-gesture-typing:before {
+ content: '\E429';
+}
+.t-icon-gesture-up-and-down-filled:before {
+ content: '\E42A';
+}
+.t-icon-gesture-up-and-down:before {
+ content: '\E42B';
+}
+.t-icon-gesture-up-filled:before {
+ content: '\E42C';
+}
+.t-icon-gesture-up:before {
+ content: '\E42D';
+}
+.t-icon-gesture-wipe-down-filled:before {
+ content: '\E42E';
+}
+.t-icon-gesture-wipe-down:before {
+ content: '\E42F';
+}
+.t-icon-gift-filled:before {
+ content: '\E430';
+}
+.t-icon-gift:before {
+ content: '\E431';
+}
+.t-icon-giggle-filled:before {
+ content: '\E432';
+}
+.t-icon-giggle:before {
+ content: '\E433';
+}
+.t-icon-git-branch-filled:before {
+ content: '\E434';
+}
+.t-icon-git-branch:before {
+ content: '\E435';
+}
+.t-icon-git-commit-1-filled:before {
+ content: '\E436';
+}
+.t-icon-git-commit-1:before {
+ content: '\E437';
+}
+.t-icon-git-commit-filled:before {
+ content: '\E438';
+}
+.t-icon-git-commit:before {
+ content: '\E439';
+}
+.t-icon-git-merge-filled:before {
+ content: '\E43A';
+}
+.t-icon-git-merge:before {
+ content: '\E43B';
+}
+.t-icon-git-pull-request-filled:before {
+ content: '\E43C';
+}
+.t-icon-git-pull-request:before {
+ content: '\E43D';
+}
+.t-icon-git-repository-commits-filled:before {
+ content: '\E43E';
+}
+.t-icon-git-repository-commits:before {
+ content: '\E43F';
+}
+.t-icon-git-repository-filled:before {
+ content: '\E440';
+}
+.t-icon-git-repository-private-filled:before {
+ content: '\E441';
+}
+.t-icon-git-repository-private:before {
+ content: '\E442';
+}
+.t-icon-git-repository:before {
+ content: '\E443';
+}
+.t-icon-gps-filled:before {
+ content: '\E444';
+}
+.t-icon-gps:before {
+ content: '\E445';
+}
+.t-icon-grape-filled:before {
+ content: '\E446';
+}
+.t-icon-grape:before {
+ content: '\E447';
+}
+.t-icon-graphviz-filled:before {
+ content: '\E448';
+}
+.t-icon-graphviz:before {
+ content: '\E449';
+}
+.t-icon-greater-than-or-equal:before {
+ content: '\E44A';
+}
+.t-icon-greater-than:before {
+ content: '\E44B';
+}
+.t-icon-green-onion:before {
+ content: '\E44C';
+}
+.t-icon-grid-add-filled:before {
+ content: '\E44D';
+}
+.t-icon-grid-add:before {
+ content: '\E44E';
+}
+.t-icon-grid-view-filled:before {
+ content: '\E44F';
+}
+.t-icon-grid-view:before {
+ content: '\E450';
+}
+.t-icon-guitar-filled:before {
+ content: '\E451';
+}
+.t-icon-guitar:before {
+ content: '\E452';
+}
+.t-icon-hamburger-filled:before {
+ content: '\E453';
+}
+.t-icon-hamburger:before {
+ content: '\E454';
+}
+.t-icon-happy-filled:before {
+ content: '\E455';
+}
+.t-icon-happy:before {
+ content: '\E456';
+}
+.t-icon-hard-disk-storage-filled:before {
+ content: '\E457';
+}
+.t-icon-hard-disk-storage:before {
+ content: '\E458';
+}
+.t-icon-hard-drive-filled:before {
+ content: '\E459';
+}
+.t-icon-hard-drive:before {
+ content: '\E45A';
+}
+.t-icon-hashtag:before {
+ content: '\E45B';
+}
+.t-icon-hd-filled:before {
+ content: '\E45C';
+}
+.t-icon-hd:before {
+ content: '\E45D';
+}
+.t-icon-heart-filled:before {
+ content: '\E45E';
+}
+.t-icon-heart:before {
+ content: '\E45F';
+}
+.t-icon-help-circle-filled:before {
+ content: '\E460';
+}
+.t-icon-help-circle:before {
+ content: '\E461';
+}
+.t-icon-help-rectangle-filled:before {
+ content: '\E462';
+}
+.t-icon-help-rectangle:before {
+ content: '\E463';
+}
+.t-icon-help:before {
+ content: '\E464';
+}
+.t-icon-high-level-filled:before {
+ content: '\E465';
+}
+.t-icon-high-level:before {
+ content: '\E466';
+}
+.t-icon-highlight-1-filled:before {
+ content: '\E467';
+}
+.t-icon-highlight-1:before {
+ content: '\E468';
+}
+.t-icon-highlight:before {
+ content: '\E469';
+}
+.t-icon-highlighted-block-filled:before {
+ content: '\E46A';
+}
+.t-icon-highlighted-block:before {
+ content: '\E46B';
+}
+.t-icon-history-setting:before {
+ content: '\E46C';
+}
+.t-icon-history:before {
+ content: '\E46D';
+}
+.t-icon-home-filled:before {
+ content: '\E46E';
+}
+.t-icon-home:before {
+ content: '\E46F';
+}
+.t-icon-horizontal-filled:before {
+ content: '\E470';
+}
+.t-icon-horizontal:before {
+ content: '\E471';
+}
+.t-icon-hospital-1-filled:before {
+ content: '\E472';
+}
+.t-icon-hospital-1:before {
+ content: '\E473';
+}
+.t-icon-hospital-filled:before {
+ content: '\E474';
+}
+.t-icon-hospital:before {
+ content: '\E475';
+}
+.t-icon-hotspot-wave-filled:before {
+ content: '\E476';
+}
+.t-icon-hotspot-wave:before {
+ content: '\E477';
+}
+.t-icon-hourglass-filled:before {
+ content: '\E478';
+}
+.t-icon-hourglass:before {
+ content: '\E479';
+}
+.t-icon-houses-1-filled:before {
+ content: '\E47A';
+}
+.t-icon-houses-1:before {
+ content: '\E47B';
+}
+.t-icon-houses-2-filled:before {
+ content: '\E47C';
+}
+.t-icon-houses-2:before {
+ content: '\E47D';
+}
+.t-icon-houses-filled:before {
+ content: '\E47E';
+}
+.t-icon-houses:before {
+ content: '\E47F';
+}
+.t-icon-html5-filled:before {
+ content: '\E480';
+}
+.t-icon-html5:before {
+ content: '\E481';
+}
+.t-icon-https-filled:before {
+ content: '\E482';
+}
+.t-icon-https:before {
+ content: '\E483';
+}
+.t-icon-ice-cream-filled:before {
+ content: '\E484';
+}
+.t-icon-ice-cream:before {
+ content: '\E485';
+}
+.t-icon-icon-filled:before {
+ content: '\E486';
+}
+.t-icon-icon:before {
+ content: '\E487';
+}
+.t-icon-image-1-filled:before {
+ content: '\E488';
+}
+.t-icon-image-1:before {
+ content: '\E489';
+}
+.t-icon-image-add-filled:before {
+ content: '\E48A';
+}
+.t-icon-image-add:before {
+ content: '\E48B';
+}
+.t-icon-image-carousel-filled:before {
+ content: '\E48C';
+}
+.t-icon-image-carousel:before {
+ content: '\E48D';
+}
+.t-icon-image-edit-filled:before {
+ content: '\E48E';
+}
+.t-icon-image-edit:before {
+ content: '\E48F';
+}
+.t-icon-image-error-filled:before {
+ content: '\E490';
+}
+.t-icon-image-error:before {
+ content: '\E491';
+}
+.t-icon-image-filled:before {
+ content: '\E492';
+}
+.t-icon-image-off-filled:before {
+ content: '\E493';
+}
+.t-icon-image-off:before {
+ content: '\E494';
+}
+.t-icon-image-search-filled:before {
+ content: '\E495';
+}
+.t-icon-image-search:before {
+ content: '\E496';
+}
+.t-icon-image:before {
+ content: '\E497';
+}
+.t-icon-import:before {
+ content: '\E498';
+}
+.t-icon-indent-left:before {
+ content: '\E499';
+}
+.t-icon-indent-right:before {
+ content: '\E49A';
+}
+.t-icon-indicator-filled:before {
+ content: '\E49B';
+}
+.t-icon-indicator:before {
+ content: '\E49C';
+}
+.t-icon-info-circle-filled:before {
+ content: '\E49D';
+}
+.t-icon-info-circle:before {
+ content: '\E49E';
+}
+.t-icon-ink-filled:before {
+ content: '\E49F';
+}
+.t-icon-ink:before {
+ content: '\E4A0';
+}
+.t-icon-install-desktop-filled:before {
+ content: '\E4A1';
+}
+.t-icon-install-desktop:before {
+ content: '\E4A2';
+}
+.t-icon-install-filled:before {
+ content: '\E4A3';
+}
+.t-icon-install-mobile-filled:before {
+ content: '\E4A4';
+}
+.t-icon-install-mobile:before {
+ content: '\E4A5';
+}
+.t-icon-install:before {
+ content: '\E4A6';
+}
+.t-icon-institution-checked-filled:before {
+ content: '\E4A7';
+}
+.t-icon-institution-checked:before {
+ content: '\E4A8';
+}
+.t-icon-institution-filled:before {
+ content: '\E4A9';
+}
+.t-icon-institution:before {
+ content: '\E4AA';
+}
+.t-icon-internet-filled:before {
+ content: '\E4AB';
+}
+.t-icon-internet:before {
+ content: '\E4AC';
+}
+.t-icon-ipod-filled:before {
+ content: '\E4AD';
+}
+.t-icon-ipod:before {
+ content: '\E4AE';
+}
+.t-icon-japanese-rectangle-filled:before {
+ content: '\E4AF';
+}
+.t-icon-japanese-rectangle:before {
+ content: '\E4B0';
+}
+.t-icon-joyful-filled:before {
+ content: '\E4B1';
+}
+.t-icon-joyful:before {
+ content: '\E4B2';
+}
+.t-icon-jump-double:before {
+ content: '\E4B3';
+}
+.t-icon-jump-off:before {
+ content: '\E4B4';
+}
+.t-icon-jump:before {
+ content: '\E4B5';
+}
+.t-icon-key-filled:before {
+ content: '\E4B6';
+}
+.t-icon-key:before {
+ content: '\E4B7';
+}
+.t-icon-keyboard-filled:before {
+ content: '\E4B8';
+}
+.t-icon-keyboard:before {
+ content: '\E4B9';
+}
+.t-icon-korean-rectangle-filled:before {
+ content: '\E4BA';
+}
+.t-icon-korean-rectangle:before {
+ content: '\E4BB';
+}
+.t-icon-laptop-filled:before {
+ content: '\E4BC';
+}
+.t-icon-laptop:before {
+ content: '\E4BD';
+}
+.t-icon-layers-filled:before {
+ content: '\E4BE';
+}
+.t-icon-layers:before {
+ content: '\E4BF';
+}
+.t-icon-layout-filled:before {
+ content: '\E4C0';
+}
+.t-icon-layout:before {
+ content: '\E4C1';
+}
+.t-icon-leaderboard-filled:before {
+ content: '\E4C2';
+}
+.t-icon-leaderboard:before {
+ content: '\E4C3';
+}
+.t-icon-lemon-filled:before {
+ content: '\E4C4';
+}
+.t-icon-lemon-slice-filled:before {
+ content: '\E4C5';
+}
+.t-icon-lemon-slice:before {
+ content: '\E4C6';
+}
+.t-icon-lemon:before {
+ content: '\E4C7';
+}
+.t-icon-less-than-or-equal:before {
+ content: '\E4C8';
+}
+.t-icon-less-than:before {
+ content: '\E4C9';
+}
+.t-icon-letters-a:before {
+ content: '\E4CA';
+}
+.t-icon-letters-b:before {
+ content: '\E4CB';
+}
+.t-icon-letters-c:before {
+ content: '\E4CC';
+}
+.t-icon-letters-d:before {
+ content: '\E4CD';
+}
+.t-icon-letters-e:before {
+ content: '\E4CE';
+}
+.t-icon-letters-f:before {
+ content: '\E4CF';
+}
+.t-icon-letters-g:before {
+ content: '\E4D0';
+}
+.t-icon-letters-h:before {
+ content: '\E4D1';
+}
+.t-icon-letters-i:before {
+ content: '\E4D2';
+}
+.t-icon-letters-j:before {
+ content: '\E4D3';
+}
+.t-icon-letters-k:before {
+ content: '\E4D4';
+}
+.t-icon-letters-l:before {
+ content: '\E4D5';
+}
+.t-icon-letters-m:before {
+ content: '\E4D6';
+}
+.t-icon-letters-n:before {
+ content: '\E4D7';
+}
+.t-icon-letters-o:before {
+ content: '\E4D8';
+}
+.t-icon-letters-p:before {
+ content: '\E4D9';
+}
+.t-icon-letters-q:before {
+ content: '\E4DA';
+}
+.t-icon-letters-r:before {
+ content: '\E4DB';
+}
+.t-icon-letters-s:before {
+ content: '\E4DC';
+}
+.t-icon-letters-t:before {
+ content: '\E4DD';
+}
+.t-icon-letters-u:before {
+ content: '\E4DE';
+}
+.t-icon-letters-v:before {
+ content: '\E4DF';
+}
+.t-icon-letters-w:before {
+ content: '\E4E0';
+}
+.t-icon-letters-x:before {
+ content: '\E4E1';
+}
+.t-icon-letters-y:before {
+ content: '\E4E2';
+}
+.t-icon-letters-z:before {
+ content: '\E4E3';
+}
+.t-icon-lightbulb-circle-filled:before {
+ content: '\E4E4';
+}
+.t-icon-lightbulb-circle:before {
+ content: '\E4E5';
+}
+.t-icon-lightbulb-filled:before {
+ content: '\E4E6';
+}
+.t-icon-lightbulb:before {
+ content: '\E4E7';
+}
+.t-icon-lighthouse-1-filled:before {
+ content: '\E4E8';
+}
+.t-icon-lighthouse-1:before {
+ content: '\E4E9';
+}
+.t-icon-lighthouse-2-filled:before {
+ content: '\E4EA';
+}
+.t-icon-lighthouse-2:before {
+ content: '\E4EB';
+}
+.t-icon-lighthouse-filled:before {
+ content: '\E4EC';
+}
+.t-icon-lighthouse:before {
+ content: '\E4ED';
+}
+.t-icon-lighting-circle-filled:before {
+ content: '\E4EE';
+}
+.t-icon-lighting-circle:before {
+ content: '\E4EF';
+}
+.t-icon-line-height:before {
+ content: '\E4F0';
+}
+.t-icon-link-1:before {
+ content: '\E4F1';
+}
+.t-icon-link-transform:before {
+ content: '\E4F2';
+}
+.t-icon-link-unlink:before {
+ content: '\E4F3';
+}
+.t-icon-link:before {
+ content: '\E4F4';
+}
+.t-icon-liquor-filled:before {
+ content: '\E4F5';
+}
+.t-icon-liquor:before {
+ content: '\E4F6';
+}
+.t-icon-list-bug-filled:before {
+ content: '\E4F7';
+}
+.t-icon-list-bug:before {
+ content: '\E4F8';
+}
+.t-icon-list-demand:before {
+ content: '\E4F9';
+}
+.t-icon-list-numbered:before {
+ content: '\E4FA';
+}
+.t-icon-load:before {
+ content: '\E4FB';
+}
+.t-icon-loading:before {
+ content: '\E4FC';
+}
+.t-icon-location-1-filled:before {
+ content: '\E4FD';
+}
+.t-icon-location-1:before {
+ content: '\E4FE';
+}
+.t-icon-location-enlargement-filled:before {
+ content: '\E4FF';
+}
+.t-icon-location-enlargement:before {
+ content: '\E500';
+}
+.t-icon-location-error-filled:before {
+ content: '\E501';
+}
+.t-icon-location-error:before {
+ content: '\E502';
+}
+.t-icon-location-filled:before {
+ content: '\E503';
+}
+.t-icon-location-parking-place-filled:before {
+ content: '\E504';
+}
+.t-icon-location-parking-place:before {
+ content: '\E505';
+}
+.t-icon-location-reduction-filled:before {
+ content: '\E506';
+}
+.t-icon-location-reduction:before {
+ content: '\E507';
+}
+.t-icon-location-setting-filled:before {
+ content: '\E508';
+}
+.t-icon-location-setting:before {
+ content: '\E509';
+}
+.t-icon-location:before {
+ content: '\E50A';
+}
+.t-icon-lock-checked-filled:before {
+ content: '\E50B';
+}
+.t-icon-lock-checked:before {
+ content: '\E50C';
+}
+.t-icon-lock-off-filled:before {
+ content: '\E50D';
+}
+.t-icon-lock-off:before {
+ content: '\E50E';
+}
+.t-icon-lock-on-filled:before {
+ content: '\E50F';
+}
+.t-icon-lock-on:before {
+ content: '\E510';
+}
+.t-icon-lock-time-filled:before {
+ content: '\E511';
+}
+.t-icon-lock-time:before {
+ content: '\E512';
+}
+.t-icon-login:before {
+ content: '\E513';
+}
+.t-icon-logo-adobe-illustrate-filled:before {
+ content: '\E514';
+}
+.t-icon-logo-adobe-illustrate:before {
+ content: '\E515';
+}
+.t-icon-logo-adobe-lightroom-filled:before {
+ content: '\E516';
+}
+.t-icon-logo-adobe-lightroom:before {
+ content: '\E517';
+}
+.t-icon-logo-adobe-photoshop-filled:before {
+ content: '\E518';
+}
+.t-icon-logo-adobe-photoshop:before {
+ content: '\E519';
+}
+.t-icon-logo-alipay-filled:before {
+ content: '\E51A';
+}
+.t-icon-logo-alipay:before {
+ content: '\E51B';
+}
+.t-icon-logo-android-filled:before {
+ content: '\E51C';
+}
+.t-icon-logo-android:before {
+ content: '\E51D';
+}
+.t-icon-logo-apple-filled:before {
+ content: '\E51E';
+}
+.t-icon-logo-apple:before {
+ content: '\E51F';
+}
+.t-icon-logo-behance-filled:before {
+ content: '\E520';
+}
+.t-icon-logo-behance:before {
+ content: '\E521';
+}
+.t-icon-logo-chrome-filled:before {
+ content: '\E522';
+}
+.t-icon-logo-chrome:before {
+ content: '\E523';
+}
+.t-icon-logo-cinema4d-filled:before {
+ content: '\E524';
+}
+.t-icon-logo-cinema4d:before {
+ content: '\E525';
+}
+.t-icon-logo-cnb-filled:before {
+ content: '\E526';
+}
+.t-icon-logo-cnb:before {
+ content: '\E527';
+}
+.t-icon-logo-codepen:before {
+ content: '\E528';
+}
+.t-icon-logo-codesandbox:before {
+ content: '\E529';
+}
+.t-icon-logo-codesign:before {
+ content: '\E52A';
+}
+.t-icon-logo-dribbble-filled:before {
+ content: '\E52B';
+}
+.t-icon-logo-dribbble:before {
+ content: '\E52C';
+}
+.t-icon-logo-facebook-filled:before {
+ content: '\E52D';
+}
+.t-icon-logo-facebook:before {
+ content: '\E52E';
+}
+.t-icon-logo-figma-filled:before {
+ content: '\E52F';
+}
+.t-icon-logo-figma:before {
+ content: '\E530';
+}
+.t-icon-logo-framer-filled:before {
+ content: '\E531';
+}
+.t-icon-logo-framer:before {
+ content: '\E532';
+}
+.t-icon-logo-github-filled:before {
+ content: '\E533';
+}
+.t-icon-logo-github:before {
+ content: '\E534';
+}
+.t-icon-logo-gitlab-filled:before {
+ content: '\E535';
+}
+.t-icon-logo-gitlab:before {
+ content: '\E536';
+}
+.t-icon-logo-hiflow-filled:before {
+ content: '\E537';
+}
+.t-icon-logo-hiflow:before {
+ content: '\E538';
+}
+.t-icon-logo-ie-filled:before {
+ content: '\E539';
+}
+.t-icon-logo-ie:before {
+ content: '\E53A';
+}
+.t-icon-logo-instagram-filled:before {
+ content: '\E53B';
+}
+.t-icon-logo-instagram:before {
+ content: '\E53C';
+}
+.t-icon-logo-iwiki-filled:before {
+ content: '\E53D';
+}
+.t-icon-logo-iwiki:before {
+ content: '\E53E';
+}
+.t-icon-logo-markdown-filled:before {
+ content: '\E53F';
+}
+.t-icon-logo-markdown:before {
+ content: '\E540';
+}
+.t-icon-logo-miniprogram-filled:before {
+ content: '\E541';
+}
+.t-icon-logo-miniprogram:before {
+ content: '\E542';
+}
+.t-icon-logo-qq-filled:before {
+ content: '\E543';
+}
+.t-icon-logo-qq:before {
+ content: '\E544';
+}
+.t-icon-logo-stackblitz-filled:before {
+ content: '\E545';
+}
+.t-icon-logo-stackblitz:before {
+ content: '\E546';
+}
+.t-icon-logo-tapd-filled:before {
+ content: '\E547';
+}
+.t-icon-logo-tapd:before {
+ content: '\E548';
+}
+.t-icon-logo-tbeacon-filled:before {
+ content: '\E549';
+}
+.t-icon-logo-tbeacon:before {
+ content: '\E54A';
+}
+.t-icon-logo-tdesign-filled:before {
+ content: '\E54B';
+}
+.t-icon-logo-tdesign:before {
+ content: '\E54C';
+}
+.t-icon-logo-tencentcode:before {
+ content: '\E54D';
+}
+.t-icon-logo-tencentmeeting-filled:before {
+ content: '\E54E';
+}
+.t-icon-logo-tencentmeeting:before {
+ content: '\E54F';
+}
+.t-icon-logo-twitter-filled:before {
+ content: '\E550';
+}
+.t-icon-logo-twitter:before {
+ content: '\E551';
+}
+.t-icon-logo-wechat-stroke-filled:before {
+ content: '\E552';
+}
+.t-icon-logo-wechat-stroke:before {
+ content: '\E553';
+}
+.t-icon-logo-wechat-workdocs-filled:before {
+ content: '\E554';
+}
+.t-icon-logo-wechat-workdocs:before {
+ content: '\E555';
+}
+.t-icon-logo-wechatpay-filled:before {
+ content: '\E556';
+}
+.t-icon-logo-wechatpay:before {
+ content: '\E557';
+}
+.t-icon-logo-wecom-filled:before {
+ content: '\E558';
+}
+.t-icon-logo-wecom:before {
+ content: '\E559';
+}
+.t-icon-logo-windows-filled:before {
+ content: '\E55A';
+}
+.t-icon-logo-windows:before {
+ content: '\E55B';
+}
+.t-icon-logo-xiaomareport-filled:before {
+ content: '\E55C';
+}
+.t-icon-logo-xiaomareport:before {
+ content: '\E55D';
+}
+.t-icon-logo-youtube-filled:before {
+ content: '\E55E';
+}
+.t-icon-logo-youtube:before {
+ content: '\E55F';
+}
+.t-icon-logout:before {
+ content: '\E560';
+}
+.t-icon-look-around-filled:before {
+ content: '\E561';
+}
+.t-icon-look-around:before {
+ content: '\E562';
+}
+.t-icon-loudspeaker-filled:before {
+ content: '\E563';
+}
+.t-icon-loudspeaker:before {
+ content: '\E564';
+}
+.t-icon-mail-filled:before {
+ content: '\E565';
+}
+.t-icon-mail:before {
+ content: '\E566';
+}
+.t-icon-map-3d-filled:before {
+ content: '\E567';
+}
+.t-icon-map-3d:before {
+ content: '\E568';
+}
+.t-icon-map-add-filled:before {
+ content: '\E569';
+}
+.t-icon-map-add:before {
+ content: '\E56A';
+}
+.t-icon-map-aiming-filled:before {
+ content: '\E56B';
+}
+.t-icon-map-aiming:before {
+ content: '\E56C';
+}
+.t-icon-map-blocked-filled:before {
+ content: '\E56D';
+}
+.t-icon-map-blocked:before {
+ content: '\E56E';
+}
+.t-icon-map-bubble-filled:before {
+ content: '\E56F';
+}
+.t-icon-map-bubble:before {
+ content: '\E570';
+}
+.t-icon-map-cancel-filled:before {
+ content: '\E571';
+}
+.t-icon-map-cancel:before {
+ content: '\E572';
+}
+.t-icon-map-chat-filled:before {
+ content: '\E573';
+}
+.t-icon-map-chat:before {
+ content: '\E574';
+}
+.t-icon-map-checked-filled:before {
+ content: '\E575';
+}
+.t-icon-map-checked:before {
+ content: '\E576';
+}
+.t-icon-map-collection-filled:before {
+ content: '\E577';
+}
+.t-icon-map-collection:before {
+ content: '\E578';
+}
+.t-icon-map-connection-filled:before {
+ content: '\E579';
+}
+.t-icon-map-connection:before {
+ content: '\E57A';
+}
+.t-icon-map-distance-filled:before {
+ content: '\E57B';
+}
+.t-icon-map-distance:before {
+ content: '\E57C';
+}
+.t-icon-map-double-filled:before {
+ content: '\E57D';
+}
+.t-icon-map-double:before {
+ content: '\E57E';
+}
+.t-icon-map-edit-filled:before {
+ content: '\E57F';
+}
+.t-icon-map-edit:before {
+ content: '\E580';
+}
+.t-icon-map-filled:before {
+ content: '\E581';
+}
+.t-icon-map-grid-filled:before {
+ content: '\E582';
+}
+.t-icon-map-grid:before {
+ content: '\E583';
+}
+.t-icon-map-information-1-filled:before {
+ content: '\E584';
+}
+.t-icon-map-information-1:before {
+ content: '\E585';
+}
+.t-icon-map-information-2-filled:before {
+ content: '\E586';
+}
+.t-icon-map-information-2:before {
+ content: '\E587';
+}
+.t-icon-map-information-filled:before {
+ content: '\E588';
+}
+.t-icon-map-information:before {
+ content: '\E589';
+}
+.t-icon-map-location-filled:before {
+ content: '\E58A';
+}
+.t-icon-map-location:before {
+ content: '\E58B';
+}
+.t-icon-map-locked-filled:before {
+ content: '\E58C';
+}
+.t-icon-map-locked:before {
+ content: '\E58D';
+}
+.t-icon-map-marked-filled:before {
+ content: '\E58E';
+}
+.t-icon-map-marked:before {
+ content: '\E58F';
+}
+.t-icon-map-navigation-filled:before {
+ content: '\E590';
+}
+.t-icon-map-navigation:before {
+ content: '\E591';
+}
+.t-icon-map-outline-filled:before {
+ content: '\E592';
+}
+.t-icon-map-outline:before {
+ content: '\E593';
+}
+.t-icon-map-route-planning-filled:before {
+ content: '\E594';
+}
+.t-icon-map-route-planning:before {
+ content: '\E595';
+}
+.t-icon-map-ruler-filled:before {
+ content: '\E596';
+}
+.t-icon-map-ruler:before {
+ content: '\E597';
+}
+.t-icon-map-safety-filled:before {
+ content: '\E598';
+}
+.t-icon-map-safety:before {
+ content: '\E599';
+}
+.t-icon-map-search-1-filled:before {
+ content: '\E59A';
+}
+.t-icon-map-search-1:before {
+ content: '\E59B';
+}
+.t-icon-map-search-filled:before {
+ content: '\E59C';
+}
+.t-icon-map-search:before {
+ content: '\E59D';
+}
+.t-icon-map-setting-filled:before {
+ content: '\E59E';
+}
+.t-icon-map-setting:before {
+ content: '\E59F';
+}
+.t-icon-map-unlocked-filled:before {
+ content: '\E5A0';
+}
+.t-icon-map-unlocked:before {
+ content: '\E5A1';
+}
+.t-icon-map:before {
+ content: '\E5A2';
+}
+.t-icon-mark-as-unread-filled:before {
+ content: '\E5A3';
+}
+.t-icon-mark-as-unread:before {
+ content: '\E5A4';
+}
+.t-icon-markup-filled:before {
+ content: '\E5A5';
+}
+.t-icon-markup:before {
+ content: '\E5A6';
+}
+.t-icon-mathematics-filled:before {
+ content: '\E5A7';
+}
+.t-icon-mathematics:before {
+ content: '\E5A8';
+}
+.t-icon-measurement-1-filled:before {
+ content: '\E5A9';
+}
+.t-icon-measurement-1:before {
+ content: '\E5AA';
+}
+.t-icon-measurement-2-filled:before {
+ content: '\E5AB';
+}
+.t-icon-measurement-2:before {
+ content: '\E5AC';
+}
+.t-icon-measurement-filled:before {
+ content: '\E5AD';
+}
+.t-icon-measurement:before {
+ content: '\E5AE';
+}
+.t-icon-meat-pepper-filled:before {
+ content: '\E5AF';
+}
+.t-icon-meat-pepper:before {
+ content: '\E5B0';
+}
+.t-icon-media-library-filled:before {
+ content: '\E5B1';
+}
+.t-icon-media-library:before {
+ content: '\E5B2';
+}
+.t-icon-member-filled:before {
+ content: '\E5B3';
+}
+.t-icon-member:before {
+ content: '\E5B4';
+}
+.t-icon-mentioned-filled:before {
+ content: '\E5B5';
+}
+.t-icon-mentioned:before {
+ content: '\E5B6';
+}
+.t-icon-menu-application:before {
+ content: '\E5B7';
+}
+.t-icon-menu-filled:before {
+ content: '\E5B8';
+}
+.t-icon-menu-fold:before {
+ content: '\E5B9';
+}
+.t-icon-menu-unfold:before {
+ content: '\E5BA';
+}
+.t-icon-menu:before {
+ content: '\E5BB';
+}
+.t-icon-merge-cells-filled:before {
+ content: '\E5BC';
+}
+.t-icon-merge-cells:before {
+ content: '\E5BD';
+}
+.t-icon-mermaid-filled:before {
+ content: '\E5BE';
+}
+.t-icon-mermaid:before {
+ content: '\E5BF';
+}
+.t-icon-microphone-1-filled:before {
+ content: '\E5C0';
+}
+.t-icon-microphone-1:before {
+ content: '\E5C1';
+}
+.t-icon-microphone-2-filled:before {
+ content: '\E5C2';
+}
+.t-icon-microphone-2:before {
+ content: '\E5C3';
+}
+.t-icon-microphone-filled:before {
+ content: '\E5C4';
+}
+.t-icon-microphone:before {
+ content: '\E5C5';
+}
+.t-icon-milk-filled:before {
+ content: '\E5C6';
+}
+.t-icon-milk:before {
+ content: '\E5C7';
+}
+.t-icon-mind-map-filled:before {
+ content: '\E5C8';
+}
+.t-icon-mind-map:before {
+ content: '\E5C9';
+}
+.t-icon-minus-circle-filled:before {
+ content: '\E5CA';
+}
+.t-icon-minus-circle:before {
+ content: '\E5CB';
+}
+.t-icon-minus-rectangle-filled:before {
+ content: '\E5CC';
+}
+.t-icon-minus-rectangle:before {
+ content: '\E5CD';
+}
+.t-icon-minus:before {
+ content: '\E5CE';
+}
+.t-icon-mirror-filled:before {
+ content: '\E5CF';
+}
+.t-icon-mirror:before {
+ content: '\E5D0';
+}
+.t-icon-mobile-blocked-filled:before {
+ content: '\E5D1';
+}
+.t-icon-mobile-blocked:before {
+ content: '\E5D2';
+}
+.t-icon-mobile-filled:before {
+ content: '\E5D3';
+}
+.t-icon-mobile-list-filled:before {
+ content: '\E5D4';
+}
+.t-icon-mobile-list:before {
+ content: '\E5D5';
+}
+.t-icon-mobile-navigation-filled:before {
+ content: '\E5D6';
+}
+.t-icon-mobile-navigation:before {
+ content: '\E5D7';
+}
+.t-icon-mobile-shortcut-filled:before {
+ content: '\E5D8';
+}
+.t-icon-mobile-shortcut:before {
+ content: '\E5D9';
+}
+.t-icon-mobile-vibrate-filled:before {
+ content: '\E5DA';
+}
+.t-icon-mobile-vibrate:before {
+ content: '\E5DB';
+}
+.t-icon-mobile:before {
+ content: '\E5DC';
+}
+.t-icon-mode-dark-filled:before {
+ content: '\E5DD';
+}
+.t-icon-mode-dark:before {
+ content: '\E5DE';
+}
+.t-icon-mode-embedding-filled:before {
+ content: '\E5DF';
+}
+.t-icon-mode-embedding:before {
+ content: '\E5E0';
+}
+.t-icon-mode-light-filled:before {
+ content: '\E5E1';
+}
+.t-icon-mode-light:before {
+ content: '\E5E2';
+}
+.t-icon-mode-preview-filled:before {
+ content: '\E5E3';
+}
+.t-icon-mode-preview:before {
+ content: '\E5E4';
+}
+.t-icon-mode-text-filled:before {
+ content: '\E5E5';
+}
+.t-icon-mode-text:before {
+ content: '\E5E6';
+}
+.t-icon-module-filled:before {
+ content: '\E5E7';
+}
+.t-icon-module:before {
+ content: '\E5E8';
+}
+.t-icon-money-filled:before {
+ content: '\E5E9';
+}
+.t-icon-money:before {
+ content: '\E5EA';
+}
+.t-icon-monument-filled:before {
+ content: '\E5EB';
+}
+.t-icon-monument:before {
+ content: '\E5EC';
+}
+.t-icon-moon-fall-filled:before {
+ content: '\E5ED';
+}
+.t-icon-moon-fall:before {
+ content: '\E5EE';
+}
+.t-icon-moon-filled:before {
+ content: '\E5EF';
+}
+.t-icon-moon-rising-filled:before {
+ content: '\E5F0';
+}
+.t-icon-moon-rising:before {
+ content: '\E5F1';
+}
+.t-icon-moon:before {
+ content: '\E5F2';
+}
+.t-icon-more:before {
+ content: '\E5F3';
+}
+.t-icon-mosaic-filled:before {
+ content: '\E5F4';
+}
+.t-icon-mosaic:before {
+ content: '\E5F5';
+}
+.t-icon-mosque-1-filled:before {
+ content: '\E5F6';
+}
+.t-icon-mosque-1:before {
+ content: '\E5F7';
+}
+.t-icon-mosque-filled:before {
+ content: '\E5F8';
+}
+.t-icon-mosque:before {
+ content: '\E5F9';
+}
+.t-icon-mouse-filled:before {
+ content: '\E5FA';
+}
+.t-icon-mouse:before {
+ content: '\E5FB';
+}
+.t-icon-move-1:before {
+ content: '\E5FC';
+}
+.t-icon-move:before {
+ content: '\E5FD';
+}
+.t-icon-movie-clapper-filled:before {
+ content: '\E5FE';
+}
+.t-icon-movie-clapper:before {
+ content: '\E5FF';
+}
+.t-icon-multiply:before {
+ content: '\E600';
+}
+.t-icon-museum-1-filled:before {
+ content: '\E601';
+}
+.t-icon-museum-1:before {
+ content: '\E602';
+}
+.t-icon-museum-2-filled:before {
+ content: '\E603';
+}
+.t-icon-museum-2:before {
+ content: '\E604';
+}
+.t-icon-museum-filled:before {
+ content: '\E605';
+}
+.t-icon-museum:before {
+ content: '\E606';
+}
+.t-icon-mushroom-1-filled:before {
+ content: '\E607';
+}
+.t-icon-mushroom-1:before {
+ content: '\E608';
+}
+.t-icon-mushroom-filled:before {
+ content: '\E609';
+}
+.t-icon-mushroom:before {
+ content: '\E60A';
+}
+.t-icon-music-1-filled:before {
+ content: '\E60B';
+}
+.t-icon-music-1:before {
+ content: '\E60C';
+}
+.t-icon-music-2-filled:before {
+ content: '\E60D';
+}
+.t-icon-music-2:before {
+ content: '\E60E';
+}
+.t-icon-music-filled:before {
+ content: '\E60F';
+}
+.t-icon-music-rectangle-add-filled:before {
+ content: '\E610';
+}
+.t-icon-music-rectangle-add:before {
+ content: '\E611';
+}
+.t-icon-music:before {
+ content: '\E612';
+}
+.t-icon-navigation-arrow-filled:before {
+ content: '\E613';
+}
+.t-icon-navigation-arrow:before {
+ content: '\E614';
+}
+.t-icon-next-filled:before {
+ content: '\E615';
+}
+.t-icon-next:before {
+ content: '\E616';
+}
+.t-icon-no-expression-filled:before {
+ content: '\E617';
+}
+.t-icon-no-expression:before {
+ content: '\E618';
+}
+.t-icon-no-result-filled:before {
+ content: '\E619';
+}
+.t-icon-no-result:before {
+ content: '\E61A';
+}
+.t-icon-noodle-filled:before {
+ content: '\E61B';
+}
+.t-icon-noodle:before {
+ content: '\E61C';
+}
+.t-icon-notification-add-filled:before {
+ content: '\E61D';
+}
+.t-icon-notification-add:before {
+ content: '\E61E';
+}
+.t-icon-notification-circle-filled:before {
+ content: '\E61F';
+}
+.t-icon-notification-circle:before {
+ content: '\E620';
+}
+.t-icon-notification-error-filled:before {
+ content: '\E621';
+}
+.t-icon-notification-error:before {
+ content: '\E622';
+}
+.t-icon-notification-filled:before {
+ content: '\E623';
+}
+.t-icon-notification:before {
+ content: '\E624';
+}
+.t-icon-numbers-0-1:before {
+ content: '\E625';
+}
+.t-icon-numbers-0:before {
+ content: '\E626';
+}
+.t-icon-numbers-1-1:before {
+ content: '\E627';
+}
+.t-icon-numbers-1:before {
+ content: '\E628';
+}
+.t-icon-numbers-2-1:before {
+ content: '\E629';
+}
+.t-icon-numbers-2:before {
+ content: '\E62A';
+}
+.t-icon-numbers-3-1:before {
+ content: '\E62B';
+}
+.t-icon-numbers-3:before {
+ content: '\E62C';
+}
+.t-icon-numbers-4-1:before {
+ content: '\E62D';
+}
+.t-icon-numbers-4:before {
+ content: '\E62E';
+}
+.t-icon-numbers-5-1:before {
+ content: '\E62F';
+}
+.t-icon-numbers-5:before {
+ content: '\E630';
+}
+.t-icon-numbers-6-1:before {
+ content: '\E631';
+}
+.t-icon-numbers-6:before {
+ content: '\E632';
+}
+.t-icon-numbers-7-1:before {
+ content: '\E633';
+}
+.t-icon-numbers-7:before {
+ content: '\E634';
+}
+.t-icon-numbers-8-1:before {
+ content: '\E635';
+}
+.t-icon-numbers-8:before {
+ content: '\E636';
+}
+.t-icon-numbers-9-1:before {
+ content: '\E637';
+}
+.t-icon-numbers-9:before {
+ content: '\E638';
+}
+.t-icon-numbers-circle-1-filled:before {
+ content: '\E639';
+}
+.t-icon-numbers-circle-1:before {
+ content: '\E63A';
+}
+.t-icon-numbers-circle-2-filled:before {
+ content: '\E63B';
+}
+.t-icon-numbers-circle-2:before {
+ content: '\E63C';
+}
+.t-icon-numbers-circle-3-filled:before {
+ content: '\E63D';
+}
+.t-icon-numbers-circle-3:before {
+ content: '\E63E';
+}
+.t-icon-numbers-circle-4-filled:before {
+ content: '\E63F';
+}
+.t-icon-numbers-circle-4:before {
+ content: '\E640';
+}
+.t-icon-nut-filled:before {
+ content: '\E641';
+}
+.t-icon-nut:before {
+ content: '\E642';
+}
+.t-icon-object-storage:before {
+ content: '\E643';
+}
+.t-icon-open-mouth-filled:before {
+ content: '\E644';
+}
+.t-icon-open-mouth:before {
+ content: '\E645';
+}
+.t-icon-opera-filled:before {
+ content: '\E646';
+}
+.t-icon-opera:before {
+ content: '\E647';
+}
+.t-icon-order-adjustment-column:before {
+ content: '\E648';
+}
+.t-icon-order-ascending:before {
+ content: '\E649';
+}
+.t-icon-order-descending:before {
+ content: '\E64A';
+}
+.t-icon-order-list:before {
+ content: '\E64B';
+}
+.t-icon-order:before {
+ content: '\E64C';
+}
+.t-icon-outbox-filled:before {
+ content: '\E64D';
+}
+.t-icon-outbox:before {
+ content: '\E64E';
+}
+.t-icon-page-first:before {
+ content: '\E64F';
+}
+.t-icon-page-head-filled:before {
+ content: '\E650';
+}
+.t-icon-page-head:before {
+ content: '\E651';
+}
+.t-icon-page-included-filled:before {
+ content: '\E652';
+}
+.t-icon-page-included:before {
+ content: '\E653';
+}
+.t-icon-page-last:before {
+ content: '\E654';
+}
+.t-icon-page-tab-filled:before {
+ content: '\E655';
+}
+.t-icon-page-tab:before {
+ content: '\E656';
+}
+.t-icon-palace-1-filled:before {
+ content: '\E657';
+}
+.t-icon-palace-1:before {
+ content: '\E658';
+}
+.t-icon-palace-2-filled:before {
+ content: '\E659';
+}
+.t-icon-palace-2:before {
+ content: '\E65A';
+}
+.t-icon-palace-3-filled:before {
+ content: '\E65B';
+}
+.t-icon-palace-3:before {
+ content: '\E65C';
+}
+.t-icon-palace-4-filled:before {
+ content: '\E65D';
+}
+.t-icon-palace-4:before {
+ content: '\E65E';
+}
+.t-icon-palace-filled:before {
+ content: '\E65F';
+}
+.t-icon-palace:before {
+ content: '\E660';
+}
+.t-icon-palette-1-filled:before {
+ content: '\E661';
+}
+.t-icon-palette-1:before {
+ content: '\E662';
+}
+.t-icon-palette-filled:before {
+ content: '\E663';
+}
+.t-icon-palette:before {
+ content: '\E664';
+}
+.t-icon-panorama-horizontal-filled:before {
+ content: '\E665';
+}
+.t-icon-panorama-horizontal:before {
+ content: '\E666';
+}
+.t-icon-panorama-vertical-filled:before {
+ content: '\E667';
+}
+.t-icon-panorama-vertical:before {
+ content: '\E668';
+}
+.t-icon-pantone-filled:before {
+ content: '\E669';
+}
+.t-icon-pantone:before {
+ content: '\E66A';
+}
+.t-icon-parabola:before {
+ content: '\E66B';
+}
+.t-icon-parentheses:before {
+ content: '\E66C';
+}
+.t-icon-paste-filled:before {
+ content: '\E66D';
+}
+.t-icon-paste:before {
+ content: '\E66E';
+}
+.t-icon-patio-filled:before {
+ content: '\E66F';
+}
+.t-icon-patio:before {
+ content: '\E670';
+}
+.t-icon-pause-circle-filled:before {
+ content: '\E671';
+}
+.t-icon-pause-circle-stroke-filled:before {
+ content: '\E672';
+}
+.t-icon-pause-circle-stroke:before {
+ content: '\E673';
+}
+.t-icon-pause-circle:before {
+ content: '\E674';
+}
+.t-icon-pause:before {
+ content: '\E675';
+}
+.t-icon-pea-filled:before {
+ content: '\E676';
+}
+.t-icon-pea:before {
+ content: '\E677';
+}
+.t-icon-peach-filled:before {
+ content: '\E678';
+}
+.t-icon-peach:before {
+ content: '\E679';
+}
+.t-icon-pear-filled:before {
+ content: '\E67A';
+}
+.t-icon-pear:before {
+ content: '\E67B';
+}
+.t-icon-pearl-of-the-orient-filled:before {
+ content: '\E67C';
+}
+.t-icon-pearl-of-the-orient:before {
+ content: '\E67D';
+}
+.t-icon-pen-ball-filled:before {
+ content: '\E67E';
+}
+.t-icon-pen-ball:before {
+ content: '\E67F';
+}
+.t-icon-pen-brush-filled:before {
+ content: '\E680';
+}
+.t-icon-pen-brush:before {
+ content: '\E681';
+}
+.t-icon-pen-filled:before {
+ content: '\E682';
+}
+.t-icon-pen-fluorescence-filled:before {
+ content: '\E683';
+}
+.t-icon-pen-fluorescence:before {
+ content: '\E684';
+}
+.t-icon-pen-mark-filled:before {
+ content: '\E685';
+}
+.t-icon-pen-mark:before {
+ content: '\E686';
+}
+.t-icon-pen-quill-filled:before {
+ content: '\E687';
+}
+.t-icon-pen-quill:before {
+ content: '\E688';
+}
+.t-icon-pen:before {
+ content: '\E689';
+}
+.t-icon-pending-filled:before {
+ content: '\E68A';
+}
+.t-icon-pending:before {
+ content: '\E68B';
+}
+.t-icon-percent:before {
+ content: '\E68C';
+}
+.t-icon-personal-information-filled:before {
+ content: '\E68D';
+}
+.t-icon-personal-information:before {
+ content: '\E68E';
+}
+.t-icon-phone-locked-filled:before {
+ content: '\E68F';
+}
+.t-icon-phone-locked:before {
+ content: '\E690';
+}
+.t-icon-phone-search-filled:before {
+ content: '\E691';
+}
+.t-icon-phone-search:before {
+ content: '\E692';
+}
+.t-icon-pi:before {
+ content: '\E693';
+}
+.t-icon-piano-filled:before {
+ content: '\E694';
+}
+.t-icon-piano:before {
+ content: '\E695';
+}
+.t-icon-pin-filled:before {
+ content: '\E696';
+}
+.t-icon-pin:before {
+ content: '\E697';
+}
+.t-icon-placeholder-filled:before {
+ content: '\E698';
+}
+.t-icon-placeholder:before {
+ content: '\E699';
+}
+.t-icon-plantuml-filled:before {
+ content: '\E69A';
+}
+.t-icon-plantuml:before {
+ content: '\E69B';
+}
+.t-icon-play-chart-filled:before {
+ content: '\E69C';
+}
+.t-icon-play-chart:before {
+ content: '\E69D';
+}
+.t-icon-play-circle-filled:before {
+ content: '\E69E';
+}
+.t-icon-play-circle-stroke-add-filled:before {
+ content: '\E69F';
+}
+.t-icon-play-circle-stroke-add:before {
+ content: '\E6A0';
+}
+.t-icon-play-circle-stroke-filled:before {
+ content: '\E6A1';
+}
+.t-icon-play-circle-stroke:before {
+ content: '\E6A2';
+}
+.t-icon-play-circle:before {
+ content: '\E6A3';
+}
+.t-icon-play-demo-filled:before {
+ content: '\E6A4';
+}
+.t-icon-play-demo:before {
+ content: '\E6A5';
+}
+.t-icon-play-rectangle-filled:before {
+ content: '\E6A6';
+}
+.t-icon-play-rectangle:before {
+ content: '\E6A7';
+}
+.t-icon-play:before {
+ content: '\E6A8';
+}
+.t-icon-plus:before {
+ content: '\E6A9';
+}
+.t-icon-popsicle-filled:before {
+ content: '\E6AA';
+}
+.t-icon-popsicle:before {
+ content: '\E6AB';
+}
+.t-icon-portrait-filled:before {
+ content: '\E6AC';
+}
+.t-icon-portrait:before {
+ content: '\E6AD';
+}
+.t-icon-pout-filled:before {
+ content: '\E6AE';
+}
+.t-icon-pout:before {
+ content: '\E6AF';
+}
+.t-icon-poweroff:before {
+ content: '\E6B0';
+}
+.t-icon-precise-monitor:before {
+ content: '\E6B1';
+}
+.t-icon-previous-filled:before {
+ content: '\E6B2';
+}
+.t-icon-previous:before {
+ content: '\E6B3';
+}
+.t-icon-print-filled:before {
+ content: '\E6B4';
+}
+.t-icon-print:before {
+ content: '\E6B5';
+}
+.t-icon-pumpkin-filled:before {
+ content: '\E6B6';
+}
+.t-icon-pumpkin:before {
+ content: '\E6B7';
+}
+.t-icon-pyramid-filled:before {
+ content: '\E6B8';
+}
+.t-icon-pyramid-maya-filled:before {
+ content: '\E6B9';
+}
+.t-icon-pyramid-maya:before {
+ content: '\E6BA';
+}
+.t-icon-pyramid:before {
+ content: '\E6BB';
+}
+.t-icon-qrcode:before {
+ content: '\E6BC';
+}
+.t-icon-quadratic:before {
+ content: '\E6BD';
+}
+.t-icon-questionnaire-double-filled:before {
+ content: '\E6BE';
+}
+.t-icon-questionnaire-double:before {
+ content: '\E6BF';
+}
+.t-icon-questionnaire-filled:before {
+ content: '\E6C0';
+}
+.t-icon-questionnaire:before {
+ content: '\E6C1';
+}
+.t-icon-queue-filled:before {
+ content: '\E6C2';
+}
+.t-icon-queue:before {
+ content: '\E6C3';
+}
+.t-icon-quote-filled:before {
+ content: '\E6C4';
+}
+.t-icon-quote:before {
+ content: '\E6C5';
+}
+.t-icon-radar:before {
+ content: '\E6C6';
+}
+.t-icon-radio-1-filled:before {
+ content: '\E6C7';
+}
+.t-icon-radio-1:before {
+ content: '\E6C8';
+}
+.t-icon-radio-2-filled:before {
+ content: '\E6C9';
+}
+.t-icon-radio-2:before {
+ content: '\E6CA';
+}
+.t-icon-radish-filled:before {
+ content: '\E6CB';
+}
+.t-icon-radish:before {
+ content: '\E6CC';
+}
+.t-icon-rain-heavy:before {
+ content: '\E6CD';
+}
+.t-icon-rain-light-filled:before {
+ content: '\E6CE';
+}
+.t-icon-rain-light:before {
+ content: '\E6CF';
+}
+.t-icon-rain-medium:before {
+ content: '\E6D0';
+}
+.t-icon-rainbow:before {
+ content: '\E6D1';
+}
+.t-icon-rectangle-filled:before {
+ content: '\E6D2';
+}
+.t-icon-rectangle:before {
+ content: '\E6D3';
+}
+.t-icon-refresh:before {
+ content: '\E6D4';
+}
+.t-icon-relation:before {
+ content: '\E6D5';
+}
+.t-icon-relativity-filled:before {
+ content: '\E6D6';
+}
+.t-icon-relativity:before {
+ content: '\E6D7';
+}
+.t-icon-remote-wave-filled:before {
+ content: '\E6D8';
+}
+.t-icon-remote-wave:before {
+ content: '\E6D9';
+}
+.t-icon-remove:before {
+ content: '\E6DA';
+}
+.t-icon-rename-filled:before {
+ content: '\E6DB';
+}
+.t-icon-rename:before {
+ content: '\E6DC';
+}
+.t-icon-replay-filled:before {
+ content: '\E6DD';
+}
+.t-icon-replay:before {
+ content: '\E6DE';
+}
+.t-icon-rice-ball-filled:before {
+ content: '\E6DF';
+}
+.t-icon-rice-ball:before {
+ content: '\E6E0';
+}
+.t-icon-rice-filled:before {
+ content: '\E6E1';
+}
+.t-icon-rice:before {
+ content: '\E6E2';
+}
+.t-icon-roast-filled:before {
+ content: '\E6E3';
+}
+.t-icon-roast:before {
+ content: '\E6E4';
+}
+.t-icon-robot-1-filled:before {
+ content: '\E6E5';
+}
+.t-icon-robot-1:before {
+ content: '\E6E6';
+}
+.t-icon-robot-2-filled:before {
+ content: '\E6E7';
+}
+.t-icon-robot-2:before {
+ content: '\E6E8';
+}
+.t-icon-robot-filled:before {
+ content: '\E6E9';
+}
+.t-icon-robot:before {
+ content: '\E6EA';
+}
+.t-icon-rocket-filled:before {
+ content: '\E6EB';
+}
+.t-icon-rocket:before {
+ content: '\E6EC';
+}
+.t-icon-rollback:before {
+ content: '\E6ED';
+}
+.t-icon-rollfront:before {
+ content: '\E6EE';
+}
+.t-icon-root-list-filled:before {
+ content: '\E6EF';
+}
+.t-icon-root-list:before {
+ content: '\E6F0';
+}
+.t-icon-rotate-locked-filled:before {
+ content: '\E6F1';
+}
+.t-icon-rotate-locked:before {
+ content: '\E6F2';
+}
+.t-icon-rotate:before {
+ content: '\E6F3';
+}
+.t-icon-rotation:before {
+ content: '\E6F4';
+}
+.t-icon-round-filled:before {
+ content: '\E6F5';
+}
+.t-icon-round:before {
+ content: '\E6F6';
+}
+.t-icon-router-wave-filled:before {
+ content: '\E6F7';
+}
+.t-icon-router-wave:before {
+ content: '\E6F8';
+}
+.t-icon-rss:before {
+ content: '\E6F9';
+}
+.t-icon-ruler-filled:before {
+ content: '\E6FA';
+}
+.t-icon-ruler:before {
+ content: '\E6FB';
+}
+.t-icon-sailing-hotel-filled:before {
+ content: '\E6FC';
+}
+.t-icon-sailing-hotel:before {
+ content: '\E6FD';
+}
+.t-icon-sandwich-filled:before {
+ content: '\E6FE';
+}
+.t-icon-sandwich:before {
+ content: '\E6FF';
+}
+.t-icon-saturation-filled:before {
+ content: '\E700';
+}
+.t-icon-saturation:before {
+ content: '\E701';
+}
+.t-icon-sausage-filled:before {
+ content: '\E702';
+}
+.t-icon-sausage:before {
+ content: '\E703';
+}
+.t-icon-save-filled:before {
+ content: '\E704';
+}
+.t-icon-save:before {
+ content: '\E705';
+}
+.t-icon-saving-pot-filled:before {
+ content: '\E706';
+}
+.t-icon-saving-pot:before {
+ content: '\E707';
+}
+.t-icon-scan:before {
+ content: '\E708';
+}
+.t-icon-screen-4k-filled:before {
+ content: '\E709';
+}
+.t-icon-screen-4k:before {
+ content: '\E70A';
+}
+.t-icon-screen-mirroring-filled:before {
+ content: '\E70B';
+}
+.t-icon-screen-mirroring:before {
+ content: '\E70C';
+}
+.t-icon-screencast-filled:before {
+ content: '\E70D';
+}
+.t-icon-screencast:before {
+ content: '\E70E';
+}
+.t-icon-screenshot:before {
+ content: '\E70F';
+}
+.t-icon-scroll-bar-filled:before {
+ content: '\E710';
+}
+.t-icon-scroll-bar:before {
+ content: '\E711';
+}
+.t-icon-sd-card-1-filled:before {
+ content: '\E712';
+}
+.t-icon-sd-card-1:before {
+ content: '\E713';
+}
+.t-icon-sd-card-filled:before {
+ content: '\E714';
+}
+.t-icon-sd-card:before {
+ content: '\E715';
+}
+.t-icon-seal-filled:before {
+ content: '\E716';
+}
+.t-icon-seal:before {
+ content: '\E717';
+}
+.t-icon-search-error-filled:before {
+ content: '\E718';
+}
+.t-icon-search-error:before {
+ content: '\E719';
+}
+.t-icon-search-filled:before {
+ content: '\E71A';
+}
+.t-icon-search:before {
+ content: '\E71B';
+}
+.t-icon-secured-filled:before {
+ content: '\E71C';
+}
+.t-icon-secured:before {
+ content: '\E71D';
+}
+.t-icon-send-cancel-filled:before {
+ content: '\E71E';
+}
+.t-icon-send-cancel:before {
+ content: '\E71F';
+}
+.t-icon-send-filled:before {
+ content: '\E720';
+}
+.t-icon-send:before {
+ content: '\E721';
+}
+.t-icon-sensors-1:before {
+ content: '\E722';
+}
+.t-icon-sensors-2:before {
+ content: '\E723';
+}
+.t-icon-sensors-off:before {
+ content: '\E724';
+}
+.t-icon-sensors:before {
+ content: '\E725';
+}
+.t-icon-sequence-filled:before {
+ content: '\E726';
+}
+.t-icon-sequence:before {
+ content: '\E727';
+}
+.t-icon-serenity-filled:before {
+ content: '\E728';
+}
+.t-icon-serenity:before {
+ content: '\E729';
+}
+.t-icon-server-filled:before {
+ content: '\E72A';
+}
+.t-icon-server:before {
+ content: '\E72B';
+}
+.t-icon-service-filled:before {
+ content: '\E72C';
+}
+.t-icon-service:before {
+ content: '\E72D';
+}
+.t-icon-setting-1-filled:before {
+ content: '\E72E';
+}
+.t-icon-setting-1:before {
+ content: '\E72F';
+}
+.t-icon-setting-filled:before {
+ content: '\E730';
+}
+.t-icon-setting:before {
+ content: '\E731';
+}
+.t-icon-share-1-filled:before {
+ content: '\E732';
+}
+.t-icon-share-1:before {
+ content: '\E733';
+}
+.t-icon-share-filled:before {
+ content: '\E734';
+}
+.t-icon-share:before {
+ content: '\E735';
+}
+.t-icon-sharpness-filled:before {
+ content: '\E736';
+}
+.t-icon-sharpness:before {
+ content: '\E737';
+}
+.t-icon-shield-error-filled:before {
+ content: '\E738';
+}
+.t-icon-shield-error:before {
+ content: '\E739';
+}
+.t-icon-shimen-filled:before {
+ content: '\E73A';
+}
+.t-icon-shimen:before {
+ content: '\E73B';
+}
+.t-icon-shop-1-filled:before {
+ content: '\E73C';
+}
+.t-icon-shop-1:before {
+ content: '\E73D';
+}
+.t-icon-shop-2-filled:before {
+ content: '\E73E';
+}
+.t-icon-shop-2:before {
+ content: '\E73F';
+}
+.t-icon-shop-3-filled:before {
+ content: '\E740';
+}
+.t-icon-shop-3:before {
+ content: '\E741';
+}
+.t-icon-shop-4-filled:before {
+ content: '\E742';
+}
+.t-icon-shop-4:before {
+ content: '\E743';
+}
+.t-icon-shop-5-filled:before {
+ content: '\E744';
+}
+.t-icon-shop-5:before {
+ content: '\E745';
+}
+.t-icon-shop-filled:before {
+ content: '\E746';
+}
+.t-icon-shop:before {
+ content: '\E747';
+}
+.t-icon-shortcut:before {
+ content: '\E748';
+}
+.t-icon-shrimp-filled:before {
+ content: '\E749';
+}
+.t-icon-shrimp:before {
+ content: '\E74A';
+}
+.t-icon-shrink-horizontal:before {
+ content: '\E74B';
+}
+.t-icon-shrink-vertical:before {
+ content: '\E74C';
+}
+.t-icon-shutter-filled:before {
+ content: '\E74D';
+}
+.t-icon-shutter:before {
+ content: '\E74E';
+}
+.t-icon-shutup-filled:before {
+ content: '\E74F';
+}
+.t-icon-shutup:before {
+ content: '\E750';
+}
+.t-icon-sim-card-1-filled:before {
+ content: '\E751';
+}
+.t-icon-sim-card-1:before {
+ content: '\E752';
+}
+.t-icon-sim-card-2-filled:before {
+ content: '\E753';
+}
+.t-icon-sim-card-2:before {
+ content: '\E754';
+}
+.t-icon-sim-card-filled:before {
+ content: '\E755';
+}
+.t-icon-sim-card:before {
+ content: '\E756';
+}
+.t-icon-sinister-smile-filled:before {
+ content: '\E757';
+}
+.t-icon-sinister-smile:before {
+ content: '\E758';
+}
+.t-icon-sip-filled:before {
+ content: '\E759';
+}
+.t-icon-sip:before {
+ content: '\E75A';
+}
+.t-icon-sitemap-filled:before {
+ content: '\E75B';
+}
+.t-icon-sitemap:before {
+ content: '\E75C';
+}
+.t-icon-size-change:before {
+ content: '\E75D';
+}
+.t-icon-slash:before {
+ content: '\E75E';
+}
+.t-icon-sleep-filled:before {
+ content: '\E75F';
+}
+.t-icon-sleep:before {
+ content: '\E760';
+}
+.t-icon-slice-filled:before {
+ content: '\E761';
+}
+.t-icon-slice:before {
+ content: '\E762';
+}
+.t-icon-slideshow-filled:before {
+ content: '\E763';
+}
+.t-icon-slideshow:before {
+ content: '\E764';
+}
+.t-icon-smile-filled:before {
+ content: '\E765';
+}
+.t-icon-smile:before {
+ content: '\E766';
+}
+.t-icon-sneer-filled:before {
+ content: '\E767';
+}
+.t-icon-sneer:before {
+ content: '\E768';
+}
+.t-icon-snowflake:before {
+ content: '\E769';
+}
+.t-icon-sonic:before {
+ content: '\E76A';
+}
+.t-icon-sound-down-filled:before {
+ content: '\E76B';
+}
+.t-icon-sound-down:before {
+ content: '\E76C';
+}
+.t-icon-sound-filled:before {
+ content: '\E76D';
+}
+.t-icon-sound-high-filled:before {
+ content: '\E76E';
+}
+.t-icon-sound-high:before {
+ content: '\E76F';
+}
+.t-icon-sound-low-filled:before {
+ content: '\E770';
+}
+.t-icon-sound-low:before {
+ content: '\E771';
+}
+.t-icon-sound-mute-1-filled:before {
+ content: '\E772';
+}
+.t-icon-sound-mute-1:before {
+ content: '\E773';
+}
+.t-icon-sound-mute-filled:before {
+ content: '\E774';
+}
+.t-icon-sound-mute:before {
+ content: '\E775';
+}
+.t-icon-sound-up-filled:before {
+ content: '\E776';
+}
+.t-icon-sound-up:before {
+ content: '\E777';
+}
+.t-icon-sound:before {
+ content: '\E778';
+}
+.t-icon-space:before {
+ content: '\E779';
+}
+.t-icon-speechless-1-filled:before {
+ content: '\E77A';
+}
+.t-icon-speechless-1:before {
+ content: '\E77B';
+}
+.t-icon-speechless-filled:before {
+ content: '\E77C';
+}
+.t-icon-speechless:before {
+ content: '\E77D';
+}
+.t-icon-star-filled:before {
+ content: '\E77E';
+}
+.t-icon-star:before {
+ content: '\E77F';
+}
+.t-icon-statue-of-jesus-filled:before {
+ content: '\E780';
+}
+.t-icon-statue-of-jesus:before {
+ content: '\E781';
+}
+.t-icon-sticky-note-filled:before {
+ content: '\E782';
+}
+.t-icon-sticky-note:before {
+ content: '\E783';
+}
+.t-icon-stop-circle-filled:before {
+ content: '\E784';
+}
+.t-icon-stop-circle-stroke-filled:before {
+ content: '\E785';
+}
+.t-icon-stop-circle-stroke:before {
+ content: '\E786';
+}
+.t-icon-stop-circle:before {
+ content: '\E787';
+}
+.t-icon-stop:before {
+ content: '\E788';
+}
+.t-icon-store-filled:before {
+ content: '\E789';
+}
+.t-icon-store:before {
+ content: '\E78A';
+}
+.t-icon-street-road-1-filled:before {
+ content: '\E78B';
+}
+.t-icon-street-road-1:before {
+ content: '\E78C';
+}
+.t-icon-street-road-filled:before {
+ content: '\E78D';
+}
+.t-icon-street-road:before {
+ content: '\E78E';
+}
+.t-icon-subscript:before {
+ content: '\E78F';
+}
+.t-icon-subtitle-filled:before {
+ content: '\E790';
+}
+.t-icon-subtitle:before {
+ content: '\E791';
+}
+.t-icon-subway-line-filled:before {
+ content: '\E792';
+}
+.t-icon-subway-line:before {
+ content: '\E793';
+}
+.t-icon-sum:before {
+ content: '\E794';
+}
+.t-icon-summary:before {
+ content: '\E795';
+}
+.t-icon-sun-fall-filled:before {
+ content: '\E796';
+}
+.t-icon-sun-fall:before {
+ content: '\E797';
+}
+.t-icon-sun-rising-filled:before {
+ content: '\E798';
+}
+.t-icon-sun-rising:before {
+ content: '\E799';
+}
+.t-icon-sunny-filled:before {
+ content: '\E79A';
+}
+.t-icon-sunny:before {
+ content: '\E79B';
+}
+.t-icon-superscript:before {
+ content: '\E79C';
+}
+.t-icon-support-filled:before {
+ content: '\E79D';
+}
+.t-icon-support:before {
+ content: '\E79E';
+}
+.t-icon-surprised-1-filled:before {
+ content: '\E79F';
+}
+.t-icon-surprised-1:before {
+ content: '\E7A0';
+}
+.t-icon-surprised-filled:before {
+ content: '\E7A1';
+}
+.t-icon-surprised:before {
+ content: '\E7A2';
+}
+.t-icon-swap-left:before {
+ content: '\E7A3';
+}
+.t-icon-swap-right:before {
+ content: '\E7A4';
+}
+.t-icon-swap:before {
+ content: '\E7A5';
+}
+.t-icon-swear-1-filled:before {
+ content: '\E7A6';
+}
+.t-icon-swear-1:before {
+ content: '\E7A7';
+}
+.t-icon-swear-2-filled:before {
+ content: '\E7A8';
+}
+.t-icon-swear-2:before {
+ content: '\E7A9';
+}
+.t-icon-system-2:before {
+ content: '\E7AA';
+}
+.t-icon-system-3-filled:before {
+ content: '\E7AB';
+}
+.t-icon-system-3:before {
+ content: '\E7AC';
+}
+.t-icon-system-application-filled:before {
+ content: '\E7AD';
+}
+.t-icon-system-application:before {
+ content: '\E7AE';
+}
+.t-icon-system-blocked-filled:before {
+ content: '\E7AF';
+}
+.t-icon-system-blocked:before {
+ content: '\E7B0';
+}
+.t-icon-system-code-filled:before {
+ content: '\E7B1';
+}
+.t-icon-system-code:before {
+ content: '\E7B2';
+}
+.t-icon-system-components-filled:before {
+ content: '\E7B3';
+}
+.t-icon-system-components:before {
+ content: '\E7B4';
+}
+.t-icon-system-coordinate-filled:before {
+ content: '\E7B5';
+}
+.t-icon-system-coordinate:before {
+ content: '\E7B6';
+}
+.t-icon-system-device-filled:before {
+ content: '\E7B7';
+}
+.t-icon-system-device:before {
+ content: '\E7B8';
+}
+.t-icon-system-interface-filled:before {
+ content: '\E7B9';
+}
+.t-icon-system-interface:before {
+ content: '\E7BA';
+}
+.t-icon-system-location-filled:before {
+ content: '\E7BB';
+}
+.t-icon-system-location:before {
+ content: '\E7BC';
+}
+.t-icon-system-locked-filled:before {
+ content: '\E7BD';
+}
+.t-icon-system-locked:before {
+ content: '\E7BE';
+}
+.t-icon-system-log-filled:before {
+ content: '\E7BF';
+}
+.t-icon-system-log:before {
+ content: '\E7C0';
+}
+.t-icon-system-marked-filled:before {
+ content: '\E7C1';
+}
+.t-icon-system-marked:before {
+ content: '\E7C2';
+}
+.t-icon-system-messages-filled:before {
+ content: '\E7C3';
+}
+.t-icon-system-messages:before {
+ content: '\E7C4';
+}
+.t-icon-system-regulation-filled:before {
+ content: '\E7C5';
+}
+.t-icon-system-regulation:before {
+ content: '\E7C6';
+}
+.t-icon-system-search-filled:before {
+ content: '\E7C7';
+}
+.t-icon-system-search:before {
+ content: '\E7C8';
+}
+.t-icon-system-setting-filled:before {
+ content: '\E7C9';
+}
+.t-icon-system-setting:before {
+ content: '\E7CA';
+}
+.t-icon-system-storage-filled:before {
+ content: '\E7CB';
+}
+.t-icon-system-storage:before {
+ content: '\E7CC';
+}
+.t-icon-system-sum:before {
+ content: '\E7CD';
+}
+.t-icon-system-unlocked-filled:before {
+ content: '\E7CE';
+}
+.t-icon-system-unlocked:before {
+ content: '\E7CF';
+}
+.t-icon-tab-filled:before {
+ content: '\E7D0';
+}
+.t-icon-tab:before {
+ content: '\E7D1';
+}
+.t-icon-table-1-filled:before {
+ content: '\E7D2';
+}
+.t-icon-table-1:before {
+ content: '\E7D3';
+}
+.t-icon-table-2-filled:before {
+ content: '\E7D4';
+}
+.t-icon-table-2:before {
+ content: '\E7D5';
+}
+.t-icon-table-add-filled:before {
+ content: '\E7D6';
+}
+.t-icon-table-add:before {
+ content: '\E7D7';
+}
+.t-icon-table-filled:before {
+ content: '\E7D8';
+}
+.t-icon-table-split-filled:before {
+ content: '\E7D9';
+}
+.t-icon-table-split:before {
+ content: '\E7DA';
+}
+.t-icon-table:before {
+ content: '\E7DB';
+}
+.t-icon-tag-filled:before {
+ content: '\E7DC';
+}
+.t-icon-tag-state-filled:before {
+ content: '\E7DD';
+}
+.t-icon-tag-state:before {
+ content: '\E7DE';
+}
+.t-icon-tag:before {
+ content: '\E7DF';
+}
+.t-icon-tangerinr-filled:before {
+ content: '\E7E0';
+}
+.t-icon-tangerinr:before {
+ content: '\E7E1';
+}
+.t-icon-tape-filled:before {
+ content: '\E7E2';
+}
+.t-icon-tape:before {
+ content: '\E7E3';
+}
+.t-icon-task-1-filled:before {
+ content: '\E7E4';
+}
+.t-icon-task-1:before {
+ content: '\E7E5';
+}
+.t-icon-task-add-1:before {
+ content: '\E7E6';
+}
+.t-icon-task-add-filled:before {
+ content: '\E7E7';
+}
+.t-icon-task-add:before {
+ content: '\E7E8';
+}
+.t-icon-task-checked-1:before {
+ content: '\E7E9';
+}
+.t-icon-task-checked-filled:before {
+ content: '\E7EA';
+}
+.t-icon-task-checked:before {
+ content: '\E7EB';
+}
+.t-icon-task-double-filled:before {
+ content: '\E7EC';
+}
+.t-icon-task-double:before {
+ content: '\E7ED';
+}
+.t-icon-task-error-filled:before {
+ content: '\E7EE';
+}
+.t-icon-task-error:before {
+ content: '\E7EF';
+}
+.t-icon-task-filled:before {
+ content: '\E7F0';
+}
+.t-icon-task-location-filled:before {
+ content: '\E7F1';
+}
+.t-icon-task-location:before {
+ content: '\E7F2';
+}
+.t-icon-task-marked-filled:before {
+ content: '\E7F3';
+}
+.t-icon-task-marked:before {
+ content: '\E7F4';
+}
+.t-icon-task-setting-filled:before {
+ content: '\E7F5';
+}
+.t-icon-task-setting:before {
+ content: '\E7F6';
+}
+.t-icon-task-time-filled:before {
+ content: '\E7F7';
+}
+.t-icon-task-time:before {
+ content: '\E7F8';
+}
+.t-icon-task-visible-filled:before {
+ content: '\E7F9';
+}
+.t-icon-task-visible:before {
+ content: '\E7FA';
+}
+.t-icon-task:before {
+ content: '\E7FB';
+}
+.t-icon-tea-filled:before {
+ content: '\E7FC';
+}
+.t-icon-tea:before {
+ content: '\E7FD';
+}
+.t-icon-teahouse-filled:before {
+ content: '\E7FE';
+}
+.t-icon-teahouse:before {
+ content: '\E7FF';
+}
+.t-icon-template-filled:before {
+ content: '\E800';
+}
+.t-icon-template:before {
+ content: '\E801';
+}
+.t-icon-temple-filled:before {
+ content: '\E802';
+}
+.t-icon-temple:before {
+ content: '\E803';
+}
+.t-icon-terminal-rectangle-1-filled:before {
+ content: '\E804';
+}
+.t-icon-terminal-rectangle-1:before {
+ content: '\E805';
+}
+.t-icon-terminal-rectangle-filled:before {
+ content: '\E806';
+}
+.t-icon-terminal-rectangle:before {
+ content: '\E807';
+}
+.t-icon-terminal-window-filled:before {
+ content: '\E808';
+}
+.t-icon-terminal-window:before {
+ content: '\E809';
+}
+.t-icon-terminal:before {
+ content: '\E80A';
+}
+.t-icon-text-drawing-filled:before {
+ content: '\E80B';
+}
+.t-icon-text-drawing:before {
+ content: '\E80C';
+}
+.t-icon-text-style:before {
+ content: '\E80D';
+}
+.t-icon-text:before {
+ content: '\E80E';
+}
+.t-icon-textbox-filled:before {
+ content: '\E80F';
+}
+.t-icon-textbox:before {
+ content: '\E810';
+}
+.t-icon-textformat-bold:before {
+ content: '\E811';
+}
+.t-icon-textformat-color:before {
+ content: '\E812';
+}
+.t-icon-textformat-italic:before {
+ content: '\E813';
+}
+.t-icon-textformat-longer:before {
+ content: '\E814';
+}
+.t-icon-textformat-shorter:before {
+ content: '\E815';
+}
+.t-icon-textformat-strikethrough:before {
+ content: '\E816';
+}
+.t-icon-textformat-underline:before {
+ content: '\E817';
+}
+.t-icon-textformat-wrap:before {
+ content: '\E818';
+}
+.t-icon-theaters-filled:before {
+ content: '\E819';
+}
+.t-icon-theaters:before {
+ content: '\E81A';
+}
+.t-icon-thumb-down-1-filled:before {
+ content: '\E81B';
+}
+.t-icon-thumb-down-1:before {
+ content: '\E81C';
+}
+.t-icon-thumb-down-2-filled:before {
+ content: '\E81D';
+}
+.t-icon-thumb-down-2:before {
+ content: '\E81E';
+}
+.t-icon-thumb-down-filled:before {
+ content: '\E81F';
+}
+.t-icon-thumb-down:before {
+ content: '\E820';
+}
+.t-icon-thumb-up-1-filled:before {
+ content: '\E821';
+}
+.t-icon-thumb-up-1:before {
+ content: '\E822';
+}
+.t-icon-thumb-up-2-filled:before {
+ content: '\E823';
+}
+.t-icon-thumb-up-2:before {
+ content: '\E824';
+}
+.t-icon-thumb-up-filled:before {
+ content: '\E825';
+}
+.t-icon-thumb-up:before {
+ content: '\E826';
+}
+.t-icon-thunder:before {
+ content: '\E827';
+}
+.t-icon-thunderstorm-night-filled:before {
+ content: '\E828';
+}
+.t-icon-thunderstorm-night:before {
+ content: '\E829';
+}
+.t-icon-thunderstorm-sunny-filled:before {
+ content: '\E82A';
+}
+.t-icon-thunderstorm-sunny:before {
+ content: '\E82B';
+}
+.t-icon-thunderstorm:before {
+ content: '\E82C';
+}
+.t-icon-ticket-filled:before {
+ content: '\E82D';
+}
+.t-icon-ticket:before {
+ content: '\E82E';
+}
+.t-icon-time-filled:before {
+ content: '\E82F';
+}
+.t-icon-time:before {
+ content: '\E830';
+}
+.t-icon-tips-double-filled:before {
+ content: '\E831';
+}
+.t-icon-tips-double:before {
+ content: '\E832';
+}
+.t-icon-tips-filled:before {
+ content: '\E833';
+}
+.t-icon-tips:before {
+ content: '\E834';
+}
+.t-icon-tomato-filled:before {
+ content: '\E835';
+}
+.t-icon-tomato:before {
+ content: '\E836';
+}
+.t-icon-tools-circle-filled:before {
+ content: '\E837';
+}
+.t-icon-tools-circle:before {
+ content: '\E838';
+}
+.t-icon-tools-filled:before {
+ content: '\E839';
+}
+.t-icon-tools:before {
+ content: '\E83A';
+}
+.t-icon-tornado:before {
+ content: '\E83B';
+}
+.t-icon-tower-1-filled:before {
+ content: '\E83C';
+}
+.t-icon-tower-1:before {
+ content: '\E83D';
+}
+.t-icon-tower-2-filled:before {
+ content: '\E83E';
+}
+.t-icon-tower-2:before {
+ content: '\E83F';
+}
+.t-icon-tower-3-filled:before {
+ content: '\E840';
+}
+.t-icon-tower-3:before {
+ content: '\E841';
+}
+.t-icon-tower-clock-filled:before {
+ content: '\E842';
+}
+.t-icon-tower-clock:before {
+ content: '\E843';
+}
+.t-icon-tower-filled:before {
+ content: '\E844';
+}
+.t-icon-tower:before {
+ content: '\E845';
+}
+.t-icon-town-filled:before {
+ content: '\E846';
+}
+.t-icon-town:before {
+ content: '\E847';
+}
+.t-icon-traffic-events-filled:before {
+ content: '\E848';
+}
+.t-icon-traffic-events:before {
+ content: '\E849';
+}
+.t-icon-traffic-filled:before {
+ content: '\E84A';
+}
+.t-icon-traffic:before {
+ content: '\E84B';
+}
+.t-icon-transform-1-filled:before {
+ content: '\E84C';
+}
+.t-icon-transform-1:before {
+ content: '\E84D';
+}
+.t-icon-transform-2:before {
+ content: '\E84E';
+}
+.t-icon-transform-3:before {
+ content: '\E84F';
+}
+.t-icon-transform-filled:before {
+ content: '\E850';
+}
+.t-icon-transform:before {
+ content: '\E851';
+}
+.t-icon-translate-1:before {
+ content: '\E852';
+}
+.t-icon-translate:before {
+ content: '\E853';
+}
+.t-icon-tree-catalog-filled:before {
+ content: '\E854';
+}
+.t-icon-tree-catalog:before {
+ content: '\E855';
+}
+.t-icon-tree-list:before {
+ content: '\E856';
+}
+.t-icon-tree-round-dot-filled:before {
+ content: '\E857';
+}
+.t-icon-tree-round-dot-vertical-filled:before {
+ content: '\E858';
+}
+.t-icon-tree-round-dot-vertical:before {
+ content: '\E859';
+}
+.t-icon-tree-round-dot:before {
+ content: '\E85A';
+}
+.t-icon-tree-square-dot-filled:before {
+ content: '\E85B';
+}
+.t-icon-tree-square-dot-vertical-filled:before {
+ content: '\E85C';
+}
+.t-icon-tree-square-dot-vertical:before {
+ content: '\E85D';
+}
+.t-icon-tree-square-dot:before {
+ content: '\E85E';
+}
+.t-icon-trending-down:before {
+ content: '\E85F';
+}
+.t-icon-trending-up:before {
+ content: '\E860';
+}
+.t-icon-tv-1-filled:before {
+ content: '\E861';
+}
+.t-icon-tv-1:before {
+ content: '\E862';
+}
+.t-icon-tv-2-filled:before {
+ content: '\E863';
+}
+.t-icon-tv-2:before {
+ content: '\E864';
+}
+.t-icon-tv-filled:before {
+ content: '\E865';
+}
+.t-icon-tv:before {
+ content: '\E866';
+}
+.t-icon-typography-filled:before {
+ content: '\E867';
+}
+.t-icon-typography:before {
+ content: '\E868';
+}
+.t-icon-uncomfortable-1-filled:before {
+ content: '\E869';
+}
+.t-icon-uncomfortable-1:before {
+ content: '\E86A';
+}
+.t-icon-uncomfortable-2-filled:before {
+ content: '\E86B';
+}
+.t-icon-uncomfortable-2:before {
+ content: '\E86C';
+}
+.t-icon-uncomfortable-filled:before {
+ content: '\E86D';
+}
+.t-icon-uncomfortable:before {
+ content: '\E86E';
+}
+.t-icon-undertake-delivery-filled:before {
+ content: '\E86F';
+}
+.t-icon-undertake-delivery:before {
+ content: '\E870';
+}
+.t-icon-undertake-environment-protection-filled:before {
+ content: '\E871';
+}
+.t-icon-undertake-environment-protection:before {
+ content: '\E872';
+}
+.t-icon-undertake-filled:before {
+ content: '\E873';
+}
+.t-icon-undertake-hold-up-filled:before {
+ content: '\E874';
+}
+.t-icon-undertake-hold-up:before {
+ content: '\E875';
+}
+.t-icon-undertake-transaction-filled:before {
+ content: '\E876';
+}
+.t-icon-undertake-transaction:before {
+ content: '\E877';
+}
+.t-icon-undertake:before {
+ content: '\E878';
+}
+.t-icon-unfold-less:before {
+ content: '\E879';
+}
+.t-icon-unfold-more:before {
+ content: '\E87A';
+}
+.t-icon-unhappy-1-filled:before {
+ content: '\E87B';
+}
+.t-icon-unhappy-1:before {
+ content: '\E87C';
+}
+.t-icon-unhappy-filled:before {
+ content: '\E87D';
+}
+.t-icon-unhappy:before {
+ content: '\E87E';
+}
+.t-icon-uninstall-filled:before {
+ content: '\E87F';
+}
+.t-icon-uninstall:before {
+ content: '\E880';
+}
+.t-icon-upload-1:before {
+ content: '\E881';
+}
+.t-icon-upload:before {
+ content: '\E882';
+}
+.t-icon-upscale:before {
+ content: '\E883';
+}
+.t-icon-usb-filled:before {
+ content: '\E884';
+}
+.t-icon-usb:before {
+ content: '\E885';
+}
+.t-icon-user-1-filled:before {
+ content: '\E886';
+}
+.t-icon-user-1:before {
+ content: '\E887';
+}
+.t-icon-user-add-filled:before {
+ content: '\E888';
+}
+.t-icon-user-add:before {
+ content: '\E889';
+}
+.t-icon-user-arrow-down-filled:before {
+ content: '\E88A';
+}
+.t-icon-user-arrow-down:before {
+ content: '\E88B';
+}
+.t-icon-user-arrow-left-filled:before {
+ content: '\E88C';
+}
+.t-icon-user-arrow-left:before {
+ content: '\E88D';
+}
+.t-icon-user-arrow-right-filled:before {
+ content: '\E88E';
+}
+.t-icon-user-arrow-right:before {
+ content: '\E88F';
+}
+.t-icon-user-arrow-up-filled:before {
+ content: '\E890';
+}
+.t-icon-user-arrow-up:before {
+ content: '\E891';
+}
+.t-icon-user-avatar-filled:before {
+ content: '\E892';
+}
+.t-icon-user-avatar:before {
+ content: '\E893';
+}
+.t-icon-user-blocked-filled:before {
+ content: '\E894';
+}
+.t-icon-user-blocked:before {
+ content: '\E895';
+}
+.t-icon-user-business-filled:before {
+ content: '\E896';
+}
+.t-icon-user-business:before {
+ content: '\E897';
+}
+.t-icon-user-checked-1-filled:before {
+ content: '\E898';
+}
+.t-icon-user-checked-1:before {
+ content: '\E899';
+}
+.t-icon-user-checked-filled:before {
+ content: '\E89A';
+}
+.t-icon-user-checked:before {
+ content: '\E89B';
+}
+.t-icon-user-circle-filled:before {
+ content: '\E89C';
+}
+.t-icon-user-circle:before {
+ content: '\E89D';
+}
+.t-icon-user-clear-filled:before {
+ content: '\E89E';
+}
+.t-icon-user-clear:before {
+ content: '\E89F';
+}
+.t-icon-user-error-1-filled:before {
+ content: '\E8A0';
+}
+.t-icon-user-error-1:before {
+ content: '\E8A1';
+}
+.t-icon-user-filled:before {
+ content: '\E8A2';
+}
+.t-icon-user-invisible-filled:before {
+ content: '\E8A3';
+}
+.t-icon-user-invisible:before {
+ content: '\E8A4';
+}
+.t-icon-user-list-filled:before {
+ content: '\E8A5';
+}
+.t-icon-user-list:before {
+ content: '\E8A6';
+}
+.t-icon-user-locked-filled:before {
+ content: '\E8A7';
+}
+.t-icon-user-locked:before {
+ content: '\E8A8';
+}
+.t-icon-user-marked-filled:before {
+ content: '\E8A9';
+}
+.t-icon-user-marked:before {
+ content: '\E8AA';
+}
+.t-icon-user-password-filled:before {
+ content: '\E8AB';
+}
+.t-icon-user-password:before {
+ content: '\E8AC';
+}
+.t-icon-user-safety-filled:before {
+ content: '\E8AD';
+}
+.t-icon-user-safety:before {
+ content: '\E8AE';
+}
+.t-icon-user-search-filled:before {
+ content: '\E8AF';
+}
+.t-icon-user-search:before {
+ content: '\E8B0';
+}
+.t-icon-user-setting-filled:before {
+ content: '\E8B1';
+}
+.t-icon-user-setting:before {
+ content: '\E8B2';
+}
+.t-icon-user-talk-1-filled:before {
+ content: '\E8B3';
+}
+.t-icon-user-talk-1:before {
+ content: '\E8B4';
+}
+.t-icon-user-talk-filled:before {
+ content: '\E8B5';
+}
+.t-icon-user-talk-off-1-filled:before {
+ content: '\E8B6';
+}
+.t-icon-user-talk-off-1:before {
+ content: '\E8B7';
+}
+.t-icon-user-talk:before {
+ content: '\E8B8';
+}
+.t-icon-user-time-filled:before {
+ content: '\E8B9';
+}
+.t-icon-user-time:before {
+ content: '\E8BA';
+}
+.t-icon-user-transmit-filled:before {
+ content: '\E8BB';
+}
+.t-icon-user-transmit:before {
+ content: '\E8BC';
+}
+.t-icon-user-unknown-filled:before {
+ content: '\E8BD';
+}
+.t-icon-user-unknown:before {
+ content: '\E8BE';
+}
+.t-icon-user-unlocked-filled:before {
+ content: '\E8BF';
+}
+.t-icon-user-unlocked:before {
+ content: '\E8C0';
+}
+.t-icon-user-vip-filled:before {
+ content: '\E8C1';
+}
+.t-icon-user-vip:before {
+ content: '\E8C2';
+}
+.t-icon-user-visible-filled:before {
+ content: '\E8C3';
+}
+.t-icon-user-visible:before {
+ content: '\E8C4';
+}
+.t-icon-user:before {
+ content: '\E8C5';
+}
+.t-icon-usercase-filled:before {
+ content: '\E8C6';
+}
+.t-icon-usercase-link-filled:before {
+ content: '\E8C7';
+}
+.t-icon-usercase-link:before {
+ content: '\E8C8';
+}
+.t-icon-usercase:before {
+ content: '\E8C9';
+}
+.t-icon-usergroup-add-filled:before {
+ content: '\E8CA';
+}
+.t-icon-usergroup-add:before {
+ content: '\E8CB';
+}
+.t-icon-usergroup-circle-filled:before {
+ content: '\E8CC';
+}
+.t-icon-usergroup-circle:before {
+ content: '\E8CD';
+}
+.t-icon-usergroup-clear-filled:before {
+ content: '\E8CE';
+}
+.t-icon-usergroup-clear:before {
+ content: '\E8CF';
+}
+.t-icon-usergroup-filled:before {
+ content: '\E8D0';
+}
+.t-icon-usergroup:before {
+ content: '\E8D1';
+}
+.t-icon-vehicle-filled:before {
+ content: '\E8D2';
+}
+.t-icon-vehicle:before {
+ content: '\E8D3';
+}
+.t-icon-verified-filled:before {
+ content: '\E8D4';
+}
+.t-icon-verified:before {
+ content: '\E8D5';
+}
+.t-icon-verify-filled:before {
+ content: '\E8D6';
+}
+.t-icon-verify:before {
+ content: '\E8D7';
+}
+.t-icon-vertical-filled:before {
+ content: '\E8D8';
+}
+.t-icon-vertical:before {
+ content: '\E8D9';
+}
+.t-icon-video-camera-1-filled:before {
+ content: '\E8DA';
+}
+.t-icon-video-camera-1:before {
+ content: '\E8DB';
+}
+.t-icon-video-camera-2-filled:before {
+ content: '\E8DC';
+}
+.t-icon-video-camera-2:before {
+ content: '\E8DD';
+}
+.t-icon-video-camera-dollar-filled:before {
+ content: '\E8DE';
+}
+.t-icon-video-camera-dollar:before {
+ content: '\E8DF';
+}
+.t-icon-video-camera-filled:before {
+ content: '\E8E0';
+}
+.t-icon-video-camera-minus-filled:before {
+ content: '\E8E1';
+}
+.t-icon-video-camera-minus:before {
+ content: '\E8E2';
+}
+.t-icon-video-camera-music-filled:before {
+ content: '\E8E3';
+}
+.t-icon-video-camera-music:before {
+ content: '\E8E4';
+}
+.t-icon-video-camera-off-filled:before {
+ content: '\E8E5';
+}
+.t-icon-video-camera-off:before {
+ content: '\E8E6';
+}
+.t-icon-video-camera:before {
+ content: '\E8E7';
+}
+.t-icon-video-filled:before {
+ content: '\E8E8';
+}
+.t-icon-video-library-filled:before {
+ content: '\E8E9';
+}
+.t-icon-video-library:before {
+ content: '\E8EA';
+}
+.t-icon-video:before {
+ content: '\E8EB';
+}
+.t-icon-view-agenda-filled:before {
+ content: '\E8EC';
+}
+.t-icon-view-agenda:before {
+ content: '\E8ED';
+}
+.t-icon-view-column:before {
+ content: '\E8EE';
+}
+.t-icon-view-gantt-filled:before {
+ content: '\E8EF';
+}
+.t-icon-view-gantt:before {
+ content: '\E8F0';
+}
+.t-icon-view-image-filled:before {
+ content: '\E8F1';
+}
+.t-icon-view-image:before {
+ content: '\E8F2';
+}
+.t-icon-view-in-ar-filled:before {
+ content: '\E8F3';
+}
+.t-icon-view-in-ar:before {
+ content: '\E8F4';
+}
+.t-icon-view-list:before {
+ content: '\E8F5';
+}
+.t-icon-view-module-filled:before {
+ content: '\E8F6';
+}
+.t-icon-view-module:before {
+ content: '\E8F7';
+}
+.t-icon-view-organization-filled:before {
+ content: '\E8F8';
+}
+.t-icon-view-organization:before {
+ content: '\E8F9';
+}
+.t-icon-visual-recognition-filled:before {
+ content: '\E8FA';
+}
+.t-icon-visual-recognition:before {
+ content: '\E8FB';
+}
+.t-icon-wallet-filled:before {
+ content: '\E8FC';
+}
+.t-icon-wallet:before {
+ content: '\E8FD';
+}
+.t-icon-watch-filled:before {
+ content: '\E8FE';
+}
+.t-icon-watch:before {
+ content: '\E8FF';
+}
+.t-icon-watermelon-filled:before {
+ content: '\E900';
+}
+.t-icon-watermelon:before {
+ content: '\E901';
+}
+.t-icon-wave-bye-filled:before {
+ content: '\E902';
+}
+.t-icon-wave-bye:before {
+ content: '\E903';
+}
+.t-icon-wave-left-filled:before {
+ content: '\E904';
+}
+.t-icon-wave-left:before {
+ content: '\E905';
+}
+.t-icon-wave-right-filled:before {
+ content: '\E906';
+}
+.t-icon-wave-right:before {
+ content: '\E907';
+}
+.t-icon-wealth-1-filled:before {
+ content: '\E908';
+}
+.t-icon-wealth-1:before {
+ content: '\E909';
+}
+.t-icon-wealth-filled:before {
+ content: '\E90A';
+}
+.t-icon-wealth:before {
+ content: '\E90B';
+}
+.t-icon-web-filled:before {
+ content: '\E90C';
+}
+.t-icon-web:before {
+ content: '\E90D';
+}
+.t-icon-widget-filled:before {
+ content: '\E90E';
+}
+.t-icon-widget:before {
+ content: '\E90F';
+}
+.t-icon-wifi-1-filled:before {
+ content: '\E910';
+}
+.t-icon-wifi-1:before {
+ content: '\E911';
+}
+.t-icon-wifi-no-filled:before {
+ content: '\E912';
+}
+.t-icon-wifi-no:before {
+ content: '\E913';
+}
+.t-icon-wifi-off-1-filled:before {
+ content: '\E914';
+}
+.t-icon-wifi-off-1:before {
+ content: '\E915';
+}
+.t-icon-wifi-off:before {
+ content: '\E916';
+}
+.t-icon-wifi:before {
+ content: '\E917';
+}
+.t-icon-window-1-filled:before {
+ content: '\E918';
+}
+.t-icon-window-1:before {
+ content: '\E919';
+}
+.t-icon-window-filled:before {
+ content: '\E91A';
+}
+.t-icon-window:before {
+ content: '\E91B';
+}
+.t-icon-windy-rain:before {
+ content: '\E91C';
+}
+.t-icon-windy:before {
+ content: '\E91D';
+}
+.t-icon-wink-filled:before {
+ content: '\E91E';
+}
+.t-icon-wink:before {
+ content: '\E91F';
+}
+.t-icon-work-filled:before {
+ content: '\E920';
+}
+.t-icon-work-history-filled:before {
+ content: '\E921';
+}
+.t-icon-work-history:before {
+ content: '\E922';
+}
+.t-icon-work-off-filled:before {
+ content: '\E923';
+}
+.t-icon-work-off:before {
+ content: '\E924';
+}
+.t-icon-work:before {
+ content: '\E925';
+}
+.t-icon-wry-smile-filled:before {
+ content: '\E926';
+}
+.t-icon-wry-smile:before {
+ content: '\E927';
+}
+.t-icon-zoom-in-filled:before {
+ content: '\E928';
+}
+.t-icon-zoom-in:before {
+ content: '\E929';
+}
+.t-icon-zoom-out-filled:before {
+ content: '\E92A';
+}
+.t-icon-zoom-out:before {
+ content: '\E92B';
+}
diff --git a/uni_modules/tdesign-uniapp/components/icon/icon.vue b/uni_modules/tdesign-uniapp/components/icon/icon.vue
new file mode 100644
index 0000000..449cf7f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/icon/icon.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/icon/props.ts b/uni_modules/tdesign-uniapp/components/icon/props.ts
new file mode 100644
index 0000000..b441957
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/icon/props.ts
@@ -0,0 +1,35 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdIconProps } from './type';
+export default {
+ /** 图标颜色 */
+ color: {
+ type: String,
+ default: '',
+ },
+ /** 图标名称或图片链接 */
+ name: {
+ type: String,
+ default: '',
+ required: true,
+ },
+ /** 自定义图标前缀 */
+ prefix: {
+ type: String,
+ default: '',
+ },
+ /** 图标大小, 如 `20`, `20px`, `48rpx`, 默认单位是 `px` */
+ size: {
+ type: [String, Number],
+ default: '' as TdIconProps['size'],
+ },
+ /** 点击图标时触发 */
+ onClick: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/icon/type.ts b/uni_modules/tdesign-uniapp/components/icon/type.ts
new file mode 100644
index 0000000..82a18a4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/icon/type.ts
@@ -0,0 +1,32 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdIconProps {
+ /**
+ * 图标颜色
+ * @default ''
+ */
+ color?: string;
+ /**
+ * 图标名称或图片链接
+ * @default ''
+ */
+ name: string;
+ /**
+ * 自定义图标前缀
+ * @default ''
+ */
+ prefix?: string;
+ /**
+ * 图标大小, 如 `20`, `20px`, `48rpx`, 默认单位是 `px`
+ * @default ''
+ */
+ size?: string | number;
+ /**
+ * 点击图标时触发
+ */
+ onClick?: () => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/image-viewer/README.en-US.md b/uni_modules/tdesign-uniapp/components/image-viewer/README.en-US.md
new file mode 100644
index 0000000..dd37cc6
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image-viewer/README.en-US.md
@@ -0,0 +1,49 @@
+:: BASE_DOC ::
+
+## API
+
+### ImageViewer Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+background-color | String | - | \- | N
+close-btn | String / Boolean / Object | false | \- | N
+delete-btn | String / Boolean / Object | false | \- | N
+image-props | Object | - | Typescript: `ImageProps`,[Image API Documents](./image?tab=api)。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/image-viewer/type.ts) | N
+images | Array | [] | Typescript: `Array` | N
+initial-index | Number | 0 | Typescript: `Number` | N
+lazy | Boolean | true | \- | N
+show-index | Boolean | false | \- | N
+using-custom-navbar | Boolean | false | \- | N
+visible | Boolean | false | hide or show image viewer。`v-model:visible` is supported | N
+default-visible | Boolean | false | hide or show image viewer。uncontrolled property | N
+
+### ImageViewer Events
+
+name | params | description
+-- | -- | --
+change | `(context: { index: number })` | \-
+close | `(context: { trigger: 'overlay' \| 'button', visible: Boolean, index: Number } )` | \-
+delete | `(context: { index: number } )` | \-
+
+### ImageViewer Slots
+
+name | Description
+-- | --
+close-btn | \-
+delete-btn | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-image-viewer-close-margin-left | @spacer-1 | -
+--td-image-viewer-delete-margin-right | @spacer-1 | -
+--td-image-viewer-mask-bg-color | @mask-active | -
+--td-image-viewer-nav-bg-color | #000 | -
+--td-image-viewer-nav-color | @text-color-anti | -
+--td-image-viewer-nav-height | 96rpx | -
+--td-image-viewer-nav-index-font-size | @font-size-base | -
+--td-image-viewer-top | @position-fixed-top | -
diff --git a/uni_modules/tdesign-uniapp/components/image-viewer/README.md b/uni_modules/tdesign-uniapp/components/image-viewer/README.md
new file mode 100644
index 0000000..9455e95
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image-viewer/README.md
@@ -0,0 +1,78 @@
+---
+title: ImageViewer 图片预览
+description: 图片全屏放大预览效果,包含全屏背景色、页码位置样式、增加操作等规范。
+spline: data
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TImageViewer from '@tdesign/uniapp/image-viewer/image-viewer.vue';
+```
+
+### 类型
+
+#### 基础图片预览
+
+{{ base }}
+
+#### 带操作图片预览
+
+顶部区域可以配置关闭按钮、页码信息、删除按钮。
+
+{{ delete }}
+
+> 当使用自定义导航栏的时候,顶部的操作按钮会被遮挡,此时需要开启 `using-custom-navbar` 来解决
+
+## API
+
+### ImageViewer Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+background-color | String | - | 遮罩的背景颜色 | N
+close-btn | String / Boolean / Object | false | 是否显示关闭操作,前提需要开启页码。值为字符串表示图标名称,值为 `true` 表示使用默认图标 `close`,值为 `Object` 类型,表示透传至 `icon` ,不传表示不显示图标 | N
+delete-btn | String / Boolean / Object | false | 是否显示删除操作,前提需要开启页码。值为字符串表示图标名称,值为 `true` 表示使用默认图标 `delete`,值为 `Object` 类型,表示透传至 `icon`,不传表示不显示图标 | N
+image-props | Object | - | 透传至 Image 组件。TS 类型:`ImageProps`,[Image API Documents](./image?tab=api)。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/image-viewer/type.ts) | N
+images | Array | [] | 图片数组。TS 类型:`Array` | N
+initial-index | Number | 0 | 初始化页码。TS 类型:`Number` | N
+lazy | Boolean | true | 是否开启图片懒加载。开启后会预加载当前图片、相邻图片 | N
+show-index | Boolean | false | 是否显示页码 | N
+using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
+visible | Boolean | false | 隐藏/显示预览。支持语法糖 `v-model:visible` | N
+default-visible | Boolean | false | 隐藏/显示预览。非受控属性 | N
+
+### ImageViewer Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { index: number })` | 翻页时回调
+close | `(context: { trigger: 'overlay' \| 'button', visible: Boolean, index: Number } )` | 点击操作按钮button或者overlay时触发
+delete | `(context: { index: number } )` | 点击删除操作按钮时触发
+
+### ImageViewer Slots
+
+名称 | 描述
+-- | --
+close-btn | 关闭操作
+delete-btn | 删除操作
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-image-viewer-close-margin-left | @spacer-1 | -
+--td-image-viewer-delete-margin-right | @spacer-1 | -
+--td-image-viewer-mask-bg-color | @mask-active | -
+--td-image-viewer-nav-bg-color | #000 | -
+--td-image-viewer-nav-color | @text-color-anti | -
+--td-image-viewer-nav-height | 96rpx | -
+--td-image-viewer-nav-index-font-size | @font-size-base | -
+--td-image-viewer-top | @position-fixed-top | -
diff --git a/uni_modules/tdesign-uniapp/components/image-viewer/computed.js b/uni_modules/tdesign-uniapp/components/image-viewer/computed.js
new file mode 100644
index 0000000..06e4b25
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image-viewer/computed.js
@@ -0,0 +1,4 @@
+export function shouldLoadImage(index, currentIndex, loadedIndexes) {
+ return Math.abs(index - currentIndex) <= 1 || (loadedIndexes && loadedIndexes.indexOf(index) !== -1);
+}
+
diff --git a/uni_modules/tdesign-uniapp/components/image-viewer/image-viewer.css b/uni_modules/tdesign-uniapp/components/image-viewer/image-viewer.css
new file mode 100644
index 0000000..ebeacd0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image-viewer/image-viewer.css
@@ -0,0 +1,75 @@
+.t-image-viewer {
+ position: fixed;
+ top: var(--td-image-viewer-top, var(--td-position-fixed-top, 0));
+ left: 0;
+ bottom: 0;
+ right: 0;
+ z-index: 1001;
+ transform: translateZ(0);
+ overflow: hidden;
+}
+.t-image-viewer__mask {
+ position: absolute;
+ z-index: 1000;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ background-color: var(--td-image-viewer-mask-bg-color, var(--td-mask-active, rgba(0, 0, 0, 0.6)));
+}
+.t-image-viewer__content {
+ width: 100vw;
+ display: inline-block;
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+ z-index: 1005;
+}
+.t-image-viewer .swiper {
+ outline: 0;
+}
+.t-image-viewer__image {
+ width: 100%;
+ display: inline-block;
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+}
+.t-image-viewer :deep(.t-image--external) {
+ width: inherit;
+ height: inherit;
+ display: block;
+}
+.t-image-viewer__nav {
+ width: 100%;
+ position: absolute;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ height: var(--td-image-viewer-nav-height, 96rpx);
+ background-color: var(--td-image-viewer-nav-bg-color, #000);
+ left: 0;
+ color: var(--td-image-viewer-nav-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+ z-index: 1005;
+}
+.t-image-viewer__nav-close {
+ margin-left: var(--td-image-viewer-close-margin-left, var(--td-spacer-1, 24rpx));
+}
+.t-image-viewer__nav-close:empty {
+ display: none;
+}
+.t-image-viewer__nav-delete {
+ margin-right: var(--td-image-viewer-delete-margin-right, var(--td-spacer-1, 24rpx));
+}
+.t-image-viewer__nav-delete:empty {
+ display: none;
+}
+.t-image-viewer__nav-close,
+.t-image-viewer__nav-delete {
+ font-size: 48rpx;
+}
+.t-image-viewer__nav-index {
+ flex: 1;
+ font-size: var(--td-image-viewer-nav-index-font-size, var(--td-font-size-base, 28rpx));
+ text-align: center;
+}
diff --git a/uni_modules/tdesign-uniapp/components/image-viewer/image-viewer.vue b/uni_modules/tdesign-uniapp/components/image-viewer/image-viewer.vue
new file mode 100644
index 0000000..8bfcbe6
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image-viewer/image-viewer.vue
@@ -0,0 +1,317 @@
+
+
+ onClose(e, 'overlay')"
+ />
+
+
+ onClose(e, '')"
+ >
+
+
+
+
+
+
+ onClose(e, '')"
+ >
+
+
+
+
+
+
+ {{ currentSwiperIndex + 1 }}/{{ images.length }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/image-viewer/props.ts b/uni_modules/tdesign-uniapp/components/image-viewer/props.ts
new file mode 100644
index 0000000..8e5b925
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image-viewer/props.ts
@@ -0,0 +1,69 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdImageViewerProps } from './type';
+export default {
+ /** 遮罩的背景颜色 */
+ backgroundColor: {
+ type: String,
+ default: '',
+ },
+ /** 是否显示关闭操作,前提需要开启页码。值为字符串表示图标名称,值为 `true` 表示使用默认图标 `close`,值为 `Object` 类型,表示透传至 `icon` ,不传表示不显示图标 */
+ closeBtn: {
+ type: [String, Boolean, Object],
+ default: false as TdImageViewerProps['closeBtn'],
+ },
+ /** 是否显示删除操作,前提需要开启页码。值为字符串表示图标名称,值为 `true` 表示使用默认图标 `delete`,值为 `Object` 类型,表示透传至 `icon`,不传表示不显示图标 */
+ deleteBtn: {
+ type: [String, Boolean, Object],
+ default: false as TdImageViewerProps['deleteBtn'],
+ },
+ /** 透传至 Image 组件 */
+ imageProps: {
+ type: Object,
+ },
+ /** 图片数组 */
+ images: {
+ type: Array,
+ default: (): TdImageViewerProps['images'] => [],
+ },
+ /** 初始化页码 */
+ initialIndex: {
+ type: Number,
+ default: 0,
+ },
+ /** 是否开启图片懒加载。开启后会预加载当前图片、相邻图片 */
+ lazy: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否显示页码 */
+ showIndex: Boolean,
+ /** 是否使用了自定义导航栏 */
+ usingCustomNavbar: Boolean,
+ /** 隐藏/显示预览 */
+ visible: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 隐藏/显示预览,非受控属性 */
+ defaultVisible: Boolean,
+ /** 翻页时回调 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击操作按钮button或者overlay时触发 */
+ onClose: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击删除操作按钮时触发 */
+ onDelete: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/image-viewer/type.ts b/uni_modules/tdesign-uniapp/components/image-viewer/type.ts
new file mode 100644
index 0000000..0481afd
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image-viewer/type.ts
@@ -0,0 +1,76 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdImageProps as ImageProps } from '../image/type';
+
+export interface TdImageViewerProps {
+ /**
+ * 遮罩的背景颜色
+ * @default ''
+ */
+ backgroundColor?: string;
+ /**
+ * 是否显示关闭操作,前提需要开启页码。值为字符串表示图标名称,值为 `true` 表示使用默认图标 `close`,值为 `Object` 类型,表示透传至 `icon` ,不传表示不显示图标
+ * @default false
+ */
+ closeBtn?: string | boolean | object;
+ /**
+ * 是否显示删除操作,前提需要开启页码。值为字符串表示图标名称,值为 `true` 表示使用默认图标 `delete`,值为 `Object` 类型,表示透传至 `icon`,不传表示不显示图标
+ * @default false
+ */
+ deleteBtn?: string | boolean | object;
+ /**
+ * 透传至 Image 组件
+ */
+ imageProps?: ImageProps;
+ /**
+ * 图片数组
+ * @default []
+ */
+ images?: Array;
+ /**
+ * 初始化页码
+ * @default 0
+ */
+ initialIndex?: Number;
+ /**
+ * 是否开启图片懒加载。开启后会预加载当前图片、相邻图片
+ * @default true
+ */
+ lazy?: boolean;
+ /**
+ * 是否显示页码
+ * @default false
+ */
+ showIndex?: boolean;
+ /**
+ * 是否使用了自定义导航栏
+ * @default false
+ */
+ usingCustomNavbar?: boolean;
+ /**
+ * 隐藏/显示预览
+ * @default false
+ */
+ visible?: boolean;
+ /**
+ * 隐藏/显示预览,非受控属性
+ * @default false
+ */
+ defaultVisible?: boolean;
+ /**
+ * 翻页时回调
+ */
+ onChange?: (context: { index: number }) => void;
+ /**
+ * 点击操作按钮button或者overlay时触发
+ */
+ onClose?: (context: { trigger: 'overlay' | 'button'; visible: Boolean; index: Number }) => void;
+ /**
+ * 点击删除操作按钮时触发
+ */
+ onDelete?: (context: { index: number }) => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/image/README.en-US.md b/uni_modules/tdesign-uniapp/components/image/README.en-US.md
new file mode 100644
index 0000000..c6aa013
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image/README.en-US.md
@@ -0,0 +1,51 @@
+:: BASE_DOC ::
+
+## API
+
+### Image Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+error | String | 'default' | \- | N
+height | String / Number | - | \- | N
+lazy | Boolean | false | \- | N
+loading | String | 'default' | \- | N
+mode | String | scaleToFill | options: scaleToFill/aspectFit/aspectFill/widthFix/heightFix/top/bottom/center/left/right/top left/top right/bottom left/bottom right | N
+shape | String | square | options: circle/round/square | N
+show-menu-by-longpress | Boolean | false | \- | N
+src | String | - | \- | N
+t-id | String | - | image tag id | N
+webp | Boolean | false | \- | N
+width | String / Number | - | \- | N
+
+### Image Events
+
+name | params | description
+-- | -- | --
+error | `(context: { e: ImageEvent })` | trigger on image load failed。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts)
+load | `(context: { e: ImageEvent })` | trigger on image loaded。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts)
+
+### Image Slots
+
+name | Description
+-- | --
+error | \-
+loading | \-
+
+### Image External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-load | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-image-color | @text-color-placeholder | -
+--td-image-loading-bg-color | @bg-color-secondarycontainer | -
+--td-image-loading-color | @text-color-placeholder | -
+--td-image-round-radius | @radius-default | -
diff --git a/uni_modules/tdesign-uniapp/components/image/README.md b/uni_modules/tdesign-uniapp/components/image/README.md
new file mode 100644
index 0000000..0454f06
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image/README.md
@@ -0,0 +1,86 @@
+---
+title: Image 图片
+description: 用于展示效果,主要为上下左右居中裁切、拉伸、平铺等方式。
+spline: base
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TImage from '@tdesign/uniapp/image/image.vue';
+```
+
+### 裁切样式
+
+{{ base }}
+
+### 加载状态
+
+{{ status }}
+
+## 常见问题
+
+
+
+ 本地图片无法正确引用?
+ 👇
+
+
+ 建议使用绝对路径,而不是相对路径。绝对路径以 app.json 所在位置为基准。
+
+
+
+## API
+
+### Image Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+error | String | 'default' | 加载失败时显示的内容。值为 `default` 则表示使用默认加载失败风格;值为空或者 `slot` 表示使用插槽渲染,插槽名称为 `error`;值为其他则表示普通文本内容,如“加载失败” | N
+height | String / Number | - | 高度,默认单位为`px` | N
+lazy | Boolean | false | 是否开启图片懒加载 | N
+loading | String | 'default' | 加载态内容。值为 `default` 则表示使用默认加载中风格;值为其他则表示普通文本内容,如“加载中” | N
+mode | String | scaleToFill | 图片裁剪、缩放的模式;[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/image.html)。可选项:scaleToFill/aspectFit/aspectFill/widthFix/heightFix/top/bottom/center/left/right/top left/top right/bottom left/bottom right | N
+shape | String | square | 图片圆角类型。可选项:circle/round/square | N
+show-menu-by-longpress | Boolean | false | 长按图片显示发送给朋友、收藏、保存图片、搜一搜、打开名片/前往群聊/打开小程序(若图片中包含对应二维码或小程序码)的菜单 | N
+src | String | - | 图片链接 | N
+t-id | String | - | 图片标签id | N
+webp | Boolean | false | 默认不解析 webP 格式,只支持网络资源 | N
+width | String / Number | - | 宽度,默认单位为`px` | N
+
+### Image Events
+
+名称 | 参数 | 描述
+-- | -- | --
+error | `(context: { e: ImageEvent })` | 图片加载失败时触发。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts)
+load | `(context: { e: ImageEvent })` | 图片加载完成时触发。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts)
+
+### Image Slots
+
+名称 | 描述
+-- | --
+error | 自定义 `error` 显示内容
+loading | 自定义 `loading` 显示内容
+
+### Image External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-load | 加载样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-image-color | @text-color-placeholder | -
+--td-image-loading-bg-color | @bg-color-secondarycontainer | -
+--td-image-loading-color | @text-color-placeholder | -
+--td-image-round-radius | @radius-default | -
diff --git a/uni_modules/tdesign-uniapp/components/image/image.css b/uni_modules/tdesign-uniapp/components/image/image.css
new file mode 100644
index 0000000..0281887
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image/image.css
@@ -0,0 +1,44 @@
+.t-image {
+ position: relative;
+ display: inline-block;
+}
+.t-image__mask,
+.t-image__img {
+ color: var(--td-image-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ vertical-align: top;
+ width: inherit;
+ height: inherit;
+}
+.t-image__mask {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background-color: var(--td-image-loading-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+ color: var(--td-image-loading-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+}
+.t-image--loading-text {
+ width: 0;
+ height: 0;
+}
+.t-image__common {
+ width: 100%;
+ height: 100%;
+}
+.t-image--lazy {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: -1;
+}
+.t-image--shape-circle {
+ border-radius: 50%;
+ overflow: hidden;
+}
+.t-image--shape-round {
+ border-radius: var(--td-image-round-radius, var(--td-radius-default, 12rpx));
+ overflow: hidden;
+}
+.t-image--shape-square {
+ border-radius: 0;
+ overflow: hidden;
+}
diff --git a/uni_modules/tdesign-uniapp/components/image/image.vue b/uni_modules/tdesign-uniapp/components/image/image.vue
new file mode 100644
index 0000000..7c40a9d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image/image.vue
@@ -0,0 +1,207 @@
+
+
+
+
+
+ {{ loading }}
+
+
+
+
+
+
+
+
+ {{ error }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/image/props.ts b/uni_modules/tdesign-uniapp/components/image/props.ts
new file mode 100644
index 0000000..2683173
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image/props.ts
@@ -0,0 +1,71 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdImageProps } from './type';
+export default {
+ /** 加载失败时显示的内容。值为 `default` 则表示使用默认加载失败风格;值为空或者 `slot` 表示使用插槽渲染,插槽名称为 `error`;值为其他则表示普通文本内容,如“加载失败” */
+ error: {
+ type: String,
+ default: 'default' as TdImageProps['error'],
+ },
+ /** 高度,默认单位为`px` */
+ height: {
+ type: [String, Number],
+ },
+ /** 是否开启图片懒加载 */
+ lazy: Boolean,
+ /** 加载态内容。值为 `default` 则表示使用默认加载中风格;值为其他则表示普通文本内容,如“加载中” */
+ loading: {
+ type: String,
+ default: 'default' as TdImageProps['loading'],
+ },
+ /** 图片裁剪、缩放的模式;[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/image.html) */
+ mode: {
+ type: String,
+ default: 'scaleToFill' as TdImageProps['mode'],
+ validator(val: TdImageProps['mode']): boolean {
+ if (!val) return true;
+ return ['scaleToFill', 'aspectFit', 'aspectFill', 'widthFix', 'heightFix', 'top', 'bottom', 'center', 'left', 'right', 'top left', 'top right', 'bottom left', 'bottom right'].includes(val);
+ },
+ },
+ /** 图片圆角类型 */
+ shape: {
+ type: String,
+ default: 'square' as TdImageProps['shape'],
+ validator(val: TdImageProps['shape']): boolean {
+ if (!val) return true;
+ return ['circle', 'round', 'square'].includes(val);
+ },
+ },
+ /** 长按图片显示发送给朋友、收藏、保存图片、搜一搜、打开名片/前往群聊/打开小程序(若图片中包含对应二维码或小程序码)的菜单 */
+ showMenuByLongpress: Boolean,
+ /** 图片链接 */
+ src: {
+ type: String,
+ default: '',
+ },
+ /** 图片标签id */
+ tId: {
+ type: String,
+ default: '',
+ },
+ /** 默认不解析 webP 格式,只支持网络资源 */
+ webp: Boolean,
+ /** 宽度,默认单位为`px` */
+ width: {
+ type: [String, Number],
+ },
+ /** 图片加载失败时触发 */
+ onError: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 图片加载完成时触发 */
+ onLoad: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/image/type.ts b/uni_modules/tdesign-uniapp/components/image/type.ts
new file mode 100644
index 0000000..0b1444e
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/image/type.ts
@@ -0,0 +1,85 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { ImageEvent } from '../common/common';
+
+export interface TdImageProps {
+ /**
+ * 加载失败时显示的内容。值为 `default` 则表示使用默认加载失败风格;值为空或者 `slot` 表示使用插槽渲染,插槽名称为 `error`;值为其他则表示普通文本内容,如“加载失败”
+ * @default 'default'
+ */
+ error?: string;
+ /**
+ * 高度,默认单位为`px`
+ */
+ height?: string | number;
+ /**
+ * 是否开启图片懒加载
+ * @default false
+ */
+ lazy?: boolean;
+ /**
+ * 加载态内容。值为 `default` 则表示使用默认加载中风格;值为其他则表示普通文本内容,如“加载中”
+ * @default 'default'
+ */
+ loading?: string;
+ /**
+ * 图片裁剪、缩放的模式;[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/image.html)
+ * @default scaleToFill
+ */
+ mode?:
+ | 'scaleToFill'
+ | 'aspectFit'
+ | 'aspectFill'
+ | 'widthFix'
+ | 'heightFix'
+ | 'top'
+ | 'bottom'
+ | 'center'
+ | 'left'
+ | 'right'
+ | 'top left'
+ | 'top right'
+ | 'bottom left'
+ | 'bottom right';
+ /**
+ * 图片圆角类型
+ * @default square
+ */
+ shape?: 'circle' | 'round' | 'square';
+ /**
+ * 长按图片显示发送给朋友、收藏、保存图片、搜一搜、打开名片/前往群聊/打开小程序(若图片中包含对应二维码或小程序码)的菜单
+ * @default false
+ */
+ showMenuByLongpress?: boolean;
+ /**
+ * 图片链接
+ * @default ''
+ */
+ src?: string;
+ /**
+ * 图片标签id
+ * @default ''
+ */
+ tId?: string;
+ /**
+ * 默认不解析 webP 格式,只支持网络资源
+ * @default false
+ */
+ webp?: boolean;
+ /**
+ * 宽度,默认单位为`px`
+ */
+ width?: string | number;
+ /**
+ * 图片加载失败时触发
+ */
+ onError?: (context: { e: ImageEvent }) => void;
+ /**
+ * 图片加载完成时触发
+ */
+ onLoad?: (context: { e: ImageEvent }) => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/indexes-anchor/README.en-US.md b/uni_modules/tdesign-uniapp/components/indexes-anchor/README.en-US.md
new file mode 100644
index 0000000..05cebd7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes-anchor/README.en-US.md
@@ -0,0 +1,24 @@
+:: BASE_DOC ::
+
+## API
+### IndexesAnchor Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+external-classes | Array | - | `['t-class']` | N
+index | String / Number | - | \- | N
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-indexes-anchor-active-bg-color | @bg-color-container | -
+--td-indexes-anchor-active-color | @brand-color | -
+--td-indexes-anchor-active-font-weight | 600 | -
+--td-indexes-anchor-bg-color | @bg-color-secondarycontainer | -
+--td-indexes-anchor-border-color | @component-border | -
+--td-indexes-anchor-color | @text-color-primary | -
+--td-indexes-anchor-font | @font-body-medium | -
+--td-indexes-anchor-padding | 8rpx 32rpx | -
+--td-indexes-anchor-top | 0 | -
diff --git a/uni_modules/tdesign-uniapp/components/indexes-anchor/README.md b/uni_modules/tdesign-uniapp/components/indexes-anchor/README.md
new file mode 100644
index 0000000..2ef79ad
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes-anchor/README.md
@@ -0,0 +1,28 @@
+:: BASE_DOC ::
+
+## API
+### IndexesAnchor Props
+
+名称 | 类型 | 默认值 | 说明 | 必传
+-- | -- | -- | -- | --
+index | String / Number | - | 索引字符 | N
+
+### IndexesAnchor 外部样式类
+类名 | 说明
+-- | --
+t-class | 根节点样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-indexes-anchor-active-bg-color | @bg-color-container | -
+--td-indexes-anchor-active-color | @brand-color | -
+--td-indexes-anchor-active-font-weight | 600 | -
+--td-indexes-anchor-bg-color | @bg-color-secondarycontainer | -
+--td-indexes-anchor-border-color | @component-border | -
+--td-indexes-anchor-color | @text-color-primary | -
+--td-indexes-anchor-font | @font-body-medium | -
+--td-indexes-anchor-padding | 8rpx 32rpx | -
+--td-indexes-anchor-top | 0 | -
diff --git a/uni_modules/tdesign-uniapp/components/indexes-anchor/indexes-anchor.css b/uni_modules/tdesign-uniapp/components/indexes-anchor/indexes-anchor.css
new file mode 100644
index 0000000..a962ccb
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes-anchor/indexes-anchor.css
@@ -0,0 +1,49 @@
+.t-indexes-anchor {
+ color: var(--td-indexes-anchor-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font: var(--td-indexes-anchor-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-indexes-anchor__header {
+ display: none;
+ padding: var(--td-indexes-anchor-padding, 8rpx 32rpx);
+ background-color: var(--td-indexes-anchor-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+}
+.t-indexes-anchor__header--active {
+ background-color: var(--td-indexes-anchor-active-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ position: relative;
+}
+.t-indexes-anchor__header--active::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: unset;
+ bottom: 0;
+ left: unset;
+ right: unset;
+ background-color: var(--td-indexes-anchor-border-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+}
+.t-indexes-anchor__header--active::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-indexes-anchor__slot {
+ overflow: hidden;
+}
+.t-indexes-anchor__slot:empty + .t-indexes-anchor__header {
+ display: block;
+}
+.t-indexes-anchor__wrapper {
+ will-change: transform;
+}
+.t-indexes-anchor__wrapper--sticky {
+ position: fixed;
+ top: var(--td-indexes-anchor-top, 0);
+ left: 0;
+ width: 100%;
+ z-index: 1;
+}
+.t-indexes-anchor__wrapper--active {
+ color: var(--td-indexes-anchor-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ font-weight: var(--td-indexes-anchor-active-font-weight, 600);
+}
diff --git a/uni_modules/tdesign-uniapp/components/indexes-anchor/indexes-anchor.vue b/uni_modules/tdesign-uniapp/components/indexes-anchor/indexes-anchor.vue
new file mode 100644
index 0000000..bcaa1d1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes-anchor/indexes-anchor.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+ {{ index }}
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/indexes-anchor/props.ts b/uni_modules/tdesign-uniapp/components/indexes-anchor/props.ts
new file mode 100644
index 0000000..3545db3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes-anchor/props.ts
@@ -0,0 +1,12 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export default {
+ /** 索引字符 */
+ index: {
+ type: [String, Number],
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/indexes-anchor/type.ts b/uni_modules/tdesign-uniapp/components/indexes-anchor/type.ts
new file mode 100644
index 0000000..f529e47
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes-anchor/type.ts
@@ -0,0 +1,12 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdIndexesAnchorProps {
+ /**
+ * 索引字符
+ */
+ index?: string | number;
+}
diff --git a/uni_modules/tdesign-uniapp/components/indexes/README.en-US.md b/uni_modules/tdesign-uniapp/components/indexes/README.en-US.md
new file mode 100644
index 0000000..e0f07c3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes/README.en-US.md
@@ -0,0 +1,76 @@
+:: BASE_DOC ::
+
+## API
+
+### Indexes Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+current | String / Number | - | `v-model:current` is supported | N
+default-current | String / Number | - | uncontrolled property | N
+index-list | Array | - | Typescript:`Array` | N
+list | Array | [] | `deprecated`。Typescript:`ListItem[] ` `interface ListItem { title: string; index: string; children: { title: string; [key: string]: any} [] }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/indexes/type.ts) | N
+sticky | Boolean | true | Typescript:`Boolean` | N
+sticky-offset | Number | 0 | \- | N
+
+### Indexes Events
+
+name | params | description
+-- | -- | --
+change | `(context: { index: string \| number })` | \-
+select | `(context: { index: string \| number })` | \-
+
+### Indexes Slots
+
+name | Description
+-- | --
+\- | \-
+
+
+### IndexesAnchor Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+index | String / Number | - | \- | N
+
+### IndexesAnchor Slots
+
+name | Description
+-- | --
+\- | \-
+
+### IndexesAnchor External Classes
+
+className | Description
+-- | --
+t-class | class name of root node
+t-class-sidebar | \-
+t-class-sidebar-item | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-indexes-sidebar-active-bg-color | @brand-color | -
+--td-indexes-sidebar-active-color | @text-color-anti | -
+--td-indexes-sidebar-color | @text-color-primary | -
+--td-indexes-sidebar-font | @font-body-small | -
+--td-indexes-sidebar-item-size | 40rpx | -
+--td-indexes-sidebar-right | 16rpx | -
+--td-indexes-sidebar-tips-bg-color | @brand-color-light | -
+--td-indexes-sidebar-tips-color | @brand-color | -
+--td-indexes-sidebar-tips-font | @font-title-extraLarge | -
+--td-indexes-sidebar-tips-right | calc(100% + 32rpx) | -
+--td-indexes-sidebar-tips-size | 96rpx | -
+--td-indexes-anchor-active-bg-color | @bg-color-container | -
+--td-indexes-anchor-active-color | @brand-color | -
+--td-indexes-anchor-active-font-weight | 600 | -
+--td-indexes-anchor-bg-color | @bg-color-secondarycontainer | -
+--td-indexes-anchor-border-color | @component-border | -
+--td-indexes-anchor-color | @text-color-primary | -
+--td-indexes-anchor-font | @font-body-medium | -
+--td-indexes-anchor-padding | 8rpx 32rpx | -
+--td-indexes-anchor-top | 0 | -
diff --git a/uni_modules/tdesign-uniapp/components/indexes/README.md b/uni_modules/tdesign-uniapp/components/indexes/README.md
new file mode 100644
index 0000000..8569c7d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes/README.md
@@ -0,0 +1,105 @@
+---
+title: Indexes 索引
+description: 用于页面中信息快速检索,可以根据目录中的页码快速找到所需的内容。
+spline: navigation
+isComponent: true
+---
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TIndexes from '@tdesign/uniapp/indexes/indexes.vue';
+import TIndexesAnchor from '@tdesign/uniapp/indexes-anchor/indexes-anchor.vue';
+```
+
+### 基础索引
+
+
+{{ base }}
+
+### 自定义索引
+
+{{ custom }}
+
+## FAQ
+
+### 在滚动元素中, Indexes 索引组件失效([#3746](https://github.com/Tencent/tdesign-miniprogram/issues/3746))?
+
+`Indexes` 组件自 `0.32.0` 版本开始移除了对 `scroll-view` 的依赖,组件内部使用 [wx.pageScrollTo](https://developers.weixin.qq.com/miniprogram/dev/api/ui/scroll/wx.pageScrollTo.html) 滚动到指定位置,因此只支持页面级滚动,不支持在滚动元素中嵌套使用,包括 overflow: scroll、 scroll-view 等。
+
+### API
+
+### Indexes Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+current | String / Number | - | 索引列表的激活项,默认首项。支持语法糖 `v-model:current` | N
+default-current | String / Number | - | 索引列表的激活项,默认首项。非受控属性 | N
+index-list | Array | - | 索引字符列表。不传默认 `A-Z`。TS 类型:`Array` | N
+list | Array | [] | 已废弃。索引列表的列表数据。每个元素包含三个子元素,index(string):索引值,例如1,2,3,...或A,B,C等;title(string): 索引标题,可不填将默认设为索引值;children(Array<{title: string}>): 子元素列表,title为子元素的展示文案。TS 类型:`ListItem[] ` `interface ListItem { title: string; index: string; children: { title: string; [key: string]: any} [] }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/indexes/type.ts) | N
+sticky | Boolean | true | 索引是否吸顶,默认为true。TS 类型:`Boolean` | N
+sticky-offset | Number | 0 | 锚点吸顶时与顶部的距离 | N
+
+### Indexes Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { index: string \| number })` | 索引发生变更时触发事件
+select | `(context: { index: string \| number })` | 点击侧边栏时触发事件
+
+### Indexes Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+
+
+### IndexesAnchor Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+index | String / Number | - | 索引字符 | N
+
+### IndexesAnchor Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+
+### IndexesAnchor External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-sidebar | 侧边栏样式类
+t-class-sidebar-item | 侧边栏选项样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-indexes-sidebar-active-bg-color | @brand-color | -
+--td-indexes-sidebar-active-color | @text-color-anti | -
+--td-indexes-sidebar-color | @text-color-primary | -
+--td-indexes-sidebar-font | @font-body-small | -
+--td-indexes-sidebar-item-size | 40rpx | -
+--td-indexes-sidebar-right | 16rpx | -
+--td-indexes-sidebar-tips-bg-color | @brand-color-light | -
+--td-indexes-sidebar-tips-color | @brand-color | -
+--td-indexes-sidebar-tips-font | @font-title-extraLarge | -
+--td-indexes-sidebar-tips-right | calc(100% + 32rpx) | -
+--td-indexes-sidebar-tips-size | 96rpx | -
+--td-indexes-anchor-active-bg-color | @bg-color-container | -
+--td-indexes-anchor-active-color | @brand-color | -
+--td-indexes-anchor-active-font-weight | 600 | -
+--td-indexes-anchor-bg-color | @bg-color-secondarycontainer | -
+--td-indexes-anchor-border-color | @component-border | -
+--td-indexes-anchor-color | @text-color-primary | -
+--td-indexes-anchor-font | @font-body-medium | -
+--td-indexes-anchor-padding | 8rpx 32rpx | -
+--td-indexes-anchor-top | 0 | -
diff --git a/uni_modules/tdesign-uniapp/components/indexes/computed.js b/uni_modules/tdesign-uniapp/components/indexes/computed.js
new file mode 100644
index 0000000..9ab8238
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes/computed.js
@@ -0,0 +1,4 @@
+export function getFirstCharacter(str) {
+ return str.toString().substring(0, 1);
+}
+
diff --git a/uni_modules/tdesign-uniapp/components/indexes/indexes-anchor-props.ts b/uni_modules/tdesign-uniapp/components/indexes/indexes-anchor-props.ts
new file mode 100644
index 0000000..3545db3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes/indexes-anchor-props.ts
@@ -0,0 +1,12 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export default {
+ /** 索引字符 */
+ index: {
+ type: [String, Number],
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/indexes/indexes.css b/uni_modules/tdesign-uniapp/components/indexes/indexes.css
new file mode 100644
index 0000000..c6cc3d9
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes/indexes.css
@@ -0,0 +1,50 @@
+.t-indexes {
+ position: relative;
+ height: 100vh;
+}
+.t-indexes__sidebar {
+ position: fixed;
+ right: var(--td-indexes-sidebar-right, 16rpx);
+ width: var(--td-indexes-sidebar-item-size, 40rpx);
+ color: var(--td-indexes-sidebar-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font: var(--td-indexes-sidebar-font, var(--td-font-body-small, 24rpx / 40rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ display: flex;
+ flex-flow: column nowrap;
+ top: 50%;
+ transform: translateY(-50%);
+ z-index: 1;
+}
+.t-indexes__sidebar-item {
+ border-radius: 50%;
+ position: relative;
+ text-align: center;
+}
+.t-indexes__sidebar-item--active {
+ background-color: var(--td-indexes-sidebar-active-bg-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ color: var(--td-indexes-sidebar-active-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+}
+.t-indexes__sidebar-item + .t-indexes__sidebar-item {
+ margin-top: 4rpx;
+}
+.t-indexes__sidebar-tips {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ min-width: var(--td-indexes-sidebar-tips-size, 96rpx);
+ max-width: 198rpx;
+ padding: 0 32rpx;
+ box-sizing: border-box;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ height: var(--td-indexes-sidebar-tips-size, 96rpx);
+ font: var(--td-indexes-sidebar-tips-font, var(--td-font-title-extraLarge, 600 40rpx / 56rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-indexes-sidebar-tips-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ background-color: var(--td-indexes-sidebar-tips-bg-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+ border-radius: var(--td-indexes-sidebar-tips-size, 96rpx);
+ position: absolute;
+ top: 50%;
+ bottom: 0;
+ transform: translateY(-50%);
+ right: var(--td-indexes-sidebar-tips-right, calc(100% + 32rpx));
+}
diff --git a/uni_modules/tdesign-uniapp/components/indexes/indexes.vue b/uni_modules/tdesign-uniapp/components/indexes/indexes.vue
new file mode 100644
index 0000000..96dc594
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes/indexes.vue
@@ -0,0 +1,371 @@
+
+
+
+
+
+ {{ getFirstCharacter(item) }}
+
+
+
+ {{ dataCurrent }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/indexes/props.ts b/uni_modules/tdesign-uniapp/components/indexes/props.ts
new file mode 100644
index 0000000..eb42187
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes/props.ts
@@ -0,0 +1,40 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export default {
+ /** 索引列表的激活项,默认首项 */
+ current: {
+ type: [String, Number],
+ },
+ /** 索引列表的激活项,默认首项,非受控属性 */
+ defaultCurrent: {
+ type: [String, Number],
+ },
+ /** 索引字符列表。不传默认 `A-Z` */
+ indexList: {
+ type: Array,
+ },
+ /** 索引是否吸顶,默认为true */
+ sticky: {
+ type: Boolean,
+ default: true,
+ },
+ /** 锚点吸顶时与顶部的距离 */
+ stickyOffset: {
+ type: Number,
+ default: 0,
+ },
+ /** 索引发生变更时触发事件 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击侧边栏时触发事件 */
+ onSelect: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/indexes/type.ts b/uni_modules/tdesign-uniapp/components/indexes/type.ts
new file mode 100644
index 0000000..3fa73d6
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/indexes/type.ts
@@ -0,0 +1,38 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdIndexesProps {
+ /**
+ * 索引列表的激活项,默认首项
+ */
+ current?: string | number;
+ /**
+ * 索引列表的激活项,默认首项,非受控属性
+ */
+ defaultCurrent?: string | number;
+ /**
+ * 索引字符列表。不传默认 `A-Z`
+ */
+ indexList?: Array;
+ /**
+ * 索引是否吸顶,默认为true
+ * @default true
+ */
+ sticky?: Boolean;
+ /**
+ * 锚点吸顶时与顶部的距离
+ * @default 0
+ */
+ stickyOffset?: number;
+ /**
+ * 索引发生变更时触发事件
+ */
+ onChange?: (context: { index: string | number }) => void;
+ /**
+ * 点击侧边栏时触发事件
+ */
+ onSelect?: (context: { index: string | number }) => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/input/README.en-US.md b/uni_modules/tdesign-uniapp/components/input/README.en-US.md
new file mode 100644
index 0000000..c1ec89a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/input/README.en-US.md
@@ -0,0 +1,121 @@
+:: BASE_DOC ::
+
+## API
+
+### Input Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+adjust-position | Boolean | true | \- | N
+align | String | left | text align type。options: left/center/right | N
+allow-input-over-max | Boolean | false | allow to continue input on value length is over `maxlength` or `maxcharacter` | N
+always-embed | Boolean | false | \- | N
+auto-focus | Boolean | false | \- | N
+borderless | Boolean | false | input without border | N
+clear-trigger | String | always | show clear icon, clicked to clear input value。options: always / focus | N
+clearable | Boolean / Object | false | show clear icon, clicked to clear input value | N
+confirm-hold | Boolean | false | \- | N
+confirm-type | String | done | options: send/search/next/go/done | N
+cursor | Number | -1 | \- | N
+cursor-color | String | #0052d9 | \- | N
+cursor-spacing | Number | 0 | \- | N
+disabled | Boolean | undefined | make input to be disabled | N
+error-message | String | - | `deprecated` | N
+focus | Boolean | false | \- | N
+format | Function | - | input value formatter, `type=number` does not work. if you need to format number, `InputNumber` Component might be better。Typescript:`InputFormatType` `type InputFormatType = (value: InputValue) => string`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/input/type.ts) | N
+hold-keyboard | Boolean | false | \- | N
+label | String | - | text on the left of input | N
+layout | String | horizontal | options: vertical/horizontal | N
+maxcharacter | Number | - | \- | N
+maxlength | Number | -1 | \- | N
+password | Boolean | false | `deprecated` | N
+placeholder | String | undefined | \- | N
+placeholder-class | String | input-placeholder | \- | N
+placeholder-style | String | - | \- | N
+prefix-icon | String / Object | - | \- | N
+readonly | Boolean | undefined | \- | N
+safe-password-cert-path | String | - | \- | N
+safe-password-custom-hash | String | - | \- | N
+safe-password-length | Number | - | \- | N
+safe-password-nonce | String | - | \- | N
+safe-password-salt | String | - | \- | N
+safe-password-time-stamp | Number | - | \- | N
+selection-end | Number | -1 | \- | N
+selection-start | Number | -1 | \- | N
+size | String | medium | `deprecated`。options: small/medium。Typescript:`'medium' \| 'small'` | N
+status | String | default | options: default/success/warning/error | N
+suffix | String | - | suffix content before suffixIcon | N
+suffix-icon | String / Object | - | \- | N
+tips | String | - | tips on the bottom of input, different `status` can make tips to be different color | N
+type | String | text | options: text/number/idcard/digit/safe-password/password/nickname | N
+value | String / Number | - | input value。Typescript:`InputValue` `type InputValue = string \| number`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/input/type.ts) | N
+default-value | String / Number | - | input value。uncontrolled property。Typescript:`InputValue` `type InputValue = string \| number`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/input/type.ts) | N
+
+### Input Events
+
+name | params | description
+-- | -- | --
+blur | `(context: { value: InputValue })` | \-
+change | `(context: { value: InputValue, cursor: number, keyCode: number })` | \-
+clear | \- | \-
+click | `(context: { trigger: InputTrigger })` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/input/type.ts)。
`type InputTrigger = 'suffix' \| 'suffix-icon'`
+enter | `(context: { value: InputValue })` | \-
+focus | `(context: { value: InputValue })` | \-
+keyboardheightchange | `(context: { height: number, duration: number })` | \-
+nicknamereview | `(context: { pass: boolean, timeout: boolean })` | \-
+validate | `(context: { error?: 'exceed-maximum' \| 'below-minimum' })` | trigger on text length being over max length or max character
+
+### Input Slots
+
+name | Description
+-- | --
+extra | \-
+label | text on the left of input
+prefix-icon | \-
+suffix | suffix content before suffixIcon
+suffix-icon | \-
+tips | \-
+
+### Input External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-clearable | \-
+t-class-input | \-
+t-class-label | \-
+t-class-prefix-icon | \-
+t-class-suffix | \-
+t-class-suffix-icon | \-
+t-class-tips | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-input-align-items | center | -
+--td-input-bg-color | @bg-color-container | -
+--td-input-border-color | @component-stroke | -
+--td-input-border-left-space | 32rpx | -
+--td-input-border-right-space | 0 | -
+--td-input-default-text-color | @text-color-primary | -
+--td-input-default-tips-color | @text-color-placeholder | -
+--td-input-disabled-text-color | @text-color-disabled | -
+--td-input-error-text-color | @error-color | -
+--td-input-error-tips-color | @error-color | -
+--td-input-label-max-width | 5em | -
+--td-input-label-min-width | 2em | -
+--td-input-label-text-color | @text-color-primary | -
+--td-input-label-text-font | @font-body-large | -
+--td-input-placeholder-text-color | @text-color-placeholder | -
+--td-input-placeholder-text-font | @font-body-large | -
+--td-input-prefix-icon-color | @text-color-primary | -
+--td-input-success-text-color | @success-color | -
+--td-input-success-tips-color | @success-color | -
+--td-input-suffix-icon-color | @text-color-placeholder | -
+--td-input-suffix-text-color | @text-color-primary | -
+--td-input-vertical-padding | 32rpx | -
+--td-input-warning-text-color | @warning-color | -
+--td-input-warning-tips-color | @warning-color | -
diff --git a/uni_modules/tdesign-uniapp/components/input/README.md b/uni_modules/tdesign-uniapp/components/input/README.md
new file mode 100644
index 0000000..e4985bb
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/input/README.md
@@ -0,0 +1,190 @@
+---
+title: Input 输入框
+description: 用于单行文本信息输入。
+spline: form
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TInput from '@tdesign/uniapp/input/input.vue';
+```
+
+### 01 组件类型
+
+基础输入框
+
+{{ base }}
+
+带字数限制输入框
+
+{{ maxlength }}
+
+带操作输入框
+
+{{ suffix }}
+
+带图标输入框
+
+{{ prefix }}
+
+特定类型输入框
+
+{{ special }}
+
+### 02 组件状态
+
+输入框状态
+
+{{ status }}
+
+信息超长状态
+
+{{ label }}
+
+### 03 组件样式
+
+内容位置
+
+{{ align }}
+
+竖排样式
+
+{{ layout }}
+
+非通栏样式
+
+{{ banner }}
+
+标签外置样式
+
+{{ bordered }}
+
+自定义样式文本框
+
+{{ custom }}
+
+## API
+
+### Input Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+adjust-position | Boolean | true | 键盘弹起时,是否自动上推页面 | N
+align | String | left | 文本内容位置,居左/居中/居右。可选项:left/center/right | N
+allow-input-over-max | Boolean | false | 超出 `maxlength` 或 `maxcharacter` 之后是否允许继续输入 | N
+always-embed | Boolean | false | 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) | N
+auto-focus | Boolean | false | (即将废弃,请直接使用 focus )自动聚焦,拉起键盘 | N
+borderless | Boolean | false | 是否开启无边框模式 | N
+clear-trigger | String | always | 清空图标触发方式,仅在输入框有值时有效。可选项:always / focus | N
+clearable | Boolean / Object | false | 是否可清空,默认不启动。值为 `true` 表示使用默认清空按钮,值为 `Object` 表示透传至 `icon` | N
+confirm-hold | Boolean | false | 点击键盘右下角按钮时是否保持键盘不收起 | N
+confirm-type | String | done | 设置键盘右下角按钮的文字,仅在type='text'时生效。
具体释义:
`send` 右下角按钮为“发送”;
`search` 右下角按钮为“搜索”;
`next` 右下角按钮为“下一个”;
`go` 右下角按钮为“前往”;
`done` 右下角按钮为“完成”。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html)。可选项:send/search/next/go/done | N
+cursor | Number | -1 | 指定 focus 时的光标位置 | N
+cursor-color | String | #0052d9 | 光标颜色。iOS 下的格式为十六进制颜色值 #000000,安卓下的只支持 default 和 green,Skyline 下无限制 | N
+cursor-spacing | Number | 0 | 指定光标与键盘的距离,取 input 距离底部的距离和 cursor-spacing 指定的距离的最小值作为光标与键盘的距离 | N
+disabled | Boolean | undefined | 是否禁用输入框 | N
+error-message | String | - | 已废弃。错误提示文本,值为空不显示(废弃属性,如果需要,请更为使用 status 和 tips) | N
+focus | Boolean | false | 获取焦点 | N
+format | Function | - | 指定输入框展示值的格式。TS 类型:`InputFormatType` `type InputFormatType = (value: InputValue) => string`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/input/type.ts) | N
+hold-keyboard | Boolean | false | focus时,点击页面的时候不收起键盘 | N
+label | String | - | 左侧文本 | N
+layout | String | horizontal | 标题输入框布局方式。可选项:vertical/horizontal | N
+maxcharacter | Number | - | 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用 | N
+maxlength | Number | -1 | 用户最多可以输入的文本长度,一个中文等于一个计数长度。默认为 -1,不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用 | N
+password | Boolean | false | 已废弃。是否是密码类型(已废弃,请更为使用 type 指定输入框类型) | N
+placeholder | String | undefined | 占位符 | N
+placeholder-class | String | input-placeholder | 指定 placeholder 的样式类 | N
+placeholder-style | String | - | 指定 placeholder 的样式 | N
+prefix-icon | String / Object | - | 组件前置图标。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` | N
+readonly | Boolean | undefined | 只读状态 | N
+safe-password-cert-path | String | - | 安全键盘加密公钥的路径,只支持包内路径 | N
+safe-password-custom-hash | String | - | 安全键盘计算 hash 的算法表达式,如 `md5(sha1('foo' + sha256(sm3(password + 'bar'))))` | N
+safe-password-length | Number | - | 安全键盘输入密码长度 | N
+safe-password-nonce | String | - | 安全键盘加密盐值 | N
+safe-password-salt | String | - | 安全键盘计算 hash 盐值,若指定custom-hash 则无效 | N
+safe-password-time-stamp | Number | - | 安全键盘加密时间戳 | N
+selection-end | Number | -1 | 光标结束位置,自动聚集时有效,需与 selection-start 搭配使用 | N
+selection-start | Number | -1 | 光标起始位置,自动聚集时有效,需与 selection-end 搭配使用 | N
+size | String | medium | 已废弃。输入框尺寸。可选项:small/medium。TS 类型:`'medium' \| 'small'` | N
+status | String | default | 输入框状态。可选项:default/success/warning/error | N
+suffix | String | - | 后置图标前的后置内容 | N
+suffix-icon | String / Object | - | 后置文本内容。值为字符串则表示图标名称,值为 `Object` 类型,表示透传至 `icon` | N
+tips | String | - | 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式 | N
+type | String | text | 输入框类型。可选项:text/number/idcard/digit/safe-password/password/nickname | N
+value | String / Number | - | 输入框的值。TS 类型:`InputValue` `type InputValue = string \| number`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/input/type.ts) | N
+default-value | String / Number | - | 输入框的值。非受控属性。TS 类型:`InputValue` `type InputValue = string \| number`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/input/type.ts) | N
+
+### Input Events
+
+名称 | 参数 | 描述
+-- | -- | --
+blur | `(context: { value: InputValue })` | 失去焦点时触发
+change | `(context: { value: InputValue, cursor: number, keyCode: number })` | 输入框值发生变化时触发;cursor 为光标位置;
+clear | \- | 清空按钮点击时触发
+click | `(context: { trigger: InputTrigger })` | 点击事件。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/input/type.ts)。。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/input/type.ts)。
`type InputTrigger = 'suffix' \| 'suffix-icon'`
+enter | `(context: { value: InputValue })` | 回车键按下时触发
+focus | `(context: { value: InputValue })` | 获得焦点时触发
+keyboardheightchange | `(context: { height: number, duration: number })` | 键盘高度发生变化的时候触发此事件
+nicknamereview | `(context: { pass: boolean, timeout: boolean })` | 用户昵称审核完毕后触发,仅在 type 为 "nickname" 时有效
+validate | `(context: { error?: 'exceed-maximum' \| 'below-minimum' })` | 字数超出限制时触发
+
+### Input Slots
+
+名称 | 描述
+-- | --
+extra | 右侧额外内容
+label | 自定义 `label` 显示内容
+prefix-icon | 组件前置图标
+suffix | 自定义 `suffix` 显示内容
+suffix-icon | 后置文本图标
+tips | 输入框下方提示内容
+
+### Input External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-clearable | 清空按钮样式类
+t-class-input | 输入框样式类
+t-class-label | 标签样式类
+t-class-prefix-icon | 前置图标样式类
+t-class-suffix | 后置样式类
+t-class-suffix-icon | 后置图标样式类
+t-class-tips | 提示样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-input-align-items | center | -
+--td-input-bg-color | @bg-color-container | -
+--td-input-border-color | @component-stroke | -
+--td-input-border-left-space | 32rpx | -
+--td-input-border-right-space | 0 | -
+--td-input-default-text-color | @text-color-primary | -
+--td-input-default-tips-color | @text-color-placeholder | -
+--td-input-disabled-text-color | @text-color-disabled | -
+--td-input-error-text-color | @error-color | -
+--td-input-error-tips-color | @error-color | -
+--td-input-label-max-width | 5em | -
+--td-input-label-min-width | 2em | -
+--td-input-label-text-color | @text-color-primary | -
+--td-input-label-text-font | @font-body-large | -
+--td-input-placeholder-text-color | @text-color-placeholder | -
+--td-input-placeholder-text-font | @font-body-large | -
+--td-input-prefix-icon-color | @text-color-primary | -
+--td-input-success-text-color | @success-color | -
+--td-input-success-tips-color | @success-color | -
+--td-input-suffix-icon-color | @text-color-placeholder | -
+--td-input-suffix-text-color | @text-color-primary | -
+--td-input-vertical-padding | 32rpx | -
+--td-input-warning-text-color | @warning-color | -
+--td-input-warning-tips-color | @warning-color | -
diff --git a/uni_modules/tdesign-uniapp/components/input/computed.js b/uni_modules/tdesign-uniapp/components/input/computed.js
new file mode 100644
index 0000000..d824882
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/input/computed.js
@@ -0,0 +1,13 @@
+export function getInputClass(classPrefix, suffix, align, disabled) {
+ const className = [`${classPrefix}__control`];
+
+ if (align) {
+ className.push(`${classPrefix}--${align}`);
+ }
+
+ if (disabled) {
+ className.push(`${classPrefix}__control--disabled`);
+ }
+ return className.join(' ');
+}
+
diff --git a/uni_modules/tdesign-uniapp/components/input/input.css b/uni_modules/tdesign-uniapp/components/input/input.css
new file mode 100644
index 0000000..a1015da
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/input/input.css
@@ -0,0 +1,161 @@
+.t-input {
+ background-color: var(--td-input-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ display: flex;
+ align-items: var(--td-input-align-items, center);
+ flex: 1;
+ padding: var(--td-input-vertical-padding, 32rpx);
+ overflow: hidden;
+}
+.t-input--border {
+ position: relative;
+}
+.t-input--border::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: unset;
+ bottom: 0;
+ left: unset;
+ right: unset;
+ background-color: var(--td-input-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-input--border::after {
+ height: 1px;
+ left: 0;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-input--border:after {
+ left: var(--td-input-border-left-space, 32rpx);
+ right: var(--td-input-border-right-space, 0);
+}
+.t-input--layout-vertical {
+ flex-direction: column;
+ align-items: start;
+}
+.t-input__wrap--prefix {
+ display: flex;
+}
+.t-input__icon--prefix {
+ font-size: 48rpx;
+ color: var(--td-input-prefix-icon-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-input__label:not(:empty) {
+ min-width: var(--td-input-label-min-width, 2em);
+ max-width: var(--td-input-label-max-width, 5em);
+ font: var(--td-input-label-text-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-input-label-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ margin-right: var(--td-spacer-2, 32rpx);
+ word-wrap: break-word;
+}
+.t-input--layout-vertical .t-input__label:not(:empty) {
+ font-size: var(--td-font-size-base, 28rpx);
+ padding-bottom: 8rpx;
+}
+.t-input__icon--prefix:not(:empty) + .t-input__label:not(:empty) {
+ padding-left: 8rpx;
+}
+.t-input__label:not(:empty) + .t-input__wrap {
+ margin-left: var(--td-spacer-2, 32rpx);
+}
+.t-input__icon--prefix:not(:empty) + .t-input__label:empty {
+ margin-right: var(--td-spacer-2, 32rpx);
+}
+.t-input__wrap {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ flex-wrap: wrap;
+ justify-content: center;
+ flex-shrink: 1;
+ flex: 1;
+}
+.t-input__wrap .t-input__content {
+ display: flex;
+ width: 100%;
+ align-items: center;
+ font: var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
+.t-input__wrap--clearable-icon,
+.t-input__wrap--suffix-icon,
+.t-input__wrap--suffix {
+ flex: 0 0 auto;
+ padding-left: var(--td-spacer-1, 24rpx);
+}
+.t-input__wrap--clearable-icon:empty,
+.t-input__wrap--suffix-icon:empty,
+.t-input__wrap--suffix:empty {
+ display: none;
+}
+.t-input__wrap--clearable-icon,
+.t-input__wrap--suffix-icon {
+ font-size: 48rpx;
+ color: var(--td-input-suffix-icon-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+}
+.t-input__wrap--suffix {
+ font-size: var(--td-font-size-m, 32rpx);
+ color: var(--td-input-suffix-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-input__icon--prefix:empty,
+.t-input__tips:empty,
+.t-input__wrap--clearable-icon:empty,
+.t-input__wrap--suffix-icon:empty,
+.t-input__wrap--suffix:empty {
+ display: none;
+}
+.t-input__control {
+ display: block;
+ box-sizing: border-box;
+ width: 100%;
+ min-width: 0;
+ min-height: 48rpx;
+ margin: 0;
+ padding: 0;
+ color: var(--td-input-default-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ line-height: inherit;
+ background-color: transparent;
+ border: 0;
+ resize: none;
+ font-size: inherit;
+}
+.t-input__control--disabled {
+ color: var(--td-input-disabled-text-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+ cursor: not-allowed;
+ opacity: 1;
+ -webkit-text-fill-color: currentColor;
+}
+.t-input__control--read-only {
+ cursor: default;
+}
+.t-input--left {
+ text-align: left;
+}
+.t-input--right {
+ text-align: right;
+}
+.t-input--center {
+ text-align: center;
+}
+.t-input__placeholder {
+ color: var(--td-input-placeholder-text-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ font: var(--td-input-placeholder-text-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-input__placeholder--disabled {
+ color: var(--td-input-disabled-text-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-input__tips {
+ font: var(--td-font-body-small, 24rpx / 40rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+ padding-top: 8rpx;
+}
+.t-input--default + .t-input__tips {
+ color: var(--td-input-default-tips-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+}
+.t-input--success + .t-input__tips {
+ color: var(--td-input-success-tips-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+}
+.t-input--warning + .t-input__tips {
+ color: var(--td-input-warning-tips-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+}
+.t-input--error + .t-input__tips {
+ color: var(--td-input-error-tips-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
diff --git a/uni_modules/tdesign-uniapp/components/input/input.vue b/uni_modules/tdesign-uniapp/components/input/input.vue
new file mode 100644
index 0000000..2387b60
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/input/input.vue
@@ -0,0 +1,407 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ suffix }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ tips }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/input/props.ts b/uni_modules/tdesign-uniapp/components/input/props.ts
new file mode 100644
index 0000000..51ef0ae
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/input/props.ts
@@ -0,0 +1,247 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdInputProps } from './type';
+export default {
+ /** 键盘弹起时,是否自动上推页面 */
+ adjustPosition: {
+ type: Boolean,
+ default: true,
+ },
+ /** 文本内容位置,居左/居中/居右 */
+ align: {
+ type: String,
+ default: 'left' as TdInputProps['align'],
+ validator(val: TdInputProps['align']): boolean {
+ if (!val) return true;
+ return ['left', 'center', 'right'].includes(val);
+ },
+ },
+ /** 超出 `maxlength` 或 `maxcharacter` 之后是否允许继续输入 */
+ allowInputOverMax: Boolean,
+ /** 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) */
+ alwaysEmbed: Boolean,
+ /** (即将废弃,请直接使用 focus )自动聚焦,拉起键盘 */
+ autoFocus: Boolean,
+ /** 是否开启无边框模式 */
+ borderless: Boolean,
+ /** 清空图标触发方式,仅在输入框有值时有效 */
+ clearTrigger: {
+ type: String,
+ default: 'always' as TdInputProps['clearTrigger'],
+ validator(val: TdInputProps['clearTrigger']): boolean {
+ if (!val) return true;
+ return ['always', 'focus'].includes(val);
+ },
+ },
+ /** 是否可清空,默认不启动。值为 `true` 表示使用默认清空按钮,值为 `Object` 表示透传至 `icon` */
+ clearable: {
+ type: [Boolean, Object],
+ default: false as TdInputProps['clearable'],
+ },
+ /** 点击键盘右下角按钮时是否保持键盘不收起 */
+ confirmHold: Boolean,
+ /** 设置键盘右下角按钮的文字,仅在type='text'时生效。
具体释义:
`send` 右下角按钮为“发送”;
`search` 右下角按钮为“搜索”;
`next` 右下角按钮为“下一个”;
`go` 右下角按钮为“前往”;
`done` 右下角按钮为“完成”。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html) */
+ confirmType: {
+ type: String,
+ default: 'done' as TdInputProps['confirmType'],
+ validator(val: TdInputProps['confirmType']): boolean {
+ if (!val) return true;
+ return ['send', 'search', 'next', 'go', 'done'].includes(val);
+ },
+ },
+ /** 指定 focus 时的光标位置 */
+ cursor: {
+ type: Number,
+ default: -1,
+ },
+ /** 光标颜色。iOS 下的格式为十六进制颜色值 #000000,安卓下的只支持 default 和 green,Skyline 下无限制 */
+ cursorColor: {
+ type: String,
+ default: '#0052d9',
+ },
+ /** 指定光标与键盘的距离,取 input 距离底部的距离和 cursor-spacing 指定的距离的最小值作为光标与键盘的距离 */
+ cursorSpacing: {
+ type: Number,
+ default: 0,
+ },
+ /** 是否禁用输入框 */
+ disabled: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 获取焦点 */
+ focus: Boolean,
+ /** 指定输入框展示值的格式 */
+ format: {
+ type: Function,
+ },
+ /** focus时,点击页面的时候不收起键盘 */
+ holdKeyboard: Boolean,
+ /** 左侧文本 */
+ label: {
+ type: String,
+ },
+ /** 标题输入框布局方式 */
+ layout: {
+ type: String,
+ default: 'horizontal' as TdInputProps['layout'],
+ validator(val: TdInputProps['layout']): boolean {
+ if (!val) return true;
+ return ['vertical', 'horizontal'].includes(val);
+ },
+ },
+ /** 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用 */
+ maxcharacter: {
+ type: Number,
+ },
+ /** 用户最多可以输入的文本长度,一个中文等于一个计数长度。默认为 -1,不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用 */
+ maxlength: {
+ type: Number,
+ default: -1,
+ },
+ /** 占位符 */
+ placeholder: {
+ type: String,
+ default: undefined,
+ },
+ /** 指定 placeholder 的样式类 */
+ placeholderClass: {
+ type: String,
+ default: 'input-placeholder',
+ },
+ /** 指定 placeholder 的样式 */
+ placeholderStyle: {
+ type: String,
+ default: '',
+ },
+ /** 组件前置图标。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` */
+ prefixIcon: {
+ type: [String, Object],
+ },
+ /** 只读状态 */
+ readonly: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 安全键盘加密公钥的路径,只支持包内路径 */
+ safePasswordCertPath: {
+ type: String,
+ default: '',
+ },
+ /** 安全键盘计算 hash 的算法表达式,如 `md5(sha1('foo' + sha256(sm3(password + 'bar'))))` */
+ safePasswordCustomHash: {
+ type: String,
+ default: '',
+ },
+ /** 安全键盘输入密码长度 */
+ safePasswordLength: {
+ type: Number,
+ },
+ /** 安全键盘加密盐值 */
+ safePasswordNonce: {
+ type: String,
+ default: '',
+ },
+ /** 安全键盘计算 hash 盐值,若指定custom-hash 则无效 */
+ safePasswordSalt: {
+ type: String,
+ default: '',
+ },
+ /** 安全键盘加密时间戳 */
+ safePasswordTimeStamp: {
+ type: Number,
+ },
+ /** 光标结束位置,自动聚集时有效,需与 selection-start 搭配使用 */
+ selectionEnd: {
+ type: Number,
+ default: -1,
+ },
+ /** 光标起始位置,自动聚集时有效,需与 selection-end 搭配使用 */
+ selectionStart: {
+ type: Number,
+ default: -1,
+ },
+ /** 输入框状态 */
+ status: {
+ type: String,
+ default: 'default' as TdInputProps['status'],
+ validator(val: TdInputProps['status']): boolean {
+ if (!val) return true;
+ return ['default', 'success', 'warning', 'error'].includes(val);
+ },
+ },
+ /** 后置图标前的后置内容 */
+ suffix: {
+ type: String,
+ },
+ /** 后置文本内容。值为字符串则表示图标名称,值为 `Object` 类型,表示透传至 `icon` */
+ suffixIcon: {
+ type: [String, Object],
+ },
+ /** 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式 */
+ tips: {
+ type: String,
+ },
+ /** 输入框类型 */
+ type: {
+ type: String,
+ default: 'text' as TdInputProps['type'],
+ validator(val: TdInputProps['type']): boolean {
+ if (!val) return true;
+ return ['text', 'number', 'idcard', 'digit', 'safe-password', 'password', 'nickname'].includes(val);
+ },
+ },
+ /** 输入框的值 */
+ value: {
+ type: [String, Number],
+ },
+ /** 失去焦点时触发 */
+ onBlur: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 输入框值发生变化时触发;cursor 为光标位置; */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 清空按钮点击时触发 */
+ onClear: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击事件。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/input/type.ts)。 */
+ onClick: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 回车键按下时触发 */
+ onEnter: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 获得焦点时触发 */
+ onFocus: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 键盘高度发生变化的时候触发此事件 */
+ onKeyboardheightchange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 用户昵称审核完毕后触发,仅在 type 为 "nickname" 时有效 */
+ onNicknamereview: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 字数超出限制时触发 */
+ onValidate: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/input/type.ts b/uni_modules/tdesign-uniapp/components/input/type.ts
new file mode 100644
index 0000000..20bc0e0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/input/type.ts
@@ -0,0 +1,237 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdInputProps {
+ /**
+ * 键盘弹起时,是否自动上推页面
+ * @default true
+ */
+ adjustPosition?: boolean;
+ /**
+ * 文本内容位置,居左/居中/居右
+ * @default left
+ */
+ align?: 'left' | 'center' | 'right';
+ /**
+ * 超出 `maxlength` 或 `maxcharacter` 之后是否允许继续输入
+ * @default false
+ */
+ allowInputOverMax?: boolean;
+ /**
+ * 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效)
+ * @default false
+ */
+ alwaysEmbed?: boolean;
+ /**
+ * (即将废弃,请直接使用 focus )自动聚焦,拉起键盘
+ * @default false
+ */
+ autoFocus?: boolean;
+ /**
+ * 是否开启无边框模式
+ * @default false
+ */
+ borderless?: boolean;
+ /**
+ * 清空图标触发方式,仅在输入框有值时有效
+ * @default always
+ */
+ clearTrigger?: 'always' | 'focus';
+ /**
+ * 是否可清空,默认不启动。值为 `true` 表示使用默认清空按钮,值为 `Object` 表示透传至 `icon`
+ * @default false
+ */
+ clearable?: boolean | object;
+ /**
+ * 点击键盘右下角按钮时是否保持键盘不收起
+ * @default false
+ */
+ confirmHold?: boolean;
+ /**
+ * 设置键盘右下角按钮的文字,仅在type='text'时生效。
具体释义:
`send` 右下角按钮为“发送”;
`search` 右下角按钮为“搜索”;
`next` 右下角按钮为“下一个”;
`go` 右下角按钮为“前往”;
`done` 右下角按钮为“完成”。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html)
+ * @default done
+ */
+ confirmType?: 'send' | 'search' | 'next' | 'go' | 'done';
+ /**
+ * 指定 focus 时的光标位置
+ * @default -1
+ */
+ cursor?: number;
+ /**
+ * 光标颜色。iOS 下的格式为十六进制颜色值 #000000,安卓下的只支持 default 和 green,Skyline 下无限制
+ * @default #0052d9
+ */
+ cursorColor?: string;
+ /**
+ * 指定光标与键盘的距离,取 input 距离底部的距离和 cursor-spacing 指定的距离的最小值作为光标与键盘的距离
+ * @default 0
+ */
+ cursorSpacing?: number;
+ /**
+ * 是否禁用输入框
+ */
+ disabled?: boolean;
+ /**
+ * 获取焦点
+ * @default false
+ */
+ focus?: boolean;
+ /**
+ * 指定输入框展示值的格式
+ */
+ format?: InputFormatType;
+ /**
+ * focus时,点击页面的时候不收起键盘
+ * @default false
+ */
+ holdKeyboard?: boolean;
+ /**
+ * 左侧文本
+ */
+ label?: string;
+ /**
+ * 标题输入框布局方式
+ * @default horizontal
+ */
+ layout?: 'vertical' | 'horizontal';
+ /**
+ * 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用
+ */
+ maxcharacter?: number;
+ /**
+ * 用户最多可以输入的文本长度,一个中文等于一个计数长度。默认为 -1,不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用
+ * @default -1
+ */
+ maxlength?: number;
+ /**
+ * 占位符
+ */
+ placeholder?: string;
+ /**
+ * 指定 placeholder 的样式类
+ * @default input-placeholder
+ */
+ placeholderClass?: string;
+ /**
+ * 指定 placeholder 的样式
+ * @default ''
+ */
+ placeholderStyle?: string;
+ /**
+ * 组件前置图标。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon`
+ */
+ prefixIcon?: string | object;
+ /**
+ * 只读状态
+ */
+ readonly?: boolean;
+ /**
+ * 安全键盘加密公钥的路径,只支持包内路径
+ * @default ''
+ */
+ safePasswordCertPath?: string;
+ /**
+ * 安全键盘计算 hash 的算法表达式,如 `md5(sha1('foo' + sha256(sm3(password + 'bar'))))`
+ * @default ''
+ */
+ safePasswordCustomHash?: string;
+ /**
+ * 安全键盘输入密码长度
+ */
+ safePasswordLength?: number;
+ /**
+ * 安全键盘加密盐值
+ * @default ''
+ */
+ safePasswordNonce?: string;
+ /**
+ * 安全键盘计算 hash 盐值,若指定custom-hash 则无效
+ * @default ''
+ */
+ safePasswordSalt?: string;
+ /**
+ * 安全键盘加密时间戳
+ */
+ safePasswordTimeStamp?: number;
+ /**
+ * 光标结束位置,自动聚集时有效,需与 selection-start 搭配使用
+ * @default -1
+ */
+ selectionEnd?: number;
+ /**
+ * 光标起始位置,自动聚集时有效,需与 selection-end 搭配使用
+ * @default -1
+ */
+ selectionStart?: number;
+ /**
+ * 输入框状态
+ * @default default
+ */
+ status?: 'default' | 'success' | 'warning' | 'error';
+ /**
+ * 后置图标前的后置内容
+ */
+ suffix?: string;
+ /**
+ * 后置文本内容。值为字符串则表示图标名称,值为 `Object` 类型,表示透传至 `icon`
+ */
+ suffixIcon?: string | object;
+ /**
+ * 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式
+ */
+ tips?: string;
+ /**
+ * 输入框类型
+ * @default text
+ */
+ type?: 'text' | 'number' | 'idcard' | 'digit' | 'safe-password' | 'password' | 'nickname';
+ /**
+ * 输入框的值
+ */
+ value?: InputValue;
+ /**
+ * 失去焦点时触发
+ */
+ onBlur?: (context: { value: InputValue }) => void;
+ /**
+ * 输入框值发生变化时触发;cursor 为光标位置;
+ */
+ onChange?: (context: { value: InputValue; cursor: number; keyCode: number }) => void;
+ /**
+ * 清空按钮点击时触发
+ */
+ onClear?: () => void;
+ /**
+ * 点击事件。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/input/type.ts)。
+ */
+ onClick?: (context: { trigger: InputTrigger }) => void;
+ /**
+ * 回车键按下时触发
+ */
+ onEnter?: (context: { value: InputValue }) => void;
+ /**
+ * 获得焦点时触发
+ */
+ onFocus?: (context: { value: InputValue }) => void;
+ /**
+ * 键盘高度发生变化的时候触发此事件
+ */
+ onKeyboardheightchange?: (context: { height: number; duration: number }) => void;
+ /**
+ * 用户昵称审核完毕后触发,仅在 type 为 "nickname" 时有效
+ */
+ onNicknamereview?: (context: { pass: boolean; timeout: boolean }) => void;
+ /**
+ * 字数超出限制时触发
+ */
+ onValidate?: (context: { error?: 'exceed-maximum' | 'below-minimum' }) => void;
+}
+
+export type InputFormatType = (value: InputValue) => string;
+
+export type InputValue = string | number;
+
+export type InputTrigger = 'suffix' | 'suffix-icon';
diff --git a/uni_modules/tdesign-uniapp/components/input/utils.js b/uni_modules/tdesign-uniapp/components/input/utils.js
new file mode 100644
index 0000000..6122db4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/input/utils.js
@@ -0,0 +1,38 @@
+import { getCharacterLength, coalesce } from '../common/utils';
+
+
+export function getInnerMaxLen({
+ allowInputOverMax,
+ maxcharacter,
+ maxlength,
+ dataValue,
+ rawValue,
+ count,
+}) {
+ if (allowInputOverMax) {
+ return -1;
+ }
+ if (!maxcharacter || maxcharacter < 0) {
+ return maxlength;
+ }
+ if (!dataValue) {
+ return maxcharacter;
+ }
+
+
+ const { length: realCount } = getCharacterLength('maxcharacter', rawValue, Infinity);
+
+ if (realCount >= maxcharacter) {
+ return dataValue.length;
+ }
+
+ const { length: computedCount } = getCharacterLength(
+ 'maxcharacter',
+ rawValue,
+ allowInputOverMax ? Infinity : maxcharacter,
+ );
+
+ const extra = (coalesce(count, computedCount)) - dataValue.length;
+
+ return maxcharacter - extra;
+}
diff --git a/uni_modules/tdesign-uniapp/components/link/README.en-US.md b/uni_modules/tdesign-uniapp/components/link/README.en-US.md
new file mode 100644
index 0000000..b54230a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/link/README.en-US.md
@@ -0,0 +1,67 @@
+:: BASE_DOC ::
+
+## API
+
+### Link Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+content | String | - | \- | N
+disabled | Boolean | false | make link to be disabled | N
+hover | Boolean | - | \- | N
+navigator-props | Object | {} | \- | N
+prefix-icon | String / Object | - | \- | N
+size | String | medium | options: small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+status | String | normal | `deprecated`。options: normal/active/disabled | N
+suffix-icon | String / Object | - | \- | N
+theme | String | default | options: default/primary/danger/warning/success | N
+underline | Boolean | - | \- | N
+
+### Link Events
+
+name | params | description
+-- | -- | --
+complete | \- | \-
+fail | \- | \-
+success | \- | \-
+
+### Link Slots
+
+name | Description
+-- | --
+\- | \-
+content | \-
+prefix-icon | \-
+suffix-icon | \-
+
+### Link External Classes
+
+className | Description
+-- | --
+t-class | class name of root node
+t-class-content | \-
+t-class-hover | \-
+t-class-prefix-icon | \-
+t-class-suffix-icon | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-link-danger-active-color | @error-color-active | -
+--td-link-danger-color | @error-color | -
+--td-link-danger-disabled-color | @error-color-disabled | -
+--td-link-default-active-color | @brand-color-active | -
+--td-link-default-color | @text-color-primary | -
+--td-link-default-disabled-color | @text-color-disabled | -
+--td-link-primary-active-color | @brand-color-active | -
+--td-link-primary-color | @brand-color | -
+--td-link-primary-disabled-color | @brand-color-disabled | -
+--td-link-success-active-color | @success-color-active | -
+--td-link-success-color | @success-color | -
+--td-link-success-disabled-color | @success-color-disabled | -
+--td-link-warning-active-color | @warning-color-active | -
+--td-link-warning-color | @warning-color | -
+--td-link-warning-disabled-color | @warning-color-disabled | -
diff --git a/uni_modules/tdesign-uniapp/components/link/README.md b/uni_modules/tdesign-uniapp/components/link/README.md
new file mode 100644
index 0000000..216abb6
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/link/README.md
@@ -0,0 +1,115 @@
+---
+title: Link 链接
+description: 文字超链接用于跳转一个新页面,如当前项目跳转,友情链接等。
+spline: navigation
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TLink from '@tdesign/uniapp/link/link.vue';
+```
+
+### 组件类型
+
+基础文字链接
+
+{{ content }}
+
+下划线文字链接
+
+{{ underline }}
+
+前置图标文字链接
+
+{{ prefix }}
+
+后置图标文字链接
+
+{{ suffix }}
+
+### 组件状态
+
+不同主题
+
+{{ theme }}
+
+禁用状态
+
+{{ disabled }}
+
+### 组件样式
+
+链接尺寸
+
+{{ size }}
+
+## API
+
+### Link Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+content | String | - | 链接内容 | N
+disabled | Boolean | false | 是否为禁用态 | N
+hover | Boolean | - | 是否开启点击反馈 | N
+navigator-props | Object | {} | 与 navigator 原生组件属性保持一致,具体使用参考:[微信开放文档](https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html)。使用时请将形如 `open-type` 风格的属性名改为 `openType` 风格 | N
+prefix-icon | String / Object | - | 前置图标 | N
+size | String | medium | 尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+status | String | normal | 已废弃。组件状态。可选项:normal/active/disabled | N
+suffix-icon | String / Object | - | 后置图标 | N
+theme | String | default | 组件风格,依次为默认色、品牌色、危险色、警告色、成功色。可选项:default/primary/danger/warning/success | N
+underline | Boolean | - | 是否显示链接下划线 | N
+
+### Link Events
+
+名称 | 参数 | 描述
+-- | -- | --
+complete | \- | 页面链接执行完成后触发(失败或成功均会触发)
+fail | \- | 页面链接跳转失败后触发
+success | \- | 页面链接跳转成功后触发
+
+### Link Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,作用同 `content` 插槽
+content | 自定义 `content` 显示内容
+prefix-icon | 自定义 `prefix-icon` 显示内容
+suffix-icon | 自定义 `suffix-icon` 显示内容
+
+### Link External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-content | 内容样式类
+t-class-hover | 悬停样式类
+t-class-prefix-icon | 前置图标样式类
+t-class-suffix-icon | 后置图标样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-link-danger-active-color | @error-color-active | -
+--td-link-danger-color | @error-color | -
+--td-link-danger-disabled-color | @error-color-disabled | -
+--td-link-default-active-color | @brand-color-active | -
+--td-link-default-color | @text-color-primary | -
+--td-link-default-disabled-color | @text-color-disabled | -
+--td-link-primary-active-color | @brand-color-active | -
+--td-link-primary-color | @brand-color | -
+--td-link-primary-disabled-color | @brand-color-disabled | -
+--td-link-success-active-color | @success-color-active | -
+--td-link-success-color | @success-color | -
+--td-link-success-disabled-color | @success-color-disabled | -
+--td-link-warning-active-color | @warning-color-active | -
+--td-link-warning-color | @warning-color | -
+--td-link-warning-disabled-color | @warning-color-disabled | -
diff --git a/uni_modules/tdesign-uniapp/components/link/link.css b/uni_modules/tdesign-uniapp/components/link/link.css
new file mode 100644
index 0000000..2bb9b7e
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/link/link.css
@@ -0,0 +1,118 @@
+.t-link--small .t-link__content {
+ font: var(--td-font-body-small, 24rpx / 40rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
+.t-link--small .t-link__prefix-icon,
+.t-link--small .t-link__suffix-icon {
+ font-size: 28rpx;
+}
+.t-link--medium .t-link__content {
+ font: var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
+.t-link--medium .t-link__prefix-icon,
+.t-link--medium .t-link__suffix-icon {
+ font-size: 32rpx;
+}
+.t-link--large .t-link__content {
+ font: var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
+.t-link--large .t-link__prefix-icon,
+.t-link--large .t-link__suffix-icon {
+ font-size: 36rpx;
+}
+.t-link--primary {
+ color: var(--td-link-primary-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-link--primary.t-link--underline::after {
+ border-color: var(--td-link-primary-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-link--primary.t-link--disabled {
+ color: var(--td-link-primary-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-link--primary.t-link--hover {
+ color: var(--td-link-primary-active-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
+}
+.t-link--primary.t-link--hover.t-link--underline::after {
+ border-color: var(--td-link-primary-active-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
+}
+.t-link--success {
+ color: var(--td-link-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+}
+.t-link--success.t-link--underline::after {
+ border-color: var(--td-link-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+}
+.t-link--success.t-link--disabled {
+ color: var(--td-link-success-disabled-color, var(--td-success-color-disabled, var(--td-success-color-3, #92dab2)));
+}
+.t-link--success.t-link--hover {
+ color: var(--td-link-success-active-color, var(--td-success-color-active, var(--td-success-color-6, #008858)));
+}
+.t-link--success.t-link--hover.t-link--underline::after {
+ border-color: var(--td-link-success-active-color, var(--td-success-color-active, var(--td-success-color-6, #008858)));
+}
+.t-link--warning {
+ color: var(--td-link-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+}
+.t-link--warning.t-link--underline::after {
+ border-color: var(--td-link-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+}
+.t-link--warning.t-link--disabled {
+ color: var(--td-link-warning-disabled-color, var(--td-warning-color-disabled, var(--td-warning-color-3, #ffb98c)));
+}
+.t-link--warning.t-link--hover {
+ color: var(--td-link-warning-active-color, var(--td-warning-color-active, var(--td-warning-color-6, #be5a00)));
+}
+.t-link--warning.t-link--hover.t-link--underline::after {
+ border-color: var(--td-link-warning-active-color, var(--td-warning-color-active, var(--td-warning-color-6, #be5a00)));
+}
+.t-link--default {
+ color: var(--td-link-default-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-link--default.t-link--underline::after {
+ border-color: var(--td-link-default-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-link--default.t-link--disabled {
+ color: var(--td-link-default-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-link--default.t-link--hover {
+ color: var(--td-link-default-active-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
+}
+.t-link--default.t-link--hover.t-link--underline::after {
+ border-color: var(--td-link-default-active-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
+}
+.t-link--danger {
+ color: var(--td-link-danger-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
+.t-link--danger.t-link--underline::after {
+ border-color: var(--td-link-danger-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
+.t-link--danger.t-link--disabled {
+ color: var(--td-link-danger-disabled-color, var(--td-error-color-disabled, var(--td-error-color-3, #ffb9b0)));
+}
+.t-link--danger.t-link--hover {
+ color: var(--td-link-danger-active-color, var(--td-error-color-active, var(--td-error-color-7, #ad352f)));
+}
+.t-link--danger.t-link--hover.t-link--underline::after {
+ border-color: var(--td-link-danger-active-color, var(--td-error-color-active, var(--td-error-color-7, #ad352f)));
+}
+.t-link {
+ position: relative;
+ display: flex;
+ align-items: center;
+ box-sizing: content-box;
+}
+.t-link--underline::after {
+ content: '';
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 0;
+ bottom: 0;
+ opacity: 1;
+ border-bottom: 2rpx solid #cd0be7;
+}
+.t-link__prefix-icon:not(:empty) + .t-link__content:not(:empty) {
+ padding-left: 8rpx;
+}
+.t-link__content:not(:empty) + .t-link__suffix-icon:not(:empty) {
+ padding-left: 8rpx;
+}
diff --git a/uni_modules/tdesign-uniapp/components/link/link.vue b/uni_modules/tdesign-uniapp/components/link/link.vue
new file mode 100644
index 0000000..f531907
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/link/link.vue
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ content }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/link/props.ts b/uni_modules/tdesign-uniapp/components/link/props.ts
new file mode 100644
index 0000000..70bb2e3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/link/props.ts
@@ -0,0 +1,65 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdLinkProps } from './type';
+export default {
+ /** 链接内容 */
+ content: {
+ type: String,
+ },
+ /** 是否为禁用态 */
+ disabled: Boolean,
+ /** 是否开启点击反馈 */
+ hover: Boolean,
+ /** 与 navigator 原生组件属性保持一致,具体使用参考:[微信开放文档](https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html)。使用时请将形如 `open-type` 风格的属性名改为 `openType` 风格 */
+ navigatorProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 前置图标 */
+ prefixIcon: {
+ type: [String, Object],
+ },
+ /** 尺寸 */
+ size: {
+ type: String,
+ default: 'medium' as TdLinkProps['size'],
+ validator(val: TdLinkProps['size']): boolean {
+ if (!val) return true;
+ return ['small', 'medium', 'large'].includes(val);
+ },
+ },
+ /** 后置图标 */
+ suffixIcon: {
+ type: [String, Object],
+ },
+ /** 组件风格,依次为默认色、品牌色、危险色、警告色、成功色 */
+ theme: {
+ type: String,
+ default: 'default' as TdLinkProps['theme'],
+ validator(val: TdLinkProps['theme']): boolean {
+ if (!val) return true;
+ return ['default', 'primary', 'danger', 'warning', 'success'].includes(val);
+ },
+ },
+ /** 是否显示链接下划线 */
+ underline: Boolean,
+ /** 页面链接执行完成后触发(失败或成功均会触发) */
+ onComplete: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 页面链接跳转失败后触发 */
+ onFail: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 页面链接跳转成功后触发 */
+ onSuccess: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/link/type.ts b/uni_modules/tdesign-uniapp/components/link/type.ts
new file mode 100644
index 0000000..5971185
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/link/type.ts
@@ -0,0 +1,62 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { SizeEnum } from '../common/common';
+
+export interface TdLinkProps {
+ /**
+ * 链接内容
+ */
+ content?: string;
+ /**
+ * 是否为禁用态
+ * @default false
+ */
+ disabled?: boolean;
+ /**
+ * 是否开启点击反馈
+ */
+ hover?: boolean;
+ /**
+ * 与 navigator 原生组件属性保持一致,具体使用参考:[微信开放文档](https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html)。使用时请将形如 `open-type` 风格的属性名改为 `openType` 风格
+ * @default {}
+ */
+ navigatorProps?: object;
+ /**
+ * 前置图标
+ */
+ prefixIcon?: string | object;
+ /**
+ * 尺寸
+ * @default medium
+ */
+ size?: SizeEnum;
+ /**
+ * 后置图标
+ */
+ suffixIcon?: string | object;
+ /**
+ * 组件风格,依次为默认色、品牌色、危险色、警告色、成功色
+ * @default default
+ */
+ theme?: 'default' | 'primary' | 'danger' | 'warning' | 'success';
+ /**
+ * 是否显示链接下划线
+ */
+ underline?: boolean;
+ /**
+ * 页面链接执行完成后触发(失败或成功均会触发)
+ */
+ onComplete?: () => void;
+ /**
+ * 页面链接跳转失败后触发
+ */
+ onFail?: () => void;
+ /**
+ * 页面链接跳转成功后触发
+ */
+ onSuccess?: () => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/loading/README.en-US.md b/uni_modules/tdesign-uniapp/components/loading/README.en-US.md
new file mode 100644
index 0000000..2336c46
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/loading/README.en-US.md
@@ -0,0 +1,49 @@
+:: BASE_DOC ::
+
+## API
+
+### Loading Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+delay | Number | 0 | \- | N
+duration | Number | 800 | \- | N
+fullscreen | Boolean | false | \- | N
+indicator | Boolean | true | \- | N
+inherit-color | Boolean | false | \- | N
+layout | String | horizontal | options: horizontal/vertical | N
+loading | Boolean | true | \- | N
+pause | Boolean | false | \- | N
+progress | Number | - | \- | N
+reverse | Boolean | - | \- | N
+size | String | '20px' | \- | N
+text | String | - | \- | N
+theme | String | circular | options: circular/spinner/dots/custom | N
+
+### Loading Slots
+
+name | Description
+-- | --
+\- | \-
+indicator | \-
+text | \-
+
+### Loading External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-indicator | \-
+t-class-text | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-loading-color | @brand-color | -
+--td-loading-full-bg-color | rgba(255, 255, 255, 0.6) | -
+--td-loading-text-color | @text-color-primary | -
+--td-loading-text-font | @font-body-small | -
+--td-loading-z-index | 3500 | -
diff --git a/uni_modules/tdesign-uniapp/components/loading/README.md b/uni_modules/tdesign-uniapp/components/loading/README.md
new file mode 100644
index 0000000..1aa8e13
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/loading/README.md
@@ -0,0 +1,96 @@
+---
+title: Loading 加载
+description: 用于表示页面或操作的加载状态,给予用户反馈的同时减缓等待的焦虑感,由一个或一组反馈动效组成。
+spline: message
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+
+```js
+import TLoading from '@tdesign/uniapp/loading/loading.vue';
+```
+
+### 纯icon
+
+{{ base }}
+
+### icon加文字横向
+
+{{ horizontal }}
+
+### icon加文字竖向
+
+{{ vertical }}
+
+### 纯文字
+
+{{ text }}
+
+### 加载失败
+
+{{ error }}
+
+### 状态
+
+{{ status }}
+
+### 加载速度
+
+{{ duration }}
+
+### 规格
+
+{{ size }}
+
+## API
+
+### Loading Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+delay | Number | 0 | 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒 | N
+duration | Number | 800 | 加载动画执行完成一次的时间,单位:毫秒 | N
+fullscreen | Boolean | false | 是否显示为全屏加载 | N
+indicator | Boolean | true | 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符 | N
+inherit-color | Boolean | false | 是否继承父元素颜色 | N
+layout | String | horizontal | 对齐方式。可选项:horizontal/vertical | N
+loading | Boolean | true | 是否处于加载状态 | N
+pause | Boolean | false | 是否暂停动画 | N
+progress | Number | - | 加载进度 | N
+reverse | Boolean | - | 加载动画是否反向 | N
+size | String | '20px' | 尺寸,示例:20px | N
+text | String | - | 加载提示文案 | N
+theme | String | circular | 加载组件类型。可选项:circular/spinner/dots/custom | N
+
+### Loading Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,作用同 `text` 插槽
+indicator | 自定义 `indicator` 显示内容
+text | 自定义 `text` 显示内容
+
+### Loading External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-indicator | 指示符样式类
+t-class-text | 文本样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-loading-color | @brand-color | -
+--td-loading-full-bg-color | rgba(255, 255, 255, 0.6) | -
+--td-loading-text-color | @text-color-primary | -
+--td-loading-text-font | @font-body-small | -
+--td-loading-z-index | 3500 | -
diff --git a/uni_modules/tdesign-uniapp/components/loading/loading.css b/uni_modules/tdesign-uniapp/components/loading/loading.css
new file mode 100644
index 0000000..0d2153d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/loading/loading.css
@@ -0,0 +1,203 @@
+.t-loading {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+}
+.t-loading--fullscreen {
+ position: fixed;
+ display: flex;
+ align-items: center;
+ vertical-align: middle;
+ justify-content: center;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: var(--td-loading-z-index, 3500);
+ background-color: var(--td-loading-full-bg-color, rgba(255, 255, 255, 0.6));
+}
+.t-loading__spinner {
+ position: relative;
+ box-sizing: border-box;
+ width: 100%;
+ height: 100%;
+ max-width: 100%;
+ max-height: 100%;
+ animation: rotate 0.8s linear infinite;
+ color: var(--td-loading-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-loading__spinner.reverse {
+ animation-name: rotateReverse;
+}
+.t-loading__spinner--spinner {
+ animation-timing-function: steps(12);
+ color: var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
+}
+.t-loading__spinner--spinner .t-loading__dot {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+.t-loading__spinner--spinner .t-loading__dot::before {
+ display: block;
+ width: 5rpx;
+ height: 25%;
+ margin: 0 auto;
+ background-color: var(--td-loading-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ border-radius: 40%;
+ content: ' ';
+}
+.t-loading__spinner--circular .t-loading__circular {
+ border-radius: 100%;
+ width: 100%;
+ height: 100%;
+ background: conic-gradient(from 180deg at 50% 50%, rgba(255, 255, 255, 0) 0deg, rgba(255, 255, 255, 0) 60deg, currentColor 330deg, rgba(255, 255, 255, 0) 360deg);
+ mask: radial-gradient(transparent calc(50% - 1rpx), #fff 50%);
+ /* stylelint-disable-next-line */
+ -webkit-mask: radial-gradient(transparent calc(50% - 1rpx), #fff 50%);
+}
+.t-loading__spinner--dots {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ animation: none;
+}
+.t-loading__spinner--dots .t-loading__dot {
+ width: 20%;
+ height: 20%;
+ border-radius: 50%;
+ background-color: var(--td-loading-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ animation-duration: 1.8s;
+ animation-name: dotting;
+ animation-timing-function: linear;
+ animation-iteration-count: infinite;
+ animation-fill-mode: both;
+}
+.t-loading__text {
+ color: var(--td-loading-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font: var(--td-loading-text-font, var(--td-font-body-small, 24rpx / 40rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-loading__text--vertical:not(:first-child):not(:empty) {
+ margin-top: 12rpx;
+}
+.t-loading__text--horizontal:not(:first-child):not(:empty) {
+ margin-left: 16rpx;
+}
+.t-loading--vertical {
+ flex-direction: column;
+}
+.t-loading--horizontal {
+ flex-direction: row;
+ vertical-align: top;
+}
+@keyframes t-bar {
+ 0% {
+ width: 0;
+ }
+ 50% {
+ width: 70%;
+ }
+ 100% {
+ width: 80%;
+ }
+}
+@keyframes t-bar-loaded {
+ 0% {
+ height: 6rpx;
+ opacity: 1;
+ width: 90%;
+ }
+ 50% {
+ height: 6rpx;
+ opacity: 1;
+ width: 100%;
+ }
+ 100% {
+ height: 0;
+ opacity: 0;
+ width: 100%;
+ }
+}
+.t-loading__dot-1 {
+ transform: rotate(30deg);
+ opacity: 0;
+}
+.t-loading__dot-2 {
+ transform: rotate(60deg);
+ opacity: 0.08333333;
+}
+.t-loading__dot-3 {
+ transform: rotate(90deg);
+ opacity: 0.16666667;
+}
+.t-loading__dot-4 {
+ transform: rotate(120deg);
+ opacity: 0.25;
+}
+.t-loading__dot-5 {
+ transform: rotate(150deg);
+ opacity: 0.33333333;
+}
+.t-loading__dot-6 {
+ transform: rotate(180deg);
+ opacity: 0.41666667;
+}
+.t-loading__dot-7 {
+ transform: rotate(210deg);
+ opacity: 0.5;
+}
+.t-loading__dot-8 {
+ transform: rotate(240deg);
+ opacity: 0.58333333;
+}
+.t-loading__dot-9 {
+ transform: rotate(270deg);
+ opacity: 0.66666667;
+}
+.t-loading__dot-10 {
+ transform: rotate(300deg);
+ opacity: 0.75;
+}
+.t-loading__dot-11 {
+ transform: rotate(330deg);
+ opacity: 0.83333333;
+}
+.t-loading__dot-12 {
+ transform: rotate(360deg);
+ opacity: 0.91666667;
+}
+@keyframes rotate {
+ from {
+ transform: rotate(0deg);
+ }
+ to {
+ transform: rotate(360deg);
+ }
+}
+@keyframes rotateReverse {
+ from {
+ transform: rotate(360deg);
+ }
+ to {
+ transform: rotate(0deg);
+ }
+}
+@keyframes dotting {
+ 0% {
+ opacity: 0.15;
+ }
+ 1% {
+ opacity: 0.8;
+ }
+ 33% {
+ opacity: 0.8;
+ }
+ 34% {
+ opacity: 0.15;
+ }
+ 100% {
+ opacity: 0.15;
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/loading/loading.vue b/uni_modules/tdesign-uniapp/components/loading/loading.vue
new file mode 100644
index 0000000..c2bf646
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/loading/loading.vue
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/loading/props.ts b/uni_modules/tdesign-uniapp/components/loading/props.ts
new file mode 100644
index 0000000..af2bd47
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/loading/props.ts
@@ -0,0 +1,68 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdLoadingProps } from './type';
+export default {
+ /** 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒 */
+ delay: {
+ type: Number,
+ default: 0,
+ },
+ /** 加载动画执行完成一次的时间,单位:毫秒 */
+ duration: {
+ type: Number,
+ default: 800,
+ },
+ /** 是否显示为全屏加载 */
+ fullscreen: Boolean,
+ /** 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符 */
+ indicator: {
+ type: Boolean,
+ default: true as TdLoadingProps['indicator'],
+ },
+ /** 是否继承父元素颜色 */
+ inheritColor: Boolean,
+ /** 对齐方式 */
+ layout: {
+ type: String,
+ default: 'horizontal' as TdLoadingProps['layout'],
+ validator(val: TdLoadingProps['layout']): boolean {
+ if (!val) return true;
+ return ['horizontal', 'vertical'].includes(val);
+ },
+ },
+ /** 是否处于加载状态 */
+ loading: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否暂停动画 */
+ pause: Boolean,
+ /** 加载进度 */
+ progress: {
+ type: Number,
+ },
+ /** 加载动画是否反向 */
+ reverse: Boolean,
+ /** 尺寸,示例:20px */
+ size: {
+ type: String,
+ default: '20px',
+ },
+ /** 加载提示文案 */
+ text: {
+ type: String,
+ },
+ /** 加载组件类型 */
+ theme: {
+ type: String,
+ default: 'circular' as TdLoadingProps['theme'],
+ validator(val: TdLoadingProps['theme']): boolean {
+ if (!val) return true;
+ return ['circular', 'spinner', 'dots', 'custom'].includes(val);
+ },
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/loading/type.ts b/uni_modules/tdesign-uniapp/components/loading/type.ts
new file mode 100644
index 0000000..b89fcee
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/loading/type.ts
@@ -0,0 +1,70 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdLoadingProps {
+ /**
+ * 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒
+ * @default 0
+ */
+ delay?: number;
+ /**
+ * 加载动画执行完成一次的时间,单位:毫秒
+ * @default 800
+ */
+ duration?: number;
+ /**
+ * 是否显示为全屏加载
+ * @default false
+ */
+ fullscreen?: boolean;
+ /**
+ * 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符
+ * @default true
+ */
+ indicator?: boolean;
+ /**
+ * 是否继承父元素颜色
+ * @default false
+ */
+ inheritColor?: boolean;
+ /**
+ * 对齐方式
+ * @default horizontal
+ */
+ layout?: 'horizontal' | 'vertical';
+ /**
+ * 是否处于加载状态
+ * @default true
+ */
+ loading?: boolean;
+ /**
+ * 是否暂停动画
+ * @default false
+ */
+ pause?: boolean;
+ /**
+ * 加载进度
+ */
+ progress?: number;
+ /**
+ * 加载动画是否反向
+ */
+ reverse?: boolean;
+ /**
+ * 尺寸,示例:20px
+ * @default '20px'
+ */
+ size?: string;
+ /**
+ * 加载提示文案
+ */
+ text?: string;
+ /**
+ * 加载组件类型
+ * @default circular
+ */
+ theme?: 'circular' | 'spinner' | 'dots' | 'custom';
+}
diff --git a/uni_modules/tdesign-uniapp/components/message-item/computed.js b/uni_modules/tdesign-uniapp/components/message-item/computed.js
new file mode 100644
index 0000000..ecbaa2a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message-item/computed.js
@@ -0,0 +1,23 @@
+export const isEmptyObj = function (obj) {
+ return JSON.stringify(obj) === '{}';
+};
+
+const changeNumToStr = function (arr) {
+ return arr.map(item => (typeof item === 'number' ? `${item}rpx` : item));
+};
+
+export const getMessageStyles = function (zIndex, offset, wrapTop) {
+ const arr = changeNumToStr(offset || [0, 0]);
+ const left = arr[1] || 0;
+ const right = arr[1] || 0;
+
+ const zIndexStyle = zIndex ? `z-index:${zIndex};` : '';
+ let styleOffset = '';
+
+ styleOffset += `top:${wrapTop}px;`;
+ styleOffset += `left:${left};`;
+ styleOffset += `right:${right};`;
+
+ return zIndexStyle + styleOffset;
+};
+
diff --git a/uni_modules/tdesign-uniapp/components/message-item/index.js b/uni_modules/tdesign-uniapp/components/message-item/index.js
new file mode 100644
index 0000000..3862cb9
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message-item/index.js
@@ -0,0 +1,40 @@
+import { MessageType } from '../message/message.interface';
+import { getInstance } from '../common/utils';
+
+
+const showMessage = function (options, theme = MessageType.info) {
+ const { context, selector = '#t-message', ...otherOptions } = options;
+ const instance = getInstance(context, selector);
+
+ if (instance) {
+ instance.resetData(() => {
+ instance.setData({ theme, ...otherOptions }, instance.show.bind(instance));
+ });
+
+ return instance;
+ }
+ console.error('未找到组件,请确认 selector && context 是否正确');
+};
+
+export default {
+ info(options) {
+ return showMessage(options, MessageType.info);
+ },
+ success(options) {
+ return showMessage(options, MessageType.success);
+ },
+ warning(options) {
+ return showMessage(options, MessageType.warning);
+ },
+ error(options) {
+ return showMessage(options, MessageType.error);
+ },
+ hide(options) {
+ const { context, selector = '#t-message' } = { ...options };
+ const instance = getInstance(context, selector);
+ if (!instance) {
+ return;
+ }
+ instance.hide();
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/message-item/message-item.css b/uni_modules/tdesign-uniapp/components/message-item/message-item.css
new file mode 100644
index 0000000..da67028
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message-item/message-item.css
@@ -0,0 +1,63 @@
+.t-message {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ transition: opacity 0.3s, transform 0.4s, top 0.4s;
+ display: flex;
+ justify-content: flex-start;
+ height: 96rpx;
+ align-items: center;
+ z-index: 15000;
+ padding: 0 32rpx;
+ box-sizing: border-box;
+ border-radius: var(--td-message-border-radius, var(--td-radius-default, 12rpx));
+ line-height: 1;
+ background-color: var(--td-message-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ box-shadow: var(--td-message-box-shadow, var(--td-shadow-1, 0 1px 10px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.12)));
+}
+.t-message__text {
+ display: inline-block;
+ color: var(--td-message-content-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font: var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
+.t-message__text-wrap {
+ flex: 1 1 auto;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+}
+.t-message__text-nowrap {
+ word-break: keep-all;
+ white-space: nowrap;
+}
+.t-message--info {
+ color: var(--td-message-info-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-message--success {
+ color: var(--td-message-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+}
+.t-message--warning {
+ color: var(--td-message-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+}
+.t-message--error {
+ color: var(--td-message-error-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
+.t-message__icon--left,
+.t-message__icon--right {
+ font-size: 44rpx;
+}
+.t-message__icon--left:not(:empty) {
+ margin-right: var(--td-spacer, 16rpx);
+}
+.t-message__icon--right {
+ color: var(--td-message-close-icon-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+}
+.t-message__icon--right:not(:empty),
+.t-message__link {
+ flex: 0 0 auto;
+ margin-left: var(--td-spacer, 16rpx);
+}
+.t-message__fade {
+ opacity: 0;
+ transform: translateY(-100%);
+}
diff --git a/uni_modules/tdesign-uniapp/components/message-item/message-item.vue b/uni_modules/tdesign-uniapp/components/message-item/message-item.vue
new file mode 100644
index 0000000..3908e4d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message-item/message-item.vue
@@ -0,0 +1,353 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ content }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/message/README.en-US.md b/uni_modules/tdesign-uniapp/components/message/README.en-US.md
new file mode 100644
index 0000000..f3e5f68
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message/README.en-US.md
@@ -0,0 +1,69 @@
+:: BASE_DOC ::
+
+## API
+
+### Message Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+action | String | - | `deprecated`。operation | N
+align | String | left | options: left/center。Typescript:`MessageAlignType` `type MessageAlignType = 'left' \| 'center'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/message/type.ts) | N
+close-btn | String / Boolean / Object | false | \- | N
+content | String | - | \- | N
+duration | Number | 3000 | \- | N
+gap | String / Number / Boolean | 12 | \- | N
+icon | String / Boolean / Object | true | \- | N
+link | String / Object | - | \- | N
+marquee | Boolean / Object | false | Typescript:`boolean \| MessageMarquee` `interface MessageMarquee { speed?: number; loop?: number; delay?: number }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/message/type.ts) | N
+offset | Array | - | Typescript:`Array` | N
+single | Boolean | true | \- | N
+theme | String | info | options: info/success/warning/error。Typescript:`MessageThemeList` `type MessageThemeList = 'info' \| 'success' \| 'warning' \| 'error'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/message/type.ts) | N
+visible | Boolean | false | `v-model:visible` is supported | N
+default-visible | Boolean | false | uncontrolled property | N
+z-index | Number | 15000 | \- | N
+
+### Message Events
+
+name | params | description
+-- | -- | --
+action-btn-click | `(context: { e: MouseEvent })` | \-
+close-btn-click | `(context: { e: MouseEvent })` | \-
+duration-end | \- | \-
+link-click | `(context: { e: MouseEvent })` | \-
+
+### Message Slots
+
+name | Description
+-- | --
+\- | \-
+action | `deprecated`。operation
+close-btn | \-
+content | \-
+icon | \-
+link | \-
+
+### Message External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-close-btn | \-
+t-class-content | \-
+t-class-icon | \-
+t-class-link | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-message-bg-color | @bg-color-container | -
+--td-message-border-radius | @radius-default | -
+--td-message-box-shadow | @shadow-4 | -
+--td-message-close-icon-color | @font-gray-3 | -
+--td-message-content-font-color | @font-gray-1 | -
+--td-message-error-color | @error-color | -
+--td-message-info-color | @brand-color | -
+--td-message-success-color | @success-color | -
+--td-message-warning-color | @warning-color | -
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/message/README.md b/uni_modules/tdesign-uniapp/components/message/README.md
new file mode 100644
index 0000000..894b7fc
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message/README.md
@@ -0,0 +1,105 @@
+---
+title: Message 消息通知
+description: 用于轻量级反馈或提示,不会打断用户操作。
+spline: message
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TMessage from '@tdesign/uniapp/message/message.vue';
+```
+
+### 引入 API
+
+若以 API 形式调用 Message,则需在页面 `page.js` 中引入组件 API:
+
+```js
+import Message from '@tdesign/uniapp/message/index';
+```
+
+### 组件类型
+
+弹窗内容为纯文本、标题和副标题、带输入框,用 API `Message.info` 方法调用反馈类对话框。
+
+
+{{ base }}
+
+
+### 组件状态
+
+消息通知类型为普通(info)、警示(warning)、成功(success)、错误(error)
+
+{{ theme }}
+
+## API
+
+### Message Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+action | String | - | 已废弃。操作 | N
+align | String | left | 文本对齐方式。可选项:left/center。TS 类型:`MessageAlignType` `type MessageAlignType = 'left' \| 'center'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/message/type.ts) | N
+close-btn | String / Boolean / Object | false | 关闭按钮,可以自定义。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string ,如:'user',则显示组件内置图标。值类型为 object ,则会透传至 icon 组件 | N
+content | String | - | 用于自定义消息弹出内容 | N
+duration | Number | 3000 | 消息内置计时器,计时到达时会触发 duration-end 事件。单位:毫秒。值为 0 则表示没有计时器 | N
+gap | String / Number / Boolean | 12 | 两条 `message` 之间的间距 | N
+icon | String / Boolean / Object | true | 消息提醒前面的图标,可以自定义。值为 true 则根据 theme 显示对应的图标,值为 false 则不显示图标。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string ,如:'info',则显示组件内置图标。值类型为 object ,则会透传至 icon 组件 | N
+link | String / Object | - | 链接名称。值为字符串表示链接名称,值为 `Object` 类型,表示透传至 `Link` | N
+marquee | Boolean / Object | false | 跑马灯效果。speed 指速度控制;loop 指循环播放次数,值为 -1 表示循环播放,值为 0 表示不循环播放;delay 表示延迟多久开始播放。TS 类型:`boolean \| MessageMarquee` `interface MessageMarquee { speed?: number; loop?: number; delay?: number }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/message/type.ts) | N
+offset | Array | - | 相对于 placement 的偏移量,默认单位 rpx。示例:[-10, 20] 或 ['10rpx', '8rpx']。TS 类型:`Array` | N
+single | Boolean | true | 是否保持仅显示一条信息 | N
+theme | String | info | 消息组件风格。可选项:info/success/warning/error。TS 类型:`MessageThemeList` `type MessageThemeList = 'info' \| 'success' \| 'warning' \| 'error'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/message/type.ts) | N
+visible | Boolean | false | 是否显示,隐藏时默认销毁组件。支持语法糖 `v-model:visible` | N
+default-visible | Boolean | false | 是否显示,隐藏时默认销毁组件。非受控属性 | N
+z-index | Number | 15000 | 元素层级,样式默认为 15000 | N
+
+### Message Events
+
+名称 | 参数 | 描述
+-- | -- | --
+action-btn-click | `(context: { e: MouseEvent })` | 已废弃。当操作按钮存在时,用户点击操作按钮时触发
+close-btn-click | `(context: { e: MouseEvent })` | 当关闭按钮存在时,用户点击关闭按钮触发
+duration-end | \- | 计时结束后触发
+link-click | `(context: { e: MouseEvent })` | 当`link`链接存在时,点击链接文本时触发
+
+### Message Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,作用同 `content` 插槽
+action | 已废弃。自定义 `action` 显示内容
+close-btn | 关闭按钮
+content | 自定义消息弹出内容
+icon | 消息提醒前面的图标
+link | 链接名称
+
+### Message External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-close-btn | 关闭按钮样式类
+t-class-content | 内容样式类
+t-class-icon | 图标样式类
+t-class-link | 链接样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+| 名称 | 默认值 | 描述 |
+| -- | -- | -- |
+| --td-message-bg-color | @bg-color-container | - |
+| --td-message-border-radius | @radius-default | - |
+| --td-message-box-shadow | @shadow-4 | - |
+| --td-message-close-icon-color | @font-gray-3 | - |
+| --td-message-content-font-color | @font-gray-1 | - |
+| --td-message-error-color | @error-color | - |
+| --td-message-info-color | @brand-color | - |
+| --td-message-success-color | @success-color | - |
+| --td-message-warning-color | @warning-color | - |
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/message/config.js b/uni_modules/tdesign-uniapp/components/message/config.js
new file mode 100644
index 0000000..ac26646
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message/config.js
@@ -0,0 +1,10 @@
+import props from './props';
+
+
+export const messageDefaultData = Object.keys(props).reduce((acc, key) => {
+ const result = props[key].default;
+ return {
+ ...acc,
+ [key]: typeof result === 'function' ? result() : result,
+ };
+}, {});
diff --git a/uni_modules/tdesign-uniapp/components/message/index.d.ts b/uni_modules/tdesign-uniapp/components/message/index.d.ts
new file mode 100644
index 0000000..ad113e2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message/index.d.ts
@@ -0,0 +1,17 @@
+import { MessageProps } from './message.interface';
+declare type Context = any;
+declare type Instance = any;
+interface MessageActionOptionsType extends Optional {
+ context?: Context;
+ selector?: string;
+}
+declare const Handler: {
+ info(options: MessageActionOptionsType): Instance;
+ success(options: MessageActionOptionsType): Instance;
+ warning(options: MessageActionOptionsType): Instance;
+ error(options: MessageActionOptionsType): Instance;
+ hide(options: MessageActionOptionsType): void;
+};
+
+export default Handler;
+
diff --git a/uni_modules/tdesign-uniapp/components/message/index.js b/uni_modules/tdesign-uniapp/components/message/index.js
new file mode 100644
index 0000000..c28b9b7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message/index.js
@@ -0,0 +1,39 @@
+import { MessageType } from './message.interface';
+import { getInstance } from '../common/utils';
+
+
+const showMessage = function (options, theme = MessageType.info) {
+ const { context, selector = '#t-message', ...otherOptions } = options;
+ const instance = getInstance(context, selector);
+ if (typeof otherOptions.single !== 'boolean') {
+ otherOptions.single = true;
+ }
+ if (instance) {
+ instance.setMessage(otherOptions, theme);
+ return instance;
+ }
+ console.error('未找到组件,请确认 selector && context 是否正确');
+};
+
+export default {
+ info(options) {
+ return showMessage(options, MessageType.info);
+ },
+ success(options) {
+ return showMessage(options, MessageType.success);
+ },
+ warning(options) {
+ return showMessage(options, MessageType.warning);
+ },
+ error(options) {
+ return showMessage(options, MessageType.error);
+ },
+ hide(options) {
+ const { context, selector = '#t-message' } = { ...options };
+ const instance = getInstance(context, selector);
+ if (!instance) {
+ return;
+ }
+ instance.hide();
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/message/message.css b/uni_modules/tdesign-uniapp/components/message/message.css
new file mode 100644
index 0000000..e69de29
diff --git a/uni_modules/tdesign-uniapp/components/message/message.interface.ts b/uni_modules/tdesign-uniapp/components/message/message.interface.ts
new file mode 100644
index 0000000..a1fde13
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message/message.interface.ts
@@ -0,0 +1,30 @@
+
+export const MessageType = {
+ info: 'info',
+ success: 'success',
+ warning: 'warning',
+ error: 'error',
+};
+
+export interface MessageMarquee {
+ speed?: number;
+ loop?: number;
+ delay?: number;
+}
+export interface MessageProps {
+ visible?: boolean;
+ content: string;
+ align?: string;
+ theme?: keyof typeof MessageType;
+ icon?: boolean | string;
+ link?: string | object;
+ closeBtn?: boolean;
+ action?: string;
+ marquee?: MessageMarquee;
+ offset?: object;
+ duration?: number;
+ zIndex?: number;
+ id?: string;
+ gap?: string | number;
+ single?: boolean;
+}
diff --git a/uni_modules/tdesign-uniapp/components/message/message.vue b/uni_modules/tdesign-uniapp/components/message/message.vue
new file mode 100644
index 0000000..a116432
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message/message.vue
@@ -0,0 +1,275 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/message/props.ts b/uni_modules/tdesign-uniapp/components/message/props.ts
new file mode 100644
index 0000000..9375fac
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message/props.ts
@@ -0,0 +1,101 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdMessageProps } from './type';
+export default {
+ /** 文本对齐方式 */
+ align: {
+ type: String,
+ default: 'left' as TdMessageProps['align'],
+ validator(val: TdMessageProps['align']): boolean {
+ if (!val) return true;
+ return ['left', 'center'].includes(val);
+ },
+ },
+ /** 关闭按钮,可以自定义。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string ,如:'user',则显示组件内置图标。值类型为 object ,则会透传至 icon 组件 */
+ closeBtn: {
+ type: [String, Boolean, Object],
+ default: false as TdMessageProps['closeBtn'],
+ },
+ /** 用于自定义消息弹出内容 */
+ content: {
+ type: String,
+ },
+ /** 消息内置计时器,计时到达时会触发 duration-end 事件。单位:毫秒。值为 0 则表示没有计时器 */
+ duration: {
+ type: Number,
+ default: 3000,
+ },
+ /** 两条 `message` 之间的间距 */
+ gap: {
+ type: [String, Number, Boolean],
+ default: 12 as TdMessageProps['gap'],
+ },
+ /** 消息提醒前面的图标,可以自定义。值为 true 则根据 theme 显示对应的图标,值为 false 则不显示图标。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string ,如:'info',则显示组件内置图标。值类型为 object ,则会透传至 icon 组件 */
+ icon: {
+ type: [String, Boolean, Object],
+ default: true as TdMessageProps['icon'],
+ },
+ /** 链接名称。值为字符串表示链接名称,值为 `Object` 类型,表示透传至 `Link` */
+ link: {
+ type: [String, Object],
+ },
+ /** 跑马灯效果。speed 指速度控制;loop 指循环播放次数,值为 -1 表示循环播放,值为 0 表示不循环播放;delay 表示延迟多久开始播放 */
+ marquee: {
+ type: [Boolean, Object],
+ default: false as TdMessageProps['marquee'],
+ },
+ /** 相对于 placement 的偏移量,默认单位 rpx。示例:[-10, 20] 或 ['10rpx', '8rpx'] */
+ offset: {
+ type: Array,
+ },
+ /** 是否保持仅显示一条信息 */
+ single: {
+ type: Boolean,
+ default: true,
+ },
+ /** 消息组件风格 */
+ theme: {
+ type: String,
+ default: 'info' as TdMessageProps['theme'],
+ validator(val: TdMessageProps['theme']): boolean {
+ if (!val) return true;
+ return ['info', 'success', 'warning', 'error'].includes(val);
+ },
+ },
+ /** 是否显示,隐藏时默认销毁组件 */
+ visible: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 是否显示,隐藏时默认销毁组件,非受控属性 */
+ defaultVisible: Boolean,
+ /** 元素层级,样式默认为 15000 */
+ zIndex: {
+ type: Number,
+ default: 15000,
+ },
+ /** 已废弃。当操作按钮存在时,用户点击操作按钮时触发 */
+ onActionBtnClick: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 当关闭按钮存在时,用户点击关闭按钮触发 */
+ onCloseBtnClick: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 计时结束后触发 */
+ onDurationEnd: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 当`link`链接存在时,点击链接文本时触发 */
+ onLinkClick: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/message/type.ts b/uni_modules/tdesign-uniapp/components/message/type.ts
new file mode 100644
index 0000000..131902e
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/message/type.ts
@@ -0,0 +1,101 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdMessageProps {
+ /**
+ * 文本对齐方式
+ * @default left
+ */
+ align?: MessageAlignType;
+ /**
+ * 关闭按钮,可以自定义。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string ,如:'user',则显示组件内置图标。值类型为 object ,则会透传至 icon 组件
+ * @default false
+ */
+ closeBtn?: string | boolean | object;
+ /**
+ * 用于自定义消息弹出内容
+ */
+ content?: string;
+ /**
+ * 消息内置计时器,计时到达时会触发 duration-end 事件。单位:毫秒。值为 0 则表示没有计时器
+ * @default 3000
+ */
+ duration?: number;
+ /**
+ * 两条 `message` 之间的间距
+ * @default 12
+ */
+ gap?: string | number | boolean;
+ /**
+ * 消息提醒前面的图标,可以自定义。值为 true 则根据 theme 显示对应的图标,值为 false 则不显示图标。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string ,如:'info',则显示组件内置图标。值类型为 object ,则会透传至 icon 组件
+ * @default true
+ */
+ icon?: string | boolean | object;
+ /**
+ * 链接名称。值为字符串表示链接名称,值为 `Object` 类型,表示透传至 `Link`
+ */
+ link?: string | object;
+ /**
+ * 跑马灯效果。speed 指速度控制;loop 指循环播放次数,值为 -1 表示循环播放,值为 0 表示不循环播放;delay 表示延迟多久开始播放
+ * @default false
+ */
+ marquee?: boolean | MessageMarquee;
+ /**
+ * 相对于 placement 的偏移量,默认单位 rpx。示例:[-10, 20] 或 ['10rpx', '8rpx']
+ */
+ offset?: Array;
+ /**
+ * 是否保持仅显示一条信息
+ * @default true
+ */
+ single?: boolean;
+ /**
+ * 消息组件风格
+ * @default info
+ */
+ theme?: MessageThemeList;
+ /**
+ * 是否显示,隐藏时默认销毁组件
+ * @default false
+ */
+ visible?: boolean;
+ /**
+ * 是否显示,隐藏时默认销毁组件,非受控属性
+ * @default false
+ */
+ defaultVisible?: boolean;
+ /**
+ * 元素层级,样式默认为 15000
+ * @default 15000
+ */
+ zIndex?: number;
+ /**
+ * 已废弃。当操作按钮存在时,用户点击操作按钮时触发
+ */
+ onActionBtnClick?: (context: { e: MouseEvent }) => void;
+ /**
+ * 当关闭按钮存在时,用户点击关闭按钮触发
+ */
+ onCloseBtnClick?: (context: { e: MouseEvent }) => void;
+ /**
+ * 计时结束后触发
+ */
+ onDurationEnd?: () => void;
+ /**
+ * 当`link`链接存在时,点击链接文本时触发
+ */
+ onLinkClick?: (context: { e: MouseEvent }) => void;
+}
+
+export type MessageAlignType = 'left' | 'center';
+
+export interface MessageMarquee {
+ speed?: number;
+ loop?: number;
+ delay?: number;
+}
+
+export type MessageThemeList = 'info' | 'success' | 'warning' | 'error';
diff --git a/uni_modules/tdesign-uniapp/components/mixins/page-scroll.js b/uni_modules/tdesign-uniapp/components/mixins/page-scroll.js
new file mode 100644
index 0000000..59340b4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/mixins/page-scroll.js
@@ -0,0 +1,115 @@
+import { getCurrentPage } from '../common/utils';
+import Bus from '../common/bus';
+
+const overflowScrollReg = /scroll|auto|overlay/i;
+
+export const bus = new Bus();
+export const PAGE_SCROLL_EVENT_NAME = 'page-scroll';
+
+
+const onPageScroll = function (event) {
+ const page = getCurrentPage();
+
+ if (!page) return;
+ const { pageScroller } = page;
+
+ pageScroller?.forEach((scroller) => {
+ if (typeof scroller === 'function') {
+ scroller(event);
+ }
+ });
+};
+
+
+export default (funcName = 'onScroll', useBus = true) => {
+ // #ifdef H5
+ useBus = false;
+ // #endif
+
+ return {
+ mounted() {
+ if (useBus) {
+ bus.on(PAGE_SCROLL_EVENT_NAME, this[funcName]);
+ return;
+ }
+
+ // #ifdef H5
+ this._scroller = getScroller(this.$el);
+ if (this._scroller) {
+ this._scroller.addEventListener('scroll', this._bindScroller);
+ }
+ // #endif
+
+ const page = getCurrentPage();
+ if (!page) return;
+
+
+ if (Array.isArray(page.pageScroller)) {
+ page.pageScroller.push(this._bindScroller);
+ } else {
+ page.pageScroller = typeof page.onPageScroll === 'function' ? [page.onPageScroll.bind(page), this._bindScroller] : [this._bindScroller];
+ }
+
+ page.onPageScroll = onPageScroll;
+ },
+
+ beforeUnMount() {
+ if (useBus) {
+ bus.off(PAGE_SCROLL_EVENT_NAME, this[funcName]);
+ return;
+ }
+
+ // #ifdef H5
+ if (this._scroller) {
+ this._scroller.removeEventListener('scroll', this._bindScroller);
+ }
+ // #endif
+
+ const page = getCurrentPage();
+ if (!page) return;
+
+ page.pageScroller = page.pageScroller?.filter(item => item !== this._bindScroller) || [];
+ },
+ methods: {
+ _bindScroller(e) {
+ let result;
+ // #ifdef H5
+ result = this[funcName]?.call(this, e.target);
+ // #endif
+ // #ifndef H5
+ result = this[funcName]?.call(this, e);
+ // #endif
+ return result;
+ },
+ },
+ };
+};
+
+
+export function getScroller(el, root) {
+ // #ifdef H5
+ if (root === void 0) {
+ root = window;
+ }
+
+ let node = el;
+
+ while (node && node.tagName !== 'HTML' && node.tagName !== 'BODY' && node.nodeType === 1 && node !== root) {
+ const { overflowY } = window.getComputedStyle(node);
+
+ if (overflowScrollReg.test(overflowY)) {
+ return node;
+ }
+
+ node = node.parentNode;
+ }
+
+ return root;
+ // #endif
+}
+
+
+export function handlePageScroll(e) {
+ bus.emit(PAGE_SCROLL_EVENT_NAME, e);
+ return bus;
+}
diff --git a/uni_modules/tdesign-uniapp/components/mixins/skyline.js b/uni_modules/tdesign-uniapp/components/mixins/skyline.js
new file mode 100644
index 0000000..d3d7567
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/mixins/skyline.js
@@ -0,0 +1,12 @@
+import { getCurrentPage } from '../common/utils.js';
+
+export default {
+ data() {
+ return {
+ skylineRender: false,
+ };
+ },
+ mounted() {
+ this.skylineRender = getCurrentPage().renderer === 'skyline';
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/mixins/theme-change.js b/uni_modules/tdesign-uniapp/components/mixins/theme-change.js
new file mode 100644
index 0000000..c808519
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/mixins/theme-change.js
@@ -0,0 +1,16 @@
+import { appBaseInfo } from '../common/utils';
+
+export const themeMixin = {
+ data() {
+ return {
+ theme: 'light',
+ };
+ },
+ mounted() {
+ this.theme = appBaseInfo.theme;
+ if (typeof uni.onThemeChange !== 'function') return;
+ uni.onThemeChange((t) => {
+ this.theme = t.theme;
+ });
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/mixins/touch.js b/uni_modules/tdesign-uniapp/components/mixins/touch.js
new file mode 100644
index 0000000..a555f87
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/mixins/touch.js
@@ -0,0 +1,29 @@
+const getDirection = (t, s) => (t > s && t > 10 ? 'horizontal' : s > t && s > 10 ? 'vertical' : '');
+export default {
+ data() {
+ return {};
+ },
+ methods: {
+ resetTouchStatus() {
+ this.direction = '';
+ this.deltaX = 0;
+ this.deltaY = 0;
+ this.offsetX = 0;
+ this.offsetY = 0;
+ },
+ touchStart(t) {
+ this.resetTouchStatus();
+ const [s] = t.touches;
+ this.startX = s.clientX;
+ this.startY = s.clientY;
+ },
+ touchMove(t) {
+ const [s] = t.touches;
+ this.deltaX = s.clientX - this.startX;
+ this.deltaY = s.clientY - this.startY;
+ this.offsetX = Math.abs(this.deltaX);
+ this.offsetY = Math.abs(this.deltaY);
+ this.direction = getDirection(this.offsetX, this.offsetY);
+ },
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/mixins/transition.js b/uni_modules/tdesign-uniapp/components/mixins/transition.js
new file mode 100644
index 0000000..9be641e
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/mixins/transition.js
@@ -0,0 +1,133 @@
+import { prefix } from '../common/config';
+
+
+export default function transition() {
+ return {
+ data() {
+ return {
+ transitionClass: '',
+ transitionDurations: 300,
+ className: '',
+ realVisible: false,
+ };
+ },
+ props: {
+ visible: {
+ type: Boolean,
+ default: null,
+ },
+ appear: Boolean,
+ name: {
+ type: String,
+ default: 'fade',
+ },
+ durations: {
+ type: Number,
+ optionalTypes: [Array],
+ },
+ },
+ watch: {
+ visible: {
+ handler(val, oldVal) {
+ this.watchVisible(val, oldVal);
+ },
+ },
+ },
+ created() {
+ this.status = '';
+ this.transitionT = 0;
+ },
+ beforeMount() {
+ this.dataDurations = this.getDurations();
+ if (this.visible) {
+ this.enter();
+ }
+ this.inited = true;
+ },
+ destroyed() {
+ clearTimeout(this.transitionT);
+ },
+ methods: {
+ watchVisible(curr, prev) {
+ if (this.inited && curr !== prev) {
+ curr ? this.enter() : this.leave();
+ }
+ },
+ getDurations() {
+ const { durations } = this;
+ if (Array.isArray(durations)) {
+ return durations.map(item => Number(item));
+ }
+ return [Number(durations), Number(durations)];
+ },
+ enter() {
+ const { name, transitionDurations } = this;
+ const [duration] = this.dataDurations;
+ this.status = 'entering';
+ this.realVisible = true;
+ this.transitionClass = `${prefix}-${name}-enter ${prefix}-${name}-enter-active`;
+
+
+ setTimeout(() => {
+ this.transitionClass = `${prefix}-${name}-enter-active ${prefix}-${name}-enter-to`;
+ }, 30);
+ if (typeof duration === 'number' && duration > 0) {
+ this.transitionT = setTimeout(this.entered.bind(this), duration + 30);
+ } else {
+ this.transitionT = setTimeout(
+ this.status === 'leaving' ? this.leaved.bind(this) : (() => {}),
+ transitionDurations + 30,
+ );
+ }
+ },
+ entered() {
+ this.customDuration = false;
+ clearTimeout(this.transitionT);
+ this.status = 'entered';
+ this.transitionClass = '';
+ },
+ leave() {
+ const { name, transitionDurations } = this;
+ const [, duration] = this.dataDurations;
+ this.status = 'leaving';
+ this.transitionClass = `${prefix}-${name}-leave ${prefix}-${name}-leave-active`;
+
+ clearTimeout(this.transitionT);
+ setTimeout(() => {
+ this.transitionClass = `${prefix}-${name}-leave-active ${prefix}-${name}-leave-to`;
+ }, 30);
+
+ if (typeof duration === 'number' && duration > 0) {
+ this.customDuration = true;
+ this.transitionT = setTimeout(this.leaved.bind(this), duration + 30);
+ } else {
+ this.transitionT = setTimeout(
+ this.status === 'leaving' ? this.leaved.bind(this) : (() => {}),
+ transitionDurations + 30,
+ );
+ }
+ },
+ leaved() {
+ this.customDuration = false;
+ this.$emit('leaved');
+ clearTimeout(this.transitionT);
+ this.status = 'leaved';
+
+ this.transitionClass = '';
+ this.realVisible = false;
+ },
+ onTransitionEnd() {
+ if (this.customDuration) {
+ return;
+ }
+ clearTimeout(this.transitionT);
+ if (this.status === 'entering' && this.visible) {
+ this.entered();
+ } else if (this.status === 'leaving' && !this.visible) {
+ this.leaved();
+ }
+ },
+ },
+ };
+}
+export const transitionMixins = transition();
diff --git a/uni_modules/tdesign-uniapp/components/mixins/using-custom-navbar.js b/uni_modules/tdesign-uniapp/components/mixins/using-custom-navbar.js
new file mode 100644
index 0000000..4d75b5e
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/mixins/using-custom-navbar.js
@@ -0,0 +1,38 @@
+import { systemInfo } from '../common/utils';
+const useCustomNavbarBehavior = {
+ data() {
+ return {
+ distanceTop: 0,
+ };
+ },
+ props: {
+ usingCustomNavbar: {
+ type: Boolean,
+ default: false,
+ },
+ customNavbarHeight: {
+ type: Number,
+ default: 0,
+ },
+ },
+ created() {
+ if (this.usingCustomNavbar) {
+ this.calculateCustomNavbarDistanceTop();
+ }
+ },
+ methods: {
+ calculateCustomNavbarDistanceTop() {
+ const { statusBarHeight } = systemInfo;
+ let distance = 0;
+ // #ifndef H5
+ // #ifndef APP-PLUS
+ const menuButton = uni.getMenuButtonBoundingClientRect();
+ distance = menuButton.top + menuButton.bottom - statusBarHeight;
+ // #endif
+ // #endif
+
+ this.distanceTop = Math.max(distance, this.customNavbarHeight + statusBarHeight);
+ },
+ },
+};
+export default useCustomNavbarBehavior;
diff --git a/uni_modules/tdesign-uniapp/components/navbar/README.en-US.md b/uni_modules/tdesign-uniapp/components/navbar/README.en-US.md
new file mode 100644
index 0000000..8299220
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/navbar/README.en-US.md
@@ -0,0 +1,76 @@
+:: BASE_DOC ::
+
+## API
+
+### Navbar Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+animation | Boolean | true | \- | N
+background | String | - | `deprecated`。background | N
+delta | Number | 1 | \- | N
+fixed | Boolean | true | \- | N
+home-icon | String | - | `deprecated`。homeIcon | N
+left-arrow | Boolean | false | \- | N
+left-icon | String | - | `deprecated` | N
+placeholder | Boolean | false | \- | N
+safe-area-inset-top | Boolean | true | \- | N
+title | String | - | page title | N
+title-max-length | Number | - | \- | N
+visible | Boolean | true | \- | N
+z-index | Number | 1 | \- | N
+
+### Navbar Events
+
+name | params | description
+-- | -- | --
+complete | \- | \-
+fail | \- | \-
+go-back | \- | \-
+go-home | \- | `deprecated`
+right-click | \- | \-
+success | \- | \-
+
+### Navbar Slots
+
+name | Description
+-- | --
+capsule | \-
+left | \-
+right | \-
+title | page title
+
+### Navbar External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-capsule | \-
+t-class-center | \-
+t-class-home-icon | \-
+t-class-left | \-
+t-class-left-icon | \-
+t-class-nav-btn | \-
+t-class-title | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-navbar-padding-top | 20px | -
+--td-navbar-right | 95px | -
+--td-navbar-background | @navbar-bg-color | -
+--td-navbar-bg-color | @bg-color-container | -
+--td-navbar-capsule-border-color | @border-level-1-color | -
+--td-navbar-capsule-border-radius | 16px | -
+--td-navbar-capsule-height | 32px | -
+--td-navbar-capsule-width | 88px | -
+--td-navbar-center-left | @navbar-right | -
+--td-navbar-center-width | 187px | -
+--td-navbar-color | @text-color-primary | -
+--td-navbar-height | 48px | -
+--td-navbar-left-arrow-size | 24px | -
+--td-navbar-left-max-width | --td-navbar-left-max-width | -
+--td-navbar-title-font | @font-title-large | -
diff --git a/uni_modules/tdesign-uniapp/components/navbar/README.md b/uni_modules/tdesign-uniapp/components/navbar/README.md
new file mode 100644
index 0000000..b314a4f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/navbar/README.md
@@ -0,0 +1,121 @@
+---
+title: Navbar 导航栏
+description: 用于不同页面之间切换或者跳转,位于内容区的上方,系统状态栏的下方。
+spline: navigation
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TNavbar from '@tdesign/uniapp/navbar/navbar.vue';
+```
+
+
+### 基础导航栏
+
+{{ base }}
+
+### 胶囊样式导航栏
+
+{{ back-home }}
+
+### 带搜索导航栏
+
+{{ search }}
+
+### 带图片导航栏
+
+{{ img }}
+
+### 组件样式
+
+{{ left-title }}
+
+### 自定义颜色
+
+{{ custom-color }}
+
+### FAQ
+
+#### 高度说明
+
+`navbar` 组件可由 `--td-navbar-height` 控制。在 H5 或 APP-PLUS 平台下,`--td-navbar-height` 变量需要业务自己设置,小程序平台则会根据 `statusBarHeight` 等变量计算得到。
+
+## API
+
+### Navbar Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+animation | Boolean | true | 是否添加动画效果 | N
+background | String | - | 已废弃。背景 | N
+delta | Number | 1 | 后退按钮后退层数,含义参考 [wx.navigateBack](https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.navigateBack.html),特殊的,传入 0 不会发生执行 wx.navigateBack | N
+fixed | Boolean | true | 是否固定在顶部 | N
+home-icon | String | - | 已废弃。首页图标地址。值为 '' 或者 undefined 则表示不显示返回图标,值为 'circle' 表示显示默认图标,值为 'slot' 表示使用插槽渲染,值为其他则表示图标地址 | N
+left-arrow | Boolean | false | 是否展示左侧箭头 | N
+left-icon | String | - | 已废弃。左侧图标地址,值为 '' 或者 undefined 则表示不显示返回图标,值为 'arrow-left' 表示显示返回图标,值为 'slot' 表示使用插槽渲染,值为其他则表示图标地址 | N
+placeholder | Boolean | false | 固定在顶部时是否开启占位 | N
+safe-area-inset-top | Boolean | true | 是否开启顶部安全区适配 | N
+title | String | - | 页面标题 | N
+title-max-length | Number | - | 标题文字最大长度,超出的范围使用 `...` 表示 | N
+visible | Boolean | true | 是否显示 | N
+z-index | Number | 1 | 导航栏栏层级 | N
+
+### Navbar Events
+
+名称 | 参数 | 描述
+-- | -- | --
+complete | \- | navigateBack 执行完成后触发(失败或成功均会触发)
+fail | \- | navigateBack 执行失败后触发
+go-back | \- | 点击左侧箭头时触发
+go-home | \- | 已废弃。点击 Home 触发
+right-click | \- | 点击右侧图标时触发
+success | \- | navigateBack 执行成功后触发
+
+### Navbar Slots
+
+名称 | 描述
+-- | --
+capsule | 左侧胶囊区域
+left | 左侧内容区域
+right | 右侧内容区域
+title | 自定义 `title` 显示内容
+
+### Navbar External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-capsule | 左侧胶囊区域样式类
+t-class-center | 中间内容样式类
+t-class-home-icon | 首页图标样式类
+t-class-left | 左侧内容样式类
+t-class-left-icon | 左侧图标样式类
+t-class-nav-btn | 导航按钮样式类
+t-class-title | 标题样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-navbar-padding-top | 20px | -
+--td-navbar-right | 95px | -
+--td-navbar-background | @navbar-bg-color | -
+--td-navbar-bg-color | @bg-color-container | -
+--td-navbar-capsule-border-color | @border-level-1-color | -
+--td-navbar-capsule-border-radius | 16px | -
+--td-navbar-capsule-height | 32px | -
+--td-navbar-capsule-width | 88px | -
+--td-navbar-center-left | @navbar-right | -
+--td-navbar-center-width | 187px | -
+--td-navbar-color | @text-color-primary | -
+--td-navbar-height | 48px | -
+--td-navbar-left-arrow-size | 24px | -
+--td-navbar-left-max-width | --td-navbar-left-max-width | -
+--td-navbar-title-font | @font-title-large | -
diff --git a/uni_modules/tdesign-uniapp/components/navbar/navbar.css b/uni_modules/tdesign-uniapp/components/navbar/navbar.css
new file mode 100644
index 0000000..2e5bff3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/navbar/navbar.css
@@ -0,0 +1,106 @@
+.t-navbar {
+ position: relative;
+}
+.t-navbar--fixed .t-navbar__content {
+ position: fixed;
+ top: 0;
+ left: 0;
+}
+.t-navbar--visible {
+ display: '';
+}
+.t-navbar--visible-animation {
+ opacity: 1;
+ transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+}
+.t-navbar--hide-animation {
+ opacity: 0;
+ transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+}
+.t-navbar--hide {
+ display: none;
+}
+.t-navbar__placeholder {
+ height: var(--td-navbar-height, 48px);
+ padding-top: var(--td-navbar-padding-top, 20px);
+ position: relative;
+ visibility: hidden;
+ box-sizing: content-box;
+}
+.t-navbar__content {
+ position: relative;
+ height: var(--td-navbar-height, 48px);
+ width: calc(100% - var(--td-navbar-right, 95px));
+ padding-right: var(--td-navbar-right, 95px);
+ padding-top: var(--td-navbar-padding-top, 20px);
+ color: var(--td-navbar-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ background: var(--td-navbar-background, var(--td-navbar-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff))));
+ display: flex;
+ align-items: center;
+ box-sizing: content-box;
+}
+.t-navbar__left {
+ position: relative;
+ box-sizing: border-box;
+ max-width: var(--td-navbar-left-max-width);
+ overflow: hidden;
+ display: flex;
+ align-items: center;
+ margin-left: var(--td-spacer-1, 24rpx);
+ transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+}
+:deep(.t-navbar__left-arrow) {
+ font-size: var(--td-navbar-left-arrow-size, 24px);
+}
+.t-navbar__left--hide {
+ opacity: 0;
+}
+.t-navbar__capsule {
+ box-sizing: border-box;
+ width: var(--td-navbar-capsule-width, 88px);
+ height: var(--td-navbar-capsule-height, 32px);
+ display: flex;
+ align-items: center;
+}
+.t-navbar__capsule::before {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 200%;
+ height: 200%;
+ transform: scale(0.5);
+ transform-origin: 0 0;
+ box-sizing: border-box;
+ border-radius: calc(var(--td-navbar-capsule-border-radius, 16px) * 2);
+ border: 2rpx solid var(--td-navbar-capsule-border-color, var(--td-border-level-1-color, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-navbar__capsule:empty {
+ display: none;
+}
+.t-navbar__center {
+ text-align: center;
+ position: absolute;
+ bottom: 0;
+ left: var(--td-navbar-center-left, var(--td-navbar-right, 95px));
+ width: var(--td-navbar-center-width, 187px);
+ height: var(--td-navbar-height, 48px);
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ overflow: hidden;
+ transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+}
+.t-navbar__center:empty {
+ display: none;
+}
+.t-navbar__center-title {
+ font: var(--td-navbar-title-font, var(--td-font-title-large, 600 36rpx / 52rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+}
+.t-navbar__center--hide {
+ opacity: 0;
+}
diff --git a/uni_modules/tdesign-uniapp/components/navbar/navbar.vue b/uni_modules/tdesign-uniapp/components/navbar/navbar.vue
new file mode 100644
index 0000000..950cfc3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/navbar/navbar.vue
@@ -0,0 +1,293 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ showTitle }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/navbar/props.ts b/uni_modules/tdesign-uniapp/components/navbar/props.ts
new file mode 100644
index 0000000..86ffcba
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/navbar/props.ts
@@ -0,0 +1,75 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export default {
+ /** 是否添加动画效果 */
+ animation: {
+ type: Boolean,
+ default: true,
+ },
+ /** 后退按钮后退层数,含义参考 [wx.navigateBack](https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.navigateBack.html),特殊的,传入 0 不会发生执行 wx.navigateBack */
+ delta: {
+ type: Number,
+ default: 1,
+ },
+ /** 是否固定在顶部 */
+ fixed: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否展示左侧箭头 */
+ leftArrow: Boolean,
+ /** 固定在顶部时是否开启占位 */
+ placeholder: Boolean,
+ /** 是否开启顶部安全区适配 */
+ safeAreaInsetTop: {
+ type: Boolean,
+ default: true,
+ },
+ /** 页面标题 */
+ title: {
+ type: String,
+ },
+ /** 标题文字最大长度,超出的范围使用 `...` 表示 */
+ titleMaxLength: {
+ type: Number,
+ },
+ /** 是否显示 */
+ visible: {
+ type: Boolean,
+ default: true,
+ },
+ /** 导航栏栏层级 */
+ zIndex: {
+ type: Number,
+ default: 1,
+ },
+ /** navigateBack 执行完成后触发(失败或成功均会触发) */
+ onComplete: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** navigateBack 执行失败后触发 */
+ onFail: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击左侧箭头时触发 */
+ onGoBack: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击右侧图标时触发 */
+ onRightClick: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** navigateBack 执行成功后触发 */
+ onSuccess: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/navbar/type.ts b/uni_modules/tdesign-uniapp/components/navbar/type.ts
new file mode 100644
index 0000000..5f24ff2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/navbar/type.ts
@@ -0,0 +1,76 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdNavbarProps {
+ /**
+ * 是否添加动画效果
+ * @default true
+ */
+ animation?: boolean;
+ /**
+ * 后退按钮后退层数,含义参考 [wx.navigateBack](https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.navigateBack.html),特殊的,传入 0 不会发生执行 wx.navigateBack
+ * @default 1
+ */
+ delta?: number;
+ /**
+ * 是否固定在顶部
+ * @default true
+ */
+ fixed?: boolean;
+ /**
+ * 是否展示左侧箭头
+ * @default false
+ */
+ leftArrow?: boolean;
+ /**
+ * 固定在顶部时是否开启占位
+ * @default false
+ */
+ placeholder?: boolean;
+ /**
+ * 是否开启顶部安全区适配
+ * @default true
+ */
+ safeAreaInsetTop?: boolean;
+ /**
+ * 页面标题
+ */
+ title?: string;
+ /**
+ * 标题文字最大长度,超出的范围使用 `...` 表示
+ */
+ titleMaxLength?: number;
+ /**
+ * 是否显示
+ * @default true
+ */
+ visible?: boolean;
+ /**
+ * 导航栏栏层级
+ * @default 1
+ */
+ zIndex?: number;
+ /**
+ * navigateBack 执行完成后触发(失败或成功均会触发)
+ */
+ onComplete?: () => void;
+ /**
+ * navigateBack 执行失败后触发
+ */
+ onFail?: () => void;
+ /**
+ * 点击左侧箭头时触发
+ */
+ onGoBack?: () => void;
+ /**
+ * 点击右侧图标时触发
+ */
+ onRightClick?: () => void;
+ /**
+ * navigateBack 执行成功后触发
+ */
+ onSuccess?: () => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/notice-bar/README.en-US.md b/uni_modules/tdesign-uniapp/components/notice-bar/README.en-US.md
new file mode 100644
index 0000000..b85e565
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/notice-bar/README.en-US.md
@@ -0,0 +1,62 @@
+:: BASE_DOC ::
+
+## API
+
+### NoticeBar Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+content | String / Array | - | \- | N
+direction | String | horizontal | options: horizontal/vertical | N
+interval | Number | 2000 | \- | N
+marquee | Boolean / Object | false | Typescript:`boolean \| NoticeBarMarquee` `interface NoticeBarMarquee { speed?: number; loop?: number; delay?: number }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/notice-bar/type.ts) | N
+operation | String | - | \- | N
+prefix-icon | String / Boolean / Object | true | \- | N
+suffix-icon | String / Object | - | \- | N
+theme | String | info | options: info/success/warning/error | N
+visible | Boolean | false | `v-model:visible` is supported | N
+default-visible | Boolean | false | uncontrolled property | N
+
+### NoticeBar Events
+
+name | params | description
+-- | -- | --
+change | `(context: { current: number, source: '' \| 'autoplay' \| 'touch' })` | \-
+click | `(context: { trigger: NoticeBarTrigger })` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/notice-bar/type.ts)。
`type NoticeBarTrigger = 'prefix-icon' \| 'content' \| 'operation' \| 'suffix-icon';`
+
+### NoticeBar Slots
+
+name | Description
+-- | --
+content | \-
+operation | \-
+prefix-icon | \-
+suffix-icon | \-
+
+### NoticeBar External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-content | \-
+t-class-operation | \-
+t-class-prefix-icon | \-
+t-class-suffix-icon | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-notice-bar-error-bg-color | @error-color-1 | -
+--td-notice-bar-error-color | @error-color | -
+--td-notice-bar-font-color | @text-color-primary | -
+--td-notice-bar-info-bg-color | @brand-color-light | -
+--td-notice-bar-info-color | @brand-color | -
+--td-notice-bar-operation-font-color | @brand-color | -
+--td-notice-bar-success-bg-color | @success-color-1 | -
+--td-notice-bar-success-color | @success-color | -
+--td-notice-bar-suffix-icon-color | @text-color-placeholder | -
+--td-notice-bar-warning-bg-color | @warning-color-1 | -
+--td-notice-bar-warning-color | @warning-color | -
diff --git a/uni_modules/tdesign-uniapp/components/notice-bar/README.md b/uni_modules/tdesign-uniapp/components/notice-bar/README.md
new file mode 100644
index 0000000..c81f222
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/notice-bar/README.md
@@ -0,0 +1,116 @@
+---
+title: NoticeBar 公告栏
+description: 在导航栏下方,用于给用户显示提示消息。
+spline: message
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TNoticeBar from '@tdesign/uniapp/notice-bar/notice-bar.vue';
+```
+
+### 01 组件类型
+
+纯文字的公告栏
+
+{{ base }}
+
+带图标的公告栏
+
+{{ iconDemo }}
+
+带关闭的公告栏
+
+{{ suffixIcon }}
+
+带入口的公告栏
+
+{{ event }}
+
+自定义样式的公告栏
+
+{{ custom }}
+
+自定义内容的公告栏
+
+{{ customization }}
+
+### 02 组件状态
+
+公告栏类型有普通(info)、警示(warning)、成功(success)、错误(error)
+
+{{ theme }}
+
+### 03 可滚动公告栏
+
+可滚动公告栏有水平(horizontal)和垂直(vertical)
+
+{{ scrolling }}
+
+
+## API
+
+### NoticeBar Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+content | String / Array | - | 文本内容 | N
+direction | String | horizontal | 滚动方向。可选项:horizontal/vertical | N
+interval | Number | 2000 | 间隔时间【仅在 direction='vertical' 有效】 | N
+marquee | Boolean / Object | false | 跑马灯效果。speed 指速度控制;loop 指循环播放次数,值为 -1 表示循环播放,值为 0 表示不循环播放;delay 表示延迟多久开始播放【仅在 direction='horizontal' 有效】。TS 类型:`boolean \| NoticeBarMarquee` `interface NoticeBarMarquee { speed?: number; loop?: number; delay?: number }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/notice-bar/type.ts) | N
+operation | String | - | 右侧额外信息 | N
+prefix-icon | String / Boolean / Object | true | 前缀图标。值为字符串表示图标名称,值为 `false` 表示不显示前缀图标,值为 `Object` 类型,表示透传至 `icon`,不传表示使用主题图标 | N
+suffix-icon | String / Object | - | 后缀图标。值为字符串表示图标名称。值为 `Object` 类型,表示透传至 `icon`,不传表示不显示后缀图标 | N
+theme | String | info | 内置主题。可选项:info/success/warning/error | N
+visible | Boolean | false | 显示/隐藏。支持语法糖 `v-model:visible` | N
+default-visible | Boolean | false | 显示/隐藏。非受控属性 | N
+
+### NoticeBar Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { current: number, source: '' \| 'autoplay' \| 'touch' })` | 当 `direction="vertical"` 时轮播切换时触发
+click | `(context: { trigger: NoticeBarTrigger })` | 点击事件。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/notice-bar/type.ts)。
`type NoticeBarTrigger = 'prefix-icon' \| 'content' \| 'operation' \| 'suffix-icon';`
+
+### NoticeBar Slots
+
+名称 | 描述
+-- | --
+content | 文本内容
+operation | 自定义 `operation` 显示内容
+prefix-icon | 前缀图标
+suffix-icon | 后缀图标
+
+### NoticeBar External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-content | 内容样式类
+t-class-operation | 右侧额外信息样式类
+t-class-prefix-icon | 前置图标样式类
+t-class-suffix-icon | 后置图标样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-notice-bar-error-bg-color | @error-color-1 | -
+--td-notice-bar-error-color | @error-color | -
+--td-notice-bar-font-color | @text-color-primary | -
+--td-notice-bar-info-bg-color | @brand-color-light | -
+--td-notice-bar-info-color | @brand-color | -
+--td-notice-bar-operation-font-color | @brand-color | -
+--td-notice-bar-success-bg-color | @success-color-1 | -
+--td-notice-bar-success-color | @success-color | -
+--td-notice-bar-suffix-icon-color | @text-color-placeholder | -
+--td-notice-bar-warning-bg-color | @warning-color-1 | -
+--td-notice-bar-warning-color | @warning-color | -
diff --git a/uni_modules/tdesign-uniapp/components/notice-bar/notice-bar.css b/uni_modules/tdesign-uniapp/components/notice-bar/notice-bar.css
new file mode 100644
index 0000000..88c31ad
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/notice-bar/notice-bar.css
@@ -0,0 +1,75 @@
+.t-notice-bar {
+ display: flex;
+ align-items: flex-start;
+ padding: 26rpx 32rpx;
+}
+.t-notice-bar__content-wrap {
+ flex: 1;
+ overflow-x: hidden;
+ font: var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+ color: var(--td-notice-bar-font-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-notice-bar__content {
+ display: inline-block;
+ white-space: nowrap;
+}
+.t-notice-bar__content-wrapable {
+ white-space: normal;
+}
+.t-notice-bar__content--vertical {
+ display: block;
+ height: 44rpx;
+ line-height: 44rpx;
+}
+.t-notice-bar__content--vertical-item {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.t-notice-bar__prefix-icon {
+ color: inherit;
+}
+.t-notice-bar__prefix-icon:not(:empty) {
+ padding-right: var(--td-spacer, 16rpx);
+ width: 44rpx;
+}
+.t-notice-bar__suffix-icon {
+ color: var(--td-notice-bar-suffix-icon-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+}
+.t-notice-bar__prefix-icon,
+.t-notice-bar__suffix-icon {
+ font-size: 44rpx;
+}
+.t-notice-bar__prefix-icon:empty,
+.t-notice-bar__suffix-icon:empty {
+ display: none;
+}
+.t-notice-bar__operation {
+ display: inline-flex;
+ vertical-align: top;
+ color: var(--td-notice-bar-operation-font-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ font-weight: 700;
+}
+.t-notice-bar__operation:empty {
+ display: none;
+}
+.t-notice-bar__suffix-icon:not(:empty) {
+ padding-left: var(--td-spacer, 16rpx);
+ width: 44rpx;
+}
+.t-notice-bar--info {
+ color: var(--td-notice-bar-info-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ background-color: var(--td-notice-bar-info-bg-color, var(--td-brand-color-light, var(--td-primary-color-1, #f2f3ff)));
+}
+.t-notice-bar--success {
+ color: var(--td-notice-bar-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+ background-color: var(--td-notice-bar-success-bg-color, var(--td-success-color-1, #e3f9e9));
+}
+.t-notice-bar--warning {
+ color: var(--td-notice-bar-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+ background-color: var(--td-notice-bar-warning-bg-color, var(--td-warning-color-1, #fff1e9));
+}
+.t-notice-bar--error {
+ color: var(--td-notice-bar-error-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+ background-color: var(--td-notice-bar-error-bg-color, var(--td-error-color-1, #fff0ed));
+}
diff --git a/uni_modules/tdesign-uniapp/components/notice-bar/notice-bar.vue b/uni_modules/tdesign-uniapp/components/notice-bar/notice-bar.vue
new file mode 100644
index 0000000..4f49329
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/notice-bar/notice-bar.vue
@@ -0,0 +1,326 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+ {{ content }}
+
+
+
+
+ {{ operation }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/notice-bar/props.ts b/uni_modules/tdesign-uniapp/components/notice-bar/props.ts
new file mode 100644
index 0000000..4f0e0b3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/notice-bar/props.ts
@@ -0,0 +1,71 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdNoticeBarProps } from './type';
+export default {
+ /** 文本内容 */
+ content: {
+ type: [String, Array],
+ },
+ /** 滚动方向 */
+ direction: {
+ type: String,
+ default: 'horizontal' as TdNoticeBarProps['direction'],
+ validator(val: TdNoticeBarProps['direction']): boolean {
+ if (!val) return true;
+ return ['horizontal', 'vertical'].includes(val);
+ },
+ },
+ /** 间隔时间【仅在 direction='vertical' 有效】 */
+ interval: {
+ type: Number,
+ default: 2000,
+ },
+ /** 跑马灯效果。speed 指速度控制;loop 指循环播放次数,值为 -1 表示循环播放,值为 0 表示不循环播放;delay 表示延迟多久开始播放【仅在 direction='horizontal' 有效】 */
+ marquee: {
+ type: [Boolean, Object],
+ default: false as TdNoticeBarProps['marquee'],
+ },
+ /** 右侧额外信息 */
+ operation: {
+ type: String,
+ },
+ /** 前缀图标。值为字符串表示图标名称,值为 `false` 表示不显示前缀图标,值为 `Object` 类型,表示透传至 `icon`,不传表示使用主题图标 */
+ prefixIcon: {
+ type: [String, Boolean, Object],
+ default: true as TdNoticeBarProps['prefixIcon'],
+ },
+ /** 后缀图标。值为字符串表示图标名称。值为 `Object` 类型,表示透传至 `icon`,不传表示不显示后缀图标 */
+ suffixIcon: {
+ type: [String, Object],
+ },
+ /** 内置主题 */
+ theme: {
+ type: String,
+ default: 'info' as TdNoticeBarProps['theme'],
+ validator(val: TdNoticeBarProps['theme']): boolean {
+ if (!val) return true;
+ return ['info', 'success', 'warning', 'error'].includes(val);
+ },
+ },
+ /** 显示/隐藏 */
+ visible: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 显示/隐藏,非受控属性 */
+ defaultVisible: Boolean,
+ /** 当 `direction="vertical"` 时轮播切换时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击事件 */
+ onClick: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/notice-bar/type.ts b/uni_modules/tdesign-uniapp/components/notice-bar/type.ts
new file mode 100644
index 0000000..d00d081
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/notice-bar/type.ts
@@ -0,0 +1,71 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdNoticeBarProps {
+ /**
+ * 文本内容
+ */
+ content?: string | string[];
+ /**
+ * 滚动方向
+ * @default horizontal
+ */
+ direction?: 'horizontal' | 'vertical';
+ /**
+ * 间隔时间【仅在 direction='vertical' 有效】
+ * @default 2000
+ */
+ interval?: number;
+ /**
+ * 跑马灯效果。speed 指速度控制;loop 指循环播放次数,值为 -1 表示循环播放,值为 0 表示不循环播放;delay 表示延迟多久开始播放【仅在 direction='horizontal' 有效】
+ * @default false
+ */
+ marquee?: boolean | NoticeBarMarquee;
+ /**
+ * 右侧额外信息
+ */
+ operation?: string;
+ /**
+ * 前缀图标。值为字符串表示图标名称,值为 `false` 表示不显示前缀图标,值为 `Object` 类型,表示透传至 `icon`,不传表示使用主题图标
+ * @default true
+ */
+ prefixIcon?: string | boolean | object;
+ /**
+ * 后缀图标。值为字符串表示图标名称。值为 `Object` 类型,表示透传至 `icon`,不传表示不显示后缀图标
+ */
+ suffixIcon?: string | object;
+ /**
+ * 内置主题
+ * @default info
+ */
+ theme?: 'info' | 'success' | 'warning' | 'error';
+ /**
+ * 显示/隐藏
+ * @default false
+ */
+ visible?: boolean;
+ /**
+ * 显示/隐藏,非受控属性
+ * @default false
+ */
+ defaultVisible?: boolean;
+ /**
+ * 当 `direction="vertical"` 时轮播切换时触发
+ */
+ onChange?: (context: { current: number; source: '' | 'autoplay' | 'touch' }) => void;
+ /**
+ * 点击事件
+ */
+ onClick?: (context: { trigger: NoticeBarTrigger }) => void;
+}
+
+export interface NoticeBarMarquee {
+ speed?: number;
+ loop?: number;
+ delay?: number;
+}
+
+export type NoticeBarTrigger = 'prefix-icon' | 'content' | 'operation' | 'suffix-icon';
diff --git a/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/constant.js b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/constant.js
new file mode 100644
index 0000000..02ffe1b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/constant.js
@@ -0,0 +1,25 @@
+export var SECONDS_A_MINUTE = 60;
+export var SECONDS_A_HOUR = SECONDS_A_MINUTE * 60;
+export var SECONDS_A_DAY = SECONDS_A_HOUR * 24;
+export var SECONDS_A_WEEK = SECONDS_A_DAY * 7;
+export var MILLISECONDS_A_SECOND = 1e3;
+export var MILLISECONDS_A_MINUTE = SECONDS_A_MINUTE * MILLISECONDS_A_SECOND;
+export var MILLISECONDS_A_HOUR = SECONDS_A_HOUR * MILLISECONDS_A_SECOND;
+export var MILLISECONDS_A_DAY = SECONDS_A_DAY * MILLISECONDS_A_SECOND;
+export var MILLISECONDS_A_WEEK = SECONDS_A_WEEK * MILLISECONDS_A_SECOND; // English locales
+
+export var MS = 'millisecond';
+export var S = 'second';
+export var MIN = 'minute';
+export var H = 'hour';
+export var D = 'day';
+export var W = 'week';
+export var M = 'month';
+export var Q = 'quarter';
+export var Y = 'year';
+export var DATE = 'date';
+export var FORMAT_DEFAULT = 'YYYY-MM-DDTHH:mm:ssZ';
+export var INVALID_DATE_STRING = 'Invalid Date'; // regex
+
+export var REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/;
+export var REGEX_FORMAT = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/index.js b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/index.js
new file mode 100644
index 0000000..a82986b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/index.js
@@ -0,0 +1,541 @@
+import * as C from './constant';
+import en from './locale/en';
+import U from './utils';
+var L = 'en'; // global locale
+
+var Ls = {}; // global loaded locale
+
+Ls[L] = en;
+var IS_DAYJS = '$isDayjsObject'; // eslint-disable-next-line no-use-before-define
+
+var isDayjs = function isDayjs(d) {
+ return d instanceof Dayjs || !!(d && d[IS_DAYJS]);
+};
+
+var parseLocale = function parseLocale(preset, object, isLocal) {
+ var l;
+ if (!preset) return L;
+
+ if (typeof preset === 'string') {
+ var presetLower = preset.toLowerCase();
+
+ if (Ls[presetLower]) {
+ l = presetLower;
+ }
+
+ if (object) {
+ Ls[presetLower] = object;
+ l = presetLower;
+ }
+
+ var presetSplit = preset.split('-');
+
+ if (!l && presetSplit.length > 1) {
+ return parseLocale(presetSplit[0]);
+ }
+ } else {
+ var name = preset.name;
+ Ls[name] = preset;
+ l = name;
+ }
+
+ if (!isLocal && l) L = l;
+ return l || !isLocal && L;
+};
+
+var dayjs = function dayjs(date, c) {
+ if (isDayjs(date)) {
+ return date.clone();
+ } // eslint-disable-next-line no-nested-ternary
+
+
+ var cfg = typeof c === 'object' ? c : {};
+ cfg.date = date;
+ cfg.args = arguments; // eslint-disable-line prefer-rest-params
+
+ return new Dayjs(cfg); // eslint-disable-line no-use-before-define
+};
+
+var wrapper = function wrapper(date, instance) {
+ return dayjs(date, {
+ locale: instance.$L,
+ utc: instance.$u,
+ x: instance.$x,
+ $offset: instance.$offset // todo: refactor; do not use this.$offset in you code
+
+ });
+};
+
+var Utils = U; // for plugin use
+
+Utils.l = parseLocale;
+Utils.i = isDayjs;
+Utils.w = wrapper;
+
+var parseDate = function parseDate(cfg) {
+ var date = cfg.date,
+ utc = cfg.utc;
+ if (date === null) return new Date(NaN); // null is invalid
+
+ if (Utils.u(date)) return new Date(); // today
+
+ if (date instanceof Date) return new Date(date);
+
+ if (typeof date === 'string' && !/Z$/i.test(date)) {
+ var d = date.match(C.REGEX_PARSE);
+
+ if (d) {
+ var m = d[2] - 1 || 0;
+ var ms = (d[7] || '0').substring(0, 3);
+
+ if (utc) {
+ return new Date(Date.UTC(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms));
+ }
+
+ return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);
+ }
+ }
+
+ return new Date(date); // everything else
+};
+
+var Dayjs = /*#__PURE__*/function () {
+ function Dayjs(cfg) {
+ this.$L = parseLocale(cfg.locale, null, true);
+ this.parse(cfg); // for plugin
+
+ this.$x = this.$x || cfg.x || {};
+ this[IS_DAYJS] = true;
+ }
+
+ var _proto = Dayjs.prototype;
+
+ _proto.parse = function parse(cfg) {
+ this.$d = parseDate(cfg);
+ this.init();
+ };
+
+ _proto.init = function init() {
+ var $d = this.$d;
+ this.$y = $d.getFullYear();
+ this.$M = $d.getMonth();
+ this.$D = $d.getDate();
+ this.$W = $d.getDay();
+ this.$H = $d.getHours();
+ this.$m = $d.getMinutes();
+ this.$s = $d.getSeconds();
+ this.$ms = $d.getMilliseconds();
+ } // eslint-disable-next-line class-methods-use-this
+ ;
+
+ _proto.$utils = function $utils() {
+ return Utils;
+ };
+
+ _proto.isValid = function isValid() {
+ return !(this.$d.toString() === C.INVALID_DATE_STRING);
+ };
+
+ _proto.isSame = function isSame(that, units) {
+ var other = dayjs(that);
+ return this.startOf(units) <= other && other <= this.endOf(units);
+ };
+
+ _proto.isAfter = function isAfter(that, units) {
+ return dayjs(that) < this.startOf(units);
+ };
+
+ _proto.isBefore = function isBefore(that, units) {
+ return this.endOf(units) < dayjs(that);
+ };
+
+ _proto.$g = function $g(input, get, set) {
+ if (Utils.u(input)) return this[get];
+ return this.set(set, input);
+ };
+
+ _proto.unix = function unix() {
+ return Math.floor(this.valueOf() / 1000);
+ };
+
+ _proto.valueOf = function valueOf() {
+ // timezone(hour) * 60 * 60 * 1000 => ms
+ return this.$d.getTime();
+ };
+
+ _proto.startOf = function startOf(units, _startOf) {
+ var _this = this;
+
+ // startOf -> endOf
+ var isStartOf = !Utils.u(_startOf) ? _startOf : true;
+ var unit = Utils.p(units);
+
+ var instanceFactory = function instanceFactory(d, m) {
+ var ins = Utils.w(_this.$u ? Date.UTC(_this.$y, m, d) : new Date(_this.$y, m, d), _this);
+ return isStartOf ? ins : ins.endOf(C.D);
+ };
+
+ var instanceFactorySet = function instanceFactorySet(method, slice) {
+ var argumentStart = [0, 0, 0, 0];
+ var argumentEnd = [23, 59, 59, 999];
+ return Utils.w(_this.toDate()[method].apply( // eslint-disable-line prefer-spread
+ _this.toDate('s'), (isStartOf ? argumentStart : argumentEnd).slice(slice)), _this);
+ };
+
+ var $W = this.$W,
+ $M = this.$M,
+ $D = this.$D;
+ var utcPad = "set" + (this.$u ? 'UTC' : '');
+
+ switch (unit) {
+ case C.Y:
+ return isStartOf ? instanceFactory(1, 0) : instanceFactory(31, 11);
+
+ case C.M:
+ return isStartOf ? instanceFactory(1, $M) : instanceFactory(0, $M + 1);
+
+ case C.W:
+ {
+ var weekStart = this.$locale().weekStart || 0;
+ var gap = ($W < weekStart ? $W + 7 : $W) - weekStart;
+ return instanceFactory(isStartOf ? $D - gap : $D + (6 - gap), $M);
+ }
+
+ case C.D:
+ case C.DATE:
+ return instanceFactorySet(utcPad + "Hours", 0);
+
+ case C.H:
+ return instanceFactorySet(utcPad + "Minutes", 1);
+
+ case C.MIN:
+ return instanceFactorySet(utcPad + "Seconds", 2);
+
+ case C.S:
+ return instanceFactorySet(utcPad + "Milliseconds", 3);
+
+ default:
+ return this.clone();
+ }
+ };
+
+ _proto.endOf = function endOf(arg) {
+ return this.startOf(arg, false);
+ };
+
+ _proto.$set = function $set(units, _int) {
+ var _C$D$C$DATE$C$M$C$Y$C;
+
+ // private set
+ var unit = Utils.p(units);
+ var utcPad = "set" + (this.$u ? 'UTC' : '');
+ var name = (_C$D$C$DATE$C$M$C$Y$C = {}, _C$D$C$DATE$C$M$C$Y$C[C.D] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[C.DATE] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[C.M] = utcPad + "Month", _C$D$C$DATE$C$M$C$Y$C[C.Y] = utcPad + "FullYear", _C$D$C$DATE$C$M$C$Y$C[C.H] = utcPad + "Hours", _C$D$C$DATE$C$M$C$Y$C[C.MIN] = utcPad + "Minutes", _C$D$C$DATE$C$M$C$Y$C[C.S] = utcPad + "Seconds", _C$D$C$DATE$C$M$C$Y$C[C.MS] = utcPad + "Milliseconds", _C$D$C$DATE$C$M$C$Y$C)[unit];
+ var arg = unit === C.D ? this.$D + (_int - this.$W) : _int;
+
+ if (unit === C.M || unit === C.Y) {
+ // clone is for badMutable plugin
+ var date = this.clone().set(C.DATE, 1);
+ date.$d[name](arg);
+ date.init();
+ this.$d = date.set(C.DATE, Math.min(this.$D, date.daysInMonth())).$d;
+ } else if (name) this.$d[name](arg);
+
+ this.init();
+ return this;
+ };
+
+ _proto.set = function set(string, _int2) {
+ return this.clone().$set(string, _int2);
+ };
+
+ _proto.get = function get(unit) {
+ return this[Utils.p(unit)]();
+ };
+
+ _proto.add = function add(number, units) {
+ var _this2 = this,
+ _C$MIN$C$H$C$S$unit;
+
+ number = Number(number); // eslint-disable-line no-param-reassign
+
+ var unit = Utils.p(units);
+
+ var instanceFactorySet = function instanceFactorySet(n) {
+ var d = dayjs(_this2);
+ return Utils.w(d.date(d.date() + Math.round(n * number)), _this2);
+ };
+
+ if (unit === C.M) {
+ return this.set(C.M, this.$M + number);
+ }
+
+ if (unit === C.Y) {
+ return this.set(C.Y, this.$y + number);
+ }
+
+ if (unit === C.D) {
+ return instanceFactorySet(1);
+ }
+
+ if (unit === C.W) {
+ return instanceFactorySet(7);
+ }
+
+ var step = (_C$MIN$C$H$C$S$unit = {}, _C$MIN$C$H$C$S$unit[C.MIN] = C.MILLISECONDS_A_MINUTE, _C$MIN$C$H$C$S$unit[C.H] = C.MILLISECONDS_A_HOUR, _C$MIN$C$H$C$S$unit[C.S] = C.MILLISECONDS_A_SECOND, _C$MIN$C$H$C$S$unit)[unit] || 1; // ms
+
+ var nextTimeStamp = this.$d.getTime() + number * step;
+ return Utils.w(nextTimeStamp, this);
+ };
+
+ _proto.subtract = function subtract(number, string) {
+ return this.add(number * -1, string);
+ };
+
+ _proto.format = function format(formatStr) {
+ var _this3 = this;
+
+ var locale = this.$locale();
+ if (!this.isValid()) return locale.invalidDate || C.INVALID_DATE_STRING;
+ var str = formatStr || C.FORMAT_DEFAULT;
+ var zoneStr = Utils.z(this);
+ var $H = this.$H,
+ $m = this.$m,
+ $M = this.$M;
+ var weekdays = locale.weekdays,
+ months = locale.months,
+ meridiem = locale.meridiem;
+
+ var getShort = function getShort(arr, index, full, length) {
+ return arr && (arr[index] || arr(_this3, str)) || full[index].slice(0, length);
+ };
+
+ var get$H = function get$H(num) {
+ return Utils.s($H % 12 || 12, num, '0');
+ };
+
+ var meridiemFunc = meridiem || function (hour, minute, isLowercase) {
+ var m = hour < 12 ? 'AM' : 'PM';
+ return isLowercase ? m.toLowerCase() : m;
+ };
+
+ var matches = function matches(match) {
+ switch (match) {
+ case 'YY':
+ return String(_this3.$y).slice(-2);
+
+ case 'YYYY':
+ return Utils.s(_this3.$y, 4, '0');
+
+ case 'M':
+ return $M + 1;
+
+ case 'MM':
+ return Utils.s($M + 1, 2, '0');
+
+ case 'MMM':
+ return getShort(locale.monthsShort, $M, months, 3);
+
+ case 'MMMM':
+ return getShort(months, $M);
+
+ case 'D':
+ return _this3.$D;
+
+ case 'DD':
+ return Utils.s(_this3.$D, 2, '0');
+
+ case 'd':
+ return String(_this3.$W);
+
+ case 'dd':
+ return getShort(locale.weekdaysMin, _this3.$W, weekdays, 2);
+
+ case 'ddd':
+ return getShort(locale.weekdaysShort, _this3.$W, weekdays, 3);
+
+ case 'dddd':
+ return weekdays[_this3.$W];
+
+ case 'H':
+ return String($H);
+
+ case 'HH':
+ return Utils.s($H, 2, '0');
+
+ case 'h':
+ return get$H(1);
+
+ case 'hh':
+ return get$H(2);
+
+ case 'a':
+ return meridiemFunc($H, $m, true);
+
+ case 'A':
+ return meridiemFunc($H, $m, false);
+
+ case 'm':
+ return String($m);
+
+ case 'mm':
+ return Utils.s($m, 2, '0');
+
+ case 's':
+ return String(_this3.$s);
+
+ case 'ss':
+ return Utils.s(_this3.$s, 2, '0');
+
+ case 'SSS':
+ return Utils.s(_this3.$ms, 3, '0');
+
+ case 'Z':
+ return zoneStr;
+ // 'ZZ' logic below
+
+ default:
+ break;
+ }
+
+ return null;
+ };
+
+ return str.replace(C.REGEX_FORMAT, function (match, $1) {
+ return $1 || matches(match) || zoneStr.replace(':', '');
+ }); // 'ZZ'
+ };
+
+ _proto.utcOffset = function utcOffset() {
+ // Because a bug at FF24, we're rounding the timezone offset around 15 minutes
+ // https://github.com/moment/moment/pull/1871
+ return -Math.round(this.$d.getTimezoneOffset() / 15) * 15;
+ };
+
+ _proto.diff = function diff(input, units, _float) {
+ var _this4 = this;
+
+ var unit = Utils.p(units);
+ var that = dayjs(input);
+ var zoneDelta = (that.utcOffset() - this.utcOffset()) * C.MILLISECONDS_A_MINUTE;
+ var diff = this - that;
+
+ var getMonth = function getMonth() {
+ return Utils.m(_this4, that);
+ };
+
+ var result;
+
+ switch (unit) {
+ case C.Y:
+ result = getMonth() / 12;
+ break;
+
+ case C.M:
+ result = getMonth();
+ break;
+
+ case C.Q:
+ result = getMonth() / 3;
+ break;
+
+ case C.W:
+ result = (diff - zoneDelta) / C.MILLISECONDS_A_WEEK;
+ break;
+
+ case C.D:
+ result = (diff - zoneDelta) / C.MILLISECONDS_A_DAY;
+ break;
+
+ case C.H:
+ result = diff / C.MILLISECONDS_A_HOUR;
+ break;
+
+ case C.MIN:
+ result = diff / C.MILLISECONDS_A_MINUTE;
+ break;
+
+ case C.S:
+ result = diff / C.MILLISECONDS_A_SECOND;
+ break;
+
+ default:
+ result = diff; // milliseconds
+
+ break;
+ }
+
+ return _float ? result : Utils.a(result);
+ };
+
+ _proto.daysInMonth = function daysInMonth() {
+ return this.endOf(C.M).$D;
+ };
+
+ _proto.$locale = function $locale() {
+ // get locale object
+ return Ls[this.$L];
+ };
+
+ _proto.locale = function locale(preset, object) {
+ if (!preset) return this.$L;
+ var that = this.clone();
+ var nextLocaleName = parseLocale(preset, object, true);
+ if (nextLocaleName) that.$L = nextLocaleName;
+ return that;
+ };
+
+ _proto.clone = function clone() {
+ return Utils.w(this.$d, this);
+ };
+
+ _proto.toDate = function toDate() {
+ return new Date(this.valueOf());
+ };
+
+ _proto.toJSON = function toJSON() {
+ return this.isValid() ? this.toISOString() : null;
+ };
+
+ _proto.toISOString = function toISOString() {
+ // ie 8 return
+ // new Dayjs(this.valueOf() + this.$d.getTimezoneOffset() * 60000)
+ // .format('YYYY-MM-DDTHH:mm:ss.SSS[Z]')
+ return this.$d.toISOString();
+ };
+
+ _proto.toString = function toString() {
+ return this.$d.toUTCString();
+ };
+
+ return Dayjs;
+}();
+
+var proto = Dayjs.prototype;
+dayjs.prototype = proto;
+[['$ms', C.MS], ['$s', C.S], ['$m', C.MIN], ['$H', C.H], ['$W', C.D], ['$M', C.M], ['$y', C.Y], ['$D', C.DATE]].forEach(function (g) {
+ proto[g[1]] = function (input) {
+ return this.$g(input, g[0], g[1]);
+ };
+});
+
+dayjs.extend = function (plugin, option) {
+ if (!plugin.$i) {
+ // install plugin only once
+ plugin(option, Dayjs, dayjs);
+ plugin.$i = true;
+ }
+
+ return dayjs;
+};
+
+dayjs.locale = parseLocale;
+dayjs.isDayjs = isDayjs;
+
+dayjs.unix = function (timestamp) {
+ return dayjs(timestamp * 1e3);
+};
+
+dayjs.en = Ls[L];
+dayjs.Ls = Ls;
+dayjs.p = {};
+export default dayjs;
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/en.js b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/en.js
new file mode 100644
index 0000000..8ba6107
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/en.js
@@ -0,0 +1,12 @@
+// English [en]
+// We don't need weekdaysShort, weekdaysMin, monthsShort in en.js locale
+export default {
+ name: 'en',
+ weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+ months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
+ ordinal: function ordinal(n) {
+ var s = ['th', 'st', 'nd', 'rd'];
+ var v = n % 100;
+ return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]";
+ }
+};
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/ja.js b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/ja.js
new file mode 100644
index 0000000..6568e13
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/ja.js
@@ -0,0 +1,45 @@
+// Japanese [ja]
+import dayjs from '../index';
+var locale = {
+ name: 'ja',
+ weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
+ weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
+ weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
+ months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ ordinal: function ordinal(n) {
+ return n + "\u65E5";
+ },
+ formats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日 dddd HH:mm',
+ l: 'YYYY/MM/DD',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日(ddd) HH:mm'
+ },
+ meridiem: function meridiem(hour) {
+ return hour < 12 ? '午前' : '午後';
+ },
+ relativeTime: {
+ future: '%s後',
+ past: '%s前',
+ s: '数秒',
+ m: '1分',
+ mm: '%d分',
+ h: '1時間',
+ hh: '%d時間',
+ d: '1日',
+ dd: '%d日',
+ M: '1ヶ月',
+ MM: '%dヶ月',
+ y: '1年',
+ yy: '%d年'
+ }
+};
+dayjs.locale(locale, null, true);
+export default locale;
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/ko.js b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/ko.js
new file mode 100644
index 0000000..cfad49d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/ko.js
@@ -0,0 +1,45 @@
+// Korean [ko]
+import dayjs from '../index';
+var locale = {
+ name: 'ko',
+ weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
+ weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
+ weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
+ months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
+ monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
+ ordinal: function ordinal(n) {
+ return n + "\uC77C";
+ },
+ formats: {
+ LT: 'A h:mm',
+ LTS: 'A h:mm:ss',
+ L: 'YYYY.MM.DD.',
+ LL: 'YYYY년 MMMM D일',
+ LLL: 'YYYY년 MMMM D일 A h:mm',
+ LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
+ l: 'YYYY.MM.DD.',
+ ll: 'YYYY년 MMMM D일',
+ lll: 'YYYY년 MMMM D일 A h:mm',
+ llll: 'YYYY년 MMMM D일 dddd A h:mm'
+ },
+ meridiem: function meridiem(hour) {
+ return hour < 12 ? '오전' : '오후';
+ },
+ relativeTime: {
+ future: '%s 후',
+ past: '%s 전',
+ s: '몇 초',
+ m: '1분',
+ mm: '%d분',
+ h: '한 시간',
+ hh: '%d시간',
+ d: '하루',
+ dd: '%d일',
+ M: '한 달',
+ MM: '%d달',
+ y: '일 년',
+ yy: '%d년'
+ }
+};
+dayjs.locale(locale, null, true);
+export default locale;
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/ru.js b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/ru.js
new file mode 100644
index 0000000..fbb1b35
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/ru.js
@@ -0,0 +1,99 @@
+// Russian [ru]
+import dayjs from '../index';
+var monthFormat = 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_');
+var monthStandalone = 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_');
+var monthShortFormat = 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_');
+var monthShortStandalone = 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_');
+var MONTHS_IN_FORMAT = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;
+
+function plural(word, num) {
+ var forms = word.split('_');
+ return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]; // eslint-disable-line
+}
+
+function relativeTimeWithPlural(number, withoutSuffix, key) {
+ var format = {
+ mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
+ hh: 'час_часа_часов',
+ dd: 'день_дня_дней',
+ MM: 'месяц_месяца_месяцев',
+ yy: 'год_года_лет'
+ };
+
+ if (key === 'm') {
+ return withoutSuffix ? 'минута' : 'минуту';
+ }
+
+ return number + " " + plural(format[key], +number);
+}
+
+var months = function months(dayjsInstance, format) {
+ if (MONTHS_IN_FORMAT.test(format)) {
+ return monthFormat[dayjsInstance.month()];
+ }
+
+ return monthStandalone[dayjsInstance.month()];
+};
+
+months.s = monthStandalone;
+months.f = monthFormat;
+
+var monthsShort = function monthsShort(dayjsInstance, format) {
+ if (MONTHS_IN_FORMAT.test(format)) {
+ return monthShortFormat[dayjsInstance.month()];
+ }
+
+ return monthShortStandalone[dayjsInstance.month()];
+};
+
+monthsShort.s = monthShortStandalone;
+monthsShort.f = monthShortFormat;
+var locale = {
+ name: 'ru',
+ weekdays: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
+ weekdaysShort: 'вск_пнд_втр_срд_чтв_птн_сбт'.split('_'),
+ weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
+ months: months,
+ monthsShort: monthsShort,
+ weekStart: 1,
+ yearStart: 4,
+ formats: {
+ LT: 'H:mm',
+ LTS: 'H:mm:ss',
+ L: 'DD.MM.YYYY',
+ LL: 'D MMMM YYYY г.',
+ LLL: 'D MMMM YYYY г., H:mm',
+ LLLL: 'dddd, D MMMM YYYY г., H:mm'
+ },
+ relativeTime: {
+ future: 'через %s',
+ past: '%s назад',
+ s: 'несколько секунд',
+ m: relativeTimeWithPlural,
+ mm: relativeTimeWithPlural,
+ h: 'час',
+ hh: relativeTimeWithPlural,
+ d: 'день',
+ dd: relativeTimeWithPlural,
+ M: 'месяц',
+ MM: relativeTimeWithPlural,
+ y: 'год',
+ yy: relativeTimeWithPlural
+ },
+ ordinal: function ordinal(n) {
+ return n;
+ },
+ meridiem: function meridiem(hour) {
+ if (hour < 4) {
+ return 'ночи';
+ } else if (hour < 12) {
+ return 'утра';
+ } else if (hour < 17) {
+ return 'дня';
+ }
+
+ return 'вечера';
+ }
+};
+dayjs.locale(locale, null, true);
+export default locale;
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/zh-cn.js b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/zh-cn.js
new file mode 100644
index 0000000..1a7ebf4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/zh-cn.js
@@ -0,0 +1,67 @@
+// Chinese (China) [zh-cn]
+import dayjs from '../index';
+var locale = {
+ name: 'zh-cn',
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ ordinal: function ordinal(number, period) {
+ switch (period) {
+ case 'W':
+ return number + "\u5468";
+
+ default:
+ return number + "\u65E5";
+ }
+ },
+ weekStart: 1,
+ yearStart: 4,
+ formats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日Ah点mm分',
+ LLLL: 'YYYY年M月D日ddddAh点mm分',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm'
+ },
+ relativeTime: {
+ future: '%s内',
+ past: '%s前',
+ s: '几秒',
+ m: '1 分钟',
+ mm: '%d 分钟',
+ h: '1 小时',
+ hh: '%d 小时',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 个月',
+ MM: '%d 个月',
+ y: '1 年',
+ yy: '%d 年'
+ },
+ meridiem: function meridiem(hour, minute) {
+ var hm = hour * 100 + minute;
+
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1100) {
+ return '上午';
+ } else if (hm < 1300) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ }
+
+ return '晚上';
+ }
+};
+dayjs.locale(locale, null, true);
+export default locale;
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/zh-tw.js b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/zh-tw.js
new file mode 100644
index 0000000..ada89ee
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/locale/zh-tw.js
@@ -0,0 +1,65 @@
+// Chinese (Taiwan) [zh-tw]
+import dayjs from '../index';
+var locale = {
+ name: 'zh-tw',
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ ordinal: function ordinal(number, period) {
+ switch (period) {
+ case 'W':
+ return number + "\u9031";
+
+ default:
+ return number + "\u65E5";
+ }
+ },
+ formats: {
+ LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
+ L: 'YYYY/MM/DD',
+ LL: 'YYYY年M月D日',
+ LLL: 'YYYY年M月D日 HH:mm',
+ LLLL: 'YYYY年M月D日dddd HH:mm',
+ l: 'YYYY/M/D',
+ ll: 'YYYY年M月D日',
+ lll: 'YYYY年M月D日 HH:mm',
+ llll: 'YYYY年M月D日dddd HH:mm'
+ },
+ relativeTime: {
+ future: '%s內',
+ past: '%s前',
+ s: '幾秒',
+ m: '1 分鐘',
+ mm: '%d 分鐘',
+ h: '1 小時',
+ hh: '%d 小時',
+ d: '1 天',
+ dd: '%d 天',
+ M: '1 個月',
+ MM: '%d 個月',
+ y: '1 年',
+ yy: '%d 年'
+ },
+ meridiem: function meridiem(hour, minute) {
+ var hm = hour * 100 + minute;
+
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1100) {
+ return '上午';
+ } else if (hm < 1300) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ }
+
+ return '晚上';
+ }
+};
+dayjs.locale(locale, null, true);
+export default locale;
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/plugin/localeData/index.js b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/plugin/localeData/index.js
new file mode 100644
index 0000000..c48d92c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/plugin/localeData/index.js
@@ -0,0 +1,114 @@
+import { t } from '../localizedFormat/utils';
+export default (function (o, c, dayjs) {
+ // locale needed later
+ var proto = c.prototype;
+
+ var getLocalePart = function getLocalePart(part) {
+ return part && (part.indexOf ? part : part.s);
+ };
+
+ var getShort = function getShort(ins, target, full, num, localeOrder) {
+ var locale = ins.name ? ins : ins.$locale();
+ var targetLocale = getLocalePart(locale[target]);
+ var fullLocale = getLocalePart(locale[full]);
+ var result = targetLocale || fullLocale.map(function (f) {
+ return f.slice(0, num);
+ });
+ if (!localeOrder) return result;
+ var weekStart = locale.weekStart;
+ return result.map(function (_, index) {
+ return result[(index + (weekStart || 0)) % 7];
+ });
+ };
+
+ var getDayjsLocaleObject = function getDayjsLocaleObject() {
+ return dayjs.Ls[dayjs.locale()];
+ };
+
+ var getLongDateFormat = function getLongDateFormat(l, format) {
+ return l.formats[format] || t(l.formats[format.toUpperCase()]);
+ };
+
+ var localeData = function localeData() {
+ var _this = this;
+
+ return {
+ months: function months(instance) {
+ return instance ? instance.format('MMMM') : getShort(_this, 'months');
+ },
+ monthsShort: function monthsShort(instance) {
+ return instance ? instance.format('MMM') : getShort(_this, 'monthsShort', 'months', 3);
+ },
+ firstDayOfWeek: function firstDayOfWeek() {
+ return _this.$locale().weekStart || 0;
+ },
+ weekdays: function weekdays(instance) {
+ return instance ? instance.format('dddd') : getShort(_this, 'weekdays');
+ },
+ weekdaysMin: function weekdaysMin(instance) {
+ return instance ? instance.format('dd') : getShort(_this, 'weekdaysMin', 'weekdays', 2);
+ },
+ weekdaysShort: function weekdaysShort(instance) {
+ return instance ? instance.format('ddd') : getShort(_this, 'weekdaysShort', 'weekdays', 3);
+ },
+ longDateFormat: function longDateFormat(format) {
+ return getLongDateFormat(_this.$locale(), format);
+ },
+ meridiem: this.$locale().meridiem,
+ ordinal: this.$locale().ordinal
+ };
+ };
+
+ proto.localeData = function () {
+ return localeData.bind(this)();
+ };
+
+ dayjs.localeData = function () {
+ var localeObject = getDayjsLocaleObject();
+ return {
+ firstDayOfWeek: function firstDayOfWeek() {
+ return localeObject.weekStart || 0;
+ },
+ weekdays: function weekdays() {
+ return dayjs.weekdays();
+ },
+ weekdaysShort: function weekdaysShort() {
+ return dayjs.weekdaysShort();
+ },
+ weekdaysMin: function weekdaysMin() {
+ return dayjs.weekdaysMin();
+ },
+ months: function months() {
+ return dayjs.months();
+ },
+ monthsShort: function monthsShort() {
+ return dayjs.monthsShort();
+ },
+ longDateFormat: function longDateFormat(format) {
+ return getLongDateFormat(localeObject, format);
+ },
+ meridiem: localeObject.meridiem,
+ ordinal: localeObject.ordinal
+ };
+ };
+
+ dayjs.months = function () {
+ return getShort(getDayjsLocaleObject(), 'months');
+ };
+
+ dayjs.monthsShort = function () {
+ return getShort(getDayjsLocaleObject(), 'monthsShort', 'months', 3);
+ };
+
+ dayjs.weekdays = function (localeOrder) {
+ return getShort(getDayjsLocaleObject(), 'weekdays', null, null, localeOrder);
+ };
+
+ dayjs.weekdaysShort = function (localeOrder) {
+ return getShort(getDayjsLocaleObject(), 'weekdaysShort', 'weekdays', 3, localeOrder);
+ };
+
+ dayjs.weekdaysMin = function (localeOrder) {
+ return getShort(getDayjsLocaleObject(), 'weekdaysMin', 'weekdays', 2, localeOrder);
+ };
+});
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/plugin/localizedFormat/index.js b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/plugin/localizedFormat/index.js
new file mode 100644
index 0000000..9defb1f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/plugin/localizedFormat/index.js
@@ -0,0 +1,20 @@
+import { FORMAT_DEFAULT } from '../../constant';
+import { u, englishFormats } from './utils';
+export default (function (o, c, d) {
+ var proto = c.prototype;
+ var oldFormat = proto.format;
+ d.en.formats = englishFormats;
+
+ proto.format = function (formatStr) {
+ if (formatStr === void 0) {
+ formatStr = FORMAT_DEFAULT;
+ }
+
+ var _this$$locale = this.$locale(),
+ _this$$locale$formats = _this$$locale.formats,
+ formats = _this$$locale$formats === void 0 ? {} : _this$$locale$formats;
+
+ var result = u(formatStr, formats);
+ return oldFormat.call(this, result);
+ };
+});
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/plugin/localizedFormat/utils.js b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/plugin/localizedFormat/utils.js
new file mode 100644
index 0000000..1f48eff
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/plugin/localizedFormat/utils.js
@@ -0,0 +1,20 @@
+// eslint-disable-next-line import/prefer-default-export
+export var t = function t(format) {
+ return format.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function (_, a, b) {
+ return a || b.slice(1);
+ });
+};
+export var englishFormats = {
+ LTS: 'h:mm:ss A',
+ LT: 'h:mm A',
+ L: 'MM/DD/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY h:mm A',
+ LLLL: 'dddd, MMMM D, YYYY h:mm A'
+};
+export var u = function u(formatStr, formats) {
+ return formatStr.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function (_, a, b) {
+ var B = b && b.toUpperCase();
+ return a || formats[b] || englishFormats[b] || t(formats[B]);
+ });
+};
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/utils.js b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/utils.js
new file mode 100644
index 0000000..b5a8131
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/dayjs/esm/utils.js
@@ -0,0 +1,58 @@
+import * as C from './constant';
+
+var padStart = function padStart(string, length, pad) {
+ var s = String(string);
+ if (!s || s.length >= length) return string;
+ return "" + Array(length + 1 - s.length).join(pad) + string;
+};
+
+var padZoneStr = function padZoneStr(instance) {
+ var negMinutes = -instance.utcOffset();
+ var minutes = Math.abs(negMinutes);
+ var hourOffset = Math.floor(minutes / 60);
+ var minuteOffset = minutes % 60;
+ return "" + (negMinutes <= 0 ? '+' : '-') + padStart(hourOffset, 2, '0') + ":" + padStart(minuteOffset, 2, '0');
+};
+
+var monthDiff = function monthDiff(a, b) {
+ // function from moment.js in order to keep the same result
+ if (a.date() < b.date()) return -monthDiff(b, a);
+ var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month());
+ var anchor = a.clone().add(wholeMonthDiff, C.M);
+ var c = b - anchor < 0;
+ var anchor2 = a.clone().add(wholeMonthDiff + (c ? -1 : 1), C.M);
+ return +(-(wholeMonthDiff + (b - anchor) / (c ? anchor - anchor2 : anchor2 - anchor)) || 0);
+};
+
+var absFloor = function absFloor(n) {
+ return n < 0 ? Math.ceil(n) || 0 : Math.floor(n);
+};
+
+var prettyUnit = function prettyUnit(u) {
+ var special = {
+ M: C.M,
+ y: C.Y,
+ w: C.W,
+ d: C.D,
+ D: C.DATE,
+ h: C.H,
+ m: C.MIN,
+ s: C.S,
+ ms: C.MS,
+ Q: C.Q
+ };
+ return special[u] || String(u || '').toLowerCase().replace(/s$/, '');
+};
+
+var isUndefined = function isUndefined(s) {
+ return s === undefined;
+};
+
+export default {
+ s: padStart,
+ z: padZoneStr,
+ m: monthDiff,
+ a: absFloor,
+ p: prettyUnit,
+ u: isUndefined
+};
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/npm/tinycolor2/esm/tinycolor.js b/uni_modules/tdesign-uniapp/components/npm/tinycolor2/esm/tinycolor.js
new file mode 100644
index 0000000..374f5ea
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/npm/tinycolor2/esm/tinycolor.js
@@ -0,0 +1,1180 @@
+// This file is autogenerated. It's used to publish ESM to npm.
+function _typeof(obj) {
+ "@babel/helpers - typeof";
+
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
+ return typeof obj;
+ } : function (obj) {
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ }, _typeof(obj);
+}
+
+// https://github.com/bgrins/TinyColor
+// Brian Grinstead, MIT License
+
+var trimLeft = /^\s+/;
+var trimRight = /\s+$/;
+function tinycolor(color, opts) {
+ color = color ? color : "";
+ opts = opts || {};
+
+ // If input is already a tinycolor, return itself
+ if (color instanceof tinycolor) {
+ return color;
+ }
+ // If we are called as a function, call using new instead
+ if (!(this instanceof tinycolor)) {
+ return new tinycolor(color, opts);
+ }
+ var rgb = inputToRGB(color);
+ this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;
+ this._gradientType = opts.gradientType;
+
+ // Don't let the range of [0,255] come back in [0,1].
+ // Potentially lose a little bit of precision here, but will fix issues where
+ // .5 gets interpreted as half of the total, instead of half of 1
+ // If it was supposed to be 128, this was already taken care of by `inputToRgb`
+ if (this._r < 1) this._r = Math.round(this._r);
+ if (this._g < 1) this._g = Math.round(this._g);
+ if (this._b < 1) this._b = Math.round(this._b);
+ this._ok = rgb.ok;
+}
+tinycolor.prototype = {
+ isDark: function isDark() {
+ return this.getBrightness() < 128;
+ },
+ isLight: function isLight() {
+ return !this.isDark();
+ },
+ isValid: function isValid() {
+ return this._ok;
+ },
+ getOriginalInput: function getOriginalInput() {
+ return this._originalInput;
+ },
+ getFormat: function getFormat() {
+ return this._format;
+ },
+ getAlpha: function getAlpha() {
+ return this._a;
+ },
+ getBrightness: function getBrightness() {
+ //http://www.w3.org/TR/AERT#color-contrast
+ var rgb = this.toRgb();
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
+ },
+ getLuminance: function getLuminance() {
+ //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
+ var rgb = this.toRgb();
+ var RsRGB, GsRGB, BsRGB, R, G, B;
+ RsRGB = rgb.r / 255;
+ GsRGB = rgb.g / 255;
+ BsRGB = rgb.b / 255;
+ if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
+ if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
+ if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
+ return 0.2126 * R + 0.7152 * G + 0.0722 * B;
+ },
+ setAlpha: function setAlpha(value) {
+ this._a = boundAlpha(value);
+ this._roundA = Math.round(100 * this._a) / 100;
+ return this;
+ },
+ toHsv: function toHsv() {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ return {
+ h: hsv.h * 360,
+ s: hsv.s,
+ v: hsv.v,
+ a: this._a
+ };
+ },
+ toHsvString: function toHsvString() {
+ var hsv = rgbToHsv(this._r, this._g, this._b);
+ var h = Math.round(hsv.h * 360),
+ s = Math.round(hsv.s * 100),
+ v = Math.round(hsv.v * 100);
+ return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
+ },
+ toHsl: function toHsl() {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ return {
+ h: hsl.h * 360,
+ s: hsl.s,
+ l: hsl.l,
+ a: this._a
+ };
+ },
+ toHslString: function toHslString() {
+ var hsl = rgbToHsl(this._r, this._g, this._b);
+ var h = Math.round(hsl.h * 360),
+ s = Math.round(hsl.s * 100),
+ l = Math.round(hsl.l * 100);
+ return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
+ },
+ toHex: function toHex(allow3Char) {
+ return rgbToHex(this._r, this._g, this._b, allow3Char);
+ },
+ toHexString: function toHexString(allow3Char) {
+ return "#" + this.toHex(allow3Char);
+ },
+ toHex8: function toHex8(allow4Char) {
+ return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
+ },
+ toHex8String: function toHex8String(allow4Char) {
+ return "#" + this.toHex8(allow4Char);
+ },
+ toRgb: function toRgb() {
+ return {
+ r: Math.round(this._r),
+ g: Math.round(this._g),
+ b: Math.round(this._b),
+ a: this._a
+ };
+ },
+ toRgbString: function toRgbString() {
+ return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
+ },
+ toPercentageRgb: function toPercentageRgb() {
+ return {
+ r: Math.round(bound01(this._r, 255) * 100) + "%",
+ g: Math.round(bound01(this._g, 255) * 100) + "%",
+ b: Math.round(bound01(this._b, 255) * 100) + "%",
+ a: this._a
+ };
+ },
+ toPercentageRgbString: function toPercentageRgbString() {
+ return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
+ },
+ toName: function toName() {
+ if (this._a === 0) {
+ return "transparent";
+ }
+ if (this._a < 1) {
+ return false;
+ }
+ return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
+ },
+ toFilter: function toFilter(secondColor) {
+ var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
+ var secondHex8String = hex8String;
+ var gradientType = this._gradientType ? "GradientType = 1, " : "";
+ if (secondColor) {
+ var s = tinycolor(secondColor);
+ secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
+ }
+ return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
+ },
+ toString: function toString(format) {
+ var formatSet = !!format;
+ format = format || this._format;
+ var formattedString = false;
+ var hasAlpha = this._a < 1 && this._a >= 0;
+ var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
+ if (needsAlphaFormat) {
+ // Special case for "transparent", all other non-alpha formats
+ // will return rgba when there is transparency.
+ if (format === "name" && this._a === 0) {
+ return this.toName();
+ }
+ return this.toRgbString();
+ }
+ if (format === "rgb") {
+ formattedString = this.toRgbString();
+ }
+ if (format === "prgb") {
+ formattedString = this.toPercentageRgbString();
+ }
+ if (format === "hex" || format === "hex6") {
+ formattedString = this.toHexString();
+ }
+ if (format === "hex3") {
+ formattedString = this.toHexString(true);
+ }
+ if (format === "hex4") {
+ formattedString = this.toHex8String(true);
+ }
+ if (format === "hex8") {
+ formattedString = this.toHex8String();
+ }
+ if (format === "name") {
+ formattedString = this.toName();
+ }
+ if (format === "hsl") {
+ formattedString = this.toHslString();
+ }
+ if (format === "hsv") {
+ formattedString = this.toHsvString();
+ }
+ return formattedString || this.toHexString();
+ },
+ clone: function clone() {
+ return tinycolor(this.toString());
+ },
+ _applyModification: function _applyModification(fn, args) {
+ var color = fn.apply(null, [this].concat([].slice.call(args)));
+ this._r = color._r;
+ this._g = color._g;
+ this._b = color._b;
+ this.setAlpha(color._a);
+ return this;
+ },
+ lighten: function lighten() {
+ return this._applyModification(_lighten, arguments);
+ },
+ brighten: function brighten() {
+ return this._applyModification(_brighten, arguments);
+ },
+ darken: function darken() {
+ return this._applyModification(_darken, arguments);
+ },
+ desaturate: function desaturate() {
+ return this._applyModification(_desaturate, arguments);
+ },
+ saturate: function saturate() {
+ return this._applyModification(_saturate, arguments);
+ },
+ greyscale: function greyscale() {
+ return this._applyModification(_greyscale, arguments);
+ },
+ spin: function spin() {
+ return this._applyModification(_spin, arguments);
+ },
+ _applyCombination: function _applyCombination(fn, args) {
+ return fn.apply(null, [this].concat([].slice.call(args)));
+ },
+ analogous: function analogous() {
+ return this._applyCombination(_analogous, arguments);
+ },
+ complement: function complement() {
+ return this._applyCombination(_complement, arguments);
+ },
+ monochromatic: function monochromatic() {
+ return this._applyCombination(_monochromatic, arguments);
+ },
+ splitcomplement: function splitcomplement() {
+ return this._applyCombination(_splitcomplement, arguments);
+ },
+ // Disabled until https://github.com/bgrins/TinyColor/issues/254
+ // polyad: function (number) {
+ // return this._applyCombination(polyad, [number]);
+ // },
+ triad: function triad() {
+ return this._applyCombination(polyad, [3]);
+ },
+ tetrad: function tetrad() {
+ return this._applyCombination(polyad, [4]);
+ }
+};
+
+// If input is an object, force 1 into "1.0" to handle ratios properly
+// String input requires "1.0" as input, so 1 will be treated as 1
+tinycolor.fromRatio = function (color, opts) {
+ if (_typeof(color) == "object") {
+ var newColor = {};
+ for (var i in color) {
+ if (color.hasOwnProperty(i)) {
+ if (i === "a") {
+ newColor[i] = color[i];
+ } else {
+ newColor[i] = convertToPercentage(color[i]);
+ }
+ }
+ }
+ color = newColor;
+ }
+ return tinycolor(color, opts);
+};
+
+// Given a string or object, convert that input to RGB
+// Possible string inputs:
+//
+// "red"
+// "#f00" or "f00"
+// "#ff0000" or "ff0000"
+// "#ff000000" or "ff000000"
+// "rgb 255 0 0" or "rgb (255, 0, 0)"
+// "rgb 1.0 0 0" or "rgb (1, 0, 0)"
+// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
+// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
+// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
+// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
+// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
+//
+function inputToRGB(color) {
+ var rgb = {
+ r: 0,
+ g: 0,
+ b: 0
+ };
+ var a = 1;
+ var s = null;
+ var v = null;
+ var l = null;
+ var ok = false;
+ var format = false;
+ if (typeof color == "string") {
+ color = stringInputToObject(color);
+ }
+ if (_typeof(color) == "object") {
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
+ rgb = rgbToRgb(color.r, color.g, color.b);
+ ok = true;
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
+ s = convertToPercentage(color.s);
+ v = convertToPercentage(color.v);
+ rgb = hsvToRgb(color.h, s, v);
+ ok = true;
+ format = "hsv";
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
+ s = convertToPercentage(color.s);
+ l = convertToPercentage(color.l);
+ rgb = hslToRgb(color.h, s, l);
+ ok = true;
+ format = "hsl";
+ }
+ if (color.hasOwnProperty("a")) {
+ a = color.a;
+ }
+ }
+ a = boundAlpha(a);
+ return {
+ ok: ok,
+ format: color.format || format,
+ r: Math.min(255, Math.max(rgb.r, 0)),
+ g: Math.min(255, Math.max(rgb.g, 0)),
+ b: Math.min(255, Math.max(rgb.b, 0)),
+ a: a
+ };
+}
+
+// Conversion Functions
+// --------------------
+
+// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
+//
+
+// `rgbToRgb`
+// Handle bounds / percentage checking to conform to CSS color spec
+//
+// *Assumes:* r, g, b in [0, 255] or [0, 1]
+// *Returns:* { r, g, b } in [0, 255]
+function rgbToRgb(r, g, b) {
+ return {
+ r: bound01(r, 255) * 255,
+ g: bound01(g, 255) * 255,
+ b: bound01(b, 255) * 255
+ };
+}
+
+// `rgbToHsl`
+// Converts an RGB color value to HSL.
+// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
+// *Returns:* { h, s, l } in [0,1]
+function rgbToHsl(r, g, b) {
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+ var max = Math.max(r, g, b),
+ min = Math.min(r, g, b);
+ var h,
+ s,
+ l = (max + min) / 2;
+ if (max == min) {
+ h = s = 0; // achromatic
+ } else {
+ var d = max - min;
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
+ switch (max) {
+ case r:
+ h = (g - b) / d + (g < b ? 6 : 0);
+ break;
+ case g:
+ h = (b - r) / d + 2;
+ break;
+ case b:
+ h = (r - g) / d + 4;
+ break;
+ }
+ h /= 6;
+ }
+ return {
+ h: h,
+ s: s,
+ l: l
+ };
+}
+
+// `hslToRgb`
+// Converts an HSL color value to RGB.
+// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
+// *Returns:* { r, g, b } in the set [0, 255]
+function hslToRgb(h, s, l) {
+ var r, g, b;
+ h = bound01(h, 360);
+ s = bound01(s, 100);
+ l = bound01(l, 100);
+ function hue2rgb(p, q, t) {
+ if (t < 0) t += 1;
+ if (t > 1) t -= 1;
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
+ if (t < 1 / 2) return q;
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+ return p;
+ }
+ if (s === 0) {
+ r = g = b = l; // achromatic
+ } else {
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+ var p = 2 * l - q;
+ r = hue2rgb(p, q, h + 1 / 3);
+ g = hue2rgb(p, q, h);
+ b = hue2rgb(p, q, h - 1 / 3);
+ }
+ return {
+ r: r * 255,
+ g: g * 255,
+ b: b * 255
+ };
+}
+
+// `rgbToHsv`
+// Converts an RGB color value to HSV
+// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
+// *Returns:* { h, s, v } in [0,1]
+function rgbToHsv(r, g, b) {
+ r = bound01(r, 255);
+ g = bound01(g, 255);
+ b = bound01(b, 255);
+ var max = Math.max(r, g, b),
+ min = Math.min(r, g, b);
+ var h,
+ s,
+ v = max;
+ var d = max - min;
+ s = max === 0 ? 0 : d / max;
+ if (max == min) {
+ h = 0; // achromatic
+ } else {
+ switch (max) {
+ case r:
+ h = (g - b) / d + (g < b ? 6 : 0);
+ break;
+ case g:
+ h = (b - r) / d + 2;
+ break;
+ case b:
+ h = (r - g) / d + 4;
+ break;
+ }
+ h /= 6;
+ }
+ return {
+ h: h,
+ s: s,
+ v: v
+ };
+}
+
+// `hsvToRgb`
+// Converts an HSV color value to RGB.
+// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
+// *Returns:* { r, g, b } in the set [0, 255]
+function hsvToRgb(h, s, v) {
+ h = bound01(h, 360) * 6;
+ s = bound01(s, 100);
+ v = bound01(v, 100);
+ var i = Math.floor(h),
+ f = h - i,
+ p = v * (1 - s),
+ q = v * (1 - f * s),
+ t = v * (1 - (1 - f) * s),
+ mod = i % 6,
+ r = [v, q, p, p, t, v][mod],
+ g = [t, v, v, q, p, p][mod],
+ b = [p, p, t, v, v, q][mod];
+ return {
+ r: r * 255,
+ g: g * 255,
+ b: b * 255
+ };
+}
+
+// `rgbToHex`
+// Converts an RGB color to hex
+// Assumes r, g, and b are contained in the set [0, 255]
+// Returns a 3 or 6 character hex
+function rgbToHex(r, g, b, allow3Char) {
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
+
+ // Return a 3 character hex if possible
+ if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
+ }
+ return hex.join("");
+}
+
+// `rgbaToHex`
+// Converts an RGBA color plus alpha transparency to hex
+// Assumes r, g, b are contained in the set [0, 255] and
+// a in [0, 1]. Returns a 4 or 8 character rgba hex
+function rgbaToHex(r, g, b, a, allow4Char) {
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
+
+ // Return a 4 character hex if possible
+ if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
+ }
+ return hex.join("");
+}
+
+// `rgbaToArgbHex`
+// Converts an RGBA color to an ARGB Hex8 string
+// Rarely used, but required for "toFilter()"
+function rgbaToArgbHex(r, g, b, a) {
+ var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
+ return hex.join("");
+}
+
+// `equals`
+// Can be called with any tinycolor input
+tinycolor.equals = function (color1, color2) {
+ if (!color1 || !color2) return false;
+ return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
+};
+tinycolor.random = function () {
+ return tinycolor.fromRatio({
+ r: Math.random(),
+ g: Math.random(),
+ b: Math.random()
+ });
+};
+
+// Modification Functions
+// ----------------------
+// Thanks to less.js for some of the basics here
+//
+
+function _desaturate(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.s -= amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+}
+function _saturate(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.s += amount / 100;
+ hsl.s = clamp01(hsl.s);
+ return tinycolor(hsl);
+}
+function _greyscale(color) {
+ return tinycolor(color).desaturate(100);
+}
+function _lighten(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.l += amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+}
+function _brighten(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var rgb = tinycolor(color).toRgb();
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
+ return tinycolor(rgb);
+}
+function _darken(color, amount) {
+ amount = amount === 0 ? 0 : amount || 10;
+ var hsl = tinycolor(color).toHsl();
+ hsl.l -= amount / 100;
+ hsl.l = clamp01(hsl.l);
+ return tinycolor(hsl);
+}
+
+// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
+// Values outside of this range will be wrapped into this range.
+function _spin(color, amount) {
+ var hsl = tinycolor(color).toHsl();
+ var hue = (hsl.h + amount) % 360;
+ hsl.h = hue < 0 ? 360 + hue : hue;
+ return tinycolor(hsl);
+}
+
+// Combination Functions
+// ---------------------
+// Thanks to jQuery xColor for some of the ideas behind these
+//
+
+function _complement(color) {
+ var hsl = tinycolor(color).toHsl();
+ hsl.h = (hsl.h + 180) % 360;
+ return tinycolor(hsl);
+}
+function polyad(color, number) {
+ if (isNaN(number) || number <= 0) {
+ throw new Error("Argument to polyad must be a positive number");
+ }
+ var hsl = tinycolor(color).toHsl();
+ var result = [tinycolor(color)];
+ var step = 360 / number;
+ for (var i = 1; i < number; i++) {
+ result.push(tinycolor({
+ h: (hsl.h + i * step) % 360,
+ s: hsl.s,
+ l: hsl.l
+ }));
+ }
+ return result;
+}
+function _splitcomplement(color) {
+ var hsl = tinycolor(color).toHsl();
+ var h = hsl.h;
+ return [tinycolor(color), tinycolor({
+ h: (h + 72) % 360,
+ s: hsl.s,
+ l: hsl.l
+ }), tinycolor({
+ h: (h + 216) % 360,
+ s: hsl.s,
+ l: hsl.l
+ })];
+}
+function _analogous(color, results, slices) {
+ results = results || 6;
+ slices = slices || 30;
+ var hsl = tinycolor(color).toHsl();
+ var part = 360 / slices;
+ var ret = [tinycolor(color)];
+ for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
+ hsl.h = (hsl.h + part) % 360;
+ ret.push(tinycolor(hsl));
+ }
+ return ret;
+}
+function _monochromatic(color, results) {
+ results = results || 6;
+ var hsv = tinycolor(color).toHsv();
+ var h = hsv.h,
+ s = hsv.s,
+ v = hsv.v;
+ var ret = [];
+ var modification = 1 / results;
+ while (results--) {
+ ret.push(tinycolor({
+ h: h,
+ s: s,
+ v: v
+ }));
+ v = (v + modification) % 1;
+ }
+ return ret;
+}
+
+// Utility Functions
+// ---------------------
+
+tinycolor.mix = function (color1, color2, amount) {
+ amount = amount === 0 ? 0 : amount || 50;
+ var rgb1 = tinycolor(color1).toRgb();
+ var rgb2 = tinycolor(color2).toRgb();
+ var p = amount / 100;
+ var rgba = {
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
+ a: (rgb2.a - rgb1.a) * p + rgb1.a
+ };
+ return tinycolor(rgba);
+};
+
+// Readability Functions
+// ---------------------
+// false
+// tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
+tinycolor.isReadable = function (color1, color2, wcag2) {
+ var readability = tinycolor.readability(color1, color2);
+ var wcag2Parms, out;
+ out = false;
+ wcag2Parms = validateWCAG2Parms(wcag2);
+ switch (wcag2Parms.level + wcag2Parms.size) {
+ case "AAsmall":
+ case "AAAlarge":
+ out = readability >= 4.5;
+ break;
+ case "AAlarge":
+ out = readability >= 3;
+ break;
+ case "AAAsmall":
+ out = readability >= 7;
+ break;
+ }
+ return out;
+};
+
+// `mostReadable`
+// Given a base color and a list of possible foreground or background
+// colors for that base, returns the most readable color.
+// Optionally returns Black or White if the most readable color is unreadable.
+// *Example*
+// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
+// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
+// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
+// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
+tinycolor.mostReadable = function (baseColor, colorList, args) {
+ var bestColor = null;
+ var bestScore = 0;
+ var readability;
+ var includeFallbackColors, level, size;
+ args = args || {};
+ includeFallbackColors = args.includeFallbackColors;
+ level = args.level;
+ size = args.size;
+ for (var i = 0; i < colorList.length; i++) {
+ readability = tinycolor.readability(baseColor, colorList[i]);
+ if (readability > bestScore) {
+ bestScore = readability;
+ bestColor = tinycolor(colorList[i]);
+ }
+ }
+ if (tinycolor.isReadable(baseColor, bestColor, {
+ level: level,
+ size: size
+ }) || !includeFallbackColors) {
+ return bestColor;
+ } else {
+ args.includeFallbackColors = false;
+ return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
+ }
+};
+
+// Big List of Colors
+// ------------------
+//
+var names = tinycolor.names = {
+ aliceblue: "f0f8ff",
+ antiquewhite: "faebd7",
+ aqua: "0ff",
+ aquamarine: "7fffd4",
+ azure: "f0ffff",
+ beige: "f5f5dc",
+ bisque: "ffe4c4",
+ black: "000",
+ blanchedalmond: "ffebcd",
+ blue: "00f",
+ blueviolet: "8a2be2",
+ brown: "a52a2a",
+ burlywood: "deb887",
+ burntsienna: "ea7e5d",
+ cadetblue: "5f9ea0",
+ chartreuse: "7fff00",
+ chocolate: "d2691e",
+ coral: "ff7f50",
+ cornflowerblue: "6495ed",
+ cornsilk: "fff8dc",
+ crimson: "dc143c",
+ cyan: "0ff",
+ darkblue: "00008b",
+ darkcyan: "008b8b",
+ darkgoldenrod: "b8860b",
+ darkgray: "a9a9a9",
+ darkgreen: "006400",
+ darkgrey: "a9a9a9",
+ darkkhaki: "bdb76b",
+ darkmagenta: "8b008b",
+ darkolivegreen: "556b2f",
+ darkorange: "ff8c00",
+ darkorchid: "9932cc",
+ darkred: "8b0000",
+ darksalmon: "e9967a",
+ darkseagreen: "8fbc8f",
+ darkslateblue: "483d8b",
+ darkslategray: "2f4f4f",
+ darkslategrey: "2f4f4f",
+ darkturquoise: "00ced1",
+ darkviolet: "9400d3",
+ deeppink: "ff1493",
+ deepskyblue: "00bfff",
+ dimgray: "696969",
+ dimgrey: "696969",
+ dodgerblue: "1e90ff",
+ firebrick: "b22222",
+ floralwhite: "fffaf0",
+ forestgreen: "228b22",
+ fuchsia: "f0f",
+ gainsboro: "dcdcdc",
+ ghostwhite: "f8f8ff",
+ gold: "ffd700",
+ goldenrod: "daa520",
+ gray: "808080",
+ green: "008000",
+ greenyellow: "adff2f",
+ grey: "808080",
+ honeydew: "f0fff0",
+ hotpink: "ff69b4",
+ indianred: "cd5c5c",
+ indigo: "4b0082",
+ ivory: "fffff0",
+ khaki: "f0e68c",
+ lavender: "e6e6fa",
+ lavenderblush: "fff0f5",
+ lawngreen: "7cfc00",
+ lemonchiffon: "fffacd",
+ lightblue: "add8e6",
+ lightcoral: "f08080",
+ lightcyan: "e0ffff",
+ lightgoldenrodyellow: "fafad2",
+ lightgray: "d3d3d3",
+ lightgreen: "90ee90",
+ lightgrey: "d3d3d3",
+ lightpink: "ffb6c1",
+ lightsalmon: "ffa07a",
+ lightseagreen: "20b2aa",
+ lightskyblue: "87cefa",
+ lightslategray: "789",
+ lightslategrey: "789",
+ lightsteelblue: "b0c4de",
+ lightyellow: "ffffe0",
+ lime: "0f0",
+ limegreen: "32cd32",
+ linen: "faf0e6",
+ magenta: "f0f",
+ maroon: "800000",
+ mediumaquamarine: "66cdaa",
+ mediumblue: "0000cd",
+ mediumorchid: "ba55d3",
+ mediumpurple: "9370db",
+ mediumseagreen: "3cb371",
+ mediumslateblue: "7b68ee",
+ mediumspringgreen: "00fa9a",
+ mediumturquoise: "48d1cc",
+ mediumvioletred: "c71585",
+ midnightblue: "191970",
+ mintcream: "f5fffa",
+ mistyrose: "ffe4e1",
+ moccasin: "ffe4b5",
+ navajowhite: "ffdead",
+ navy: "000080",
+ oldlace: "fdf5e6",
+ olive: "808000",
+ olivedrab: "6b8e23",
+ orange: "ffa500",
+ orangered: "ff4500",
+ orchid: "da70d6",
+ palegoldenrod: "eee8aa",
+ palegreen: "98fb98",
+ paleturquoise: "afeeee",
+ palevioletred: "db7093",
+ papayawhip: "ffefd5",
+ peachpuff: "ffdab9",
+ peru: "cd853f",
+ pink: "ffc0cb",
+ plum: "dda0dd",
+ powderblue: "b0e0e6",
+ purple: "800080",
+ rebeccapurple: "663399",
+ red: "f00",
+ rosybrown: "bc8f8f",
+ royalblue: "4169e1",
+ saddlebrown: "8b4513",
+ salmon: "fa8072",
+ sandybrown: "f4a460",
+ seagreen: "2e8b57",
+ seashell: "fff5ee",
+ sienna: "a0522d",
+ silver: "c0c0c0",
+ skyblue: "87ceeb",
+ slateblue: "6a5acd",
+ slategray: "708090",
+ slategrey: "708090",
+ snow: "fffafa",
+ springgreen: "00ff7f",
+ steelblue: "4682b4",
+ tan: "d2b48c",
+ teal: "008080",
+ thistle: "d8bfd8",
+ tomato: "ff6347",
+ turquoise: "40e0d0",
+ violet: "ee82ee",
+ wheat: "f5deb3",
+ white: "fff",
+ whitesmoke: "f5f5f5",
+ yellow: "ff0",
+ yellowgreen: "9acd32"
+};
+
+// Make it easy to access colors via `hexNames[hex]`
+var hexNames = tinycolor.hexNames = flip(names);
+
+// Utilities
+// ---------
+
+// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
+function flip(o) {
+ var flipped = {};
+ for (var i in o) {
+ if (o.hasOwnProperty(i)) {
+ flipped[o[i]] = i;
+ }
+ }
+ return flipped;
+}
+
+// Return a valid alpha value [0,1] with all invalid values being set to 1
+function boundAlpha(a) {
+ a = parseFloat(a);
+ if (isNaN(a) || a < 0 || a > 1) {
+ a = 1;
+ }
+ return a;
+}
+
+// Take input from [0, n] and return it as [0, 1]
+function bound01(n, max) {
+ if (isOnePointZero(n)) n = "100%";
+ var processPercent = isPercentage(n);
+ n = Math.min(max, Math.max(0, parseFloat(n)));
+
+ // Automatically convert percentage into number
+ if (processPercent) {
+ n = parseInt(n * max, 10) / 100;
+ }
+
+ // Handle floating point rounding errors
+ if (Math.abs(n - max) < 0.000001) {
+ return 1;
+ }
+
+ // Convert into [0, 1] range if it isn't already
+ return n % max / parseFloat(max);
+}
+
+// Force a number between 0 and 1
+function clamp01(val) {
+ return Math.min(1, Math.max(0, val));
+}
+
+// Parse a base-16 hex value into a base-10 integer
+function parseIntFromHex(val) {
+ return parseInt(val, 16);
+}
+
+// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
+//
+function isOnePointZero(n) {
+ return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
+}
+
+// Check to see if string passed in is a percentage
+function isPercentage(n) {
+ return typeof n === "string" && n.indexOf("%") != -1;
+}
+
+// Force a hex value to have 2 characters
+function pad2(c) {
+ return c.length == 1 ? "0" + c : "" + c;
+}
+
+// Replace a decimal with it's percentage value
+function convertToPercentage(n) {
+ if (n <= 1) {
+ n = n * 100 + "%";
+ }
+ return n;
+}
+
+// Converts a decimal to a hex value
+function convertDecimalToHex(d) {
+ return Math.round(parseFloat(d) * 255).toString(16);
+}
+// Converts a hex value to a decimal
+function convertHexToDecimal(h) {
+ return parseIntFromHex(h) / 255;
+}
+var matchers = function () {
+ //
+ var CSS_INTEGER = "[-\\+]?\\d+%?";
+
+ //
+ var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
+
+ // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
+
+ // Actual matching.
+ // Parentheses and commas are optional, but not required.
+ // Whitespace can take the place of commas or opening paren
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
+ return {
+ CSS_UNIT: new RegExp(CSS_UNIT),
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
+ };
+}();
+
+// `isValidCSSUnit`
+// Take in a single string / number and check to see if it looks like a CSS unit
+// (see `matchers` above for definition).
+function isValidCSSUnit(color) {
+ return !!matchers.CSS_UNIT.exec(color);
+}
+
+// `stringInputToObject`
+// Permissive string parsing. Take in a number of formats, and output an object
+// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
+function stringInputToObject(color) {
+ color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
+ var named = false;
+ if (names[color]) {
+ color = names[color];
+ named = true;
+ } else if (color == "transparent") {
+ return {
+ r: 0,
+ g: 0,
+ b: 0,
+ a: 0,
+ format: "name"
+ };
+ }
+
+ // Try to match string input using regular expressions.
+ // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
+ // Just return an object and let the conversion functions handle that.
+ // This way the result will be the same whether the tinycolor is initialized with string or object.
+ var match;
+ if (match = matchers.rgb.exec(color)) {
+ return {
+ r: match[1],
+ g: match[2],
+ b: match[3]
+ };
+ }
+ if (match = matchers.rgba.exec(color)) {
+ return {
+ r: match[1],
+ g: match[2],
+ b: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hsl.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ l: match[3]
+ };
+ }
+ if (match = matchers.hsla.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ l: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hsv.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ v: match[3]
+ };
+ }
+ if (match = matchers.hsva.exec(color)) {
+ return {
+ h: match[1],
+ s: match[2],
+ v: match[3],
+ a: match[4]
+ };
+ }
+ if (match = matchers.hex8.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ a: convertHexToDecimal(match[4]),
+ format: named ? "name" : "hex8"
+ };
+ }
+ if (match = matchers.hex6.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1]),
+ g: parseIntFromHex(match[2]),
+ b: parseIntFromHex(match[3]),
+ format: named ? "name" : "hex"
+ };
+ }
+ if (match = matchers.hex4.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1] + "" + match[1]),
+ g: parseIntFromHex(match[2] + "" + match[2]),
+ b: parseIntFromHex(match[3] + "" + match[3]),
+ a: convertHexToDecimal(match[4] + "" + match[4]),
+ format: named ? "name" : "hex8"
+ };
+ }
+ if (match = matchers.hex3.exec(color)) {
+ return {
+ r: parseIntFromHex(match[1] + "" + match[1]),
+ g: parseIntFromHex(match[2] + "" + match[2]),
+ b: parseIntFromHex(match[3] + "" + match[3]),
+ format: named ? "name" : "hex"
+ };
+ }
+ return false;
+}
+function validateWCAG2Parms(parms) {
+ // return valid WCAG2 parms for isReadable.
+ // If input parms are invalid, return {"level":"AA", "size":"small"}
+ var level, size;
+ parms = parms || {
+ level: "AA",
+ size: "small"
+ };
+ level = (parms.level || "AA").toUpperCase();
+ size = (parms.size || "small").toLowerCase();
+ if (level !== "AA" && level !== "AAA") {
+ level = "AA";
+ }
+ if (size !== "small" && size !== "large") {
+ size = "small";
+ }
+ return {
+ level: level,
+ size: size
+ };
+}
+
+export { tinycolor as default };
diff --git a/uni_modules/tdesign-uniapp/components/overlay/README.en-US.md b/uni_modules/tdesign-uniapp/components/overlay/README.en-US.md
new file mode 100644
index 0000000..65d5b5a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/overlay/README.en-US.md
@@ -0,0 +1,34 @@
+
+## API
+
+### Overlay Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+background-color | String | - | \- | N
+duration | Number | 300 | \- | N
+prevent-scroll-through | Boolean | true | \- | N
+using-custom-navbar | Boolean | false | \- | N
+visible | Boolean | false | \- | N
+z-index | Number | 11000 | \- | N
+
+### Overlay Events
+
+name | params | description
+-- | -- | --
+click | `(context: { visible: boolean })` | \-
+
+### Overlay Slots
+
+name | Description
+-- | --
+\- | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-overlay-bg-color | @mask-active | -
+--td-overlay-transition-duration | 300ms | -
diff --git a/uni_modules/tdesign-uniapp/components/overlay/README.md b/uni_modules/tdesign-uniapp/components/overlay/README.md
new file mode 100644
index 0000000..78fd840
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/overlay/README.md
@@ -0,0 +1,54 @@
+---
+title: Overlay 遮罩层
+description: 通过遮罩层,可以强调部分内容
+spline: message
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TOverlay from '@tdesign/uniapp/overlay/overlay.vue';
+```
+
+### 基础使用
+
+{{ base }}
+
+## API
+
+### Overlay Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+background-color | String | - | 遮罩层的背景色 | N
+duration | Number | 300 | 背景色过渡时间,单位毫秒 | N
+prevent-scroll-through | Boolean | true | 防止滚动穿透,即不允许点击和滚动 | N
+using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
+visible | Boolean | false | 是否展示 | N
+z-index | Number | 11000 | 遮罩层级 | N
+
+### Overlay Events
+
+名称 | 参数 | 描述
+-- | -- | --
+click | `(context: { visible: boolean })` | 点击遮罩时触发
+
+### Overlay Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-overlay-bg-color | @mask-active | -
+--td-overlay-transition-duration | 300ms | -
diff --git a/uni_modules/tdesign-uniapp/components/overlay/overlay.css b/uni_modules/tdesign-uniapp/components/overlay/overlay.css
new file mode 100644
index 0000000..74553b6
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/overlay/overlay.css
@@ -0,0 +1,17 @@
+.t-overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ bottom: 0;
+ background-color: var(--td-overlay-bg-color, var(--td-mask-active, rgba(0, 0, 0, 0.6)));
+ transition-property: opacity;
+ transition-duration: var(--td-overlay-transition-duration, 300ms);
+ transition-timing-function: ease;
+}
+.t-fade-enter {
+ opacity: 0;
+}
+.t-fade-leave-to {
+ opacity: 0;
+}
diff --git a/uni_modules/tdesign-uniapp/components/overlay/overlay.vue b/uni_modules/tdesign-uniapp/components/overlay/overlay.vue
new file mode 100644
index 0000000..bf85b6b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/overlay/overlay.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/overlay/props.ts b/uni_modules/tdesign-uniapp/components/overlay/props.ts
new file mode 100644
index 0000000..d09edd5
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/overlay/props.ts
@@ -0,0 +1,37 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export default {
+ /** 遮罩层的背景色 */
+ backgroundColor: {
+ type: String,
+ default: '',
+ },
+ /** 背景色过渡时间,单位毫秒 */
+ duration: {
+ type: Number,
+ default: 300,
+ },
+ /** 防止滚动穿透,即不允许点击和滚动 */
+ preventScrollThrough: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否使用了自定义导航栏 */
+ usingCustomNavbar: Boolean,
+ /** 是否展示 */
+ visible: Boolean,
+ /** 遮罩层级 */
+ zIndex: {
+ type: Number,
+ default: 11000,
+ },
+ /** 点击遮罩时触发 */
+ onClick: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/overlay/type.ts b/uni_modules/tdesign-uniapp/components/overlay/type.ts
new file mode 100644
index 0000000..b765ecc
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/overlay/type.ts
@@ -0,0 +1,42 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdOverlayProps {
+ /**
+ * 遮罩层的背景色
+ * @default ''
+ */
+ backgroundColor?: string;
+ /**
+ * 背景色过渡时间,单位毫秒
+ * @default 300
+ */
+ duration?: number;
+ /**
+ * 防止滚动穿透,即不允许点击和滚动
+ * @default true
+ */
+ preventScrollThrough?: boolean;
+ /**
+ * 是否使用了自定义导航栏
+ * @default false
+ */
+ usingCustomNavbar?: boolean;
+ /**
+ * 是否展示
+ * @default false
+ */
+ visible?: boolean;
+ /**
+ * 遮罩层级
+ * @default 11000
+ */
+ zIndex?: number;
+ /**
+ * 点击遮罩时触发
+ */
+ onClick?: (context: { visible: boolean }) => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/picker-item/README.en-US.md b/uni_modules/tdesign-uniapp/components/picker-item/README.en-US.md
new file mode 100644
index 0000000..00a267c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/picker-item/README.en-US.md
@@ -0,0 +1,25 @@
+:: BASE_DOC ::
+
+## API
+
+### PickerItem Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+format | Function | - | Typescript:`(option: PickerItemOption, columnIndex: number) => PickerItemOption` | N
+options | Array | [] | Typescript:`PickerItemOption[]` `interface PickerItemOption { label: string; value: string \| number; icon?: string }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/picker/type.ts) | N
+
+### PickerItem Slots
+
+name | Description
+-- | --
+label-suffix--[index] | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-picker-item-active-color | @text-color-primary | -
+--td-picker-item-color | @text-color-secondary | -
+--td-picker-item-font-size | @font-size-m | -
diff --git a/uni_modules/tdesign-uniapp/components/picker-item/README.md b/uni_modules/tdesign-uniapp/components/picker-item/README.md
new file mode 100644
index 0000000..bd7a8c2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/picker-item/README.md
@@ -0,0 +1,25 @@
+:: BASE_DOC ::
+
+## API
+
+### PickerItem Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+format | Function | - | 格式化标签。TS 类型:`(option: PickerItemOption, columnIndex: number) => PickerItemOption` | N
+options | Array | [] | 数据源。TS 类型:`PickerItemOption[]` `interface PickerItemOption { label: string; value: string \| number; icon?: string }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/picker/type.ts) | N
+
+### PickerItem Slots
+
+名称 | 描述
+-- | --
+label-suffix--[index] | 列表子项后置插槽,用于自定义标签文本之后的内容。
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-picker-item-active-color | @text-color-primary | -
+--td-picker-item-color | @text-color-secondary | -
+--td-picker-item-font-size | @font-size-m | -
diff --git a/uni_modules/tdesign-uniapp/components/picker-item/picker-item.css b/uni_modules/tdesign-uniapp/components/picker-item/picker-item.css
new file mode 100644
index 0000000..04238e8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/picker-item/picker-item.css
@@ -0,0 +1,32 @@
+:host {
+ display: flex;
+}
+.t-picker-item__group {
+ overflow: hidden;
+ flex: 1;
+ z-index: 1;
+}
+.t-picker-item__wrapper {
+ will-change: transform;
+}
+.t-picker-item__item {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ color: var(--td-picker-item-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
+ font-size: var(--td-picker-item-font-size, var(--td-font-size-m, 32rpx));
+ contain: layout style paint;
+}
+.t-picker-item__item-icon {
+ font-size: 36rpx;
+ margin-right: var(--td-spacer, 16rpx);
+}
+.t-picker-item__item-label {
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+}
+.t-picker-item__item--active {
+ color: var(--td-picker-item-active-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font-weight: 600;
+}
diff --git a/uni_modules/tdesign-uniapp/components/picker-item/picker-item.vue b/uni_modules/tdesign-uniapp/components/picker-item/picker-item.vue
new file mode 100644
index 0000000..cf97ccf
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/picker-item/picker-item.vue
@@ -0,0 +1,446 @@
+
+
+
+
+
+
+
+
+
+
+ {{ option[keys.label] }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ option[keys.label] }}
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/picker-item/props.ts b/uni_modules/tdesign-uniapp/components/picker-item/props.ts
new file mode 100644
index 0000000..88771a7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/picker-item/props.ts
@@ -0,0 +1,18 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdPickerItemProps } from './type';
+export default {
+ /** 格式化标签 */
+ format: {
+ type: Function,
+ },
+ /** 数据源 */
+ options: {
+ type: Array,
+ default: (): TdPickerItemProps['options'] => [],
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/picker-item/type.ts b/uni_modules/tdesign-uniapp/components/picker-item/type.ts
new file mode 100644
index 0000000..db85074
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/picker-item/type.ts
@@ -0,0 +1,23 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdPickerItemProps {
+ /**
+ * 格式化标签
+ */
+ format?: (option: PickerItemOption, columnIndex: number) => PickerItemOption;
+ /**
+ * 数据源
+ * @default []
+ */
+ options?: PickerItemOption[];
+}
+
+export interface PickerItemOption {
+ label: string;
+ value: string | number;
+ icon?: string;
+}
diff --git a/uni_modules/tdesign-uniapp/components/picker/README.en-US.md b/uni_modules/tdesign-uniapp/components/picker/README.en-US.md
new file mode 100644
index 0000000..b60f63a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/picker/README.en-US.md
@@ -0,0 +1,77 @@
+:: BASE_DOC ::
+
+## API
+
+### Picker Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+auto-close | Boolean | true | \- | N
+cancel-btn | String / Boolean | true | Typescript: `boolean \| string` | N
+confirm-btn | String / Boolean | true | Typescript: `boolean \| string` | N
+header | Boolean | true | \- | N
+item-height | Number | 40 | \- | N
+keys | Object | - | Typescript: `KeysType`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/common/common.ts) | N
+popup-props | Object | {} | popup properties。Typescript: `PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/picker/type.ts) | N
+title | String | '' | \- | N
+use-popup | Boolean | true | \- | N
+using-custom-navbar | Boolean | false | \- | N
+value | Array | - | `v-model:value` is supported。Typescript: `Array` `type PickerValue = string \| number`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/picker/type.ts) | N
+default-value | Array | - | uncontrolled property。Typescript: `Array` `type PickerValue = string \| number`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/picker/type.ts) | N
+visible | Boolean | false | \- | N
+visible-item-count | Number | 5 | \- | N
+
+### Picker Events
+
+name | params | description
+-- | -- | --
+cancel | \- | \-
+change | `(context: { value: Array, label: string, columns: Array<{ column: number; index: number; disabled?: boolean; }> } )` | \-
+close | `(context: { trigger: TriggerSource })` | [see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/picker/type.ts)。
`type TriggerSource = 'overlay' \| 'cancel-btn' \| 'confirm-btn'`
+confirm | `(context: { value: Array, label: string, columns: Array<{ column: number; index: number; disabled?: boolean; }> } )` | \-
+pick | `(context: { value: Array, label: string, column: number, index: number })` | \-
+
+### Picker Slots
+
+name | Description
+-- | --
+\- | \-
+content | \-
+footer | \-
+header | \-
+
+
+### PickerItem Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+format | Function | - | Typescript: `(option: PickerItemOption, columnIndex: number) => PickerItemOption` | N
+options | Array | [] | Typescript: `PickerItemOption[]` `interface PickerItemOption { label: string; value: string \| number; icon?: string }`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/picker-item/type.ts) | N
+
+### PickerItem Slots
+
+name | Description
+-- | --
+label-suffix-index | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-picker-bg-color | @bg-color-container | -
+--td-picker-border-radius | 24rpx | -
+--td-picker-button-font | @font-body-large | -
+--td-picker-cancel-color | @text-color-secondary | -
+--td-picker-confirm-color | @brand-color | -
+--td-picker-indicator-bg-color | @bg-color-secondarycontainer | -
+--td-picker-indicator-border-radius | 12rpx | -
+--td-picker-title-color | @text-color-primary | -
+--td-picker-title-font | @font-title-large | -
+--td-picker-toolbar-height | 116rpx | -
+--td-picker-transparent-color | --td-picker-transparent-color | -
+--td-picker-item-active-color | @text-color-primary | -
+--td-picker-item-color | @text-color-secondary | -
+--td-picker-item-font-size | @font-size-m | -
diff --git a/uni_modules/tdesign-uniapp/components/picker/README.md b/uni_modules/tdesign-uniapp/components/picker/README.md
new file mode 100644
index 0000000..44f28de
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/picker/README.md
@@ -0,0 +1,112 @@
+---
+title: Picker 选择器
+description: 用于一组预设数据中的选择。
+spline: form
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TPicker from '@tdesign/uniapp/picker/picker.vue';
+import TPickerItem from '@tdesign/uniapp/picker-item/picker-item.vue';
+```
+
+### 组件类型
+
+#### 基础选择器
+
+单项和多选选择
+
+{{ base }}
+
+#### 地区选择器
+
+支持省市区切换,支持数据联动
+
+{{ area }}
+
+### 组件样式
+
+是否带标题
+
+{{ with-title }}
+
+## API
+
+### Picker Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+auto-close | Boolean | true | 自动关闭;在确认、取消、点击遮罩层自动关闭,不需要手动设置 visible | N
+cancel-btn | String / Boolean | true | 取消按钮文字。TS 类型:`boolean \| string` | N
+confirm-btn | String / Boolean | true | 确定按钮文字。TS 类型:`boolean \| string` | N
+header | Boolean | true | 头部内容。值为 true 显示空白头部,值为 false 不显示任何内容 | N
+item-height | Number | 40 | PickerItem 的子项高度,单位 `px` | N
+keys | Object | - | 用来定义 value / label / icon 在 `options` 中对应的字段别名。TS 类型:`KeysType`。[通用类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/common/common.ts) | N
+popup-props | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/picker/type.ts) | N
+title | String | '' | 标题 | N
+use-popup | Boolean | true | 是否使用弹出层包裹 | N
+using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
+value | Array | - | 选中值。支持语法糖 `v-model:value`。TS 类型:`Array` `type PickerValue = string \| number`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/picker/type.ts) | N
+default-value | Array | - | 选中值。非受控属性。TS 类型:`Array` `type PickerValue = string \| number`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/picker/type.ts) | N
+visible | Boolean | false | 是否显示。支持语法糖 `v-model:visible` | N
+visible-item-count | Number | 5 | 可视区域 PickerItem 的子项个数 | N
+
+### Picker Events
+
+名称 | 参数 | 描述
+-- | -- | --
+cancel | \- | 点击取消按钮时触发
+change | `(context: { value: Array, label: string, columns: Array<{ column: number; index: number; disabled?: boolean; }> } )` | 选中变化时候触发,即确认变化时触发
+close | `(context: { trigger: TriggerSource })` | 关闭时触发。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/picker/type.ts)。
`type TriggerSource = 'overlay' \| 'cancel-btn' \| 'confirm-btn'`
+confirm | `(context: { value: Array, label: string, columns: Array<{ column: number; index: number; disabled?: boolean; }> } )` | 点击确认按钮时触发
+pick | `(context: { value: Array, label: string, column: number, index: number })` | 任何一列选中都会触发,不同的列参数不同。`column` 表示第几列变化,`index` 表示变化那一列的选中项下标
+
+### Picker Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容
+content | 中间内容,介于头部跟内容之间
+footer | 底部内容
+header | 自定义 `header` 显示内容
+
+
+### PickerItem Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+format | Function | - | 格式化标签。TS 类型:`(option: PickerItemOption, columnIndex: number) => PickerItemOption` | N
+options | Array | [] | 数据源。TS 类型:`PickerItemOption[]` `interface PickerItemOption { label: string; value: string \| number; icon?: string }`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/picker-item/type.ts) | N
+
+### PickerItem Slots
+
+名称 | 描述
+-- | --
+label-suffix-index | 列表子项后置插槽,用于自定义标签文本之后的内容。
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-picker-bg-color | @bg-color-container | -
+--td-picker-border-radius | 24rpx | -
+--td-picker-button-font | @font-body-large | -
+--td-picker-cancel-color | @text-color-secondary | -
+--td-picker-confirm-color | @brand-color | -
+--td-picker-indicator-bg-color | @bg-color-secondarycontainer | -
+--td-picker-indicator-border-radius | 12rpx | -
+--td-picker-title-color | @text-color-primary | -
+--td-picker-title-font | @font-title-large | -
+--td-picker-toolbar-height | 116rpx | -
+--td-picker-transparent-color | --td-picker-transparent-color | -
+--td-picker-item-active-color | @text-color-primary | -
+--td-picker-item-color | @text-color-secondary | -
+--td-picker-item-font-size | @font-size-m | -
diff --git a/uni_modules/tdesign-uniapp/components/picker/picker.css b/uni_modules/tdesign-uniapp/components/picker/picker.css
new file mode 100644
index 0000000..4dc28bb
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/picker/picker.css
@@ -0,0 +1,71 @@
+.t-picker {
+ position: relative;
+ background-color: var(--td-picker-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ border-top-left-radius: var(--td-picker-border-radius, 24rpx);
+ border-top-right-radius: var(--td-picker-border-radius, 24rpx);
+}
+.t-picker__toolbar {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ overflow: hidden;
+ height: var(--td-picker-toolbar-height, 116rpx);
+}
+.t-picker__title {
+ flex: 1;
+ text-align: center;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ color: var(--td-picker-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font: var(--td-picker-title-font, var(--td-font-title-large, 600 36rpx / 52rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-picker__cancel,
+.t-picker__confirm {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ user-select: none;
+ font: var(--td-picker-button-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ height: 100%;
+ padding: 0 32rpx;
+}
+.t-picker__cancel {
+ color: var(--td-picker-cancel-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
+}
+.t-picker__confirm {
+ color: var(--td-picker-confirm-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-picker__main {
+ position: relative;
+ display: flex;
+ justify-content: center;
+ padding-left: 64rpx;
+ padding-right: 64rpx;
+}
+.t-picker__mask {
+ position: absolute;
+ left: 0;
+ right: 0;
+ z-index: 3;
+ backface-visibility: hidden;
+ pointer-events: none;
+ height: 96rpx;
+}
+.t-picker__mask--top {
+ top: 0;
+ background: linear-gradient(180deg, var(--td-picker-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff))) 0%, var(--td-picker-transparent-color) 100%);
+}
+.t-picker__mask--bottom {
+ bottom: 0;
+ background: linear-gradient(180deg, var(--td-picker-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff))) 0%, var(--td-picker-transparent-color) 100%);
+ transform: matrix(1, 0, 0, -1, 0, 0);
+}
+.t-picker__indicator {
+ position: absolute;
+ left: 32rpx;
+ right: 32rpx;
+ pointer-events: none;
+ background-color: var(--td-picker-indicator-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+ border-radius: var(--td-picker-indicator-border-radius, 12rpx);
+}
diff --git a/uni_modules/tdesign-uniapp/components/picker/picker.vue b/uni_modules/tdesign-uniapp/components/picker/picker.vue
new file mode 100644
index 0000000..562afb6
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/picker/picker.vue
@@ -0,0 +1,315 @@
+
+
+
+
+
+
+
+ {{ cancelBtn }}
+
+
+ {{ title }}
+
+
+ {{ confirmBtn }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ cancelBtn }}
+
+
+ {{ title }}
+
+
+ {{ confirmBtn }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/picker/props.ts b/uni_modules/tdesign-uniapp/components/picker/props.ts
new file mode 100644
index 0000000..354605a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/picker/props.ts
@@ -0,0 +1,95 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdPickerProps } from './type';
+export default {
+ /** 自动关闭;在确认、取消、点击遮罩层自动关闭,不需要手动设置 visible */
+ autoClose: {
+ type: Boolean,
+ default: true,
+ },
+ /** 取消按钮文字 */
+ cancelBtn: {
+ type: [String, Boolean],
+ default: true as TdPickerProps['cancelBtn'],
+ },
+ /** 确定按钮文字 */
+ confirmBtn: {
+ type: [String, Boolean],
+ default: true as TdPickerProps['confirmBtn'],
+ },
+ /** 头部内容。值为 true 显示空白头部,值为 false 不显示任何内容 */
+ header: {
+ type: Boolean,
+ default: true as TdPickerProps['header'],
+ },
+ /** PickerItem 的子项高度,单位 `px` */
+ itemHeight: {
+ type: Number,
+ default: 40,
+ },
+ /** 用来定义 value / label / icon 在 `options` 中对应的字段别名 */
+ keys: {
+ type: Object,
+ },
+ /** 透传 Popup 组件全部属性 */
+ popupProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 标题 */
+ title: {
+ type: String,
+ default: '',
+ },
+ /** 是否使用弹出层包裹 */
+ usePopup: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否使用了自定义导航栏 */
+ usingCustomNavbar: Boolean,
+ /** 选中值 */
+ value: {
+ type: Array,
+ },
+ /** 选中值,非受控属性 */
+ defaultValue: {
+ type: Array,
+ },
+ /** 是否显示。支持语法糖 `v-model:visible` */
+ visible: Boolean,
+ /** 可视区域 PickerItem 的子项个数 */
+ visibleItemCount: {
+ type: Number,
+ default: 5,
+ },
+ /** 点击取消按钮时触发 */
+ onCancel: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 选中变化时候触发,即确认变化时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 关闭时触发 */
+ onClose: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击确认按钮时触发 */
+ onConfirm: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 任何一列选中都会触发,不同的列参数不同。`column` 表示第几列变化,`index` 表示变化那一列的选中项下标 */
+ onPick: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/picker/type.ts b/uni_modules/tdesign-uniapp/components/picker/type.ts
new file mode 100644
index 0000000..b3f1051
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/picker/type.ts
@@ -0,0 +1,114 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdPopupProps as PopupProps } from '../popup/type';
+import type { KeysType } from '../common/common';
+
+export interface TdPickerProps {
+ /**
+ * 自动关闭;在确认、取消、点击遮罩层自动关闭,不需要手动设置 visible
+ * @default true
+ */
+ autoClose?: boolean;
+ /**
+ * 取消按钮文字
+ * @default true
+ */
+ cancelBtn?: boolean | string;
+ /**
+ * 确定按钮文字
+ * @default true
+ */
+ confirmBtn?: boolean | string;
+ /**
+ * 头部内容。值为 true 显示空白头部,值为 false 不显示任何内容
+ * @default true
+ */
+ header?: boolean;
+ /**
+ * PickerItem 的子项高度,单位 `px`
+ * @default 40
+ */
+ itemHeight?: number;
+ /**
+ * 用来定义 value / label / icon 在 `options` 中对应的字段别名
+ */
+ keys?: KeysType;
+ /**
+ * 透传 Popup 组件全部属性
+ * @default {}
+ */
+ popupProps?: PopupProps;
+ /**
+ * 标题
+ * @default ''
+ */
+ title?: string;
+ /**
+ * 是否使用弹出层包裹
+ * @default true
+ */
+ usePopup?: boolean;
+ /**
+ * 是否使用了自定义导航栏
+ * @default false
+ */
+ usingCustomNavbar?: boolean;
+ /**
+ * 选中值
+ */
+ value?: Array;
+ /**
+ * 选中值,非受控属性
+ */
+ defaultValue?: Array;
+ /**
+ * 是否显示。支持语法糖 `v-model:visible`
+ * @default false
+ */
+ visible?: boolean;
+ /**
+ * 可视区域 PickerItem 的子项个数
+ * @default 5
+ */
+ visibleItemCount?: number;
+ /**
+ * 点击取消按钮时触发
+ * @default ''
+ */
+ onCancel?: () => void;
+ /**
+ * 选中变化时候触发,即确认变化时触发
+ * @default ''
+ */
+ onChange?: (context: {
+ value: Array;
+ label: string;
+ columns: Array<{ column: number; index: number; disabled?: boolean }>;
+ }) => void;
+ /**
+ * 关闭时触发
+ */
+ onClose?: (context: { trigger: TriggerSource }) => void;
+ /**
+ * 点击确认按钮时触发
+ * @default ''
+ */
+ onConfirm?: (context: {
+ value: Array;
+ label: string;
+ columns: Array<{ column: number; index: number; disabled?: boolean }>;
+ }) => void;
+ /**
+ * 任何一列选中都会触发,不同的列参数不同。`column` 表示第几列变化,`index` 表示变化那一列的选中项下标
+ * @default ''
+ */
+ onPick?: (context: { value: Array; label: string; column: number; index: number }) => void;
+}
+
+export type PickerValue = string | number;
+
+export type TriggerSource = 'overlay' | 'cancel-btn' | 'confirm-btn';
diff --git a/uni_modules/tdesign-uniapp/components/popover/README.en-US.md b/uni_modules/tdesign-uniapp/components/popover/README.en-US.md
new file mode 100644
index 0000000..0d6fe1a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popover/README.en-US.md
@@ -0,0 +1,55 @@
+:: BASE_DOC ::
+
+## API
+
+### Popover Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+close-on-click-outside | Boolean | true | \- | N
+content | String | - | \- | N
+fixed | Boolean | false | \- | N
+placement | String | top | options: top/left/right/bottom/top-left/top-right/bottom-left/bottom-right/left-top/left-bottom/right-top/right-bottom | N
+show-arrow | Boolean | true | \- | N
+theme | String | dark | options: dark/light/brand/success/warning/error | N
+visible | Boolean | undefined | `v-model:visible` is supported | N
+
+### Popover Events
+
+name | params | description
+-- | -- | --
+visible-change | `(visible: boolean)` | \-
+
+### Popover Slots
+
+name | Description
+-- | --
+\- | \-
+content | \-
+
+### Popover External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-content | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-popover-brand-bg-color | @primary-color-1 | -
+--td-popover-brand-color | @primary-color-7 | -
+--td-popover-dark-bg-color | @font-gray-1 | -
+--td-popover-dark-color | @text-color-anti | -
+--td-popover-error-bg-color | @error-color-1 | -
+--td-popover-error-color | @error-color-6 | -
+--td-popover-light-bg-color | @bg-color-container | -
+--td-popover-light-color | @text-color-primary | -
+--td-popover-padding | 24rpx | -
+--td-popover-success-bg-color | @success-color-1 | -
+--td-popover-success-color | @success-color-5 | -
+--td-popover-warning-bg-color | @warning-color-1 | -
+--td-popover-warning-color | @warning-color-5 | -
diff --git a/uni_modules/tdesign-uniapp/components/popover/README.md b/uni_modules/tdesign-uniapp/components/popover/README.md
new file mode 100644
index 0000000..74ff973
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popover/README.md
@@ -0,0 +1,85 @@
+---
+title: Popover 弹出气泡
+description: 用于文字提示的气泡框。
+spline: data
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TPopover from '@tdesign/uniapp/popover/popover.vue';
+```
+
+### 组件类型
+
+#### 带箭头的弹出气泡
+
+{{ base }}
+
+### 组件样式
+
+#### 气泡主题
+
+{{ theme }}
+
+#### 气泡位置
+
+{{ placement }}
+
+## API
+
+### Popover Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+close-on-click-outside | Boolean | true | 是否在点击外部元素后关闭菜单 | N
+content | String | - | 确认框内容 | N
+fixed | Boolean | false | 如果触发元素为 `fixed` 场景,需要显示指定 `fixed` 属性为 `true`,同时需在触发元素层添加 `t-popover-wrapper--fixed` 类,用于定位触发元素 | N
+placement | String | top | 浮层出现位置。可选项:top/left/right/bottom/top-left/top-right/bottom-left/bottom-right/left-top/left-bottom/right-top/right-bottom | N
+show-arrow | Boolean | true | 是否显示浮层箭头 | N
+theme | String | dark | 弹出气泡主题。可选项:dark/light/brand/success/warning/error | N
+visible | Boolean | undefined | 是否显示气泡确认框。支持语法糖 `v-model:visible` | N
+
+### Popover Events
+
+名称 | 参数 | 描述
+-- | -- | --
+visible-change | `(visible: boolean)` | 确认框显示或隐藏时触发
+
+### Popover Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,用于自定义触发元素
+content | 自定义 `content` 显示内容
+
+### Popover External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-content | 内容样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-popover-brand-bg-color | @primary-color-1 | -
+--td-popover-brand-color | @primary-color-7 | -
+--td-popover-dark-bg-color | @font-gray-1 | -
+--td-popover-dark-color | @text-color-anti | -
+--td-popover-error-bg-color | @error-color-1 | -
+--td-popover-error-color | @error-color-6 | -
+--td-popover-light-bg-color | @bg-color-container | -
+--td-popover-light-color | @text-color-primary | -
+--td-popover-padding | 24rpx | -
+--td-popover-success-bg-color | @success-color-1 | -
+--td-popover-success-color | @success-color-5 | -
+--td-popover-warning-bg-color | @warning-color-1 | -
+--td-popover-warning-color | @warning-color-5 | -
diff --git a/uni_modules/tdesign-uniapp/components/popover/popover.css b/uni_modules/tdesign-uniapp/components/popover/popover.css
new file mode 100644
index 0000000..4e2cd3c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popover/popover.css
@@ -0,0 +1,271 @@
+.t-popover__wrapper {
+ display: inline-block;
+}
+.t-popover {
+ position: absolute;
+ z-index: 11500;
+ overflow: visible;
+ transition: 0.2s ease-in-out all;
+}
+.t-popover--fixed {
+ position: fixed;
+}
+.t-popover__content {
+ position: relative;
+ padding: var(--td-popover-padding, 24rpx);
+ border-radius: 12rpx;
+ box-shadow: var(--td-shadow-3, 0 6px 30px 5px rgba(0, 0, 0, 0.05), 0 16px 24px 2px rgba(0, 0, 0, 0.04), 0 8px 10px -5px rgba(0, 0, 0, 0.08));
+ font-size: var(--td-font-size-m, 32rpx);
+ line-height: 48rpx;
+ border-radius: 6px;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ word-break: break-all;
+}
+.t-popover__arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-style: solid;
+ border-color: transparent;
+ border-width: 16rpx;
+}
+.t-popover .t-popover--dark {
+ color: var(--td-popover-dark-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+ background: var(--td-popover-dark-bg-color, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
+}
+.t-popover .t-popover--dark .t-popover__arrow {
+ color: var(--td-popover-dark-bg-color, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
+}
+.t-popover .t-popover--light {
+ color: var(--td-popover-light-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ background: var(--td-popover-light-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-popover .t-popover--light .t-popover__arrow {
+ color: var(--td-popover-light-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-popover .t-popover--brand {
+ color: var(--td-popover-brand-color, var(--td-primary-color-7, #0052d9));
+ background: var(--td-popover-brand-bg-color, var(--td-primary-color-1, #f2f3ff));
+}
+.t-popover .t-popover--brand .t-popover__arrow {
+ color: var(--td-popover-brand-bg-color, var(--td-primary-color-1, #f2f3ff));
+}
+.t-popover .t-popover--success {
+ color: var(--td-popover-success-color, var(--td-success-color-5, #2ba471));
+ background: var(--td-popover-success-bg-color, var(--td-success-color-1, #e3f9e9));
+}
+.t-popover .t-popover--success .t-popover__arrow {
+ color: var(--td-popover-success-bg-color, var(--td-success-color-1, #e3f9e9));
+}
+.t-popover .t-popover--warning {
+ color: var(--td-popover-warning-color, var(--td-warning-color-5, #e37318));
+ background: var(--td-popover-warning-bg-color, var(--td-warning-color-1, #fff1e9));
+}
+.t-popover .t-popover--warning .t-popover__arrow {
+ color: var(--td-popover-warning-bg-color, var(--td-warning-color-1, #fff1e9));
+}
+.t-popover .t-popover--error {
+ color: var(--td-popover-error-color, var(--td-error-color-6, #d54941));
+ background: var(--td-popover-error-bg-color, var(--td-error-color-1, #fff0ed));
+}
+.t-popover .t-popover--error .t-popover__arrow {
+ color: var(--td-popover-error-bg-color, var(--td-error-color-1, #fff0ed));
+}
+.t-popover.t-fade-enter-to {
+ opacity: 1;
+ visibility: visible;
+}
+.t-popover.t-fade-enter,
+.t-popover.t-fade-leave-to {
+ opacity: 0;
+ visibility: hidden;
+}
+.t-popover.t-popover--placement-top .t-popover__content,
+.t-popover.t-popover--placement-top-start .t-popover__content,
+.t-popover.t-popover--placement-top-end .t-popover__content {
+ margin-bottom: 16rpx;
+}
+.t-popover.t-popover--placement-top .t-popover__content--arrow,
+.t-popover.t-popover--placement-top-start .t-popover__content--arrow,
+.t-popover.t-popover--placement-top-end .t-popover__content--arrow {
+ margin-bottom: 24rpx;
+}
+.t-popover.t-popover--placement-bottom .t-popover__content,
+.t-popover.t-popover--placement-bottom-start .t-popover__content,
+.t-popover.t-popover--placement-bottom-end .t-popover__content {
+ margin-top: 16rpx;
+}
+.t-popover.t-popover--placement-bottom .t-popover__content--arrow,
+.t-popover.t-popover--placement-bottom-start .t-popover__content--arrow,
+.t-popover.t-popover--placement-bottom-end .t-popover__content--arrow {
+ margin-top: 24rpx;
+}
+.t-popover.t-popover--placement-left .t-popover__content,
+.t-popover.t-popover--placement-left-start .t-popover__content,
+.t-popover.t-popover--placement-left-end .t-popover__content {
+ margin-right: 16rpx;
+}
+.t-popover.t-popover--placement-left .t-popover__content--arrow,
+.t-popover.t-popover--placement-left-start .t-popover__content--arrow,
+.t-popover.t-popover--placement-left-end .t-popover__content--arrow {
+ margin-right: 24rpx;
+}
+.t-popover.t-popover--placement-right .t-popover__content,
+.t-popover.t-popover--placement-right-start .t-popover__content,
+.t-popover.t-popover--placement-right-end .t-popover__content {
+ margin-left: 16rpx;
+}
+.t-popover.t-popover--placement-right .t-popover__content--arrow,
+.t-popover.t-popover--placement-right-start .t-popover__content--arrow,
+.t-popover.t-popover--placement-right-end .t-popover__content--arrow {
+ margin-left: 24rpx;
+}
+.t-popover.t-popover--placement-top .t-popover__arrow,
+.t-popover.t-popover--placement-top-start .t-popover__arrow,
+.t-popover.t-popover--placement-top-end .t-popover__arrow {
+ bottom: 0;
+ border-top-color: currentColor;
+ border-bottom-width: 0;
+ margin-bottom: calc(16rpx * -1);
+}
+.t-popover.t-popover--placement-top {
+ transform-origin: 50% 100%;
+}
+.t-popover.t-popover--placement-top .t-popover__arrow {
+ left: 50%;
+ transform: translateX(-50%);
+}
+.t-popover.t-popover--placement-top-start {
+ transform-origin: 0 100%;
+}
+.t-popover.t-popover--placement-top-start .t-popover__arrow {
+ left: var(--td-popover-padding, 24rpx);
+}
+.t-popover.t-popover--placement-top-end {
+ transform-origin: 100% 100%;
+}
+.t-popover.t-popover--placement-top-end .t-popover__arrow {
+ right: var(--td-popover-padding, 24rpx);
+}
+.t-popover.t-popover--placement-bottom .t-popover__arrow,
+.t-popover.t-popover--placement-bottom-start .t-popover__arrow,
+.t-popover.t-popover--placement-bottom-end .t-popover__arrow {
+ top: 0;
+ border-top-width: 0;
+ border-bottom-color: currentColor;
+ margin-top: calc(16rpx * -1);
+}
+.t-popover.t-popover--placement-bottom {
+ transform-origin: 50% 0;
+}
+.t-popover.t-popover--placement-bottom .t-popover__arrow {
+ left: 50%;
+ transform: translateX(-50%);
+}
+.t-popover.t-popover--placement-bottom-start {
+ transform-origin: 0 0;
+}
+.t-popover.t-popover--placement-bottom-start .t-popover__arrow {
+ left: var(--td-popover-padding, 24rpx);
+}
+.t-popover.t-popover--placement-bottom-end {
+ transform-origin: 100% 0;
+}
+.t-popover.t-popover--placement-bottom-end .t-popover__arrow {
+ right: var(--td-popover-padding, 24rpx);
+}
+.t-popover.t-popover--placement-left .t-popover__arrow,
+.t-popover.t-popover--placement-left-start .t-popover__arrow,
+.t-popover.t-popover--placement-left-end .t-popover__arrow {
+ right: 0;
+ border-right-width: 0;
+ border-left-color: currentColor;
+ margin-right: calc(16rpx * -1);
+}
+.t-popover.t-popover--placement-left {
+ transform-origin: 100% 50%;
+}
+.t-popover.t-popover--placement-left .t-popover__arrow {
+ top: 50%;
+ transform: translateY(-50%);
+}
+.t-popover.t-popover--placement-left-start {
+ transform-origin: 100% 0;
+}
+.t-popover.t-popover--placement-left-start .t-popover__arrow {
+ top: var(--td-popover-padding, 24rpx);
+}
+.t-popover.t-popover--placement-left-end {
+ transform-origin: 100% 100%;
+}
+.t-popover.t-popover--placement-left-end .t-popover__arrow {
+ bottom: var(--td-popover-padding, 24rpx);
+}
+.t-popover.t-popover--placement-right .t-popover__arrow,
+.t-popover.t-popover--placement-right-start .t-popover__arrow,
+.t-popover.t-popover--placement-right-end .t-popover__arrow {
+ left: 0;
+ border-right-color: currentColor;
+ border-left-width: 0;
+ margin-left: calc(16rpx * -1);
+}
+.t-popover.t-popover--placement-right {
+ transform-origin: 0 50%;
+}
+.t-popover.t-popover--placement-right .t-popover__arrow {
+ top: 50%;
+ transform: translateY(-50%);
+}
+.t-popover.t-popover--placement-right-start {
+ transform-origin: 0 0;
+}
+.t-popover.t-popover--placement-right-start .t-popover__arrow {
+ top: var(--td-popover-padding, 24rpx);
+}
+.t-popover.t-popover--placement-right-end {
+ transform-origin: 0 100%;
+}
+.t-popover.t-popover--placement-right-end .t-popover__arrow {
+ bottom: var(--td-popover-padding, 24rpx);
+}
+.content-placement-top .t-popover.t-popover--placement-top .t-popover__content,
+.content-placement-top .t-popover.t-popover--placement-top-start .t-popover__content,
+.content-placement-top .t-popover.t-popover--placement-top-end .t-popover__content {
+ margin-bottom: 16rpx;
+}
+.content-placement-top .t-popover.t-popover--placement-top .t-popover__content--arrow,
+.content-placement-top .t-popover.t-popover--placement-top-start .t-popover__content--arrow,
+.content-placement-top .t-popover.t-popover--placement-top-end .t-popover__content--arrow {
+ margin-bottom: 24rpx;
+}
+.content-placement-bottom .t-popover.t-popover--placement-bottom .t-popover__content,
+.content-placement-bottom .t-popover.t-popover--placement-bottom-start .t-popover__content,
+.content-placement-bottom .t-popover.t-popover--placement-bottom-end .t-popover__content {
+ margin-top: 16rpx;
+}
+.content-placement-bottom .t-popover.t-popover--placement-bottom .t-popover__content--arrow,
+.content-placement-bottom .t-popover.t-popover--placement-bottom-start .t-popover__content--arrow,
+.content-placement-bottom .t-popover.t-popover--placement-bottom-end .t-popover__content--arrow {
+ margin-top: 24rpx;
+}
+.content-placement-left .t-popover.t-popover--placement-left .t-popover__content,
+.content-placement-left .t-popover.t-popover--placement-left-start .t-popover__content,
+.content-placement-left .t-popover.t-popover--placement-left-end .t-popover__content {
+ margin-right: 16rpx;
+}
+.content-placement-left .t-popover.t-popover--placement-left .t-popover__content--arrow,
+.content-placement-left .t-popover.t-popover--placement-left-start .t-popover__content--arrow,
+.content-placement-left .t-popover.t-popover--placement-left-end .t-popover__content--arrow {
+ margin-right: 24rpx;
+}
+.content-placement-right .t-popover.t-popover--placement-right .t-popover__content,
+.content-placement-right .t-popover.t-popover--placement-right-start .t-popover__content,
+.content-placement-right .t-popover.t-popover--placement-right-end .t-popover__content {
+ margin-left: 16rpx;
+}
+.content-placement-right .t-popover.t-popover--placement-right .t-popover__content--arrow,
+.content-placement-right .t-popover.t-popover--placement-right-start .t-popover__content--arrow,
+.content-placement-right .t-popover.t-popover--placement-right-end .t-popover__content--arrow {
+ margin-left: 24rpx;
+}
diff --git a/uni_modules/tdesign-uniapp/components/popover/popover.vue b/uni_modules/tdesign-uniapp/components/popover/popover.vue
new file mode 100644
index 0000000..cb4acea
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popover/popover.vue
@@ -0,0 +1,352 @@
+
+
+
+
+
+
+
+
+
+
+ {{ content }}
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/popover/props.ts b/uni_modules/tdesign-uniapp/components/popover/props.ts
new file mode 100644
index 0000000..02380b6
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popover/props.ts
@@ -0,0 +1,58 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdPopoverProps } from './type';
+export default {
+ /** 是否在点击外部元素后关闭菜单 */
+ closeOnClickOutside: {
+ type: Boolean,
+ default: true,
+ },
+ /** 确认框内容 */
+ content: {
+ type: String,
+ },
+ /** 如果触发元素为 `fixed` 场景,需要显示指定 `fixed` 属性为 `true`,同时需在触发元素层添加 `t-popover-wrapper--fixed` 类,用于定位触发元素 */
+ fixed: Boolean,
+ /** 浮层出现位置 */
+ placement: {
+ type: String,
+ default: 'top' as TdPopoverProps['placement'],
+ validator(val: TdPopoverProps['placement']): boolean {
+ if (!val) return true;
+ return ['top', 'left', 'right', 'bottom', 'top-left', 'top-right', 'bottom-left', 'bottom-right', 'left-top', 'left-bottom', 'right-top', 'right-bottom'].includes(val);
+ },
+ },
+ /** 是否显示浮层箭头 */
+ showArrow: {
+ type: Boolean,
+ default: true,
+ },
+ /** 弹出气泡主题 */
+ theme: {
+ type: String,
+ default: 'dark' as TdPopoverProps['theme'],
+ validator(val: TdPopoverProps['theme']): boolean {
+ if (!val) return true;
+ return ['dark', 'light', 'brand', 'success', 'warning', 'error'].includes(val);
+ },
+ },
+ /** 是否显示气泡确认框 */
+ visible: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 是否显示气泡确认框,非受控属性 */
+ defaultVisible: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 确认框显示或隐藏时触发 */
+ onVisibleChange: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/popover/type.ts b/uni_modules/tdesign-uniapp/components/popover/type.ts
new file mode 100644
index 0000000..3f1beb0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popover/type.ts
@@ -0,0 +1,61 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdPopoverProps {
+ /**
+ * 是否在点击外部元素后关闭菜单
+ * @default true
+ */
+ closeOnClickOutside?: boolean;
+ /**
+ * 确认框内容
+ */
+ content?: string;
+ /**
+ * 如果触发元素为 `fixed` 场景,需要显示指定 `fixed` 属性为 `true`,同时需在触发元素层添加 `t-popover-wrapper--fixed` 类,用于定位触发元素
+ * @default false
+ */
+ fixed?: boolean;
+ /**
+ * 浮层出现位置
+ * @default top
+ */
+ placement?:
+ | 'top'
+ | 'left'
+ | 'right'
+ | 'bottom'
+ | 'top-left'
+ | 'top-right'
+ | 'bottom-left'
+ | 'bottom-right'
+ | 'left-top'
+ | 'left-bottom'
+ | 'right-top'
+ | 'right-bottom';
+ /**
+ * 是否显示浮层箭头
+ * @default true
+ */
+ showArrow?: boolean;
+ /**
+ * 弹出气泡主题
+ * @default dark
+ */
+ theme?: 'dark' | 'light' | 'brand' | 'success' | 'warning' | 'error';
+ /**
+ * 是否显示气泡确认框
+ */
+ visible?: boolean;
+ /**
+ * 是否显示气泡确认框,非受控属性
+ */
+ defaultVisible?: boolean;
+ /**
+ * 确认框显示或隐藏时触发
+ */
+ onVisibleChange?: (visible: boolean) => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/popup/README.en-US.md b/uni_modules/tdesign-uniapp/components/popup/README.en-US.md
new file mode 100644
index 0000000..01eb621
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popup/README.en-US.md
@@ -0,0 +1,53 @@
+:: BASE_DOC ::
+
+## API
+
+### Popup Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+close-btn | Boolean | - | \- | N
+close-on-overlay-click | Boolean | true | \- | N
+content | String | - | \- | N
+duration | Number | 240 | \- | N
+overlay-props | Object | {} | Typescript:`OverlayProps`,[Overlay API Documents](./overlay?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/popup/type.ts) | N
+placement | String | top | options: top/left/right/bottom/center | N
+prevent-scroll-through | Boolean | true | \- | N
+show-overlay | Boolean | true | \- | N
+using-custom-navbar | Boolean | false | \- | N
+visible | Boolean | - | `v-model:visible` is supported。Typescript:`boolean` | N
+default-visible | Boolean | - | uncontrolled property。Typescript:`boolean` | N
+z-index | Number | 11500 | \- | N
+
+### Popup Events
+
+name | params | description
+-- | -- | --
+visible-change | `(context: { visible: boolean, trigger: PopupSource }) ` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/popup/type.ts)。
`type PopupSource = 'close-btn' \| 'overlay'`
+
+### Popup Slots
+
+name | Description
+-- | --
+\- | \-
+close-btn | \-
+content | \-
+
+### Popup External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-content | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-popup-bg-color | @bg-color-container | -
+--td-popup-border-radius | @radius-extraLarge | -
+--td-popup-close-btn-color | @text-color-primary | -
+--td-popup-distance-top | 0 | -
+--td-popup-transition | all 300ms ease | -
diff --git a/uni_modules/tdesign-uniapp/components/popup/README.md b/uni_modules/tdesign-uniapp/components/popup/README.md
new file mode 100644
index 0000000..59a9aa3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popup/README.md
@@ -0,0 +1,82 @@
+---
+title: Popup 弹出层
+description: 由其他控件触发,屏幕滑出或弹出一块自定义内容区域。
+spline: message
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TPopup from '@tdesign/uniapp/popup/popup.vue';
+```
+
+### 组件类型
+
+基础弹出层
+
+{{ base }}
+
+### 组件示例
+
+应用示例
+
+{{ with-title }}
+
+{{ custom-close }}
+
+## API
+
+### Popup Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+close-btn | Boolean | - | 关闭按钮,值类型为 Boolean 时表示是否显示关闭按钮。也可以自定义关闭按钮 | N
+close-on-overlay-click | Boolean | true | 点击遮罩层是否关闭 | N
+content | String | - | 浮层里面的内容 | N
+duration | Number | 240 | 动画过渡时间 | N
+overlay-props | Object | {} | 遮罩层的属性,透传至 overlay。TS 类型:`OverlayProps`,[Overlay API Documents](./overlay?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/popup/type.ts) | N
+placement | String | top | 浮层出现位置。可选项:top/left/right/bottom/center | N
+prevent-scroll-through | Boolean | true | 是否阻止背景滚动 | N
+show-overlay | Boolean | true | 是否显示遮罩层 | N
+using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
+visible | Boolean | - | 是否显示浮层。支持语法糖 `v-model:visible`。TS 类型:`boolean` | N
+default-visible | Boolean | - | 是否显示浮层。非受控属性。TS 类型:`boolean` | N
+z-index | Number | 11500 | 组件层级,Web 侧样式默认为 5500,移动端样式默认为 1500,小程序样式默认为11500 | N
+
+### Popup Events
+
+名称 | 参数 | 描述
+-- | -- | --
+visible-change | `(context: { visible: boolean, trigger: PopupSource }) ` | 当浮层隐藏时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/popup/type.ts)。
`type PopupSource = 'close-btn' \| 'overlay'`
+
+### Popup Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,作用同 `content` 插槽
+close-btn | 自定义 `close-btn` 显示内容
+content | 自定义 `content` 显示内容
+
+### Popup External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-content | 内容样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-popup-bg-color | @bg-color-container | -
+--td-popup-border-radius | @radius-extraLarge | -
+--td-popup-close-btn-color | @text-color-primary | -
+--td-popup-distance-top | 0 | -
+--td-popup-transition | all 300ms ease | -
diff --git a/uni_modules/tdesign-uniapp/components/popup/computed.js b/uni_modules/tdesign-uniapp/components/popup/computed.js
new file mode 100644
index 0000000..54b09d0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popup/computed.js
@@ -0,0 +1,14 @@
+function getPopupStyles({ zIndex, distanceTop, placement, duration }) {
+ let zIndexStyle = zIndex ? `z-index:${zIndex};` : '';
+ if ((placement === 'top' || placement === 'left' || placement === 'right') && distanceTop) {
+ zIndexStyle = `${zIndexStyle}top:${distanceTop}px;--td-popup-distance-top:${distanceTop}px;`;
+ }
+ if (duration) {
+ zIndexStyle = `${zIndexStyle}--td-popup-transition:all ${duration}ms ease;`;
+ }
+ return zIndexStyle;
+}
+
+export default {
+ getPopupStyles,
+};
diff --git a/uni_modules/tdesign-uniapp/components/popup/popup.css b/uni_modules/tdesign-uniapp/components/popup/popup.css
new file mode 100644
index 0000000..b965088
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popup/popup.css
@@ -0,0 +1,80 @@
+.t-popup {
+ position: fixed;
+ z-index: 11500;
+ max-height: calc(100vh - var(--td-popup-distance-top, 0));
+ transition: var(--td-popup-transition, all 300ms ease);
+ background-color: var(--td-popup-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-popup__content {
+ position: relative;
+ height: 100%;
+ z-index: 1;
+}
+.t-popup__close {
+ position: absolute;
+ top: 0;
+ right: 0;
+ padding: 20rpx;
+ line-height: 1;
+ color: var(--td-popup-close-btn-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-popup--top {
+ top: 0;
+ left: 0;
+ width: 100%;
+ border-bottom-left-radius: var(--td-popup-border-radius, var(--td-radius-extraLarge, 24rpx));
+ border-bottom-right-radius: var(--td-popup-border-radius, var(--td-radius-extraLarge, 24rpx));
+}
+.t-popup--bottom {
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ border-top-left-radius: var(--td-popup-border-radius, var(--td-radius-extraLarge, 24rpx));
+ border-top-right-radius: var(--td-popup-border-radius, var(--td-radius-extraLarge, 24rpx));
+ padding-bottom: constant(safe-area-inset-bottom);
+ padding-bottom: env(safe-area-inset-bottom);
+}
+.t-popup--left {
+ top: 0;
+ left: 0;
+ height: 100%;
+}
+.t-popup--right {
+ top: 0;
+ right: 0;
+ height: 100%;
+}
+.t-popup--center {
+ top: 50%;
+ left: 50%;
+ transform: scale(1) translate3d(-50%, -50%, 0);
+ transform-origin: 0% 0%;
+ border-radius: var(--td-popup-border-radius, var(--td-radius-extraLarge, 24rpx));
+}
+.t-popup.t-fade-enter.t-popup--top,
+.t-popup.t-fade-leave-to.t-popup--top {
+ transform: translateY(-100%);
+ transform-origin: 0% 0%;
+}
+.t-popup.t-fade-enter.t-popup--bottom,
+.t-popup.t-fade-leave-to.t-popup--bottom {
+ transform: translateY(100%);
+}
+.t-popup.t-fade-enter.t-popup--left,
+.t-popup.t-fade-leave-to.t-popup--left {
+ transform: translateX(-100%);
+}
+.t-popup.t-fade-enter.t-popup--right,
+.t-popup.t-fade-leave-to.t-popup--right {
+ transform: translateX(100%);
+}
+.t-popup.t-fade-enter.t-popup--center,
+.t-popup.t-fade-leave-to.t-popup--center {
+ transform: scale(0.6) translate3d(-50%, -50%, 0);
+ opacity: 0;
+}
+.t-popup.t-dialog-enter.t-popup--center,
+.t-popup.t-dialog-leave-to.t-popup--center {
+ transform: scale(0.6) translate3d(-50%, -50%, 0);
+ opacity: 0;
+}
diff --git a/uni_modules/tdesign-uniapp/components/popup/popup.vue b/uni_modules/tdesign-uniapp/components/popup/popup.vue
new file mode 100644
index 0000000..bbcd096
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popup/popup.vue
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/popup/props.ts b/uni_modules/tdesign-uniapp/components/popup/props.ts
new file mode 100644
index 0000000..06ebf8a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popup/props.ts
@@ -0,0 +1,67 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdPopupProps } from './type';
+export default {
+ /** 关闭按钮,值类型为 Boolean 时表示是否显示关闭按钮。也可以自定义关闭按钮 */
+ closeBtn: {
+ type: Boolean,
+ },
+ /** 点击遮罩层是否关闭 */
+ closeOnOverlayClick: {
+ type: Boolean,
+ default: true,
+ },
+ /** 浮层里面的内容 */
+ content: {
+ type: String,
+ },
+ /** 动画过渡时间 */
+ duration: {
+ type: Number,
+ default: 240,
+ },
+ /** 遮罩层的属性,透传至 overlay */
+ overlayProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 浮层出现位置 */
+ placement: {
+ type: String,
+ default: 'top' as TdPopupProps['placement'],
+ validator(val: TdPopupProps['placement']): boolean {
+ if (!val) return true;
+ return ['top', 'left', 'right', 'bottom', 'center'].includes(val);
+ },
+ },
+ /** 是否阻止背景滚动 */
+ preventScrollThrough: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否显示遮罩层 */
+ showOverlay: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否使用了自定义导航栏 */
+ usingCustomNavbar: Boolean,
+ /** 是否显示浮层 */
+ visible: Boolean,
+ /** 是否显示浮层,非受控属性 */
+ defaultVisible: Boolean,
+ /** 组件层级,Web 侧样式默认为 5500,移动端样式默认为 1500,小程序样式默认为11500 */
+ zIndex: {
+ type: Number,
+ default: 11500,
+ },
+ /** 当浮层隐藏或显示时触发 */
+ onVisibleChange: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/popup/type.ts b/uni_modules/tdesign-uniapp/components/popup/type.ts
new file mode 100644
index 0000000..8bdadf2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/popup/type.ts
@@ -0,0 +1,72 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdOverlayProps as OverlayProps } from '../overlay/type';
+
+export interface TdPopupProps {
+ /**
+ * 关闭按钮,值类型为 Boolean 时表示是否显示关闭按钮。也可以自定义关闭按钮
+ */
+ closeBtn?: boolean;
+ /**
+ * 点击遮罩层是否关闭
+ * @default true
+ */
+ closeOnOverlayClick?: boolean;
+ /**
+ * 浮层里面的内容
+ */
+ content?: string;
+ /**
+ * 动画过渡时间
+ * @default 240
+ */
+ duration?: number;
+ /**
+ * 遮罩层的属性,透传至 overlay
+ * @default {}
+ */
+ overlayProps?: OverlayProps;
+ /**
+ * 浮层出现位置
+ * @default top
+ */
+ placement?: 'top' | 'left' | 'right' | 'bottom' | 'center';
+ /**
+ * 是否阻止背景滚动
+ * @default true
+ */
+ preventScrollThrough?: boolean;
+ /**
+ * 是否显示遮罩层
+ * @default true
+ */
+ showOverlay?: boolean;
+ /**
+ * 是否使用了自定义导航栏
+ * @default false
+ */
+ usingCustomNavbar?: boolean;
+ /**
+ * 是否显示浮层
+ */
+ visible?: boolean;
+ /**
+ * 是否显示浮层,非受控属性
+ */
+ defaultVisible?: boolean;
+ /**
+ * 组件层级,Web 侧样式默认为 5500,移动端样式默认为 1500,小程序样式默认为11500
+ * @default 11500
+ */
+ zIndex?: number;
+ /**
+ * 当浮层隐藏或显示时触发
+ */
+ onVisibleChange?: (context: { visible: boolean; trigger: PopupSource }) => void;
+}
+
+export type PopupSource = 'close-btn' | 'overlay';
diff --git a/uni_modules/tdesign-uniapp/components/progress/README.en-US.md b/uni_modules/tdesign-uniapp/components/progress/README.en-US.md
new file mode 100644
index 0000000..c739877
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/progress/README.en-US.md
@@ -0,0 +1,52 @@
+:: BASE_DOC ::
+
+## API
+
+### Progress Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+color | String / Object / Array | '' | Typescript:`string \| Array \| Record` | N
+label | String / Boolean | true | \- | N
+percentage | Number | 0 | \- | N
+size | String / Number | 'default' | \- | N
+status | String | - | options: success/error/warning/active。Typescript:`ProgressStatus` `type ProgressStatus = 'success' \| 'error' \| 'warning' \| 'active'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/progress/type.ts) | N
+stroke-width | String / Number | - | \- | N
+theme | String | line | options: line/plump/circle。Typescript:`ProgressTheme` `type ProgressTheme = 'line' \| 'plump' \| 'circle'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/progress/type.ts) | N
+track-color | String | '' | \- | N
+
+### Progress Slots
+
+name | Description
+-- | --
+label | \-
+
+### Progress External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-bar | \-
+t-class-label | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-progress-info-dark-color | @text-color-primary | -
+--td-progress-info-light-color | @text-color-anti | -
+--td-progress-inner-bg-color-active | @bg-color-container | -
+--td-progress-inner-bg-color-error | @error-color | -
+--td-progress-inner-bg-color-success | @success-color | -
+--td-progress-inner-bg-color-warning | @warning-color | -
+--td-progress-circle-icon-size | 96rpx | -
+--td-progress-circle-inner-bg-color | @bg-color-container | -
+--td-progress-circle-label-font | @font-title-extraLarge | -
+--td-progress-circle-width | 224rpx | -
+--td-progress-inner-bg-color | @brand-color | -
+--td-progress-line-stroke-width | 12rpx | -
+--td-progress-stroke-circle-width | 12rpx | -
+--td-progress-stroke-plump-width | 40rpx | -
+--td-progress-track-bg-color | @bg-color-component | -
diff --git a/uni_modules/tdesign-uniapp/components/progress/README.md b/uni_modules/tdesign-uniapp/components/progress/README.md
new file mode 100644
index 0000000..0337de4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/progress/README.md
@@ -0,0 +1,87 @@
+---
+title: Progress 进度条
+description: 用于展示任务当前的进度。
+spline: message
+isComponent: true
+---
+
+
+
+## 引入
+
+### 引入组件
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TProgress from '@tdesign/uniapp/progress/progress.vue';
+```
+
+### 01 组件类型
+
+{{ base }}
+
+### 02 组件状态
+
+线性进度条
+
+{{ line }}
+
+百分比内显进度条
+
+{{ plump }}
+
+环形进度条
+
+{{ circle }}
+
+## API
+
+### Progress Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+color | String / Object / Array | '' | 进度条颜色。示例:'#ED7B2F' 或 'orange' 或 `['#f00', '#0ff', '#f0f']` 或 `{ '0%': '#f00', '100%': '#0ff' }` 或 `{ from: '#000', to: '#000' }` 等。TS 类型:`string \| Array \| Record` | N
+label | String / Boolean | true | 进度百分比,可自定义 | N
+percentage | Number | 0 | 进度条百分比 | N
+size | String / Number | 'default' | 进度条尺寸,仅对环形进度条有效。可选值:default/micro。default 值为 112; micro 值为 24 | N
+status | String | - | 进度条状态。可选项:success/error/warning/active。TS 类型:`ProgressStatus` `type ProgressStatus = 'success' \| 'error' \| 'warning' \| 'active'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/progress/type.ts) | N
+stroke-width | String / Number | - | 进度条线宽,默认单位 `px` | N
+theme | String | line | 进度条风格。值为 line,标签(label)显示在进度条右侧;值为 plump,标签(label)显示在进度条里面;值为 circle,标签(label)显示在进度条正中间。可选项:line/plump/circle。TS 类型:`ProgressTheme` `type ProgressTheme = 'line' \| 'plump' \| 'circle'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/progress/type.ts) | N
+track-color | String | '' | 进度条未完成部分颜色 | N
+
+### Progress Slots
+
+名称 | 描述
+-- | --
+label | 进度百分比
+
+### Progress External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-bar | 进度文字样式类
+t-class-label | 标签样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-progress-info-dark-color | @text-color-primary | -
+--td-progress-info-light-color | @text-color-anti | -
+--td-progress-inner-bg-color-active | @bg-color-container | -
+--td-progress-inner-bg-color-error | @error-color | -
+--td-progress-inner-bg-color-success | @success-color | -
+--td-progress-inner-bg-color-warning | @warning-color | -
+--td-progress-circle-icon-size | 96rpx | -
+--td-progress-circle-inner-bg-color | @bg-color-container | -
+--td-progress-circle-label-font | @font-title-extraLarge | -
+--td-progress-circle-width | 224rpx | -
+--td-progress-inner-bg-color | @brand-color | -
+--td-progress-line-stroke-width | 12rpx | -
+--td-progress-stroke-circle-width | 12rpx | -
+--td-progress-stroke-plump-width | 40rpx | -
+--td-progress-track-bg-color | @bg-color-component | -
diff --git a/uni_modules/tdesign-uniapp/components/progress/computed.js b/uni_modules/tdesign-uniapp/components/progress/computed.js
new file mode 100644
index 0000000..aa6bb0f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/progress/computed.js
@@ -0,0 +1,81 @@
+import utils from '../common/utils.wxs';
+
+const STATUS = ['success', 'error', 'warning'];
+const STATUS_TEXT = ['success', 'error', 'warning', 'active'];
+
+const PRO_THEME = {
+ LINE: 'line',
+ PLUMP: 'plump',
+ CIRCLE: 'circle',
+};
+
+const STATUS_COLOR = {
+ success: '#00a870',
+ error: '#e34d59',
+ warning: '#ed7b2f',
+};
+
+const LINE_STATUS_ICON = {
+ success: 'check-circle-filled',
+ error: 'error-circle-filled',
+ warning: 'error-circle-filled',
+};
+
+const CIRCLE_STATUS_ICON = {
+ success: 'check',
+ error: 'close',
+ warning: 'error',
+};
+
+/**
+ *
+ * 1. getIOSAriaLabel, getAndroidAriaLabel 两个函数的初衷是处理progress异常情况的文案识别。
+ * 2. iOS可以识别%,而安卓不会识别%,如 80, iOS可以识别成 80%, 而安卓只会80,因此android部分做了一个% 拼接,后续看是否有更好的方案去解决。
+ * 3. 安卓 talkback 版本为 8.1.0.278818032 ,只会读一次 80, 最新版本talkback 会读 80.0, 80。(目前也是一个痛点,啰嗦了)
+ *
+ */
+
+function getIOSAriaLabel(status) {
+ if (status === 'error') {
+ return '进度失败';
+ }
+ if (status === 'warning') {
+ return '进度异常';
+ }
+ return '';
+}
+
+function getAndroidAriaLabel(status) {
+ if (status === 'error') {
+ return '%' + ',进度失败';
+ }
+ if (status === 'warning') {
+ return '%' + ',进度异常';
+ }
+ return '%';
+}
+
+function getCircleStyle(size, strokeWidth) {
+ const styles = {
+ '--td-progress-stroke-circle-width': utils.addUnit(strokeWidth),
+ };
+
+ if (!utils.includes(['default', 'micro'], size)) {
+ styles['--td-progress-circle-width'] = utils.addUnit(size);
+ }
+
+ return utils._style(styles);
+}
+
+export {
+ STATUS,
+ STATUS_TEXT,
+ PRO_THEME,
+
+ STATUS_COLOR,
+ LINE_STATUS_ICON,
+ CIRCLE_STATUS_ICON,
+ getAndroidAriaLabel,
+ getIOSAriaLabel,
+ getCircleStyle,
+};
diff --git a/uni_modules/tdesign-uniapp/components/progress/progress.css b/uni_modules/tdesign-uniapp/components/progress/progress.css
new file mode 100644
index 0000000..020e6a5
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/progress/progress.css
@@ -0,0 +1,136 @@
+.t-progress {
+ --td-progress-inner-bg-color: var(--td-brand-color, var(--td-primary-color-7, #0052d9));
+ --td-progress-track-bg-color: var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7));
+ --td-progress-circle-from: 0deg;
+}
+.t-progress__inner {
+ position: relative;
+ height: 100%;
+ background: var(--td-progress-inner-bg-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ border-radius: var(--td-radius-round, 999px);
+ transition: all var(--td-anim-duration-base, 0.2s) var(--td-anim-time-fn-easing, cubic-bezier(0.38, 0, 0.24, 1));
+}
+.t-progress__bar {
+ width: 100%;
+ height: var(--td-progress-line-stroke-width, 12rpx);
+ overflow: hidden;
+ background: var(--td-progress-track-bg-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ border-radius: var(--td-radius-round, 999px);
+}
+.t-progress__info {
+ padding-left: var(--td-spacer, 16rpx);
+ box-sizing: border-box;
+ color: var(--td-progress-info-dark-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ white-space: nowrap;
+ display: inline-flex;
+}
+.t-progress--thin {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.t-progress--thin :deep(.t-progress__icon) {
+ font-size: calc(var(--td-font-size-base, 28rpx) + 2px);
+}
+.t-progress--plump {
+ height: var(--td-progress-stroke-plump-width, 40rpx);
+ border-radius: calc(var(--td-progress-stroke-plump-width, 40rpx) / 2);
+ display: flex;
+ align-items: center;
+}
+.t-progress--plump .t-progress__info {
+ font: var(--td-font-body-small, 24rpx / 40rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
+.t-progress--over-ten .t-progress__info {
+ position: absolute;
+ top: 50%;
+ right: var(--td-spacer, 16rpx);
+ color: var(--td-progress-info-light-color, var(--td-text-color-anti, var(--td-font-white-1, #ffffff)));
+ transform: translateY(-50%);
+}
+.t-progress--under-ten .t-progress__info,
+.t-progress--under-ten .t-progress__inner {
+ display: inline-block;
+}
+.t-progress--under-ten .t-progress__info {
+ vertical-align: top;
+}
+.t-progress__canvas--circle {
+ position: relative;
+ width: var(--td-progress-circle-width, 224rpx);
+ height: var(--td-progress-circle-width, 224rpx);
+ border-radius: var(--td-radius-circle, 50%);
+}
+.t-progress__canvas--circle .t-progress__canvas--inner {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ width: calc(100% - var(--td-progress-stroke-circle-width, 12rpx)*2);
+ height: calc(100% - var(--td-progress-stroke-circle-width, 12rpx)*2);
+ border-radius: var(--td-radius-circle, 50%);
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ background-color: var(--td-progress-circle-inner-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-progress__canvas--circle .t-progress__info {
+ margin: 0;
+ padding: 0;
+ font: var(--td-progress-circle-label-font, var(--td-font-title-extraLarge, 600 40rpx / 56rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+}
+.t-progress__canvas--circle--micro {
+ --td-progress-circle-width: 48rpx;
+ --td-progress-stroke-circle-width: 4rpx;
+ --td-progress-circle-icon-size: 40rpx;
+}
+.t-progress--status--active .t-progress__inner::before {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1;
+ content: '';
+ animation: progress-active-animation 2s cubic-bezier(0.23, 0.99, 0.86, 0.2) infinite;
+ background: var(--td-progress-inner-bg-color-active, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+ opacity: 0.2;
+}
+.t-progress--status--success .t-progress__inner {
+ background: var(--td-progress-inner-bg-color-success, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+}
+.t-progress--status--success :deep(.t-progress__icon) {
+ color: var(--td-success-color, var(--td-success-color-5, #2ba471));
+}
+.t-progress--status--warning .t-progress__inner {
+ background: var(--td-progress-inner-bg-color-warning, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+}
+.t-progress--status--warning :deep(.t-progress__icon) {
+ color: var(--td-warning-color, var(--td-warning-color-5, #e37318));
+}
+.t-progress--status--error .t-progress__inner {
+ background: var(--td-progress-inner-bg-color-error, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
+.t-progress--status--error :deep(.t-progress__icon) {
+ color: var(--td-error-color, var(--td-error-color-6, #d54941));
+}
+@keyframes progress-active-animation {
+ 0% {
+ width: 0;
+ opacity: 0.1;
+ }
+ 35% {
+ width: 50%;
+ opacity: 0.4;
+ }
+ 100% {
+ width: 100%;
+ opacity: 0;
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/progress/progress.vue b/uni_modules/tdesign-uniapp/components/progress/progress.vue
new file mode 100644
index 0000000..60353ad
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/progress/progress.vue
@@ -0,0 +1,259 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ tools.isString(label) ? label : computedProgress + '%' }}
+
+
+
+
+
+
+
+ {{ tools.isString(label) ? label : computedProgress + '%' }}
+
+
+
+
+ {{ tools.isString(label) ? label : computedProgress + '%' }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ tools.isString(label) ? label : computedProgress + '%' }}
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/progress/props.ts b/uni_modules/tdesign-uniapp/components/progress/props.ts
new file mode 100644
index 0000000..ef98934
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/progress/props.ts
@@ -0,0 +1,55 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdProgressProps } from './type';
+export default {
+ /** 进度条颜色。示例:'#ED7B2F' 或 'orange' 或 `['#f00', '#0ff', '#f0f']` 或 `{ '0%': '#f00', '100%': '#0ff' }` 或 `{ from: '#000', to: '#000' }` 等 */
+ color: {
+ type: [String, Object, Array],
+ default: '' as TdProgressProps['color'],
+ },
+ /** 进度百分比,可自定义 */
+ label: {
+ type: [String, Boolean],
+ default: true as TdProgressProps['label'],
+ },
+ /** 进度条百分比 */
+ percentage: {
+ type: Number,
+ default: 0,
+ },
+ /** 进度条尺寸,仅对环形进度条有效。可选值:default/micro。default 值为 112; micro 值为 24 */
+ size: {
+ type: [String, Number],
+ default: 'default' as TdProgressProps['size'],
+ },
+ /** 进度条状态 */
+ status: {
+ type: String,
+ validator(val: TdProgressProps['status']): boolean {
+ if (!val) return true;
+ return ['success', 'error', 'warning', 'active'].includes(val);
+ },
+ },
+ /** 进度条线宽,默认单位 `px` */
+ strokeWidth: {
+ type: [String, Number],
+ },
+ /** 进度条风格。值为 line,标签(label)显示在进度条右侧;值为 plump,标签(label)显示在进度条里面;值为 circle,标签(label)显示在进度条正中间 */
+ theme: {
+ type: String,
+ default: 'line' as TdProgressProps['theme'],
+ validator(val: TdProgressProps['theme']): boolean {
+ if (!val) return true;
+ return ['line', 'plump', 'circle'].includes(val);
+ },
+ },
+ /** 进度条未完成部分颜色 */
+ trackColor: {
+ type: String,
+ default: '',
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/progress/type.ts b/uni_modules/tdesign-uniapp/components/progress/type.ts
new file mode 100644
index 0000000..fa91a64
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/progress/type.ts
@@ -0,0 +1,50 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdProgressProps {
+ /**
+ * 进度条颜色。示例:'#ED7B2F' 或 'orange' 或 `['#f00', '#0ff', '#f0f']` 或 `{ '0%': '#f00', '100%': '#0ff' }` 或 `{ from: '#000', to: '#000' }` 等
+ * @default ''
+ */
+ color?: string | Array | Record;
+ /**
+ * 进度百分比,可自定义
+ * @default true
+ */
+ label?: string | boolean;
+ /**
+ * 进度条百分比
+ * @default 0
+ */
+ percentage?: number;
+ /**
+ * 进度条尺寸,仅对环形进度条有效。可选值:default/micro。default 值为 112; micro 值为 24
+ * @default 'default'
+ */
+ size?: string | number;
+ /**
+ * 进度条状态
+ */
+ status?: ProgressStatus;
+ /**
+ * 进度条线宽,默认单位 `px`
+ */
+ strokeWidth?: string | number;
+ /**
+ * 进度条风格。值为 line,标签(label)显示在进度条右侧;值为 plump,标签(label)显示在进度条里面;值为 circle,标签(label)显示在进度条正中间
+ * @default line
+ */
+ theme?: ProgressTheme;
+ /**
+ * 进度条未完成部分颜色
+ * @default ''
+ */
+ trackColor?: string;
+}
+
+export type ProgressStatus = 'success' | 'error' | 'warning' | 'active';
+
+export type ProgressTheme = 'line' | 'plump' | 'circle';
diff --git a/uni_modules/tdesign-uniapp/components/progress/utils.js b/uni_modules/tdesign-uniapp/components/progress/utils.js
new file mode 100644
index 0000000..2eb6669
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/progress/utils.js
@@ -0,0 +1,19 @@
+export function getBackgroundColor(color) {
+ if (typeof color === 'string') {
+ return color;
+ }
+ if (Array.isArray(color)) {
+ if (color[0] && color[0][0] === '#') {
+ color.unshift('90deg');
+ }
+ return `linear-gradient( ${color.join(',')} )`;
+ }
+ const { from, to, direction = 'to right', ...rest } = color;
+ let keys = Object.keys(rest);
+ if (keys.length) {
+ keys = keys.sort((a, b) => parseFloat(a.substr(0, a.length - 1)) - parseFloat(b.substr(0, b.length - 1)));
+ const tempArr = keys.map(key => `${rest[key]} ${key}`);
+ return `linear-gradient(${direction}, ${tempArr.join(',')})`;
+ }
+ return `linear-gradient(${direction}, ${from}, ${to})`;
+}
diff --git a/uni_modules/tdesign-uniapp/components/pull-down-refresh/README.en-US.md b/uni_modules/tdesign-uniapp/components/pull-down-refresh/README.en-US.md
new file mode 100644
index 0000000..1423701
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/pull-down-refresh/README.en-US.md
@@ -0,0 +1,60 @@
+:: BASE_DOC ::
+
+## API
+
+### PullDownRefresh Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+disabled | Boolean | false | disabled pull down refresh | N
+enable-back-to-top | Boolean | true | \- | N
+enable-passive | Boolean | false | \- | N
+loading-bar-height | String / Number | 50 | \- | N
+loading-props | Object | {} | Typescript:`LoadingProps`,[Loading API Documents](./loading?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/pull-down-refresh/type.ts) | N
+loading-texts | Array | [] | Typescript:`string[]` | N
+lower-threshold | String / Number | 50 | \- | N
+max-bar-height | String / Number | 80 | \- | N
+refresh-timeout | Number | 3000 | \- | N
+scroll-into-view | String | - | \- | N
+show-scrollbar | Boolean | true | \- | N
+success-duration | String / Number | 500 | \- | N
+upper-threshold | String / Number | 50 | \- | N
+using-custom-navbar | Boolean | false | \- | N
+value | Boolean | false | `v-model:value` is supported | N
+default-value | Boolean | false | uncontrolled property | N
+
+### PullDownRefresh Events
+
+name | params | description
+-- | -- | --
+change | `(context: { value: boolean })` | \-
+dragend | `(context: TouchEvent)` | \-
+dragging | `(context: TouchEvent)` | \-
+dragstart | `(context: TouchEvent)` | \-
+refresh | \- | \-
+scrolltolower | \- | \-
+timeout | \- | \-
+
+### PullDownRefresh Slots
+
+name | Description
+-- | --
+\- | \-
+header | \-
+
+### PullDownRefresh External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-indicator | \-
+t-class-loading | \-
+t-class-text | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-pull-down-refresh-color | @text-color-placeholder | -
diff --git a/uni_modules/tdesign-uniapp/components/pull-down-refresh/README.md b/uni_modules/tdesign-uniapp/components/pull-down-refresh/README.md
new file mode 100644
index 0000000..25b0a55
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/pull-down-refresh/README.md
@@ -0,0 +1,83 @@
+---
+title: PullDownRefresh 下拉刷新
+description: 用于快速刷新页面信息,刷新可以是整页刷新也可以是页面的局部刷新。
+spline: message
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TPullDownRefresh from '@tdesign/uniapp/pull-down-refresh/pull-down-refresh.vue';
+```
+
+### 顶部下拉刷新
+
+由于组件内无法监听页面滚动,需要由页面获取组件实例,并将页面滚动事件传递到组件。
+
+{{ base }}
+
+> 在使用 pull-down-refresh 组件的页面,建议开启 `disableScroll: true`
+
+## API
+
+### PullDownRefresh Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+disabled | Boolean | false | 是否禁用下拉刷新 | N
+enable-back-to-top | Boolean | true | iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向。自 2.27.3 版本开始,若非显式设置为 false,则在显示尺寸大于屏幕 90% 时自动开启 | N
+enable-passive | Boolean | false | 开启 passive 特性,能优化一定的滚动性能 | N
+loading-bar-height | String / Number | 50 | 加载中下拉高度,如果值为数字则单位是:'px' | N
+loading-props | Object | {} | 加载loading样式。TS 类型:`LoadingProps`,[Loading API Documents](./loading?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/pull-down-refresh/type.ts) | N
+loading-texts | Array | [] | 提示语,组件内部默认值为 ['下拉刷新', '松手刷新', '正在刷新', '刷新完成']。TS 类型:`string[]` | N
+lower-threshold | String / Number | 50 | 距底部/右边多远时,触发 scrolltolower 事件 | N
+max-bar-height | String / Number | 80 | 最大下拉高度,如果值为数字则单位是:'px' | N
+refresh-timeout | Number | 3000 | 刷新超时时间 | N
+scroll-into-view | String | - | 值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素 | N
+show-scrollbar | Boolean | true | 滚动条显隐控制 (同时开启 enhanced 属性后生效) | N
+success-duration | String / Number | 500 | 刷新成功提示展示时长,单位 'ms' | N
+upper-threshold | String / Number | 50 | 距顶部/左边多远时,触发 scrolltoupper 事件 | N
+using-custom-navbar | Boolean | false | 是否使用了自定义导航栏 | N
+value | Boolean | false | 组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态。支持语法糖 `v-model:value` | N
+default-value | Boolean | false | 组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态。非受控属性 | N
+
+### PullDownRefresh Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { value: boolean })` | 下拉或收起时触发,用户手势往下滑动触发下拉状态,手势松开触发收起状态
+dragend | `(context: TouchEvent)` | 滑动结束事件
+dragging | `(context: TouchEvent)` | 滑动事件
+dragstart | `(context: TouchEvent)` | 滑动开始事件
+refresh | \- | 结束下拉时触发
+scrolltolower | \- | 滚动到页面底部时触发
+timeout | \- | 刷新超时触发
+
+### PullDownRefresh Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+header | 头部
+
+### PullDownRefresh External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-indicator | 指示样式类
+t-class-loading | 加载样式类
+t-class-text | 文本样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-pull-down-refresh-color | @text-color-placeholder | -
diff --git a/uni_modules/tdesign-uniapp/components/pull-down-refresh/props.ts b/uni_modules/tdesign-uniapp/components/pull-down-refresh/props.ts
new file mode 100644
index 0000000..40d81c4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/pull-down-refresh/props.ts
@@ -0,0 +1,112 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdPullDownRefreshProps } from './type';
+export default {
+ /** 是否禁用下拉刷新 */
+ disabled: Boolean,
+ /** iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向。自 2.27.3 版本开始,若非显式设置为 false,则在显示尺寸大于屏幕 90% 时自动开启 */
+ enableBackToTop: {
+ type: Boolean,
+ default: true,
+ },
+ /** 开启 passive 特性,能优化一定的滚动性能 */
+ enablePassive: Boolean,
+ /** 加载中下拉高度,如果值为数字则单位是:'px' */
+ loadingBarHeight: {
+ type: [String, Number],
+ default: 50 as TdPullDownRefreshProps['loadingBarHeight'],
+ },
+ /** 加载loading样式 */
+ loadingProps: {
+ type: Object,
+ default: () => ({}),
+ },
+ /** 提示语,组件内部默认值为 ['下拉刷新', '松手刷新', '正在刷新', '刷新完成'] */
+ loadingTexts: {
+ type: Array,
+ default: (): TdPullDownRefreshProps['loadingTexts'] => [],
+ },
+ /** 距底部/右边多远时,触发 scrolltolower 事件 */
+ lowerThreshold: {
+ type: [String, Number],
+ default: 50 as TdPullDownRefreshProps['lowerThreshold'],
+ },
+ /** 最大下拉高度,如果值为数字则单位是:'px' */
+ maxBarHeight: {
+ type: [String, Number],
+ default: 80 as TdPullDownRefreshProps['maxBarHeight'],
+ },
+ /** 刷新超时时间 */
+ refreshTimeout: {
+ type: Number,
+ default: 3000,
+ },
+ /** 值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素 */
+ scrollIntoView: {
+ type: String,
+ default: '',
+ },
+ /** 滚动条显隐控制 (同时开启 enhanced 属性后生效) */
+ showScrollbar: {
+ type: Boolean,
+ default: true,
+ },
+ /** 刷新成功提示展示时长,单位 'ms' */
+ successDuration: {
+ type: [String, Number],
+ default: 500 as TdPullDownRefreshProps['successDuration'],
+ },
+ /** 距顶部/左边多远时,触发 scrolltoupper 事件 */
+ upperThreshold: {
+ type: [String, Number],
+ default: 50 as TdPullDownRefreshProps['upperThreshold'],
+ },
+ /** 是否使用了自定义导航栏 */
+ usingCustomNavbar: Boolean,
+ /** 组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态 */
+ value: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态,非受控属性 */
+ defaultValue: Boolean,
+ /** 下拉或收起时触发,用户手势往下滑动触发下拉状态,手势松开触发收起状态 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 滑动结束事件 */
+ onDragend: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 滑动事件 */
+ onDragging: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 滑动开始事件 */
+ onDragstart: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 结束下拉时触发 */
+ onRefresh: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 滚动到页面底部时触发 */
+ onScrolltolower: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 刷新超时触发 */
+ onTimeout: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/pull-down-refresh/pull-down-refresh.css b/uni_modules/tdesign-uniapp/components/pull-down-refresh/pull-down-refresh.css
new file mode 100644
index 0000000..db92310
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/pull-down-refresh/pull-down-refresh.css
@@ -0,0 +1,29 @@
+.t-pull-down-refresh {
+ overflow: hidden;
+ height: 100%;
+}
+.t-pull-down-refresh__track {
+ position: relative;
+}
+.t-pull-down-refresh__track--loosing {
+ transition: transform ease 0.24s;
+}
+.t-pull-down-refresh__tips {
+ position: absolute;
+ color: var(--td-pull-down-refresh-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ font-size: 24rpx;
+ top: 0;
+ width: 100%;
+ transform: translateY(-100%);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+ overflow: hidden;
+}
+.t-pull-down-refresh__tips--loosing {
+ transition: height ease 0.24s;
+}
+.t-pull-down-refresh__text {
+ margin: 16rpx 0 0;
+}
diff --git a/uni_modules/tdesign-uniapp/components/pull-down-refresh/pull-down-refresh.vue b/uni_modules/tdesign-uniapp/components/pull-down-refresh/pull-down-refresh.vue
new file mode 100644
index 0000000..3cd5e5d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/pull-down-refresh/pull-down-refresh.vue
@@ -0,0 +1,366 @@
+
+
+
+
+
+
+
+ {{ dataLoadingTexts[refreshStatus] }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/pull-down-refresh/type.ts b/uni_modules/tdesign-uniapp/components/pull-down-refresh/type.ts
new file mode 100644
index 0000000..f9d2363
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/pull-down-refresh/type.ts
@@ -0,0 +1,118 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdLoadingProps as LoadingProps } from '../loading/type';
+
+export interface TdPullDownRefreshProps {
+ /**
+ * 是否禁用下拉刷新
+ * @default false
+ */
+ disabled?: boolean;
+ /**
+ * iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向。自 2.27.3 版本开始,若非显式设置为 false,则在显示尺寸大于屏幕 90% 时自动开启
+ * @default true
+ */
+ enableBackToTop?: boolean;
+ /**
+ * 开启 passive 特性,能优化一定的滚动性能
+ * @default false
+ */
+ enablePassive?: boolean;
+ /**
+ * 加载中下拉高度,如果值为数字则单位是:'px'
+ * @default 50
+ */
+ loadingBarHeight?: string | number;
+ /**
+ * 加载loading样式
+ * @default {}
+ */
+ loadingProps?: LoadingProps;
+ /**
+ * 提示语,组件内部默认值为 ['下拉刷新', '松手刷新', '正在刷新', '刷新完成']
+ * @default []
+ */
+ loadingTexts?: string[];
+ /**
+ * 距底部/右边多远时,触发 scrolltolower 事件
+ * @default 50
+ */
+ lowerThreshold?: string | number;
+ /**
+ * 最大下拉高度,如果值为数字则单位是:'px'
+ * @default 80
+ */
+ maxBarHeight?: string | number;
+ /**
+ * 刷新超时时间
+ * @default 3000
+ */
+ refreshTimeout?: number;
+ /**
+ * 值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素
+ * @default ''
+ */
+ scrollIntoView?: string;
+ /**
+ * 滚动条显隐控制 (同时开启 enhanced 属性后生效)
+ * @default true
+ */
+ showScrollbar?: boolean;
+ /**
+ * 刷新成功提示展示时长,单位 'ms'
+ * @default 500
+ */
+ successDuration?: string | number;
+ /**
+ * 距顶部/左边多远时,触发 scrolltoupper 事件
+ * @default 50
+ */
+ upperThreshold?: string | number;
+ /**
+ * 是否使用了自定义导航栏
+ * @default false
+ */
+ usingCustomNavbar?: boolean;
+ /**
+ * 组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态
+ * @default false
+ */
+ value?: boolean;
+ /**
+ * 组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态,非受控属性
+ * @default false
+ */
+ defaultValue?: boolean;
+ /**
+ * 下拉或收起时触发,用户手势往下滑动触发下拉状态,手势松开触发收起状态
+ */
+ onChange?: (context: { value: boolean }) => void;
+ /**
+ * 滑动结束事件
+ */
+ onDragend?: (context: TouchEvent) => void;
+ /**
+ * 滑动事件
+ */
+ onDragging?: (context: TouchEvent) => void;
+ /**
+ * 滑动开始事件
+ */
+ onDragstart?: (context: TouchEvent) => void;
+ /**
+ * 结束下拉时触发
+ */
+ onRefresh?: () => void;
+ /**
+ * 滚动到页面底部时触发
+ */
+ onScrolltolower?: () => void;
+ /**
+ * 刷新超时触发
+ */
+ onTimeout?: () => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/README.en-US.md b/uni_modules/tdesign-uniapp/components/qrcode/README.en-US.md
new file mode 100644
index 0000000..3340f07
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/README.en-US.md
@@ -0,0 +1,40 @@
+:: BASE_DOC ::
+
+## API
+
+### QRCode Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+bg-color | String | - | QR code background color | N
+borderless | Boolean | false | Is there a border | N
+color | String | - | QR code color | N
+icon | String | - | The address of the picture in the QR code | N
+icon-size | Number / Object | 40 | The size of the picture in the QR code。Typescript:`number \| { width: number; height: number }` | N
+level | String | M | QR code error correction level。options: L/M/Q/H | N
+size | Number | 160 | QR code size | N
+status | String | active | QR code status。options: active/expired/loading/scanned。Typescript:`QRStatus` `type QRStatus = "active" \| "expired" \| "loading" \| "scanned"`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/qrcode/type.ts) | N
+status-render | Boolean | false | should use custom status slot | N
+value | String | - | scanned text | N
+
+### QRCode Events
+
+name | params | description
+-- | -- | --
+refresh | \- | Click the "Click to refresh" callback
+
+### QRCode Slots
+
+name | Description
+-- | --
+status-render | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-font-size-title-small | --td-font-size-title-small | -
+--td-brand-color-hover | --td-brand-color-hover | -
+--td-success-color | --td-success-color | -
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/README.md b/uni_modules/tdesign-uniapp/components/qrcode/README.md
new file mode 100644
index 0000000..7a70dff
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/README.md
@@ -0,0 +1,97 @@
+---
+title: QRCode 二维码
+description: 二维码能够将文本转换生成二维码的组件,支持自定义配色和 Logo 配置。
+spline: message
+isComponent: true
+---
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TQRCode from '@tdesign/uniapp/qrcode/qrcode.vue';
+```
+
+### 01 组件类型
+
+#### 基本用法
+
+{{ base }}
+
+#### 带 Icon 的二维码
+
+{{ icon }}
+
+
+
+#### 二维码纠错等级
+
+{{ level }}
+
+### 02 组件状态
+
+{{ status }}
+
+### 03 组件样式
+
+#### 二维码颜色
+
+{{ color }}
+
+#### 二维码尺寸
+
+{{ size }}
+
+
+### FAQ
+
+#### 关于二维码纠错等级
+纠错等级也叫纠错率,就是指二维码可以被遮挡后还能正常扫描,而这个能被遮挡的最大面积就是纠错率。
+
+通常情况下二维码分为 4 个纠错级别:`L级` 可纠正约 `7%` 错误、`M级` 可纠正约 `15%` 错误、`Q级` 可纠正约 `25%` 错误、`H级` 可纠正约 `30%` 错误。但并不是所有位置都可以缺损,像最明显的三个角上的方框,直接影响初始定位。中间零散的部分是内容编码,可以容忍缺损。当二维码的内容编码携带信息比较少的时候,也就是链接比较短的时候,设置不同的纠错等级,生成的图片不会发生变化。
+有关更多信息,可参阅[官方文档](https://www.qrcode.com/zh/about/error_correction)的相关资料
+
+#### 生成的二维码无法扫描?
+若二维码无法扫码识别,可能是因为链接地址过长导致像素过于密集,可以通过 `size` 配置二维码更大,或者通过短链接服务等方式将链接变短。
+
+##
+
+## API
+
+### QRCode Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+bg-color | String | - | 二维码背景颜色 | N
+borderless | Boolean | false | 是否有边框 | N
+color | String | - | 二维码颜色 | N
+icon | String | - | 二维码中图片的地址 | N
+icon-size | Number / Object | 40 | 二维码中图片的大小。TS 类型:`number \| { width: number; height: number }` | N
+level | String | M | 二维码纠错等级。可选项:L/M/Q/H | N
+size | Number | 160 | 二维码大小 | N
+status | String | active | 二维码状态。可选项:active/expired/loading/scanned。TS 类型:`QRStatus` `type QRStatus = "active" \| "expired" \| "loading" \| "scanned"`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/qrcode/type.ts) | N
+status-render | Boolean | false | 是否启用自定义渲染 | N
+value | String | - | 扫描后的文本 | N
+
+### QRCode Events
+
+名称 | 参数 | 描述
+-- | -- | --
+refresh | \- | 点击"点击刷新"的回调
+
+### QRCode Slots
+
+名称 | 描述
+-- | --
+status-render | 自定义状态渲染器
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-font-size-title-small | --td-font-size-title-small | -
+--td-brand-color-hover | --td-brand-color-hover | -
+--td-success-color | --td-success-color | -
\ No newline at end of file
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-canvas/props.ts b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-canvas/props.ts
new file mode 100644
index 0000000..85304f1
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-canvas/props.ts
@@ -0,0 +1,48 @@
+export default {
+ // 二维码内容
+ value: {
+ type: String,
+ default: '',
+ },
+ // 中心图标路径
+ icon: {
+ type: String,
+ default: '',
+ },
+ // 二维码大小(单位rpx)
+ size: {
+ type: Number,
+ default: 160,
+ },
+ // 中心图标大小(单位px)
+ iconSize: {
+ type: [Number, Object],
+ default: 40,
+ },
+ // 纠错等级
+ level: {
+ type: String,
+ default: 'M',
+ validator: (value: string) => ['L', 'M', 'Q', 'H'].includes(value),
+ },
+ // 背景色
+ bgColor: {
+ type: String,
+ default: '#FFFFFF',
+ },
+ // 二维码颜色
+ color: {
+ type: String,
+ default: '#000000',
+ },
+ // 是否包含边距
+ includeMargin: {
+ type: Boolean,
+ default: false,
+ },
+ // 边距大小(单位rpx)
+ marginSize: {
+ type: Number,
+ default: 0,
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-canvas/qrcode-canvas.css b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-canvas/qrcode-canvas.css
new file mode 100644
index 0000000..93c4a36
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-canvas/qrcode-canvas.css
@@ -0,0 +1,7 @@
+.t-qrcode__canvas-wrapper {
+ display: inline-block;
+ position: relative;
+}
+.t-qrcode__canvas {
+ display: block;
+}
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-canvas/qrcode-canvas.vue b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-canvas/qrcode-canvas.vue
new file mode 100644
index 0000000..9487fba
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-canvas/qrcode-canvas.vue
@@ -0,0 +1,413 @@
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-status/props.ts b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-status/props.ts
new file mode 100644
index 0000000..93aae71
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-status/props.ts
@@ -0,0 +1,22 @@
+export default {
+ // 二维码状态
+ status: {
+ type: String,
+ default: 'active',
+ validator: (value: string) => ['active', 'expired', 'loading', 'scanned'].includes(value),
+ },
+ // 本地化文本配置
+ locale: {
+ type: Object,
+ default: () => ({
+ expiredText: '二维码过期',
+ refreshText: '点击刷新',
+ scannedText: '已扫描',
+ }),
+ },
+ // 是否启用自定义渲染
+ statusRender: {
+ type: Boolean,
+ default: false,
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-status/qrcode-status.css b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-status/qrcode-status.css
new file mode 100644
index 0000000..78b6ea0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-status/qrcode-status.css
@@ -0,0 +1,25 @@
+.t-expired__text {
+ color: var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
+ font-weight: 600;
+}
+.t-expired__button {
+ display: flex;
+ color: var(--td-brand-color, var(--td-primary-color-7, #0052d9));
+ box-shadow: none;
+ cursor: pointer;
+ column-gap: 8px;
+ align-items: center;
+ height: 32px;
+ transition: all 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
+}
+.t-expired__button:hover {
+ color: var(--td-brand-color-hover);
+}
+.t-scanned {
+ display: flex;
+ column-gap: 8px;
+ align-items: center;
+}
+.t-scanned__icon {
+ color: var(--td-success-color);
+}
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-status/qrcode-status.vue b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-status/qrcode-status.vue
new file mode 100644
index 0000000..e5194a8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-status/qrcode-status.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+ {{ locale.expiredText }}
+
+
+ {{ locale.refreshText }}
+
+
+
+
+
+
+
+
+
+
+ {{ locale.scannedText }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-status/type.ts b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-status/type.ts
new file mode 100644
index 0000000..aa79fe7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/components/qrcode-status/type.ts
@@ -0,0 +1,25 @@
+export interface QRCodeStatusProps {
+ /**
+ * 二维码状态
+ * @default 'active'
+ */
+ status?: 'active' | 'expired' | 'loading' | 'scanned';
+
+ /**
+ * 本地化文本配置
+ */
+ locale?: {
+ /** 过期提示文本 */
+ expiredText?: string;
+ /** 刷新按钮文本 */
+ refreshText?: string;
+ /** 已扫描提示文本 */
+ scannedText?: string;
+ };
+
+ /**
+ * 是否启用自定义渲染
+ * @default false
+ */
+ statusRender?: boolean;
+}
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/hooks/useQRCode.js b/uni_modules/tdesign-uniapp/components/qrcode/hooks/useQRCode.js
new file mode 100644
index 0000000..abf1955
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/hooks/useQRCode.js
@@ -0,0 +1,25 @@
+import { QrCode, QrSegment } from '../../common/shared/qrcode/qrcodegen';
+import { ERROR_LEVEL_MAP, getImageSettings, getMarginSize } from '../../common/shared/qrcode/utils';
+
+const useQRCode = (opt) => {
+ const { value, level, minVersion, includeMargin, marginSize, imageSettings, size } = opt;
+
+ const qrcode = (() => {
+ const segments = QrSegment.makeSegments(value);
+ return QrCode.encodeSegments(segments, ERROR_LEVEL_MAP[level], minVersion);
+ })();
+
+ const cells = qrcode.getModules();
+ const margin = getMarginSize(includeMargin, marginSize);
+ const calculatedImageSettings = getImageSettings(cells, size, margin, imageSettings);
+
+ return {
+ cells,
+ margin,
+ numCells: cells.length + margin * 2,
+ calculatedImageSettings,
+ qrcode,
+ };
+};
+
+export default useQRCode;
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/props.ts b/uni_modules/tdesign-uniapp/components/qrcode/props.ts
new file mode 100644
index 0000000..ec5f3da
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/props.ts
@@ -0,0 +1,66 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdQRCodeProps } from './type';
+export default {
+ /** 二维码背景颜色 */
+ bgColor: {
+ type: String,
+ default: '',
+ },
+ /** 是否有边框 */
+ borderless: Boolean,
+ /** 二维码颜色 */
+ color: {
+ type: String,
+ default: '',
+ },
+ /** 二维码中图片的地址 */
+ icon: {
+ type: String,
+ default: '',
+ },
+ /** 二维码中图片的大小 */
+ iconSize: {
+ type: [Number, Object],
+ default: 40 as TdQRCodeProps['iconSize'],
+ },
+ /** 二维码纠错等级 */
+ level: {
+ type: String,
+ default: 'M' as TdQRCodeProps['level'],
+ validator(val: TdQRCodeProps['level']): boolean {
+ if (!val) return true;
+ return ['L', 'M', 'Q', 'H'].includes(val);
+ },
+ },
+ /** 二维码大小 */
+ size: {
+ type: Number,
+ default: 160,
+ },
+ /** 二维码状态 */
+ status: {
+ type: String,
+ default: 'active' as TdQRCodeProps['status'],
+ validator(val: TdQRCodeProps['status']): boolean {
+ if (!val) return true;
+ return ['active', 'expired', 'loading', 'scanned'].includes(val);
+ },
+ },
+ /** 是否启用自定义渲染 */
+ statusRender: Boolean,
+ /** 扫描后的文本 */
+ value: {
+ type: String,
+ default: '',
+ },
+ /** 点击"点击刷新"的回调 */
+ onRefresh: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/qrcode.css b/uni_modules/tdesign-uniapp/components/qrcode/qrcode.css
new file mode 100644
index 0000000..4e1366a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/qrcode.css
@@ -0,0 +1,31 @@
+.t-qrcode {
+ position: relative;
+ display: flex;
+ box-sizing: border-box;
+ background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+ padding: 24rpx;
+ border-radius: 12rpx;
+ border: 1px solid var(--td-component-border, var(--td-gray-color-4, #dcdcdc));
+}
+.t-qrcode.t-borderless {
+ border-color: transparent;
+}
+.t-qrcode .t-mask {
+ left: 0;
+ top: 0;
+ position: absolute;
+ inset-block-start: 0;
+ inset-inline-start: 0;
+ z-index: 300;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+ height: 100%;
+ color: var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
+ background-color: var(--td-mask-background, rgba(255, 255, 255, 0.96));
+ text-align: center;
+ border-radius: 12rpx;
+ font: var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/qrcode.vue b/uni_modules/tdesign-uniapp/components/qrcode/qrcode.vue
new file mode 100644
index 0000000..07da5b7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/qrcode.vue
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/qrcode/type.ts b/uni_modules/tdesign-uniapp/components/qrcode/type.ts
new file mode 100644
index 0000000..ebd6961
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/qrcode/type.ts
@@ -0,0 +1,66 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdQRCodeProps {
+ /**
+ * 二维码背景颜色
+ * @default ''
+ */
+ bgColor?: string;
+ /**
+ * 是否有边框
+ * @default false
+ */
+ borderless?: boolean;
+ /**
+ * 二维码颜色
+ * @default ''
+ */
+ color?: string;
+ /**
+ * 二维码中图片的地址
+ * @default ''
+ */
+ icon?: string;
+ /**
+ * 二维码中图片的大小
+ * @default 40
+ */
+ iconSize?: number | { width: number; height: number };
+ /**
+ * 二维码纠错等级
+ * @default M
+ */
+ level?: 'L' | 'M' | 'Q' | 'H';
+ /**
+ * 二维码大小
+ * @default 160
+ */
+ size?: number;
+ /**
+ * 二维码状态
+ * @default active
+ */
+ status?: QRStatus;
+ /**
+ * 是否启用自定义渲染
+ * @default false
+ */
+ statusRender?: boolean;
+ /**
+ * 扫描后的文本
+ * @default ''
+ */
+ value?: string;
+ /**
+ * 点击"点击刷新"的回调
+ */
+ onRefresh?: () => void;
+}
+
+export type QRStatus = 'active' | 'expired' | 'loading' | 'scanned';
+
+export type StatusRenderInfo = { status: QRStatus; onRefresh?: () => void };
diff --git a/uni_modules/tdesign-uniapp/components/radio-group/props.ts b/uni_modules/tdesign-uniapp/components/radio-group/props.ts
new file mode 100644
index 0000000..2be472a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/radio-group/props.ts
@@ -0,0 +1,68 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdRadioGroupProps } from './type';
+export default {
+ /** 是否允许取消选中 */
+ allowUncheck: Boolean,
+ /** 是否开启无边框模式 */
+ borderless: Boolean,
+ /** 是否禁用全部子单选框 */
+ disabled: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 自定义选中图标和非选中图标。示例:[选中态图标,非选中态图标]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标;仅在使用 options 时生效 */
+ icon: {
+ type: [String, Array],
+ default: 'circle' as TdRadioGroupProps['icon'],
+ },
+ /** 用来定义 value / label / disabled 在 `options` 中对应的字段别名 */
+ keys: {
+ type: Object,
+ },
+ /** HTML 元素原生属性 */
+ name: {
+ type: String,
+ default: '',
+ },
+ /** 单选组件按钮形式。RadioOption 数据类型为 string 或 number 时,表示 label 和 value 值相同 */
+ options: {
+ type: Array,
+ },
+ /** 复选框和内容相对位置。优先级低于 Radio.placement */
+ placement: {
+ type: String,
+ default: 'left' as TdRadioGroupProps['placement'],
+ validator(val: TdRadioGroupProps['placement']): boolean {
+ if (!val) return true;
+ return ['left', 'right'].includes(val);
+ },
+ },
+ /** 只读状态 */
+ readonly: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** -1 时代表独立,不再寻找 parent,用于头条小程序 */
+ relationKey: {
+ type: String,
+ default: '',
+ },
+ /** 选中的值 */
+ value: {
+ type: [String, Number, Boolean],
+ },
+ /** 选中的值,非受控属性 */
+ defaultValue: {
+ type: [String, Number, Boolean],
+ },
+ /** 选中值发生变化时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/radio-group/radio-group.css b/uni_modules/tdesign-uniapp/components/radio-group/radio-group.css
new file mode 100644
index 0000000..e69de29
diff --git a/uni_modules/tdesign-uniapp/components/radio-group/radio-group.vue b/uni_modules/tdesign-uniapp/components/radio-group/radio-group.vue
new file mode 100644
index 0000000..f526ee2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/radio-group/radio-group.vue
@@ -0,0 +1,205 @@
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/radio-group/type.ts b/uni_modules/tdesign-uniapp/components/radio-group/type.ts
new file mode 100644
index 0000000..52655e2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/radio-group/type.ts
@@ -0,0 +1,79 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { RadioValue } from '../radio/type';
+import type { KeysType } from '../common/common';
+
+export interface TdRadioGroupProps {
+ /**
+ * 是否允许取消选中
+ * @default false
+ */
+ allowUncheck?: boolean;
+ /**
+ * 是否开启无边框模式
+ * @default false
+ */
+ borderless?: boolean;
+ /**
+ * 是否禁用全部子单选框
+ */
+ disabled?: boolean;
+ /**
+ * 自定义选中图标和非选中图标。示例:[选中态图标,非选中态图标]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标;仅在使用 options 时生效
+ * @default 'circle'
+ */
+ icon?: 'circle' | 'line' | 'dot' | Array;
+ /**
+ * 用来定义 value / label / disabled 在 `options` 中对应的字段别名
+ */
+ keys?: KeysType;
+ /**
+ * HTML 元素原生属性
+ * @default ''
+ */
+ name?: string;
+ /**
+ * 单选组件按钮形式。RadioOption 数据类型为 string 或 number 时,表示 label 和 value 值相同
+ */
+ options?: Array;
+ /**
+ * 复选框和内容相对位置。优先级低于 Radio.placement
+ * @default left
+ */
+ placement?: 'left' | 'right';
+ /**
+ * 只读状态
+ */
+ readonly?: boolean;
+ /**
+ * -1 时代表独立,不再寻找 parent,用于头条小程序
+ * @default ''
+ */
+ relationKey?: string;
+ /**
+ * 选中的值
+ */
+ value?: T;
+ /**
+ * 选中的值,非受控属性
+ */
+ defaultValue?: T;
+ /**
+ * 选中值发生变化时触发
+ */
+ onChange?: (context: { value: RadioValue }) => void;
+}
+
+export type RadioOption = string | number | RadioOptionObj;
+
+export interface RadioOptionObj {
+ label?: string;
+ value?: string | number;
+ readonly?: boolean;
+ disabled?: boolean;
+ allowUncheck?: boolean;
+}
diff --git a/uni_modules/tdesign-uniapp/components/radio/README.en-US.md b/uni_modules/tdesign-uniapp/components/radio/README.en-US.md
new file mode 100644
index 0000000..e07513f
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/radio/README.en-US.md
@@ -0,0 +1,104 @@
+:: BASE_DOC ::
+
+## API
+
+### Radio Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+allow-uncheck | Boolean | false | \- | N
+block | Boolean | true | \- | N
+checked | Boolean | false | `v-model:checked` is supported | N
+default-checked | Boolean | false | uncontrolled property | N
+content | String | - | \- | N
+content-disabled | Boolean | false | \- | N
+disabled | Boolean | undefined | \- | N
+icon | String / Array | 'circle' | Typescript:`'circle' \| 'line' \| 'dot' \| Array` | N
+label | String | - | \- | N
+max-content-row | Number | 5 | \- | N
+max-label-row | Number | 3 | \- | N
+name | String | - | \- | N
+placement | String | - | options: left/right | N
+readonly | Boolean | undefined | \- | N
+relation-key | String | - | \- | N
+value | String / Number / Boolean | false | Typescript:`T` `type RadioValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/radio/type.ts) | N
+
+### Radio Events
+
+name | params | description
+-- | -- | --
+change | `(context: { checked: boolean })` | \-
+
+### Radio Slots
+
+name | Description
+-- | --
+\- | \-
+content | \-
+icon | \-
+label | \-
+
+### Radio External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-border | \-
+t-class-content | \-
+t-class-icon | \-
+t-class-label | \-
+
+
+### RadioGroup Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+allow-uncheck | Boolean | false | \- | N
+borderless | Boolean | false | \- | N
+disabled | Boolean | undefined | \- | N
+icon | String / Array | 'circle' | Typescript:`'circle' \| 'line' \| 'dot' \| Array` | N
+keys | Object | - | Typescript:`KeysType`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+name | String | - | \- | N
+options | Array | - | Typescript:`Array` `type RadioOption = string \| number \| RadioOptionObj` `interface RadioOptionObj { label?: string; value?: string \| number; readonly?: boolean; disabled?: boolean; allowUncheck?: boolean; }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/radio-group/type.ts) | N
+placement | String | left | options: left/right | N
+readonly | Boolean | undefined | \- | N
+relation-key | String | - | \- | N
+value | String / Number / Boolean | - | `v-model:value` is supported。Typescript:`T`,[Radio API Documents](./radio?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/radio-group/type.ts) | N
+default-value | String / Number / Boolean | - | uncontrolled property。Typescript:`T`,[Radio API Documents](./radio?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/radio-group/type.ts) | N
+
+### RadioGroup Events
+
+name | params | description
+-- | -- | --
+change | `(context: { value: RadioValue })` | \-
+
+### RadioGroup Slots
+
+name | Description
+-- | --
+\- | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-radio-bg-color | @bg-color-container | -
+--td-radio-border-color | @component-stroke | -
+--td-radio-content-checked-color | @text-color-secondary | -
+--td-radio-content-color | @text-color-secondary | -
+--td-radio-content-disabled-color | @text-color-disabled | -
+--td-radio-content-font | @font-body-medium | -
+--td-radio-font | @font-body-large | -
+--td-radio-icon-checked-color | @brand-color | -
+--td-radio-icon-color | @component-border | -
+--td-radio-icon-disabled-bg-color | @bg-color-component-disabled | -
+--td-radio-icon-disabled-color | @brand-color-disabled | -
+--td-radio-icon-size | 48rpx | -
+--td-radio-label-checked-color | @text-color-primary | -
+--td-radio-label-color | @text-color-primary | -
+--td-radio-label-disabled-color | @text-color-disabled | -
+--td-radio-label-line-height | 48rpx | -
+--td-radio-vertical-padding | 32rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/radio/README.md b/uni_modules/tdesign-uniapp/components/radio/README.md
new file mode 100644
index 0000000..f8e43f5
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/radio/README.md
@@ -0,0 +1,148 @@
+---
+title: Radio 单选框
+description: 用于在预设的一组选项中执行单项选择,并呈现选择结果。
+spline: form
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TRadio from '@tdesign/uniapp/radio/radio.vue';
+import TRadioGroup from '@tdesign/uniapp/radio-group/radio-group.vue';
+```
+
+### 纵向单选框
+
+{{ base }}
+
+### 横向单选框
+
+{{ horizontal }}
+
+### 单选框状态
+
+{{ status }}
+
+### 勾选样式
+
+{{ theme }}
+
+### 勾选显示位置
+
+{{ align }}
+
+### 非通栏单选样式
+
+{{ card }}
+
+### 特殊样式
+
+{{ special }}
+
+## API
+
+### Radio Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+allow-uncheck | Boolean | false | 是否允许取消选中 | N
+block | Boolean | true | 是否为块级元素 | N
+checked | Boolean | false | 是否选中。支持语法糖 `v-model:checked` | N
+default-checked | Boolean | false | 是否选中。非受控属性 | N
+content | String | - | 单选内容 | N
+content-disabled | Boolean | false | 是否禁用组件内容(content)触发选中 | N
+disabled | Boolean | undefined | 是否为禁用态 | N
+icon | String / Array | 'circle' | 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标]`。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标,值为 slot 时使用插槽。TS 类型:`'circle' \| 'line' \| 'dot' \| Array` | N
+label | String | - | 主文案 | N
+max-content-row | Number | 5 | 内容最大行数限制 | N
+max-label-row | Number | 3 | 主文案最大行数限制 | N
+name | String | - | HTML 元素原生属性 | N
+placement | String | - | 复选框和内容相对位置。优先级高于 RadioGroup.placement。Radio 单独存在时,默认值为 left。如果父组件存在 RadioGroup,默认值便由 RadioGroup.placement 决定。可选项:left/right | N
+readonly | Boolean | undefined | 只读状态 | N
+relation-key | String | - | -1 时代表独立,不再寻找 parent,用于头条小程序 | N
+value | String / Number / Boolean | false | 单选按钮的值。TS 类型:`T` `type RadioValue = string \| number \| boolean`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/radio/type.ts) | N
+
+### Radio Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { checked: boolean })` | 值变化时触发
+
+### Radio Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,主文案
+content | 自定义 `content` 显示内容
+icon | 自定义选中图标和非选中图标
+label | 自定义 `label` 显示内容
+
+### Radio External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-border | 边框样式类
+t-class-content | 内容样式类
+t-class-icon | 图标样式类
+t-class-label | 标签样式类
+
+
+### RadioGroup Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+allow-uncheck | Boolean | false | 是否允许取消选中 | N
+borderless | Boolean | false | 是否开启无边框模式 | N
+disabled | Boolean | undefined | 是否禁用全部子单选框 | N
+icon | String / Array | 'circle' | 自定义选中图标和非选中图标。示例:[选中态图标,非选中态图标]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标;仅在使用 options 时生效。TS 类型:`'circle' \| 'line' \| 'dot' \| Array` | N
+keys | Object | - | 用来定义 value / label / disabled 在 `options` 中对应的字段别名。TS 类型:`KeysType`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/common/common.ts) | N
+name | String | - | HTML 元素原生属性 | N
+options | Array | - | 单选组件按钮形式。RadioOption 数据类型为 string 或 number 时,表示 label 和 value 值相同。TS 类型:`Array` `type RadioOption = string \| number \| RadioOptionObj` `interface RadioOptionObj { label?: string; value?: string \| number; readonly?: boolean; disabled?: boolean; allowUncheck?: boolean; }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/radio-group/type.ts) | N
+placement | String | left | 复选框和内容相对位置。优先级低于 Radio.placement。可选项:left/right | N
+readonly | Boolean | undefined | 只读状态 | N
+relation-key | String | - | -1 时代表独立,不再寻找 parent,用于头条小程序 | N
+value | String / Number / Boolean | - | 选中的值。支持语法糖 `v-model:value`。TS 类型:`T`,[Radio API Documents](./radio?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/radio-group/type.ts) | N
+default-value | String / Number / Boolean | - | 选中的值。非受控属性。TS 类型:`T`,[Radio API Documents](./radio?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/radio-group/type.ts) | N
+
+### RadioGroup Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { value: RadioValue })` | 选中值发生变化时触发
+
+### RadioGroup Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,单选框组内容
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-radio-bg-color | @bg-color-container | -
+--td-radio-border-color | @component-stroke | -
+--td-radio-content-checked-color | @text-color-secondary | -
+--td-radio-content-color | @text-color-secondary | -
+--td-radio-content-disabled-color | @text-color-disabled | -
+--td-radio-content-font | @font-body-medium | -
+--td-radio-font | @font-body-large | -
+--td-radio-icon-checked-color | @brand-color | -
+--td-radio-icon-color | @component-border | -
+--td-radio-icon-disabled-bg-color | @bg-color-component-disabled | -
+--td-radio-icon-disabled-color | @brand-color-disabled | -
+--td-radio-icon-size | 48rpx | -
+--td-radio-label-checked-color | @text-color-primary | -
+--td-radio-label-color | @text-color-primary | -
+--td-radio-label-disabled-color | @text-color-disabled | -
+--td-radio-label-line-height | 48rpx | -
+--td-radio-vertical-padding | 32rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/radio/props.ts b/uni_modules/tdesign-uniapp/components/radio/props.ts
new file mode 100644
index 0000000..9dc8e92
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/radio/props.ts
@@ -0,0 +1,86 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdRadioProps } from './type';
+export default {
+ /** 是否允许取消选中 */
+ allowUncheck: Boolean,
+ /** 是否为块级元素 */
+ block: {
+ type: Boolean,
+ default: true,
+ },
+ /** 是否选中 */
+ checked: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 是否选中,非受控属性 */
+ defaultChecked: Boolean,
+ /** 单选内容 */
+ content: {
+ type: String,
+ },
+ /** 是否禁用组件内容(content)触发选中 */
+ contentDisabled: Boolean,
+ /** 是否为禁用态 */
+ disabled: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标]`。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标,值为 slot 时使用插槽 */
+ icon: {
+ type: [String, Array],
+ default: 'circle' as TdRadioProps['icon'],
+ },
+ /** 主文案 */
+ label: {
+ type: String,
+ },
+ /** 内容最大行数限制 */
+ maxContentRow: {
+ type: Number,
+ default: 5,
+ },
+ /** 主文案最大行数限制 */
+ maxLabelRow: {
+ type: Number,
+ default: 3,
+ },
+ /** HTML 元素原生属性 */
+ name: {
+ type: String,
+ default: '',
+ },
+ /** 复选框和内容相对位置。优先级高于 RadioGroup.placement。Radio 单独存在时,默认值为 left。如果父组件存在 RadioGroup,默认值便由 RadioGroup.placement 决定 */
+ placement: {
+ type: String,
+ validator(val: TdRadioProps['placement']): boolean {
+ if (!val) return true;
+ return ['left', 'right'].includes(val);
+ },
+ },
+ /** 只读状态 */
+ readonly: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** -1 时代表独立,不再寻找 parent,用于头条小程序 */
+ relationKey: {
+ type: String,
+ default: '',
+ },
+ /** 单选按钮的值 */
+ value: {
+ type: [String, Number, Boolean],
+ default: false as TdRadioProps['value'],
+ },
+ /** 值变化时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/radio/radio.css b/uni_modules/tdesign-uniapp/components/radio/radio.css
new file mode 100644
index 0000000..f111a67
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/radio/radio.css
@@ -0,0 +1,177 @@
+.limit-title-row {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+}
+.t-radio {
+ position: relative;
+ display: inline-flex;
+ vertical-align: middle;
+ background: var(--td-radio-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
+}
+.t-radio:focus {
+ outline: 0;
+}
+.t-radio--block {
+ display: flex;
+ padding: var(--td-radio-vertical-padding, 32rpx);
+}
+.t-radio--right {
+ flex-direction: row-reverse;
+}
+.t-radio__icon {
+ position: relative;
+ margin-top: calc((var(--td-radio-label-line-height, 48rpx) - var(--td-radio-icon-size, 48rpx)) / 2);
+ width: var(--td-radio-icon-size, 48rpx);
+ height: var(--td-radio-icon-size, 48rpx);
+ font-size: var(--td-radio-icon-size, 48rpx);
+ color: var(--td-radio-icon-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+ overflow: hidden;
+}
+.t-radio__icon:empty {
+ display: none;
+}
+.t-radio__icon--left {
+ margin-right: 16rpx;
+}
+.t-radio__icon--checked {
+ color: var(--td-radio-icon-checked-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-radio__icon--disabled {
+ cursor: not-allowed;
+ color: var(--td-radio-icon-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-radio__icon-circle {
+ width: var(--td-radio-icon-size, 48rpx);
+ height: var(--td-radio-icon-size, 48rpx);
+ box-sizing: border-box;
+}
+.t-radio__icon-circle::after {
+ content: '';
+ width: calc(200% - 6rpx);
+ height: calc(200% - 6rpx);
+ border-radius: 50%;
+ border: 3px solid var(--td-radio-icon-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%) scale(0.5);
+ box-sizing: border-box;
+}
+.t-radio__icon-circle--disabled::after {
+ background: var(--td-radio-icon-disabled-bg-color, var(--td-bg-color-component-disabled, var(--td-gray-color-2, #eeeeee)));
+}
+.t-radio__icon-line::before,
+.t-radio__icon-line::after {
+ content: '';
+ display: block;
+ position: absolute;
+ width: 5rpx;
+ border-radius: 2rpx;
+ background: var(--td-radio-icon-checked-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ transform-origin: top center;
+}
+.t-radio__icon-line::before {
+ height: 16rpx;
+ left: 8rpx;
+ top: 22rpx;
+ transform: rotate(-45deg);
+}
+.t-radio__icon-line::after {
+ height: 26rpx;
+ right: 8rpx;
+ top: 14rpx;
+ transform: rotate(45deg);
+}
+.t-radio__icon-line--disabled::before,
+.t-radio__icon-line--disabled::after {
+ background: var(--td-radio-icon-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-radio__icon-dot {
+ width: calc((var(--td-radio-icon-size, 48rpx) - 6rpx) * 2);
+ height: calc((var(--td-radio-icon-size, 48rpx) - 6rpx) * 2);
+ border: 6rpx solid var(--td-radio-icon-checked-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ border-radius: 50%;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%) scale(0.5);
+ box-sizing: border-box;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.t-radio__icon-dot::after {
+ content: '';
+ display: block;
+ width: var(--td-radio-icon-size, 48rpx);
+ height: var(--td-radio-icon-size, 48rpx);
+ background: var(--td-radio-icon-checked-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ border-radius: 50%;
+}
+.t-radio__icon-dot--disabled {
+ border-color: var(--td-radio-icon-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-radio__icon-dot--disabled::after {
+ background: var(--td-radio-icon-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-radio__image {
+ line-height: var(--td-radio-icon-size, 48rpx);
+}
+.t-radio-icon__image {
+ height: var(--td-radio-icon-size, 48rpx);
+ width: var(--td-radio-icon-size, 48rpx);
+ vertical-align: sub;
+}
+.t-radio__content {
+ flex: 1;
+}
+.t-radio__content:empty {
+ display: none;
+}
+.t-radio__title {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ color: var(--td-radio-label-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font: var(--td-radio-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-radio__title--checked {
+ color: var(--td-radio-label-checked-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-radio__title--disabled {
+ cursor: not-allowed;
+ color: var(--td-radio-label-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-radio__description {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ color: var(--td-radio-content-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
+ font: var(--td-radio-content-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-radio__description--checked {
+ color: var(--td-radio-content-checked-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
+}
+.t-radio__description--disabled {
+ cursor: not-allowed;
+ color: var(--td-radio-content-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-radio__description:empty {
+ display: none;
+}
+.t-radio__title + .t-radio__description {
+ margin-top: 8rpx;
+}
+.t-radio__border {
+ position: absolute;
+ bottom: 0;
+ height: 1px;
+ background: var(--td-radio-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
+ left: 96rpx;
+ right: 0;
+ transform: scaleY(0.5);
+}
+.t-radio__border--right {
+ left: 32rpx;
+}
diff --git a/uni_modules/tdesign-uniapp/components/radio/radio.vue b/uni_modules/tdesign-uniapp/components/radio/radio.vue
new file mode 100644
index 0000000..a7ac0e0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/radio/radio.vue
@@ -0,0 +1,227 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+ {{ content }}
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/radio/type.ts b/uni_modules/tdesign-uniapp/components/radio/type.ts
new file mode 100644
index 0000000..e34c462
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/radio/type.ts
@@ -0,0 +1,89 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdRadioProps {
+ /**
+ * 是否允许取消选中
+ * @default false
+ */
+ allowUncheck?: boolean;
+ /**
+ * 是否为块级元素
+ * @default true
+ */
+ block?: boolean;
+ /**
+ * 是否选中
+ * @default false
+ */
+ checked?: boolean;
+ /**
+ * 是否选中,非受控属性
+ * @default false
+ */
+ defaultChecked?: boolean;
+ /**
+ * 单选内容
+ */
+ content?: string;
+ /**
+ * 是否禁用组件内容(content)触发选中
+ * @default false
+ */
+ contentDisabled?: boolean;
+ /**
+ * 是否为禁用态
+ */
+ disabled?: boolean;
+ /**
+ * 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标]`。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标,值为 slot 时使用插槽
+ * @default 'circle'
+ */
+ icon?: 'circle' | 'line' | 'dot' | Array;
+ /**
+ * 主文案
+ */
+ label?: string;
+ /**
+ * 内容最大行数限制
+ * @default 5
+ */
+ maxContentRow?: number;
+ /**
+ * 主文案最大行数限制
+ * @default 3
+ */
+ maxLabelRow?: number;
+ /**
+ * HTML 元素原生属性
+ * @default ''
+ */
+ name?: string;
+ /**
+ * 复选框和内容相对位置。优先级高于 RadioGroup.placement。Radio 单独存在时,默认值为 left。如果父组件存在 RadioGroup,默认值便由 RadioGroup.placement 决定
+ */
+ placement?: 'left' | 'right';
+ /**
+ * 只读状态
+ */
+ readonly?: boolean;
+ /**
+ * -1 时代表独立,不再寻找 parent,用于头条小程序
+ * @default ''
+ */
+ relationKey?: string;
+ /**
+ * 单选按钮的值
+ * @default false
+ */
+ value?: T;
+ /**
+ * 值变化时触发
+ */
+ onChange?: (context: { checked: boolean }) => void;
+}
+
+export type RadioValue = string | number | boolean;
diff --git a/uni_modules/tdesign-uniapp/components/rate/README.en-US.md b/uni_modules/tdesign-uniapp/components/rate/README.en-US.md
new file mode 100644
index 0000000..9dd18f0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/rate/README.en-US.md
@@ -0,0 +1,50 @@
+:: BASE_DOC ::
+
+## API
+
+### Rate Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+allow-half | Boolean | false | \- | N
+color | String / Array | '#ED7B2F' | Typescript:`string \| Array` | N
+count | Number | 5 | \- | N
+disabled | Boolean | undefined | \- | N
+gap | String / Number | 8 | \- | N
+icon | String / Array | - | Typescript:`string \| string[]` | N
+icon-prefix | String | undefined | \- | N
+placement | String | top | options: top / bottom / '' | N
+show-text | Boolean | false | \- | N
+size | String / Number | '24px' | \- | N
+texts | Array | [] | Typescript:`Array` | N
+value | Number | 0 | `v-model:value` is supported | N
+default-value | Number | 0 | uncontrolled property | N
+variant | String | outline | options: outline/filled | N
+
+### Rate Events
+
+name | params | description
+-- | -- | --
+change | `(context: { value: number })` | \-
+
+### Rate External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-icon | \-
+t-class-text | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-rate-icon-scale | 1.33 | -
+--td-rate-selected-color | @warning-color | -
+--td-rate-text-active-color | @text-color-primary | -
+--td-rate-text-active-font-weight | 600 | -
+--td-rate-text-color | @text-color-disabled | -
+--td-rate-text-font-size | @font-size-m | -
+--td-rate-unselected-color | @component-border | -
diff --git a/uni_modules/tdesign-uniapp/components/rate/README.md b/uni_modules/tdesign-uniapp/components/rate/README.md
new file mode 100644
index 0000000..1b614ae
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/rate/README.md
@@ -0,0 +1,107 @@
+---
+title: Rate 评分
+description: 用于对某行为/事物进行打分。
+spline: form
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TRate from '@tdesign/uniapp/rate/rate.vue';
+```
+
+### 组件类型
+
+实心评分
+
+{{ base }}
+
+自定义评分
+
+{{ custom }}
+
+自定义评分数量
+
+{{ count }}
+
+带描述评分
+
+{{ show-text }}
+
+### 组件状态
+
+{{ action }}
+
+### 组件样式
+
+评分大小
+
+{{ size }}
+
+设置评分颜色
+
+{{ color }}
+
+### 特殊样式
+
+竖向带描述评分
+
+{{ special }}
+
+自定义图片前缀
+
+{{iconPrefix}}
+
+
+## API
+
+### Rate Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+allow-half | Boolean | false | 是否允许半选 | N
+color | String / Array | '#ED7B2F' | 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']。TS 类型:`string \| Array` | N
+count | Number | 5 | 评分的数量 | N
+disabled | Boolean | undefined | 是否禁用评分 | N
+gap | String / Number | 8 | 评分图标的间距 | N
+icon | String / Array | - | 自定义评分图标,[选中图标,未选中图标]。TS 类型:`string \| string[]` | N
+icon-prefix | String | undefined | 定义图标前缀 | N
+placement | String | top | 选择评分弹框的位置,值为空字符表示不显示评分弹框。可选项:top / bottom / '' | N
+show-text | Boolean | false | 是否显示对应的辅助文字 | N
+size | String / Number | '24px' | 评分图标的大小 | N
+texts | Array | [] | 评分等级对应的辅助文字。组件内置默认值为:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1分', '2分', '3分', '4分', '5分']。TS 类型:`Array` | N
+value | Number | 0 | 选择评分的值。支持语法糖 `v-model:value` | N
+default-value | Number | 0 | 选择评分的值。非受控属性 | N
+variant | String | outline | 已废弃。形状类型,有描边类型和填充类型两种。可选项:outline/filled | N
+
+### Rate Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { value: number })` | 评分数改变时触发
+
+### Rate External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-icon | 图标样式类
+t-class-text | 文本样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-rate-icon-scale | 1.33 | -
+--td-rate-selected-color | @warning-color | -
+--td-rate-text-active-color | @text-color-primary | -
+--td-rate-text-active-font-weight | 600 | -
+--td-rate-text-color | @text-color-disabled | -
+--td-rate-text-font-size | @font-size-m | -
+--td-rate-unselected-color | @component-border | -
diff --git a/uni_modules/tdesign-uniapp/components/rate/computed.js b/uni_modules/tdesign-uniapp/components/rate/computed.js
new file mode 100644
index 0000000..11930ca
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/rate/computed.js
@@ -0,0 +1,66 @@
+export default {
+ getText(texts, val, defaultTexts) {
+ if (!texts.length) {
+ texts = defaultTexts;
+ }
+ const curVal = Math.floor(val - 1);
+ return texts[curVal] || '未评分';
+ },
+
+ getIconName(defaultValue, value, index, icon) {
+ const curVal = value >= 0 ? value : defaultValue;
+ let name = ['star-filled', 'star-filled'];
+
+ if (icon) {
+ name = Array.isArray(icon) ? icon : [icon, icon];
+ }
+
+ return name[curVal >= index + 1 ? 0 : 1];
+ },
+
+ getIconClass(classPrefix, defaultValue, value, index, allowHalf, disabled, scaleIndex) {
+ const curVal = value >= 0 ? value : defaultValue;
+ const className = [];
+ if (curVal >= index + 1) {
+ className.push(`${classPrefix}--selected`);
+ if (disabled) {
+ className.push(`${classPrefix}--disabled`);
+ }
+ if (scaleIndex === index + 1) {
+ className.push(`${classPrefix}--current`);
+ }
+ } else if (allowHalf && curVal - index > 0) {
+ className.push(`${classPrefix}--selected-half`);
+ if (scaleIndex === index + 1) {
+ className.push(`${classPrefix}--current`);
+ }
+ if (disabled) {
+ className.push(`${classPrefix}--disabled-half`);
+ }
+ } else {
+ className.push(`${classPrefix}--unselected`);
+ }
+ return className.join(' ');
+ },
+
+ ceil(value) {
+ return Math.ceil(value);
+ },
+
+ getColor(color) {
+ if (Array.isArray(color) && color.length === 2) {
+ return `;--td-rate-selected-color: ${color[0]}; --td-rate-unselected-color: ${color[1]}`;
+ }
+
+ if (typeof color === 'string') {
+ return `;--td-rate-selected-color: ${color}`;
+ }
+
+ return '';
+ },
+
+ regSize(val) {
+ const value = `${val}`;
+ return value.indexOf('px') ? value : `${value}px`;
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/rate/props.ts b/uni_modules/tdesign-uniapp/components/rate/props.ts
new file mode 100644
index 0000000..5064064
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/rate/props.ts
@@ -0,0 +1,85 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdRateProps } from './type';
+export default {
+ /** 是否允许半选 */
+ allowHalf: Boolean,
+ /** 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB'] */
+ color: {
+ type: [String, Array],
+ default: '#ED7B2F' as TdRateProps['color'],
+ },
+ /** 评分的数量 */
+ count: {
+ type: Number,
+ default: 5,
+ },
+ /** 是否禁用评分 */
+ disabled: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 评分图标的间距 */
+ gap: {
+ type: [String, Number],
+ default: 8 as TdRateProps['gap'],
+ },
+ /** 自定义评分图标,[选中图标,未选中图标] */
+ icon: {
+ type: [String, Array],
+ },
+ /** 定义图标前缀 */
+ iconPrefix: {
+ type: String,
+ default: undefined,
+ },
+ /** 选择评分弹框的位置,值为空字符表示不显示评分弹框 */
+ placement: {
+ type: String,
+ default: 'top' as TdRateProps['placement'],
+ validator(val: TdRateProps['placement']): boolean {
+ if (!val) return true;
+ return ['top', 'bottom', ''].includes(val);
+ },
+ },
+ /** 是否显示对应的辅助文字 */
+ showText: Boolean,
+ /** 评分图标的大小 */
+ size: {
+ type: [String, Number],
+ default: '24px' as TdRateProps['size'],
+ },
+ /** 评分等级对应的辅助文字。组件内置默认值为:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1分', '2分', '3分', '4分', '5分'] */
+ texts: {
+ type: Array,
+ default: (): TdRateProps['texts'] => [],
+ },
+ /** 选择评分的值 */
+ value: {
+ type: Number,
+ default: 0,
+ },
+ /** 选择评分的值,非受控属性 */
+ defaultValue: {
+ type: Number,
+ default: 0,
+ },
+ /** 已废弃。形状类型,有描边类型和填充类型两种 */
+ variant: {
+ type: String,
+ default: 'outline' as TdRateProps['variant'],
+ validator(val: TdRateProps['variant']): boolean {
+ if (!val) return true;
+ return ['outline', 'filled'].includes(val);
+ },
+ },
+ /** 评分数改变时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/rate/rate.css b/uni_modules/tdesign-uniapp/components/rate/rate.css
new file mode 100644
index 0000000..15ea9f8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/rate/rate.css
@@ -0,0 +1,81 @@
+.t-rate {
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+}
+.t-rate__wrapper {
+ line-height: 1em;
+ display: inline-flex;
+}
+:deep(.t-rate__icon) {
+ display: block;
+ line-height: 1em;
+ width: 1em;
+ transition: transform 0.3s ease;
+}
+:deep(.t-rate__icon)--current {
+ transform: scale(var(--td-rate-icon-scale, 1.33));
+}
+:deep(.t-rate__icon)--selected {
+ color: var(--td-rate-selected-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+}
+:deep(.t-rate__icon)--selected-half {
+ color: transparent;
+ background: linear-gradient(to right, var(--td-rate-selected-color, var(--td-warning-color, var(--td-warning-color-5, #e37318))) 0%, var(--td-rate-selected-color, var(--td-warning-color, var(--td-warning-color-5, #e37318))) 50%, var(--td-rate-unselected-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc))) 51%, var(--td-rate-unselected-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc))) 100%);
+ -webkit-background-clip: text;
+ background-clip: text;
+}
+:deep(.t-rate__icon)--unselected {
+ color: var(--td-rate-unselected-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+}
+.t-rate__text {
+ font-size: var(--td-rate-text-font-size, var(--td-font-size-m, 32rpx));
+ color: var(--td-rate-text-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+ margin-left: 32rpx;
+ vertical-align: middle;
+}
+.t-rate__text--active {
+ color: var(--td-rate-text-active-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font-weight: var(--td-rate-text-active-font-weight, 600);
+}
+.t-rate__text--sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ white-space: nowrap;
+ clip-path: inset(50%);
+ border: 0;
+}
+.t-rate__tips {
+ position: absolute;
+ display: flex;
+ align-items: center;
+ bottom: calc(100% + 16rpx);
+ padding: 8rpx;
+ border-radius: 12rpx;
+ box-shadow: var(--td-shadow-1, 0 1px 10px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.12));
+ background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+ transform: translateX(-50%);
+}
+.t-rate__tips--bottom {
+ top: calc(100% + 16rpx);
+ bottom: auto;
+}
+.t-rate__tips-item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ width: 64rpx;
+ border-radius: 6rpx;
+}
+.t-rate__tips-item--active {
+ background-color: var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7));
+}
+.t-rate__tips-text {
+ text-align: center;
+ font: var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+}
diff --git a/uni_modules/tdesign-uniapp/components/rate/rate.vue b/uni_modules/tdesign-uniapp/components/rate/rate.vue
new file mode 100644
index 0000000..0caf8b4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/rate/rate.vue
@@ -0,0 +1,276 @@
+
+
+
+
+
+
+ {{ utils.getText(texts, dataValue, defaultTexts) }}
+
+
+ {{ dataValue + '星' }} {{ utils.getText(texts, dataValue, defaultTexts) }}
+
+
+
+
+
+
+
+ {{ utils.ceil(dataValue) - 0.5 }}
+
+
+
+
+
+ {{ utils.ceil(dataValue) }}
+
+
+
+
+
+
+ {{ dataValue }}
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/rate/type.ts b/uni_modules/tdesign-uniapp/components/rate/type.ts
new file mode 100644
index 0000000..cf86913
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/rate/type.ts
@@ -0,0 +1,79 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdRateProps {
+ /**
+ * 是否允许半选
+ * @default false
+ */
+ allowHalf?: boolean;
+ /**
+ * 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']
+ * @default '#ED7B2F'
+ */
+ color?: string | Array;
+ /**
+ * 评分的数量
+ * @default 5
+ */
+ count?: number;
+ /**
+ * 是否禁用评分
+ */
+ disabled?: boolean;
+ /**
+ * 评分图标的间距
+ * @default 8
+ */
+ gap?: string | number;
+ /**
+ * 自定义评分图标,[选中图标,未选中图标]
+ */
+ icon?: string | string[];
+ /**
+ * 定义图标前缀
+ */
+ iconPrefix?: string;
+ /**
+ * 选择评分弹框的位置,值为空字符表示不显示评分弹框
+ * @default top
+ */
+ placement?: 'top' | 'bottom' | '';
+ /**
+ * 是否显示对应的辅助文字
+ * @default false
+ */
+ showText?: boolean;
+ /**
+ * 评分图标的大小
+ * @default '24px'
+ */
+ size?: string | number;
+ /**
+ * 评分等级对应的辅助文字。组件内置默认值为:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1分', '2分', '3分', '4分', '5分']
+ * @default []
+ */
+ texts?: Array;
+ /**
+ * 选择评分的值
+ * @default 0
+ */
+ value?: number;
+ /**
+ * 选择评分的值,非受控属性
+ * @default 0
+ */
+ defaultValue?: number;
+ /**
+ * 已废弃。形状类型,有描边类型和填充类型两种
+ * @default outline
+ */
+ variant?: 'outline' | 'filled';
+ /**
+ * 评分数改变时触发
+ */
+ onChange?: (context: { value: number }) => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/result/README.en-US.md b/uni_modules/tdesign-uniapp/components/result/README.en-US.md
new file mode 100644
index 0000000..a60e6e2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/result/README.en-US.md
@@ -0,0 +1,47 @@
+:: BASE_DOC ::
+
+## API
+
+### Result Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+description | String | - | \- | N
+icon | String / Boolean / Object | true | \- | N
+image | String | - | \- | N
+theme | String | default | options: default/success/warning/error | N
+title | String | '' | \- | N
+
+### Result Slots
+
+name | Description
+-- | --
+description | \-
+image | \-
+title | \-
+
+### Result External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-description | \-
+t-class-image | \-
+t-class-title | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-result-description-color | @text-color-secondary | -
+--td-result-description-font | @font-body-medium | -
+--td-result-description-margin-top | @spacer | -
+--td-result-icon-default-color | @brand-color | -
+--td-result-icon-error-color | @error-color | -
+--td-result-icon-success-color | @success-color | -
+--td-result-icon-warning-color | @warning-color | -
+--td-result-title-color | @text-color-primary | -
+--td-result-title-font | @font-title-extraLarge | -
+--td-result-title-margin-top | @spacer-1 | -
diff --git a/uni_modules/tdesign-uniapp/components/result/README.md b/uni_modules/tdesign-uniapp/components/result/README.md
new file mode 100644
index 0000000..e55c927
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/result/README.md
@@ -0,0 +1,88 @@
+---
+title: Result 结果
+description: 反馈结果状态。
+spline: data
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TResult from '@tdesign/uniapp/result/result.vue';
+```
+
+### 组件类型
+
+基础结果
+
+{{ theme }}
+
+带描述的结果
+
+{{ description }}
+
+自定义结果
+
+{{ custom }}
+
+## 常见问题
+
+
+
+ 本地图片无法正确引用?
+ 👇
+
+
+ 建议使用绝对路径,而不是相对路径。绝对路径以 app.json 所在位置为基准。
+
+
+
+## API
+
+### Result Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+description | String | - | 描述文字 | N
+icon | String / Boolean / Object | true | 图标名称。值为字符串表示图标名称,值为 `false` 表示不显示图标,值为 `Object` 类型,表示透传至 `icon`,不传表示使用主题图标 | N
+image | String | - | 图片地址 | N
+theme | String | default | 内置主题。可选项:default/success/warning/error | N
+title | String | '' | 标题 | N
+
+### Result Slots
+
+名称 | 描述
+-- | --
+description | 自定义 `description` 显示内容
+image | 自定义 `image` 显示内容
+title | 自定义 `title` 显示内容
+
+### Result External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-description | 描述样式类
+t-class-image | 图片样式类
+t-class-title | 标题样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-result-description-color | @text-color-secondary | -
+--td-result-description-font | @font-body-medium | -
+--td-result-description-margin-top | @spacer | -
+--td-result-icon-default-color | @brand-color | -
+--td-result-icon-error-color | @error-color | -
+--td-result-icon-success-color | @success-color | -
+--td-result-icon-warning-color | @warning-color | -
+--td-result-title-color | @text-color-primary | -
+--td-result-title-font | @font-title-extraLarge | -
+--td-result-title-margin-top | @spacer-1 | -
diff --git a/uni_modules/tdesign-uniapp/components/result/props.ts b/uni_modules/tdesign-uniapp/components/result/props.ts
new file mode 100644
index 0000000..cad7862
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/result/props.ts
@@ -0,0 +1,36 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdResultProps } from './type';
+export default {
+ /** 描述文字 */
+ description: {
+ type: String,
+ },
+ /** 图标名称。值为字符串表示图标名称,值为 `false` 表示不显示图标,值为 `Object` 类型,表示透传至 `icon`,不传表示使用主题图标 */
+ icon: {
+ type: [String, Boolean, Object],
+ default: true as TdResultProps['icon'],
+ },
+ /** 图片地址 */
+ image: {
+ type: String,
+ },
+ /** 内置主题 */
+ theme: {
+ type: String,
+ default: 'default' as TdResultProps['theme'],
+ validator(val: TdResultProps['theme']): boolean {
+ if (!val) return true;
+ return ['default', 'success', 'warning', 'error'].includes(val);
+ },
+ },
+ /** 标题 */
+ title: {
+ type: String,
+ default: '' as TdResultProps['title'],
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/result/result.css b/uni_modules/tdesign-uniapp/components/result/result.css
new file mode 100644
index 0000000..e6b948b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/result/result.css
@@ -0,0 +1,35 @@
+.t-result {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+:deep(.t-result__icon) {
+ font-size: 160rpx;
+}
+.t-result__title {
+ font: var(--td-result-title-font, var(--td-font-title-extraLarge, 600 40rpx / 56rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-result-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-result__thumb:not(:empty) + .t-result__title:not(:empty) {
+ margin-top: var(--td-result-title-margin-top, var(--td-spacer-1, 24rpx));
+}
+.t-result__description {
+ text-align: center;
+ color: var(--td-result-description-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
+ font: var(--td-result-description-font, var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+}
+.t-result__title + .t-result__description:not(:empty) {
+ margin-top: var(--td-result-description-margin-top, var(--td-spacer, 16rpx));
+}
+.t-result--theme-default {
+ color: var(--td-result-icon-default-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-result--theme-success {
+ color: var(--td-result-icon-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
+}
+.t-result--theme-warning {
+ color: var(--td-result-icon-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
+}
+.t-result--theme-error {
+ color: var(--td-result-icon-error-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
+}
diff --git a/uni_modules/tdesign-uniapp/components/result/result.vue b/uni_modules/tdesign-uniapp/components/result/result.vue
new file mode 100644
index 0000000..ad43ad4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/result/result.vue
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+ {{ description }}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/result/type.ts b/uni_modules/tdesign-uniapp/components/result/type.ts
new file mode 100644
index 0000000..f8833f2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/result/type.ts
@@ -0,0 +1,31 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdResultProps {
+ /**
+ * 描述文字
+ */
+ description?: string;
+ /**
+ * 图标名称。值为字符串表示图标名称,值为 `false` 表示不显示图标,值为 `Object` 类型,表示透传至 `icon`,不传表示使用主题图标
+ * @default true
+ */
+ icon?: string | boolean | object;
+ /**
+ * 图片地址
+ */
+ image?: string;
+ /**
+ * 内置主题
+ * @default default
+ */
+ theme?: 'default' | 'success' | 'warning' | 'error';
+ /**
+ * 标题
+ * @default ''
+ */
+ title?: string;
+}
diff --git a/uni_modules/tdesign-uniapp/components/row/computed.js b/uni_modules/tdesign-uniapp/components/row/computed.js
new file mode 100644
index 0000000..b6dc4b6
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/row/computed.js
@@ -0,0 +1,13 @@
+import utils from '../common/utils.wxs';
+
+export function getRowStyles(gutter, customStyle) {
+ let _style = '';
+ if (gutter) {
+ _style = utils._style({
+ 'margin-right': utils.addUnit(-gutter / 2),
+ 'margin-left': utils.addUnit(-gutter / 2),
+ });
+ }
+
+ return utils._style([customStyle]) + _style;
+}
diff --git a/uni_modules/tdesign-uniapp/components/row/props.ts b/uni_modules/tdesign-uniapp/components/row/props.ts
new file mode 100644
index 0000000..6d766c8
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/row/props.ts
@@ -0,0 +1,12 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export default {
+ /** 列之间的间距(默认单位px) */
+ gutter: {
+ type: [String, Number],
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/row/row.css b/uni_modules/tdesign-uniapp/components/row/row.css
new file mode 100644
index 0000000..69fab88
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/row/row.css
@@ -0,0 +1,6 @@
+.t-row {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ box-sizing: border-box;
+}
diff --git a/uni_modules/tdesign-uniapp/components/row/row.vue b/uni_modules/tdesign-uniapp/components/row/row.vue
new file mode 100644
index 0000000..9b0b295
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/row/row.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/row/type.ts b/uni_modules/tdesign-uniapp/components/row/type.ts
new file mode 100644
index 0000000..8d43195
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/row/type.ts
@@ -0,0 +1,12 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdRowProps {
+ /**
+ * 列之间的间距(默认单位px)
+ */
+ gutter?: string | number;
+}
diff --git a/uni_modules/tdesign-uniapp/components/script/postinstall.js b/uni_modules/tdesign-uniapp/components/script/postinstall.js
new file mode 100644
index 0000000..49615aa
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/script/postinstall.js
@@ -0,0 +1,46 @@
+const fs = require('fs');
+const path = require('path');
+
+
+function switchVersion(version) {
+ const pkg = require('../package.json');
+ if (version != 2) {
+ return;
+ }
+
+ delete pkg.exports;
+
+ const pkgStr = JSON.stringify(pkg, null, 2);
+
+ fs.writeFileSync(path.resolve(__dirname, '../package.json'), pkgStr, 'utf-8');
+}
+
+
+function loadModule(name) {
+ try {
+ return require(name);
+ } catch (e) {
+ return undefined;
+ }
+}
+
+const Vue = loadModule('vue');
+
+function main() {
+ const version = process.env.npm_config_vueVersion || (Vue ? Vue.version : '2.7.');
+ if (!Vue || typeof version !== 'string') {
+ console.warn('Vue is not found. Please run "npm install vue" to install.');
+ return;
+ }
+
+ if (version.startsWith('2.')) {
+ switchVersion(2);
+ } else if (version.startsWith('3.')) {
+ switchVersion(3);
+ } else {
+ console.warn(`Vue version v${version} is not supported.`);
+ }
+}
+
+main();
+
diff --git a/uni_modules/tdesign-uniapp/components/scroll-view/scroll-view.css b/uni_modules/tdesign-uniapp/components/scroll-view/scroll-view.css
new file mode 100644
index 0000000..e69de29
diff --git a/uni_modules/tdesign-uniapp/components/scroll-view/scroll-view.vue b/uni_modules/tdesign-uniapp/components/scroll-view/scroll-view.vue
new file mode 100644
index 0000000..4e5ba08
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/scroll-view/scroll-view.vue
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/search/README.en-US.md b/uni_modules/tdesign-uniapp/components/search/README.en-US.md
new file mode 100644
index 0000000..3f601f2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/search/README.en-US.md
@@ -0,0 +1,88 @@
+
+## API
+
+### Search Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+action | String | '' | \- | N
+adjust-position | Boolean | true | \- | N
+always-embed | Boolean | false | \- | N
+center | Boolean | false | \- | N
+clear-trigger | String | always | show clear icon, clicked to clear input value。options: always / focus | N
+clearable | Boolean | true | \- | N
+confirm-hold | Boolean | false | \- | N
+confirm-type | String | search | options: send/search/next/go/done | N
+cursor | Number | -1 | \- | N
+cursor-color | String | #0052d9 | \- | N
+cursor-spacing | Number | 0 | \- | N
+disabled | Boolean | false | \- | N
+focus | Boolean | false | \- | N
+hold-keyboard | Boolean | false | \- | N
+label | String | '' | `deprecated` | N
+left-icon | String | 'search' | \- | N
+maxcharacter | Number | - | The maximum number of characters that the user can enter. One Chinese character represents two characters in length. Use either `maxcharacter` or `maxlength` | N
+maxlength | Number | -1 | \- | N
+placeholder | String | '' | \- | N
+placeholder-class | String | input-placeholder | \- | N
+placeholder-style | String | - | \- | N
+readonly | Boolean | undefined | \- | N
+result-list | Array | [] | Typescript: `Array` | N
+right-icon | String | 'close-circle-filled' | `deprecated` | N
+selection-end | Number | -1 | \- | N
+selection-start | Number | -1 | \- | N
+shape | String | 'square' | options: square/round | N
+type | String | 'text' | options: text/number/idcard/digit/nickname | N
+value | String | '' | \- | N
+
+### Search Events
+
+name | params | description
+-- | -- | --
+action-click | \- | \-
+blur | `(context: { value: string })` | \-
+change | `(context: { value: string })` | \-
+clear | `(context: { value: string })` | \-
+focus | `(context: { value: string })` | \-
+submit | `(context: { value: string })` | \-
+
+### Search Slots
+
+name | Description
+-- | --
+action | \-
+left-icon | \-
+right-icon | `deprecated`
+
+### Search External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-action | \-
+t-class-clear | \-
+t-class-input | \-
+t-class-input-container | \-
+t-class-left | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-search-action-color | @brand-color | -
+--td-search-bg-color | @bg-color-secondarycontainer | -
+--td-search-clear-icon-color | @text-color-placeholder | -
+--td-search-clear-icon-size | 48rpx | -
+--td-search-disabled-text-color | @text-color-disabled | -
+--td-search-font | @font-body-large | -
+--td-search-height | 80rpx | -
+--td-search-icon-color | @text-color-placeholder | -
+--td-search-icon-size | 48rpx | -
+--td-search-label-color | @text-color-primary | -
+--td-search-padding | 16rpx 24rpx | -
+--td-search-placeholder-color | @text-color-placeholder | -
+--td-search-result-high-light-color | @brand-color | -
+--td-search-square-radius | @radius-default | -
+--td-search-text-color | @text-color-primary | -
diff --git a/uni_modules/tdesign-uniapp/components/search/README.md b/uni_modules/tdesign-uniapp/components/search/README.md
new file mode 100644
index 0000000..0e6e137
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/search/README.md
@@ -0,0 +1,126 @@
+---
+title: Search 搜索框
+description: 用于用户输入搜索信息,并进行页面内容搜索。
+spline: form
+isComponent: true
+---
+
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TSearch from '@tdesign/uniapp/search/search.vue';
+```
+
+### 01 组件类型
+
+基础搜索框
+
+{{ base }}
+
+获取焦点后显示取消按钮
+
+{{ action }}
+
+### 02 组件样式
+
+搜索框形状
+
+{{ shape }}
+
+### 03 组件状态
+
+默认状态其他对齐方式
+
+{{ other }}
+
+## API
+
+### Search Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+action | String | '' | 自定义右侧操作按钮文字 | N
+adjust-position | Boolean | true | 键盘弹起时,是否自动上推页面 | N
+always-embed | Boolean | false | 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) | N
+center | Boolean | false | 是否居中 | N
+clear-trigger | String | always | 清空图标触发方式,仅在输入框有值时有效。可选项:always / focus | N
+clearable | Boolean | true | 是否启用清除控件 | N
+confirm-hold | Boolean | false | 点击键盘右下角按钮时是否保持键盘不收起 | N
+confirm-type | String | search | 设置键盘右下角按钮的文字,仅在type='text'时生效。
具体释义:
`send` 右下角按钮为“发送”;
`search` 右下角按钮为“搜索”;
`next` 右下角按钮为“下一个”;
`go` 右下角按钮为“前往”;
`done` 右下角按钮为“完成”。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html)。可选项:send/search/next/go/done | N
+cursor | Number | -1 | 指定 focus 时的光标位置 | N
+cursor-color | String | #0052d9 | 光标颜色。iOS 下的格式为十六进制颜色值 #000000,安卓下的只支持 default 和 green,Skyline 下无限制 | N
+cursor-spacing | Number | 0 | 搜索框聚焦时底部与键盘的距离 | N
+disabled | Boolean | false | 是否禁用 | N
+focus | Boolean | false | 是否聚焦 | N
+hold-keyboard | Boolean | false | focus时,点击页面的时候不收起键盘 | N
+label | String | '' | 已废弃。左侧文本 | N
+left-icon | String | 'search' | 左侧图标。如果需要使用 `Slot` 进行自定义,必须将该值设置为假值 | N
+maxcharacter | Number | - | 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用 | N
+maxlength | Number | -1 | 用户最多可以输入的文本长度,一个中文等于一个计数长度。默认为 -1,不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用 | N
+placeholder | String | '' | 占位符 | N
+placeholder-class | String | input-placeholder | 指定 placeholder 的样式类 | N
+placeholder-style | String | - | 指定 placeholder 的样式 | N
+readonly | Boolean | undefined | 只读状态 | N
+result-list | Array | [] | 预览结果列表。TS 类型:`Array` | N
+right-icon | String | 'close-circle-filled' | 已废弃。右侧图标 | N
+selection-end | Number | -1 | 光标结束位置,自动聚集时有效,需与 selection-start 搭配使用 | N
+selection-start | Number | -1 | 光标起始位置,自动聚集时有效,需与 selection-end 搭配使用 | N
+shape | String | 'square' | 搜索框形状。可选项:square/round | N
+type | String | 'text' | 拉起键盘的类型。可选项:text/number/idcard/digit/nickname | N
+value | String | '' | 值 | N
+
+### Search Events
+
+名称 | 参数 | 描述
+-- | -- | --
+action-click | \- | 点击右侧操作按钮文字时触发
+blur | `(context: { value: string })` | 失去焦点时触发
+change | `(context: { value: string })` | 值发生变化时触发
+clear | `(context: { value: string })` | 点击清除时触发
+focus | `(context: { value: string })` | 聚焦时触发
+submit | `(context: { value: string })` | 提交时触发
+
+### Search Slots
+
+名称 | 描述
+-- | --
+action | 自定义 `action` 显示内容
+left-icon | 左侧图标
+right-icon | 已废弃。自定义 `right-icon` 显示内容
+
+### Search External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-action | 操作按钮样式类
+t-class-clear | 右侧图标样式类
+t-class-input | 输入框样式类
+t-class-input-container | 输入框容器样式类
+t-class-left | 左侧图标样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-search-action-color | @brand-color | -
+--td-search-bg-color | @bg-color-secondarycontainer | -
+--td-search-clear-icon-color | @text-color-placeholder | -
+--td-search-clear-icon-size | 48rpx | -
+--td-search-disabled-text-color | @text-color-disabled | -
+--td-search-font | @font-body-large | -
+--td-search-height | 80rpx | -
+--td-search-icon-color | @text-color-placeholder | -
+--td-search-icon-size | 48rpx | -
+--td-search-label-color | @text-color-primary | -
+--td-search-padding | 16rpx 24rpx | -
+--td-search-placeholder-color | @text-color-placeholder | -
+--td-search-result-high-light-color | @brand-color | -
+--td-search-square-radius | @radius-default | -
+--td-search-text-color | @text-color-primary | -
diff --git a/uni_modules/tdesign-uniapp/components/search/computed.js b/uni_modules/tdesign-uniapp/components/search/computed.js
new file mode 100644
index 0000000..848026e
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/search/computed.js
@@ -0,0 +1,3 @@
+export const highLight = function (label, keyword) {
+ return label.replace(keyword, `${keyword}`);
+};
diff --git a/uni_modules/tdesign-uniapp/components/search/props.ts b/uni_modules/tdesign-uniapp/components/search/props.ts
new file mode 100644
index 0000000..66f4a1d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/search/props.ts
@@ -0,0 +1,171 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdSearchProps } from './type';
+export default {
+ /** 自定义右侧操作按钮文字 */
+ action: {
+ type: String,
+ default: '' as TdSearchProps['action'],
+ },
+ /** 键盘弹起时,是否自动上推页面 */
+ adjustPosition: {
+ type: Boolean,
+ default: true,
+ },
+ /** 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) */
+ alwaysEmbed: Boolean,
+ /** 是否居中 */
+ center: Boolean,
+ /** 清空图标触发方式,仅在输入框有值时有效 */
+ clearTrigger: {
+ type: String,
+ default: 'always' as TdSearchProps['clearTrigger'],
+ validator(val: TdSearchProps['clearTrigger']): boolean {
+ if (!val) return true;
+ return ['always', 'focus'].includes(val);
+ },
+ },
+ /** 是否启用清除控件 */
+ clearable: {
+ type: Boolean,
+ default: true,
+ },
+ /** 点击键盘右下角按钮时是否保持键盘不收起 */
+ confirmHold: Boolean,
+ /** 设置键盘右下角按钮的文字,仅在type='text'时生效。
具体释义:
`send` 右下角按钮为“发送”;
`search` 右下角按钮为“搜索”;
`next` 右下角按钮为“下一个”;
`go` 右下角按钮为“前往”;
`done` 右下角按钮为“完成”。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html) */
+ confirmType: {
+ type: String,
+ default: 'search' as TdSearchProps['confirmType'],
+ validator(val: TdSearchProps['confirmType']): boolean {
+ if (!val) return true;
+ return ['send', 'search', 'next', 'go', 'done'].includes(val);
+ },
+ },
+ /** 指定 focus 时的光标位置 */
+ cursor: {
+ type: Number,
+ default: -1,
+ },
+ /** 光标颜色。iOS 下的格式为十六进制颜色值 #000000,安卓下的只支持 default 和 green,Skyline 下无限制 */
+ cursorColor: {
+ type: String,
+ default: '#0052d9',
+ },
+ /** 搜索框聚焦时底部与键盘的距离 */
+ cursorSpacing: {
+ type: Number,
+ default: 0,
+ },
+ /** 是否禁用 */
+ disabled: Boolean,
+ /** 是否聚焦 */
+ focus: Boolean,
+ /** focus时,点击页面的时候不收起键盘 */
+ holdKeyboard: Boolean,
+ /** 左侧图标。如果需要使用 `Slot` 进行自定义,必须将该值设置为假值 */
+ leftIcon: {
+ type: String,
+ default: 'search' as TdSearchProps['leftIcon'],
+ },
+ /** 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用 */
+ maxcharacter: {
+ type: Number,
+ },
+ /** 用户最多可以输入的文本长度,一个中文等于一个计数长度。默认为 -1,不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用 */
+ maxlength: {
+ type: Number,
+ default: -1,
+ },
+ /** 占位符 */
+ placeholder: {
+ type: String,
+ default: '',
+ },
+ /** 指定 placeholder 的样式类 */
+ placeholderClass: {
+ type: String,
+ default: 'input-placeholder',
+ },
+ /** 指定 placeholder 的样式 */
+ placeholderStyle: {
+ type: String,
+ default: '',
+ },
+ /** 只读状态 */
+ readonly: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 预览结果列表 */
+ resultList: {
+ type: Array,
+ default: (): TdSearchProps['resultList'] => [],
+ },
+ /** 光标结束位置,自动聚集时有效,需与 selection-start 搭配使用 */
+ selectionEnd: {
+ type: Number,
+ default: -1,
+ },
+ /** 光标起始位置,自动聚集时有效,需与 selection-end 搭配使用 */
+ selectionStart: {
+ type: Number,
+ default: -1,
+ },
+ /** 搜索框形状 */
+ shape: {
+ type: String,
+ default: 'square' as TdSearchProps['shape'],
+ validator(val: TdSearchProps['shape']): boolean {
+ if (!val) return true;
+ return ['square', 'round'].includes(val);
+ },
+ },
+ /** 拉起键盘的类型 */
+ type: {
+ type: String,
+ default: 'text' as TdSearchProps['type'],
+ validator(val: TdSearchProps['type']): boolean {
+ if (!val) return true;
+ return ['text', 'number', 'idcard', 'digit', 'nickname'].includes(val);
+ },
+ },
+ /** 值 */
+ value: {
+ type: String,
+ default: '',
+ },
+ /** 点击右侧操作按钮文字时触发 */
+ onActionClick: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 失去焦点时触发 */
+ onBlur: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 值发生变化时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击清除时触发 */
+ onClear: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 聚焦时触发 */
+ onFocus: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 提交时触发 */
+ onSubmit: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/search/search.css b/uni_modules/tdesign-uniapp/components/search/search.css
new file mode 100644
index 0000000..77b0cc7
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/search/search.css
@@ -0,0 +1,75 @@
+.t-search {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.t-search__label {
+ padding: 8rpx;
+ color: var(--td-search-label-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-search__input-box {
+ flex: 1;
+ box-sizing: border-box;
+ display: flex;
+ height: var(--td-search-height, 80rpx);
+ align-items: center;
+ border: 2rpx solid var(--td-search-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+ background: var(--td-search-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+ padding: var(--td-search-padding, 16rpx 24rpx);
+}
+.t-search__input-box.t-is-focused {
+ border-color: var(--td-search-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+}
+.t-search__input-box--round {
+ border-radius: calc(var(--td-search-height, 80rpx) / 2);
+}
+.t-search__input-box--square {
+ border-radius: var(--td-search-square-radius, var(--td-radius-default, 12rpx));
+}
+.t-search__input-box--center {
+ text-align: center;
+}
+.t-search__input-box .t-input__keyword {
+ display: inline-block;
+ flex: 1;
+ color: var(--td-search-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ font: var(--td-search-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ padding-left: 10rpx;
+ min-height: 48rpx;
+}
+.t-search__input-box .t-input--disabled {
+ color: var(--td-search-disabled-text-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+ cursor: not-allowed;
+ opacity: 1;
+ -webkit-text-fill-color: currentColor;
+}
+.t-search__input-box .t-icon {
+ color: var(--td-search-icon-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+ font-size: var(--td-search-icon-size, 48rpx);
+}
+.t-search__clear {
+ position: relative;
+ margin-left: 10px;
+ font-size: var(--td-search-clear-icon-size, 48rpx);
+ color: var(--td-search-clear-icon-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+}
+.t-search__search-action {
+ margin-left: 30rpx;
+ font: var(--td-search-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-search-action-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-search__placeholder {
+ color: var(--td-search-placeholder-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
+}
+.t-search__placeholder--center {
+ text-align: center;
+}
+:deep(.t-search__result-item--highLight) {
+ color: var(--td-search-result-high-light-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-search__result-list :deep(.t-search__result-item) {
+ padding-left: 0;
+}
+.t-search__result-list :deep(.t-search__result-item)::after {
+ left: 0;
+}
diff --git a/uni_modules/tdesign-uniapp/components/search/search.vue b/uni_modules/tdesign-uniapp/components/search/search.vue
new file mode 100644
index 0000000..f7e7424
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/search/search.vue
@@ -0,0 +1,285 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ action }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/search/type.ts b/uni_modules/tdesign-uniapp/components/search/type.ts
new file mode 100644
index 0000000..49de67b
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/search/type.ts
@@ -0,0 +1,165 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdSearchProps {
+ /**
+ * 自定义右侧操作按钮文字
+ * @default ''
+ */
+ action?: string;
+ /**
+ * 键盘弹起时,是否自动上推页面
+ * @default true
+ */
+ adjustPosition?: boolean;
+ /**
+ * 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效)
+ * @default false
+ */
+ alwaysEmbed?: boolean;
+ /**
+ * 是否居中
+ * @default false
+ */
+ center?: boolean;
+ /**
+ * 清空图标触发方式,仅在输入框有值时有效
+ * @default always
+ */
+ clearTrigger?: 'always' | 'focus';
+ /**
+ * 是否启用清除控件
+ * @default true
+ */
+ clearable?: boolean;
+ /**
+ * 点击键盘右下角按钮时是否保持键盘不收起
+ * @default false
+ */
+ confirmHold?: boolean;
+ /**
+ * 设置键盘右下角按钮的文字,仅在type='text'时生效。
具体释义:
`send` 右下角按钮为“发送”;
`search` 右下角按钮为“搜索”;
`next` 右下角按钮为“下一个”;
`go` 右下角按钮为“前往”;
`done` 右下角按钮为“完成”。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html)
+ * @default search
+ */
+ confirmType?: 'send' | 'search' | 'next' | 'go' | 'done';
+ /**
+ * 指定 focus 时的光标位置
+ * @default -1
+ */
+ cursor?: number;
+ /**
+ * 光标颜色。iOS 下的格式为十六进制颜色值 #000000,安卓下的只支持 default 和 green,Skyline 下无限制
+ * @default #0052d9
+ */
+ cursorColor?: string;
+ /**
+ * 搜索框聚焦时底部与键盘的距离
+ * @default 0
+ */
+ cursorSpacing?: number;
+ /**
+ * 是否禁用
+ * @default false
+ */
+ disabled?: boolean;
+ /**
+ * 是否聚焦
+ * @default false
+ */
+ focus?: boolean;
+ /**
+ * focus时,点击页面的时候不收起键盘
+ * @default false
+ */
+ holdKeyboard?: boolean;
+ /**
+ * 左侧图标。如果需要使用 `Slot` 进行自定义,必须将该值设置为假值
+ * @default 'search'
+ */
+ leftIcon?: string;
+ /**
+ * 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用
+ */
+ maxcharacter?: number;
+ /**
+ * 用户最多可以输入的文本长度,一个中文等于一个计数长度。默认为 -1,不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用
+ * @default -1
+ */
+ maxlength?: number;
+ /**
+ * 占位符
+ * @default ''
+ */
+ placeholder?: string;
+ /**
+ * 指定 placeholder 的样式类
+ * @default input-placeholder
+ */
+ placeholderClass?: string;
+ /**
+ * 指定 placeholder 的样式
+ * @default ''
+ */
+ placeholderStyle?: string;
+ /**
+ * 只读状态
+ */
+ readonly?: boolean;
+ /**
+ * 预览结果列表
+ * @default []
+ */
+ resultList?: Array;
+ /**
+ * 光标结束位置,自动聚集时有效,需与 selection-start 搭配使用
+ * @default -1
+ */
+ selectionEnd?: number;
+ /**
+ * 光标起始位置,自动聚集时有效,需与 selection-end 搭配使用
+ * @default -1
+ */
+ selectionStart?: number;
+ /**
+ * 搜索框形状
+ * @default 'square'
+ */
+ shape?: 'square' | 'round';
+ /**
+ * 拉起键盘的类型
+ * @default 'text'
+ */
+ type?: 'text' | 'number' | 'idcard' | 'digit' | 'nickname';
+ /**
+ * 值
+ * @default ''
+ */
+ value?: string;
+ /**
+ * 点击右侧操作按钮文字时触发
+ */
+ onActionClick?: () => void;
+ /**
+ * 失去焦点时触发
+ */
+ onBlur?: (context: { value: string }) => void;
+ /**
+ * 值发生变化时触发
+ */
+ onChange?: (context: { value: string }) => void;
+ /**
+ * 点击清除时触发
+ */
+ onClear?: (context: { value: string }) => void;
+ /**
+ * 聚焦时触发
+ */
+ onFocus?: (context: { value: string }) => void;
+ /**
+ * 提交时触发
+ */
+ onSubmit?: (context: { value: string }) => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/side-bar-item/props.ts b/uni_modules/tdesign-uniapp/components/side-bar-item/props.ts
new file mode 100644
index 0000000..e75554a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/side-bar-item/props.ts
@@ -0,0 +1,27 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export default {
+ /** 透传至 Badge 组件 */
+ badgeProps: {
+ type: Object,
+ },
+ /** 是否禁用 */
+ disabled: Boolean,
+ /** 图标,传对象则透传至 Icon */
+ icon: {
+ type: [String, Object],
+ },
+ /** 展示的标签 */
+ label: {
+ type: String,
+ default: '',
+ },
+ /** 当前选项的值 */
+ value: {
+ type: [String, Number],
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/side-bar-item/side-bar-item.css b/uni_modules/tdesign-uniapp/components/side-bar-item/side-bar-item.css
new file mode 100644
index 0000000..bedf982
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/side-bar-item/side-bar-item.css
@@ -0,0 +1,66 @@
+.t-side-bar-item {
+ display: flex;
+ align-items: center;
+ position: relative;
+ padding: 32rpx;
+ font: var(--td-side-bar-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
+ color: var(--td-side-bar-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ background: var(--td-side-bar-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+ min-height: var(--td-side-bar-item-height, auto);
+ box-sizing: border-box;
+ white-space: wrap;
+}
+.t-side-bar-item--active {
+ font-weight: 600;
+ background: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+ color: var(--td-side-bar-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ --td-badge-content-text-color: var(--td-side-bar-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-side-bar-item__icon {
+ font-size: var(--td-side-bar-icon-size, 40rpx);
+ margin-right: 4rpx;
+}
+.t-side-bar-item__prefix,
+.t-side-bar-item__suffix {
+ z-index: 1;
+ position: absolute;
+ right: 0;
+ width: 100%;
+ height: calc(var(--td-side-bar-border-radius, 18rpx) * 2);
+ background: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
+ pointer-events: none;
+}
+.t-side-bar-item__prefix::after,
+.t-side-bar-item__suffix::after {
+ content: '';
+ display: block;
+ width: 100%;
+ height: 100%;
+ background-color: var(--td-side-bar-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+}
+.t-side-bar-item__prefix {
+ top: calc(var(--td-side-bar-border-radius, 18rpx) * -2);
+}
+.t-side-bar-item__prefix::after {
+ border-bottom-right-radius: var(--td-side-bar-border-radius, 18rpx);
+}
+.t-side-bar-item__suffix {
+ bottom: calc(var(--td-side-bar-border-radius, 18rpx) * -2);
+}
+.t-side-bar-item__suffix::after {
+ border-top-right-radius: var(--td-side-bar-border-radius, 18rpx);
+}
+.t-side-bar-item--disabled {
+ color: var(--td-side-bar-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+ --td-badge-content-text-color: var(--td-side-bar-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-side-bar-item__line {
+ width: 6rpx;
+ height: 28rpx;
+ position: absolute;
+ left: 0;
+ top: 50%;
+ transform: translateY(-50%);
+ background: var(--td-side-bar-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+ border-radius: 8rpx;
+}
diff --git a/uni_modules/tdesign-uniapp/components/side-bar-item/side-bar-item.vue b/uni_modules/tdesign-uniapp/components/side-bar-item/side-bar-item.vue
new file mode 100644
index 0000000..5fa946d
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/side-bar-item/side-bar-item.vue
@@ -0,0 +1,168 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/side-bar-item/type.ts b/uni_modules/tdesign-uniapp/components/side-bar-item/type.ts
new file mode 100644
index 0000000..05f9a4a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/side-bar-item/type.ts
@@ -0,0 +1,32 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdBadgeProps as BadgeProps } from '../badge/type';
+
+export interface TdSideBarItemProps {
+ /**
+ * 透传至 Badge 组件
+ */
+ badgeProps?: BadgeProps;
+ /**
+ * 是否禁用
+ * @default false
+ */
+ disabled?: boolean;
+ /**
+ * 图标,传对象则透传至 Icon
+ */
+ icon?: string | object;
+ /**
+ * 展示的标签
+ * @default ''
+ */
+ label?: string;
+ /**
+ * 当前选项的值
+ */
+ value?: string | number;
+}
diff --git a/uni_modules/tdesign-uniapp/components/side-bar/README.en-US.md b/uni_modules/tdesign-uniapp/components/side-bar/README.en-US.md
new file mode 100644
index 0000000..32bc8de
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/side-bar/README.en-US.md
@@ -0,0 +1,58 @@
+:: BASE_DOC ::
+
+## API
+
+### SideBar Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+value | String / Number | - | `v-model:value` is supported | N
+default-value | String / Number | - | uncontrolled property | N
+
+### SideBar Events
+
+name | params | description
+-- | -- | --
+change | `(context: { value: number \| string, label: string })` | \-
+click | `(context: { value: number \| string; label: string })` | \-
+
+### SideBar Slots
+
+name | Description
+-- | --
+\- | \-
+
+
+### SideBarItem Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+badge-props | Object | - | Typescript:`BadgeProps`,[Badge API Documents](./badge?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/side-bar-item/type.ts) | N
+disabled | Boolean | false | \- | N
+icon | String / Object | - | \- | N
+label | String | - | \- | N
+value | String / Number | - | \- | N
+
+### SideBarItem Slots
+
+name | Description
+-- | --
+\- | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-side-bar-bg-color | @bg-color-secondarycontainer | -
+--td-side-bar-height | 100% | -
+--td-side-bar-width | 206rpx | -
+--td-side-bar-active-color | @brand-color | -
+--td-side-bar-border-radius | 18rpx | -
+--td-side-bar-color | @text-color-primary | -
+--td-side-bar-disabled-color | @text-color-disabled | -
+--td-side-bar-font | @font-body-large | -
+--td-side-bar-icon-size | 40rpx | -
+--td-side-bar-item-height | auto | -
diff --git a/uni_modules/tdesign-uniapp/components/side-bar/README.md b/uni_modules/tdesign-uniapp/components/side-bar/README.md
new file mode 100644
index 0000000..03dddf9
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/side-bar/README.md
@@ -0,0 +1,89 @@
+---
+title: SideBar 侧边栏
+description: 用于信息分类后的展示切换或锚点,位于页面左侧。
+spline: navigation
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TSideBar from '@tdesign/uniapp/side-bar/side-bar.vue';
+import TSideBarItem from '@tdesign/uniapp/side-bar-item/side-bar-item.vue';
+```
+
+### 锚点用法
+
+{{ base }}
+
+### 切页用法
+
+{{ switch }}
+
+### 带图标侧边导航
+
+{{ with-icon }}
+
+### 自定义样式
+
+{{ custom }}
+
+## API
+
+### SideBar Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+value | String / Number | - | 选项值。支持语法糖 `v-model:value` | N
+default-value | String / Number | - | 选项值。非受控属性 | N
+
+### SideBar Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { value: number \| string, label: string })` | 选项值发生变化时触发
+click | `(context: { value: number \| string; label: string })` | 点击选项时触发
+
+### SideBar Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义侧边导航栏内容
+
+
+### SideBarItem Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+badge-props | Object | - | 透传至 Badge 组件。TS 类型:`BadgeProps`,[Badge API Documents](./badge?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/side-bar-item/type.ts) | N
+disabled | Boolean | false | 是否禁用 | N
+icon | String / Object | - | 图标,传对象则透传至 Icon | N
+label | String | - | 展示的标签 | N
+value | String / Number | - | 当前选项的值 | N
+
+### SideBarItem Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义侧边导航项内容
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-side-bar-bg-color | @bg-color-secondarycontainer | -
+--td-side-bar-height | 100% | -
+--td-side-bar-width | 206rpx | -
+--td-side-bar-active-color | @brand-color | -
+--td-side-bar-border-radius | 18rpx | -
+--td-side-bar-color | @text-color-primary | -
+--td-side-bar-disabled-color | @text-color-disabled | -
+--td-side-bar-font | @font-body-large | -
+--td-side-bar-icon-size | 40rpx | -
+--td-side-bar-item-height | auto | -
diff --git a/uni_modules/tdesign-uniapp/components/side-bar/props.ts b/uni_modules/tdesign-uniapp/components/side-bar/props.ts
new file mode 100644
index 0000000..1fc7623
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/side-bar/props.ts
@@ -0,0 +1,26 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export default {
+ /** 选项值 */
+ value: {
+ type: [String, Number],
+ },
+ /** 选项值,非受控属性 */
+ defaultValue: {
+ type: [String, Number],
+ },
+ /** 选项值发生变化时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 点击选项时触发 */
+ onClick: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/side-bar/side-bar-item-props.ts b/uni_modules/tdesign-uniapp/components/side-bar/side-bar-item-props.ts
new file mode 100644
index 0000000..e75554a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/side-bar/side-bar-item-props.ts
@@ -0,0 +1,27 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export default {
+ /** 透传至 Badge 组件 */
+ badgeProps: {
+ type: Object,
+ },
+ /** 是否禁用 */
+ disabled: Boolean,
+ /** 图标,传对象则透传至 Icon */
+ icon: {
+ type: [String, Object],
+ },
+ /** 展示的标签 */
+ label: {
+ type: String,
+ default: '',
+ },
+ /** 当前选项的值 */
+ value: {
+ type: [String, Number],
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/side-bar/side-bar.css b/uni_modules/tdesign-uniapp/components/side-bar/side-bar.css
new file mode 100644
index 0000000..1a9e6d3
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/side-bar/side-bar.css
@@ -0,0 +1,14 @@
+.t-side-bar {
+ display: flex;
+ flex-direction: column;
+ width: var(--td-side-bar-width, 206rpx);
+ height: var(--td-side-bar-height, 100%);
+ overflow-y: auto;
+}
+.t-side-bar::-webkit-scrollbar {
+ display: none;
+}
+.t-side-bar__padding {
+ flex: 1;
+ background-color: var(--td-side-bar-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+}
diff --git a/uni_modules/tdesign-uniapp/components/side-bar/side-bar.vue b/uni_modules/tdesign-uniapp/components/side-bar/side-bar.vue
new file mode 100644
index 0000000..a644204
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/side-bar/side-bar.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/side-bar/type.ts b/uni_modules/tdesign-uniapp/components/side-bar/type.ts
new file mode 100644
index 0000000..5171256
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/side-bar/type.ts
@@ -0,0 +1,24 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdSideBarProps {
+ /**
+ * 选项值
+ */
+ value?: string | number;
+ /**
+ * 选项值,非受控属性
+ */
+ defaultValue?: string | number;
+ /**
+ * 选项值发生变化时触发
+ */
+ onChange?: (context: { value: number | string; label: string }) => void;
+ /**
+ * 点击选项时触发
+ */
+ onClick?: (context: { value: number | string; label: string }) => void;
+}
diff --git a/uni_modules/tdesign-uniapp/components/skeleton/README.en-US.md b/uni_modules/tdesign-uniapp/components/skeleton/README.en-US.md
new file mode 100644
index 0000000..d4fe8f2
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/skeleton/README.en-US.md
@@ -0,0 +1,44 @@
+:: BASE_DOC ::
+
+## API
+
+### Skeleton Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+animation | String | none | options: gradient/flashed/none | N
+delay | Number | 0 | \- | N
+loading | Boolean | true | \- | N
+row-col | Array | - | Typescript:`SkeletonRowCol` `type SkeletonRowCol = Array>` `interface SkeletonRowColObj { width?: string; size?: string;height?: string; marginRight?: string; marginLeft?: string; margin?: string; type?: 'rect' \| 'circle' \| 'text';}`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/skeleton/type.ts) | N
+theme | String | text | options: avatar/image/text/paragraph | N
+
+### Skeleton Slots
+
+name | Description
+-- | --
+\- | \-
+
+### Skeleton External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-col | \-
+t-class-row | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-skeleton-circle-border-radius | @skeleton-circle-border-radius | -
+--td-skeleton-animation-flashed | rgba(90%, 90%, 90%, 0.3) | -
+--td-skeleton-animation-gradient | rgba(0, 0, 0, 4%) | -
+--td-skeleton-bg-color | @bg-color-secondarycontainer | -
+--td-skeleton-circle-height | 96rpx | -
+--td-skeleton-rect-border-radius | @radius-default | -
+--td-skeleton-rect-height | 32rpx | -
+--td-skeleton-row-spacing | @spacer-2 | -
+--td-skeleton-text-border-radius | @radius-small | -
+--td-skeleton-text-height | 32rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/skeleton/README.md b/uni_modules/tdesign-uniapp/components/skeleton/README.md
new file mode 100644
index 0000000..14e9f61
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/skeleton/README.md
@@ -0,0 +1,82 @@
+---
+title: Skeleton 骨架屏
+description: 用于等待加载内容所展示的占位图形组合,有动态效果加载效果,减少用户等待焦虑。
+spline: data
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TSkeleton from '@tdesign/uniapp/skeleton/skeleton.vue';
+```
+
+### 骨架屏类型
+
+基础骨架屏
+
+{{ theme }}
+
+单元格骨架屏
+
+{{ cell-group }}
+
+
+宫格骨架屏
+
+{{ grid }}
+
+图文组合骨架屏
+
+{{ image-group }}
+
+### 组件动效
+
+{{ animation }}
+
+
+## API
+
+### Skeleton Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+animation | String | none | 动画效果,有「渐变加载动画」和「闪烁加载动画」两种。值为 'none' 则表示没有动画。可选项:gradient/flashed/none | N
+delay | Number | 0 | 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒 | N
+loading | Boolean | true | 是否为加载状态,如果是则显示骨架图,如果不是则显示加载完成的内容 | N
+row-col | Array | - | 高级设置,用于自定义行列数量、宽度高度、间距等。【示例一】,`[1, 1, 2]` 表示输出三行骨架图,第一行一列,第二行一列,第三行两列。【示例二】,`[1, 1, { width: '100px' }]` 表示自定义第三行的宽度为 `100px`。【示例三】,`[1, 2, [{ width, height }, { width, height, marginLeft }]]` 表示第三行有两列,且自定义宽度、高度、尺寸(圆形或方形使用)、间距、内容等。TS 类型:`SkeletonRowCol` `type SkeletonRowCol = Array>` `interface SkeletonRowColObj { width?: string; size?: string;height?: string; marginRight?: string; marginLeft?: string; margin?: string; type?: 'rect' \| 'circle' \| 'text';}`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/skeleton/type.ts) | N
+theme | String | text | 骨架图风格,有基础、头像组合等两大类。可选项:avatar/image/text/paragraph | N
+
+### Skeleton Slots
+
+名称 | 描述
+-- | --
+\- | 默认插槽,自定义内容区域内容
+
+### Skeleton External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-col | 行样式类
+t-class-row | 列样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-skeleton-circle-border-radius | @skeleton-circle-border-radius | -
+--td-skeleton-animation-flashed | rgba(90%, 90%, 90%, 0.3) | -
+--td-skeleton-animation-gradient | rgba(0, 0, 0, 4%) | -
+--td-skeleton-bg-color | @bg-color-secondarycontainer | -
+--td-skeleton-circle-height | 96rpx | -
+--td-skeleton-rect-border-radius | @radius-default | -
+--td-skeleton-rect-height | 32rpx | -
+--td-skeleton-row-spacing | @spacer-2 | -
+--td-skeleton-text-border-radius | @radius-small | -
+--td-skeleton-text-height | 32rpx | -
diff --git a/uni_modules/tdesign-uniapp/components/skeleton/props.ts b/uni_modules/tdesign-uniapp/components/skeleton/props.ts
new file mode 100644
index 0000000..0038bb0
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/skeleton/props.ts
@@ -0,0 +1,41 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdSkeletonProps } from './type';
+export default {
+ /** 动画效果,有「渐变加载动画」和「闪烁加载动画」两种。值为 'none' 则表示没有动画 */
+ animation: {
+ type: String,
+ default: 'none' as TdSkeletonProps['animation'],
+ validator(val: TdSkeletonProps['animation']): boolean {
+ if (!val) return true;
+ return ['gradient', 'flashed', 'none'].includes(val);
+ },
+ },
+ /** 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒 */
+ delay: {
+ type: Number,
+ default: 0,
+ },
+ /** 是否为加载状态,如果是则显示骨架图,如果不是则显示加载完成的内容 */
+ loading: {
+ type: Boolean,
+ default: true,
+ },
+ /** 高级设置,用于自定义行列数量、宽度高度、间距等。【示例一】,`[1, 1, 2]` 表示输出三行骨架图,第一行一列,第二行一列,第三行两列。【示例二】,`[1, 1, { width: '100px' }]` 表示自定义第三行的宽度为 `100px`。【示例三】,`[1, 2, [{ width, height }, { width, height, marginLeft }]]` 表示第三行有两列,且自定义宽度、高度、尺寸(圆形或方形使用)、间距、内容等 */
+ rowCol: {
+ type: Array,
+ },
+ /** 骨架图风格,有基础、头像组合等两大类 */
+ theme: {
+ type: String,
+ default: 'text' as TdSkeletonProps['theme'],
+ validator(val: TdSkeletonProps['theme']): boolean {
+ if (!val) return true;
+ return ['avatar', 'image', 'text', 'paragraph'].includes(val);
+ },
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/skeleton/skeleton.css b/uni_modules/tdesign-uniapp/components/skeleton/skeleton.css
new file mode 100644
index 0000000..39fc91a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/skeleton/skeleton.css
@@ -0,0 +1,77 @@
+.t-skeleton {
+ box-sizing: border-box;
+}
+.t-skeleton__row {
+ display: flex;
+ margin-bottom: var(--td-skeleton-row-spacing, var(--td-spacer-2, 32rpx));
+ align-items: center;
+ justify-content: space-between;
+}
+.t-skeleton__row:only-child,
+.t-skeleton__row:last-child {
+ margin-bottom: 0;
+}
+.t-skeleton__col {
+ background-color: var(--td-skeleton-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-right: var(--td-spacer-2, 32rpx);
+}
+.t-skeleton__col:first-child:last-child,
+.t-skeleton__col:last-child {
+ margin-right: 0;
+}
+.t-skeleton--type-text {
+ width: 100%;
+ height: var(--td-skeleton-text-height, 32rpx);
+ border-radius: var(--td-skeleton-text-border-radius, var(--td-radius-small, 6rpx));
+}
+.t-skeleton--type-rect {
+ width: 100%;
+ height: var(--td-skeleton-rect-height, 32rpx);
+ border-radius: var(--td-skeleton-rect-border-radius, var(--td-radius-default, 12rpx));
+}
+.t-skeleton--type-circle {
+ width: var(--td-skeleton-circle-height, 96rpx);
+ height: var(--td-skeleton-circle-height, 96rpx);
+ border-radius: var(--td-skeleton-circle-border-radius, var(--td-skeleton-circle-border-radius, var(--td-radius-circle, 50%)));
+ flex-shrink: 0;
+}
+.t-skeleton--animation-gradient {
+ position: relative;
+ overflow-x: hidden;
+}
+.t-skeleton--animation-gradient::after {
+ content: ' ';
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ top: 0;
+ background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--td-skeleton-animation-gradient, rgba(0, 0, 0, 0.04)), rgba(255, 255, 255, 0));
+ animation: t-skeleton--gradient 1.5s linear 0s infinite;
+}
+.t-skeleton--animation-flashed {
+ animation: t-skeleton--flashed 2s linear 0s infinite;
+}
+@keyframes t-skeleton--gradient {
+ 0% {
+ transform: translateX(-100%) skewX(-15deg);
+ }
+ 100% {
+ transform: translateX(100%) skewX(-15deg);
+ }
+}
+@keyframes t-skeleton--flashed {
+ 0% {
+ opacity: 1;
+ }
+ 50% {
+ background-color: var(--td-skeleton-animation-flashed, rgba(230, 230, 230, 0.3));
+ opacity: 0.3;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
diff --git a/uni_modules/tdesign-uniapp/components/skeleton/skeleton.vue b/uni_modules/tdesign-uniapp/components/skeleton/skeleton.vue
new file mode 100644
index 0000000..36d593c
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/skeleton/skeleton.vue
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/tdesign-uniapp/components/skeleton/type.ts b/uni_modules/tdesign-uniapp/components/skeleton/type.ts
new file mode 100644
index 0000000..91187fd
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/skeleton/type.ts
@@ -0,0 +1,44 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+export interface TdSkeletonProps {
+ /**
+ * 动画效果,有「渐变加载动画」和「闪烁加载动画」两种。值为 'none' 则表示没有动画
+ * @default none
+ */
+ animation?: 'gradient' | 'flashed' | 'none';
+ /**
+ * 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒
+ * @default 0
+ */
+ delay?: number;
+ /**
+ * 是否为加载状态,如果是则显示骨架图,如果不是则显示加载完成的内容
+ * @default true
+ */
+ loading?: boolean;
+ /**
+ * 高级设置,用于自定义行列数量、宽度高度、间距等。【示例一】,`[1, 1, 2]` 表示输出三行骨架图,第一行一列,第二行一列,第三行两列。【示例二】,`[1, 1, { width: '100px' }]` 表示自定义第三行的宽度为 `100px`。【示例三】,`[1, 2, [{ width, height }, { width, height, marginLeft }]]` 表示第三行有两列,且自定义宽度、高度、尺寸(圆形或方形使用)、间距、内容等
+ */
+ rowCol?: SkeletonRowCol;
+ /**
+ * 骨架图风格,有基础、头像组合等两大类
+ * @default text
+ */
+ theme?: 'avatar' | 'image' | 'text' | 'paragraph';
+}
+
+export type SkeletonRowCol = Array>;
+
+export interface SkeletonRowColObj {
+ width?: string;
+ size?: string;
+ height?: string;
+ marginRight?: string;
+ marginLeft?: string;
+ margin?: string;
+ type?: 'rect' | 'circle' | 'text';
+}
diff --git a/uni_modules/tdesign-uniapp/components/slider/README.en-US.md b/uni_modules/tdesign-uniapp/components/slider/README.en-US.md
new file mode 100644
index 0000000..414f33e
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/slider/README.en-US.md
@@ -0,0 +1,63 @@
+:: BASE_DOC ::
+
+## API
+
+### Slider Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+custom-style | Object | - | CSS(Cascading Style Sheets) | N
+colors | Array | [] | `deprecated`。Typescript:`Array` | N
+disabled | Boolean | undefined | \- | N
+disabled-color | Array | [] | `deprecated`。Typescript:`Array` | N
+label | String / Boolean / Function | false | Typescript:`string \| boolean` | N
+marks | Object / Array | {} | Typescript:`Record \| Array` | N
+max | Number | 100 | \- | N
+min | Number | 0 | \- | N
+range | Boolean | false | \- | N
+show-extreme-value | Boolean | false | \- | N
+step | Number | 1 | \- | N
+theme | String | default | options: default/capsule | N
+value | Number / Array | 0 | `v-model:value` is supported。Typescript:`SliderValue` `type SliderValue = number \| Array`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/slider/type.ts) | N
+default-value | Number / Array | 0 | uncontrolled property。Typescript:`SliderValue` `type SliderValue = number \| Array`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/slider/type.ts) | N
+vertical | Boolean | false | \- | N
+
+### Slider Events
+
+name | params | description
+-- | -- | --
+change | `(context: { value: SliderValue })` | \-
+dragend | `(context: { value: SliderValue, e: TouchEvent })` | \-
+dragstart | `(context: { e: TouchEvent })` | \-
+
+### Slider External Classes
+
+className | Description
+-- | --
+t-class | \-
+t-class-bar | \-
+t-class-bar-active | \-
+t-class-bar-disabled | \-
+t-class-cursor | \-
+
+### CSS Variables
+
+The component provides the following CSS variables, which can be used to customize styles.
+Name | Default Value | Description
+-- | -- | --
+--td-slider-active-color | @brand-color | -
+--td-slider-bar-height | 8rpx | -
+--td-slider-bar-width | 8rpx | -
+--td-slider-capsule-bar-color | @bg-color-component | -
+--td-slider-capsule-bar-heihgt | 48rpx | -
+--td-slider-capsule-bar-width | 48rpx | -
+--td-slider-capsule-line-heihgt | 36rpx | -
+--td-slider-default-color | @bg-color-component | -
+--td-slider-disabled-color | @brand-color-disabled | -
+--td-slider-disabled-text-color | @text-color-disabled | -
+--td-slider-dot-bg-color | #fff | -
+--td-slider-dot-color | @component-border | -
+--td-slider-dot-disabled-bg-color | #fff | -
+--td-slider-dot-disabled-border-color | #f3f3f3 | -
+--td-slider-dot-size | 40rpx | -
+--td-slider-text-color | @text-color-primary | -
diff --git a/uni_modules/tdesign-uniapp/components/slider/README.md b/uni_modules/tdesign-uniapp/components/slider/README.md
new file mode 100644
index 0000000..9470ce4
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/slider/README.md
@@ -0,0 +1,127 @@
+---
+title: Slider 滑动选择器
+description: 用于选择横轴上的数值、区间、档位。
+spline: data
+isComponent: true
+---
+
+
+## 引入
+
+可在 `main.ts` 或在需要使用的页面或组件中引入。
+
+```js
+import TSlider from '@tdesign/uniapp/slider/slider.vue';
+```
+
+### 组件类型
+
+单游标滑块
+
+{{ base }}
+
+双游标滑块
+
+{{ range }}
+
+带数值滑动选择器
+
+{{ label }}
+
+带刻度滑动选择器
+
+{{ step }}
+
+### 组件状态
+
+滑块禁用状态
+
+{{ disabled }}
+
+#### 特殊样式
+
+胶囊型滑块
+
+{{ capsule }}
+
+#### 垂直状态
+
+垂直方向的滑块
+
+{{ vertical }}
+
+## FAQ
+
+当 slider 外层使用 `hidden` 包裹,需要在 `hidden = false` 时,重新调用组件的 `init` 方法,才能正常渲染(在t-popup/t-dialog中同理)。如下:
+
+```html
+
+```
+
+```js
+const $slider = this.selectComponent('#slider');
+
+$slider.init();
+```
+
+## API
+
+### Slider Props
+
+名称 | 类型 | 默认值 | 描述 | 必传
+-- | -- | -- | -- | --
+custom-style | Object | - | 自定义样式 | N
+colors | Array | [] | 已废弃。颜色,[已选择, 未选择]。TS 类型:`Array` | N
+disabled | Boolean | undefined | 是否禁用组件 | N
+disabled-color | Array | [] | 已废弃。禁用状态滑动条的颜色,[已选, 未选]。TS 类型:`Array` | N
+label | String / Boolean / Function | false | 滑块当前值文本。
值为 true 显示默认文案;值为 false 不显示滑块当前值文本;
值为 `${value}%` 则表示组件会根据占位符渲染文案;
值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值。TS 类型:`string \| boolean` | N
+marks | Object / Array | {} | 刻度标记,示例:`[0, 10, 40, 200]` 或者 `{ 5: '5¥', 10: '10%' }`。TS 类型:`Record \| Array` | N
+max | Number | 100 | 滑块范围最大值 | N
+min | Number | 0 | 滑块范围最小值 | N
+range | Boolean | false | 双游标滑块 | N
+show-extreme-value | Boolean | false | 是否边界值 | N
+step | Number | 1 | 步长 | N
+theme | String | default | 滑块风格。可选项:default/capsule | N
+value | Number / Array | 0 | 滑块值。支持语法糖 `v-model:value`。TS 类型:`SliderValue` `type SliderValue = number \| Array`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/slider/type.ts) | N
+default-value | Number / Array | 0 | 滑块值。非受控属性。TS 类型:`SliderValue` `type SliderValue = number \| Array`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/slider/type.ts) | N
+vertical | Boolean | false | 是否是垂直的滑块(渲染垂直滑块时,默认高度为400rpx,可通过修改`--td-slider-bar-height`来自定义高度) | N
+
+### Slider Events
+
+名称 | 参数 | 描述
+-- | -- | --
+change | `(context: { value: SliderValue })` | 滑块值变化时触发
+dragend | `(context: { value: SliderValue, e: TouchEvent })` | 结束拖动时触发
+dragstart | `(context: { e: TouchEvent })` | 开始拖动时触发
+
+### Slider External Classes
+
+类名 | 描述
+-- | --
+t-class | 根节点样式类
+t-class-bar | 滑道底部样式类
+t-class-bar-active | 滑道激活态样式类
+t-class-bar-disabled | 滑道禁用态样式类
+t-class-cursor | 游标样式类
+
+### CSS Variables
+
+组件提供了下列 CSS 变量,可用于自定义样式。
+名称 | 默认值 | 描述
+-- | -- | --
+--td-slider-active-color | @brand-color | -
+--td-slider-bar-height | 8rpx | -
+--td-slider-bar-width | 8rpx | -
+--td-slider-capsule-bar-color | @bg-color-component | -
+--td-slider-capsule-bar-heihgt | 48rpx | -
+--td-slider-capsule-bar-width | 48rpx | -
+--td-slider-capsule-line-heihgt | 36rpx | -
+--td-slider-default-color | @bg-color-component | -
+--td-slider-disabled-color | @brand-color-disabled | -
+--td-slider-disabled-text-color | @text-color-disabled | -
+--td-slider-dot-bg-color | #fff | -
+--td-slider-dot-color | @component-border | -
+--td-slider-dot-disabled-bg-color | #fff | -
+--td-slider-dot-disabled-border-color | #f3f3f3 | -
+--td-slider-dot-size | 40rpx | -
+--td-slider-text-color | @text-color-primary | -
diff --git a/uni_modules/tdesign-uniapp/components/slider/computed.js b/uni_modules/tdesign-uniapp/components/slider/computed.js
new file mode 100644
index 0000000..c843649
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/slider/computed.js
@@ -0,0 +1,9 @@
+import { getRegExp } from '../common/runtime/wxs-polyfill';
+
+const REGEXP = getRegExp('[$][{value}]{7}');
+
+export function getValue(label, value) {
+ if (label && label === 'true') return value;
+ if (REGEXP.test(label)) return label.replace(REGEXP, value);
+}
+
diff --git a/uni_modules/tdesign-uniapp/components/slider/props.ts b/uni_modules/tdesign-uniapp/components/slider/props.ts
new file mode 100644
index 0000000..a120571
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/slider/props.ts
@@ -0,0 +1,79 @@
+/* eslint-disable */
+
+/**
+ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
+ * */
+
+import type { TdSliderProps } from './type';
+export default {
+ /** 是否禁用组件 */
+ disabled: {
+ type: Boolean,
+ default: undefined,
+ },
+ /** 滑块当前值文本。
值为 true 显示默认文案;值为 false 不显示滑块当前值文本;
值为 `${value}%` 则表示组件会根据占位符渲染文案;
值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值 */
+ label: {
+ type: [String, Boolean, Function],
+ default: false as TdSliderProps['label'],
+ },
+ /** 刻度标记,示例:`[0, 10, 40, 200]` 或者 `{ 5: '5¥', 10: '10%' }` */
+ marks: {
+ type: [Object, Array],
+ default: () => ({}) as TdSliderProps['marks'],
+ },
+ /** 滑块范围最大值 */
+ max: {
+ type: Number,
+ default: 100,
+ },
+ /** 滑块范围最小值 */
+ min: {
+ type: Number,
+ default: 0,
+ },
+ /** 双游标滑块 */
+ range: Boolean,
+ /** 是否边界值 */
+ showExtremeValue: Boolean,
+ /** 步长 */
+ step: {
+ type: Number,
+ default: 1,
+ },
+ /** 滑块风格 */
+ theme: {
+ type: String,
+ default: 'default' as TdSliderProps['theme'],
+ validator(val: TdSliderProps['theme']): boolean {
+ if (!val) return true;
+ return ['default', 'capsule'].includes(val);
+ },
+ },
+ /** 滑块值 */
+ value: {
+ type: [Number, Array],
+ default: 0 as TdSliderProps['value'],
+ },
+ /** 滑块值,非受控属性 */
+ defaultValue: {
+ type: [Number, Array],
+ default: 0 as TdSliderProps['defaultValue'],
+ },
+ /** 是否是垂直的滑块(渲染垂直滑块时,默认高度为400rpx,可通过修改`--td-slider-bar-height`来自定义高度) */
+ vertical: Boolean,
+ /** 滑块值变化时触发 */
+ onChange: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 结束拖动时触发 */
+ onDragend: {
+ type: Function,
+ default: () => ({}),
+ },
+ /** 开始拖动时触发 */
+ onDragstart: {
+ type: Function,
+ default: () => ({}),
+ },
+};
diff --git a/uni_modules/tdesign-uniapp/components/slider/slider.css b/uni_modules/tdesign-uniapp/components/slider/slider.css
new file mode 100644
index 0000000..b58114a
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/slider/slider.css
@@ -0,0 +1,239 @@
+.t-slider {
+ width: 100%;
+ font: var(--td-font-body-medium, 28rpx / 44rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular));
+ display: flex;
+ align-items: center;
+}
+.t-slider--disabled .t-slider__value,
+.t-slider--disabled .t-slider__range-extreme,
+.t-slider--disabled .t-slider__dot-value,
+.t-slider--disabled .t-slider__scale-desc {
+ color: var(--td-slider-disabled-text-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
+}
+.t-slider--disabled .t-slider__dot {
+ background-color: var(--td-slider-dot-disabled-bg-color, #fff);
+ border-color: var(--td-slider-dot-disabled-border-color, #f3f3f3);
+}
+.t-slider--top {
+ padding-top: 40rpx;
+}
+.t-slider__line {
+ position: absolute;
+ top: 0;
+ height: var(--td-slider-bar-height, 8rpx);
+ border-radius: calc(var(--td-slider-bar-height, 8rpx) / 2);
+ background-color: var(--td-slider-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-slider__line--disabled {
+ background-color: var(--td-slider-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-slider__line--capsule {
+ height: var(--td-slider-capsule-line-heihgt, 36rpx);
+}
+.t-slider__line--capsule.t-slider__line--single {
+ border-top-left-radius: calc(var(--td-slider-capsule-line-heihgt, 36rpx) / 2);
+ border-bottom-left-radius: calc(var(--td-slider-capsule-line-heihgt, 36rpx) / 2);
+}
+.t-slider__dot {
+ border-radius: 50%;
+ border: 2rpx solid var(--td-slider-dot-color, var(--td-component-border, var(--td-gray-color-4, #dcdcdc)));
+ position: absolute;
+ top: 50%;
+ right: 0;
+ transform: translate3d(50%, -50%, 0);
+ z-index: 2;
+ background-color: var(--td-slider-dot-bg-color, #fff);
+ width: var(--td-slider-dot-size, 40rpx);
+ height: var(--td-slider-dot-size, 40rpx);
+ box-shadow: var(--td-shadow-1, 0 1px 10px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.12));
+ box-sizing: border-box;
+}
+.t-slider__dot--left {
+ left: 0;
+ transform: translate3d(-50%, -50%, 0);
+}
+.t-slider__dot-value {
+ position: relative;
+ left: 50%;
+ transform: translateX(-50%);
+ top: -52rpx;
+ text-align: center;
+ width: 96rpx;
+ height: 44rpx;
+}
+.t-slider__value,
+.t-slider__range-extreme,
+.t-slider__dot-value {
+ color: var(--td-slider-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+}
+.t-slider__value--sr-only,
+.t-slider__range-extreme--sr-only,
+.t-slider__dot-value--sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ white-space: nowrap;
+ clip-path: inset(50%);
+ border: 0;
+}
+.t-slider__dot-slider {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+}
+.t-slider__value--min {
+ margin-left: 32rpx;
+}
+.t-slider__value--max {
+ margin-right: 32rpx;
+}
+.t-slider__bar {
+ margin: 16rpx 32rpx;
+ flex: 10;
+ background-clip: content-box;
+ height: var(--td-slider-bar-height, 8rpx);
+ border-radius: calc(var(--td-slider-bar-height, 8rpx) / 2);
+ position: relative;
+ background-color: var(--td-slider-default-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-slider__bar--capsule {
+ height: var(--td-slider-capsule-bar-heihgt, 48rpx);
+ border-radius: calc(var(--td-slider-capsule-bar-heihgt, 48rpx) / 2);
+ background-color: var(--td-slider-capsule-bar-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ border: 6rpx solid var(--td-slider-capsule-bar-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ box-sizing: border-box;
+}
+.t-slider__bar--marks {
+ background-color: var(--td-slider-default-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+}
+.t-slider__bar--disabled {
+ background-color: var(--td-slider-default-color, var(--td-bg-color-component-disabled, var(--td-gray-color-2, #eeeeee)));
+}
+.t-slider__range-extreme--min {
+ margin-left: 32rpx;
+ text-align: left;
+}
+.t-slider__range-extreme--max {
+ margin-right: 32rpx;
+ text-align: right;
+}
+.t-slider__scale-item {
+ background-color: var(--td-slider-default-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ width: var(--td-slider-bar-height, 8rpx);
+ height: 16rpx;
+ width: 16rpx;
+ border-radius: 50%;
+ position: absolute;
+ top: 50%;
+ margin-top: -8rpx;
+ z-index: 1;
+}
+.t-slider__scale-item--active {
+ background-color: var(--td-slider-active-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
+}
+.t-slider__scale-item--disabled {
+ background-color: var(--td-slider-default-color, var(--td-bg-color-component-disabled, var(--td-gray-color-2, #eeeeee)));
+}
+.t-slider__scale-item--active.t-slider__scale-item--disabled {
+ background-color: var(--td-slider-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
+}
+.t-slider__scale-item--capsule {
+ height: var(--td-slider-capsule-line-heihgt, 36rpx);
+ width: 4rpx;
+ border-radius: 0;
+ background-color: var(--td-slider-capsule-bar-color, var(--td-bg-color-component, var(--td-gray-color-3, #e7e7e7)));
+ margin-top: calc(-0.5 * var(--td-slider-capsule-line-heihgt, 36rpx));
+}
+.t-slider__scale-item--hidden {
+ background-color: transparent;
+}
+.t-slider__scale-desc {
+ position: absolute;
+ left: 50%;
+ color: var(--td-slider-text-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
+ transform: translateX(-50%);
+ bottom: 32rpx;
+}
+.t-slider__scale-desc--capsule {
+ bottom: 46rpx;
+}
+.t-slider--vertical {
+ --td-slider-bar-height: 400rpx;
+ height: var(--td-slider-bar-height, 8rpx);
+ justify-content: center;
+ position: relative;
+}
+.t-slider--vertical .t-slider__bar {
+ flex: none;
+ height: 100%;
+ width: var(--td-slider-bar-width, 8rpx);
+}
+.t-slider--vertical .t-slider__bar--capsule {
+ width: var(--td-slider-capsule-bar-width, 48rpx);
+ border-radius: calc(var(--td-slider-capsule-bar-width, 48rpx) / 2);
+}
+.t-slider--vertical .t-slider__line {
+ width: 100%;
+ height: unset;
+ left: 0;
+ border-radius: calc(var(--td-slider-bar-width, 8rpx) / 2);
+}
+.t-slider--vertical .t-slider__line--capsule.t-slider__line--single {
+ border-top-left-radius: calc(var(--td-slider-capsule-line-heihgt, 36rpx) / 2);
+ border-top-right-radius: calc(var(--td-slider-capsule-line-heihgt, 36rpx) / 2);
+}
+.t-slider--vertical .t-slider__dot {
+ left: 50%;
+ top: 100%;
+ transform: translate(-50%, -50%);
+}
+.t-slider--vertical .t-slider__dot--left {
+ top: 0;
+ transform: translate(-50%, -50%);
+ left: 50%;
+}
+.t-slider--vertical .t-slider__dot--right {
+ left: 50%;
+ transform: translate(-50%, -50%);
+ top: 100%;
+}
+.t-slider--vertical .t-slider__dot-value {
+ left: 54rpx;
+ top: 50%;
+ transform: translate(0, -50%);
+ width: auto;
+}
+.t-slider--vertical .t-slider__range-extreme {
+ position: absolute;
+ left: 50%;
+ transform: translateX(-50%);
+ margin: 0;
+}
+.t-slider--vertical .t-slider__range-extreme--min {
+ top: 0;
+}
+.t-slider--vertical .t-slider__range-extreme--max {
+ bottom: 0;
+}
+.t-slider--vertical .t-slider__scale-item {
+ left: 50%;
+ margin-top: 0;
+}
+.t-slider--vertical .t-slider__scale-item--capsule {
+ height: 4rpx;
+ width: var(--td-slider-capsule-line-heihgt, 36rpx);
+}
+.t-slider--vertical .t-slider__scale-desc {
+ top: 50%;
+ transform: translateY(-50%);
+ bottom: unset;
+ left: 38rpx;
+}
+.t-slider--vertical .t-slider__scale-desc--capsule {
+ left: 52rpx;
+}
diff --git a/uni_modules/tdesign-uniapp/components/slider/slider.vue b/uni_modules/tdesign-uniapp/components/slider/slider.vue
new file mode 100644
index 0000000..07d54dd
--- /dev/null
+++ b/uni_modules/tdesign-uniapp/components/slider/slider.vue
@@ -0,0 +1,719 @@
+
+