layui/example/src/components/LaySearch.vue

75 lines
1.5 KiB
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-29 23:44:37 +00:00
--docsearch-searchbox-background: rgba(255, 255, 255, 0.02);
--docsearch-searchbox-focus-background: rgba(255, 255, 255, 0.02);
2022-03-14 05:13:31 +00:00
--docsearch-container-background: rgba(0, 0, 0, 0.1);
2022-04-01 22:34:14 +00:00
--docsearch-searchbox-shadow: inset 0 0 0 1px var(--docsearch-primary-color);
}
.DocSearch-Button{
width: 150px;
border-radius: 50px;
}
.DocSearch-Button-Container {
padding-left: 2px;
}
.DocSearch-Button-Placeholder {
padding-left: 8px;
2021-10-22 01:18:40 +00:00
}
2022-03-29 23:44:37 +00:00
.DocSearch-Button,
.DocSearch-Button:hover,
.DocSearch-Button:active,
.DocSearch-Button:focus {
border: 1px solid rgb(224, 224, 230);
box-shadow: none;
}
.DocSearch-Button-Key {
border: 1px solid rgba(60, 60, 60, .29);
background: transparent;
box-shadow: none;
}
.DocSearch-Button
.DocSearch-Search-Icon,
.DocSearch-Button-Placeholder {
color: rgba(0, 0, 0, 0.6);
}
2022-04-01 22:34:14 +00:00
.DocSearch-Button-Keys {
display: none;
}
2022-03-08 06:07:11 +00:00
</style>