test slider
This commit is contained in:
@@ -17,6 +17,7 @@ export interface StandardProps {
|
||||
min?: number;
|
||||
max?: number;
|
||||
showDots?: boolean;
|
||||
backgroundColor:string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<StandardProps>(), {
|
||||
@@ -26,6 +27,7 @@ const props = withDefaults(defineProps<StandardProps>(), {
|
||||
min: 0,
|
||||
max: 100,
|
||||
showDots: false,
|
||||
backgroundColor:"#ccc"
|
||||
});
|
||||
|
||||
const moveAction = throttle(standardMove);
|
||||
@@ -117,7 +119,9 @@ const focusDot = (val: number) => {
|
||||
class="layui-slider-rate-v"
|
||||
:class="[disabled ? 'layui-slider-disabled disable-line' : '']"
|
||||
></div>
|
||||
<div class="layui-slider-line-v"></div>
|
||||
<div class="layui-slider-line-v" :style="{
|
||||
backgroundColor:props.backgroundColor
|
||||
}"></div>
|
||||
<div
|
||||
v-show="showDots"
|
||||
@click="focusDot(item)"
|
||||
|
||||
@@ -22,6 +22,7 @@ export interface SliderProps {
|
||||
range?: boolean;
|
||||
rangeValue?: number[];
|
||||
showDots?: boolean;
|
||||
backgroundColor:string;
|
||||
}
|
||||
|
||||
const emit = defineEmits(["update:modelValue"]);
|
||||
@@ -34,6 +35,7 @@ const props = withDefaults(defineProps<SliderProps>(), {
|
||||
min: 0,
|
||||
max: 100,
|
||||
showDots: false,
|
||||
backgroundColor:"#ccc"
|
||||
});
|
||||
|
||||
let rangeValues: Ref<number[]> | any = toRef(props, "rangeValue");
|
||||
@@ -94,6 +96,7 @@ function valHook(val: any) {
|
||||
:min="min"
|
||||
:max="max"
|
||||
:showDots="showDots"
|
||||
:backgroundColor="props.backgroundColor"
|
||||
></StandardVue>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -314,8 +314,12 @@ watch(
|
||||
} else {
|
||||
hasChecked.value = false;
|
||||
}
|
||||
if(tableSelectedKeys.value != props.selectedKeys){
|
||||
console.log("初始化赋值触发修改",tableSelectedKeys.value,props.selectedKeys)
|
||||
if (tableSelectedKeys.value != props.selectedKeys) {
|
||||
console.log(
|
||||
"初始化赋值触发修改",
|
||||
tableSelectedKeys.value,
|
||||
props.selectedKeys
|
||||
);
|
||||
emit("update:selectedKeys", tableSelectedKeys.value);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -101,8 +101,8 @@ function handleTitleClick(node: TreeData) {
|
||||
if (!node.isDisabled) {
|
||||
emit("node-click", node);
|
||||
}
|
||||
if(props.showCheckbox){
|
||||
node.isChecked = !node.isChecked
|
||||
if (props.showCheckbox) {
|
||||
node.isChecked = !node.isChecked;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,13 +103,13 @@ watch(
|
||||
watch(
|
||||
() => props.checkedKeys,
|
||||
() => {
|
||||
console.log(tree.value)
|
||||
console.log(tree.value);
|
||||
if (!unWatch.value) {
|
||||
loadNodeList();
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
deep: true,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user