第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

如何使用 JohMun/vue-tags-input 發(fā)布標(biāo)簽值

如何使用 JohMun/vue-tags-input 發(fā)布標(biāo)簽值

犯罪嫌疑人X 2023-04-27 16:30:26
我是 Vue.js 的新手。我想基于 Vue.js 組件創(chuàng)建具有多個(gè)標(biāo)簽(用戶(hù)技能)的輸入。我設(shè)法讓它工作,但我找不到如何在表單中發(fā)布我的標(biāo)簽。這是我的代碼:TagField.view<template>    <div>        <vue-tags-input            :tags="tags"            :autocomplete-items="filteredItems"            :add-only-from-autocomplete="true"            @tags-changed="newTags => tags = newTags"        />        <input type="hidden" name="tags" :value="tags">    </div></template><script>import VueTagsInput from '@johmun/vue-tags-input';export default {    components: {        VueTagsInput,    },    props:[        'options',        'selection',    ],    data() {        return {            tag: '',            tags: this.selection,            autocompleteItems: this.options,        };    },    computed: {        filteredItems() {            return this.autocompleteItems.filter(i => {                return i.text.toLowerCase().indexOf(this.tag.toLowerCase()) !== -1;            });        },    },};</script>編輯.blade.php<div class="form-group">    <tag-field         :selection='@json($expert->skills()->get(['skills.name AS text', 'skills.id', 'skills.slug'])->makeHidden('pivot'))'         :options='@json(\App\Models\Skill::get(['name AS text', 'id', 'slug']))'    ></tag-field></div>如您所見(jiàn),我嘗試添加一個(gè)包含我的標(biāo)簽的隱藏字段,但值如下所示:<input type="hidden" name="tags" value="[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]">
查看完整描述

1 回答

?
精慕HU

TA貢獻(xiàn)1845條經(jīng)驗(yàn) 獲得超8個(gè)贊

經(jīng)過(guò)一夜的睡眠,

JSON.stringify(tags)

在隱藏字段的值屬性中完成了這項(xiàng)工作。


查看完整回答
反對(duì) 回復(fù) 2023-04-27
  • 1 回答
  • 0 關(guān)注
  • 160 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)