chore: 升级 layer-vue 1.3.10
This commit is contained in:
parent
e572539ead
commit
e6b7338d37
@ -10,31 +10,31 @@ import "@docsearch/css";
|
||||
|
||||
onMounted(() => {
|
||||
docsearch({
|
||||
container: "#docsearch",
|
||||
appId: "BIYZTK0F0Q",
|
||||
apiKey: "4b228ca4dcda0f1d5d9ff9938c2b4f59",
|
||||
indexName: "layui-vue"
|
||||
apiKey: "de599990b844bc1b325310f61ad19a78",
|
||||
indexName: "layui-vue",
|
||||
container: "#docsearch",
|
||||
debug: false,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.DocSearch-Button {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.DocSearch-Button .DocSearch-Search-Icon,
|
||||
.DocSearch-Button .DocSearch-Search-Icon,
|
||||
.DocSearch-Button-Placeholder {
|
||||
color: whitesmoke;
|
||||
}
|
||||
|
||||
:root {
|
||||
--docsearch-logo-color: var(--global-primary-color);
|
||||
--docsearch-primary-color: var(--global-primary-color) ;
|
||||
--docsearch-primary-color: var(--global-primary-color);
|
||||
--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);;
|
||||
--docsearch-container-background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
</style>
|
||||
|
@ -38,7 +38,7 @@
|
||||
"dependencies": {
|
||||
"@docsearch/js": "3.0.0",
|
||||
"@layui/icons-vue": "^1.0.7",
|
||||
"@layui/layer-vue": "^1.3.8",
|
||||
"@layui/layer-vue": "^1.3.10",
|
||||
"@vueuse/core": "^7.6.2",
|
||||
"async-validator": "^4.0.7",
|
||||
"evtd": "^0.2.3",
|
||||
|
@ -240,3 +240,5 @@ export {
|
||||
export { layer };
|
||||
|
||||
export default { install };
|
||||
|
||||
export * from "./resolver";
|
@ -1,11 +1,10 @@
|
||||
/**
|
||||
* Layui Vue Resolver
|
||||
* Layui-vue Resolver
|
||||
*
|
||||
* √ On-demand import components for @layui/layui-vue
|
||||
* √ component and style resolver for @layui/icons-vue
|
||||
* √ layer API
|
||||
* TODO On-demand import style
|
||||
*/
|
||||
// TODO 待 css 完善,以下除特殊注释的外, styleDir: '' 为未拆分的
|
||||
const matchComponents = [
|
||||
{
|
||||
pattern: /^LayAvatarList$/,
|
||||
@ -112,6 +111,7 @@ const matchComponents = [
|
||||
];
|
||||
|
||||
export interface LayuiVueResolverOptions {
|
||||
|
||||
/**
|
||||
* import style along with components
|
||||
*
|
||||
@ -133,6 +133,7 @@ export interface LayuiVueResolverOptions {
|
||||
*
|
||||
*/
|
||||
exclude?: string[];
|
||||
|
||||
}
|
||||
|
||||
const libRE = /^Lay[A-Z]/;
|
||||
@ -147,7 +148,6 @@ function lowerCamelCase(str: string) {
|
||||
function getSideEffects(importName: string, options: LayuiVueResolverOptions) {
|
||||
const { importStyle = true } = options;
|
||||
if (!importStyle) return;
|
||||
|
||||
let styleDir: string | undefined = undefined;
|
||||
if (importName.match(iconsRE)) {
|
||||
return `@layui/icons-vue/lib/index.css`;
|
||||
@ -161,8 +161,6 @@ function getSideEffects(importName: string, options: LayuiVueResolverOptions) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// FIXME 临时方案,部分组件样式未拆分
|
||||
// return styleDir ? `${esComponentsFolder}/${styleDir}/index.css` : `@layui/layui-vue/lib/index.css`
|
||||
return styleDir ? `${esComponentsFolder}/${styleDir}/index.css` : undefined;
|
||||
}
|
||||
}
|
||||
@ -191,7 +189,7 @@ function resolveComponent(name: string, options: LayuiVueResolverOptions) {
|
||||
|
||||
/**
|
||||
* Resolver for layui-vue
|
||||
* Requires @layui/layui-vue@v0.3.X(版本待定) or later
|
||||
*
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user