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

chore: build

上级 f828eb78
...@@ -99,8 +99,8 @@ var serviceContext = (function (vue) { ...@@ -99,8 +99,8 @@ var serviceContext = (function (vue) {
map[list[i]] = true; map[list[i]] = true;
} }
return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val];
} }
(process.env.NODE_ENV !== 'production') (process.env.NODE_ENV !== 'production')
? Object.freeze({}) ? Object.freeze({})
: {}; : {};
......
import { createElementVNode, defineComponent, createVNode, mergeProps, getCurrentInstance, provide, watch, onUnmounted, shallowRef, reactive, watchEffect, ref, inject, onBeforeUnmount, computed, Text, isVNode, Fragment, onMounted } from "vue"; import { createElementVNode, defineComponent, createVNode, mergeProps, getCurrentInstance, provide, watch, onUnmounted, shallowRef, reactive, watchEffect, ref, inject, onBeforeUnmount, computed, Text, isVNode, Fragment, onMounted } from "vue";
import { hasOwn, extend, isPlainObject } from "@vue/shared"; import { extend, hasOwn, isPlainObject } from "@vue/shared";
import { cacheStringFunction } from "@dcloudio/uni-shared"; import { cacheStringFunction, PRIMARY_COLOR } from "@dcloudio/uni-shared";
const OPEN_TYPES = [ const OPEN_TYPES = [
"navigate", "navigate",
"redirect", "redirect",
...@@ -1751,11 +1751,189 @@ function useMovableViewState(props, trigger, rootRef, setTouchMovableViewContext ...@@ -1751,11 +1751,189 @@ function useMovableViewState(props, trigger, rootRef, setTouchMovableViewContext
}; };
return touchStart; return touchStart;
} }
const FONT_SIZE = 16;
const PROGRESS_VALUES = {
activeColor: PRIMARY_COLOR,
backgroundColor: "#EBEBEB",
activeMode: "backwards"
};
const progressProps = {
percent: {
type: [Number, String],
default: 0,
validator(value) {
return !isNaN(parseFloat(value));
}
},
fontSize: {
type: [String, Number],
default: FONT_SIZE
},
showInfo: {
type: [Boolean, String],
default: false
},
strokeWidth: {
type: [Number, String],
default: 6,
validator(value) {
return !isNaN(parseFloat(value));
}
},
color: {
type: String,
default: PROGRESS_VALUES.activeColor
},
activeColor: {
type: String,
default: PROGRESS_VALUES.activeColor
},
backgroundColor: {
type: String,
default: PROGRESS_VALUES.backgroundColor
},
active: {
type: [Boolean, String],
default: false
},
activeMode: {
type: String,
default: PROGRESS_VALUES.activeMode
},
duration: {
type: [Number, String],
default: 30,
validator(value) {
return !isNaN(parseFloat(value));
}
}
};
const progressStyles = [{
"uni-progress": {
flex: 1,
flexDirection: "row",
alignItems: "center"
},
"uni-progress-bar": {
flex: 1
},
"uni-progress-inner-bar": {
position: "absolute"
},
"uni-progress-info": {
marginLeft: "15px"
}
}];
var Progress = defineComponent({
name: "Progress",
props: progressProps,
styles: progressStyles,
emits: ["activeend"],
setup(props, {
emit
}) {
const progressRef = ref(null);
const progressBarRef = ref(null);
const trigger = useCustomEvent(progressRef, emit);
const state = useProgressState(props);
watch(() => state.realPercent, (newValue, oldValue) => {
state.lastPercent = oldValue || 0;
_activeAnimation(state, props, trigger);
});
onMounted(() => {
setTimeout(() => {
getComponentSize(progressBarRef.value).then(({
width
}) => {
state.progressWidth = width || 0;
_activeAnimation(state, props, trigger);
});
}, 50);
});
return () => {
const {
showInfo,
fontSize
} = props;
const {
outerBarStyle,
innerBarStyle,
currentPercent
} = state;
return createVNode("div", {
"ref": progressRef,
"class": "uni-progress"
}, [createVNode("div", {
"ref": progressBarRef,
"style": outerBarStyle,
"class": "uni-progress-bar"
}, [createVNode("div", {
"style": innerBarStyle,
"class": "uni-progress-inner-bar"
}, null)]), showInfo ? createNVueTextVNode(currentPercent + "%", {
class: "uni-progress-info",
style: {
fontSize
}
}) : null]);
};
}
});
function useProgressState(props) {
const currentPercent = ref(0);
const progressWidth = ref(0);
const outerBarStyle = computed(() => ({
backgroundColor: props.backgroundColor,
height: props.strokeWidth
}));
const innerBarStyle = computed(() => {
const backgroundColor = props.color !== PROGRESS_VALUES.activeColor && props.activeColor === PROGRESS_VALUES.activeColor ? props.color : props.activeColor;
return {
width: currentPercent.value * progressWidth.value / 100,
height: props.strokeWidth,
backgroundColor
};
});
const realPercent = computed(() => {
let realValue = parseFloat(props.percent);
realValue < 0 && (realValue = 0);
realValue > 100 && (realValue = 100);
return realValue;
});
const state = reactive({
outerBarStyle,
innerBarStyle,
realPercent,
currentPercent,
strokeTimer: 0,
lastPercent: 0,
progressWidth
});
return state;
}
function _activeAnimation(state, props, trigger) {
state.strokeTimer && clearInterval(state.strokeTimer);
if (props.active) {
state.currentPercent = props.activeMode === PROGRESS_VALUES.activeMode ? 0 : state.lastPercent;
state.strokeTimer = setInterval(() => {
if (state.currentPercent + 1 > state.realPercent) {
state.currentPercent = state.realPercent;
state.strokeTimer && clearInterval(state.strokeTimer);
trigger("activeend", {});
} else {
state.currentPercent += 1;
}
}, parseFloat(props.duration));
} else {
state.currentPercent = state.realPercent;
}
}
var components = { var components = {
Navigator, Navigator,
Label, Label,
Button, Button,
MovableArea, MovableArea,
MovableView MovableView,
Progress
}; };
export { components as default }; export { components as default };
...@@ -1626,7 +1626,7 @@ function getTempCanvas(width = 0, height = 0) { ...@@ -1626,7 +1626,7 @@ function getTempCanvas(width = 0, height = 0) {
tempCanvas.height = height; tempCanvas.height = height;
return tempCanvas; return tempCanvas;
} }
const props$q = { const props$p = {
canvasId: { canvasId: {
type: String, type: String,
default: "" default: ""
...@@ -1646,7 +1646,7 @@ var index$B = /* @__PURE__ */ defineBuiltInComponent({ ...@@ -1646,7 +1646,7 @@ var index$B = /* @__PURE__ */ defineBuiltInComponent({
compatConfig: { compatConfig: {
MODE: 3 MODE: 3
}, },
props: props$q, props: props$p,
computed: { computed: {
id() { id() {
return this.canvasId; return this.canvasId;
...@@ -2104,7 +2104,7 @@ function useMethods(props2, canvasRef, actionsWaiting) { ...@@ -2104,7 +2104,7 @@ function useMethods(props2, canvasRef, actionsWaiting) {
}); });
} }
const uniCheckGroupKey = PolySymbol(process.env.NODE_ENV !== "production" ? "uniCheckGroup" : "ucg"); const uniCheckGroupKey = PolySymbol(process.env.NODE_ENV !== "production" ? "uniCheckGroup" : "ucg");
const props$p = { const props$o = {
name: { name: {
type: String, type: String,
default: "" default: ""
...@@ -2112,7 +2112,7 @@ const props$p = { ...@@ -2112,7 +2112,7 @@ const props$p = {
}; };
var index$A = /* @__PURE__ */ defineBuiltInComponent({ var index$A = /* @__PURE__ */ defineBuiltInComponent({
name: "CheckboxGroup", name: "CheckboxGroup",
props: props$p, props: props$o,
emits: ["change"], emits: ["change"],
setup(props2, { setup(props2, {
emit: emit2, emit: emit2,
...@@ -2164,7 +2164,7 @@ function useProvideCheckGroup(props2, trigger) { ...@@ -2164,7 +2164,7 @@ function useProvideCheckGroup(props2, trigger) {
} }
return getFieldsValue; return getFieldsValue;
} }
const props$o = { const props$n = {
checked: { checked: {
type: [Boolean, String], type: [Boolean, String],
default: false default: false
...@@ -2188,7 +2188,7 @@ const props$o = { ...@@ -2188,7 +2188,7 @@ const props$o = {
}; };
var index$z = /* @__PURE__ */ defineBuiltInComponent({ var index$z = /* @__PURE__ */ defineBuiltInComponent({
name: "Checkbox", name: "Checkbox",
props: props$o, props: props$n,
setup(props2, { setup(props2, {
slots slots
}) { }) {
...@@ -2255,7 +2255,7 @@ function useCheckboxInject(checkboxChecked, checkboxValue, reset) { ...@@ -2255,7 +2255,7 @@ function useCheckboxInject(checkboxChecked, checkboxValue, reset) {
let resetTimer; let resetTimer;
function iosHideKeyboard() { function iosHideKeyboard() {
} }
const props$n = { const props$m = {
cursorSpacing: { cursorSpacing: {
type: [Number, String], type: [Number, String],
default: 0 default: 0
...@@ -2427,7 +2427,7 @@ function useQuill(props2, rootRef, trigger) { ...@@ -2427,7 +2427,7 @@ function useQuill(props2, rootRef, trigger) {
useContextInfo(); useContextInfo();
useSubscribe(); useSubscribe();
} }
const props$m = /* @__PURE__ */ shared.extend({}, props$n, { const props$l = /* @__PURE__ */ shared.extend({}, props$m, {
id: { id: {
type: String, type: String,
default: "" default: ""
...@@ -2455,7 +2455,7 @@ const props$m = /* @__PURE__ */ shared.extend({}, props$n, { ...@@ -2455,7 +2455,7 @@ const props$m = /* @__PURE__ */ shared.extend({}, props$n, {
}); });
var index$y = /* @__PURE__ */ defineBuiltInComponent({ var index$y = /* @__PURE__ */ defineBuiltInComponent({
name: "Editor", name: "Editor",
props: props$m, props: props$l,
emit: ["ready", "focus", "blur", "input", "statuschange", ...emit$1], emit: ["ready", "focus", "blur", "input", "statuschange", ...emit$1],
setup(props2, { setup(props2, {
emit: emit2 emit: emit2
...@@ -2541,7 +2541,7 @@ var index$x = /* @__PURE__ */ defineBuiltInComponent({ ...@@ -2541,7 +2541,7 @@ var index$x = /* @__PURE__ */ defineBuiltInComponent({
}; };
} }
}); });
const props$l = { const props$k = {
src: { src: {
type: String, type: String,
default: "" default: ""
...@@ -2580,7 +2580,7 @@ const IMAGE_MODES = { ...@@ -2580,7 +2580,7 @@ const IMAGE_MODES = {
}; };
var index$w = /* @__PURE__ */ defineBuiltInComponent({ var index$w = /* @__PURE__ */ defineBuiltInComponent({
name: "Image", name: "Image",
props: props$l, props: props$k,
setup(props2, { setup(props2, {
emit: emit2 emit: emit2
}) { }) {
...@@ -2829,7 +2829,7 @@ const UniViewJSBridgeSubscribe = function() { ...@@ -2829,7 +2829,7 @@ const UniViewJSBridgeSubscribe = function() {
function getValueString(value) { function getValueString(value) {
return value === null ? "" : String(value); return value === null ? "" : String(value);
} }
const props$k = /* @__PURE__ */ shared.extend({}, { const props$j = /* @__PURE__ */ shared.extend({}, {
name: { name: {
type: String, type: String,
default: "" default: ""
...@@ -2898,7 +2898,7 @@ const props$k = /* @__PURE__ */ shared.extend({}, { ...@@ -2898,7 +2898,7 @@ const props$k = /* @__PURE__ */ shared.extend({}, {
type: Boolean, type: Boolean,
default: false default: false
} }
}, props$n); }, props$m);
const emit = [ const emit = [
"input", "input",
"focus", "focus",
...@@ -3093,7 +3093,7 @@ function useField(props2, rootRef, emit2, beforeInput) { ...@@ -3093,7 +3093,7 @@ function useField(props2, rootRef, emit2, beforeInput) {
trigger trigger
}; };
} }
const props$j = /* @__PURE__ */ shared.extend({}, props$k, { const props$i = /* @__PURE__ */ shared.extend({}, props$j, {
placeholderClass: { placeholderClass: {
type: String, type: String,
default: "input-placeholder" default: "input-placeholder"
...@@ -3105,7 +3105,7 @@ const props$j = /* @__PURE__ */ shared.extend({}, props$k, { ...@@ -3105,7 +3105,7 @@ const props$j = /* @__PURE__ */ shared.extend({}, props$k, {
}); });
var Input = /* @__PURE__ */ defineBuiltInComponent({ var Input = /* @__PURE__ */ defineBuiltInComponent({
name: "Input", name: "Input",
props: props$j, props: props$i,
emits: ["confirm", ...emit], emits: ["confirm", ...emit],
setup(props2, { setup(props2, {
emit: emit2 emit: emit2
...@@ -4550,12 +4550,13 @@ var PickerViewColumn = /* @__PURE__ */ defineBuiltInComponent({ ...@@ -4550,12 +4550,13 @@ var PickerViewColumn = /* @__PURE__ */ defineBuiltInComponent({
}; };
} }
}); });
const VALUES = { const FONT_SIZE = 16;
const PROGRESS_VALUES = {
activeColor: uniShared.PRIMARY_COLOR, activeColor: uniShared.PRIMARY_COLOR,
backgroundColor: "#EBEBEB", backgroundColor: "#EBEBEB",
activeMode: "backwards" activeMode: "backwards"
}; };
const props$i = { const progressProps = {
percent: { percent: {
type: [Number, String], type: [Number, String],
default: 0, default: 0,
...@@ -4563,6 +4564,10 @@ const props$i = { ...@@ -4563,6 +4564,10 @@ const props$i = {
return !isNaN(parseFloat(value)); return !isNaN(parseFloat(value));
} }
}, },
fontSize: {
type: [String, Number],
default: FONT_SIZE
},
showInfo: { showInfo: {
type: [Boolean, String], type: [Boolean, String],
default: false default: false
...@@ -4576,15 +4581,15 @@ const props$i = { ...@@ -4576,15 +4581,15 @@ const props$i = {
}, },
color: { color: {
type: String, type: String,
default: VALUES.activeColor default: PROGRESS_VALUES.activeColor
}, },
activeColor: { activeColor: {
type: String, type: String,
default: VALUES.activeColor default: PROGRESS_VALUES.activeColor
}, },
backgroundColor: { backgroundColor: {
type: String, type: String,
default: VALUES.backgroundColor default: PROGRESS_VALUES.backgroundColor
}, },
active: { active: {
type: [Boolean, String], type: [Boolean, String],
...@@ -4592,7 +4597,7 @@ const props$i = { ...@@ -4592,7 +4597,7 @@ const props$i = {
}, },
activeMode: { activeMode: {
type: String, type: String,
default: VALUES.activeMode default: PROGRESS_VALUES.activeMode
}, },
duration: { duration: {
type: [Number, String], type: [Number, String],
...@@ -4604,7 +4609,7 @@ const props$i = { ...@@ -4604,7 +4609,7 @@ const props$i = {
}; };
var index$s = /* @__PURE__ */ defineBuiltInComponent({ var index$s = /* @__PURE__ */ defineBuiltInComponent({
name: "Progress", name: "Progress",
props: props$i, props: progressProps,
setup(props2) { setup(props2) {
const state = useProgressState(props2); const state = useProgressState(props2);
_activeAnimation(state, props2); _activeAnimation(state, props2);
...@@ -4640,7 +4645,7 @@ function useProgressState(props2) { ...@@ -4640,7 +4645,7 @@ function useProgressState(props2) {
const currentPercent = vue.ref(0); const currentPercent = vue.ref(0);
const outerBarStyle = vue.computed(() => `background-color: ${props2.backgroundColor}; height: ${props2.strokeWidth}px;`); const outerBarStyle = vue.computed(() => `background-color: ${props2.backgroundColor}; height: ${props2.strokeWidth}px;`);
const innerBarStyle = vue.computed(() => { const innerBarStyle = vue.computed(() => {
const backgroundColor = props2.color !== VALUES.activeColor && props2.activeColor === VALUES.activeColor ? props2.color : props2.activeColor; const backgroundColor = props2.color !== PROGRESS_VALUES.activeColor && props2.activeColor === PROGRESS_VALUES.activeColor ? props2.color : props2.activeColor;
return `width: ${currentPercent.value}%;background-color: ${backgroundColor}`; return `width: ${currentPercent.value}%;background-color: ${backgroundColor}`;
}); });
const realPercent = vue.computed(() => { const realPercent = vue.computed(() => {
...@@ -4661,7 +4666,7 @@ function useProgressState(props2) { ...@@ -4661,7 +4666,7 @@ function useProgressState(props2) {
} }
function _activeAnimation(state, props2) { function _activeAnimation(state, props2) {
if (props2.active) { if (props2.active) {
state.currentPercent = props2.activeMode === VALUES.activeMode ? 0 : state.lastPercent; state.currentPercent = props2.activeMode === PROGRESS_VALUES.activeMode ? 0 : state.lastPercent;
state.strokeTimer = setInterval(() => { state.strokeTimer = setInterval(() => {
if (state.currentPercent + 1 > state.realPercent) { if (state.currentPercent + 1 > state.realPercent) {
state.currentPercent = state.realPercent; state.currentPercent = state.realPercent;
...@@ -6370,7 +6375,7 @@ var index$j = /* @__PURE__ */ defineBuiltInComponent({ ...@@ -6370,7 +6375,7 @@ var index$j = /* @__PURE__ */ defineBuiltInComponent({
}; };
} }
}); });
const props$9 = /* @__PURE__ */ shared.extend({}, props$k, { const props$9 = /* @__PURE__ */ shared.extend({}, props$j, {
placeholderClass: { placeholderClass: {
type: String, type: String,
default: "input-placeholder" default: "input-placeholder"
......
...@@ -6416,7 +6416,7 @@ function getTempCanvas(width = 0, height = 0) { ...@@ -6416,7 +6416,7 @@ function getTempCanvas(width = 0, height = 0) {
tempCanvas.height = height; tempCanvas.height = height;
return tempCanvas; return tempCanvas;
} }
const props$x = { const props$w = {
canvasId: { canvasId: {
type: String, type: String,
default: "" default: ""
...@@ -6436,7 +6436,7 @@ var index$w = /* @__PURE__ */ defineBuiltInComponent({ ...@@ -6436,7 +6436,7 @@ var index$w = /* @__PURE__ */ defineBuiltInComponent({
compatConfig: { compatConfig: {
MODE: 3 MODE: 3
}, },
props: props$x, props: props$w,
computed: { computed: {
id() { id() {
return this.canvasId; return this.canvasId;
...@@ -6897,7 +6897,7 @@ function useMethods(props2, canvasRef, actionsWaiting) { ...@@ -6897,7 +6897,7 @@ function useMethods(props2, canvasRef, actionsWaiting) {
}); });
} }
const uniCheckGroupKey = PolySymbol(process.env.NODE_ENV !== "production" ? "uniCheckGroup" : "ucg"); const uniCheckGroupKey = PolySymbol(process.env.NODE_ENV !== "production" ? "uniCheckGroup" : "ucg");
const props$w = { const props$v = {
name: { name: {
type: String, type: String,
default: "" default: ""
...@@ -6905,7 +6905,7 @@ const props$w = { ...@@ -6905,7 +6905,7 @@ const props$w = {
}; };
var index$v = /* @__PURE__ */ defineBuiltInComponent({ var index$v = /* @__PURE__ */ defineBuiltInComponent({
name: "CheckboxGroup", name: "CheckboxGroup",
props: props$w, props: props$v,
emits: ["change"], emits: ["change"],
setup(props2, { setup(props2, {
emit: emit2, emit: emit2,
...@@ -6957,7 +6957,7 @@ function useProvideCheckGroup(props2, trigger) { ...@@ -6957,7 +6957,7 @@ function useProvideCheckGroup(props2, trigger) {
} }
return getFieldsValue; return getFieldsValue;
} }
const props$v = { const props$u = {
checked: { checked: {
type: [Boolean, String], type: [Boolean, String],
default: false default: false
...@@ -6981,7 +6981,7 @@ const props$v = { ...@@ -6981,7 +6981,7 @@ const props$v = {
}; };
var index$u = /* @__PURE__ */ defineBuiltInComponent({ var index$u = /* @__PURE__ */ defineBuiltInComponent({
name: "Checkbox", name: "Checkbox",
props: props$v, props: props$u,
setup(props2, { setup(props2, {
slots slots
}) { }) {
...@@ -7058,7 +7058,7 @@ function useCheckboxInject(checkboxChecked, checkboxValue, reset) { ...@@ -7058,7 +7058,7 @@ function useCheckboxInject(checkboxChecked, checkboxValue, reset) {
let resetTimer; let resetTimer;
function iosHideKeyboard() { function iosHideKeyboard() {
} }
const props$u = { const props$t = {
cursorSpacing: { cursorSpacing: {
type: [Number, String], type: [Number, String],
default: 0 default: 0
...@@ -7835,7 +7835,7 @@ function useQuill(props2, rootRef, trigger) { ...@@ -7835,7 +7835,7 @@ function useQuill(props2, rootRef, trigger) {
} }
}, id2, true); }, id2, true);
} }
const props$t = /* @__PURE__ */ extend({}, props$u, { const props$s = /* @__PURE__ */ extend({}, props$t, {
id: { id: {
type: String, type: String,
default: "" default: ""
...@@ -7863,7 +7863,7 @@ const props$t = /* @__PURE__ */ extend({}, props$u, { ...@@ -7863,7 +7863,7 @@ const props$t = /* @__PURE__ */ extend({}, props$u, {
}); });
var index$t = /* @__PURE__ */ defineBuiltInComponent({ var index$t = /* @__PURE__ */ defineBuiltInComponent({
name: "Editor", name: "Editor",
props: props$t, props: props$s,
emit: ["ready", "focus", "blur", "input", "statuschange", ...emit$1], emit: ["ready", "focus", "blur", "input", "statuschange", ...emit$1],
setup(props2, { setup(props2, {
emit: emit2 emit: emit2
...@@ -7950,7 +7950,7 @@ var index$s = /* @__PURE__ */ defineBuiltInComponent({ ...@@ -7950,7 +7950,7 @@ var index$s = /* @__PURE__ */ defineBuiltInComponent({
}; };
} }
}); });
const props$s = { const props$r = {
src: { src: {
type: String, type: String,
default: "" default: ""
...@@ -7989,7 +7989,7 @@ const IMAGE_MODES = { ...@@ -7989,7 +7989,7 @@ const IMAGE_MODES = {
}; };
var index$r = /* @__PURE__ */ defineBuiltInComponent({ var index$r = /* @__PURE__ */ defineBuiltInComponent({
name: "Image", name: "Image",
props: props$s, props: props$r,
setup(props2, { setup(props2, {
emit: emit2 emit: emit2
}) { }) {
...@@ -8303,7 +8303,7 @@ const UniViewJSBridgeSubscribe = function() { ...@@ -8303,7 +8303,7 @@ const UniViewJSBridgeSubscribe = function() {
function getValueString(value) { function getValueString(value) {
return value === null ? "" : String(value); return value === null ? "" : String(value);
} }
const props$r = /* @__PURE__ */ extend({}, { const props$q = /* @__PURE__ */ extend({}, {
name: { name: {
type: String, type: String,
default: "" default: ""
...@@ -8372,7 +8372,7 @@ const props$r = /* @__PURE__ */ extend({}, { ...@@ -8372,7 +8372,7 @@ const props$r = /* @__PURE__ */ extend({}, {
type: Boolean, type: Boolean,
default: false default: false
} }
}, props$u); }, props$t);
const emit = [ const emit = [
"input", "input",
"focus", "focus",
...@@ -8576,7 +8576,7 @@ function useField(props2, rootRef, emit2, beforeInput) { ...@@ -8576,7 +8576,7 @@ function useField(props2, rootRef, emit2, beforeInput) {
trigger trigger
}; };
} }
const props$q = /* @__PURE__ */ extend({}, props$r, { const props$p = /* @__PURE__ */ extend({}, props$q, {
placeholderClass: { placeholderClass: {
type: String, type: String,
default: "input-placeholder" default: "input-placeholder"
...@@ -8588,7 +8588,7 @@ const props$q = /* @__PURE__ */ extend({}, props$r, { ...@@ -8588,7 +8588,7 @@ const props$q = /* @__PURE__ */ extend({}, props$r, {
}); });
var Input = /* @__PURE__ */ defineBuiltInComponent({ var Input = /* @__PURE__ */ defineBuiltInComponent({
name: "Input", name: "Input",
props: props$q, props: props$p,
emits: ["confirm", ...emit], emits: ["confirm", ...emit],
setup(props2, { setup(props2, {
emit: emit2 emit: emit2
...@@ -11136,12 +11136,13 @@ var PickerViewColumn = /* @__PURE__ */ defineBuiltInComponent({ ...@@ -11136,12 +11136,13 @@ var PickerViewColumn = /* @__PURE__ */ defineBuiltInComponent({
}; };
} }
}); });
const VALUES = { const FONT_SIZE = 16;
const PROGRESS_VALUES = {
activeColor: PRIMARY_COLOR, activeColor: PRIMARY_COLOR,
backgroundColor: "#EBEBEB", backgroundColor: "#EBEBEB",
activeMode: "backwards" activeMode: "backwards"
}; };
const props$p = { const progressProps = {
percent: { percent: {
type: [Number, String], type: [Number, String],
default: 0, default: 0,
...@@ -11149,6 +11150,10 @@ const props$p = { ...@@ -11149,6 +11150,10 @@ const props$p = {
return !isNaN(parseFloat(value)); return !isNaN(parseFloat(value));
} }
}, },
fontSize: {
type: [String, Number],
default: FONT_SIZE
},
showInfo: { showInfo: {
type: [Boolean, String], type: [Boolean, String],
default: false default: false
...@@ -11162,15 +11167,15 @@ const props$p = { ...@@ -11162,15 +11167,15 @@ const props$p = {
}, },
color: { color: {
type: String, type: String,
default: VALUES.activeColor default: PROGRESS_VALUES.activeColor
}, },
activeColor: { activeColor: {
type: String, type: String,
default: VALUES.activeColor default: PROGRESS_VALUES.activeColor
}, },
backgroundColor: { backgroundColor: {
type: String, type: String,
default: VALUES.backgroundColor default: PROGRESS_VALUES.backgroundColor
}, },
active: { active: {
type: [Boolean, String], type: [Boolean, String],
...@@ -11178,7 +11183,7 @@ const props$p = { ...@@ -11178,7 +11183,7 @@ const props$p = {
}, },
activeMode: { activeMode: {
type: String, type: String,
default: VALUES.activeMode default: PROGRESS_VALUES.activeMode
}, },
duration: { duration: {
type: [Number, String], type: [Number, String],
...@@ -11190,7 +11195,7 @@ const props$p = { ...@@ -11190,7 +11195,7 @@ const props$p = {
}; };
var index$p = /* @__PURE__ */ defineBuiltInComponent({ var index$p = /* @__PURE__ */ defineBuiltInComponent({
name: "Progress", name: "Progress",
props: props$p, props: progressProps,
setup(props2) { setup(props2) {
const state2 = useProgressState(props2); const state2 = useProgressState(props2);
_activeAnimation(state2, props2); _activeAnimation(state2, props2);
...@@ -11226,7 +11231,7 @@ function useProgressState(props2) { ...@@ -11226,7 +11231,7 @@ function useProgressState(props2) {
const currentPercent = ref(0); const currentPercent = ref(0);
const outerBarStyle = computed(() => `background-color: ${props2.backgroundColor}; height: ${props2.strokeWidth}px;`); const outerBarStyle = computed(() => `background-color: ${props2.backgroundColor}; height: ${props2.strokeWidth}px;`);
const innerBarStyle = computed(() => { const innerBarStyle = computed(() => {
const backgroundColor = props2.color !== VALUES.activeColor && props2.activeColor === VALUES.activeColor ? props2.color : props2.activeColor; const backgroundColor = props2.color !== PROGRESS_VALUES.activeColor && props2.activeColor === PROGRESS_VALUES.activeColor ? props2.color : props2.activeColor;
return `width: ${currentPercent.value}%;background-color: ${backgroundColor}`; return `width: ${currentPercent.value}%;background-color: ${backgroundColor}`;
}); });
const realPercent = computed(() => { const realPercent = computed(() => {
...@@ -11247,7 +11252,7 @@ function useProgressState(props2) { ...@@ -11247,7 +11252,7 @@ function useProgressState(props2) {
} }
function _activeAnimation(state2, props2) { function _activeAnimation(state2, props2) {
if (props2.active) { if (props2.active) {
state2.currentPercent = props2.activeMode === VALUES.activeMode ? 0 : state2.lastPercent; state2.currentPercent = props2.activeMode === PROGRESS_VALUES.activeMode ? 0 : state2.lastPercent;
state2.strokeTimer = setInterval(() => { state2.strokeTimer = setInterval(() => {
if (state2.currentPercent + 1 > state2.realPercent) { if (state2.currentPercent + 1 > state2.realPercent) {
state2.currentPercent = state2.realPercent; state2.currentPercent = state2.realPercent;
...@@ -13280,7 +13285,7 @@ var index$j = /* @__PURE__ */ defineBuiltInComponent({ ...@@ -13280,7 +13285,7 @@ var index$j = /* @__PURE__ */ defineBuiltInComponent({
}; };
} }
}); });
const props$g = /* @__PURE__ */ extend({}, props$r, { const props$g = /* @__PURE__ */ extend({}, props$q, {
placeholderClass: { placeholderClass: {
type: String, type: String,
default: "input-placeholder" default: "input-placeholder"
......
...@@ -104,6 +104,7 @@ const NVUE_BUILT_IN_TAGS = [ ...@@ -104,6 +104,7 @@ const NVUE_BUILT_IN_TAGS = [
'timepicker', 'timepicker',
'marquee', 'marquee',
'countdown', 'countdown',
'dc-switch',
]; ];
const NVUE_U_BUILT_IN_TAGS = [ const NVUE_U_BUILT_IN_TAGS = [
'text', 'text',
...@@ -113,6 +114,8 @@ const NVUE_U_BUILT_IN_TAGS = [ ...@@ -113,6 +114,8 @@ const NVUE_U_BUILT_IN_TAGS = [
'video', 'video',
'web-view', 'web-view',
'slider', 'slider',
'ad',
'ad-draw',
]; ];
function isBuiltInComponent(tag) { function isBuiltInComponent(tag) {
// h5 平台会被转换为 v-uni- // h5 平台会被转换为 v-uni-
......
...@@ -100,6 +100,7 @@ const NVUE_BUILT_IN_TAGS = [ ...@@ -100,6 +100,7 @@ const NVUE_BUILT_IN_TAGS = [
'timepicker', 'timepicker',
'marquee', 'marquee',
'countdown', 'countdown',
'dc-switch',
]; ];
const NVUE_U_BUILT_IN_TAGS = [ const NVUE_U_BUILT_IN_TAGS = [
'text', 'text',
...@@ -109,6 +110,8 @@ const NVUE_U_BUILT_IN_TAGS = [ ...@@ -109,6 +110,8 @@ const NVUE_U_BUILT_IN_TAGS = [
'video', 'video',
'web-view', 'web-view',
'slider', 'slider',
'ad',
'ad-draw',
]; ];
function isBuiltInComponent(tag) { function isBuiltInComponent(tag) {
// h5 平台会被转换为 v-uni- // h5 平台会被转换为 v-uni-
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册