Commit a645de15 authored by nature's avatar nature

placeholder 处理

parent eb2927a1
......@@ -36,7 +36,7 @@
.field-title {
line-height: 25px;
font-size: 14px;
font-size: 12px;
color: #333;
letter-spacing: 0;
margin-right: 12px;
......@@ -47,7 +47,7 @@
position: absolute;
left: 8px;
color: #D24E4E;
font-size: 14px;
font-size: 12px;
content: '*';
}
}
......@@ -66,7 +66,7 @@
.field-control {
display: block;
box-sizing: border-box;
font-size: 14px;
font-size: 12px;
width: 100%;
min-width: 0;
margin: 0;
......
......@@ -15,6 +15,7 @@
<div :style="{'flex':proportion[1] }" class="field-value">
<div :class="{'field-control-error':hasError}" class="field-body">
<input
ref="fieldInput"
v-bind="$attrs"
v-model="value"
:disabled="disabled" :placeholder="dataPlaceholder" :class="('field-control-'+inputAlign)" class="field-control"
......
......@@ -15,9 +15,10 @@
<div :style="{'flex':proportion[1] }" class="field-value">
<div :class="{'field-control-error':hasError}" class="field-body">
<input
v-bind="$attrs"
v-model="codeName" :disabled="disabled" :placeholder="selectPlaceholder" :class="('field-control-'+inputAlign)"
type="text" class="field-control"
ref="fieldInput"
v-bind="$attrs" v-model="codeName" :disabled="disabled" :placeholder="selectPlaceholder"
:class="('field-control-'+inputAlign)" type="text"
class="field-control"
readonly
@click="showSelect"
@blur="onBlur">
......
......@@ -15,9 +15,10 @@
<div :style="{'flex':proportion[1] }" class="field-value">
<div :class="{'field-control-error':hasError}" class="field-body">
<input
v-bind="$attrs"
v-model="codeName" :disabled="disabled" :placeholder="selectPlaceholder" :class="('field-control-'+inputAlign)"
type="text" class="field-control"
ref="fieldInput"
v-bind="$attrs" v-model="codeName" :disabled="disabled" :placeholder="selectPlaceholder"
:class="('field-control-'+inputAlign)" type="text"
class="field-control"
readonly
@click="showSelect"
@blur="onBlur">
......@@ -215,7 +216,7 @@ export default {
getLovCode () {
let vm = this
const tenantId = localStorage.getItem('tenantId')
let url = `${process.env.VUE_APP_API_HOST}/hpfm/v1/${tenantId}/lov-view/info?viewCode=${vm.lovCode}&t=${new Date().getTime()}`
let url = `${process.env.VUE_APP_API_HOST}/hpfm/v1/${tenantId}/lov-view/info?viewCode=${vm.lovCode}&t=${Math.random()}`
let headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + window.localStorage.access_token,
......@@ -225,7 +226,7 @@ export default {
}).then((res) => {
if (res.queryUrl) {
const queryUrl = res.queryUrl
let lovUrl = `${process.env.VUE_APP_API_HOST}${queryUrl}?lovCode=${this.lovCode}&page=0&size=99&t=${new Date().getTime()}`
let lovUrl = `${process.env.VUE_APP_API_HOST}${queryUrl}?lovCode=${this.lovCode}&page=0&size=99&t=${Math.random()}`
axios.get(lovUrl, {
headers: headers,
}).then((res) => {
......@@ -241,7 +242,7 @@ export default {
getLookUpCode () {
let vm = this
const tenantId = localStorage.getItem('tenantId')
let url = `${process.env.VUE_APP_API_HOST}/hpfm/v1/${tenantId}/lovs/data?lovCode=${vm.lookUpCode}&t=${new Date().getTime()}`
let url = `${process.env.VUE_APP_API_HOST}/hpfm/v1/${tenantId}/lovs/data?lovCode=${vm.lookUpCode}&t=${Math.random()}`
axios.get(url, {
headers: {
'Content-Type': 'application/json',
......@@ -281,12 +282,12 @@ export default {
if (!vm.disabled) {
let array = (vm.lookUpCode || vm.lovCode) ? vm.arrayList : vm.dataArray
let list = []
array.forEach((date, index, array) => {
list.push({
value: date[vm.valueKey],
name: date[vm.valueName],
parent: date.parent,
})
array.forEach((data, index, array) => {
list.push(Object.assign({
value: data[vm.valueKey],
name: data[vm.valueName],
parent: data.parent,
}, data))
})
VueSelect.show({
list: list,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment