Skip to content

Commit 0e1137e

Browse files
sleepritegitee-org
authored andcommitted
!173 2.3.0
Merge pull request !173 from 就眠儀式/2.x
2 parents 80e1767 + 16359e3 commit 0e1137e

File tree

18 files changed

+96
-62
lines changed

18 files changed

+96
-62
lines changed

package/component/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@layui/layui-vue",
3-
"version": "2.2.2",
3+
"version": "2.3.0",
44
"author": "就眠儀式",
55
"license": "MIT",
66
"description": "a component library for Vue 3 base on layui-vue",

package/component/src/component/carousel/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import CarouselItem from "../carouselItem/index.vue";
2222
export interface CarouselProps {
2323
width?: string;
2424
height?: string;
25-
modelValue: string;
25+
modelValue?: string;
2626
autoplay?: boolean;
2727
arrow?: "always" | "hover" | "none";
2828
anim?: "default" | "updown" | "fade";

package/component/src/component/input/index.less

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,14 @@
114114
display: none;
115115
}
116116

117-
.layui-input-disabled {
117+
.layui-input:has(.layui-input-disabled) {
118118
border-color: var(--input-border-color)!important;
119119
}
120120

121-
.layui-input-disabled {
122-
opacity: 0.6;
123-
}
124-
125121
.layui-input-disabled,
126122
.layui-input-disabled * {
127123
cursor: not-allowed !important;
124+
opacity: 0.6;
128125
}
129126

130127
.layui-input{

package/component/src/component/input/index.vue

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,16 @@ const onCompositionend = (eventParam: Event) => {
130130
131131
const classes = computed(() => {
132132
return {
133-
"layui-input-disabled": props.disabled,
134133
"layui-input-has-prefix": slots.prefix || props.prefixIcon,
135134
};
136135
});
137136
137+
const wrapperClasses = computed(() => {
138+
return {
139+
"layui-input-disabled": props.disabled,
140+
};
141+
});
142+
138143
const showPassword = () => {
139144
if (isPassword.value) {
140145
type.value = "text";
@@ -161,9 +166,9 @@ defineExpose({ focus, blur });
161166
<template>
162167
<div class="layui-input" :class="classes" :size="size">
163168
<div class="layui-input-prepend" v-if="slots.prepend">
164-
<slot name="prepend"></slot>
169+
<slot name="prepend" :disabled="disabled"></slot>
165170
</div>
166-
<div class="layui-input-wrapper">
171+
<div class="layui-input-wrapper" :class="wrapperClasses">
167172
<span class="layui-input-prefix" v-if="slots.prefix || props.prefixIcon">
168173
<slot name="prefix" v-if="slots.prefix"></slot>
169174
<lay-icon
@@ -184,10 +189,10 @@ defineExpose({ focus, blur });
184189
:min="min"
185190
:readonly="readonly"
186191
:value="currentValue"
192+
@blur="onBlur"
187193
@input="onInput"
188-
@change="onChange"
189194
@focus="onFocus"
190-
@blur="onBlur"
195+
@change="onChange"
191196
@compositionstart="onCompositionstart"
192197
@compositionend="onCompositionend"
193198
ref="inputRef"
@@ -216,7 +221,7 @@ defineExpose({ focus, blur });
216221
</span>
217222
</div>
218223
<div class="layui-input-append" v-if="slots.append">
219-
<slot name="append"></slot>
224+
<slot name="append" :disabled="disabled"></slot>
220225
</div>
221226
</div>
222227
</template>

package/component/src/component/loading/index.less

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { withInstall } from "../../utils";
2+
import Component from "./index.vue";
3+
4+
const component = withInstall(Component);
5+
export default component;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<template>
2+
<div class="layui-loading">加载动画</div>
3+
</template>
4+
5+
<script lang="ts">
6+
export default {
7+
name: "LayLoading",
8+
};
9+
</script>
10+
11+
<script setup lang="ts">
12+
import "./index.less";
13+
</script>

package/component/src/component/noticeBar/index.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default {
6262
</script>
6363

6464
<script lang="ts" setup>
65-
import { onMounted, reactive, nextTick, ref, onUnmounted } from "vue";
65+
import { onMounted, reactive, nextTick, ref, onUnmounted, watch } from "vue";
6666
import LayCarousel from "../carousel/index.vue";
6767
import LayCarouselItem from "../carouselItem/index.vue";
6868
import { LayIcon } from "@layui/icons-vue";
@@ -100,6 +100,15 @@ const noticeBarWarpRef = ref();
100100
const noticeBarTextRef = ref();
101101
102102
const active = ref(props.textlist[0]?.id);
103+
104+
watch(
105+
() => props.textlist,
106+
() => {
107+
active.value = props.textlist[0].id;
108+
},
109+
{ deep: true }
110+
);
111+
103112
const state = reactive({
104113
order: 1,
105114
oneTime: 0,

package/component/src/component/tree/TreeNode.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function renderLineShort(node: TreeData) {
6262
const nodeIconType = (node: TreeData): string => {
6363
if (!props.showLine) {
6464
if (node.children.length > 0) {
65-
return "layui-tree-iconArrow ";
65+
return !node.isLeaf ? "layui-icon-triangle-r" : "layui-icon-triangle-d";
6666
}
6767
return "";
6868
}

package/component/src/component/tree/index.less

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
color: var(--global-checked-color) !important;
1818
}
1919

20+
21+
.layui-tree-unline .layui-tree-iconClick {
22+
width: 32px;
23+
text-align: center;
24+
margin: 0px;
25+
}
26+
2027
.layui-tree-pack {
2128
display: none;
2229
padding-left: 20px;
@@ -47,11 +54,13 @@
4754
position: relative;
4855
padding: 3px 0;
4956
height: 20px;
57+
line-height: 20px;
5058
white-space: nowrap;
5159
}
5260

5361
.layui-tree-entry:hover {
5462
background-color: #eee;
63+
border-radius: var(--global-border-radius);
5564
}
5665

5766
.layui-tree-line .layui-tree-entry:hover {
@@ -60,7 +69,6 @@
6069

6170
.layui-tree-line .layui-tree-entry:hover .layui-tree-txt {
6271
color: #999;
63-
text-decoration: underline;
6472
transition: 0.3s;
6573
}
6674

@@ -107,47 +115,23 @@
107115
border: 1px solid #c0c4cc;
108116
}
109117

110-
.layui-tree-iconClick .layui-icon {
111-
font-size: 18px;
118+
.layui-tree-iconClick .layui-icon-triangle-d,
119+
.layui-tree-iconClick .layui-icon-triangle-r{
120+
font-size: 12px;
112121
}
113122

114123
.layui-tree-icon .layui-icon {
115124
font-size: 12px;
116125
color: #666;
117126
}
118127

119-
.layui-tree-iconArrow {
120-
padding: 0 5px;
121-
}
122-
123-
.layui-tree-iconArrow:after {
124-
content: "";
125-
position: absolute;
126-
left: 4px;
127-
top: 3px;
128-
z-index: 100;
129-
width: 0;
130-
height: 0;
131-
border-width: 5px;
132-
border-style: solid;
133-
border-color: transparent transparent transparent #c0c4cc;
134-
transition: 0.5s;
135-
}
136-
137128
.layui-tree-btnGroup,
138129
.layui-tree-editInput {
139130
position: relative;
140131
vertical-align: middle;
141132
display: inline-block;
142133
}
143134

144-
.layui-tree-spread
145-
> .layui-tree-entry
146-
> .layui-tree-iconClick
147-
> .layui-tree-iconArrow:after {
148-
transform: rotate(90deg) translate(3px, 4px);
149-
}
150-
151135
.layui-tree-txt {
152136
display: inline-block;
153137
vertical-align: middle;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy