@star-ai/star-ui 0.0.7 → 0.0.8
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.
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
// 添加模板
|
|
102
|
-
StarButton.template = '<
|
|
102
|
+
StarButton.template = '<div \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 <div v-if="loading" class="star-button__loading">\n <div class="star-button__loading-spinner"></div>\n </div>\n \n <!-- 图标 -->\n <span \n v-if="icon && !loading" \n class="star-button__icon" \n :class="icon"\n ></span>\n \n <!-- 文字内容 -->\n <span class="star-button__text">\n <slot></slot>\n </span>\n \n <!-- 右侧图标 -->\n <span \n v-if="rightIcon && !loading" \n class="star-button__right-icon" \n :class="rightIcon"\n ></span>\n </div>'
|
|
103
103
|
|
|
104
104
|
StarButton.install = function(Vue) {
|
|
105
105
|
Vue.component(StarButton.name, StarButton)
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
// 添加模板
|
|
180
|
-
StarInput.template = '<
|
|
180
|
+
StarInput.template = '<div class="star-input" :class="inputClasses">\n <!-- 前置内容 -->\n <div v-if="$slots.prepend || prepend" class="star-input__prepend">\n <slot name="prepend">\n <span v-if="prepend" class="star-input__prepend-text">{{ prepend }}</span>\n </slot>\n </div>\n \n <!-- 输入框主体 -->\n <div class="star-input__wrapper">\n <!-- 前置图标 -->\n <span \n v-if="prefixIcon" \n class="star-input__prefix-icon" \n :class="prefixIcon"\n @click="handlePrefixIconClick"\n ></span>\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 <div \n v-if="clearable && currentValue && !disabled" \n class="star-input__clear"\n @click="handleClear"\n >\n <span class="star-icon-close"></span>\n </div>\n \n <!-- 密码可见切换按钮 -->\n <div \n v-if="showPassword && currentValue" \n class="star-input__password-toggle"\n @click="togglePasswordVisible"\n >\n <span :class="passwordVisible ? \'star-icon-eye-open\' : \'star-icon-eye-close\'"></span>\n </div>\n \n <!-- 后置图标 -->\n <span \n v-if="suffixIcon" \n class="star-input__suffix-icon" \n :class="suffixIcon"\n @click="handleSuffixIconClick"\n ></span>\n </div>\n \n <!-- 后置内容 -->\n <div v-if="$slots.append || append" class="star-input__append">\n <slot name="append">\n <span v-if="append" class="star-input__append-text">{{ append }}</span>\n </slot>\n </div>\n </div>'
|
|
181
181
|
|
|
182
182
|
StarInput.install = function(Vue) {
|
|
183
183
|
Vue.component(StarInput.name, StarInput)
|
package/lib/index.js
CHANGED
package/lib/package.json
CHANGED
package/lib/star-ui.umd.js
CHANGED