让企业管理更智慧、更快捷

Skip to content
源代码提交(5)
## [1.0.27](http://git.leadwaycloud.com/package/lwc-ui-components/compare/v1.0.26...v1.0.27) (2024-03-22)
## [1.0.26](http://git.leadwaycloud.com/package/lwc-ui-components/compare/v1.0.25...v1.0.26) (2024-02-01)
## [1.0.25](http://git.leadwaycloud.com/package/lwc-ui-components/compare/v1.0.24...v1.0.25) (2024-01-30)
......
{
"name": "@package/lwc-ui-components",
"version": "1.0.26",
"version": "1.0.27",
"private": false,
"description": "立威云UI组件库",
"author": "",
......@@ -165,11 +165,11 @@
"keywords": [],
"license": "UNLICENSED",
"publishConfig": {
"registry": "http://git.leadwaycloud.com/api/v4/projects/180/packages/npm/"
"registry": "https://git.leadwaycloud.com/api/v4/projects/180/packages/npm/"
},
"repository": {
"type": "git",
"url": "http://git.leadwaycloud.com/package/lwc-ui-components.git"
"url": "https://git.leadwaycloud.com/package/lwc-ui-components.git"
},
"style": "lib/app.css"
}
......@@ -209,7 +209,7 @@ if (typeof window !== 'undefined' && window.Vue) {
}
export default {
version: '1.0.24',
version: '1.0.26',
install,
LwcBasicButton,
LwcBasicButtonIcon,
......
......@@ -8,6 +8,23 @@
`新特性`
`非兼容性更新`
---
### **v1.0.27 20240322**
#### 修复
- 调整 lwc-chart-report 组件头部样式
- 调整 lwc-dashboard-custom-card-default 组件头部样式
- 调整 lwc-dashboard-custom-ranking-default 组件头部样式 和内容高度调整,支持自适应高度
- 调整 lwc-data-display-descriptions 组件支持更多参数传入
---
### **v1.0.26 20240201**
#### 修复
- 修复 lwc-upload-image 组件接口返回参数调整
---
### **v1.0.25 20240130**
......
......@@ -3,12 +3,14 @@
:shadow="shadow"
:class="{ 'is-auto-size': autoSize }">
<el-row slot="header" class="flex flex-row items-center">
<el-col class="font-bold">{{ title }}</el-col>
<el-col :span="16" class="flex items-center justify-end">
<el-row v-if="formConfig" class="overflow-hidden">
<vxe-form v-bind="formConfig"></vxe-form>
</el-row>
<span @click="onRefresh" class="text-color-secondary align-middle float-right ml-4 el-icon-refresh cursor-pointer text-lg" :class="{ 'animate-spin': spin }" />
<el-col class="flex items-center justify-between">
<div class="font-bold" >{{ title }}</div>
<div class="flex items-center justify-end">
<div v-if="formConfig" class="overflow-hidden">
<vxe-form v-bind="formConfig"></vxe-form>
</div>
<span @click="onRefresh" class="text-color-secondary align-middle float-right ml-4 el-icon-refresh cursor-pointer text-lg" :class="{ 'animate-spin': spin }" />
</div>
</el-col>
</el-row>
<el-row class="lwc-table-border-none flex flex-row justify-center items-center pt-1 pb-2">
......
......@@ -3,12 +3,14 @@
:shadow="shadow"
:class="{ 'is-auto-size': autoSize }">
<el-row slot="header" class="flex flex-row items-center">
<el-col class="font-bold">{{ title }}</el-col>
<el-col :span="16" class="flex items-center justify-end">
<el-row v-if="formConfig" class="overflow-hidden">
<vxe-form v-bind="formConfig"></vxe-form>
</el-row>
<span @click="onRefresh" class="text-color-secondary align-middle float-right ml-4 el-icon-refresh cursor-pointer text-lg" :class="{ 'animate-spin': spin }" />
<el-col class="flex items-center justify-between">
<div class="font-bold" >{{ title }}</div>
<div class="flex items-center justify-end">
<div v-if="formConfig" class="overflow-hidden">
<vxe-form v-bind="formConfig"></vxe-form>
</div>
<span @click="onRefresh" class="text-color-secondary align-middle float-right ml-4 el-icon-refresh cursor-pointer text-lg" :class="{ 'animate-spin': spin }" />
</div>
</el-col>
</el-row>
<el-row class="flex flex-row justify-center items-center pt-1 pb-2" :gutter="6">
......
......@@ -3,12 +3,14 @@
:shadow="shadow"
:class="{ 'is-auto-size': autoSize }">
<el-row slot="header" class="flex flex-row items-center">
<el-col class="font-bold">{{ title }}</el-col>
<el-col :span="16" class="flex items-center justify-end">
<el-row v-if="formConfig" class="overflow-hidden">
<vxe-form v-bind="formConfig"></vxe-form>
</el-row>
<span @click="onRefresh" class="text-color-secondary align-middle float-right ml-4 el-icon-refresh cursor-pointer text-lg" :class="{ 'animate-spin': spin }" />
<el-col class="flex items-center justify-between">
<div class="font-bold" >{{ title }}</div>
<div class="flex items-center justify-end">
<div v-if="formConfig" class="overflow-hidden">
<vxe-form v-bind="formConfig"></vxe-form>
</div>
<span @click="onRefresh" class="text-color-secondary align-middle float-right ml-4 el-icon-refresh cursor-pointer text-lg" :class="{ 'animate-spin': spin }" />
</div>
</el-col>
</el-row>
<el-row class="lwc-table-border-none flex flex-row justify-center items-center pt-1 pb-2">
......@@ -16,6 +18,7 @@
class="w-full h-full"
v-if="data.length > 0"
:data="data"
:height="autoSize ? '99%' : 'auto'"
size="small">
<el-table-column
v-for="(columnOption, index) in headerItems" :key="`lwc-dashboard-custom-card-default_header-${index}`"
......@@ -34,7 +37,7 @@
</div>
<div class="flex justify-center items-center ml-3">
<el-avatar class="mr-2" v-if="image" :src="scope.row.image || defaultImage"></el-avatar>
<span>{{ scope.row.name }}</span>
<span>{{ scope.row[columnOption.prop] }}</span>
</div>
</el-row>
<slot v-if="columnOption.isSlot && index > 0" :name="columnOption.prop" :value="scope.row[columnOption.prop]"></slot>
......
......@@ -24,7 +24,7 @@ export default {
const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { LwcDashboardCustomRankingDefault },
template: '<lwc-dashboard-custom-ranking-default @onRefresh="onRefresh" v-bind="$props" />',
template: '<lwc-dashboard-custom-ranking-default @onRefresh="onRefresh" v-bind="$props" style="height:300px"/>',
});
......@@ -32,9 +32,10 @@ export const Default = Template.bind({});
Default.args = {
title: '自定义排行榜',
image: true,
autoSize: true,
headerItems: [{
label: '商品',
prop: 'name',
prop: 'goodsName',
"show-overflow-tooltip": true,
align: "left",
"min-width": 180,
......@@ -45,25 +46,41 @@ Default.args = {
}, {
label: '销量',
prop: 'saleQty',
align: 'right'
align: 'right',
"min-width": 80,
}],
data: [{
name: '罗技(G)G813 机械游戏键盘',
goodsName: '罗技(G)G813 机械游戏键盘',
image: "https://img14.360buyimg.com/n0/jfs/t1/125623/9/18058/85676/5faa622fE315bf054/c759436bd1606b51.jpg",
viewQty: 612,
saleQty: 58
}, {
name: '牧马人M1有线静音电竞游戏鼠标',
goodsName: '牧马人M1有线静音电竞游戏鼠标',
image: "https://img14.360buyimg.com/n0/jfs/t1/137655/18/14150/116451/5faa824aE507f479b/8ee63295e4536d2e.jpg",
viewQty: 214,
saleQty: 75
}, {
name: '金属移动硬盘盒USB3.0外置2.5寸笔记本台式机SSD固态机械',
goodsName: '金属移动硬盘盒USB3.0外置2.5寸笔记本台式机SSD固态机械',
image: "https://img14.360buyimg.com/n0/jfs/t1/128578/18/18065/64759/5faa47dbE3fb5b2d0/1cd0d78fb3dee1bc.jpg",
viewQty: 862,
saleQty: 215
}, {
name: '索泰(ZOTAC) rtx3070显卡英伟达',
goodsName: '索泰(ZOTAC) rtx3070显卡英伟达',
image: "https://img14.360buyimg.com/n0/jfs/t1/51410/40/9404/510130/5d690aecE4d82a856/08820d8a4561436f.jpg",
viewQty: 318,
saleQty: 32
}, {
goodsName: '11索泰(ZOTAC) rtx3070显卡英伟达',
image: "https://img14.360buyimg.com/n0/jfs/t1/51410/40/9404/510130/5d690aecE4d82a856/08820d8a4561436f.jpg",
viewQty: 318,
saleQty: 32
}, {
goodsName: '22(ZOTAC) rtx3070显卡英伟达',
image: "https://img14.360buyimg.com/n0/jfs/t1/51410/40/9404/510130/5d690aecE4d82a856/08820d8a4561436f.jpg",
viewQty: 318,
saleQty: 32
}, {
goodsName: '33索泰(ZOTAC) rtx3070显卡英伟达',
image: "https://img14.360buyimg.com/n0/jfs/t1/51410/40/9404/510130/5d690aecE4d82a856/08820d8a4561436f.jpg",
viewQty: 318,
saleQty: 32
......
......@@ -2,10 +2,12 @@ import renderContentItemTitle from '../../../../renders/content-item-title';
import XEUtils from "xe-utils";
function renderItemContent(h, text, item) {
const { name, props, events = {} } = item.renderContent;
const { name, props, events = {}, style, className } = item.renderContent;
return h(
name,
{
style,
class: className,
props: props,
on: {
...events
......@@ -18,7 +20,7 @@ function renderItemContent(h, text, item) {
function renderItems(h, _vm, data, list) {
let items = []
list.forEach(i => {
const { labelClassName, contentClassName, labelStyle, contentStyle } = i
if (!i.visible) i.visible = () => true
if (i.visible()) {
......@@ -35,7 +37,7 @@ function renderItems(h, _vm, data, list) {
items.push(h(
'el-descriptions-item',
{ props: { label: i.label, span: i.span } },
{ props: { label: i.label, span: i.span, labelClassName, contentClassName, labelStyle, contentStyle } },
i.renderContent ? [ renderItemContent(h, renderText, i) ] : renderText
));
}
......@@ -78,6 +80,7 @@ export default {
return h(
"el-descriptions",
{
style: { "overflow-x": "auto" },
props: {
border: true,
column: 2,
......@@ -85,11 +88,10 @@ export default {
layout: "horizontal",
colon: true,
contentStyle: {
"min-width": "360px" // 默认内容最小宽度
"minWidth": "300px" // 默认内容最小宽度
},
labelStyle: {
"min-width": "200px", // 默认标题最小宽度
"max-width": "500px" // 默认标题最大宽度
"width": "200px", // 默认标题最小宽度
},
...this.$attrs
},
......
......@@ -16,6 +16,9 @@ function renderSelect(h, vm) {
multiple: vm.multiple,
...vm.selectProps
},
attrs: {
...vm.$attrs
},
on: {
"visible-change": (state) => {
if(state) {
......
......@@ -21,6 +21,7 @@
display: flex;
justify-content: center;
align-items: center;
padding: 5px 10px;
flex-direction: column;
>div {
......