A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/uiv-lib/uiv/commit/c7267b97611c5b9d15385b5be24b8bc78c8693a9 below:

progress bar props exact · uiv-lib/uiv@c7267b9 · GitHub

File tree Expand file treeCollapse file tree 8 files changed

+30

-61

lines changed

Filter options

Expand file treeCollapse file tree 8 files changed

+30

-61

lines changed Original file line number Diff line number Diff line change

@@ -91,8 +91,8 @@ const classes = computed(() => ({

91 91

active: props.inputType ? isInputActive.value : props.active,

92 92

disabled: props.disabled,

93 93

'btn-block': props.block,

94 -

[`btn-${props.type}`]: Boolean(props.type),

95 -

[`btn-${props.size}`]: Boolean(props.size),

94 +

[`btn-${props.type}`]: !!props.type,

95 +

[`btn-${props.size}`]: !!props.size,

96 96

}));

97 97 98 98

function onClick(e) {

Original file line number Diff line number Diff line change

@@ -110,7 +110,7 @@ const dirty = ref(false);

110 110

const modal = ref(null);

111 111 112 112

const closeOnBackdropClick = computed(() =>

113 -

isExist(props.backdrop) ? Boolean(props.backdrop) : props.type !== TYPES.ALERT

113 +

isExist(props.backdrop) ? !!props.backdrop : props.type !== TYPES.ALERT

114 114

);

115 115

const inputError = computed(() => props.validator(input.value));

116 116

const inputNotValid = computed(() => dirty.value && inputError.value);

Original file line number Diff line number Diff line change

@@ -108,7 +108,7 @@ export default {

108 108

computed: {

109 109

modalSizeClass() {

110 110

return {

111 -

[`modal-${this.size}`]: Boolean(this.size),

111 +

[`modal-${this.size}`]: !!this.size,

112 112

};

113 113

},

114 114

},

Original file line number Diff line number Diff line change

@@ -108,10 +108,10 @@ const emit = defineEmits(['update:modelValue', 'change']);

108 108

const sliceStart = ref(0);

109 109 110 110

const navClasses = computed(() => ({

111 -

[`text-${props.align}`]: Boolean(props.align),

111 +

[`text-${props.align}`]: !!props.align,

112 112

}));

113 113

const classes = computed(() => ({

114 -

[`pagination-${props.size}`]: Boolean(props.size),

114 +

[`pagination-${props.size}`]: !!props.size,

115 115

}));

116 116

const sliceArray = computed(() =>

117 117

range(props.totalPage).slice(

Original file line number Diff line number Diff line change

@@ -6,33 +6,9 @@

6 6

</template>

7 7 8 8

<script setup>

9 -

import ProgressBarStack from './ProgressBarStack.vue';

9 +

import { progressBarProps } from '../../props/progress-bar.props';

10 10 11 11

defineProps({

12 -

modelValue: {

13 -

type: Number,

14 -

validator(value) {

15 -

return value >= 0 && value <= 100;

16 -

},

17 -

default: 0,

18 -

},

19 -

labelText: { type: String, default: undefined },

20 -

type: { type: String, default: undefined },

21 -

label: {

22 -

type: Boolean,

23 -

default: false,

24 -

},

25 -

minWidth: {

26 -

type: Boolean,

27 -

default: false,

28 -

},

29 -

striped: {

30 -

type: Boolean,

31 -

default: false,

32 -

},

33 -

active: {

34 -

type: Boolean,

35 -

default: false,

36 -

},

12 +

...progressBarProps,

37 13

});

38 14

</script>

Original file line number Diff line number Diff line change

@@ -4,7 +4,7 @@

4 4

'progress-bar': true,

5 5

'progress-bar-striped': striped,

6 6

active: striped && active,

7 -

[`progress-bar-${type}`]: Boolean(type),

7 +

[`progress-bar-${type}`]: !!type,

8 8

}"

9 9

:style="{

10 10

minWidth: minWidth ? '2em' : null,

@@ -20,31 +20,9 @@

20 20

</template>

21 21 22 22

<script setup>

23 +

import { progressBarProps } from '../../props/progress-bar.props';

24 + 23 25

defineProps({

24 -

modelValue: {

25 -

type: Number,

26 -

required: true,

27 -

validator(value) {

28 -

return value >= 0 && value <= 100;

29 -

},

30 -

},

31 -

labelText: { type: String, default: undefined },

32 -

type: { type: String, default: undefined },

33 -

label: {

34 -

type: Boolean,

35 -

default: false,

36 -

},

37 -

minWidth: {

38 -

type: Boolean,

39 -

default: false,

40 -

},

41 -

striped: {

42 -

type: Boolean,

43 -

default: false,

44 -

},

45 -

active: {

46 -

type: Boolean,

47 -

default: false,

48 -

},

26 +

...progressBarProps,

49 27

});

50 28

</script>

Original file line number Diff line number Diff line change

@@ -212,15 +212,15 @@ function fetchItems(value, debounce) {

212 212

open.value = false;

213 213

} else if (props.data) {

214 214

prepareItems(props.data);

215 -

open.value = hasEmptySlot() || Boolean(items.value.length);

215 +

open.value = hasEmptySlot() || !!items.value.length;

216 216

} else if (props.asyncSrc) {

217 217

timeoutID = setTimeout(() => {

218 218

emit('loading');

219 219

request(props.asyncSrc + encodeURIComponent(value))

220 220

.then((data) => {

221 221

if (inputEl.value.matches(':focus')) {

222 222

prepareItems(props.asyncKey ? data[props.asyncKey] : data, true);

223 -

open.value = hasEmptySlot() || Boolean(items.value.length);

223 +

open.value = hasEmptySlot() || !!items.value.length;

224 224

}

225 225

emit('loaded');

226 226

})

@@ -233,7 +233,7 @@ function fetchItems(value, debounce) {

233 233

const cb = (data) => {

234 234

if (inputEl.value.matches(':focus')) {

235 235

prepareItems(data, true);

236 -

open.value = hasEmptySlot() || Boolean(items.value.length);

236 +

open.value = hasEmptySlot() || !!items.value.length;

237 237

}

238 238

emit('loaded');

239 239

};

Original file line number Diff line number Diff line change

@@ -0,0 +1,15 @@

1 +

export const progressBarProps = {

2 +

modelValue: {

3 +

type: Number,

4 +

required: true,

5 +

validator(value) {

6 +

return value >= 0 && value <= 100;

7 +

},

8 +

},

9 +

labelText: { type: String, default: undefined },

10 +

type: { type: String, default: undefined },

11 +

label: { type: Boolean, default: false },

12 +

minWidth: { type: Boolean, default: false },

13 +

striped: { type: Boolean, default: false },

14 +

active: { type: Boolean, default: false },

15 +

};

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4