mirror of
				https://github.com/Tencent/tmagic-editor.git
				synced 2025-11-04 18:52:18 +08:00 
			
		
		
		
	feat(editor): 样式中的position选项加上中文
This commit is contained in:
		
							parent
							
								
									6152a78467
								
							
						
					
					
						commit
						1614b62d2a
					
				@ -12,6 +12,14 @@ const emit = defineEmits<{
 | 
			
		||||
  change: [v: string | StyleSchema, eventData: ContainerChangeEventData];
 | 
			
		||||
}>();
 | 
			
		||||
 | 
			
		||||
const positionText: Record<string, string> = {
 | 
			
		||||
  static: '不定位',
 | 
			
		||||
  relative: '相对定位',
 | 
			
		||||
  absolute: '绝对定位',
 | 
			
		||||
  fixed: '固定定位',
 | 
			
		||||
  sticky: '粘性定位',
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const config = {
 | 
			
		||||
  items: [
 | 
			
		||||
    {
 | 
			
		||||
@ -21,9 +29,9 @@ const config = {
 | 
			
		||||
      type: 'data-source-field-select',
 | 
			
		||||
      fieldConfig: {
 | 
			
		||||
        type: 'select',
 | 
			
		||||
        options: ['static', 'relative', 'absolute', 'fixed', 'sticky'].map((item) => ({
 | 
			
		||||
        options: Object.keys(positionText).map((item) => ({
 | 
			
		||||
          value: item,
 | 
			
		||||
          text: item,
 | 
			
		||||
          text: `${item}(${positionText[item]})`,
 | 
			
		||||
        })),
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user