@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.
Files changed (38) hide show
  1. package/dist/mobile/uvue/icon-brush/brush.png +0 -0
  2. package/dist/mobile/uvue/icon-brush/icon-brush.uvue +75 -0
  3. package/dist/mobile/uvue/icon-copy/copy.png +0 -0
  4. package/dist/mobile/uvue/icon-copy/icon-copy.uvue +75 -0
  5. package/dist/mobile/uvue/icon-edit/edit.png +0 -0
  6. package/dist/mobile/uvue/icon-edit/icon-edit.uvue +75 -0
  7. package/dist/mobile/uvue/icon-filter/filter.png +0 -0
  8. package/dist/mobile/uvue/icon-filter/icon-filter.uvue +75 -0
  9. package/dist/mobile/uvue/icon-highlight/highlight.png +0 -0
  10. package/dist/mobile/uvue/icon-highlight/icon-highlight.uvue +75 -0
  11. package/dist/mobile/uvue/icon-home/home.png +0 -0
  12. package/dist/mobile/uvue/icon-home/icon-home.uvue +1 -1
  13. package/dist/mobile/uvue/icon-oblique-line/icon-oblique-line.uvue +75 -0
  14. package/dist/mobile/uvue/icon-oblique-line/oblique-line.png +0 -0
  15. package/dist/mobile/uvue/icon-original-size/icon-original-size.uvue +75 -0
  16. package/dist/mobile/uvue/icon-original-size/original-size.png +0 -0
  17. package/dist/mobile/uvue/icon-zoom-in/icon-zoom-in.uvue +75 -0
  18. package/dist/mobile/uvue/icon-zoom-in/zoom-in.png +0 -0
  19. package/dist/mobile/vue/icon-brush.vue +58 -0
  20. package/dist/mobile/vue/icon-copy.vue +58 -0
  21. package/dist/mobile/vue/icon-edit.vue +58 -0
  22. package/dist/mobile/vue/icon-filter.vue +58 -0
  23. package/dist/mobile/vue/icon-highlight.vue +58 -0
  24. package/dist/mobile/vue/icon-home.vue +1 -1
  25. package/dist/mobile/vue/icon-oblique-line.vue +58 -0
  26. package/dist/mobile/vue/icon-original-size.vue +58 -0
  27. package/dist/mobile/vue/icon-zoom-in.vue +58 -0
  28. package/dist/web/vue/Brush.vue +53 -0
  29. package/dist/web/vue/Copy.vue +53 -0
  30. package/dist/web/vue/Edit.vue +53 -0
  31. package/dist/web/vue/Filter.vue +53 -0
  32. package/dist/web/vue/Highlight.vue +53 -0
  33. package/dist/web/vue/Home.vue +1 -1
  34. package/dist/web/vue/ObliqueLine.vue +53 -0
  35. package/dist/web/vue/OriginalSize.vue +53 -0
  36. package/dist/web/vue/ZoomIn.vue +53 -0
  37. package/dist/web/vue/index.js +9 -1
  38. package/package.json +1 -1
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <view class="icon" @tap="onTap" :hover-class="hoverClass" :style="rootStyle">
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 lang="uts">
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
+ function toPx(v: any): string {
31
+ if (typeof v === 'number') return (v as number).toString() + 'px'
32
+ const s = (v as string)
33
+ return s != '' ? s : ''
34
+ }
35
+ const iconW = computed((): string => (props.width != '' ? toPx(props.width) : toPx(props.size)))
36
+ const iconH = computed((): string => (props.height != '' ? toPx(props.height) : toPx(props.size)))
37
+ const iconStyle = computed((): UTSJSONObject => {
38
+ return { 'color': props.color != '' ? props.color : 'inherit' } as UTSJSONObject
39
+ })
40
+ const iconBoxStyle = computed((): UTSJSONObject => ({ width: iconW.value, height: iconH.value } as UTSJSONObject))
41
+ const wrapStyle = computed((): UTSJSONObject => {
42
+ const map = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' } as UTSJSONObject
43
+ let dir: string = 'row'
44
+ const cand = map[props.labelPos] as string | null
45
+ if (cand != null && cand.length > 0) {
46
+ dir = cand
47
+ }
48
+ return { display: 'flex', alignItems: 'center', flexDirection: dir } as UTSJSONObject
49
+ })
50
+ const rootStyle = computed((): UTSJSONObject => {
51
+ const s = wrapStyle.value
52
+ const i = iconStyle.value
53
+ for (const key in i) {
54
+ s[key] = i[key]
55
+ }
56
+ return s
57
+ })
58
+ const labelStyle = computed((): UTSJSONObject => {
59
+ const out = {} as UTSJSONObject
60
+ if (props.labelColor != '') out['color'] = props.labelColor
61
+ out['fontSize'] = toPx(props.labelSize)
62
+ out['marginLeft'] = props.labelPos == 'right' ? toPx(props.space) : 0
63
+ out['marginTop'] = props.labelPos == 'bottom' ? toPx(props.space) : 0
64
+ out['marginRight'] = props.labelPos == 'left' ? toPx(props.space) : 0
65
+ out['marginBottom'] = props.labelPos == 'top' ? toPx(props.space) : 0
66
+ return out
67
+ })
68
+ function onTap(e: UniPointerEvent) {
69
+ emit('click', props.index)
70
+ if (props.stop) e.stopPropagation()
71
+ }
72
+ </script>
73
+ <style scoped>
74
+ .icon__label { line-height: 1; }
75
+ </style>
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <view class="icon" @tap="onTap" :hover-class="hoverClass" :style="rootStyle">
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 lang="uts">
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
+ function toPx(v: any): string {
31
+ if (typeof v === 'number') return (v as number).toString() + 'px'
32
+ const s = (v as string)
33
+ return s != '' ? s : ''
34
+ }
35
+ const iconW = computed((): string => (props.width != '' ? toPx(props.width) : toPx(props.size)))
36
+ const iconH = computed((): string => (props.height != '' ? toPx(props.height) : toPx(props.size)))
37
+ const iconStyle = computed((): UTSJSONObject => {
38
+ return { 'color': props.color != '' ? props.color : 'inherit' } as UTSJSONObject
39
+ })
40
+ const iconBoxStyle = computed((): UTSJSONObject => ({ width: iconW.value, height: iconH.value } as UTSJSONObject))
41
+ const wrapStyle = computed((): UTSJSONObject => {
42
+ const map = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' } as UTSJSONObject
43
+ let dir: string = 'row'
44
+ const cand = map[props.labelPos] as string | null
45
+ if (cand != null && cand.length > 0) {
46
+ dir = cand
47
+ }
48
+ return { display: 'flex', alignItems: 'center', flexDirection: dir } as UTSJSONObject
49
+ })
50
+ const rootStyle = computed((): UTSJSONObject => {
51
+ const s = wrapStyle.value
52
+ const i = iconStyle.value
53
+ for (const key in i) {
54
+ s[key] = i[key]
55
+ }
56
+ return s
57
+ })
58
+ const labelStyle = computed((): UTSJSONObject => {
59
+ const out = {} as UTSJSONObject
60
+ if (props.labelColor != '') out['color'] = props.labelColor
61
+ out['fontSize'] = toPx(props.labelSize)
62
+ out['marginLeft'] = props.labelPos == 'right' ? toPx(props.space) : 0
63
+ out['marginTop'] = props.labelPos == 'bottom' ? toPx(props.space) : 0
64
+ out['marginRight'] = props.labelPos == 'left' ? toPx(props.space) : 0
65
+ out['marginBottom'] = props.labelPos == 'top' ? toPx(props.space) : 0
66
+ return out
67
+ })
68
+ function onTap(e: UniPointerEvent) {
69
+ emit('click', props.index)
70
+ if (props.stop) e.stopPropagation()
71
+ }
72
+ </script>
73
+ <style scoped>
74
+ .icon__label { line-height: 1; }
75
+ </style>
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <view class="icon" @tap="onTap" :hover-class="hoverClass" :style="rootStyle">
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 lang="uts">
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
+ function toPx(v: any): string {
31
+ if (typeof v === 'number') return (v as number).toString() + 'px'
32
+ const s = (v as string)
33
+ return s != '' ? s : ''
34
+ }
35
+ const iconW = computed((): string => (props.width != '' ? toPx(props.width) : toPx(props.size)))
36
+ const iconH = computed((): string => (props.height != '' ? toPx(props.height) : toPx(props.size)))
37
+ const iconStyle = computed((): UTSJSONObject => {
38
+ return { 'color': props.color != '' ? props.color : 'inherit' } as UTSJSONObject
39
+ })
40
+ const iconBoxStyle = computed((): UTSJSONObject => ({ width: iconW.value, height: iconH.value } as UTSJSONObject))
41
+ const wrapStyle = computed((): UTSJSONObject => {
42
+ const map = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' } as UTSJSONObject
43
+ let dir: string = 'row'
44
+ const cand = map[props.labelPos] as string | null
45
+ if (cand != null && cand.length > 0) {
46
+ dir = cand
47
+ }
48
+ return { display: 'flex', alignItems: 'center', flexDirection: dir } as UTSJSONObject
49
+ })
50
+ const rootStyle = computed((): UTSJSONObject => {
51
+ const s = wrapStyle.value
52
+ const i = iconStyle.value
53
+ for (const key in i) {
54
+ s[key] = i[key]
55
+ }
56
+ return s
57
+ })
58
+ const labelStyle = computed((): UTSJSONObject => {
59
+ const out = {} as UTSJSONObject
60
+ if (props.labelColor != '') out['color'] = props.labelColor
61
+ out['fontSize'] = toPx(props.labelSize)
62
+ out['marginLeft'] = props.labelPos == 'right' ? toPx(props.space) : 0
63
+ out['marginTop'] = props.labelPos == 'bottom' ? toPx(props.space) : 0
64
+ out['marginRight'] = props.labelPos == 'left' ? toPx(props.space) : 0
65
+ out['marginBottom'] = props.labelPos == 'top' ? toPx(props.space) : 0
66
+ return out
67
+ })
68
+ function onTap(e: UniPointerEvent) {
69
+ emit('click', props.index)
70
+ if (props.stop) e.stopPropagation()
71
+ }
72
+ </script>
73
+ <style scoped>
74
+ .icon__label { line-height: 1; }
75
+ </style>
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <view class="icon" @tap="onTap" :hover-class="hoverClass" :style="rootStyle">
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 lang="uts">
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
+ function toPx(v: any): string {
31
+ if (typeof v === 'number') return (v as number).toString() + 'px'
32
+ const s = (v as string)
33
+ return s != '' ? s : ''
34
+ }
35
+ const iconW = computed((): string => (props.width != '' ? toPx(props.width) : toPx(props.size)))
36
+ const iconH = computed((): string => (props.height != '' ? toPx(props.height) : toPx(props.size)))
37
+ const iconStyle = computed((): UTSJSONObject => {
38
+ return { 'color': props.color != '' ? props.color : 'inherit' } as UTSJSONObject
39
+ })
40
+ const iconBoxStyle = computed((): UTSJSONObject => ({ width: iconW.value, height: iconH.value } as UTSJSONObject))
41
+ const wrapStyle = computed((): UTSJSONObject => {
42
+ const map = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' } as UTSJSONObject
43
+ let dir: string = 'row'
44
+ const cand = map[props.labelPos] as string | null
45
+ if (cand != null && cand.length > 0) {
46
+ dir = cand
47
+ }
48
+ return { display: 'flex', alignItems: 'center', flexDirection: dir } as UTSJSONObject
49
+ })
50
+ const rootStyle = computed((): UTSJSONObject => {
51
+ const s = wrapStyle.value
52
+ const i = iconStyle.value
53
+ for (const key in i) {
54
+ s[key] = i[key]
55
+ }
56
+ return s
57
+ })
58
+ const labelStyle = computed((): UTSJSONObject => {
59
+ const out = {} as UTSJSONObject
60
+ if (props.labelColor != '') out['color'] = props.labelColor
61
+ out['fontSize'] = toPx(props.labelSize)
62
+ out['marginLeft'] = props.labelPos == 'right' ? toPx(props.space) : 0
63
+ out['marginTop'] = props.labelPos == 'bottom' ? toPx(props.space) : 0
64
+ out['marginRight'] = props.labelPos == 'left' ? toPx(props.space) : 0
65
+ out['marginBottom'] = props.labelPos == 'top' ? toPx(props.space) : 0
66
+ return out
67
+ })
68
+ function onTap(e: UniPointerEvent) {
69
+ emit('click', props.index)
70
+ if (props.stop) e.stopPropagation()
71
+ }
72
+ </script>
73
+ <style scoped>
74
+ .icon__label { line-height: 1; }
75
+ </style>
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <view class="icon" @tap="onTap" :hover-class="hoverClass" :style="rootStyle">
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 lang="uts">
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
+ function toPx(v: any): string {
31
+ if (typeof v === 'number') return (v as number).toString() + 'px'
32
+ const s = (v as string)
33
+ return s != '' ? s : ''
34
+ }
35
+ const iconW = computed((): string => (props.width != '' ? toPx(props.width) : toPx(props.size)))
36
+ const iconH = computed((): string => (props.height != '' ? toPx(props.height) : toPx(props.size)))
37
+ const iconStyle = computed((): UTSJSONObject => {
38
+ return { 'color': props.color != '' ? props.color : 'inherit' } as UTSJSONObject
39
+ })
40
+ const iconBoxStyle = computed((): UTSJSONObject => ({ width: iconW.value, height: iconH.value } as UTSJSONObject))
41
+ const wrapStyle = computed((): UTSJSONObject => {
42
+ const map = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' } as UTSJSONObject
43
+ let dir: string = 'row'
44
+ const cand = map[props.labelPos] as string | null
45
+ if (cand != null && cand.length > 0) {
46
+ dir = cand
47
+ }
48
+ return { display: 'flex', alignItems: 'center', flexDirection: dir } as UTSJSONObject
49
+ })
50
+ const rootStyle = computed((): UTSJSONObject => {
51
+ const s = wrapStyle.value
52
+ const i = iconStyle.value
53
+ for (const key in i) {
54
+ s[key] = i[key]
55
+ }
56
+ return s
57
+ })
58
+ const labelStyle = computed((): UTSJSONObject => {
59
+ const out = {} as UTSJSONObject
60
+ if (props.labelColor != '') out['color'] = props.labelColor
61
+ out['fontSize'] = toPx(props.labelSize)
62
+ out['marginLeft'] = props.labelPos == 'right' ? toPx(props.space) : 0
63
+ out['marginTop'] = props.labelPos == 'bottom' ? toPx(props.space) : 0
64
+ out['marginRight'] = props.labelPos == 'left' ? toPx(props.space) : 0
65
+ out['marginBottom'] = props.labelPos == 'top' ? toPx(props.space) : 0
66
+ return out
67
+ })
68
+ function onTap(e: UniPointerEvent) {
69
+ emit('click', props.index)
70
+ if (props.stop) e.stopPropagation()
71
+ }
72
+ </script>
73
+ <style scoped>
74
+ .icon__label { line-height: 1; }
75
+ </style>
Binary file
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <view class="icon" @tap="onTap" :hover-class="hoverClass" :style="rootStyle">
3
3
  <!-- #ifdef H5 -->
