提交 c0bd179c 编写于 作者: H hulinNeil

更新部分示例

上级 cb3739e3
......@@ -62,9 +62,10 @@
}
.uni-input {
height: 80px;
min-height: 80px;
line-height: 80px;
height: 50px;
min-height: 50px;
padding: 15px 0;
line-height: 50px;
}
.uni-label {
......@@ -78,7 +79,7 @@
/*数字角标 */
/*数字角标*/
.uni-badge {
padding: 4px 14px;
......@@ -724,13 +725,18 @@
.feedback-textare {
height: 200px;
font-size: 34px;
line-height: 50px;
width: 100%;
box-sizing: border-box;
padding: 20px 30px 0;
}
.feedback-input {
height: 80px;
font-size: 34px;
padding-left: 20px;
height: 50px;
min-height: 50px;
padding: 15px 20px;
line-height: 50px;
}
.feedback-uploader {
......
......@@ -161,7 +161,7 @@
"navigationBarTitleText": "发起支付"
}
}, {
"path": "platforms/app-plus/share/share",
"path": "pages/API/share/share",
"style": {
"navigationBarTitleText": "分享"
}
......
......@@ -169,17 +169,17 @@
name: '发起支付',
url: 'request-payment'
}]
}
//#ifdef APP-PLUS
, {
}, {
id: 'share',
name: '分享',
open: false,
pages: [{
name: '分享',
url: '/platforms/app-plus/share/share'
url: 'share'
}]
}, {
}
//#ifdef APP-PLUS
, {
id: 'speech',
name: '语音',
open: false,
......@@ -204,7 +204,7 @@
},
onShareAppMessage() {
return {
title: '欢迎体验uniapp',
title: '欢迎体验uni-app',
path: '/pages/API/API'
}
},
......
......@@ -21,7 +21,11 @@
uni.showActionSheet({
itemList: ['item1', 'item2', 'item3', 'item4'],
success: (e) => {
console.log(e.tapIndex)
console.log(e.tapIndex);
uni.showToast({
title:"点击了第" + e.tapIndex + "个选项",
icon:"none"
})
}
})
}
......
......@@ -32,6 +32,9 @@
networkType: ''
}
},
onUnload:function(){
this.networkType = '',this.hasNetworkType = false;
},
methods: {
getNetworkType: function () {
uni.getNetworkType({
......
......@@ -70,6 +70,9 @@
systemInfo: {}
}
},
onUnload:function(){
this.systemInfo = {};
},
methods: {
getSystemInfo: function () {
uni.getSystemInfo({
......
......@@ -24,6 +24,9 @@
result: ''
}
},
onUnload:function(){
this.result = '';
},
methods: {
scanCode: function () {
var that = this
......@@ -46,7 +49,7 @@
@import "../../../common/uni.css";
.uni-input {
padding: 0 30px;
padding: 15px 30px;
word-break: break-all;
}
</style>
......@@ -8,12 +8,14 @@
<textarea class="textarea" v-model="shareText" />
</view>
</view>
<!-- #ifdef APP-PLUS -->
<view class="page-section-title">分享链接</view>
<view class="page-section">
<view class="textarea-wrp">
<input class="uni-input" type="text" v-model="href">
</view>
</view>
<!-- #endif -->
<view class="page-section-title">分享图片:</view>
<view class="page-section">
<view class="uni-uploader-body">
......@@ -21,11 +23,18 @@
<image class="uni-uploader__img" v-if="image" :src="image"></image>
</view>
</view>
<!-- #ifdef APP-PLUS -->
<view class="btn-area" v-if="providerList.length > 0">
<block v-for="(value,index) in providerList" :key="index">
<button type="primary" v-if="value" @tap="share(value)">{{value.name}}</button>
</block>
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view class="btn-area">
<button type="primary" open-type="share">分享</button>
</view>
<!-- #endif -->
</view>
</view>
......@@ -43,11 +52,19 @@
providerList: []
}
},
onShareAppMessage() {
return {
title: this.shareText ? this.shareText : "欢迎体验uni-app",
path: '/pages/component/component',
imageUrl:this.image ? this.image : 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/app/share-logo@3.png'
}
},
onUnload:function(){
this.shareText='uni-app可以同时发布成原生App、微信小程序,邀请你一起体验!',
this.href = "https://uniapp.dcloud.io",
this.image='';
},
// #ifdef APP-PLUS
onLoad: function () {
uni.getProvider({
service: "share",
......@@ -100,6 +117,7 @@
}
});
},
// #endif
methods: {
async share(e) {
console.log("分享通道:", e.id);
......@@ -211,7 +229,7 @@
.textarea {
border: 2px solid #D8D8D8;
padding: 10px;
height: 90px;
height: 100px;
width: 690px;
}
.uni-input{
......
......@@ -2,7 +2,9 @@
<view class="index">
<view class="index-hd">
<image class="index-logo" src="../../static/componentIndex.png"></image>
<view class="page-section-title">以下将展示uni-app官方组件能力,组件样式仅供参考,开发者可根据自身需求自定义组件样式,具体属性参数详见uni-app开发文档。</view>
<view class="page-section-title">
以下将展示uni-app官方组件能力,组件样式仅供参考,开发者可根据自身需求自定义组件样式,具体属性参数详见uni-app开发文档。
</view>
</view>
<view class="uni-card" v-for="(list,index) in lists" :key="index">
<view class="uni-list">
......@@ -67,7 +69,7 @@
},
onShareAppMessage() {
return {
title: '欢迎体验uniapp',
title: '欢迎体验uni-app',
path: '/pages/component/component'
}
},
......
......@@ -2,7 +2,7 @@
<view>
<page-head :title="title"></page-head>
<view class="page-body">
<form catchsubmit="formSubmit" catchreset="formReset">
<form @submit="formSubmit" @reset="formReset">
<view class="page-section page-section-gap">
<view class="page-section-title">switch</view>
<switch name="switch" />
......@@ -73,10 +73,10 @@
this.pickerHidden = false
},
formSubmit: function (e) {
console.log('form发生了submit事件,携带数据为:', e.target.value)
console.log('form发生了submit事件,携带数据为:' + JSON.stringify(e.detail.value))
},
formReset: function (e) {
console.log('form发生了reset事件,携带数据为:', e.target.value)
console.log("清空数据")
this.chosen = ''
}
},
......
......@@ -22,7 +22,7 @@
<view class="page-section-title">控制输入的input</view>
<view class="uni-list">
<view class="uni-list-cell">
<input class="uni-input" @input="bindReplaceInput" placeholder="连续的两个1会变成2" />
<input class="uni-input" @input="bindReplaceInput" v-model="changeValue" placeholder="连续的两个1会变成2" />
</view>
</view>
</view>
......@@ -106,6 +106,7 @@
inputValue: '',
showClearIcon: false,
inputClearValue: "",
changeValue:"",
showPassword: true,
src: "../../../static/eye-1.png"
}
......@@ -115,24 +116,10 @@
this.inputValue = e.target.value
},
bindReplaceInput: function (e) {
var value = e.target.value
var pos = e.target.cursor
var left
if (pos !== -1) {
// 光标在中间
left = e.target.value.slice(0, pos)
// 计算光标的位置
pos = left.replace(/11/g, '2').length
var value = e.target.value;
if(value === '11'){
this.changeValue = "2";
}
// 直接返回对象,可以对输入进行过滤处理,同时可以控制光标的位置
return {
value: value.replace(/11/g, '2'),
cursor: pos
}
// 或者直接返回字符串,光标在最后边
// return value.replace(/11/g,'2'),
},
bindHideKeyboard: function (e) {
if (e.target.value === '123') {
......
......@@ -17,7 +17,7 @@
</view>
</view>
<view class="btn-area">
<button @tap="bindSendDanmu" class="page-body-button" formType="submit">发送弹幕</button>
<button @tap="bindSendDanmu" class="page-body-button">发送弹幕</button>
</view>
</view>
</view>
......
......@@ -39,7 +39,7 @@
url: 'https://spider.dcloud.net.cn/api/news/36kr/' + this.banner.post_id,
success: (data) => {
if (data.statusCode == 200) {
this.htmlString = data.data.content.replace(/\\/g, "");
this.htmlString = data.data.content.replace(/\\/g, "").replace(/<img/g,"<img width='100%'");
}
},
fail: () => {
......
......@@ -62,12 +62,10 @@
name: '选项卡',
url: 'tabbar'
},
//
// {
// name: '问题反馈',
// url: '/platforms/app-plus/feedback/feedback'
// },
//
{
name: '数字选择框',
url: 'number-box'
......@@ -80,7 +78,7 @@
},
onShareAppMessage() {
return {
title: '欢迎体验uniapp',
title: '欢迎体验uni-app',
path: '/pages/template/template'
}
},
......
......@@ -5,8 +5,7 @@
<text class="feedback-quick" @tap="chooseMsg">快速键入</text>
</view>
<view class="feedback-body">
<textarea auto-focus="true" placeholder="请详细描述你的问题和意见..." v-model="sendDate.content" class="feedback-textare" placeholder-class="input-view"
/>
<textarea auto-focus="true" placeholder="请详细描述你的问题和意见..." v-model="sendDate.content" class="feedback-textare" />
</view>
<view class='feedback-title'>
<text>图片(选填,提供问题截图,总大小10M以下)</text>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册