This commit is contained in:
pushuo 2022-07-18 21:32:44 +08:00
parent 986d2ba157
commit fc6174f940
4 changed files with 229 additions and 130 deletions

View File

@ -24,6 +24,9 @@ body.page-design {
body.page-design [class*=" el-icon-"], body.page-design [class^=el-icon-] {
font-weight: 600;
}
body.page-design .el-tabs__header {
margin-bottom: 0;
}
body.page-design .tag {
margin: 8px 0;
color: #777;
@ -70,6 +73,8 @@ body.page-design .design-box .sidebar-edit-wrap {
}
body.page-design .design-box .sidebar-edit-wrap .module-edit {
padding: 0 10px 14px;
overflow-y: auto;
height: 100%;
}
body.page-design .design-box .sidebar-edit-wrap .module-edit .module-editor-row {
height: 47px;
@ -236,6 +241,99 @@ body.page-design .pb-images-selector .pb-images-list .pb-images-btns button {
body.page-design .pb-images-selector .pb-images-list .el-input-group__prepend {
padding: 0 10px;
}
body.page-design .module-editor-tab-product-template .tab-info {
margin-top: 10px;
padding: 10px;
background: #f2f2f2;
border-radius: 6px;
}
body.page-design .module-editor-tab-product-template .manufacturer-list > div {
margin-bottom: 10px;
border: 1px solid #f4f4f4;
padding: 5px;
border-radius: 6px;
background: #f4f4f4;
padding-bottom: 8px;
position: relative;
}
body.page-design .module-editor-tab-product-template .manufacturer-list > div:hover .remove-btn {
display: block;
}
body.page-design .module-editor-tab-product-template .manufacturer-list > div .remove-btn {
position: absolute;
display: none;
top: 0;
right: 0;
background: red;
color: #fff;
z-index: 9;
padding: 0 2px;
cursor: pointer;
border-radius: 0 0 0 4px;
}
body.page-design .module-editor-tab-product-template .manufacturer-list > div .remove-btn:hover {
background: #c70000;
}
body.page-design .module-editor-tab-product-template .add-category {
display: flex;
justify-content: flex-end;
}
body.page-design .module-editor-tab-product-template .manufacturers .module-edit-group {
margin-top: 5px;
}
body.page-design .module-editor-tab-product-template .tab-edit-category > .el-tabs__header > .el-tabs__nav-wrap .el-tabs__item {
padding: 0 10px !important;
}
body.page-design .module-editor-tab-product-template .autocomplete-group-wrapper .item-group-wrapper {
background: #fff;
}
body.page-design .autocomplete-group-wrapper .inline-input {
margin-bottom: 10px;
width: 100%;
}
body.page-design .autocomplete-group-wrapper .item-group-wrapper {
padding: 10px;
min-height: 230px;
overflow: auto;
background-color: #f5f5f5;
border-radius: 6px;
}
body.page-design .autocomplete-group-wrapper .item-group-wrapper .item {
overflow: hidden;
position: relative;
padding: 5px 19px 5px 26px;
margin-bottom: 1px;
background: #fff;
border: 1px solid #eee;
cursor: move;
}
body.page-design .autocomplete-group-wrapper .item-group-wrapper .item:before {
content: "\f0c9";
font-family: "fontawesome";
position: absolute;
left: 6px;
top: 50%;
margin-top: -10px;
color: #999;
}
body.page-design .autocomplete-group-wrapper .item-group-wrapper .item span {
height: 19px;
overflow: hidden;
display: block;
font-size: 12px;
display: -webkit-box;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
body.page-design .autocomplete-group-wrapper .item-group-wrapper .item i {
position: absolute;
right: 6px;
top: 50%;
margin-top: -8px;
cursor: pointer;
}
.file-manager-box .layui-layer-title {
background-color: #293042;
@ -499,49 +597,3 @@ body.page-design .pb-images-selector .pb-images-list .el-input-group__prepend {
background-color: #f6f6f6;
padding: 10px 20px;
}
.link-dialog-box .module-editor-tab-product-template .tab-info {
margin-top: 10px;
padding: 10px;
background: #f2f2f2;
border-radius: 6px;
}
.link-dialog-box .module-editor-tab-product-template .manufacturer-list > div {
margin-bottom: 10px;
border: 1px solid #f4f4f4;
padding: 5px;
border-radius: 6px;
background: #f4f4f4;
padding-bottom: 8px;
position: relative;
}
.link-dialog-box .module-editor-tab-product-template .manufacturer-list > div:hover .remove-btn {
display: block;
}
.link-dialog-box .module-editor-tab-product-template .manufacturer-list > div .remove-btn {
position: absolute;
display: none;
top: 0;
right: 0;
background: red;
color: #fff;
z-index: 9;
padding: 0 2px;
cursor: pointer;
border-radius: 0 0 0 4px;
}
.link-dialog-box .module-editor-tab-product-template .manufacturer-list > div .remove-btn:hover {
background: #c70000;
}
.link-dialog-box .module-editor-tab-product-template .add-category {
display: flex;
justify-content: flex-end;
}
.link-dialog-box .module-editor-tab-product-template .manufacturers .module-edit-group {
margin-top: 5px;
}
.link-dialog-box .module-editor-tab-product-template .tab-edit-category > .el-tabs__header > .el-tabs__nav-wrap .el-tabs__item {
padding: 0 10px !important;
}
.link-dialog-box .module-editor-tab-product-template .autocomplete-group-wrapper .item-group-wrapper {
background: #fff;
}

View File

@ -14,6 +14,10 @@ body.page-design {
font-weight: 600;
}
.el-tabs__header {
margin-bottom: 0;
}
.tag {
margin: 8px 0;
color: #777;
@ -68,6 +72,8 @@ body.page-design {
.module-edit {
padding: 0 10px 14px;
overflow-y: auto;
height: 100%;
.module-editor-row {
height: 47px;
@ -277,6 +283,127 @@ body.page-design {
}
}
}
.module-editor-tab-product-template {
.tab-info {
margin-top: 10px;
padding: 10px;
background: #f2f2f2;
border-radius: 6px;
}
.manufacturer-list {
> div {
margin-bottom: 10px;
border: 1px solid #f4f4f4;
padding: 5px;
border-radius: 6px;
background: #f4f4f4;
padding-bottom: 8px;
position: relative;
&:hover {
.remove-btn {
display: block;
}
}
.remove-btn {
position: absolute;
display: none;
top: 0;
right: 0;
background: red;
color: #fff;
z-index: 9;
padding: 0 2px;
cursor: pointer;
border-radius: 0 0 0 4px;
&:hover {
background: #c70000;
}
}
}
}
.add-category {
// margin-top: 10px;
display: flex;
justify-content: flex-end;
}
.manufacturers {
.module-edit-group {
margin-top: 5px;
}
}
.tab-edit-category > .el-tabs__header > .el-tabs__nav-wrap {
.el-tabs__item {
padding: 0 10px !important;
}
}
.autocomplete-group-wrapper {
.item-group-wrapper {
background: #fff;
}
}
}
.autocomplete-group-wrapper {
.inline-input {
margin-bottom: 10px;
width: 100%;
}
.item-group-wrapper {
padding: 10px;
min-height: 230px;
overflow: auto;
background-color: #f5f5f5;
// border: 1px solid #e3e3e3;
border-radius: 6px;
.item {
overflow: hidden;
position: relative;
padding: 5px 19px 5px 26px;
margin-bottom: 1px;
background: #fff;
border: 1px solid #eee;
cursor: move;
&:before {
content: "\f0c9";
font-family: "fontawesome";
position: absolute;
left: 6px;
top: 50%;
margin-top: -10px;
color: #999;
}
span {
height: 19px;
overflow: hidden;
display: block;
font-size: 12px;
display: -webkit-box;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
i {
position: absolute;
right: 6px;
top: 50%;
margin-top: -8px;
cursor: pointer;
}
}
}
}
}
.file-manager-box {
@ -600,70 +727,4 @@ body.page-design {
.link-dialog-footer {
}
.module-editor-tab-product-template {
.tab-info {
margin-top: 10px;
padding: 10px;
background: #f2f2f2;
border-radius: 6px;
}
.manufacturer-list {
> div {
margin-bottom: 10px;
border: 1px solid #f4f4f4;
padding: 5px;
border-radius: 6px;
background: #f4f4f4;
padding-bottom: 8px;
position: relative;
&:hover {
.remove-btn {
display: block;
}
}
.remove-btn {
position: absolute;
display: none;
top: 0;
right: 0;
background: red;
color: #fff;
z-index: 9;
padding: 0 2px;
cursor: pointer;
border-radius: 0 0 0 4px;
&:hover {
background: #c70000;
}
}
}
}
.add-category {
// margin-top: 10px;
display: flex;
justify-content: flex-end;
}
.manufacturers {
.module-edit-group {
margin-top: 5px;
}
}
.tab-edit-category > .el-tabs__header > .el-tabs__nav-wrap {
.el-tabs__item {
padding: 0 10px !important;
}
}
.autocomplete-group-wrapper {
.item-group-wrapper {
background: #fff;
}
}
}
}

View File

@ -170,7 +170,7 @@
}
.pb-image-selector .i18n-inner {
/*margin-top: 5px;*/
margin-top: 5px;
display: flex;
align-items: center;
background: whitesmoke;

View File

@ -109,24 +109,10 @@ Vue.component('module-editor-tab-product', {
if (!this.module.tabs[0].products.length) return;
this.loading = true;
http://beike.test/panel/products/names?product_ids=1,2,3
$http.get('panel/products/names', {product_ids: this.module.tabs[this.editableTabsValue].products}, {hload: true}).then((res) => {
console.log(res)
$http.get('products/names?product_ids='+this.module.tabs[this.editableTabsValue].products.join(','), {hload: true}).then((res) => {
this.loading = false;
that.productData = res.data;
})
// $.ajax({
// url: 'index.php?route=extension/theme/default/page/module/product/productsByIds',
// data: {product_ids: this.module.tabs[this.editableTabsValue].products},
// type: 'post',
// dataType: 'json',
// success: function (json) {
// if (json) {
// that.loading = false;
// that.productData = json;
// }
// }
// });
},
querySearch(keyword, cb) {