baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+320
@@ -0,0 +1,320 @@
|
||||
<template>
|
||||
<view class="opsoft-input" :class="borderClass" :style="inputStyle">
|
||||
<view class="opsoft-input-row">
|
||||
<view v-show="search" class="opsoft-search-icon" :style="searchIconStyle?searchIconStyle:defaultIconStyle" @tap="searchClick()" />
|
||||
<input class="opsoft-uniinput" :value="modelValue" :type="inputType" :maxlength="maxlength"
|
||||
@focus="inputFocus" @blur="inputBlur" @confirm="inputConfirm" @keyboardheightchange="keyboardHeightChange"
|
||||
@input="inputListener" :hold-keyboard="true" :adjust-position="true" :auto-blur="true"
|
||||
:confirm-hold="false" :cursor="cursorLength" :confirm-type="confirmText" :disabled="disableInput"
|
||||
:placeholder="promptText" :placeholder-style="promptTextClass"/>
|
||||
<view v-if="clear" class="opsoft-clear-icon" @tap="clearClick()"
|
||||
:style="clearIconStyle?clearIconStyle:defaultIconStyle"/>
|
||||
<view v-if="eye" :class="passwordShow?'opsoft-eye-icon':'opsoft-eye-close-icon'"
|
||||
@tap="eyeClick()" :style="eyeIconStyle?eyeIconStyle:defaultIconStyle" />
|
||||
</view>
|
||||
<view v-show="errorText && errorText.length > 0 && errorAble" class="opsoft-verification-error">
|
||||
{{errorText}}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"opsoft-input-verification",
|
||||
props:{
|
||||
promptTextClass: {type:String, default:""},
|
||||
disable: {type:Boolean, default:false},
|
||||
search: {type:Boolean, default:false},
|
||||
clear: {type:Boolean, default:false},
|
||||
eye: {type:Boolean, default:false},
|
||||
password: {type:Boolean, default:false},
|
||||
type: {type:String, default:"text"},
|
||||
maxlength: {type:Number, default:-1},
|
||||
readOnly: {type:Boolean, default:false},
|
||||
confirmText: {type:String, default:"确定"},
|
||||
modelValue: {type:String, required:true, default:""},
|
||||
promptText: {type:String, default:""},
|
||||
errorText: {type:String, default:""},
|
||||
defaultBorderStyle: {type:Object, default:null},
|
||||
errorBoderStyle: {type:Object, default:null},
|
||||
focusBoderStyle: {type:Object, default:null},
|
||||
disableBoderStyle: {type:Object, default:null},
|
||||
readOnlyBoderStyle: {type:Object, default:null},
|
||||
defaultIconStyle: {type:Object, default:null},
|
||||
searchIconStyle: {type:Object, default:null},
|
||||
eyeIconStyle: {type:Object, default:null},
|
||||
clearIconStyle: {type:Object, default:null},
|
||||
height: {type:String, default:""},
|
||||
inputValidation: {type:Boolean, default:false},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
errorAble: false,
|
||||
focusAble: false,
|
||||
cursorLength: 0,
|
||||
logicInputType: "password",
|
||||
eyeClose: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
inputType:{
|
||||
get:function() {
|
||||
if (this.type == "password") {
|
||||
return this.logicInputType;
|
||||
}
|
||||
if (this.type) {
|
||||
return this.type;
|
||||
}
|
||||
return 'text';
|
||||
},
|
||||
},
|
||||
disableInput:{
|
||||
get:function() {
|
||||
if (this.readOnly||this.disable) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
borderClass:{
|
||||
get:function() {
|
||||
if (this.readOnly) {
|
||||
return "opsoft-input-readonly";
|
||||
}
|
||||
if (this.disable) {
|
||||
return "opsoft-input-disable";
|
||||
}
|
||||
if (this.errorAble) {
|
||||
return "opsoft-input-error";
|
||||
}
|
||||
if (this.focusAble) {
|
||||
return "opsoft-input-focus";
|
||||
}
|
||||
return "opsoft-input-default";
|
||||
}
|
||||
},
|
||||
inputStyle:{
|
||||
get:function() {
|
||||
let style = this.defaultBorderStyle;
|
||||
if (this.readOnly && this.readOnlyBoderStyle) {
|
||||
style = this.readOnlyBoderStyle;
|
||||
}
|
||||
|
||||
if ( this.disable && this.disableBoderStyle) {
|
||||
style = this.disableBoderStyle;
|
||||
}
|
||||
|
||||
if (this.errorAble && this.errorBoderStyle) {
|
||||
style = this.errorBoderStyle;
|
||||
}
|
||||
|
||||
if (this.focusAble && this.focusBoderStyle) {
|
||||
style = this.focusBoderStyle;
|
||||
}
|
||||
|
||||
if ( this.height && this.height.length>0) {
|
||||
style.height = this.height;
|
||||
style.lineHeight = this.height;
|
||||
}
|
||||
|
||||
return style;
|
||||
}
|
||||
},
|
||||
passwordShow: {
|
||||
get:function() {
|
||||
if (this.eye && !this.eyeClose) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
passwordShow: {
|
||||
get:function() {
|
||||
if (this.eye && !this.eyeClose) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
if (this.modelValue && this.modelValue.length > 0) {
|
||||
this.cursorLength = this.modelValue.length;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
inputListener: function(event) {
|
||||
let value = event.detail.value;
|
||||
if (this.maxlenght >= 0) {
|
||||
value = value.substr(0, this.maxlenght);
|
||||
}
|
||||
|
||||
this.this.$emit('update:modelValue', value.toString());
|
||||
this.this.$emit('inputChange', event);
|
||||
},
|
||||
verification: function(value){
|
||||
this.$emit("inspectionFunction", value, val => {
|
||||
this.errorAble = val;
|
||||
});
|
||||
},
|
||||
|
||||
inputListener: function(event) {
|
||||
let value = event.detail.value;
|
||||
if (this.maxlenght >= 0) {
|
||||
value = value.substr(0, this.maxlenght);
|
||||
}
|
||||
|
||||
this.$emit('update:modelValue', value.toString());
|
||||
this.$emit('inputChange', event);
|
||||
if (this.inputValidation) {
|
||||
this.verification(value);
|
||||
}
|
||||
},
|
||||
//聚焦
|
||||
inputFocus: function(event) {
|
||||
this.focusAble = true;
|
||||
this.$emit('focusChange', event);
|
||||
},
|
||||
//失去焦点
|
||||
inputBlur: function(event) {
|
||||
this.focusAble = false;
|
||||
this.$emit('blurChange', event);
|
||||
const value = event.detail.value;
|
||||
this.verification(value);
|
||||
},
|
||||
//回车事件
|
||||
inputConfirm: function(event) {
|
||||
const value = event.detail.value;
|
||||
this.$emit("update:modelValue", value.toString());
|
||||
this.$emit('confirmClick', event);
|
||||
this.verification(value);
|
||||
},
|
||||
//键盘高度变化事件
|
||||
keyboardHeightChange: function(event) {
|
||||
this.$emit('keyboardHeightChange', event);
|
||||
},
|
||||
//清除输入信息
|
||||
clearClick: function() {
|
||||
this.$emit("update:modelValue", "");
|
||||
this.$emit("clear");
|
||||
this.$emit('inputChange', "");
|
||||
},
|
||||
//显示密码
|
||||
eyeClick: function() {
|
||||
this.eyeClose = !this.eyeClose;
|
||||
if (this.eyeClose) {
|
||||
this.logicInputType = "text";
|
||||
}
|
||||
else {
|
||||
this.logicInputType = "password";
|
||||
}
|
||||
},
|
||||
searchClick: function() {
|
||||
this.$emit("searchClick", this.modelValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.opsoft-input {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: rgba(0, 0, 0, 1);
|
||||
font-size: 32rpx;
|
||||
caret-color: rgba(0, 122, 255, 1);
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
--input-height: 48rpx;
|
||||
}
|
||||
.opsoft-input >.opsoft-verification-error{
|
||||
height: 42rpx;
|
||||
color: rgba(255, 82, 87, 1);
|
||||
font-size: 28rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.opsoft-input-default {
|
||||
}
|
||||
.opsoft-input-focus {
|
||||
}
|
||||
.opsoft-input-error {
|
||||
}
|
||||
.opsoft-input-disable {
|
||||
color: rgba(133, 139, 156, 1);
|
||||
}
|
||||
.opsoft-input-readonly {
|
||||
}
|
||||
.opsoft-input >.opsoft-input-row{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
line-height: var(--input-height);
|
||||
height: var(--input-height);
|
||||
}
|
||||
.opsoft-input-row >.opsoft-uniinput{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.opsoft-input >.opsoft-input-row >.opsoft-clear-icon{
|
||||
height: 32rpx;
|
||||
width: 32rpx;
|
||||
/* flex-shrink: 0;
|
||||
flex-grow: 0; */
|
||||
background-size: 28rpx 28rpx;
|
||||
background-image: url(static/clear.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position:center center;
|
||||
}
|
||||
.opsoft-input >.opsoft-input-row >.opsoft-eye-close-icon{
|
||||
height: 32rpx;
|
||||
width: 32rpx;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
background-size: 28rpx 28rpx;
|
||||
background-image: url(./static/eye-close.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position:center center;
|
||||
}
|
||||
.opsoft-input >.opsoft-input-row >.opsoft-eye-icon{
|
||||
height: 32rpx;
|
||||
width: 32rpx;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
background-size: 28rpx 28rpx;
|
||||
background-image: url(./static/eye.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position:center center;
|
||||
}
|
||||
.opsoft-input >.opsoft-input-row >.opsoft-search-icon{
|
||||
height: 32rpx;
|
||||
width: 32rpx;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
background-size: 28rpx 28rpx;
|
||||
background-image: url(./static/search.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position:center center;
|
||||
}
|
||||
>>>.opsoft-input-row .uni-input-placeholder {
|
||||
color: rgba(153, 153, 153, 0.9);
|
||||
font-size: 32rpx;
|
||||
line-height: var(--input-height);
|
||||
height: var(--input-height);
|
||||
}
|
||||
|
||||
.opsoft-input-row>>> .uni-input-input {
|
||||
line-height: var(--input-height);
|
||||
height: var(--input-height);
|
||||
}
|
||||
|
||||
.opsoft-input-row>>> .opsoft-uniinput {
|
||||
line-height: var(--input-height);
|
||||
height: var(--input-height);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1649762537763" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3387" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||
</style></defs><path d="M873.085762 150.061615c-201.218984-201.218984-525.215654-201.218984-723.024147 0-201.218984 201.218984-201.218984 525.215654 0 723.024147 201.218984 201.218984 525.215654 201.218984 723.024147 0 201.218984-201.218984 201.218984-521.805162 0-723.024147zM753.718568 750.308077l-3.410491 3.410491c-13.641965 13.641965-30.694421 13.641965-44.336387 0L511.573689 559.320566l-194.398002 194.398002c-13.641965 13.641965-30.694421 13.641965-44.336386 0l-3.410492-3.410491c-13.641965-13.641965-13.641965-30.694421 0-44.336387l194.398002-194.398001-194.398002-194.398002c-13.641965-13.641965-13.641965-34.104913 0-44.336386 13.641965-13.641965 37.515404-13.641965 51.157369 0l190.987511 190.98751 194.398001-194.398002c13.641965-13.641965 30.694421-13.641965 44.336387 0s13.641965 37.515404 0 51.157369L559.320566 511.573689l194.398002 194.398001c13.641965 13.641965 13.641965 34.104913 0 44.336387z" fill="#C4C4C4" p-id="3388"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Reference in new issue
Block a user