(component): update

This commit is contained in:
就眠儀式 2022-10-21 21:24:47 +08:00
parent 9d46063321
commit 4393b1c1d2
8 changed files with 43 additions and 29 deletions

View File

@ -9,7 +9,7 @@
:autoFitMinWidth="false"
:updateAtScroll="true"
:contentClass="contentClass"
:contentStyle="contentStyle"
:contentStyle="contentStyle"
:disabled="dropDownDisabled"
@show="openState = true"
@hide="openState = false"

View File

@ -25,7 +25,7 @@ const emit = defineEmits(["update:modelValue"]);
const props = withDefaults(defineProps<ColorPicker>(), {
modelValue: { r: 255, g: 255, b: 255, a: 1 },
preset: ["#009688", "#1e9fff", "#ffb800", "#ff5722", "#5fb878"],
disabled: false
disabled: false,
});
const saturationValue = ref<null | HTMLElement>(null);
@ -405,11 +405,12 @@ function hex2rgba(s: any) {
</script>
<template>
<lay-dropdown
:disabled="disabled"
:contentClass="contentClass"
:contentStyle="contentStyle"
updateAtScroll>
<lay-dropdown
:disabled="disabled"
:contentClass="contentClass"
:contentStyle="contentStyle"
updateAtScroll
>
<div class="layui-unselect layui-colorpicker">
<span>
<span

View File

@ -86,7 +86,11 @@
</lay-dropdown>
<lay-dropdown ref="dropdownMonthPanelRefRight">
<span class="laydate-range-time"
>{{ startTime.month + 2 > 12 ? startTime.month - 10 : startTime.month + 2 }}</span
>{{
startTime.month + 2 > 12
? startTime.month - 10
: startTime.month + 2
}}</span
>
<template #content>
<MonthPanel

View File

@ -8,7 +8,7 @@
:disabled="disabled"
:autoFitMinWidth="false"
:contentClass="contentClass"
:contentStyle="contentStyle"
:contentStyle="contentStyle"
updateAtScroll
>
<lay-input
@ -111,7 +111,15 @@ import { LayIcon } from "@layui/icons-vue";
import LayInput from "../input/index.vue";
import LayDropdown from "../dropdown/index.vue";
import { getMonth, getYear, getDay } from "./day";
import { ref, watch, defineProps, defineEmits, reactive, provide, StyleValue } from "vue";
import {
ref,
watch,
defineProps,
defineEmits,
reactive,
provide,
StyleValue,
} from "vue";
import DatePanel from "./components/DatePanel.vue";
import TimePanel from "./components/TimePanel.vue";
import YearPanel from "./components/YearPanel.vue";

View File

@ -138,12 +138,13 @@ const searchList = (str: string, container: any) => {
</script>
<template>
<lay-dropdown
ref="dropdownRef"
:disabled="disabled"
:contentClass="contentClass"
:contentStyle="contentStyle"
updateAtScroll>
<lay-dropdown
ref="dropdownRef"
:disabled="disabled"
:contentClass="contentClass"
:contentStyle="contentStyle"
updateAtScroll
>
<div
class="layui-inline layui-border-box layui-iconpicker layui-iconpicker-split"
>

View File

@ -17,7 +17,7 @@ import {
Component,
watch,
onUnmounted,
StyleValue,
StyleValue,
} from "vue";
import { LayIcon } from "@layui/icons-vue";
import LayInput from "../input/index.vue";

View File

@ -142,4 +142,4 @@ export default defineComponent({
};
},
});
</script>
</script>

View File

@ -1,12 +1,12 @@
export function nextId() {
var s: any = [];
var hexDigits = "0123456789abcdef";
for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
}
s[14] = "4";
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
s[8] = s[13] = s[18] = s[23] = "-";
var uuid = s.join("");
return uuid;
}
var s: any = [];
var hexDigits = "0123456789abcdef";
for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
}
s[14] = "4";
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
s[8] = s[13] = s[18] = s[23] = "-";
var uuid = s.join("");
return uuid;
}