69 lines
1.7 KiB
JavaScript
69 lines
1.7 KiB
JavaScript
|
"use strict";
|
||
|
const common_vendor = require("../../common/vendor.js");
|
||
|
const _sfc_main = {
|
||
|
data() {
|
||
|
return {
|
||
|
val: "",
|
||
|
placeholderStyle: {
|
||
|
padding: "30rpx 0"
|
||
|
}
|
||
|
};
|
||
|
},
|
||
|
props: {
|
||
|
text: {
|
||
|
type: String,
|
||
|
default: "评论"
|
||
|
},
|
||
|
commit: {
|
||
|
type: Boolean,
|
||
|
default: false
|
||
|
},
|
||
|
details: {
|
||
|
type: String,
|
||
|
default: ""
|
||
|
}
|
||
|
},
|
||
|
mounted() {
|
||
|
},
|
||
|
methods: {
|
||
|
send() {
|
||
|
console.log("评论", this.val);
|
||
|
this.$emit("submit", this.val);
|
||
|
this.val = "";
|
||
|
},
|
||
|
blur() {
|
||
|
setTimeout(() => {
|
||
|
this.$emit("blurCom");
|
||
|
}, 500);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
if (!Array) {
|
||
|
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||
|
_easycom_up_input2();
|
||
|
}
|
||
|
const _easycom_up_input = () => "../../node-modules/uview-plus/components/u-input/u-input.js";
|
||
|
if (!Math) {
|
||
|
_easycom_up_input();
|
||
|
}
|
||
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||
|
return {
|
||
|
a: common_vendor.t($props.details),
|
||
|
b: common_vendor.sr("commentInput", "888de6ac-0"),
|
||
|
c: common_vendor.o($options.blur),
|
||
|
d: common_vendor.o(($event) => $data.val = $event),
|
||
|
e: common_vendor.p({
|
||
|
placeholder: "请输入内容",
|
||
|
border: "surround",
|
||
|
clearable: true,
|
||
|
customStyle: "background-color:#fff;",
|
||
|
focus: true,
|
||
|
modelValue: $data.val
|
||
|
}),
|
||
|
f: common_vendor.t($props.text),
|
||
|
g: common_vendor.o((...args) => $options.send && $options.send(...args))
|
||
|
};
|
||
|
}
|
||
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-888de6ac"], ["__file", "D:/uniapp1/gree_leran/components/InputBox/InputBox.vue"]]);
|
||
|
wx.createComponent(Component);
|