mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-21 10:25:53 +08:00
refactor(ui): 替换iView为TDesign组件库并优化相关代码
feat(coupon): 新增优惠券详情页面 feat(api): 添加会员评价状态更新和删除接口 perf(pagination): 统一分页大小选项为[20, 50, 100] style(theme): 移除旧主题文件并更新样式类名 fix(menu): 修复菜单组件兼容性问题 chore(deps): 更新package.json依赖项 docs(modal): 添加全局Modal组件兼容层
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
.table {
|
||||
flex: 11;
|
||||
}
|
||||
.ivu-card {
|
||||
.t-card {
|
||||
width: 100%;
|
||||
}
|
||||
.modal-footer {
|
||||
@@ -72,7 +72,7 @@
|
||||
<Col :span="isComponent?5:4">
|
||||
<div class="file-list">
|
||||
<div class="article-category mr_10">
|
||||
<Tree :data="treeData" :render="renderContent" @on-select-change.self="handleCateChange" class="demo-tree-render"></Tree>
|
||||
<Tree :data="treeData" :render="renderContent" @on-select-change="handleCateChange" class="demo-tree-render"></Tree>
|
||||
<div class="group-row flex" v-if="!isComponent">
|
||||
<Button @click="handleClickAddGroup">添加分组</Button>
|
||||
</div>
|
||||
@@ -143,7 +143,7 @@
|
||||
</CheckboxGroup>
|
||||
</div>
|
||||
<div class="page-box">
|
||||
<Page :total="total" :page-size="searchForm.pageSize" show-elevator @on-change="pageChange" size="small" />
|
||||
<Page :total="total" :page-size="searchForm.pageSize" show-elevator show-sizer :page-size-opts="[20, 50, 100]" @on-change="pageChange" size="small" />
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
@@ -900,24 +900,22 @@
|
||||
this.searchForm.pageNumber = value;
|
||||
this.getDataList();
|
||||
},
|
||||
// 自定义tree节点显示内容和交互
|
||||
renderContent (h, { root, node, data }) {
|
||||
return h('span', {style: {display: 'inline-block', width: '100%'}},
|
||||
[
|
||||
h('span', [h("Icon", {type: 'ios-paper-outline', style: {marginRight: '8px'}}), h('span', data.title)]),
|
||||
h('span', {style: {display: 'inline-block', float: 'right', marginRight: '10px'}},
|
||||
[
|
||||
h("Dropdown", {style: {marginLeft: "4px"}},
|
||||
[
|
||||
h("Icon", {props: {type: 'ios-more', size: "20",}, style: {display: 'inline-block'}, on:{click: () => {}}}),
|
||||
h("DropdownMenu", {slot: "list"
|
||||
}, [
|
||||
h("DropdownItem", { nativeOn:{click: () => {this.handleContextMenuEdit()}} }, "编辑"),
|
||||
h("DropdownItem", { nativeOn:{click: () => {this.handleContextMenuDelete()}} }, "删除"),
|
||||
])
|
||||
]),
|
||||
renderContent(h, ctx) {
|
||||
const node = (ctx && ctx.node) || null
|
||||
const data = (ctx && ctx.data) || (node && node.data) || {}
|
||||
const titleVNode = h('span', [h("Icon", {type: 'ios-paper-outline', style: {marginRight: '8px'}}), h('span', data.title)])
|
||||
return h('span', { style: { display: 'inline-block', width: '100%' } }, [
|
||||
titleVNode,
|
||||
h('span', { style: { display: 'inline-block', float: 'right', marginRight: '10px' } }, [
|
||||
h('Dropdown', { style: { marginLeft: '4px' } }, [
|
||||
h('Icon', { props: { type: 'ios-more', size: '20' }, style: { display: 'inline-block' } }),
|
||||
h('DropdownMenu', { slot: 'list' }, [
|
||||
h('DropdownItem', { nativeOn: { click: () => { this.handleContextMenuEdit() } } }, '编辑'),
|
||||
h('DropdownItem', { nativeOn: { click: () => { this.handleContextMenuDelete() } } }, '删除')
|
||||
])
|
||||
]);
|
||||
])
|
||||
])
|
||||
])
|
||||
},
|
||||
|
||||
|
||||
@@ -1158,20 +1156,12 @@
|
||||
// 改变查看方式
|
||||
changeShowType() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
if (this.showType == "list") {
|
||||
this.searchForm.pageSize = 10;
|
||||
} else {
|
||||
this.searchForm.pageSize = 12;
|
||||
}
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取列表数据
|
||||
getDataList(type = null) {
|
||||
if (this.showType == "list") {
|
||||
this.pageSizeOpts = [10, 20, 50];
|
||||
} else {
|
||||
this.pageSizeOpts = [12, 24, 48];
|
||||
}
|
||||
this.pageSizeOpts = [20, 50, 100];
|
||||
this.loading = true;
|
||||
getFileListData(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
@@ -1187,11 +1177,7 @@
|
||||
handleSearch() {
|
||||
this.searchForm.title = this.searchForm.name;
|
||||
this.searchForm.pageNumber = 1;
|
||||
if (this.showType == "list") {
|
||||
this.searchForm.pageSize = 5;
|
||||
} else {
|
||||
this.searchForm.pageSize = 12;
|
||||
}
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
// 文件类型筛选
|
||||
|
||||
Reference in New Issue
Block a user