Commit 9e88466e by 李伟康

Merge branch 'v1.0.1' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.1

2 parents 3d9d0bfd a44ca151
{ {
"name": "生意助手", "name" : "展业助手",
"appid": "__UNI__D3BD3DF", "appid" : "__UNI__D3BD3DF",
"description": "", "description" : "",
"versionName": "1.0.0", "versionName" : "1.0.0",
"versionCode": "100", "versionCode" : "100",
"transformPx": false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus": { "app-plus" : {
"bounce": "none", "bounce" : "none",
"usingComponents": true, "usingComponents" : true,
"nvueStyleCompiler": "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion": 3, "compilerVersion" : 3,
"screenOrientation": "landscape", "screenOrientation" : "landscape",
"splashscreen": { "splashscreen" : {
"alwaysShowBeforeRender": true, "alwaysShowBeforeRender" : true,
"waiting": true, "waiting" : true,
"autoclose": true, "autoclose" : true,
"delay": 0 "delay" : 0
}, },
/* 模块配置 */ /* 模块配置 */
"modules": {}, "modules" : {},
/* 应用发布信息 */ /* 应用发布信息 */
"distribute": { "distribute" : {
/* android打包配置 */ /* android打包配置 */
"android": { "android" : {
"permissions": [ "permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
...@@ -46,34 +46,43 @@ ...@@ -46,34 +46,43 @@
] ]
}, },
/* ios打包配置 */ /* ios打包配置 */
"ios": {}, "ios" : {
"dSYMs" : false
},
/* SDK配置 */ /* SDK配置 */
"sdkConfigs": { "sdkConfigs" : {
"ad": {} "ad" : {}
},
"icons" : {
"android" : {
"hdpi" : "static/72.png",
"xhdpi" : "static/96.png",
"xxhdpi" : "static/144.png"
}
} }
} }
}, },
/* 快应用特有相关 */ /* 快应用特有相关 */
"quickapp": {}, "quickapp" : {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin": { "mp-weixin" : {
"appid": "wx79d1ff39bee3d047", "appid" : "wx79d1ff39bee3d047",
"setting": { "setting" : {
"urlCheck": false "urlCheck" : false
}, },
"usingComponents": true "usingComponents" : true
}, },
"mp-alipay": { "mp-alipay" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-baidu": { "mp-baidu" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-toutiao": { "mp-toutiao" : {
"usingComponents": true "usingComponents" : true
}, },
"uniStatistics": { "uniStatistics" : {
"enable": false "enable" : false
}, },
"vueVersion": "2" "vueVersion" : "2"
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48 * @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 16:26:16 * @LastEditTime: 2024-04-09 17:47:43
* @FilePath: \gl_tape\mixin\click.js * @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -12,10 +12,11 @@ import { mapMutations, mapState } from "vuex"; ...@@ -12,10 +12,11 @@ import { mapMutations, mapState } from "vuex";
export default { export default {
data() { data() {
return { return {
tipVisible: false,
voicePath: "", voicePath: "",
timer: null, timer: null,
times: 0, times: 0,
timeout: 600, //十分钟提示 timeout: 30, //十分钟提示
reaction: 10, reaction: 10,
}; };
}, },
...@@ -34,6 +35,16 @@ export default { ...@@ -34,6 +35,16 @@ export default {
}, },
methods: { methods: {
...mapMutations("audio", ["setAudioStart", "setAudioList", "setAudioEnd"]), ...mapMutations("audio", ["setAudioStart", "setAudioList", "setAudioEnd"]),
//关闭提示
tipCancel() {
this.times = 0;
this.tipVisible = false;
},
//结束提示
tipConfirm() {
this.times = 0;
this.tipVisible = false;
},
//检查缓存录音 //检查缓存录音
checkVoice() { checkVoice() {
const file = uni.$storage.get("storageFile"); const file = uni.$storage.get("storageFile");
...@@ -92,7 +103,7 @@ export default { ...@@ -92,7 +103,7 @@ export default {
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.times++; this.times++;
if (this.times >= this.timeout) { if (this.times >= this.timeout) {
console.log("弹框"); this.tipVisible = true;
} }
if (this.times >= this.reaction + this.timeout) { if (this.times >= this.reaction + this.timeout) {
//结束接待 //结束接待
...@@ -101,7 +112,6 @@ export default { ...@@ -101,7 +112,6 @@ export default {
}, 1000); }, 1000);
}, },
handleTouchStart() { handleTouchStart() {
console.log("点击");
this.times = 0; this.times = 0;
}, },
}, },
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: * @Description:
* @Author: huyue * @Author: huyue
* @Date: 2024-04-07 14:54:28 * @Date: 2024-04-07 14:54:28
* @LastEditors: huyue * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-08 20:36:46 * @LastEditTime: 2024-04-09 17:57:46
--> -->
<template> <template>
<uni-popup <uni-popup
...@@ -143,6 +143,7 @@ export default { ...@@ -143,6 +143,7 @@ export default {
url: `/pages/informationEntry/informationEntry`, url: `/pages/informationEntry/informationEntry`,
}); });
this.close(); this.close();
this.$parent.stopAudio();
}, },
}, },
}; };
......
...@@ -3,58 +3,48 @@ ...@@ -3,58 +3,48 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-04-08 11:30:30 * @Date: 2024-04-08 11:30:30
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-04-09 14:48:03 * @LastEditTime: 2024-04-09 16:51:00
--> -->
<template> <template>
<view class="detail-box"> <view class="detail-box" @click="handleTouchStart()">
<view class="nav-bar"> <view class="nav-bar">
<view <view class="back" @click="back">
class="back" <uni-icons type="left" :size="32"></uni-icons>
@click="back"
>
<uni-icons
type="left"
:size="32"
></uni-icons>
</view> </view>
</view> </view>
<tool-box <tool-box :type="type" @choose="choose" @finish="open" />
:type="type" <view :class="['view', { showView: id == 1 }]">
@choose="choose"
@finish="open"
/>
<view :class="['view',{showView:id == 1}]">
<media_1 <media_1
:views="media[id]" :views="mediaList"
:penSwitch="type != 'preview' && drawStatus" :penSwitch="type != 'preview' && drawStatus"
/> />
</view> </view>
<view :class="['view',{showView:id == 2}]"> <view :class="['view', { showView: id == 2 }]">
<media_2 <media_2
:views="media[id]" :views="mediaList"
:penSwitch="type != 'preview' && drawStatus" :penSwitch="type != 'preview' && drawStatus"
/> />
</view> </view>
<view :class="['view',{showView:id == 3}]"> <view :class="['view', { showView: id == 3 }]">
<media_3 <media_3
:views="media[id]" :views="mediaList"
:penSwitch="type != 'preview' && drawStatus" :penSwitch="type != 'preview' && drawStatus"
/> />
</view> </view>
<view :class="['view',{showView:id == 4}]"> <view :class="['view', { showView: id == 4 }]">
<media_4 <media_4
:views="media[id]" :views="mediaList"
:penSwitch="type != 'preview' && drawStatus" :penSwitch="type != 'preview' && drawStatus"
/> />
</view> </view>
<view :class="['view',{showView:id == 5}]"> <view :class="['view', { showView: id == 5 }]">
<media_5 <media_5
:views="media[id]" :views="mediaList"
:penSwitch="type != 'preview' && drawStatus" :penSwitch="type != 'preview' && drawStatus"
/> />
</view> </view>
<view :class="['view',{showView:id == 6}]"> <view :class="['view', { showView: id == 6 }]">
<media_6 /> <media_6 :views="mediaList" />
</view> </view>
<pay-pop ref="pay"></pay-pop> <pay-pop ref="pay"></pay-pop>
<view <view
...@@ -65,17 +55,33 @@ ...@@ -65,17 +55,33 @@
</view> </view>
<MessageBox <MessageBox
v-if="messageBoxVisible" v-if="finishVisible"
@cancel="messageBoxVisible = false" @cancel="finishVisible = false"
@confirm="stopAudio" @confirm="stopAudio"
content="是否返回首页并结束本次接待" content="是否返回首页并结束本次接待"
confirmBtnText="确认" confirmBtnText="确认"
></MessageBox> ></MessageBox>
<MessageBox
v-if="tipVisible"
@cancel="tipCancel"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
confirmBtnText="是"
></MessageBox>
<MessageBox
v-if="messageBoxVisible"
@cancel="done"
@confirm="toPay"
content="若客户成交,请点击付款方式协助客户完成后续流程。"
confirmBtnText="选择付款方式"
cancelBtnText="完成接待"
></MessageBox>
</view> </view>
</template> </template>
<script> <script>
import payPop from './components/payPop.vue'; import payPop from "./components/payPop.vue";
import ToolBox from './components/ToolBox.vue' import ToolBox from "./components/ToolBox.vue";
import myClick from "@/mixin/click"; import myClick from "@/mixin/click";
import Media_1 from './components/Media_1.vue' import Media_1 from './components/Media_1.vue'
import Media_2 from './components/Media_2.vue' import Media_2 from './components/Media_2.vue'
...@@ -86,40 +92,49 @@ import Media_6 from './components/Media_6.vue' ...@@ -86,40 +92,49 @@ import Media_6 from './components/Media_6.vue'
export default { export default {
components: { ToolBox, payPop, Media_1, Media_2, Media_3, Media_4, Media_5, Media_6 }, components: { ToolBox, payPop, Media_1, Media_2, Media_3, Media_4, Media_5, Media_6 },
mixins: [myClick], mixins: [myClick],
data () { data() {
return { return {
type: 'preview', type: "preview",
id: '', id: "",
media: { media: {
}, },
drawStatus: false, drawStatus: false,
messageBoxVisible:false messageBoxVisible: false,
finishVisible: false,
}; };
}, },
onLoad (options) { onLoad(options) {
this.type = options.type this.type = options.type;
this.id = options.id this.id = options.id;
this.getFindSoureDetail(options.id) this.getFindSoureDetail(options.id);
}, },
methods: { methods: {
open () { open() {
this.$refs.pay.show() // this.$refs.pay.show()
this.messageBoxVisible = true;
}, },
/**切换素材 */ /**切换素材 */
choose (e) { choose(e) {
this.id = e.id this.id = e.id;
this.getFindSoureDetail(e.id) this.getFindSoureDetail(e.id);
}, },
async getFindSoureDetail (id) { async getFindSoureDetail(id) {
try { try {
if (this.media[id]) return if (this.media[id]) return
this.media[id] = await uni.$api.commonApi.getFindSoureDetail({ id }) || [] this.media[id] =
} catch (error) { (await uni.$api.commonApi.getFindSoureDetail({ id })) || [];
} catch (error) {}
} },
// 完成接待
done() {
uni.navigateBack();
},
// 选择付款方式
toPay() {
this.$refs.pay.show();
}, },
back () { back () {
if (this.type != 'preview') return this.messageBoxVisible = true if (this.type != 'preview') return this.finishVisible = true
uni.navigateBack() uni.navigateBack()
} }
}, },
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* @Description: 首页 * @Description: 首页
* @Author: huyue * @Author: huyue
* @Date: 2024-04-07 14:39:40 * @Date: 2024-04-07 14:39:40
* @LastEditors: huyue * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 15:23:43 * @LastEditTime: 2024-04-09 17:48:55
--> -->
<template> <template>
<view class="container"> <view class="container" @click="handleTouchStart()">
<view class="left-side"> <view class="left-side">
<!-- 左侧内容 --> <!-- 左侧内容 -->
<view class="user-info"> <view class="user-info">
...@@ -66,7 +66,15 @@ ...@@ -66,7 +66,15 @@
@cancel="cancel" @cancel="cancel"
@confirm="preview" @confirm="preview"
content="直接点击素材可进行预览,若面向车辆主展示,请点击页面下方的「开始接待」" content="直接点击素材可进行预览,若面向车辆主展示,请点击页面下方的「开始接待」"
confirmBtnText="预览" confirmBtnText="预览素材"
></MessageBox>
<MessageBox
v-if="tipVisible"
@cancel="tipCancel"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
confirmBtnText="是"
></MessageBox> ></MessageBox>
</view> </view>
</view> </view>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-04-07 14:54:28 * @Date: 2024-04-07 14:54:28
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-04-09 13:51:17 * @LastEditTime: 2024-04-09 18:27:28
--> -->
<template> <template>
<view class="information-entry"> <view class="information-entry">
...@@ -11,18 +11,68 @@ ...@@ -11,18 +11,68 @@
>建议同步采集资源,若接待工作单一可在提单初期再进行补充。</view >建议同步采集资源,若接待工作单一可在提单初期再进行补充。</view
> >
<view class="information-box"> <view class="information-box">
<view class="information-item" v-for="(item, index) in infoList" :key="item.title"> <view
class="information-item"
v-for="(item, index) in infoList"
:key="item.title"
>
<view class="upload-img" v-if="item.imgUrl"> <view class="upload-img" v-if="item.imgUrl">
<image class="img" :src="item.imgUrl" mode="scaleToFill" /> <image class="img" :src="item.imgUrl" mode="scaleToFill" />
<uni-icons class="upload-close" type="clear" :size="20" @click="close(index)"></uni-icons> <uni-icons
class="upload-close"
type="clear"
:size="20"
@click="close(index)"
></uni-icons>
</view> </view>
<view v-else class="icon" @tap="choose(index)"> <view v-else class="icon" @tap="choose(index)">
<glsx-image class="icon-upload" src="detail/icon-upload.png" mode="scaleToFill"/> <glsx-image
class="icon-upload"
src="detail/icon-upload.png"
mode="scaleToFill"
/>
</view> </view>
<view class="information-title">{{item.title}} </view> <view class="information-title">{{ item.title }} </view>
</view> </view>
</view> </view>
<view class="information-done" @click="done()">完成接待</view> <view class="information-done" @click="done()">完成接待</view>
<MessageBox
v-if="messageBoxVisible"
@cancel="cancel"
@confirm="submit"
confirmBtnText="保存"
:popupW="704"
:popupH="800"
>
<view name="content">
<view class="pop-tips"
>检测到“交车通知书”中未填写客户档案,请填写后再完成接待。</view
>
<view class="form">
<template v-for="(i, index) in formObject">
<view class="form-item" :key="index">
<view class="label">{{ i.label }}</view>
<view>
<template v-if="i.type == 'input'">
<uni-easyinput v-model="formData[i.key]" class="value" placeholder="请输入内容" :maxlength="i.maxlength"></uni-easyinput>
</template>
<template v-else>
<uni-easyinput class="uni-mt-5 value" suffixIcon="down" v-model="formData[i.key]" @focus="showPop(i.key)" clearable placeholder="请选择内容"></uni-easyinput>
</template>
</view>
</view>
</template>
</view>
</view>
</MessageBox>
<MessageBox
v-if="tipVisible"
@cancel="tipCancel"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
confirmBtnText="是"
></MessageBox>
</view> </view>
</template> </template>
<script> <script>
...@@ -30,22 +80,58 @@ import upload from "@/utils/ossUploadFile/uploadFile.js"; ...@@ -30,22 +80,58 @@ import upload from "@/utils/ossUploadFile/uploadFile.js";
const INFO_LIST = [ const INFO_LIST = [
{ {
id: 1, id: 1,
title: '客户付款凭证', title: "客户付款凭证",
}, },
{ {
id: 2, id: 2,
title: '客户购车发票', title: "客户购车发票",
}, },
{ {
id: 3, id: 3,
title: '客户延保合同', title: "客户延保合同",
} },
] ];
import myClick from "@/mixin/click";
export default { export default {
mixins: [myClick],
data() { data() {
return { return {
infoList: INFO_LIST, infoList: INFO_LIST,
messageBoxVisible: false,
formObject: [
{
label: "车主姓名",
key: "customerName",
type: "input",
inputType: "text",
maxlength: 50,
},
{
label: "车主电话",
key: "phoneNumber",
type: "input",
inputType: "tel",
maxlength: 20,
},
{
label: "车型",
key: "carModel",
type: "select",
},
{
label: "销售姓名",
key: "sales",
type: "select",
},
],
formData: {
customerName: '',
phoneNumber: '',
carModel: '',
sales: ''
},
carBoxVisible: false
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -54,6 +140,12 @@ export default { ...@@ -54,6 +140,12 @@ export default {
title: text, title: text,
}); });
}, },
watch: {
infoList: {
hander(val) {},
deep: true,
},
},
methods: { methods: {
// 上传图 // 上传图
choose(index) { choose(index) {
...@@ -61,9 +153,11 @@ export default { ...@@ -61,9 +153,11 @@ export default {
count: 1, count: 1,
success: async (res) => { success: async (res) => {
// await upload(res.tempFilePath) // await upload(res.tempFilePath)
this.$set(this.infoList[index], 'imgUrl', await upload(res.tempFilePaths[0])); this.$set(
// this.infoList[index].imgUrl = await upload(res.tempFilePaths[0]) this.infoList[index],
console.log(this.infoList, '======') "imgUrl",
await upload(res.tempFilePaths[0])
);
}, },
fail: (err) => { fail: (err) => {
console.log(err); console.log(err);
...@@ -72,7 +166,26 @@ export default { ...@@ -72,7 +166,26 @@ export default {
}, },
// 删除图 // 删除图
close(index) { close(index) {
this.$set(this.infoList[index], 'imgUrl') this.$set(this.infoList[index], "imgUrl");
},
// 完成接待按钮
done() {
this.messageBoxVisible = true
},
// 保存
submit() {
console.log(this.formData)
this.messageBoxVisible = false
this.stopAudio();
},
// 选择车型与销售
showPop(key) {
console.log(key)
// this.carBoxVisible = true
},
// 取消
cancel() {
this.messageBoxVisible = false
} }
}, },
}; };
...@@ -97,7 +210,6 @@ export default { ...@@ -97,7 +210,6 @@ export default {
width: 264rpx; width: 264rpx;
margin-right: 48rpx; margin-right: 48rpx;
.icon { .icon {
background-color: #f4f5f7; background-color: #f4f5f7;
border: 2rpx solid #eff0f2; border: 2rpx solid #eff0f2;
border-radius: 16rpx; border-radius: 16rpx;
...@@ -109,9 +221,9 @@ export default { ...@@ -109,9 +221,9 @@ export default {
width: 128rpx; width: 128rpx;
height: 128rpx; height: 128rpx;
} }
} }
.icon, .upload-img { .icon,
.upload-img {
position: relative; position: relative;
width: 264rpx; width: 264rpx;
height: 264rpx; height: 264rpx;
...@@ -149,7 +261,6 @@ export default { ...@@ -149,7 +261,6 @@ export default {
text-align: center; text-align: center;
} }
} }
} }
} }
.information-done { .information-done {
...@@ -167,4 +278,58 @@ export default { ...@@ -167,4 +278,58 @@ export default {
background-color: #2c66f7; background-color: #2c66f7;
border-radius: 40rpx; border-radius: 40rpx;
} }
.pop-tips {
background: rgba(44, 102, 247, 0.1);
color: #2c66f7;
font-size: 28rpx;
padding: 32rpx 80rpx 24rpx;
margin-top: 30rpx;
text-align: center;
}
.form {
display: flex;
flex-wrap: wrap;
gap: 24rpx 0;
padding-top: 30rpx;
&-item {
// flex: 50%;
display: flex;
align-items: center;
color: #6C6C70;
font-size: 30rpx;
box-sizing: border-box;
.label {
position: relative;
margin-left: auto;
flex-shrink: 0;
width: 124rpx;
&::before {
content: '*';
color: #ff0000;
position: absolute;
left: -20rpx;
top: 50%;
transform: translate(0, -50%);
}
}
.value {
width: 468rpx;
margin-left: 16rpx;
box-sizing: border-box;
// padding: 0 40rpx;
input,
.select {
width: 100%;
height: 100%;
}
.select {
display: flex;
align-items: center;
.arrow {
margin-left: auto;
}
}
}
}
}
</style> </style>
static/72.png

3.75 KB

static/96.png

5.62 KB

## 1.1.17(2024-03-28)
- 修复 在头条小程序下丢失事件绑定的问题
## 1.1.16(2024-03-20)
- 修复 在密码输入情况下 清除和小眼睛覆盖bug 在edge浏览器下显示双眼睛bug
## 1.1.15(2024-02-21)
- 新增 左侧插槽:left
## 1.1.14(2024-02-19)
- 修复 onBlur的emit传值错误
## 1.1.12(2024-01-29)
- 补充 adjust-position文档属性补充
## 1.1.11(2024-01-29)
- 补充 adjust-position属性传递值:(Boolean)当键盘弹起时,是否自动上推页面
## 1.1.10(2024-01-22)
- 去除 移除无用的log输出
## 1.1.9(2023-04-11)
- 修复 vue3 下 keyboardheightchange 事件报错的bug
## 1.1.8(2023-03-29)
- 优化 trim 属性默认值
## 1.1.7(2023-03-29)
- 新增 cursor-spacing 属性
## 1.1.6(2023-01-28)
- 新增 keyboardheightchange 事件,可监听键盘高度变化
## 1.1.5(2022-11-29)
- 优化 主题样式
## 1.1.4(2022-10-27)
- 修复 props 中背景颜色无默认值的bug
## 1.1.0(2022-06-30)
- 新增 在 uni-forms 1.4.0 中使用可以在 blur 时校验内容
- 新增 clear 事件,点击右侧叉号图标触发
- 新增 change 事件 ,仅在输入框失去焦点或用户按下回车时触发
- 优化 组件样式,组件获取焦点时高亮显示,图标颜色调整等
## 1.0.5(2022-06-07)
- 优化 clearable 显示策略
## 1.0.4(2022-06-07)
- 优化 clearable 显示策略
## 1.0.3(2022-05-20)
- 修复 关闭图标某些情况下无法取消的 bug
## 1.0.2(2022-04-12)
- 修复 默认值不生效的 bug
## 1.0.1(2022-04-02)
- 修复 value 不能为 0 的 bug
## 1.0.0(2021-11-19)
- 优化 组件 UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-easyinput](https://uniapp.dcloud.io/component/uniui/uni-easyinput)
## 0.1.4(2021-08-20)
- 修复 在 uni-forms 的动态表单中默认值校验不通过的 bug
## 0.1.3(2021-08-11)
- 修复 在 uni-forms 中重置表单,错误信息无法清除的问题
## 0.1.2(2021-07-30)
- 优化 vue3 下事件警告的问题
## 0.1.1
- 优化 errorMessage 属性支持 Boolean 类型
## 0.1.0(2021-07-13)
- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 0.0.16(2021-06-29)
- 修复 confirmType 属性(仅 type="text" 生效)导致多行文本框无法换行的 bug
## 0.0.15(2021-06-21)
- 修复 passwordIcon 属性拼写错误的 bug
## 0.0.14(2021-06-18)
- 新增 passwordIcon 属性,当 type=password 时是否显示小眼睛图标
- 修复 confirmType 属性不生效的问题
## 0.0.13(2021-06-04)
- 修复 disabled 状态可清出内容的 bug
## 0.0.12(2021-05-12)
- 新增 组件示例地址
## 0.0.11(2021-05-07)
- 修复 input-border 属性不生效的问题
## 0.0.10(2021-04-30)
- 修复 ios 遮挡文字、显示一半的问题
## 0.0.9(2021-02-05)
- 调整为 uni_modules 目录规范
- 优化 兼容 nvue 页面
/**
* @desc 函数防抖
* @param func 目标函数
* @param wait 延迟执行毫秒数
* @param immediate true - 立即执行, false - 延迟执行
*/
export const debounce = function(func, wait = 1000, immediate = true) {
let timer;
return function() {
let context = this,
args = arguments;
if (timer) clearTimeout(timer);
if (immediate) {
let callNow = !timer;
timer = setTimeout(() => {
timer = null;
}, wait);
if (callNow) func.apply(context, args);
} else {
timer = setTimeout(() => {
func.apply(context, args);
}, wait)
}
}
}
/**
* @desc 函数节流
* @param func 函数
* @param wait 延迟执行毫秒数
* @param type 1 使用表时间戳,在时间段开始的时候触发 2 使用表定时器,在时间段结束的时候触发
*/
export const throttle = (func, wait = 1000, type = 1) => {
let previous = 0;
let timeout;
return function() {
let context = this;
let args = arguments;
if (type === 1) {
let now = Date.now();
if (now - previous > wait) {
func.apply(context, args);
previous = now;
}
} else if (type === 2) {
if (!timeout) {
timeout = setTimeout(() => {
timeout = null;
func.apply(context, args)
}, wait)
}
}
}
}
{
"id": "uni-easyinput",
"displayName": "uni-easyinput 增强输入框",
"version": "1.1.17",
"description": "Easyinput 组件是对原生input组件的增强",
"keywords": [
"uni-ui",
"uniui",
"input",
"uni-easyinput",
"输入框"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": [
"uni-scss",
"uni-icons"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}
\ No newline at end of file \ No newline at end of file
### Easyinput 增强输入框
> **组件名:uni-easyinput**
> 代码块: `uEasyinput`
easyinput 组件是对原生input组件的增强 ,是专门为配合表单组件[uni-forms](https://ext.dcloud.net.cn/plugin?id=2773)而设计的,easyinput 内置了边框,图标等,同时包含 input 所有功能
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-easyinput)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!