blob: 6b4366415005a53c58cf57120be9129743b25bc9 [file] [log] [blame]
<template>
<preview></preview>
</template>
<script>
import Preview from './Preview.vue';
import { store, loadExampleCode, parseSourceCode } from '../common/store';
export default {
components: {
Preview
},
mounted() {
loadExampleCode().then((code) => {
store.runCode = parseSourceCode(code);
});
this.showShareHint();
},
methods: {
showShareHint() {
if (store.isSharedCode) {
this.$message.closeAll();
this.$message({
type: 'warning',
message: this.$t('editor.share.hint'),
duration: 5000,
showClose: true
});
}
}
}
};
</script>
<style lang="scss"></style>