From 75d52afdf840eef849491a2917e13bc8ec0a6c53 Mon Sep 17 00:00:00 2001
From: chaorenluo <1243357953@qq.com>
Date: Fri, 17 May 2024 21:01:24 +0800
Subject: [PATCH 1/5] =?UTF-8?q?feat:=E6=8A=BD=E7=A6=BBB=EF=BC=8CC=E7=AB=AF?=
=?UTF-8?q?=E9=80=9A=E7=94=A8=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../materials/communals/common/utils/index.js | 11 +++
web/src/materials/communals/communalLoader.js | 10 ++
.../HeaderContent/Components/HeaderBanner.jsx | 87 +++++++++++++++++
.../HeaderContent/Components/HeaderVideo.jsx | 63 +++++++++++++
.../communals/widgets/HeaderContent/index.jsx | 43 +++++++++
.../widgets/HeaderContent/index.scss | 69 ++++++++++++++
.../communals/widgets/LogoIcon/index.jsx | 93 +++++++++++++++++++
.../communals/widgets/LogoIcon/index.scss | 43 +++++++++
.../communals/widgets/MainTitle/index.jsx | 91 ++++++++++++++++++
.../communals/widgets/MainTitle/index.scss | 62 +++++++++++++
.../communals/widgets/SubmitButton/index.jsx | 54 +++++++++++
.../communals/widgets/SubmitButton/index.scss | 26 ++++++
web/src/materials/setters/widgets/Header.vue | 29 ++++++
13 files changed, 681 insertions(+)
create mode 100644 web/src/materials/communals/common/utils/index.js
create mode 100644 web/src/materials/communals/communalLoader.js
create mode 100644 web/src/materials/communals/widgets/HeaderContent/Components/HeaderBanner.jsx
create mode 100644 web/src/materials/communals/widgets/HeaderContent/Components/HeaderVideo.jsx
create mode 100644 web/src/materials/communals/widgets/HeaderContent/index.jsx
create mode 100644 web/src/materials/communals/widgets/HeaderContent/index.scss
create mode 100644 web/src/materials/communals/widgets/LogoIcon/index.jsx
create mode 100644 web/src/materials/communals/widgets/LogoIcon/index.scss
create mode 100644 web/src/materials/communals/widgets/MainTitle/index.jsx
create mode 100644 web/src/materials/communals/widgets/MainTitle/index.scss
create mode 100644 web/src/materials/communals/widgets/SubmitButton/index.jsx
create mode 100644 web/src/materials/communals/widgets/SubmitButton/index.scss
create mode 100644 web/src/materials/setters/widgets/Header.vue
diff --git a/web/src/materials/communals/common/utils/index.js b/web/src/materials/communals/common/utils/index.js
new file mode 100644
index 00000000..83858f35
--- /dev/null
+++ b/web/src/materials/communals/common/utils/index.js
@@ -0,0 +1,11 @@
+// 对链接做一个兼容转换,支持用户不配置http开头或者配置 // 开头
+export const formatLink = (url) => {
+ url = url.trim()
+ if (!url) {
+ return url
+ }
+ if (url.startsWith('http') || url.startsWith('//')) {
+ return url
+ }
+ return `http://${url}`
+}
\ No newline at end of file
diff --git a/web/src/materials/communals/communalLoader.js b/web/src/materials/communals/communalLoader.js
new file mode 100644
index 00000000..c22f1321
--- /dev/null
+++ b/web/src/materials/communals/communalLoader.js
@@ -0,0 +1,10 @@
+import ComponentLoader from '@/materials/utils/componentLoader'
+export class CommunalLoader extends ComponentLoader {
+ dynamicImport(path) {
+ return import(`./widgets/${path}.vue`)
+ }
+}
+
+const communalLoader = new CommunalLoader()
+
+export default communalLoader
diff --git a/web/src/materials/communals/widgets/HeaderContent/Components/HeaderBanner.jsx b/web/src/materials/communals/widgets/HeaderContent/Components/HeaderBanner.jsx
new file mode 100644
index 00000000..34f1e401
--- /dev/null
+++ b/web/src/materials/communals/widgets/HeaderContent/Components/HeaderBanner.jsx
@@ -0,0 +1,87 @@
+import { defineComponent, onMounted, computed } from 'vue'
+import { get as _get } from 'lodash-es'
+import { formatLink } from '@materials/communals/common/utils'
+
+export default defineComponent({
+ name: 'HeaderContent',
+ props: {
+ bannerConf: {
+ type: Object,
+ default: () => {}
+ },
+ readonly: {
+ type: Boolean,
+ default: false
+ },
+ isSelected: {
+ type: Boolean,
+ default: false
+ }
+ },
+ setup(props) {
+
+ const bgImage = computed(() => {
+ return _get(props.bannerConf, 'bannerConfig.bgImage', '')
+ })
+
+ const onBannerClick = () => {
+ const allow = _get(props.bannerConf, 'bannerConfig.bgImageAllowJump', false)
+ const jumpLink = _get(props.bannerConf, 'bannerConfig.bgImageJumpLink', '')
+ if (!allow || !jumpLink) {
+ return
+ }
+ window.open(formatLink(jumpLink))
+ }
+
+ const emptyBannerRender = () => {
+ if(!bgImage.value && props.readonly) {
+ let classStr = 'empty-banner';
+ if (props.isSelected) {
+ classStr += 'banner-active'
+ }
+ return (
+
+
点击配置头图
+
若不配置头图,将不在问卷中展示
+
+ )
+ }
+ return ''
+ }
+
+ const bannerRender = () => {
+ let attribute = {
+ class:'banner-img'
+ }
+ if (!props.readonly) {
+ const allow = _get(props.bannerConf, 'bannerConfig.bgImageAllowJump', false)
+ attribute = {
+ class: `${attribute.class} ${allow ? 'pointer' : ''}`,
+ onClick:onBannerClick
+ }
+ }
+ if (bgImage.value) {
+ return (
+
+
![]({bgImage.value})
+
+ )
+ }
+ return '';
+ }
+
+ return {
+ bgImage,
+ emptyBannerRender,
+ bannerRender
+ }
+ },
+ render() {
+ return (
+
+ )
+ }
+})
\ No newline at end of file
diff --git a/web/src/materials/communals/widgets/HeaderContent/Components/HeaderVideo.jsx b/web/src/materials/communals/widgets/HeaderContent/Components/HeaderVideo.jsx
new file mode 100644
index 00000000..c5a01525
--- /dev/null
+++ b/web/src/materials/communals/widgets/HeaderContent/Components/HeaderVideo.jsx
@@ -0,0 +1,63 @@
+import { defineComponent, computed } from 'vue'
+
+
+export default defineComponent({
+ name: 'HeaderVideo',
+ props: {
+ bannerConf: {
+ type: Object,
+ default: () => {}
+ },
+ readonly: {
+ type: Boolean,
+ default: false
+ }
+ },
+ setup(props) {
+
+ const attributeVideo = computed(() => {
+ const { bannerConf,readonly} = props;
+ let data = {
+ id:'video',
+ preload: 'auto',
+ style: readonly ? '' : 'margin: 0 auto; width: 100%; display: block;',
+ poster: readonly ? bannerConf?.bannerConfigpostImg : bannerConf?.bannerConfig?.postImg,
+ controls: '',
+ class:readonly ? 'custom-video' : ''
+ }
+ return data;
+ })
+
+ const play = () => {
+ const video = document.getElementById('video');
+ if(!video) return;
+ document.querySelector('.play-icon').style.display = 'none'
+ document.querySelector('.video-modal').style.display = 'none'
+ video.play()
+ }
+
+ return {
+ attributeVideo,
+ play
+ }
+ },
+ render() {
+ return (
+
+ )
+ }
+})
\ No newline at end of file
diff --git a/web/src/materials/communals/widgets/HeaderContent/index.jsx b/web/src/materials/communals/widgets/HeaderContent/index.jsx
new file mode 100644
index 00000000..3d29b8c7
--- /dev/null
+++ b/web/src/materials/communals/widgets/HeaderContent/index.jsx
@@ -0,0 +1,43 @@
+import { defineComponent } from 'vue'
+import './index.scss';
+import HeaderBanner from './Components/HeaderBanner';
+import HeaderVideo from './Components/HeaderVideo';
+
+export default defineComponent({
+ name: 'HeaderContent',
+ props: {
+ bannerConf: {
+ type: Object,
+ default: () => {}
+ },
+ readonly: {
+ type: Boolean,
+ default: false
+ },
+ isSelected: {
+ type: Boolean,
+ default: false
+ }
+ },
+ emits:['select'],
+ setup(props, { emit }) {
+ const handleClick = () => {
+ if (!props.readonly) return;
+ emit('select')
+ }
+
+ return {
+ handleClick,
+ props
+ }
+ },
+ render() {
+ const bannerConf = this.props.bannerConf;
+ return (
+
+ )
+ }
+})
\ No newline at end of file
diff --git a/web/src/materials/communals/widgets/HeaderContent/index.scss b/web/src/materials/communals/widgets/HeaderContent/index.scss
new file mode 100644
index 00000000..75f9631c
--- /dev/null
+++ b/web/src/materials/communals/widgets/HeaderContent/index.scss
@@ -0,0 +1,69 @@
+.header-content-warp{
+ width: 100%;
+ .header-banner-wrap{
+ .banner {
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ }
+ .banner-img {
+ width: 100%;
+ &.pointer {
+ cursor: pointer;
+ }
+ }
+ .empty-banner {
+ height: 120px;
+ border: 1px dashed #e3e4e8;
+
+ p {
+ text-align: center;
+ color: #c8c9cd;
+ font-size: 16px;
+ &:first-child {
+ font-size: 24px;
+ color: #92949d;
+ margin: 20px 0 24px 0;
+ }
+ }
+
+ &.banner-active {
+ background-color: #f2f4f7;
+ box-shadow: 0 0 5px #e3e4e8;
+ }
+ }
+ }
+ .header-video-warp{
+ .video {
+ width: 100%;
+ height: 100%;
+ position: relative;
+ }
+ .video-modal {
+ position: absolute;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: cover;
+ z-index: 100;
+ }
+ .play-icon {
+ position: absolute;
+ background-repeat: no-repeat;
+ background-position: center;
+ font-size: 1.8rem;
+ left: 50%;
+ top: 49%;
+ -webkit-transform: translate(-50%, -50%);
+ transform: translate(-50%, -50%);
+ z-index: 101;
+ }
+ .custom-video {
+ margin: 0 auto;
+ width: 100%;
+ display: block;
+ }
+ }
+}
\ No newline at end of file
diff --git a/web/src/materials/communals/widgets/LogoIcon/index.jsx b/web/src/materials/communals/widgets/LogoIcon/index.jsx
new file mode 100644
index 00000000..7221272b
--- /dev/null
+++ b/web/src/materials/communals/widgets/LogoIcon/index.jsx
@@ -0,0 +1,93 @@
+import { defineComponent,computed } from 'vue'
+import './index.scss';
+import { useStore } from 'vuex'
+
+export default defineComponent({
+ name: 'LogoIcon',
+ props: {
+ logoConf: {
+ type: Object,
+ default: () => ({
+ logoImageWidth: Number,
+ logoImage:String
+ })
+ },
+ readonly: {
+ type: Boolean,
+ default: false
+ }
+ },
+ emits:['select'],
+ setup(props,{emit}) {
+
+ const store = useStore()
+
+ const logoImage = computed(() => {
+ return props.logoConf?.logoImage;
+ })
+
+ const logoImageWidth = computed(() => {
+ return props.logoConf?.logoImageWidth;
+ })
+
+ const isMobile = computed(() => {
+ return store.state?.isMobile
+ })
+
+ const logoStyle = computed(() => {
+ let style = {};
+ if (props.readonly) {
+ style = {
+ width: logoImageWidth.value
+ }
+ } else {
+ style={
+ width: !isMobile.value ? '20%' : logoImageWidth.value || '20%'
+ }
+ }
+ return style
+ })
+
+ const onSelect = () => {
+ if (!props.readonly) return;
+ emit('select')
+ }
+
+ const noLogoRender = () => {
+ if (!logoImage.value && props.readonly) {
+ return (
+
+
LOGO
+
若不配置logo,该图片将不会在问卷中展示
+
+ )
+ }
+ return ''
+ }
+
+ return {
+ logoImage,
+ logoImageWidth,
+ logoStyle,
+ props,
+ onSelect,
+ noLogoRender
+ }
+
+ },
+ render() {
+ const { readonly } = this.props;
+ return (
+
+
+ {this.logoImage
+ ?
+
![]({this.logoImage})
+ :
+ this.noLogoRender()
+ }
+
+
+ )
+ }
+})
\ No newline at end of file
diff --git a/web/src/materials/communals/widgets/LogoIcon/index.scss b/web/src/materials/communals/widgets/LogoIcon/index.scss
new file mode 100644
index 00000000..068fa496
--- /dev/null
+++ b/web/src/materials/communals/widgets/LogoIcon/index.scss
@@ -0,0 +1,43 @@
+.logo-icon-warp{
+ display: flex;
+ justify-content: center;
+ .logo-wrapper {
+ text-align: center;
+ font-size: 0;
+ padding: 0.1rem 0 0.5rem;
+ }
+ .question-logo {
+ max-width: 300px;
+ text-align: center;
+ padding: 0 0 0.6rem;
+ margin-top: -0.2rem;
+ cursor: pointer;
+ }
+ .logo-placeholder-wrapper {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+
+ .logo-placeholder {
+ width: 200px;
+ height: 50px;
+ font-size: 40px;
+ color: #d8d8d8;
+ letter-spacing: 0;
+ line-height: 36px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border: 1px dashed #d8d8d8;
+ }
+
+ .no-logo-tip {
+ font-size: 13px;
+ line-height: 13px;
+ opacity: 0.5;
+ margin-top: 13px;
+ color: #92949d;
+ }
+ }
+}
\ No newline at end of file
diff --git a/web/src/materials/communals/widgets/MainTitle/index.jsx b/web/src/materials/communals/widgets/MainTitle/index.jsx
new file mode 100644
index 00000000..03c35117
--- /dev/null
+++ b/web/src/materials/communals/widgets/MainTitle/index.jsx
@@ -0,0 +1,91 @@
+import { defineComponent,computed } from 'vue'
+import RichEditor from '@/common/Editor/RichEditor.vue'
+import '@/render/styles/variable.scss';
+import './index.scss';
+
+export default defineComponent({
+ name: 'HeaderContent',
+ props: {
+ bannerConf: {
+ type: Object,
+ default: () => {}
+ },
+ readonly: {
+ type: Boolean,
+ default: false
+ },
+ isSelected: {
+ type: Boolean,
+ default: false
+ }
+ },
+ emits:['select'],
+ setup(props, { emit }) {
+
+ const titleClass = computed(() => {
+ let classStr = '';
+ if (props.readonly) {
+ classStr = `main-title ${props.isSelected ? 'active' : ''}`;
+ } else {
+ classStr = 'titlePanel';
+
+ }
+ return classStr
+ });
+
+ const isTitleHide = computed(() => {
+ if (!props.readonly && !mainTitle.value) {
+ return false
+ }
+ return true;
+ })
+
+ const mainTitle = computed(() => {
+ return props.bannerConf.titleConfig?.mainTitle
+ })
+
+ const handleClick = () => {
+ if (!props.readonly) return;
+ emit('select')
+ }
+
+ const onTitleInput = (val) => {
+ if (!props.isSelected) {
+ return
+ }
+ emit('change', {
+ key: 'titleConfig.mainTitle',
+ value: val
+ })
+ }
+
+ return {
+ props,
+ titleClass,
+ isTitleHide,
+ mainTitle,
+ handleClick,
+ onTitleInput,
+ }
+ },
+ render() {
+ return (
+
+ {this.isTitleHide ?
+
+ {this.props.readonly ?
+
+ :
+
+ }
+
+ :
+ ''}
+
+ )
+ }
+})
\ No newline at end of file
diff --git a/web/src/materials/communals/widgets/MainTitle/index.scss b/web/src/materials/communals/widgets/MainTitle/index.scss
new file mode 100644
index 00000000..33794c3b
--- /dev/null
+++ b/web/src/materials/communals/widgets/MainTitle/index.scss
@@ -0,0 +1,62 @@
+.main-title-warp{
+ .mainTitle {
+ font-size: 0.28rem;
+ line-height: 0.4rem;
+ color: $title-color;
+
+ ol {
+ list-style: decimal;
+ }
+
+ ul {
+ list-style: disc;
+ }
+
+ img {
+ width: 100%;
+ }
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6,
+ p {
+ line-height: 0.6rem;
+ color: $title-color-deep;
+ margin-bottom: 0.35rem;
+ }
+ p {
+ margin-bottom: 0;
+ }
+ }
+ .title-wrapper {
+ padding: 15px;
+ }
+ .main-title {
+ border: 1px solid transparent;
+
+ &.active {
+ border: 1px solid #e3e4e6;
+ background-color: #f6f7f9;
+ box-shadow: 0 0 5px #dedede;
+
+ :deep(.w-e-text-container) {
+ background-color: #f6f7f9;
+ }
+ }
+ }
+
+ .main-title:hover {
+ border: 1px dashed #eee;
+ }
+ &.pd15{
+ padding: 15px;
+ }
+ .titlePanel {
+ position: relative;
+ width: 100%;
+ padding: 0.4rem 0.4rem;
+ box-sizing: border-box;
+ }
+}
\ No newline at end of file
diff --git a/web/src/materials/communals/widgets/SubmitButton/index.jsx b/web/src/materials/communals/widgets/SubmitButton/index.jsx
new file mode 100644
index 00000000..e2cfae7b
--- /dev/null
+++ b/web/src/materials/communals/widgets/SubmitButton/index.jsx
@@ -0,0 +1,54 @@
+import { defineComponent } from 'vue'
+import '@/render/styles/variable.scss';
+import './index.scss';
+
+export default defineComponent({
+ name: 'SubmitButton',
+ props: {
+ submitConf: Object,
+ isSelected: Boolean,
+ skinConf: {
+ type: Object,
+ required: true
+ },
+ readonly: Boolean,
+ validate: Function,
+ renderData: Array
+ },
+ emits: ['submit','select'],
+ setup(props, { emit }) {
+
+ const submit = (e) => {
+ if (props.readonly) return;
+ const validate = props.validate
+ if (e) {
+ e.preventDefault()
+ validate((valid) => {
+ if (valid) {
+ this.$emit('submit')
+ }
+ })
+ }
+ }
+
+ const handleClick = () => {
+ if (!props.readonly) return;
+ emit('select')
+ }
+
+ return {
+ props,
+ submit,
+ handleClick
+ }
+
+ },
+ render() {
+ const { readonly,submitConf } = this.props;
+ return (
+
+ { submitConf.submitTitle }
+
+ )
+ }
+})
\ No newline at end of file
diff --git a/web/src/materials/communals/widgets/SubmitButton/index.scss b/web/src/materials/communals/widgets/SubmitButton/index.scss
new file mode 100644
index 00000000..0b2c9cb1
--- /dev/null
+++ b/web/src/materials/communals/widgets/SubmitButton/index.scss
@@ -0,0 +1,26 @@
+.submit-warp{
+ &.question-submit_wrapper{
+ margin: 0 0.4rem;
+ font-size: 0;
+ position: relative;
+ }
+ &.preview-submit_wrapper{
+ padding: 25px;
+ text-align: center;
+ }
+ .submit-btn {
+ position: relative;
+ display: inline-block;
+ width: 100%;
+ padding: 0.25rem 0;
+ font-size: 0.36rem;
+ line-height: 0.5rem;
+ font-weight: 500;
+ text-align: center;
+ color: #fff;
+ background: var(--primary-color);
+ border-radius: 0.08rem;
+ margin: 0.4rem 0;
+ cursor: pointer;
+ }
+}
\ No newline at end of file
diff --git a/web/src/materials/setters/widgets/Header.vue b/web/src/materials/setters/widgets/Header.vue
new file mode 100644
index 00000000..f26082ce
--- /dev/null
+++ b/web/src/materials/setters/widgets/Header.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
\ No newline at end of file
From cdff32477c00abcad027488db3dc16c7743520bd Mon Sep 17 00:00:00 2001
From: chaorenluo <1243357953@qq.com>
Date: Fri, 24 May 2024 09:16:03 +0800
Subject: [PATCH 2/5] =?UTF-8?q?refactor:=20=E9=80=9A=E7=94=A8=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6=E7=BB=9F=E4=B8=80=E6=B8=B2=E6=9F=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../HeaderContent/Components/HeaderBanner.jsx | 48 ++++++++++++-------
.../HeaderContent/Components/HeaderVideo.jsx | 10 ++--
.../communals/widgets/HeaderContent/index.jsx | 8 ++--
.../communals/widgets/LogoIcon/index.jsx | 7 ++-
.../communals/widgets/MainTitle/index.jsx | 8 ++--
.../communals/widgets/SubmitButton/index.jsx | 7 ++-
web/src/render/pages/IndexPage.vue | 3 +-
7 files changed, 52 insertions(+), 39 deletions(-)
diff --git a/web/src/materials/communals/widgets/HeaderContent/Components/HeaderBanner.jsx b/web/src/materials/communals/widgets/HeaderContent/Components/HeaderBanner.jsx
index 34f1e401..cccd6f24 100644
--- a/web/src/materials/communals/widgets/HeaderContent/Components/HeaderBanner.jsx
+++ b/web/src/materials/communals/widgets/HeaderContent/Components/HeaderBanner.jsx
@@ -33,27 +33,27 @@ export default defineComponent({
window.open(formatLink(jumpLink))
}
- const emptyBannerRender = () => {
- if(!bgImage.value && props.readonly) {
- let classStr = 'empty-banner';
- if (props.isSelected) {
- classStr += 'banner-active'
- }
- return (
-
-
点击配置头图
-
若不配置头图,将不在问卷中展示
-
- )
- }
- return ''
- }
+ // const emptyBannerRender = () => {
+ // if(!bgImage.value && !props.readonly) {
+ // let classStr = 'empty-banner';
+ // if (props.isSelected) {
+ // classStr += 'banner-active'
+ // }
+ // return (
+ //
+ //
点击配置头图
+ //
若不配置头图,将不在问卷中展示
+ //
+ // )
+ // }
+ // return ''
+ // }
const bannerRender = () => {
let attribute = {
class:'banner-img'
}
- if (!props.readonly) {
+ if (props.readonly) {
const allow = _get(props.bannerConf, 'bannerConfig.bgImageAllowJump', false)
attribute = {
class: `${attribute.class} ${allow ? 'pointer' : ''}`,
@@ -67,12 +67,24 @@ export default defineComponent({
)
}
+ if(!bgImage.value && !props.readonly) {
+ let classStr = 'empty-banner';
+ if (props.isSelected) {
+ classStr += 'banner-active'
+ }
+ return (
+
+
点击配置头图
+
若不配置头图,将不在问卷中展示
+
+ )
+ }
return '';
}
return {
bgImage,
- emptyBannerRender,
+ // emptyBannerRender,
bannerRender
}
},
@@ -80,7 +92,7 @@ export default defineComponent({
return (
)
}
diff --git a/web/src/materials/communals/widgets/HeaderContent/Components/HeaderVideo.jsx b/web/src/materials/communals/widgets/HeaderContent/Components/HeaderVideo.jsx
index c5a01525..3c9105dd 100644
--- a/web/src/materials/communals/widgets/HeaderContent/Components/HeaderVideo.jsx
+++ b/web/src/materials/communals/widgets/HeaderContent/Components/HeaderVideo.jsx
@@ -20,10 +20,10 @@ export default defineComponent({
let data = {
id:'video',
preload: 'auto',
- style: readonly ? '' : 'margin: 0 auto; width: 100%; display: block;',
- poster: readonly ? bannerConf?.bannerConfigpostImg : bannerConf?.bannerConfig?.postImg,
+ style: readonly ? 'margin: 0 auto; width: 100%; display: block;' : '' ,
+ poster: bannerConf?.bannerConfig?.postImg,
controls: '',
- class:readonly ? 'custom-video' : ''
+ class:readonly ? '' : 'custom-video'
}
return data;
})
@@ -38,10 +38,12 @@ export default defineComponent({
return {
attributeVideo,
+ props,
play
}
},
render() {
+ const { readonly } = this.props;
return (