✨(all): 发布 1.1.8
更新文档
This commit is contained in:
parent
615cb5ba7c
commit
0010259ef8
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@layui/layui-vue",
|
"name": "@layui/layui-vue",
|
||||||
"version": "1.1.7",
|
"version": "1.1.8",
|
||||||
"author": "就眠儀式",
|
"author": "就眠儀式",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "a component library for Vue 3 base on layui-vue",
|
"description": "a component library for Vue 3 base on layui-vue",
|
||||||
|
@ -12,10 +12,9 @@ import {
|
|||||||
DynamicThemeFix,
|
DynamicThemeFix,
|
||||||
enable as enableDarkMode,
|
enable as enableDarkMode,
|
||||||
disable as disableDarkMode,
|
disable as disableDarkMode,
|
||||||
|
auto as followSystemColorScheme,
|
||||||
} from "darkreader";
|
} from "darkreader";
|
||||||
|
|
||||||
const { locale, setLocaleMessage, mergeLocaleMessage } = useI18n();
|
|
||||||
|
|
||||||
export interface LayConfigProviderProps {
|
export interface LayConfigProviderProps {
|
||||||
locale?: string;
|
locale?: string;
|
||||||
locales?: [];
|
locales?: [];
|
||||||
@ -29,6 +28,10 @@ const props = withDefaults(defineProps<LayConfigProviderProps>(), {
|
|||||||
theme: "light",
|
theme: "light",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { locale, setLocaleMessage, mergeLocaleMessage } = useI18n();
|
||||||
|
|
||||||
|
const ignoreInlineStyle = [".layui-colorpicker-trigger-span","div.layui-color-picker *"];
|
||||||
|
|
||||||
const changeLocale = (lang: string) => {
|
const changeLocale = (lang: string) => {
|
||||||
locale.value = lang;
|
locale.value = lang;
|
||||||
};
|
};
|
||||||
@ -55,16 +58,15 @@ const changeTheme = (theme: string) => {
|
|||||||
invert: [],
|
invert: [],
|
||||||
ignoreImageAnalysis: [],
|
ignoreImageAnalysis: [],
|
||||||
disableStyleSheetsProxy: false,
|
disableStyleSheetsProxy: false,
|
||||||
ignoreInlineStyle: [
|
ignoreInlineStyle: ignoreInlineStyle,
|
||||||
".layui-colorpicker-trigger-span",
|
|
||||||
"div.layui-color-picker *",
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
Object.assign(defaultPartial, props.darkPartial);
|
Object.assign(defaultPartial, props.darkPartial);
|
||||||
if (theme === "dark") {
|
if (theme === "dark") {
|
||||||
enableDarkMode(defaultPartial, defaultFixes);
|
enableDarkMode(defaultPartial, defaultFixes);
|
||||||
} else if (theme === "light") {
|
} else if (theme === "light") {
|
||||||
disableDarkMode();
|
disableDarkMode();
|
||||||
|
} else if (theme === "auto") {
|
||||||
|
followSystemColorScheme(defaultPartial, defaultFixes);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,8 +14,9 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<a name="1-1-8"></a>
|
<a name="1-1-8"></a>
|
||||||
<li>
|
<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>
|
<ul>
|
||||||
|
<li>[新增] provider 组件 theme 属性 auto 值, 自动跟随系统主题</li>
|
||||||
<li>[新增] checkbox 组件 is-indeterminate 属性, 用于展示半选状态</li>
|
<li>[新增] checkbox 组件 is-indeterminate 属性, 用于展示半选状态</li>
|
||||||
<li>[新增] layui-vue-helper 插件, 用于 Visual Studio Code 辅助开发</li>
|
<li>[新增] layui-vue-helper 插件, 用于 Visual Studio Code 辅助开发</li>
|
||||||
<li>[新增] textarea 组件 show-count 属性, 用于展示输入长度与 max-length</li>
|
<li>[新增] textarea 组件 show-count 属性, 用于展示输入长度与 max-length</li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user