ba-tree-picker.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  1. <!-- 树形层级选择器-->
  2. <!-- 1、支持单选、多选 -->
  3. <template>
  4. <view>
  5. <view class="tree-cover" :class="{'show':showDialog}" @tap="_cancel"></view>
  6. <view class="tree-dialog" :class="{'show':showDialog}">
  7. <view class="tree-bar">
  8. <view class="tree-bar-left">
  9. <view class="tree-bar-cancel" :style="{'color':cancelColor}" hover-class="hover-c" @tap="_cancel">取消
  10. </view>
  11. </view>
  12. <view class="tree-bar-title" :style="{'color':titleColor}">{{title}}</view>
  13. <view class="tree-bar-right">
  14. <view v-if="showClear" class="tree-bar-clear" :style="{'color':cancelColor}" hover-class="hover-c" @tap="_clear">
  15. 清除
  16. </view>
  17. <view class="tree-bar-confirm" :style="{'color':confirmColor}" hover-class="hover-c" @tap="_confirm">
  18. {{multiple?'确定':''}}
  19. </view>
  20. </view>
  21. </view>
  22. <view class="tree-view">
  23. <scroll-view class="tree-list" :scroll-y="true">
  24. <block v-for="(item, index) in treeList" :key="index">
  25. <view class="tree-item" :style="[{
  26. paddingLeft: item.level*30 + 'rpx'
  27. }]" :class="{
  28. itemBorder: border === true,
  29. show: item.isShow,
  30. hidden: !item.isShow,
  31. }">
  32. <view class="item-label">
  33. <view class="item-icon uni-inline-item" @tap.stop="_onItemSwitch(item, index)">
  34. <view v-if="!item.isLastLevel&&item.isShowChild" class="switch-on"
  35. :style="{'border-left-color':switchColor}">
  36. </view>
  37. <view v-else-if="!item.isLastLevel&&!item.isShowChild" class="switch-off"
  38. :style="{'border-top-color':switchColor}">
  39. </view>
  40. <view v-else class="item-last-dot" :style="{'border-top-color':switchColor}">
  41. </view>
  42. </view>
  43. <view class="uni-flex-item uni-inline-item" @tap.stop="_onItemSelect(item, index)">
  44. <view class="item-name" :class="{ 'dimission' : item.status === '1' }"> {{item.name+(item.childCount?"("+item.childCount+")":'')}}
  45. </view>
  46. <view class="item-check" v-if="selectParent?true:item.isLastLevel">
  47. <view class="item-check-yes" v-if="item.checkStatus==1"
  48. :class="{'radio':!multiple}" :style="{'border-color':confirmColor}">
  49. <view class="item-check-yes-part"
  50. :style="{'background-color':confirmColor}">
  51. </view>
  52. </view>
  53. <view class="item-check-yes" v-else-if="item.checkStatus==2"
  54. :class="{'radio':!multiple}" :style="{'border-color':confirmColor}">
  55. <view class="item-check-yes-all" :style="{'background-color':confirmColor}">
  56. </view>
  57. </view>
  58. <view class="item-check-no" v-else :class="{'radio':!multiple}"
  59. :style="{'border-color':confirmColor}"></view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </block>
  65. </scroll-view>
  66. </view>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. emits: ['select-change', 'clear'],
  73. name: "ba-tree-picker",
  74. props: {
  75. personNames : {
  76. type: [String, Array],
  77. default: undefined
  78. },
  79. valueKey: {
  80. type: String,
  81. default: 'id'
  82. },
  83. textKey: {
  84. type: String,
  85. default: 'name'
  86. },
  87. childrenKey: {
  88. type: String,
  89. default: 'children'
  90. },
  91. localdata: {
  92. type: Array,
  93. default: function() {
  94. return []
  95. }
  96. },
  97. localTreeList: { //在已经格式化好的数据
  98. type: Array,
  99. default: function() {
  100. return []
  101. }
  102. },
  103. selectedValues: {
  104. type: [String, Array],
  105. default: undefined
  106. },
  107. title: {
  108. type: String,
  109. default: ''
  110. },
  111. multiple: { // 是否可以多选
  112. type: Boolean,
  113. default: true
  114. },
  115. selectParent: { //是否可以选父级
  116. type: Boolean,
  117. default: true
  118. },
  119. confirmColor: { // 确定按钮颜色
  120. type: String,
  121. default: '' // #0055ff
  122. },
  123. cancelColor: { // 取消按钮颜色
  124. type: String,
  125. default: '' // #757575
  126. },
  127. titleColor: { // 标题颜色
  128. type: String,
  129. default: '' //
  130. },
  131. switchColor: { // 节点切换图标颜色
  132. type: String,
  133. default: '' // #666
  134. },
  135. border: { // 是否有分割线
  136. type: Boolean,
  137. default: false
  138. },
  139. showClear: { // 是否显示清除按钮
  140. type: Boolean,
  141. default: true
  142. },
  143. },
  144. data() {
  145. return {
  146. showDialog: false,
  147. treeList: []
  148. }
  149. },
  150. computed: {
  151. names : {
  152. get(){
  153. if(Array.isArray(this.personNames)){
  154. return this.personNames
  155. }else{
  156. return this.personNames ? this.personNames.split(',') : []
  157. }
  158. }
  159. },
  160. selectedData :{
  161. get(){
  162. if(Array.isArray(this.selectedValues)){
  163. return this.selectedValues
  164. }else{
  165. return this.selectedValues ? this.selectedValues.split(',') : []
  166. }
  167. }
  168. },
  169. },
  170. methods: {
  171. _show() {
  172. this.showDialog = true
  173. },
  174. _hide() {
  175. this.showDialog = false
  176. },
  177. _cancel() {
  178. this._hide()
  179. this.$emit("cancel", '');
  180. },
  181. _clear() {
  182. // 清除所有选中状态
  183. this.treeList.forEach((item, index) => {
  184. this.treeList[index].checkStatus = 0;
  185. this.treeList[index].childCheckCount = 0;
  186. this.treeList[index].childCheckPCount = 0;
  187. });
  188. // 关闭对话框
  189. this._hide();
  190. // 触发选择变更事件,返回空值
  191. this.$emit("select-change", [], []);
  192. // 触发清除事件
  193. this.$emit("clear", '');
  194. },
  195. _confirm() { //多选
  196. let selectedList = []; //如果子集全部选中,只返回父级 id
  197. let selectedNames = [];
  198. let currentLevel = -1;
  199. this.treeList.forEach((item, index) => {
  200. if (currentLevel >= 0 && item.level > currentLevel) {
  201. } else {
  202. if (item.checkStatus === 2) {
  203. if(item.Pchildren !== void 0){
  204. const selectChild = [];
  205. this.getChildIdsByParent(selectChild,item);
  206. selectedList = selectedList.concat(selectChild);
  207. // selectChild.forEach(v=>{
  208. // selectedNames = selectedNames ? selectedNames + ' / ' + v.name : v.name;
  209. // })
  210. currentLevel = item.level;
  211. }else{
  212. currentLevel = item.level;
  213. selectedList.push({id : item.id,name : item.name});
  214. // selectedNames = selectedNames ? selectedNames + ' / ' + item.name : item.name;
  215. }
  216. } else {
  217. currentLevel = -1;
  218. }
  219. }
  220. });
  221. const selectedData = this.selectedData.map((v,i)=>{
  222. return {
  223. id : v,
  224. name : this.names[i]
  225. }
  226. })
  227. const filterData = selectedData.filter((v,i)=>{
  228. const data = this.treeList.find(d=>d.id == v.id);
  229. const flag = !!(data && data.checkStatus != 2 || selectedList.some(s=>s.id == v.id));
  230. return !flag;
  231. });
  232. const ids = [];
  233. [...filterData,...selectedList].forEach(v=>{
  234. ids.push(v.id);
  235. selectedNames.push(v.name);
  236. });
  237. //console.log('_confirm', selectedList);
  238. this._hide();
  239. this.$emit("select-change", ids, selectedNames);
  240. },
  241. // 返回父全选中的子
  242. getChildIdsByParent(selectChild,item){
  243. if(item.Pchildren){
  244. item.Pchildren.map(v=>this.getChildIdsByParent(selectChild,v));
  245. return;
  246. }else if(item.children){
  247. item.children.map(v=>this.getChildIdsByParent(selectChild,v));
  248. return;
  249. }else{
  250. selectChild.push({id : item.id,name : item.name});
  251. return;
  252. }
  253. },
  254. //格式化原数据(原数据为tree结构)
  255. _formatTreeData(list = [], level = 0, parentItem, isShowChild = true) {
  256. let nextIndex = 0;
  257. let parentId = -1;
  258. let initCheckStatus = 0;
  259. if (parentItem) {
  260. nextIndex = this.treeList.findIndex(item => item.id === parentItem.id) + 1;
  261. parentId = parentItem.id;
  262. // 当selectParent为false时,父节点状态不影响子节点
  263. initCheckStatus = this.selectParent && parentItem.checkStatus == 2 ? 2 : 0;
  264. }
  265. list.forEach(item => {
  266. let isLastLevel = true;
  267. if (item && item[this.childrenKey]) {
  268. let children = item[this.childrenKey];
  269. if (Array.isArray(children) && children.length > 0) {
  270. isLastLevel = false;
  271. }
  272. }
  273. let itemT = {
  274. id: item[this.valueKey],
  275. name: item[this.textKey],
  276. status: item.status,
  277. level,
  278. isLastLevel,
  279. isShow: isShowChild,
  280. isShowChild: false,
  281. checkStatus: initCheckStatus,
  282. orCheckStatus: 0,
  283. parentId,
  284. children: item[this.childrenKey],
  285. Pchildren: item[this.childrenKey] ? JSON.parse(JSON.stringify(item[this.childrenKey])) : undefined,
  286. childCount: item[this.childrenKey] ? item[this.childrenKey].length : 0,
  287. childCheckCount: 0,
  288. childCheckPCount: 0
  289. };
  290. if (this.selectedData.indexOf(itemT.id) >= 0) {
  291. // 当selectParent为false时,只有叶子节点可以被初始选中
  292. if (this.selectParent || itemT.isLastLevel) {
  293. itemT.checkStatus = 2;
  294. itemT.orCheckStatus = 2;
  295. itemT.childCheckCount = itemT.children ? itemT.children.length : 0;
  296. this._onItemParentSelect(itemT, nextIndex);
  297. }
  298. }
  299. this.treeList.splice(nextIndex, 0, itemT);
  300. nextIndex++;
  301. });
  302. },
  303. // 节点打开、关闭切换
  304. _onItemSwitch(item, index) {
  305. // console.log(item)
  306. //console.log('_itemSwitch')
  307. if (item.isLastLevel === true) {
  308. return;
  309. }
  310. item.isShowChild = !item.isShowChild;
  311. if (item.children) {
  312. this._formatTreeData(item.children, item.level + 1, item);
  313. item.children = undefined;
  314. } else {
  315. this._onItemChildSwitch(item, index);
  316. }
  317. },
  318. _onItemChildSwitch(item, index) {
  319. //console.log('_onItemChildSwitch')
  320. const firstChildIndex = index + 1;
  321. if (firstChildIndex > 0)
  322. for (var i = firstChildIndex; i < this.treeList.length; i++) {
  323. let itemChild = this.treeList[i];
  324. if (itemChild.level > item.level) {
  325. if (item.isShowChild) {
  326. if (itemChild.parentId === item.id) {
  327. itemChild.isShow = item.isShowChild;
  328. if (!itemChild.isShow) {
  329. itemChild.isShowChild = false;
  330. }
  331. }
  332. } else {
  333. itemChild.isShow = item.isShowChild;
  334. itemChild.isShowChild = false;
  335. }
  336. } else {
  337. return;
  338. }
  339. }
  340. },
  341. // 节点选中、取消选中
  342. _onItemSelect(item, index) {
  343. // 当selectParent为false时,只允许选择叶子节点
  344. if (!this.selectParent && !item.isLastLevel) {
  345. return;
  346. }
  347. // if(item.Pchildren !== void 0 && item.Pchildren.length > 0) return;
  348. //console.log('_onItemSelect')
  349. //console.log(item)
  350. if (!this.multiple) { //单选
  351. item.checkStatus = item.checkStatus == 0 ? 2 : 0;
  352. this.treeList.forEach((v, i) => {
  353. if (i != index) {
  354. this.treeList[i].checkStatus = 0
  355. } else {
  356. this.treeList[i].checkStatus = 2
  357. }
  358. })
  359. let selectedList = [];
  360. let selectedNames = [];
  361. selectedList.push(item.id);
  362. // 使用 textKey 取显示名,兼容 label/deptName/name 等不同字段
  363. selectedNames = [item[this.textKey] != null ? item[this.textKey] : item.name];
  364. this._hide()
  365. this.$emit("select-change", selectedList, selectedNames);
  366. return
  367. }
  368. let oldCheckStatus = item.checkStatus;
  369. switch (oldCheckStatus) {
  370. case 0:
  371. item.checkStatus = 2;
  372. item.childCheckCount = item.childCount;
  373. item.childCheckPCount = 0;
  374. break;
  375. case 1:
  376. case 2:
  377. item.checkStatus = 0;
  378. item.childCheckCount = 0;
  379. item.childCheckPCount = 0;
  380. break;
  381. default:
  382. break;
  383. }
  384. //子节点 全部选中
  385. if (this.selectParent) {
  386. this._onItemChildSelect(item, index);
  387. }
  388. //父节点 选中状态变化
  389. this._onItemParentSelect(item, index, oldCheckStatus);
  390. },
  391. _onItemChildSelect(item, index) {
  392. //console.log('_onItemChildSelect')
  393. let allChildCount = 0;
  394. if (item.childCount && item.childCount > 0) {
  395. index++;
  396. while (index < this.treeList.length && this.treeList[index].level > item.level) {
  397. let itemChild = this.treeList[index];
  398. itemChild.checkStatus = item.checkStatus;
  399. if (itemChild.checkStatus == 2) {
  400. itemChild.childCheckCount = itemChild.childCount;
  401. itemChild.childCheckPCount = 0;
  402. } else if (itemChild.checkStatus == 0) {
  403. itemChild.childCheckCount = 0;
  404. itemChild.childCheckPCount = 0;
  405. }
  406. // console.log('>>>>index:', index, 'item:', itemChild.name, ' status:', itemChild
  407. // .checkStatus)
  408. index++;
  409. }
  410. }
  411. },
  412. _onItemParentSelect(item, index, oldCheckStatus) {
  413. //console.log('_onItemParentSelect')
  414. //console.log(item)
  415. const parentIndex = this.treeList.findIndex(itemP => itemP.id == item.parentId);
  416. //console.log('parentIndex:' + parentIndex)
  417. if (parentIndex >= 0) {
  418. let itemParent = this.treeList[parentIndex];
  419. let count = itemParent.childCheckCount;
  420. let oldCheckStatusParent = itemParent.checkStatus;
  421. if (oldCheckStatus == 1) {
  422. itemParent.childCheckPCount -= 1;
  423. } else if (oldCheckStatus == 2) {
  424. itemParent.childCheckCount -= 1;
  425. }
  426. if (item.checkStatus == 1) {
  427. itemParent.childCheckPCount += 1;
  428. } else if (item.checkStatus == 2) {
  429. itemParent.childCheckCount += 1;
  430. }
  431. if (itemParent.childCheckCount <= 0 && itemParent.childCheckPCount <= 0) {
  432. itemParent.childCheckCount = 0;
  433. itemParent.childCheckPCount = 0;
  434. itemParent.checkStatus = 0;
  435. } else if (itemParent.childCheckCount >= itemParent.childCount) {
  436. itemParent.childCheckCount = itemParent.childCount;
  437. itemParent.childCheckPCount = 0;
  438. itemParent.checkStatus = 2;
  439. } else {
  440. itemParent.checkStatus = 1;
  441. }
  442. //console.log('itemParent:', itemParent)
  443. this._onItemParentSelect(itemParent, parentIndex, oldCheckStatusParent);
  444. }
  445. },
  446. // 重置数据
  447. _reTreeList() {
  448. this.treeList.forEach((v, i) => {
  449. this.treeList[i].checkStatus = v.orCheckStatus
  450. })
  451. },
  452. _initTree() {
  453. this.treeList = [];
  454. this._formatTreeData(this.localdata);
  455. }
  456. },
  457. watch: {
  458. localdata() {
  459. this._initTree();
  460. },
  461. localTreeList() {
  462. this.treeList = this.localTreeList;
  463. }
  464. },
  465. mounted() {
  466. this._initTree();
  467. }
  468. }
  469. </script>
  470. <style scoped>
  471. .uni-flex-item{
  472. display: flex;
  473. align-items: center;
  474. }
  475. .tree-cover {
  476. position: fixed;
  477. top: 0rpx;
  478. right: 0rpx;
  479. bottom: 0rpx;
  480. left: 0rpx;
  481. z-index: 100;
  482. background-color: rgba(0, 0, 0, .4);
  483. opacity: 0;
  484. transition: all 0.3s ease;
  485. visibility: hidden;
  486. }
  487. .tree-cover.show {
  488. visibility: visible;
  489. opacity: 1;
  490. }
  491. .tree-dialog {
  492. position: fixed;
  493. top: 0rpx;
  494. right: 0rpx;
  495. bottom: 0rpx;
  496. left: 0rpx;
  497. background-color: #fff;
  498. border-top-left-radius: 10px;
  499. border-top-right-radius: 10px;
  500. /* #ifndef APP-NVUE */
  501. display: flex;
  502. /* #endif */
  503. flex-direction: column;
  504. z-index: 1020;
  505. top: 20%;
  506. transition: all 0.3s ease;
  507. transform: translateY(100%);
  508. }
  509. .tree-dialog.show {
  510. transform: translateY(0);
  511. }
  512. .tree-bar {
  513. /* background-color: #fff; */
  514. height: 90rpx;
  515. padding-left: 25rpx;
  516. padding-right: 25rpx;
  517. display: flex;
  518. justify-content: space-between;
  519. align-items: center;
  520. box-sizing: border-box;
  521. border-bottom-width: 1rpx !important;
  522. border-bottom-style: solid;
  523. border-bottom-color: #f5f5f5;
  524. font-size: 32rpx;
  525. color: #757575;
  526. line-height: 1;
  527. }
  528. .tree-bar-left {
  529. display: flex;
  530. align-items: center;
  531. }
  532. .tree-bar-right {
  533. display: flex;
  534. align-items: center;
  535. gap: 20rpx;
  536. }
  537. .tree-bar-confirm {
  538. color: #0055ff;
  539. padding: 15rpx;
  540. }
  541. .tree-bar-clear {
  542. color: #757575;
  543. padding: 15rpx;
  544. }
  545. .tree-bar-title {
  546. flex: 1;
  547. text-align: center;
  548. }
  549. .tree-bar-cancel {
  550. color: #757575;
  551. padding: 15rpx;
  552. }
  553. .tree-view {
  554. flex: 1;
  555. padding: 20rpx;
  556. /* #ifndef APP-NVUE */
  557. display: flex;
  558. /* #endif */
  559. flex-direction: column;
  560. overflow: hidden;
  561. height: 100%;
  562. }
  563. .tree-list {
  564. flex: 1;
  565. height: 100%;
  566. overflow: hidden;
  567. }
  568. .tree-item {
  569. display: flex !important;
  570. justify-content: space-between !important;
  571. align-items: center !important;
  572. line-height: 1;
  573. height: 0;
  574. opacity: 0;
  575. transition: 0.2s;
  576. overflow: hidden;
  577. }
  578. .dimission{
  579. color: #aaaaaa;
  580. }
  581. .tree-item.show {
  582. height: 90rpx;
  583. opacity: 1;
  584. }
  585. .tree-item.hidden {
  586. display: none !important;
  587. }
  588. .tree-item.showchild:before {
  589. transform: rotate(90deg);
  590. }
  591. .tree-item.last:before {
  592. opacity: 0;
  593. }
  594. .switch-on {
  595. width: 0;
  596. height: 0;
  597. border-left: 10rpx solid transparent;
  598. border-right: 10rpx solid transparent;
  599. border-top: 15rpx solid #666;
  600. }
  601. .switch-off {
  602. width: 0;
  603. height: 0;
  604. border-bottom: 10rpx solid transparent;
  605. border-top: 10rpx solid transparent;
  606. border-left: 15rpx solid #666;
  607. }
  608. .item-last-dot {
  609. position: absolute;
  610. width: 10rpx;
  611. height: 10rpx;
  612. border-radius: 100%;
  613. background: #666;
  614. }
  615. .item-icon {
  616. width: 26rpx;
  617. height: 26rpx;
  618. margin-right: 8rpx;
  619. padding-right: 20rpx;
  620. padding-left: 20rpx;
  621. }
  622. .item-label {
  623. flex: 1;
  624. display: flex !important;
  625. align-items: center !important;
  626. height: 100%;
  627. line-height: 1.2;
  628. }
  629. .item-name {
  630. flex: 1;
  631. overflow: hidden;
  632. text-overflow: ellipsis;
  633. white-space: nowrap;
  634. width: 450rpx;
  635. }
  636. .item-check {
  637. width: 40px;
  638. height: 40px;
  639. display: flex;
  640. justify-content: center;
  641. align-items: center;
  642. }
  643. .item-check-yes,
  644. .item-check-no {
  645. width: 20px;
  646. height: 20px;
  647. border-top-left-radius: 20%;
  648. border-top-right-radius: 20%;
  649. border-bottom-right-radius: 20%;
  650. border-bottom-left-radius: 20%;
  651. border-top-width: 1rpx;
  652. border-left-width: 1rpx;
  653. border-bottom-width: 1rpx;
  654. border-right-width: 1rpx;
  655. border-style: solid;
  656. border-color: #0055ff;
  657. display: flex;
  658. justify-content: center;
  659. align-items: center;
  660. box-sizing: border-box;
  661. }
  662. .item-check-yes-part {
  663. width: 12px;
  664. height: 12px;
  665. border-top-left-radius: 20%;
  666. border-top-right-radius: 20%;
  667. border-bottom-right-radius: 20%;
  668. border-bottom-left-radius: 20%;
  669. background-color: #0055ff;
  670. }
  671. .item-check-yes-all {
  672. margin-bottom: 5px;
  673. border: 2px solid #007aff;
  674. border-left: 0;
  675. border-top: 0;
  676. height: 12px;
  677. width: 6px;
  678. transform-origin: center;
  679. /* #ifndef APP-NVUE */
  680. transition: all 0.3s;
  681. /* #endif */
  682. transform: rotate(45deg);
  683. }
  684. .item-check .radio {
  685. border-top-left-radius: 50%;
  686. border-top-right-radius: 50%;
  687. border-bottom-right-radius: 50%;
  688. border-bottom-left-radius: 50%;
  689. }
  690. .item-check .radio .item-check-yes-b {
  691. border-top-left-radius: 50%;
  692. border-top-right-radius: 50%;
  693. border-bottom-right-radius: 50%;
  694. border-bottom-left-radius: 50%;
  695. }
  696. .hover-c {
  697. opacity: 0.6;
  698. }
  699. .itemBorder {
  700. border-bottom: 1px solid #e5e5e5;
  701. }
  702. </style>