intr.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <div class="wrapper">
  3. 自我介绍页
  4. <p id="copy">这个用来实验按钮的好坏</p>
  5. <button class="btncp" data-clipboard-target="#copy">点击复制</button>
  6. </div>
  7. </template>
  8. <style>
  9. body {
  10. background: #fff;
  11. }
  12. </style>
  13. <script>
  14. export default {
  15. name: 'index',
  16. data() {
  17. return {
  18. path: '',
  19. packages: {},
  20. sortedPackages: [],
  21. version: '',
  22. };
  23. },
  24. watch: {
  25. packages() {
  26. const compare = (obj1, obj2) => {
  27. const val1 = obj1.name;
  28. const val2 = obj2.name;
  29. if (val1 < val2) {
  30. return -1;
  31. } else if (val1 > val2) {
  32. return 1;
  33. } else {
  34. return 0;
  35. }
  36. };
  37. this.sortedPackages = [...this.packages].sort(compare);
  38. },
  39. },
  40. methods: {},
  41. created() {
  42. // copys.on('success', function(e) {
  43. // console.info('Action:', e.action);
  44. // console.info('Text:', e.text);
  45. // console.info('Trigger:', e.trigger);
  46. // e.clearSelection();
  47. // });
  48. },
  49. };
  50. </script>
  51. <style></style>
  52. <style lang="scss" scoped>
  53. .logo {
  54. text-align: center;
  55. padding: 16px 0;
  56. img {
  57. width: 240px;
  58. }
  59. div {
  60. font-family: Roboto, Lato, sans-serif;
  61. font-size: 24px;
  62. letter-spacing: 0.14px;
  63. line-height: 20px;
  64. margin-top: 12px;
  65. }
  66. }
  67. .l-s {
  68. list-style: none;
  69. margin: 0;
  70. padding: 10px 0;
  71. li {
  72. line-height: 40px;
  73. border-bottom: 1px solid rgba(204, 204, 204, 0.4);
  74. &:first-child {
  75. border-top: none;
  76. }
  77. }
  78. a {
  79. text-decoration: none;
  80. color: #333;
  81. display: inline-block;
  82. width: 100%;
  83. height: 100%;
  84. padding-left: 20px;
  85. box-sizing: border-box;
  86. }
  87. }
  88. </style>