Skip to content

Commit 74c3a2d

Browse files
committed
mp:移除 less 使用 scss 适配
1 parent 0885f3f commit 74c3a2d

File tree

3 files changed

+9520
-9918
lines changed

3 files changed

+9520
-9918
lines changed

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@
9090
"eslint-plugin-prettier": "^3.1.0",
9191
"eslint-plugin-vue": "9.0.0",
9292
"fs-extra": "^8.1.0",
93-
"less": "^4.1.3",
94-
"less-loader": "^7.3.0",
9593
"lint-staged": "12.5.0",
9694
"runjs": "4.4.2",
9795
"sass": "1.32.13",

src/views/mp/menu/index.vue

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ SOFTWARE.
4040
<!--左边配置菜单-->
4141
<div class="left">
4242
<div class="weixin-hd">
43-
<div class="weixin-title">{{menuName}}</div>
43+
<div class="weixin-title">{{ name }}</div>
4444
</div>
4545
<div class="weixin-menu menu_main clearfix">
4646
<div class="menu_bottom" v-for="(item, i) of menuList" :key="i" >
@@ -75,18 +75,19 @@ SOFTWARE.
7575
</div>
7676
<div>
7777
<span>菜单名称:</span>
78-
<el-input class="input_width" v-model="tempObj.name" placeholder="请输入菜单名称" :maxlength=nameMaxLength clearable></el-input>
78+
<el-input class="input_width" v-model="tempObj.name" placeholder="请输入菜单名称" :maxlength="nameMaxLength"
79+
clearable />
7980
</div>
8081
<div v-if="showConfigureContent">
8182
<div class="menu_content">
8283
<span>菜单内容:</span>
8384
<el-select v-model="tempObj.type" clearable placeholder="请选择" class="menu_option">
84-
<el-option v-for="item in menuOptions" :label="item.label" :value="item.value" :key="item.value"></el-option>
85+
<el-option v-for="item in menuOptions" :label="item.label" :value="item.value" :key="item.value" />
8586
</el-select>
8687
</div>
8788
<div class="configur_content" v-if="tempObj.type === 'view'">
8889
<span>跳转链接:</span>
89-
<el-input class="input_width" v-model="tempObj.url" placeholder="请输入链接" clearable></el-input>
90+
<el-input class="input_width" v-model="tempObj.url" placeholder="请输入链接" clearable />
9091
</div>
9192
<div class="configur_content" v-if="tempObj.type === 'miniprogram'">
9293
<div class="applet">
@@ -103,7 +104,7 @@ SOFTWARE.
103104
</div>
104105
<p class="blue">tips:需要和公众号进行关联才可以把小程序绑定带微信菜单上哟!</p>
105106
</div>
106-
<div class="configur_content" v-if="tempObj.type == 'article_view_limited'">
107+
<div class="configur_content" v-if="tempObj.type === 'article_view_limited'">
107108
<el-row>
108109
<div class="select-item" v-if="tempObj && tempObj.content && tempObj.content.articles">
109110
<WxNews :objData="tempObj.content.articles"></WxNews>
@@ -123,7 +124,7 @@ SOFTWARE.
123124
</el-dialog>
124125
</el-row>
125126
</div>
126-
<div class="configur_content" v-if="tempObj.type == 'click' || tempObj.type == 'scancode_waitmsg'">
127+
<div class="configur_content" v-if="tempObj.type === 'click' || tempObj.type === 'scancode_waitmsg'">
127128
<WxReplySelect :objData="tempObj" v-if="hackResetWxReplySelect"></WxReplySelect>
128129
</div>
129130
</div>
@@ -160,6 +161,7 @@ export default {
160161
showSearch: true,
161162
// 查询参数
162163
accountId: undefined,
164+
name:'', // 公众号名
163165
menuList: {
164166
children: [],
165167
},
@@ -180,28 +182,27 @@ export default {
180182
},
181183
visible2: false, //素材内容 "选择素材"按钮弹框显示隐藏
182184
tableData:[], //素材内容弹框数据,
183-
menuName:'',
184185
menuOptions: [{
185-
value: 'view',
186-
label: '跳转网页'
186+
value: 'view',
187+
label: '跳转网页'
187188
}, {
188-
value: 'miniprogram',
189-
label: '跳转小程序'
189+
value: 'miniprogram',
190+
label: '跳转小程序'
190191
}, {
191-
value: 'click',
192-
label: '点击回复'
192+
value: 'click',
193+
label: '点击回复'
193194
}, {
194-
value: 'article_view_limited',
195-
label: '跳转图文消息'
195+
value: 'article_view_limited',
196+
label: '跳转图文消息'
196197
}, {
197-
value: 'scancode_push',
198-
label: '扫码直接返回结果'
198+
value: 'scancode_push',
199+
label: '扫码直接返回结果'
199200
}, {
200-
value: 'scancode_waitmsg',
201-
label: '扫码回复'
201+
value: 'scancode_waitmsg',
202+
label: '扫码回复'
202203
}, {
203-
value: 'pic_sysphoto',
204-
label: '系统拍照发图'
204+
value: 'pic_sysphoto',
205+
label: '系统拍照发图'
205206
}, {
206207
value: 'pic_photo_or_album',
207208
label: '拍照或者相册'
@@ -234,7 +235,7 @@ export default {
234235
/** 设置账号编号 */
235236
setAccountId(accountId) {
236237
this.accountId = accountId;
237-
// this.uploadData.accountId = accountId;
238+
this.name = this.accounts.find(item => item.id === accountId)?.name;
238239
},
239240
getList() {
240241
this.loading = false;
@@ -296,7 +297,7 @@ export default {
296297
this.isSubMenuActive = index + "" + k; // 二级菜单选中样式
297298
},
298299
// 添加横向一级菜单
299-
addMenu(){
300+
addMenu() {
300301
const menuKeyLength = this.menuList.length;
301302
const addButton = {
302303
name: "菜单名称",
@@ -345,6 +346,7 @@ export default {
345346
this.isSubMenuActive = -1;
346347
}).catch(() => {});
347348
},
349+
// TODO 切换公众号时,清空;或者清空菜单时,也要清空表单;
348350
349351
// ======================== 菜单编辑 ========================
350352
handleSave() {
@@ -405,7 +407,7 @@ export default {
405407
}
406408
</script>
407409
<!--本组件样式-->
408-
<style lang="less" scoped="scoped">
410+
<style lang="scss" scoped="scoped">
409411
/* 公共颜色变量 */
410412
.clearfix{*zoom:1;}
411413
.clearfix::after{content: "";display: table; clear: both;}
@@ -515,29 +517,29 @@ div{
515517
}
516518
}
517519
/*右边菜单内容*/
518-
.right{
520+
.right {
519521
float: left;
520522
width: 63%;
521523
background-color: #e8e7e7;
522524
padding: 20px;
523525
margin-left: 20px;
524526
-webkit-box-sizing: border-box;
525527
box-sizing: border-box;
526-
.configure_page{
527-
.delete_btn{
528+
.configure_page {
529+
.delete_btn {
528530
text-align: right;
529531
margin-bottom: 15px;
530532
}
531-
.menu_content{
533+
.menu_content {
532534
margin-top: 20px;
533535
}
534-
.configur_content{
536+
.configur_content {
535537
margin-top: 20px;
536538
background-color: #fff;
537539
padding: 20px 10px;
538540
border-radius: 5px
539541
}
540-
.blue{
542+
.blue {
541543
color:#29b6f6;
542544
margin-top: 10px;
543545
}
@@ -547,6 +549,9 @@ div{
547549
width: 20%;
548550
}
549551
}
552+
.input_width {
553+
width: 40%;
554+
}
550555
.material{
551556
.input_width{
552557
width: 30%;
@@ -557,17 +562,12 @@ div{
557562
}
558563
}
559564
}
565+
.el-input {
566+
width: 70%;
567+
margin-right: 2%;
568+
}
560569
}
561570
</style>
562-
<!--修改UI框架样式-->
563-
<!--<style lang="less" scoped>-->
564-
<!-- .public-account-management{-->
565-
<!-- .el-input{-->
566-
<!-- width: 70%;-->
567-
<!-- margin-right: 2%;-->
568-
<!-- }-->
569-
<!-- }-->
570-
<!--</style>-->
571571
<!--素材样式-->
572572
<style lang="scss" scoped>
573573
.pagination {

0 commit comments

Comments
 (0)