diff --git a/src/components/header.vue b/src/components/header.vue
index 0c54b08..142d24d 100644
--- a/src/components/header.vue
+++ b/src/components/header.vue
@@ -23,13 +23,50 @@
同时我们也提供自主提交开源库的收录(前提是在npm上发布的)
-
+
diff --git a/src/store.js b/src/store.js
index 9b79883..4a97cfa 100644
--- a/src/store.js
+++ b/src/store.js
@@ -7,7 +7,8 @@ const store = reactive({
1: '🕒待审核中',
2: '✅正常',
9: '🙅🏻拒绝收录'
- }
+ },
+ result: null // 搜索结果
})
export default function (app) {
diff --git a/src/views/home.vue b/src/views/home.vue
index ac73a84..bbe4e78 100644
--- a/src/views/home.vue
+++ b/src/views/home.vue
@@ -1,6 +1,19 @@
-
-
+
+
+ -
+ {{ $store.result.id }} - v{{ $store.result.versions[0] }}
+
+ -
+
+ //jscdn.ink/{{ $store.result.id }}/{{ f }}
+
+
+
+
- {{ it.name }} - v{{ it.version }}
-
@@ -34,22 +47,6 @@ export default {
'vue.runtime.global.prod.js'
]
},
- {
- name: 'vue-router',
- version: '4.1.6',
- files: [
- 'vue-router.cjs',
- 'vue-router.cjs.js',
- 'vue-router.cjs.prod.js',
- 'vue-router.esm-browser.js',
- 'vue-router.esm-bundler.js',
- 'vue-router.global.js',
- 'vue-router.global.prod.js',
- 'vue-router.mjs',
- 'vue-router.node.mjs',
- 'vue-router.prod.cjs'
- ]
- },
{
name: '@bytedo/fetch',
version: '2.1.1',
@@ -61,6 +58,15 @@ export default {
mounted() {
this.$store.searchShow = true
+ },
+
+ methods: {
+ copy(ev) {
+ if (ev.target.tagName === 'SECTION') {
+ navigator.clipboard.writeText(ev.target.textContent.trim())
+ layer.toast('复制成功', 'success')
+ }
+ }
}
}
@@ -70,7 +76,7 @@ export default {
display: flex;
flex-direction: column;
align-items: center;
- padding-top: 16px;
+ padding: 16px 0 32px;
.card {
width: 1024px;