提交 0a261d00 编写于 作者: fxy060608's avatar fxy060608

chore: merge

......@@ -274,15 +274,6 @@ var Label = /* @__PURE__ */ defineComponent({
const pageId = useCurrentPageId();
const handlers = useProvideLabel();
const _onClick = ($event) => {
const EventTarget = $event.target;
const dataType = EventTarget.attr.dataUncType || "";
let stopPropagation = /^uni-(checkbox|radio|switch)-/.test(dataType);
if (!stopPropagation) {
stopPropagation = /^uni-(checkbox|radio|switch|button)$/i.test(dataType);
}
if (stopPropagation) {
return;
}
if (props2.for) {
UniViewJSBridge.emit(`uni-label-click-${pageId}-${props2.for}`, $event, true);
} else {
......@@ -2048,6 +2039,10 @@ const progressProps = {
validator(value) {
return !isNaN(parseFloat(value));
}
},
borderRadius: {
type: [Number, String],
default: 0
}
};
const progressStyles = [{
......@@ -2134,6 +2129,7 @@ function useProgressState(props2) {
const progressWidth = ref(0);
const outerBarStyle = computed(() => ({
backgroundColor: props2.backgroundColor,
borderRadius: props2.borderRadius,
height: props2.strokeWidth
}));
const innerBarStyle = computed(() => {
......@@ -2141,7 +2137,8 @@ function useProgressState(props2) {
return {
width: currentPercent.value * progressWidth.value / 100,
height: props2.strokeWidth,
backgroundColor
backgroundColor,
borderRadius: props2.borderRadius
};
});
const realPercent = computed(() => {
......@@ -2923,15 +2920,14 @@ const slierStyles = [{
position: "absolute",
width: 100,
height: "2",
background: "transparent",
zIndex: 1
background: "transparent"
}
},
"uni-slider-value": {
"": {
color: "#888888",
fontSize: "14",
marginRight: "14"
marginLeft: "14"
}
}
}];
......@@ -2988,7 +2984,7 @@ var USlider = defineComponent({
}, null)]), createVNode("div", {
"class": "uni-slider-thumb",
"style": thumbStyle
}, null)]), showValue ? createNVueTextVNode(sliderValue, {
}, null)]), showValue ? createNVueTextVNode(sliderValue + "", {
class: "uni-slider-value"
}) : null])]);
};
......@@ -3160,10 +3156,14 @@ var Switch = defineComponent({
});
}
};
const _onClick = ($event) => {
const _onClick = ($event, isLabelClick) => {
if (props2.disabled) {
return;
}
if (isLabelClick) {
rootRef.value.click();
return;
}
switchChecked.value = !switchChecked.value;
trigger("change", {
value: switchChecked.value
......@@ -3321,6 +3321,7 @@ var Checkbox = defineComponent({
}
if (isLabelClick) {
rootRef.value.click();
return;
}
checkboxChecked.value = !checkboxChecked.value;
uniCheckGroup && uniCheckGroup.checkboxChange($event);
......@@ -3565,6 +3566,7 @@ var Radio = defineComponent({
}
if (isLabelClick) {
rootRef.value.click();
return;
}
radioChecked.value = !radioChecked.value;
uniCheckGroup && uniCheckGroup.radioChange($event, field);
......
......@@ -58,4 +58,8 @@ export const progressProps = {
return !isNaN(parseFloat(value as string))
},
},
borderRadius: {
type: [Number, String],
default: 0,
},
}
......@@ -90,6 +90,7 @@ export default defineComponent({
}
if (isLabelClick) {
rootRef.value!.click()
return
}
checkboxChecked.value = !checkboxChecked.value
uniCheckGroup && uniCheckGroup.checkboxChange($event)
......
......@@ -4,9 +4,9 @@ import { labelProps, useProvideLabel } from '../../components/label'
export { UniLabelCtx, uniLabelKey } from '../../components/label'
type LabelTarget = HTMLElement & {
attr: { dataUncType: string }
}
// type LabelTarget = HTMLElement & {
// attr: { dataUncType: string }
// }
export default /*#__PURE__*/ defineComponent({
name: 'Label',
......@@ -17,15 +17,15 @@ export default /*#__PURE__*/ defineComponent({
const handlers = useProvideLabel()
const _onClick = ($event: Event) => {
const EventTarget = $event.target as LabelTarget
const dataType = EventTarget.attr.dataUncType || ''
let stopPropagation = /^uni-(checkbox|radio|switch)-/.test(dataType)
if (!stopPropagation) {
stopPropagation = /^uni-(checkbox|radio|switch|button)$/i.test(dataType)
}
if (stopPropagation) {
return
}
// const EventTarget = $event.target as LabelTarget
// const dataType = EventTarget.attr.dataUncType || ''
// let stopPropagation = /^uni-(checkbox|radio|switch)-/.test(dataType)
// if (!stopPropagation) {
// stopPropagation = /^uni-(checkbox|radio|switch|button)$/i.test(dataType)
// }
// if (stopPropagation) {
// return
// }
if (props.for) {
UniViewJSBridge.emit(
......
......@@ -108,6 +108,7 @@ function useProgressState(props: ProgressProps) {
const outerBarStyle = computed(() => ({
backgroundColor: props.backgroundColor,
borderRadius: props.borderRadius,
height: props.strokeWidth,
}))
const innerBarStyle = computed(() => {
......@@ -122,6 +123,7 @@ function useProgressState(props: ProgressProps) {
width: (currentPercent.value * progressWidth.value) / 100,
height: props.strokeWidth,
backgroundColor: backgroundColor,
borderRadius: props.borderRadius,
}
})
const realPercent = computed(() => {
......
......@@ -102,6 +102,7 @@ export default defineComponent({
}
if (isLabelClick) {
rootRef.value!.click()
return
}
radioChecked.value = !radioChecked.value
uniCheckGroup && uniCheckGroup.radioChange($event, field)
......
......@@ -97,14 +97,13 @@ const slierStyles: NVueComponentStyles = [
width: 100,
height: '2',
background: 'transparent',
zIndex: 1,
},
},
'uni-slider-value': {
'': {
color: '#888888',
fontSize: '14',
marginRight: '14',
marginLeft: '14',
},
},
},
......@@ -159,7 +158,7 @@ export default defineComponent({
<div class="uni-slider-thumb" style={thumbStyle}></div>
</div>
{showValue
? createNVueTextVNode(sliderValue as unknown as string, {
? createNVueTextVNode(sliderValue + '', {
class: 'uni-slider-value',
})
: null}
......
......@@ -52,10 +52,14 @@ export default defineComponent({
},
}
const _onClick = ($event: Event) => {
const _onClick = ($event: Event, isLabelClick?: boolean) => {
if (props.disabled) {
return
}
if (isLabelClick) {
rootRef.value!.click()
return
}
switchChecked.value = !switchChecked.value
trigger('change', {
value: switchChecked.value,
......
......@@ -4605,6 +4605,10 @@ const progressProps = {
validator(value) {
return !isNaN(parseFloat(value));
}
},
borderRadius: {
type: [Number, String],
default: 0
}
};
var index$s = /* @__PURE__ */ defineBuiltInComponent({
......
......@@ -11246,6 +11246,10 @@ const progressProps = {
validator(value) {
return !isNaN(parseFloat(value));
}
},
borderRadius: {
type: [Number, String],
default: 0
}
};
var index$p = /* @__PURE__ */ defineBuiltInComponent({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册