hy-app 0.5.15 → 0.5.16
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/components/hy-skeleton/hy-skeleton.vue +142 -0
- package/components/hy-skeleton/index.scss +90 -0
- package/components/hy-skeleton/props.ts +46 -0
- package/components/hy-skeleton/typing.d.ts +31 -0
- package/components/hy-steps/hy-steps.vue +267 -267
- package/components/hy-steps/index.scss +7 -2
- package/components/hy-steps/typing.d.ts +25 -21
- package/components/hy-tag/hy-tag.vue +174 -174
- package/components/hy-tag/index.scss +3 -6
- package/components/hy-tag/props.ts +89 -89
- package/global.d.ts +2 -0
- package/index.scss +1 -1
- package/libs/css/theme.scss +1 -0
- package/libs/css/vars.scss +2 -0
- package/package.json +62 -3
- package/web-types.json +1 -1
|
@@ -1,174 +1,174 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<hy-transition mode="fade" :show="show" :custom-style="{ display: 'inline-block' }">
|
|
3
|
-
<view class="hy-tag__wrapper cursor-pointer">
|
|
4
|
-
<view :class="tagClass" @tap.stop="clickHandler" :style="tagStyle">
|
|
5
|
-
<slot name="icon">
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</view>
|
|
36
|
-
</view>
|
|
37
|
-
</hy-transition>
|
|
38
|
-
</template>
|
|
39
|
-
|
|
40
|
-
<script lang="ts">
|
|
41
|
-
export default {
|
|
42
|
-
name: 'hy-tag',
|
|
43
|
-
options: {
|
|
44
|
-
addGlobalClass: true,
|
|
45
|
-
virtualHost: true,
|
|
46
|
-
styleIsolation: 'shared'
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
|
-
<script setup lang="ts">
|
|
52
|
-
import { computed } from 'vue'
|
|
53
|
-
import type { CSSProperties } from 'vue'
|
|
54
|
-
import type { ITagEmits } from './typing'
|
|
55
|
-
import { IconConfig, colorGradient } from '../../libs'
|
|
56
|
-
import tagProps from './props'
|
|
57
|
-
|
|
58
|
-
// 组件
|
|
59
|
-
import HyTransition from '../hy-transition/hy-transition.vue'
|
|
60
|
-
import HyIcon from '../hy-icon/hy-icon.vue'
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* tag组件一般用于标记和选择,我们提供了更加丰富的表现形式,能够较全面的涵盖您的使用场景
|
|
64
|
-
* @displayName hy-tag
|
|
65
|
-
*/
|
|
66
|
-
defineOptions({})
|
|
67
|
-
|
|
68
|
-
const props = defineProps(tagProps)
|
|
69
|
-
const emit = defineEmits<ITagEmits>()
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @description tag类名
|
|
73
|
-
* */
|
|
74
|
-
const tagClass = computed((): string[] => {
|
|
75
|
-
let classes = ['hy-tag', `hy-tag--${props.shape}`, `hy-tag--${props.size}`, props.customClass]
|
|
76
|
-
if (props.disabled) {
|
|
77
|
-
classes.push('hy-tag--disabled')
|
|
78
|
-
} else {
|
|
79
|
-
const arr = [
|
|
80
|
-
props.plain ? `hy-tag--${props.type}--plain` : `hy-tag--${props.type}`,
|
|
81
|
-
props.plain && props.plainFill && `hy-tag--${props.type}--plain__fill`
|
|
82
|
-
].filter(Boolean)
|
|
83
|
-
classes = classes.concat(arr as string[])
|
|
84
|
-
}
|
|
85
|
-
return classes
|
|
86
|
-
})
|
|
87
|
-
/**
|
|
88
|
-
* @description tag样式
|
|
89
|
-
* */
|
|
90
|
-
const tagStyle = computed<CSSProperties>(() => {
|
|
91
|
-
const style: CSSProperties = {
|
|
92
|
-
marginRight: props.closable ? '10px' : 0,
|
|
93
|
-
marginTop: props.closable ? '10px' : 0,
|
|
94
|
-
background: props.bgColor,
|
|
95
|
-
borderColor: props.borderColor
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (props.color) {
|
|
99
|
-
if (props.plain) {
|
|
100
|
-
style.borderColor = props.color
|
|
101
|
-
if (props.plainFill) {
|
|
102
|
-
style.background = colorGradient(props.color, '#FFFFFF', 100)[90]
|
|
103
|
-
}
|
|
104
|
-
} else {
|
|
105
|
-
style.background = props.color
|
|
106
|
-
style.borderColor = props.color
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return Object.assign(style, props.customStyle)
|
|
111
|
-
})
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* @description 文本样式
|
|
115
|
-
* */
|
|
116
|
-
const textStyle = computed(() => {
|
|
117
|
-
const style: CSSProperties = {}
|
|
118
|
-
if (props.color && props.plain) style.color = props.color
|
|
119
|
-
return style
|
|
120
|
-
})
|
|
121
|
-
/**
|
|
122
|
-
* @description 文本类名
|
|
123
|
-
* */
|
|
124
|
-
const textClass = computed((): string[] => {
|
|
125
|
-
return [`hy-tag__text`, `hy-tag__text--${props.size}`]
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* @description 关闭图标icon大小
|
|
130
|
-
*/
|
|
131
|
-
const closeSize = computed(() => {
|
|
132
|
-
return props.size === 'large' ? 15 : props.size === 'medium' ? 13 : 11
|
|
133
|
-
})
|
|
134
|
-
/**
|
|
135
|
-
* @description 图标大小
|
|
136
|
-
* */
|
|
137
|
-
const hyIconSize = computed(() => {
|
|
138
|
-
if (props.icon?.size) {
|
|
139
|
-
return props.icon.size
|
|
140
|
-
} else {
|
|
141
|
-
return props.size === 'large' ? 18 : props.size === 'medium' ? 14 : 10
|
|
142
|
-
}
|
|
143
|
-
})
|
|
144
|
-
/**
|
|
145
|
-
* @description 图标颜色
|
|
146
|
-
* */
|
|
147
|
-
const hyIconColor = computed(() => {
|
|
148
|
-
return props.icon?.color ? props.icon.color : props.plain ? props.type : '#ffffff'
|
|
149
|
-
})
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* @description 点击关闭按钮
|
|
153
|
-
* */
|
|
154
|
-
const closeHandler = () => {
|
|
155
|
-
if (!props.disabled) {
|
|
156
|
-
emit('close', props.text)
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* @description 点击标签
|
|
161
|
-
* */
|
|
162
|
-
const clickHandler = () => {
|
|
163
|
-
if (!props.disabled) {
|
|
164
|
-
emit('click', {
|
|
165
|
-
value: props.text,
|
|
166
|
-
name: props.name
|
|
167
|
-
})
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
</script>
|
|
171
|
-
|
|
172
|
-
<style lang="scss" scoped>
|
|
173
|
-
@import './index.scss';
|
|
174
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<hy-transition mode="fade" :show="show" :custom-style="{ display: 'inline-block' }">
|
|
3
|
+
<view class="hy-tag__wrapper cursor-pointer">
|
|
4
|
+
<view :class="tagClass" @tap.stop="clickHandler" :style="tagStyle">
|
|
5
|
+
<slot v-if="$slots.icon" name="icon"></slot>
|
|
6
|
+
<hy-icon
|
|
7
|
+
v-else-if="icon?.name"
|
|
8
|
+
:name="icon?.name"
|
|
9
|
+
:color="hyIconColor"
|
|
10
|
+
:size="hyIconSize"
|
|
11
|
+
:bold="icon?.bold"
|
|
12
|
+
:customPrefix="icon?.customPrefix"
|
|
13
|
+
:imgMode="icon?.imgMode"
|
|
14
|
+
:width="icon?.width"
|
|
15
|
+
:height="icon?.height"
|
|
16
|
+
:top="icon?.top"
|
|
17
|
+
:stop="icon?.stop"
|
|
18
|
+
:round="icon?.round"
|
|
19
|
+
:customStyle="Object.assign({ marginRight: '3px' }, icon?.customStyle)"
|
|
20
|
+
></hy-icon>
|
|
21
|
+
<text :class="textClass" :style="textStyle">
|
|
22
|
+
<slot>
|
|
23
|
+
{{ text }}
|
|
24
|
+
</slot>
|
|
25
|
+
</text>
|
|
26
|
+
<!-- 关闭按钮 -->
|
|
27
|
+
<view
|
|
28
|
+
:class="['hy-tag__close', `hy-tag__close--${size}`]"
|
|
29
|
+
v-if="closable"
|
|
30
|
+
@tap.stop="closeHandler"
|
|
31
|
+
:style="{ backgroundColor: closeColor }"
|
|
32
|
+
>
|
|
33
|
+
<hy-icon :name="IconConfig.CLOSE" :size="closeSize" color="#ffffff"></hy-icon>
|
|
34
|
+
</view>
|
|
35
|
+
</view>
|
|
36
|
+
</view>
|
|
37
|
+
</hy-transition>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script lang="ts">
|
|
41
|
+
export default {
|
|
42
|
+
name: 'hy-tag',
|
|
43
|
+
options: {
|
|
44
|
+
addGlobalClass: true,
|
|
45
|
+
virtualHost: true,
|
|
46
|
+
styleIsolation: 'shared'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<script setup lang="ts">
|
|
52
|
+
import { computed } from 'vue'
|
|
53
|
+
import type { CSSProperties } from 'vue'
|
|
54
|
+
import type { ITagEmits } from './typing'
|
|
55
|
+
import { IconConfig, colorGradient } from '../../libs'
|
|
56
|
+
import tagProps from './props'
|
|
57
|
+
|
|
58
|
+
// 组件
|
|
59
|
+
import HyTransition from '../hy-transition/hy-transition.vue'
|
|
60
|
+
import HyIcon from '../hy-icon/hy-icon.vue'
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* tag组件一般用于标记和选择,我们提供了更加丰富的表现形式,能够较全面的涵盖您的使用场景
|
|
64
|
+
* @displayName hy-tag
|
|
65
|
+
*/
|
|
66
|
+
defineOptions({})
|
|
67
|
+
|
|
68
|
+
const props = defineProps(tagProps)
|
|
69
|
+
const emit = defineEmits<ITagEmits>()
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @description tag类名
|
|
73
|
+
* */
|
|
74
|
+
const tagClass = computed((): string[] => {
|
|
75
|
+
let classes = ['hy-tag', `hy-tag--${props.shape}`, `hy-tag--${props.size}`, props.customClass]
|
|
76
|
+
if (props.disabled) {
|
|
77
|
+
classes.push('hy-tag--disabled')
|
|
78
|
+
} else {
|
|
79
|
+
const arr = [
|
|
80
|
+
props.plain ? `hy-tag--${props.type}--plain` : `hy-tag--${props.type}`,
|
|
81
|
+
props.plain && props.plainFill && `hy-tag--${props.type}--plain__fill`
|
|
82
|
+
].filter(Boolean)
|
|
83
|
+
classes = classes.concat(arr as string[])
|
|
84
|
+
}
|
|
85
|
+
return classes
|
|
86
|
+
})
|
|
87
|
+
/**
|
|
88
|
+
* @description tag样式
|
|
89
|
+
* */
|
|
90
|
+
const tagStyle = computed<CSSProperties>(() => {
|
|
91
|
+
const style: CSSProperties = {
|
|
92
|
+
marginRight: props.closable ? '10px' : 0,
|
|
93
|
+
marginTop: props.closable ? '10px' : 0,
|
|
94
|
+
background: props.bgColor,
|
|
95
|
+
borderColor: props.borderColor
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (props.color) {
|
|
99
|
+
if (props.plain) {
|
|
100
|
+
style.borderColor = props.color
|
|
101
|
+
if (props.plainFill) {
|
|
102
|
+
style.background = colorGradient(props.color, '#FFFFFF', 100)[90]
|
|
103
|
+
}
|
|
104
|
+
} else {
|
|
105
|
+
style.background = props.color
|
|
106
|
+
style.borderColor = props.color
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return Object.assign(style, props.customStyle)
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @description 文本样式
|
|
115
|
+
* */
|
|
116
|
+
const textStyle = computed(() => {
|
|
117
|
+
const style: CSSProperties = {}
|
|
118
|
+
if (props.color && props.plain) style.color = props.color
|
|
119
|
+
return style
|
|
120
|
+
})
|
|
121
|
+
/**
|
|
122
|
+
* @description 文本类名
|
|
123
|
+
* */
|
|
124
|
+
const textClass = computed((): string[] => {
|
|
125
|
+
return [`hy-tag__text`, `hy-tag__text--${props.size}`]
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @description 关闭图标icon大小
|
|
130
|
+
*/
|
|
131
|
+
const closeSize = computed(() => {
|
|
132
|
+
return props.size === 'large' ? 15 : props.size === 'medium' ? 13 : 11
|
|
133
|
+
})
|
|
134
|
+
/**
|
|
135
|
+
* @description 图标大小
|
|
136
|
+
* */
|
|
137
|
+
const hyIconSize = computed(() => {
|
|
138
|
+
if (props.icon?.size) {
|
|
139
|
+
return props.icon.size
|
|
140
|
+
} else {
|
|
141
|
+
return props.size === 'large' ? 18 : props.size === 'medium' ? 14 : 10
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
/**
|
|
145
|
+
* @description 图标颜色
|
|
146
|
+
* */
|
|
147
|
+
const hyIconColor = computed(() => {
|
|
148
|
+
return props.icon?.color ? props.icon.color : props.plain ? props.type : '#ffffff'
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @description 点击关闭按钮
|
|
153
|
+
* */
|
|
154
|
+
const closeHandler = () => {
|
|
155
|
+
if (!props.disabled) {
|
|
156
|
+
emit('close', props.text)
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* @description 点击标签
|
|
161
|
+
* */
|
|
162
|
+
const clickHandler = () => {
|
|
163
|
+
if (!props.disabled) {
|
|
164
|
+
emit('click', {
|
|
165
|
+
value: props.text,
|
|
166
|
+
name: props.name
|
|
167
|
+
})
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
</script>
|
|
171
|
+
|
|
172
|
+
<style lang="scss" scoped>
|
|
173
|
+
@import './index.scss';
|
|
174
|
+
</style>
|
|
@@ -88,17 +88,14 @@ $hy-background--disabled);
|
|
|
88
88
|
|
|
89
89
|
/* 关闭按钮 */
|
|
90
90
|
@include e(close) {
|
|
91
|
-
position: absolute;
|
|
92
|
-
z-index: 999;
|
|
93
|
-
top: 10px;
|
|
94
|
-
right: 10px;
|
|
95
91
|
border-radius: $hy-border-radius-semicircle;
|
|
96
|
-
background-color: #
|
|
92
|
+
background-color: #C6C7CB;
|
|
93
|
+
margin-left: $hy-border-margin-padding-sm;
|
|
97
94
|
@include flex(row);
|
|
98
95
|
align-items: center;
|
|
99
96
|
justify-content: center;
|
|
100
97
|
/* #ifndef APP-NVUE */
|
|
101
|
-
transform: scale(0.
|
|
98
|
+
transform: scale(0.8) translate(40%, 0%);
|
|
102
99
|
/* #endif */
|
|
103
100
|
/* #ifdef APP-NVUE */
|
|
104
101
|
transform: scale(0.6) translate(50%, -50%);
|
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
import type { CSSProperties, PropType } from 'vue'
|
|
2
|
-
import type { HyIconProps } from '../hy-icon/typing'
|
|
3
|
-
|
|
4
|
-
const tagProps = {
|
|
5
|
-
/** 标签的文字内容 */
|
|
6
|
-
text: {
|
|
7
|
-
type: String,
|
|
8
|
-
default: ''
|
|
9
|
-
},
|
|
10
|
-
/** 点击需要传得值 */
|
|
11
|
-
name: {
|
|
12
|
-
type: [String, Number],
|
|
13
|
-
default: ''
|
|
14
|
-
},
|
|
15
|
-
/**
|
|
16
|
-
* 标签类型
|
|
17
|
-
* @values info,primary,success,error,warning
|
|
18
|
-
* */
|
|
19
|
-
type: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: 'primary'
|
|
22
|
-
},
|
|
23
|
-
/** 禁用点击标签 */
|
|
24
|
-
disabled: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: false
|
|
27
|
-
},
|
|
28
|
-
/**
|
|
29
|
-
* 标签的大小
|
|
30
|
-
* @values large,medium,small,mini
|
|
31
|
-
* */
|
|
32
|
-
size: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: 'medium'
|
|
35
|
-
},
|
|
36
|
-
/**
|
|
37
|
-
* tag的形状
|
|
38
|
-
* @values circle,square,opposite
|
|
39
|
-
* */
|
|
40
|
-
shape: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: 'square'
|
|
43
|
-
},
|
|
44
|
-
/** 背景颜色,默认为空字符串,即不处理 */
|
|
45
|
-
bgColor: String,
|
|
46
|
-
/** 标签字体颜色,默认为空字符串,即不处理 */
|
|
47
|
-
color: String,
|
|
48
|
-
/** 镂空形式标签的边框颜色 */
|
|
49
|
-
borderColor: String,
|
|
50
|
-
/** 关闭按钮图标的颜色 */
|
|
51
|
-
closeColor: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: '
|
|
54
|
-
},
|
|
55
|
-
/** 镂空时是否填充背景色 */
|
|
56
|
-
plainFill: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: false
|
|
59
|
-
},
|
|
60
|
-
/** 是否镂空 */
|
|
61
|
-
plain: {
|
|
62
|
-
type: Boolean,
|
|
63
|
-
default: false
|
|
64
|
-
},
|
|
65
|
-
/** 是否可关闭,设置为true,文字右边会出现一个关闭图标 */
|
|
66
|
-
closable: {
|
|
67
|
-
type: Boolean,
|
|
68
|
-
default: false
|
|
69
|
-
},
|
|
70
|
-
/** 标签显示与否 */
|
|
71
|
-
show: {
|
|
72
|
-
type: Boolean,
|
|
73
|
-
default: true
|
|
74
|
-
},
|
|
75
|
-
/** 组件内置图标,或绝对路径的图片 */
|
|
76
|
-
icon: Object as PropType<HyIconProps>,
|
|
77
|
-
/** 定义需要用到的外部样式 */
|
|
78
|
-
customStyle: {
|
|
79
|
-
type: Object as PropType<CSSProperties>,
|
|
80
|
-
default: () => {}
|
|
81
|
-
},
|
|
82
|
-
/** 自定义外部类名 */
|
|
83
|
-
customClass: {
|
|
84
|
-
type: String,
|
|
85
|
-
default: ''
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export default tagProps
|
|
1
|
+
import type { CSSProperties, PropType } from 'vue'
|
|
2
|
+
import type { HyIconProps } from '../hy-icon/typing'
|
|
3
|
+
|
|
4
|
+
const tagProps = {
|
|
5
|
+
/** 标签的文字内容 */
|
|
6
|
+
text: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: ''
|
|
9
|
+
},
|
|
10
|
+
/** 点击需要传得值 */
|
|
11
|
+
name: {
|
|
12
|
+
type: [String, Number],
|
|
13
|
+
default: ''
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* 标签类型
|
|
17
|
+
* @values info,primary,success,error,warning
|
|
18
|
+
* */
|
|
19
|
+
type: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'primary'
|
|
22
|
+
},
|
|
23
|
+
/** 禁用点击标签 */
|
|
24
|
+
disabled: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* 标签的大小
|
|
30
|
+
* @values large,medium,small,mini
|
|
31
|
+
* */
|
|
32
|
+
size: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: 'medium'
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* tag的形状
|
|
38
|
+
* @values circle,square,opposite
|
|
39
|
+
* */
|
|
40
|
+
shape: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: 'square'
|
|
43
|
+
},
|
|
44
|
+
/** 背景颜色,默认为空字符串,即不处理 */
|
|
45
|
+
bgColor: String,
|
|
46
|
+
/** 标签字体颜色,默认为空字符串,即不处理 */
|
|
47
|
+
color: String,
|
|
48
|
+
/** 镂空形式标签的边框颜色 */
|
|
49
|
+
borderColor: String,
|
|
50
|
+
/** 关闭按钮图标的颜色 */
|
|
51
|
+
closeColor: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ''
|
|
54
|
+
},
|
|
55
|
+
/** 镂空时是否填充背景色 */
|
|
56
|
+
plainFill: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false
|
|
59
|
+
},
|
|
60
|
+
/** 是否镂空 */
|
|
61
|
+
plain: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false
|
|
64
|
+
},
|
|
65
|
+
/** 是否可关闭,设置为true,文字右边会出现一个关闭图标 */
|
|
66
|
+
closable: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false
|
|
69
|
+
},
|
|
70
|
+
/** 标签显示与否 */
|
|
71
|
+
show: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: true
|
|
74
|
+
},
|
|
75
|
+
/** 组件内置图标,或绝对路径的图片 */
|
|
76
|
+
icon: Object as PropType<HyIconProps>,
|
|
77
|
+
/** 定义需要用到的外部样式 */
|
|
78
|
+
customStyle: {
|
|
79
|
+
type: Object as PropType<CSSProperties>,
|
|
80
|
+
default: () => {}
|
|
81
|
+
},
|
|
82
|
+
/** 自定义外部类名 */
|
|
83
|
+
customClass: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: ''
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export default tagProps
|
package/global.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ declare module 'vue' {
|
|
|
36
36
|
HyGrid: (typeof import('./components/hy-grid/hy-grid.vue'))['default']
|
|
37
37
|
HyIcon: (typeof import('./components/hy-icon/hy-icon.vue'))['default']
|
|
38
38
|
HyImage: (typeof import('./components/hy-image/hy-image.vue'))['default']
|
|
39
|
+
HyIndexBar: (typeof import('./components/hy-index-bar/hy-index-bar.vue'))['default']
|
|
39
40
|
HyInput: (typeof import('./components/hy-input/hy-input.vue'))['default']
|
|
40
41
|
HyLine: (typeof import('./components/hy-line/hy-line.vue'))['default']
|
|
41
42
|
HyLineProgress: (typeof import('./components/hy-line-progress/hy-line-progress.vue'))['default']
|
|
@@ -62,6 +63,7 @@ declare module 'vue' {
|
|
|
62
63
|
HyScrollList: (typeof import('./components/hy-scroll-list/hy-scroll-list.vue'))['default']
|
|
63
64
|
HySearch: (typeof import('./components/hy-search/hy-search.vue'))['default']
|
|
64
65
|
HySignature: (typeof import('./components/hy-signature/hy-signature.vue'))['default']
|
|
66
|
+
HySkeleton: (typeof import('./components/hy-skeleton/hy-skeleton.vue'))['default']
|
|
65
67
|
HySlider: (typeof import('./components/hy-slider/hy-slider.vue'))['default']
|
|
66
68
|
HyStatusBar: (typeof import('./components/hy-status-bar/hy-status-bar.vue'))['default']
|
|
67
69
|
HySteps: (typeof import('./components/hy-steps/hy-steps.vue'))['default']
|
package/index.scss
CHANGED
package/libs/css/theme.scss
CHANGED
|
@@ -46,6 +46,7 @@ $hy-background--container: var(--hy-background--container, #ffffff) !default; //
|
|
|
46
46
|
$hy-background--disabled: var(--hy-background--disabled, rgba(0, 0, 0, 0.04)); // 禁用背景色
|
|
47
47
|
$hy-background--track: var(--hy-background--track, #F6F6F6) !default; // 轨道背景色
|
|
48
48
|
$hy-background--empty: var(--hy-background--empty, #F3F3F3) !default; // 搜索背景色
|
|
49
|
+
$hy-background--skeleton: var(--hy-background--skeleton, #eee) !default; // 骨架屏背景色
|
|
49
50
|
$hy-background--hover: var(--hy-background--hover, rgba(0,0,0,0.05)) !default; // 点击状态
|
|
50
51
|
$hy-background-mask: var(--hy-background-mask, rgba(0, 0, 0, 0.5)); //遮罩颜色
|
|
51
52
|
$hy-background--active: var(--hy-background--active, #FFFFFF); // 选中背景色
|
package/libs/css/vars.scss
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
--hy-background--container: #FFFFFF;
|
|
18
18
|
--hy-background--disabled: rgba(0, 0, 0, 0.04);
|
|
19
19
|
--hy-background--empty: #F3F3F3;
|
|
20
|
+
--hy-background--skeleton: #EEEEEE;
|
|
20
21
|
--hy-background--hover: rgba(0,0,0,0.05);
|
|
21
22
|
--hy-background--active: #FFFFFF;
|
|
22
23
|
--hy-background--close: #f0f0f0;
|
|
@@ -53,6 +54,7 @@
|
|
|
53
54
|
--hy-background--container: #242424;
|
|
54
55
|
--hy-background--disabled: rgba(255, 255, 255, 0.08);
|
|
55
56
|
--hy-background--empty: #3A3A44;
|
|
57
|
+
--hy-background--skeleton: #323233;
|
|
56
58
|
--hy-background--hover: rgba(255,255,255,0.2);
|
|
57
59
|
--hy-background--active: #000000;
|
|
58
60
|
--hy-background--close: #323233;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hy-app",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "feat:
|
|
3
|
+
"version": "0.5.16",
|
|
4
|
+
"description": "feat: 新增骨架屏组件",
|
|
5
5
|
"main": "./index.ts",
|
|
6
6
|
"private": false,
|
|
7
7
|
"scripts": {},
|
|
@@ -14,5 +14,64 @@
|
|
|
14
14
|
],
|
|
15
15
|
"web-types": "./web-types.json",
|
|
16
16
|
"author": "华玥作者",
|
|
17
|
-
"license": "MIT"
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"uni_modules": {
|
|
19
|
+
"dependencies": [],
|
|
20
|
+
"encrypt": [],
|
|
21
|
+
"platforms": {
|
|
22
|
+
"cloud": {
|
|
23
|
+
"tcb": "√",
|
|
24
|
+
"aliyun": "√",
|
|
25
|
+
"alipay": "√"
|
|
26
|
+
},
|
|
27
|
+
"client": {
|
|
28
|
+
"uni-app": {
|
|
29
|
+
"vue": {
|
|
30
|
+
"vue2": "x",
|
|
31
|
+
"vue3": "√"
|
|
32
|
+
},
|
|
33
|
+
"web": {
|
|
34
|
+
"safari": "√",
|
|
35
|
+
"chrome": "√"
|
|
36
|
+
},
|
|
37
|
+
"app": {
|
|
38
|
+
"vue": "√",
|
|
39
|
+
"nvue": "-",
|
|
40
|
+
"android": "√",
|
|
41
|
+
"ios": "√",
|
|
42
|
+
"harmony": "√"
|
|
43
|
+
},
|
|
44
|
+
"mp": {
|
|
45
|
+
"weixin": "√",
|
|
46
|
+
"alipay": "√",
|
|
47
|
+
"toutiao": "√",
|
|
48
|
+
"baidu": "-",
|
|
49
|
+
"kuaishou": "-",
|
|
50
|
+
"jd": "-",
|
|
51
|
+
"harmony": "√",
|
|
52
|
+
"qq": "√",
|
|
53
|
+
"lark": "-"
|
|
54
|
+
},
|
|
55
|
+
"quickapp": {
|
|
56
|
+
"huawei": "-",
|
|
57
|
+
"union": "-"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"uni-app-x": {
|
|
61
|
+
"web": {
|
|
62
|
+
"safari": "-",
|
|
63
|
+
"chrome": "-"
|
|
64
|
+
},
|
|
65
|
+
"app": {
|
|
66
|
+
"android": "-",
|
|
67
|
+
"ios": "-",
|
|
68
|
+
"harmony": "-"
|
|
69
|
+
},
|
|
70
|
+
"mp": {
|
|
71
|
+
"weixin": "-"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
18
77
|
}
|