# 旧版浏览器通知

# 描述

向用户显示不支持其浏览器的通知。检查 ie10 或 ie11 并显示通知。

# 安装

# 小工具

安装为复制和粘贴小部件。

提示

此组件的属性“minVersion”可以作为脚本标记上的属性传递。 查看选项详情

# Vuejs

To install as vuejs component.

<template>
  <div id="app">
    <LegacyNotice min-version='10'/>
  </div>
</template>

<script>
import LegacyNotice from '@action-agenda/legacy-notice'

export default {
  name      : 'App',
  components: {
    LegacyNotice
  }
}
</script>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# 特性

  props     : { minVersion   : { type: String, default: '11'  } },
  const ie10s = ['10', 'ie10', 'IE10']
  const ie11s = ['11', 'ie11', 'IE11']
  // if passed 'force' the component will render,
1
2
3

# I18n(翻译)

export default { messages : {
    en: {
        'Browser not supported': 'Browser not supported'                                                                              ,
        working                : 'Please note we are working to have this web component compatible with legacy browsers still in use.',
        interim                : 'In the interim, please consider using one of the following free browsers to use this component:'
    }
  }
}
1
2
3
4
5
6
7

# 例子