vueless 0.0.447 → 0.0.449
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -198,13 +198,13 @@ const props = defineProps({
|
|
|
198
198
|
const emit = defineEmits([
|
|
199
199
|
/**
|
|
200
200
|
* Triggers when checkbox is toggled.
|
|
201
|
-
* @property {Boolean}
|
|
201
|
+
* @property {Boolean} modelValue
|
|
202
202
|
*/
|
|
203
203
|
"update:modelValue",
|
|
204
204
|
|
|
205
205
|
/**
|
|
206
206
|
* Triggers when checkbox is toggled.
|
|
207
|
-
* @property {Boolean}
|
|
207
|
+
* @property {Boolean} modelValue
|
|
208
208
|
*/
|
|
209
209
|
"input",
|
|
210
210
|
]);
|
package/ui.form-input/UInput.vue
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
>
|
|
25
25
|
<!--
|
|
26
26
|
@slot Use it to add icon before the text.
|
|
27
|
-
@binding {string}
|
|
28
|
-
@binding {string}
|
|
27
|
+
@binding {string} icon-name
|
|
28
|
+
@binding {string} icon-size
|
|
29
29
|
-->
|
|
30
30
|
<slot name="left-icon" :icon-name="leftIcon" :icon-size="iconSize">
|
|
31
31
|
<UIcon
|
package/ui.text-money/UMoney.vue
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<span
|
|
20
20
|
v-if="!integer"
|
|
21
21
|
v-bind="pennyAttrs"
|
|
22
|
-
v-text="preparedMoney.
|
|
22
|
+
v-text="preparedMoney.decimalSeparator + preparedMoney.penny"
|
|
23
23
|
/>
|
|
24
24
|
|
|
25
25
|
<span
|
|
@@ -118,11 +118,11 @@ const props = defineProps({
|
|
|
118
118
|
},
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
121
|
+
* A symbol used to separate the integer part from the fractional part of a number.
|
|
122
122
|
*/
|
|
123
|
-
|
|
123
|
+
decimalSeparator: {
|
|
124
124
|
type: String,
|
|
125
|
-
default: getDefault(defaultConfig, UMoney).
|
|
125
|
+
default: getDefault(defaultConfig, UMoney).decimalSeparator,
|
|
126
126
|
},
|
|
127
127
|
|
|
128
128
|
/**
|
|
@@ -200,6 +200,6 @@ const mathSign = computed(() => {
|
|
|
200
200
|
});
|
|
201
201
|
|
|
202
202
|
const preparedMoney = computed(() => {
|
|
203
|
-
return separatedMoney(Math.abs(props.sum), props.decimalScale, props.
|
|
203
|
+
return separatedMoney(Math.abs(props.sum), props.decimalScale, props.decimalSeparator);
|
|
204
204
|
});
|
|
205
205
|
</script>
|
package/ui.text-money/config.js
CHANGED
|
@@ -8,17 +8,22 @@ export const ADD_SPACE_IN_MONEY_REG_EX = /(\d)(?=(\d{3})+(\D|$))/g;
|
|
|
8
8
|
export const SINGLE_ZERO = "0";
|
|
9
9
|
export const DOUBLE_ZERO = "00";
|
|
10
10
|
|
|
11
|
-
export function separatedMoney(money, decimalPlaces = 2,
|
|
11
|
+
export function separatedMoney(money, decimalPlaces = 2, decimalSeparator = ",") {
|
|
12
12
|
const roundedMoney = money ? money.toFixed(decimalPlaces) : 0;
|
|
13
13
|
|
|
14
14
|
let [integer, penny] = String(roundedMoney).split(".");
|
|
15
15
|
|
|
16
16
|
integer = integer.replace(ADD_SPACE_IN_MONEY_REG_EX, "$1 ");
|
|
17
17
|
|
|
18
|
-
if (roundedMoney
|
|
18
|
+
if (!roundedMoney) {
|
|
19
19
|
integer = SINGLE_ZERO;
|
|
20
20
|
penny = DOUBLE_ZERO;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
if (decimalPlaces === 0) {
|
|
24
|
+
decimalSeparator = "";
|
|
25
|
+
penny = "";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return { integer, penny, decimalSeparator };
|
|
24
29
|
}
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.449",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -1592,7 +1592,7 @@
|
|
|
1592
1592
|
"type": [
|
|
1593
1593
|
"Boolean"
|
|
1594
1594
|
],
|
|
1595
|
-
"name": "
|
|
1595
|
+
"name": "modelValue"
|
|
1596
1596
|
}
|
|
1597
1597
|
]
|
|
1598
1598
|
},
|
|
@@ -1604,7 +1604,7 @@
|
|
|
1604
1604
|
"type": [
|
|
1605
1605
|
"Boolean"
|
|
1606
1606
|
],
|
|
1607
|
-
"name": "
|
|
1607
|
+
"name": "modelValue"
|
|
1608
1608
|
}
|
|
1609
1609
|
]
|
|
1610
1610
|
}
|
|
@@ -4690,9 +4690,11 @@
|
|
|
4690
4690
|
"description": "Use it to add icon before the text.",
|
|
4691
4691
|
"bindings": [
|
|
4692
4692
|
{
|
|
4693
|
+
"type": "string",
|
|
4693
4694
|
"name": "icon-name"
|
|
4694
4695
|
},
|
|
4695
4696
|
{
|
|
4697
|
+
"type": "string",
|
|
4696
4698
|
"name": "icon-size"
|
|
4697
4699
|
}
|
|
4698
4700
|
]
|
|
@@ -6631,8 +6633,8 @@
|
|
|
6631
6633
|
"default": "2"
|
|
6632
6634
|
},
|
|
6633
6635
|
{
|
|
6634
|
-
"name": "
|
|
6635
|
-
"description": "
|
|
6636
|
+
"name": "decimalSeparator",
|
|
6637
|
+
"description": "A symbol used to separate the integer part from the fractional part of a number.",
|
|
6636
6638
|
"value": {
|
|
6637
6639
|
"kind": "expression",
|
|
6638
6640
|
"type": "string"
|