1 line
1.6 KiB
Plaintext
1 line
1.6 KiB
Plaintext
{"version":3,"file":"Paragraph.163a67b8.js","sources":["../../src/components/paragraph/Paragraph.jsx"],"sourcesContent":["import {\n defineComponent,\n reactive,\n computed,\n ref,\n onMounted,\n} from 'vue';\nimport { getDefaultData } from './util';\n\nimport './Paragraph.scss';\n\nexport default defineComponent({\n name: 'sb-paragraph-edit',\n\n props: {\n blockId: { type: String, required: true },\n data: {\n type: null,\n default: getDefaultData,\n },\n },\n\n setup(props) {\n const localData = reactive({\n value: props.data.value,\n align: props.data.align,\n });\n\n const inputEl = ref(null);\n onMounted(() => {\n if (inputEl.value) {\n inputEl.value.innerHTML = localData.value;\n }\n });\n\n const classes = computed(() => ({\n 'sb-paragraph': true,\n [`sb-paragraph_align-${localData.align}`]: true,\n }));\n\n return () => (\n <div class={classes.value}>\n <p\n class=\"sb-paragraph__input\"\n ref={inputEl}\n ></p>\n </div>\n );\n },\n});\n"],"names":["defineComponent","name","props","blockId","type","String","required","data","default","getDefaultData","setup","localData","reactive","value","align","inputEl","ref","innerHTML","classes","computed"],"mappings":"mFAWeA,EAAgB,CAC7BC,KAAM,oBAENC,MAAO,CACLC,QAAS,CAAEC,KAAMC,OAAQC,UAAU,GACnCC,KAAM,CACJH,KAAM,KACNI,QAASC,IAIbC,MAAMR,SACES,EAAYC,EAAS,CACzBC,MAAOX,EAAMK,KAAKM,MAClBC,MAAOZ,EAAMK,KAAKO,QAGdC,EAAUC,EAAI,SACV,KACJD,EAAQF,UACFA,MAAMI,UAAYN,EAAUE,gBAIlCK,EAAUC,GAAS,KAAO,iBACd,GACd,sBAAqBR,EAAUG,UAAU,YAGtC,mBACOI,EAAQL,qBAEV,0BACDE"} |