-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change mounting and template definition
This creates more flexibility on mounting, by allowing a developer to explicity provide or not provide a mount point and (optionally) a template. If a mount point is not provided, mounting is deferred until the developer chooses to. Otherwise, the mount point either acts as a container or as the reactive element, depending on the template.
- Loading branch information
1 parent
d296919
commit c5c92b7
Showing
10 changed files
with
198 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ import { PluginBase } from '@wintercms/snowboard'; | |
import { | ||
reactivityConstructor, | ||
reactivityMount, | ||
template, | ||
mountTo, | ||
} from './shared'; | ||
|
||
/** | ||
|
@@ -16,6 +18,8 @@ import { | |
* | ||
* @copyright 2023 Winter. | ||
* @author Ben Thomson <[email protected]> | ||
* @abstract | ||
* @mixes Reactivity | ||
*/ | ||
class ReactivePluginBase extends PluginBase { | ||
constructor(snowboard) { | ||
|
@@ -28,5 +32,7 @@ class ReactivePluginBase extends PluginBase { | |
} | ||
|
||
ReactivePluginBase.prototype.$mount = reactivityMount; | ||
ReactivePluginBase.prototype.template = template; | ||
ReactivePluginBase.prototype.mountTo = mountTo; | ||
|
||
export default ReactivePluginBase; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.