"
+ ]
+ },
+ "ios": {
+ "UIBackgroundModes": [
+ "audio"
+ ],
+ "urlschemewhitelist": [
+ "baidumap",
+ "iosamap"
+ ],
+ "dSYMs": false
+ },
+ "sdkConfigs": {
+ "speech": {}
+ },
+ "orientation": [
+ "portrait-primary"
+ ],
+ "icons": {
+ "android": {
+ "hdpi": "/static/logo-tdesign.png",
+ "xhdpi": "/static/logo-tdesign.png",
+ "xxhdpi": "/static/logo-tdesign.png",
+ "xxxhdpi": "/static/logo-tdesign.png"
+ },
+ "ios": {
+ "appstore": "",
+ "iphone": {
+ "app@2x": "/static/logo-tdesign.png",
+ "app@3x": "/static/logo-tdesign.png",
+ "spotlight@2x": "/static/logo-tdesign.png",
+ "spotlight@3x": "/static/logo-tdesign.png",
+ "settings@2x": "/static/logo-tdesign.png",
+ "settings@3x": "/static/logo-tdesign.png",
+ "notification@2x": "/static/logo-tdesign.png",
+ "notification@3x": "/static/logo-tdesign.png"
+ },
+ "ipad": {
+ "app": "/static/logo-tdesign.png",
+ "app@2x": "/static/logo-tdesign.png",
+ "proapp@2x": "/static/logo-tdesign.png",
+ "spotlight": "/static/logo-tdesign.png",
+ "spotlight@2x": "/static/logo-tdesign.png",
+ "settings": "/static/logo-tdesign.png",
+ "settings@2x": "/static/logo-tdesign.png",
+ "notification": "/static/logo-tdesign.png",
+ "notification@2x": "/static/logo-tdesign.png"
+ }
+ }
+ }
+ },
+ "uniStatistics": {
+ "enable": true
+ }
+ },
+ "quickapp": {},
+ "quickapp-native": {
+ "icon": "/static/logo-tdesign.png",
+ "package": "com.example.demo",
+ "features": [
+ {
+ "name": "system.clipboard"
+ }
+ ]
+ },
+ "quickapp-webview": {
+ "icon": "/static/logo-tdesign.png",
+ "package": "com.example.demo",
+ "minPlatformVersion": 1070,
+ "versionName": "1.0.0",
+ "versionCode": 100
+ },
+ "mp-weixin": {
+ "appid": "",
+ "setting": {
+ "urlCheck": false
+ },
+ "usingComponents": true,
+ "permission": {
+ "scope.userLocation": {
+ "desc": "演示定位能力"
+ }
+ },
+ "uniStatistics": {
+ "enable": true
+ }
+ },
+ "mp-alipay": {
+ "usingComponents": true,
+ "uniStatistics": {
+ "enable": true
+ }
+ },
+ "mp-baidu": {
+ "usingComponents": true,
+ "uniStatistics": {
+ "enable": true
+ },
+ "dynamicLib": {
+ "editorLib": {
+ "provider": "swan-editor"
+ }
+ }
+ },
+ "mp-toutiao": {
+ "usingComponents": true,
+ "uniStatistics": {
+ "enable": true
+ }
+ },
+ "mp-jd": {
+ "usingComponents": true,
+ "uniStatistics": {
+ "enable": true
+ }
+ },
+ "h5": {
+ "template": "template.h5.html",
+ "router": {
+ "mode": "history",
+ "base": ""
+ },
+ "sdkConfigs": {
+ "maps": {
+ "qqmap": {
+ "key": "TKUBZ-D24AF-GJ4JY-JDVM2-IBYKK-KEBCU"
+ }
+ }
+ },
+ "async": {
+ "timeout": 20000
+ },
+ "uniStatistics": {
+ "enable": true
+ }
+ },
+ "vueVersion": "3",
+ "mp-kuaishou": {
+ "uniStatistics": {
+ "enable": true
+ }
+ },
+ "mp-lark": {
+ "uniStatistics": {
+ "enable": true
+ }
+ },
+ "mp-qq": {
+ "uniStatistics": {
+ "enable": true
+ }
+ },
+ "quickapp-webview-huawei": {
+ "uniStatistics": {
+ "enable": true
+ }
+ },
+ "quickapp-webview-union": {
+ "uniStatistics": {
+ "enable": true
+ }
+ },
+ "uniStatistics": {
+ "version": "2",
+ "enable": true
+ }
+}
diff --git a/packages/tdesign-uniapp/app/mixins/demo-base.js b/packages/tdesign-uniapp/app/mixins/demo-base.js
new file mode 100644
index 000000000..f321205b1
--- /dev/null
+++ b/packages/tdesign-uniapp/app/mixins/demo-base.js
@@ -0,0 +1,32 @@
+export default {
+ computed: {
+ gCustomNavbarHeight() {
+ let result = 0;
+ // #ifdef H5 || APP-PLUS
+ result = 48;
+ // #endif
+ return result;
+ },
+ isH5() {
+ let result = false;
+ // #ifdef H5
+ result = true;
+ // #endif
+ return result;
+ },
+ isMP() {
+ let result = false;
+ // #ifdef MP
+ result = true;
+ // #endif
+ return result;
+ },
+ isMPAlipay() {
+ let result = false;
+ // #ifdef MP-ALIPAY
+ result = true;
+ // #endif
+ return result;
+ },
+ },
+};
diff --git a/packages/tdesign-uniapp/app/mixins/skyline.js b/packages/tdesign-uniapp/app/mixins/skyline.js
new file mode 100644
index 000000000..7f98ea242
--- /dev/null
+++ b/packages/tdesign-uniapp/app/mixins/skyline.js
@@ -0,0 +1 @@
+export { default } from 'tdesign-uniapp/mixins/skyline.js';
diff --git a/packages/tdesign-uniapp/app/package.json b/packages/tdesign-uniapp/app/package.json
new file mode 100644
index 000000000..77e421f34
--- /dev/null
+++ b/packages/tdesign-uniapp/app/package.json
@@ -0,0 +1,129 @@
+{
+ "id": "tdesign-uniapp",
+ "name": "tdesign-uniapp",
+ "displayName": "tdesign-uniapp 示例工程",
+ "version": "3.4.9",
+ "description": "tdesign-uniapp 示例工程",
+ "scripts": {},
+ "repository": "https://github.com/Tencent/tdesign-miniprogram.git",
+ "keywords": [
+ "tdesign-uniapp",
+ "uni-app"
+ ],
+ "author": "",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/Tencent/tdesign-miniprogram/issues"
+ },
+ "homepage": "https://uwayfly.com/tdesign-uniapp/",
+ "dependencies": {},
+ "dcloudext": {
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "",
+ "type": "uniapp-template-project",
+ "darkmode": "x",
+ "i18n": "x",
+ "widescreen": "x"
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "√",
+ "aliyun": "√",
+ "alipay": "x"
+ },
+ "client": {
+ "uni-app": {
+ "vue": {
+ "vue2": "√",
+ "vue3": "√"
+ },
+ "web": {
+ "safari": "√",
+ "chrome": "√"
+ },
+ "app": {
+ "vue": "√",
+ "nvue": "√",
+ "android": "√",
+ "ios": "√",
+ "harmony": "√"
+ },
+ "mp": {
+ "weixin": "√",
+ "alipay": "√",
+ "toutiao": "√",
+ "baidu": "√",
+ "kuaishou": "√",
+ "jd": "√",
+ "harmony": "√",
+ "qq": "√",
+ "lark": "√"
+ },
+ "quickapp": {
+ "huawei": "-",
+ "union": "-"
+ }
+ },
+ "uni-app-x": {
+ "web": {
+ "safari": "-",
+ "chrome": "-"
+ },
+ "app": {
+ "android": "-",
+ "ios": "-",
+ "harmony": "-"
+ },
+ "mp": {
+ "weixin": "-"
+ }
+ }
+ }
+ }
+ },
+ "uni-app": {
+ "scripts": {
+ "mp-dingtalk": {
+ "title": "钉钉小程序",
+ "env": {
+ "UNI_PLATFORM": "mp-alipay"
+ },
+ "define": {
+ "MP-DINGTALK": true
+ }
+ },
+ "hello-uniapp-demo": {
+ "title": "hello-uniapp 演示网站",
+ "env": {
+ "UNI_PLATFORM": "h5"
+ },
+ "define": {
+ "H5-DEMO": true
+ }
+ }
+ }
+ },
+ "engines": {
+ "HBuilderX": "^3.1.0",
+ "uni-app": "^4.03",
+ "uni-app-x": ""
+ }
+}
\ No newline at end of file
diff --git a/packages/tdesign-uniapp/app/pages.json b/packages/tdesign-uniapp/app/pages.json
new file mode 100644
index 000000000..fc86ccbc2
--- /dev/null
+++ b/packages/tdesign-uniapp/app/pages.json
@@ -0,0 +1,475 @@
+{
+ "pages": [
+ {
+ "path": "pages/home/home"
+ },
+ {
+ "path": "pages/home/navigate-fail/index"
+ },
+ {
+ "path": "pages-more/result/result-page"
+ },
+ {
+ "path": "pages-more/indexes/custom/index"
+ },
+ {
+ "path": "pages-more/indexes/base/index"
+ },
+ {
+ "path": "pages-more/side-bar/base/index"
+ },
+ {
+ "path": "pages-more/side-bar/switch/index"
+ },
+ {
+ "path": "pages-more/side-bar/with-icon/index"
+ },
+ {
+ "path": "pages-more/side-bar/custom/index"
+ },
+ {
+ "path": "pages-more/button/button"
+ },
+ {
+ "path": "pages-more/divider/divider"
+ },
+ {
+ "path": "pages-more/fab/fab"
+ },
+ {
+ "path": "pages-more/icon/icon"
+ },
+ {
+ "path": "pages-more/link/link"
+ },
+ {
+ "path": "pages-more/col/col"
+ },
+ {
+ "path": "pages-more/back-top/back-top"
+ },
+ {
+ "path": "pages-more/drawer/drawer"
+ },
+ {
+ "path": "pages-more/indexes/indexes"
+ },
+ {
+ "path": "pages-more/navbar/navbar"
+ },
+ {
+ "path": "pages-more/side-bar/side-bar"
+ },
+ {
+ "path": "pages-more/steps/steps"
+ },
+ {
+ "path": "pages-more/tab-bar/tab-bar"
+ },
+ {
+ "path": "pages-more/tabs/tabs"
+ },
+ {
+ "path": "pages-more/calendar/calendar"
+ },
+ {
+ "path": "pages-more/cascader/cascader"
+ },
+ {
+ "path": "pages-more/checkbox/checkbox"
+ },
+ {
+ "path": "pages-more/color-picker/color-picker"
+ },
+ {
+ "path": "pages-more/date-time-picker/date-time-picker"
+ },
+ {
+ "path": "pages-more/form/form"
+ },
+ {
+ "path": "pages-more/input/input"
+ },
+ {
+ "path": "pages-more/picker/picker"
+ },
+ {
+ "path": "pages-more/radio/radio"
+ },
+ {
+ "path": "pages-more/rate/rate"
+ },
+ {
+ "path": "pages-more/search/search"
+ },
+ {
+ "path": "pages-more/slider/slider"
+ },
+ {
+ "path": "pages-more/stepper/stepper"
+ },
+ {
+ "path": "pages-more/switch/switch"
+ },
+ {
+ "path": "pages-more/textarea/textarea"
+ },
+ {
+ "path": "pages-more/tree-select/tree-select"
+ },
+ {
+ "path": "pages-more/upload/upload"
+ },
+ {
+ "path": "pages-more/avatar/avatar"
+ },
+ {
+ "path": "pages-more/badge/badge"
+ },
+ {
+ "path": "pages-more/cell/cell"
+ },
+ {
+ "path": "pages-more/collapse/collapse"
+ },
+ {
+ "path": "pages-more/count-down/count-down"
+ },
+ {
+ "path": "pages-more/empty/empty"
+ },
+ {
+ "path": "pages-more/footer/footer"
+ },
+ {
+ "path": "pages-more/grid/grid"
+ },
+ {
+ "path": "pages-more/image/image"
+ },
+ {
+ "path": "pages-more/image-viewer/image-viewer"
+ },
+ {
+ "path": "pages-more/progress/progress"
+ },
+ {
+ "path": "pages-more/qrcode/qrcode"
+ },
+ {
+ "path": "pages-more/result/result"
+ },
+ {
+ "path": "pages-more/skeleton/skeleton"
+ },
+ {
+ "path": "pages-more/sticky/sticky"
+ },
+ {
+ "path": "pages-more/swiper/swiper"
+ },
+ {
+ "path": "pages-more/tag/tag"
+ },
+ {
+ "path": "pages-more/watermark/watermark"
+ },
+ {
+ "path": "pages-more/action-sheet/action-sheet"
+ },
+ {
+ "path": "pages-more/dialog/dialog"
+ },
+ {
+ "path": "pages-more/dropdown-menu/dropdown-menu"
+ },
+ {
+ "path": "pages-more/guide/guide"
+ },
+ {
+ "path": "pages-more/loading/loading"
+ },
+ {
+ "path": "pages-more/message/message"
+ },
+ {
+ "path": "pages-more/notice-bar/notice-bar"
+ },
+ {
+ "path": "pages-more/overlay/overlay"
+ },
+ {
+ "path": "pages-more/popup/popup"
+ },
+ {
+ "path": "pages-more/pull-down-refresh/pull-down-refresh"
+ },
+ {
+ "path": "pages-more/swipe-cell/swipe-cell"
+ },
+ {
+ "path": "pages-more/toast/toast"
+ }
+ ],
+ "globalStyle": {
+ "pageOrientation": "portrait",
+ "navigationBarTitleText": "TDesign UniApp",
+ "navigationBarBackgroundColor": "#F8F8F8",
+ "backgroundColor": "#F8F8F8",
+ "navigationStyle": "custom"
+ },
+ "condition": {
+ "current": 0,
+ "list": [
+ {
+ "name": "button",
+ "pathName": "pages-more/button/button"
+ },
+ {
+ "name": "divider",
+ "pathName": "pages-more/divider/divider"
+ },
+ {
+ "name": "fab",
+ "pathName": "pages-more/fab/fab"
+ },
+ {
+ "name": "icon",
+ "pathName": "pages-more/icon/icon"
+ },
+ {
+ "name": "link",
+ "pathName": "pages-more/link/link"
+ },
+ {
+ "name": "layout",
+ "pathName": "pages-more/col/col"
+ },
+ {
+ "name": "back-top",
+ "pathName": "pages-more/back-top/back-top"
+ },
+ {
+ "name": "drawer",
+ "pathName": "pages-more/drawer/drawer"
+ },
+ {
+ "name": "indexes",
+ "pathName": "pages-more/indexes/indexes"
+ },
+ {
+ "name": "navbar",
+ "pathName": "pages-more/navbar/navbar"
+ },
+ {
+ "name": "side-bar",
+ "pathName": "pages-more/side-bar/side-bar"
+ },
+ {
+ "name": "steps",
+ "pathName": "pages-more/steps/steps"
+ },
+ {
+ "name": "tab-bar",
+ "pathName": "pages-more/tab-bar/tab-bar"
+ },
+ {
+ "name": "tabs",
+ "pathName": "pages-more/tabs/tabs"
+ },
+ {
+ "name": "calendar",
+ "pathName": "pages-more/calendar/calendar"
+ },
+ {
+ "name": "cascader",
+ "pathName": "pages-more/cascader/cascader"
+ },
+ {
+ "name": "checkbox",
+ "pathName": "pages-more/checkbox/checkbox"
+ },
+ {
+ "name": "color-picker",
+ "pathName": "pages-more/color-picker/color-picker"
+ },
+ {
+ "name": "date-time-picker",
+ "pathName": "pages-more/date-time-picker/date-time-picker"
+ },
+ {
+ "name": "form",
+ "pathName": "pages-more/form/form"
+ },
+ {
+ "name": "input",
+ "pathName": "pages-more/input/input"
+ },
+ {
+ "name": "picker",
+ "pathName": "pages-more/picker/picker"
+ },
+ {
+ "name": "radio",
+ "pathName": "pages-more/radio/radio"
+ },
+ {
+ "name": "rate",
+ "pathName": "pages-more/rate/rate"
+ },
+ {
+ "name": "search",
+ "pathName": "pages-more/search/search"
+ },
+ {
+ "name": "slider",
+ "pathName": "pages-more/slider/slider"
+ },
+ {
+ "name": "stepper",
+ "pathName": "pages-more/stepper/stepper"
+ },
+ {
+ "name": "switch",
+ "pathName": "pages-more/switch/switch"
+ },
+ {
+ "name": "textarea",
+ "pathName": "pages-more/textarea/textarea"
+ },
+ {
+ "name": "tree-select",
+ "pathName": "pages-more/tree-select/tree-select"
+ },
+ {
+ "name": "upload",
+ "pathName": "pages-more/upload/upload"
+ },
+ {
+ "name": "avatar",
+ "pathName": "pages-more/avatar/avatar"
+ },
+ {
+ "name": "badge",
+ "pathName": "pages-more/badge/badge"
+ },
+ {
+ "name": "cell",
+ "pathName": "pages-more/cell/cell"
+ },
+ {
+ "name": "collapse",
+ "pathName": "pages-more/collapse/collapse"
+ },
+ {
+ "name": "count-down",
+ "pathName": "pages-more/count-down/count-down"
+ },
+ {
+ "name": "empty",
+ "pathName": "pages-more/empty/empty"
+ },
+ {
+ "name": "footer",
+ "pathName": "pages-more/footer/footer"
+ },
+ {
+ "name": "grid",
+ "pathName": "pages-more/grid/grid"
+ },
+ {
+ "name": "image",
+ "pathName": "pages-more/image/image"
+ },
+ {
+ "name": "image-viewer",
+ "pathName": "pages-more/image-viewer/image-viewer"
+ },
+ {
+ "name": "progress",
+ "pathName": "pages-more/progress/progress"
+ },
+ {
+ "name": "q-r-code",
+ "pathName": "pages-more/qrcode/qrcode"
+ },
+ {
+ "name": "result",
+ "pathName": "pages-more/result/result"
+ },
+ {
+ "name": "skeleton",
+ "pathName": "pages-more/skeleton/skeleton"
+ },
+ {
+ "name": "sticky",
+ "pathName": "pages-more/sticky/sticky"
+ },
+ {
+ "name": "swiper",
+ "pathName": "pages-more/swiper/swiper"
+ },
+ {
+ "name": "tag",
+ "pathName": "pages-more/tag/tag"
+ },
+ {
+ "name": "watermark",
+ "pathName": "pages-more/watermark/watermark"
+ },
+ {
+ "name": "action-sheet",
+ "pathName": "pages-more/action-sheet/action-sheet"
+ },
+ {
+ "name": "dialog",
+ "pathName": "pages-more/dialog/dialog"
+ },
+ {
+ "name": "dropdown-menu",
+ "pathName": "pages-more/dropdown-menu/dropdown-menu"
+ },
+ {
+ "name": "guide",
+ "pathName": "pages-more/guide/guide"
+ },
+ {
+ "name": "loading",
+ "pathName": "pages-more/loading/loading"
+ },
+ {
+ "name": "message",
+ "pathName": "pages-more/message/message"
+ },
+ {
+ "name": "notice-bar",
+ "pathName": "pages-more/notice-bar/notice-bar"
+ },
+ {
+ "name": "overlay",
+ "pathName": "pages-more/overlay/overlay"
+ },
+ {
+ "name": "popup",
+ "pathName": "pages-more/popup/popup"
+ },
+ {
+ "name": "pull-down-refresh",
+ "pathName": "pages-more/pull-down-refresh/pull-down-refresh"
+ },
+ {
+ "name": "swipe-cell",
+ "pathName": "pages-more/swipe-cell/swipe-cell"
+ },
+ {
+ "name": "toast",
+ "pathName": "pages-more/toast/toast"
+ }
+ ]
+ },
+ "easycom": {
+ "custom": {
+ "^t-(.*)": "@/uni_modules/tdesign-uniapp/components/$1/$1.vue"
+ }
+ }
+}
diff --git a/packages/tdesign-uniapp/app/static/customicons.css b/packages/tdesign-uniapp/app/static/customicons.css
new file mode 100644
index 000000000..14c111961
--- /dev/null
+++ b/packages/tdesign-uniapp/app/static/customicons.css
@@ -0,0 +1,20 @@
+@font-face {
+ font-family: "customicons"; /* Project id 2878519 */
+ src:url('/static/customicons.ttf') format('truetype');
+}
+
+.customicons {
+ font-family: "customicons" !important;
+}
+
+.youxi:before {
+ content: "\e60e";
+}
+
+.wenjian:before {
+ content: "\e60f";
+}
+
+.zhuanfa:before {
+ content: "\e610";
+}
diff --git a/packages/tdesign-uniapp/app/static/customicons.ttf b/packages/tdesign-uniapp/app/static/customicons.ttf
new file mode 100644
index 000000000..a3c8ab9f2
Binary files /dev/null and b/packages/tdesign-uniapp/app/static/customicons.ttf differ
diff --git a/packages/tdesign-uniapp/app/static/logo-tdesign.png b/packages/tdesign-uniapp/app/static/logo-tdesign.png
new file mode 100644
index 000000000..266d7ddde
Binary files /dev/null and b/packages/tdesign-uniapp/app/static/logo-tdesign.png differ
diff --git a/packages/tdesign-uniapp/app/static/uni.ttf b/packages/tdesign-uniapp/app/static/uni.ttf
new file mode 100644
index 000000000..60a1968d0
Binary files /dev/null and b/packages/tdesign-uniapp/app/static/uni.ttf differ
diff --git a/packages/tdesign-uniapp/app/store/counter.js b/packages/tdesign-uniapp/app/store/counter.js
new file mode 100644
index 000000000..c16908831
--- /dev/null
+++ b/packages/tdesign-uniapp/app/store/counter.js
@@ -0,0 +1,18 @@
+/* eslint-disable import/no-unresolved */
+import { defineStore } from 'pinia';
+export const useCounterStore = defineStore('counter', {
+ state: () => ({
+ count: 0,
+ }),
+ getters: {
+ doubleCount: state => state.count * 2,
+ },
+ actions: {
+ increment() {
+ this.count += 1;
+ },
+ decrement() {
+ this.count -= 1;
+ },
+ },
+});
diff --git a/packages/tdesign-uniapp/app/store/index.js b/packages/tdesign-uniapp/app/store/index.js
new file mode 100644
index 000000000..d4d96b741
--- /dev/null
+++ b/packages/tdesign-uniapp/app/store/index.js
@@ -0,0 +1,142 @@
+/* eslint-disable import/no-unresolved */
+
+import { createStore } from 'vuex';
+const store = createStore({
+ state: {
+ hasLogin: false,
+ isUniverifyLogin: false,
+ loginProvider: '',
+ openid: null,
+ testvuex: false,
+ colorIndex: 0,
+ colorList: ['#FF0000', '#00FF00', '#0000FF'],
+ noMatchLeftWindow: true,
+ active: 'componentPage',
+ leftWinActive: '/pages/component/view/view',
+ activeOpen: '',
+ menu: [],
+ univerifyErrorMsg: '',
+ // vuex测试例使用
+ username: 'foo',
+ sex: '男',
+ age: 10,
+ },
+ mutations: {
+ login(state, provider) {
+ state.hasLogin = true;
+ state.loginProvider = provider;
+ },
+ logout(state) {
+ state.hasLogin = false;
+ state.openid = null;
+ },
+ setOpenid(state, openid) {
+ state.openid = openid;
+ },
+ setTestTrue(state) {
+ state.testvuex = true;
+ },
+ setTestFalse(state) {
+ state.testvuex = false;
+ },
+ setColorIndex(state, index) {
+ state.colorIndex = index;
+ },
+ setMatchLeftWindow(state, matchLeftWindow) {
+ state.noMatchLeftWindow = !matchLeftWindow;
+ },
+ setActive(state, tabPage) {
+ state.active = tabPage;
+ },
+ setLeftWinActive(state, leftWinActive) {
+ state.leftWinActive = leftWinActive;
+ },
+ setActiveOpen(state, activeOpen) {
+ state.activeOpen = activeOpen;
+ },
+ setMenu(state, menu) {
+ state.menu = menu;
+ },
+ setUniverifyLogin(state, payload) {
+ typeof payload !== 'boolean' ? payload = !!payload : '';
+ state.isUniverifyLogin = payload;
+ },
+ setUniverifyErrorMsg(state, payload = '') {
+ state.univerifyErrorMsg = payload;
+ },
+ // vuex测试例使用
+ increment(state) {
+ state.age += 1;
+ },
+ incrementTen(state, payload) {
+ state.age += payload.amount;
+ },
+ resetAge(state) {
+ state.age = 10;
+ },
+ },
+ getters: {
+ currentColor(state) {
+ return state.colorList[state.colorIndex];
+ },
+ // vuex测试例使用
+ doubleAge(state) {
+ return state.age * 2;
+ },
+ },
+ actions: {
+ // vuex测试例使用
+ incrementAsync(context, payload) {
+ context.commit('incrementTen', payload);
+ },
+ // lazy loading openid
+ async getUserOpenId({
+ commit,
+ state,
+ }) {
+ return await new Promise((resolve, reject) => {
+ if (state.openid) {
+ resolve(state.openid);
+ } else {
+ uni.login({
+ success: () => {
+ commit('login');
+ setTimeout(() => { // 模拟异步请求服务器获取 openid
+ const openid = '123456789';
+ console.log(`uni.request mock openid[${openid}]`);
+ commit('setOpenid', openid);
+ resolve(openid);
+ }, 1000);
+ },
+ fail: (err) => {
+ console.log('uni.login 接口调用失败,将无法正常使用开放接口等服务', err);
+ reject(err);
+ },
+ });
+ }
+ });
+ },
+ getPhoneNumber(_, univerifyInfo) {
+ return new Promise((resolve, reject) => {
+ uni.request({
+ url: 'https://97fca9f2-41f6-449f-a35e-3f135d4c3875.bspapp.com/http/univerify-login',
+ method: 'POST',
+ data: univerifyInfo,
+ success: (res) => {
+ const { data } = res;
+ if (data.success) {
+ resolve(data.phoneNumber);
+ } else {
+ reject(res);
+ }
+ },
+ fail: (err) => {
+ reject(err);
+ },
+ });
+ });
+ },
+ },
+});
+
+export default store;
diff --git a/packages/tdesign-uniapp/app/style/app.less b/packages/tdesign-uniapp/app/style/app.less
new file mode 100644
index 000000000..a1b3bf85e
--- /dev/null
+++ b/packages/tdesign-uniapp/app/style/app.less
@@ -0,0 +1,60 @@
+@import 'tdesign-uniapp-raw/common/style/_variables.less';
+@import 'tdesign-uniapp/common/style/theme/index.less';
+
+@font-face {
+ font-family: 'TCloudNumber';
+ src: url('data:font/ttf;charset=utf-8;base64,AAEAAAANAIAAAwBQRkZUTZcMD6UAAB/UAAAAHEdERUYAKQBRAAAftAAAAB5PUy8yaSQEaAAAAVgAAABgY21hcHhknPwAAALcAAACFmdhc3D//wADAAAfrAAAAAhnbHlm71OdawAABYwAABNoaGVhZBwlK2YAAADcAAAANmhoZWEIYAOBAAABFAAAACRobXR4hAYRwgAAAbgAAAEkbG9jYbX8u2YAAAT0AAAAmG1heHAAwgB3AAABOAAAACBuYW1lQleYFwAAGPQAAAYAcG9zdAz/DUMAAB70AAAAuAABAAAAAQKPg0b06l8PPPUACwPoAAAAANeCVUMAAAAA4YOP8wAe/xAD4gOsAAAACAACAAAAAAAAAAEAAAO0/xQAyAQlAAAAAAPiAAEAAAAAAAAAAAAAAAAAAABHAAEAAABLAFgACgAAAAAAAQACAB4ABgAAAGQAAAAAAAAABAHkAZAABQAAAooCWAAAAEsCigJYAAABXgAyATMAAAAAAAAAAAAAAACAAAADAAAAQAAAAAAAAAAAVUtXTgDAACAiZQO0/xQAyAO0AOwAAAABAAAAAAIAAsgAAAAgAAECTgBuAAAAAAFNAAAA8AAAARgAUAHgAF8CFgArA0gAQwL4ADgBGABQAU4AOAFOADgB4AA1AhYAQwEYADcCFgBDARgAUAHgAB4CFgA+AhYAbwIWACsCFgAuAhYAJgIWADECFgAxAhYATwIWAC4CFgAuARgAUAEYACgCFgBDAhYAQwIWAEMCFgA5AvgALwFOAC8B4AAeAU4ALwIWADsCFgBDAU4AIAFOAHMBTgAgAhYAQwEYAFAB4AAsAhYAQwIWAEMBGABQAeAAKwIWADcCFgBLAhYAQwEYADwBGAA8ARgANwHgAFAB4ABQAeAAUAIWAJMCFgAeBCUAQwHgAIgB4ACIAhYALwIWAEMCFgBDAhYAQwIWAEMC+AAgAhYARwBDAEMAQwBDAAAAAwAAAAMAAAAcAAEAAAAAARAAAwABAAAAHAAEAPQAAAA4ACAABAAYACMAQABfAH4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AgwABAAAAAAACAAcAoAABAAAAAAADAB8A6AABAAAAAAAEABQBMgABAAAAAAAFACEBiwABAAAAAAAGABQB1wABAAAAAAAIABUCGAABAAAAAAALABoCZAABAAAAAAANAJADoQABAAAAAAAOABoEaAABAAAAAAAQAAwEnQABAAAAAAARAAcEugADAAEECQAAAEQAAAADAAEECQABABgAaQADAAEECQACAA4AkAADAAEECQADAD4AqAADAAEECQAEACgBCAADAAEECQAFAEIBRwADAAEECQAGACgBrQADAAEECQAIACoB7AADAAEECQALADQCLgADAAEECQANASACfwADAAEECQAOADQEMgADAAEECQAQABgEgwADAAEECQARAA4EqgBDAG8AcAB5AHIAaQBnAGgAdAAgACgAYwApACAAMgAwADIAMQAtAHAAcgBlAHMAZQBuAHQAIABUAEQAZQBzAGkAZwBuAABDb3B5cmlnaHQgKGMpIDIwMjEtcHJlc2VudCBURGVzaWduAABUAEMAbABvAHUAZABOAHUAbQBiAGUAcgAAVENsb3VkTnVtYmVyAABSAGUAZwB1AGwAYQByAABSZWd1bGFyAAAxAC4AMAAxADAAOwBVAEsAVwBOADsAVABDAGwAbwB1AGQATgB1AG0AYgBlAHIALQBSAGUAZwB1AGwAYQByAAAxLjAxMDtVS1dOO1RDbG91ZE51bWJlci1SZWd1bGFyAABUAEMAbABvAHUAZABOAHUAbQBiAGUAcgAgAFIAZQBnAHUAbABhAHIAAFRDbG91ZE51bWJlciBSZWd1bGFyAABWAGUAcgBzAGkAbwBuACAAMQAuADAAMQAwADsARwBsAHkAcABoAHMAIAAzAC4AMQAuADEAIAAoADMAMQAzADUAKQAAVmVyc2lvbiAxLjAxMDtHbHlwaHMgMy4xLjEgKDMxMzUpAABUAEMAbABvAHUAZABOAHUAbQBiAGUAcgAtAFIAZQBnAHUAbABhAHIAAFRDbG91ZE51bWJlci1SZWd1bGFyAABUAGUAbgBjAGUAbgB0ACAAVABEAGUAcwBpAGcAbgAgAE8AdABlAGEAbQAAVGVuY2VudCBURGVzaWduIE90ZWFtAABoAHQAdABwAD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wDGAL4AvwCYAJoAmQDvAKUAkgCcAKcAjwCUAJUAAAAB//8AAgABAAAADAAAABYAAAACAAEAAwBKAAEABAAAAAIAAAAAAAAAAQAAAADeBipuAAAAANeCVUMAAAAA4YOP8w==')
+ format('truetype');
+ font-weight: normal;
+ font-style: normal;
+ font-display: swap;
+}
+
+
+page {
+ background-color: var(--td-bg-color-page);
+
+ --bg-color-demo-desc: var(--td-text-color-secondary);
+ --bg-color-demo-title: var(--td-text-color-primary);
+ --bg-color-demo: var(--td-bg-color-container);
+ --bg-color-demo-secondary: var(--td-bg-color-container);
+ --td-navbar-bg-color: var(--td-bg-color-page);
+ --td-navbar-color: var(--td-text-color-primary);
+ --td-progress-circle-inner-bg-color: var(--bg-color-demo);
+}
+
+.skyline {
+ display: flex;
+ flex-direction: column;
+ height: 100vh;
+
+ .scroll-view {
+ flex: 1;
+ height: 0;
+ }
+}
+
+
+.demo {
+ padding-bottom: 56rpx;
+
+ &-navbar {
+ --td-navbar-bg-color: var(--td-bg-color-container);
+ --td-navbar-color: var(--td-text-color-primary);
+ }
+
+ &-title {
+ font-size: 48rpx;
+ font-weight: 700;
+ line-height: 64rpx;
+ margin: 48rpx 32rpx 0;
+ color: var(--bg-color-demo-title);
+ }
+
+ &-desc {
+ font-size: 28rpx;
+ color: var(--bg-color-demo-desc);
+ margin: 16rpx 32rpx 0;
+ line-height: 44rpx;
+ }
+}
diff --git a/packages/tdesign-uniapp/app/template.h5.html b/packages/tdesign-uniapp/app/template.h5.html
new file mode 100644
index 000000000..6fe7061f1
--- /dev/null
+++ b/packages/tdesign-uniapp/app/template.h5.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+ <%= htmlWebpackPlugin.options.title %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/tdesign-uniapp/app/uni.scss b/packages/tdesign-uniapp/app/uni.scss
new file mode 100644
index 000000000..99b792fe8
--- /dev/null
+++ b/packages/tdesign-uniapp/app/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:#e5e5e5;
+
+/* 尺寸变量 */
+
+/* 文字尺寸 */
+$uni-font-size-sm:12px;
+$uni-font-size-base:14px;
+$uni-font-size-lg:16;
+
+/* 图片尺寸 */
+$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/packages/tdesign-uniapp/app/uni_modules/uni-scss/changelog.md b/packages/tdesign-uniapp/app/uni_modules/uni-scss/changelog.md
new file mode 100644
index 000000000..a58bab79c
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/changelog.md
@@ -0,0 +1,8 @@
+## 1.0.3(2022-01-21)
+- 优化 组件示例
+## 1.0.2(2021-11-22)
+- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
+## 1.0.1(2021-11-22)
+- 修复 vue3中scss语法兼容问题
+## 1.0.0(2021-11-18)
+- init
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/index.scss b/packages/tdesign-uniapp/app/uni_modules/uni-scss/index.scss
new file mode 100644
index 000000000..5d43f7fa4
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/index.scss
@@ -0,0 +1 @@
+@import './styles/index.scss';
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/package.json b/packages/tdesign-uniapp/app/uni_modules/uni-scss/package.json
new file mode 100644
index 000000000..4db034b15
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/package.json
@@ -0,0 +1,82 @@
+{
+ "id": "uni-scss",
+ "displayName": "uni-scss 辅助样式",
+ "version": "1.0.3",
+ "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
+ "keywords": [
+ "uni-scss",
+ "uni-ui",
+ "辅助样式"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": "^3.1.0"
+ },
+ "dcloudext": {
+ "category": [
+ "JS SDK",
+ "通用 SDK"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "u"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "n",
+ "联盟": "n"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/readme.md b/packages/tdesign-uniapp/app/uni_modules/uni-scss/readme.md
new file mode 100644
index 000000000..8fa518a69
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/readme.md
@@ -0,0 +1,4 @@
+`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/index.scss b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/index.scss
new file mode 100644
index 000000000..2106dd1a5
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/index.scss
@@ -0,0 +1,7 @@
+@import './setting/_variables.scss';
+@import './setting/_border.scss';
+@import './setting/_color.scss';
+@import './setting/_space.scss';
+@import './setting/_radius.scss';
+@import './setting/_text.scss';
+@import './setting/_styles.scss';
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_border.scss b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_border.scss
new file mode 100644
index 000000000..781df6489
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_border.scss
@@ -0,0 +1,3 @@
+.uni-border {
+ border: 1px $uni-border-1 solid;
+}
\ No newline at end of file
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_color.scss b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_color.scss
new file mode 100644
index 000000000..595f5edea
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_color.scss
@@ -0,0 +1,66 @@
+
+// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
+// @mixin get-styles($k,$c) {
+// @if $k == size or $k == weight{
+// font-#{$k}:#{$c}
+// }@else{
+// #{$k}:#{$c}
+// }
+// }
+$uni-ui-color:(
+ // 主色
+ primary: $uni-primary,
+ primary-disable: $uni-primary-disable,
+ primary-light: $uni-primary-light,
+ // 辅助色
+ success: $uni-success,
+ success-disable: $uni-success-disable,
+ success-light: $uni-success-light,
+ warning: $uni-warning,
+ warning-disable: $uni-warning-disable,
+ warning-light: $uni-warning-light,
+ error: $uni-error,
+ error-disable: $uni-error-disable,
+ error-light: $uni-error-light,
+ info: $uni-info,
+ info-disable: $uni-info-disable,
+ info-light: $uni-info-light,
+ // 中性色
+ main-color: $uni-main-color,
+ base-color: $uni-base-color,
+ secondary-color: $uni-secondary-color,
+ extra-color: $uni-extra-color,
+ // 背景色
+ bg-color: $uni-bg-color,
+ // 边框颜色
+ border-1: $uni-border-1,
+ border-2: $uni-border-2,
+ border-3: $uni-border-3,
+ border-4: $uni-border-4,
+ // 黑色
+ black:$uni-black,
+ // 白色
+ white:$uni-white,
+ // 透明
+ transparent:$uni-transparent
+) !default;
+@each $key, $child in $uni-ui-color {
+ .uni-#{"" + $key} {
+ color: $child;
+ }
+ .uni-#{"" + $key}-bg {
+ background-color: $child;
+ }
+}
+.uni-shadow-sm {
+ box-shadow: $uni-shadow-sm;
+}
+.uni-shadow-base {
+ box-shadow: $uni-shadow-base;
+}
+.uni-shadow-lg {
+ box-shadow: $uni-shadow-lg;
+}
+.uni-mask {
+ background-color:$uni-mask;
+}
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_radius.scss b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_radius.scss
new file mode 100644
index 000000000..8672a693a
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_radius.scss
@@ -0,0 +1,55 @@
+@mixin radius($r,$d:null ,$important: false){
+ $radius-value:map-get($uni-radius, $r) if($important, !important, null);
+ // Key exists within the $uni-radius variable
+ @if (map-has-key($uni-radius, $r) and $d){
+ @if $d == t {
+ border-top-left-radius:$radius-value;
+ border-top-right-radius:$radius-value;
+ }@else if $d == r {
+ border-top-right-radius:$radius-value;
+ border-bottom-right-radius:$radius-value;
+ }@else if $d == b {
+ border-bottom-left-radius:$radius-value;
+ border-bottom-right-radius:$radius-value;
+ }@else if $d == l {
+ border-top-left-radius:$radius-value;
+ border-bottom-left-radius:$radius-value;
+ }@else if $d == tl {
+ border-top-left-radius:$radius-value;
+ }@else if $d == tr {
+ border-top-right-radius:$radius-value;
+ }@else if $d == br {
+ border-bottom-right-radius:$radius-value;
+ }@else if $d == bl {
+ border-bottom-left-radius:$radius-value;
+ }
+ }@else{
+ border-radius:$radius-value;
+ }
+}
+
+@each $key, $child in $uni-radius {
+ @if($key){
+ .uni-radius-#{"" + $key} {
+ @include radius($key)
+ }
+ }@else{
+ .uni-radius {
+ @include radius($key)
+ }
+ }
+}
+
+@each $direction in t, r, b, l,tl, tr, br, bl {
+ @each $key, $child in $uni-radius {
+ @if($key){
+ .uni-radius-#{"" + $direction}-#{"" + $key} {
+ @include radius($key,$direction,false)
+ }
+ }@else{
+ .uni-radius-#{$direction} {
+ @include radius($key,$direction,false)
+ }
+ }
+ }
+}
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_space.scss b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_space.scss
new file mode 100644
index 000000000..9c3b17bd6
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_space.scss
@@ -0,0 +1,56 @@
+
+@mixin fn($space,$direction,$size,$n) {
+ @if $n {
+ #{$space}-#{$direction}: #{$size*$uni-space-root}px
+ } @else {
+ #{$space}-#{$direction}: #{-$size*$uni-space-root}px
+ }
+}
+@mixin get-styles($direction,$i,$space,$n){
+ @if $direction == t {
+ @include fn($space, top,$i,$n);
+ }
+ @if $direction == r {
+ @include fn($space, right,$i,$n);
+ }
+ @if $direction == b {
+ @include fn($space, bottom,$i,$n);
+ }
+ @if $direction == l {
+ @include fn($space, left,$i,$n);
+ }
+ @if $direction == x {
+ @include fn($space, left,$i,$n);
+ @include fn($space, right,$i,$n);
+ }
+ @if $direction == y {
+ @include fn($space, top,$i,$n);
+ @include fn($space, bottom,$i,$n);
+ }
+ @if $direction == a {
+ @if $n {
+ #{$space}:#{$i*$uni-space-root}px;
+ } @else {
+ #{$space}:#{-$i*$uni-space-root}px;
+ }
+ }
+}
+
+@each $orientation in m,p {
+ $space: margin;
+ @if $orientation == m {
+ $space: margin;
+ } @else {
+ $space: padding;
+ }
+ @for $i from 0 through 16 {
+ @each $direction in t, r, b, l, x, y, a {
+ .uni-#{$orientation}#{$direction}-#{$i} {
+ @include get-styles($direction,$i,$space,true);
+ }
+ .uni-#{$orientation}#{$direction}-n#{$i} {
+ @include get-styles($direction,$i,$space,false);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_styles.scss b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_styles.scss
new file mode 100644
index 000000000..6f882c855
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_styles.scss
@@ -0,0 +1,167 @@
+/* #ifndef APP-NVUE */
+
+$-color-white:#fff;
+$-color-black:#000;
+@mixin base-style($color) {
+ color: #fff;
+ background-color: $color;
+ border-color: mix($-color-black, $color, 8%);
+ &:not([hover-class]):active {
+ background: mix($-color-black, $color, 10%);
+ border-color: mix($-color-black, $color, 20%);
+ color: $-color-white;
+ outline: none;
+ }
+}
+@mixin is-color($color) {
+ @include base-style($color);
+ &[loading] {
+ @include base-style($color);
+ &::before {
+ margin-right:5px;
+ }
+ }
+ &[disabled] {
+ &,
+ &[loading],
+ &:not([hover-class]):active {
+ color: $-color-white;
+ border-color: mix(darken($color,10%), $-color-white);
+ background-color: mix($color, $-color-white);
+ }
+ }
+
+}
+@mixin base-plain-style($color) {
+ color:$color;
+ background-color: mix($-color-white, $color, 90%);
+ border-color: mix($-color-white, $color, 70%);
+ &:not([hover-class]):active {
+ background: mix($-color-white, $color, 80%);
+ color: $color;
+ outline: none;
+ border-color: mix($-color-white, $color, 50%);
+ }
+}
+@mixin is-plain($color){
+ &[plain] {
+ @include base-plain-style($color);
+ &[loading] {
+ @include base-plain-style($color);
+ &::before {
+ margin-right:5px;
+ }
+ }
+ &[disabled] {
+ &,
+ &:active {
+ color: mix($-color-white, $color, 40%);
+ background-color: mix($-color-white, $color, 90%);
+ border-color: mix($-color-white, $color, 80%);
+ }
+ }
+ }
+}
+
+
+.uni-btn {
+ margin: 5px;
+ color: #393939;
+ border:1px solid #ccc;
+ font-size: 16px;
+ font-weight: 200;
+ background-color: #F9F9F9;
+ // TODO 暂时处理边框隐藏一边的问题
+ overflow: visible;
+ &::after{
+ border: none;
+ }
+
+ &:not([type]),&[type=default] {
+ color: #999;
+ &[loading] {
+ background: none;
+ &::before {
+ margin-right:5px;
+ }
+ }
+
+
+
+ &[disabled]{
+ color: mix($-color-white, #999, 60%);
+ &,
+ &[loading],
+ &:active {
+ color: mix($-color-white, #999, 60%);
+ background-color: mix($-color-white,$-color-black , 98%);
+ border-color: mix($-color-white, #999, 85%);
+ }
+ }
+
+ &[plain] {
+ color: #999;
+ background: none;
+ border-color: $uni-border-1;
+ &:not([hover-class]):active {
+ background: none;
+ color: mix($-color-white, $-color-black, 80%);
+ border-color: mix($-color-white, $-color-black, 90%);
+ outline: none;
+ }
+ &[disabled]{
+ &,
+ &[loading],
+ &:active {
+ background: none;
+ color: mix($-color-white, #999, 60%);
+ border-color: mix($-color-white, #999, 85%);
+ }
+ }
+ }
+ }
+
+ &:not([hover-class]):active {
+ color: mix($-color-white, $-color-black, 50%);
+ }
+
+ &[size=mini] {
+ font-size: 16px;
+ font-weight: 200;
+ border-radius: 8px;
+ }
+
+
+
+ &.uni-btn-small {
+ font-size: 14px;
+ }
+ &.uni-btn-mini {
+ font-size: 12px;
+ }
+
+ &.uni-btn-radius {
+ border-radius: 999px;
+ }
+ &[type=primary] {
+ @include is-color($uni-primary);
+ @include is-plain($uni-primary)
+ }
+ &[type=success] {
+ @include is-color($uni-success);
+ @include is-plain($uni-success)
+ }
+ &[type=error] {
+ @include is-color($uni-error);
+ @include is-plain($uni-error)
+ }
+ &[type=warning] {
+ @include is-color($uni-warning);
+ @include is-plain($uni-warning)
+ }
+ &[type=info] {
+ @include is-color($uni-info);
+ @include is-plain($uni-info)
+ }
+}
+/* #endif */
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_text.scss b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_text.scss
new file mode 100644
index 000000000..0a89590bd
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_text.scss
@@ -0,0 +1,24 @@
+@mixin get-styles($k,$c) {
+ @if $k == size or $k == weight{
+ font-#{$k}:#{$c}
+ }@else{
+ #{$k}:#{$c}
+ }
+}
+
+@each $key, $child in $uni-headings {
+ /* #ifndef APP-NVUE */
+ .uni-#{$key} {
+ @each $k, $c in $child {
+ @include get-styles($k,$c)
+ }
+ }
+ /* #endif */
+ /* #ifdef APP-NVUE */
+ .container .uni-#{$key} {
+ @each $k, $c in $child {
+ @include get-styles($k,$c)
+ }
+ }
+ /* #endif */
+}
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_variables.scss b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_variables.scss
new file mode 100644
index 000000000..5fb5d9b94
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/setting/_variables.scss
@@ -0,0 +1,146 @@
+// @use "sass:math";
+@import '../tools/functions.scss';
+// 间距基础倍数
+$uni-space-root: 2 !default;
+// 边框半径默认值
+$uni-radius-root:5px !default;
+$uni-radius: () !default;
+// 边框半径断点
+$uni-radius: map-deep-merge(
+ (
+ 0: 0,
+ // TODO 当前版本暂时不支持 sm 属性
+ // 'sm': math.div($uni-radius-root, 2),
+ null: $uni-radius-root,
+ 'lg': $uni-radius-root * 2,
+ 'xl': $uni-radius-root * 6,
+ 'pill': 9999px,
+ 'circle': 50%
+ ),
+ $uni-radius
+);
+// 字体家族
+$body-font-family: 'Roboto', sans-serif !default;
+// 文本
+$heading-font-family: $body-font-family !default;
+$uni-headings: () !default;
+$letterSpacing: -0.01562em;
+$uni-headings: map-deep-merge(
+ (
+ 'h1': (
+ size: 32px,
+ weight: 300,
+ line-height: 50px,
+ // letter-spacing:-0.01562em
+ ),
+ 'h2': (
+ size: 28px,
+ weight: 300,
+ line-height: 40px,
+ // letter-spacing: -0.00833em
+ ),
+ 'h3': (
+ size: 24px,
+ weight: 400,
+ line-height: 32px,
+ // letter-spacing: normal
+ ),
+ 'h4': (
+ size: 20px,
+ weight: 400,
+ line-height: 30px,
+ // letter-spacing: 0.00735em
+ ),
+ 'h5': (
+ size: 16px,
+ weight: 400,
+ line-height: 24px,
+ // letter-spacing: normal
+ ),
+ 'h6': (
+ size: 14px,
+ weight: 500,
+ line-height: 18px,
+ // letter-spacing: 0.0125em
+ ),
+ 'subtitle': (
+ size: 12px,
+ weight: 400,
+ line-height: 20px,
+ // letter-spacing: 0.00937em
+ ),
+ 'body': (
+ font-size: 14px,
+ font-weight: 400,
+ line-height: 22px,
+ // letter-spacing: 0.03125em
+ ),
+ 'caption': (
+ 'size': 12px,
+ 'weight': 400,
+ 'line-height': 20px,
+ // 'letter-spacing': 0.03333em,
+ // 'text-transform': false
+ )
+ ),
+ $uni-headings
+);
+
+
+
+// 主色
+$uni-primary: #2979ff !default;
+$uni-primary-disable:lighten($uni-primary,20%) !default;
+$uni-primary-light: lighten($uni-primary,25%) !default;
+
+// 辅助色
+// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
+$uni-success: #18bc37 !default;
+$uni-success-disable:lighten($uni-success,20%) !default;
+$uni-success-light: lighten($uni-success,25%) !default;
+
+$uni-warning: #f3a73f !default;
+$uni-warning-disable:lighten($uni-warning,20%) !default;
+$uni-warning-light: lighten($uni-warning,25%) !default;
+
+$uni-error: #e43d33 !default;
+$uni-error-disable:lighten($uni-error,20%) !default;
+$uni-error-light: lighten($uni-error,25%) !default;
+
+$uni-info: #8f939c !default;
+$uni-info-disable:lighten($uni-info,20%) !default;
+$uni-info-light: lighten($uni-info,25%) !default;
+
+// 中性色
+// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
+$uni-main-color: #3a3a3a !default; // 主要文字
+$uni-base-color: #6a6a6a !default; // 常规文字
+$uni-secondary-color: #909399 !default; // 次要文字
+$uni-extra-color: #c7c7c7 !default; // 辅助说明
+
+// 边框颜色
+$uni-border-1: #F0F0F0 !default;
+$uni-border-2: #EDEDED !default;
+$uni-border-3: #DCDCDC !default;
+$uni-border-4: #B9B9B9 !default;
+
+// 常规色
+$uni-black: #000000 !default;
+$uni-white: #ffffff !default;
+$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
+
+// 背景色
+$uni-bg-color: #f7f7f7 !default;
+
+/* 水平间距 */
+$uni-spacing-sm: 8px !default;
+$uni-spacing-base: 15px !default;
+$uni-spacing-lg: 30px !default;
+
+// 阴影
+$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
+$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
+$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
+
+// 蒙版
+$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/tools/functions.scss b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/tools/functions.scss
new file mode 100644
index 000000000..a71beeb2c
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/styles/tools/functions.scss
@@ -0,0 +1,19 @@
+// 合并 map
+@function map-deep-merge($parent-map, $child-map){
+ $result: $parent-map;
+ @each $key, $child in $child-map {
+ $parent-has-key: map-has-key($result, $key);
+ $parent-value: map-get($result, $key);
+ $parent-type: type-of($parent-value);
+ $child-type: type-of($child);
+ $parent-is-map: $parent-type == map;
+ $child-is-map: $child-type == map;
+
+ @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
+ $result: map-merge($result, ( $key: $child ));
+ }@else {
+ $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
+ }
+ }
+ @return $result;
+};
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/theme.scss b/packages/tdesign-uniapp/app/uni_modules/uni-scss/theme.scss
new file mode 100644
index 000000000..20cdf5ebd
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/theme.scss
@@ -0,0 +1,31 @@
+// 间距基础倍数
+$uni-space-root: 2;
+// 边框半径默认值
+$uni-radius-root:5px;
+// 主色
+$uni-primary: #2979ff;
+// 辅助色
+$uni-success: #4cd964;
+// 警告色
+$uni-warning: #f0ad4e;
+// 错误色
+$uni-error: #dd524d;
+// 描述色
+$uni-info: #909399;
+// 中性色
+$uni-main-color: #303133;
+$uni-base-color: #606266;
+$uni-secondary-color: #909399;
+$uni-extra-color: #C0C4CC;
+// 背景色
+$uni-bg-color: #f5f5f5;
+// 边框颜色
+$uni-border-1: #DCDFE6;
+$uni-border-2: #E4E7ED;
+$uni-border-3: #EBEEF5;
+$uni-border-4: #F2F6FC;
+
+// 常规色
+$uni-black: #000000;
+$uni-white: #ffffff;
+$uni-transparent: rgba($color: #000000, $alpha: 0);
diff --git a/packages/tdesign-uniapp/app/uni_modules/uni-scss/variables.scss b/packages/tdesign-uniapp/app/uni_modules/uni-scss/variables.scss
new file mode 100644
index 000000000..49a89b6ff
--- /dev/null
+++ b/packages/tdesign-uniapp/app/uni_modules/uni-scss/variables.scss
@@ -0,0 +1,62 @@
+@import './styles/setting/_variables.scss';
+// 间距基础倍数
+$uni-space-root: 2;
+// 边框半径默认值
+$uni-radius-root:5px;
+
+// 主色
+$uni-primary: #2979ff;
+$uni-primary-disable:mix(#fff,$uni-primary,50%);
+$uni-primary-light: mix(#fff,$uni-primary,80%);
+
+// 辅助色
+// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
+$uni-success: #18bc37;
+$uni-success-disable:mix(#fff,$uni-success,50%);
+$uni-success-light: mix(#fff,$uni-success,80%);
+
+$uni-warning: #f3a73f;
+$uni-warning-disable:mix(#fff,$uni-warning,50%);
+$uni-warning-light: mix(#fff,$uni-warning,80%);
+
+$uni-error: #e43d33;
+$uni-error-disable:mix(#fff,$uni-error,50%);
+$uni-error-light: mix(#fff,$uni-error,80%);
+
+$uni-info: #8f939c;
+$uni-info-disable:mix(#fff,$uni-info,50%);
+$uni-info-light: mix(#fff,$uni-info,80%);
+
+// 中性色
+// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
+$uni-main-color: #3a3a3a; // 主要文字
+$uni-base-color: #6a6a6a; // 常规文字
+$uni-secondary-color: #909399; // 次要文字
+$uni-extra-color: #c7c7c7; // 辅助说明
+
+// 边框颜色
+$uni-border-1: #F0F0F0;
+$uni-border-2: #EDEDED;
+$uni-border-3: #DCDCDC;
+$uni-border-4: #B9B9B9;
+
+// 常规色
+$uni-black: #000000;
+$uni-white: #ffffff;
+$uni-transparent: rgba($color: #000000, $alpha: 0);
+
+// 背景色
+$uni-bg-color: #f7f7f7;
+
+/* 水平间距 */
+$uni-spacing-sm: 8px;
+$uni-spacing-base: 15px;
+$uni-spacing-lg: 30px;
+
+// 阴影
+$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
+$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
+$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
+
+// 蒙版
+$uni-mask: rgba($color: #000000, $alpha: 0.4);
diff --git a/packages/tdesign-uniapp/app/vite.config.js b/packages/tdesign-uniapp/app/vite.config.js
new file mode 100644
index 000000000..6a3faf8dd
--- /dev/null
+++ b/packages/tdesign-uniapp/app/vite.config.js
@@ -0,0 +1,14 @@
+// vite.config.js
+import { defineConfig } from 'vite';
+import uni from '@dcloudio/vite-plugin-uni';
+import path from 'path'; // 用于解析路径
+
+export default defineConfig({
+ plugins: [uni()],
+ resolve: {
+ alias: {
+ 'tdesign-uniapp': path.resolve(__dirname, './uni_modules/tdesign-uniapp/components'),
+ 'tdesign-uniapp-raw': path.resolve(__dirname, './tdesign-uniapp-raw'),
+ },
+ },
+});
diff --git a/packages/tdesign-uniapp/example/.env.production b/packages/tdesign-uniapp/example/.env.production
new file mode 100644
index 000000000..237d79c0d
--- /dev/null
+++ b/packages/tdesign-uniapp/example/.env.production
@@ -0,0 +1 @@
+VUE_APP_PUBLICPATH = https://cdn.uwayfly.com/tdesign-uniapp/mobile
diff --git a/packages/tdesign-uniapp/example/docs/img/github-pages.png b/packages/tdesign-uniapp/example/docs/img/github-pages.png
new file mode 100644
index 000000000..43e4e081a
Binary files /dev/null and b/packages/tdesign-uniapp/example/docs/img/github-pages.png differ
diff --git a/packages/tdesign-uniapp/example/docs/img/tdesign-uniapp-mp.png b/packages/tdesign-uniapp/example/docs/img/tdesign-uniapp-mp.png
new file mode 100644
index 000000000..ca797c826
Binary files /dev/null and b/packages/tdesign-uniapp/example/docs/img/tdesign-uniapp-mp.png differ
diff --git a/packages/tdesign-uniapp/example/index.html b/packages/tdesign-uniapp/example/index.html
new file mode 100644
index 000000000..b8246deeb
--- /dev/null
+++ b/packages/tdesign-uniapp/example/index.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+ TDesign UniApp
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/tdesign-uniapp/example/package.json b/packages/tdesign-uniapp/example/package.json
new file mode 100644
index 000000000..a58d5bf6a
--- /dev/null
+++ b/packages/tdesign-uniapp/example/package.json
@@ -0,0 +1,87 @@
+{
+ "name": "tdesign-uniapp-example",
+ "version": "0.0.1",
+ "private": "true",
+ "scripts": {
+ "postbuild:h5": "mkdir -p ../site/dist/mobile && cp -r dist/build/h5/* ../site/dist/mobile",
+ "dev:custom": "uni -p",
+ "dev:h5": "uni",
+ "dev:h5:ssr": "uni --ssr",
+ "dev:mp-alipay": "uni -p mp-alipay",
+ "dev:mp-baidu": "uni -p mp-baidu",
+ "dev:mp-jd": "uni -p mp-jd",
+ "dev:mp-kuaishou": "uni -p mp-kuaishou",
+ "dev:mp-lark": "uni -p mp-lark",
+ "dev:mp-qq": "uni -p mp-qq",
+ "dev:mp-toutiao": "uni -p mp-toutiao",
+ "dev:mp-weixin": "uni -p mp-weixin",
+ "dev:mp-xhs": "uni -p mp-xhs",
+ "dev:quickapp-webview": "uni -p quickapp-webview",
+ "dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
+ "dev:quickapp-webview-union": "uni -p quickapp-webview-union",
+ "build:custom": "uni build -p",
+ "build:h5": "uni build",
+ "build:h5:ssr": "uni build --ssr",
+ "build:mp-alipay": "uni build -p mp-alipay",
+ "build:mp-baidu": "uni build -p mp-baidu",
+ "build:mp-jd": "uni build -p mp-jd",
+ "build:mp-kuaishou": "uni build -p mp-kuaishou",
+ "build:mp-lark": "uni build -p mp-lark",
+ "build:mp-qq": "uni build -p mp-qq",
+ "build:mp-toutiao": "uni build -p mp-toutiao",
+ "build:mp-weixin": "uni build -p mp-weixin",
+ "build:mp-xhs": "uni build -p mp-xhs",
+ "build:quickapp-webview": "uni build -p quickapp-webview",
+ "build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
+ "build:quickapp-webview-union": "uni build -p quickapp-webview-union",
+ "type-check": "vue-tsc --noEmit"
+ },
+ "dependencies": {
+ "@dcloudio/uni-app": "3.0.0-4030620241128001",
+ "@dcloudio/uni-app-harmony": "3.0.0-4030620241128001",
+ "@dcloudio/uni-app-plus": "3.0.0-4030620241128001",
+ "@dcloudio/uni-components": "3.0.0-4030620241128001",
+ "@dcloudio/uni-h5": "3.0.0-4030620241128001",
+ "@dcloudio/uni-mp-alipay": "3.0.0-4030620241128001",
+ "@dcloudio/uni-mp-baidu": "3.0.0-4030620241128001",
+ "@dcloudio/uni-mp-compiler": "3.0.0-4030620241128001",
+ "@dcloudio/uni-mp-jd": "3.0.0-4030620241128001",
+ "@dcloudio/uni-mp-kuaishou": "3.0.0-4030620241128001",
+ "@dcloudio/uni-mp-lark": "3.0.0-4030620241128001",
+ "@dcloudio/uni-mp-qq": "3.0.0-4030620241128001",
+ "@dcloudio/uni-mp-toutiao": "3.0.0-4030620241128001",
+ "@dcloudio/uni-mp-weixin": "3.0.0-4030620241128001",
+ "@dcloudio/uni-mp-xhs": "3.0.0-4030620241128001",
+ "@dcloudio/uni-quickapp-webview": "3.0.0-4030620241128001",
+ "dayjs": "^1.11.18",
+ "t-comm": "^2.0.26",
+ "tinycolor2": "^1.6.0",
+ "vue": "^3.4.21",
+ "vue-i18n": "^9.1.9"
+ },
+ "devDependencies": {
+ "@dcloudio/types": "^3.4.8",
+ "@dcloudio/uni-automator": "3.0.0-4030620241128001",
+ "@dcloudio/uni-cli-shared": "3.0.0-4030620241128001",
+ "@dcloudio/uni-stacktracey": "3.0.0-4030620241128001",
+ "@dcloudio/vite-plugin-uni": "3.0.0-4030620241128001",
+ "@plugin-light/vite-plugin-gen-version": "^1.0.1",
+ "@vue/runtime-core": "^3.4.21",
+ "@vue/tsconfig": "^0.7.0",
+ "chokidar": "^4.0.3",
+ "cos-nodejs-sdk-v5": "^2.15.4",
+ "glob": "^11.0.3",
+ "gulp": "^5.0.1",
+ "gulp-watch": "^5.0.1",
+ "less": "^4.4.0",
+ "postcss": "^8.5.6",
+ "postcss-rpx-transform": "^1.0.1",
+ "sass": "^1.90.0",
+ "tdesign-uniapp": "workspace:*",
+ "tdesign-uniapp-auto-import-resolver": "0.1.3",
+ "unplugin-auto-import": "^20.2.0",
+ "unplugin-vue-components": "^29.2.0",
+ "vite": "6.3.6",
+ "vue-tsc": "^1.0.24"
+ }
+}
\ No newline at end of file
diff --git a/packages/tdesign-uniapp/example/script/pages/config.js b/packages/tdesign-uniapp/example/script/pages/config.js
new file mode 100644
index 000000000..92c902c83
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/pages/config.js
@@ -0,0 +1,36 @@
+const DEFAULT_PAGES = [
+ {
+ path: 'pages/home/home',
+ },
+ {
+ path: 'pages/home/navigate-fail/index',
+ },
+ {
+ path: 'pages-more/result/result-page',
+ },
+ {
+ path: 'pages-more/indexes/custom/index',
+ },
+ {
+ path: 'pages-more/indexes/base/index',
+ },
+ {
+ path: 'pages-more/side-bar/base/index',
+ },
+ {
+ path: 'pages-more/side-bar/switch/index',
+ },
+ {
+ path: 'pages-more/side-bar/with-icon/index',
+ },
+ {
+ path: 'pages-more/side-bar/custom/index',
+ },
+];
+
+const SHOW_SKYLINE_PAGES = false;
+
+module.exports = {
+ DEFAULT_PAGES,
+ SHOW_SKYLINE_PAGES,
+};
diff --git a/packages/tdesign-uniapp/example/script/pages/index.js b/packages/tdesign-uniapp/example/script/pages/index.js
new file mode 100644
index 000000000..bf08a7112
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/pages/index.js
@@ -0,0 +1,107 @@
+const {
+ components,
+} = require('../utils/components.js');
+const path = require('path');
+const pagesJson = path.resolve(__dirname, '../../src/pages.json');
+const { writeFileSync, readFileSync, hyphenate } = require('t-comm');
+const { DEFAULT_PAGES, SHOW_SKYLINE_PAGES } = require('./config');
+
+
+const {
+ base,
+ skylineBase,
+ nav,
+ skylineNav,
+ display,
+ skylineDisplay,
+ form,
+ skylineForm,
+ ux,
+ skylineUx,
+ chat,
+ skylineChat,
+} = components;
+
+const getComponentPages = (list, isSkyline) => list.reduce((acc, item) => [
+ ...acc,
+ ...(item.childArr || []).filter(page => !page.hide),
+], [])
+ .map((item) => {
+ const name = hyphenate(item.name);
+ const pagePathBaseComponent = `pages-more/${isSkyline ? `${name}/skyline` : `${name}`}/${name}`;
+ const { path } = item;
+ return {
+ name,
+ path: path ? path.replace(/^\//, '') : pagePathBaseComponent,
+ };
+ });
+
+function main() {
+ const list = [
+ // chat,
+ base,
+ nav,
+ form,
+ display,
+ ux,
+ ];
+ const skylineList = SHOW_SKYLINE_PAGES ? [
+ skylineChat,
+ skylineBase,
+ skylineNav,
+ skylineForm,
+ skylineDisplay,
+ skylineUx,
+ ] : [];
+
+ const componentPages = getComponentPages(list, false);
+ const skylinePages = getComponentPages(skylineList, true);
+
+ const rawData = readFileSync(pagesJson, true);
+ rawData.pages = [
+ ...DEFAULT_PAGES,
+ ...componentPages.map(item => ({
+ path: item.path,
+ })),
+ ...skylinePages.map(item => ({
+ path: item.path,
+ style: {
+ renderer: 'skyline',
+ componentFramework: 'glass-easel',
+ },
+ })),
+ ];
+ rawData.subPackages = [
+ ...chat.childArr.map((item) => {
+ const camelName = hyphenate(item.name);
+ return {
+ root: `pages-more/${camelName}`,
+ pages: [
+ {
+ path: camelName,
+ },
+ ],
+ };
+ }),
+ ];
+ rawData.condition = {
+ current: 0,
+ list: [
+ ...componentPages.map(item => ({
+ name: item.name,
+ pathName: item.path,
+ })),
+ ...rawData.subPackages.reduce((acc, item) => [
+ ...acc,
+ ...item.pages.map(page => ({
+ name: page.path,
+ pathName: `${item.root}/${page.path}`,
+ })),
+ ], []),
+ ],
+ };
+ writeFileSync(pagesJson, `${JSON.stringify(rawData, null, 2)}\n`, false);
+ console.log('[pages.json] Wrote!');
+}
+
+main();
diff --git a/packages/tdesign-uniapp/example/script/release/config.js b/packages/tdesign-uniapp/example/script/release/config.js
new file mode 100644
index 000000000..42d20894b
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/release/config.js
@@ -0,0 +1,21 @@
+const path = require('path');
+
+const PACKAGES_ROOT = path.resolve(__dirname, '../../../../');
+
+const config = {
+ targetDir: path.resolve(PACKAGES_ROOT, 'tdesign-uniapp/npm_dist'),
+ sourceDir: path.resolve(PACKAGES_ROOT, 'uniapp-components'),
+ sourceGlob: path.resolve(PACKAGES_ROOT, 'uniapp-components/**/*'),
+
+ chatTargetDir: path.resolve(PACKAGES_ROOT, 'tdesign-uniapp-chat/npm_dist'),
+ chatSourceDir: path.resolve(PACKAGES_ROOT, 'uniapp-pro-components/chat'),
+ chatSourceGlob: path.resolve(PACKAGES_ROOT, 'uniapp-pro-components/chat/**/*'),
+
+ demoDir: path.resolve(__dirname, '../../src/pages-more'),
+};
+
+
+module.exports = {
+ config,
+ PACKAGES_ROOT,
+};
diff --git a/packages/tdesign-uniapp/example/script/release/core.js b/packages/tdesign-uniapp/example/script/release/core.js
new file mode 100644
index 000000000..c9ec5c058
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/release/core.js
@@ -0,0 +1,31 @@
+const fs = require('fs');
+const path = require('path');
+const { processLess } = require('./less');
+
+
+async function copy({
+ relativePath, filePath, config,
+}) {
+ const isDemo = relativePath.split(path.sep)[1] === '_example';
+ let targetPath = path.resolve(config.targetDir, relativePath);
+ if (isDemo) {
+ targetPath = path.resolve(config.demoDir, relativePath.replace(`${path.sep}_example`, ''));
+ }
+ fs.mkdirSync(path.dirname(targetPath), { recursive: true });
+
+ const lessResult = await processLess(filePath, targetPath);
+ if (!lessResult) {
+ fs.copyFileSync(filePath, targetPath);
+ }
+
+ return {
+ targetPath,
+ isDemo,
+ relativeTargetByCwd: path.relative(process.cwd(), targetPath),
+ relativeSourceByCwd: path.relative(process.cwd(), filePath),
+ };
+}
+
+module.exports = {
+ copy,
+};
diff --git a/packages/tdesign-uniapp/example/script/release/less.js b/packages/tdesign-uniapp/example/script/release/less.js
new file mode 100644
index 000000000..58497a064
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/release/less.js
@@ -0,0 +1,85 @@
+const fs = require('fs');
+const path = require('path');
+const less = require('less');
+const postcss = require('postcss');
+const rpxTransform = require('postcss-rpx-transform');
+const PACKAGES_ROOT = path.resolve(__dirname, '../../../../');
+
+const CONFIG = {
+ whiteList: [
+ path.resolve(PACKAGES_ROOT, 'uniapp-components/common/style/theme/index.less'),
+ path.resolve(PACKAGES_ROOT, 'uniapp-components/common/style/base.less'),
+ path.resolve(PACKAGES_ROOT, 'uniapp-components/common/style/_variables.less'),
+ path.resolve(PACKAGES_ROOT, 'uniapp-components/common/style/mixins/'),
+ path.resolve(PACKAGES_ROOT, 'uniapp-components/common/style/theme/raw/'),
+ ],
+};
+
+// 配置参数(通常 1rpx=0.5px,设计稿 750px 宽时)
+const options = {
+ transformType: 'rpx',
+ rpxUnit: 0.5, // 转换比例 1rpx = 0.5px
+ rpxPrecision: 6, // 输出精度
+};
+
+// 处理流程
+async function processLess(inputFile, rawOutputFile, rawOutputFileInApp) {
+ if (!inputFile.endsWith('.less')) return;
+ if (CONFIG.whiteList.find(item => inputFile.startsWith(item))) {
+ return;
+ }
+
+ try {
+ let lessCode = fs.readFileSync(inputFile, 'utf8');
+
+ lessCode = lessCode.replace('@import \'tdesign-uniapp/common/style/base.less\'', '@import \'../common/style/base.less\'');
+
+ const cssResult = await less.render(lessCode, {
+ // 设置导入路径
+ paths: [
+ path.join(PACKAGES_ROOT, 'uniapp-components/common'),
+ path.join(PACKAGES_ROOT, 'uniapp-components/common/style'),
+ path.join(PACKAGES_ROOT, 'uniapp-components/common/style/mixins'),
+ path.join(PACKAGES_ROOT, 'uniapp-components/common/style/theme'),
+ ],
+ });
+
+ const postcssResult = await postcss([
+ rpxTransform(options),
+ ]).process(cssResult.css, { from: undefined });
+
+
+ const getOutputFile = (rawOutputFile) => {
+ const filename = `${path
+ .basename(rawOutputFile, path.extname(rawOutputFile))
+ .replace(/^_/, '')}.css`;
+
+ const outputFile = path.resolve(path.dirname(rawOutputFile), filename);
+ console.log('filename', filename);
+
+ return outputFile;
+ };
+
+
+ const outputFile = getOutputFile(rawOutputFile);
+ fs.writeFileSync(outputFile, postcssResult.css);
+ console.log(`✅ 转换完成: ${outputFile}`);
+
+ if (rawOutputFileInApp) {
+ const outputFile = getOutputFile(rawOutputFileInApp);
+
+ fs.writeFileSync(outputFile, postcssResult.css);
+ console.log(`✅ 转换完成: ${outputFile}`);
+ }
+ return true;
+ } catch (err) {
+ console.error('❌ 处理失败:', err);
+ }
+}
+
+module.exports = {
+ processLess,
+};
+
+// 使用示例
+// processLess(path.resolve(process.cwd(), 'packages/tdesign/common/style/mixins/_hairline.less'), 'styles.css');
diff --git a/packages/tdesign-uniapp/example/script/release/prepare.js b/packages/tdesign-uniapp/example/script/release/prepare.js
new file mode 100644
index 000000000..120f2c8a4
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/release/prepare.js
@@ -0,0 +1,64 @@
+const path = require('path');
+const glob = require('glob');
+const { deleteFolder } = require('t-comm');
+
+const { config } = require('./config');
+const { copy } = require('./core.js');
+
+async function main() {
+ const {
+ targetDir,
+ sourceGlob,
+ sourceDir,
+
+ chatTargetDir,
+ chatSourceDir,
+ chatSourceGlob,
+ } = config;
+
+ await prepareOne({
+ targetDir,
+ sourceGlob,
+ sourceDir,
+ });
+ await prepareOne({
+ targetDir: chatTargetDir,
+ sourceGlob: chatSourceGlob,
+ sourceDir: chatSourceDir,
+ });
+}
+
+async function prepareOne({
+ targetDir,
+ sourceGlob,
+ sourceDir,
+}) {
+ deleteFolder(targetDir);
+ const list = glob.sync(sourceGlob, {
+ ignore: '**/{node_modules,_example}/**/*',
+ nodir: true,
+ dot: true,
+ }).filter(item => !item.includes('_example') && !item.includes('node_modules'));
+
+ for (const item of list) {
+ const relativePath = path.relative(sourceDir, item);
+ const {
+ relativeTargetByCwd,
+ relativeSourceByCwd,
+ } = await copy({
+ relativePath,
+ filePath: item,
+ config: {
+ targetDir,
+ sourceGlob,
+ sourceDir,
+ },
+ });
+ console.log(`[Wrote] done! \nFrom ${relativeSourceByCwd} to ${relativeTargetByCwd}`);
+ }
+
+ console.log(`[Wrote] done! Length is ${list.length}!`);
+}
+
+
+main();
diff --git a/packages/tdesign-uniapp/example/script/release/publish-core.js b/packages/tdesign-uniapp/example/script/release/publish-core.js
new file mode 100644
index 000000000..dd967d22c
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/release/publish-core.js
@@ -0,0 +1,27 @@
+const { execCommand, readFileSync } = require('t-comm');
+const path = require('path');
+
+
+function getTag(version) {
+ if (version.includes('alpha')) {
+ return 'alpha';
+ }
+ if (version.includes('beta')) {
+ return 'beta';
+ }
+ return 'latest';
+}
+
+function publishCore(publishDir) {
+ const { version } = readFileSync(path.resolve(publishDir, 'package.json'), true);
+ console.log('[version] ', version);
+
+ const tag = getTag(version);
+ console.log('[tag] ', version);
+
+ execCommand(`npm publish --tag ${tag}`, publishDir, { stdio: 'inherit' });
+}
+
+module.exports = {
+ publishCore,
+};
diff --git a/packages/tdesign-uniapp/example/script/release/publish-tdesign-uniapp-chat.js b/packages/tdesign-uniapp/example/script/release/publish-tdesign-uniapp-chat.js
new file mode 100644
index 000000000..a94dde615
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/release/publish-tdesign-uniapp-chat.js
@@ -0,0 +1,12 @@
+const { publishCore } = require('./publish-core');
+const path = require('path');
+
+const PUBLISH_DIR = path.resolve(__dirname, '../../../../npm_dist');
+
+console.log('[PUBLISH_DIR]', PUBLISH_DIR);
+
+function main() {
+ publishCore(PUBLISH_DIR);
+}
+
+main();
diff --git a/packages/tdesign-uniapp/example/script/release/publish-tdesign-uniapp.js b/packages/tdesign-uniapp/example/script/release/publish-tdesign-uniapp.js
new file mode 100644
index 000000000..60a29230d
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/release/publish-tdesign-uniapp.js
@@ -0,0 +1,12 @@
+const { publishCore } = require('./publish-core');
+const path = require('path');
+
+const PUBLISH_DIR = path.resolve(__dirname, '../../../../tdesign-uniapp-chat/npm_dist');
+
+console.log('[PUBLISH_DIR]', PUBLISH_DIR);
+
+function main() {
+ publishCore(PUBLISH_DIR);
+}
+
+main();
diff --git a/packages/tdesign-uniapp/example/script/sync/demo-vue-css.js b/packages/tdesign-uniapp/example/script/sync/demo-vue-css.js
new file mode 100644
index 000000000..5fd31ada4
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/sync/demo-vue-css.js
@@ -0,0 +1,39 @@
+// demo 中 css 纳入 vue
+const glob = require('glob');
+const path = require('path');
+const fs = require('fs');
+
+const { writeFileSync, readFileSync } = require('t-comm');
+
+const config = {
+ target: path.resolve(__dirname, '../../../tdesign'),
+ source: path.resolve(__dirname, '../../../../../tdesign-miniprogram/packages/components'),
+};
+
+function parseOne(file) {
+ const filename = path.basename(file, path.extname(file));
+ const vuePath = path.resolve(path.dirname(file), `${filename}.vue`);
+ const content = readFileSync(vuePath);
+
+ if (content.includes('@import \'./index.css\';')) {
+ const sassContent = readFileSync(file);
+ const newVueContent = content.replace('@import \'./index.css\';\n', sassContent);
+ writeFileSync(vuePath, newVueContent);
+
+ if (!sassContent.trim()) {
+ fs.unlinkSync(file);
+ }
+ }
+}
+
+function main() {
+ const list = glob.sync(`${config.target}/*/_example/*/*.css`, {
+ ignore: '**/node_modules/**/*',
+ nodir: true,
+ });
+
+ list.slice(0, 1000).forEach(parseOne);
+ console.log('[Parsed] Wrote!');
+}
+
+main();
diff --git a/packages/tdesign-uniapp/example/script/sync/doc-common-design.js b/packages/tdesign-uniapp/example/script/sync/doc-common-design.js
new file mode 100644
index 000000000..d502700b8
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/sync/doc-common-design.js
@@ -0,0 +1,26 @@
+// 拷贝组件设计指南
+
+const glob = require('glob');
+const path = require('path');
+
+const { writeFileSync, readFileSync } = require('t-comm');
+
+const config = {
+ target: path.resolve(__dirname, '../../../site/docs/design'),
+ source: path.resolve(__dirname, '../../../../../tdesign-miniprogram/packages/common/docs/mobile/design'),
+};
+
+function cpFile(file) {
+ const filename = path.basename(file);
+ const targetPath = path.resolve(config.target, filename);
+
+ writeFileSync(targetPath, readFileSync(file));
+}
+
+function main() {
+ const list = glob.sync(`${config.source}/*.md`);
+ list.forEach(cpFile);
+ console.log('[less] Wrote!');
+}
+
+main();
diff --git a/packages/tdesign-uniapp/example/script/sync/doc-component.js b/packages/tdesign-uniapp/example/script/sync/doc-component.js
new file mode 100644
index 000000000..bddadff35
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/sync/doc-component.js
@@ -0,0 +1,31 @@
+// 拷贝组件文档
+const glob = require('glob');
+const path = require('path');
+const fs = require('fs');
+
+const { writeFileSync, readFileSync } = require('t-comm');
+
+const config = {
+ target: path.resolve(__dirname, '../../../tdesign'),
+ source: path.resolve(__dirname, '../../../../../tdesign-miniprogram/packages/components'),
+};
+
+function cpFile(file) {
+ const list = file.split(path.sep);
+ const componentName = list[list.length - 2];
+
+ const filename = path.basename(file);
+ const targetPath = path.resolve(config.target, componentName, filename);
+
+ if (fs.existsSync(path.dirname(targetPath))) {
+ writeFileSync(targetPath, readFileSync(file));
+ }
+}
+
+function main() {
+ const list = glob.sync(`${config.source}/*/*.md`);
+ list.forEach(cpFile);
+ console.log('[less] Wrote!');
+}
+
+main();
diff --git a/packages/tdesign-uniapp/example/script/sync/doc-format.js b/packages/tdesign-uniapp/example/script/sync/doc-format.js
new file mode 100644
index 000000000..ef8a6a3ab
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/sync/doc-format.js
@@ -0,0 +1,30 @@
+// 格式化文档,去掉多余空格
+const glob = require('glob');
+const path = require('path');
+
+const { writeFileSync, readFileSync } = require('t-comm');
+
+const config = {
+ target: path.resolve(__dirname, '../../../tdesign'),
+ source: path.resolve(__dirname, '../../../../../tdesign-miniprogram/packages/components'),
+};
+
+function cpLess(file) {
+ const content = readFileSync(file);
+ const reg = /([\s\S]+?)(##\s+API[\s\S]+)/;
+
+ const newContent = content.replace(reg, (_, a, b) => {
+ const result = a + b.replace(/[^\S\r\n]+/g, ' ');
+ return result;
+ });
+
+ writeFileSync(file, newContent);
+}
+
+function main() {
+ const list = glob.sync(`${config.target}/*/README.en-US.md`);
+ list.slice(0, 100).forEach(cpLess);
+ console.log('[less] Wrote!');
+}
+
+main();
diff --git a/packages/tdesign-uniapp/example/script/sync/less.js b/packages/tdesign-uniapp/example/script/sync/less.js
new file mode 100644
index 000000000..105cc2781
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/sync/less.js
@@ -0,0 +1,34 @@
+// 拷贝 less 文件
+const glob = require('glob');
+const path = require('path');
+const fs = require('fs');
+
+const { writeFileSync, readFileSync } = require('t-comm');
+
+const config = {
+ target: path.resolve(__dirname, '../../../tdesign'),
+ source: path.resolve(__dirname, '../../../../../tdesign-miniprogram/packages/components'),
+};
+
+function cpLess(file) {
+ const componentName = path.basename(file, '.less');
+ const targetPath = path.resolve(config.target, componentName, `${componentName}.less`);
+
+ // for copy less of tdesign-miniprogram
+ if (fs.existsSync(path.dirname(targetPath))) {
+ writeFileSync(targetPath, readFileSync(file));
+ }
+
+ // for delete useless files
+ // if (fs.existsSync(path.resolve(config.target, componentName, 'type.js'))) {
+ // fs.unlinkSync(path.resolve(config.target, componentName, 'type.js'));
+ // }
+}
+
+function main() {
+ const list = glob.sync(`${config.source}/*/*.less`);
+ list.forEach(cpLess);
+ console.log('[less] Wrote!');
+}
+
+main();
diff --git a/packages/tdesign-uniapp/example/script/utils/components.js b/packages/tdesign-uniapp/example/script/utils/components.js
new file mode 100644
index 000000000..ff5255f93
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/utils/components.js
@@ -0,0 +1,24 @@
+const { base, skylineBase } = require('../../src/pages/home/data/base.json');
+const { nav, skylineNav } = require('../../src/pages/home/data/nav.json');
+const { display, skylineDisplay } = require('../../src/pages/home/data/display.json');
+const { form, skylineForm } = require('../../src/pages/home/data/form.json');
+const { ux, skylineUx } = require('../../src/pages/home/data/ux.json');
+const { chat, skylineChat } = require('../../src/pages/home/data/chat.json');
+
+
+module.exports = {
+ components: {
+ base,
+ skylineBase,
+ nav,
+ skylineNav,
+ display,
+ skylineDisplay,
+ form,
+ skylineForm,
+ ux,
+ skylineUx,
+ chat,
+ skylineChat,
+ },
+};
diff --git a/packages/tdesign-uniapp/example/script/utils/utils.js b/packages/tdesign-uniapp/example/script/utils/utils.js
new file mode 100644
index 000000000..f6087aa06
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/utils/utils.js
@@ -0,0 +1,9 @@
+const toPascal = name => name
+ .split('-')
+ .map(part => part.charAt(0).toUpperCase() + part.slice(1))
+ .join('');
+
+
+module.exports = {
+ toPascal,
+};
diff --git a/packages/tdesign-uniapp/example/script/watch/config.js b/packages/tdesign-uniapp/example/script/watch/config.js
new file mode 100644
index 000000000..0ad27a6e9
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/watch/config.js
@@ -0,0 +1,33 @@
+const path = require('path');
+
+const PACKAGES_ROOT = path.resolve(__dirname, '../../../../');
+
+const config = {
+ targetDir: path.resolve(__dirname, '../../src/_tdesign'),
+ rawTargetDir: path.resolve(__dirname, '../../src/_tdesign-raw'),
+ rawTargetDirInApp: path.resolve(__dirname, '../../../app/tdesign-uniapp-raw'),
+
+ sourceDir: path.resolve(PACKAGES_ROOT, 'uniapp-components'),
+ chatSourceDir: path.resolve(PACKAGES_ROOT, 'uniapp-pro-components/chat'),
+
+ sourceGlob: path.resolve(PACKAGES_ROOT, 'uniapp-components/**/*'),
+ chatSourceGlob: path.resolve(PACKAGES_ROOT, 'uniapp-pro-components/chat/**/*'),
+ baseAndChatSourceGlob: path.resolve(PACKAGES_ROOT, '{uniapp-components,uniapp-pro-components}/**/*'),
+
+ demoDir: path.resolve(__dirname, '../../src/pages-more'),
+
+ demoRealDir: path.resolve(__dirname, '../../'),
+
+ demoPagesGlob: path.resolve(__dirname, '../../src/pages/**/*'),
+ demoComponentsGlob: path.resolve(__dirname, '../../src/components/**/*'),
+
+ appDir: path.resolve(__dirname, '../../../app'),
+ appPagesMoreDir: path.resolve(__dirname, '../../../app/pages-more'),
+ appComponentsDir: path.resolve(__dirname, '../../../app/components'),
+ appPagesDir: path.resolve(__dirname, '../../../app/pages'),
+};
+
+
+module.exports = {
+ config,
+};
diff --git a/packages/tdesign-uniapp/example/script/watch/core.js b/packages/tdesign-uniapp/example/script/watch/core.js
new file mode 100644
index 000000000..51ac84da4
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/watch/core.js
@@ -0,0 +1,56 @@
+const fs = require('fs');
+const path = require('path');
+const { processLess } = require('../release/less');
+
+
+async function copy({
+ relativePath, filePath, config,
+}) {
+ const isDemo = relativePath.split(path.sep)[1] === '_example';
+ const isCommon = relativePath.split(path.sep)[0] === 'common';
+ let targetPath = path.resolve(config.targetDir, relativePath);
+ let targetPathInApp = path.resolve(config.appDir, 'uni_modules/tdesign-uniapp/components', relativePath);
+ const rawTargetPath = path.resolve(config.rawTargetDir, relativePath);
+ const rawTargetPathInApp = path.resolve(config.rawTargetDirInApp, relativePath);
+
+ if (isCommon) {
+ fs.mkdirSync(path.dirname(rawTargetPath), { recursive: true });
+ fs.mkdirSync(path.dirname(rawTargetPathInApp), { recursive: true });
+ fs.copyFileSync(filePath, rawTargetPath);
+ fs.copyFileSync(filePath, rawTargetPathInApp);
+ }
+
+
+ if (isDemo) {
+ targetPath = path.resolve(config.demoDir, relativePath.replace(`${path.sep}_example`, ''));
+ targetPathInApp = path.resolve(config.appPagesMoreDir, relativePath.replace(`${path.sep}_example`, ''));
+ }
+
+ fs.mkdirSync(path.dirname(targetPath), { recursive: true });
+ if (targetPathInApp) {
+ fs.mkdirSync(path.dirname(targetPathInApp), { recursive: true });
+ }
+
+ let lessResult = false;
+ if (!filePath.includes('_example')) {
+ lessResult = await processLess(filePath, targetPath, targetPathInApp);
+ }
+
+ if (!lessResult) {
+ fs.copyFileSync(filePath, targetPath);
+ if (targetPathInApp) {
+ fs.copyFileSync(filePath, targetPathInApp);
+ }
+ }
+
+ return {
+ targetPath,
+ isDemo,
+ relativeTargetByCwd: path.relative(process.cwd(), targetPath),
+ relativeSourceByCwd: path.relative(process.cwd(), filePath),
+ };
+}
+
+module.exports = {
+ copy,
+};
diff --git a/packages/tdesign-uniapp/example/script/watch/init.js b/packages/tdesign-uniapp/example/script/watch/init.js
new file mode 100644
index 000000000..391f956ba
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/watch/init.js
@@ -0,0 +1,72 @@
+const path = require('path');
+const fs = require('fs');
+const glob = require('glob');
+const { config } = require('./config');
+const { copy } = require('./core');
+const { deleteFolder } = require('t-comm');
+
+
+async function copyOneProject({
+ globMode,
+ sourceDir,
+}) {
+ const list = glob.sync(globMode, {
+ ignore: '**/node_modules/**/*',
+ nodir: true,
+ }).filter(item => !item.includes('node_modules'));
+
+ for (const item of list) {
+ const relativePath = path.relative(sourceDir, item);
+ await copy({
+ relativePath,
+ filePath: item,
+ config,
+ });
+ }
+
+ console.log(`[Wrote] done! Length is ${list.length}!`);
+}
+
+
+async function main() {
+ deleteFolder(config.targetDir);
+ deleteFolder(config.rawTargetDir);
+ deleteFolder(config.rawTargetDirInApp);
+ deleteFolder(config.demoDir);
+
+ deleteFolder(config.appComponentsDir);
+ deleteFolder(config.appPagesMoreDir);
+ deleteFolder(config.appPagesDir);
+
+ await copyOneProject({
+ globMode: config.sourceGlob,
+ sourceDir: config.sourceDir,
+ });
+ await copyOneProject({
+ globMode: config.chatSourceGlob,
+ sourceDir: config.chatSourceDir,
+ });
+
+ await copyDemoPagesToApp();
+}
+
+
+async function copyDemoPagesToApp() {
+ const list = glob.sync([config.demoPagesGlob, config.demoComponentsGlob], {
+ ignore: '**/node_modules/**/*',
+ nodir: true,
+ });
+
+ for (const item of list) {
+ const relativePath = path.relative(path.resolve(config.demoRealDir, 'src'), item);
+
+ const targetPath = path.resolve(config.appDir, relativePath);
+
+ fs.mkdirSync(path.dirname(targetPath), { recursive: true });
+ fs.copyFileSync(item, targetPath);
+ }
+
+ console.log(`[Wrote] done! Length of App Files is ${list.length}!`);
+}
+
+main();
diff --git a/packages/tdesign-uniapp/example/script/watch/types.js b/packages/tdesign-uniapp/example/script/watch/types.js
new file mode 100644
index 000000000..cb7f17d7a
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/watch/types.js
@@ -0,0 +1,137 @@
+const glob = require('glob');
+const path = require('path');
+const fs = require('fs');
+const { writeFileSync } = require('t-comm');
+const { toPascal } = require('../utils/utils');
+
+const PACKAGES_ROOT = path.resolve(__dirname, '../../../../');
+
+const CONFIG = {
+ pkgJsonPath: path.resolve(PACKAGES_ROOT, 'uniapp-components/package.json'),
+ chatPkgJsonPath: path.resolve(__dirname, 'uniapp-pro-components/chat/package.json'),
+
+ dtsDir: path.resolve(PACKAGES_ROOT, 'uniapp-components/types'),
+ chatDtsDir: path.resolve(PACKAGES_ROOT, 'uniapp-pro-components/chat/types'),
+
+ indexPath: path.resolve(PACKAGES_ROOT, 'uniapp-components/types/index.d.ts'),
+ chatIndexPath: path.resolve(PACKAGES_ROOT, 'uniapp-pro-components/chat/types/index.d.ts'),
+
+ globalDTSPath: path.resolve(PACKAGES_ROOT, 'uniapp-components/global.d.ts'),
+ chatGlobalDTSPath: path.resolve(PACKAGES_ROOT, 'uniapp-pro-components/chat/global.d.ts'),
+ filterTypes: ['form-item'],
+};
+
+const OTHER_EXPORTS = {
+ './*': './*',
+};
+
+const getDTSTemplate = isChat => `import type { TransformEventHandlers, ExtractNonOnProps } from '${isChat ? 'tdesign-uniapp' : '..'}/common/common';
+import type { Td{{Component}}Props } from '../{{component}}/type';
+
+export type {{Component}}Props = ExtractNonOnProps| ;
+export type {{Component}}Emits = TransformEventHandlers | ;
+declare const {{Component}}Component: import('vue').DefineComponent<{{Component}}Props, {}, {}, {}, {}, {}, {}, {{Component}}Emits, any>;
+export default {{Component}}Component;
+`;
+
+const GLOBAL_DTS_TEMPLATE = `declare module 'vue' {
+ export interface GlobalComponents {
+ {{CONTENT}}
+ }
+}
+
+export {};
+`;
+
+async function genOnProject({
+ pkgGlob,
+ pkgJsonPath,
+ dtsDir,
+ indexPath,
+ globalDTSPath,
+ isChat,
+}) {
+ const list = glob.sync(pkgGlob);
+ const filtered = list.filter((item) => {
+ const typeFile = path.resolve(item, '../type.ts');
+ return fs.existsSync(typeFile);
+ });
+
+ const fileNames = filtered.map(item => item.split(path.sep)[item.split(path.sep).length - 2]);
+ fileNames.sort();
+
+ changePkgExports(fileNames, pkgJsonPath);
+ genDTS({ list: fileNames, dtsDir, isChat });
+ genIndexContent(fileNames, indexPath);
+ getGlobalDTS(fileNames, globalDTSPath);
+}
+
+async function main() {
+ await genOnProject({
+ pkgGlob: 'packages/tdesign/*/*.vue',
+ pkgJsonPath: CONFIG.pkgJsonPath,
+ dtsDir: CONFIG.dtsDir,
+ indexPath: CONFIG.indexPath,
+ globalDTSPath: CONFIG.globalDTSPath,
+ isChat: false,
+ });
+
+ await genOnProject({
+ pkgGlob: 'packages/tdesign-uniapp-chat/*/*.vue',
+ pkgJsonPath: CONFIG.chatPkgJsonPath,
+ dtsDir: CONFIG.chatDtsDir,
+ indexPath: CONFIG.chatIndexPath,
+ globalDTSPath: CONFIG.chatGlobalDTSPath,
+ isChat: true,
+ });
+}
+
+
+function changePkgExports(fileNames, pkgJsonPath) {
+ const exportsType = fileNames.reduce((acc, item) => {
+ const key = `./${item}/${item}.vue`;
+ return {
+ ...acc,
+ [key]: {
+ types: `./types/${item}.d.ts`,
+ import: key,
+ default: key,
+ },
+ };
+ }, {
+ ...OTHER_EXPORTS,
+ });
+
+ const pkgJson = require(pkgJsonPath);
+ pkgJson.exports = exportsType;
+ writeFileSync(pkgJsonPath, `${JSON.stringify(pkgJson, null, 2)}\n`);
+}
+
+
+function genDTS({ list, dtsDir, isChat }) {
+ list.forEach((item) => {
+ const fileName = path.resolve(dtsDir, `${item}.d.ts`);
+ const content = getDTSTemplate(isChat)
+ .replaceAll('{{Component}}', toPascal(item))
+ .replaceAll('{{component}}', item);
+ writeFileSync(fileName, content);
+ });
+}
+
+function genIndexContent(fileNames, indexPath) {
+ const content = Array.from(new Set(fileNames))
+ .filter(item => !CONFIG.filterTypes.includes(item))
+ .map(item => `export * from '../${item}/type';`);
+ writeFileSync(indexPath, `${content.join('\n')}\n`);
+}
+
+function getGlobalDTS(fileNames, globalDTSPath) {
+ const content = Array.from(new Set(fileNames))
+ .map(item => `T${toPascal(item)}: typeof import('tdesign-uniapp/${item}/${item}.vue').default;`);
+
+ const result = GLOBAL_DTS_TEMPLATE.replace('{{CONTENT}}', content.join('\n '));
+ writeFileSync(globalDTSPath, result);
+}
+
+
+main();
diff --git a/packages/tdesign-uniapp/example/script/watch/watch.js b/packages/tdesign-uniapp/example/script/watch/watch.js
new file mode 100644
index 000000000..77f6f0fb6
--- /dev/null
+++ b/packages/tdesign-uniapp/example/script/watch/watch.js
@@ -0,0 +1,70 @@
+const watch = require('gulp-watch');
+const path = require('path');
+const { config } = require('./config');
+const { copy } = require('./core');
+const net = require('net');
+const port = 12345; // 选择一个空闲端口
+
+
+function isPortInUse(port) {
+ return new Promise((resolve) => {
+ const server = net.createServer();
+ server.once('error', () => resolve(true));
+ server.once('listening', () => {
+ server.close(() => resolve(false));
+ });
+ server.listen(port);
+ });
+}
+
+
+async function main() {
+ if (await isPortInUse(port)) {
+ console.log('[Watch] 监听已在其他终端运行');
+ return;
+ }
+ // 创建监听服务器(占用端口)
+ const server = net.createServer();
+ server.listen(port);
+
+
+ watch(config.baseAndChatSourceGlob, async (e) => {
+ const { event, history, base } = e || {};
+
+ if (event !== 'unlink' && history?.[0]
+ && (history[0].includes('tdesign-uniapp/components') || history[0].includes('tdesign-uniapp-chat/components'))) {
+ const filePath = history[0];
+ let relativePath = path.relative(base, filePath);
+ console.log('relativePath', relativePath);
+ if (relativePath.startsWith(`tdesign${path.sep}`) || relativePath.startsWith(`tdesign-uniapp-chat${path.sep}`)) {
+ relativePath = relativePath.split(path.sep).slice(1)
+ .join(path.sep);
+ }
+
+ console.log('base', base);
+ console.log('history', history);
+
+ const { relativeTargetByCwd, relativeSourceByCwd } = await copy({
+ relativePath,
+ filePath,
+ config,
+ });
+ console.log(`[Wrote] done! \nFrom ${relativeSourceByCwd} to ${relativeTargetByCwd}`);
+ }
+ });
+
+ // 监听进程终止信号
+ process.on('exit', () => server.close());
+ process.on('SIGINT', gracefulShutdown);
+ process.on('SIGTERM', gracefulShutdown);
+}
+
+
+// 优雅关闭函数
+function gracefulShutdown() {
+ console.log('\n[Watch] 收到终止信号,关闭监听器...');
+ process.exit(0); // 退出进程
+}
+
+
+main();
diff --git a/packages/tdesign-uniapp/example/src/App.vue b/packages/tdesign-uniapp/example/src/App.vue
new file mode 100644
index 000000000..4422fbf16
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/App.vue
@@ -0,0 +1,9 @@
+
diff --git a/packages/tdesign-uniapp/example/src/components/pull-down-list/index.less b/packages/tdesign-uniapp/example/src/components/pull-down-list/index.less
new file mode 100644
index 000000000..03cc867f4
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/components/pull-down-list/index.less
@@ -0,0 +1,60 @@
+.pullDownList {
+ width: 100%;
+ box-sizing: border-box;
+ background-color: var(--td-bg-color-container);
+ border-radius: 8rpx;
+ margin-bottom: 12rpx * 2;
+ overflow: hidden;
+
+ .switchBox {
+ height: 60rpx * 2;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 16rpx * 2;
+ font-size: 16rpx * 2;
+ line-height: 24rpx * 2;
+ color: var(--td-text-color-secondary);
+ }
+
+ .name,
+ .icon {
+ transition: opacity 0.3s;
+ }
+
+ .name {
+ opacity: 0.9;
+ }
+
+ &.actived {
+ .name {
+ opacity: 0.4;
+ }
+
+ .icon {
+ opacity: 0.4;
+ }
+ }
+
+ .childBox {
+ transition: height 0.3s;
+
+ .child {
+ box-sizing: border-box;
+ border-bottom: 1rpx solid var(--td-component-stroke);
+ height: 56rpx * 2;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-left: 16rpx * 2;
+ margin-right: 16rpx * 2;
+ font-size: 16rpx * 2;
+ opacity: 0.9;
+ color: var(--td-text-color-primary);
+
+ &:last-of-type {
+ border-bottom-color: transparent;
+ }
+ }
+ }
+}
diff --git a/packages/tdesign-uniapp/example/src/components/pull-down-list/index.vue b/packages/tdesign-uniapp/example/src/components/pull-down-list/index.vue
new file mode 100644
index 000000000..c696f9242
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/components/pull-down-list/index.vue
@@ -0,0 +1,87 @@
+
+
+
+
+ {{ name }}
+
+
+
+
+ clickChild(item)"
+ >
+ {{ item.name }} {{ item.label }}
+
+
+
+
+
+
+
diff --git a/packages/tdesign-uniapp/example/src/components/trd-privacy/index.less b/packages/tdesign-uniapp/example/src/components/trd-privacy/index.less
new file mode 100644
index 000000000..ca069b104
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/components/trd-privacy/index.less
@@ -0,0 +1,137 @@
+/* components/privacy/privacy.wxss */
+.privacy_wrap {
+ width: 100vw;
+ height: 100vh;
+ position: fixed;
+ left: 0;
+ top: 0;
+ z-index: 99999;
+ background-color: #fff;
+ color: #222;
+ font-size: 24rpx;
+}
+.privacy_safe_area {
+ width: 750rpx;
+ height: 1180rpx;
+ position: absolute;
+ left: 0;
+ top: 50%;
+ transform: translate(0, -50%);
+}
+.privacy_top {
+ padding: 50rpx 40rpx;
+ position: relative;
+ overflow: hidden;
+}
+.privacy_btn_back::before {
+ content: '<<';
+}
+.privacy_title {
+ height: 100%;
+ font-size: 32rpx;
+ font-weight: 700;
+ text-align: center;
+ line-height: 60rpx;
+}
+.privacy_right {
+ height: 48rpx;
+ line-height: 48rpx;
+ text-align: right;
+}
+.privacy_content {
+ height: 790rpx;
+ padding: 0 40rpx;
+ overflow: auto;
+ line-height: 32rpx;
+}
+.privacy_bold {
+ font-weight: 700;
+ display: inline-block;
+ padding-bottom: 12rpx;
+}
+.privacy_normal {
+ text-indent: 2em;
+ display: inline-block;
+ padding-bottom: 12rpx;
+}
+.privacy_btn_confirm {
+ width: 150rpx;
+ height: 92rpx;
+ padding: 0 85rpx;
+ border-radius: 16rpx;
+ border: #ccc solid 2rpx;
+ background-color: #06c15f;
+ font-size: 32rpx;
+ text-align: center;
+ line-height: 92rpx;
+ color: #fff;
+ margin: 30rpx auto 0;
+ text-indent: 0;
+}
+.privacy_tips_win {
+ width: 100vw;
+ height: 100vh;
+ position: fixed;
+ left: 0;
+ top: 0;
+ z-index: 99999;
+ background: rgba(0, 0, 0, 0.75);
+ color: #222;
+ font-size: 28rpx;
+}
+.privacy_win_content {
+ width: 100vw;
+ box-sizing: border-box;
+ overflow: hidden;
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ background: #fff;
+ border-radius: 24rpx 24rpx 0 0;
+ padding: 50rpx 40rpx calc(env(safe-area-inset-bottom) + 50rpx + var(--window-bottom, 0)) 40rpx;
+ text-indent: 2em;
+ animation: privacy_up 0.2s forwards;
+ transform: translateY(100%);
+}
+@keyframes privacy_up {
+ 0% {
+ transform: translateY(100%);
+ }
+ 100% {
+ transform: translateY(0);
+ }
+}
+.privacy_line {
+ display: inline-block;
+ vertical-align: middle;
+}
+.privacy_url {
+ color: #576b95;
+ text-indent: 0;
+ display: inline;
+ vertical-align: middle;
+}
+.privacy_tips_content {
+ line-height: 40rpx;
+ vertical-align: middle;
+}
+.privacy_middle {
+ width: 650rpx;
+ left: 50%;
+ bottom: 50%;
+ transform: translate(-50%, 50%);
+ border-radius: 24rpx;
+ animation: none;
+}
+
+.footer {
+ width: 100%;
+ margin-top: 30rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ text-indent: 0;
+}
+.t-design-button {
+ width: 300rpx;
+}
diff --git a/packages/tdesign-uniapp/example/src/components/trd-privacy/index.vue b/packages/tdesign-uniapp/example/src/components/trd-privacy/index.vue
new file mode 100644
index 000000000..1e08feb22
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/components/trd-privacy/index.vue
@@ -0,0 +1,135 @@
+
+
+
+
+
+ {{ name }}服务声明
+
+
+
+
+
+
+ 我们在此特别声明:\n1.本小程序产品功能的实现不涉及收集和处理用户(以下简称“您”)的任何个人信息。\n2.如果我们更新、改进或修改小程序产品功能,并因此导致我们需要处理您的个人信息的,我们将会依据适用法律的要求对本声明进行修订,并将修订后的内容通过弹框等形式通知您并获得您同意。
+
+
+
+
+
+
+
+
+
+ 我们将严格按照
+ 《{{ name }}服务声明》
+ 向您提供服务,不会收集和处理您的个人信息。
+
+
+
+
+
+
+
+
diff --git a/packages/tdesign-uniapp/example/src/env.d.ts b/packages/tdesign-uniapp/example/src/env.d.ts
new file mode 100644
index 000000000..a735ff239
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/env.d.ts
@@ -0,0 +1,8 @@
+///
+
+declare module '*.vue' {
+ import { DefineComponent } from 'vue';
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
+ const component: DefineComponent<{}, {}, any>;
+ export default component;
+}
diff --git a/packages/tdesign-uniapp/example/src/main.ts b/packages/tdesign-uniapp/example/src/main.ts
new file mode 100644
index 000000000..2e1e7dbd7
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/main.ts
@@ -0,0 +1,22 @@
+import { createSSRApp } from 'vue';
+import App from './App.vue';
+import './style/app.less';
+import DemoBaseMixin from './mixins/demo-base.js';
+
+import TDemo from 'tdesign-uniapp/demo/demo.vue';
+import TNavbar from 'tdesign-uniapp/navbar/navbar.vue';
+import TDemoHeader from 'tdesign-uniapp/demo-header/demo-header.vue';
+
+
+export function createApp() {
+ const app = createSSRApp(App);
+
+ app.component('t-demo', TDemo);
+ app.component('t-demo-header', TDemoHeader);
+ app.component('t-navbar', TNavbar);
+
+ app.mixin(DemoBaseMixin);
+ return {
+ app,
+ };
+}
diff --git a/packages/tdesign-uniapp/example/src/manifest.json b/packages/tdesign-uniapp/example/src/manifest.json
new file mode 100644
index 000000000..89747bb91
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/manifest.json
@@ -0,0 +1,126 @@
+{
+ "name": "TDesign UniApp",
+ "appid": "",
+ "description": "",
+ "versionName": "1.0.0",
+ "versionCode": "100",
+ "transformPx": false,
+ "app-plus": {
+ "darkmode": true,
+ "usingComponents": true,
+ "nvueStyleCompiler": "uni-app",
+ "compilerVersion": 3,
+ "splashscreen": {
+ "alwaysShowBeforeRender": true,
+ "waiting": true,
+ "autoclose": true,
+ "delay": 0
+ },
+ "modules": {},
+ "distribute": {
+ "android": {
+ "permissions": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ]
+ },
+ "ios": {},
+ "sdkConfigs": {}
+ }
+ },
+ "quickapp": {},
+ "h5": {
+ "darkmode": true
+ },
+ "mp-weixin": {
+ "appid": "wx9713aa2e5d67f6bd",
+ "darkmode": true,
+ "setting": {
+ "urlCheck": false,
+ "scopeDataCheck": false,
+ "coverView": true,
+ "es6": true,
+ "postcss": true,
+ "compileHotReLoad": false,
+ "preloadBackgroundData": false,
+ "minified": true,
+ "autoAudits": false,
+ "newFeature": true,
+ "uglifyFileName": false,
+ "uploadWithSourceMap": true,
+ "useIsolateContext": true,
+ "nodeModules": true,
+ "enhance": false,
+ "useCompilerModule": true,
+ "userConfirmedUseCompilerModuleSwitch": false,
+ "showShadowRootInWxmlPanel": true,
+ "skylineRenderEnable": true,
+ "bigPackageSizeSupport": true
+ },
+ "lazyCodeLoading": "requiredComponents",
+ "usingComponents": true,
+ "rendererOptions": {
+ "skyline": {
+ "disableABTest": true,
+ "defaultDisplayBlock": true,
+ "defaultContentBox": true,
+ "sdkVersionBegin": "3.4.3",
+ "sdkVersionEnd": "15.255.255"
+ }
+ }
+ },
+ "mp-qq": {
+ "appid": "1112328122",
+ "setting": {
+ "urlCheck": false,
+ "ignoreDevUnusedFiles": false,
+ "ignoreUploadUnusedFiles": false,
+ "minify": true,
+ "minifyJS": true,
+ "minifyWXSS": true,
+ "minified": true,
+ "es6": true,
+ "enhance": false
+ },
+ "usingComponents": true,
+ "lazyCodeLoading": "requiredComponents",
+ "optimization": {
+ "subPackages": true
+ }
+ },
+ "mp-alipay": {
+ "darkmode": true,
+ "usingComponents": true,
+ "appid": "2021006103621888"
+ },
+ "mp-baidu": {
+ "darkmode": true,
+ "usingComponents": true
+ },
+ "mp-toutiao": {
+ "darkmode": true,
+ "usingComponents": true
+ },
+ "mp-xhs": {
+ "appid": "69005f8c77e2b300015cb3aa",
+ "darkmode": true,
+ "usingComponents": true
+ },
+ "uniStatistics": {
+ "enable": false
+ },
+ "vueVersion": "3"
+}
diff --git a/packages/tdesign-uniapp/example/src/mixins/demo-base.js b/packages/tdesign-uniapp/example/src/mixins/demo-base.js
new file mode 100644
index 000000000..8a1052eae
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/mixins/demo-base.js
@@ -0,0 +1,45 @@
+export default {
+ computed: {
+ gCustomNavbarHeight() {
+ let result = 0;
+ // #ifdef H5 || APP-PLUS
+ result = 48;
+ // #endif
+ return result;
+ },
+ isH5() {
+ let result = false;
+ // #ifdef H5
+ result = true;
+ // #endif
+ return result;
+ },
+ isMP() {
+ let result = false;
+ // #ifdef MP
+ result = true;
+ // #endif
+ return result;
+ },
+ isMPAlipay() {
+ let result = false;
+ // #ifdef MP-ALIPAY
+ result = true;
+ // #endif
+ return result;
+ },
+ },
+ mounted() {
+ // 检查分享功能是否可用
+ // #ifdef MP-WEIXIN
+ if (typeof wx.showShareMenu === 'function') {
+ wx.showShareMenu({
+ success: () => {
+ },
+ fail: () => {
+ },
+ });
+ }
+ // #endif
+ },
+};
diff --git a/packages/tdesign-uniapp/example/src/mixins/skyline.js b/packages/tdesign-uniapp/example/src/mixins/skyline.js
new file mode 100644
index 000000000..7f98ea242
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/mixins/skyline.js
@@ -0,0 +1 @@
+export { default } from 'tdesign-uniapp/mixins/skyline.js';
diff --git a/packages/tdesign-uniapp/example/src/pages.json b/packages/tdesign-uniapp/example/src/pages.json
new file mode 100644
index 000000000..7d5373874
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/pages.json
@@ -0,0 +1,580 @@
+{
+ "pages": [
+ {
+ "path": "pages/home/home"
+ },
+ {
+ "path": "pages/home/navigate-fail/index"
+ },
+ {
+ "path": "pages-more/result/result-page"
+ },
+ {
+ "path": "pages-more/indexes/custom/index"
+ },
+ {
+ "path": "pages-more/indexes/base/index"
+ },
+ {
+ "path": "pages-more/side-bar/base/index"
+ },
+ {
+ "path": "pages-more/side-bar/switch/index"
+ },
+ {
+ "path": "pages-more/side-bar/with-icon/index"
+ },
+ {
+ "path": "pages-more/side-bar/custom/index"
+ },
+ {
+ "path": "pages-more/button/button"
+ },
+ {
+ "path": "pages-more/divider/divider"
+ },
+ {
+ "path": "pages-more/fab/fab"
+ },
+ {
+ "path": "pages-more/icon/icon"
+ },
+ {
+ "path": "pages-more/link/link"
+ },
+ {
+ "path": "pages-more/col/col"
+ },
+ {
+ "path": "pages-more/back-top/back-top"
+ },
+ {
+ "path": "pages-more/drawer/drawer"
+ },
+ {
+ "path": "pages-more/indexes/indexes"
+ },
+ {
+ "path": "pages-more/navbar/navbar"
+ },
+ {
+ "path": "pages-more/side-bar/side-bar"
+ },
+ {
+ "path": "pages-more/steps/steps"
+ },
+ {
+ "path": "pages-more/tab-bar/tab-bar"
+ },
+ {
+ "path": "pages-more/tabs/tabs"
+ },
+ {
+ "path": "pages-more/calendar/calendar"
+ },
+ {
+ "path": "pages-more/cascader/cascader"
+ },
+ {
+ "path": "pages-more/checkbox/checkbox"
+ },
+ {
+ "path": "pages-more/color-picker/color-picker"
+ },
+ {
+ "path": "pages-more/date-time-picker/date-time-picker"
+ },
+ {
+ "path": "pages-more/form/form"
+ },
+ {
+ "path": "pages-more/input/input"
+ },
+ {
+ "path": "pages-more/picker/picker"
+ },
+ {
+ "path": "pages-more/radio/radio"
+ },
+ {
+ "path": "pages-more/rate/rate"
+ },
+ {
+ "path": "pages-more/search/search"
+ },
+ {
+ "path": "pages-more/slider/slider"
+ },
+ {
+ "path": "pages-more/stepper/stepper"
+ },
+ {
+ "path": "pages-more/switch/switch"
+ },
+ {
+ "path": "pages-more/textarea/textarea"
+ },
+ {
+ "path": "pages-more/tree-select/tree-select"
+ },
+ {
+ "path": "pages-more/upload/upload"
+ },
+ {
+ "path": "pages-more/avatar/avatar"
+ },
+ {
+ "path": "pages-more/badge/badge"
+ },
+ {
+ "path": "pages-more/cell/cell"
+ },
+ {
+ "path": "pages-more/collapse/collapse"
+ },
+ {
+ "path": "pages-more/count-down/count-down"
+ },
+ {
+ "path": "pages-more/empty/empty"
+ },
+ {
+ "path": "pages-more/footer/footer"
+ },
+ {
+ "path": "pages-more/grid/grid"
+ },
+ {
+ "path": "pages-more/image/image"
+ },
+ {
+ "path": "pages-more/image-viewer/image-viewer"
+ },
+ {
+ "path": "pages-more/progress/progress"
+ },
+ {
+ "path": "pages-more/qrcode/qrcode"
+ },
+ {
+ "path": "pages-more/result/result"
+ },
+ {
+ "path": "pages-more/skeleton/skeleton"
+ },
+ {
+ "path": "pages-more/sticky/sticky"
+ },
+ {
+ "path": "pages-more/swiper/swiper"
+ },
+ {
+ "path": "pages-more/tag/tag"
+ },
+ {
+ "path": "pages-more/watermark/watermark"
+ },
+ {
+ "path": "pages-more/action-sheet/action-sheet"
+ },
+ {
+ "path": "pages-more/dialog/dialog"
+ },
+ {
+ "path": "pages-more/dropdown-menu/dropdown-menu"
+ },
+ {
+ "path": "pages-more/guide/guide"
+ },
+ {
+ "path": "pages-more/loading/loading"
+ },
+ {
+ "path": "pages-more/message/message"
+ },
+ {
+ "path": "pages-more/notice-bar/notice-bar"
+ },
+ {
+ "path": "pages-more/overlay/overlay"
+ },
+ {
+ "path": "pages-more/popup/popup"
+ },
+ {
+ "path": "pages-more/pull-down-refresh/pull-down-refresh"
+ },
+ {
+ "path": "pages-more/swipe-cell/swipe-cell"
+ },
+ {
+ "path": "pages-more/toast/toast"
+ }
+ ],
+ "subPackages": [
+ {
+ "root": "pages-more/chat-list",
+ "pages": [
+ {
+ "path": "chat-list"
+ }
+ ]
+ },
+ {
+ "root": "pages-more/chat-message",
+ "pages": [
+ {
+ "path": "chat-message"
+ }
+ ]
+ },
+ {
+ "root": "pages-more/chat-sender",
+ "pages": [
+ {
+ "path": "chat-sender"
+ }
+ ]
+ },
+ {
+ "root": "pages-more/chat-markdown",
+ "pages": [
+ {
+ "path": "chat-markdown"
+ }
+ ]
+ },
+ {
+ "root": "pages-more/chat-content",
+ "pages": [
+ {
+ "path": "chat-content"
+ }
+ ]
+ },
+ {
+ "root": "pages-more/chat-thinking",
+ "pages": [
+ {
+ "path": "chat-thinking"
+ }
+ ]
+ },
+ {
+ "root": "pages-more/attachments",
+ "pages": [
+ {
+ "path": "attachments"
+ }
+ ]
+ },
+ {
+ "root": "pages-more/chat-actionbar",
+ "pages": [
+ {
+ "path": "chat-actionbar"
+ }
+ ]
+ },
+ {
+ "root": "pages-more/chat-loading",
+ "pages": [
+ {
+ "path": "chat-loading"
+ }
+ ]
+ }
+ ],
+ "globalStyle": {
+ "pageOrientation": "portrait",
+ "navigationBarTextStyle": "black",
+ "navigationBarTitleText": "TDesign UniApp",
+ "backgroundColor": "#F8F8F8",
+ "navigationStyle": "custom"
+ },
+ "condition": {
+ "current": 0,
+ "list": [
+ {
+ "name": "button",
+ "pathName": "pages-more/button/button"
+ },
+ {
+ "name": "divider",
+ "pathName": "pages-more/divider/divider"
+ },
+ {
+ "name": "fab",
+ "pathName": "pages-more/fab/fab"
+ },
+ {
+ "name": "icon",
+ "pathName": "pages-more/icon/icon"
+ },
+ {
+ "name": "link",
+ "pathName": "pages-more/link/link"
+ },
+ {
+ "name": "layout",
+ "pathName": "pages-more/col/col"
+ },
+ {
+ "name": "back-top",
+ "pathName": "pages-more/back-top/back-top"
+ },
+ {
+ "name": "drawer",
+ "pathName": "pages-more/drawer/drawer"
+ },
+ {
+ "name": "indexes",
+ "pathName": "pages-more/indexes/indexes"
+ },
+ {
+ "name": "navbar",
+ "pathName": "pages-more/navbar/navbar"
+ },
+ {
+ "name": "side-bar",
+ "pathName": "pages-more/side-bar/side-bar"
+ },
+ {
+ "name": "steps",
+ "pathName": "pages-more/steps/steps"
+ },
+ {
+ "name": "tab-bar",
+ "pathName": "pages-more/tab-bar/tab-bar"
+ },
+ {
+ "name": "tabs",
+ "pathName": "pages-more/tabs/tabs"
+ },
+ {
+ "name": "calendar",
+ "pathName": "pages-more/calendar/calendar"
+ },
+ {
+ "name": "cascader",
+ "pathName": "pages-more/cascader/cascader"
+ },
+ {
+ "name": "checkbox",
+ "pathName": "pages-more/checkbox/checkbox"
+ },
+ {
+ "name": "color-picker",
+ "pathName": "pages-more/color-picker/color-picker"
+ },
+ {
+ "name": "date-time-picker",
+ "pathName": "pages-more/date-time-picker/date-time-picker"
+ },
+ {
+ "name": "form",
+ "pathName": "pages-more/form/form"
+ },
+ {
+ "name": "input",
+ "pathName": "pages-more/input/input"
+ },
+ {
+ "name": "picker",
+ "pathName": "pages-more/picker/picker"
+ },
+ {
+ "name": "radio",
+ "pathName": "pages-more/radio/radio"
+ },
+ {
+ "name": "rate",
+ "pathName": "pages-more/rate/rate"
+ },
+ {
+ "name": "search",
+ "pathName": "pages-more/search/search"
+ },
+ {
+ "name": "slider",
+ "pathName": "pages-more/slider/slider"
+ },
+ {
+ "name": "stepper",
+ "pathName": "pages-more/stepper/stepper"
+ },
+ {
+ "name": "switch",
+ "pathName": "pages-more/switch/switch"
+ },
+ {
+ "name": "textarea",
+ "pathName": "pages-more/textarea/textarea"
+ },
+ {
+ "name": "tree-select",
+ "pathName": "pages-more/tree-select/tree-select"
+ },
+ {
+ "name": "upload",
+ "pathName": "pages-more/upload/upload"
+ },
+ {
+ "name": "avatar",
+ "pathName": "pages-more/avatar/avatar"
+ },
+ {
+ "name": "badge",
+ "pathName": "pages-more/badge/badge"
+ },
+ {
+ "name": "cell",
+ "pathName": "pages-more/cell/cell"
+ },
+ {
+ "name": "collapse",
+ "pathName": "pages-more/collapse/collapse"
+ },
+ {
+ "name": "count-down",
+ "pathName": "pages-more/count-down/count-down"
+ },
+ {
+ "name": "empty",
+ "pathName": "pages-more/empty/empty"
+ },
+ {
+ "name": "footer",
+ "pathName": "pages-more/footer/footer"
+ },
+ {
+ "name": "grid",
+ "pathName": "pages-more/grid/grid"
+ },
+ {
+ "name": "image",
+ "pathName": "pages-more/image/image"
+ },
+ {
+ "name": "image-viewer",
+ "pathName": "pages-more/image-viewer/image-viewer"
+ },
+ {
+ "name": "progress",
+ "pathName": "pages-more/progress/progress"
+ },
+ {
+ "name": "q-r-code",
+ "pathName": "pages-more/qrcode/qrcode"
+ },
+ {
+ "name": "result",
+ "pathName": "pages-more/result/result"
+ },
+ {
+ "name": "skeleton",
+ "pathName": "pages-more/skeleton/skeleton"
+ },
+ {
+ "name": "sticky",
+ "pathName": "pages-more/sticky/sticky"
+ },
+ {
+ "name": "swiper",
+ "pathName": "pages-more/swiper/swiper"
+ },
+ {
+ "name": "tag",
+ "pathName": "pages-more/tag/tag"
+ },
+ {
+ "name": "watermark",
+ "pathName": "pages-more/watermark/watermark"
+ },
+ {
+ "name": "action-sheet",
+ "pathName": "pages-more/action-sheet/action-sheet"
+ },
+ {
+ "name": "dialog",
+ "pathName": "pages-more/dialog/dialog"
+ },
+ {
+ "name": "dropdown-menu",
+ "pathName": "pages-more/dropdown-menu/dropdown-menu"
+ },
+ {
+ "name": "guide",
+ "pathName": "pages-more/guide/guide"
+ },
+ {
+ "name": "loading",
+ "pathName": "pages-more/loading/loading"
+ },
+ {
+ "name": "message",
+ "pathName": "pages-more/message/message"
+ },
+ {
+ "name": "notice-bar",
+ "pathName": "pages-more/notice-bar/notice-bar"
+ },
+ {
+ "name": "overlay",
+ "pathName": "pages-more/overlay/overlay"
+ },
+ {
+ "name": "popup",
+ "pathName": "pages-more/popup/popup"
+ },
+ {
+ "name": "pull-down-refresh",
+ "pathName": "pages-more/pull-down-refresh/pull-down-refresh"
+ },
+ {
+ "name": "swipe-cell",
+ "pathName": "pages-more/swipe-cell/swipe-cell"
+ },
+ {
+ "name": "toast",
+ "pathName": "pages-more/toast/toast"
+ },
+ {
+ "name": "chat-list",
+ "pathName": "pages-more/chat-list/chat-list"
+ },
+ {
+ "name": "chat-message",
+ "pathName": "pages-more/chat-message/chat-message"
+ },
+ {
+ "name": "chat-sender",
+ "pathName": "pages-more/chat-sender/chat-sender"
+ },
+ {
+ "name": "chat-markdown",
+ "pathName": "pages-more/chat-markdown/chat-markdown"
+ },
+ {
+ "name": "chat-content",
+ "pathName": "pages-more/chat-content/chat-content"
+ },
+ {
+ "name": "chat-thinking",
+ "pathName": "pages-more/chat-thinking/chat-thinking"
+ },
+ {
+ "name": "attachments",
+ "pathName": "pages-more/attachments/attachments"
+ },
+ {
+ "name": "chat-actionbar",
+ "pathName": "pages-more/chat-actionbar/chat-actionbar"
+ },
+ {
+ "name": "chat-loading",
+ "pathName": "pages-more/chat-loading/chat-loading"
+ }
+ ]
+ }
+}
diff --git a/packages/tdesign-uniapp/example/src/pages/home/data/base.json b/packages/tdesign-uniapp/example/src/pages/home/data/base.json
new file mode 100644
index 000000000..e41d1f475
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/pages/home/data/base.json
@@ -0,0 +1,64 @@
+{
+ "base": {
+ "name": "基础",
+ "icon": "app",
+ "childArr": [
+ {
+ "name": "Button",
+ "label": "按钮"
+ },
+ {
+ "name": "Divider",
+ "label": "分割线"
+ },
+ {
+ "name": "Fab",
+ "label": "悬浮按钮"
+ },
+ {
+ "name": "Icon",
+ "label": "图标"
+ },
+ {
+ "name": "Link",
+ "label": "链接"
+ },
+ {
+ "name": "Layout",
+ "label": "布局",
+ "path": "/pages-more/col/col"
+ }
+ ]
+ },
+ "skylineBase": {
+ "name": "基础",
+ "icon": "app",
+ "childArr": [
+ {
+ "name": "Button",
+ "label": "按钮"
+ },
+ {
+ "name": "Divider",
+ "label": "分割线"
+ },
+ {
+ "name": "Fab",
+ "label": "悬浮按钮"
+ },
+ {
+ "name": "Icon",
+ "label": "图标"
+ },
+ {
+ "name": "Link",
+ "label": "链接"
+ },
+ {
+ "name": "Layout",
+ "label": "布局",
+ "path": "/pages-more/col/skyline/col"
+ }
+ ]
+ }
+}
diff --git a/packages/tdesign-uniapp/example/src/pages/home/data/chat.json b/packages/tdesign-uniapp/example/src/pages/home/data/chat.json
new file mode 100644
index 000000000..17623a9e0
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/pages/home/data/chat.json
@@ -0,0 +1,45 @@
+{
+ "chat": {
+ "name": "AI Chat 对话",
+ "icon": "chat",
+ "childArr": [
+ {
+ "name": "ChatList",
+ "label": "对话"
+ },
+ {
+ "name": "ChatMessage",
+ "label": "对话单元"
+ },
+ {
+ "name": "ChatSender",
+ "label": "对话输入框"
+ },
+ {
+ "name": "ChatMarkdown",
+ "label": "对话 Markdown"
+ },
+ {
+ "name": "ChatContent",
+ "label": "对话正文"
+ },
+ {
+ "name": "ChatThinking",
+ "label": "思考过程"
+ },
+ {
+ "name": "Attachments",
+ "label": "附件"
+ },
+ {
+ "name": "ChatActionbar",
+ "label": "对话操作栏"
+ },
+ {
+ "name": "ChatLoading",
+ "label": "加载中"
+ }
+ ]
+ },
+ "skylineChat": {}
+}
diff --git a/packages/tdesign-uniapp/example/src/pages/home/data/display.json b/packages/tdesign-uniapp/example/src/pages/home/data/display.json
new file mode 100644
index 000000000..b3dc64563
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/pages/home/data/display.json
@@ -0,0 +1,139 @@
+{
+ "display": {
+ "name": "数据展示",
+ "icon": "image",
+ "childArr": [
+ {
+ "name": "Avatar",
+ "label": "头像"
+ },
+ {
+ "name": "Badge",
+ "label": "徽标"
+ },
+ {
+ "name": "Cell",
+ "label": "单元格"
+ },
+ {
+ "name": "Collapse",
+ "label": "折叠面板"
+ },
+ {
+ "name": "CountDown",
+ "label": "倒计时"
+ },
+ {
+ "name": "Empty",
+ "label": "空状态"
+ },
+ {
+ "name": "Footer",
+ "label": "页脚"
+ },
+ {
+ "name": "Grid",
+ "label": "宫格"
+ },
+ {
+ "name": "Image",
+ "label": "图片"
+ },
+ {
+ "name": "ImageViewer",
+ "label": "图片预览"
+ },
+ {
+ "name": "Progress",
+ "label": "进度条"
+ },
+ {
+ "name": "QRCode",
+ "label": "二维码",
+ "path": "/pages-more/qrcode/qrcode"
+ },
+ {
+ "name": "Result",
+ "label": "结果"
+ },
+ {
+ "name": "Skeleton",
+ "label": "骨架屏"
+ },
+ {
+ "name": "Sticky",
+ "label": "吸顶"
+ },
+ {
+ "name": "Swiper",
+ "label": "轮播图"
+ },
+ {
+ "name": "Tag",
+ "label": "标签"
+ },
+ {
+ "name": "Watermark",
+ "label": "水印"
+ }
+ ]
+ },
+ "skylineDisplay": {
+ "name": "数据展示",
+ "icon": "image",
+ "childArr": [
+ {
+ "name": "Avatar",
+ "label": "头像"
+ },
+ {
+ "name": "Badge",
+ "label": "徽标"
+ },
+ {
+ "name": "Cell",
+ "label": "单元格"
+ },
+ {
+ "name": "CountDown",
+ "label": "倒计时"
+ },
+ {
+ "name": "Empty",
+ "label": "空状态"
+ },
+ {
+ "name": "Footer",
+ "label": "页脚"
+ },
+ {
+ "name": "Image",
+ "label": "图片"
+ },
+ {
+ "name": "ImageViewer",
+ "label": "图片预览"
+ },
+ {
+ "name": "Progress",
+ "label": "进度条"
+ },
+ {
+ "name": "Result",
+ "label": "结果"
+ },
+ {
+ "name": "Skeleton",
+ "label": "骨架屏"
+ },
+ {
+ "name": "Swiper",
+ "label": "轮播图"
+ },
+ {
+ "name": "Tag",
+ "label": "标签"
+ }
+ ]
+ }
+}
diff --git a/packages/tdesign-uniapp/example/src/pages/home/data/form.json b/packages/tdesign-uniapp/example/src/pages/home/data/form.json
new file mode 100644
index 000000000..2402add71
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/pages/home/data/form.json
@@ -0,0 +1,110 @@
+{
+ "form": {
+ "name": "输入",
+ "icon": "bulletpoint",
+ "childArr": [
+ {
+ "name": "Calendar",
+ "label": "日历"
+ },
+ {
+ "name": "Cascader",
+ "label": "级联选择器"
+ },
+ {
+ "name": "Checkbox",
+ "label": "多选框"
+ },
+ {
+ "name": "ColorPicker",
+ "label": "颜色选择器"
+ },
+ {
+ "name": "DateTimePicker",
+ "label": "时间选择器"
+ },
+ {
+ "name": "Form",
+ "label": "表单"
+ },
+ {
+ "name": "Input",
+ "label": "输入框"
+ },
+ {
+ "name": "Picker",
+ "label": "选择器"
+ },
+ {
+ "name": "Radio",
+ "label": "单选框"
+ },
+ {
+ "name": "Rate",
+ "label": "评分"
+ },
+ {
+ "name": "Search",
+ "label": "搜索框"
+ },
+ {
+ "name": "Slider",
+ "label": "滑动选择器"
+ },
+ {
+ "name": "Stepper",
+ "label": "步进器"
+ },
+ {
+ "name": "Switch",
+ "label": "开关"
+ },
+ {
+ "name": "Textarea",
+ "label": "多行文本框"
+ },
+ {
+ "name": "TreeSelect",
+ "label": "树形选择器"
+ },
+ {
+ "name": "Upload",
+ "label": "上传"
+ }
+ ]
+ },
+ "skylineForm": {
+ "name": "输入",
+ "icon": "bulletpoint",
+ "childArr": [
+ {
+ "name": "Checkbox",
+ "label": "多选框"
+ },
+ {
+ "name": "Input",
+ "label": "输入框"
+ },
+ {
+ "name": "Radio",
+ "label": "单选框"
+ },
+ {
+ "name": "Search",
+ "label": "搜索框"
+ },
+ {
+ "name": "Stepper",
+ "label": "步进器"
+ },
+ {
+ "name": "Switch",
+ "label": "开关"
+ },
+ {
+ "name": "Textarea",
+ "label": "多行文本框"
+ }
+ ]
+ }
+}
diff --git a/packages/tdesign-uniapp/example/src/pages/home/data/index.ts b/packages/tdesign-uniapp/example/src/pages/home/data/index.ts
new file mode 100644
index 000000000..eef7e65e3
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/pages/home/data/index.ts
@@ -0,0 +1,12 @@
+import { base, skylineBase } from './base.json';
+import { nav, skylineNav } from './nav.json';
+import { display, skylineDisplay } from './display.json';
+import { form, skylineForm } from './form.json';
+import { ux, skylineUx } from './ux.json';
+import { chat } from './chat.json';
+
+const list = [chat, base, nav, form, display, ux];
+
+const skylineList = [skylineBase, skylineNav, skylineForm, skylineDisplay, skylineUx];
+
+export { list, skylineList };
diff --git a/packages/tdesign-uniapp/example/src/pages/home/data/nav.json b/packages/tdesign-uniapp/example/src/pages/home/data/nav.json
new file mode 100644
index 000000000..8957dc960
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/pages/home/data/nav.json
@@ -0,0 +1,66 @@
+{
+ "nav": {
+ "name": " 导航",
+ "icon": "view-module",
+ "childArr": [
+ {
+ "name": "BackTop",
+ "label": "返回顶部"
+ },
+ {
+ "name": "Drawer",
+ "label": "抽屉"
+ },
+ {
+ "name": "Indexes",
+ "label": "索引"
+ },
+ {
+ "name": "Navbar",
+ "label": "导航栏"
+ },
+ {
+ "name": "SideBar",
+ "label": "侧边栏"
+ },
+ {
+ "name": "Steps",
+ "label": "步骤条"
+ },
+ {
+ "name": "TabBar",
+ "label": "标签栏"
+ },
+ {
+ "name": "Tabs",
+ "label": "选项卡"
+ }
+ ]
+ },
+ "skylineNav": {
+ "name": " 导航",
+ "icon": "view-module",
+ "childArr": [
+ {
+ "name": "BackTop",
+ "label": "返回顶部"
+ },
+ {
+ "name": "Drawer",
+ "label": "抽屉"
+ },
+ {
+ "name": "Navbar",
+ "label": "导航栏"
+ },
+ {
+ "name": "Steps",
+ "label": "步骤条"
+ },
+ {
+ "name": "TabBar",
+ "label": "标签栏"
+ }
+ ]
+ }
+}
diff --git a/packages/tdesign-uniapp/example/src/pages/home/data/ux.json b/packages/tdesign-uniapp/example/src/pages/home/data/ux.json
new file mode 100644
index 000000000..ad5aec3b9
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/pages/home/data/ux.json
@@ -0,0 +1,78 @@
+{
+ "ux": {
+ "name": "反馈",
+ "icon": "chat",
+ "childArr": [
+ {
+ "name": "ActionSheet",
+ "label": "动作面板"
+ },
+ {
+ "name": "Dialog",
+ "label": "对话框"
+ },
+ {
+ "name": "DropdownMenu",
+ "label": "下拉菜单"
+ },
+ {
+ "name": "Guide",
+ "label": "引导"
+ },
+ {
+ "name": "Loading",
+ "label": "加载"
+ },
+ {
+ "name": "Message",
+ "label": "消息通知"
+ },
+ {
+ "name": "NoticeBar",
+ "label": "公告栏"
+ },
+ {
+ "name": "Overlay",
+ "label": "遮罩层"
+ },
+ {
+ "name": "Popup",
+ "label": "弹出层"
+ },
+ {
+ "name": "PullDownRefresh",
+ "label": "下拉刷新"
+ },
+ {
+ "name": "SwipeCell",
+ "label": "滑动操作"
+ },
+ {
+ "name": "Toast",
+ "label": "轻提示"
+ }
+ ]
+ },
+ "skylineUx": {
+ "name": "反馈",
+ "icon": "chat",
+ "childArr": [
+ {
+ "name": "Overlay",
+ "label": "遮罩层"
+ },
+ {
+ "name": "Popup",
+ "label": "弹出层"
+ },
+ {
+ "name": "Loading",
+ "label": "加载"
+ },
+ {
+ "name": "Toast",
+ "label": "轻提示"
+ }
+ ]
+ }
+}
diff --git a/packages/tdesign-uniapp/example/src/pages/home/home.less b/packages/tdesign-uniapp/example/src/pages/home/home.less
new file mode 100644
index 000000000..dee015355
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/pages/home/home.less
@@ -0,0 +1,56 @@
+@import 'tdesign-uniapp-raw/common/style/_variables.less';
+
+.main {
+ width: 100%;
+ box-sizing: border-box;
+ padding-left: 16rpx * 2;
+ padding-right: 16rpx * 2;
+ padding-top: 24rpx * 2;
+ padding-bottom: 24rpx * 2;
+}
+
+.footer {
+ padding: 16rpx 32rpx;
+ text-align: center;
+}
+
+.show_privacy {
+ color: #576b95;
+ text-align: right;
+ line-height: 50rpx;
+ font-size: 24rpx;
+ text-align: center;
+}
+
+.title-wrap {
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+ padding-left: 8rpx * 2;
+ padding-right: 8rpx * 2;
+}
+
+.title-icon {
+ width: 148rpx * 2;
+ height: 40rpx * 2;
+}
+
+.desc {
+ color: @text-color-placeholder;
+ margin-top: 16rpx * 2;
+ font-size: 14rpx * 2;
+ font-weight: 400;
+ line-height: 22rpx * 2;
+ margin-bottom: 24rpx * 2;
+ padding-left: 8rpx * 2;
+ padding-right: 8rpx * 2;
+ display: flex;
+ justify-content: space-between;
+}
+
+.skyline-entry {
+ color: #0052d9;
+ font-size: 24rpx;
+ font-style: italic;
+ text-decoration: underline;
+}
diff --git a/packages/tdesign-uniapp/example/src/pages/home/home.vue b/packages/tdesign-uniapp/example/src/pages/home/home.vue
new file mode 100644
index 000000000..a1d81ec33
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/pages/home/home.vue
@@ -0,0 +1,184 @@
+
+
+
+
+
+
+
+
+
+
+
+ TDesign 适配 uni-app 的组件库{{ isSkyline?' (skyline render)':'' }}
+
+ try skyline
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/tdesign-uniapp/example/src/pages/home/navigate-fail/index.less b/packages/tdesign-uniapp/example/src/pages/home/navigate-fail/index.less
new file mode 100644
index 000000000..58cabdda9
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/pages/home/navigate-fail/index.less
@@ -0,0 +1,25 @@
+.demo {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 500rpx * 2;
+
+ .fail-error {
+ margin-top: 24rpx * 2;
+ margin-bottom: 48rpx * 2;
+ width: 100%;
+ color: rgba(0, 0, 0, 0.4);
+ color: var(--td-text-color-placeholder);
+ font-size: 14rpx * 2;
+ font-weight: 400;
+ text-align: center;
+ }
+
+ .t-button--default {
+ width: 160rpx * 2;
+ height: 40rpx * 2;
+ color: var(--td-text-color-primary);
+ font-weight: 700;
+ font-size: 14rpx * 2;
+ }
+}
diff --git a/packages/tdesign-uniapp/example/src/pages/home/navigate-fail/index.vue b/packages/tdesign-uniapp/example/src/pages/home/navigate-fail/index.vue
new file mode 100644
index 000000000..654203fbc
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/pages/home/navigate-fail/index.vue
@@ -0,0 +1,32 @@
+
+
+
+
+
+ 页面加载错误
+
+
+ 回到首页
+
+
+
+
+
+
diff --git a/packages/tdesign-uniapp/example/src/shime-uni.d.ts b/packages/tdesign-uniapp/example/src/shime-uni.d.ts
new file mode 100644
index 000000000..4aaea8246
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/shime-uni.d.ts
@@ -0,0 +1,6 @@
+export {};
+
+declare module 'vue' {
+ type Hooks = App.AppInstance & Page.PageInstance;
+ interface ComponentCustomOptions extends Hooks {}
+}
diff --git a/packages/tdesign-uniapp/example/src/style/app.less b/packages/tdesign-uniapp/example/src/style/app.less
new file mode 100644
index 000000000..0ad392936
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/style/app.less
@@ -0,0 +1,61 @@
+@import 'tdesign-uniapp-raw/common/style/_variables.less';
+@import 'tdesign-uniapp/common/style/theme/index.less';
+
+@font-face {
+ font-family: 'TCloudNumber';
+ src: url('data:font/ttf;charset=utf-8;base64,AAEAAAANAIAAAwBQRkZUTZcMD6UAAB/UAAAAHEdERUYAKQBRAAAftAAAAB5PUy8ya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ABAAAAAAAOABoEaAABAAAAAAAQAAwEnQABAAAAAAARAAcEugADAAEECQAAAEQAAAADAAEECQABABgAaQADAAEECQACAA4AkAADAAEECQADAD4AqAADAAEECQAEACgBCAADAAEECQAFAEIBRwADAAEECQAGACgBrQADAAEECQAIACoB7AADAAEECQALADQCLgADAAEECQANASACfwADAAEECQAOADQEMgADAAEECQAQABgEgwADAAEECQARAA4EqgBDAG8AcAB5AHIAaQBnAGgAdAAgACgAYwApACAAMgAwADIAMQAtAHAAcgBlAHMAZQBuAHQAIABUAEQAZQBzAGkAZwBuAABDb3B5cmlnaHQgKGMpIDIwMjEtcHJlc2VudCBURGVzaWduAABUAEMAbABvAHUAZABOAHUAbQBiAGUAcgAAVENsb3VkTnVtYmVyAABSAGUAZwB1AGwAYQByAABSZWd1bGFyAAAxAC4AMAAxADAAOwBVAEsAVwBOADsAVABDAGwAbwB1AGQATgB1AG0AYgBlAHIALQBSAGUAZwB1AGwAYQByAAAxLjAxMDtVS1dOO1RDbG91ZE51bWJlci1SZWd1bGFyAABUAEMAbABvAHUAZABOAHUAbQBiAGUAcgAgAFIAZQBnAHUAbABhAHIAAFRDbG91ZE51bWJlciBSZWd1bGFyAABWAGUAcgBzAGkAbwBuACAAMQAuADAAMQAwADsARwBsAHkAcABoAHMAIAAzAC4AMQAuADEAIAAoADMAMQAzADUAKQAAVmVyc2lvbiAxLjAxMDtHbHlwaHMgMy4xLjEgKDMxMzUpAABUAEMAbABvAHUAZABOAHUAbQBiAGUAcgAtAFIAZQBnAHUAbABhAHIAAFRDbG91ZE51bWJlci1SZWd1bGFyAABUAGUAbgBjAGUAbgB0ACAAVABEAGUAcwBpAGcAbgAgAE8AdABlAGEAbQAAVGVuY2VudCBURGVzaWduIE90ZWFtAABoAHQAdABwADoALwAvAHQAZABlAHMAaQBnAG4ALgB0AGUAbgBjAGUAbgB0AC4AYwBvAG0AAGh0dHA6Ly90ZGVzaWduLnRlbmNlbnQuY29tAABUAGgAaQBzACAARgBvAG4Ad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A4YOP8w==')
+ format('truetype');
+ font-weight: normal;
+ font-style: normal;
+ font-display: swap;
+}
+
+
+page {
+ background-color: var(--td-bg-color-page);
+
+ --bg-color-demo-desc: var(--td-text-color-secondary);
+ --bg-color-demo-title: var(--td-text-color-primary);
+ --bg-color-demo: var(--td-bg-color-container);
+ --bg-color-demo-secondary: var(--td-bg-color-container);
+ --td-navbar-bg-color: var(--td-bg-color-page);
+ --td-navbar-color: var(--td-text-color-primary);
+ --td-progress-circle-inner-bg-color: var(--bg-color-demo);
+}
+
+.skyline {
+ display: flex;
+ flex-direction: column;
+ height: 100vh;
+
+ .scroll-view {
+ flex: 1;
+ height: 0;
+ }
+}
+
+
+.demo {
+ padding-bottom: 56rpx;
+
+ &-navbar {
+ --td-navbar-bg-color: var(--td-bg-color-container);
+ --td-navbar-color: var(--td-text-color-primary);
+ }
+
+ &-title {
+ font-size: 48rpx;
+ font-weight: 700;
+ line-height: 64rpx;
+ margin: 0 32rpx 0;
+ padding-top: 48rpx;
+ color: var(--bg-color-demo-title);
+ }
+
+ &-desc {
+ font-size: 28rpx;
+ color: var(--bg-color-demo-desc);
+ margin: 16rpx 32rpx 0;
+ line-height: 44rpx;
+ }
+}
diff --git a/packages/tdesign-uniapp/example/src/uni.scss b/packages/tdesign-uniapp/example/src/uni.scss
new file mode 100644
index 000000000..a46a3535b
--- /dev/null
+++ b/packages/tdesign-uniapp/example/src/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: #fff;
+$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: 16;
+
+/* 图片尺寸 */
+$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: #555; // 二级标题颜色
+$uni-font-size-subtitle: 18px;
+$uni-color-paragraph: #3f536e; // 文章段落颜色
+$uni-font-size-paragraph: 15px;
\ No newline at end of file
diff --git a/packages/tdesign-uniapp/example/vite.config.ts b/packages/tdesign-uniapp/example/vite.config.ts
new file mode 100644
index 000000000..d9d793524
--- /dev/null
+++ b/packages/tdesign-uniapp/example/vite.config.ts
@@ -0,0 +1,68 @@
+import path from 'path';
+import { defineConfig, loadEnv } from 'vite';
+import uni from '@dcloudio/vite-plugin-uni';
+import {
+ genVersionMpVitePlugin,
+} from '@plugin-light/vite-plugin-gen-version';
+
+
+const diffPlugins: any[] = [];
+if (process.env.UNI_PLATFORM !== 'h5') {
+ diffPlugins.push(genVersionMpVitePlugin());
+}
+
+// import AutoImport from 'unplugin-auto-import/vite';
+// import Components from 'unplugin-vue-components/vite';
+// import { TDesignResolver } from 'tdesign-uniapp-auto-import-resolver';
+
+
+const baseAlias = {
+ 'tdesign-site': path.resolve(__dirname).replace(/\\/g, '/'),
+ packages: path.resolve(__dirname, '../').replace(/\\/g, '/'),
+ 'tdesign-uniapp-raw': path.resolve(__dirname, './src/_tdesign-raw').replace(/\\/g, '/'),
+ 'tdesign-uniapp': path.resolve(__dirname, './src/_tdesign').replace(/\\/g, '/'),
+ // TODO:
+ 'tdesign-uniapp-chat': path.resolve(__dirname, './src/_tdesign').replace(/\\/g, '/'),
+};
+const ENV_PREFIX = ['VITE_', 'VUE_APP'];
+const root: string = process.cwd();
+
+
+export default ({ mode }) => {
+ const env = loadEnv(mode, root, ENV_PREFIX);
+ const vueAppBase = env.VUE_APP_PUBLICPATH;
+
+ const result = defineConfig({
+ plugins: [
+ uni(),
+ diffPlugins,
+
+ // auto-import 有兼容性问题,可尝试打开,并去掉 pages.json 中的 easycom 配置
+ // AutoImport({
+ // resolvers: [TDesignResolver({
+ // library: 'uniapp',
+ // })],
+ // }),
+ // Components({
+ // resolvers: [TDesignResolver({
+ // library: 'uniapp',
+ // })],
+ // }),
+ ],
+ resolve: {
+ alias: {
+ ...baseAlias,
+ },
+ },
+ base: vueAppBase || '/uniapp/mobile',
+ server: {
+ port: 11111,
+ hmr: true,
+ watch: {
+ usePolling: true,
+ },
+ },
+ });
+
+ return result;
+};
diff --git a/packages/tdesign-uniapp/package.json b/packages/tdesign-uniapp/package.json
new file mode 100644
index 000000000..cb28b6056
--- /dev/null
+++ b/packages/tdesign-uniapp/package.json
@@ -0,0 +1,99 @@
+{
+ "name": "tdesign-uniapp",
+ "version": "0.0.0",
+ "private": "true",
+ "homepage": "https://uwayfly.com/tdesign-uniapp/",
+ "bugs": {
+ "url": "https://github.com/Tencent/tdesign-miniprogram/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Tencent/tdesign-miniprogram.git"
+ },
+ "scripts": {
+ "dev": "concurrently \"npm run watch\" \"pnpm --filter=\"./example\" dev:h5\" \"pnpm --filter=\"./site\" dev\"",
+ "dev:h5": "concurrently \"npm run watch\" \"pnpm --filter=\"./example\" dev:h5\"",
+ "dev:mp-weixin": "concurrently \"npm run watch\" \"pnpm --filter=\"./example\" dev:mp-weixin\"",
+ "dev:mp-alipay": "concurrently \"npm run watch\" \"pnpm --filter=\"./example\" dev:mp-alipay\"",
+ "dev:mp-toutiao": "concurrently \"npm run watch\" \"pnpm --filter=\"./example\" dev:mp-toutiao\"",
+ "dev:mp-lark": "concurrently \"npm run watch\" \"pnpm --filter=\"./example\" dev:mp-lark\"",
+ "dev:mp-xhs": "concurrently \"npm run watch\" \"pnpm --filter=\"./example\" dev:mp-xhs\"",
+ "dev:mp-qq": "concurrently \"npm run watch\" \"pnpm --filter=\"./example\" dev:mp-qq\"",
+ "dev:mp-kuaishou": "concurrently \"npm run watch\" \"pnpm --filter=\"./example\" dev:mp-kuaishou\"",
+ "dev:mp-jd": "concurrently \"npm run watch\" \"pnpm --filter=\"./example\" dev:mp-jd\"",
+ "dev:mp-baidu": "concurrently \"npm run watch\" \"pnpm --filter=\"./example\" dev:mp-baidu\"",
+ "dev:mp": "npm run dev:mp-weixin",
+ "dev:mp:pure": "pnpm --filter=\"./example\" dev:mp-weixin",
+ "build": "pnpm --filter=\"./site\" build && pnpm --filter=\"./example\" build:h5",
+ "build:mp-weixin": "pnpm --filter=\"./example\" build:mp-weixin",
+ "build:mp-alipay": "pnpm --filter=\"./example\" build:mp-alipay",
+ "build:mp-toutiao": "pnpm --filter=\"./example\" build:mp-toutiao",
+ "build:mp-lark": "pnpm --filter=\"./example\" build:mp-lark",
+ "build:mp-xhs": "pnpm --filter=\"./example\" build:mp-xhs",
+ "build:mp-qq": "pnpm --filter=\"./example\" build:mp-qq",
+ "build:mp-kuaishou": "pnpm --filter=\"./example\" build:mp-kuaishou",
+ "build:mp-jd": "pnpm --filter=\"./example\" build:mp-jd",
+ "build:mp-baidu": "pnpm --filter=\"./example\" build:mp-baidu",
+ "build:mp": "npm run build:mp-weixin",
+ "site:dev": "pnpm --filter=\"./site\" run dev",
+ "preview": "pnpm --filter=\"./site\" run site:preview && pnpm --filter=\"./example\" build:h5",
+ "preview:chat": "pnpm --filter=\"./site-chat\" run site:preview && pnpm --filter=\"./example\" build:h5",
+ "type-check": "vue-tsc --noEmit",
+ "init": "node ./example/script/watch/init.js && node ./example/script/pages/index.js",
+ "watch": "node ./example/script/watch/watch.js",
+ "prepare": "npm run init && npm run release:prepare",
+ "release:prepare": "node ./example/script/release/prepare.js",
+ "publish": "cd npm_dist && npm publish",
+ "commit": "git-cz"
+ },
+ "devDependencies": {
+ "@commitlint/cli": "^12.0.1",
+ "@commitlint/config-conventional": "^12.0.1",
+ "@dcloudio/types": "^3.4.19",
+ "@stylistic/eslint-plugin-jsx": "3.1.0",
+ "@types/node": "^24.2.0",
+ "@typescript-eslint/eslint-plugin": "^5.6.0",
+ "@typescript-eslint/parser": "~5.35.0",
+ "@vue/runtime-core": "^3.4.21",
+ "@vue/tsconfig": "^0.7.0",
+ "concurrently": "^9.2.1",
+ "dotenv": "^17.2.3",
+ "echarts": "^6.0.0",
+ "eslint": "8.57.1",
+ "eslint-config-light": "latest",
+ "eslint-config-light-vue3": "latest",
+ "eslint-import-resolver-alias": "1.1.2",
+ "eslint-import-resolver-node": "0.3.9",
+ "eslint-plugin-import": "2.26.0",
+ "eslint-plugin-jest": "25",
+ "eslint-plugin-light": "latest",
+ "eslint-plugin-prettier": "4.2.1",
+ "eslint-plugin-react": "7.26.1",
+ "eslint-plugin-react-hooks": "4.2.0",
+ "eslint-plugin-tailwindcss": "3.18.0",
+ "eslint-plugin-vue": "9.14.0",
+ "glob": "^11.0.3",
+ "husky": "^6.0.0",
+ "less": "^4.4.2",
+ "lint-staged": "^10.5.4",
+ "miniprogram-api-typings": "^4.1.0",
+ "postcss-less": "^6.0.0",
+ "postcss-rpx-transform": "^1.0.1",
+ "stylelint": "14.16.1",
+ "stylelint-config-common": "1.0.10",
+ "stylelint-config-standard": "^39.0.1",
+ "stylelint-less": "^3.0.1",
+ "stylelint-scss": "6.10.0",
+ "t-comm": "^2.0.26",
+ "tslib": "^2.3.1",
+ "typescript": "5.1",
+ "vite": "5.2.8",
+ "vue-tsc": "^1.0.24",
+ "zrender": "^6.0.0"
+ },
+ "lint-staged": {
+ "*.{ts,js,vue}": [
+ "eslint --fix"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/packages/tdesign-uniapp/shims-uni.d.ts b/packages/tdesign-uniapp/shims-uni.d.ts
new file mode 100644
index 000000000..9a8c66b04
--- /dev/null
+++ b/packages/tdesign-uniapp/shims-uni.d.ts
@@ -0,0 +1,12 @@
+/* eslint-disable @typescript-eslint/no-empty-interface */
+/* eslint-disable import/no-unresolved */
+///
+import 'vue';
+
+declare module '@vue/runtime-core' {
+ type Hooks = App.AppInstance & Page.PageInstance;
+
+ interface ComponentCustomOptions extends Hooks {
+
+ }
+}
diff --git a/packages/tdesign-uniapp/site/.env.intranet b/packages/tdesign-uniapp/site/.env.intranet
new file mode 100644
index 000000000..995fca4af
--- /dev/null
+++ b/packages/tdesign-uniapp/site/.env.intranet
@@ -0,0 +1 @@
+NODE_ENV=production
\ No newline at end of file
diff --git a/packages/tdesign-uniapp/site/.env.preview b/packages/tdesign-uniapp/site/.env.preview
new file mode 100644
index 000000000..c0d665211
--- /dev/null
+++ b/packages/tdesign-uniapp/site/.env.preview
@@ -0,0 +1 @@
+NODE_ENV=development
diff --git a/packages/tdesign-uniapp/site/.env.production b/packages/tdesign-uniapp/site/.env.production
new file mode 100644
index 000000000..399be2a85
--- /dev/null
+++ b/packages/tdesign-uniapp/site/.env.production
@@ -0,0 +1 @@
+VUE_APP_PUBLICPATH = https://cdn.uwayfly.com/tdesign-uniapp
diff --git a/packages/tdesign-uniapp/site/docs.config.js b/packages/tdesign-uniapp/site/docs.config.js
new file mode 100644
index 000000000..15d100e25
--- /dev/null
+++ b/packages/tdesign-uniapp/site/docs.config.js
@@ -0,0 +1,626 @@
+export const docs = [
+ {
+ title: '开始',
+ titleEn: 'Start',
+ type: 'document', // 普通文档
+ children: [
+ {
+ title: '快速开始',
+ titleEn: 'Getting Started',
+ name: 'getting-started',
+ path: '/uniapp/getting-started',
+ component: () => import('@docs/getting-started.md'),
+ componentEn: () => import('@docs/getting-started.en-US.md'),
+ },
+ {
+ title: '更新日志',
+ titleEn: 'CHANGELOG',
+ name: 'changelog',
+ path: '/uniapp/changelog',
+ component: () => import('@/CHANGELOG.md'),
+ },
+ {
+ title: '组件概览',
+ titleEn: 'Overview',
+ name: 'overview',
+ path: '/uniapp/overview',
+ component: () => import('@docs/overview.md'),
+ componentEn: () => import('@docs/overview.en-US.md'),
+ },
+ {
+ title: '常见问题',
+ titleEn: 'FAQ',
+ name: 'faq',
+ path: '/uniapp/faq',
+ component: () => import('@docs/faq.md'),
+ },
+ ],
+ },
+ {
+ title: '全局配置',
+ titleEn: 'Global Config',
+ type: 'document',
+ children: [
+ {
+ title: '样式覆盖',
+ titleEn: 'Custom Style',
+ name: 'custom-style',
+ meta: { docType: 'explain' },
+ path: '/uniapp/custom-style',
+ component: () => import('@docs/custom-style.md'),
+ },
+ {
+ title: '自定义主题',
+ titleEn: 'Custom Theme',
+ name: 'custom-theme',
+ meta: { docType: 'explain' },
+ path: '/uniapp/custom-theme',
+ component: () => import('@docs/custom-theme.md'),
+ },
+ {
+ title: '深色模式',
+ titleEn: 'Dark Mode',
+ name: 'dark-mode',
+ meta: { docType: 'explain' },
+ path: '/uniapp/dark-mode',
+ component: () => import('@docs/dark-mode.md'),
+ },
+ ],
+ },
+ {
+ title: '高阶组件',
+ titleEn: 'Pro',
+ type: 'component',
+ children: [
+ {
+ title: 'AI Chat 对话',
+ titleEn: 'Chat',
+ name: 'chat',
+ path: '/uniapp-chat',
+ redirect: () => {
+ const isTDesignHost = window.location.host.includes('tdesign');
+ const baseUrl = isTDesignHost ? `//${window.location.host}` : 'https://uwayfly.com';
+ window.open(`${baseUrl}/uniapp-chat`, '_blank');
+ },
+ },
+ ],
+ },
+ {
+ title: '基础',
+ titleEn: 'Base',
+ type: 'component', // 组件文档
+ children: [
+ {
+ title: 'Button 按钮',
+ titleEn: 'Button',
+ name: 'button',
+ meta: { docType: 'base' },
+ path: '/uniapp/components/button',
+ component: () => import('@/button/README.md'),
+ componentEn: () => import('@/button/README.en-US.md'),
+ },
+ {
+ title: 'Divider 分割线',
+ titleEn: 'Divider',
+ name: 'divider',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/divider',
+ component: () => import('@/divider/README.md'),
+ },
+ {
+ title: 'Fab 悬浮按钮',
+ titleEn: 'Fab',
+ name: 'fab',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/fab',
+ component: () => import('@/fab/README.md'),
+ },
+ {
+ title: 'Icon 图标',
+ titleEn: 'Icon',
+ name: 'icon',
+ meta: { docType: 'base' },
+ path: '/uniapp/components/icon',
+ component: () => import('@/icon/README.md'),
+ },
+ {
+ title: 'Layout 布局',
+ titleEn: 'Layout',
+ name: 'layout',
+ meta: { docType: 'base' },
+ path: '/uniapp/components/layout',
+ component: () => import('@/col/README.md'),
+ },
+ {
+ title: 'Link 链接',
+ titleEn: 'Link',
+ name: 'link',
+ meta: { docType: 'base' },
+ path: '/uniapp/components/link',
+ component: () => import('@/link/README.md'),
+ },
+ ],
+ },
+ {
+ title: '导航',
+ titleEn: 'Navigation',
+ type: 'component',
+ children: [
+ {
+ title: 'BackTop 返回顶部',
+ titleEn: 'BackTop',
+ name: 'back-top',
+ meta: { docType: 'navigation' },
+ path: '/uniapp/components/back-top',
+ component: () => import('@/back-top/README.md'),
+ },
+ {
+ title: 'Drawer 抽屉',
+ titleEn: 'Drawer',
+ name: 'drawer',
+ meta: { docType: 'navigation' },
+ path: '/uniapp/components/drawer',
+ component: () => import('@/drawer/README.md'),
+ },
+ {
+ title: 'Indexes 索引',
+ titleEn: 'Indexes',
+ name: 'indexes',
+ meta: { docType: 'navigation' },
+ path: '/uniapp/components/indexes',
+ component: () => import('@/indexes/README.md'),
+ },
+ {
+ title: 'Navbar 导航栏',
+ titleEn: 'Navbar',
+ name: 'navbar',
+ meta: { docType: 'navigation' },
+ path: '/uniapp/components/navbar',
+ component: () => import('@/navbar/README.md'),
+ },
+ {
+ title: 'SideBar 侧边栏',
+ titleEn: 'SideBar',
+ name: 'sidebar',
+ meta: { docType: 'navigation' },
+ path: '/uniapp/components/side-bar',
+ component: () => import('@/side-bar/README.md'),
+ },
+ {
+ title: 'Steps 步骤条',
+ titleEn: 'Steps',
+ name: 'steps',
+ meta: { docType: 'navigation' },
+ path: '/uniapp/components/steps',
+ component: () => import('@/steps/README.md'),
+ },
+ {
+ title: 'TabBar 标签栏',
+ titleEn: 'TabBar',
+ name: 'tabbar',
+ meta: { docType: 'navigation' },
+ path: '/uniapp/components/tab-bar',
+ component: () => import('@/tab-bar/README.md'),
+ },
+ {
+ title: 'Tabs 选项卡',
+ titleEn: 'Tabs',
+ name: 'tabs',
+ meta: { docType: 'navigation' },
+ path: '/uniapp/components/tabs',
+ component: () => import('@/tabs/README.md'),
+ },
+ ],
+ },
+ {
+ title: '输入',
+ titleEn: 'Form',
+ type: 'component',
+ children: [
+ {
+ title: 'Calendar 日历',
+ titleEn: 'Calendar',
+ name: 'calendar',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/calendar',
+ component: () => import('@/calendar/README.md'),
+ },
+ {
+ title: 'Cascader 级联选择器',
+ titleEn: 'Cascader',
+ name: 'cascader',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/cascader',
+ component: () => import('@/cascader/README.md'),
+ },
+ {
+ title: 'Checkbox 多选框',
+ titleEn: 'Checkbox',
+ name: 'checkbox',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/checkbox',
+ component: () => import('@/checkbox/README.md'),
+ },
+ {
+ title: 'ColorPicker 颜色选择器',
+ titleEn: 'ColorPicker',
+ name: 'color-picker',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/color-picker',
+ component: () => import('@/color-picker/README.md'),
+ },
+ {
+ title: 'DateTimePicker 时间选择器',
+ titleEn: 'DateTimePicker',
+ name: 'dateTimePicker',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/date-time-picker',
+ component: () => import('@/date-time-picker/README.md'),
+ },
+ {
+ title: 'Form 表单',
+ titleEn: 'Form',
+ name: 'form',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/form',
+ component: () => import('@/form/README.md'),
+ },
+ {
+ title: 'Input 输入框',
+ titleEn: 'Input',
+ name: 'input',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/input',
+ component: () => import('@/input/README.md'),
+ },
+ {
+ title: 'Picker 选择器',
+ titleEn: 'Picker',
+ name: 'picker',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/picker',
+ component: () => import('@/picker/README.md'),
+ },
+ {
+ title: 'Radio 单选框',
+ titleEn: 'Radio',
+ name: 'radio',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/radio',
+ component: () => import('@/radio/README.md'),
+ },
+ {
+ title: 'Rate 评分',
+ titleEn: 'Rate',
+ name: 'rate',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/rate',
+ component: () => import('@/rate/README.md'),
+ },
+ {
+ title: 'Search 搜索框',
+ titleEn: 'Search',
+ name: 'search',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/search',
+ component: () => import('@/search/README.md'),
+ },
+ {
+ title: 'Slider 滑动选择器',
+ titleEn: 'Slider',
+ name: 'slider',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/slider',
+ component: () => import('@/slider/README.md'),
+ },
+ {
+ title: 'Stepper 步进器',
+ titleEn: 'Stepper',
+ name: 'stepper',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/stepper',
+ component: () => import('@/stepper/README.md'),
+ },
+ {
+ title: 'Switch 开关',
+ titleEn: 'Switch',
+ name: 'switch',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/switch',
+ component: () => import('@/switch/README.md'),
+ },
+ {
+ title: 'Textarea 多行文本框',
+ titleEn: 'Textarea',
+ name: 'textarea',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/textarea',
+ component: () => import('@/textarea/README.md'),
+ },
+ {
+ title: 'TreeSelect 树形选择',
+ titleEn: 'TreeSelect',
+ name: 'treeSelect',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/tree-select',
+ component: () => import('@/tree-select/README.md'),
+ },
+ {
+ title: 'Upload 上传',
+ titleEn: 'Upload',
+ name: 'upload',
+ meta: { docType: 'form' },
+ path: '/uniapp/components/upload',
+ component: () => import('@/upload/README.md'),
+ },
+ ],
+ },
+ {
+ title: '数据展示',
+ titleEn: 'Data Display',
+ type: 'component',
+ children: [
+ {
+ title: 'Avatar 头像',
+ titleEn: 'Avatar',
+ name: 'avatar',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/avatar',
+ component: () => import('@/avatar/README.md'),
+ },
+ {
+ title: 'Badge 徽标',
+ titleEn: 'Badge',
+ name: 'badge',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/badge',
+ component: () => import('@/badge/README.md'),
+ },
+ {
+ title: 'Cell 单元格',
+ titleEn: 'Cell',
+ name: 'cell',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/cell',
+ component: () => import('@/cell/README.md'),
+ },
+ {
+ title: 'Collapse 折叠面板',
+ titleEn: 'Collapse',
+ name: 'collapse',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/collapse',
+ component: () => import('@/collapse/README.md'),
+ },
+ {
+ title: 'CountDown 倒计时',
+ titleEn: 'CountDown',
+ name: 'countdown',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/count-down',
+ component: () => import('@/count-down/README.md'),
+ },
+ {
+ title: 'Empty 空状态',
+ titleEn: 'Empty',
+ name: 'empty',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/empty',
+ component: () => import('@/empty/README.md'),
+ },
+ {
+ title: 'Footer 页脚',
+ titleEn: 'Footer',
+ name: 'footer',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/footer',
+ component: () => import('@/footer/README.md'),
+ },
+ {
+ title: 'Image 图片',
+ titleEn: 'Image',
+ name: 'image',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/image',
+ component: () => import('@/image/README.md'),
+ },
+ {
+ title: 'Grid 宫格',
+ titleEn: 'Grid',
+ name: 'grid',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/grid',
+ component: () => import('@/grid/README.md'),
+ },
+ {
+ title: 'ImageViewer 图片预览',
+ titleEn: 'ImageViewer',
+ name: 'image-viewer',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/image-viewer',
+ component: () => import('@/image-viewer/README.md'),
+ },
+ {
+ title: 'Progress 进度条',
+ titleEn: 'Progress',
+ name: 'progress',
+ meta: { docType: 'message' },
+ path: '/uniapp/components/progress',
+ component: () => import('@/progress/README.md'),
+ },
+ {
+ title: 'QRCode 二维码',
+ titleEn: 'QRCode',
+ name: 'qrcode',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/qrcode',
+ component: () => import('@/qrcode/README.md'),
+ },
+ {
+ title: 'Result 结果',
+ titleEn: 'Result',
+ name: 'result',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/result',
+ component: () => import('@/result/README.md'),
+ },
+ {
+ title: 'Skeleton 骨架屏',
+ titleEn: 'Skeleton',
+ name: 'skeleton',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/skeleton',
+ component: () => import('@/skeleton/README.md'),
+ },
+ {
+ title: 'Sticky 吸顶',
+ titleEn: 'Sticky',
+ name: 'sticky',
+ meta: { docType: 'navigation' },
+ path: '/uniapp/components/sticky',
+ component: () => import('@/sticky/README.md'),
+ },
+ {
+ title: 'Swiper 轮播图',
+ titleEn: 'Swiper',
+ name: 'swiper',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/swiper',
+ component: () => import('@/swiper/README.md'),
+ },
+ {
+ title: 'Tag 标签',
+ titleEn: 'Tag',
+ name: 'tag',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/tag',
+ component: () => import('@/tag/README.md'),
+ },
+ {
+ title: 'Watermark 水印',
+ titleEn: 'Watermark',
+ name: 'watermark',
+ meta: { docType: 'data' },
+ path: '/uniapp/components/watermark',
+ component: () => import('@/watermark/README.md'),
+ },
+ ],
+ },
+ {
+ title: '反馈',
+ titleEn: 'Feedback',
+ type: 'component', // 组件文档
+ children: [
+ {
+ title: 'ActionSheet 动作面板',
+ titleEn: 'ActionSheet',
+ name: 'actionsheet',
+ meta: { docType: 'message' },
+ path: '/uniapp/components/action-sheet',
+ component: () => import('@/action-sheet/README.md'),
+ },
+ {
+ title: 'Dialog 对话框',
+ titleEn: 'Dialog',
+ name: 'dialog',
+ meta: { docType: 'message' },
+ path: '/uniapp/components/dialog',
+ component: () => import('@/dialog/README.md'),
+ },
+ {
+ title: 'DropdownMenu 下拉菜单',
+ titleEn: 'DropdownMenu',
+ name: 'dropdown-menu',
+ meta: { docType: 'navigation' },
+ path: '/uniapp/components/dropdown-menu',
+ component: () => import('@/dropdown-menu/README.md'),
+ },
+ {
+ title: 'Guide 引导',
+ titleEn: 'Guide',
+ name: 'guide',
+ meta: { docType: 'navigation' },
+ path: '/uniapp/components/guide',
+ component: () => import('@/guide/README.md'),
+ },
+ {
+ title: 'Loading 加载',
+ titleEn: 'Loading',
+ name: 'loading',
+ meta: { docType: 'message' },
+ path: '/uniapp/components/loading',
+ component: () => import('@/loading/README.md'),
+ },
+ {
+ title: 'Message 消息通知',
+ titleEn: 'Message',
+ name: 'message',
+ meta: { docType: 'message' },
+ path: '/uniapp/components/message',
+ component: () => import('@/message/README.md'),
+ },
+ {
+ title: 'NoticeBar 公告栏',
+ titleEn: 'NoticeBar',
+ name: 'noticebar',
+ meta: { docType: 'message' },
+ path: '/uniapp/components/notice-bar',
+ component: () => import('@/notice-bar/README.md'),
+ },
+ {
+ title: 'Overlay 遮罩层',
+ titleEn: 'Overlay',
+ name: 'overlay',
+ meta: { docType: 'message' },
+ path: '/uniapp/components/overlay',
+ component: () => import('@/overlay/README.md'),
+ },
+ {
+ title: 'Popup 弹出层',
+ titleEn: 'Popup',
+ name: 'popup',
+ meta: { docType: 'message' },
+ path: '/uniapp/components/popup',
+ component: () => import('@/popup/README.md'),
+ },
+ {
+ title: 'PullDownRefresh 下拉刷新',
+ titleEn: 'PullDownRefresh',
+ name: 'pullDownRefresh',
+ meta: { docType: 'message' },
+ path: '/uniapp/components/pull-down-refresh',
+ component: () => import('@/pull-down-refresh/README.md'),
+ },
+ {
+ title: 'SwipeCell 滑动操作',
+ titleEn: 'SwipeCell',
+ name: 'swipeCell',
+ meta: { docType: 'message' },
+ path: '/uniapp/components/swipe-cell',
+ component: () => import('@/swipe-cell/README.md'),
+ },
+ {
+ title: 'Toast 轻提示',
+ titleEn: 'Toast',
+ name: 'toast',
+ meta: { docType: 'message' },
+ path: '/uniapp/components/toast',
+ component: () => import('@/toast/README.md'),
+ },
+ ],
+ },
+];
+
+const enDocs = docs.map(doc => ({
+ ...doc,
+ title: doc.titleEn,
+ children: doc?.children?.map(child => ({
+ title: child.titleEn,
+ name: `${child.name}-en`,
+ path: `${child.path}-en`,
+ meta: { lang: 'en' },
+ component: child.componentEn || child.component,
+ })),
+}));
+
+export default { docs, enDocs };
diff --git a/packages/tdesign-uniapp/site/docs/custom-style.md b/packages/tdesign-uniapp/site/docs/custom-style.md
new file mode 100644
index 000000000..4f3df2fae
--- /dev/null
+++ b/packages/tdesign-uniapp/site/docs/custom-style.md
@@ -0,0 +1,117 @@
+---
+title: 样式覆盖
+description: TDesign 提供了多种方式可以实现样式覆盖
+spline: explain
+---
+
+TDesign UniApp 提供了 4 种方式用于样式覆盖
+
+## 1 使用 Custom Style
+
+> TDesign 全部组件均支持 `custom-style` 属性。可传入 CSS 字符串,将会应用于组件的根元素。
+
+
+
+### 开启 virtualHost
+
+在微信小程序基础库版本高于 2.19.2 的情况下,TDesign 会默认开启 `virtualHost` 属性。
+
+此时 `custom-style` 和 `style` 的效果是一致的,任选其一即可:
+
+```html
+填充按钮
+
+填充按钮
+```
+
+渲染的结果如下:
+
+```html
+ |