layui/example/src/components/LaySearch.vue

39 lines
832 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 { onMounted } from "vue";
onMounted(() => {
// @ts-ignore
2022-03-08 06:07:11 +00:00
docsearch({
2022-03-12 11:39:07 +00:00
appId: "BIYZTK0F0Q",
2022-03-14 05:13:31 +00:00
apiKey: "de599990b844bc1b325310f61ad19a78",
indexName: "layui-vue",
container: "#docsearch",
debug: false,
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>
.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-14 05:13:31 +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-14 05:13:31 +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);
2022-03-14 05:13:31 +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>