Skip to content

Commit 03854a3

Browse files
sleepritegitee-org
authored andcommitted
!176 2.3.2
Merge pull request !176 from 就眠儀式/2.x
2 parents 0c37b33 + d8cb650 commit 03854a3

File tree

20 files changed

+94
-30
lines changed

20 files changed

+94
-30
lines changed

package/component/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@layui/layui-vue",
3-
"version": "2.3.1",
3+
"version": "2.3.2",
44
"author": "就眠儀式",
55
"license": "MIT",
66
"description": "a component library for Vue 3 base on layui-vue",
@@ -46,7 +46,7 @@
4646
},
4747
"dependencies": {
4848
"@layui/icons-vue": "1.1.0",
49-
"@layui/layer-vue": "1.8.8",
49+
"@layui/layer-vue": "1.8.9",
5050
"@vueuse/core": "8.7.3",
5151
"@umijs/ssr-darkreader": "^4.9.45",
5252
"@ctrl/tinycolor": "^3.4.1",

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

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,22 +165,41 @@ provide("anim", anim);
165165
</script>
166166

167167
<template>
168-
<div class="layui-carousel" :lay-anim="anim" :lay-indicator="indicator" :lay-arrow="arrow"
169-
:style="{ width: width, height: height }" @mouseenter="handleMouseEnter" @mouseleave="handleMouseLeave">
168+
<div
169+
class="layui-carousel"
170+
:lay-anim="anim"
171+
:lay-indicator="indicator"
172+
:lay-arrow="arrow"
173+
:style="{ width: width, height: height }"
174+
@mouseenter="handleMouseEnter"
175+
@mouseleave="handleMouseLeave"
176+
>
170177
<div carousel-item>
171178
<slot></slot>
172179
</div>
173180
<template v-if="childrens.length > 1">
174181
<div class="layui-carousel-ind">
175182
<ul>
176-
<li v-for="(ss, index) in childrens" :key="index" :class="[ss.props?.id === active ? 'layui-this' : '']"
177-
@click.stop="change(ss.props?.id)"></li>
183+
<li
184+
v-for="(ss, index) in childrens"
185+
:key="index"
186+
:class="[ss.props?.id === active ? 'layui-this' : '']"
187+
@click.stop="change(ss.props?.id)"
188+
></li>
178189
</ul>
179190
</div>
180-
<button class="layui-icon layui-carousel-arrow" lay-type="sub" @click="sub">
191+
<button
192+
class="layui-icon layui-carousel-arrow"
193+
lay-type="sub"
194+
@click="sub"
195+
>
181196
{{ anim === "updown" ? "" : "" }}
182197
</button>
183-
<button class="layui-icon layui-carousel-arrow" lay-type="add" @click="add">
198+
<button
199+
class="layui-icon layui-carousel-arrow"
200+
lay-type="add"
201+
@click="add"
202+
>
184203
{{ anim === "updown" ? "" : "" }}
185204
</button>
186205
</template>

package/component/src/component/datePicker/components/YearPanel.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
class="laydate-btns-time"
3636
>{{ t("datePicker.selectMonth") }}</span
3737
>
38-
<template v-else-if="parseInt(Year.toString())>0">{{ Year }}</template>
38+
<template v-else-if="parseInt(Year.toString()) > 0">{{ Year }}</template>
3939
</PanelFoot>
4040
</div>
4141
</template>
@@ -138,7 +138,7 @@ const footOnNow = () => {
138138
Year.value = dayjs().year();
139139
if (datePicker.type === "yearmonth") {
140140
datePicker.currentMonth.value = dayjs().month();
141-
emits('update:modelValue',Year.value);
141+
emits("update:modelValue", Year.value);
142142
}
143143
scrollTo();
144144
};

package/component/src/component/select/index.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export interface SelectProps {
3838
modelValue?: any;
3939
multiple?: boolean;
4040
items?: SelectOptionProps[];
41+
options?: SelectOptionProps[];
4142
size?: SelectSize;
4243
collapseTagsTooltip?: boolean;
4344
minCollapsedNum?: number;
@@ -112,12 +113,16 @@ const intOption = () => {
112113
if (slots.default) {
113114
getOption(slots.default(), newOptions);
114115
}
115-
Object.assign(newOptions, props.items);
116+
Object.assign(newOptions, props.options || props.items);
116117
if (JSON.stringify(newOptions) != JSON.stringify(options.value)) {
117118
options.value = newOptions;
118119
}
119120
};
120121
122+
const allOptions = computed(() => {
123+
return props.options || props.items;
124+
});
125+
121126
const handleRemove = (value: any) => {
122127
if (Array.isArray(selectedValue.value)) {
123128
selectedValue.value = selectedValue.value.filter((item) => item != value);
@@ -311,9 +316,9 @@ provide("searchMethod", props.searchMethod);
311316
</lay-input>
312317
<template #content>
313318
<dl class="layui-select-content">
314-
<template v-if="items">
319+
<template v-if="options || items">
315320
<lay-select-option
316-
v-for="(item, index) in items"
321+
v-for="(item, index) in allOptions"
317322
v-bind="item"
318323
:key="index"
319324
></lay-select-option>

package/component/src/component/table/TableData.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ const checkboxProps = props.getCheckboxProps(props.data, props.index);
660660
:spanMethod="spanMethod"
661661
:defaultExpandAll="defaultExpandAll"
662662
:getCheckboxProps="getCheckboxProps"
663+
:childrenColumnName="childrenColumnName"
663664
:getRadioProps="getRadioProps"
664665
@row="rowClick"
665666
@row-double="rowDoubleClick"

package/component/src/component/table/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,7 @@ defineExpose({ getCheckData });
11711171
:defaultExpandAll="defaultExpandAll"
11721172
:getCheckboxProps="getCheckboxProps"
11731173
:getRadioProps="getRadioProps"
1174+
:childrenColumnName="childrenColumnName"
11741175
v-model:expandKeys="tableExpandKeys"
11751176
v-model:selectedKeys="tableSelectedKeys"
11761177
v-model:selectedKey="tableSelectedKey"

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export interface TreeNodeProps {
3535
checkStrictly: boolean | string;
3636
collapseTransition: boolean;
3737
onlyIconControl: boolean;
38+
tailNodeIcon: string | boolean;
3839
}
3940
4041
interface TreeNodeEmits {
@@ -69,7 +70,10 @@ const nodeIconType = (node: TreeData): string => {
6970
if (node.children.length !== 0) {
7071
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
7172
}
72-
return "layui-icon-file";
73+
if (props.tailNodeIcon) {
74+
return props.tailNodeIcon as string;
75+
}
76+
return "";
7377
};
7478
7579
function recursiveNodeClick(node: TreeData) {
@@ -198,6 +202,7 @@ const isChildAllSelected = computed(() => {
198202
:collapse-transition="collapseTransition"
199203
:checkStrictly="checkStrictly"
200204
:only-icon-control="onlyIconControl"
205+
:tail-node-icon="tailNodeIcon"
201206
@node-click="recursiveNodeClick"
202207
>
203208
<template v-if="$slots.title" v-slot:title="slotProp: { data: any }">

package/component/src/component/tree/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export interface TreeProps {
3939
showLine?: boolean;
4040
showCheckbox?: boolean;
4141
replaceFields?: ReplaceFieldsOptions;
42+
tailNodeIcon?: string | boolean;
4243
}
4344
4445
interface TreeEmits {
@@ -59,6 +60,7 @@ const props = withDefaults(defineProps<TreeProps>(), {
5960
onlyIconControl: false,
6061
disabled: false,
6162
showLine: true,
63+
tailNodeIcon: "layui-icon-file",
6264
replaceFields: () => {
6365
return {
6466
id: "id",
@@ -179,6 +181,7 @@ watch(
179181
:check-strictly="checkStrictly"
180182
:collapse-transition="collapseTransition"
181183
:only-icon-control="onlyIconControl"
184+
:tail-node-icon="tailNodeIcon"
182185
@node-click="handleClick"
183186
>
184187
<template v-if="$slots.title" v-slot:title="{ data }">

package/component/src/components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ import LaySpace from "./component/space/index";
9090
import LayTag from "./component/tag/index";
9191
import LayTagInput from "./component/tagInput/index";
9292
import LayConfigProvider from "./provider";
93-
import LayAutocomplete from "./component/autocomplete/index";
93+
import LayAutocomplete from "./component/autoComplete/index";
9494
import LayBarcode from "./component/barcode/index";
9595
import LayQrcode from "./component/qrcode/index";
9696
import LayTreeSelect from "./component/treeSelect/index";

package/component/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ import LayTag from "./component/tag/index";
9797
import LayTagInput from "./component/tagInput/index";
9898
import LayQrcode from "./component/qrcode/index";
9999
import LayBarcode from "./component/barcode/index";
100-
import LayAutocomplete from "./component/autocomplete/index";
100+
import LayAutocomplete from "./component/autoComplete/index";
101101
import LayRadioButton from "./component/radioButton/index";
102102
import LayPopconfirm from "./component/popconfirm/index";
103103
import LayConfigProvider from "./provider";

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