| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <template>
- <div class="logout">
- <el-button round @click="dialogVisible=true" style="border: 1px solid #ff3b30;color: #ff3b30;">退出登录</el-button>
- <el-dialog
- title="提示"
- :visible.sync="dialogVisible"
- width="30%"
- :before-close="handleClose">
- <span>确定永久退出登录?</span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="logout()">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- export default {
- name: '',
- data () {
- return {
- dialogVisible:false
- };
- },
- computed: {
- },
- props: ['userInfo'],
- watch: {
- },
- methods: {
- aaa() {
- this.dialogVisible = true
- },
- logout() {
- this.$router.push('/')
- window.sessionStorage.clear()
- },
- handleClose() {
- this.dialogVisible = false
- }
- },
- };
- </script>
- <style scoped>
- </style>
|