|
@@ -42,6 +42,9 @@
|
|
<el-tab-pane lazy label="awe" name="awe">
|
|
<el-tab-pane lazy label="awe" name="awe">
|
|
<IconList :list="fontIconSheetsFilterList" :empty="emptyDescription" :prefix="state.fontIconPrefix" @get-icon="onColClick" />
|
|
<IconList :list="fontIconSheetsFilterList" :empty="emptyDescription" :prefix="state.fontIconPrefix" @get-icon="onColClick" />
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
|
+ <el-tab-pane lazy label="flag" name="flag">
|
|
|
|
+ <IconList :list="fontIconSheetsFilterList" :empty="emptyDescription" :prefix="state.fontIconPrefix" @get-icon="onColClick" />
|
|
|
|
+ </el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -116,6 +119,7 @@ const state = reactive({
|
|
ali: [],
|
|
ali: [],
|
|
ele: [],
|
|
ele: [],
|
|
awe: [],
|
|
awe: [],
|
|
|
|
+ flag: []
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
|
|
@@ -148,6 +152,7 @@ const fontIconTabNameList = () => {
|
|
if (state.fontIconTabActive === 'ali') iconList = state.fontIconList.ali;
|
|
if (state.fontIconTabActive === 'ali') iconList = state.fontIconList.ali;
|
|
else if (state.fontIconTabActive === 'ele') iconList = state.fontIconList.ele;
|
|
else if (state.fontIconTabActive === 'ele') iconList = state.fontIconList.ele;
|
|
else if (state.fontIconTabActive === 'awe') iconList = state.fontIconList.awe;
|
|
else if (state.fontIconTabActive === 'awe') iconList = state.fontIconList.awe;
|
|
|
|
+ else if (state.fontIconTabActive === 'flag') iconList = state.fontIconList.flag;
|
|
return iconList;
|
|
return iconList;
|
|
};
|
|
};
|
|
// 处理 icon 双向绑定数值回显
|
|
// 处理 icon 双向绑定数值回显
|
|
@@ -162,6 +167,7 @@ const initFontIconName = () => {
|
|
if (props.modelValue!.indexOf('iconfont') > -1) name = 'ali';
|
|
if (props.modelValue!.indexOf('iconfont') > -1) name = 'ali';
|
|
else if (props.modelValue!.indexOf('ele-') > -1) name = 'ele';
|
|
else if (props.modelValue!.indexOf('ele-') > -1) name = 'ele';
|
|
else if (props.modelValue!.indexOf('fa') > -1) name = 'awe';
|
|
else if (props.modelValue!.indexOf('fa') > -1) name = 'awe';
|
|
|
|
+ else if (props.modelValue!.indexOf('fi') > -1) name = 'flag';
|
|
// 初始化 tab 高亮回显
|
|
// 初始化 tab 高亮回显
|
|
state.fontIconTabActive = name;
|
|
state.fontIconTabActive = name;
|
|
return name;
|
|
return name;
|
|
@@ -186,6 +192,12 @@ const initFontIconData = async (name: string) => {
|
|
await initIconfont.awe().then((res: any) => {
|
|
await initIconfont.awe().then((res: any) => {
|
|
state.fontIconList.awe = res.map((i: string) => `fa ${i}`);
|
|
state.fontIconList.awe = res.map((i: string) => `fa ${i}`);
|
|
});
|
|
});
|
|
|
|
+ } else if (name === 'flag') {
|
|
|
|
+ // flag字体图标使用 `fi fi-xx`
|
|
|
|
+ if (state.fontIconList.awe.length > 0) return;
|
|
|
|
+ await initIconfont.flag().then((res: any) => {
|
|
|
|
+ state.fontIconList.flag = res.map((i: string) => `fi ${i}`);
|
|
|
|
+ });
|
|
}
|
|
}
|
|
// 初始化 input 的 placeholder
|
|
// 初始化 input 的 placeholder
|
|
// 参考(单项数据流):https://cn.vuejs.org/v2/guide/components-props.html?#%E5%8D%95%E5%90%91%E6%95%B0%E6%8D%AE%E6%B5%81
|
|
// 参考(单项数据流):https://cn.vuejs.org/v2/guide/components-props.html?#%E5%8D%95%E5%90%91%E6%95%B0%E6%8D%AE%E6%B5%81
|