Commit 93bff2dd authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

ajout du paramètrage du type de ressource (user|group), et utilisation du user...

ajout du paramètrage du type de ressource (user|group), et utilisation du user zotero 475425 par défaut
parent 760a97f6
VUE_APP_APP_NAME=Zotero Client
VUE_APP_URL_PATH=/zotero-vue-client/
VUE_APP_DEFAULT_USER_GROUP_ID=475425
VUE_APP_DEFAULT_TYPE=user
......@@ -23,16 +23,17 @@ yarn lint
## component usage example
```
<zotero-query-component :default-id="1234" @entrySelected="selectedEntryCallback"/>
<zotero-query-component :default-type="user" :default-id="1234" @entrySelected="selectedEntryCallback"/>
```
where default-id is a group or user id (https://www.zotero.org/support/dev/web_api/v3/basics)
where default-type is "user" or "group" and default-id is a group or user id (https://www.zotero.org/support/dev/web_api/v3/basics)
Another example with custom options :
```
<zotero-query-component
:default-id="1234"
:default-type="user"
:default-id="475425"
:options="{
pageLength: 10,
editableConfig: false,
......
<template>
<zotero-query-component :default-id="groupOrUserId" @entrySelected="selectedEntry"/>
<zotero-query-component :default-type="resourceType" :default-id="groupOrUserId" @entrySelected="selectedEntry"/>
</template>
<script>
......@@ -12,6 +12,7 @@
},
data(){
return {
resourceType: config.RESOURCE_TYPE,
groupOrUserId: config.USER_GROUP_ID
}
},
......
......@@ -70,7 +70,7 @@
defaultId : String,
defaultType : {
type : String,
default : 'group'
default : 'users'
},
options : {
type: Object,
......
var config = {
RESOURCE_TYPE : process.env.VUE_APP_DEFAULT_TYPE,
USER_GROUP_ID: process.env.VUE_APP_DEFAULT_USER_GROUP_ID,
API_KEY: process.env.VUE_APP_ZOTERO_API_KEY,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment