@phill-component/icons 1.0.2 → 1.0.4
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/dist/mobile/uvue/icon-brush/brush.png +0 -0
- package/dist/mobile/uvue/icon-brush/icon-brush.uvue +75 -0
- package/dist/mobile/uvue/icon-copy/copy.png +0 -0
- package/dist/mobile/uvue/icon-copy/icon-copy.uvue +75 -0
- package/dist/mobile/uvue/icon-edit/edit.png +0 -0
- package/dist/mobile/uvue/icon-edit/icon-edit.uvue +75 -0
- package/dist/mobile/uvue/icon-filter/filter.png +0 -0
- package/dist/mobile/uvue/icon-filter/icon-filter.uvue +75 -0
- package/dist/mobile/uvue/icon-highlight/highlight.png +0 -0
- package/dist/mobile/uvue/icon-highlight/icon-highlight.uvue +75 -0
- package/dist/mobile/uvue/icon-home/home.png +0 -0
- package/dist/mobile/uvue/icon-home/icon-home.uvue +1 -1
- package/dist/mobile/uvue/icon-oblique-line/icon-oblique-line.uvue +75 -0
- package/dist/mobile/uvue/icon-oblique-line/oblique-line.png +0 -0
- package/dist/mobile/uvue/icon-original-size/icon-original-size.uvue +75 -0
- package/dist/mobile/uvue/icon-original-size/original-size.png +0 -0
- package/dist/mobile/uvue/icon-zoom-in/icon-zoom-in.uvue +75 -0
- package/dist/mobile/uvue/icon-zoom-in/zoom-in.png +0 -0
- package/dist/mobile/vue/icon-brush.vue +58 -0
- package/dist/mobile/vue/icon-copy.vue +58 -0
- package/dist/mobile/vue/icon-edit.vue +58 -0
- package/dist/mobile/vue/icon-filter.vue +58 -0
- package/dist/mobile/vue/icon-highlight.vue +58 -0
- package/dist/mobile/vue/icon-home.vue +1 -1
- package/dist/mobile/vue/icon-oblique-line.vue +58 -0
- package/dist/mobile/vue/icon-original-size.vue +58 -0
- package/dist/mobile/vue/icon-zoom-in.vue +58 -0
- package/dist/web/vue/Brush.vue +53 -0
- package/dist/web/vue/Copy.vue +53 -0
- package/dist/web/vue/Edit.vue +53 -0
- package/dist/web/vue/Filter.vue +53 -0
- package/dist/web/vue/Highlight.vue +53 -0
- package/dist/web/vue/Home.vue +1 -1
- package/dist/web/vue/ObliqueLine.vue +53 -0
- package/dist/web/vue/OriginalSize.vue +53 -0
- package/dist/web/vue/ZoomIn.vue +53 -0
- package/dist/web/vue/index.js +9 -1
- package/package.json +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="icon" @tap="onTap" :hover-class="hoverClass" :style="[wrapStyle, iconStyle]">
|
|
3
|
+
<!-- #ifdef H5 -->
|
|
4
|
+
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="2" d="M33 13h7a1 1 0 0 1 1 1v12.14a1 1 0 0 1-.85.99l-21.3 3.24a1 1 0 0 0-.85.99V43"/><path stroke="currentColor" stroke-width="2" d="M7 18V8c0-.552.444-1 .997-1H32.01c.552 0 .99.447.99 1v10.002A1 1 0 0 1 32 19H8a1 1 0 0 1-1-1z"/></svg>
|
|
5
|
+
<!-- #endif -->
|
|
6
|
+
<!-- #ifndef H5 -->
|
|
7
|
+
<image :src="imgSrc" :style="iconBoxStyle" />
|
|
8
|
+
<!-- #endif -->
|
|
9
|
+
<text v-if="label !== ''" class="icon__label" :style="labelStyle">{{ label }}</text>
|
|
10
|
+
</view>
|
|
11
|
+
</template>
|
|
12
|
+
<script setup>
|
|
13
|
+
import { computed } from 'vue'
|
|
14
|
+
import imgSrc from '@/uni_modules/@phill-component/icons/mobile/uvue/icon-brush/brush.png'
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
size: { type: [String, Number], default: '1em' },
|
|
17
|
+
color: { type: String, default: 'var(--tsm-color-primary)' },
|
|
18
|
+
label: { type: [String, Number], default: '' },
|
|
19
|
+
labelPos: { type: String, default: 'right' },
|
|
20
|
+
labelSize: { type: [String, Number], default: '15px' },
|
|
21
|
+
labelColor: { type: String, default: '' },
|
|
22
|
+
space: { type: [String, Number], default: '3px' },
|
|
23
|
+
width: { type: [String, Number], default: '' },
|
|
24
|
+
height: { type: [String, Number], default: '' },
|
|
25
|
+
hoverClass: { type: String, default: '' },
|
|
26
|
+
index: { type: [String, Number], default: '' },
|
|
27
|
+
stop: { type: Boolean, default: false }
|
|
28
|
+
})
|
|
29
|
+
const emit = defineEmits(['click'])
|
|
30
|
+
const toPx = (v) => typeof v === 'number' ? (v + 'px') : (String(v||''));
|
|
31
|
+
const iconW = computed(() => props.width ? toPx(props.width) : toPx(props.size))
|
|
32
|
+
const iconH = computed(() => props.height ? toPx(props.height) : toPx(props.size))
|
|
33
|
+
const iconBoxStyle = computed(() => ({ width: iconW.value, height: iconH.value }))
|
|
34
|
+
const iconStyle = computed(() => {
|
|
35
|
+
return { color: props.color || 'inherit' }
|
|
36
|
+
})
|
|
37
|
+
const wrapStyle = computed(() => {
|
|
38
|
+
const dirMap = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' }
|
|
39
|
+
return { display: 'flex', alignItems: 'center', flexDirection: dirMap[props.labelPos] || 'row' }
|
|
40
|
+
})
|
|
41
|
+
const labelStyle = computed(() => {
|
|
42
|
+
return {
|
|
43
|
+
color: props.labelColor || '',
|
|
44
|
+
fontSize: toPx(props.labelSize),
|
|
45
|
+
marginLeft: props.labelPos === 'right' ? toPx(props.space) : 0,
|
|
46
|
+
marginTop: props.labelPos === 'bottom' ? toPx(props.space) : 0,
|
|
47
|
+
marginRight: props.labelPos === 'left' ? toPx(props.space) : 0,
|
|
48
|
+
marginBottom: props.labelPos === 'top' ? toPx(props.space) : 0
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
function onTap(e) {
|
|
52
|
+
emit('click', props.index)
|
|
53
|
+
if (props.stop && e && e.stopPropagation) e.stopPropagation()
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
<style scoped>
|
|
57
|
+
.icon__label { line-height: 1; }
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="icon" @tap="onTap" :hover-class="hoverClass" :style="[wrapStyle, iconStyle]">
|
|
3
|
+
<!-- #ifdef H5 -->
|
|
4
|
+
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="2" d="M20 6h18a2 2 0 0 1 2 2v22"/><path stroke="currentColor" stroke-width="2" d="M8 40V16a2 2 0 0 1 2-2h20c1.105 0 2 .892 2 1.997v24.011A1.99 1.99 0 0 1 30.003 42H9.996A1.996 1.996 0 0 1 8 40z"/></svg>
|
|
5
|
+
<!-- #endif -->
|
|
6
|
+
<!-- #ifndef H5 -->
|
|
7
|
+
<image :src="imgSrc" :style="iconBoxStyle" />
|
|
8
|
+
<!-- #endif -->
|
|
9
|
+
<text v-if="label !== ''" class="icon__label" :style="labelStyle">{{ label }}</text>
|
|
10
|
+
</view>
|
|
11
|
+
</template>
|
|
12
|
+
<script setup>
|
|
13
|
+
import { computed } from 'vue'
|
|
14
|
+
import imgSrc from '@/uni_modules/@phill-component/icons/mobile/uvue/icon-copy/copy.png'
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
size: { type: [String, Number], default: '1em' },
|
|
17
|
+
color: { type: String, default: 'var(--tsm-color-primary)' },
|
|
18
|
+
label: { type: [String, Number], default: '' },
|
|
19
|
+
labelPos: { type: String, default: 'right' },
|
|
20
|
+
labelSize: { type: [String, Number], default: '15px' },
|
|
21
|
+
labelColor: { type: String, default: '' },
|
|
22
|
+
space: { type: [String, Number], default: '3px' },
|
|
23
|
+
width: { type: [String, Number], default: '' },
|
|
24
|
+
height: { type: [String, Number], default: '' },
|
|
25
|
+
hoverClass: { type: String, default: '' },
|
|
26
|
+
index: { type: [String, Number], default: '' },
|
|
27
|
+
stop: { type: Boolean, default: false }
|
|
28
|
+
})
|
|
29
|
+
const emit = defineEmits(['click'])
|
|
30
|
+
const toPx = (v) => typeof v === 'number' ? (v + 'px') : (String(v||''));
|
|
31
|
+
const iconW = computed(() => props.width ? toPx(props.width) : toPx(props.size))
|
|
32
|
+
const iconH = computed(() => props.height ? toPx(props.height) : toPx(props.size))
|
|
33
|
+
const iconBoxStyle = computed(() => ({ width: iconW.value, height: iconH.value }))
|
|
34
|
+
const iconStyle = computed(() => {
|
|
35
|
+
return { color: props.color || 'inherit' }
|
|
36
|
+
})
|
|
37
|
+
const wrapStyle = computed(() => {
|
|
38
|
+
const dirMap = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' }
|
|
39
|
+
return { display: 'flex', alignItems: 'center', flexDirection: dirMap[props.labelPos] || 'row' }
|
|
40
|
+
})
|
|
41
|
+
const labelStyle = computed(() => {
|
|
42
|
+
return {
|
|
43
|
+
color: props.labelColor || '',
|
|
44
|
+
fontSize: toPx(props.labelSize),
|
|
45
|
+
marginLeft: props.labelPos === 'right' ? toPx(props.space) : 0,
|
|
46
|
+
marginTop: props.labelPos === 'bottom' ? toPx(props.space) : 0,
|
|
47
|
+
marginRight: props.labelPos === 'left' ? toPx(props.space) : 0,
|
|
48
|
+
marginBottom: props.labelPos === 'top' ? toPx(props.space) : 0
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
function onTap(e) {
|
|
52
|
+
emit('click', props.index)
|
|
53
|
+
if (props.stop && e && e.stopPropagation) e.stopPropagation()
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
<style scoped>
|
|
57
|
+
.icon__label { line-height: 1; }
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="icon" @tap="onTap" :hover-class="hoverClass" :style="[wrapStyle, iconStyle]">
|
|
3
|
+
<!-- #ifdef H5 -->
|
|
4
|
+
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="2" d="m30.479 19.038 5.734-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.591.286l-6.047.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M5.999 42h36"/></svg>
|
|
5
|
+
<!-- #endif -->
|
|
6
|
+
<!-- #ifndef H5 -->
|
|
7
|
+
<image :src="imgSrc" :style="iconBoxStyle" />
|
|
8
|
+
<!-- #endif -->
|
|
9
|
+
<text v-if="label !== ''" class="icon__label" :style="labelStyle">{{ label }}</text>
|
|
10
|
+
</view>
|
|
11
|
+
</template>
|
|
12
|
+
<script setup>
|
|
13
|
+
import { computed } from 'vue'
|
|
14
|
+
import imgSrc from '@/uni_modules/@phill-component/icons/mobile/uvue/icon-edit/edit.png'
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
size: { type: [String, Number], default: '1em' },
|
|
17
|
+
color: { type: String, default: 'var(--tsm-color-primary)' },
|
|
18
|
+
label: { type: [String, Number], default: '' },
|
|
19
|
+
labelPos: { type: String, default: 'right' },
|
|
20
|
+
labelSize: { type: [String, Number], default: '15px' },
|
|
21
|
+
labelColor: { type: String, default: '' },
|
|
22
|
+
space: { type: [String, Number], default: '3px' },
|
|
23
|
+
width: { type: [String, Number], default: '' },
|
|
24
|
+
height: { type: [String, Number], default: '' },
|
|
25
|
+
hoverClass: { type: String, default: '' },
|
|
26
|
+
index: { type: [String, Number], default: '' },
|
|
27
|
+
stop: { type: Boolean, default: false }
|
|
28
|
+
})
|
|
29
|
+
const emit = defineEmits(['click'])
|
|
30
|
+
const toPx = (v) => typeof v === 'number' ? (v + 'px') : (String(v||''));
|
|
31
|
+
const iconW = computed(() => props.width ? toPx(props.width) : toPx(props.size))
|
|
32
|
+
const iconH = computed(() => props.height ? toPx(props.height) : toPx(props.size))
|
|
33
|
+
const iconBoxStyle = computed(() => ({ width: iconW.value, height: iconH.value }))
|
|
34
|
+
const iconStyle = computed(() => {
|
|
35
|
+
return { color: props.color || 'inherit' }
|
|
36
|
+
})
|
|
37
|
+
const wrapStyle = computed(() => {
|
|
38
|
+
const dirMap = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' }
|
|
39
|
+
return { display: 'flex', alignItems: 'center', flexDirection: dirMap[props.labelPos] || 'row' }
|
|
40
|
+
})
|
|
41
|
+
const labelStyle = computed(() => {
|
|
42
|
+
return {
|
|
43
|
+
color: props.labelColor || '',
|
|
44
|
+
fontSize: toPx(props.labelSize),
|
|
45
|
+
marginLeft: props.labelPos === 'right' ? toPx(props.space) : 0,
|
|
46
|
+
marginTop: props.labelPos === 'bottom' ? toPx(props.space) : 0,
|
|
47
|
+
marginRight: props.labelPos === 'left' ? toPx(props.space) : 0,
|
|
48
|
+
marginBottom: props.labelPos === 'top' ? toPx(props.space) : 0
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
function onTap(e) {
|
|
52
|
+
emit('click', props.index)
|
|
53
|
+
if (props.stop && e && e.stopPropagation) e.stopPropagation()
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
<style scoped>
|
|
57
|
+
.icon__label { line-height: 1; }
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="icon" @tap="onTap" :hover-class="hoverClass" :style="[wrapStyle, iconStyle]">
|
|
3
|
+
<!-- #ifdef H5 -->
|
|
4
|
+
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="2" d="M30 42V22.549a1 1 0 0 1 .463-.844l10.074-6.41A1 1 0 0 0 41 14.45V8a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v6.451a1 1 0 0 0 .463.844l10.074 6.41a1 1 0 0 1 .463.844V37"/></svg>
|
|
5
|
+
<!-- #endif -->
|
|
6
|
+
<!-- #ifndef H5 -->
|
|
7
|
+
<image :src="imgSrc" :style="iconBoxStyle" />
|
|
8
|
+
<!-- #endif -->
|
|
9
|
+
<text v-if="label !== ''" class="icon__label" :style="labelStyle">{{ label }}</text>
|
|
10
|
+
</view>
|
|
11
|
+
</template>
|
|
12
|
+
<script setup>
|
|
13
|
+
import { computed } from 'vue'
|
|
14
|
+
import imgSrc from '@/uni_modules/@phill-component/icons/mobile/uvue/icon-filter/filter.png'
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
size: { type: [String, Number], default: '1em' },
|
|
17
|
+
color: { type: String, default: 'var(--tsm-color-primary)' },
|
|
18
|
+
label: { type: [String, Number], default: '' },
|
|
19
|
+
labelPos: { type: String, default: 'right' },
|
|
20
|
+
labelSize: { type: [String, Number], default: '15px' },
|
|
21
|
+
labelColor: { type: String, default: '' },
|
|
22
|
+
space: { type: [String, Number], default: '3px' },
|
|
23
|
+
width: { type: [String, Number], default: '' },
|
|
24
|
+
height: { type: [String, Number], default: '' },
|
|
25
|
+
hoverClass: { type: String, default: '' },
|
|
26
|
+
index: { type: [String, Number], default: '' },
|
|
27
|
+
stop: { type: Boolean, default: false }
|
|
28
|
+
})
|
|
29
|
+
const emit = defineEmits(['click'])
|
|
30
|
+
const toPx = (v) => typeof v === 'number' ? (v + 'px') : (String(v||''));
|
|
31
|
+
const iconW = computed(() => props.width ? toPx(props.width) : toPx(props.size))
|
|
32
|
+
const iconH = computed(() => props.height ? toPx(props.height) : toPx(props.size))
|
|
33
|
+
const iconBoxStyle = computed(() => ({ width: iconW.value, height: iconH.value }))
|
|
34
|
+
const iconStyle = computed(() => {
|
|
35
|
+
return { color: props.color || 'inherit' }
|
|
36
|
+
})
|
|
37
|
+
const wrapStyle = computed(() => {
|
|
38
|
+
const dirMap = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' }
|
|
39
|
+
return { display: 'flex', alignItems: 'center', flexDirection: dirMap[props.labelPos] || 'row' }
|
|
40
|
+
})
|
|
41
|
+
const labelStyle = computed(() => {
|
|
42
|
+
return {
|
|
43
|
+
color: props.labelColor || '',
|
|
44
|
+
fontSize: toPx(props.labelSize),
|
|
45
|
+
marginLeft: props.labelPos === 'right' ? toPx(props.space) : 0,
|
|
46
|
+
marginTop: props.labelPos === 'bottom' ? toPx(props.space) : 0,
|
|
47
|
+
marginRight: props.labelPos === 'left' ? toPx(props.space) : 0,
|
|
48
|
+
marginBottom: props.labelPos === 'top' ? toPx(props.space) : 0
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
function onTap(e) {
|
|
52
|
+
emit('click', props.index)
|
|
53
|
+
if (props.stop && e && e.stopPropagation) e.stopPropagation()
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
<style scoped>
|
|
57
|
+
.icon__label { line-height: 1; }
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="icon" @tap="onTap" :hover-class="hoverClass" :style="[wrapStyle, iconStyle]">
|
|
3
|
+
<!-- #ifdef H5 -->
|
|
4
|
+
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="2" d="M39 43V28a1 1 0 0 0-1-1h-4v-8a1 1 0 0 0-1-1H15a1 1 0 0 0-1 1v8h-4a1 1 0 0 0-1 1v15M19 9.28V17a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V7.28a1 1 0 0 0-1.242-.97l-8 2a1 1 0 0 0-.758.97z"/></svg>
|
|
5
|
+
<!-- #endif -->
|
|
6
|
+
<!-- #ifndef H5 -->
|
|
7
|
+
<image :src="imgSrc" :style="iconBoxStyle" />
|
|
8
|
+
<!-- #endif -->
|
|
9
|
+
<text v-if="label !== ''" class="icon__label" :style="labelStyle">{{ label }}</text>
|
|
10
|
+
</view>
|
|
11
|
+
</template>
|
|
12
|
+
<script setup>
|
|
13
|
+
import { computed } from 'vue'
|
|
14
|
+
import imgSrc from '@/uni_modules/@phill-component/icons/mobile/uvue/icon-highlight/highlight.png'
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
size: { type: [String, Number], default: '1em' },
|
|
17
|
+
color: { type: String, default: 'var(--tsm-color-primary)' },
|
|
18
|
+
label: { type: [String, Number], default: '' },
|
|
19
|
+
labelPos: { type: String, default: 'right' },
|
|
20
|
+
labelSize: { type: [String, Number], default: '15px' },
|
|
21
|
+
labelColor: { type: String, default: '' },
|
|
22
|
+
space: { type: [String, Number], default: '3px' },
|
|
23
|
+
width: { type: [String, Number], default: '' },
|
|
24
|
+
height: { type: [String, Number], default: '' },
|
|
25
|
+
hoverClass: { type: String, default: '' },
|
|
26
|
+
index: { type: [String, Number], default: '' },
|
|
27
|
+
stop: { type: Boolean, default: false }
|
|
28
|
+
})
|
|
29
|
+
const emit = defineEmits(['click'])
|
|
30
|
+
const toPx = (v) => typeof v === 'number' ? (v + 'px') : (String(v||''));
|
|
31
|
+
const iconW = computed(() => props.width ? toPx(props.width) : toPx(props.size))
|
|
32
|
+
const iconH = computed(() => props.height ? toPx(props.height) : toPx(props.size))
|
|
33
|
+
const iconBoxStyle = computed(() => ({ width: iconW.value, height: iconH.value }))
|
|
34
|
+
const iconStyle = computed(() => {
|
|
35
|
+
return { color: props.color || 'inherit' }
|
|
36
|
+
})
|
|
37
|
+
const wrapStyle = computed(() => {
|
|
38
|
+
const dirMap = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' }
|
|
39
|
+
return { display: 'flex', alignItems: 'center', flexDirection: dirMap[props.labelPos] || 'row' }
|
|
40
|
+
})
|
|
41
|
+
const labelStyle = computed(() => {
|
|
42
|
+
return {
|
|
43
|
+
color: props.labelColor || '',
|
|
44
|
+
fontSize: toPx(props.labelSize),
|
|
45
|
+
marginLeft: props.labelPos === 'right' ? toPx(props.space) : 0,
|
|
46
|
+
marginTop: props.labelPos === 'bottom' ? toPx(props.space) : 0,
|
|
47
|
+
marginRight: props.labelPos === 'left' ? toPx(props.space) : 0,
|
|
48
|
+
marginBottom: props.labelPos === 'top' ? toPx(props.space) : 0
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
function onTap(e) {
|
|
52
|
+
emit('click', props.index)
|
|
53
|
+
if (props.stop && e && e.stopPropagation) e.stopPropagation()
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
<style scoped>
|
|
57
|
+
.icon__label { line-height: 1; }
|
|
58
|
+
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="icon" @tap="onTap" :hover-class="hoverClass" :style="[wrapStyle, iconStyle]">
|
|
3
3
|
<!-- #ifdef H5 -->
|
|
4
|
-
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH"
|
|
4
|
+
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="2" d="M6 19h10m0 0h26m-26 0V9m0 10v10m0 0v10m0-10H6m10 0h26M6 9h36v30H6z"/></svg>
|
|
5
5
|
<!-- #endif -->
|
|
6
6
|
<!-- #ifndef H5 -->
|
|
7
7
|
<image :src="imgSrc" :style="iconBoxStyle" />
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="icon" @tap="onTap" :hover-class="hoverClass" :style="[wrapStyle, iconStyle]">
|
|
3
|
+
<!-- #ifdef H5 -->
|
|
4
|
+
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="2" d="M29.506 6.502 18.494 41.498"/></svg>
|
|
5
|
+
<!-- #endif -->
|
|
6
|
+
<!-- #ifndef H5 -->
|
|
7
|
+
<image :src="imgSrc" :style="iconBoxStyle" />
|
|
8
|
+
<!-- #endif -->
|
|
9
|
+
<text v-if="label !== ''" class="icon__label" :style="labelStyle">{{ label }}</text>
|
|
10
|
+
</view>
|
|
11
|
+
</template>
|
|
12
|
+
<script setup>
|
|
13
|
+
import { computed } from 'vue'
|
|
14
|
+
import imgSrc from '@/uni_modules/@phill-component/icons/mobile/uvue/icon-oblique-line/oblique-line.png'
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
size: { type: [String, Number], default: '1em' },
|
|
17
|
+
color: { type: String, default: 'var(--tsm-color-primary)' },
|
|
18
|
+
label: { type: [String, Number], default: '' },
|
|
19
|
+
labelPos: { type: String, default: 'right' },
|
|
20
|
+
labelSize: { type: [String, Number], default: '15px' },
|
|
21
|
+
labelColor: { type: String, default: '' },
|
|
22
|
+
space: { type: [String, Number], default: '3px' },
|
|
23
|
+
width: { type: [String, Number], default: '' },
|
|
24
|
+
height: { type: [String, Number], default: '' },
|
|
25
|
+
hoverClass: { type: String, default: '' },
|
|
26
|
+
index: { type: [String, Number], default: '' },
|
|
27
|
+
stop: { type: Boolean, default: false }
|
|
28
|
+
})
|
|
29
|
+
const emit = defineEmits(['click'])
|
|
30
|
+
const toPx = (v) => typeof v === 'number' ? (v + 'px') : (String(v||''));
|
|
31
|
+
const iconW = computed(() => props.width ? toPx(props.width) : toPx(props.size))
|
|
32
|
+
const iconH = computed(() => props.height ? toPx(props.height) : toPx(props.size))
|
|
33
|
+
const iconBoxStyle = computed(() => ({ width: iconW.value, height: iconH.value }))
|
|
34
|
+
const iconStyle = computed(() => {
|
|
35
|
+
return { color: props.color || 'inherit' }
|
|
36
|
+
})
|
|
37
|
+
const wrapStyle = computed(() => {
|
|
38
|
+
const dirMap = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' }
|
|
39
|
+
return { display: 'flex', alignItems: 'center', flexDirection: dirMap[props.labelPos] || 'row' }
|
|
40
|
+
})
|
|
41
|
+
const labelStyle = computed(() => {
|
|
42
|
+
return {
|
|
43
|
+
color: props.labelColor || '',
|
|
44
|
+
fontSize: toPx(props.labelSize),
|
|
45
|
+
marginLeft: props.labelPos === 'right' ? toPx(props.space) : 0,
|
|
46
|
+
marginTop: props.labelPos === 'bottom' ? toPx(props.space) : 0,
|
|
47
|
+
marginRight: props.labelPos === 'left' ? toPx(props.space) : 0,
|
|
48
|
+
marginBottom: props.labelPos === 'top' ? toPx(props.space) : 0
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
function onTap(e) {
|
|
52
|
+
emit('click', props.index)
|
|
53
|
+
if (props.stop && e && e.stopPropagation) e.stopPropagation()
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
<style scoped>
|
|
57
|
+
.icon__label { line-height: 1; }
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="icon" @tap="onTap" :hover-class="hoverClass" :style="[wrapStyle, iconStyle]">
|
|
3
|
+
<!-- #ifdef H5 -->
|
|
4
|
+
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="2" d="M34 11.5 39 9h1v32"/><path fill="currentColor" d="M24 17h1v1h-1zm0 13h1v1h-1z"/><path stroke="currentColor" stroke-width="2" d="M24 17h1v1h-1zm0 13h1v1h-1zM5.5 11.5l5-2.5h1v32"/></svg>
|
|
5
|
+
<!-- #endif -->
|
|
6
|
+
<!-- #ifndef H5 -->
|
|
7
|
+
<image :src="imgSrc" :style="iconBoxStyle" />
|
|
8
|
+
<!-- #endif -->
|
|
9
|
+
<text v-if="label !== ''" class="icon__label" :style="labelStyle">{{ label }}</text>
|
|
10
|
+
</view>
|
|
11
|
+
</template>
|
|
12
|
+
<script setup>
|
|
13
|
+
import { computed } from 'vue'
|
|
14
|
+
import imgSrc from '@/uni_modules/@phill-component/icons/mobile/uvue/icon-original-size/original-size.png'
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
size: { type: [String, Number], default: '1em' },
|
|
17
|
+
color: { type: String, default: 'var(--tsm-color-primary)' },
|
|
18
|
+
label: { type: [String, Number], default: '' },
|
|
19
|
+
labelPos: { type: String, default: 'right' },
|
|
20
|
+
labelSize: { type: [String, Number], default: '15px' },
|
|
21
|
+
labelColor: { type: String, default: '' },
|
|
22
|
+
space: { type: [String, Number], default: '3px' },
|
|
23
|
+
width: { type: [String, Number], default: '' },
|
|
24
|
+
height: { type: [String, Number], default: '' },
|
|
25
|
+
hoverClass: { type: String, default: '' },
|
|
26
|
+
index: { type: [String, Number], default: '' },
|
|
27
|
+
stop: { type: Boolean, default: false }
|
|
28
|
+
})
|
|
29
|
+
const emit = defineEmits(['click'])
|
|
30
|
+
const toPx = (v) => typeof v === 'number' ? (v + 'px') : (String(v||''));
|
|
31
|
+
const iconW = computed(() => props.width ? toPx(props.width) : toPx(props.size))
|
|
32
|
+
const iconH = computed(() => props.height ? toPx(props.height) : toPx(props.size))
|
|
33
|
+
const iconBoxStyle = computed(() => ({ width: iconW.value, height: iconH.value }))
|
|
34
|
+
const iconStyle = computed(() => {
|
|
35
|
+
return { color: props.color || 'inherit' }
|
|
36
|
+
})
|
|
37
|
+
const wrapStyle = computed(() => {
|
|
38
|
+
const dirMap = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' }
|
|
39
|
+
return { display: 'flex', alignItems: 'center', flexDirection: dirMap[props.labelPos] || 'row' }
|
|
40
|
+
})
|
|
41
|
+
const labelStyle = computed(() => {
|
|
42
|
+
return {
|
|
43
|
+
color: props.labelColor || '',
|
|
44
|
+
fontSize: toPx(props.labelSize),
|
|
45
|
+
marginLeft: props.labelPos === 'right' ? toPx(props.space) : 0,
|
|
46
|
+
marginTop: props.labelPos === 'bottom' ? toPx(props.space) : 0,
|
|
47
|
+
marginRight: props.labelPos === 'left' ? toPx(props.space) : 0,
|
|
48
|
+
marginBottom: props.labelPos === 'top' ? toPx(props.space) : 0
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
function onTap(e) {
|
|
52
|
+
emit('click', props.index)
|
|
53
|
+
if (props.stop && e && e.stopPropagation) e.stopPropagation()
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
<style scoped>
|
|
57
|
+
.icon__label { line-height: 1; }
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="icon" @tap="onTap" :hover-class="hoverClass" :style="[wrapStyle, iconStyle]">
|
|
3
|
+
<!-- #ifdef H5 -->
|
|
4
|
+
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="2" d="M32.607 32.607A14.95 14.95 0 0 0 37 22c0-8.284-6.716-15-15-15S7 13.716 7 22s6.716 15 15 15c4.142 0 7.892-1.679 10.607-4.393zm0 0L41.5 41.5M29 22H15m7 7V15"/></svg>
|
|
5
|
+
<!-- #endif -->
|
|
6
|
+
<!-- #ifndef H5 -->
|
|
7
|
+
<image :src="imgSrc" :style="iconBoxStyle" />
|
|
8
|
+
<!-- #endif -->
|
|
9
|
+
<text v-if="label !== ''" class="icon__label" :style="labelStyle">{{ label }}</text>
|
|
10
|
+
</view>
|
|
11
|
+
</template>
|
|
12
|
+
<script setup>
|
|
13
|
+
import { computed } from 'vue'
|
|
14
|
+
import imgSrc from '@/uni_modules/@phill-component/icons/mobile/uvue/icon-zoom-in/zoom-in.png'
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
size: { type: [String, Number], default: '1em' },
|
|
17
|
+
color: { type: String, default: 'var(--tsm-color-primary)' },
|
|
18
|
+
label: { type: [String, Number], default: '' },
|
|
19
|
+
labelPos: { type: String, default: 'right' },
|
|
20
|
+
labelSize: { type: [String, Number], default: '15px' },
|
|
21
|
+
labelColor: { type: String, default: '' },
|
|
22
|
+
space: { type: [String, Number], default: '3px' },
|
|
23
|
+
width: { type: [String, Number], default: '' },
|
|
24
|
+
height: { type: [String, Number], default: '' },
|
|
25
|
+
hoverClass: { type: String, default: '' },
|
|
26
|
+
index: { type: [String, Number], default: '' },
|
|
27
|
+
stop: { type: Boolean, default: false }
|
|
28
|
+
})
|
|
29
|
+
const emit = defineEmits(['click'])
|
|
30
|
+
const toPx = (v) => typeof v === 'number' ? (v + 'px') : (String(v||''));
|
|
31
|
+
const iconW = computed(() => props.width ? toPx(props.width) : toPx(props.size))
|
|
32
|
+
const iconH = computed(() => props.height ? toPx(props.height) : toPx(props.size))
|
|
33
|
+
const iconBoxStyle = computed(() => ({ width: iconW.value, height: iconH.value }))
|
|
34
|
+
const iconStyle = computed(() => {
|
|
35
|
+
return { color: props.color || 'inherit' }
|
|
36
|
+
})
|
|
37
|
+
const wrapStyle = computed(() => {
|
|
38
|
+
const dirMap = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' }
|
|
39
|
+
return { display: 'flex', alignItems: 'center', flexDirection: dirMap[props.labelPos] || 'row' }
|
|
40
|
+
})
|
|
41
|
+
const labelStyle = computed(() => {
|
|
42
|
+
return {
|
|
43
|
+
color: props.labelColor || '',
|
|
44
|
+
fontSize: toPx(props.labelSize),
|
|
45
|
+
marginLeft: props.labelPos === 'right' ? toPx(props.space) : 0,
|
|
46
|
+
marginTop: props.labelPos === 'bottom' ? toPx(props.space) : 0,
|
|
47
|
+
marginRight: props.labelPos === 'left' ? toPx(props.space) : 0,
|
|
48
|
+
marginBottom: props.labelPos === 'top' ? toPx(props.space) : 0
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
function onTap(e) {
|
|
52
|
+
emit('click', props.index)
|
|
53
|
+
if (props.stop && e && e.stopPropagation) e.stopPropagation()
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
<style scoped>
|
|
57
|
+
.icon__label { line-height: 1; }
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="icon" @tap="onTap" :hover-class="hoverClass" :style="[wrapStyle, iconStyle]">
|
|
3
|
+
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="2" d="M33 13h7a1 1 0 0 1 1 1v12.14a1 1 0 0 1-.85.99l-21.3 3.24a1 1 0 0 0-.85.99V43"/><path stroke="currentColor" stroke-width="2" d="M7 18V8c0-.552.444-1 .997-1H32.01c.552 0 .99.447.99 1v10.002A1 1 0 0 1 32 19H8a1 1 0 0 1-1-1z"/></svg>
|
|
4
|
+
<text v-if="label !== ''" class="icon__label" :style="labelStyle">{{ label }}</text>
|
|
5
|
+
</view>
|
|
6
|
+
</template>
|
|
7
|
+
<script setup>
|
|
8
|
+
import { computed } from 'vue'
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
size: { type: [String, Number], default: '1em' },
|
|
11
|
+
color: { type: String, default: 'inherit' },
|
|
12
|
+
label: { type: [String, Number], default: '' },
|
|
13
|
+
labelPos: { type: String, default: 'right' },
|
|
14
|
+
labelSize: { type: [String, Number], default: '15px' },
|
|
15
|
+
labelColor: { type: String, default: '' },
|
|
16
|
+
space: { type: [String, Number], default: '3px' },
|
|
17
|
+
width: { type: [String, Number], default: '' },
|
|
18
|
+
height: { type: [String, Number], default: '' },
|
|
19
|
+
hoverClass: { type: String, default: '' },
|
|
20
|
+
index: { type: [String, Number], default: '' },
|
|
21
|
+
stop: { type: Boolean, default: false }
|
|
22
|
+
})
|
|
23
|
+
const emit = defineEmits(['click'])
|
|
24
|
+
const toPx = (v) => typeof v === 'number' ? (v + 'px') : (String(v||''));
|
|
25
|
+
const iconW = computed(() => props.width ? toPx(props.width) : toPx(props.size))
|
|
26
|
+
const iconH = computed(() => props.height ? toPx(props.height) : toPx(props.size))
|
|
27
|
+
const iconBoxStyle = computed(() => ({ width: iconW.value, height: iconH.value }))
|
|
28
|
+
const iconStyle = computed(() => {
|
|
29
|
+
return { color: props.color || 'inherit' }
|
|
30
|
+
})
|
|
31
|
+
const wrapStyle = computed(() => {
|
|
32
|
+
const dirMap = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' }
|
|
33
|
+
return { display: 'flex', alignItems: 'center', flexDirection: dirMap[props.labelPos] || 'row' }
|
|
34
|
+
})
|
|
35
|
+
const labelStyle = computed(() => {
|
|
36
|
+
return {
|
|
37
|
+
color: props.labelColor || '',
|
|
38
|
+
fontSize: toPx(props.labelSize),
|
|
39
|
+
marginLeft: props.labelPos === 'right' ? toPx(props.space) : 0,
|
|
40
|
+
marginTop: props.labelPos === 'bottom' ? toPx(props.space) : 0,
|
|
41
|
+
marginRight: props.labelPos === 'left' ? toPx(props.space) : 0,
|
|
42
|
+
marginBottom: props.labelPos === 'top' ? toPx(props.space) : 0
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
const imgSrc = '__IMG_SRC__'
|
|
46
|
+
function onTap(e) {
|
|
47
|
+
emit('click', props.index)
|
|
48
|
+
if (props.stop && e && e.stopPropagation) e.stopPropagation()
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
51
|
+
<style scoped>
|
|
52
|
+
.icon__label { line-height: 1; }
|
|
53
|
+
</style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="icon" @tap="onTap" :hover-class="hoverClass" :style="[wrapStyle, iconStyle]">
|
|
3
|
+
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="2" d="M20 6h18a2 2 0 0 1 2 2v22"/><path stroke="currentColor" stroke-width="2" d="M8 40V16a2 2 0 0 1 2-2h20c1.105 0 2 .892 2 1.997v24.011A1.99 1.99 0 0 1 30.003 42H9.996A1.996 1.996 0 0 1 8 40z"/></svg>
|
|
4
|
+
<text v-if="label !== ''" class="icon__label" :style="labelStyle">{{ label }}</text>
|
|
5
|
+
</view>
|
|
6
|
+
</template>
|
|
7
|
+
<script setup>
|
|
8
|
+
import { computed } from 'vue'
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
size: { type: [String, Number], default: '1em' },
|
|
11
|
+
color: { type: String, default: 'inherit' },
|
|
12
|
+
label: { type: [String, Number], default: '' },
|
|
13
|
+
labelPos: { type: String, default: 'right' },
|
|
14
|
+
labelSize: { type: [String, Number], default: '15px' },
|
|
15
|
+
labelColor: { type: String, default: '' },
|
|
16
|
+
space: { type: [String, Number], default: '3px' },
|
|
17
|
+
width: { type: [String, Number], default: '' },
|
|
18
|
+
height: { type: [String, Number], default: '' },
|
|
19
|
+
hoverClass: { type: String, default: '' },
|
|
20
|
+
index: { type: [String, Number], default: '' },
|
|
21
|
+
stop: { type: Boolean, default: false }
|
|
22
|
+
})
|
|
23
|
+
const emit = defineEmits(['click'])
|
|
24
|
+
const toPx = (v) => typeof v === 'number' ? (v + 'px') : (String(v||''));
|
|
25
|
+
const iconW = computed(() => props.width ? toPx(props.width) : toPx(props.size))
|
|
26
|
+
const iconH = computed(() => props.height ? toPx(props.height) : toPx(props.size))
|
|
27
|
+
const iconBoxStyle = computed(() => ({ width: iconW.value, height: iconH.value }))
|
|
28
|
+
const iconStyle = computed(() => {
|
|
29
|
+
return { color: props.color || 'inherit' }
|
|
30
|
+
})
|
|
31
|
+
const wrapStyle = computed(() => {
|
|
32
|
+
const dirMap = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' }
|
|
33
|
+
return { display: 'flex', alignItems: 'center', flexDirection: dirMap[props.labelPos] || 'row' }
|
|
34
|
+
})
|
|
35
|
+
const labelStyle = computed(() => {
|
|
36
|
+
return {
|
|
37
|
+
color: props.labelColor || '',
|
|
38
|
+
fontSize: toPx(props.labelSize),
|
|
39
|
+
marginLeft: props.labelPos === 'right' ? toPx(props.space) : 0,
|
|
40
|
+
marginTop: props.labelPos === 'bottom' ? toPx(props.space) : 0,
|
|
41
|
+
marginRight: props.labelPos === 'left' ? toPx(props.space) : 0,
|
|
42
|
+
marginBottom: props.labelPos === 'top' ? toPx(props.space) : 0
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
const imgSrc = '__IMG_SRC__'
|
|
46
|
+
function onTap(e) {
|
|
47
|
+
emit('click', props.index)
|
|
48
|
+
if (props.stop && e && e.stopPropagation) e.stopPropagation()
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
51
|
+
<style scoped>
|
|
52
|
+
.icon__label { line-height: 1; }
|
|
53
|
+
</style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="icon" @tap="onTap" :hover-class="hoverClass" :style="[wrapStyle, iconStyle]">
|
|
3
|
+
<svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" fill="none" viewBox="0 0 48 48"><path stroke="currentColor" stroke-width="2" d="m30.479 19.038 5.734-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.591.286l-6.047.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M5.999 42h36"/></svg>
|
|
4
|
+
<text v-if="label !== ''" class="icon__label" :style="labelStyle">{{ label }}</text>
|
|
5
|
+
</view>
|
|
6
|
+
</template>
|
|
7
|
+
<script setup>
|
|
8
|
+
import { computed } from 'vue'
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
size: { type: [String, Number], default: '1em' },
|
|
11
|
+
color: { type: String, default: 'inherit' },
|
|
12
|
+
label: { type: [String, Number], default: '' },
|
|
13
|
+
labelPos: { type: String, default: 'right' },
|
|
14
|
+
labelSize: { type: [String, Number], default: '15px' },
|
|
15
|
+
labelColor: { type: String, default: '' },
|
|
16
|
+
space: { type: [String, Number], default: '3px' },
|
|
17
|
+
width: { type: [String, Number], default: '' },
|
|
18
|
+
height: { type: [String, Number], default: '' },
|
|
19
|
+
hoverClass: { type: String, default: '' },
|
|
20
|
+
index: { type: [String, Number], default: '' },
|
|
21
|
+
stop: { type: Boolean, default: false }
|
|
22
|
+
})
|
|
23
|
+
const emit = defineEmits(['click'])
|
|
24
|
+
const toPx = (v) => typeof v === 'number' ? (v + 'px') : (String(v||''));
|
|
25
|
+
const iconW = computed(() => props.width ? toPx(props.width) : toPx(props.size))
|
|
26
|
+
const iconH = computed(() => props.height ? toPx(props.height) : toPx(props.size))
|
|
27
|
+
const iconBoxStyle = computed(() => ({ width: iconW.value, height: iconH.value }))
|
|
28
|
+
const iconStyle = computed(() => {
|
|
29
|
+
return { color: props.color || 'inherit' }
|
|
30
|
+
})
|
|
31
|
+
const wrapStyle = computed(() => {
|
|
32
|
+
const dirMap = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' }
|
|
33
|
+
return { display: 'flex', alignItems: 'center', flexDirection: dirMap[props.labelPos] || 'row' }
|
|
34
|
+
})
|
|
35
|
+
const labelStyle = computed(() => {
|
|
36
|
+
return {
|
|
37
|
+
color: props.labelColor || '',
|
|
38
|
+
fontSize: toPx(props.labelSize),
|
|
39
|
+
marginLeft: props.labelPos === 'right' ? toPx(props.space) : 0,
|
|
40
|
+
marginTop: props.labelPos === 'bottom' ? toPx(props.space) : 0,
|
|
41
|
+
marginRight: props.labelPos === 'left' ? toPx(props.space) : 0,
|
|
42
|
+
marginBottom: props.labelPos === 'top' ? toPx(props.space) : 0
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
const imgSrc = '__IMG_SRC__'
|
|
46
|
+
function onTap(e) {
|
|
47
|
+
emit('click', props.index)
|
|
48
|
+
if (props.stop && e && e.stopPropagation) e.stopPropagation()
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
51
|
+
<style scoped>
|
|
52
|
+
.icon__label { line-height: 1; }
|
|
53
|
+
</style>
|