格式化

This commit is contained in:
Theluyuan 2023-05-05 09:59:16 +08:00
parent 1686971f8c
commit a19040aa60
4 changed files with 26 additions and 24 deletions

View File

@ -77,7 +77,7 @@ const props = withDefaults(defineProps<TableProps>(), {
loading: false, loading: false,
getCheckboxProps: () => {}, getCheckboxProps: () => {},
getRadioProps: () => {}, getRadioProps: () => {},
download:"" download: "",
}); });
const emit = defineEmits([ const emit = defineEmits([
@ -423,7 +423,7 @@ const exportData = () => {
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table> <table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
</body> </body>
</html>`; </html>`;
let a = document.createElement("a") let a = document.createElement("a");
a.href = uri + base64(exportTemplate); a.href = uri + base64(exportTemplate);
a.download = (props.download || "下载文件") + ".xls"; a.download = (props.download || "下载文件") + ".xls";
a.click(); a.click();

View File

@ -20,7 +20,11 @@
class="layui-icon layui-icon-right" style="float: right"></i></li> --> class="layui-icon layui-icon-right" style="float: right"></i></li> -->
<li class="soul-dropList" style="" show="select"> <li class="soul-dropList" style="" show="select">
<i class="soul-icon soul-icon-drop-list" show="select"></i> 筛选数据 <i class="soul-icon soul-icon-drop-list" show="select"></i> 筛选数据
<i class="layui-icon layui-icon-right" style="float: right" show="select"></i> <i
class="layui-icon layui-icon-right"
style="float: right"
show="select"
></i>
</li> </li>
<li <li
@click="daochu" @click="daochu"
@ -54,7 +58,7 @@
<i class="soul-icon"></i>反选 <i class="soul-icon"></i>反选
</div> </div>
</div> </div>
<ul style="max-height: 300px;overflow: auto;"> <ul style="max-height: 300px; overflow: auto">
<LayCheckboxGroup v-model="sel"> <LayCheckboxGroup v-model="sel">
<li v-for="(i, j) in list"> <li v-for="(i, j) in list">
<LayCheckbox skin="primary" :value="i"></LayCheckbox>{{ i }} <LayCheckbox skin="primary" :value="i"></LayCheckbox>{{ i }}
@ -83,9 +87,9 @@ const props = withDefaults(defineProps<SoulTableProps>(), {
left: 10, left: 10,
list: [], list: [],
soulkey: "", soulkey: "",
show:false show: false,
}); });
const emit = defineEmits(["asc", "desc", "sx",'daochu']); const emit = defineEmits(["asc", "desc", "sx", "daochu"]);
function asc(event: any) { function asc(event: any) {
emit("asc", event); emit("asc", event);
} }
@ -93,7 +97,7 @@ function desc(event: any) {
emit("desc", event); emit("desc", event);
} }
function daochu() { function daochu() {
emit("daochu") emit("daochu");
} }
const sel: any = ref([]); const sel: any = ref([]);
const list: any = ref([]); const list: any = ref([]);
@ -108,7 +112,7 @@ watch(
} }
alllist.value = Array.from(set); alllist.value = Array.from(set);
list.value = alllist.value; list.value = alllist.value;
selshow.value = false selshow.value = false;
// console.log(list.value); // console.log(list.value);
}, },
{ deep: true } { deep: true }
@ -158,13 +162,11 @@ function select(type: number) {
} }
const selshow = ref(false); const selshow = ref(false);
function shubiao(event: any) { function shubiao(event: any) {
console.log(event,160) console.log(event, 160);
if (event.target.getAttribute("show") == "select") { if (event.target.getAttribute("show") == "select") {
selshow.value = true selshow.value = true;
} else { } else {
selshow.value = false selshow.value = false;
} }
} }
</script> </script>

View File

@ -71,7 +71,7 @@ const nodeIconType = (node: TreeData): string => {
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction"; return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
} }
if (props.hideicon) { if (props.hideicon) {
return "" return "";
} }
return "layui-icon-file"; return "layui-icon-file";
}; };