(all): 发布 1.1.8

更新文档
This commit is contained in:
就眠儀式 2022-06-20 10:30:43 +08:00
parent 615cb5ba7c
commit 0010259ef8
3 changed files with 11 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@layui/layui-vue",
"version": "1.1.7",
"version": "1.1.8",
"author": "就眠儀式",
"license": "MIT",
"description": "a component library for Vue 3 base on layui-vue",

View File

@ -12,10 +12,9 @@ import {
DynamicThemeFix,
enable as enableDarkMode,
disable as disableDarkMode,
auto as followSystemColorScheme,
} from "darkreader";
const { locale, setLocaleMessage, mergeLocaleMessage } = useI18n();
export interface LayConfigProviderProps {
locale?: string;
locales?: [];
@ -29,6 +28,10 @@ const props = withDefaults(defineProps<LayConfigProviderProps>(), {
theme: "light",
});
const { locale, setLocaleMessage, mergeLocaleMessage } = useI18n();
const ignoreInlineStyle = [".layui-colorpicker-trigger-span","div.layui-color-picker *"];
const changeLocale = (lang: string) => {
locale.value = lang;
};
@ -55,16 +58,15 @@ const changeTheme = (theme: string) => {
invert: [],
ignoreImageAnalysis: [],
disableStyleSheetsProxy: false,
ignoreInlineStyle: [
".layui-colorpicker-trigger-span",
"div.layui-color-picker *",
],
ignoreInlineStyle: ignoreInlineStyle,
};
Object.assign(defaultPartial, props.darkPartial);
if (theme === "dark") {
enableDarkMode(defaultPartial, defaultFixes);
} else if (theme === "light") {
disableDarkMode();
} else if (theme === "auto") {
followSystemColorScheme(defaultPartial, defaultFixes);
}
};

View File

@ -14,8 +14,9 @@
<ul>
<a name="1-1-8"></a>
<li>
<h3>1.1.8 <span class="layui-badge-rim">2022-06-19</span></h3>
<h3>1.1.8 <span class="layui-badge-rim">2022-06-20</span></h3>
<ul>
<li>[新增] provider 组件 theme 属性 auto 值, 自动跟随系统主题</li>
<li>[新增] checkbox 组件 is-indeterminate 属性, 用于展示半选状态</li>
<li>[新增] layui-vue-helper 插件, 用于 Visual Studio Code 辅助开发</li>
<li>[新增] textarea 组件 show-count 属性, 用于展示输入长度与 max-length</li>