style: eslint
This commit is contained in:
@@ -39,16 +39,18 @@ const handleClick = function () {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const styles = computed(() => {
|
||||
return { 'background-color': isActive.value ? props.onswitchColor : props.unswitchColor}
|
||||
})
|
||||
return {
|
||||
"background-color": isActive.value
|
||||
? props.onswitchColor
|
||||
: props.unswitchColor,
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span @click.stop="handleClick">
|
||||
<div
|
||||
|
||||
class="layui-unselect layui-form-switch"
|
||||
:style="styles"
|
||||
:class="{
|
||||
|
||||
@@ -7,7 +7,7 @@ export default {
|
||||
<script setup lang="ts">
|
||||
import * as XLSX from "xlsx";
|
||||
import { ref, watch, useSlots, withDefaults, onMounted } from "vue";
|
||||
import { guid } from "../../utils/guidUtil";
|
||||
import { v4 as uuidv4 } from '../../utils/guidUtil';
|
||||
import { Recordable } from "../../types";
|
||||
import LayCheckbox from "../checkbox";
|
||||
import LayDropdown from "../dropdown";
|
||||
@@ -15,7 +15,7 @@ import LayPage from "../page";
|
||||
import LayIcon from "../icon";
|
||||
import "./index.less";
|
||||
|
||||
const tableId = guid();
|
||||
const tableId = uuidv4();
|
||||
|
||||
export interface LayTableProps {
|
||||
id?: string;
|
||||
|
||||
@@ -66,10 +66,10 @@
|
||||
}
|
||||
|
||||
body[lay-theme="dark"] {
|
||||
|
||||
--global-fore-color: #333;
|
||||
|
||||
--global-fore-color: #ffffff;
|
||||
|
||||
--global-back-color: #393d49;
|
||||
--global-back-color: #ffffff;
|
||||
|
||||
--global-neutral-color-1: #FAFAFA;
|
||||
|
||||
|
||||
@@ -1,17 +1,2 @@
|
||||
/**
|
||||
* 随机数
|
||||
* <p>
|
||||
* @param null 无参
|
||||
* */
|
||||
export function S4() {
|
||||
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 随机数
|
||||
* <p>
|
||||
* @param null 无参
|
||||
* */
|
||||
export function guid() {
|
||||
return S4() + S4() + S4() + S4() + S4() + S4() + S4() + S4();
|
||||
}
|
||||
// @ts-ignore
|
||||
export { v4 } from 'uuid';
|
||||
Reference in New Issue
Block a user