0
我有一個問題,雅虎/ react-intl多數民衆贊成在我想在消息字符串類型,但即時通訊使用FormattedMessage它給我的消息包裹在跨度和那不是涼。 我嘗試了formatMessage,並沒有工作。 我是任何幫助非常感激或建議,這是我的代碼:如何使一個消息沒有包裝跨越在反應intl
import React from 'react';
import {FormattedMessage} from 'react-intl';
export default {
items: [
{
name: <FormattedMessage id='app.dashboard'/>,
url: '/dashboard',
icon: 'icon-speedometer',
badge: {
variant: 'info',
text: 'New',
},
},
{
title: true,
name: <FormattedMessage id='app.dashboard'/>,
// optional wrapper object
wrapper: {
// required valid HTML5 element tag
element: 'strong',
// optional valid JS object with JS API naming ex: { className: "my-class", style: { fontFamily: "Verdana" }, id: "my-id"}
attributes: {},
},
// optional class names space delimited list for title item ex: "text-center"
class: '',`enter code here`
},
問題是不是很清楚你可以添加更多的代碼詳細 –
BEJGAM SHIVA PRASAD看我的代碼在這裏工作,但它給我的數據包裹在跨度,我不喜歡它和formatMessage沒有工作...... –