@opentiny/vue-input
Advanced tools
Comparing version 2.6.0 to 2.6.1-alpha.0
136
lib/index.js
@@ -1,61 +0,30 @@ | ||
import { $prefix, $props, $setup } from '@opentiny/vue-common'; | ||
import PCTemplate from './pc'; | ||
import MobileTemplate from './mobile'; | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
enumerableOnly && (symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
function _extends() { | ||
_extends = Object.assign ? Object.assign.bind() : function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
return target; | ||
} | ||
function _defineProperty(obj, key, value) { | ||
key = _toPropertyKey(key); | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function _toPrimitive(input, hint) { | ||
if (typeof input !== "object" || input === null) return input; | ||
var prim = input[Symbol.toPrimitive]; | ||
if (prim !== undefined) { | ||
var res = prim.call(input, hint || "default"); | ||
if (typeof res !== "object") return res; | ||
throw new TypeError("@@toPrimitive must return a primitive value."); | ||
} | ||
return (hint === "string" ? String : Number)(input); | ||
} | ||
function _toPropertyKey(arg) { | ||
var key = _toPrimitive(arg, "string"); | ||
return typeof key === "symbol" ? key : String(key); | ||
} | ||
import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common"; | ||
import PcTemplate from "./pc.js"; | ||
import MobileTemplate from "./mobile.js"; | ||
var template = function template2(mode) { | ||
if ("mobile" === (process.env.TINY_MODE || mode)) | ||
return MobileTemplate; | ||
else | ||
return PcTemplate; | ||
}; | ||
var $constants = { | ||
INPUT_PC: 'tiny-input__', | ||
INPUTGROUP_PC: 'tiny-input-group__', | ||
INPUT_MOBILE: 'tiny-mobile-input__', | ||
INPUTGROUP_MOBILE: 'tiny-mobile-input-group__', | ||
Mode: 'pc', | ||
INPUT_PC: "tiny-input__", | ||
INPUTGROUP_PC: "tiny-input-group__", | ||
INPUT_MOBILE: "tiny-mobile-input__", | ||
INPUTGROUP_MOBILE: "tiny-mobile-input-group__", | ||
Mode: "pc", | ||
inputMode: function inputMode(mode) { | ||
@@ -68,17 +37,14 @@ return mode === this.Mode ? this.INPUT_PC : this.INPUT_MOBILE; | ||
VALIDATE_ICON: { | ||
Validating: 'tiny-icon-loading', | ||
Success: 'tiny-icon-circle-check', | ||
Error: 'tiny-icon-circle-close' | ||
Validating: "tiny-icon-loading", | ||
Success: "tiny-icon-circle-check", | ||
Error: "tiny-icon-circle-close" | ||
}, | ||
COMPONENT_NAME: { | ||
FormItem: 'FormItem' | ||
FormItem: "FormItem" | ||
} | ||
}; | ||
var template = function template(mode) { | ||
if (process.env.TINY_MODE === 'pc') return PCTemplate;else if (process.env.TINY_MODE === 'mobile') return MobileTemplate;else return mode === 'mobile' ? MobileTemplate : PCTemplate; | ||
}; | ||
var Input = { | ||
name: $prefix + 'Input', | ||
var Input = defineComponent({ | ||
name: $prefix + "Input", | ||
inheritAttrs: false, | ||
props: _objectSpread2(_objectSpread2({}, $props), {}, { | ||
props: _extends({}, $props, { | ||
_constants: { | ||
@@ -98,3 +64,3 @@ type: Object, | ||
type: String, | ||
default: '1' | ||
default: "1" | ||
}, | ||
@@ -108,3 +74,3 @@ disabled: Boolean, | ||
type: String, | ||
default: 'text' | ||
default: "text" | ||
}, | ||
@@ -117,3 +83,3 @@ vertical: { | ||
type: Array, | ||
default: function _default() { | ||
default: function _default2() { | ||
return []; | ||
@@ -141,3 +107,3 @@ } | ||
type: String, | ||
default: 'off' | ||
default: "off" | ||
}, | ||
@@ -160,5 +126,6 @@ showPassword: { | ||
}, | ||
// mobile特有属性 | ||
textareaTitle: { | ||
type: String, | ||
default: '标题' | ||
default: "标题" | ||
} | ||
@@ -168,18 +135,19 @@ }), | ||
return $setup({ | ||
props: props, | ||
context: context, | ||
template: template | ||
props, | ||
context, | ||
template | ||
}); | ||
} | ||
}; | ||
}); | ||
var version = "3.7.0"; | ||
Input.model = { | ||
prop: 'modelValue', | ||
event: 'update:modelValue' | ||
prop: "modelValue", | ||
event: "update:modelValue" | ||
}; | ||
Input.install = function (Vue) { | ||
Input.install = function(Vue) { | ||
Vue.component(Input.name, Input); | ||
}; | ||
Input.version = '2.6.0'; | ||
export { Input as default }; | ||
Input.version = version; | ||
export { | ||
Input as default | ||
}; |
@@ -1,122 +0,45 @@ | ||
import { renderless, api } from '@opentiny/vue-renderless/input/vue'; | ||
import { setup, props } from '@opentiny/vue-common'; | ||
import { iconOperationfaild, iconChevronRight, iconEyeopen } from '@opentiny/vue-icon'; | ||
import ActionSheet from '@opentiny/vue-action-sheet'; | ||
import '@opentiny/vue-theme-mobile/input/index.css'; | ||
function _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); | ||
} | ||
function _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); | ||
} | ||
function _iterableToArray(iter) { | ||
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
var script = { | ||
inheritAttrs: false, | ||
emits: ['update:modelValue', 'change', 'clear', 'focus', 'blur', 'keyup', 'keydown', 'paste', 'mouseenter', 'mouseleave'], | ||
components: { | ||
IconOperationfaild: iconOperationfaild(), | ||
IconChevronRight: iconChevronRight(), | ||
IconEyeopen: iconEyeopen(), | ||
TinyActionSheet: ActionSheet | ||
}, | ||
props: [].concat(_toConsumableArray(props), ['name', 'form', 'selectMenu', 'labelWidth', 'mobileTips', 'isSelect', 'type', 'label', 'modelValue', 'disabled', 'readonly', 'clearable', 'maxlength', 'suffixIcon', 'prefixIcon', 'autocomplete', 'showPassword', 'validateEvent', 'showWordLimit', 'showTitle', 'textareaTitle', 'counter', 'autosize', 'tabindex']), | ||
setup: function setup$1(props, context) { | ||
return setup({ | ||
props: props, | ||
context: context, | ||
renderless: renderless, | ||
api: api | ||
}); | ||
import { renderless, api } from "@opentiny/vue-renderless/input/vue"; | ||
import { defineComponent, props, setup as _setup } from "@opentiny/vue-common"; | ||
import { iconOperationfaild, iconChevronRight, iconEyeopen } from "@opentiny/vue-icon"; | ||
import ActionSheet from "@opentiny/vue-action-sheet"; | ||
import "@opentiny/vue-theme-mobile/input/index.css"; | ||
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) { | ||
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports; | ||
if (render) { | ||
options.render = render; | ||
options.staticRenderFns = staticRenderFns; | ||
options._compiled = true; | ||
} | ||
}; | ||
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier | ||
/* server only */ | ||
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { | ||
if (typeof shadowMode !== 'boolean') { | ||
createInjectorSSR = createInjector; | ||
createInjector = shadowMode; | ||
shadowMode = false; | ||
} // Vue.extend constructor export interop. | ||
var options = typeof script === 'function' ? script.options : script; // render functions | ||
if (template && template.render) { | ||
options.render = template.render; | ||
options.staticRenderFns = template.staticRenderFns; | ||
options._compiled = true; // functional template | ||
if (isFunctionalTemplate) { | ||
options.functional = true; | ||
} | ||
} // scopedId | ||
if (functionalTemplate) { | ||
options.functional = true; | ||
} | ||
if (scopeId) { | ||
options._scopeId = scopeId; | ||
options._scopeId = "data-v-" + scopeId; | ||
} | ||
var hook; | ||
if (moduleIdentifier) { | ||
// server build | ||
hook = function hook(context) { | ||
// 2.3 injection | ||
hook = function hook2(context) { | ||
context = context || // cached call | ||
this.$vnode && this.$vnode.ssrContext || // stateful | ||
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional | ||
// 2.2 with runInNewContext: true | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { | ||
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") { | ||
context = __VUE_SSR_CONTEXT__; | ||
} // inject component styles | ||
if (style) { | ||
style.call(this, createInjectorSSR(context)); | ||
} // register component module identifier for async chunk inference | ||
} | ||
if (injectStyles) { | ||
injectStyles.call(this, context); | ||
} | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier); | ||
} | ||
}; // used by ssr in case component is cached and beforeCreate | ||
// never gets called | ||
}; | ||
options._ssrRegister = hook; | ||
} else if (style) { | ||
hook = shadowMode ? function () { | ||
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); | ||
} : function (context) { | ||
style.call(this, createInjector(context)); | ||
}; | ||
} else if (injectStyles) { | ||
hook = shadowMode ? function() { | ||
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot); | ||
} : injectStyles; | ||
} | ||
if (hook) { | ||
if (options.functional) { | ||
// register for functional component in vue file | ||
options._injectStyles = hook; | ||
var originalRender = options.render; | ||
options.render = function renderWithStyleInjection(h, context) { | ||
@@ -127,3 +50,2 @@ hook.call(context); | ||
} else { | ||
// inject component registration as beforeCreate hook | ||
var existing = options.beforeCreate; | ||
@@ -133,25 +55,43 @@ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; | ||
} | ||
return script; | ||
return { | ||
exports: scriptExports, | ||
options | ||
}; | ||
} | ||
var normalizeComponent_1 = normalizeComponent; | ||
var __vue_script__ = script; | ||
var __vue_render__ = function __vue_render__() { | ||
var __vue2_script = defineComponent({ | ||
inheritAttrs: false, | ||
emits: ["update:modelValue", "change", "clear", "focus", "blur", "keyup", "keydown", "paste", "mouseenter", "mouseleave"], | ||
components: { | ||
IconOperationfaild: iconOperationfaild(), | ||
IconChevronRight: iconChevronRight(), | ||
IconEyeopen: iconEyeopen(), | ||
TinyActionSheet: ActionSheet | ||
}, | ||
props: [].concat(props, ["name", "form", "selectMenu", "labelWidth", "mobileTips", "isSelect", "type", "label", "modelValue", "disabled", "readonly", "clearable", "maxlength", "suffixIcon", "prefixIcon", "autocomplete", "showPassword", "validateEvent", "showWordLimit", "showTitle", "textareaTitle", "counter", "autosize", "tabindex"]), | ||
setup: function setup(props2, context) { | ||
return _setup({ | ||
props: props2, | ||
context, | ||
renderless, | ||
api | ||
}); | ||
} | ||
}); | ||
var render = function render2() { | ||
var _vm = this; | ||
var _h = _vm.$createElement; | ||
var _c = _vm._self._c || _h; | ||
return _c('div', { | ||
class: [_vm.type === 'textarea' ? 'tiny-mobile-textarea' : 'tiny-mobile-input', _vm.state.inputSize ? 'tiny-mobile-input-' + _vm.state.inputSize : '', { | ||
'is-disabled': _vm.state.inputDisabled, | ||
'is-exceed': _vm.state.inputExceed, | ||
'is-showtitle': _vm.showTitle && _vm.type === 'textarea', | ||
'is-showcontent': _vm.slots.content && _vm.type === 'textarea', | ||
'is-showlimit': _vm.state.isWordLimitVisible && _vm.type === 'textarea', | ||
'tiny-mobile-input-group': _vm.slots.prepend || _vm.slots.append, | ||
'tiny-mobile-input-group-append': _vm.slots.append, | ||
'tiny-mobile-input-group-prepend': _vm.slots.prepend, | ||
'tiny-mobile-input-prefix': _vm.slots.prefix || _vm.prefixIcon, | ||
'tiny-mobile-input-suffix': _vm.slots.suffix || _vm.suffixIcon || _vm.clearable || _vm.showPassword | ||
return _c("div", { | ||
class: [_vm.type === "textarea" ? "tiny-mobile-textarea" : "tiny-mobile-input", _vm.state.inputSize ? "tiny-mobile-input-" + _vm.state.inputSize : "", { | ||
"is-disabled": _vm.state.inputDisabled, | ||
"is-exceed": _vm.state.inputExceed, | ||
"is-showtitle": _vm.showTitle && _vm.type === "textarea", | ||
"is-showcontent": _vm.slots.content && _vm.type === "textarea", | ||
"is-showlimit": _vm.state.isWordLimitVisible && _vm.type === "textarea", | ||
"tiny-mobile-input-group": _vm.slots.prepend || _vm.slots.append, | ||
"tiny-mobile-input-group-append": _vm.slots.append, | ||
"tiny-mobile-input-group-prepend": _vm.slots.prepend, | ||
"tiny-mobile-input-prefix": _vm.slots.prefix || _vm.prefixIcon, | ||
"tiny-mobile-input-suffix": _vm.slots.suffix || _vm.suffixIcon || _vm.clearable || _vm.showPassword | ||
}], | ||
@@ -166,5 +106,5 @@ on: { | ||
} | ||
}, [_vm.type !== 'textarea' && _vm.type !== 'form' ? [_vm.slots.prepend ? _c('div', { | ||
}, [_vm.type !== "textarea" && _vm.type !== "form" ? [_vm.slots.prepend ? _c("div", { | ||
staticClass: "tiny-mobile-input-group__prepend" | ||
}, [_vm._t("prepend")], 2) : _vm._e(), _vm._v(" "), _vm.type !== 'textarea' ? _c('input', _vm._b({ | ||
}, [_vm._t("prepend")], 2) : _vm._e(), _vm.type !== "textarea" ? _c("input", _vm._b({ | ||
ref: "input", | ||
@@ -175,3 +115,3 @@ staticClass: "tiny-mobile-input__inner", | ||
"tabindex": _vm.tabindex, | ||
"type": _vm.showPassword ? _vm.state.passwordVisible ? 'text' : 'password' : _vm.type, | ||
"type": _vm.showPassword ? _vm.state.passwordVisible ? "text" : "password" : _vm.type, | ||
"disabled": _vm.state.inputDisabled, | ||
@@ -191,15 +131,15 @@ "readonly": _vm.readonly, | ||
} | ||
}, 'input', _vm.a(_vm.$attrs, ['size', 'class', 'style', '^on\w+']), false)) : _vm._e(), _vm._v(" "), _vm.slots.prefix || _vm.prefixIcon ? _c('span', { | ||
}, "input", _vm.a(_vm.$attrs, ["size", "class", "style", "^onw+"]), false)) : _vm._e(), _vm.slots.prefix || _vm.prefixIcon ? _c("span", { | ||
staticClass: "tiny-mobile-input__prefix" | ||
}, [_vm._t("prefix"), _vm._v(" "), _vm.prefixIcon ? _c(_vm.prefixIcon, { | ||
}, [_vm._t("prefix"), _vm.prefixIcon ? _c(_vm.prefixIcon, { | ||
tag: "component", | ||
staticClass: "tiny-mobile-input__icon" | ||
}) : _vm._e()], 2) : _vm._e(), _vm._v(" "), _vm.getSuffixVisible() ? _c('span', { | ||
}) : _vm._e()], 2) : _vm._e(), _vm.getSuffixVisible() ? _c("span", { | ||
staticClass: "tiny-mobile-input__suffix" | ||
}, [_c('span', { | ||
}, [_c("span", { | ||
staticClass: "tiny-mobile-input__suffix-inner" | ||
}, [!_vm.state.showClear || !_vm.state.showPwdVisible || !_vm.state.isWordLimitVisible ? [_vm._t("suffix"), _vm._v(" "), _vm.suffixIcon ? _c(_vm.suffixIcon, { | ||
}, [!_vm.state.showClear || !_vm.state.showPwdVisible || !_vm.state.isWordLimitVisible ? [_vm._t("suffix"), _vm.suffixIcon ? _c(_vm.suffixIcon, { | ||
tag: "component", | ||
staticClass: "tiny-mobile-input__icon" | ||
}) : _vm._e()] : _vm._e(), _vm._v(" "), _vm.state.showClear ? _c('icon-operationfaild', { | ||
}) : _vm._e()] : _vm._e(), _vm.state.showClear ? _c("icon-operationfaild", { | ||
staticClass: "tiny-mobile-input__icon tiny-mobile-input__clear", | ||
@@ -212,3 +152,3 @@ on: { | ||
} | ||
}) : _vm._e(), _vm._v(" "), _vm.state.showPwdVisible ? _c('icon-eyeopen', { | ||
}) : _vm._e(), _vm.state.showPwdVisible ? _c("icon-eyeopen", { | ||
staticClass: "tiny-mobile-input__icon", | ||
@@ -218,14 +158,14 @@ on: { | ||
} | ||
}) : _vm._e(), _vm._v(" "), _vm.state.isWordLimitVisible ? _c('span', { | ||
}) : _vm._e(), _vm.state.isWordLimitVisible ? _c("span", { | ||
staticClass: "tiny-mobile-input__count" | ||
}, [_c('span', { | ||
}, [_c("span", { | ||
staticClass: "tiny-mobile-input__count-inner" | ||
}, [_vm._v(_vm._s(_vm.state.showWordLimit ? _vm.state.textLength + "/" + _vm.state.upperLimit : _vm.state.textLength))])]) : _vm._e()], 2), _vm._v(" "), _vm.state.validateState ? _c('i', { | ||
}, [_vm._v(_vm._s(_vm.state.showWordLimit ? _vm.state.textLength + "/" + _vm.state.upperLimit : _vm.state.textLength))])]) : _vm._e()], 2), _vm.state.validateState ? _c("i", { | ||
staticClass: "tiny-mobile-input__icon", | ||
class: ['tiny-mobile-input__validateIcon', _vm.validateIcon] | ||
}) : _vm._e()]) : _vm._e(), _vm._v(" "), _vm.slots.append ? _c('div', { | ||
class: ["tiny-mobile-input__validateIcon", _vm.validateIcon] | ||
}) : _vm._e()]) : _vm._e(), _vm.slots.append ? _c("div", { | ||
staticClass: "tiny-mobile-input-group__append" | ||
}, [_vm._t("append")], 2) : _vm._e()] : _vm._e(), _vm._v(" "), _vm.type === 'form' ? [_c('div', { | ||
}, [_vm._t("append")], 2) : _vm._e()] : _vm._e(), _vm.type === "form" ? [_c("div", { | ||
staticClass: "tiny-mobile-input-form" | ||
}, [_vm.isSelect ? _c('div', { | ||
}, [_vm.isSelect ? _c("div", { | ||
staticClass: "tiny-mobile-input-form__select", | ||
@@ -235,3 +175,3 @@ on: { | ||
} | ||
}, [_c('input', _vm._b({ | ||
}, [_c("input", _vm._b({ | ||
staticClass: "tiny-mobile-input-form__input tiny-mobile-input__inner", | ||
@@ -253,12 +193,12 @@ attrs: { | ||
} | ||
}, 'input', _vm.a(_vm.$attrs, ['size', 'class', 'style', '^on[A-Z]']), false)), _vm._v(" "), _c('div', { | ||
}, "input", _vm.a(_vm.$attrs, ["size", "class", "style", "^on[A-Z]"]), false)), _c("div", { | ||
staticClass: "tiny-mobile-input-form__icon", | ||
style: { | ||
transform: _vm.state.boxVisibility ? 'rotate(90deg)' : 'none' | ||
transform: _vm.state.boxVisibility ? "rotate(90deg)" : "none" | ||
} | ||
}, [_c('IconChevronRight')], 1)]) : _c('input', _vm._b({ | ||
}, [_c("IconChevronRight")], 1)]) : _c("input", _vm._b({ | ||
ref: "input", | ||
staticClass: "tiny-mobile-input-form__input tiny-mobile-input__inner", | ||
attrs: { | ||
"type": _vm.showPassword ? _vm.state.passwordVisible ? 'text' : 'password' : 'text', | ||
"type": _vm.showPassword ? _vm.state.passwordVisible ? "text" : "password" : "text", | ||
"name": _vm.name, | ||
@@ -279,3 +219,3 @@ "tabindex": _vm.tabindex, | ||
} | ||
}, 'input', _vm.a(_vm.$attrs, ['size', 'class', 'style', '^on[A-Z]']), false)), _vm._v(" "), _c('tiny-action-sheet', { | ||
}, "input", _vm.a(_vm.$attrs, ["size", "class", "style", "^on[A-Z]"]), false)), _c("tiny-action-sheet", { | ||
attrs: { | ||
@@ -298,9 +238,9 @@ "menus": _vm.selectMenu, | ||
} | ||
})], 1), _vm._v(" "), _vm.mobileTips ? _c('div', { | ||
})], 1), _vm.mobileTips ? _c("div", { | ||
staticClass: "tiny-mobile-input-form__tips" | ||
}, [_vm._v("\n " + _vm._s(_vm.mobileTips) + "\n ")]) : _vm._e()] : _vm._e(), _vm._v(" "), _vm.showTitle && _vm.type === 'textarea' ? _c('div', { | ||
}, [_vm._v(" " + _vm._s(_vm.mobileTips) + " ")]) : _vm._e()] : _vm._e(), _vm.showTitle && _vm.type === "textarea" ? _c("div", { | ||
staticClass: "tiny-mobile-textarea__title" | ||
}, [_vm._v("\n " + _vm._s(_vm.textareaTitle) + "\n ")]) : _vm._e(), _vm._v(" "), _vm.slots.content && _vm.type === 'textarea' ? _c('div', { | ||
}, [_vm._v(" " + _vm._s(_vm.textareaTitle) + " ")]) : _vm._e(), _vm.slots.content && _vm.type === "textarea" ? _c("div", { | ||
staticClass: "tiny-mobile-textarea__content" | ||
}, [_vm._t("content")], 2) : _vm._e(), _vm._v(" "), _vm.type === 'textarea' ? _c('textarea', _vm._b({ | ||
}, [_vm._t("content")], 2) : _vm._e(), _vm.type === "textarea" ? _c("textarea", _vm._b({ | ||
ref: "textarea", | ||
@@ -326,16 +266,19 @@ staticClass: "tiny-mobile-textarea__inner", | ||
} | ||
}, 'textarea', _vm.a(_vm.$attrs, ['type', 'class', 'style', '^on[A-Z]']), false)) : _vm._e(), _vm._v(" "), _vm.state.isWordLimitVisible && _vm.type === 'textarea' ? _c('span', { | ||
}, "textarea", _vm.a(_vm.$attrs, ["type", "class", "style", "^on[A-Z]"]), false)) : _vm._e(), _vm.state.isWordLimitVisible && _vm.type === "textarea" ? _c("span", { | ||
staticClass: "tiny-mobile-textarea__count" | ||
}, [_vm._v(_vm._s(_vm.state.showWordLimit ? _vm.state.textLength + "/" + _vm.state.upperLimit : _vm.state.textLength))]) : _vm._e()], 2); | ||
}; | ||
var __vue_staticRenderFns__ = []; | ||
var __vue_inject_styles__ = undefined; | ||
var __vue_scope_id__ = undefined; | ||
var __vue_module_identifier__ = undefined; | ||
var __vue_is_functional_template__ = false; | ||
var __vue_component__ = normalizeComponent_1({ | ||
render: __vue_render__, | ||
staticRenderFns: __vue_staticRenderFns__ | ||
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined); | ||
export { __vue_component__ as default }; | ||
var staticRenderFns = []; | ||
var __cssModules = {}; | ||
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null); | ||
function __vue2_injectStyles(context) { | ||
for (var o in __cssModules) { | ||
this[o] = __cssModules[o]; | ||
} | ||
} | ||
var mobile = /* @__PURE__ */ function() { | ||
return __component__.exports; | ||
}(); | ||
export { | ||
mobile as default | ||
}; |
323
lib/pc.js
@@ -1,121 +0,44 @@ | ||
import { renderless as renderless$1, api as api$1 } from '@opentiny/vue-renderless/input/vue'; | ||
import { $prefix, setup, props } from '@opentiny/vue-common'; | ||
import { renderless, api } from '@opentiny/vue-renderless/tall-storage/vue'; | ||
import '@opentiny/vue-theme/tall-storage/index.css'; | ||
import { iconClose, iconEyeopen, iconEyeclose } from '@opentiny/vue-icon'; | ||
import '@opentiny/vue-theme/input/index.css'; | ||
function _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); | ||
} | ||
function _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); | ||
} | ||
function _iterableToArray(iter) { | ||
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
var script$1 = { | ||
name: $prefix + 'TallStorage', | ||
inheritAttrs: false, | ||
props: { | ||
isMemoryStorage: Boolean, | ||
localstorageData: Array | ||
}, | ||
setup: function setup$1(props, context) { | ||
return setup({ | ||
props: props, | ||
context: context, | ||
renderless: renderless, | ||
api: api, | ||
mono: true | ||
}); | ||
import { renderless as renderless$1, api as api$1 } from "@opentiny/vue-renderless/input/vue"; | ||
import { $prefix, setup as _setup, defineComponent, props } from "@opentiny/vue-common"; | ||
import { renderless, api } from "@opentiny/vue-renderless/tall-storage/vue"; | ||
import "@opentiny/vue-theme/tall-storage/index.css"; | ||
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) { | ||
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports; | ||
if (render) { | ||
options.render = render; | ||
options.staticRenderFns = staticRenderFns; | ||
options._compiled = true; | ||
} | ||
}; | ||
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier | ||
/* server only */ | ||
, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { | ||
if (typeof shadowMode !== 'boolean') { | ||
createInjectorSSR = createInjector; | ||
createInjector = shadowMode; | ||
shadowMode = false; | ||
} // Vue.extend constructor export interop. | ||
var options = typeof script === 'function' ? script.options : script; // render functions | ||
if (template && template.render) { | ||
options.render = template.render; | ||
options.staticRenderFns = template.staticRenderFns; | ||
options._compiled = true; // functional template | ||
if (isFunctionalTemplate) { | ||
options.functional = true; | ||
} | ||
} // scopedId | ||
if (functionalTemplate) { | ||
options.functional = true; | ||
} | ||
if (scopeId) { | ||
options._scopeId = scopeId; | ||
options._scopeId = "data-v-" + scopeId; | ||
} | ||
var hook; | ||
if (moduleIdentifier) { | ||
// server build | ||
hook = function hook(context) { | ||
// 2.3 injection | ||
hook = function hook2(context) { | ||
context = context || // cached call | ||
this.$vnode && this.$vnode.ssrContext || // stateful | ||
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional | ||
// 2.2 with runInNewContext: true | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { | ||
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") { | ||
context = __VUE_SSR_CONTEXT__; | ||
} // inject component styles | ||
if (style) { | ||
style.call(this, createInjectorSSR(context)); | ||
} // register component module identifier for async chunk inference | ||
} | ||
if (injectStyles) { | ||
injectStyles.call(this, context); | ||
} | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier); | ||
} | ||
}; // used by ssr in case component is cached and beforeCreate | ||
// never gets called | ||
}; | ||
options._ssrRegister = hook; | ||
} else if (style) { | ||
hook = shadowMode ? function () { | ||
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); | ||
} : function (context) { | ||
style.call(this, createInjector(context)); | ||
}; | ||
} else if (injectStyles) { | ||
hook = shadowMode ? function() { | ||
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot); | ||
} : injectStyles; | ||
} | ||
if (hook) { | ||
if (options.functional) { | ||
// register for functional component in vue file | ||
options._injectStyles = hook; | ||
var originalRender = options.render; | ||
options.render = function renderWithStyleInjection(h, context) { | ||
@@ -126,3 +49,2 @@ hook.call(context); | ||
} else { | ||
// inject component registration as beforeCreate hook | ||
var existing = options.beforeCreate; | ||
@@ -132,14 +54,32 @@ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; | ||
} | ||
return script; | ||
return { | ||
exports: scriptExports, | ||
options | ||
}; | ||
} | ||
var normalizeComponent_1 = normalizeComponent; | ||
var __vue_script__$1 = script$1; | ||
var __vue_render__$1 = function __vue_render__() { | ||
import { iconClose, iconEyeopen, iconEyeclose } from "@opentiny/vue-icon"; | ||
import "@opentiny/vue-theme/input/index.css"; | ||
var __vue2_script$1 = { | ||
name: $prefix + "TallStorage", | ||
inheritAttrs: false, | ||
props: { | ||
isMemoryStorage: Boolean, | ||
localstorageData: Array | ||
}, | ||
setup: function setup(props2, context) { | ||
return _setup({ | ||
props: props2, | ||
context, | ||
renderless, | ||
api, | ||
mono: true | ||
}); | ||
} | ||
}; | ||
var render$1 = function render$12() { | ||
var _vm = this; | ||
var _h = _vm.$createElement; | ||
var _c = _vm._self._c || _h; | ||
return _c('div', { | ||
return _c("div", { | ||
staticClass: "tiny-tall-storage", | ||
@@ -149,19 +89,18 @@ on: { | ||
} | ||
}, [_c('div', { | ||
}, [_c("div", { | ||
staticClass: "tiny-storage-list-style" | ||
}, [_c('ul', { | ||
}, [_c("ul", { | ||
staticClass: "tiny-storage-list", | ||
on: { | ||
"keydown": function keydown($event) { | ||
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) { | ||
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) | ||
return null; | ||
} | ||
return _vm.keydownEvent.apply(null, arguments); | ||
} | ||
} | ||
}, _vm._l(_vm.localstorageData, function (item) { | ||
return _c('li', { | ||
}, _vm._l(_vm.localstorageData, function(item) { | ||
return _c("li", { | ||
key: item, | ||
staticClass: "tiny-storage-item", | ||
class: [_vm.state.hoverValue === item ? 'item-hover' : ''], | ||
class: [_vm.state.hoverValue === item ? "item-hover" : ""], | ||
on: { | ||
@@ -172,18 +111,19 @@ "click": function click($event) { | ||
} | ||
}, [_vm._v("\n " + _vm._s(item) + "\n ")]); | ||
}, [_vm._v(" " + _vm._s(item) + " ")]); | ||
}), 0)])]); | ||
}; | ||
var __vue_staticRenderFns__$1 = []; | ||
var __vue_inject_styles__$1 = undefined; | ||
var __vue_scope_id__$1 = undefined; | ||
var __vue_module_identifier__$1 = undefined; | ||
var __vue_is_functional_template__$1 = false; | ||
var __vue_component__$1 = normalizeComponent_1({ | ||
render: __vue_render__$1, | ||
staticRenderFns: __vue_staticRenderFns__$1 | ||
}, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined); | ||
var script = { | ||
var staticRenderFns$1 = []; | ||
var __cssModules$1 = {}; | ||
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, null, null, null); | ||
function __vue2_injectStyles$1(context) { | ||
for (var o in __cssModules$1) { | ||
this[o] = __cssModules$1[o]; | ||
} | ||
} | ||
var TinyTallStorage = /* @__PURE__ */ function() { | ||
return __component__$1.exports; | ||
}(); | ||
var __vue2_script = defineComponent({ | ||
inheritAttrs: false, | ||
emits: ['update:modelValue', 'change', 'clear', 'focus', 'blur', 'keyup', 'input', 'keydown', 'paste', 'mouseenter', 'mouseleave', 'click'], | ||
emits: ["update:modelValue", "change", "clear", "focus", "blur", "keyup", "input", "keydown", "paste", "mouseenter", "mouseleave", "click"], | ||
components: { | ||
@@ -193,9 +133,9 @@ IconClose: iconClose(), | ||
IconEyeclose: iconEyeclose(), | ||
TinyTallStorage: __vue_component__$1 | ||
TinyTallStorage | ||
}, | ||
props: [].concat(_toConsumableArray(props), ['name', 'size', 'form', 'type', 'label', 'modelValue', 'height', 'resize', 'counter', 'autosize', 'disabled', 'readonly', 'tabindex', 'clearable', 'suffixIcon', 'prefixIcon', 'autocomplete', 'showPassword', 'validateEvent', 'showWordLimit']), | ||
setup: function setup$1(props, context) { | ||
return setup({ | ||
props: props, | ||
context: context, | ||
props: [].concat(props, ["name", "size", "form", "type", "label", "modelValue", "height", "resize", "counter", "autosize", "disabled", "readonly", "tabindex", "clearable", "suffixIcon", "prefixIcon", "autocomplete", "showPassword", "validateEvent", "showWordLimit"]), | ||
setup: function setup2(props2, context) { | ||
return _setup({ | ||
props: props2, | ||
context, | ||
renderless: renderless$1, | ||
@@ -205,18 +145,16 @@ api: api$1 | ||
} | ||
}; | ||
var __vue_script__ = script; | ||
var __vue_render__ = function __vue_render__() { | ||
}); | ||
var render = function render2() { | ||
var _vm = this; | ||
var _h = _vm.$createElement; | ||
var _c = _vm._self._c || _h; | ||
return _c('div', { | ||
class: [_vm.$attrs.class, _vm.type === 'textarea' ? 'tiny-textarea' : 'tiny-input', _vm.state.inputSize ? 'tiny-input-' + _vm.state.inputSize : '', { | ||
'is-disabled': _vm.state.inputDisabled, | ||
'is-exceed': _vm.state.inputExceed, | ||
'tiny-input-group': _vm.slots.prepend || _vm.slots.append, | ||
'tiny-input-group-append': _vm.slots.append, | ||
'tiny-input-group-prepend': _vm.slots.prepend, | ||
'tiny-input-prefix': _vm.slots.prefix || _vm.prefixIcon, | ||
'tiny-input-suffix': _vm.slots.suffix || _vm.suffixIcon || _vm.clearable || _vm.showPassword | ||
return _c("div", { | ||
class: [_vm.$attrs.class, _vm.type === "textarea" ? "tiny-textarea" : "tiny-input", _vm.state.inputSize ? "tiny-input-" + _vm.state.inputSize : "", { | ||
"is-disabled": _vm.state.inputDisabled, | ||
"is-exceed": _vm.state.inputExceed, | ||
"tiny-input-group": _vm.slots.prepend || _vm.slots.append, | ||
"tiny-input-group-append": _vm.slots.append, | ||
"tiny-input-group-prepend": _vm.slots.prepend, | ||
"tiny-input-prefix": _vm.slots.prefix || _vm.prefixIcon, | ||
"tiny-input-suffix": _vm.slots.suffix || _vm.suffixIcon || _vm.clearable || _vm.showPassword | ||
}], | ||
@@ -227,15 +165,15 @@ style: _vm.$attrs.style, | ||
_vm.state.hovering = true; | ||
_vm.$emit('mouseenter', $event); | ||
_vm.$emit("mouseenter", $event); | ||
}, | ||
"mouseleave": function mouseleave($event) { | ||
_vm.state.hovering = false; | ||
_vm.$emit('mouseleave', $event); | ||
_vm.$emit("mouseleave", $event); | ||
}, | ||
"click": function click($event) { | ||
return _vm.$emit('click', $event); | ||
return _vm.$emit("click", $event); | ||
} | ||
} | ||
}, [_vm.type !== 'textarea' ? [_vm.slots.prepend ? _c('div', { | ||
}, [_vm.type !== "textarea" ? [_vm.slots.prepend ? _c("div", { | ||
staticClass: "tiny-input-group__prepend" | ||
}, [_vm._t("prepend")], 2) : _vm._e(), _vm._v(" "), _vm.type !== 'textarea' ? _c('input', _vm._b({ | ||
}, [_vm._t("prepend")], 2) : _vm._e(), _vm.type !== "textarea" ? _c("input", _vm._b({ | ||
ref: "input", | ||
@@ -246,6 +184,6 @@ staticClass: "tiny-input__inner", | ||
"tabindex": _vm.tabindex, | ||
"type": _vm.showPassword ? _vm.state.passwordVisible ? 'text' : 'password' : _vm.type, | ||
"type": _vm.showPassword ? _vm.state.passwordVisible ? "text" : "password" : _vm.type, | ||
"disabled": _vm.state.inputDisabled, | ||
"readonly": _vm.readonly, | ||
"unselectable": _vm.readonly ? 'on' : 'off', | ||
"unselectable": _vm.readonly ? "on" : "off", | ||
"autocomplete": _vm.autocomplete, | ||
@@ -263,12 +201,12 @@ "aria-label": _vm.label | ||
"keyup": function keyup($event) { | ||
return _vm.$emit('keyup', $event); | ||
return _vm.$emit("keyup", $event); | ||
}, | ||
"keydown": function keydown($event) { | ||
return _vm.$emit('keydown', $event); | ||
return _vm.$emit("keydown", $event); | ||
}, | ||
"paste": function paste($event) { | ||
return _vm.$emit('paste', $event); | ||
return _vm.$emit("paste", $event); | ||
} | ||
} | ||
}, 'input', _vm.a(_vm.$attrs, ['type', 'class', 'style', '^on\w+']), false)) : _vm._e(), _vm._v(" "), _vm.isMemoryStorage ? _c('tiny-tall-storage', { | ||
}, "input", _vm.a(_vm.$attrs, ["type", "class", "style", "^onw+"]), false)) : _vm._e(), _vm.isMemoryStorage ? _c("tiny-tall-storage", { | ||
attrs: { | ||
@@ -282,19 +220,19 @@ "name": _vm.name, | ||
} | ||
}) : _vm._e(), _vm._v(" "), _vm.slots.prefix || _vm.prefixIcon ? _c('span', { | ||
}) : _vm._e(), _vm.slots.prefix || _vm.prefixIcon ? _c("span", { | ||
staticClass: "tiny-input__prefix" | ||
}, [_vm._t("prefix"), _vm._v(" "), _vm.prefixIcon ? _c(_vm.prefixIcon, { | ||
}, [_vm._t("prefix"), _vm.prefixIcon ? _c(_vm.prefixIcon, { | ||
tag: "component", | ||
staticClass: "tiny-svg-size tiny-input__icon" | ||
}) : _vm._e()], 2) : _vm._e(), _vm._v(" "), _c('transition', { | ||
}) : _vm._e()], 2) : _vm._e(), _c("transition", { | ||
attrs: { | ||
"name": "tiny-transition-icon-out-in" | ||
} | ||
}, [_vm.getSuffixVisible() ? _c('span', { | ||
}, [_vm.getSuffixVisible() ? _c("span", { | ||
staticClass: "tiny-input__suffix" | ||
}, [_c('span', { | ||
}, [_c("span", { | ||
staticClass: "tiny-input__suffix-inner" | ||
}, [!_vm.state.showClear || !_vm.state.showPwdVisible || !_vm.state.isWordLimitVisible ? [_vm._t("suffix"), _vm._v(" "), _vm.suffixIcon ? _c(_vm.suffixIcon, { | ||
}, [!_vm.state.showClear || !_vm.state.showPwdVisible || !_vm.state.isWordLimitVisible ? [_vm._t("suffix"), _vm.suffixIcon ? _c(_vm.suffixIcon, { | ||
tag: "component", | ||
staticClass: "tiny-svg-size tiny-input__icon" | ||
}) : _vm._e()] : _vm._e(), _vm._v(" "), _vm.state.showClear ? _c('icon-close', { | ||
}) : _vm._e()] : _vm._e(), _vm.state.showClear ? _c("icon-close", { | ||
staticClass: "tiny-svg-size tiny-input__icon tiny-input__clear", | ||
@@ -307,3 +245,3 @@ on: { | ||
} | ||
}) : _vm._e(), _vm._v(" "), _vm.showPassword ? _c(_vm.state.passwordVisible ? 'icon-eyeopen' : 'icon-eyeclose', { | ||
}) : _vm._e(), _vm.showPassword ? _c(_vm.state.passwordVisible ? "icon-eyeopen" : "icon-eyeclose", { | ||
tag: "component", | ||
@@ -316,14 +254,14 @@ staticClass: "tiny-svg-size tiny-input__icon", | ||
} | ||
}) : _vm._e(), _vm._v(" "), _vm.state.isWordLimitVisible ? _c('span', { | ||
}) : _vm._e(), _vm.state.isWordLimitVisible ? _c("span", { | ||
staticClass: "tiny-input__count" | ||
}, [_c('span', { | ||
}, [_c("span", { | ||
staticClass: "tiny-input__count-inner" | ||
}, [_vm._v(_vm._s(_vm.state.showWordLimit ? _vm.state.textLength + "/" + _vm.state.upperLimit : _vm.state.textLength))])]) : _vm._e()], 2), _vm._v(" "), _vm.state.validateState ? _c('i', { | ||
}, [_vm._v(_vm._s(_vm.state.showWordLimit ? _vm.state.textLength + "/" + _vm.state.upperLimit : _vm.state.textLength))])]) : _vm._e()], 2), _vm.state.validateState ? _c("i", { | ||
staticClass: "tiny-input__icon", | ||
class: ['tiny-input__validateIcon', _vm.validateIcon] | ||
}) : _vm._e()]) : _vm._e()]), _vm._v(" "), _vm.slots.append ? _c('div', { | ||
class: ["tiny-input__validateIcon", _vm.validateIcon] | ||
}) : _vm._e()]) : _vm._e()]), _vm.slots.append ? _c("div", { | ||
staticClass: "tiny-input-group__append" | ||
}, [_vm._t("append")], 2) : _vm._e(), _vm._v(" "), _vm.slots.panel ? _c('div', { | ||
}, [_vm._t("append")], 2) : _vm._e(), _vm.slots.panel ? _c("div", { | ||
staticClass: "tiny-input-group__panel" | ||
}, [_vm._t("panel")], 2) : _vm._e()] : _c('textarea', _vm._b({ | ||
}, [_vm._t("panel")], 2) : _vm._e()] : _c("textarea", _vm._b({ | ||
ref: "textarea", | ||
@@ -336,3 +274,3 @@ staticClass: "tiny-textarea__inner", | ||
"readonly": _vm.readonly, | ||
"unselectable": _vm.readonly ? 'on' : 'off', | ||
"unselectable": _vm.readonly ? "on" : "off", | ||
"autocomplete": _vm.autocomplete, | ||
@@ -350,16 +288,19 @@ "aria-label": _vm.label | ||
} | ||
}, 'textarea', _vm.a(_vm.$attrs, ['type', 'class', 'style', '^on[A-Z]']), false)), _vm._v(" "), _vm.state.isWordLimitVisible && _vm.type === 'textarea' ? _c('span', { | ||
}, "textarea", _vm.a(_vm.$attrs, ["type", "class", "style", "^on[A-Z]"]), false)), _vm.state.isWordLimitVisible && _vm.type === "textarea" ? _c("span", { | ||
staticClass: "tiny-input__count" | ||
}, [_vm._v(_vm._s(_vm.state.showWordLimit ? _vm.state.textLength + "/" + _vm.state.upperLimit : _vm.state.textLength))]) : _vm._e(), _vm._v(" "), _vm._t("default")], 2); | ||
}, [_vm._v(_vm._s(_vm.state.showWordLimit ? _vm.state.textLength + "/" + _vm.state.upperLimit : _vm.state.textLength))]) : _vm._e(), _vm._t("default")], 2); | ||
}; | ||
var __vue_staticRenderFns__ = []; | ||
var __vue_inject_styles__ = undefined; | ||
var __vue_scope_id__ = undefined; | ||
var __vue_module_identifier__ = undefined; | ||
var __vue_is_functional_template__ = false; | ||
var __vue_component__ = normalizeComponent_1({ | ||
render: __vue_render__, | ||
staticRenderFns: __vue_staticRenderFns__ | ||
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined); | ||
export { __vue_component__ as default }; | ||
var staticRenderFns = []; | ||
var __cssModules = {}; | ||
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null); | ||
function __vue2_injectStyles(context) { | ||
for (var o in __cssModules) { | ||
this[o] = __cssModules[o]; | ||
} | ||
} | ||
var pc = /* @__PURE__ */ function() { | ||
return __component__.exports; | ||
}(); | ||
export { | ||
pc as default | ||
}; |
{ | ||
"name": "@opentiny/vue-input", | ||
"version": "2.6.0", | ||
"version": "2.6.1-alpha.0", | ||
"description": "", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"lint": "eslint src/**/*{.js,.html,.vue} --quiet", | ||
"build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", | ||
"build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" | ||
}, | ||
"main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-action-sheet": "~2.6.0", | ||
"@opentiny/vue-common": "~2.6.0", | ||
"@opentiny/vue-icon": "~2.6.0", | ||
"@opentiny/vue-renderless": "~3.6.0", | ||
"@opentiny/vue-theme": "~3.6.0", | ||
"@opentiny/vue-theme-mobile": "~3.6.0" | ||
"@opentiny/vue-action-sheet": "~2.6.1-alpha.0", | ||
"@opentiny/vue-common": "~2.6.1-alpha.0", | ||
"@opentiny/vue-icon": "~2.6.1-alpha.0", | ||
"@opentiny/vue-renderless": "~3.6.1-alpha.0" | ||
}, | ||
"license": "MIT", | ||
"sideEffects": false | ||
"types": "index.d.ts", | ||
"scripts": { | ||
"build": "pnpm -w build:ui $npm_package_name", | ||
"//postversion": "pnpm build" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4
10
985
2
34941
2
80
2
1