You can "watch" an x-data variable using $watch.
You can find out more about $watch here: https://github.com/alpinejs/alpine#watch
For example, this watches the "qty" value and if is changed it'll dispatch a "qty_true" event.
x-init="$watch('qty',value => { if (value) $dispatch('qty_true'); })"
Here's a version of your code with $watch, and the "qty_true" event listener.
<div x-data="{ qty: 1 }" x-init="$watch('qty',value => { if (value) $dispatch('qty_true'); })">
<i @click="qty = qty > 2 ? qty - 1 : 1" class="icon-left-open"></i>
<input type="number" x-model="qty">
<i @click="qty = qty + 1" class="icon-right-open"></i>
</div>
<script type="text/javascript">
window.addEventListener( 'qty_true', ( e ) => {
console.log( 'qty now evaluates to true' );
// enable your button here
} );
</script>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…