No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. jmg1340
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 15
    • Best 0
    • Groups 0

    jmg1340

    @jmg1340

    0
    Reputation
    163
    Profile views
    15
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    jmg1340 Follow

    Latest posts made by jmg1340

    • Electron: hide menu Bar window

      Hi.
      How can I hide the top menuBar window when I build in Electron mode?
      I’ve been watching this.$q.electron object and seen the following properties

      • “context.menuBar”
      • “context.window.menuBar”

      but they are “read only”.

      I’ve been looking for that question, and I’ve found in electronjs.org the following method:

      const { BrowserWindow } = require('electron')
      const win = new BrowserWindow()
      win.setMenuBarVisibility(false)
      

      I’ve put this code in created property of layout component but when I run, it says that “BrowserWindow” is not a constructor.

      May be, the solution it’s something about configuration in quasar.config.js… I don`t know.

      I run it on windows OS.

      Thank you in advance.

      posted in Framework
      J
      jmg1340
    • Audio HTML5 TAG not visible in Chrome

      Hi
      I`ve tried to use audio html5 tag in my quasar app.

      <audio controls>
        <source src="horse.ogg" type="audio/ogg">
        <source src="horse.mp3" type="audio/mpeg">
      Your browser does not support the audio element.
      </audio>
      

      It works in Safari and Firefox but not in Chrome. In Chrome, the problem is that it creates the space where the player is but it’s not visible.

      You could think that it`s a problem of a version or some restriction of Chrome but, in Chrome, if you go to https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_audio_all, you can see the player and it works.

      Thank you very much.

      posted in Framework
      J
      jmg1340
    • pdfmake insert image

      Hello,
      I want to use a pdfmake library. I have this library in “statics/js”
      To use it, I’ve got a button in a component that fires a method of pdfmake to generate a pdf in a new window.

      In the component (src/pages/checkListPdf.vue):

      import docDef from "./documentDefinition.js";
      

      Method in a component (with q-img component to check if soruce image works or not)

            generarPDF: function () {
              // change q-img src component and it works !!!
              this.foto = "statics/logo.jpg"
              
              // opens new window with pdf content
              pdfMake.createPdf(docDef(this.foto)).open()
            }
      
      

      PdfMake needs an object with special properties to perform the pdf conent (it’s also known as “document definition”).
      I’ve written a custom module only to build de object (“document definition”) in a “documentDefinition.js” file.

      src/pages/pdfmake/documentDefinition.js

      export default function (imatge) {
      	
      	var dd = 
      	{
      		pageSize: 'A4',
      		content: [
      		    {
      		      // image: require('assets/logo.jpg'),
      		      // image: require('/statics/logo.jpg'),
      		      image: imatge,
      		      width: 150
      		    },
      		    {
      			text: 'This is an example\n',
      			fontSize: 30, bold: true, margin: [ 2, 240], alignment: "center"
      		    },
      		],
      	}
      
      	return dd 
      }
      

      If I do not put object image in content propety array, it works (pdf opens in a new window with the text)
      If I add the object image, then console throws the following error:

      [Vue warn]: Error in v-on handler: “Invalid image: File ‘./statics/logo.jpg’ not found in virtual file system
      Images dictionary should contain dataURL entries (or local file paths in node.js)”

      The file exists at “src/statics” and it works in the component.
      In the documentDefinition.js I’ve also tried putting…
      image: ‘statics/logo.jpg’
      image: ‘/statics/logo.jpg’
      image: ‘…/…/statics/logo.jpg’

      posted in Useful Tips (NEW)
      J
      jmg1340
    • RE: Popup edit: save & cancel

      I forget this info:
      Quasar CLI… v0.17.20
      Quasar Framework… v0.17.17

      posted in Framework
      J
      jmg1340
    • RE: Popup edit: save & cancel

      Ok, understood what you said.
      I must be doing something wrong because when I cancel, it saves the new value instead of remaining the original value.

      my Code is:

            <q-td v-for="col in props.cols" v-if="col.name.startsWith('Part')" :key="col.name" :props="props">
      
              {{ col.value.valor }}
      
              <q-popup-edit 
                v-model="col.value.valor" 
                title="punts" 
                color="red-14"
                buttons
                label-set="Ok"
                label-cancel="Cancelar"
                >
                <q-input 
                  v-model="col.value.valor"
                  type="number"
                  align="center"
                  hide-underline
                  class="bg-blue-1"
                  @change="sumatori(props.row)"
                />
              </q-popup-edit>
            </q-td>
      

      … and I have no handlers for cancel and save.

      Thank you very much for your help!!

      posted in Framework
      J
      jmg1340
    • RE: Popup edit: save & cancel

      So, in the popup edit element, do I need to set a any event beside the other properties? Because I haven’t see it. For example:
      <q-popup-edit v-model=“props.row.name” BUTTONS LABEL-SET=“OK” LABEL-CANCEL=“NO” @EVENT_TO_SET=“SAVED” @EVENT_TO_CANCEL="@CANCELED">
      <q-field count>
      <q-input v-model=“props.row.name” />
      </q-field>
      </q-popup-edit>

      On the other hand, in the CANCELED HANDLER, how do I set the original value (initialValue). That is to say: Do I Have to put a command like this: props.row.name = initialValue ?

      posted in Framework
      J
      jmg1340
    • Popup edit: save & cancel

      Hi,
      I don’t understand how do save and cancel events work. Can you give-me an example with:
      @save(val, initialValue) Edit is successful and the value gets saved
      @cancel(val, initialValue) Edit has been cancelled and the value gets reverted to its original form

      posted in Framework
      J
      jmg1340
    • RE: changing data of the page from the layout

      @jmg1340
      I’ve got it substituing the router-view (in the layout) by the content of the page template. Then, move the content of the page data object to the layout data object. And move the content of the page style tag to the layout style tag.

      Would it be right?

      posted in Framework
      J
      jmg1340
    • changing data of the page from the layout

      I would like to know, if it’s possible, how to modify data on a page from the layout. For example, I’ve got an array of elements in a page data object and I would want remove this elements from a button in the layout. I’ve got it putting this button on the same page, but I wanted to work with a button in the layout.

      posted in Framework
      J
      jmg1340
    • RE: Reload pwa

      I tested it on Android device and it worked. But not on my iphone (in spite of having updated it to v.11.4.1) 😓

      posted in Framework
      J
      jmg1340