@@ -1,10 +1,10 @@
.ant-switch-small {
.ant-switch-inner {
.ant-switch-inner-checked {
- margin-top: 2px;
+ margin-top: 2px !important;
}
.ant-switch-inner-unchecked {
- margin-top: -12px;
+ margin-top: -12px !important;
@@ -84,17 +84,19 @@
: 'transparent',
}"
@click="
- state.query.selectedMap.has(row.id)
- ? state.query.selectedMap.delete(row.id)
- : state.query.selectedMap.set(row.id, row)
+ state.isSelect
+ ? state.query.selectedMap.has(row.id)
+ ? state.query.selectedMap.delete(row.id)
+ : state.query.selectedMap.set(row.id, row)
+ : undefined
"
>
<div class="flex items-center gap-[0.5rem]">
<div class="text-[#303133] text-[1.13rem] font-bold" v-title>
{{ row.name }}
</div>
- <div class="ml-auto">
- <el-switch v-model="row.enable" size="small" />
+ <div class="ml-auto" @click.stop="onSwitch(row)">
+ <a-switch v-model:checked="row.enable" size="small" />
<div
@@ -295,6 +297,7 @@ const onKnowledge = (row: any = null) => {
state.knowledgeSelect.show = true
+const onSwitch = (row) => {}
onMounted(() => {
onReset()
})
@@ -112,13 +112,12 @@
class="flex items-center text-[0.75rem] text-[#6F7889] gap-[var(--czr-gap)] mt-[0.5rem]"
<div>URL:74.10.28.118:8080</div>
<a-switch
v-model:checked="row.enable"
checked-children="启用"
un-checked-children="停用"
size="small"
- @click.stop="onSwitch(row)"
/>
<el-tooltip content="编辑" effect="light" placement="top">
@@ -229,7 +228,7 @@ const onPage = (pageNum, pageSize) => {
p6: n % 4,
p7: n % 2,
tags: n % 2 ? '1,2,3,41,2,3,41,2,3,41,2,3,41,2,3,4' : '',
- enable: true,
+ enable: n % 2 == 0,
state.query.result.data = arr