vbuild icon indicating copy to clipboard operation
vbuild copied to clipboard

Maybe pythonize $variables ?

Open icarito opened this issue 5 years ago • 0 comments

Hi, I know it may be a thing of taste, but I'm frequently writing like this:

    def MOUNTED(self):
        self.dark = window.matchMedia("(prefers-color-scheme: dark)").matches
        self['$emit']('input', self.current)
        self['$root'].dark = self.dark

    def WATCH_dark(self, sta, oldStatus, name='dark'):
        self['$vuetify'].theme.dark = sta
        self['$root']['$emit']("dark-changed", sta)
        self['$root'].dark = self.dark

I wonder if we could make an alias or a solution to rename $root, $emit, $on, and so on into _root etc? Could this be done at the level of vbuild, like the component methods are? I'm using the Python components, thank you a lot!

icarito avatar Mar 31 '20 17:03 icarito