74 lines
1.9 KiB
JavaScript
74 lines
1.9 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../common/vendor.js");
|
|
const _sfc_main = {
|
|
props: {
|
|
VideoId: {
|
|
type: Number,
|
|
default: null
|
|
},
|
|
Videos: {
|
|
type: Object,
|
|
default: {
|
|
src: "",
|
|
avatar: "",
|
|
username: "sdsd",
|
|
titleName: "asdsdas",
|
|
tagName: "sdasd"
|
|
}
|
|
}
|
|
},
|
|
name: "cardVideo",
|
|
data() {
|
|
return {
|
|
videoContent: ""
|
|
};
|
|
},
|
|
mounted() {
|
|
this.videoContent = common_vendor.index.createVideoContext("video", this);
|
|
},
|
|
onLoad() {
|
|
},
|
|
methods: {
|
|
propsPlay(e) {
|
|
const videoContext = this.videoContent;
|
|
const videoStatus = this.$refs.videoStatus;
|
|
this.$emit("onplay", {
|
|
e,
|
|
videoStatus,
|
|
videoContext
|
|
});
|
|
}
|
|
}
|
|
};
|
|
if (!Array) {
|
|
const _easycom_u_avatar2 = common_vendor.resolveComponent("u-avatar");
|
|
const _easycom_u_tag2 = common_vendor.resolveComponent("u-tag");
|
|
(_easycom_u_avatar2 + _easycom_u_tag2)();
|
|
}
|
|
const _easycom_u_avatar = () => "../node-modules/uview-plus/components/u-avatar/u-avatar.js";
|
|
const _easycom_u_tag = () => "../node-modules/uview-plus/components/u-tag/u-tag.js";
|
|
if (!Math) {
|
|
(_easycom_u_avatar + _easycom_u_tag)();
|
|
}
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return {
|
|
a: common_vendor.o((...args) => $options.propsPlay && $options.propsPlay(...args)),
|
|
b: $props.Videos.src,
|
|
c: common_vendor.p({
|
|
src: $props.Videos.avatar
|
|
}),
|
|
d: common_vendor.t($props.Videos.username),
|
|
e: common_vendor.p({
|
|
text: $props.Videos.tagName,
|
|
["bg-color"]: "#6c757d",
|
|
type: "info",
|
|
mode: "plain",
|
|
shape: "circle",
|
|
size: "medium"
|
|
}),
|
|
f: common_vendor.t($props.Videos.titleName)
|
|
};
|
|
}
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/uniapp1/gree_leran/components/cardVideo.vue"]]);
|
|
wx.createComponent(Component);
|