(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" :autoFitMinWidth="false"
:updateAtScroll="true" :updateAtScroll="true"
:contentClass="contentClass" :contentClass="contentClass"
:contentStyle="contentStyle" :contentStyle="contentStyle"
:disabled="dropDownDisabled" :disabled="dropDownDisabled"
@show="openState = true" @show="openState = true"
@hide="openState = false" @hide="openState = false"

View File

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

View File

@ -86,7 +86,11 @@
</lay-dropdown> </lay-dropdown>
<lay-dropdown ref="dropdownMonthPanelRefRight"> <lay-dropdown ref="dropdownMonthPanelRefRight">
<span class="laydate-range-time" <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> <template #content>
<MonthPanel <MonthPanel

View File

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

View File

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

View File

@ -17,7 +17,7 @@ import {
Component, Component,
watch, watch,
onUnmounted, onUnmounted,
StyleValue, StyleValue,
} from "vue"; } from "vue";
import { LayIcon } from "@layui/icons-vue"; import { LayIcon } from "@layui/icons-vue";
import LayInput from "../input/index.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() { export function nextId() {
var s: any = []; var s: any = [];
var hexDigits = "0123456789abcdef"; var hexDigits = "0123456789abcdef";
for (var i = 0; i < 36; i++) { for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1); s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
} }
s[14] = "4"; s[14] = "4";
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
s[8] = s[13] = s[18] = s[23] = "-"; s[8] = s[13] = s[18] = s[23] = "-";
var uuid = s.join(""); var uuid = s.join("");
return uuid; return uuid;
} }