vbuild
vbuild copied to clipboard
Maybe pythonize $variables ?
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!