reverse.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {{define "settings/xray/reverse"}}
  2. <template v-if="reverseData.length > 0">
  3. <a-space direction="vertical" size="middle">
  4. <a-button type="primary" icon="plus" @click="addReverse()">
  5. <span>{{ i18n "pages.xray.outbound.addReverse" }}</span>
  6. </a-button>
  7. <a-table :columns="reverseColumns" bordered :row-key="r => r.key" :data-source="reverseData"
  8. :scroll="isMobile ? {} : { x: 200 }" :pagination="false" :indent-size="0">
  9. <template slot="action" slot-scope="text, reverse, index">
  10. <span>[[ index+1 ]]</span>
  11. <a-dropdown :trigger="['click']">
  12. <a-icon @click="e => e.preventDefault()" type="more"
  13. :style="{ fontSize: '16px', textDecoration: 'bold' }"></a-icon>
  14. <a-menu slot="overlay" :theme="themeSwitcher.currentTheme">
  15. <a-menu-item @click="editReverse(index)">
  16. <a-icon type="edit"></a-icon>
  17. <span>{{ i18n "edit" }}</span>
  18. </a-menu-item>
  19. <a-menu-item @click="deleteReverse(index)">
  20. <span :style="{ color: '#FF4D4F' }">
  21. <a-icon type="delete"></a-icon>
  22. <span>{{ i18n "delete"}}</span>
  23. </span>
  24. </a-menu-item>
  25. </a-menu>
  26. </a-dropdown>
  27. </template>
  28. </a-table>
  29. </a-space>
  30. </template>
  31. <template v-else>
  32. <a-empty description='{{ i18n "emptyReverseDesc" }}' :style="{ margin: '10px' }">
  33. <a-button type="primary" icon="plus" @click="addReverse()" :style="{ marginTop: '10px' }">
  34. {{ i18n "pages.xray.outbound.addReverse" }}
  35. </a-button>
  36. </a-empty>
  37. </template>
  38. {{end}}