收藏
回答

请问这里vant里的field组件为啥不能正常使用?

直接打开的同学的项目,再同学的电脑里可以正常打开。报错是这样的:

相关代码是这样的:

<van-cell-group inset class="input-container">

        <van-field

          label="收件人"

          left-icon="user-o"

          value="{{ uname }}"

          size="large"

          focus="{{ true }}"

          placeholder="请输入收件人"

          border="{{ false }}"

        />

        <van-field

          label="货物"

          left-icon="shopping-cart-o"

          value="{{ uname }}"

          size="large"

          focus="{{ true }}"

          placeholder="请输入货物名"

          border="{{ false }}"

        />

        <van-field

          label="配送地"

          left-icon="location-o"

          value="{{ gaddress }}"

          size="large"

          focus="{{ true }}"

          placeholder="请输入配送地"

          border="{{ false }}"

        />

        <van-field

          label="货物数量"

          left-icon="add-o"

          value="{{ uphonenumber }}"

          size="large"

          focus="{{ true }}"

          placeholder="请输入手机号"

          border="{{ false }}"

        />

        <van-field

          label="货物重量"

          left-icon="bag-o"

          value="{{ uphonenumber }}"

          size="large"

          focus="{{ true }}"

          placeholder="请输入手机号"

          border="{{ false }}"

        />

        <van-field

          label="货物重量"

          left-icon="bag-o"

          value="{{ uphonenumber }}"

          size="large"

          focus="{{ true }}"

          placeholder="请输入手机号"

          border="{{ false }}"

        />

        <van-cell icon="fire-otitle="加急value="{{money}}" title-width="200rpx">

          <van-radio-group

          value="{{ radio }}"

          bind:change="onChange"

          direction="horizontal"

          disabled

        >

            <van-radio name="1shape="squarelabel-position="left"></van-radio>

            <van-radio name="0shape="squarelabel-position="left"></van-radio>

          </van-radio-group>

        </van-cell>

        


        <van-cell icon="flower-otitle="易碎value="{{money}}" title-width="200rpx">

          <van-radio-group

          value="{{ radio }}"

          bind:change="onChange"

          direction="horizontal"

          disabled

        >

            <van-radio name="1shape="squarelabel-position="left"></van-radio>

            <van-radio name="0shape="squarelabel-position="left"></van-radio>

          </van-radio-group>

        </van-cell>


        <van-field

          label="备注"

          left-icon="notes-o"

          value="{{ uphonenumber }}"

          size="large"

          focus="{{ true }}"

          placeholder="请输入手机号"

          border="{{ false }}"

        />

      </van-cell-group>

      

    </view>

</van-dialog>


wxss也写了

.van_field{}

而且也按照了正确路径注册


回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容