亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Laravel Live 線增量減量不起作用

Laravel Live 線增量減量不起作用

PHP
精慕HU 2023-07-01 15:29:26
我將步驟功能放入我的待辦事項列表項目中。我為 Livewire 創建了一個作曲家。@livewireStyles還 包含@livewireScripts在頁眉和頁腳中。在這里,我的增量控件不起作用1)創建.blade.php<form method="post" action="{{route('todo.store')}}" class="py-5" >    @csrf    <div class="py-1">        <input type="text" name="title" class="px-2 py-2 border rounded" placeholder="Title">    </div>    ......              @livewire('step')    <div>        <input type="text" name="stpe" class="px-2 py-2 border rounded" placeholder="Describe Steps">    </div></form>2)step.blade.php<div>    <div class="flex-justify-center pb-4 px-4">                            <h2 class="text-lg pb-4">Add Stpes for task</h2>        <i wire:click="increment" class ="fas fa-plus px-2 py-1 cursor-pointer "></i>    </div>      {{$steps}}</div>3)步驟.php<?phpnamespace App\Http\Livewire;use Livewire\Component;class Step extends Component{    public $steps = 0;    public function increment()    {        $this->steps++;    }    public function render()    {        return view('livewire.step');    }}執行此代碼后,我的“+”圖標無法執行增量操作,請幫助我。
查看完整描述

1 回答

?
有只小跳蛙

TA貢獻1824條經驗 獲得超8個贊

php artisan serve這里你的代碼看起來沒問題,確保你在 laravel 服務器 ie命令的平臺上使用它:http: //127.0.0.1:8000


查看完整回答
反對 回復 2023-07-01
  • 1 回答
  • 0 關注
  • 116 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號