@star-ai/star-ui 0.1.5 → 0.1.7

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/lib/index.esm.js CHANGED
@@ -3,45 +3,7 @@
3
3
 
4
4
  // Button 组件
5
5
  const StarButton = {
6
- template: `<view
7
- class="star-button"
8
- :class="[
9
- `star-button--\${type}`,
10
- `star-button--\${size}`,
11
- {
12
- 'star-button--disabled': disabled,
13
- 'star-button--loading': loading,
14
- 'star-button--block': block,
15
- 'star-button--plain': plain
16
- }
17
- ]"
18
- :style="[customStyle]"
19
- @click="handleClick"
20
- >
21
- <!-- 加载状态 -->
22
- <view v-if="loading" class="star-button__loading">
23
- <view class="star-button__loading-spinner"></view>
24
- </view>
25
-
26
- <!-- 图标 -->
27
- <text
28
- v-if="icon && !loading"
29
- class="star-button__icon"
30
- :class="icon"
31
- ></text>
32
-
33
- <!-- 文字内容 -->
34
- <text class="star-button__text">
35
- <slot></slot>
36
- </text>
37
-
38
- <!-- 右侧图标 -->
39
- <text
40
- v-if="rightIcon && !loading"
41
- class="star-button__right-icon"
42
- :class="rightIcon"
43
- ></text>
44
- </view>`,
6
+ template: '<view \\n class="star-button"\\n :class="[\\n \`star-button--${type}\`,\\n \`star-button--${size}\`,\\n {\\n \'star-button--disabled\': disabled,\\n \'star-button--loading\': loading,\\n \'star-button--block\': block,\\n \'star-button--plain\': plain\\n }\\n ]"\\n :style="[customStyle]"\\n @click="handleClick"\\n >\\n <!-- 加载状态 -->\\n <view v-if="loading" class="star-button__loading">\\n <view class="star-button__loading-spinner"></view>\\n </view>\\n \\n <!-- 图标 -->\\n <text \\n v-if="icon && !loading" \\n class="star-button__icon" \\n :class="icon"\\n ></text>\\n \\n <!-- 文字内容 -->\\n <text class="star-button__text">\\n <slot></slot>\\n </text>\\n \\n <!-- 右侧图标 -->\\n <text \\n v-if="rightIcon && !loading" \\n class="star-button__right-icon" \\n :class="rightIcon"\\n ></text>\\n </view>',
45
7
 
46
8
  name: 'StarButton',
47
9
 
@@ -151,78 +113,7 @@ StarButton.install = function(Vue) {
151
113
 
152
114
  // Input 组件
153
115
  const StarInput = {
154
- template: `<view class="star-input" :class="inputClasses">
155
- <!-- 前置内容 -->
156
- <view v-if="$slots.prepend || prepend" class="star-input__prepend">
157
- <slot name="prepend">
158
- <text v-if="prepend" class="star-input__prepend-text">{{ prepend }}</text>
159
- </slot>
160
- </view>
161
-
162
- <!-- 输入框主体 -->
163
- <view class="star-input__wrapper">
164
- <!-- 前置图标 -->
165
- <text
166
- v-if="prefixIcon"
167
- class="star-input__prefix-icon"
168
- :class="prefixIcon"
169
- @click="handlePrefixIconClick"
170
- ></text>
171
-
172
- <!-- 输入框 -->
173
- <input
174
- class="star-input__inner"
175
- :type="showPassword ? (passwordVisible ? 'text' : 'password') : type"
176
- :value="currentValue"
177
- :placeholder="placeholder"
178
- :disabled="disabled"
179
- :maxlength="maxlength"
180
- :focus="focus"
181
- :confirm-type="confirmType"
182
- :placeholder-style="placeholderStyle"
183
- :placeholder-class="placeholderClass"
184
- :cursor-spacing="cursorSpacing"
185
- @input="handleInput"
186
- @focus="handleFocus"
187
- @blur="handleBlur"
188
- @confirm="handleConfirm"
189
- @keyboardheightchange="handleKeyboardHeightChange"
190
- />
191
-
192
- <!-- 清除按钮 -->
193
- <view
194
- v-if="clearable && currentValue && !disabled"
195
- class="star-input__clear"
196
- @click="handleClear"
197
- >
198
- <text class="star-icon-close"></text>
199
- </view>
200
-
201
- <!-- 密码可见切换按钮 -->
202
- <view
203
- v-if="showPassword && currentValue"
204
- class="star-input__password-toggle"
205
- @click="togglePasswordVisible"
206
- >
207
- <text :class="passwordVisible ? 'star-icon-eye-open' : 'star-icon-eye-close'"></text>
208
- </view>
209
-
210
- <!-- 后置图标 -->
211
- <text
212
- v-if="suffixIcon"
213
- class="star-input__suffix-icon"
214
- :class="suffixIcon"
215
- @click="handleSuffixIconClick"
216
- ></text>
217
- </view>
218
-
219
- <!-- 后置内容 -->
220
- <view v-if="$slots.append || append" class="star-input__append">
221
- <slot name="append">
222
- <text v-if="append" class="star-input__append-text">{{ append }}</text>
223
- </slot>
224
- </view>
225
- </view>`,
116
+ template: '<view class="star-input" :class="inputClasses">\\n <!-- 前置内容 -->\\n <view v-if="$slots.prepend || prepend" class="star-input__prepend">\\n <slot name="prepend">\\n <text v-if="prepend" class="star-input__prepend-text">{{ prepend }}</text>\\n </slot>\\n </view>\\n \\n <!-- 输入框主体 -->\\n <view class="star-input__wrapper">\\n <!-- 前置图标 -->\\n <text \\n v-if="prefixIcon" \\n class="star-input__prefix-icon" \\n :class="prefixIcon"\\n @click="handlePrefixIconClick"\\n ></text>\\n \\n <!-- 输入框 -->\\n <input\\n class="star-input__inner"\\n :type="showPassword ? (passwordVisible ? \'text\' : \'password\') : type"\\n :value="currentValue"\\n :placeholder="placeholder"\\n :disabled="disabled"\\n :maxlength="maxlength"\\n :focus="focus"\\n :confirm-type="confirmType"\\n :placeholder-style="placeholderStyle"\\n :placeholder-class="placeholderClass"\\n :cursor-spacing="cursorSpacing"\\n @input="handleInput"\\n @focus="handleFocus"\\n @blur="handleBlur"\\n @confirm="handleConfirm"\\n @keyboardheightchange="handleKeyboardHeightChange"\\n />\\n \\n <!-- 清除按钮 -->\\n <view \\n v-if="clearable && currentValue && !disabled" \\n class="star-input__clear"\\n @click="handleClear"\\n >\\n <text class="star-icon-close"></text>\\n </view>\\n \\n <!-- 密码可见切换按钮 -->\\n <view \\n v-if="showPassword && currentValue" \\n class="star-input__password-toggle"\\n @click="togglePasswordVisible"\\n >\\n <text :class="passwordVisible ? \'star-icon-eye-open\' : \'star-icon-eye-close\'"></text>\\n </view>\\n \\n <!-- 后置图标 -->\\n <text \\n v-if="suffixIcon" \\n class="star-input__suffix-icon" \\n :class="suffixIcon"\\n @click="handleSuffixIconClick"\\n ></text>\\n </view>\\n \\n <!-- 后置内容 -->\\n <view v-if="$slots.append || append" class="star-input__append">\\n <slot name="append">\\n <text v-if="append" class="star-input__append-text">{{ append }}</text>\\n </slot>\\n </view>\\n </view>',
226
117
 
227
118
  name: 'StarInput',
228
119
 
@@ -438,11 +329,11 @@ if (typeof window !== 'undefined' && window.Vue) {
438
329
 
439
330
  // 创建导出对象
440
331
  const StarUI = {
441
- version: '0.1.5',
332
+ version: '0.1.7',
442
333
  install,
443
334
  // 导出所有组件
444
335
  StarButton,
445
- StarInput
336
+ StarInput
446
337
  };
447
338
 
448
339
  export default StarUI;
package/lib/index.js CHANGED
@@ -9,45 +9,7 @@
9
9
 
10
10
  // Button 组件
11
11
  const StarButton = {
12
- template: `<view
13
- class="star-button"
14
- :class="[
15
- `star-button--\${type}`,
16
- `star-button--\${size}`,
17
- {
18
- 'star-button--disabled': disabled,
19
- 'star-button--loading': loading,
20
- 'star-button--block': block,
21
- 'star-button--plain': plain
22
- }
23
- ]"
24
- :style="[customStyle]"
25
- @click="handleClick"
26
- >
27
- <!-- 加载状态 -->
28
- <view v-if="loading" class="star-button__loading">
29
- <view class="star-button__loading-spinner"></view>
30
- </view>
31
-
32
- <!-- 图标 -->
33
- <text
34
- v-if="icon && !loading"
35
- class="star-button__icon"
36
- :class="icon"
37
- ></text>
38
-
39
- <!-- 文字内容 -->
40
- <text class="star-button__text">
41
- <slot></slot>
42
- </text>
43
-
44
- <!-- 右侧图标 -->
45
- <text
46
- v-if="rightIcon && !loading"
47
- class="star-button__right-icon"
48
- :class="rightIcon"
49
- ></text>
50
- </view>`,
12
+ template: '<view \\n class="star-button"\\n :class="[\\n \`star-button--${type}\`,\\n \`star-button--${size}\`,\\n {\\n \'star-button--disabled\': disabled,\\n \'star-button--loading\': loading,\\n \'star-button--block\': block,\\n \'star-button--plain\': plain\\n }\\n ]"\\n :style="[customStyle]"\\n @click="handleClick"\\n >\\n <!-- 加载状态 -->\\n <view v-if="loading" class="star-button__loading">\\n <view class="star-button__loading-spinner"></view>\\n </view>\\n \\n <!-- 图标 -->\\n <text \\n v-if="icon && !loading" \\n class="star-button__icon" \\n :class="icon"\\n ></text>\\n \\n <!-- 文字内容 -->\\n <text class="star-button__text">\\n <slot></slot>\\n </text>\\n \\n <!-- 右侧图标 -->\\n <text \\n v-if="rightIcon && !loading" \\n class="star-button__right-icon" \\n :class="rightIcon"\\n ></text>\\n </view>',
51
13
 
52
14
  name: 'StarButton',
53
15
 
@@ -157,78 +119,7 @@
157
119
 
158
120
  // Input 组件
159
121
  const StarInput = {
160
- template: `<view class="star-input" :class="inputClasses">
161
- <!-- 前置内容 -->
162
- <view v-if="$slots.prepend || prepend" class="star-input__prepend">
163
- <slot name="prepend">
164
- <text v-if="prepend" class="star-input__prepend-text">{{ prepend }}</text>
165
- </slot>
166
- </view>
167
-
168
- <!-- 输入框主体 -->
169
- <view class="star-input__wrapper">
170
- <!-- 前置图标 -->
171
- <text
172
- v-if="prefixIcon"
173
- class="star-input__prefix-icon"
174
- :class="prefixIcon"
175
- @click="handlePrefixIconClick"
176
- ></text>
177
-
178
- <!-- 输入框 -->
179
- <input
180
- class="star-input__inner"
181
- :type="showPassword ? (passwordVisible ? 'text' : 'password') : type"
182
- :value="currentValue"
183
- :placeholder="placeholder"
184
- :disabled="disabled"
185
- :maxlength="maxlength"
186
- :focus="focus"
187
- :confirm-type="confirmType"
188
- :placeholder-style="placeholderStyle"
189
- :placeholder-class="placeholderClass"
190
- :cursor-spacing="cursorSpacing"
191
- @input="handleInput"
192
- @focus="handleFocus"
193
- @blur="handleBlur"
194
- @confirm="handleConfirm"
195
- @keyboardheightchange="handleKeyboardHeightChange"
196
- />
197
-
198
- <!-- 清除按钮 -->
199
- <view
200
- v-if="clearable && currentValue && !disabled"
201
- class="star-input__clear"
202
- @click="handleClear"
203
- >
204
- <text class="star-icon-close"></text>
205
- </view>
206
-
207
- <!-- 密码可见切换按钮 -->
208
- <view
209
- v-if="showPassword && currentValue"
210
- class="star-input__password-toggle"
211
- @click="togglePasswordVisible"
212
- >
213
- <text :class="passwordVisible ? 'star-icon-eye-open' : 'star-icon-eye-close'"></text>
214
- </view>
215
-
216
- <!-- 后置图标 -->
217
- <text
218
- v-if="suffixIcon"
219
- class="star-input__suffix-icon"
220
- :class="suffixIcon"
221
- @click="handleSuffixIconClick"
222
- ></text>
223
- </view>
224
-
225
- <!-- 后置内容 -->
226
- <view v-if="$slots.append || append" class="star-input__append">
227
- <slot name="append">
228
- <text v-if="append" class="star-input__append-text">{{ append }}</text>
229
- </slot>
230
- </view>
231
- </view>`,
122
+ template: '<view class="star-input" :class="inputClasses">\\n <!-- 前置内容 -->\\n <view v-if="$slots.prepend || prepend" class="star-input__prepend">\\n <slot name="prepend">\\n <text v-if="prepend" class="star-input__prepend-text">{{ prepend }}</text>\\n </slot>\\n </view>\\n \\n <!-- 输入框主体 -->\\n <view class="star-input__wrapper">\\n <!-- 前置图标 -->\\n <text \\n v-if="prefixIcon" \\n class="star-input__prefix-icon" \\n :class="prefixIcon"\\n @click="handlePrefixIconClick"\\n ></text>\\n \\n <!-- 输入框 -->\\n <input\\n class="star-input__inner"\\n :type="showPassword ? (passwordVisible ? \'text\' : \'password\') : type"\\n :value="currentValue"\\n :placeholder="placeholder"\\n :disabled="disabled"\\n :maxlength="maxlength"\\n :focus="focus"\\n :confirm-type="confirmType"\\n :placeholder-style="placeholderStyle"\\n :placeholder-class="placeholderClass"\\n :cursor-spacing="cursorSpacing"\\n @input="handleInput"\\n @focus="handleFocus"\\n @blur="handleBlur"\\n @confirm="handleConfirm"\\n @keyboardheightchange="handleKeyboardHeightChange"\\n />\\n \\n <!-- 清除按钮 -->\\n <view \\n v-if="clearable && currentValue && !disabled" \\n class="star-input__clear"\\n @click="handleClear"\\n >\\n <text class="star-icon-close"></text>\\n </view>\\n \\n <!-- 密码可见切换按钮 -->\\n <view \\n v-if="showPassword && currentValue" \\n class="star-input__password-toggle"\\n @click="togglePasswordVisible"\\n >\\n <text :class="passwordVisible ? \'star-icon-eye-open\' : \'star-icon-eye-close\'"></text>\\n </view>\\n \\n <!-- 后置图标 -->\\n <text \\n v-if="suffixIcon" \\n class="star-input__suffix-icon" \\n :class="suffixIcon"\\n @click="handleSuffixIconClick"\\n ></text>\\n </view>\\n \\n <!-- 后置内容 -->\\n <view v-if="$slots.append || append" class="star-input__append">\\n <slot name="append">\\n <text v-if="append" class="star-input__append-text">{{ append }}</text>\\n </slot>\\n </view>\\n </view>',
232
123
 
233
124
  name: 'StarInput',
234
125
 
@@ -444,7 +335,7 @@
444
335
 
445
336
  // 创建导出对象
446
337
  const StarUI = {
447
- version: '0.1.5',
338
+ version: '0.1.7',
448
339
  install,
449
340
  // 导出所有组件
450
341
  StarButton,
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@star-ai/star-ui",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "基于Uniapp的Vue2组件库",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -9,45 +9,7 @@
9
9
 
10
10
  // Button 组件
11
11
  const StarButton = {
12
- template: `<view
13
- class="star-button"
14
- :class="[
15
- `star-button--\${type}`,
16
- `star-button--\${size}`,
17
- {
18
- 'star-button--disabled': disabled,
19
- 'star-button--loading': loading,
20
- 'star-button--block': block,
21
- 'star-button--plain': plain
22
- }
23
- ]"
24
- :style="[customStyle]"
25
- @click="handleClick"
26
- >
27
- <!-- 加载状态 -->
28
- <view v-if="loading" class="star-button__loading">
29
- <view class="star-button__loading-spinner"></view>
30
- </view>
31
-
32
- <!-- 图标 -->
33
- <text
34
- v-if="icon && !loading"
35
- class="star-button__icon"
36
- :class="icon"
37
- ></text>
38
-
39
- <!-- 文字内容 -->
40
- <text class="star-button__text">
41
- <slot></slot>
42
- </text>
43
-
44
- <!-- 右侧图标 -->
45
- <text
46
- v-if="rightIcon && !loading"
47
- class="star-button__right-icon"
48
- :class="rightIcon"
49
- ></text>
50
- </view>`,
12
+ template: '<view \\n class="star-button"\\n :class="[\\n \`star-button--${type}\`,\\n \`star-button--${size}\`,\\n {\\n \'star-button--disabled\': disabled,\\n \'star-button--loading\': loading,\\n \'star-button--block\': block,\\n \'star-button--plain\': plain\\n }\\n ]"\\n :style="[customStyle]"\\n @click="handleClick"\\n >\\n <!-- 加载状态 -->\\n <view v-if="loading" class="star-button__loading">\\n <view class="star-button__loading-spinner"></view>\\n </view>\\n \\n <!-- 图标 -->\\n <text \\n v-if="icon && !loading" \\n class="star-button__icon" \\n :class="icon"\\n ></text>\\n \\n <!-- 文字内容 -->\\n <text class="star-button__text">\\n <slot></slot>\\n </text>\\n \\n <!-- 右侧图标 -->\\n <text \\n v-if="rightIcon && !loading" \\n class="star-button__right-icon" \\n :class="rightIcon"\\n ></text>\\n </view>',
51
13
 
52
14
  name: 'StarButton',
53
15
 
@@ -156,78 +118,7 @@
156
118
 
157
119
  // Input 组件
158
120
  const StarInput = {
159
- template: `<view class="star-input" :class="inputClasses">
160
- <!-- 前置内容 -->
161
- <view v-if="$slots.prepend || prepend" class="star-input__prepend">
162
- <slot name="prepend">
163
- <text v-if="prepend" class="star-input__prepend-text">{{ prepend }}</text>
164
- </slot>
165
- </view>
166
-
167
- <!-- 输入框主体 -->
168
- <view class="star-input__wrapper">
169
- <!-- 前置图标 -->
170
- <text
171
- v-if="prefixIcon"
172
- class="star-input__prefix-icon"
173
- :class="prefixIcon"
174
- @click="handlePrefixIconClick"
175
- ></text>
176
-
177
- <!-- 输入框 -->
178
- <input
179
- class="star-input__inner"
180
- :type="showPassword ? (passwordVisible ? 'text' : 'password') : type"
181
- :value="currentValue"
182
- :placeholder="placeholder"
183
- :disabled="disabled"
184
- :maxlength="maxlength"
185
- :focus="focus"
186
- :confirm-type="confirmType"
187
- :placeholder-style="placeholderStyle"
188
- :placeholder-class="placeholderClass"
189
- :cursor-spacing="cursorSpacing"
190
- @input="handleInput"
191
- @focus="handleFocus"
192
- @blur="handleBlur"
193
- @confirm="handleConfirm"
194
- @keyboardheightchange="handleKeyboardHeightChange"
195
- />
196
-
197
- <!-- 清除按钮 -->
198
- <view
199
- v-if="clearable && currentValue && !disabled"
200
- class="star-input__clear"
201
- @click="handleClear"
202
- >
203
- <text class="star-icon-close"></text>
204
- </view>
205
-
206
- <!-- 密码可见切换按钮 -->
207
- <view
208
- v-if="showPassword && currentValue"
209
- class="star-input__password-toggle"
210
- @click="togglePasswordVisible"
211
- >
212
- <text :class="passwordVisible ? 'star-icon-eye-open' : 'star-icon-eye-close'"></text>
213
- </view>
214
-
215
- <!-- 后置图标 -->
216
- <text
217
- v-if="suffixIcon"
218
- class="star-input__suffix-icon"
219
- :class="suffixIcon"
220
- @click="handleSuffixIconClick"
221
- ></text>
222
- </view>
223
-
224
- <!-- 后置内容 -->
225
- <view v-if="$slots.append || append" class="star-input__append">
226
- <slot name="append">
227
- <text v-if="append" class="star-input__append-text">{{ append }}</text>
228
- </slot>
229
- </view>
230
- </view>`,
121
+ template: '<view class="star-input" :class="inputClasses">\\n <!-- 前置内容 -->\\n <view v-if="$slots.prepend || prepend" class="star-input__prepend">\\n <slot name="prepend">\\n <text v-if="prepend" class="star-input__prepend-text">{{ prepend }}</text>\\n </slot>\\n </view>\\n \\n <!-- 输入框主体 -->\\n <view class="star-input__wrapper">\\n <!-- 前置图标 -->\\n <text \\n v-if="prefixIcon" \\n class="star-input__prefix-icon" \\n :class="prefixIcon"\\n @click="handlePrefixIconClick"\\n ></text>\\n \\n <!-- 输入框 -->\\n <input\\n class="star-input__inner"\\n :type="showPassword ? (passwordVisible ? \'text\' : \'password\') : type"\\n :value="currentValue"\\n :placeholder="placeholder"\\n :disabled="disabled"\\n :maxlength="maxlength"\\n :focus="focus"\\n :confirm-type="confirmType"\\n :placeholder-style="placeholderStyle"\\n :placeholder-class="placeholderClass"\\n :cursor-spacing="cursorSpacing"\\n @input="handleInput"\\n @focus="handleFocus"\\n @blur="handleBlur"\\n @confirm="handleConfirm"\\n @keyboardheightchange="handleKeyboardHeightChange"\\n />\\n \\n <!-- 清除按钮 -->\\n <view \\n v-if="clearable && currentValue && !disabled" \\n class="star-input__clear"\\n @click="handleClear"\\n >\\n <text class="star-icon-close"></text>\\n </view>\\n \\n <!-- 密码可见切换按钮 -->\\n <view \\n v-if="showPassword && currentValue" \\n class="star-input__password-toggle"\\n @click="togglePasswordVisible"\\n >\\n <text :class="passwordVisible ? \'star-icon-eye-open\' : \'star-icon-eye-close\'"></text>\\n </view>\\n \\n <!-- 后置图标 -->\\n <text \\n v-if="suffixIcon" \\n class="star-input__suffix-icon" \\n :class="suffixIcon"\\n @click="handleSuffixIconClick"\\n ></text>\\n </view>\\n \\n <!-- 后置内容 -->\\n <view v-if="$slots.append || append" class="star-input__append">\\n <slot name="append">\\n <text v-if="append" class="star-input__append-text">{{ append }}</text>\\n </slot>\\n </view>\\n </view>',
231
122
 
232
123
  name: 'StarInput',
233
124
 
@@ -446,7 +337,7 @@
446
337
 
447
338
  // 创建导出对象
448
339
  const StarUI = {
449
- version: '0.1.5',
340
+ version: '0.1.7',
450
341
  install,
451
342
  // 导出所有组件
452
343
  StarButton,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@star-ai/star-ui",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "基于Uniapp的Vue2组件库",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.js",