perf: template literals

This commit is contained in:
liyasthomas
2021-09-18 16:09:58 +05:30
parent 4236d1179c
commit e1e763575d
64 changed files with 425 additions and 333 deletions

View File

@@ -82,19 +82,23 @@
svg="folder-plus"
:label="$t('folder.new')"
@click.native="
$emit('add-folder', {
folder: collection,
path: `${collectionIndex}`,
})
$refs.options.tippy().hide()
() => {
$emit('add-folder', {
folder: collection,
path: `${collectionIndex}`,
})
$refs.options.tippy().hide()
}
"
/>
<SmartItem
svg="edit"
:label="$t('action.edit')"
@click.native="
$emit('edit-collection')
$refs.options.tippy().hide()
() => {
$emit('edit-collection')
$refs.options.tippy().hide()
}
"
/>
<SmartItem
@@ -102,8 +106,10 @@
color="red"
:label="$t('action.delete')"
@click.native="
confirmRemove = true
$refs.options.tippy().hide()
() => {
confirmRemove = true
$refs.options.tippy().hide()
}
"
/>
</tippy>
@@ -138,7 +144,7 @@
:collection-index="collectionIndex"
:folder-index="-1"
:folder-name="collection.name"
:folder-path="collectionIndex.toString()"
:folder-path="`${collectionIndex}`"
:request-index="index"
:doc="doc"
:save-request="saveRequest"
@@ -247,7 +253,7 @@ export default defineComponent({
this.dragging = !this.dragging
const folderPath = dataTransfer.getData("folderPath")
const requestIndex = dataTransfer.getData("requestIndex")
moveRESTRequest(folderPath, requestIndex, this.collectionIndex.toString())
moveRESTRequest(folderPath, requestIndex, `${this.collectionIndex}`)
},
},
})

View File

@@ -62,21 +62,25 @@
svg="folder-plus"
:label="$t('folder.new')"
@click.native="
$emit('add-folder', { folder, path: folderPath })
$refs.options.tippy().hide()
() => {
$emit('add-folder', { folder, path: folderPath })
$refs.options.tippy().hide()
}
"
/>
<SmartItem
svg="edit"
:label="$t('action.edit')"
@click.native="
$emit('edit-folder', {
folder,
folderIndex,
collectionIndex,
folderPath,
})
$refs.options.tippy().hide()
() => {
$emit('edit-folder', {
folder,
folderIndex,
collectionIndex,
folderPath,
})
$refs.options.tippy().hide()
}
"
/>
<SmartItem
@@ -84,8 +88,10 @@
color="red"
:label="$t('action.delete')"
@click.native="
confirmRemove = true
$refs.options.tippy().hide()
() => {
confirmRemove = true
$refs.options.tippy().hide()
}
"
/>
</tippy>