index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  1. <template>
  2. <doc-alert title="公众号菜单" url="https://doc.iocoder.cn/mp/menu/" />
  3. <!-- 搜索工作栏 -->
  4. <ContentWrap>
  5. <el-form
  6. class="-mb-15px"
  7. ref="queryFormRef"
  8. :inline="true"
  9. label-width="68px"
  10. >
  11. <el-form-item label="公众号" prop="accountId">
  12. <el-select v-model="accountId" placeholder="请选择公众号" class="!w-240px">
  13. <el-option
  14. v-for="item in accountList"
  15. :key="item.id"
  16. :label="item.name"
  17. :value="item.id"
  18. />
  19. </el-select>
  20. </el-form-item>
  21. <el-form-item>
  22. <el-button @click="handleQuery"><Icon icon="ep:search" />搜索</el-button>
  23. <el-button @click="resetQuery"><Icon icon="ep:refresh" />重置</el-button>
  24. </el-form-item>
  25. </el-form>
  26. </ContentWrap>
  27. <!-- 列表 -->
  28. <ContentWrap>
  29. <div class="public-account-management clearfix" v-loading="loading">
  30. <!--左边配置菜单-->
  31. <div class="left">
  32. <div class="weixin-hd">
  33. <div class="weixin-title">{{ name }}</div>
  34. </div>
  35. <div class="weixin-menu menu_main clearfix">
  36. <div class="menu_bottom" v-for="(item, i) of menuList" :key="i">
  37. <!-- 一级菜单 -->
  38. <div @click="menuClick(i, item)" class="menu_item" :class="{ active: isActive === i }"
  39. ><Icon icon="ep:fold" color="black" />{{ item.name }}
  40. </div>
  41. <!-- 以下为二级菜单-->
  42. <div class="submenu" v-if="isSubMenuFlag === i">
  43. <div class="subtitle menu_bottom" v-for="(subItem, k) in item.children" :key="k">
  44. <div
  45. class="menu_subItem"
  46. v-if="item.children"
  47. :class="{ active: isSubMenuActive === i + '' + k }"
  48. @click="subMenuClick(subItem, i, k)"
  49. >
  50. {{ subItem.name }}
  51. </div>
  52. </div>
  53. <!-- 二级菜单加号, 当长度 小于 5 才显示二级菜单的加号 -->
  54. <div
  55. class="menu_bottom menu_addicon"
  56. v-if="!item.children || item.children.length < 5"
  57. @click="addSubMenu(i, item)"
  58. >
  59. <Icon icon="ep:plus" />
  60. </div>
  61. </div>
  62. </div>
  63. <!-- 一级菜单加号 -->
  64. <div class="menu_bottom menu_addicon" v-if="menuList.length < 3" @click="addMenu">
  65. <Icon icon="ep:plus" />
  66. </div>
  67. </div>
  68. <div class="save_div">
  69. <el-button
  70. class="save_btn"
  71. type="success"
  72. @click="handleSave"
  73. v-hasPermi="['mp:menu:save']"
  74. >保存并发布菜单</el-button
  75. >
  76. <el-button
  77. class="save_btn"
  78. type="danger"
  79. @click="handleDelete"
  80. v-hasPermi="['mp:menu:delete']"
  81. >清空菜单</el-button
  82. >
  83. </div>
  84. </div>
  85. <!--右边配置-->
  86. <div v-if="showRightFlag" class="right">
  87. <div class="configure_page">
  88. <div class="delete_btn">
  89. <el-button size="small" type="danger" @click="handleDeleteMenu(tempObj)">
  90. 删除当前菜单<Icon icon="ep:delete" />
  91. </el-button>
  92. </div>
  93. <div>
  94. <span>菜单名称:</span>
  95. <el-input
  96. class="input_width"
  97. v-model="tempObj.name"
  98. placeholder="请输入菜单名称"
  99. :maxlength="nameMaxLength"
  100. clearable
  101. />
  102. </div>
  103. <div v-if="showConfigureContent">
  104. <div class="menu_content">
  105. <span>菜单标识:</span>
  106. <el-input
  107. class="input_width"
  108. v-model="tempObj.menuKey"
  109. placeholder="请输入菜单 KEY"
  110. clearable
  111. />
  112. </div>
  113. <div class="menu_content">
  114. <span>菜单内容:</span>
  115. <el-select v-model="tempObj.type" clearable placeholder="请选择" class="menu_option">
  116. <el-option
  117. v-for="item in menuOptions"
  118. :label="item.label"
  119. :value="item.value"
  120. :key="item.value"
  121. />
  122. </el-select>
  123. </div>
  124. <div class="configur_content" v-if="tempObj.type === 'view'">
  125. <span>跳转链接:</span>
  126. <el-input
  127. class="input_width"
  128. v-model="tempObj.url"
  129. placeholder="请输入链接"
  130. clearable
  131. />
  132. </div>
  133. <div class="configur_content" v-if="tempObj.type === 'miniprogram'">
  134. <div class="applet">
  135. <span>小程序的 appid :</span>
  136. <el-input
  137. class="input_width"
  138. v-model="tempObj.miniProgramAppId"
  139. placeholder="请输入小程序的appid"
  140. clearable
  141. />
  142. </div>
  143. <div class="applet">
  144. <span>小程序的页面路径:</span>
  145. <el-input
  146. class="input_width"
  147. v-model="tempObj.miniProgramPagePath"
  148. placeholder="请输入小程序的页面路径,如:pages/index"
  149. clearable
  150. />
  151. </div>
  152. <div class="applet">
  153. <span>小程序的备用网页:</span>
  154. <el-input
  155. class="input_width"
  156. v-model="tempObj.url"
  157. placeholder="不支持小程序的老版本客户端将打开本网页"
  158. clearable
  159. />
  160. </div>
  161. <p class="blue">tips:需要和公众号进行关联才可以把小程序绑定带微信菜单上哟!</p>
  162. </div>
  163. <div class="configur_content" v-if="tempObj.type === 'article_view_limited'">
  164. <el-row>
  165. <div class="select-item" v-if="tempObj && tempObj.replyArticles">
  166. <WxNews :articles="tempObj.replyArticles" />
  167. <el-row class="ope-row" justify="center" align="middle">
  168. <el-button type="danger" circle @click="deleteMaterial">
  169. <icon icon="ep:delete" />
  170. </el-button>
  171. </el-row>
  172. </div>
  173. <div v-else>
  174. <el-row justify="center">
  175. <el-col :span="24" style="text-align: center">
  176. <el-button type="success" @click="openMaterial">
  177. 素材库选择<Icon icon="ep:circle-check" />
  178. </el-button>
  179. </el-col>
  180. </el-row>
  181. </div>
  182. <el-dialog title="选择图文" v-model="dialogNewsVisible" width="90%">
  183. <WxMaterialSelect
  184. :objData="{ type: 'news', accountId: accountId }"
  185. @select-material="selectMaterial"
  186. />
  187. </el-dialog>
  188. </el-row>
  189. </div>
  190. <div
  191. class="configur_content"
  192. v-if="tempObj.type === 'click' || tempObj.type === 'scancode_waitmsg'"
  193. >
  194. <WxReplySelect :objData="tempObj.reply" v-if="hackResetWxReplySelect" />
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. <!-- 一进页面就显示的默认页面,当点击左边按钮的时候,就不显示了-->
  200. <div v-else class="right">
  201. <p>请选择菜单配置</p>
  202. </div>
  203. </div>
  204. </ContentWrap>
  205. </template>
  206. <script setup name="MpMenu">
  207. import { handleTree } from '@/utils/tree'
  208. import WxReplySelect from '@/views/mp/components/wx-reply/main.vue'
  209. import WxNews from '@/views/mp/components/wx-news/main.vue'
  210. import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue'
  211. import { deleteMenu, getMenuList, saveMenu } from '@/api/mp/menu'
  212. import * as MpAccountApi from '@/api/mp/account'
  213. import menuOptions from './menuOptions'
  214. const message = useMessage() // 消息
  215. // ======================== 列表查询 ========================
  216. const loading = ref(true) // 遮罩层
  217. const accountId = ref(undefined) // 公众号Id
  218. const name = ref('') // 公众号名
  219. const menuList = ref({ children: [] })
  220. const accountList = ref([]) // 公众号账号列表
  221. // ======================== 菜单操作 ========================
  222. const isActive = ref(-1) // 一级菜单点中样式
  223. const isSubMenuActive = ref(-1) // 一级菜单点中样式
  224. const isSubMenuFlag = ref(-1) // 二级菜单显示标志
  225. // ======================== 菜单编辑 ========================
  226. const showRightFlag = ref(false) // 右边配置显示默认详情还是配置详情
  227. const nameMaxLength = ref(0) // 菜单名称最大长度;1 级是 4 字符;2 级是 7 字符;
  228. const showConfigureContent = ref(true) // 是否展示配置内容;如果有子菜单,就不显示配置内容
  229. const hackResetWxReplySelect = ref(false) // 重置 WxReplySelect 组件
  230. const tempObj = ref({}) // 右边临时变量,作为中间值牵引关系
  231. const tempSelfObj = ref({
  232. // 一些临时值放在这里进行判断,如果放在 tempObj,由于引用关系,menu 也会多了多余的参数
  233. })
  234. const dialogNewsVisible = ref(false) // 跳转图文时的素材选择弹窗
  235. onMounted(async () => {
  236. accountList.value = await MpAccountApi.getSimpleAccountList()
  237. // 选中第一个
  238. if (accountList.value.length > 0) {
  239. // @ts-ignore
  240. setAccountId(accountList.value[0].id)
  241. }
  242. await getList()
  243. })
  244. // ======================== 列表查询 ========================
  245. /** 设置账号编号 */
  246. const setAccountId = (id) => {
  247. accountId.value = id
  248. name.value = accountList.value.find((item) => item.id === accountId.value)?.name
  249. }
  250. const getList = async () => {
  251. loading.value = false
  252. getMenuList(accountId.value)
  253. .then((response) => {
  254. const menuData = convertMenuList(response)
  255. menuList.value = handleTree(menuData, 'id')
  256. })
  257. .finally(() => {
  258. loading.value = false
  259. })
  260. }
  261. /** 搜索按钮操作 */
  262. const handleQuery = () => {
  263. resetForm()
  264. // 默认选中第一个
  265. if (accountId.value) {
  266. setAccountId(accountId.value)
  267. }
  268. getList()
  269. }
  270. /** 重置按钮操作 */
  271. const resetQuery = () => {
  272. resetForm()
  273. // 默认选中第一个
  274. if (accountList.value.length > 0) {
  275. setAccountId(accountList.value[0].id)
  276. }
  277. handleQuery()
  278. }
  279. // 将后端返回的 menuList,转换成前端的 menuList
  280. const convertMenuList = (list) => {
  281. if (!list) return []
  282. const menuList = []
  283. list.forEach((item) => {
  284. const menu = {
  285. ...item
  286. }
  287. if (item.type === 'click' || item.type === 'scancode_waitmsg') {
  288. delete menu.replyMessageType
  289. delete menu.replyContent
  290. delete menu.replyMediaId
  291. delete menu.replyMediaUrl
  292. delete menu.replyDescription
  293. delete menu.replyArticles
  294. menu.reply = {
  295. type: item.replyMessageType,
  296. accountId: item.accountId,
  297. content: item.replyContent,
  298. mediaId: item.replyMediaId,
  299. url: item.replyMediaUrl,
  300. title: item.replyTitle,
  301. description: item.replyDescription,
  302. thumbMediaId: item.replyThumbMediaId,
  303. thumbMediaUrl: item.replyThumbMediaUrl,
  304. articles: item.replyArticles,
  305. musicUrl: item.replyMusicUrl,
  306. hqMusicUrl: item.replyHqMusicUrl
  307. }
  308. }
  309. menuList.push(menu)
  310. })
  311. return menuList
  312. }
  313. // 重置表单,清空表单数据
  314. const resetForm = () => {
  315. // 菜单操作
  316. isActive.value = -1
  317. isSubMenuActive.value = -1
  318. isSubMenuFlag.value = -1
  319. // 菜单编辑
  320. showRightFlag.value = false
  321. nameMaxLength.value = 0
  322. showConfigureContent.value = 0
  323. hackResetWxReplySelect.value = false
  324. tempObj.value = {}
  325. tempSelfObj.value = {}
  326. dialogNewsVisible.value = false
  327. }
  328. // ======================== 菜单操作 ========================
  329. // 一级菜单点击事件
  330. const menuClick = (i, item) => {
  331. // 右侧的表单相关
  332. resetEditor()
  333. showRightFlag.value = true // 右边菜单
  334. tempObj.value = item // 这个如果放在顶部,flag 会没有。因为重新赋值了。
  335. tempSelfObj.value.grand = '1' // 表示一级菜单
  336. tempSelfObj.value.index = i // 表示一级菜单索引
  337. nameMaxLength.value = 4
  338. showConfigureContent.value = !(item.children && item.children.length > 0) // 有子菜单,就不显示配置内容
  339. // 左侧的选中
  340. isActive.value = i // 一级菜单选中样式
  341. isSubMenuFlag.value = i // 二级菜单显示标志
  342. isSubMenuActive.value = -1 // 二级菜单去除选中样式
  343. }
  344. // 二级菜单点击事件
  345. const subMenuClick = (subItem, index, k) => {
  346. // 右侧的表单相关
  347. resetEditor()
  348. showRightFlag.value = true // 右边菜单
  349. console.log(subItem)
  350. tempObj.value = subItem // 将点击的数据放到临时变量,对象有引用作用
  351. tempSelfObj.value.grand = '2' // 表示二级菜单
  352. tempSelfObj.value.index = index // 表示一级菜单索引
  353. tempSelfObj.value.secondIndex = k // 表示二级菜单索引
  354. nameMaxLength.value = 7
  355. showConfigureContent.value = true
  356. // 左侧的选中
  357. isActive.value = -1 // 一级菜单去除样式
  358. isSubMenuActive.value = index + '' + k // 二级菜单选中样式
  359. }
  360. // 添加横向一级菜单
  361. const addMenu = () => {
  362. const menuKeyLength = menuList.value.length
  363. const addButton = {
  364. name: '菜单名称',
  365. children: [],
  366. reply: {
  367. // 用于存储回复内容
  368. type: 'text',
  369. accountId: accountId.value // 保证组件里,可以使用到对应的公众号
  370. }
  371. }
  372. menuList.value[menuKeyLength] = addButton
  373. menuClick(menuKeyLength.value - 1, addButton)
  374. }
  375. // 添加横向二级菜单;item 表示要操作的父菜单
  376. const addSubMenu = (i, item) => {
  377. // 清空父菜单的属性,因为它只需要 name 属性即可
  378. if (!item.children || item.children.length <= 0) {
  379. item.children = []
  380. delete item['type']
  381. delete item['menuKey']
  382. delete item['miniProgramAppId']
  383. delete item['miniProgramPagePath']
  384. delete item['url']
  385. delete item['reply']
  386. delete item['articleId']
  387. delete item['replyArticles']
  388. // 关闭配置面板
  389. showConfigureContent.value = false
  390. }
  391. let subMenuKeyLength = item.children.length // 获取二级菜单key长度
  392. let addButton = {
  393. name: '子菜单名称',
  394. reply: {
  395. // 用于存储回复内容
  396. type: 'text',
  397. accountId: accountId.value // 保证组件里,可以使用到对应的公众号
  398. }
  399. }
  400. item.children[subMenuKeyLength] = addButton
  401. subMenuClick(item.children[subMenuKeyLength], i, subMenuKeyLength)
  402. }
  403. // 删除当前菜单
  404. const handleDeleteMenu = async () => {
  405. try {
  406. await message.confirm('确定要删除吗?')
  407. if (tempSelfObj.value.grand === '1') {
  408. // 一级菜单的删除方法
  409. menuList.value.splice(tempSelfObj.value.index, 1)
  410. } else if (tempSelfObj.value.grand === '2') {
  411. // 二级菜单的删除方法
  412. menuList.value[tempSelfObj.value.index].children.splice(tempSelfObj.value.secondIndex, 1)
  413. }
  414. // 提示
  415. message.notifySuccess('删除成功')
  416. // 处理菜单的选中
  417. tempObj.value = {}
  418. showRightFlag.value = false
  419. isActive.value = -1
  420. isSubMenuActive.value = -1
  421. } catch {}
  422. }
  423. // ======================== 菜单编辑 ========================
  424. const handleSave = async () => {
  425. try {
  426. await message.confirm('确定要删除吗?')
  427. loading.value = true
  428. await saveMenu(accountId.value, convertMenuFormList())
  429. getList()
  430. message.notifySuccess('发布成功')
  431. } finally {
  432. loading.value = false
  433. }
  434. }
  435. // 表单 Editor 重置
  436. const resetEditor = () => {
  437. hackResetWxReplySelect.value = false // 销毁组件
  438. nextTick(() => {
  439. console.log('nextTick')
  440. hackResetWxReplySelect.value = true // 重建组件
  441. })
  442. }
  443. const handleDelete = async () => {
  444. try {
  445. await message.confirm('确定要删除吗?')
  446. loading.value = true
  447. await deleteMenu(accountId.value)
  448. handleQuery()
  449. message.notifySuccess('清空成功')
  450. } finally {
  451. loading.value = false
  452. }
  453. }
  454. // 将前端的 menuList,转换成后端接收的 menuList
  455. const convertMenuFormList = () => {
  456. const result = []
  457. menuList.value.forEach((item) => {
  458. let menu = convertMenuForm(item)
  459. result.push(menu)
  460. // 处理子菜单
  461. if (!item.children || item.children.length <= 0) {
  462. return
  463. }
  464. menu.children = []
  465. item.children.forEach((subItem) => {
  466. menu.children.push(convertMenuForm(subItem))
  467. })
  468. })
  469. return result
  470. }
  471. // 将前端的 menu,转换成后端接收的 menu
  472. const convertMenuForm = (menu) => {
  473. let result = {
  474. ...menu,
  475. children: undefined, // 不处理子节点
  476. reply: undefined // 稍后复制
  477. }
  478. if (menu.type === 'click' || menu.type === 'scancode_waitmsg') {
  479. result.replyMessageType = menu.reply.type
  480. result.replyContent = menu.reply.content
  481. result.replyMediaId = menu.reply.mediaId
  482. result.replyMediaUrl = menu.reply.url
  483. result.replyTitle = menu.reply.title
  484. result.replyDescription = menu.reply.description
  485. result.replyThumbMediaId = menu.reply.thumbMediaId
  486. result.replyThumbMediaUrl = menu.reply.thumbMediaUrl
  487. result.replyArticles = menu.reply.articles
  488. result.replyMusicUrl = menu.reply.musicUrl
  489. result.replyHqMusicUrl = menu.reply.hqMusicUrl
  490. }
  491. return result
  492. }
  493. // ======================== 菜单编辑(素材选择) ========================
  494. const openMaterial = () => {
  495. dialogNewsVisible.value = true
  496. }
  497. const selectMaterial = (item) => {
  498. const articleId = item.articleId
  499. const articles = item.content.newsItem
  500. // 提示,针对多图文
  501. if (articles.length > 1) {
  502. message.alertWarning('您选择的是多图文,将默认跳转第一篇')
  503. }
  504. dialogNewsVisible.value = false
  505. // 设置菜单的回复
  506. tempObj.value.articleId = articleId
  507. tempObj.value.replyArticles = []
  508. articles.forEach((article) => {
  509. tempObj.value.replyArticles.push({
  510. title: article.title,
  511. description: article.digest,
  512. picUrl: article.picUrl,
  513. url: article.url
  514. })
  515. })
  516. }
  517. const deleteMaterial = () => {
  518. delete tempObj.value['articleId']
  519. delete tempObj.value['replyArticles']
  520. }
  521. </script>
  522. <!--本组件样式-->
  523. <style lang="scss" scoped="scoped">
  524. /* 公共颜色变量 */
  525. .clearfix {
  526. *zoom: 1;
  527. }
  528. .clearfix::after {
  529. content: '';
  530. display: table;
  531. clear: both;
  532. }
  533. div {
  534. text-align: left;
  535. }
  536. .weixin-hd {
  537. color: #fff;
  538. text-align: center;
  539. position: relative;
  540. bottom: 426px;
  541. left: 0px;
  542. width: 300px;
  543. height: 64px;
  544. background: transparent url('./assets/menu_head.png') no-repeat 0 0;
  545. background-position: 0 0;
  546. background-size: 100%;
  547. }
  548. .weixin-title {
  549. color: #fff;
  550. font-size: 14px;
  551. width: 100%;
  552. text-align: center;
  553. position: absolute;
  554. top: 33px;
  555. left: 0px;
  556. }
  557. .weixin-menu {
  558. background: transparent url('./assets/menu_foot.png') no-repeat 0 0;
  559. padding-left: 43px;
  560. font-size: 12px;
  561. }
  562. .menu_option {
  563. width: 40% !important;
  564. }
  565. .public-account-management {
  566. min-width: 1200px;
  567. width: 1200px;
  568. margin: 0 auto;
  569. .left {
  570. float: left;
  571. display: inline-block;
  572. width: 350px;
  573. height: 715px;
  574. background: url('./assets/iphone_backImg.png') no-repeat;
  575. background-size: 100% auto;
  576. padding: 518px 25px 88px;
  577. position: relative;
  578. box-sizing: border-box;
  579. /*第一级菜单*/
  580. .menu_main {
  581. .menu_bottom {
  582. position: relative;
  583. float: left;
  584. display: inline-block;
  585. box-sizing: border-box;
  586. width: 85.5px;
  587. text-align: center;
  588. border: 1px solid #ebedee;
  589. background-color: #fff;
  590. cursor: pointer;
  591. &.menu_addicon {
  592. height: 46px;
  593. line-height: 46px;
  594. }
  595. .menu_item {
  596. height: 44px;
  597. line-height: 44px;
  598. // text-align: center;
  599. box-sizing: border-box;
  600. width: 100%;
  601. display: flex;
  602. align-items: center;
  603. justify-content: center;
  604. &.active {
  605. border: 1px solid #2bb673;
  606. }
  607. }
  608. .menu_subItem {
  609. height: 44px;
  610. line-height: 44px;
  611. text-align: center;
  612. box-sizing: border-box;
  613. &.active {
  614. border: 1px solid #2bb673;
  615. }
  616. }
  617. }
  618. i {
  619. color: #2bb673;
  620. }
  621. /*第二级菜单*/
  622. .submenu {
  623. position: absolute;
  624. width: 85.5px;
  625. bottom: 45px;
  626. .subtitle {
  627. background-color: #fff;
  628. box-sizing: border-box;
  629. }
  630. }
  631. }
  632. .save_div {
  633. margin-top: 15px;
  634. text-align: center;
  635. .save_btn {
  636. bottom: 20px;
  637. left: 100px;
  638. }
  639. }
  640. }
  641. /*右边菜单内容*/
  642. .right {
  643. float: left;
  644. width: 63%;
  645. background-color: #e8e7e7;
  646. padding: 20px;
  647. margin-left: 20px;
  648. -webkit-box-sizing: border-box;
  649. box-sizing: border-box;
  650. .configure_page {
  651. .delete_btn {
  652. text-align: right;
  653. margin-bottom: 15px;
  654. }
  655. .menu_content {
  656. margin-top: 20px;
  657. }
  658. .configur_content {
  659. margin-top: 20px;
  660. background-color: #fff;
  661. padding: 20px 10px;
  662. border-radius: 5px;
  663. }
  664. .blue {
  665. color: #29b6f6;
  666. margin-top: 10px;
  667. }
  668. .applet {
  669. margin-bottom: 20px;
  670. span {
  671. width: 20%;
  672. }
  673. }
  674. .input_width {
  675. width: 40%;
  676. }
  677. .material {
  678. .input_width {
  679. width: 30%;
  680. }
  681. .el-textarea {
  682. width: 80%;
  683. }
  684. }
  685. }
  686. }
  687. .el-input {
  688. width: 70%;
  689. margin-right: 2%;
  690. }
  691. }
  692. </style>
  693. <!--素材样式-->
  694. <style lang="scss" scoped>
  695. .pagination {
  696. text-align: right;
  697. margin-right: 25px;
  698. }
  699. .select-item {
  700. width: 280px;
  701. padding: 10px;
  702. margin: 0 auto 10px auto;
  703. border: 1px solid #eaeaea;
  704. }
  705. .select-item2 {
  706. padding: 10px;
  707. margin: 0 auto 10px auto;
  708. border: 1px solid #eaeaea;
  709. }
  710. .ope-row {
  711. padding-top: 10px;
  712. text-align: center;
  713. }
  714. .item-name {
  715. font-size: 12px;
  716. overflow: hidden;
  717. text-overflow: ellipsis;
  718. white-space: nowrap;
  719. text-align: center;
  720. }
  721. </style>