Compare commits

..

No commits in common. "a19040aa60c871d9ffbec711095bc0da10985a18" and "bcbe71c7ad93abf8fd40d63983bb5f1f1621ca15" have entirely different histories.

12 changed files with 215 additions and 332 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -23,8 +23,7 @@ const _sfc_main$1 = defineComponent({
selectedKey: null,
checkStrictly: { type: [Boolean, String] },
collapseTransition: { type: Boolean },
onlyIconControl: { type: Boolean },
hideicon: { type: Boolean }
onlyIconControl: { type: Boolean }
},
emits: ["node-click"],
setup(__props, { emit }) {
@ -43,9 +42,6 @@ const _sfc_main$1 = defineComponent({
if (node.children.length !== 0) {
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
}
if (props.hideicon) {
return "";
}
return "layui-icon-file";
};
function recursiveNodeClick(node) {
@ -165,7 +161,6 @@ const _sfc_main$1 = defineComponent({
"collapse-transition": __props.collapseTransition,
checkStrictly: __props.checkStrictly,
"only-icon-control": __props.onlyIconControl,
hideicon: props.hideicon,
onNodeClick: recursiveNodeClick
}, createSlots({ _: 2 }, [
_ctx.$slots.title ? {
@ -177,7 +172,7 @@ const _sfc_main$1 = defineComponent({
]),
key: "0"
} : void 0
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selected-key", "collapse-transition", "checkStrictly", "only-icon-control", "hideicon"])
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selected-key", "collapse-transition", "checkStrictly", "only-icon-control"])
])) : createCommentVNode("", true)
]),
_: 2
@ -382,8 +377,7 @@ const _sfc_main = defineComponent({
children: "children",
title: "title"
};
} },
hideicon: { type: Boolean }
} }
},
emits: ["update:checkedKeys", "update:expandKeys", "node-click"],
setup(__props, { emit }) {
@ -445,8 +439,7 @@ const _sfc_main = defineComponent({
"check-strictly": __props.checkStrictly,
"collapse-transition": __props.collapseTransition,
"only-icon-control": __props.onlyIconControl,
onNodeClick: handleClick,
hideicon: props.hideicon
onNodeClick: handleClick
}, createSlots({ _: 2 }, [
_ctx.$slots.title ? {
name: "title",
@ -455,7 +448,7 @@ const _sfc_main = defineComponent({
]),
key: "0"
} : void 0
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selectedKey", "check-strictly", "collapse-transition", "only-icon-control", "hideicon"])
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selectedKey", "check-strictly", "collapse-transition", "only-icon-control"])
], 2);
};
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -52,7 +52,6 @@ export interface TableProps {
loading?: boolean;
getCheckboxProps?: Function;
getRadioProps?: Function;
download?: string;
}
const props = withDefaults(defineProps<TableProps>(), {
@ -77,7 +76,6 @@ const props = withDefaults(defineProps<TableProps>(), {
loading: false,
getCheckboxProps: () => {},
getRadioProps: () => {},
download: "",
});
const emit = defineEmits([
@ -288,7 +286,7 @@ watch(
const changeAll = (isChecked: boolean) => {
if (isChecked) {
const datasources = datalist.value.filter((item: any, index: number) => {
const datasources = props.dataSource.filter((item: any, index: number) => {
return !props.getCheckboxProps(item, index)?.disabled;
});
const ids = datasources.map((item) => {
@ -389,7 +387,7 @@ const exportData = () => {
}
tableStr += "</tr>";
}
datalist.value.forEach((item, rowIndex) => {
tableDataSource.value.forEach((item, rowIndex) => {
tableStr += "<tr>";
tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
Object.keys(item).forEach((name) => {
@ -423,11 +421,7 @@ const exportData = () => {
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
</body>
</html>`;
let a = document.createElement("a");
a.href = uri + base64(exportTemplate);
a.download = (props.download || "下载文件") + ".xls";
a.click();
// window.location.href =
window.location.href = uri + base64(exportTemplate);
return;
};
@ -1139,11 +1133,9 @@ window.addEventListener("click", heddin);
:top="soultop"
:left="soulleft"
v-show="soulkey == column.key"
:show="soulkey == column.key"
@asc="asc"
@desc="desc"
@daochu="exportData"
:list="datalist"
:list="props.dataSource"
:soulkey="column.key"
@sx="sx"
></soultable>

View File

@ -6,7 +6,7 @@
position: absolute;
z-index: 2147483647;
min-width: 160px;
max-width: 320px;
max-width: 300px;
overflow-y: auto;
border: 1px solid #e6e6e6;
border-radius: 5px;

View File

@ -4,7 +4,7 @@
:style="`top: ${props.top}px;left:${props.left}px`"
@click.stop=""
>
<ul @mouseover="shubiao">
<ul>
<li @click="asc" class="soul-sort" data-value="asc" style="">
<i class="soul-icon soul-icon-asc"></i> 升序排列
</li>
@ -18,21 +18,9 @@
</li>
<!-- <li class="soul-column" style=""><i class="layui-icon layui-icon-table"></i> 表格列 <i
class="layui-icon layui-icon-right" style="float: right"></i></li> -->
<li class="soul-dropList" style="" show="select">
<i class="soul-icon soul-icon-drop-list" show="select"></i> 筛选数据
<i
class="layui-icon layui-icon-right"
style="float: right"
show="select"
></i>
</li>
<li
@click="daochu"
class="soul-sort"
data-value="desc"
style="border-bottom: 1px solid rgb(230, 230, 230)"
>
<i class="soul-icon soul-icon-download"></i> 导出excel
<li class="soul-dropList" style="" @mouseover="selshow = true">
<i class="soul-icon soul-icon-drop-list"></i> 筛选数据
<i class="layui-icon layui-icon-right" style="float: right"></i>
</li>
<!-- <li class="soul-condition" style=""><i class="soul-icon soul-icon-query"></i> 筛选条件 <i
class="layui-icon layui-icon-right" style="float: right"></i></li>
@ -47,7 +35,7 @@
placeholder="关键字搜索"
>
</lay-input>
<div class="check" style="min-width: 190px">
<div class="check" style="min-width: 180px">
<div class="multiOption" data-type="all" @click="select(1)">
<i class="soul-icon"></i> 全选
</div>
@ -58,7 +46,7 @@
<i class="soul-icon"></i>反选
</div>
</div>
<ul style="max-height: 300px; overflow: auto">
<ul>
<LayCheckboxGroup v-model="sel">
<li v-for="(i, j) in list">
<LayCheckbox skin="primary" :value="i"></LayCheckbox>{{ i }}
@ -80,40 +68,34 @@ export interface SoulTableProps {
top: number;
list: any;
soulkey: string;
show: boolean;
}
const props = withDefaults(defineProps<SoulTableProps>(), {
top: 10,
left: 10,
list: [],
soulkey: "",
show: false,
});
const emit = defineEmits(["asc", "desc", "sx", "daochu"]);
const emit = defineEmits(["asc", "desc", "sx"]);
function asc(event: any) {
emit("asc", event);
}
function desc(event: any) {
emit("desc", event);
}
function daochu() {
emit("daochu");
}
const sel: any = ref([]);
const list: any = ref([]);
const alllist: any = ref([]);
watch(
() => [props.show],
() => [props.list, props.soulkey],
() => {
let set = new Set();
for (let i of props.list) {
set.add(i[props.soulkey]);
// console.log(i, i[props.soulkey]);
console.log(i, i[props.soulkey]);
}
alllist.value = Array.from(set);
list.value = alllist.value;
selshow.value = false;
// console.log(list.value);
console.log(list.value);
},
{ deep: true }
);
@ -161,12 +143,4 @@ function select(type: number) {
}
}
const selshow = ref(false);
function shubiao(event: any) {
console.log(event, 160);
if (event.target.getAttribute("show") == "select") {
selshow.value = true;
} else {
selshow.value = false;
}
}
</script>

View File

@ -35,7 +35,6 @@ export interface TreeNodeProps {
checkStrictly: boolean | string;
collapseTransition: boolean;
onlyIconControl: boolean;
hideicon?: boolean;
}
interface TreeNodeEmits {
@ -70,9 +69,6 @@ const nodeIconType = (node: TreeData): string => {
if (node.children.length !== 0) {
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
}
if (props.hideicon) {
return "";
}
return "layui-icon-file";
};
@ -197,7 +193,6 @@ const isChildAllSelected = computed(() => {
:collapse-transition="collapseTransition"
:checkStrictly="checkStrictly"
:only-icon-control="onlyIconControl"
:hideicon="props.hideicon"
@node-click="recursiveNodeClick"
>
<template v-if="$slots.title" v-slot:title="slotProp: { data: any }">

View File

@ -38,7 +38,6 @@ export interface TreeProps {
showLine?: boolean;
showCheckbox?: boolean;
replaceFields?: ReplaceFieldsOptions;
hideicon?: boolean;
}
interface TreeEmits {
@ -145,7 +144,6 @@ function handleClick(node: TreeData) {
:collapse-transition="collapseTransition"
:only-icon-control="onlyIconControl"
@node-click="handleClick"
:hideicon="props.hideicon"
>
<template v-if="$slots.title" v-slot:title="{ data }">
<slot name="title" :data="data"></slot>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long