提交 ff75f65c 编写于 作者: 杜庆泉's avatar 杜庆泉

Merge branch 'master' of http://git.dcloud.io/uni-app-x/hello-uniapp-x into master

......@@ -67,6 +67,12 @@
"navigationBarTitleText": "slider"
}
},
{
"path": "pages/component/slider-100/slider-100",
"style": {
"navigationBarTitleText": "slider x 100"
}
},
{
"path": "pages/component/switch/switch",
"style": {
......@@ -84,24 +90,24 @@
"style": {
"navigationBarTitleText": "image"
}
},
{
"path": "pages/component/image/image-format",
"style": {
"navigationBarTitleText": "image-format"
}
},
{
"path": "pages/component/image/image-mode",
"style": {
"navigationBarTitleText": "image-mode"
}
},
{
"path": "pages/component/image/image-path",
"style": {
"navigationBarTitleText": "image-path"
}
},
{
"path": "pages/component/image/image-format",
"style": {
"navigationBarTitleText": "image-format"
}
},
{
"path": "pages/component/image/image-mode",
"style": {
"navigationBarTitleText": "image-mode"
}
},
{
"path": "pages/component/image/image-path",
"style": {
"navigationBarTitleText": "image-path"
}
},
{
"path": "pages/component/web-view/web-view",
......@@ -521,6 +527,23 @@
"enablePullDownRefresh": false
}
}, {
"path" : "pages/component/scroll-view/scroll-view-refresher",
"style" :
{
"navigationBarTitleText": "scroll-view-refresher",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/component/list/list",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
......
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view v-if="imageSrc" class="image-container">
<view class="uni-padding-wrap uni-common-mt">
<view v-if="imageSrc" class="image-container">
<image class="img" :src="imageSrc" mode="center" />
</view>
<view v-else style="margin-top: 50px;">
......@@ -17,35 +17,51 @@
</view>
</template>
<script>
import DownloadTask from 'uts.sdk.modules.DCloudUniNetwork.DownloadTask';
export default {
data() {
return {
title: 'downloadFile',
imageSrc: ''
imageSrc: '',
task: null as DownloadTask | null,
pageVisible: false
}
},
onLoad() {
this.pageVisible = true;
},
onUnload() {
this.imageSrc = '';
this.pageVisible = false;
uni.hideLoading();
this.task?.abort();
},
methods: {
downloadImage: function () {
downloadImage: function() {
uni.showLoading({
title:'下载中'
title: '下载中'
})
var self = this
let task = uni.downloadFile({
url: "http://192.168.12.106:8080/downloadfile",
success(res) {
console.log('downloadFile success, res is', res)
self.imageSrc = res.tempFilePath;
uni.hideLoading();
},
fail: (err) => {
console.log('downloadFile fail, err is:', err)
}
});
task!.onProgressUpdate((update) => {
console.log("progress : ", update.progress);
this.task = uni.downloadFile({
url: "https://web-assets.dcloud.net.cn/unidoc/zh/uni-app.png",
success(res) {
if (this.pageVisible) {
console.log('downloadFile success, res is', res)
self.imageSrc = res.tempFilePath;
uni.hideLoading();
}
},
fail: (err) => {
if (this.pageVisible) {
console.log('downloadFile fail, err is:', err)
uni.hideLoading();
}
}
});
this.task?.onProgressUpdate((update) => {
if (this.pageVisible) {
console.log("progress : ", update.progress);
}
})
}
}
......@@ -53,14 +69,15 @@
</script>
<style>
.img {
width: 500rpx;
height: 500rpx;
margin: 0 auto;
}
.image-container {
display: flex;
justify-content: center;
align-items: center;
}
</style>
.img {
width: 500rpx;
height: 500rpx;
margin: 0 auto;
}
.image-container {
display: flex;
justify-content: center;
align-items: center;
}
</style>
\ No newline at end of file
......@@ -15,55 +15,70 @@
</view>
</template>
<script>
import RequestTask from 'uts.sdk.modules.DCloudUniNetwork.RequestTask';
const duration = 2000
export default {
data() {
return {
title: 'request',
loading: false,
res: ''
res: '',
task: null as RequestTask | null,
pageVisible: false
}
},
onLoad() {
this.pageVisible = true;
},
onUnload() {
this.pageVisible = false;
uni.hideLoading();
this.task?.abort();
},
methods: {
sendRequest() {
this.loading = true;
uni.request({
url: "http://192.168.12.106:8080/postHalo",
dataType: "json",
responseType: "json",
method: "POST",
data: {
platform: "ios",
},
header: {
"Content-Type": "application/json",
},
timeout: 6000,
sslVerify: false,
withCredentials: false,
firstIpv4: false,
success(res) {
console.log('request success', res)
uni.showToast({
title: '请求成功',
icon: 'success',
mask: true,
duration: duration
});
this.res = '请求结果 : ' + JSON.stringify(res);
},
fail(err) {
console.log('request fail', err);
uni.showModal({
content: err.errMsg,
showCancel: false
});
},
complete() {
this.loading = false;
},
});
this.loading = true;
this.task = uni.request({
url: "https://unidemo.dcloud.net.cn/ajax/echo/text?name=uni-app",
dataType: "json",
responseType: "json",
method: "POST",
data: {
platform: "ios",
},
header: {
"Content-Type": "application/json",
},
timeout: 6000,
sslVerify: false,
withCredentials: false,
firstIpv4: false,
success(res) {
if (this.pageVisible) {
console.log('request success', res)
uni.showToast({
title: '请求成功',
icon: 'success',
mask: true,
duration: duration
});
this.res = '请求结果 : ' + JSON.stringify(res);
}
},
fail(err) {
if (this.pageVisible) {
console.log('request fail', err);
uni.showModal({
content: err.errMsg,
showCancel: false
});
}
},
complete() {
this.loading = false;
},
});
}
}
}
</script>
</script>
\ No newline at end of file
......@@ -10,15 +10,24 @@
</view>
</template>
<script>
import UploadTask from 'uts.sdk.modules.DCloudUniNetwork.UploadTask';
export default {
data() {
return {
title: 'uploadFile',
imageSrc: ''
imageSrc: '',
task: null as UploadTask | null,
pageVisible: false
}
},
onLoad() {
this.pageVisible = true;
},
onUnload() {
this.imageSrc = '';
this.pageVisible = false;
uni.hideLoading();
this.task?.abort();
},
methods: {
chooseImage: function() {
......@@ -29,28 +38,37 @@
success: (res) => {
console.log('chooseImage success, temp path is', res.tempFilePaths[0])
var imageSrc = res.tempFilePaths[0]
uni.uploadFile({
url: 'http://192.168.12.106:8080/uploadFile', //仅为示例,非真实的接口地址
uni.showLoading({
title: '上传中'
})
this.task = uni.uploadFile({
url: 'https://unidemo.dcloud.net.cn/upload', //仅为示例,非真实的接口地址
filePath: imageSrc,
name: 'file',
formData: {
'user': 'test'
},
success: (res) => {
console.log('uploadImage success, res is:', res)
uni.showToast({
title: '上传成功',
icon: 'success',
duration: 1000
})
this.imageSrc = imageSrc
if (this.pageVisible) {
console.log('uploadImage success, res is:', res)
uni.hideLoading();
uni.showToast({
title: '上传成功',
icon: 'success',
duration: 1000
})
this.imageSrc = imageSrc
}
},
fail: (err) => {
console.log('uploadImage fail', err);
uni.showModal({
content: err.errMsg,
showCancel: false
});
if (this.pageVisible) {
console.log('uploadImage fail', err);
uni.hideLoading();
uni.showModal({
content: err.errMsg,
showCancel: false
});
}
},
});
},
......
<template>
<view>
<page-head title="websocket通讯示例"></page-head>
<view class="uni-padding-wrap">
<view class="uni-btn-v">
<view class="websocket-msg">{{showMsg}}</view>
<button class="uni-btn-v" type="primary" @click="connect">连接websocket服务</button>
<button class="uni-btn-v" v-show="connected" type="primary" @click="send">发送一条消息</button>
<button class="uni-btn-v" type="primary" @click="close">断开websocket服务</button>
<view class="websocket-tips">发送消息后会收到一条服务器返回的消息(与发送的消息内容一致)</view>
</view>
</view>
</view>
</template>
<script>
import CloseSocketOptions from 'uts.sdk.modules.DCloudUniWebsocket.CloseSocketOptions';
export default {
data() {
return {
connected: false,
connecting: false,
msg: "",
roomId: '',
platform :"",
}
},
computed: {
showMsg():string {
if (this.connected) {
if (this.msg.length > 0) {
return '收到消息:' + this.msg
} else {
return '等待接收消息'
}
} else {
return '尚未连接'
}
}
},
onLoad() {
this.platform = uni.getSystemInfoSync().platform;
},
<template>
<view>
<page-head title="websocket通讯示例"></page-head>
<view class="uni-padding-wrap">
<view class="uni-btn-v">
<view class="websocket-msg">{{showMsg}}</view>
<button class="uni-btn-v" type="primary" @click="connect">连接websocket服务</button>
<button class="uni-btn-v" v-show="connected" type="primary" @click="send">发送一条消息</button>
<button class="uni-btn-v" type="primary" @click="close">断开websocket服务</button>
<view class="websocket-tips">发送消息后会收到一条服务器返回的消息(与发送的消息内容一致)</view>
</view>
</view>
</view>
</template>
<script>
import CloseSocketOptions from 'uts.sdk.modules.DCloudUniWebsocket.CloseSocketOptions';
export default {
data() {
return {
connected: false,
connecting: false,
msg: "",
roomId: '',
platform: "",
pageVisible: false
}
},
computed: {
showMsg(): string {
if (this.connected) {
if (this.msg.length > 0) {
return '收到消息:' + this.msg
} else {
return '等待接收消息'
}
} else {
return '尚未连接'
}
}
},
onLoad() {
this.platform = uni.getSystemInfoSync().platform;
this.pageVisible = true;
},
onUnload() {
const closeOptions = new CloseSocketOptions();
uni.closeSocket(closeOptions);
uni.hideLoading()
},
methods: {
connect() {
if (this.connected || this.connecting) {
uni.showModal({
content: '正在连接或者已经连接,请勿重复连接',
showCancel: false
})
return
}
this.connecting = true
uni.showLoading({
title: '连接中...'
})
uni.connectSocket({
url: 'ws://192.168.12.106:8080/ws',
success(res) {
// 这里是接口调用成功的回调,不是连接成功的回调,请注意
},
fail(err) {
// 这里是接口调用失败的回调,不是连接失败的回调,请注意
}
})
uni.onSocketOpen((res) => {
this.connecting = false
this.connected = true
uni.hideLoading()
uni.showToast({
icon: 'none',
title: '连接成功'
})
console.log('onOpen', res);
})
uni.onSocketError((err) => {
this.connecting = false
this.connected = false
uni.hideLoading()
uni.showModal({
content: '连接失败,可能是websocket服务不可用,请稍后再试',
showCancel: false
})
console.log('onError', err);
})
uni.onSocketMessage((res) => {
this.msg = res.data as string
console.log('onMessage', res)
})
uni.onSocketClose((res) => {
this.connected = false
this.msg = ""
console.log('onClose', res)
})
},
send() {
uni.sendSocketMessage({
data: 'from ' + platform + ' : ' + parseInt((Math.random() * 10000).toString()).toString(),
success(res) {
console.log(res);
},
fail(err) {
console.log(err);
}
})
},
close() {
const closeSocketOptions = new CloseSocketOptions();
uni.closeSocket(closeSocketOptions)
}
}
}
</script>
<style>
.uni-btn-v {
padding: 10rpx 0;
}
.uni-btn-v {
margin: 20rpx 0;
}
.websocket-room {
height: 40px;
line-height: 40px;
text-align: center;
border-bottom: solid 1px #DDDDDD;
margin-bottom: 20px;
}
.websocket-msg {
padding: 40px 0px;
text-align: center;
font-size: 14px;
line-height: 40px;
color: #666666;
}
.websocket-tips{
padding: 40px 0px;
text-align: center;
font-size: 14px;
line-height: 24px;
color: #666666;
}
</style>
this.pageVisible = false;
const closeOptions = new CloseSocketOptions();
uni.closeSocket(closeOptions);
uni.hideLoading()
},
methods: {
connect() {
if (this.connected || this.connecting) {
uni.showModal({
content: '正在连接或者已经连接,请勿重复连接',
showCancel: false
})
return
}
this.connecting = true
uni.showLoading({
title: '连接中...'
})
uni.connectSocket({
url: 'ws://192.168.12.106:8080/ws',
success(res) {
// 这里是接口调用成功的回调,不是连接成功的回调,请注意
},
fail(err) {
// 这里是接口调用失败的回调,不是连接失败的回调,请注意
}
})
uni.onSocketOpen((res) => {
if (this.pageVisible) {
this.connecting = false
this.connected = true
uni.hideLoading()
uni.showToast({
icon: 'none',
title: '连接成功'
})
console.log('onOpen', res);
}
})
uni.onSocketError((err) => {
if (this.pageVisible) {
this.connecting = false
this.connected = false
uni.hideLoading()
uni.showModal({
content: '连接失败,可能是websocket服务不可用,请稍后再试',
showCancel: false
})
console.log('onError', err);
}
})
uni.onSocketMessage((res) => {
if (this.pageVisible) {
this.msg = res.data as string
console.log('onMessage', res)
}
})
uni.onSocketClose((res) => {
if (this.pageVisible) {
this.connected = false
this.msg = ""
console.log('onClose', res)
}
})
},
send() {
uni.sendSocketMessage({
data: 'from ' + platform + ' : ' + parseInt((Math.random() * 10000).toString()).toString(),
success(res) {
console.log(res);
},
fail(err) {
console.log(err);
}
})
},
close() {
const closeSocketOptions = new CloseSocketOptions();
uni.closeSocket(closeSocketOptions)
}
}
}
</script>
<style>
.uni-btn-v {
padding: 10rpx 0;
}
.uni-btn-v {
margin: 20rpx 0;
}
.websocket-room {
height: 40px;
line-height: 40px;
text-align: center;
border-bottom: solid 1px #DDDDDD;
margin-bottom: 20px;
}
.websocket-msg {
padding: 40px 0px;
text-align: center;
font-size: 14px;
line-height: 40px;
color: #666666;
}
.websocket-tips {
padding: 40px 0px;
text-align: center;
font-size: 14px;
line-height: 24px;
color: #666666;
}
</style>
\ No newline at end of file
......@@ -24,8 +24,9 @@
connected: false,
connecting: false,
socketTask: null as SocketTask | null,
msg: "",
platform :"",
msg: "",
platform: "",
pageVisible: false
}
},
computed: {
......@@ -40,14 +41,16 @@
return '尚未连接'
}
}
},
onReady() {
this.platform = uni.getSystemInfoSync().platform;
},
onLoad() {
this.platform = uni.getSystemInfoSync().platform;
this.pageVisible = true;
},
onUnload() {
this.pageVisible = false;
uni.hideLoading()
let task = this.socketTask;
if (task != null) {
let task = this.socketTask;
if (task != null) {
const closeOptions = new CloseSocketOptions();
task.close(closeOptions)
}
......@@ -64,7 +67,7 @@
this.connecting = true
uni.showLoading({
title: '连接中...'
})
})
this.socketTask = uni.connectSocket({
url: 'ws://192.168.12.106:8080/ws',
success(res) {
......@@ -73,36 +76,44 @@
fail(err) {
// 这里是接口调用失败的回调,不是连接失败的回调,请注意
}
})
})
this.socketTask?.onOpen((res) => {
this.connecting = false
this.connected = true
uni.hideLoading()
uni.showToast({
icon: 'none',
title: '连接成功'
})
console.log('onOpen', res);
if (this.pageVisible) {
this.connecting = false
this.connected = true
uni.hideLoading()
uni.showToast({
icon: 'none',
title: '连接成功'
})
console.log('onOpen', res);
}
})
this.socketTask?.onError((err) => {
this.connecting = false
this.connected = false
uni.hideLoading()
uni.showModal({
content: '连接失败,可能是websocket服务不可用,请稍后再试',
showCancel: false
})
console.log('onError', err);
if (this.pageVisible) {
this.connecting = false
this.connected = false
uni.hideLoading()
uni.showModal({
content: '连接失败,可能是websocket服务不可用,请稍后再试',
showCancel: false
})
console.log('onError', err);
}
})
this.socketTask?.onMessage((res) => {
this.msg = res.data as string
console.log('onMessage', res)
if (this.pageVisible) {
this.msg = res.data as string
console.log('onMessage', res)
}
})
this.socketTask?.onClose((res) => {
this.connected = false
this.socketTask = null
this.msg = ""
console.log('onClose', res)
if (this.pageVisible) {
this.connected = false
this.socketTask = null
this.msg = ""
console.log('onClose', res)
}
})
},
send() {
......@@ -116,7 +127,7 @@
},
close() {
let task = this.socketTask;
if (task != null) {
if (task != null) {
let closeOptions = new CloseSocketOptions();
task.close(closeOptions)
}
......
<template>
<view style="height: 100%;width: 100%;">
<page-head :title="title"></page-head>
<view class="container">
<list class="uni-list" :refresher-enabled="true" @refresherrefresh="onRefresherrefresh"
:refresher-triggered="refresherTriggered">
<cell class="list_cell" v-for="(item, index) in dataList" :key="item.id">
<view class="list-item">
<text class="list-item-title" :value="item.name"></text>
</view>
</cell>
</list>
</view>
</view>
</template>
<script lang="ts">
import RefresherEvent from 'io.dcloud.uniapp.runtime.RefresherEvent';
type Item = {
id : string,
name : string
}
export default {
data() {
return {
title: 'list',
refresherTriggered: false,
dataList: [] as Item[],
}
},
onLoad() {
for (var i = 0; i < 25; i++) {
const item : Item = { id: i + "", name: "item " + i }
this.dataList.push(item)
}
},
methods: {
onRefresherrefresh(e : RefresherEvent) {
this.refresherTriggered = true
setTimeout(function () {
this.refresherTriggered = false
}, 1000)
}
}
}
</script>
<style>
.uni-list {
background-color: #eee;
position: relative;
width: 100%;
flex: 1;
display: flex;
flex-direction: column;
border-color: red;
}
.container {
display: flex;
flex-direction: column;
border: dashed;
height: 100%;
width: 100%;
}
.list_cell{
display: flex;
justify-content: center;
align-items: center;
}
.list-item {
margin-left: 12px;
margin-right: 12px;
margin-top: 12px;
padding: 20px;
background-color: #fff;
border-radius: 5px;
}
.list-item-title {
font-size: 30px;
font-weight: bold;
color: #444;
width: 100%;
}
</style>
\ No newline at end of file
<template>
<view class="container">
<page-head title="scroll-view 下拉刷新"></page-head>
<scroll-view class="scroll" refresher-enabled = true @refresherrefresh="onRefresherrefresh" :refresher-triggered = "refresherTriggered">
<view v-for="key in scrollData" :key="key">
<view class="scroll-item">
<text class="scroll-item-title">{{key}}</text>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
import RefresherEvent from 'io.dcloud.uniapp.runtime.RefresherEvent';
export default {
data() {
return {
scrollData: [] as Array <string>,
refresherTriggered: false
};
},
onLoad() {
let lists: Array < string > = []
for (let i = 0; i < 20; i++) {
lists.push("item---"+i)
}
this.scrollData = lists
},
methods: {
onRefresherrefresh(e: RefresherEvent) {
console.log("onRefresherrefresh--------------下拉刷新触发")
this.refresherTriggered = true
setTimeout(function(){
this.refresherTriggered = false
}, 1500)
}
}
};
</script>
<style>
.container{
display: flex;
flex-direction: column;
border:dashed;
flex: 1;
}
.scroll {
background-color: #eee;
position: relative;
width: 100%;
flex: 1;
display: flex;
flex-direction: column;
border-color: red;
}
.scroll-item {
margin-left: 12rpx;
margin-right: 12rpx;
margin-top: 12rpx;
background-color: #fff;
border-radius: 8rpx;
}
.scroll-item-title {
width:100%;
height: 120rpx;
line-height: 120rpx;
text-align: center;
color: #555;
}
</style>
\ No newline at end of file
......@@ -7,8 +7,8 @@
<text class="uni-subtitle-text">纵向滚动</text>
</view>
<view>
<scroll-view :scrollTop="scrollTop" :scrollY="true" class="scroll-Y" @scrolltoupper="upper"
@scrolltolower="lower" @scroll="scroll">
<scroll-view :scrollTop="scrollTop" :scrollY="true" class="scroll-Y" scroll-with-animation="true"
@scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll">
<view id="demo1" class="scroll-view-item uni-bg-red"><text class="text">A</text></view>
<view id="demo2" class="scroll-view-item uni-bg-green"><text class="text">B</text></view>
<view id="demo3" class="scroll-view-item uni-bg-blue"><text class="text">C</text></view>
......@@ -18,6 +18,11 @@
<text class="uni-link">点击这里返回顶部</text>
</view>
<view class="uni-title uni-common-mt">
<text class="uni-subtitle-text">下拉刷新</text>
</view>
<button type="primary" class="button default-button" @click="gotoRefresher" size="mini">跳转"下拉刷新示例"</button>
<view class="uni-title uni-common-mt">
<text class="uni-title-text">Horizontal Scroll</text>
<text class="uni-subtitle-text">横向滚动</text>
......@@ -61,7 +66,12 @@
icon: "none",
title: "纵向滚动 scrollTop 值已被修改为 0"
})
}
},
gotoRefresher: function () {
uni.navigateTo({
url:"/pages/component/scroll-view/scroll-view-refresher"
})
}
}
}
</script>
......@@ -93,4 +103,7 @@
font-size: 36rpx;
color: #ffffff;
}
.button {
margin-top: 30rpx;
}
</style>
\ No newline at end of file
<template>
<view class="uni-padding-wrap">
<page-head :title="title"></page-head>
<view class="flex-row">
<view class="flex-fill">
<view v-for="(_, index1) in 33" :key="index1">
<slider @changing="sliderChanging" :value="sliderValue" :block-size="15" :show-value="true" />
</view>
</view>
<view class="flex-fill">
<view v-for="(_, index2) in 33" :key="index2">
<slider @changing="sliderChanging" :value="sliderValue" :block-size="15" :show-value="true" />
</view>
</view>
<view class="flex-fill">
<view v-for="(_, index3) in 33" :key="index3">
<slider @changing="sliderChanging" :value="sliderValue" :block-size="15" :show-value="true" />
</view>
</view>
</view>
</view>
</template>
<script lang="ts">
export default {
data() {
return {
title: 'slider 滑块 x 100',
sliderValue: 0
}
},
methods: {
sliderChanging(e : SliderChangeEvent) {
this.sliderValue = e.detail.value
console.log('value 发生变化:' + e.detail.value)
}
}
}
</script>
<style>
.flex-row {
flex-direction: row;
}
.flex-fill {
flex: 1;
}
</style>
......@@ -3,17 +3,19 @@
<web-view ref="web-view" class="uni-flex-item" src="/hybrid/html/local.html" @onPostMessage="onPostMessage"
@error="error" @loading="loading" @loaded="loaded">
</web-view>
<view class="uni-btn-v">
<button type="primary" @click="back">后退</button>
</view>
<view class="uni-btn-v">
<button type="primary" @click="forward">前进</button>
</view>
<view class="uni-btn-v">
<button type="primary" @click="reload">重新加载</button>
</view>
<view class="uni-btn-v">
<button type="primary" @click="stop">停止加载</button>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-btn-v">
<button type="primary" @click="back">后退</button>
</view>
<view class="uni-btn-v">
<button type="primary" @click="forward">前进</button>
</view>
<view class="uni-btn-v">
<button type="primary" @click="reload">重新加载</button>
</view>
<view class="uni-btn-v">
<button type="primary" @click="stop">停止加载</button>
</view>
</view>
</view>
</template>
......
......@@ -3,17 +3,19 @@
<web-view ref="web-view" class="uni-flex-item" :src="src" :webview-styles="webview_styles"
@onPostMessage="onPostMessage" @error="error" @loading="loading" @loaded="loaded">
</web-view>
<view class="uni-btn-v">
<button type="primary" @click="back">后退</button>
</view>
<view class="uni-btn-v">
<button type="primary" @click="forward">前进</button>
</view>
<view class="uni-btn-v">
<button type="primary" @click="reload">重新加载</button>
</view>
<view class="uni-btn-v">
<button type="primary" @click="stop">停止加载</button>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-btn-v">
<button type="primary" @click="back">后退</button>
</view>
<view class="uni-btn-v">
<button type="primary" @click="forward">前进</button>
</view>
<view class="uni-btn-v">
<button type="primary" @click="reload">重新加载</button>
</view>
<view class="uni-btn-v">
<button type="primary" @click="stop">停止加载</button>
</view>
</view>
</view>
</template>
......
......@@ -68,7 +68,11 @@
name: 'cover-view',
enable: false
},
// #endif
// #endif
{
name:'list',
enable:false
}
] as Page[]
}, {
id: 'content',
......@@ -124,6 +128,9 @@
name: 'slider',
enable: true
}, {
name: 'slider-100',
enable: true
},{
name: 'switch',
enable: true
}, {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册