✨(component): update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@layui/layui-vue",
|
||||
"version": "1.3.11",
|
||||
"version": "1.3.12-alpha.2",
|
||||
"author": "就眠儀式",
|
||||
"license": "MIT",
|
||||
"description": "a component library for Vue 3 base on layui-vue",
|
||||
@@ -34,7 +34,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@layui/icons-vue": "^1.0.9",
|
||||
"@layui/layer-vue": "^1.4.1",
|
||||
"@layui/layer-vue": "^1.4.2",
|
||||
"@vueuse/core": "^8.7.3",
|
||||
"async-validator": "^4.1.1",
|
||||
"cropperjs": "^1.5.12",
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user