index.vue 22 KB

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