Hallo, Gast! (Registrieren)

Letzte Ankündigung: MyBB 1.8.37 veröffentlicht (04.11.23)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Alpine.js
#1
Eine neue Erweiterung wurde veröffentlicht: Alpine.js

Zitat:It adds the required scripts for the Alpine.js library to your MyBB theme and enables you to use the Alpine.js magics (
Code:
$el, $refs, $store, ...
) that are not allowed by the MyBB 1.8 theme engine.

Details

Version: 2.0.0
MyBB Versions: 1.8.x

Install

1. Download the plugin.
2. Upload the files in the "Upload" folder to the root directory of your forum with SCP (
Code:
scp
command.) or FTP (FileZilla, CuteFTP, etc.).
3. Install and activate the plugin named Alpine.js from the Admin CP → Configuration → (From left.) Plugins page.

Uninstall

1. Uninstall the plugin named Alpine.js from the Admin CP → Configuration → (From left.) Plugins page.

Update

1. First, perform the "Uninstall" section, then perform the "Install" (with new files) section.

Usage

You can review the Alpine.js documentation page for usage.

The variables you will use in templates for Alpine.js magics are as follows:

Code:
$el
Code:
{$alpinejs['el']}
Code:
$refs
Code:
{$alpinejs['refs']}
Code:
$store
Code:
{$alpinejs['store']}
Code:
$watch
Code:
{$alpinejs['watch']}
Code:
$dispatch
Code:
{$alpinejs['dispatch']}
Code:
$nextTick
Code:
{$alpinejs['nextTick']}
Code:
$root
Code:
{$alpinejs['root']}
Code:
$data
Code:
{$alpinejs['data']}
Code:
$id
Code:
{$alpinejs['id']}

Example:

Code:
$el.innerHTML
=
Code:
<button @click="{$alpinejs['el']}.innerHTML = 'Hello World!'">Replace me with "Hello World!"</button>

Happy Coding!
Zitieren
#2
Eine neue Version wurde veröffentlicht: Alpine.js v2.0.0
Zitieren
#3
Eine neue Version wurde veröffentlicht: Alpine.js 2.0.0
Zitieren
#4
Eine neue Version wurde veröffentlicht: Alpine.js 2.0.2
Zitieren