Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

214
Views
Cómo capitalizar la información sobre herramientas del título en Vue.js

¿Cómo pongo en mayúscula solo la primera letra de la información sobre herramientas del título (de un span )? Intenté usar CSS text-transform: capitalize; , pero no funcionó.

 <template lang="pug"> .cell-audience-status-dot(:class="{'overflow-initial': type === 'actions'}") .cell-content.audiences(v-if="data !== 'never_activated'") .icon-wrapper(:class="{ active : activeMenu === 'activeSegments' && openedSegments.includes(fullData.id) }") span.icon(:title="data" :class="getStatusColor") &#9679; </template> <script> import { get } from 'vuex-pathify' export default { name: 'cellStatus', props: ['data', 'type', 'fullData'], computed: { openedSegments: get('activeSegments/openedSegments'), activeMenu: get('menu/activeMenu'), getStatusColor() { const { data } = this if (data === 'active') return 'green' else if (data === 'inactive') return 'red' else if (data === 'paused') return 'orange' return '' } }, } </script>
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Cree una propiedad calculada que devuelva la forma de data en mayúscula:

 export default { computed: { title() { return this.data?.length && this.data[0].toUpperCase() + this.data.slice(1) } } }

Y en lugar de data , vincule el accesorio calculado al atributo de title del span :

 span.icon(:title="title" :class="getStatusColor") &#9679; 👆

manifestación

about 4 years ago · Juan Pablo Isaza Report

0

para poner en mayúscula solo la primera letra de un texto, puede usar el selector css :first-letter y text-transform: uppercase;

 .title:first-letter { text-transform: uppercase; }
 <div class="title">my text</div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!