創(chuàng)建一個(gè)DevExtreme應(yīng)用程序
1. 使用DevExtreme CLI生成應(yīng)用程序
npx -p devextreme-cli devextreme new vue-app 項(xiàng)目名
cd?項(xiàng)目名
npm run serve
2.??DevExtreme中文化
<script>
import?zhMessages?from?"devextreme/localization/messages/zh.json";
import?{?locale,?loadMessages?}?from?"devextreme/localization";
export default {
? ? created() {
? ? ? ? loadMessages(zhMessages);
? ? ? ? locale(navigator.language);
? ? }
}
</script>
3. 修改樣式
修改metadata.base.json和metadata.additional.json中的配色方案,然后 運(yùn)行npm run?build-themes