vuetify-select2-chirumistry

1.0.0 • Public • Published

vuetify-select2

api based vuetify select

========================================= ##Usage

<Select2
    type="select_type"
    data_type="select_data_type"
    chips
    small
>
</Select2>

pass vuetify props to use it

####Create .env file and pass your url package.json add

"dev-build": "vue-cli-service build --mode development",

BACKEND_URL:http://127.0.0.1:8000

####api functions our function is laravel

id is value in select2

text is label in select2

public function getAjaxList(Request $request){
        $type = $request->type;
        switch ($type) {
            case 'static_data':
                $items = DB::table('table_name')
                    ->select(\DB::raw('value id,label text'))
                    ->where(['type' => $request->data_type])
                    ->get();
                break;
            default:

                break;
        }

        return response()->json(['status' => 'true', 'results' => $items]);
    }

Package Sidebar

Install

npm i vuetify-select2-chirumistry

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

12.4 kB

Total Files

9

Last publish

Collaborators

  • chirumistry