✨(component): 发布 1.3.2
This commit is contained in:
parent
e2af04ad83
commit
c94519bd2f
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@layui/layui-vue",
|
"name": "@layui/layui-vue",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"author": "就眠儀式",
|
"author": "就眠儀式",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "a component library for Vue 3 base on layui-vue",
|
"description": "a component library for Vue 3 base on layui-vue",
|
||||||
|
@ -72,9 +72,11 @@ watch([red, green, blue], (newValue) => {
|
|||||||
rgba2hex(red.value, green.value, blue.value, alpha.value)
|
rgba2hex(red.value, green.value, blue.value, alpha.value)
|
||||||
);
|
);
|
||||||
let { h, s, v } = rgb2hsv(red.value, green.value, blue.value);
|
let { h, s, v } = rgb2hsv(red.value, green.value, blue.value);
|
||||||
|
hue.value = h;
|
||||||
saturation.value = s;
|
saturation.value = s;
|
||||||
value.value = v;
|
value.value = v;
|
||||||
pointStyle.value = `top: ${100 - v * 100}%;left: ${s * 100}%;`;
|
pointStyle.value = `top: ${100 - v * 100}%;left: ${s * 100}%;`;
|
||||||
|
hueSliderStyle.value = `left: ${(hue.value / 360) * 100}%;`;
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(alpha, () => {
|
watch(alpha, () => {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
.layui-dropdown-content,
|
.layui-dropdown-content,
|
||||||
.layui-dropdown dl {
|
.layui-dropdown dl {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 899;
|
z-index: 99999;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1px solid #e4e7ed;
|
border: 1px solid #e4e7ed;
|
||||||
|
@ -184,6 +184,11 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.layui-table-header-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.layui-table-header .layui-table {
|
.layui-table-header .layui-table {
|
||||||
margin-bottom: -1px;
|
margin-bottom: -1px;
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,7 @@ const renderFixedStyle = (column: any, columnIndex: number) => {
|
|||||||
}
|
}
|
||||||
return { left: `${left}px` } as StyleValue;
|
return { left: `${left}px` } as StyleValue;
|
||||||
} else {
|
} else {
|
||||||
var right = scrollWidthCell.value > 0 ? scrollWidthCell.value : 0;
|
var right = 0;
|
||||||
for (var i = columnIndex + 1; i < props.columns.length; i++) {
|
for (var i = columnIndex + 1; i < props.columns.length; i++) {
|
||||||
if (props.columns[i].fixed && props.columns[i].fixed == "right") {
|
if (props.columns[i].fixed && props.columns[i].fixed == "right") {
|
||||||
right = right + props.columns[i]?.width.replace("px", "");
|
right = right + props.columns[i]?.width.replace("px", "");
|
||||||
@ -392,7 +392,8 @@ const renderTotalRowCell = (column: any) => {
|
|||||||
|
|
||||||
<div class="layui-table-box">
|
<div class="layui-table-box">
|
||||||
<!-- 表头 -->
|
<!-- 表头 -->
|
||||||
<div class="layui-table-header" ref="tableHeader">
|
<div class="layui-table-header" :style="[{ 'padding-right':`${scrollWidthCell}px`}]">
|
||||||
|
<div class="layui-table-header-wrapper" ref="tableHeader" :style="[scrollWidthCell > 0 ? 'border-right: 1px solid #eee;' : '']">
|
||||||
<table class="layui-table" :lay-size="size" :lay-skin="skin">
|
<table class="layui-table" :lay-size="size" :lay-skin="skin">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<template v-for="column in columns" :key="column">
|
<template v-for="column in columns" :key="column">
|
||||||
@ -405,7 +406,6 @@ const renderTotalRowCell = (column: any) => {
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<col v-if="scrollWidthCell > 0" :width="scrollWidthCell" />
|
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -470,19 +470,10 @@ const renderTotalRowCell = (column: any) => {
|
|||||||
</template>
|
</template>
|
||||||
</th>
|
</th>
|
||||||
</template>
|
</template>
|
||||||
<th
|
|
||||||
v-if="scrollWidthCell > 0"
|
|
||||||
class="layui-table-fixed-right"
|
|
||||||
|
|
||||||
:style="{
|
|
||||||
padding: 0,
|
|
||||||
width: `${scrollWidthCell}px`,
|
|
||||||
background: '#fafafa'
|
|
||||||
}"
|
|
||||||
></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 表身 -->
|
<!-- 表身 -->
|
||||||
<div
|
<div
|
||||||
|
@ -32,7 +32,7 @@ export default {
|
|||||||
::: demo 通过 `preset` 属性, 预设可选的颜色列表。
|
::: demo 通过 `preset` 属性, 预设可选的颜色列表。
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-color-picker v-model="color" :preset="preset"></lay-color-picker>
|
<lay-color-picker v-model="color1" :preset="preset1"></lay-color-picker>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -40,13 +40,13 @@ import { ref } from "vue";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
const color = ref("#009688");
|
const color1 = ref("#FFB800");
|
||||||
|
|
||||||
const preset = ref(["#009688", "#1e9fff", "#ffb800", "#ff5722", "#5fb878"])
|
const preset1 = ref(["#009688", "#1e9fff", "#ffb800", "#ff5722", "#5fb878"])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
color,
|
color1,
|
||||||
preset
|
preset1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -977,7 +977,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-table :columns="columns5" id="id" :expand-index="1" :data-source="dataSource5" v-model:selected-keys="selectedKeys5" :checkbox="checkbox5" :default-toolbar="defaultToolbar5" @row="rowClick5" max-height="200px">
|
<lay-table :columns="columns5" id="id" :expand-index="1" :data-source="dataSource5" v-model:selected-keys="selectedKeys5" :checkbox="checkbox5" :default-toolbar="defaultToolbar5" @row="rowClick5" height="200px">
|
||||||
<template v-slot:toolbar>
|
<template v-slot:toolbar>
|
||||||
<lay-button size="sm">新增</lay-button>
|
<lay-button size="sm">新增</lay-button>
|
||||||
<lay-button size="sm">删除</lay-button>
|
<lay-button size="sm">删除</lay-button>
|
||||||
@ -1022,24 +1022,6 @@ export default {
|
|||||||
customSlot:"name",
|
customSlot:"name",
|
||||||
key:"name",
|
key:"name",
|
||||||
align: "left"
|
align: "left"
|
||||||
},{
|
|
||||||
title:"生日",
|
|
||||||
customSlot:"birthday",
|
|
||||||
width:"200px",
|
|
||||||
key:"birthday"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title:"年龄",
|
|
||||||
width: "200px",
|
|
||||||
key:"age",
|
|
||||||
sort: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title:"隐藏列",
|
|
||||||
width: "200px",
|
|
||||||
key:"hide",
|
|
||||||
sort: true,
|
|
||||||
hide: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:"备注",
|
title:"备注",
|
||||||
|
@ -11,6 +11,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<lay-timeline>
|
<lay-timeline>
|
||||||
<lay-timeline-item title="1.3.x">
|
<lay-timeline-item title="1.3.x">
|
||||||
|
<ul>
|
||||||
|
<a name="1-3-1"></a>
|
||||||
|
<li>
|
||||||
|
<h3>1.3.2 <span class="layui-badge-rim">2022-07-21</span></h3>
|
||||||
|
<ul>
|
||||||
|
<li>[修复] table 组件 columns 全部设置 width 时, 计算宽度错误。</li>
|
||||||
|
<li>[修复] table 组件 max-height 状态, 设置字段 fixed 时 scroll 不固定。</li>
|
||||||
|
<li>[修复] color-picker 组件初始色板与默认色不对应问题。</li>
|
||||||
|
<li>[优化] dropdown 组件渲染到 body, 避免 css 污染。</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
<a name="1-3-1"></a>
|
<a name="1-3-1"></a>
|
||||||
<li>
|
<li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user