commit 395d007dc2652c6bd8f740a83709371b49a75d1a Author: 榆钱落尽槿花稀 <2675540038@qq.com> Date: Mon Dec 25 17:56:30 2023 +0800 1 diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json new file mode 100644 index 0000000..81f13f4 --- /dev/null +++ b/.hbuilderx/launch.json @@ -0,0 +1,16 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "local" + }, + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..10b731c --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..a23a34f --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/云商会.iml b/.idea/云商会.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/云商会.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/App.vue b/App.vue new file mode 100644 index 0000000..246e9c3 --- /dev/null +++ b/App.vue @@ -0,0 +1,93 @@ + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..c3ff205 --- /dev/null +++ b/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + +
+ + + diff --git a/libs/components/demo-title.vue b/libs/components/demo-title.vue new file mode 100644 index 0000000..1386ff8 --- /dev/null +++ b/libs/components/demo-title.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/libs/components/dynamic-demo-template.vue b/libs/components/dynamic-demo-template.vue new file mode 100644 index 0000000..525e316 --- /dev/null +++ b/libs/components/dynamic-demo-template.vue @@ -0,0 +1,689 @@ + + + + + diff --git a/libs/components/multiple-options-demo.vue b/libs/components/multiple-options-demo.vue new file mode 100644 index 0000000..f3644b6 --- /dev/null +++ b/libs/components/multiple-options-demo.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/libs/components/nav-index-button.vue b/libs/components/nav-index-button.vue new file mode 100644 index 0000000..d626df0 --- /dev/null +++ b/libs/components/nav-index-button.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/libs/mixin/dynamic_demo_mixin.js b/libs/mixin/dynamic_demo_mixin.js new file mode 100644 index 0000000..66ff992 --- /dev/null +++ b/libs/mixin/dynamic_demo_mixin.js @@ -0,0 +1,52 @@ +/** + * 动态参数演示mixin + */ +module.exports = { + data() { + return { + // 效果显示框top的值 + contentContainerTop: '0px', + contentContainerIsTop: false, + + // 参数显示框top的值 + sectionContainerTop: '0px' + } + }, + onReady() { + this.updateSectionContainerTop() + }, + methods: { + // 处理演示效果框的位置 + async _handleContentConatinerPosition() { + // 获取效果演示框的节点信息 + const contentContainer = await this._tGetRect('#content_container') + // 获取参数框的节点信息 + this._tGetRect('#section_container').then((res) => { + // 判断参数框是否在移动,如果是则更新效果框的位置 + // 如果效果框的顶部已经触控到顶部导航栏就停止跟随 + if (res.top - contentContainer.bottom != 15) { + const newTop = res.top - (contentContainer.height + uni.upx2px(20)) + const minTop = this.vuex_custom_bar_height + 1 + if (newTop < minTop) { + this.contentContainerTop = minTop + 'px' + this.contentContainerIsTop = true + } else { + this.contentContainerTop = newTop + 'px' + this.contentContainerIsTop = false + } + } + }) + }, + // 更新状态切换栏位置信息 + updateSectionContainerTop() { + this._tGetRect('#content_container').then((res) => { + this.contentContainerTop = (this.vuex_custom_bar_height + 148) + 'px' + this.sectionContainerTop = (res.height + 20) + 'px' + }) + } + }, + // 监听页面滚动 + onPageScroll() { + this._handleContentConatinerPosition() + } +} diff --git a/libs/mixin/template_page_mixin.js b/libs/mixin/template_page_mixin.js new file mode 100644 index 0000000..2314549 --- /dev/null +++ b/libs/mixin/template_page_mixin.js @@ -0,0 +1,60 @@ +/** + * 演示页面mixin + */ +module.exports = { + data() { + return { + + } + }, + onLoad() { + // 更新顶部导航栏信息 + this.updateCustomBarInfo() + }, + methods: { + // 点击左上角返回按钮时触发事件 + goBack() { + // 通过判断当前页面的页面栈信息,是否有上一页进行返回,如果没有则跳转到首页 + const pages = getCurrentPages() + if (pages && pages.length > 0) { + const firstPage = pages[0] + if (pages.length == 1 && (!firstPage.route || firstPage.route != 'pages/index/index')) { + uni.reLaunch({ + url: '/pages/index/index' + }) + } else { + uni.navigateBack({ + delta: 1 + }) + } + } else { + uni.reLaunch({ + url: '/pages/index/index' + }) + } + }, + // 更新顶部导航栏信息 + async updateCustomBarInfo() { + // 获取vuex中的自定义顶栏的高度 + let customBarHeight = this.vuex_custom_bar_height + let statusBarHeight = this.vuex_status_bar_height + // 如果获取失败则重新获取 + if (!customBarHeight) { + try { + const navBarInfo = await this.$tn.updateCustomBar() + customBarHeight = navBarInfo.customBarHeight + statusBarHeight = navBarInfo.statusBarHeight + } catch(e) { + setTimeout(() => { + this.updateCustomBarInfo() + }, 10) + return + } + } + + // 更新vuex中的导航栏信息 + this.$tn.vuex('vuex_status_bar_height', statusBarHeight) + this.$tn.vuex('vuex_custom_bar_height', customBarHeight) + } + } +} \ No newline at end of file diff --git a/main.js b/main.js new file mode 100644 index 0000000..d080027 --- /dev/null +++ b/main.js @@ -0,0 +1,25 @@ +import App from './App' +import store from './store' + +import Vue from 'vue' +Vue.config.productionTip = false +App.mpType = 'app' + +// 引入全局TuniaoUI +import TuniaoUI from 'tuniao-ui' +Vue.use(TuniaoUI) + +// 引入TuniaoUI提供的vuex简写方法 +let vuexStore = require('@/store/$tn.mixin.js') +Vue.mixin(vuexStore) + +// 引入TuniaoUI对小程序分享的mixin封装 +let mpShare = require('tuniao-ui/libs/mixin/mpShare.js') +Vue.mixin(mpShare) + +const app = new Vue({ + store, + ...App +}) + +app.$mount() \ No newline at end of file diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..bf6e065 --- /dev/null +++ b/manifest.json @@ -0,0 +1,72 @@ +{ + "name" : "云商会", + "appid" : "__UNI__F702B81", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "2" +} diff --git a/pages.json b/pages.json new file mode 100644 index 0000000..898f873 --- /dev/null +++ b/pages.json @@ -0,0 +1,133 @@ +{ + "easycom": { + "^tn-(.*)": "@/tuniao-ui/components/tn-$1/tn-$1.vue" + }, + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "首页" + } + }, + { + "path" : "pages/index/home", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/service", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/pizz", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/user", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/discovery", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/directory", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/user_info", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/new_info", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/events_list", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/knowledge_list", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/goods_info", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/events_info", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/goods_list", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/index/search/search", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } + } + ], + "globalStyle": { + "navigationStyle": "custom", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8" + }, + "uniIdRouter": {} +} \ No newline at end of file diff --git a/pages/index/directory.vue b/pages/index/directory.vue new file mode 100644 index 0000000..aa70252 --- /dev/null +++ b/pages/index/directory.vue @@ -0,0 +1,337 @@ + + + + + + \ No newline at end of file diff --git a/pages/index/discovery.vue b/pages/index/discovery.vue new file mode 100644 index 0000000..4035d51 --- /dev/null +++ b/pages/index/discovery.vue @@ -0,0 +1,114 @@ + + + + + \ No newline at end of file diff --git a/pages/index/events_info.vue b/pages/index/events_info.vue new file mode 100644 index 0000000..e21a6fc --- /dev/null +++ b/pages/index/events_info.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/pages/index/events_list.vue b/pages/index/events_list.vue new file mode 100644 index 0000000..c5da229 --- /dev/null +++ b/pages/index/events_list.vue @@ -0,0 +1,74 @@ + + + + + \ No newline at end of file diff --git a/pages/index/goods_info.vue b/pages/index/goods_info.vue new file mode 100644 index 0000000..e6ac483 --- /dev/null +++ b/pages/index/goods_info.vue @@ -0,0 +1,86 @@ + + + + + \ No newline at end of file diff --git a/pages/index/goods_list.vue b/pages/index/goods_list.vue new file mode 100644 index 0000000..6e09338 --- /dev/null +++ b/pages/index/goods_list.vue @@ -0,0 +1,93 @@ + + + + + \ No newline at end of file diff --git a/pages/index/home.vue b/pages/index/home.vue new file mode 100644 index 0000000..c274c68 --- /dev/null +++ b/pages/index/home.vue @@ -0,0 +1,183 @@ + + + + + + \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue new file mode 100644 index 0000000..42bbdac --- /dev/null +++ b/pages/index/index.vue @@ -0,0 +1,126 @@ + + + + + \ No newline at end of file diff --git a/pages/index/knowledge_list.vue b/pages/index/knowledge_list.vue new file mode 100644 index 0000000..3d0ca7f --- /dev/null +++ b/pages/index/knowledge_list.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/pages/index/new_info.vue b/pages/index/new_info.vue new file mode 100644 index 0000000..615e691 --- /dev/null +++ b/pages/index/new_info.vue @@ -0,0 +1,66 @@ + + + + + \ No newline at end of file diff --git a/pages/index/pizz.vue b/pages/index/pizz.vue new file mode 100644 index 0000000..67fd3b4 --- /dev/null +++ b/pages/index/pizz.vue @@ -0,0 +1,83 @@ + + + + + \ No newline at end of file diff --git a/pages/index/search/search.vue b/pages/index/search/search.vue new file mode 100644 index 0000000..4e0f960 --- /dev/null +++ b/pages/index/search/search.vue @@ -0,0 +1,270 @@ + + + + + \ No newline at end of file diff --git a/pages/index/service.vue b/pages/index/service.vue new file mode 100644 index 0000000..ab43df9 --- /dev/null +++ b/pages/index/service.vue @@ -0,0 +1,184 @@ + + + + + \ No newline at end of file diff --git a/pages/index/user.vue b/pages/index/user.vue new file mode 100644 index 0000000..4a15894 --- /dev/null +++ b/pages/index/user.vue @@ -0,0 +1,119 @@ + + + + + \ No newline at end of file diff --git a/pages/index/user_info.vue b/pages/index/user_info.vue new file mode 100644 index 0000000..e0841bc --- /dev/null +++ b/pages/index/user_info.vue @@ -0,0 +1,102 @@ + + + + + \ No newline at end of file diff --git a/static/01.png b/static/01.png new file mode 100644 index 0000000..035eff4 Binary files /dev/null and b/static/01.png differ diff --git a/static/01_1.png b/static/01_1.png new file mode 100644 index 0000000..82156b2 Binary files /dev/null and b/static/01_1.png differ diff --git a/static/02.png b/static/02.png new file mode 100644 index 0000000..e207f9f Binary files /dev/null and b/static/02.png differ diff --git a/static/02_2.png b/static/02_2.png new file mode 100644 index 0000000..d613624 Binary files /dev/null and b/static/02_2.png differ diff --git a/static/03.png b/static/03.png new file mode 100644 index 0000000..9393cb5 Binary files /dev/null and b/static/03.png differ diff --git a/static/03_3.png b/static/03_3.png new file mode 100644 index 0000000..e8987b0 Binary files /dev/null and b/static/03_3.png differ diff --git a/static/04.png b/static/04.png new file mode 100644 index 0000000..f1147e3 Binary files /dev/null and b/static/04.png differ diff --git a/static/04_4.png b/static/04_4.png new file mode 100644 index 0000000..729985d Binary files /dev/null and b/static/04_4.png differ diff --git a/static/05.png b/static/05.png new file mode 100644 index 0000000..40c3aee Binary files /dev/null and b/static/05.png differ diff --git a/static/123.png b/static/123.png new file mode 100644 index 0000000..08ce5c7 Binary files /dev/null and b/static/123.png differ diff --git a/static/b1.png b/static/b1.png new file mode 100644 index 0000000..ea9c6b5 Binary files /dev/null and b/static/b1.png differ diff --git a/static/banner.jpg b/static/banner.jpg new file mode 100644 index 0000000..ce6fa08 Binary files /dev/null and b/static/banner.jpg differ diff --git a/static/banner1.jpg b/static/banner1.jpg new file mode 100644 index 0000000..6f0d228 Binary files /dev/null and b/static/banner1.jpg differ diff --git a/static/c1.jpg b/static/c1.jpg new file mode 100644 index 0000000..5254169 Binary files /dev/null and b/static/c1.jpg differ diff --git a/static/c1.png b/static/c1.png new file mode 100644 index 0000000..2fdd620 Binary files /dev/null and b/static/c1.png differ diff --git a/static/c1455.png b/static/c1455.png new file mode 100644 index 0000000..a40e24c Binary files /dev/null and b/static/c1455.png differ diff --git a/static/c2.png b/static/c2.png new file mode 100644 index 0000000..af3700d Binary files /dev/null and b/static/c2.png differ diff --git a/static/c3.png b/static/c3.png new file mode 100644 index 0000000..e19103f Binary files /dev/null and b/static/c3.png differ diff --git a/static/css/components/demo_page_common.scss b/static/css/components/demo_page_common.scss new file mode 100644 index 0000000..f40b136 --- /dev/null +++ b/static/css/components/demo_page_common.scss @@ -0,0 +1,193 @@ +/* 顶部 start */ +.header { + padding: 80rpx 60rpx 40rpx 60rpx; + + .title { + font-size: 36rpx; + color: $tn-font-color; + font-weight: bold; + } + + .sub-title { + font-size: 28rpx; + color: $tn-content-color; + padding-top: 18rpx; + } + + .tips-title { + font-size: 24rpx; + color: $tn-font-sub-color; + padding-top: 5rpx; + } +} +/* 顶部 end */ + +/* 展示内容容器 start */ +.show-content-container { + + /* 标题容器 start */ + .title-container { + display: flex; + position: relative; + align-items: center; + justify-content: space-between; + min-height: 100rpx; + + // 标题样式 + .title { + height: 100%; + max-width: 100%; + margin: 0 20rpx; + font-size: 30rpx; + display: flex; + align-items: center; + justify-content: center; + + // 标题前面小点 + &:before { + content: " "; + background-color: $tn-main-color; + width: 15rpx; + height: 15rpx; + border-radius: 10rpx; + margin-right: 18rpx; + } + } + } + /* 标题容器 end */ + + /* 内容 start */ + .content { + padding: 20rpx; + } + /* 内容 end */ + +} +/* 展示内容容器 end */ + +/* 内容容器 start */ +.demo-content-container { + border: 1rpx dashed $tn-main-color; + margin: 20rpx; + margin-top: 0rpx; + + position: fixed; + width: 95%; + z-index: 10; + + transition: all 0.15s ease-out; + + &.top { + width: 100%; + margin: 0; + } + + &.no-fixed { + position: relative !important; + } + + /* 标题容器 start */ + .title-container { + display: flex; + position: relative; + align-items: center; + justify-content: center; + min-height: 100rpx; + + // 标题样式 + .title { + height: 100%; + max-width: 100%; + margin: 0 30rpx; + font-size: 30rpx; + display: flex; + align-items: center; + justify-content: center; + } + } + /* 标题容器 end */ + + /* 内容 start */ + .content { + padding: 30rpx; + display: flex; + align-items: center; + justify-content: center; + } + /* 内容 end */ + +} +/* 内容容器 end */ + +/* 可选项内容容器 start */ +.demo-section-container { + margin: 20rpx; + height: 100%; + + /* 标题容器 start */ + .title-container { + display: flex; + position: relative; + align-items: center; + justify-content: center; + min-height: 100rpx; + margin-bottom: 10rpx; + + // 标题样式 + .title { + height: 100%; + max-width: 100%; + margin: 0 30rpx; + font-size: 30rpx; + display: flex; + align-items: center; + justify-content: center; + } + + &::after { + content: " "; + box-sizing: border-box; + width: 90%; + height: 100%; + position: absolute; + top: 0; + left: 50%; + transform: translateX(-50%); + border-bottom: 1rpx solid $tn-border-solid-color; + } + } + /* 标题容器 end */ + + /* 参数内容 start*/ + .content { + padding: 0 20rpx 10rpx 20rpx; + + // 标题样式 + .title { + padding-left: 20rpx; + height: 100%; + position: relative; + + &::before { + content: " "; + position: absolute; + top: 50%; + left: 0; + width: 4rpx; + height: 90%; + background-color: $tn-main-color; + border-radius: 6rpx; + transform: translateY(-50%); + } + } + + // 参数样式 + .section { + margin-top: 15rpx; + margin-bottom: 20rpx; + } + } + /* 参数内容 end*/ + +} +/* 可选项内容容器 end */ \ No newline at end of file diff --git a/static/css/my.scss b/static/css/my.scss new file mode 100644 index 0000000..c5281d1 --- /dev/null +++ b/static/css/my.scss @@ -0,0 +1,240 @@ +.pages-a { + max-height: 100vh; +} + +/* 自定义导航栏内容 start */ +.custom-nav { + height: 100%; + + &__back { + margin: auto 5rpx; + font-size: 50rpx; + margin-right: 10rpx; + margin-left: 30rpx; + flex-basis: 5%; + } +} + +/* 底部安全边距 start*/ +.tn-tabbar-height { + min-height: 120rpx; + height: calc(140rpx + env(safe-area-inset-bottom) / 2); + height: calc(140rpx + constant(safe-area-inset-bottom)); +} + +/* 图标容器5 start */ +.icon5 { + &__item { + // width: 30%; + background-color: #FFFFFF; + border-radius: 10rpx; + padding: 0rpx; + margin: 0rpx; + transform: scale(1); + transition: transform 0.3s linear; + transform-origin: center center; + + &--icon { + width: 96rpx; + height: 96rpx; + border-radius: 50%; + margin-bottom: 18rpx; + position: relative; + z-index: 1; + } + } +} + +/* 轮播视觉差 start */ +.card-swiper { + height: 450rpx; +} + +.card-swiper swiper-item { + width: 750rpx; + left: 0rpx; + box-sizing: border-box; + padding: 40rpx 30rpx 30rpx 30rpx; + overflow: initial; +} + +.card-swiper swiper-item .swiper-item { + width: 100%; + display: block; + height: 100%; + border-radius: 15rpx; + transform: scale(1); + transition: all 0.2s ease-in 0s; + will-change: transform; + // overflow: hidden; +} + +.card-swiper swiper-item.cur .swiper-item { + transform: none; + transition: all 0.2s ease-in 0s; + will-change: transform; +} + +.card-swiper swiper-item .swiper-item-text { + margin-top: -220rpx; + text-align: center; + width: 100%; + display: block; + border-radius: 10rpx; + transform: translate(100rpx, 0rpx) scale(0.9, 0.9); + transition: all 0.6s ease 0s; + will-change: transform; + overflow: hidden; +} + +.card-swiper swiper-item.cur .swiper-item-text { + margin-top: -220rpx; + width: 100%; + transform: translate(0rpx, 0rpx) scale(0.9, 0.9); + transition: all 0.6s ease 0s; + will-change: transform; +} + +.image-banner { + display: flex; + align-items: center; + justify-content: center; +} + +.image-banner image { + width: 100%; + height: 100%; +} + +/* 轮播指示点 start*/ +.indication { + z-index: 9999; + width: 100%; + height: 36rpx; + position: absolute; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; +} + +.spot { + background-color: #FFFFFF; + opacity: 0.6; + width: 10rpx; + height: 10rpx; + border-radius: 20rpx; + top: -70rpx; + margin: 0 8rpx !important; + position: relative; +} + +.spot.active { + opacity: 1; + width: 30rpx; + background-color: #FFFFFF; +} + + +/* 胶囊banner*/ +.image-capsule { + padding: 100rpx 0rpx; + font-size: 40rpx; + font-weight: 300; + position: relative; +} + +.image-piccapsule { + background-size: cover; + background-repeat: no-repeat; + // background-attachment:fixed; + background-position: top; + border-radius: 20rpx 20rpx 0 0; +} + +/* 用户头像 start */ +.logo-image { + width: 40rpx; + height: 40rpx; + position: relative; +} + +.logo-pic { + background-size: cover; + background-repeat: no-repeat; + // background-attachment:fixed; + background-position: top; + border: 1rpx solid rgba(255, 255, 255, 0.05); + // box-shadow: 0rpx 0rpx 80rpx 0rpx rgba(0, 0, 0, 0.15); + border-radius: 50%; + overflow: hidden; + // background-color: #FFFFFF; +} + +/* 瀑布流*/ +.wallpaper__item { + background-color: #FFFFFF; + overflow: hidden; + margin: 0 10rpx; + margin-bottom: 40rpx; + // box-shadow: 0rpx 0rpx 30rpx 0rpx rgba(0, 0, 0, 0.07); + + .item { + + /* 图片 start */ + &__image { + width: 100%; + height: auto; + background-color: #FFFFFF; + border: 1rpx solid #F8F7F8; + border-radius: 10rpx; + overflow: hidden; + } + + /* 图片 end */ + + /* 内容 start */ + &__data { + padding: 14rpx 0rpx; + } + + /* 标题 start */ + &__title-container { + text-align: justify; + line-height: 38rpx; + vertical-align: middle; + } + + &__title { + font-size: 30rpx; + } + + /* 标题 end */ + + /* 标签 start */ + &__tags-container { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + align-items: center; + justify-content: flex-start; + } + + &__tag { + margin: 10rpx; + color: #7C8191; + background-color: #F3F2F7; + padding: 4rpx 14rpx 6rpx; + border-radius: 10rpx; + font-size: 20rpx; + + &:first-child { + margin-left: 0rpx !important; + } + } + + /* 标签 end */ + + /* 内容 end */ + } +} \ No newline at end of file diff --git a/static/css/templatePage/custom_nav_bar.scss b/static/css/templatePage/custom_nav_bar.scss new file mode 100644 index 0000000..7cc0960 --- /dev/null +++ b/static/css/templatePage/custom_nav_bar.scss @@ -0,0 +1,38 @@ +.tn-custom-nav-bar__back { + width: 100%; + height: 100%; + position: relative; + display: flex; + justify-content: space-evenly; + align-items: center; + box-sizing: border-box; + background-color: rgba(0, 0, 0, 0.15); + border-radius: 1000rpx; + border: 1rpx solid rgba(255, 255, 255, 0.5); + color: #FFFFFF; + font-size: 18px; + + .icon { + display: block; + flex: 1; + margin: auto; + text-align: center; + } + + &:before { + content: " "; + width: 1rpx; + height: 110%; + position: absolute; + top: 22.5%; + left: 0; + right: 0; + margin: auto; + transform: scale(0.5); + transform-origin: 0 0; + pointer-events: none; + box-sizing: border-box; + opacity: 0.7; + background-color: #FFFFFF; + } +} \ No newline at end of file diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..7bf9037 Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/hd1.jpg b/static/hd1.jpg new file mode 100644 index 0000000..dda511f Binary files /dev/null and b/static/hd1.jpg differ diff --git a/static/ico1.png b/static/ico1.png new file mode 100644 index 0000000..be9f34a Binary files /dev/null and b/static/ico1.png differ diff --git a/static/ico10.png b/static/ico10.png new file mode 100644 index 0000000..377b9db Binary files /dev/null and b/static/ico10.png differ diff --git a/static/ico11.png b/static/ico11.png new file mode 100644 index 0000000..e050613 Binary files /dev/null and b/static/ico11.png differ diff --git a/static/ico12.png b/static/ico12.png new file mode 100644 index 0000000..50c1750 Binary files /dev/null and b/static/ico12.png differ diff --git a/static/ico13.png b/static/ico13.png new file mode 100644 index 0000000..5b6e737 Binary files /dev/null and b/static/ico13.png differ diff --git a/static/ico2.png b/static/ico2.png new file mode 100644 index 0000000..b140322 Binary files /dev/null and b/static/ico2.png differ diff --git a/static/ico3.png b/static/ico3.png new file mode 100644 index 0000000..c31de61 Binary files /dev/null and b/static/ico3.png differ diff --git a/static/ico4.png b/static/ico4.png new file mode 100644 index 0000000..09c2819 Binary files /dev/null and b/static/ico4.png differ diff --git a/static/ico5.png b/static/ico5.png new file mode 100644 index 0000000..dd89264 Binary files /dev/null and b/static/ico5.png differ diff --git a/static/ico6.png b/static/ico6.png new file mode 100644 index 0000000..67e6912 Binary files /dev/null and b/static/ico6.png differ diff --git a/static/ico7.png b/static/ico7.png new file mode 100644 index 0000000..4eb1717 Binary files /dev/null and b/static/ico7.png differ diff --git a/static/ico8.png b/static/ico8.png new file mode 100644 index 0000000..ee91af4 Binary files /dev/null and b/static/ico8.png differ diff --git a/static/ico9.png b/static/ico9.png new file mode 100644 index 0000000..233318c Binary files /dev/null and b/static/ico9.png differ diff --git a/static/s1.jpg b/static/s1.jpg new file mode 100644 index 0000000..150d5d4 Binary files /dev/null and b/static/s1.jpg differ diff --git a/static/t1.png b/static/t1.png new file mode 100644 index 0000000..d2f328d Binary files /dev/null and b/static/t1.png differ diff --git a/static/t2.png b/static/t2.png new file mode 100644 index 0000000..2948144 Binary files /dev/null and b/static/t2.png differ diff --git a/static/t7.jpg b/static/t7.jpg new file mode 100644 index 0000000..34e291b Binary files /dev/null and b/static/t7.jpg differ diff --git a/static/u1.jpg b/static/u1.jpg new file mode 100644 index 0000000..68dd024 Binary files /dev/null and b/static/u1.jpg differ diff --git a/static/u2.jpg b/static/u2.jpg new file mode 100644 index 0000000..082b230 Binary files /dev/null and b/static/u2.jpg differ diff --git a/store/$tn.mixin.js b/store/$tn.mixin.js new file mode 100644 index 0000000..ab7689b --- /dev/null +++ b/store/$tn.mixin.js @@ -0,0 +1,28 @@ +import { mapState } from 'vuex' +import store from '@/store' + +// 尝试将用户在根目录中的store/index.js的vuex的state变量加载到全局变量中 +let $tStoreKey = [] +try { + $tStoreKey = store.state ? Object.keys(store.state) : [] +} catch(e) { + +} + +module.exports = { + beforeCreate() { + // 将vuex方法挂在在$t中 + // 使用方法: + // 修改vuex的state中的user.name变量为图鸟小菜 => this.$tn.vuex('user.name', '图鸟小菜') + // 修改vuexde state中的version变量为1.0.1 => this.$tn.vuex('version', 1.0.1) + this.$tn.vuex = (name, value) => { + this.$store.commit('$tStore', { + name, value + }) + } + }, + computed: { + // 将vuex的state中的变量结构到全局混入mixin中 + ...mapState($tStoreKey) + } +} \ No newline at end of file diff --git a/store/index.js b/store/index.js new file mode 100644 index 0000000..828212c --- /dev/null +++ b/store/index.js @@ -0,0 +1,75 @@ +import Vue from 'vue' +import Vuex from 'vuex' + +Vue.use(Vuex) + +let lifeData = {} + +// 尝试获取本地是否存在lifeData变量,第一次启动时不存在 +try { + lifeData = uni.getStorageSync('lifeData') +} catch(e) { + +} + +// 标记需要永久存储的变量,在每次启动时取出,在state中的变量名 +let saveStateKeys = ['vuex_user'] + +// 保存变量到本地存储 +const saveLifeData = function(key, value) { + // 判断变量是否在存储数组中 + if (saveStateKeys.indexOf(key) != -1) { + // 获取本地存储的lifeData对象,将变量添加到对象中 + let tmpLifeData = uni.getStorageSync('lifeData') + // 第一次启动时不存在,则放一个空对象 + tmpLifeData = tmpLifeData ? tmpLifeData : {}, + tmpLifeData[key] = value + // 将变量再次放回本地存储中 + uni.setStorageSync('lifeData', tmpLifeData) + } +} + +const store = new Vuex.Store({ + state: { + // 如果上面从本地获取的lifeData对象下有对应的属性,就赋值给state中对应的变量 + // 加上vuex_前缀,是防止变量名冲突,也让人一目了然 + vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {name: '图鸟'}, + + // 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式 + // app版本 + vuex_version: "1.0.0", + // 是否使用自定义导航栏 + vuex_custom_nav_bar: true, + // 状态栏高度 + vuex_status_bar_height: 0, + // 自定义导航栏的高度 + vuex_custom_bar_height: 0 + }, + mutations: { + $tStore(state, payload) { + // 判断是否多层调用,state中为对象存在的情况,例如user.info.score = 1 + let nameArr = payload.name.split('.') + let saveKey = '' + let len = nameArr.length + if (len >= 2) { + let obj = state[nameArr[0]] + for (let i= 1; i < len - 1; i++) { + obj = obj[nameArr[i]] + } + obj[nameArr[len - 1]] = payload.value + saveKey = nameArr[0] + } else { + // 单层级变量 + state[payload.name] = payload.value + saveKey = payload.name + } + + // 保存变量到本地中 + saveLifeData(saveKey, state[saveKey]) + } + }, + actions: { + } +}) + +export default store \ No newline at end of file diff --git a/tuniao-ui/README.md b/tuniao-ui/README.md new file mode 100644 index 0000000..ccb9fcb --- /dev/null +++ b/tuniao-ui/README.md @@ -0,0 +1,4 @@ +TuniaoUi for uniApp v1.0.0 | by 图鸟 2021-09-01 +仅供开发,如作它用所承受的法律责任一概与作者无关 + +*使用TuniaoUi开发扩展与插件时,请注明基于tuniao字眼 \ No newline at end of file diff --git a/tuniao-ui/components/tn-action-sheet/tn-action-sheet.vue b/tuniao-ui/components/tn-action-sheet/tn-action-sheet.vue new file mode 100644 index 0000000..85ffe40 --- /dev/null +++ b/tuniao-ui/components/tn-action-sheet/tn-action-sheet.vue @@ -0,0 +1,206 @@ + + + + + diff --git a/tuniao-ui/components/tn-avatar-group/tn-avatar-group.vue b/tuniao-ui/components/tn-avatar-group/tn-avatar-group.vue new file mode 100644 index 0000000..4a7f11c --- /dev/null +++ b/tuniao-ui/components/tn-avatar-group/tn-avatar-group.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/tuniao-ui/components/tn-avatar/tn-avatar.vue b/tuniao-ui/components/tn-avatar/tn-avatar.vue new file mode 100644 index 0000000..96e7100 --- /dev/null +++ b/tuniao-ui/components/tn-avatar/tn-avatar.vue @@ -0,0 +1,298 @@ + + + + + diff --git a/tuniao-ui/components/tn-badge/tn-badge.vue b/tuniao-ui/components/tn-badge/tn-badge.vue new file mode 100644 index 0000000..d92f5f6 --- /dev/null +++ b/tuniao-ui/components/tn-badge/tn-badge.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/tuniao-ui/components/tn-button/tn-button.vue b/tuniao-ui/components/tn-button/tn-button.vue new file mode 100644 index 0000000..793f343 --- /dev/null +++ b/tuniao-ui/components/tn-button/tn-button.vue @@ -0,0 +1,348 @@ + + + + + \ No newline at end of file diff --git a/tuniao-ui/components/tn-calendar/tn-calendar.vue b/tuniao-ui/components/tn-calendar/tn-calendar.vue new file mode 100644 index 0000000..289b67b --- /dev/null +++ b/tuniao-ui/components/tn-calendar/tn-calendar.vue @@ -0,0 +1,707 @@ + + + + + diff --git a/tuniao-ui/components/tn-car-keyboard/tn-car-keyboard.vue b/tuniao-ui/components/tn-car-keyboard/tn-car-keyboard.vue new file mode 100644 index 0000000..2e4c6cc --- /dev/null +++ b/tuniao-ui/components/tn-car-keyboard/tn-car-keyboard.vue @@ -0,0 +1,320 @@ + + + + + diff --git a/tuniao-ui/components/tn-cascade-selection/tn-cascade-selection.vue b/tuniao-ui/components/tn-cascade-selection/tn-cascade-selection.vue new file mode 100644 index 0000000..02ac406 --- /dev/null +++ b/tuniao-ui/components/tn-cascade-selection/tn-cascade-selection.vue @@ -0,0 +1,654 @@ + + + + + diff --git a/tuniao-ui/components/tn-checkbox-group/tn-checkbox-group.vue b/tuniao-ui/components/tn-checkbox-group/tn-checkbox-group.vue new file mode 100644 index 0000000..5472ad5 --- /dev/null +++ b/tuniao-ui/components/tn-checkbox-group/tn-checkbox-group.vue @@ -0,0 +1,134 @@ + + + + + diff --git a/tuniao-ui/components/tn-checkbox/tn-checkbox.vue b/tuniao-ui/components/tn-checkbox/tn-checkbox.vue new file mode 100644 index 0000000..0ad3a3f --- /dev/null +++ b/tuniao-ui/components/tn-checkbox/tn-checkbox.vue @@ -0,0 +1,328 @@ + + + + + diff --git a/tuniao-ui/components/tn-circle-progress/tn-circle-progress.vue b/tuniao-ui/components/tn-circle-progress/tn-circle-progress.vue new file mode 100644 index 0000000..31c1a38 --- /dev/null +++ b/tuniao-ui/components/tn-circle-progress/tn-circle-progress.vue @@ -0,0 +1,223 @@ + + + + + diff --git a/tuniao-ui/components/tn-collapse-item/tn-collapse-item.vue b/tuniao-ui/components/tn-collapse-item/tn-collapse-item.vue new file mode 100644 index 0000000..998879f --- /dev/null +++ b/tuniao-ui/components/tn-collapse-item/tn-collapse-item.vue @@ -0,0 +1,236 @@ + + + + + diff --git a/tuniao-ui/components/tn-collapse/tn-collapse.vue b/tuniao-ui/components/tn-collapse/tn-collapse.vue new file mode 100644 index 0000000..00ec9a2 --- /dev/null +++ b/tuniao-ui/components/tn-collapse/tn-collapse.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/tuniao-ui/components/tn-color-icon/tn-color-icon.vue b/tuniao-ui/components/tn-color-icon/tn-color-icon.vue new file mode 100644 index 0000000..c7ad83b --- /dev/null +++ b/tuniao-ui/components/tn-color-icon/tn-color-icon.vue @@ -0,0 +1,318 @@ + + + + + diff --git a/tuniao-ui/components/tn-column-notice/tn-column-notice.vue b/tuniao-ui/components/tn-column-notice/tn-column-notice.vue new file mode 100644 index 0000000..d5d795b --- /dev/null +++ b/tuniao-ui/components/tn-column-notice/tn-column-notice.vue @@ -0,0 +1,251 @@ + + + + + diff --git a/tuniao-ui/components/tn-count-down/tn-count-down.vue b/tuniao-ui/components/tn-count-down/tn-count-down.vue new file mode 100644 index 0000000..cd31e69 --- /dev/null +++ b/tuniao-ui/components/tn-count-down/tn-count-down.vue @@ -0,0 +1,314 @@ + + + + + diff --git a/tuniao-ui/components/tn-count-scroll/tn-count-scroll.vue b/tuniao-ui/components/tn-count-scroll/tn-count-scroll.vue new file mode 100644 index 0000000..b9c2eef --- /dev/null +++ b/tuniao-ui/components/tn-count-scroll/tn-count-scroll.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/tuniao-ui/components/tn-count-to/tn-count-to.vue b/tuniao-ui/components/tn-count-to/tn-count-to.vue new file mode 100644 index 0000000..c3d8854 --- /dev/null +++ b/tuniao-ui/components/tn-count-to/tn-count-to.vue @@ -0,0 +1,231 @@ + + + + + diff --git a/tuniao-ui/components/tn-cropper/index.wxs b/tuniao-ui/components/tn-cropper/index.wxs new file mode 100644 index 0000000..0181a93 --- /dev/null +++ b/tuniao-ui/components/tn-cropper/index.wxs @@ -0,0 +1,332 @@ +var cropper = { + // 画布x轴起点 + cutX: 0, + // 画布y轴起点 + cutY: 0, + // 触摸点信息(手指与图片中心点的相对位置) + touchRelactive: [{ + x: 0, + y: 0 + }], + // 双指触摸时斜边的长度 + hypotenuseLength:0, + // 是否结束触摸 + touchEndFlag: false, + // 画布宽高 + canvasWidth: 0, + canvasHeight: 0, + // 图片宽高 + imgWidth: 0, + imgHeight: 0, + // 图片缩放比例 + scale: 1, + // 图片旋转角度 + angle: 0, + // 图片上边距 + imgTop: 0, + // 图片左边距 + imgLeft: 0, + // 窗口宽高 + windowWidth: 0, + windowHeight: 0, + init: true +} + +function bool(str) { + return str === 'true' || str === true +} + +function propChange(prop, oldProp, ownerInstance, instance) { + if (prop && prop !== 'null') { + var params = prop.split(',') + var type = +params[0] + var dataset = instance.getDataset() + if (cropper.init || type == 4) { + cropper.canvasWidth = +dataset.width + cropper.canvasHeight = +dataset.height + cropper.imgTop = +dataset.windowheight / 2 + cropper.imgLeft = +dataset.windowwidth / 2 + cropper.imgWidth = +dataset.imgwidth + cropper.imgHeight = +dataset.imgheight + cropper.windowHeight = +dataset.windowheight + cropper.windowWidth = +dataset.windowwidth + cropper.init = false + } else if (type == 2 || type == 3) { + cropper.imgWidth = +dataset.imgwidth + cropper.imgHeight = +dataset.imgheight + } + cropper.angle = +dataset.angle + if (type == 3) { + imgTransform(ownerInstance) + } + switch(type) { + case 1: + setCutCenter(ownerInstance) + // // 设置裁剪框大小 + computeCutSize(ownerInstance) + // // 检查裁剪框是否在范围内 + cutDetectionPosition(ownerInstance) + break + case 2: + setCutCenter(ownerInstance) + break + case 3: + imgMarginDetectionScale(ownerInstance) + break + case 4: + imageReset(ownerInstance) + break + case 5: + setCutCenter(ownerInstance) + break + default: + break + } + } +} + +function touchStart(event, ownerInstance) { + var touch = event.touches || event.changedTouches + cropper.touchEndFlag = false + if (touch.length === 1) { + cropper.touchRelactive[0] = { + x: touch[0].pageX - cropper.imgLeft, + y: touch[0].pageY - cropper.imgTop + } + } else { + var width = Math.abs(touch[0].pageX - touch[1].pageX) + var height = Math.abs(touch[0].pageY - touch[1].pageY) + cropper.touchRelactive = [{ + x: touch[0].pageX - cropper.imgLeft, + y: touch[0].pageY - cropper.imgTop + },{ + x: touch[1].pageX - cropper.imgLeft, + y: touch[1].pageY - cropper.imgTop + }] + cropper.hypotenuseLength = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2)) + } +} + +function touchMove(event, ownerInstance) { + var touch = event.touches || event.changedTouches + if (cropper.touchEndFlag) return + moveDuring(ownerInstance) + if (event.touches.length === 1) { + var left = touch[0].pageX - cropper.touchRelactive[0].x, + top = touch[0].pageY - cropper.touchRelactive[0].y; + cropper.imgLeft = left + cropper.imgTop = top + imgTransform(ownerInstance) + imgMarginDetectionPosition(ownerInstance) + } else { + var dataset = event.instance.getDataset() + var minScale = +dataset.minscale + var maxScale = +dataset.maxscale + var width = Math.abs(touch[0].pageX - touch[1].pageX), + height = Math.abs(touch[0].pageY - touch[1].pageY), + hypotenuse = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2)), + scale = cropper.scale * (hypotenuse / cropper.hypotenuseLength), + current_deg = 0; + scale = scale <= minScale ? minScale : scale + scale = scale >= maxScale ? maxScale : scale + cropper.scale = scale + imgMarginDetectionScale(ownerInstance, true) + var touchRelative = [{ + x: touch[0].pageX - cropper.imgLeft, + y: touch[0].pageY - cropper.imgTop + }, { + x: touch[1].pageX - cropper.imgLeft, + y: touch[1].pageY - cropper.imgTop + }] + cropper.touchRelactive = touchRelative + cropper.hypotenuseLength = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2)) + // 更新视图 + cropper.angle = cropper.angle + current_deg + imgTransform(ownerInstance) + } +} + +function touchEnd(event, ownerInstance) { + cropper.touchEndFlag = true + moveStop(ownerInstance) + updateData(ownerInstance) +} + +function moveDuring(ownerInstance) { + if (!ownerInstance) return + ownerInstance.callMethod('moveDuring') +} + +function moveStop(ownerInstance) { + if (!ownerInstance) return + ownerInstance.callMethod('moveStop') +} + +function setCutCenter(ownerInstance) { + var cutX = (cropper.windowWidth - cropper.canvasWidth) * 0.5 + var cutY = (cropper.windowHeight - cropper.canvasHeight) * 0.5 + + cropper.imgTop = cropper.imgTop - cropper.cutY + cutY + cropper.cutY = cutY + cropper.imgLeft = cropper.imgLeft - cropper.cutX + cutX + cropper.cutX = cutX + cutDetectionPosition(ownerInstance) + imgTransform(ownerInstance) + updateData(ownerInstance) +} + +// 检测剪裁框位置是否在允许的范围内(屏幕内) +function cutDetectionPosition(ownerInstance) { + var windowHeight = cropper.windowHeight, + windowWidth = cropper.windowWidth; + + // 检测上边距是否在范围内 + var cutDetectionPositionTop = function() { + if (cropper.cutY < 0) { + cropper.cutY = 0 + } + if (cropper.cutY > windowHeight - cropper.canvasHeight) { + cropper.cutY = windowHeight - cropper.canvasHeight + } + } + + // 检测左边距是否在范围内 + var cutDetectionPositionLeft = function() { + if (cropper.cutX < 0) { + cropper.cutX = 0 + } + if (cropper.cutX > windowWidth - cropper.canvasWidth) { + cropper.cutX = windowWidth - cropper.canvasWidth + } + } + + // 裁剪框坐标处理(如果只写一个参数则另一个默认为0,都不写默认为居中) + if (cropper.cutX === null && cropper.cutY === null) { + var cutX = (windowWidth - cropper.canvasWidth) * 0.5, + cutY = (windowHeight - cropper.canvasHeight) * 0.5; + cropper.cutX = cutX + cropper.cutY = cutY + } else if (cropper.cutX !== null && cropper.cutX !== null) { + cutDetectionPositionTop() + cutDetectionPositionLeft() + } else if (cropper.cutX !== null && cropper.cutY === null) { + cutDetectionPositionLeft() + cropper.cutY = (windowHeight - cropper.canvasHeight) / 2 + } else if (cropper.cutX === null && cropper.cutY !== null) { + cutDetectionPositionTop() + cropper.cutX = (windowWidth - cropper.canvasWidth) / 2 + } +} + +// 图片边缘检测-缩放 +function imgMarginDetectionScale(ownerInstance, delay) { + var scale = cropper.scale, + imgWidth = cropper.imgWidth, + imgHeight = cropper.imgHeight; + if ((cropper.angle / 90) % 2) { + imgWidth = cropper.imgHeight + imgHeight = cropper.imgWidth + } + if (imgWidth * scale < cropper.canvasWidth) { + scale = cropper.canvasWidth / imgWidth + } + if (imgHeight * scale < cropper.canvasHeight) { + scale = Math.max(scale, cropper.canvasHeight / imgHeight) + } + imgMarginDetectionPosition(ownerInstance, scale, delay) +} + +// 图片边缘检测-位置 +function imgMarginDetectionPosition(ownerInstance, scale, delay) { + var left = cropper.imgLeft, + top = cropper.imgTop, + imgWidth = cropper.imgWidth, + imgHeight = cropper.imgHeight; + scale = scale || cropper.scale + if ((cropper.angle / 90) % 2) { + imgWidth = cropper.imgHeight + imgHeight = cropper.imgWidth + } + + left = cropper.cutX + (imgWidth * scale) / 2 >= left ? left : cropper.cutX + (imgWidth * scale) / 2 + left = cropper.cutX + cropper.canvasWidth - (imgWidth * scale) / 2 <= left ? left : cropper.cutX + cropper.canvasWidth - (imgWidth * scale) / 2 + top = cropper.cutY + (imgHeight * scale) / 2 >= top ? top : cropper.cutY + (imgHeight * scale) / 2 + top = cropper.cutY + cropper.canvasHeight - (imgHeight * scale) / 2 <= top ? top : cropper.cutY + cropper.canvasHeight - (imgHeight * scale) / 2 + + cropper.imgLeft = left + cropper.imgTop = top + cropper.scale = scale + if (!delay || delay === 'null') { + imgTransform(ownerInstance) + } +} + +// 改变截取值大小 +function computeCutSize(ownerInstance) { + if (cropper.canvasWidth > cropper.windowWidth) { + cropper.canvasWidth = cropper.windowWidth + } else if (cropper.canvasWidth + cropper.cutX > cropper.windowWidth) { + cropper.cutX = cropper.windowWidth - cropper.cutX + } + if (cropper.canvasHeight > cropper.windowHeight) { + cropper.canvasHeight = cropper.windowHeight + } else if (cropper.canvasHeight + cropper.cutY > cropper.windowHeight) { + cropper.cutY = cropper.windowHeight - cropper.cutY + } +} + +// 图片动画 +function imgTransform(ownerInstance) { + try { + var image = ownerInstance.selectComponent('.tn-cropper__image') + if (!image) return + var x = cropper.imgLeft - cropper.imgWidth / 2, + y = cropper.imgTop - cropper.imgHeight / 2; + image.setStyle({ + 'transform': 'translate3d('+ x + 'px,' + y + 'px,0) scale(' + cropper.scale +') rotate(' + cropper.angle + 'deg)' + }) + } catch(e) { + + } +} + +// 图片重置 +function imageReset(ownerInstance) { + cropper.scale = 1 + cropper.angle = 0 + imgTransform(ownerInstance) +} + +// 高度变化 +function canvasHeight(ownerInstance) { + if (!ownerInstance) return + computeCutSize(ownerInstance) +} + +// 宽度变化 +function canvasWidth(ownerInstance) { + if (!ownerInstance) return + computeCutSize(ownerInstance) +} + +// 更新数据 +function updateData(ownerInstance) { + if (!ownerInstance) return + ownerInstance.callMethod('change', { + cutX: cropper.cutX, + cutY: cropper.cutY, + imgWidth: cropper.imgWidth, + imgHeight: cropper.imgHeight, + scale: cropper.scale, + angle: cropper.angle, + imgTop: cropper.imgTop, + imgLeft: cropper.imgLeft + }) +} + +module.exports = { + touchStart: touchStart, + touchMove: touchMove, + touchEnd: touchEnd, + propChange: propChange +} \ No newline at end of file diff --git a/tuniao-ui/components/tn-cropper/tn-cropper.vue b/tuniao-ui/components/tn-cropper/tn-cropper.vue new file mode 100644 index 0000000..6d22d6f --- /dev/null +++ b/tuniao-ui/components/tn-cropper/tn-cropper.vue @@ -0,0 +1,574 @@ + + + + + + diff --git a/tuniao-ui/components/tn-custom-swiper-item/index.wxs b/tuniao-ui/components/tn-custom-swiper-item/index.wxs new file mode 100644 index 0000000..a6c12b7 --- /dev/null +++ b/tuniao-ui/components/tn-custom-swiper-item/index.wxs @@ -0,0 +1,288 @@ + +function setTimeout(instance, cb, time) { + if (time > 0) { + var s = getDate().getTime() + var fn = function () { + if (getDate().getTime() - s > time) { + cb && cb() + } else + instance.requestAnimationFrame(fn) + } + fn() + } + else + cb && cb() +} + +// 判断触摸的移动方向 +function decideSwiperDirection(startTouches, currentTouches, vertical) { + // 震动偏移容差 + var toleranceShake = 150 + // 移动容差 + var toleranceTranslate = 10 + + if (!vertical) { + // 水平方向移动 + if (Math.abs(currentTouches.y - startTouches.y) <= toleranceShake) { + // console.log(currentTouches.x, startTouches.x); + if (Math.abs(currentTouches.x - startTouches.x) > toleranceTranslate) { + if (currentTouches.x - startTouches.x > 0) { + return 'right' + } else if (currentTouches.x - startTouches.x < 0) { + return 'left' + } + } + } + } else { + // 垂直方向移动 + if (Math.abs(currentTouches.x - startTouches.x) <= toleranceShake) { + // console.log(currentTouches.x, startTouches.x); + if (Math.abs(currentTouches.y - startTouches.y) > toleranceTranslate) { + if (currentTouches.y - startTouches.y > 0) { + return 'down' + } else if (currentTouches.y - startTouches.y < 0) { + return 'up' + } + } + } + } + return '' +} + +// swiperItem参数数据更新 +var itemDataObserver = function(newVal, oldVal, ownerInstance, instance) { + if (!newVal || newVal === 'undefined') return + var state = ownerInstance.getState() + state.itemData = newVal +} + +// swiperIndex数据更新 +var currentIndexObserver = function(newVal, oldVal, ownerInstance, instance) { + if ((!newVal && newVal != 0) || newVal === 'undefined') return + var state = ownerInstance.getState() + state.currentIndex = newVal +} + +// containerData数据更新 +var containerDataObserver = function(newVal, oldVal, ownerInstance, instance) { + if (!newVal || newVal === 'undefined') return + var state = ownerInstance.getState() + state.containerData = newVal +} + +// 开始触摸 +var touchStart = function(event, ownerInstance) { + console.log('touchStart'); + var instance = event.instance + var dataset = instance.getDataset() + var state = ownerInstance.getState() + var itemData = state.itemData + var containerData = state.containerData + + // 由于当前SwiperIndex初始为0,可能会导致swiperIndex数据没有更新 + if (!state.currentIndex || state.currentIndex === 'undefined') { + state.currentIndex = 0 + } + + if (!containerData || containerData.circular === 'undefined') { + containerData.circular = false + } + state.containerData = containerData + + // 如果当前切换动画还没执行结束,再次触摸会重新加载对应的swiperContainer的信息 + // console.log(containerData.animationFinish); + if (!containerData.animationFinish) { + ownerInstance.callMethod('changeParentSwiperContainerStyleStatus',{ + status: 'reload' + }) + } + + // 判断是否为为当前显示的SwiperItem + if (itemData.index != state.currentIndex) return + + var touches = event.changedTouches[0] + if (!touches) return + + // 标记滑动开始时间 + state.touchStartTime = getDate().getTime() + + // 记录当前滑动开始的x,y坐标 + state.touchRelactive = { + x: touches.pageX, + y: touches.pageY + } + // 记录触摸id,用于处理多指的情况 + state.touchId = touches.identifier + + // 标记开始触摸 + state.touching = true + ownerInstance.callMethod('updateTouchingStatus', { + status: true + }) +} + +// 正在移动 +var touchMove = function(event, ownerInstance) { + console.log('touchMove'); + var instance = event.instance + var dataset = instance.getDataset() + var state = ownerInstance.getState() + var itemData = state.itemData + var containerData = state.containerData + + // 判断是否为为当前显示的SwiperItem + if (itemData.index != state.currentIndex) return + + // 判断是否开始触摸 + if (!state.touching) return + + var touches = event.changedTouches[0] + if (!touches) return + // 判断是否为同一个触摸点 + if (state.touchId != touches.identifier) return + + var currentTouchRelactive = { + x: touches.pageX, + y: touches.pageY + } + + // 计算相对位移比例 + if (containerData.vertical) { + var touchDistance = currentTouchRelactive.y - state.touchRelactive.y + var itemHeight = itemData.itemHeight + var distanceRate = touchDistance / itemHeight + // console.log(currentTouchRelactive.y, touchDistance, itemHeight, distanceRate); + + // 判断是否为衔接轮播,如果不是衔接轮播,如果当前为第一个swiperItem并且向下滑、当前为最后一个swiperItem并且向上滑时不进行操作 + if (!containerData.circular && + ((state.currentIndex === 0 && touchDistance > 0) || (state.currentIndex === containerData.swiperItemLength - 1 && touchDistance < 0)) + ) { + return + } + + // 如果超出了距离则不进行操作 + if((Math.abs(touchDistance) > (itemData.itemTop + itemData.itemHeight))) { + ownerInstance.callMethod('updateParentSwiperContainerStyle', { + value: distanceRate < 0 ? -1 : 1 + }) + return + } + } else { + var touchDistance = currentTouchRelactive.x - state.touchRelactive.x + var itemWidth = itemData.itemWidth + var distanceRate = touchDistance / itemWidth + // console.log(currentTouchRelactive.x, touchDistance, itemWidth, distanceRate); + + // 判断是否为衔接轮播,如果不是衔接轮播,如果当前为第一个swiperItem并且向右滑、当前为最后一个swiperItem并且向左滑时不进行操作 + if (!containerData.circular && + ((state.currentIndex === 0 && touchDistance > 0) || (state.currentIndex === containerData.swiperItemLength - 1 && touchDistance < 0)) + ) { + return + } + + // 如果超出了距离则不进行操作 + if((Math.abs(touchDistance) > (itemData.itemLeft + itemData.itemWidth))) { + ownerInstance.callMethod('updateParentSwiperContainerStyle', { + value: distanceRate < 0 ? -1 : 1 + }) + return + } + } + + ownerInstance.callMethod('updateParentSwiperContainerStyle', { + value: distanceRate + }) +} + +// 移动结束 +var touchEnd = function(event, ownerInstance) { + console.log('touchEnd'); + var instance = event.instance + var dataset = instance.getDataset() + var state = ownerInstance.getState() + var itemData = state.itemData + var containerData = state.containerData + + // 判断是否为为当前显示的SwiperItem + if (itemData.index != state.currentIndex) return + + // 判断是否开始触摸 + if (!state.touching) return + + var touches = event.changedTouches[0] + if (!touches) return + // 判断是否为同一个触摸点 + if (state.touchId != touches.identifier) return + + + var currentTime = getDate().getTime() + var currentTouchRelactive = { + x: touches.pageX, + y: touches.pageY + } + + if (containerData.vertical) { + // 判断触摸移动方向 + var direction = decideSwiperDirection(state.touchRelactive, currentTouchRelactive, true) + // 判断是否为衔接轮播,如果不是衔接轮播,如果当前为第一个swiperItem并且向下滑、当前为最后一个swiperItem并且向上滑时不进行操作 + if (containerData.circular || + !((state.currentIndex === 0 && direction === 'down') || (state.currentIndex === containerData.swiperItemLength - 1 && direction === 'up')) + ) { + // 判断触摸的时间和移动的距离是否超过了当前itemHeight的一半,如果是则执行切换操作 + // console.log(currentTime - state.touchStartTime, Math.abs(currentTouchRelactive.y - state.touchRelactive.y)); + if ((currentTime - state.touchStartTime) > 200 && Math.abs(currentTouchRelactive.y - state.touchRelactive.y) < itemData.itemHeight / 2) { + ownerInstance.callMethod('changeParentSwiperContainerStyleStatus',{ + status: 'reset' + }) + } else { + // console.log(direction, state.touchRelactive.y, currentTouchRelactive.y); + + ownerInstance.callMethod('updateParentSwiperContainerStyleWithDirection', { + direction: direction + }) + } + } + } else { + // 判断触摸移动方向 + var direction = decideSwiperDirection(state.touchRelactive, currentTouchRelactive, false) + // 判断是否为衔接轮播,如果不是衔接轮播,如果当前为第一个swiperItem并且向右滑、当前为最后一个swiperItem并且向左滑时不进行操作 + if (containerData.circular || + !((state.currentIndex === 0 && direction === 'right') || (state.currentIndex === containerData.swiperItemLength - 1 && direction === 'left')) + ) { + // 判断触摸的时间和移动的距离是否超过了当前itemWidth的一半,如果是则执行切换操作 + // console.log(currentTime - state.touchStartTime, Math.abs(currentTouchRelactive.x - state.touchRelactive.x)); + if ((currentTime - state.touchStartTime) > 200 && Math.abs(currentTouchRelactive.x - state.touchRelactive.x) < itemData.itemWidth / 2) { + ownerInstance.callMethod('changeParentSwiperContainerStyleStatus',{ + status: 'reset' + }) + } else { + // console.log(direction, state.touchRelactive.x, currentTouchRelactive.x); + + ownerInstance.callMethod('updateParentSwiperContainerStyleWithDirection', { + direction: direction + }) + } + } + } + + // 清除标记 + state.touchId = null + state.touchRelactive = null + state.touchStartTime = 0 + + + // 标记停止触摸 + state.touching = true + ownerInstance.callMethod('updateTouchingStatus', { + status: false + }) +} + +module.exports = { + itemDataObserver: itemDataObserver, + currentIndexObserver: currentIndexObserver, + containerDataObserver: containerDataObserver, + touchStart: touchStart, + touchMove: touchMove, + touchEnd: touchEnd +} \ No newline at end of file diff --git a/tuniao-ui/components/tn-custom-swiper-item/tn-custom-swiper-item.vue b/tuniao-ui/components/tn-custom-swiper-item/tn-custom-swiper-item.vue new file mode 100644 index 0000000..5fd3c5b --- /dev/null +++ b/tuniao-ui/components/tn-custom-swiper-item/tn-custom-swiper-item.vue @@ -0,0 +1,277 @@ + + + + + + diff --git a/tuniao-ui/components/tn-custom-swiper/tn-custom-swiper.vue b/tuniao-ui/components/tn-custom-swiper/tn-custom-swiper.vue new file mode 100644 index 0000000..2094fe6 --- /dev/null +++ b/tuniao-ui/components/tn-custom-swiper/tn-custom-swiper.vue @@ -0,0 +1,535 @@ + + + + + diff --git a/tuniao-ui/components/tn-drag/index.wxs b/tuniao-ui/components/tn-drag/index.wxs new file mode 100644 index 0000000..6df1e84 --- /dev/null +++ b/tuniao-ui/components/tn-drag/index.wxs @@ -0,0 +1,265 @@ +// 判断是否出界 +var isOutRange = function(x1, y1, x2, y2, x3, y3) { + return x1 < 0 || x1 >= y1 || x2 < 0 || x2 >= y2 || x3 < 0 || x3 >= y3 +} +var edit = false + +function bool(str) { + return str === 'true' || str === true +} +/** + * 排序核心 + * @param {Object} startKey 开始时位置 + * @param {Object} endKey 结束时位置 + * @param {Object} instance wxs内的局部变量快照 + */ +var sortCore = function(startKey, endKey, state) { + var basedata = state.basedata + var excludeFix = function(sortKey, type) { + // fixed 元素位置不会变化, 这里直接用 sortKey 获取,更加便捷 + if (state.list[sortKey].fixed) { + var _sortKey = type ? --sortKey : ++sortKey + return excludeFix(sortKey, type) + } + return sortKey + } + + // 先获取到 endKey 对应的 realKey, 防止下面排序过程中该 realKey 被修改 + var endRealKey = -1 + state.list.forEach(function(item) { + if (item.sortKey === endKey) endRealKey = item.realKey + }) + + return state.list.map(function(item) { + if (item.fixed) return item + var sortKey = item.sortKey + var realKey = item.realKey + + if (startKey < endKey) { + // 正序拖动 + if (sortKey > startKey && sortKey <= endKey) { + --realKey + sortKey = excludeFix(--sortKey, true) + } else if (sortKey === startKey) { + realKey = endRealKey + sortKey = endKey + } + } else if (startKey > endKey) { + // 倒序拖动 + if (sortKey >= endKey && sortKey < startKey) { + ++realKey + sortKey = excludeFix(++sortKey, false) + } else if (sortKey === startKey) { + realKey = endRealKey + sortKey = endKey + } + } + + if (item.sortKey != sortKey) { + item.translateX = (sortKey % basedata.columns) * 100 + '%' + item.translateY = Math.floor(sortKey / basedata.columns) * 100 + '%' + item.sortKey = sortKey + item.realKey = realKey + } + return item + }) +} + +var triggerCustomEvent = function(list, type, instance) { + if (!instance) return + var _list = [], + listData = []; + + list.forEach(function(item) { + _list[item.sortKey] = item + }) + _list.forEach(function(item) { + listData.push(item.data) + }) + + // 编译到小程序 funcName作为参数传递导致事件不执行 + switch(type) { + case 'change': + instance.callMethod('change', {data: listData}) + break + case 'sortEnd': + instance.callMethod('sortEnd', {data: listData}) + break + } +} + +var listObserver = function(newVal, oldVal, ownerInstance, instance) { + var state = ownerInstance.getState() + state.itemsInstance = ownerInstance.selectAllComponents('.tn-drag__item') + + state.list = newVal || [] + + state.list.forEach(function(item, index) { + var itemInstance = state.itemsInstance[index] + if (item && itemInstance) { + itemInstance.setStyle({ + 'transform': 'translate3d('+ item.translateX + ',' + item.translateY +', 0)' + }) + if (item.fixed) itemInstance.addClass('tn-drag__fixed') + } + }) +} + +var baseDataObserver = function(newVal, oldVal, ownerInstance, instance) { + var state = ownerInstance.getState() + state.basedata = newVal +} + +var longPress = function(event, ownerInstance) { + var instance = event.instance + var dataset = instance.getDataset() + var state = ownerInstance.getState() + + edit = bool(dataset.edit) + if (!edit) return + if (!state.basedata || state.basedata === 'undefined') { + state.basedata = JSON.parse(dataset.basedata) + } + var basedata = state.basedata + var touches = event.changedTouches[0] + if (!touches) return + + state.current = +dataset.index + + // 初始项是固定项则返回 + var item = state.list[state.current] + if (item && item.fixed) return + + // 如果已经在 drag 中则返回, 防止多指触发 drag 动作, touchstart 事件中有效果 + if (state.dragging) return + + ownerInstance.callMethod("drag", { + dragging: true + }) + + // 计算X, Y轴初始位移,使item中心移动到点击处,单列的时候X轴初始不做位移 + state.translateX = basedata.columns === 1 ? 0 : touches.pageX - (basedata.itemWidth / 2 + basedata.left) + state.translateY = touches.pageY - (basedata.itemHeight / 2 + basedata.top) + state.touchId = touches.identifier + + instance.setStyle({ + 'transform': 'translate3d(' + state.translateX + 'px,' + state.translateY +'px, 0)' + }) + state.itemsInstance.forEach(function(item, index) { + item.removeClass("tn-drag__transition").removeClass("tn-drag__current") + item.addClass(index === state.current ? "tn-drag__current" : "tn-drag__transition") + }) + + ownerInstance.callMethod("vibrate") + state.dragging = true +} + +var touchStart = function(event, ownerInstance) { + var instance = event.instance + var dataset = instance.getDataset() + edit = bool(dataset.edit) +} + +var touchMove = function(event, ownerInstance) { + var instance = event.instance + var dataset = instance.getDataset() + var state = ownerInstance.getState() + var basedata = state.basedata + + if (!state.dragging || !edit) return + var touches = event.changedTouches[0] + if (!touches) return + + // 如果不是同一个触发点则返回 + if (state.touchId !== touches.identifier) return + + // 计算X,Y轴位移, 单列时候X轴初始不做位移 + var translateX = basedata.columns === 1 ? 0 : touches.pageX - (basedata.itemWidth / 2 + basedata.left) + var translateY = touches.pageY - (basedata.itemHeight / 2 + basedata.top) + + // 到顶到低自动滑动 + if (touches.clientY > basedata.windowHeight - basedata.itemHeight - basedata.realBottomSize) { + // 当前触摸点pageY + item高度 - (屏幕高度 - 底部固定区域高度) + ownerInstance.callMethod('pageScroll', { + scrollTop: touches.pageY + basedata.itemHeight - (basedata.windowHeight - basedata.realBottomSize) + }) + } else if (touches.clientY < basedata.itemHeight + basedata.realTopSize) { + // 当前触摸点pageY - item高度 - 顶部固定区域高 + ownerInstance.callMethod('pageScroll', { + scrollTop: touches.pageY - basedata.itemHeight - basedata.realTopSize + }) + } + + // 设置当前激活元素的偏移量 + instance.setStyle({ + 'transform': 'translate3d('+ translateX + 'px,' + translateY + 'px, 0)' + }) + + var startKey = state.list[state.current].sortKey + var currentX = Math.round(translateX / basedata.itemWidth) + var currentY = Math.round(translateY / basedata.itemHeight) + var endKey = currentX + basedata.columns * currentY + + // 目标项时固定项则返回 + var item = state.list[endKey] + if (item && item.fixed) return + + // X轴或者Y轴超出范围则返回 + if (isOutRange(currentX, basedata.columns, currentY, basedata.rows, endKey, state.list.length)) return + + // 防止拖拽过程中发生乱序问题 + if (startKey === endKey || startKey === state.preStartKey) return + state.preStartKey = startKey + + var list = sortCore(startKey, endKey, state) + state.itemsInstance.forEach(function(itemInstance, index) { + var item = list[index] + if (index !== state.current) { + itemInstance.setStyle({ + 'transform': 'translate3d('+ item.translateX + ',' + item.translateY +', 0)' + }) + } + }) + + // ownerInstance.callMethod('vibrate') + ownerInstance.callMethod('listDataChange', { + data: list + }) + triggerCustomEvent(list, "change", ownerInstance) +} + +var touchEnd = function(event, ownerInstance) { + var instance = event.instance + var dataset = instance.getDataset() + var state = ownerInstance.getState() + var basedata = state.basedata + + if (!state.dragging || !edit) return + triggerCustomEvent(state.list, "sortEnd", ownerInstance) + + instance.addClass('tn-drag__transition') + instance.setStyle({ + 'transform': 'translate3d('+ state.list[state.current].translateX + ',' + state.list[state.current].translateY + ', 0)' + }) + state.itemsInstance.forEach(function(item, index) { + item.removeClass('tn-drag__transition') + }) + + state.preStartKey = -1 + state.dragging = false + ownerInstance.callMethod('drag', { + dragging: false + }) + state.current = -1 + state.translateX = 0 + state.translateY = 0 +} + +module.exports = { + longPress: longPress, + touchStart: touchStart, + touchMove: touchMove, + touchEnd: touchEnd, + baseDataObserver: baseDataObserver, + listObserver: listObserver +} \ No newline at end of file diff --git a/tuniao-ui/components/tn-drag/tn-drag.vue b/tuniao-ui/components/tn-drag/tn-drag.vue new file mode 100644 index 0000000..17d269d --- /dev/null +++ b/tuniao-ui/components/tn-drag/tn-drag.vue @@ -0,0 +1,278 @@ + + + + + diff --git a/tuniao-ui/components/tn-empty/tn-empty.vue b/tuniao-ui/components/tn-empty/tn-empty.vue new file mode 100644 index 0000000..3a85b15 --- /dev/null +++ b/tuniao-ui/components/tn-empty/tn-empty.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/tuniao-ui/components/tn-fab/tn-fab.vue b/tuniao-ui/components/tn-fab/tn-fab.vue new file mode 100644 index 0000000..9ce0cde --- /dev/null +++ b/tuniao-ui/components/tn-fab/tn-fab.vue @@ -0,0 +1,523 @@ + + + + + diff --git a/tuniao-ui/components/tn-form-item/tn-form-item.vue b/tuniao-ui/components/tn-form-item/tn-form-item.vue new file mode 100644 index 0000000..f60dbec --- /dev/null +++ b/tuniao-ui/components/tn-form-item/tn-form-item.vue @@ -0,0 +1,457 @@ + + + + + diff --git a/tuniao-ui/components/tn-form/tn-form.vue b/tuniao-ui/components/tn-form/tn-form.vue new file mode 100644 index 0000000..6a2524f --- /dev/null +++ b/tuniao-ui/components/tn-form/tn-form.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/tuniao-ui/components/tn-goods-nav/tn-goods-nav.vue b/tuniao-ui/components/tn-goods-nav/tn-goods-nav.vue new file mode 100644 index 0000000..b3d3a60 --- /dev/null +++ b/tuniao-ui/components/tn-goods-nav/tn-goods-nav.vue @@ -0,0 +1,382 @@ + + + + + diff --git a/tuniao-ui/components/tn-grid-item/tn-grid-item.vue b/tuniao-ui/components/tn-grid-item/tn-grid-item.vue new file mode 100644 index 0000000..2837bc2 --- /dev/null +++ b/tuniao-ui/components/tn-grid-item/tn-grid-item.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/tuniao-ui/components/tn-grid/tn-grid.vue b/tuniao-ui/components/tn-grid/tn-grid.vue new file mode 100644 index 0000000..f5487c6 --- /dev/null +++ b/tuniao-ui/components/tn-grid/tn-grid.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/tuniao-ui/components/tn-image-upload-drag/tn-image-upload-drag.vue b/tuniao-ui/components/tn-image-upload-drag/tn-image-upload-drag.vue new file mode 100644 index 0000000..3a96b98 --- /dev/null +++ b/tuniao-ui/components/tn-image-upload-drag/tn-image-upload-drag.vue @@ -0,0 +1,995 @@ + + + + + diff --git a/tuniao-ui/components/tn-image-upload/tn-image-upload.vue b/tuniao-ui/components/tn-image-upload/tn-image-upload.vue new file mode 100644 index 0000000..e7e9418 --- /dev/null +++ b/tuniao-ui/components/tn-image-upload/tn-image-upload.vue @@ -0,0 +1,695 @@ + + + + + diff --git a/tuniao-ui/components/tn-index-anchor/tn-index-anchor.vue b/tuniao-ui/components/tn-index-anchor/tn-index-anchor.vue new file mode 100644 index 0000000..435597d --- /dev/null +++ b/tuniao-ui/components/tn-index-anchor/tn-index-anchor.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/tuniao-ui/components/tn-index-list/tn-index-list.vue b/tuniao-ui/components/tn-index-list/tn-index-list.vue new file mode 100644 index 0000000..5187896 --- /dev/null +++ b/tuniao-ui/components/tn-index-list/tn-index-list.vue @@ -0,0 +1,361 @@ + + + + + diff --git a/tuniao-ui/components/tn-input/tn-input.vue b/tuniao-ui/components/tn-input/tn-input.vue new file mode 100644 index 0000000..e16a1ad --- /dev/null +++ b/tuniao-ui/components/tn-input/tn-input.vue @@ -0,0 +1,447 @@ +