我是Vue的新手。我正在一个需要上传文件的项目。为此,我正在使用此插件:https://github.com/simple-uploader/vue-uploader。现在,我需要向该插件传递一些“道具”,其中包括“ targetUrl”。
现在的问题是,每次上传的targetURL都会更改,因为它依赖于名为“产品”的其他“ DropDown”。例如:
Extension extension = new Extension();
// here you gonna pass your parameters to your Dialog on create it
// on my case the activity that I want open
extension.showDialogConfirma(ThisActivity.this, DestActivity.class, titulo, mensagem);
这是我在做什么:
Product Name : product_1, url: /api/upload/product/product_1
Product Name : product_2, url: /api/upload/product/product_2
Product Name : product_3, url: /api/upload/product/product_3
我的脚本
// Product DropDown
v-select.products(
:items="items",
v-model="product",
menu-props="auto",
label="Product",
hide-details,
single-line,
@input="update",
)
// File uploader
uploader.uploader(
:options="uploadOptions",
)
uploader-unsupport
uploader-drop(:attrs="attrs")
p Drop files here to upload or
uploader-btn select files
uploader-btn(:attrs="attrs") select files
uploader-btn(:directory="true") select folder
uploader-list
我的问题是,当我更改产品时,'uploadOptions.target'被更改了。
但是它把api标记为'/ api / upload / product / null'