Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
b678772e
Commit
b678772e
authored
Oct 17, 2017
by
wayne
Committed by
杨奕
Oct 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Carbon: add migration mixin for breaking changes
parent
f73dbe10
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
84 additions
and
13 deletions
+84
-13
packages/autocomplete/src/autocomplete.vue
packages/autocomplete/src/autocomplete.vue
+9
-1
packages/dialog/src/component.vue
packages/dialog/src/component.vue
+9
-1
packages/dropdown/src/dropdown.vue
packages/dropdown/src/dropdown.vue
+9
-1
packages/input/src/input.vue
packages/input/src/input.vue
+13
-1
packages/menu/src/menu.vue
packages/menu/src/menu.vue
+9
-1
packages/rate/src/main.vue
packages/rate/src/main.vue
+11
-0
packages/steps/src/steps.vue
packages/steps/src/steps.vue
+14
-7
packages/transfer/src/main.vue
packages/transfer/src/main.vue
+10
-1
No files found.
packages/autocomplete/src/autocomplete.vue
View file @
b678772e
...
...
@@ -63,12 +63,13 @@
import
Clickoutside
from
'
element-ui/src/utils/clickoutside
'
;
import
ElAutocompleteSuggestions
from
'
./autocomplete-suggestions.vue
'
;
import
Emitter
from
'
element-ui/src/mixins/emitter
'
;
import
Migrating
from
'
element-ui/src/mixins/migrating
'
;
import
{
generateId
}
from
'
element-ui/src/utils/util
'
;
export
default
{
name
:
'
ElAutocomplete
'
,
mixins
:
[
Emitter
],
mixins
:
[
Emitter
,
Migrating
],
componentName
:
'
ElAutocomplete
'
,
...
...
@@ -137,6 +138,13 @@
}
},
methods
:
{
getMigratingConfig
()
{
return
{
props
:
{
'
custom-item
'
:
'
custom-item is removed, use scoped slot intstead.
'
}
};
},
getData
(
queryString
)
{
this
.
loading
=
true
;
this
.
fetchSuggestions
(
queryString
,
(
suggestions
)
=>
{
...
...
packages/dialog/src/component.vue
View file @
b678772e
...
...
@@ -30,12 +30,13 @@
<
script
>
import
Popup
from
'
element-ui/src/utils/popup
'
;
import
Migrating
from
'
element-ui/src/mixins/migrating
'
;
import
emitter
from
'
element-ui/src/mixins/emitter
'
;
export
default
{
name
:
'
ElDialog
'
,
mixins
:
[
Popup
,
emitter
],
mixins
:
[
Popup
,
emitter
,
Migrating
],
props
:
{
title
:
{
...
...
@@ -138,6 +139,13 @@
},
methods
:
{
getMigratingConfig
()
{
return
{
props
:
{
'
size
'
:
'
size is removed.
'
}
};
},
handleWrapperClick
()
{
if
(
!
this
.
closeOnClickModal
)
return
;
this
.
handleClose
();
...
...
packages/dropdown/src/dropdown.vue
View file @
b678772e
<
script
>
import
Clickoutside
from
'
element-ui/src/utils/clickoutside
'
;
import
Emitter
from
'
element-ui/src/mixins/emitter
'
;
import
Migrating
from
'
element-ui/src/mixins/migrating
'
;
import
ElButton
from
'
element-ui/packages/button
'
;
import
ElButtonGroup
from
'
element-ui/packages/button-group
'
;
...
...
@@ -9,7 +10,7 @@
componentName
:
'
ElDropdown
'
,
mixins
:
[
Emitter
],
mixins
:
[
Emitter
,
Migrating
],
directives
:
{
Clickoutside
},
...
...
@@ -75,6 +76,13 @@
},
methods
:
{
getMigratingConfig
()
{
return
{
props
:
{
'
menu-align
'
:
'
menu-align is renamed to placement.
'
}
};
},
show
()
{
if
(
this
.
triggerElm
.
disabled
)
return
;
clearTimeout
(
this
.
timeout
);
...
...
packages/input/src/input.vue
View file @
b678772e
...
...
@@ -75,6 +75,7 @@
<
script
>
import
emitter
from
'
element-ui/src/mixins/emitter
'
;
import
Focus
from
'
element-ui/src/mixins/focus
'
;
import
Migrating
from
'
element-ui/src/mixins/migrating
'
;
import
calcTextareaHeight
from
'
./calcTextareaHeight
'
;
import
merge
from
'
element-ui/src/utils/merge
'
;
...
...
@@ -83,7 +84,7 @@
componentName
:
'
ElInput
'
,
mixins
:
[
emitter
,
Focus
(
'
input
'
)],
mixins
:
[
emitter
,
Focus
(
'
input
'
)
,
Migrating
],
inject
:
{
elFormItem
:
{
...
...
@@ -174,6 +175,17 @@
},
methods
:
{
getMigratingConfig
()
{
return
{
props
:
{
'
icon
'
:
'
icon is removed, use suffix-icon / prefix-icon instead.
'
,
'
on-icon-click
'
:
'
on-icon-click is removed.
'
},
events
:
{
'
click
'
:
'
click is removed.
'
}
};
},
handleBlur
(
event
)
{
this
.
$emit
(
'
blur
'
,
event
);
if
(
this
.
validateEvent
)
{
...
...
packages/menu/src/menu.vue
View file @
b678772e
...
...
@@ -15,6 +15,7 @@
</
template
>
<
script
>
import
emitter
from
'
element-ui/src/mixins/emitter
'
;
import
Migrating
from
'
element-ui/src/mixins/migrating
'
;
import
Menubar
from
'
element-ui/src/utils/menu/aria-menubar
'
;
import
{
addClass
,
removeClass
,
hasClass
}
from
'
element-ui/src/utils/dom
'
;
...
...
@@ -23,7 +24,7 @@
componentName
:
'
ElMenu
'
,
mixins
:
[
emitter
],
mixins
:
[
emitter
,
Migrating
],
provide
()
{
return
{
...
...
@@ -147,6 +148,13 @@
}
},
methods
:
{
getMigratingConfig
()
{
return
{
props
:
{
'
theme
'
:
'
theme is removed.
'
}
};
},
getColorChannels
(
color
)
{
color
=
color
.
replace
(
'
#
'
,
''
);
if
(
/^
[
1-9a-fA-F
]{3}
$/
.
test
(
color
))
{
...
...
packages/rate/src/main.vue
View file @
b678772e
...
...
@@ -33,10 +33,13 @@
<
script
>
import
{
hasClass
}
from
'
element-ui/src/utils/dom
'
;
import
Migrating
from
'
element-ui/src/mixins/migrating
'
;
export
default
{
name
:
'
ElRate
'
,
mixins
:
[
Migrating
],
data
()
{
return
{
classMap
:
{},
...
...
@@ -205,6 +208,14 @@
},
methods
:
{
getMigratingConfig
()
{
return
{
props
:
{
'
text-template
'
:
'
text-template is renamed to score-template.
'
}
};
},
getValueFromMap
(
value
,
map
)
{
let
result
=
''
;
if
(
value
<=
this
.
lowThreshold
)
{
...
...
packages/steps/src/steps.vue
View file @
b678772e
...
...
@@ -10,9 +10,13 @@
</
template
>
<
script
>
import
Migrating
from
'
element-ui/src/mixins/migrating
'
;
export
default
{
name
:
'
ElSteps
'
,
mixins
:
[
Migrating
],
props
:
{
space
:
[
Number
,
String
],
active
:
Number
,
...
...
@@ -21,7 +25,6 @@ export default {
default
:
'
horizontal
'
},
alignCenter
:
Boolean
,
center
:
Boolean
,
simple
:
Boolean
,
finishStatus
:
{
type
:
String
,
...
...
@@ -40,6 +43,16 @@ export default {
};
},
methods
:
{
getMigratingConfig
()
{
return
{
props
:
{
'
center
'
:
'
center is removed.
'
}
};
}
},
watch
:
{
active
(
newVal
,
oldVal
)
{
this
.
$emit
(
'
change
'
,
newVal
,
oldVal
);
...
...
@@ -49,12 +62,6 @@ export default {
steps
.
forEach
((
child
,
index
)
=>
{
child
.
index
=
index
;
});
if
(
this
.
center
)
{
const
len
=
steps
.
length
;
this
.
$nextTick
(()
=>
{
this
.
stepOffset
=
steps
[
len
-
1
].
$el
.
getBoundingClientRect
().
width
/
(
len
-
1
);
});
}
}
}
};
...
...
packages/transfer/src/main.vue
View file @
b678772e
...
...
@@ -44,11 +44,12 @@
import
Emitter
from
'
element-ui/src/mixins/emitter
'
;
import
Locale
from
'
element-ui/src/mixins/locale
'
;
import
TransferPanel
from
'
./transfer-panel.vue
'
;
import
Migrating
from
'
element-ui/src/mixins/migrating
'
;
export
default
{
name
:
'
ElTransfer
'
,
mixins
:
[
Emitter
,
Locale
],
mixins
:
[
Emitter
,
Locale
,
Migrating
],
components
:
{
TransferPanel
,
...
...
@@ -145,6 +146,14 @@
},
methods
:
{
getMigratingConfig
()
{
return
{
props
:
{
'
footer-format
'
:
'
footer-format is renamed to format.
'
}
};
},
onSourceCheckedChange
(
val
)
{
this
.
leftChecked
=
val
;
},
...
...
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