[improvement] Use scoped-slots in Vue 2.6+ (#2688)

This commit is contained in:
neverland
2019-02-05 22:16:55 +08:00
committed by GitHub
parent 1ea92c023c
commit f768e75bfe
45 changed files with 125 additions and 117 deletions
+3
View File
@@ -3,6 +3,7 @@
*/
import '../../locale';
import { camelize } from '..';
import SlotsMixin from '../../mixins/slots';
const arrayProp = {
type: Array,
@@ -50,6 +51,8 @@ function functional(sfc) {
export default name => (sfc, isFunctional) => {
sfc.name = name;
sfc.install = install;
sfc.mixins = sfc.mixins || [];
sfc.mixins.push(SlotsMixin);
if (sfc.props) {
defaultProps(sfc.props);