uni-easyinput.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708
  1. <template>
  2. <view class="uni-easyinput" :class="{ 'uni-easyinput-error': msg }" :style="boxStyle">
  3. <view class="uni-easyinput__content" :class="inputContentClass" :style="inputContentStyle">
  4. <uni-icons v-if="prefixIcon" class="content-clear-icon" :type="prefixIcon" color="#c0c4cc"
  5. @click="onClickIcon('prefix')" size="22"></uni-icons>
  6. <slot name="left">
  7. </slot>
  8. <!-- #ifdef MP-ALIPAY -->
  9. <textarea :enableNative="enableNative" v-if="type === 'textarea'" class="uni-easyinput__content-textarea"
  10. :class="{ 'input-padding': inputBorder }" :name="name" :value="val" :placeholder="placeholder"
  11. :placeholderStyle="placeholderStyle" :disabled="disabled"
  12. placeholder-class="uni-easyinput__placeholder-class" :minlength="inputMinlength" :maxlength="inputMaxlength" :focus="focused"
  13. :autoHeight="autoHeight" :cursor-spacing="cursorSpacing" :adjust-position="adjustPosition"
  14. @input="onInput" @blur="_Blur" @focus="_Focus" @confirm="onConfirm"
  15. @keyboardheightchange="onkeyboardheightchange" @wheel.prevent></textarea>
  16. <input :enableNative="enableNative" v-else :type="type === 'password' ? 'text' : type"
  17. class="uni-easyinput__content-input" :style="inputStyle" :name="name" :value="val"
  18. :password="!showPassword && type === 'password'" :placeholder="placeholder"
  19. :placeholderStyle="placeholderStyle" placeholder-class="uni-easyinput__placeholder-class"
  20. :disabled="disabled" :minlength="inputMinlength" :maxlength="inputMaxlength" :focus="focused" :confirmType="confirmType"
  21. :cursor-spacing="cursorSpacing" :adjust-position="adjustPosition" @focus="_Focus" @blur="_Blur"
  22. @input="onInput" @confirm="onConfirm" @keyboardheightchange="onkeyboardheightchange" @wheel.prevent />
  23. <!-- #endif -->
  24. <!-- #ifndef MP-ALIPAY -->
  25. <textarea v-if="type === 'textarea'" class="uni-easyinput__content-textarea"
  26. :class="{ 'input-padding': inputBorder }" :name="name" :value="val" :placeholder="placeholder"
  27. :placeholderStyle="placeholderStyle" :disabled="disabled"
  28. placeholder-class="uni-easyinput__placeholder-class" :minlength="inputMinlength" :maxlength="inputMaxlength" :focus="focused"
  29. :autoHeight="autoHeight" :cursor-spacing="cursorSpacing" :adjust-position="adjustPosition"
  30. @input="onInput" @blur="_Blur" @focus="_Focus" @confirm="onConfirm"
  31. @keyboardheightchange="onkeyboardheightchange" @wheel.prevent></textarea>
  32. <input v-else :type="type === 'password' ? 'text' : type" class="uni-easyinput__content-input"
  33. :style="inputStyle" :name="name" :value="val" :password="!showPassword && type === 'password'"
  34. :placeholder="placeholder" :placeholderStyle="placeholderStyle"
  35. placeholder-class="uni-easyinput__placeholder-class" :disabled="disabled" :minlength="inputMinlength" :maxlength="inputMaxlength"
  36. :focus="focused" :confirmType="confirmType" :cursor-spacing="cursorSpacing"
  37. :adjust-position="adjustPosition" @focus="_Focus" @blur="_Blur" @input="onInput" @confirm="onConfirm"
  38. @keyboardheightchange="onkeyboardheightchange" @wheel.prevent />
  39. <!-- #endif -->
  40. <template v-if="type === 'password' && passwordIcon">
  41. <!-- 开启密码时显示小眼睛 -->
  42. <uni-icons v-if="isVal" class="content-clear-icon" :class="{ 'is-textarea-icon': type === 'textarea' }"
  43. :type="showPassword ? 'eye-slash-filled' : 'eye-filled'" :size="22"
  44. :color="focusShow ? primaryColor : '#c0c4cc'" @click="onEyes"></uni-icons>
  45. </template>
  46. <template v-if="suffixIcon">
  47. <uni-icons v-if="suffixIcon" class="content-clear-icon" :type="suffixIcon" color="#c0c4cc"
  48. @click="onClickIcon('suffix')" size="22"></uni-icons>
  49. </template>
  50. <template v-else>
  51. <uni-icons v-if="clearable && isVal && !disabled && type !== 'textarea'" class="content-clear-icon"
  52. :class="{ 'is-textarea-icon': type === 'textarea' }" type="clear" :size="clearSize"
  53. :color="msg ? '#dd524d' : focusShow ? primaryColor : '#c0c4cc'" @click="onClear"></uni-icons>
  54. </template>
  55. <slot name="right"></slot>
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. /**
  61. * Easyinput 输入框
  62. * @description 此组件可以实现表单的输入与校验,包括 "text" 和 "textarea" 类型。
  63. * @tutorial https://ext.dcloud.net.cn/plugin?id=3455
  64. * @property {String} value 输入内容
  65. * @property {String } type 输入框的类型(默认text) password/text/textarea/..
  66. * @value text 文本输入键盘
  67. * @value textarea 多行文本输入键盘
  68. * @value password 密码输入键盘
  69. * @value number 数字输入键盘,注意iOS上app-vue弹出的数字键盘并非9宫格方式
  70. * @value idcard 身份证输入键盘,信、支付宝、百度、QQ小程序
  71. * @value digit 带小数点的数字键盘 ,App的nvue页面、微信、支付宝、百度、头条、QQ小程序支持
  72. * @property {Boolean} clearable 是否显示右侧清空内容的图标控件,点击可清空输入框内容(默认true)
  73. * @property {Boolean} autoHeight 是否自动增高输入区域,type为textarea时有效(默认true)
  74. * @property {String } placeholder 输入框的提示文字
  75. * @property {String } placeholderStyle placeholder的样式(内联样式,字符串),如"color: #ddd"
  76. * @property {Boolean} focus 是否自动获得焦点(默认false)
  77. * @property {Boolean} disabled 是否禁用(默认false)
  78. * @property {Number } maxlength 最大输入长度,设置为 -1 的时候不限制最大长度(默认140)
  79. * @property {Number } minlength 最小输入长度(默认0)
  80. * @property {String } confirmType 设置键盘右下角按钮的文字,仅在type="text"时生效(默认done)
  81. * @property {Number } clearSize 清除图标的大小,单位px(默认15)
  82. * @property {String} prefixIcon 输入框头部图标
  83. * @property {String} suffixIcon 输入框尾部图标
  84. * @property {String} primaryColor 设置主题色(默认#2979ff)
  85. * @property {Boolean} trim 是否自动去除两端的空格
  86. * @property {Boolean} cursorSpacing 指定光标与键盘的距离,单位 px
  87. * @property {Boolean} ajust-position 当键盘弹起时,是否上推内容,默认值:true
  88. * @value both 去除两端空格
  89. * @value left 去除左侧空格
  90. * @value right 去除右侧空格
  91. * @value start 去除左侧空格
  92. * @value end 去除右侧空格
  93. * @value all 去除全部空格
  94. * @value none 不去除空格
  95. * @property {Boolean} inputBorder 是否显示input输入框的边框(默认true)
  96. * @property {Boolean} passwordIcon type=password时是否显示小眼睛图标
  97. * @property {Object} styles 自定义颜色
  98. * @event {Function} input 输入框内容发生变化时触发
  99. * @event {Function} focus 输入框获得焦点时触发
  100. * @event {Function} blur 输入框失去焦点时触发
  101. * @event {Function} confirm 点击完成按钮时触发
  102. * @event {Function} iconClick 点击图标时触发
  103. * @example <uni-easyinput v-model="mobile"></uni-easyinput>
  104. */
  105. function obj2strClass(obj) {
  106. let classess = '';
  107. for (let key in obj) {
  108. const val = obj[key];
  109. if (val) {
  110. classess += `${key} `;
  111. }
  112. }
  113. return classess;
  114. }
  115. function obj2strStyle(obj) {
  116. let style = '';
  117. for (let key in obj) {
  118. const val = obj[key];
  119. style += `${key}:${val};`;
  120. }
  121. return style;
  122. }
  123. export default {
  124. name: 'uni-easyinput',
  125. emits: [
  126. 'click',
  127. 'iconClick',
  128. 'update:modelValue',
  129. 'input',
  130. 'focus',
  131. 'blur',
  132. 'confirm',
  133. 'clear',
  134. 'eyes',
  135. 'change',
  136. 'keyboardheightchange'
  137. ],
  138. model: {
  139. prop: 'modelValue',
  140. event: 'update:modelValue'
  141. },
  142. options: {
  143. // #ifdef MP-TOUTIAO
  144. virtualHost: false,
  145. // #endif
  146. // #ifndef MP-TOUTIAO
  147. virtualHost: true
  148. // #endif
  149. },
  150. inject: {
  151. form: {
  152. from: 'uniForm',
  153. default: null
  154. },
  155. formItem: {
  156. from: 'uniFormItem',
  157. default: null
  158. }
  159. },
  160. props: {
  161. name: String,
  162. value: [Number, String],
  163. modelValue: [Number, String],
  164. type: {
  165. type: String,
  166. default: 'text'
  167. },
  168. clearable: {
  169. type: Boolean,
  170. default: true
  171. },
  172. autoHeight: {
  173. type: Boolean,
  174. default: false
  175. },
  176. placeholder: {
  177. type: String,
  178. default: ' '
  179. },
  180. placeholderStyle: String,
  181. focus: {
  182. type: Boolean,
  183. default: false
  184. },
  185. disabled: {
  186. type: Boolean,
  187. default: false
  188. },
  189. maxlength: {
  190. type: [Number, String],
  191. default: 140
  192. },
  193. minlength: {
  194. type: [Number, String],
  195. default: 0
  196. },
  197. confirmType: {
  198. type: String,
  199. default: 'done'
  200. },
  201. clearSize: {
  202. type: [Number, String],
  203. default: 24
  204. },
  205. inputBorder: {
  206. type: Boolean,
  207. default: true
  208. },
  209. prefixIcon: {
  210. type: String,
  211. default: ''
  212. },
  213. suffixIcon: {
  214. type: String,
  215. default: ''
  216. },
  217. trim: {
  218. type: [Boolean, String],
  219. default: false
  220. },
  221. cursorSpacing: {
  222. type: Number,
  223. default: 0
  224. },
  225. passwordIcon: {
  226. type: Boolean,
  227. default: true
  228. },
  229. adjustPosition: {
  230. type: Boolean,
  231. default: true
  232. },
  233. primaryColor: {
  234. type: String,
  235. default: '#2979ff'
  236. },
  237. styles: {
  238. type: Object,
  239. default() {
  240. return {
  241. color: '#333',
  242. backgroundColor: '#fff',
  243. disableColor: 'transparent',
  244. borderColor: '#e5e5e5'
  245. };
  246. }
  247. },
  248. errorMessage: {
  249. type: [String, Boolean],
  250. default: ''
  251. },
  252. // #ifdef MP-ALIPAY
  253. enableNative: {
  254. type: Boolean,
  255. default: false
  256. }
  257. // #endif
  258. },
  259. data() {
  260. return {
  261. focused: false,
  262. val: '',
  263. showMsg: '',
  264. border: false,
  265. isFirstBorder: false,
  266. showClearIcon: false,
  267. showPassword: false,
  268. focusShow: false,
  269. localMsg: '',
  270. isEnter: false // 用于判断当前是否是使用回车操作
  271. };
  272. },
  273. computed: {
  274. // 输入框内是否有值
  275. isVal() {
  276. const val = this.val;
  277. // fixed by mehaotian 处理值为0的情况,字符串0不在处理范围
  278. if (val || val === 0) {
  279. return true;
  280. }
  281. return false;
  282. },
  283. msg() {
  284. // console.log('computed', this.form, this.formItem);
  285. // if (this.form) {
  286. // return this.errorMessage || this.formItem.errMsg;
  287. // }
  288. // TODO 处理头条 formItem 中 errMsg 不更新的问题
  289. return this.localMsg || this.errorMessage;
  290. },
  291. inputMaxlength() {
  292. return Number(this.maxlength);
  293. },
  294. inputMinlength() {
  295. return Number(this.minlength);
  296. },
  297. // 处理外层样式的style
  298. boxStyle() {
  299. return `color:${this.inputBorder && this.msg ? '#e43d33' : this.styles.color
  300. };`;
  301. },
  302. // input 内容的类和样式处理
  303. inputContentClass() {
  304. return obj2strClass({
  305. 'is-input-border': this.inputBorder,
  306. 'is-input-error-border': this.inputBorder && this.msg,
  307. 'is-textarea': this.type === 'textarea',
  308. 'is-disabled': this.disabled,
  309. 'is-focused': this.focusShow
  310. });
  311. },
  312. inputContentStyle() {
  313. const focusColor = this.focusShow ?
  314. 'var(--bs-heading-color)' :
  315. this.styles.borderColor;
  316. const borderColor =
  317. this.inputBorder && this.msg ? '#dd524d' : focusColor;
  318. return obj2strStyle({
  319. 'border-color': borderColor || '#e5e5e5',
  320. 'background-color': this.disabled ?
  321. this.styles.disableColor : 'transparent'
  322. });
  323. },
  324. // input右侧样式
  325. inputStyle() {
  326. const paddingRight =
  327. this.type === 'password' || this.clearable || this.prefixIcon ?
  328. '' :
  329. '10px';
  330. return obj2strStyle({
  331. 'padding-right': paddingRight,
  332. 'padding-left': this.prefixIcon ? '' : '10px'
  333. });
  334. }
  335. },
  336. watch: {
  337. value(newVal) {
  338. // fix by mehaotian 解决 值为null的情况下,input报错的bug
  339. if (newVal === null) {
  340. this.val = '';
  341. return
  342. }
  343. this.val = newVal;
  344. },
  345. modelValue(newVal) {
  346. if (newVal === null) {
  347. this.val = '';
  348. return
  349. }
  350. this.val = newVal;
  351. },
  352. focus(newVal) {
  353. this.$nextTick(() => {
  354. this.focused = this.focus;
  355. this.focusShow = this.focus;
  356. });
  357. }
  358. },
  359. created() {
  360. this.init();
  361. // TODO 处理头条vue3 computed 不监听 inject 更改的问题(formItem.errMsg)
  362. if (this.form && this.formItem) {
  363. this.$watch('formItem.errMsg', newVal => {
  364. this.localMsg = newVal;
  365. });
  366. }
  367. },
  368. mounted() {
  369. this.$nextTick(() => {
  370. this.focused = this.focus;
  371. this.focusShow = this.focus;
  372. });
  373. },
  374. methods: {
  375. /**
  376. * 初始化变量值
  377. */
  378. init() {
  379. if (this.value || this.value === 0) {
  380. this.val = this.value;
  381. } else if (
  382. this.modelValue ||
  383. this.modelValue === 0 ||
  384. this.modelValue === ''
  385. ) {
  386. this.val = this.modelValue;
  387. } else {
  388. // fix by ht 如果初始值为null,则input报错,待框架修复
  389. this.val = '';
  390. }
  391. },
  392. /**
  393. * 点击图标时触发
  394. * @param {Object} type
  395. */
  396. onClickIcon(type) {
  397. this.$emit('iconClick', type);
  398. },
  399. /**
  400. * 显示隐藏内容,密码框时生效
  401. */
  402. onEyes() {
  403. this.showPassword = !this.showPassword;
  404. this.$emit('eyes', this.showPassword);
  405. },
  406. /**
  407. * 输入时触发
  408. * @param {Object} event
  409. */
  410. onInput(event) {
  411. let value = event.detail.value;
  412. // 判断是否去除空格
  413. if (this.trim) {
  414. if (typeof this.trim === 'boolean' && this.trim) {
  415. value = this.trimStr(value);
  416. }
  417. if (typeof this.trim === 'string') {
  418. value = this.trimStr(value, this.trim);
  419. }
  420. }
  421. if (this.errMsg) this.errMsg = '';
  422. this.val = value;
  423. // TODO 兼容 vue3
  424. this.$emit('update:modelValue', value);
  425. // fix by ht input 修改一定要放在 update:modelvalue 后面,避免在input中修改值,导致 v-model 不生效
  426. // TODO 兼容 vue2
  427. this.$emit('input', value);
  428. },
  429. /**
  430. * 外部调用方法
  431. * 获取焦点时触发
  432. * @param {Object} event
  433. */
  434. onFocus() {
  435. this.$nextTick(() => {
  436. this.focused = true;
  437. });
  438. this.$emit('focus', null);
  439. },
  440. _Focus(event) {
  441. this.focusShow = true;
  442. this.$emit('focus', event);
  443. },
  444. /**
  445. * 外部调用方法
  446. * 失去焦点时触发
  447. * @param {Object} event
  448. */
  449. onBlur() {
  450. this.focused = false;
  451. this.$emit('blur', null);
  452. },
  453. _Blur(event) {
  454. let value = event.detail.value;
  455. this.focusShow = false;
  456. this.$emit('blur', event);
  457. // 根据类型返回值,在event中获取的值理论上讲都是string
  458. if (this.isEnter === false) {
  459. this.$emit('change', this.val);
  460. }
  461. // 失去焦点时参与表单校验
  462. if (this.form && this.formItem) {
  463. const { validateTrigger } = this.form;
  464. if (validateTrigger === 'blur') {
  465. this.formItem.onFieldChange();
  466. }
  467. }
  468. },
  469. /**
  470. * 按下键盘的发送键
  471. * @param {Object} e
  472. */
  473. onConfirm(e) {
  474. this.$emit('confirm', this.val);
  475. this.isEnter = true;
  476. this.$emit('change', this.val);
  477. this.$nextTick(() => {
  478. this.isEnter = false;
  479. });
  480. },
  481. /**
  482. * 清理内容
  483. * @param {Object} event
  484. */
  485. onClear(event) {
  486. this.val = '';
  487. // TODO 兼容 vue2
  488. this.$emit('input', '');
  489. // TODO 兼容 vue2
  490. // TODO 兼容 vue3
  491. this.$emit('update:modelValue', '');
  492. // 点击叉号触发
  493. this.$emit('clear');
  494. },
  495. /**
  496. * 键盘高度发生变化的时候触发此事件
  497. * 兼容性:微信小程序2.7.0+、App 3.1.0+
  498. * @param {Object} event
  499. */
  500. onkeyboardheightchange(event) {
  501. this.$emit('keyboardheightchange', event);
  502. },
  503. /**
  504. * 去除空格
  505. */
  506. trimStr(str, pos = 'both') {
  507. if (pos === 'both') {
  508. return str.trim();
  509. } else if (pos === 'left') {
  510. return str.trimLeft();
  511. } else if (pos === 'right') {
  512. return str.trimRight();
  513. } else if (pos === 'start') {
  514. return str.trimStart();
  515. } else if (pos === 'end') {
  516. return str.trimEnd();
  517. } else if (pos === 'all') {
  518. return str.replace(/\s+/g, '');
  519. } else if (pos === 'none') {
  520. return str;
  521. }
  522. return str;
  523. }
  524. }
  525. };
  526. </script>
  527. <style lang="scss">
  528. $uni-error: #e43d33;
  529. $uni-border-1: #dcdfe6 !default;
  530. $uni-place: #909193;
  531. .uni-easyinput {
  532. /* #ifndef APP-NVUE */
  533. width: 100%;
  534. /* #endif */
  535. flex: 1;
  536. position: relative;
  537. text-align: left;
  538. color: var(--bs-heading-color);
  539. font-size: 1rem;
  540. }
  541. .uni-easyinput__content {
  542. flex: 1;
  543. /* #ifndef APP-NVUE */
  544. width: 100%;
  545. display: flex;
  546. box-sizing: border-box;
  547. // min-height: 36px;
  548. /* #endif */
  549. flex-direction: row;
  550. align-items: center;
  551. // 处理border动画刚开始显示黑色的问题
  552. border-color: #fff;
  553. background-color: var(--bs-secondary-bg);
  554. transition-property: border-color;
  555. transition-duration: 0.3s;
  556. }
  557. .uni-easyinput__content-input {
  558. /* #ifndef APP-NVUE */
  559. width: auto;
  560. /* #endif */
  561. position: relative;
  562. overflow: hidden;
  563. flex: 1;
  564. line-height: 1;
  565. font-size: 1rem;
  566. height: 35px;
  567. }
  568. .uni-easyinput__placeholder-class {
  569. color: var(--cwg-placeholder-color);
  570. font-size: 1rem;
  571. // font-weight: 200;
  572. }
  573. .is-textarea {
  574. align-items: flex-start;
  575. }
  576. .is-textarea-icon {
  577. margin-top: 5px;
  578. }
  579. .uni-easyinput__content-textarea {
  580. position: relative;
  581. overflow: hidden;
  582. flex: 1;
  583. line-height: 1.5;
  584. font-size: 1rem;
  585. margin: 6px;
  586. margin-left: 0;
  587. height: 80px;
  588. min-height: 80px;
  589. /* #ifndef APP-NVUE */
  590. min-height: 80px;
  591. width: auto;
  592. /* #endif */
  593. }
  594. .input-padding {
  595. padding-left: 10px;
  596. }
  597. .content-clear-icon {
  598. padding: 0 5px;
  599. }
  600. .label-icon {
  601. margin-right: 5px;
  602. margin-top: -1px;
  603. }
  604. // 显示边框
  605. .is-input-border {
  606. /* #ifndef APP-NVUE */
  607. display: flex;
  608. box-sizing: border-box;
  609. /* #endif */
  610. flex-direction: row;
  611. align-items: center;
  612. border: 1px solid $uni-border-1;
  613. border-radius: 4px;
  614. /* #ifdef MP-ALIPAY */
  615. overflow: hidden;
  616. /* #endif */
  617. }
  618. .uni-error-message {
  619. position: absolute;
  620. bottom: -17px;
  621. left: 0;
  622. line-height: 12px;
  623. color: $uni-error;
  624. font-size: 12px;
  625. text-align: left;
  626. }
  627. .uni-error-msg--boeder {
  628. position: relative;
  629. bottom: 0;
  630. line-height: 22px;
  631. }
  632. .is-input-error-border {
  633. border-color: $uni-error;
  634. .uni-easyinput__placeholder-class {
  635. color: mix($uni-place, $uni-error, 50%);
  636. }
  637. }
  638. .uni-easyinput--border {
  639. margin-bottom: 0;
  640. padding: 10px 15px;
  641. // padding-bottom: 0;
  642. border-top: 1px #eee solid;
  643. }
  644. .uni-easyinput-error {
  645. padding-bottom: 0;
  646. }
  647. .is-first-border {
  648. /* #ifndef APP-NVUE */
  649. border: none;
  650. /* #endif */
  651. /* #ifdef APP-NVUE */
  652. border-width: 0;
  653. /* #endif */
  654. }
  655. .is-disabled {
  656. background-color: #f5f7fa !important;
  657. color: #c0c4cc;
  658. cursor: not-allowed;
  659. .uni-input-wrapper,uni-input-input{
  660. cursor: not-allowed;
  661. }
  662. .uni-easyinput__placeholder-class {
  663. color: #c0c4cc;
  664. font-size: 1rem;
  665. cursor: not-allowed;
  666. }
  667. input:disabled{
  668. cursor: not-allowed;
  669. }
  670. }
  671. </style>