layui/example/src/components/LaySearch.vue

40 lines
866 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 06:07:11 +00:00
import docsearch from "@docsearch/js";
import { onMounted } from "vue";
import "@docsearch/css";
onMounted(() => {
docsearch({
container: "#docsearch",
appId: "R2IYF7ETH7",
apiKey: "599cec31baffa4868cae4e79f180729b",
indexName: "docsearch",
});
});
</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 {
--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);
2022-03-08 06:07:11 +00:00
--docsearch-logo-color: var(--global-primary-color);
2022-03-08 06:33:42 +00:00
--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>