🔨 resolve conflicts

This commit is contained in:
layyback
2023-03-26 19:46:46 +08:00
52 changed files with 10156 additions and 739 deletions

View File

@@ -29,8 +29,9 @@
</template>
<script lang="ts" setup>
import BScroll from "@better-scroll/core";
import { defineProps, onMounted, ref } from "vue";
import BScroll from '@better-scroll/core';
import { defineProps, onMounted, ref } from 'vue';
const scrollDom = ref(null);
onMounted(() => {
@@ -40,32 +41,32 @@ onMounted(() => {
const props = defineProps({
searchValue: {
type: [String, Number],
default: ""
default: '',
},
options: {
type: Array,
default: (() => [])()
default: (() => [])(),
},
currentSelect: {
type: Number,
default: 0
default: 0,
},
currentPlugin: {},
clipboardFile: (() => [])()
clipboardFile: (() => [])(),
});
const renderTitle = title => {
if (typeof title !== "string") return;
const renderTitle = (title) => {
if (typeof title !== 'string') return;
if (!props.searchValue) return title;
const result = title.toLowerCase().split(props.searchValue.toLowerCase());
if (result && result.length > 1) {
return `<div>${result[0]}<span style="color: red">${props.searchValue}</span>${result[1]}</div>`;
return `<div>${result[0]}<span style='color: red'>${props.searchValue}</span>${result[1]}</div>`;
} else {
return `<div>${result[0]}</div>`;
}
};
const renderDesc = desc => {
const renderDesc = (desc) => {
if (desc.length > 80) {
return `${desc.substr(0, 63)}...${desc.substr(
desc.length - 14,
@@ -75,7 +76,7 @@ const renderDesc = desc => {
return desc;
};
const sort = options => {
const sort = (options) => {
for (let i = 0; i < options.length; i++) {
for (let j = i + 1; j < options.length; j++) {
if (options[j].zIndex > options[i].zIndex) {
@@ -96,7 +97,7 @@ const sort = options => {
left: 0;
width: 100%;
z-index: 99;
max-height: calc(~"100vh - 64px");
max-height: calc(~'100vh - 64px');
overflow: auto;
background: var(--color-body-bg);
.op-item {