iview DatePicker 日期date验证报错

<FormItem label="成立时间" prop="establishedTime">
          <DatePicker
            type="date"
            :value="enterpriseForm.establishedTime"
            @on-change="getestablishedTime"
            placeholder="请输入时间"
            style="width: 100%"
          ></DatePicker>
        </FormItem>
establishedTime: [
          {
            required: true,
            message: "请输入时间",
            trigger: "change",
            // type: "date",
          },
        ],
getestablishedTime(e) {
      this.enterpriseForm.establishedTime = e;
    },

传参保存格式

 params.establishedTime = formatDate(
            new Date(params.establishedTime).getTime(),
            "yyyy-MM-dd"
          );
:value="enterpriseForm.establishedTime" 是关键!
:value="enterpriseForm.establishedTime"是关键!
:value="enterpriseForm.establishedTime"是关键!
posted @ 2022-06-07 15:56  abcByme  阅读(285)  评论(0编辑  收藏  举报