4
- <svg v-bind="$attrs" :style="iconStyle" :width="iconW" :height="iconH" xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 1024 1024"><path fill="currentColor" d="M615.64 510.5a62.15 62.15 0 0 1-32.75-9.36l-53.68-33.22a17.19 17.19 0 0 0-18-.07L461.63 498a62.31 62.31 0 0 1-67.88-2.09l-36.91-25.66a17.31 17.31 0 0 0-19.7 0l-31 21.57a62.2 62.2 0 0 1-79.58-7.08l-21.5-21.5a107 107 0 0 1-30.86-87.52c2.7-25 5.57-50.63 8.54-76.1A113.8 113.8 0 0 1 295.78 199l462.35.07a113.87 113.87 0 0 1 113 100.48c3.3 27.95 6.25 54.41 8.77 78.65a107 107 0 0 1-30.91 87l-13.27 13.27a62.51 62.51 0 0 1-74.24 10.4l-39.68-22.04a17.28 17.28 0 0 0-17.31.33l-56.58 34.28a62.2 62.2 0 0 1-32.27 9.06m-95.51-90.21a62.2 62.2 0 0 1 32.76 9.36l53.68 33.22a17.19 17.19 0 0 0 18 .09l56.58-34.29a62.38 62.38 0 0 1 62.48-1.18l39.71 22.05a17.31 17.31 0 0 0 20.57-2.88l13.27-13.27a62.16 62.16 0 0 0 18-50.58c-2.5-24-5.42-50.28-8.7-78A68.84 68.84 0 0 0 758.15 244H295.79a68.79 68.79 0 0 0-68.34 60.84c-3 25.34-5.81 50.81-8.5 75.71a62.22 62.22 0 0 0 17.94 50.88l21.5 21.5a17.25 17.25 0 0 0 22.06 2l31-21.58a62.51 62.51 0 0 1 71.09 0l36.91 25.67a17.27 17.27 0 0 0 18.81.58l49.54-30.12a62.2 62.2 0 0 1 32.33-9.19m104.46 337.56a22.5 22.5 0 0 1-22.5-22.5v-58a76 76 0 0 0-152.1 0v58a22.5 22.5 0 1 1-45 0v-58a121.05 121.05 0 0 1 242.1 0v58a22.5 22.5 0 0 1-22.5 22.5"/><path fill="currentColor" d="M527.05 849.87c-38 0-76.5-1.53-114.4-4.56l-48-3.84a155 155 0 0 1-142.21-142.21l-3.84-48c-3-38.19-3-57.22-3-95.13v-.54a22.5 22.5 0 0 1 45 0v.54c0 36.71 0 55.15 2.91 91.54l3.83 48a110.08 110.08 0 0 0 100.89 100.95l48 3.83c36.81 2.94 74.22 4.48 111.14 4.42 36.7 0 73.87-1.49 110.47-4.42l48-3.83a110.06 110.06 0 0 0 100.95-100.94l3.83-48c2.91-36.39 2.91-54.83 2.91-91.54v-.54a22.5 22.5 0 1 1 45 0v.54c0 37.91 0 56.94-3 95.13l-3.83 48a155 155 0 0 1-142.27 142.2l-48 3.84c-37.78 3-76.15 4.55-114 4.56z"/></svg>
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,75 @@
1
+ <template>
2
+ <view class="icon" @tap="onTap" :hover-class="hoverClass" :style="rootStyle">
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 lang="uts">
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
+ function toPx(v: any): string {
31
+ if (typeof v === 'number') return (v as number).toString() + 'px'
32
+ const s = (v as string)
33
+ return s != '' ? s : ''
34
+ }
35
+ const iconW = computed((): string => (props.width != '' ? toPx(props.width) : toPx(props.size)))
36
+ const iconH = computed((): string => (props.height != '' ? toPx(props.height) : toPx(props.size)))
37
+ const iconStyle = computed((): UTSJSONObject => {
38
+ return { 'color': props.color != '' ? props.color : 'inherit' } as UTSJSONObject
39
+ })
40
+ const iconBoxStyle = computed((): UTSJSONObject => ({ width: iconW.value, height: iconH.value } as UTSJSONObject))
41
+ const wrapStyle = computed((): UTSJSONObject => {
42
+ const map = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' } as UTSJSONObject
43
+ let dir: string = 'row'
44
+ const cand = map[props.labelPos] as string | null
45
+ if (cand != null && cand.length > 0) {
46
+ dir = cand
47
+ }
48
+ return { display: 'flex', alignItems: 'center', flexDirection: dir } as UTSJSONObject
49
+ })
50
+ const rootStyle = computed((): UTSJSONObject => {
51
+ const s = wrapStyle.value
52
+ const i = iconStyle.value
53
+ for (const key in i) {
54
+ s[key] = i[key]
55
+ }
56
+ return s
57
+ })
58
+ const labelStyle = computed((): UTSJSONObject => {
59
+ const out = {} as UTSJSONObject
60
+ if (props.labelColor != '') out['color'] = props.labelColor
61
+ out['fontSize'] = toPx(props.labelSize)
62
+ out['marginLeft'] = props.labelPos == 'right' ? toPx(props.space) : 0
63
+ out['marginTop'] = props.labelPos == 'bottom' ? toPx(props.space) : 0
64
+ out['marginRight'] = props.labelPos == 'left' ? toPx(props.space) : 0
65
+ out['marginBottom'] = props.labelPos == 'top' ? toPx(props.space) : 0
66
+ return out
67
+ })
68
+ function onTap(e: UniPointerEvent) {
69
+ emit('click', props.index)
70
+ if (props.stop) e.stopPropagation()
71
+ }
72
+ </script>
73
+ <style scoped>
74
+ .icon__label { line-height: 1; }
75
+ </style>
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <view class="icon" @tap="onTap" :hover-class="hoverClass" :style="rootStyle">
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 lang="uts">
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
+ function toPx(v: any): string {
31
+ if (typeof v === 'number') return (v as number).toString() + 'px'
32
+ const s = (v as string)
33
+ return s != '' ? s : ''
34
+ }
35
+ const iconW = computed((): string => (props.width != '' ? toPx(props.width) : toPx(props.size)))
36
+ const iconH = computed((): string => (props.height != '' ? toPx(props.height) : toPx(props.size)))
37
+ const iconStyle = computed((): UTSJSONObject => {
38
+ return { 'color': props.color != '' ? props.color : 'inherit' } as UTSJSONObject
39
+ })
40
+ const iconBoxStyle = computed((): UTSJSONObject => ({ width: iconW.value, height: iconH.value } as UTSJSONObject))
41
+ const wrapStyle = computed((): UTSJSONObject => {
42
+ const map = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' } as UTSJSONObject
43
+ let dir: string = 'row'
44
+ const cand = map[props.labelPos] as string | null
45
+ if (cand != null && cand.length > 0) {
46
+ dir = cand
47
+ }
48
+ return { display: 'flex', alignItems: 'center', flexDirection: dir } as UTSJSONObject
49
+ })
50
+ const rootStyle = computed((): UTSJSONObject => {
51
+ const s = wrapStyle.value
52
+ const i = iconStyle.value
53
+ for (const key in i) {
54
+ s[key] = i[key]
55
+ }
56
+ return s
57
+ })
58
+ const labelStyle = computed((): UTSJSONObject => {
59
+ const out = {} as UTSJSONObject
60
+ if (props.labelColor != '') out['color'] = props.labelColor
61
+ out['fontSize'] = toPx(props.labelSize)
62
+ out['marginLeft'] = props.labelPos == 'right' ? toPx(props.space) : 0
63
+ out['marginTop'] = props.labelPos == 'bottom' ? toPx(props.space) : 0
64
+ out['marginRight'] = props.labelPos == 'left' ? toPx(props.space) : 0
65
+ out['marginBottom'] = props.labelPos == 'top' ? toPx(props.space) : 0
66
+ return out
67
+ })
68
+ function onTap(e: UniPointerEvent) {
69
+ emit('click', props.index)
70
+ if (props.stop) e.stopPropagation()
71
+ }
72
+ </script>
73
+ <style scoped>
74
+ .icon__label { line-height: 1; }
75
+ </style>
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <view class="icon" @tap="onTap" :hover-class="hoverClass" :style="rootStyle">
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 lang="uts">
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
+ function toPx(v: any): string {
31
+ if (typeof v === 'number') return (v as number).toString() + 'px'
32
+ const s = (v as string)
33
+ return s != '' ? s : ''
34
+ }
35
+ const iconW = computed((): string => (props.width != '' ? toPx(props.width) : toPx(props.size)))
36
+ const iconH = computed((): string => (props.height != '' ? toPx(props.height) : toPx(props.size)))
37
+ const iconStyle = computed((): UTSJSONObject => {
38
+ return { 'color': props.color != '' ? props.color : 'inherit' } as UTSJSONObject
39
+ })
40
+ const iconBoxStyle = computed((): UTSJSONObject => ({ width: iconW.value, height: iconH.value } as UTSJSONObject))
41
+ const wrapStyle = computed((): UTSJSONObject => {
42
+ const map = { right: 'row', left: 'row-reverse', top: 'column-reverse', bottom: 'column' } as UTSJSONObject
43
+ let dir: string = 'row'
44
+ const cand = map[props.labelPos] as string | null
45
+ if (cand != null && cand.length > 0) {
46
+ dir = cand
47
+ }
48
+ return { display: 'flex', alignItems: 'center', flexDirection: dir } as UTSJSONObject
49
+ })
50
+ const rootStyle = computed((): UTSJSONObject => {
51
+ const s = wrapStyle.value
52
+ const i = iconStyle.value
53
+ for (const key in i) {
54
+ s[key] = i[key]
55
+ }
56
+ return s
57
+ })
58
+ const labelStyle = computed((): UTSJSONObject => {
59
+ const out = {} as UTSJSONObject
60
+ if (props.labelColor != '') out['color'] = props.labelColor
61
+ out['fontSize'] = toPx(props.labelSize)
62
+ out['marginLeft'] = props.labelPos == 'right' ? toPx(props.space) : 0
63
+ out['marginTop'] = props.labelPos == 'bottom' ? toPx(props.space) : 0
64
+ out['marginRight'] = props.labelPos == 'left' ? toPx(props.space) : 0
65
+ out['marginBottom'] = props.labelPos == 'top' ? toPx(props.space) : 0
66
+ return out
67
+ })
68
+ function onTap(e: UniPointerEvent) {
69
+ emit('click', props.index)
70
+ if (props.stop) e.stopPropagation()
71
+ }
72
+ </script>
73
+ <style scoped>
74
+ .icon__label { line-height: 1; }
75
+ </style>