jQWidgets Forums

jQuery UI Widgets Forums Vue The zIdex attribute of the vue version of jqxWindow does not seem to work

This topic contains 2 replies, has 3 voices, and was last updated by  Hristo 4 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • JenkeNg
    Participant
    <JqxWindow
          ref="myWindow"
          :width="'90%'"
          :height="'90%'"
          :autoOpen="false"
          :position="{ x: '20%', y: '5%' }"
          :zIndex="500"
        >
    </JqxWindow>
    

    I set :zIndex=”500″,
    but the actual generated z-index is affected by this property,
    it will set z-index by default,
    so that it has been placed on the top layer,
    blocking other pop-up prompts
    and no matter how I change it.
    Even if I set it in <style>

    
    ::v-deep jqx-window{
      z-index: 500;
    }
    

    Also useless


    Martin
    Participant

    Hello JenkeNg,

    Thank you for the feedback!

    I would suggest you to use:

    .jqx-window {
          z-index: 500 !important;
      }

    Best Regards,
    Martin Yotov

    jQWidgets team
    https://www.jqwidgets.com


    Hristo
    Participant

    Hello JenkeNg,

    I tested this source code below and it seems to work fine:

    <template>
        <div>
            <JqxButton @click="showWindowButtonClick()"
                       :width="80">
                Show
            </JqxButton>
            <div style="margin-top: 10px;">Events Log:</div>
            <JqxPanel ref="events" style="width: 300px; height: 200px; border-width: 0px;"></JqxPanel>
            <JqxWindow ref="eventWindow"
                  :width="'90%'"
                  :height="'90%'"
                  :autoOpen="false"
                  :position="{ x: '20%', y: '5%' }"
                  :zIndex="500">
                <div>
                    <!-- <img width="14" height="14" src="./assets/styles/jqwidgets/images/help.png" alt="" /> -->
                    Modal Window
                </div>
                <div>
                    <div>
                        Please click "OK", "Cancel" or the close button to close the modal window. The dialog
                        result will be displayed in the events log.
                    </div>
                    <div style="float: right; margin-top: 15px;">
                        <JqxButton class="ok" style="display: inline-block; margin-right: 10px;" :width="80">OK</JqxButton>
                        <JqxButton class="cancel" style="display: inline-block;" :width="80">Cancel</JqxButton>
                    </div>
                </div>
            </JqxWindow>
        </div>
    </template>
    <script>
        import JqxWindow from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxwindow.vue';
        import JqxButton from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxbuttons.vue';
        import JqxPanel from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxpanel.vue';
        export default {
            components: {
                JqxWindow,
                JqxButton,
                JqxPanel
            },
            methods: {
                capitaliseFirstLetter: function (value) {
                    return value.charAt(0).toUpperCase() + value.slice(1);
                },
                displayEvent: function (event) {
                    let eventData = 'Event: ' + this.capitaliseFirstLetter(event.type);
                    if (event.type === 'moved') {
                        eventData += ', X: ' + event.args.x + ', Y: ' + event.args.y;
                    }
                    if (event.type === 'close') {
                        eventData += ', Dialog result: ';
                        if (event.args.dialogResult.OK) {
                            eventData += 'OK';
                        } else if (event.args.dialogResult.Cancel) {
                            eventData += 'Cancel';
                        } else {
                            eventData += 'None';
                        }
                    }
                    let content = document.createElement('div');
                    content.style.marginTop = '5px';
                    content.innerText = eventData;
                    this.$refs.events.$el.prepend(content);
                },
                onClose: function (event) {
                    this.displayEvent(event);
                },
                onMoved: function (event) {
                    this.displayEvent(event);
                },
                onOpen: function (event) {
                    this.displayEvent(event);
                },
                showWindowButtonClick: function () {
                    this.$refs.eventWindow.open();
                }
            }
        }
    </script>
    
    <style>
    </style>
    
    <style src="./assets/styles/jqwidgets/jqx.base.css"></style>
    <style src="./assets/styles/jqwidgets/jqx.light.css"></style>

    (the “App.vue” file)

    Please, take a look at this image.
    Could you provide us with more details?

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.