chore: API改为类,成员函数变量增加static关键字 & yarn lint

This commit is contained in:
noe
2022-09-24 11:44:04 +08:00
parent 17436b0e9a
commit cfc10a6aee
25 changed files with 727 additions and 681 deletions

View File

@@ -1,5 +1,13 @@
<template>
<div v-show="!!options.length && (searchValue || !!clipboardFile.length) && !currentPlugin.name" class="options" ref="scrollDom">
<div
v-show="
!!options.length &&
(searchValue || !!clipboardFile.length) &&
!currentPlugin.name
"
class="options"
ref="scrollDom"
>
<a-list item-layout="horizontal" :dataSource="sort(options)">
<template #renderItem="{ item, index }">
<a-list-item
@@ -11,10 +19,7 @@
<span v-html="renderTitle(item.name)"></span>
</template>
<template #avatar>
<a-avatar
style="border-radius: 0"
:src="item.icon"
/>
<a-avatar style="border-radius: 0" :src="item.icon" />
</template>
</a-list-item-meta>
</a-list-item>
@@ -62,7 +67,10 @@ const renderTitle = (title) => {
const renderDesc = (desc) => {
if (desc.length > 80) {
return `${desc.substr(0, 63)}...${desc.substr(desc.length - 14, desc.length)}`
return `${desc.substr(0, 63)}...${desc.substr(
desc.length - 14,
desc.length
)}`;
}
return desc;
};
@@ -79,7 +87,6 @@ const sort = (options) => {
}
return options;
};
</script>
<style lang="less">