(component): update

This commit is contained in:
就眠儀式
2022-08-03 14:15:46 +08:00
parent 7269d2d99a
commit 2a95b7a3e4
7 changed files with 48 additions and 451 deletions

View File

@@ -45,7 +45,7 @@ const isActive = computed({
},
});
const handleClick = function () {
const handleClick = () => {
if (!props.disabled) {
isActive.value = !isActive.value;
}
@@ -53,9 +53,7 @@ const handleClick = function () {
const styles = computed(() => {
return {
"background-color": isActive.value
? props.onswitchColor
: props.unswitchColor,
"background-color": isActive.value ? props.onswitchColor : props.unswitchColor,
};
});
</script>

View File

@@ -80,7 +80,6 @@ const slots = slot.default && slot.default();
const allChecked = ref(false);
const hasChecked = ref(false);
const tableDataSource = ref<any[]>([...props.dataSource]);
const tableSelectedKeys = ref<Recordable[]>([...props.selectedKeys]);
const tableColumns = ref([...props.columns]);
const tableColumnKeys = ref(
props.columns.map((item: any) => {
@@ -90,6 +89,12 @@ const tableColumnKeys = ref(
})
);
const tableSelectedKeys = ref<Recordable[]>([...props.selectedKeys]);
watch(() => props.selectedKeys, () => {
tableSelectedKeys.value = props.selectedKeys;
},{deep: true})
const tableSelectedKey: WritableComputedRef<Recordable[]> = computed({
get() {
return props.selectedKey;