uin-app下 placeholder和placeholder-class无法设置
只要设置就报错
<view class="tr">
<view class="td h50">
<input type="number" class="line-d h39 tc-000 p-lr5 box-s linec-eee"
placeholder-class="tc-ccc" placeholder="输入您的{{appName}}号" />
</view>
</view>
<view class="tr">
<view class="td fz20 h10 p-tb10">密码</view>
</view>
<view class="tr">
<view class="td h50">
<input type="password" class="line-d h39 tc-000 p-lr5 box-s linec-eee"
placeholder-class="tc-ccc" placeholder="输入您的{{appName}}密码" />
</view>
</view>
————————————————————————————————————————————————————
00:14:21.698 Module Error (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):
00:14:21.705 (Emitted value instead of an instance of Error)
00:14:21.706 Errors compiling template:
00:14:21.723 placeholder="输入您的{{appName}}号": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div id="{{ val }}">, use <div :id="val">.
00:14:21.740 11 | <view class="td h50">
00:14:21.741 12 | <input type="number" class="line-d h39 tc-000 p-lr5 box-s linec-eee"
00:14:21.755 13 | placeholder-class="tc-ccc" placeholder="输入您的{{appName}}号" />
00:14:21.756 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
00:14:21.773 14 | </view>
00:14:21.773 15 | </view>
00:14:21.791 placeholder="输入您的{{appName}}密码": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div id="{{ val }}">, use <div :id="val">.
00:14:21.793 20 | <view class="td h50">
00:14:21.806 21 | <input type="password" class="line-d h39 tc-000 p-lr5 box-s linec-eee"
00:14:21.807 22 | placeholder-class="tc-ccc" placeholder="输入您的{{appName}}密码" />
00:14:21.825 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
00:14:21.826 23 | </view>
00:14:21.838 24 | </view>
3 个回复
y***@icloud.com (作者)
不加placeholder-class和placeholder这两个属性就不报错
y***@icloud.com (作者)
新建uin-app然后在index里写的,没作其他设置
3***@qq.com
<viewv-for="(item,index) in dataList" :key="index"> </view>
你应该是少了 :key="index"