init
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to check the commit log message.
|
||||
# Called by "git commit" with one argument, the name of the file
|
||||
# that has the commit message. The hook should exit with non-zero
|
||||
# status after issuing an appropriate message if it wants to stop the
|
||||
# commit. The hook is allowed to edit the commit message file.
|
||||
#
|
||||
# To enable this hook, rename this file to "commit-msg".
|
||||
|
||||
# Uncomment the below to add a Signed-off-by line to the message.
|
||||
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
|
||||
# hook is more suited to it.
|
||||
#
|
||||
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
|
||||
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
|
||||
|
||||
# This example catches duplicate Signed-off-by lines.
|
||||
|
||||
test "" = "$(grep '^Signed-off-by: ' "$1" |
|
||||
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
|
||||
echo >&2 Duplicate Signed-off-by lines.
|
||||
exit 1
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,98 @@
|
||||
.layui-timeline {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.layui-timeline-item {
|
||||
position: relative;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.layui-timeline-axis {
|
||||
position: absolute;
|
||||
left: -5px;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
background-color: #fff;
|
||||
color: var(--global-checked-color);
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.layui-timeline-axis:hover {
|
||||
color: #ff5722;
|
||||
}
|
||||
|
||||
.layui-timeline-item:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
top: 0;
|
||||
z-index: 0;
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.layui-timeline-item:first-child:before {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layui-timeline-item:last-child:before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layui-timeline-content {
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
.layui-timeline-title {
|
||||
position: relative;
|
||||
margin-bottom: 10px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.layui-timeline-item:before {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-item {
|
||||
display: inline-block;
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
padding-top: 10px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-axis {
|
||||
left: 47%;
|
||||
top: -4px;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-item:before {
|
||||
left: 0px;
|
||||
top: 5px;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-item:first-child:before {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-item:last-child:before {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-content {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.layui-timeline-horizontal .layui-timeline-title {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
margin-bottom: 10px;
|
||||
line-height: 22px;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Slots } from "vue";
|
||||
|
||||
export const TabInjectKey = Symbol("layuiTab");
|
||||
|
||||
export interface TabData {
|
||||
id: string;
|
||||
title?: string | Function;
|
||||
icon?: string | Function;
|
||||
closable?: string | boolean;
|
||||
slots: Slots;
|
||||
}
|
||||
|
||||
export interface TabsContext {
|
||||
active: string;
|
||||
addItem: (id: string, data: TabData) => void;
|
||||
removeItem: (id: string) => void;
|
||||
}
|
||||
|
||||
export type TabPosition = "top" | "bottom" | "left" | "right";
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
x+)JMU07f040031Q<31><51>KI<4B><49>K..fX<66><58>hS`~*<2A>u<EFBFBD>q<EFBFBD>O'<27>+g<>E<EFBFBD>(<28>*fx<66><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD>G<EFBFBD><47><EFBFBD>[Aʙʿ<CA99><CABF>9<EFBFBD>~<7E><1D>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,130 @@
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "StandardVue",
|
||||
};
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Ref, ref } from "vue";
|
||||
import { on, off } from "evtd";
|
||||
import LayTooltip from "../tooltip/index.vue";
|
||||
import { throttle, handle_select, makeDots } from "./utils/index";
|
||||
|
||||
export interface StandardProps {
|
||||
val?: number | Array<number>;
|
||||
disabled?: boolean;
|
||||
step?: number;
|
||||
min?: number;
|
||||
max?: number;
|
||||
showDots?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<StandardProps>(), {
|
||||
disabled: false,
|
||||
val: 0,
|
||||
step: 0,
|
||||
min: 0,
|
||||
max: 100,
|
||||
showDots: false,
|
||||
});
|
||||
|
||||
const moveAction = throttle(standardMove);
|
||||
|
||||
function handle_mouseup() {
|
||||
off("selectstart", document, handle_select);
|
||||
off("mouseup", window, handle_mouseup);
|
||||
off("mousemove", window, moveAction);
|
||||
tooptipHide.value = true;
|
||||
}
|
||||
|
||||
function handle_mousedown() {
|
||||
on("selectstart", window, handle_select, { once: true });
|
||||
on("mouseup", window, handle_mouseup);
|
||||
on("mousemove", window, moveAction);
|
||||
}
|
||||
|
||||
const tracker = ref<HTMLElement | null>(null);
|
||||
let standard_style: Ref<number> = ref<number>(props.val as number);
|
||||
const emit = defineEmits(["link-val-hook"]);
|
||||
const tooptipHide = ref<boolean>(true);
|
||||
|
||||
function standardMove(e: MouseEvent) {
|
||||
tooptipHide.value = false;
|
||||
if (!tracker.value) {
|
||||
return;
|
||||
}
|
||||
let tracker_rect = tracker.value.getBoundingClientRect();
|
||||
let origin_left = tracker_rect.left;
|
||||
let point_left = e.clientX;
|
||||
let distance = point_left - origin_left;
|
||||
if (distance < props.min) {
|
||||
standard_style.value = props.min;
|
||||
} else {
|
||||
let rate = (distance / tracker_rect.width) * 100;
|
||||
calcWithStep(rate, standard_style);
|
||||
if (standard_style.value > props.max) {
|
||||
standard_style.value = props.max;
|
||||
}
|
||||
}
|
||||
emit("link-val-hook", standard_style.value);
|
||||
}
|
||||
|
||||
function calcWithStep(
|
||||
rate: number | undefined,
|
||||
val: Ref<number> | Ref<number[]>
|
||||
) {
|
||||
if (typeof rate === "undefined") return false;
|
||||
|
||||
if (typeof val.value === "number") {
|
||||
let r = rate - val.value;
|
||||
if (Math.abs(r) < props.step) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (props.step === 0) val.value = Math.floor(rate);
|
||||
|
||||
if (r < 0 && props.step !== 0) {
|
||||
val.value -= props.step;
|
||||
} else {
|
||||
val.value += props.step;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 断点
|
||||
const dots = makeDots(props);
|
||||
const focusDot = (val: number) => {
|
||||
emit("link-val-hook", val);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
ref="tracker"
|
||||
@mousedown.stop="handle_mousedown"
|
||||
class="layui-slider-track-v"
|
||||
:class="[disabled ? 'layui-slider-disabled' : '']"
|
||||
>
|
||||
<lay-tooltip :content="'' + val" :is-can-hide="tooptipHide">
|
||||
<div
|
||||
:style="{ left: val + '%' }"
|
||||
class="layui-slider-btn-v"
|
||||
:class="[disabled ? 'layui-slider-disabled disable-btn' : '']"
|
||||
></div>
|
||||
</lay-tooltip>
|
||||
|
||||
<div
|
||||
:style="{ width: val + '%' }"
|
||||
class="layui-slider-rate-v"
|
||||
:class="[disabled ? 'layui-slider-disabled disable-line' : '']"
|
||||
></div>
|
||||
<div class="layui-slider-line-v"></div>
|
||||
<div
|
||||
v-show="showDots"
|
||||
@click="focusDot(item)"
|
||||
class="layui-slider-dots"
|
||||
v-for="(item, index) in dots"
|
||||
:key="index"
|
||||
:style="{ left: item + '%' }"
|
||||
></div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user