✨(component): release 1.4.12
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
::: describe 默认情况下, 网站主题为日间模式。
|
||||
:::
|
||||
|
||||
::: describe 若启用夜间模式, 使用 "全局配置" 组件配合 theme 属性, 设置为 `dark` 值。
|
||||
::: describe 若启用夜间模式, 使用 "全局配置" 组件配合 theme 属性, 设置为 dark 值。
|
||||
:::
|
||||
|
||||
```vue
|
||||
@@ -19,7 +19,7 @@ const theme = ref('dark')
|
||||
</script>
|
||||
```
|
||||
|
||||
::: title 偏好设置
|
||||
::: title 选项配置
|
||||
:::
|
||||
|
||||
::: describe 若内置的夜间模式不满足要求时, 可通过 dark-partial 属性进行偏好设置。
|
||||
|
||||
@@ -129,41 +129,12 @@ app.mount('#app')
|
||||
:::
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Document</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!-- 引入 layui-vue 样式 -->
|
||||
<link rel="stylesheet" type="text/css" href="https://unpkg.com/@layui/layui-vue/lib/index.css">
|
||||
<!-- 引入 Vue 3, 使用全局变量 Vue -->
|
||||
<script src="https://unpkg.com/vue@3"></script>
|
||||
<!-- 引入 layui-vue 组件库, 使用全局变量 LayuiVue -->
|
||||
<script src="https://unpkg.com/@layui/layui-vue"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<lay-button @click="openLayer">Hello</lay-button>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
const { createApp, ref } = Vue;
|
||||
const { layer } = LayuiVue;
|
||||
|
||||
const App = {
|
||||
setup() {
|
||||
const openLayer = function () {
|
||||
layer.msg("hello");
|
||||
}
|
||||
return {
|
||||
openLayer
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
createApp(App).use(LayuiVue).mount('#app');
|
||||
</script>
|
||||
</html>
|
||||
<head>
|
||||
<!-- Import style -->
|
||||
<link rel="stylesheet" href="//unpkg.com/@layui/layui-vue/lib/index.css" />
|
||||
<!-- Import Vue 3 -->
|
||||
<script src="//unpkg.com/vue@3"></script>
|
||||
<!-- Import component library -->
|
||||
<script src="//unpkg.com/@layui/layui-vue"></script>
|
||||
</head>
|
||||
```
|
||||
@@ -1,4 +1,4 @@
|
||||
::: title 定制主题
|
||||
::: title 主题配置
|
||||
:::
|
||||
|
||||
::: describe 全局化配置设置内部组件的主题、语言和组件卸载于其他位置的 DOM 的类名。
|
||||
|
||||
Reference in New Issue
Block a user