[Improvement] Support Vue.use to register a component (#401)

This commit is contained in:
neverland
2017-12-11 20:41:19 +08:00
committed by GitHub
parent 7dbb5db256
commit 6f2b4c99da
162 changed files with 432 additions and 490 deletions

View File

@@ -19,19 +19,13 @@
</template>
<script>
import Icon from '../icon';
import Loading from '../loading';
import { create } from '../utils';
const DEFAULT_STYLE_LIST = ['success', 'fail', 'loading'];
export default {
export default create({
name: 'van-toast',
components: {
Icon,
Loading
},
props: {
mask: Boolean,
message: [String, Number],
@@ -57,5 +51,5 @@ export default {
return DEFAULT_STYLE_LIST.indexOf(this.type) !== -1 ? 'default' : this.type;
}
}
};
});
</script>