Security.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <a-list
  3. itemLayout="horizontal"
  4. :dataSource="data"
  5. >
  6. <a-list-item slot="renderItem" slot-scope="item, index" :key="index">
  7. <a-list-item-meta>
  8. <a slot="title">{{ item.title }}</a>
  9. <span slot="description">
  10. <span class="security-list-description">{{ item.description }}</span>
  11. <span v-if="item.value"> : </span>
  12. <span class="security-list-value">{{ item.value }}</span>
  13. </span>
  14. </a-list-item-meta>
  15. <template v-if="item.actions">
  16. <a slot="actions" @click="item.actions.callback">{{ item.actions.title }}</a>
  17. </template>
  18. </a-list-item>
  19. </a-list>
  20. </template>
  21. <script>
  22. export default {
  23. data () {
  24. return {
  25. data: [
  26. { title: '账户密码', description: '当前密码强度', value: '强', actions: { title: '修改', callback: () => { this.$message.info('This is a normal message') } } },
  27. { title: '密保手机', description: '已绑定手机', value: '138****8293', actions: { title: '修改', callback: () => { this.$message.success('This is a message of success') } } },
  28. { title: '密保问题', description: '未设置密保问题,密保问题可有效保护账户安全', value: '', actions: { title: '设置', callback: () => { this.$message.error('This is a message of error') } } },
  29. { title: '备用邮箱', description: '已绑定邮箱', value: 'ant***sign.com', actions: { title: '修改', callback: () => { this.$message.warning('This is message of warning') } } },
  30. { title: 'MFA 设备', description: '未绑定 MFA 设备,绑定后,可以进行二次确认', value: '', actions: { title: '绑定', callback: () => { this.$message.info('This is a normal message') } } }
  31. ]
  32. }
  33. }
  34. }
  35. </script>
  36. <style scoped>
  37. </style>