ci: docsearch 依赖

This commit is contained in:
就眠儀式 2022-03-09 10:45:43 +08:00
parent 2c5bf79041
commit fd6557c5dd
4 changed files with 16 additions and 28 deletions

View File

@ -36,6 +36,7 @@
"vue": "^3.2.31" "vue": "^3.2.31"
}, },
"dependencies": { "dependencies": {
"@docsearch/js": "3.0.0",
"@layui/icons-vue": "^1.0.7", "@layui/icons-vue": "^1.0.7",
"@layui/layer-vue": "^1.3.8", "@layui/layer-vue": "^1.3.8",
"@vueuse/core": "^7.6.2", "@vueuse/core": "^7.6.2",

View File

@ -10,7 +10,7 @@
:root { :root {
--button-primary-color: @global-primary-color; --button-primary-color: @global-primary-color;
--button-border-radius: @global-border-radius; --button-border-radius: @global-border-radius;
--button-border-color: #d2d2d2; --button-border-color: @global-neutral-color-6;
--button-normal-color: @global-normal-color; --button-normal-color: @global-normal-color;
--button-warm-color: @global-warm-color; --button-warm-color: @global-warm-color;
--button-danger-color: @global-danger-color; --button-danger-color: @global-danger-color;
@ -31,9 +31,9 @@
} }
.layui-btn:hover { .layui-btn:hover {
color: #fff;
opacity: 0.8; opacity: 0.8;
filter: alpha(opacity=80); filter: alpha(opacity=80);
color: #fff;
} }
.layui-btn:active { .layui-btn:active {

View File

@ -6,8 +6,8 @@ export default {
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch, useSlots, withDefaults, onMounted } from "vue"; import { ref, watch, useSlots, withDefaults, onMounted } from "vue";
import { Recordable } from "../../types";
import { guid } from "../../utils/guidUtil"; import { guid } from "../../utils/guidUtil";
import { Recordable } from "../../types";
import LayCheckbox from "../checkbox"; import LayCheckbox from "../checkbox";
import LayDropdown from "../dropdown"; import LayDropdown from "../dropdown";
import LayPage from "../page"; import LayPage from "../page";
@ -36,8 +36,8 @@ const props = withDefaults(defineProps<LayTableProps>(), {
}); });
const emit = defineEmits([ const emit = defineEmits([
"change",
"row", "row",
"change",
"row-double", "row-double",
"update:selectedKeys", "update:selectedKeys",
]); ]);
@ -152,7 +152,7 @@ onMounted(() => {
</div> </div>
<div class="layui-table-box"> <div class="layui-table-box">
<!-- 表格头部 --> <!-- table header -->
<div class="layui-table-header" ref="tableHeader"> <div class="layui-table-header" ref="tableHeader">
<table class="layui-table" :lay-size="size"> <table class="layui-table" :lay-size="size">
<thead> <thead>
@ -181,7 +181,7 @@ onMounted(() => {
</thead> </thead>
</table> </table>
</div> </div>
<!-- 表格数据 --> <!-- table body -->
<div class="layui-table-body layui-table-main" ref="tableBody"> <div class="layui-table-body layui-table-main" ref="tableBody">
<table class="layui-table" :lay-size="size"> <table class="layui-table" :lay-size="size">
<tbody> <tbody>
@ -190,6 +190,7 @@ onMounted(() => {
@click.stop="rowClick(data)" @click.stop="rowClick(data)"
@dblclick.stop="rowDoubleClick(data)" @dblclick.stop="rowDoubleClick(data)"
> >
<td v-if="checkbox" class="layui-table-col-special"> <td v-if="checkbox" class="layui-table-col-special">
<div class="layui-table-cell laytable-cell-checkbox"> <div class="layui-table-cell laytable-cell-checkbox">
<LayCheckbox <LayCheckbox
@ -202,6 +203,7 @@ onMounted(() => {
<template v-for="column in columns" :key="column"> <template v-for="column in columns" :key="column">
<template v-if="tableColumnKeys.includes(column.key)"> <template v-if="tableColumnKeys.includes(column.key)">
<!-- Column -->
<template v-if="column.customSlot"> <template v-if="column.customSlot">
<td class="layui-table-cell"> <td class="layui-table-cell">
<div :style="{ width: column.width }"> <div :style="{ width: column.width }">
@ -209,21 +211,19 @@ onMounted(() => {
</div> </div>
</td> </td>
</template> </template>
<!-- Column -->
<template <template
v-for="(value, key) in data"
v-else v-else
v-for="(value, key) in data"
:key="value" :key="value"
> >
<td v-if="column.key == key" class="layui-table-cell"> <td v-if="column.key == key" class="layui-table-cell">
<div :style="{ width: column.width }"> <div :style="{ width: column.width }">
<span v-if="column.slot"> <span> {{ value }} </span>
<slot :name="column.slot" :data="data"></slot>
</span>
<span v-else> {{ value }} </span>
</div> </div>
</td> </td>
</template> </template>
</template> </template>
</template> </template>
</tr> </tr>
@ -247,4 +247,4 @@ onMounted(() => {
</div> </div>
</div> </div>
</div> </div>
</template> </template>

View File

@ -13,18 +13,5 @@ export function S4() {
* @param null * @param null
* */ * */
export function guid() { export function guid() {
return ( return (S4() + S4() + S4() + S4() + S4() + S4() + S4() + S4());
S4() + }
S4() +
"-" +
S4() +
"-" +
S4() +
"-" +
S4() +
"-" +
S4() +
S4() +
S4()
);
}