mirror of
				https://github.com/Tencent/tmagic-editor.git
				synced 2025-11-04 10:49:51 +08:00 
			
		
		
		
	fix(vue-components): button删除调试代码,text支持富文本
This commit is contained in:
		
							parent
							
								
									d53a479b21
								
							
						
					
					
						commit
						2a714ae9cc
					
				@ -1,5 +1,5 @@
 | 
			
		||||
{
 | 
			
		||||
  "version": "0.1.1",
 | 
			
		||||
  "version": "0.1.2",
 | 
			
		||||
  "name": "@tmagic/vue-button",
 | 
			
		||||
  "type": "module",
 | 
			
		||||
  "main": "src/index.ts",
 | 
			
		||||
 | 
			
		||||
@ -7,10 +7,10 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { defineComponent, inject, type PropType } from 'vue-demi';
 | 
			
		||||
import { defineComponent, type PropType } from 'vue-demi';
 | 
			
		||||
 | 
			
		||||
import { COMMON_EVENT_PREFIX, type Id, type MComponent } from '@tmagic/core';
 | 
			
		||||
import { useApp, useComponentStatus } from '@tmagic/vue-runtime-help';
 | 
			
		||||
import { useApp } from '@tmagic/vue-runtime-help';
 | 
			
		||||
 | 
			
		||||
interface ButtonSchema extends Omit<MComponent, 'id'> {
 | 
			
		||||
  id?: Id;
 | 
			
		||||
@ -36,10 +36,6 @@ export default defineComponent({
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  setup(props) {
 | 
			
		||||
    const { setStatus } = inject<ReturnType<typeof useComponentStatus>>('componentStatusStore')!;
 | 
			
		||||
 | 
			
		||||
    setStatus('disabled');
 | 
			
		||||
 | 
			
		||||
    const { app, node } = useApp(props);
 | 
			
		||||
 | 
			
		||||
    const clickHandler = () => {
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
{
 | 
			
		||||
  "version": "0.1.0",
 | 
			
		||||
  "version": "0.1.1",
 | 
			
		||||
  "name": "@tmagic/vue-text",
 | 
			
		||||
  "type": "module",
 | 
			
		||||
  "main": "src/index.ts",
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,5 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <p @click="clickHandler">
 | 
			
		||||
    <slot>{{ config.text }}</slot>
 | 
			
		||||
  </p>
 | 
			
		||||
  <p @click="clickHandler" v-html="config.text"></p>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user