提交 0151efca 编写于 作者: DCloud-yyl's avatar DCloud-yyl

Merge branch 'alpha'

# Conflicts:
#	App.vue
<!-- HBuilder X 版本要求: 3.6.11+ -->
<script>
export default {
onLaunch: function() {
<script lang="ts">
let firstBackTime = 0
export default {
onLaunch: function () {
console.log('App Launch')
},
onShow: function() {
onShow: function () {
console.log('App Show')
},
onHide: function() {
onHide: function () {
console.log('App Hide')
},
onLastPageBackPress: function () {
console.log('App LastPageBackPress')
if (firstBackTime == 0) {
uni.showToast({
title: '再按一次退出应用',
position: 'bottom',
})
firstBackTime = Date.now()
setTimeout(() => {
firstBackTime = 0
}, 2000)
} else if (Date.now() - firstBackTime < 2000) {
firstBackTime = Date.now()
uni.exit()
}
}
},
onExit() {
console.log('App Exit')
},
}
</script>
<style>
/*每个页面公共css */
/* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
/* #ifdef APP-VUE */
@import './common/uni.css';
/* #endif */
/*每个页面公共css */
/* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
/* #ifdef APP-VUE */
@import './common/uni.css';
/* #endif */
</style>
/* #ifndef APP-PLUS-NVUE */
/* page {
min-height: 100%;
height: auto;
} */
/* #endif */
/* 解决头条小程序字体图标不显示问题,因为头条运行时自动插入了span标签,且有全局字体 */
/* #ifdef MP-TOUTIAO */
/* text :not(view) {
font-family: uniicons;
} */
/* #endif */
.uni-icon {
/* font-family: uniicons;
font-weight: normal; */
width: 14px;
height: 14px;
}
.uni-container {
padding: 0 15px 15px;
background-color: #f8f8f8;
}
.uni-header-logo {
/* #ifdef H5 */
display: flex;
/* #endif */
padding: 15px 15px;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 10rpx;
}
.uni-header-image {
width: 80px;
height: 80px;
}
.uni-hello-text {
margin-bottom: 20px;
color: #7A7E83;
}
.hello-text {
color: #7A7E83;
font-size: 14px;
line-height: 20px;
}
.hello-link {
color: #7A7E83;
font-size: 14px;
line-height: 20px;
}
.uni-panel {
margin-bottom: 12px;
}
.text-disabled {
color: #a0a0a0;
}
.uni-panel-h {
display: flex;
background-color: #ffffff;
flex-direction: row !important;
justify-content: space-between !important;
align-items: center !important;
padding: 12px;
}
/*
.uni-panel-h:active {
background-color: #f8f8f8;
}
*/
.uni-panel-h-on {
background-color: #f0f0f0;
}
.uni-panel-text {
color: #000000;
font-size: 14px;
font-weight: normal;
}
.uni-panel-icon {
margin-left: 15px;
color: #999999;
font-size: 14px;
font-weight: normal;
transform: rotate(0deg);
transition-duration: 0s;
transition-property: transform;
}
.uni-panel-icon-on {
transform: rotate(180deg);
}
.uni-navigate-item {
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
border-top-style: solid;
border-top-color: #f0f0f0;
border-top-width: 1px;
padding: 12px;
justify-content: space-between;
/* #ifdef H5 */
/* cursor: pointer; */
/* #endif */
}
.uni-navigate-item-active {
background-color: #f8f8f8;
}
.uni-navigate-text {
color: #000000;
font-size: 14px;
font-weight: normal;
}
.uni-navigate-icon {
margin-left: 15px;
color: #999999;
font-size: 14px;
font-weight: normal;
}
\ No newline at end of file
此差异已折叠。
<template name="page-head">
<view class="common-page-head">
<view class="common-page-head-title">{{title}}</view>
<view class="common-page-head-title-box">
<text class="common-page-head-title">{{title}}</text>
</view>
</view>
</template>
<script>
......@@ -14,3 +16,23 @@
}
}
</script>
<style>
.common-page-head {
display: flex;
padding: 35rpx;
flex-direction: row;
justify-content: center;
}
.common-page-head-title-box {
padding: 0 40rpx;
height: 88rpx;
border-bottom: 2rpx solid #D8D8D8;
}
.common-page-head-title {
line-height: 88rpx;
font-size: 30rpx;
color: #BEBEBE;
}
</style>
\ No newline at end of file
module.exports = {
"is-custom-runtime": false,
"compile": true,
"h5": {
"options": {
"headless": true
},
"executablePath": ""
},
"mp-weixin": {
"port": 9420,
"account": "",
"args": "",
"cwd": "",
"launch": true,
"teardown": "disconnect",
"remote": false,
"executablePath": ""
},
"app-plus": {
"android": {
"id": "emulator-5554",
"executablePath": "/Users/yuanrenjie/Desktop/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/launcher/base/android_base.apk"
},
"version": "/Users/yuanrenjie/Desktop/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/launcher/base/version.txt",
"ios": {
"id": "",
"executablePath": ""
}
}
}
\ No newline at end of file
const {
readFileSync,
readdirSync
} = require('fs')
const {
extname,
resolve
} = require('path')
const describeRE = /describe\(["|'](.*)["|']/
const testsRE = /test\(["|'](.*)["|']/g
function parse(content) {
const describes = content.match(describeRE)
if (!describes) {
return
}
const describe = describes[1]
const tests = []
let test
while (test = testsRE.exec(content)) {
tests.push(test[1])
}
return {
describe,
tests
}
}
function parseDescribes() {
const dir = resolve(__dirname, 'uni_modules/uts-tests/utssdk')
const describes = []
readdirSync(dir).forEach(file => {
if (extname(file) === '.uts') {
describes.push(parse(readFileSync(resolve(dir, file), 'utf8')))
}
})
return describes
};
module.exports = {
testTimeout: 10000,
reporters: [
'default'
],
globals: {
describes: parseDescribes()
},
watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'],
moduleFileExtensions: ['js', 'json'],
rootDir: __dirname,
testMatch: ["<rootDir>/pages/**/*test.[jt]s?(x)"],
testPathIgnorePatterns: ['/node_modules/']
}
import App from './App'
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
\ No newline at end of file
// #endif
\ No newline at end of file
import App from './App'
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
\ No newline at end of file
{
"name" : "HelloUTS",
"appid" : "__UNI__70BE9D0",
"description" : "",
"versionName" : "1.0.9",
"versionCode" : "109",
"transformPx" : false,
"name": "HelloUTS",
"appid": "__UNI__70BE9D0",
"description": "",
"versionName": "1.0.9",
"versionCode": "109",
"transformPx": false,
/* 5+App特有相关 */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* 模块配置 */
"modules" : {},
"modules": {},
/* 应用发布信息 */
"distribute" : {
"distribute": {
/* android打包配置 */
"android" : {
"permissions" : [
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
......@@ -39,40 +39,40 @@
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"minSdkVersion" : 21,
"abiFilters" : [ "armeabi-v7a" ]
"minSdkVersion": 21,
"abiFilters": ["armeabi-v7a"]
},
/* ios打包配置 */
"ios" : {
"dSYMs" : false
"ios": {
"dSYMs": false
},
/* SDK配置 */
"sdkConfigs" : {
"ad" : {}
"sdkConfigs": {
"ad": {}
}
}
},
/* 快应用特有相关 */
"quickapp" : {},
"quickapp": {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false
},
"usingComponents" : true
"usingComponents": true
},
"mp-alipay" : {
"usingComponents" : true
"mp-alipay": {
"usingComponents": true
},
"mp-baidu" : {
"usingComponents" : true
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao" : {
"usingComponents" : true
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics" : {
"enable" : false
"uniStatistics": {
"enable": false
},
"vueVersion" : "3"
"vueVersion": "3"
}
\ No newline at end of file
......@@ -2,142 +2,177 @@
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/index/index",
"style" :
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/advance/advance",
"style" :
{
"path": "pages/index/basicTest",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/SystemAPI/SystemAPI",
"style" :
"path": "pages/advance/advance",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/SystemAPI/SystemAPI",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/SystemAPI/Alert/alert",
"style" :
{
"path": "pages/SystemAPI/Alert/alert",
"style": {
"navigationBarTitleText": ""
}
},
{
"path" : "pages/component/helloView",
"style" :
{
"path": "pages/component/helloView",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/SDKIntegration/SDKIntegration",
"style" :
{
"path": "pages/SDKIntegration/SDKIntegration",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/SDKIntegration/TencentLocation/TencentLocation",
"style" :
{
"path": "pages/SDKIntegration/TencentLocation/TencentLocation",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/SDKIntegration/Lottie/index",
"style" :
{
"path": "pages/SDKIntegration/Lottie/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/SDKIntegration/Toast/Toast",
"style" :
{
"path": "pages/SDKIntegration/Toast/Toast",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/lifecycle/lifecycle",
"style" :
{
"path": "pages/lifecycle/lifecycle",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/resource/resource",
"style" :
{
"path": "pages/resource/resource",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/advance/android/decorview",
"style" :
"path": "pages/resource/fileRead",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/advance/android/decorview",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/advance/iOS/getResourcePath",
"style" :
"path": "pages/advance/iOS/getResourcePath",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/advance/android/assetaudio",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/advance/android/assetaudio",
"style" :
"path": "pages/SystemAPI/ScreenListen/screenlisten",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/SyntaxCase/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/SystemAPI/ScreenListen/screenlisten",
"style" :
"path": "pages/SyntaxCase/paramTest",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/SyntaxCase/consoleTest",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/SyntaxCase/instanceTest",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/SyntaxCase/index",
"style" :
"path": "pages/SyntaxCase/utsAndroid",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/SyntaxCase/utsiOS",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
......@@ -158,7 +193,7 @@
"pagePath": "pages/advance/advance",
"text": "进阶"
}, {
"pagePath":"pages/SystemAPI/SystemAPI",
"pagePath": "pages/SystemAPI/SystemAPI",
"text": "系统API"
}, {
"pagePath": "pages/SDKIntegration/SDKIntegration",
......
<template>
<div>
<button @tap="changeUrl">播放本地动画资源</button>
<button @tap="changeServerUrl">播放远程动画资源</button>
<button @tap="changeAutoPlay">测试AutoPlay</button>
<button @tap="changeLoop">测试Loop</button>
<button @tap="changeAction(1)">测试action play</button>
<button @tap="changeAction(2)">测试action pause</button>
<button @tap="changeAction(3)">测试action stop</button>
<!-- <uts-animation-view ref="animView" :path="animUrl" :autoplay="autoplay" :loop="loop" :action="action"
:hidden="hidden" @bindended="testAnimEnd" @click="lottieClickTest" @longpress="lottieLongpressTest"
:style="{width:widthNum+'rpx',height:heightNum+'px',background:yanse}">
</uts-animation-view> -->
</div>
</template>
<script lang="ts">
export default {
data() {
return {
hidden: false,
autoplay: false,
action: "play",
loop: false,
yanse: "red",
widthNum: 750,
heightNum: 200,
comShow: true,
animUrl: "/static/anim_a.json"
}
},
methods: {
changeAutoPlay: function() {
this.autoplay = !this.autoplay
},
changeUrl: function() {
if (this.animUrl == "/static/anim_a.json") {
this.animUrl = "/static/anim_b.json"
} else {
this.animUrl = "/static/anim_a.json"
}
},
changeServerUrl: function() {
this.animUrl = "https://b.bdstatic.com/miniapp/images/lottie_example_one.json"
},
changeAction: function(type: number) {
if (type == 1) {
this.action = "play"
} else if (type == 2) {
this.action = "pause"
} else if (type == 3) {
this.action = "stop"
}
},
changeLoop: function() {
this.loop = !this.loop
},
testAnimEnd: function() {
console.log("testAnimEnd");
},
changeRepeat: function() {
// this.$refs["animView"].updateRepeatConfig("RESTART");
},
lottieClickTest: function() {
console.log("lottieClickTest");
},
lottieLongpressTest: function() {
console.log("lottieClickTest");
},
}
}
</script>
<template>
<view class="uni-container">
<page-head :title="title"></page-head>
<view class="uni-panel" v-for="(item, index) in list" :key="index">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="goDetailPage(item)"
hover-class="uni-navigate-item-active">
<text class="uni-panel-text">{{item.name}}</text>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</view>
</view>
</template>
<script lang="ts">
// import {
// checkHasIntegration
// } from "@/uni_modules/uts-tencentgeolocation";
// import {
// checkHasLottieIntegration
// } from "@/uni_modules/uts-animation-view";
type ListItem = {
name : string,
open : boolean,
function ?: string,
url ?: string
}
export default {
data() {
return {
title: 'SDK集成示例',
list: [{
name: "腾讯定位sdk集成示例",
function: "gotoTencentLocation"
},
{
name: "Toast示例",
url: "SDKIntegration/Toast/Toast"
},
{
name: "Lottie动画示例",
function: "gotoLottie"
}
] as ListItem[],
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
goDetailPage(e : ListItem) {
if (e.function != null) {
const funName = e.function
switch (funName) {
case 'gotoTencentLocation':
this.gotoTencentLocation()
break
case 'gotoLottie':
this.gotoLottie()
break
}
return
}
uni.navigateTo({
url: `/pages/${e.url!}`
})
},
gotoLottie: function () {
uni.showToast({
title:'暂时不支持uni-appx'
})
},
gotoTencentLocation: function () {
uni.showToast({
title:'暂时不支持uni-appx'
})
},
gotoTencentMap: function () {
uni.navigateTo({
url: '/pages/SDKIntegration/TencentMap/TencentMap'
})
}
}
}
</script>
<style>
@import '@/common/uni-uvue.css';
</style>
\ No newline at end of file
<template>
<view>
<view class="uni-container">
<page-head :title="title"></page-head>
<uni-list>
<uni-list-item @tap="gotoTencentLocation" title="腾讯定位sdk集成示例" class="itemButton" :clickable="true" link/>
<uni-list-item @tap="gotoToast" title="Toast示例" class="itemButton" :clickable="true" link/>
<uni-list-item @tap="gotoLottie" title="Lottie动画示例" class="itemButton" :clickable="true" link/>
</uni-list>
<view class="uni-panel" v-for="(item, index) in list" :key="index">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="goDetailPage(item)" hover-class="uni-navigate-item-active">
<text class="uni-panel-text">{{item.name}}</text>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</view>
</view>
</template>
<script>
import {
checkHasIntegration
} from "@/uni_modules/uts-tencentgeolocation";
......@@ -23,46 +23,63 @@
data() {
return {
title: 'SDK集成示例',
list: [{
name: "腾讯定位sdk集成示例",
function: "gotoTencentLocation"
},
{
name: "Toast示例",
url: "SDKIntegration/Toast/Toast"
},
{
name: "Lottie动画示例",
function: "gotoLottie"
}
],
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
gotoToast:function(e){
goDetailPage(e) {
if (e.function) {
this[e.function]()
return
}
uni.navigateTo({
url:'/pages/SDKIntegration/Toast/Toast'
url: `/pages/${e.url}`
})
},
gotoLottie:function(e){
if(checkHasLottieIntegration()){
gotoLottie: function(e) {
if (checkHasLottieIntegration()) {
uni.navigateTo({
url:'/pages/SDKIntegration/Lottie/index'
url: '/pages/SDKIntegration/Lottie/index'
})
}else{
} else {
uni.showToast({
icon:'none',
title:'需要在自定义基座中运行'
icon: 'none',
title: '需要在自定义基座中运行'
})
}
},
gotoTencentLocation:function(e){
gotoTencentLocation: function(e) {
let ret = checkHasIntegration();
if(!ret){
if (!ret) {
uni.showToast({
icon:'none',
title:'需要在自定义基座中运行'
icon: 'none',
title: '需要在自定义基座中运行'
})
}else{
} else {
uni.navigateTo({
url:'/pages/SDKIntegration/TencentLocation/TencentLocation'
url: '/pages/SDKIntegration/TencentLocation/TencentLocation'
})
}
},
gotoTencentMap:function(e){
gotoTencentMap: function(e) {
uni.navigateTo({
url:'/pages/SDKIntegration/TencentMap/TencentMap'
url: '/pages/SDKIntegration/TencentMap/TencentMap'
})
}
}
......@@ -70,5 +87,9 @@
</script>
<style>
@import '@/common/uni-uvue.css';
.uni-container {
min-height: 100%;
}
</style>
\ No newline at end of file
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-hello-text">
1. 腾讯定位sdk需在腾讯地图官网申请key。 https://lbs.qq.com/
</view>
<view class="uni-hello-text">
2. 按照readme文档配置apikey
</view>
<view class="uni-hello-text">
3. 需要制作自定义基座运行
</view>
</view>
<view class="uni-btn-v uni-common-mt">
<button type="primary" @tap="checkLocationPermission">请求定位权限</button>
<button type="primary" @tap="testGetlocation">获取设备位置信息</button>
<button type="primary" @tap="testWatchPosition">监听设备位置信息</button>
<button type="primary" @tap="testClearWatch">停止监听</button>
</view>
</view>
</template>
<script>
// import {
// checkHasIntegration,
// requestPremission,
// getLocation,
// watchPosition,
// clearWatch
// } from "../../../uni_modules/uts-tencentgeolocation";
export default {
data() {
return {
title: '腾讯定位SDK集成示例',
}
},
methods: {
checkLocationPermission: function() {
// requestPremission();
},
testGetlocation: function() {
// let startRet = getLocation({
// geocode: true,
// success: function(response) {
// console.log(response);
// var addressDesc = response.name + '-' + response.address
// uni.showToast({
// title: '执行结果:' + addressDesc,
// icon: 'none'
// });
// },
// fail: function(msg) {
// uni.showToast({
// title: msg,
// icon: "none"
// })
// }
// })
// if (!startRet) {
// uni.showToast({
// title: '定位启动失败,请检查配置',
// icon: 'none'
// });
// }
},
testWatchPosition() {
// watchPosition({
// geocode: true,
// success: function(response) {
// console.log(response);
// var addressDesc = response.name + '-' + response.address
// uni.showToast({
// title: '执行结果:' + addressDesc,
// icon: 'none'
// });
// },
// fail: function(msg) {
// uni.showToast({
// title: msg,
// icon: "none"
// })
// }
// })
},
testClearWatch() {
// clearWatch()
}
}
}
</script>
<style>
</style>
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-hello-text">
1.Android 平台需要自定义基座运行
</view>
</view>
<view class="uni-padding-wrap uni-common-mt">
<button @tap="testToastShow">调用 Toast 弹窗</button>
</view>
</view>
</template>
<script>
import { showToast } from '@/uni_modules/uts-toast'
export default {
data() {
return {
title:"Toast 示例"
}
},
methods:{
testToastShow(){
let ret = showToast();
if(!ret){
uni.showToast({
icon:'none',
title:'需要在自定义基座中运行'
})
}
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<button @click="logStr">打印字符串</button>
<button @click="logFloat">打印浮点数</button>
<button @click="logInt">打印整数</button>
<button @click="logObject">打印对象</button>
<button @click="logFunction">打印函数</button>
</template>
<script>
import {
logStrTest,
logIntTest,
logFloatTest,
logObjectTest,
logFunctionTest
} from '@/uni_modules/uts-advance'
export default {
data() {
return {}
},
methods: {
logStr() {
logStrTest()
},
logFloat() {
logFloatTest()
},
logInt() {
logIntTest()
},
logObject() {
logObjectTest()
},
logFunction() {
logFunctionTest()
},
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<button @click="logStr">打印字符串</button>
<button @click="logFloat">打印浮点数</button>
<button @click="logInt">打印整数</button>
<button @click="logObject">打印对象</button>
<button @click="logFunction">打印函数</button>
<button @click="logFile">打印文件</button>
<button @click="logDate">打印日期</button>
<button @click="logDateCombine">组合打印日期</button>
</template>
<script>
import {
logStrTest,
logIntTest,
logFloatTest,
logObjectTest,
logFunctionTest,
logDateTest,
logFileTest,
logDateCombineTest
} from '@/uni_modules/uts-advance'
export default {
data() {
return {}
},
methods: {
logStr() {
logStrTest()
},
logFloat() {
logFloatTest()
},
logInt() {
logIntTest()
},
logObject() {
logObjectTest()
},
logFunction() {
logFunctionTest()
},
logFile() {
logFileTest()
},
logDate() {
logDateTest()
},
logDateCombine() {
logDateCombineTest()
},
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<view>
<view>暂时不支持2.0 语法调用测试</view>
</view>
</template>
<script>
</script>
\ No newline at end of file
......@@ -40,6 +40,12 @@
<view>测试return:{{ format(testUtsClassAsyncResult.return) }}</view>
<view>测试success:{{ format(testUtsClassAsyncResult.success) }}</view>
<view>测试complete:{{ format(testUtsClassAsyncResult.complete) }}</view>
<button @click="testUtsClassInstance">点击测试uts方法返回类实例</button>
<view>测试prop:{{ format(testUtsClassInstanceResult.prop) }}</view>
<view>测试return:{{ format(testUtsClassInstanceResult.return) }}</view>
<view>测试success:{{ format(testUtsClassInstanceResult.success) }}</view>
<view>测试complete:{{ format(testUtsClassInstanceResult.complete) }}</view>
<view>测试callback:{{ format(testUtsClassInstanceResult.callback) }}</view>
<button @click="testAll">点击测试所有</button>
</view>
</template>
......@@ -50,6 +56,7 @@
testSyncWithCallback,
testAsync,
Test,
request,
} from "../../uni_modules/uts-syntaxcase";
let test
......@@ -98,6 +105,14 @@
success: null,
fail: null,
complete: null,
},
testUtsClassInstanceResult: {
prop: null,
return: null,
success: null,
fail: null,
complete: null,
callback: null
}
}
},
......@@ -116,6 +131,7 @@
this.testUtsClassProp();
this.testUtsClassSyncWithCallback();
this.testUtsClassAsync();
this.testUtsClassInstance();
},
testUtsSync() {
this.testUtsSyncResult = false;
......@@ -257,7 +273,6 @@
this.testUtsClassPropResult = true
}
},
testUtsClassSyncWithCallback() {
if (!test) {
this.testUtsClassConstructor()
......@@ -288,7 +303,6 @@
}
} catch (e) {}
},
async testUtsClassAsync() {
if (!test) {
this.testUtsClassConstructor()
......@@ -312,10 +326,47 @@
this.testUtsClassAsyncResult.complete = true;
},
});
console.log('res', res)
if (res.name === "testAsync") {
this.testUtsClassAsyncResult.return = true;
}
} catch (e) {}
} catch (e) {
console.error(e)
}
},
testUtsClassInstance() {
this.testUtsClassInstanceResult.prop = false;
this.testUtsClassInstanceResult.return = false;
this.testUtsClassInstanceResult.success = false;
// testUtsClassAsyncResult.fail = false;
this.testUtsClassInstanceResult.complete = false;
this.testUtsClassInstanceResult.callback = false;
const url = 'https://dcloud.io/'
const task = request(url)
if (task.url === url && task.abort().url === url) {
this.testUtsClassInstanceResult.prop = true;
}
task.onCallback((res) => {
if (res === 'onCallback') {
this.testUtsClassInstanceResult.callback = true;
}
})
const res = task.sync({
success: (res) => {
console.log("task.sync.success.callback", res);
this.testUtsClassInstanceResult.success = true;
},
fail: (res) => {
console.log("task.sync.fail.callback", res);
},
complete: (res) => {
console.log("task.sync.complete.callback", res);
this.testUtsClassInstanceResult.complete = true;
},
})
if (res === 'sync') {
this.testUtsClassInstanceResult.return = true;
}
}
}
}
......
<template>
{{ret}}
<button @click="instanceCreate">多实例创建测试</button>
</template>
<script>
import {
User
} from '@/uni_modules/uts-advance'
export default {
data() {
return {
ret:''
}
},
methods: {
instanceCreate() {
const user1 = new User("张三", 20);
let userText1 = user1.describeSelf()
const user2 = new User("李四", 30);
let userText2 = user2.describeSelf()
const user3 = new User("王五", 40);
let userText3 = user3.describeSelf()
if(userText1 == userText2 || userText1 == userText3 || userText2 == userText3){
this.ret = '测试未通过'
}else{
this.ret = '测试通过'
}
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
{{ret}}
<button @click="instanceCreate">多实例创建测试</button>
</template>
<script>
import {
User
} from '@/uni_modules/uts-advance'
export default {
data() {
return {
ret:''
}
},
methods: {
instanceCreate() {
const user1 = new User("张三", 20);
let userText1 = user1.describeSelf()
const user2 = new User("李四", 30);
let userText2 = user2.describeSelf()
const user3 = new User("王五", 40);
let userText3 = user3.describeSelf()
if(userText1 == userText2 || userText1 == userText3 || userText2 == userText3){
this.ret = '测试未通过'
}else{
this.ret = '测试通过'
}
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<button @click="inputArrayTest">传入数组参数</button>
<button @click="inputParamTest">传入复杂对象参数</button>
<button @click="returnArrayTest">返回数组参数</button>
<button @click="returnParamTest">返回复杂对象参数</button>
<button @click="callbackArrayTest">异步返回数组</button>
<button @click="callbackParamTest">异步返回复杂对象</button>
</template>
<script>
import {
inputArray,
inputParam,
returnArray,
returnParam,
callbackArray,
callbackParam,
ParamOptions
} from '@/uni_modules/uts-advance'
export default {
data() {
return {}
},
methods: {
inputArrayTest() {
let ret = inputArray(['a', 'b', 'c'])
if (ret) {
uni.showToast({
title: '测试通过'
})
}
},
inputParamTest() {
let ret = inputParam({
title: "hello",
array: ["1", "2", "3"]
} as ParamOptions)
if (ret) {
uni.showToast({
title: '测试通过'
})
}
},
returnArrayTest() {
let ret = returnArray()
if ('["1","2","3"]' == JSON.stringify(ret)) {
uni.showToast({
title: '测试通过'
})
}
},
returnParamTest() {
let ret = returnParam()
if ('{"title":"returnParam","array":["1","2","3"]}' == JSON.stringify(ret)) {
uni.showToast({
title: '测试通过'
})
}
},
callbackArrayTest() {
callbackArray(function(res) {
if ('["8","8","8"]' == JSON.stringify(res)) {
uni.showToast({
title: '测试通过'
})
}
});
},
callbackParamTest() {
callbackParam(function(res) {
if ('{"title":"callbackParam","array":["4","5","6"]}' == JSON.stringify(res)) {
uni.showToast({
title: '测试通过'
})
}
});
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<button @click="inputArrayTest">传入数组参数</button>
<button @click="inputParamTest">传入复杂对象参数</button>
<button @click="returnArrayTest">返回数组参数</button>
<button @click="returnParamTest">返回复杂对象参数</button>
<button @click="callbackArrayTest">异步返回数组</button>
<button @click="callbackParamTest">异步返回复杂对象</button>
</template>
<script>
import {
inputArray,
inputParam,
returnArray,
returnParam,
callbackArray,
callbackParam,
} from '@/uni_modules/uts-advance'
export default {
data() {
return {}
},
methods: {
inputArrayTest() {
let ret = inputArray(['a', 'b', 'c'])
if (ret) {
uni.showToast({
title: '测试通过'
})
}
},
inputParamTest() {
let ret = inputParam({
title: "hello",
array: ["1", "2", "3"]
})
if (ret) {
uni.showToast({
title: '测试通过'
})
}
},
returnArrayTest() {
let ret = returnArray()
console.log( JSON.stringify(ret))
if ('["1","2","3"]' == JSON.stringify(ret)) {
uni.showToast({
title: '测试通过'
})
}
},
returnParamTest() {
let ret = returnParam()
if ('{"title":"returnParam","array":["1","2","3"]}' == JSON.stringify(ret)) {
uni.showToast({
title: '测试通过'
})
}
},
callbackArrayTest() {
callbackArray(function(res) {
if ('["8","8","8"]' == JSON.stringify(res)) {
uni.showToast({
title: '测试通过'
})
}
});
},
callbackParamTest() {
callbackParam(function(res) {
if ('{"title":"callbackParam","array":["4","5","6"]}' == JSON.stringify(res)) {
uni.showToast({
title: '测试通过'
})
}
});
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<!-- #ifdef APP -->
<scroll-view style="flex: 1">
<!-- #endif -->
<view>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-hello-text"> 逐一点击执行,观察测试反馈 </view>
</view>
<button @click="getAppContextClick">getAppContext</button>
<button @click="getUniActivityClick">getUniActivity</button>
<button @click="getAppTempPathClick">getAppTempPath</button>
<button @click="typeofClick">typeof</button>
<button @click="arrayPermissionFlowClick">组权限申请流程测试</button>
<button @click="singlePermissionFlowClick">单权限申请流程测试</button>
<button @click="dispatchAsyncClick">任务分发测试</button>
<button @click="pathTestClick">路径转换测试</button>
<button @click="privacyStateClick">隐私协议状态测试</button>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-hello-text">
1. 当前页面已通过initAppLifecycle函数注册了生命周期监听。
</view>
<view class="uni-hello-text">
2. 手动切换其他APP再返回,可在控制台和界面观察事件日志
</view>
</view>
<view class="uni-padding-wrap uni-common-mt">
<view class="text-box" scroll-y="true">
<text>{{ text }}</text>
</view>
</view>
<button @click="gotoSystemPermissionActivityClick">
手动申请权限测试
</button>
<button @tap="testGoOtherActivity">跳转拍照界面</button>
<button @tap="testUnRegLifecycle">取消注册周期函数</button>
<image :src="selectImage" v-if="selectImage"></image>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-hello-text"> 获取设备信息,观察是否符合预期 </view>
</view>
<button @tap="getDeviceInfoClick">获取设备基础信息</button>
</view>
<!-- #ifdef APP -->
</scroll-view>
<!-- #endif -->
</template>
<script>
import {
getAppContextTest,
getUniActivityTest,
getAppTempPathTest,
typeofClickTest,
gotoSystemPermissionActivityTest,
arrayPermissionFlowTest,
singlePermissionFlowTest,
dispatchAsyncTest,
convert2AbsFullPathTest,
unRegLifecycle,
initAppLifecycle,
gotoCameraTake,
getDeviceInfoTest,
privacyStateTest,
} from '@/uni_modules/uts-platform-api'
/**
* 测试在页面生命周期之外,使用api
*/
export default {
data() {
return {
text: '',
selectImage: '',
}
},
onLoad: function () {
let that = this
initAppLifecycle(function (eventLog) {
// 展示捕捉到的声明周期日志
let nextLine = that.text + eventLog
that.text = nextLine
let nextLineFlag = that.text + '\n'
that.text = nextLineFlag
})
},
methods: {
privacyStateClick() {
privacyStateTest(function (ret, desc) {
if (ret) {
uni.showToast({
title: '测试通过',
})
} else {
uni.showToast({
icon: 'none',
title: '失败:' + desc,
})
}
})
},
getDeviceInfoClick() {
this.text = getDeviceInfoTest()
},
testGoOtherActivity() {
var that = this
let ret = gotoCameraTake(function (file) {
// 展示捕捉到的声明周期日志
console.log(file)
that.selectImage = 'file://' + file
})
if (!ret) {
uni.showToast({
icon: 'none',
title: '测试失败',
})
}
},
testUnRegLifecycle() {
// 取消注册生命周期
unRegLifecycle()
},
getAppContextClick() {
if (getAppContextTest()) {
uni.showToast({
title: '测试通过',
})
} else {
uni.showToast({
icon: 'error',
title: '测试失败',
})
}
},
getUniActivityClick() {
if (getUniActivityTest()) {
uni.showToast({
title: '测试通过',
})
} else {
uni.showToast({
icon: 'error',
title: '测试失败',
})
}
},
pathTestClick() {
if (convert2AbsFullPathTest()) {
uni.showToast({
title: '测试通过',
})
} else {
uni.showToast({
icon: 'error',
title: '测试失败',
})
}
},
getAppTempPathClick() {
if (getAppTempPathTest()) {
uni.showToast({
title: '测试通过',
})
} else {
uni.showToast({
icon: 'error',
title: '测试失败',
})
}
},
dispatchAsyncClick() {
dispatchAsyncTest(function (ret, desc) {
if (ret) {
uni.showToast({
title: '测试通过',
})
} else {
uni.showToast({
icon: 'none',
title: '失败:' + desc,
})
}
})
},
typeofClick() {
if (typeofClickTest()) {
uni.showToast({
title: '测试通过',
})
} else {
uni.showToast({
icon: 'error',
title: '测试失败',
})
}
},
gotoSystemPermissionActivityClick() {
gotoSystemPermissionActivityTest()
},
arrayPermissionFlowClick() {
arrayPermissionFlowTest(function (ret, desc) {
if (ret) {
uni.showToast({
icon: 'none',
title: '测试通过',
})
} else {
uni.showToast({
icon: 'none',
title: '失败:' + desc,
})
}
})
},
singlePermissionFlowClick() {
singlePermissionFlowTest(function (ret, desc) {
if (ret) {
uni.showToast({
icon: 'none',
title: '测试通过',
})
} else {
uni.showToast({
icon: 'none',
title: '失败:' + desc,
})
}
})
},
},
}
</script>
<style>
.testButton {
width: 100%;
}
</style>
<template>
<view>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-hello-text">
逐一点击执行,观察测试反馈
</view>
</view>
<button @click="getAppContextClick">getAppContext</button>
<button @click="getUniActivityClick">getUniActivity</button>
<button @click="getAppTempPathClick">getAppTempPath</button>
<button @click="typeofClick">typeof</button>
<button @click="arrayPermissionFlowClick">组权限申请流程测试</button>
<button @click="singlePermissionFlowClick">单权限申请流程测试</button>
<button @click="dispatchAsyncClick">任务分发测试</button>
<button @click="pathTestClick">路径转换测试</button>
<button @click="privacyStateClick">隐私协议状态测试</button>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-hello-text">
1. 当前页面已通过initAppLifecycle函数注册了生命周期监听。
</view>
<view class="uni-hello-text">
2. 手动切换其他APP再返回,可在控制台和界面观察事件日志
</view>
</view>
<view class="uni-padding-wrap uni-common-mt">
<view class="text-box" scroll-y="true">
<text>{{text}}</text>
</view>
</view>
<button @click="gotoSystemPermissionActivityClick">手动申请权限测试</button>
<button @tap="testGoOtherActivity">跳转拍照界面</button>
<button @tap="testUnRegLifecycle">取消注册周期函数</button>
<image :src="selectImage" v-if="selectImage"></image>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-hello-text">
获取设备信息,观察是否符合预期
</view>
</view>
<button @tap="getDeviceInfoClick">获取设备基础信息</button>
</view>
</template>
<script>
import {
getAppContextTest,
getUniActivityTest,
getAppTempPathTest,
typeofClickTest,
gotoSystemPermissionActivityTest,
arrayPermissionFlowTest,
singlePermissionFlowTest,
dispatchAsyncTest,
convert2AbsFullPathTest,
unRegLifecycle,
initAppLifecycle,
gotoCameraTake,
getDeviceInfoTest,
privacyStateTest
} from '@/uni_modules/uts-platform-api'
/**
* 测试在页面生命周期之外,使用api
*/
export default {
data() {
return {
text: '',
selectImage:''
}
},
onLoad:function(){
let that = this;
initAppLifecycle(function(eventLog){
// 展示捕捉到的声明周期日志
that.text = that.text += eventLog;
that.text = that.text += '\n';
});
},
methods: {
privacyStateClick(){
privacyStateTest(function(ret,desc){
if (ret) {
uni.showToast({
title: '测试通过'
})
} else {
uni.showToast({
icon: 'none',
title: '失败:' + desc
})
}
})
},
getDeviceInfoClick(){
this.text = getDeviceInfoTest()
},
testGoOtherActivity(){
var that = this;
let ret = gotoCameraTake(function(file){
// 展示捕捉到的声明周期日志
console.log(file);
that.selectImage = "file://" + file;
});
if(!ret){
uni.showToast({
icon:'none',
title:'测试失败'
})
}
},
testUnRegLifecycle(){
// 取消注册生命周期
unRegLifecycle();
},
getAppContextClick() {
if (getAppContextTest()) {
uni.showToast({
title: '测试通过'
})
} else {
uni.showToast({
icon: 'error',
title: '测试失败'
})
}
},
getUniActivityClick() {
if (getUniActivityTest()) {
uni.showToast({
title: '测试通过'
})
} else {
uni.showToast({
icon: 'error',
title: '测试失败'
})
}
},
pathTestClick() {
if (convert2AbsFullPathTest()) {
uni.showToast({
title: '测试通过'
})
} else {
uni.showToast({
icon: 'error',
title: '测试失败'
})
}
},
getAppTempPathClick() {
if (getAppTempPathTest()) {
uni.showToast({
title: '测试通过'
})
} else {
uni.showToast({
icon: 'error',
title: '测试失败'
})
}
},
dispatchAsyncClick() {
dispatchAsyncTest(function(ret,desc){
if (ret) {
uni.showToast({
title: '测试通过'
})
} else {
uni.showToast({
icon: 'none',
title: '失败:' + desc
})
}
})
},
typeofClick() {
if (typeofClickTest()) {
uni.showToast({
title: '测试通过'
})
} else {
uni.showToast({
icon: 'error',
title: '测试失败'
})
}
},
gotoSystemPermissionActivityClick() {
gotoSystemPermissionActivityTest()
},
arrayPermissionFlowClick() {
arrayPermissionFlowTest(function(ret,desc){
if (ret) {
uni.showToast({
icon: 'none',
title: '测试通过'
})
} else {
uni.showToast({
icon: 'none',
title: '失败:' + desc
})
}
})
},
singlePermissionFlowClick() {
singlePermissionFlowTest(function(ret,desc){
if (ret) {
uni.showToast({
icon: 'none',
title: '测试通过'
})
} else {
uni.showToast({
icon: 'none',
title: '失败:' + desc
})
}
})
}
}
}
</script>
<style>
.testButton{
width:100%
}
</style>
\ No newline at end of file
<template>
</template>
<script>
</script>
<style>
</style>
\ No newline at end of file
<template>
<view>
<button @click="testCurrentVC">获取当前UIViewController</button>
<view class="result" :style="resultStyle(currentVCResult.passed)"> 测试结果 -- {{formatResult(currentVCResult.passed)}}</view>
<button @click="testKeyWindow">获取当前app的keyWindow</button>
<view class="result" :style="resultStyle(keyWindowResult.passed)"> 测试结果 -- {{formatResult(keyWindowResult.passed)}}</view>
<button @click="testColorConvert">将字符串色值转换为UIColor</button>
<view class="result">
<p v-for="item in colorConvertResult" :style="resultStyle(item.passed)"> {{item.key}}: {{item.value}} -- {{formatResult(item.passed)}}</p>
</view>
<button @click="testResourcePath">资源路径转换</button>
<view class="result" :style="resultStyle(resourcePathResult.passed)"> {{resourcePathResult.key}}: {{resourcePathResult.value}} -- {{formatResult(resourcePathResult.passed)}}</view>
<button @click="testDeviceInfo">获取设备信息</button>
<view class="result">
<p v-for="item in deviceInfoResult" :style="resultStyle(item.passed)"> {{item.key}}: {{item.value}} -- {{formatResult(item.passed)}}</p>
</view>
<button @click="testAppInfo">获取App信息相关api</button>
<view class="result">
<p v-for="item in appInfoResult" :style="resultStyle(item.passed)"> {{item.key}}: {{item.value}} -- {{formatResult(item.passed)}}</p>
</view>
<button @click="testSystemSetting">获取系统设置</button>
<view class="result" :style="resultStyle(systemSettingResult.passed)"> {{systemSettingResult.key}}: {{systemSettingResult.value}} -- {{formatResult(systemSettingResult.passed)}}</view>
<button @click="testTypeof">typeof</button>
<view class="result">
<p v-for="item in typeofResult" :style="resultStyle(item.passed)"> {{item.key}}: {{item.value}} -- {{formatResult(item.passed)}}</p>
</view>
<button @click="testDataConvert">数据转换</button>
<view class="result">
<p v-for="item in dataConvertResult" :style="resultStyle(item.passed)"> {{item.key}}: {{item.value}} -- {{formatResult(item.passed)}}</p>
</view>
<button @click="testAll">test all</button>
</view>
</template>
<script>
import {
getCurrentVCTest,
getKeyWindowTest,
colorWithStringTest,
getResourcePathTest,
getDeviceInfoTest,
getAppInfoTest,
getSystemSettingTest,
tepeofTest,
dataConvertTest,
} from "@/uni_modules/uts-platform-api"
export default {
data() {
return {
title: "UTSiOS test",
currentVCResult: {},
keyWindowResult: {},
colorConvertResult: [],
resourcePathResult: {},
deviceInfoResult: [],
appInfoResult: [],
systemSettingResult: {},
typeofResult: [],
dataConvertResult: []
}
},
methods: {
formatResult(res) {
if (res == null) {
return "";
}
return res ? "测试通过": "测试失败"
},
resultStyle(res) {
if (res == null) {
return {
color: "#333333"
}
}
let color = res ? "#00ff00" : "#ff0000";
return {
color: color
}
},
testCurrentVC() {
this.currentVCResult = getCurrentVCTest();
},
testKeyWindow() {
this.keyWindowResult = getKeyWindowTest();
},
testColorConvert() {
let array = colorWithStringTest();
this.colorConvertResult = array.map((value) => {
return JSON.parse(value)
})
},
testResourcePath() {
this.resourcePathResult = getResourcePathTest("/static/logo.png");
},
testDeviceInfo() {
let array = getDeviceInfoTest();
this.deviceInfoResult = array.map((value) => {
return JSON.parse(value)
})
},
testAppInfo() {
let array = getAppInfoTest();
this.appInfoResult = array.map((value) => {
return JSON.parse(value)
})
},
testSystemSetting() {
this.systemSettingResult = getSystemSettingTest();
},
testTypeof() {
let array = tepeofTest();
this.typeofResult = array.map((value) => {
return JSON.parse(value)
})
},
testDataConvert() {
let array = dataConvertTest();
this.dataConvertResult = array.map((value) => {
return JSON.parse(value)
})
},
testAll() {
this.testCurrentVC();
this.testKeyWindow();
this.testColorConvert();
this.testResourcePath();
this.testDeviceInfo();
this.testAppInfo();
this.testSystemSetting();
this.testTypeof();
this.testDataConvert();
}
}
}
</script>
<style scoped>
.result {
text-align: left;
padding-left: 20px;
padding-right: 20px;
max-width: 100%;
overflow: auto;
overflow-wrap: normal;
}
</style>
\ No newline at end of file
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<button @tap="testShowAlert">确认框</button>
<button @tap="testShowPrompt">输入框</button>
</view>
</view>
</template>
<script>
import { showAlert,showPrompt } from '@/uni_modules/uts-alert'
export default {
data() {
return {
title:"Alert 示例"
}
},
methods:{
testShowAlert(){
showAlert("提示框","这是一个提示框", (index)=> {
let title:string
if (index == 0) {
title = "点击了确认"
} else{
title = "点击了取消"
}
uni.showToast({
title: title,
icon:'none'
})
})
},
testShowPrompt() {
showPrompt("输入框","这是一个输入框","请输入内容", (content)=>{
let title = content.length > 0 ? content : "没有输入内容"
uni.showToast({
title: title,
icon:'none'
})
})
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<view>
<page-head title="监听系统截屏" accordion></page-head>
<button @click="testScreenShotListen">监听截屏事件</button>
<button @click="testScreenShotOff">关闭截屏监听</button>
<image :src="screenImage" mode="aspectFit" style="margin-top:10px"></image>
</view>
</template>
<script>
import {
onUserCaptureScreen,
offUserCaptureScreen
} from "@/uni_modules/uts-screenshot-listener";
export default {
data() {
return {
screenImage:""
}
},
methods: {
testScreenShotListen() {
var that = this;
onUserCaptureScreen(function(res) {
console.log(res);
if (uni.getSystemInfoSync().platform == "android") {
// 除android 之外的平台,不需要判断返回状态码
if(res.errCode == -1){
// 启动失败
return ;
}else if(res.errCode == 0){
uni.showToast({
icon:"none",
title:'截屏监听已开启'
})
}else {
uni.showToast({
icon:"none",
title:'捕获截屏事件'
})
if (res.image != null) {
that.screenImage = res.image!
}
}
}else{
// 除android 之外的平台,不需要判断返回状态码
uni.showToast({
icon:"none",
title:'捕获截屏事件'
})
}
});
if (uni.getSystemInfoSync().platform != "android") {
// 除android 之外的平台,直接提示监听已开启
uni.showToast({
icon:"none",
title:'截屏监听已开启'
})
}
},
testScreenShotOff() {
var that = this;
offUserCaptureScreen(function(res) {
console.log(res);
});
// 提示已经开始监听,注意观察
uni.showToast({
icon:"none",
title:'截屏监听已关闭'
})
},
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -2,10 +2,8 @@
<view>
<page-head title="监听系统截屏" accordion></page-head>
<uni-list>
<uni-list-item @tap="testScreenShotListen" title="监听截屏事件" class="itemButton" :clickable="true"/>
<uni-list-item @tap="testScreenShotOff" title="关闭截屏监听" class="itemButton" :clickable="true"/>
</uni-list>
<button @click="testScreenShotListen">监听截屏事件</button>
<button @click="testScreenShotOff">关闭截屏监听</button>
<image :src="screenImage" mode="aspectFit" style="margin-top:10px"></image>
......
<template>
<view class="uni-container">
<page-head :title="title"></page-head>
<view class="uni-panel" v-for="(item, index) in list" :key="index">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index)">
<text class="uni-panel-text">{{item.name}}</text>
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon"
class="uni-icon"></image>
</view>
<view class="uni-panel-c" v-if="item.open">
<view class="uni-navigate-item" v-for="(page,key) in item.pages" :key="key" @click="goDetailPage(page)" hover-class="uni-navigate-item-active">
<text class="uni-navigate-text">{{page.name}}</text>
<image :src="arrowRightIcon" class="uni-icon" v-if="page.url"></image>
</view>
</view>
</view>
</view>
</template>
<script lang="ts">
import { gotoDemoActivity } from "@/uni_modules/uts-nativepage";
import { getBatteryInfo, GetBatteryInfoOptions } from "@/uni_modules/uts-getbatteryinfo";
type Page = {
name : string,
url ?: string
function ?: string
}
type ListItem = {
name : string,
open : boolean,
pages : Page[],
}
export default {
data() {
return {
title: '系统API示例',
list: [{
name: "设备相关",
open: false,
pages: [{
name: "获取电池电量",
function: "testGetBatteryCapacity"
}] as Page[]
},
{
name: "系统事件",
open: false,
pages: [{
name: "监听系统截屏",
url: "SystemAPI/ScreenListen/screenlisten"
}] as Page[]
},
{
name: "Alert系统弹窗",
open: false,
pages: [{
name: "Alert弹窗",
url: "SystemAPI/Alert/alert"
}] as Page[]
},
{
name: "android平台",
open: false,
pages: [{
name: "自定义activity(需自定义基座)",
function: "testGotoDemoActivity"
}] as Page[]
}
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index: number) {
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open;
} else {
this.list[i].open = false;
}
}
},
goDetailPage(e: Page) {
if (e.function != null) {
const funName = e.function
switch (funName) {
case 'testGetBatteryCapacity':
this.testGetBatteryCapacity()
break
case 'testGotoDemoActivity':
this.testGotoDemoActivity()
break
}
return
}
uni.navigateTo({
url: `/pages/${e.url}`
})
},
testGetBatteryCapacity() {
getBatteryInfo({
success(res) {
uni.showToast({
title: "当前电量:" + (res as UTSJSONObject)['level'] + '%',
icon: 'none'
});
}
} as GetBatteryInfoOptions)
},
testGotoDemoActivity() {
let ret = gotoDemoActivity();
if (!ret) {
uni.showToast({
icon: 'none',
title: '需要在自定义基座中运行'
})
}
}
}
}
</script>
<style>
@import '@/common/uni-uvue.css';
</style>
\ No newline at end of file
<template>
<view>
<view class="uni-container">
<page-head :title="title"></page-head>
<uni-collapse>
<uni-collapse-item title="设备相关" :border="false">
<uni-list>
<uni-list-item @tap="testGetBatteryCapacity" title="获取电池电量" class="itemButton" :clickable="true"/>
</uni-list>
</uni-collapse-item>
</uni-collapse>
<uni-collapse>
<uni-collapse-item title="系统事件" :border="false">
<uni-list>
<uni-list-item @tap="gotoScreenListen" title="监听系统截屏" class="itemButton" :clickable="true" link/>
</uni-list>
</uni-collapse-item>
</uni-collapse>
<uni-collapse>
<uni-collapse-item title="Alert系统弹窗" :border="false">
<uni-list>
<uni-list-item @tap="gotoAlert" title="Alert弹窗" class="itemButton" :clickable="true" link/>
</uni-list>
</uni-collapse-item>
</uni-collapse>
<uni-collapse>
<uni-collapse-item title="android平台" :border="false">
<uni-list>
<uni-list-item @tap="testGotoDemoActivity" title="自定义activity(需自定义基座)" class="itemButton" :clickable="true" link/>
</uni-list>
</uni-collapse-item>
</uni-collapse>
<view class="uni-panel" v-for="(item, index) in list" :key="index">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index, item)">
<text class="uni-panel-text">{{item.name}}</text>
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon"
class="uni-icon"></image>
</view>
<view class="uni-panel-c" v-if="item.open">
<view class="uni-navigate-item" v-for="(page,key) in item.pages" :key="key" @click="goDetailPage(page)" hover-class="uni-navigate-item-active">
<text class="uni-navigate-text">{{page.name}}</text>
<image :src="arrowRightIcon" class="uni-icon" v-if="page.url"></image>
</view>
</view>
</view>
</template>
</view>
</template>·
<script>
import gotoDemoActivity from "@/uni_modules/uts-nativepage";
import getBatteryInfo from "@/uni_modules/uts-getbatteryinfo";
import { gotoDemoActivity } from "@/uni_modules/uts-nativepage";
import { getBatteryInfo } from "@/uni_modules/uts-getbatteryinfo";
export default {
data() {
return {
title: '系统API示例',
list: [{
name: "设备相关",
open: false,
pages: [{
name: "获取电池电量",
function: "testGetBatteryCapacity"
}]
},
{
name: "系统事件",
open: false,
pages: [{
name: "监听系统截屏",
url: "SystemAPI/ScreenListen/screenlisten"
}]
},
{
name: "Alert系统弹窗",
open: false,
pages: [{
name: "Alert弹窗",
url: "SystemAPI/Alert/alert"
}]
},
{
name: "android平台",
open: false,
pages: [{
name: "自定义activity(需自定义基座)",
function: "testGotoDemoActivity"
}]
}
],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
onUnload: function() {},
methods: {
triggerCollapse(index) {
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open;
} else {
this.list[i].open = false;
}
}
},
goDetailPage(e) {
if (e.function) {
this[e.function]()
return
}
uni.navigateTo({
url: `/pages/${e.url}`
})
},
testGetBatteryCapacity() {
getBatteryInfo({
success(res) {
console.log(res)
uni.showToast({
title: "当前电量:" + res.level + '%',
icon: 'none'
......@@ -61,34 +95,23 @@
}
})
},
gotoScreenListen(){
uni.navigateTo({
url:'/pages/SystemAPI/ScreenListen/screenlisten'
})
},
gotoAlert(){
uni.navigateTo({
url:'/pages/SystemAPI/Alert/alert'
})
},
testGotoDemoActivity() {
let ret = gotoDemoActivity();
if(!ret){
if (!ret) {
uni.showToast({
icon:'none',
title:'需要在自定义基座中运行'
icon: 'none',
title: '需要在自定义基座中运行'
})
}
}
}
}
</script>
<style>
.screenImage{
width: 100%;
height: 380px;
}
@import '@/common/uni-uvue.css';
.uni-container {
min-height: 100%;
}
</style>
\ No newline at end of file
<template>
<view class="uni-container">
<page-head :title="title"></page-head>
<view class="uni-panel" v-for="(item, index) in list" :key="index">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index)">
<text class="uni-panel-text">{{item.name}}</text>
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon"
class="uni-icon"></image>
</view>
<view class="uni-panel-c" v-if="item.open">
<view class="uni-navigate-item" v-for="(page,key) in item.pages" :key="key" @click="goDetailPage(page)"
hover-class="uni-navigate-item-active">
<text class="uni-navigate-text">{{page.name}}</text>
<image :src="arrowRightIcon" class="uni-icon" v-if="page.url"></image>
</view>
</view>
</view>
</view>
</template>
<script>
import {
doTimerTask,
doIntervalTask,
clearIntervalTask,
playAssetAudio,
getMetaConfig,
quitApp,
TimerOptions
} from "../../uni_modules/uts-advance";
type Page = {
name : string,
url ?: string
function ?: string
}
type ListItem = {
name : string,
open : boolean,
pages : Page[],
}
export default {
data() {
return {
title: 'UTS进阶示例',
taskId: 0,
list: [{
name: "延迟任务",
open: false,
pages: [{
name: "开启延迟任务",
function: "testTimer"
}] as Page[]
},
{
name: "定时任务",
open: false,
pages: [{
name: "开启定时任务",
function: "testInterval"
}, {
name: "关闭定时任务",
function: "testClearInterval"
}] as Page[]
},
{
name: "语法示例",
open: false,
pages: [{
name: "进阶语法示例",
url: "SyntaxCase/index"
}, {
name: "参数传递示例",
url: "SyntaxCase/paramTest"
}, {
name: "实例测试示例",
url: "SyntaxCase/instanceTest"
}] as Page[]
},
{
name: "日志打印",
open: false,
pages: [{
name: "console示例",
url: "SyntaxCase/consoleTest"
}] as Page[]
},
{
name: "平台代码示例",
open: false,
pages: [{
name: "UTSAndroid",
url: "SyntaxCase/utsAndroid"
}, {
name: "UTSiOS",
url: "SyntaxCase/utsiOS"
}] as Page[]
},
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index : number) {
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open;
} else {
this.list[i].open = false;
}
}
},
goDetailPage(e : Page) {
if (e.function != null) {
const funName = e.function
switch (funName) {
case 'testTimer':
this.testTimer()
break
case 'testInterval':
this.testInterval()
break
case 'testClearInterval':
this.testClearInterval()
break
}
return
}
uni.navigateTo({
url: `/pages/${e.url}`
})
},
/**
* 测试延迟任务
*/
testTimer: function () {
doTimerTask({
start: function (response) {
uni.showToast({
title: response,
icon: 'none'
});
},
work: function (response) {
uni.showToast({
title: response,
icon: 'none'
});
},
} as TimerOptions);
},
/**
* 测试周期任务
*/
testInterval: function () {
var ret = doIntervalTask({
start: function (response) {
uni.showToast({
title: response,
icon: 'none'
});
},
work: function (response) {
uni.showToast({
title: response,
icon: 'none'
});
},
} as TimerOptions);
if (ret.taskId != null) {
this.taskId = ret.taskId!;
}
},
/**
* 取消周期任务
*/
testClearInterval: function () {
console.log(this.taskId);
clearIntervalTask(this.taskId);
},
// testInputDialog() {
// getUserInput(function (res) {
// console.log(res);
// });
// },
testQuitApp() {
quitApp()
},
testMetaRead() {
let ret = getMetaConfig();
uni.showToast({
icon: "none",
title: '读取成功,注意查看控制台输出'
});
console.log(ret);
}
}
}
</script>
<style>
@import '@/common/uni-uvue.css';
.uni-container {
/* min-height: 100%; */
}
</style>
\ No newline at end of file
<template>
<view>
<page-head :title="title" accordion></page-head>
<uni-collapse accordion>
<uni-collapse-item title="延迟任务" :border="false">
<uni-list>
<uni-list-item @tap="testTimer" title="开启延迟任务" :clickable="true">
</uni-list-item>
</uni-list>
</uni-collapse-item>
<uni-collapse-item title="定时任务" :border="false">
<uni-list>
<uni-list-item @tap="testInterval" title="开启定时任务" :clickable="true">
</uni-list-item>
<uni-list-item @tap="testClearInterval" title="关闭定时任务" :clickable="true">
</uni-list-item>
</uni-list>
</uni-collapse-item>
<uni-collapse-item title="语法示例" :border="false">
<uni-list>
<uni-list-item @tap="testSyntax" title="进阶语法示例" :clickable="true" link>
</uni-list-item>
</uni-list>
</uni-collapse-item>
<uni-collapse-item title="资源加载示例" :border="false">
<uni-list>
<uni-list-item @tap="gotoResourceDemo" title="图片加载示例" :clickable="true" link>
</uni-list-item>
</uni-list>
</uni-collapse-item>
<uni-collapse-item title="组件开发示例" :border="false">
<uni-list>
<uni-list-item @tap="testHelloUTSComponent" title="Hello UTS Component" :clickable="true" link />
</uni-list>
</uni-collapse-item>
<uni-collapse-item title="android平台示例" :border="false">
<uni-list>
<uni-list-item @tap="testLifecyle" title="activity生命周期监听" :clickable="true" link />
<uni-list-item @tap="testAssetLoad" title="播放asset音频(需自定义基座)" :clickable="true" link/>
<uni-list-item @tap="gotoDecorView" title="操作DecorView" :clickable="true" link />
<uni-list-item @tap="testMetaRead" title="读取meta配置" :clickable="true" />
</uni-list>
</uni-collapse-item>
<uni-collapse-item title="iOS平台示例" :border="false">
<uni-list>
<uni-list-item @tap="testGetResourcePath" title="资源路径获取示例" :clickable="true" link />
</uni-list>
</uni-collapse-item>
</uni-collapse>
<view class="uni-container">
<page-head :title="title"></page-head>
<view class="uni-panel" v-for="(item, index) in list" :key="index">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index, item)">
<text class="uni-panel-text">{{item.name}}</text>
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon"
class="uni-icon"></image>
</view>
<view class="uni-panel-c" v-if="item.open">
<view class="uni-navigate-item" v-for="(page,key) in item.pages" :key="key" @click="goDetailPage(page)" hover-class="uni-navigate-item-active">
<text class="uni-navigate-text">{{page.name}}</text>
<image :src="arrowRightIcon" class="uni-icon" v-if="page.url"></image>
</view>
</view>
</view>
</view>
</template>
<script>
......@@ -70,19 +23,144 @@
doIntervalTask,
clearIntervalTask,
playAssetAudio,
getMetaConfig
getMetaConfig,
quitApp,
arrayConvert
} from "../../uni_modules/uts-advance";
export default {
data() {
return {
title: 'UTS进阶示例',
taskId: 0,
list: [{
name: "延迟任务",
open: false,
pages: [{
name: "开启延迟任务",
function: "testTimer"
}]
},
{
name: "定时任务",
open: false,
pages: [{
name: "开启定时任务",
function: "testInterval"
}, {
name: "关闭定时任务",
function: "testClearInterval"
}]
},
{
name: "资源加载示例",
open: false,
pages: [{
name: "图片加载示例",
url: "resource/resource"
},{
name: "文件读取示例",
url: "resource/fileRead"
}]
},
{
name: "组件开发示例",
open: false,
pages: [{
name: "Hello UTS Component",
url: "component/helloView"
}]
},
{
name: "android平台示例",
open: false,
pages: [{
name: "activity生命周期监听",
url: "lifecycle/lifecycle"
}, {
name: "播放asset音频(需自定义基座)",
url: "advance/android/assetaudio"
}, {
name: "操作DecorView",
url: "advance/android/decorview"
}, {
name: "读取meta配置",
function: "testMetaRead"
}, {
name: "退出当前应用",
function: "testQuitApp"
},{
name: "数组转换测试",
function: "testArrayConvert"
}]
},
{
name: "iOS平台示例",
open: false,
pages: [{
name: "资源路径获取示例",
url: "advance/iOS/getResourcePath"
}]
},
{
name: "语法示例",
open: false,
pages: [{
name: "进阶语法示例",
url: "SyntaxCase/index"
}, {
name: "参数传递示例",
url: "SyntaxCase/paramTest"
},{
name: "实例测试示例",
url: "SyntaxCase/instanceTest"
}]
},
{
name: "日志打印",
open: false,
pages: [{
name: "console示例",
url: "SyntaxCase/consoleTest"
}]
},
{
name: "平台代码示例",
open: false,
pages: [{
name: "UTSAndroid",
url: "SyntaxCase/utsAndroid"
}, {
name: "UTSiOS",
url: "SyntaxCase/utsiOS"
}]
},
],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index) {
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open;
} else {
this.list[i].open = false;
}
}
},
goDetailPage(e) {
if (e.function) {
this[e.function]()
return
}
uni.navigateTo({
url: `/pages/${e.url}`
})
},
/**
* 测试延迟任务
......@@ -130,60 +208,30 @@
console.log(this.taskId);
clearIntervalTask(this.taskId);
},
/**
* 跳转至资源加载演示界面
*/
gotoResourceDemo: function() {
uni.navigateTo({
url: '/pages/resource/resource'
})
},
gotoDecorView: function() {
uni.navigateTo({
url: '/pages/advance/android/decorview'
})
},
testAssetLoad() {
// playAssetAudio();
uni.navigateTo({
url: '/pages/advance/android/assetaudio'
})
},
testInputDialog() {
getUserInput(function(res){
getUserInput(function(res) {
console.log(res);
});
},
testQuitApp() {
quitApp()
},
testArrayConvert() {
let convertRet = arrayConvert()
if(convertRet){
uni.showToast({
icon: "none",
title: '数组转换成功'
});
}
},
testMetaRead() {
let ret = getMetaConfig();
uni.showToast({
icon:"none",
icon: "none",
title: '读取成功,注意查看控制台输出'
});
console.log(ret);
},
testLifecyle: function() {
uni.navigateTo({
url: '/pages/lifecycle/lifecycle'
})
},
testHelloUTSComponent: function() {
uni.navigateTo({
url: '/pages/component/helloView'
})
},
testSyntax: function() {
uni.navigateTo({
url: '/pages/SyntaxCase/index'
})
},
testGetResourcePath: function() {
uni.navigateTo({
url: '/pages/advance/iOS/getResourcePath'
})
}
}
......@@ -191,5 +239,9 @@
</script>
<style>
@import '@/common/uni-uvue.css';
.uni-container {
min-height: 100%;
}
</style>
\ No newline at end of file
<template>
<view>
<page-head title="asset 音频播放示例" accordion></page-head>
<button @click="testStart">播放asset音频</button>
<button @click="testStop">停止播放asset音频</button>
</view>
</template>
<script>
import {
playAssetAudio,
stopAssetAudio
} from "../../../uni_modules/uts-advance";
export default {
data() {
return {
}
},
methods: {
/**
* 测试添加View实例至顶层容器
*/
testStart: function() {
playAssetAudio();
},
/**
* 测试移除顶层容器的View实例
*/
testStop: function() {
stopAssetAudio();
}
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -2,10 +2,8 @@
<view>
<page-head title="asset 音频播放示例" accordion></page-head>
<uni-list>
<uni-list-item title="播放asset音频" :clickable="true" @tap="testStart"></uni-list-item>
<uni-list-item title="停止播放asset音频" :clickable="true" @tap="testStop"></uni-list-item>
</uni-list>
<button @click="testStart">播放asset音频</button>
<button @click="testStop">停止播放asset音频</button>
</view>
</template>
......
<template>
<view>
<page-head title="DecorView示例" accordion></page-head>
<button @click="testAddToDecorView">添加TextView至视图顶层</button>
<button @click="testRemoveToDecorView">移除视图顶层的TextView</button>
</view>
</template>
<script>
import {
addViewToDecorView,
removeViewToDecorView
} from "../../../uni_modules/uts-advance";
export default {
data() {
return {
title: 'UTS进阶示例',
}
},
methods: {
/**
* 测试添加View实例至顶层容器
*/
testAddToDecorView: function() {
addViewToDecorView();
},
/**
* 测试移除顶层容器的View实例
*/
testRemoveToDecorView: function() {
removeViewToDecorView();
}
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -2,10 +2,8 @@
<view>
<page-head title="DecorView示例" accordion></page-head>
<uni-list>
<uni-list-item title="添加TextView至视图顶层" :clickable="true" @tap="testAddToDecorView"></uni-list-item>
<uni-list-item title="移除视图顶层的TextView" :clickable="true" @tap="testRemoveToDecorView"></uni-list-item>
</uni-list>
<button @click="testAddToDecorView">添加TextView至视图顶层</button>
<button @click="testRemoveToDecorView">移除视图顶层的TextView</button>
</view>
</template>
......
<template>
<view>
<page-head title="资源路径获取示例" accordion></page-head>
<button @tap="getResourcePath">获取本地资源路径</button>
</view>
</template>
<script>
// import { getResourcePath } from '@/uni_modules/uts-advance'
// import { removeExampleImageView } from '@/uni_modules/uts-advance'
export default {
onUnload() {
// removeExampleImageView()
},
methods:{
getResourcePath(){
// getResourcePath("/static/logo.png")
}
}
}
</script>
<style>
.text-box {
margin-bottom: 40rpx;
padding: 40rpx 0;
display: flex;
min-height: 300rpx;
background-color: #FFFFFF;
justify-content: center;
align-items: center;
text-align: center;
font-size: 30rpx;
color: #353535;
line-height: 1.8;
}
</style>
<template>
<view>
暂时不支持 todo
</view>
</template>
<script>
</script>
<style>
</style>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
<template>
<view>
<page-head :title="title"></page-head>
</view>
</template>
<script>
export default {
data() {
return {
title: '文件读取示例-todo',
}
},
methods: {
}
}
</script>
<style>
</style>
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册