diff --git a/examples/hello-uniapp/App.vue b/examples/hello-uniapp/App.vue new file mode 100644 index 0000000000000000000000000000000000000000..359c9cab0b3ca7967efb12170f1cb22666b20eeb --- /dev/null +++ b/examples/hello-uniapp/App.vue @@ -0,0 +1,240 @@ + + + diff --git a/examples/hello-uniapp/common/icon.css b/examples/hello-uniapp/common/icon.css new file mode 100644 index 0000000000000000000000000000000000000000..6efcd8cfdd5d8e47e23980a1c356d8b092ffae13 --- /dev/null +++ b/examples/hello-uniapp/common/icon.css @@ -0,0 +1,377 @@ +@font-face { + font-family: uniicons; + font-weight: normal; + font-style: normal; + + src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype'); +} + +.uni-icon { + font-family: uniicons; + font-size: 48rpx; + font-weight: normal; + font-style: normal; + line-height: 1; + + display: inline-block; + + text-decoration: none; + + -webkit-font-smoothing: antialiased; +} + +.uni-icon.uni-active { + color: #007aff; +} + +.uni-icon-contact:before { + content: '\e100'; +} + +.uni-icon-person:before { + content: '\e101'; +} + +.uni-icon-personadd:before { + content: '\e102'; +} + +.uni-icon-contact-filled:before { + content: '\e130'; +} + +.uni-icon-person-filled:before { + content: '\e131'; +} + +.uni-icon-personadd-filled:before { + content: '\e132'; +} + +.uni-icon-phone:before { + content: '\e200'; +} + +.uni-icon-email:before { + content: '\e201'; +} + +.uni-icon-chatbubble:before { + content: '\e202'; +} + +.uni-icon-chatboxes:before { + content: '\e203'; +} + +.uni-icon-phone-filled:before { + content: '\e230'; +} + +.uni-icon-email-filled:before { + content: '\e231'; +} + +.uni-icon-chatbubble-filled:before { + content: '\e232'; +} + +.uni-icon-chatboxes-filled:before { + content: '\e233'; +} + +.uni-icon-weibo:before { + content: '\e260'; +} + +.uni-icon-weixin:before { + content: '\e261'; +} + +.uni-icon-pengyouquan:before { + content: '\e262'; +} + +.uni-icon-chat:before { + content: '\e263'; +} + +.uni-icon-qq:before { + content: '\e264'; +} + +.uni-icon-videocam:before { + content: '\e300'; +} + +.uni-icon-camera:before { + content: '\e301'; +} + +.uni-icon-mic:before { + content: '\e302'; +} + +.uni-icon-location:before { + content: '\e303'; +} + +.uni-icon-mic-filled:before, +.uni-icon-speech:before { + content: '\e332'; +} + +.uni-icon-location-filled:before { + content: '\e333'; +} + +.uni-icon-micoff:before { + content: '\e360'; +} + +.uni-icon-image:before { + content: '\e363'; +} + +.uni-icon-map:before { + content: '\e364'; +} + +.uni-icon-compose:before { + content: '\e400'; +} + +.uni-icon-trash:before { + content: '\e401'; +} + +.uni-icon-upload:before { + content: '\e402'; +} + +.uni-icon-download:before { + content: '\e403'; +} + +.uni-icon-close:before { + content: '\e404'; +} + +.uni-icon-redo:before { + content: '\e405'; +} + +.uni-icon-undo:before { + content: '\e406'; +} + +.uni-icon-refresh:before { + content: '\e407'; +} + +.uni-icon-star:before { + content: '\e408'; +} + +.uni-icon-plus:before { + content: '\e409'; +} + +.uni-icon-minus:before { + content: '\e410'; +} + +.uni-icon-circle:before, +.uni-icon-checkbox:before { + content: '\e411'; +} + +.uni-icon-close-filled:before, +.uni-icon-clear:before { + content: '\e434'; +} + +.uni-icon-refresh-filled:before { + content: '\e437'; +} + +.uni-icon-star-filled:before { + content: '\e438'; +} + +.uni-icon-plus-filled:before { + content: '\e439'; +} + +.uni-icon-minus-filled:before { + content: '\e440'; +} + +.uni-icon-circle-filled:before { + content: '\e441'; +} + +.uni-icon-checkbox-filled:before { + content: '\e442'; +} + +.uni-icon-closeempty:before { + content: '\e460'; +} + +.uni-icon-refreshempty:before { + content: '\e461'; +} + +.uni-icon-reload:before { + content: '\e462'; +} + +.uni-icon-starhalf:before { + content: '\e463'; +} + +.uni-icon-spinner:before { + content: '\e464'; +} + +.uni-icon-spinner-cycle:before { + content: '\e465'; +} + +.uni-icon-search:before { + content: '\e466'; +} + +.uni-icon-plusempty:before { + content: '\e468'; +} + +.uni-icon-forward:before { + content: '\e470'; +} + +.uni-icon-back:before, +.uni-icon-left-nav:before { + content: '\e471'; +} + +.uni-icon-checkmarkempty:before { + content: '\e472'; +} + +.uni-icon-home:before { + content: '\e500'; +} + +.uni-icon-navigate:before { + content: '\e501'; +} + +.uni-icon-gear:before { + content: '\e502'; +} + +.uni-icon-paperplane:before { + content: '\e503'; +} + +.uni-icon-info:before { + content: '\e504'; +} + +.uni-icon-help:before { + content: '\e505'; +} + +.uni-icon-locked:before { + content: '\e506'; +} + +.uni-icon-more:before { + content: '\e507'; +} + +.uni-icon-flag:before { + content: '\e508'; +} + +.uni-icon-home-filled:before { + content: '\e530'; +} + +.uni-icon-gear-filled:before { + content: '\e532'; +} + +.uni-icon-info-filled:before { + content: '\e534'; +} + +.uni-icon-help-filled:before { + content: '\e535'; +} + +.uni-icon-more-filled:before { + content: '\e537'; +} + +.uni-icon-settings:before { + content: '\e560'; +} + +.uni-icon-list:before { + content: '\e562'; +} + +.uni-icon-bars:before { + content: '\e563'; +} + +.uni-icon-loop:before { + content: '\e565'; +} + +.uni-icon-paperclip:before { + content: '\e567'; +} + +.uni-icon-eye:before { + content: '\e568'; +} + +.uni-icon-arrowup:before { + content: '\e580'; +} + +.uni-icon-arrowdown:before { + content: '\e581'; +} + +.uni-icon-arrowleft:before { + content: '\e582'; +} + +.uni-icon-arrowright:before { + content: '\e583'; +} + +.uni-icon-arrowthinup:before { + content: '\e584'; +} + +.uni-icon-arrowthindown:before { + content: '\e585'; +} + +.uni-icon-arrowthinleft:before { + content: '\e586'; +} + +.uni-icon-arrowthinright:before { + content: '\e587'; +} + +.uni-icon-pulldown:before { + content: '\e588'; +} diff --git a/examples/hello-uniapp/common/uni.css b/examples/hello-uniapp/common/uni.css new file mode 100644 index 0000000000000000000000000000000000000000..29ee49e03a886619e258a206ad6fe652a44af022 --- /dev/null +++ b/examples/hello-uniapp/common/uni.css @@ -0,0 +1,668 @@ +@font-face { + font-family: uniicons; + font-weight: normal; + font-style: normal; + + src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype'); +} + + + + + + + +/*通用*/ + +.uni-flex { + display: flex; + flex-direction: row; +} + +.uni-h6 { + font-size: 24rpx; + color: #8f8f94; +} + +.uni-h5 { + font-size: 28rpx; + color: #8f8f94; +} + +.uni-h4 { + font-size: 36rpx; +} + +.uni-h3 { + font-size: 48rpx; + font-weight: 600; +} + +.uni-h2 { + font-size: 60rpx; + font-weight: 600; +} + +.uni-h1 { + font-size: 72rpx; + font-weight: 600; +} + +.uni-ellipsis { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.uni-input { + height: 2.58823529em; + min-height: 2.58823529em; + line-height: 2.58823529em; +} + +.uni-label { + width: 105px; + word-wrap: break-word; + word-break: break-all; +} + + + + +/*数字角标*/ + +.uni-badge { + padding: 4rpx 14rpx; + font-size: 24rpx; + height: 24rpx; + line-height: 1; + color: #333; + background-color: rgba(0, 0, 0, .15); + border-radius: 200rpx; +} + +.uni-badge.uni-badge-inverted { + padding: 0 5px 0 0; + color: #929292; + background-color: transparent +} + +.uni-badge-primary { + color: #fff; + background-color: #007aff +} + +.uni-badge-blue.uni-badge-inverted, +.uni-badge-primary.uni-badge-inverted { + color: #007aff; + background-color: transparent +} + +.uni-badge-green, +.uni-badge-success { + color: #fff; + background-color: #4cd964; +} + +.uni-badge-green.uni-badge-inverted, +.uni-badge-success.uni-badge-inverted { + color: #4cd964; + background-color: transparent +} + +.uni-badge-warning, +.uni-badge-yellow { + color: #fff; + background-color: #f0ad4e +} + +.uni-badge-warning.uni-badge-inverted, +.uni-badge-yellow.uni-badge-inverted { + color: #f0ad4e; + background-color: transparent +} + +.uni-badge-danger, +.uni-badge-red { + color: #fff; + background-color: #dd524d +} + +.uni-badge-danger.uni-badge-inverted, +.uni-badge-red.uni-badge-inverted { + color: #dd524d; + background-color: transparent +} + +.uni-badge-purple, +.uni-badge-royal { + color: #fff; + background-color: #8a6de9 +} + +.uni-badge-purple.uni-badge-inverted, +.uni-badge-royal.uni-badge-inverted { + color: #8a6de9; + background-color: transparent +} + + + + + + + + +/*折叠面板*/ + +.uni-collapse-content { + height: 0; + width: 100%; + overflow: hidden; +} + +.uni-collapse-content.uni-active { + height: auto; +} + + + + + + + + + +/*卡片视图*/ + +.uni-card { + background: #fff; + border-radius: 8rpx; + margin: 20rpx; + position: relative; + box-shadow: 0 1px 2px rgba(0, 0, 0, .3); +} + +.uni-card-content { + font-size: 30rpx; +} + +.uni-card-content-inner { + position: relative; + padding: 30rpx; +} + +.uni-card-footer, +.uni-card-header { + position: relative; + display: flex; + min-height: 50rpx; + padding: 20rpx 30rpx; + justify-content: space-between; + align-items: center; +} + +.uni-card-header { + font-size: 36rpx; +} + +.uni-card-footer { + color: #6d6d72; +} + +.uni-card-footer:before, +.uni-card-header:after { + position: absolute; + top: 0; + right: 0; + left: 0; + height: 2rpx; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} + +.uni-card-header:after { + top: auto; + bottom: 0; +} + +.uni-card-media { + justify-content: flex-start; +} + +.uni-card-media-logo { + height: 84rpx; + width: 84rpx; + margin-right: 20rpx; +} + +.uni-card-media-body { + height: 84rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: flex-start; +} + +.uni-card-media-text-top { + line-height: 36rpx; + font-size: 34rpx; +} + +.uni-card-media-text-bottom { + line-height: 30rpx; + font-size: 28rpx; + color: #8f8f94; +} + +.uni-card-link { + color: #007AFF; +} + + + + + + + + +/*列表*/ + +.uni-list { + background-color: #FFFFFF; + position: relative; + width: 100%; + display: flex; + flex-direction: column; +} + +.uni-list:after { + position: absolute; + z-index: 10; + right: 0; + bottom: 0; + left: 0; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} + +.uni-list:before { + position: absolute; + z-index: 10; + right: 0; + top: 0; + left: 0; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} + +.uni-list-cell { + position: relative; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; +} + +.uni-list-cell-hover { + background-color: #eee; +} + +.uni-list-cell-pd { + padding: 22rpx 30rpx; +} + +.uni-list-cell-left { + padding: 0 30rpx; +} + +.uni-list-cell-db, +.uni-list-cell-right { + flex: 1; +} + +.uni-list-cell:after { + position: absolute; + right: 0; + bottom: 0; + left: 30rpx; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} + +.uni-list .uni-list-cell:last-child:after { + height: 0px; +} + +.uni-list-cell-last.uni-list-cell:after { + height: 0px; +} + +.uni-list-cell-divider { + background: #fafafa; + position: relative; + display: flex; + color: #999; + background-color: #fafafa; + padding: 15rpx 20rpx; +} + +.uni-list-cell-divider:after { + position: absolute; + right: 0; + bottom: 0; + left: 0rpx; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} + +.uni-list-cell-navigate { + padding: 22rpx 30rpx; + position: relative; + display: flex; + box-sizing: border-box; + width: 100%; + flex: 1; + justify-content: space-between; + align-items: center; +} + +.uni-list-cell-navigate { + padding-right: 36rpx; +} + +.uni-navigate-badge { + margin-right: 20rpx; +} + +.uni-list-cell-navigate.uni-navigate-right:after { + font-family: uniicons; + content: '\e583'; + position: absolute; + right: 24rpx; + top: 50%; + color: #bbb; + transform: translateY(-50%); +} + +.uni-list-cell-navigate.uni-navigate-bottom:after { + font-family: uniicons; + content: '\e581'; + position: absolute; + right: 24rpx; + top: 50%; + color: #bbb; + transform: translateY(-50%); +} + +.uni-list-cell-navigate.uni-navigate-bottom.uni-active:after { + font-family: uniicons; + content: '\e580'; + position: absolute; + right: 24rpx; + top: 50%; + color: #bbb; + transform: translateY(-50%); +} + +.uni-collapse.uni-list-cell { + flex-direction: column; +} + +.uni-list-cell-navigate.uni-active { + background: #eee; +} + +.uni-list.uni-collapse { + box-sizing: border-box; + height: 0; + overflow: hidden; +} + +.uni-collapse .uni-list-cell { + padding-left: 36rpx; +} + +.uni-collapse .uni-list-cell:after { + left: 52rpx; +} + +.uni-list.uni-active { + height: auto; +} + + + +/*三行列表*/ + +.uni-triplex-row { + display: flex; + flex: 1; + width: 100%; + box-sizing: border-box; + flex-direction: row; + padding: 22rpx 30rpx; +} + +.uni-triplex-right, +.uni-triplex-left { + display: flex; + flex-direction: column; +} + +.uni-triplex-left { + width: 84%; +} + +.uni-triplex-right { + width: 16%; + text-align: right; +} + + + + + +/*图文列表*/ + +.uni-media-list { + padding: 22rpx 30rpx; + box-sizing: border-box; + display: flex; + width: 100%; + flex-direction: row; +} + +.uni-navigate-right.uni-media-list { + padding-right: 74rpx; +} + +.uni-pull-right { + flex-direction: row-reverse; +} + +.uni-pull-right>.uni-media-list-logo { + margin-right: 0rpx; + margin-left: 20rpx; +} + +.uni-media-list-logo { + height: 84rpx; + width: 84rpx; + margin-right: 20rpx; +} + +.uni-media-list-body { + height: 84rpx; + display: flex; + flex: 1; + flex-direction: column; + justify-content: space-between; + align-items: flex-start; + overflow: hidden; +} + +.uni-media-list-text-top { + width: 100%; + line-height: 36rpx; + font-size: 34rpx; +} + +.uni-media-list-text-bottom { + width: 100%; + line-height: 30rpx; + font-size: 28rpx; + color: #8f8f94; +} + + + + + + +/*九宫格*/ + +.uni-grid-9 { + background: #f2f2f2; + width: 750rpx; + display: flex; + flex-direction: row; + flex-wrap: wrap; + border-top: 1px solid #eee; +} + +.uni-grid-9-item { + width: 250rpx; + height: 200rpx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + border-bottom: 2rpx solid; + border-right: 2rpx solid; + border-color: #eee; + box-sizing: border-box; +} + +.no-border-right { + border-right: none; +} + +.uni-grid-9-image { + width: 100rpx; + height: 100rpx; +} + +.uni-grid-9-text { + width: 250rpx; + line-height: 50rpx; + height: 50rpx; + text-align: center; + font-size: 30rpx; +} + +.uni-grid-9-item-hover { + background: rgba(0, 0, 0, 0.1); +} + + + + + +/*上传*/ + +.uni-uploader { + flex: 1; + flex-direction: column; +} + +.uni-uploader-head { + display: flex; + flex-direction: row; + justify-content: space-between; +} + +.uni-uploader-info { + color: #B2B2B2; +} + +.uni-uploader-body { + margin-top: 16rpx; + overflow: hidden; +} + +.uni-uploader__file { + float: left; + margin-right: 9px; + margin-bottom: 9px; +} + +.uni-uploader__img { + display: block; + width: 79px; + height: 79px; +} + +.uni-uploader__input-box { + float: left; + position: relative; + margin-right: 9px; + margin-bottom: 9px; + width: 77px; + height: 77px; + border: 1px solid #D9D9D9; +} + +.uni-uploader__input-box:before, +.uni-uploader__input-box:after { + content: " "; + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + background-color: #D9D9D9; +} + +.uni-uploader__input-box:before { + width: 2px; + height: 39.5px; +} + +.uni-uploader__input-box:after { + width: 39.5px; + height: 2px; +} + +.uni-uploader__input-box:active { + border-color: #999999; +} + +.uni-uploader__input-box:active:before, +.uni-uploader__input-box:active:after { + background-color: #999999; +} + +.uni-uploader__input { + position: absolute; + z-index: 1; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; +} diff --git a/examples/hello-uniapp/common/util.js b/examples/hello-uniapp/common/util.js new file mode 100644 index 0000000000000000000000000000000000000000..7a7250560993f73f9812936def59bd95e8596130 --- /dev/null +++ b/examples/hello-uniapp/common/util.js @@ -0,0 +1,72 @@ +function formatTime(time) { + if (typeof time !== 'number' || time < 0) { + return time + } + + var hour = parseInt(time / 3600) + time = time % 3600 + var minute = parseInt(time / 60) + time = time % 60 + var second = time + + return ([hour, minute, second]).map(function (n) { + n = n.toString() + return n[1] ? n : '0' + n + }).join(':') +} + +function formatLocation(longitude, latitude) { + if (typeof longitude === 'string' && typeof latitude === 'string') { + longitude = parseFloat(longitude) + latitude = parseFloat(latitude) + } + + longitude = longitude.toFixed(2) + latitude = latitude.toFixed(2) + + return { + longitude: longitude.toString().split('.'), + latitude: latitude.toString().split('.') + } +} +var dateUtils = { + UNITS: { + '年': 31557600000, + '月': 2629800000, + '天': 86400000, + '小时': 3600000, + '分钟': 60000, + '秒': 1000 + }, + humanize: function (milliseconds) { + var humanize = ''; + for (var key in this.UNITS) { + if (milliseconds >= this.UNITS[key]) { + humanize = Math.floor(milliseconds / this.UNITS[key]) + key + '前'; + break; + } + } + return humanize || '刚刚'; + }, + format: function (dateStr) { + var date = this.parse(dateStr) + var diff = Date.now() - date.getTime(); + if (diff < this.UNITS['天']) { + return this.humanize(diff); + } + var _format = function (number) { + return (number < 10 ? ('0' + number) : number); + }; + return date.getFullYear() + '/' + _format(date.getMonth() + 1) + '/' + _format(date.getDay()) + '-' + + _format(date.getHours()) + ':' + _format(date.getMinutes()); + }, + parse: function (str) { //将"yyyy-mm-dd HH:MM:ss"格式的字符串,转化为一个Date对象 + var a = str.split(/[^0-9]/); + return new Date(a[0], a[1] - 1, a[2], a[3], a[4], a[5]); + } +}; +module.exports = { + formatTime: formatTime, + formatLocation: formatLocation, + dateUtils:dateUtils +} diff --git a/examples/hello-uniapp/components/number-box.vue b/examples/hello-uniapp/components/number-box.vue new file mode 100644 index 0000000000000000000000000000000000000000..259cbc6c411369379a4b7f64bc4c6fa5765839bc --- /dev/null +++ b/examples/hello-uniapp/components/number-box.vue @@ -0,0 +1,117 @@ + + + diff --git a/examples/hello-uniapp/components/page-head.vue b/examples/hello-uniapp/components/page-head.vue new file mode 100644 index 0000000000000000000000000000000000000000..1049eeea040e9f06486e2d4d6958c5563f732142 --- /dev/null +++ b/examples/hello-uniapp/components/page-head.vue @@ -0,0 +1,19 @@ + + + diff --git a/examples/hello-uniapp/main.js b/examples/hello-uniapp/main.js new file mode 100644 index 0000000000000000000000000000000000000000..51bfbef377dcaa3b382c08df7860a6bf486ba190 --- /dev/null +++ b/examples/hello-uniapp/main.js @@ -0,0 +1,16 @@ +import Vue from 'vue' +import App from './App' + +import store from './store' + +Vue.config.productionTip = false + +Vue.prototype.$store = store + +App.mpType = 'app' + +const app = new Vue({ + store, + ...App +}) +app.$mount() diff --git a/examples/hello-uniapp/manifest.json b/examples/hello-uniapp/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..864d1b1c7ed02d47b9e4d51be84674f9cb896634 --- /dev/null +++ b/examples/hello-uniapp/manifest.json @@ -0,0 +1,19 @@ +{ + "name": "demo", + "appid": "__uni123213213", + "description": "应用描述", + "icons": [{ + "sizes": "分辨率,192x192", + "src": "图片路径" + }], + "versionName": "版本名称", + "versionCode": "版本号", + "app-plus": { // 5+App特有相关 + }, + "quickapp": { // 快应用特有相关 + + }, + "mp-weixin": { // 小程序特有相关 + + } +} diff --git a/examples/hello-uniapp/pages.json b/examples/hello-uniapp/pages.json new file mode 100644 index 0000000000000000000000000000000000000000..daff68c462c1a776b39a567a27bda25e1fdd4343 --- /dev/null +++ b/examples/hello-uniapp/pages.json @@ -0,0 +1,454 @@ +{ + "pages": [ + { + "path": "pages/component/index", + "style": { + "navigationBarTitleText": "组件" + } + }, { + "path": "pages/API/index", + "style": { + "navigationBarTitleText": "接口" + } + },{ + "path": "pages/template/index", + "style": { + "navigationBarTitleText": "模版" + } + }, { + "path": "pages/component/view/index", + "style": { + "navigationBarTitleText": "view" + } + }, { + "path": "pages/component/scroll-view/index", + "style": { + "navigationBarTitleText": "scroll-view" + } + }, { + "path": "pages/component/swiper/index", + "style": { + "navigationBarTitleText": "swiper" + } + }, { + "path": "pages/template/number-box/index", + "style": { + "navigationBarTitleText": "数字输入框" + } + }, { + "path": "pages/component/text/index", + "style": { + "navigationBarTitleText": "text" + } + }, +// { +// "path": "pages/component/icon/index", +// "style": { +// "navigationBarTitleText": "icon" +// } +// }, + { + "path": "pages/component/progress/index", + "style": { + "navigationBarTitleText": "progress" + } + }, { + "path": "pages/component/button/index", + "style": { + "navigationBarTitleText": "button" + } + }, { + "path": "pages/component/checkbox/index", + "style": { + "navigationBarTitleText": "checkbox" + } + }, { + "path": "pages/component/form/index", + "style": { + "navigationBarTitleText": "form" + } + }, { + "path": "pages/component/input/index", + "style": { + "navigationBarTitleText": "input" + } + }, { + "path": "pages/component/label/index", + "style": { + "navigationBarTitleText": "label" + } + }, { + "path": "pages/component/picker/index", + "style": { + "navigationBarTitleText": "picker" + } + }, { + "path": "pages/component/radio/index", + "style": { + "navigationBarTitleText": "radio" + } + }, { + "path": "pages/component/slider/index", + "style": { + "navigationBarTitleText": "slider" + } + }, { + "path": "pages/component/switch/index", + "style": { + "navigationBarTitleText": "switch" + } + }, { + "path": "pages/component/textarea/index", + "style": { + "navigationBarTitleText": "textarea" + } + }, { + "path": "pages/component/navigator/index", + "style": { + "navigationBarTitleText": "navigator" + } + }, { + "path": "pages/component/navigator/navigate", + "style": { + "navigationBarTitleText": "navigatePage" + } + }, { + "path": "pages/component/navigator/redirect", + "style": { + "navigationBarTitleText": "redirectPage" + } + }, { + "path": "pages/component/image/index", + "style": { + "navigationBarTitleText": "image" + } + }, { + "path": "pages/component/audio/index", + "style": { + "navigationBarTitleText": "audio" + } + }, { + "path": "pages/component/video/index", + "style": { + "navigationBarTitleText": "video" + } + }, { + "path": "pages/component/map/index", + "style": { + "navigationBarTitleText": "map" + } + }, { + "path": "pages/component/canvas/index", + "style": { + "navigationBarTitleText": "canvas" + } + }, { + "path": "pages/API/login/index", + "style": { + "navigationBarTitleText": "微信登录" + } + }, { + "path": "pages/API/get-user-info/index", + "style": { + "navigationBarTitleText": "获取用户信息" + } + }, { + "path": "pages/API/request-payment/index", + "style": { + "navigationBarTitleText": "发起支付" + } + }, { + "path": "platforms/app-plus/share/index", + "style": { + "navigationBarTitleText": "分享" + } + }, { + "path": "platforms/mp-weixin/custom-message/index", + "style": { + "navigationBarTitleText": "客服消息" + } + }, { + "path": "platforms/mp-weixin/template-message/index", + "style": { + "navigationBarTitleText": "模板消息" + } + }, { + "path": "pages/API/set-navigation-bar-title/index", + "style": { + "navigationBarTitleText": "设置界面标题" + } + }, { + "path": "pages/API/navigation-bar-loading/index", + "style": { + "navigationBarTitleText": "标题栏加载动画" + } + }, { + "path": "pages/API/navigator/index", + "style": { + "navigationBarTitleText": "页面跳转" + } + }, { + "path": "pages/API/pull-down-refresh/index", + "style": { + "navigationBarTitleText": "下拉刷新", + "enablePullDownRefresh": true + } + }, { + "path": "pages/API/animation/index", + "style": { + "navigationBarTitleText": "创建动画" + } + }, { + "path": "pages/API/canvas/index", + "style": { + "navigationBarTitleText": "创建绘画" + } + }, { + "path": "pages/API/action-sheet/index", + "style": { + "navigationBarTitleText": "操作菜单" + } + }, { + "path": "pages/API/modal/index", + "style": { + "navigationBarTitleText": "模态弹窗" + } + }, { + "path": "pages/API/toast/index", + "style": { + "navigationBarTitleText": "消息提示框" + } + }, { + "path": "pages/API/get-network-type/index", + "style": { + "navigationBarTitleText": "获取手机网络状态" + } + }, { + "path": "pages/API/get-system-info/index", + "style": { + "navigationBarTitleText": "获取手机系统信息" + } + }, { + "path": "pages/API/on-accelerometer-change/index", + "style": { + "navigationBarTitleText": "监听加速度计数据" + } + },{ + "path": "pages/API/on-accelerometer-change/shake", + "style": { + "navigationBarTitleText": "摇一摇" + } + }, { + "path": "pages/API/on-compass-change/index", + "style": { + "navigationBarTitleText": "监听罗盘数据" + } + }, { + "path": "pages/API/make-phone-call/index", + "style": { + "navigationBarTitleText": "打电话" + } + }, { + "path": "pages/API/scan-code/index", + "style": { + "navigationBarTitleText": "扫码" + } + }, { + "path": "pages/API/request/index", + "style": { + "navigationBarTitleText": "网络请求" + } + }, { + "path": "pages/API/upload-file/index", + "style": { + "navigationBarTitleText": "上传文件" + } + }, { + "path": "pages/API/download-file/index", + "style": { + "navigationBarTitleText": "下载文件" + } + }, { + "path": "pages/API/image/index", + "style": { + "navigationBarTitleText": "图片" + } + }, { + "path": "pages/API/voice/index", + "style": { + "navigationBarTitleText": "录音" + } + }, { + "path": "pages/API/background-audio/index", + "style": { + "navigationBarTitleText": "背景音频" + } + }, { + "path": "pages/API/file/index", + "style": { + "navigationBarTitleText": "文件" + } + }, { + "path": "pages/API/video/index", + "style": { + "navigationBarTitleText": "视频" + } + }, { + "path": "pages/API/get-location/index", + "style": { + "navigationBarTitleText": "获取位置" + } + }, { + "path": "pages/API/open-location/index", + "style": { + "navigationBarTitleText": "查看位置" + } + }, { + "path": "pages/API/choose-location/index", + "style": { + "navigationBarTitleText": "使用原生地图选择位置" + } + }, { + "path": "pages/API/storage/index", + "style": { + "navigationBarTitleText": "数据存储" + } + }, { + "path": "platforms/app-plus/speech/index", + "style": { + "navigationBarTitleText": "语音识别" + } + }, { + "path": "platforms/app-plus/orientation/index", + "style": { + "navigationBarTitleText": "方向传感器" + } + }, { + "path": "platforms/app-plus/proximity/index", + "style": { + "navigationBarTitleText": "距离传感器" + } + }, { + "path": "platforms/app-plus/push/index", + "style": { + "navigationBarTitleText": "推送" + } + }, { + "path": "pages/component/icon/index", + "style": { + "navigationBarTitleText": "icon" + } + }, { + "path": "pages/template/popup/index", + "style": { + "navigationBarTitleText": "popup" + } + }, { + "path": "pages/template/tabbar/index", + "style": { + "navigationBarTitleText": "tabbar" + } + }, { + "path": "pages/template/media-list/index", + "style": { + "navigationBarTitleText": "图文列表" + } + }, { + "path": "pages/template/grid/index", + "style": { + "navigationBarTitleText": "九宫格" + } + }, { + "path": "pages/template/drag-right/index", + "style": { + "navigationBarTitleText": "右滑菜单" + } + }, { + "path": "pages/template/drag-right-zoom/index", + "style": { + "navigationBarTitleText": "右滑菜单(缩放)" + } + }, { + "path": "pages/template/drag-left/index", + "style": { + "navigationBarTitleText": "左滑菜单" + } + }, { + "path": "pages/template/drag-left-zoom/index", + "style": { + "navigationBarTitleText": "左滑菜单(缩放)" + } + }, { + "path": "pages/template/badge/index", + "style": { + "navigationBarTitleText": "数字角标" + } + }, { + "path": "pages/template/accordion/index", + "style": { + "navigationBarTitleText": "折叠面板" + } + }, { + "path": "pages/template/cardview/index", + "style": { + "navigationBarTitleText": "卡片视图" + } + }, { + "path": "pages/template/list-with-badges/index", + "style": { + "navigationBarTitleText": "右侧带角标" + } + }, { + "path": "pages/template/list-with-collapses/index", + "style": { + "navigationBarTitleText": "二级列表" + } + }, { + "path": "pages/template/list-triplex-row/index", + "style": { + "navigationBarTitleText": "三行列表" + } + }, { + "path": "pages/template/list-to-detail/index", + "style": { + "navigationBarTitleText": "列表到详情的最佳实践", + "enablePullDownRefresh": true + } + }, { + "path": "pages/template/list-to-detail/detail", + "style": { + "navigationBarTitleText": "详情" + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "演示", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8" + }, + "tabBar": { + "color": "#7A7E83", + "selectedColor": "#007AFF", + "borderStyle": "black", + "backgroundColor": "#ffffff", + "list": [ + { + "pagePath": "pages/component/index", + "iconPath": "static/component.png", + "selectedIconPath": "static/componentHL.png", + "text": "组件" + }, { + "pagePath": "pages/API/index", + "iconPath": "static/api.png", + "selectedIconPath": "static/apiHL.png", + "text": "接口" + }, { + "pagePath": "pages/template/index", + "iconPath": "static/template.png", + "selectedIconPath": "static/templateHL.png", + "text": "模版" + } + ] + } +} diff --git a/examples/hello-uniapp/pages/API/action-sheet/index.vue b/examples/hello-uniapp/pages/API/action-sheet/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..7f5a84cc8ea5b5157f0e92e1e28aeb1e10974dff --- /dev/null +++ b/examples/hello-uniapp/pages/API/action-sheet/index.vue @@ -0,0 +1,35 @@ + + + diff --git a/examples/hello-uniapp/pages/API/animation/index.vue b/examples/hello-uniapp/pages/API/animation/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..58dd27b934da9ee2b6b473ad2c841d72c477bdcc --- /dev/null +++ b/examples/hello-uniapp/pages/API/animation/index.vue @@ -0,0 +1,133 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/background-audio/index.vue b/examples/hello-uniapp/pages/API/background-audio/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..864ca26252c43bdf7ec52db315953a8ed36cd0e5 --- /dev/null +++ b/examples/hello-uniapp/pages/API/background-audio/index.vue @@ -0,0 +1,152 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/canvas/index.vue b/examples/hello-uniapp/pages/API/canvas/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..54a9992275d2e183f55e14aea71bbff16a9ccf09 --- /dev/null +++ b/examples/hello-uniapp/pages/API/canvas/index.vue @@ -0,0 +1,356 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/choose-location/index.vue b/examples/hello-uniapp/pages/API/choose-location/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..19b0d2f8516a28c8cabc72b0a65a429a4fa6372b --- /dev/null +++ b/examples/hello-uniapp/pages/API/choose-location/index.vue @@ -0,0 +1,74 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/download-file/index.vue b/examples/hello-uniapp/pages/API/download-file/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..042789e188c239bef6d4f89c81cce09b0845908d --- /dev/null +++ b/examples/hello-uniapp/pages/API/download-file/index.vue @@ -0,0 +1,67 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/file/index.vue b/examples/hello-uniapp/pages/API/file/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..8abae7adc0cbaeec7cb5e1df0486c9ad43451084 --- /dev/null +++ b/examples/hello-uniapp/pages/API/file/index.vue @@ -0,0 +1,123 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/get-location/index.vue b/examples/hello-uniapp/pages/API/get-location/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..c82fcb26a30b5a43107e43f3bfdc9863521da835 --- /dev/null +++ b/examples/hello-uniapp/pages/API/get-location/index.vue @@ -0,0 +1,85 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/get-network-type/index.vue b/examples/hello-uniapp/pages/API/get-network-type/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..56088527734a76e855f964ec20ece1a68884a78b --- /dev/null +++ b/examples/hello-uniapp/pages/API/get-network-type/index.vue @@ -0,0 +1,70 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/get-system-info/index.vue b/examples/hello-uniapp/pages/API/get-system-info/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..ebceba2fb9d9cc2d6e48cf233a9d7fe3a2cb6e0c --- /dev/null +++ b/examples/hello-uniapp/pages/API/get-system-info/index.vue @@ -0,0 +1,98 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/get-user-info/index.vue b/examples/hello-uniapp/pages/API/get-user-info/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..46e6865faa529ad17d3c286f74a4510c68734b3e --- /dev/null +++ b/examples/hello-uniapp/pages/API/get-user-info/index.vue @@ -0,0 +1,101 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/image/index.vue b/examples/hello-uniapp/pages/API/image/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..4aefa250f81d1affc9e85ae64c68168afa1ee1aa --- /dev/null +++ b/examples/hello-uniapp/pages/API/image/index.vue @@ -0,0 +1,145 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/index.vue b/examples/hello-uniapp/pages/API/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..7e0ed534b24c7638472834c368be29054f0d31ee --- /dev/null +++ b/examples/hello-uniapp/pages/API/index.vue @@ -0,0 +1,224 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/login/index.vue b/examples/hello-uniapp/pages/API/login/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..dd310cfa16418bc734ef7eb4945367fd75a5a679 --- /dev/null +++ b/examples/hello-uniapp/pages/API/login/index.vue @@ -0,0 +1,112 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/make-phone-call/index.vue b/examples/hello-uniapp/pages/API/make-phone-call/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..f52e6dd63e6b5cd64286e6ab30cd81aa0fc08a19 --- /dev/null +++ b/examples/hello-uniapp/pages/API/make-phone-call/index.vue @@ -0,0 +1,80 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/modal/index.vue b/examples/hello-uniapp/pages/API/modal/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..d848d1d30edc8e7fe1d7e87f745153d8c50192ac --- /dev/null +++ b/examples/hello-uniapp/pages/API/modal/index.vue @@ -0,0 +1,46 @@ + + diff --git a/examples/hello-uniapp/pages/API/navigation-bar-loading/index.vue b/examples/hello-uniapp/pages/API/navigation-bar-loading/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..7f61c3094cd12a44bbd59e4a27a74eddf72c9201 --- /dev/null +++ b/examples/hello-uniapp/pages/API/navigation-bar-loading/index.vue @@ -0,0 +1,42 @@ + + + + diff --git a/examples/hello-uniapp/pages/API/navigator/index.vue b/examples/hello-uniapp/pages/API/navigator/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..b0833c68d8fc3f5abfa2a8aa95f15489f77e91e1 --- /dev/null +++ b/examples/hello-uniapp/pages/API/navigator/index.vue @@ -0,0 +1,43 @@ + + diff --git a/examples/hello-uniapp/pages/API/on-accelerometer-change/index.vue b/examples/hello-uniapp/pages/API/on-accelerometer-change/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..02d4b2d296d8a330cdb77b102ee230c58b581f7b --- /dev/null +++ b/examples/hello-uniapp/pages/API/on-accelerometer-change/index.vue @@ -0,0 +1,69 @@ +