layui/example/src/components/LaySearch.vue

41 lines
880 B
Vue
Raw Normal View History

2021-10-06 15:22:30 +00:00
<template>
2022-03-08 06:07:11 +00:00
<div id="docsearch"></div>
2021-10-06 15:22:30 +00:00
</template>
<script setup name="LaySelect" lang="ts">
2022-03-08 13:41:15 +00:00
// @ts-ignore
2022-03-08 06:07:11 +00:00
import docsearch from "@docsearch/js";
import { onMounted } from "vue";
import "@docsearch/css";
onMounted(() => {
docsearch({
container: "#docsearch",
2022-03-08 13:41:15 +00:00
appId: "Y8NT7MICRP",
apiKey: "fb23e7bbc001828e56c50d66e6be26b2",
indexName: "indexName",
2022-03-08 06:07:11 +00:00
});
});
</script>
2021-10-06 15:22:30 +00:00
2022-03-08 06:07:11 +00:00
<style>
2021-10-06 15:22:30 +00:00
2022-03-08 06:07:11 +00:00
.DocSearch-Button {
outline: none;
2022-03-08 06:33:42 +00:00
box-shadow: none;
2021-10-09 08:15:02 +00:00
}
2022-03-08 06:33:42 +00:00
.DocSearch-Button .DocSearch-Search-Icon,
2022-03-08 06:07:11 +00:00
.DocSearch-Button-Placeholder {
color: whitesmoke;
2021-10-09 08:15:02 +00:00
}
2022-03-08 06:07:11 +00:00
:root {
2022-03-08 13:41:15 +00:00
--docsearch-logo-color: var(--global-primary-color);
2022-03-08 06:07:11 +00:00
--docsearch-primary-color: var(--global-primary-color) ;
2022-03-08 06:33:42 +00:00
--docsearch-searchbox-background: rgba(255, 255, 255, 0.05);
--docsearch-searchbox-focus-background: rgba(255, 255, 255, 0.05);
--docsearch-container-background: rgba(0, 0, 0, 0.1);;
2021-10-22 01:18:40 +00:00
}
2022-03-08 06:07:11 +00:00
</style>