@opentiny/vue-input
Advanced tools
Comparing version 2.16.0 to 2.17.0
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 _extends = Object.assign ? Object.assign.bind() : function(n) { | ||
for (var e = 1; e < arguments.length; e++) { | ||
var t = arguments[e]; | ||
for (var r in t) | ||
({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
return n; | ||
}, _extends.apply(null, arguments); | ||
} | ||
@@ -145,2 +141,6 @@ import { defineComponent, $prefix, $setup, $props } from "@opentiny/vue-common"; | ||
}, | ||
popupMore: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
// mobile特有属性 | ||
@@ -191,3 +191,3 @@ textareaTitle: { | ||
}); | ||
var version = "2.16.0"; | ||
var version = "2.17.0"; | ||
Input.model = { | ||
@@ -194,0 +194,0 @@ prop: "modelValue", |
@@ -7,2 +7,4 @@ import { renderless as renderless$1, api as api$1 } from '@opentiny/vue-renderless/input/vue'; | ||
import Tooltip from '@opentiny/vue-tooltip'; | ||
import Button from '@opentiny/vue-button'; | ||
import DialogBox from '@opentiny/vue-dialog-box'; | ||
@@ -133,5 +135,7 @@ function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) { | ||
TinyTallStorage: tallStorage, | ||
TinyTooltip: Tooltip | ||
TinyTooltip: Tooltip, | ||
TinyButton: Button, | ||
TinyDialogBox: DialogBox | ||
}, | ||
props: [].concat(props, ["name", "size", "form", "type", "mask", "label", "modelValue", "height", "resize", "counter", "autosize", "disabled", "readonly", "tabindex", "clearable", "suffixIcon", "prefixIcon", "autocomplete", "showPassword", "validateEvent", "showWordLimit", "customClass", "displayOnly", "displayOnlyContent", "showEmptyValue"]), | ||
props: [].concat(props, ["name", "size", "form", "type", "mask", "label", "modelValue", "height", "resize", "counter", "autosize", "disabled", "readonly", "tabindex", "clearable", "suffixIcon", "prefixIcon", "autocomplete", "showPassword", "validateEvent", "showWordLimit", "customClass", "displayOnly", "displayOnlyContent", "showEmptyValue", "popupMore", "frontClearIcon", "hoverExpand"]), | ||
setup: function setup$1(props2, context) { | ||
@@ -176,3 +180,3 @@ return setup({ | ||
}, [_vm._t("prepend")], 2) : _vm._e(), _c("span", { | ||
staticClass: "relative text-sm", | ||
staticClass: "relative text-sm block", | ||
class: [_vm.state.inputSizeMf !== "mini" ? "sm:text-sm" : "sm:text-xs"], | ||
@@ -188,2 +192,3 @@ attrs: { | ||
"placement": "top", | ||
"popper-class": _vm.state.tooltipConfig.popperClass || "", | ||
"popper-options": { | ||
@@ -318,2 +323,3 @@ bubbling: true | ||
}, [_vm._t("panel")], 2) : _vm._e()] : _c("span", { | ||
class: [_vm.hoverExpand && "relative block h-7 w-full", _vm.state.isDisplayOnly && _vm.hoverExpand && "h-auto"], | ||
attrs: { | ||
@@ -327,2 +333,3 @@ "data-tag": "tiny-input-textarea" | ||
"placement": "top", | ||
"popper-class": _vm.state.tooltipConfig.popperClass || "", | ||
"popper-options": { | ||
@@ -337,9 +344,45 @@ bubbling: true | ||
} | ||
}, [_c("div", { | ||
staticClass: "flex" | ||
}, [_c("span", { | ||
staticClass: "max-w-full text-ellipsis break-words line-clamp-5 text-sm pt-1.5 text-color-text-primary", | ||
class: [_vm.state.inputSizeMf !== "mini" ? "sm:text-sm" : "sm:text-xs"] | ||
}, [_vm._v(_vm._s(_vm.state.displayOnlyText))])]) : _vm._e(), _c("textarea", _vm._b({ | ||
ref: "textBox", | ||
staticClass: "text-box max-w-full break-words line-clamp-5 text-sm text-color-text-primary before:content-[''] before:float-right before:h-full before:-mb-4", | ||
class: [_vm.state.inputSizeMf !== "mini" ? "sm:text-sm" : "sm:text-xs", _vm.hoverExpand && "relative left-0 max-w-full leading-normal line-clamp-1", _vm.autosize ? "left-0 max-w-full absolute break-words whitespace-pre-line leading-normal" : "left-0 max-w-full text-ellipsis overflow-hidden break-words whitespace-pre-wrap line-clamp-5"], | ||
on: { | ||
"click": function click($event) { | ||
_vm.state.showDisplayOnlyBox = true; | ||
} | ||
} | ||
}, [_vm.state.showMoreBtn ? _c("span", { | ||
staticClass: "float-right relative top-px clear-both text-color-brand text-sm leading-3 cursor-pointer" | ||
}, [_vm._v(_vm._s(_vm.t("ui.input.more")) + ">")]) : _vm._e(), _vm._v(" " + _vm._s(_vm.state.displayOnlyText) + " ")])])]) : _vm._e(), _vm.state.isDisplayOnly && _vm.popupMore ? _c("tiny-dialog-box", { | ||
attrs: { | ||
"title": _vm.t("ui.input.detail"), | ||
"width": "1000px", | ||
"visible": _vm.state.showDisplayOnlyBox, | ||
"append-to-body": true, | ||
"close-on-click-modal": false | ||
}, | ||
on: { | ||
"update:visible": function updateVisible($event) { | ||
_vm.state.showDisplayOnlyBox = $event; | ||
} | ||
}, | ||
scopedSlots: _vm._u([{ | ||
key: "footer", | ||
fn: function fn() { | ||
return [_c("tiny-button", { | ||
on: { | ||
"click": function click($event) { | ||
_vm.state.showDisplayOnlyBox = false; | ||
} | ||
} | ||
}, [_vm._v(_vm._s(_vm.t("ui.input.close")))])]; | ||
}, | ||
proxy: true | ||
}], null, false, 2786811157) | ||
}, [_c("div", [_vm._v(_vm._s(_vm.state.displayOnlyText))])]) : _vm._e(), _c("textarea", _vm._b({ | ||
ref: "textarea", | ||
staticClass: "block w-full border-0 sm:border-solid sm:border-color-border sm:hover:border-color-border-hover sm:focus:border-color-brand-focus sm:disabled:border-color-border-separator outline-0 rounded placeholder:text-color-text-placeholder placeholder:text-sm sm:disabled:placeholder:text-color-text-disabled text-sm text-color-text-primary bg-color-bg-1 disabled:cursor-not-allowed disabled:text-color-text-disabled sm:disabled:text-color-text-secondary sm:disabled:bg-color-bg-6 leading-normal", | ||
class: [_vm.readonly ? "sm:border-0 px-0 py-0" : "sm:border px-3 py-2", _vm.state.isDisplayOnly ? "hidden" : "", _vm.state.inputSizeMf !== "mini" ? "sm:placeholder:text-sm sm:text-sm" : "sm:placeholder:text-xs sm:text-xs"], | ||
staticClass: "block w-full border-0 sm:border-solid sm:border-color-border sm:hover:border-color-border-hover sm:focus:border-color-brand-focus sm:disabled:border-color-border-separator outline-0 rounded placeholder:text-color-text-placeholder placeholder:text-sm sm:disabled:placeholder:text-color-text-disabled text-sm text-color-text-primary bg-color-bg-1 disabled:cursor-not-allowed disabled:text-color-text-disabled sm:disabled:text-color-text-secondary sm:disabled:bg-color-bg-6", | ||
class: [_vm.readonly ? "sm:border-0 px-0 py-0" : "sm:border px-3 ", _vm.state.isDisplayOnly ? "hidden" : "", _vm.state.inputSizeMf !== "mini" ? "sm:placeholder:text-sm sm:text-sm" : "sm:placeholder:text-xs sm:text-xs", _vm.hoverExpand && "min-w-40 absolute h-7 z-[2000] top-0 left-0", _vm.hoverExpand && _vm.state.enteredTextarea ? "py-2 leading-normal" : "py-0 leading-[1.625rem]", _vm.hoverExpand && !_vm.state.enteredTextarea && "min-h-7 px-2 leading-7 overflow-hidden"], | ||
style: _vm.state.textareaStyle, | ||
@@ -361,3 +404,9 @@ attrs: { | ||
"blur": _vm.handleBlur, | ||
"change": _vm.handleChange | ||
"change": _vm.handleChange, | ||
"mouseenter": function mouseenter($event) { | ||
return _vm.handleEnterTextarea($event); | ||
}, | ||
"mouseleave": function mouseleave($event) { | ||
return _vm.handleLeaveTextarea($event); | ||
} | ||
} | ||
@@ -364,0 +413,0 @@ }, "textarea", _vm.a(_vm.$attrs, ["type", "class", "style", "^on[A-Z]"]), false))], 1), _vm.state.isWordLimitVisible && _vm.type === "textarea" ? _c("span", { |
@@ -7,2 +7,4 @@ import { renderless as renderless$1, api as api$1 } from '@opentiny/vue-renderless/input/vue'; | ||
import Tooltip from '@opentiny/vue-tooltip'; | ||
import Button from '@opentiny/vue-button'; | ||
import DialogBox from '@opentiny/vue-dialog-box'; | ||
import '@opentiny/vue-theme/input/index.css'; | ||
@@ -166,3 +168,4 @@ import '@opentiny/vue-theme/textarea/index.css'; | ||
"display": _vm.type === "password", | ||
"placement": "top" | ||
"placement": "top", | ||
"popper-class": _vm.state.tooltipConfig.popperClass || "" | ||
}, | ||
@@ -303,3 +306,4 @@ nativeOn: { | ||
"content": _vm.state.displayOnlyTooltip, | ||
"placement": "top" | ||
"placement": "top", | ||
"popper-class": _vm.state.tooltipConfig.popperClass || "" | ||
}, | ||
@@ -311,5 +315,39 @@ nativeOn: { | ||
} | ||
}, [_c("div", { | ||
staticClass: "tiny-textarea-display-only__wrap" | ||
}, [_c("span", { | ||
staticClass: "tiny-textarea-display-only__content" | ||
}, [_vm._v(_vm._s(_vm.state.displayOnlyText))])]) : _vm._e(), _c("textarea", _vm._b({ | ||
ref: "textBox", | ||
staticClass: "tiny-textarea-display-only__content text-box" | ||
}, [_vm.state.showMoreBtn ? _c("span", { | ||
staticClass: "more-btn", | ||
on: { | ||
"click": function click($event) { | ||
_vm.state.showDisplayOnlyBox = true; | ||
} | ||
} | ||
}, [_vm._v(_vm._s(_vm.t("ui.input.more")) + ">")]) : _vm._e(), _vm._v(" " + _vm._s(_vm.state.displayOnlyText) + " ")])])]) : _vm._e(), _vm.state.isDisplayOnly && _vm.popupMore ? _c("tiny-dialog-box", { | ||
attrs: { | ||
"title": _vm.t("ui.input.detail"), | ||
"visible": _vm.state.showDisplayOnlyBox, | ||
"append-to-body": true | ||
}, | ||
on: { | ||
"update:visible": function updateVisible($event) { | ||
_vm.state.showDisplayOnlyBox = $event; | ||
} | ||
}, | ||
scopedSlots: _vm._u([{ | ||
key: "footer", | ||
fn: function fn() { | ||
return [_c("tiny-button", { | ||
on: { | ||
"click": function click($event) { | ||
_vm.state.showDisplayOnlyBox = false; | ||
} | ||
} | ||
}, [_vm._v(_vm._s(_vm.t("ui.input.close")))])]; | ||
}, | ||
proxy: true | ||
}], null, false, 2786811157) | ||
}, [_c("div", [_vm._v(_vm._s(_vm.state.displayOnlyText))])]) : _vm._e(), _c("textarea", _vm._b({ | ||
ref: "textarea", | ||
@@ -369,5 +407,7 @@ staticClass: "tiny-textarea__inner", | ||
TinyTallStorage: tallStorage, | ||
TinyTooltip: Tooltip | ||
TinyTooltip: Tooltip, | ||
TinyButton: Button, | ||
TinyDialogBox: DialogBox | ||
}, | ||
props: [].concat(props, ["name", "size", "form", "type", "mask", "label", "modelValue", "height", "resize", "counter", "autosize", "disabled", "readonly", "tabindex", "clearable", "suffixIcon", "prefixIcon", "autocomplete", "showPassword", "memorySpace", "validateEvent", "showWordLimit", "displayOnly", "displayOnlyContent", "frontClearIcon", "showEmptyValue", "hoverExpand"]), | ||
props: [].concat(props, ["name", "size", "form", "type", "mask", "label", "modelValue", "height", "resize", "counter", "autosize", "disabled", "readonly", "tabindex", "clearable", "suffixIcon", "prefixIcon", "autocomplete", "showPassword", "memorySpace", "validateEvent", "showWordLimit", "displayOnly", "displayOnlyContent", "frontClearIcon", "showEmptyValue", "hoverExpand", "popupMore"]), | ||
setup: function setup$1(props2, context) { | ||
@@ -374,0 +414,0 @@ return setup({ |
{ | ||
"name": "@opentiny/vue-input", | ||
"version": "2.16.0", | ||
"version": "2.17.0", | ||
"description": "", | ||
@@ -10,9 +10,11 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-action-sheet": "~2.16.0", | ||
"@opentiny/vue-common": "~2.16.0", | ||
"@opentiny/vue-icon": "~2.16.0", | ||
"@opentiny/vue-tooltip": "~2.16.0", | ||
"@opentiny/vue-renderless": "~3.16.0", | ||
"@opentiny/vue-theme-mobile": "~3.16.0", | ||
"@opentiny/vue-theme": "~3.16.0" | ||
"@opentiny/vue-action-sheet": "~2.17.0", | ||
"@opentiny/vue-common": "~2.17.0", | ||
"@opentiny/vue-icon": "~2.17.0", | ||
"@opentiny/vue-tooltip": "~2.17.0", | ||
"@opentiny/vue-button": "~2.17.0", | ||
"@opentiny/vue-dialog-box": "~2.17.0", | ||
"@opentiny/vue-renderless": "~3.17.0", | ||
"@opentiny/vue-theme-mobile": "~3.17.0", | ||
"@opentiny/vue-theme": "~3.17.0" | ||
}, | ||
@@ -19,0 +21,0 @@ "license": "MIT", |
@@ -164,2 +164,6 @@ /** | ||
}; | ||
popupMore: { | ||
type: BooleanConstructor; | ||
default: boolean; | ||
}; | ||
textareaTitle: { | ||
@@ -166,0 +170,0 @@ type: StringConstructor; |
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
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
63535
1671
9
+ Added@opentiny/vue-button@~2.17.0
+ Added@opentiny/vue-action-sheet@2.17.0(transitive)
+ Added@opentiny/vue-button@2.17.0(transitive)
+ Added@opentiny/vue-common@2.17.0(transitive)
+ Added@opentiny/vue-dialog-box@2.17.0(transitive)
+ Added@opentiny/vue-drawer@2.17.2(transitive)
+ Added@opentiny/vue-icon@2.17.0(transitive)
+ Added@opentiny/vue-locale@2.17.0(transitive)
+ Added@opentiny/vue-renderless@3.17.6(transitive)
+ Added@opentiny/vue-theme@3.17.5(transitive)
+ Added@opentiny/vue-theme-mobile@3.17.0(transitive)
+ Added@opentiny/vue-tooltip@2.17.0(transitive)
- Removed@opentiny/vue-action-sheet@2.16.0(transitive)
- Removed@opentiny/vue-button@2.16.0(transitive)
- Removed@opentiny/vue-common@2.16.0(transitive)
- Removed@opentiny/vue-drawer@2.16.0(transitive)
- Removed@opentiny/vue-icon@2.16.0(transitive)
- Removed@opentiny/vue-locale@2.16.0(transitive)
- Removed@opentiny/vue-renderless@3.16.2(transitive)
- Removed@opentiny/vue-theme@3.16.4(transitive)
- Removed@opentiny/vue-theme-mobile@3.16.0(transitive)
- Removed@opentiny/vue-tooltip@2.16.0(transitive)
Updated@opentiny/vue-common@~2.17.0
Updated@opentiny/vue-icon@~2.17.0
Updated@opentiny/vue-theme@~3.17.0