Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
isc-web-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
isc-v3.1-tmp
isc-web-vue
Commits
8f3dc3c8
Commit
8f3dc3c8
authored
Oct 14, 2024
by
李少勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改基础组件placeholder的问题
parent
c1c85b12
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
135 additions
and
16 deletions
+135
-16
DatePicker.vue
src/components/business/DatePicker.vue
+13
-0
DateTimePicker.vue
src/components/business/DateTimePicker.vue
+13
-0
HolidayPicker.vue
src/components/business/HolidayPicker.vue
+16
-1
Input.vue
src/components/business/Input.vue
+7
-2
InputCurrency.vue
src/components/business/InputCurrency.vue
+13
-0
InputFormat.vue
src/components/business/InputFormat.vue
+29
-8
InputNumber.vue
src/components/business/InputNumber.vue
+13
-0
InputXml.vue
src/components/business/InputXml.vue
+13
-0
MulRowInput.vue
src/components/business/MulRowInput.vue
+9
-1
Select.vue
src/components/business/Select.vue
+9
-4
No files found.
src/components/business/DatePicker.vue
View file @
8f3dc3c8
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
clearable
clearable
ref="add"
ref="add"
v-bind:disabled="isDisable"
v-bind:disabled="isDisable"
:placeholder="placeholderEnable || placeholder || $t('components.请选择')"
>
</el-input>
>
</el-input>
<i
class=
"date-pick-btn el-icon-date"
>
<i
class=
"date-pick-btn el-icon-date"
>
<el-date-picker
<el-date-picker
...
@@ -67,6 +68,10 @@ export default {
...
@@ -67,6 +68,10 @@ export default {
type
:
String
,
type
:
String
,
default
:
undefined
default
:
undefined
},
},
placeholder
:{
type
:
String
,
default
:
null
},
// 此对象为markset或者modifySet所在的对象,如果传了此对象可以标记当前对象下的字段为红色下划线
// 此对象为markset或者modifySet所在的对象,如果传了此对象可以标记当前对象下的字段为红色下划线
markSetData
:
{
markSetData
:
{
type
:
Object
,
type
:
Object
,
...
@@ -102,6 +107,14 @@ export default {
...
@@ -102,6 +107,14 @@ export default {
return
this
.
mode
===
'display'
||
this
.
disabled
return
this
.
mode
===
'display'
||
this
.
disabled
}
}
},
},
placeholderEnable
(){
let
label
=
this
.
$parent
.
label
let
curLabel
=
''
if
(
label
)
{
curLabel
=
this
.
$i18n
.
locale
===
'en'
?
this
.
$t
(
'components.请选择'
)
+
' '
+
this
.
$t
(
'components.'
+
label
)
:
this
.
$t
(
'components.请选择'
)
+
this
.
$t
(
'components.'
+
label
)
}
return
curLabel
},
highlight
()
{
highlight
()
{
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
},
},
...
...
src/components/business/DateTimePicker.vue
View file @
8f3dc3c8
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
type="datetime"
type="datetime"
v-bind:disabled="isDisable"
v-bind:disabled="isDisable"
v-on="$listeners"
v-on="$listeners"
:placeholder="placeholderEnable || placeholder || $t('components.请选择')"
:value-format="valueFormat" :format="format"
:value-format="valueFormat" :format="format"
@change="handleChange"
@change="handleChange"
>
</el-date-picker>
>
</el-date-picker>
...
@@ -42,6 +43,10 @@ export default {
...
@@ -42,6 +43,10 @@ export default {
type
:
String
,
type
:
String
,
default
:
undefined
default
:
undefined
},
},
placeholder
:{
type
:
String
,
default
:
null
},
// 此对象为markset或者modifySet所在的对象,如果传了此对象可以标记当前对象下的字段为红色下划线
// 此对象为markset或者modifySet所在的对象,如果传了此对象可以标记当前对象下的字段为红色下划线
markSetData
:
{
markSetData
:
{
type
:
Object
,
type
:
Object
,
...
@@ -69,6 +74,14 @@ export default {
...
@@ -69,6 +74,14 @@ export default {
return
this
.
mode
===
'display'
||
this
.
disabled
return
this
.
mode
===
'display'
||
this
.
disabled
}
}
},
},
placeholderEnable
(){
let
label
=
this
.
$parent
.
label
let
curLabel
=
''
if
(
label
)
{
curLabel
=
this
.
$i18n
.
locale
===
'en'
?
this
.
$t
(
'components.请选择'
)
+
' '
+
this
.
$t
(
'components.'
+
label
)
:
this
.
$t
(
'components.请选择'
)
+
this
.
$t
(
'components.'
+
label
)
}
return
curLabel
},
highlight
()
{
highlight
()
{
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
},
},
...
...
src/components/business/HolidayPicker.vue
View file @
8f3dc3c8
<
template
>
<
template
>
<el-date-picker
:id=
"id"
:class=
"
{'highlight': highlight}" placeholder="选择日期" type="date" :picker-options="pickerOptions" v-model="model" v-bind="$attrs"
<el-date-picker
:id=
"id"
:class=
"
{'highlight': highlight}"
:placeholder="placeholderEnable || placeholder || $t('components.请选择')"
type="date" :picker-options="pickerOptions" v-model="model" v-bind="$attrs"
v-on="$listeners" v-bind:disabled="isDisable" value-format="yyyyMMdd" format="yyyy-MM-dd">
</el-date-picker>
v-on="$listeners" v-bind:disabled="isDisable" value-format="yyyyMMdd" format="yyyy-MM-dd">
</el-date-picker>
</
template
>
</
template
>
...
@@ -17,6 +20,10 @@
...
@@ -17,6 +20,10 @@
id
:
{
id
:
{
type
:
String
,
type
:
String
,
default
:
undefined
default
:
undefined
},
placeholder
:{
type
:
String
,
default
:
null
}
}
},
},
computed
:
{
computed
:
{
...
@@ -36,6 +43,14 @@
...
@@ -36,6 +43,14 @@
return
this
.
mode
===
'display'
||
this
.
disabled
return
this
.
mode
===
'display'
||
this
.
disabled
}
}
},
},
placeholderEnable
(){
let
label
=
this
.
$parent
.
label
let
curLabel
=
''
if
(
label
)
{
curLabel
=
this
.
$i18n
.
locale
===
'en'
?
this
.
$t
(
'components.请选择'
)
+
' '
+
this
.
$t
(
'components.'
+
label
)
:
this
.
$t
(
'components.请选择'
)
+
this
.
$t
(
'components.'
+
label
)
}
return
curLabel
},
highlight
()
{
highlight
()
{
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
}
}
...
...
src/components/business/Input.vue
View file @
8f3dc3c8
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
v-bind:disabled="isDisable"
v-bind:disabled="isDisable"
:maxlength="maxlength"
:maxlength="maxlength"
:show-word-limit="isLimitChar ? false : showWordLimit"
:show-word-limit="isLimitChar ? false : showWordLimit"
:placeholder="placeholderEnable || placeholder || $t('components.请输入')"
@change="handleChange"
@change="handleChange"
:placeholder="placeholderEnable"
>
>
<template
v-slot:suffix
>
<template
v-slot:suffix
>
<slot
name=
"suffix"
></slot>
<slot
name=
"suffix"
></slot>
...
@@ -100,7 +100,12 @@ export default {
...
@@ -100,7 +100,12 @@ export default {
return
this
.
mode
===
'display'
||
this
.
disabled
return
this
.
mode
===
'display'
||
this
.
disabled
},
},
placeholderEnable
(){
placeholderEnable
(){
return
this
.
isDisable
?
""
:
this
.
placeholder
let
label
=
this
.
$parent
.
label
||
this
.
$parent
.
label
let
curLabel
=
''
if
(
label
)
{
curLabel
=
this
.
$i18n
.
locale
===
'en'
?
this
.
$t
(
'components.请输入'
)
+
' '
+
this
.
$t
(
'components.'
+
label
)
:
this
.
$t
(
'components.请输入'
)
+
this
.
$t
(
'components.'
+
label
)
}
return
curLabel
},
},
highlight
()
{
highlight
()
{
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
...
...
src/components/business/InputCurrency.vue
View file @
8f3dc3c8
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
v-on="$listeners"
v-on="$listeners"
v-bind:disabled="isDisable"
v-bind:disabled="isDisable"
:maxlength="maxlength"
:maxlength="maxlength"
:placeholder="placeholderEnable || placeholder || $t('components.请输入')"
@blur="onBlur"
@blur="onBlur"
@focus="focus"
@focus="focus"
@change="handleChange"
@change="handleChange"
...
@@ -67,6 +68,10 @@ export default {
...
@@ -67,6 +68,10 @@ export default {
type
:
String
,
type
:
String
,
default
:
""
default
:
""
},
},
placeholder
:{
type
:
String
,
default
:
null
},
// 此对象为markset或者modifySet所在的对象,如果传了此对象可以标记当前对象下的字段为红色下划线
// 此对象为markset或者modifySet所在的对象,如果传了此对象可以标记当前对象下的字段为红色下划线
markSetData
:
{
markSetData
:
{
type
:
Object
,
type
:
Object
,
...
@@ -115,6 +120,14 @@ export default {
...
@@ -115,6 +120,14 @@ export default {
isDisable
()
{
isDisable
()
{
return
this
.
mode
===
"display"
||
this
.
disabled
;
return
this
.
mode
===
"display"
||
this
.
disabled
;
},
},
placeholderEnable
(){
let
label
=
this
.
$parent
.
label
let
curLabel
=
''
if
(
label
)
{
curLabel
=
this
.
$i18n
.
locale
===
'en'
?
this
.
$t
(
'components.请输入'
)
+
' '
+
this
.
$t
(
'components.'
+
label
)
:
this
.
$t
(
'components.请输入'
)
+
this
.
$t
(
'components.'
+
label
)
}
return
curLabel
},
curPrecision
()
{
curPrecision
()
{
if
(
this
.
currency
===
"KRW"
||
this
.
currency
===
"JPY"
)
{
if
(
this
.
currency
===
"KRW"
||
this
.
currency
===
"JPY"
)
{
return
0
return
0
...
...
src/components/business/InputFormat.vue
View file @
8f3dc3c8
<
template
>
<
template
>
<el-input
:id=
"id"
ref=
"form-item"
v-model=
"model"
type=
"textarea"
v-bind=
"$attrs"
v-on=
"$listeners"
v-bind:disabled=
"isDisable"
:rows=
"maxRows"
resize=
"none"
/>
<el-input
:id=
"id"
ref=
"form-item"
v-model=
"model"
type=
"textarea"
v-bind=
"$attrs"
v-on=
"$listeners"
v-bind:disabled=
"isDisable"
:rows=
"maxRows"
resize=
"none"
:placeholder=
"placeholderEnable || placeholder || $t('components.请输入')"
/>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -24,25 +33,37 @@ export default {
...
@@ -24,25 +33,37 @@ export default {
id
:
{
id
:
{
type
:
String
,
type
:
String
,
default
:
undefined
default
:
undefined
}
},
placeholder
:
{
type
:
String
,
default
:
null
},
},
},
computed
:
{
computed
:
{
model
:
{
model
:
{
get
()
{
get
()
{
let
value
=
this
.
format
(
this
.
value
)
let
value
=
this
.
format
(
this
.
value
)
return
value
return
value
},
},
set
(
newVal
)
{
set
(
newVal
)
{
this
.
$emit
(
'input'
,
newVal
)
this
.
$emit
(
'input'
,
newVal
)
}
}
},
},
mode
()
{
mode
()
{
return
this
.
$store
.
state
.
Status
.
mode
return
this
.
$store
.
state
.
Status
.
mode
},
},
isDisable
()
{
isDisable
()
{
return
this
.
mode
===
'display'
||
this
.
disabled
return
this
.
mode
===
'display'
||
this
.
disabled
},
},
highlight
()
{
placeholderEnable
()
{
let
label
=
this
.
$parent
.
label
let
curLabel
=
''
if
(
label
)
{
curLabel
=
this
.
$i18n
.
locale
===
'en'
?
this
.
$t
(
'components.请输入'
)
+
' '
+
this
.
$t
(
'components.'
+
label
)
:
this
.
$t
(
'components.请输入'
)
+
this
.
$t
(
'components.'
+
label
)
}
return
curLabel
},
highlight
()
{
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
}
}
},
},
...
...
src/components/business/InputNumber.vue
View file @
8f3dc3c8
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
v-bind="$attrs"
v-bind="$attrs"
v-on="$listeners"
v-on="$listeners"
v-bind:disabled="isDisable"
v-bind:disabled="isDisable"
:placeholder="placeholderEnable || placeholder || $t('components.请输入')"
@blur="blurEvent"
@blur="blurEvent"
@change="handleChange"
@change="handleChange"
/>
/>
...
@@ -38,6 +39,10 @@ export default {
...
@@ -38,6 +39,10 @@ export default {
type
:
String
,
type
:
String
,
default
:
undefined
default
:
undefined
},
},
placeholder
:{
type
:
String
,
default
:
null
},
// 此对象为markset或者modifySet所在的对象,如果传了此对象可以标记当前对象下的字段为红色下划线
// 此对象为markset或者modifySet所在的对象,如果传了此对象可以标记当前对象下的字段为红色下划线
markSetData
:
{
markSetData
:
{
type
:
Object
,
type
:
Object
,
...
@@ -63,6 +68,14 @@ export default {
...
@@ -63,6 +68,14 @@ export default {
isDisable
()
{
isDisable
()
{
return
this
.
mode
===
'display'
||
this
.
disabled
return
this
.
mode
===
'display'
||
this
.
disabled
},
},
placeholderEnable
(){
let
label
=
this
.
$parent
.
label
let
curLabel
=
''
if
(
label
)
{
curLabel
=
this
.
$i18n
.
locale
===
'en'
?
this
.
$t
(
'components.请输入'
)
+
' '
+
this
.
$t
(
'components.'
+
label
)
:
this
.
$t
(
'components.请输入'
)
+
this
.
$t
(
'components.'
+
label
)
}
return
curLabel
},
highlight
()
{
highlight
()
{
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
},
},
...
...
src/components/business/InputXml.vue
View file @
8f3dc3c8
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
v-bind:disabled="isDisable"
v-bind:disabled="isDisable"
:rows="maxRows"
:rows="maxRows"
resize="none"
resize="none"
:placeholder="placeholderEnable || placeholder || $t('components.请输入')"
@blur="blurEvent"
@blur="blurEvent"
@change="handleChange"
@change="handleChange"
/>
/>
...
@@ -42,6 +43,10 @@ export default {
...
@@ -42,6 +43,10 @@ export default {
type
:
Number
,
type
:
Number
,
default
:
3
default
:
3
},
},
placeholder
:{
type
:
String
,
default
:
null
},
// 此对象为markset或者modifySet所在的对象,如果传了此对象可以标记当前对象下的字段为红色下划线
// 此对象为markset或者modifySet所在的对象,如果传了此对象可以标记当前对象下的字段为红色下划线
markSetData
:
{
markSetData
:
{
type
:
Object
,
type
:
Object
,
...
@@ -67,6 +72,14 @@ export default {
...
@@ -67,6 +72,14 @@ export default {
isDisable
()
{
isDisable
()
{
return
this
.
mode
===
'display'
||
this
.
disabled
return
this
.
mode
===
'display'
||
this
.
disabled
},
},
placeholderEnable
(){
let
label
=
this
.
$parent
.
label
let
curLabel
=
''
if
(
label
)
{
curLabel
=
this
.
$i18n
.
locale
===
'en'
?
this
.
$t
(
'components.请输入'
)
+
' '
+
this
.
$t
(
'components.'
+
label
)
:
this
.
$t
(
'components.请输入'
)
+
this
.
$t
(
'components.'
+
label
)
}
return
curLabel
},
},
},
watch
:
{
watch
:
{
disabled
(
newVal
)
{
disabled
(
newVal
)
{
...
...
src/components/business/MulRowInput.vue
View file @
8f3dc3c8
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
v-on="$listeners"
v-on="$listeners"
v-bind:disabled="isDisable"
v-bind:disabled="isDisable"
:autosize="autosize"
:autosize="autosize"
:placeholder="placeholder
"
:placeholder="placeholderEnable || placeholder || $t('components.请输入')
"
:show-word-limit="!isLimitChar
&&
!isIgnoreLine"
:show-word-limit="!isLimitChar
&&
!isIgnoreLine"
:maxlength="rows * cols"
:maxlength="rows * cols"
@blur="onBlur"
@blur="onBlur"
...
@@ -196,6 +196,14 @@ export default {
...
@@ -196,6 +196,14 @@ export default {
isDisable
()
{
isDisable
()
{
return
this
.
mode
===
'display'
||
this
.
disabled
return
this
.
mode
===
'display'
||
this
.
disabled
},
},
placeholderEnable
(){
let
label
=
this
.
$parent
.
label
let
curLabel
=
''
if
(
label
)
{
curLabel
=
this
.
$i18n
.
locale
===
'en'
?
this
.
$t
(
'components.请输入'
)
+
' '
+
this
.
$t
(
'components.'
+
label
)
:
this
.
$t
(
'components.请输入'
)
+
this
.
$t
(
'components.'
+
label
)
}
return
curLabel
},
highlight
()
{
highlight
()
{
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
},
},
...
...
src/components/business/Select.vue
View file @
8f3dc3c8
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
v-bind:disabled="isDisable"
v-bind:disabled="isDisable"
:clearable="clearable"
:clearable="clearable"
v-on="$listeners"
v-on="$listeners"
:placeholder="placeholderEnable"
:placeholder="placeholderEnable
|| placeholder || $t('components.请选择')
"
@change="handleChange"
@change="handleChange"
@keyup.delete.native="deleteValue"
@keyup.delete.native="deleteValue"
>
>
...
@@ -146,9 +146,14 @@ export default {
...
@@ -146,9 +146,14 @@ export default {
isDisable
()
{
isDisable
()
{
return
this
.
mode
===
"display"
||
this
.
disabled
;
return
this
.
mode
===
"display"
||
this
.
disabled
;
},
},
placeholderEnable
(){
placeholderEnable
(){
return
this
.
isDisable
?
""
:
this
.
placeholder
let
label
=
this
.
$parent
.
label
},
let
curLabel
=
''
if
(
label
)
{
curLabel
=
this
.
$i18n
.
locale
===
'en'
?
this
.
$t
(
'components.请选择'
)
+
' '
+
this
.
$t
(
'components.'
+
label
)
:
this
.
$t
(
'components.请选择'
)
+
this
.
$t
(
'components.'
+
label
)
}
return
curLabel
},
highlight
()
{
highlight
()
{
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
;
return
this
.
$store
.
state
.
Status
.
highlights
.
indexOf
(
this
.
id
)
!==
-
1
;
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment