Browse Source

修改样式

lex-xin 4 months ago
parent
commit
c8cfa8d4c1
2 changed files with 6 additions and 5 deletions
  1. 4 4
      src/constant/instruments.ts
  2. 2 1
      src/views/music/music-detail/index.module.less

+ 4 - 4
src/constant/instruments.ts

@@ -214,17 +214,17 @@
  * @returns
  */
 export const getInstrumentName = (instruments: any, instrumentName: string) => {
-  const _instrumentName = instrumentName.replace(/ /g, ' ').toLocaleLowerCase()
+  const _instrumentName = instrumentName.replace(/ /g, '').toLocaleLowerCase()
   const _instrument = Object.keys(instruments)
   for (let i = 0; i < _instrument.length; i++) {
-    const _name = _instrument[i].replace(/ /g, ' ').toLocaleLowerCase()
+    const _name = _instrument[i].replace(/ /g, '').toLocaleLowerCase()
     if (_name === _instrumentName) {
       return instruments[_instrument[i]] || ''
     }
   }
   for (let i = 0; i < _instrument.length; i++) {
-    const _name = _instrument[i].replace(/ /g, ' ').toLocaleLowerCase()
-    if (_instrumentName.includes(_name)) {
+    const _name = _instrument[i].replace(/ /g, '').toLocaleLowerCase()
+    if (_name.includes(_instrumentName)) {
       return instruments[_instrument[i]] || ''
     }
   }

+ 2 - 1
src/views/music/music-detail/index.module.less

@@ -611,7 +611,8 @@
 
   :global {
     .van-button {
-      padding: 0 22px;
+      // padding: 0 22px;
+      font-size: 15px;
       font-weight: 600;
 
       &+.van-button {