Prevent el-menu-item from adding "is-active" class when clicked - vuejs2

Using element-ui framework, how do I prevent el-menu component's el-menu-item from adding "is-active" class when clicked?
I don't want to just override the css class but I want to completely remove it.

Related

Qt UIC: Non-modal pop-up not inheriting style from parent

I am trying to create a non-modal (modeless) QMessageBox window with several buttons and text. To make it modeless, I am giving it the MainWindow object as its parent (which inherits from QMainWindow).
For example:
class MainWindow(QMainWindow):
...
def create_popup(self):
message_box = QMessageBox(self)
# add buttons, text, etc.
message_box.setModal(False)
message_box.show()
However, the issue arises that I am providing the styling of my MainWindow through a stylesheet, built from a .ui file (using PyQt5.uic.loadUi('file', main_window)). In the .ui file, I am specifying the stylesheet of the MainWindow as having background-color: black. Because the QMessageBox I create inherits from MainWindow, it also inherits its stylesheet, making both the background of the box black and that of the buttons.
I know I could manually style the box, but I would like to be able the remove the style applied by the parent to the children, while still maintaining the ability to use the QMessageBox as a modeless pop-up.
If I remove the parent of the QMessageBox (so I do message_box = QMessageBox(None)), calling show() does nothing - I have to use exec_(). This does result in the expected presentation of the box with the default styling, however.
If I try to manually override the background-color attribute (with message_box.setStyleSheet("background-color: grey;")), this messes up the style of the buttons, and makes them into rectangular boxes (since the buttons also inherit from the QMessageBox).
I would like to make it so that either 1) the style applied to my MainWindow is not inherited by the QMessageBox, 2) the QMessageBox can be modeless without being a child of the MainWindow, or 3) I can override the styles with the full styles that are default to my platform (including OS and dark mode preferences, like Qt normally does).

how to override vuetify style for components globaly

I am tring to set my buttons with vuetify but, I don't want each time to set the background color and the style of the button, or with any other vuetify component.
what is the best practice to set global style for the component like buttons chips avatar ect...
i now i can create my own component for that but then there is no reason using vuetify.
I have a nuxt project but the same apply to vue
Might be not the best practice, but this is how I'm doing it:
Create file for your global style (e.g. main.scss) In your assets folder.
Plug it in nuxt.config.js as so: css: ["~assets/styles/main.scss"]
Add class to your app root element (e.g. in default layout)
Create _vuetify.scss for overwriting Vutify styles and import it in main.scss
Write your Vuetify styles in scope of app root class for gaining selector weight.
.app .v-toolbar {
background-color: red; }
If this is too much, or as a quick solution you can just write your global styles in default layout, scoping with app root class.

Vue.js: Create css class dynamically based on attribute values

In vue it's easy to change the class of an element dynamically. However, what I want to do has nothing to do with that:
I have an attribute color with the value #333 for example. Now I want to build a css class like:
.myColorClass > a {
color: this.color;
}
It's not possible for me to style every single element a individually with the style attribute. So how do I approach this problem with Vue?

Prestashop Slider

How to setup a slider at the bottom-right corner in Prestashop like the picture? This slider consists of different picture. When I click an image, relative information will be shown on the right corner.
Simple you need to build a custom module. Please ref to prestashop.com document how you build custom module.
On that module hook the theme file yourmodulefile.tpl at FOOTER
Then make a wrap Div, set a class "footer_slide_wrap"
On your module CSS mark that class as bellow
.footer_slide_wrap{
display :fixed;
bottom : 0;
right :0;
width : 30px;
height:auto;
}
Now your DIV with class footer_slide_wrap will be place on that place.
now insert an UL and put your all button under li in this UL.
You can make the div .footer_slide_wrap mouse over slidable. For that you need to make a default div with class .opener and make the wrap hide.
need to create a javascript function to hide / show the DIV on mouse over.
you need to register a custom hook inside your slider module's php file, eg: "footerslider" then add the hook to your fooeter.tpl file which is located at "themes/yourthemes/footer.tpl" by placing this code {hook h="fooerslider"}
Basically, you should create small module that have hook.
Prestashop has many hooks related with your layout but if they are not suitable for you, you can create your own hook.
If you want to call your custom hook, simply put this code where you want to show.
{hook h="displayYourHookName"}
You need to install your custom hook in your install() function of your custom module.
// use this code in your install() function
$this->registerHook('displayYourHookName');
// your custom hook
public function hookDisplayYourHookName()
{
// code ...
// your html template that you want to show
return $this->display(__FILE__, 'yourTemplate.tpl');
}
if you are using default hook, prestashop will call automatically.
I hope this will help, cheers :)

Instantiating dijit.Dialog from a template I can't get it to initialize properly

In Dojo, I am trying to extend dijit.Dialog using templates. When I instantiate it, I get only the text in the dialog box, without the borders or close button. Is there some additional step I need to do to get it fully initialized?
My template is in template.html, it looks like so:
<div dojoType="dijit.Dialog" id="dynFilter" jsId="dynFilter">
"Dynamic Dialog"
</div>
Here is the dojo.declare:
dojo.declare(
"template.dialog", // class name
[dijit._Widget, dijit._Templated, dijit.Dialog], // parent classes
{
templateString : dojo.cache("autonomics", "template.html"),
}
);
After I instantiate it, I call .startup(), which doesn't seem to do anything, then .show(), which does place it on the page, missing most of its functionality.
var dialog = new template.dialog();
dialog.startup();
dialog.show();
What am I missing?
You overwrite the template of the original dijit/Dialog when subclassing.
Have a look to my answer to Dojo Dialog with confirmation button which solves the issue you are experiencing. Or go directly to working example at jsFiddle: http://jsfiddle.net/phusick/wkydY/