@qxs-bns/components 0.0.56 → 0.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/es/node_modules/.pnpm/{@iconify_vue@5.0.0_vue@3.5.18_typescript@5.8.3_ → @iconify_vue@5.0.0_vue@3.5.18_typescript@5.9.2_}/node_modules/@iconify/vue/dist/iconify.mjs.map +1 -1
  2. package/es/package.json.mjs +1 -1
  3. package/es/src/data-chart/src/components/area.vue2.mjs +1 -1
  4. package/es/src/data-chart/src/components/area.vue2.mjs.map +1 -1
  5. package/es/src/data-chart/src/utils/config.mjs +1 -1
  6. package/es/src/data-chart/src/utils/config.mjs.map +1 -1
  7. package/es/src/data-chart/src/utils/mapData.mjs +1 -1
  8. package/es/src/data-chart/src/utils/mapData.mjs.map +1 -1
  9. package/es/src/icon/src/icon.vue.mjs +1 -1
  10. package/es/src/icon/src/icon.vue.mjs.map +1 -1
  11. package/es/src/image-upload/src/image-upload.vue.mjs +1 -1
  12. package/es/src/image-upload/src/image-upload.vue.mjs.map +1 -1
  13. package/lib/node_modules/.pnpm/{@iconify_vue@5.0.0_vue@3.5.18_typescript@5.8.3_ → @iconify_vue@5.0.0_vue@3.5.18_typescript@5.9.2_}/node_modules/@iconify/vue/dist/iconify.cjs.map +1 -1
  14. package/lib/package.json.cjs +1 -1
  15. package/lib/src/data-chart/src/components/area.vue2.cjs +1 -1
  16. package/lib/src/data-chart/src/components/area.vue2.cjs.map +1 -1
  17. package/lib/src/data-chart/src/utils/config.cjs +1 -1
  18. package/lib/src/data-chart/src/utils/config.cjs.map +1 -1
  19. package/lib/src/data-chart/src/utils/mapData.cjs +1 -1
  20. package/lib/src/data-chart/src/utils/mapData.cjs.map +1 -1
  21. package/lib/src/icon/src/icon.vue.cjs +1 -1
  22. package/lib/src/icon/src/icon.vue.cjs.map +1 -1
  23. package/lib/src/image-upload/src/image-upload.vue.cjs +1 -1
  24. package/lib/src/image-upload/src/image-upload.vue.cjs.map +1 -1
  25. package/package.json +1 -1
  26. package/theme-chalk/index.css +1 -1
  27. package/theme-chalk/src/icon.css +1 -1
  28. package/theme-chalk/src/icon.scss +13 -5
  29. package/types/src/data-chart/src/components/area.vue.d.ts.map +1 -1
  30. package/types/src/data-chart/src/components/card.vue.d.ts.map +1 -1
  31. package/types/src/data-chart/src/utils/config.d.ts.map +1 -1
  32. package/types/src/icon/src/icon.vue.d.ts +2 -1
  33. package/types/src/icon/src/icon.vue.d.ts.map +1 -1
  34. package/types/src/image-upload/src/image-upload.vue.d.ts.map +1 -1
  35. package/types/src/subject-action/src/subject-action.vue.d.ts.map +1 -1
  36. package/types/src/subject-list/src/components/subject-scale.vue.d.ts.map +1 -1
  37. package/types/src/subject-list/src/components/subject-single.vue.d.ts.map +1 -1
  38. package/types/src/subject-list/src/components/subject-text-fill.vue.d.ts.map +1 -1
  39. package/types/tsconfig.tsbuildinfo +1 -1
  40. /package/es/node_modules/.pnpm/{@iconify_vue@5.0.0_vue@3.5.18_typescript@5.8.3_ → @iconify_vue@5.0.0_vue@3.5.18_typescript@5.9.2_}/node_modules/@iconify/vue/dist/iconify.mjs +0 -0
  41. /package/lib/node_modules/.pnpm/{@iconify_vue@5.0.0_vue@3.5.18_typescript@5.8.3_ → @iconify_vue@5.0.0_vue@3.5.18_typescript@5.9.2_}/node_modules/@iconify/vue/dist/iconify.cjs +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"config.cjs","sources":["../../../../../../../packages/components/src/data-chart/src/utils/config.ts"],"sourcesContent":["import type { GeoJson, IconRow, IGroupByInfos, ISelectInfos } from './types'\nimport { merge } from 'lodash-es'\nimport * as echarts from 'echarts'\nimport { fetchMapData, getProvinceCode, getProvinceName, isProvinceCode, getProvinceMapData, getChinaMapData } from './mapData'\n\n/**\n * 禁用功能函数\n * 判断当前图表类型是否被禁用\n * 调用时机:渲染页面\n * @param {object} selectInfos 选择信息\n * @param {object} groupByInfos 分组信息\n * @param {Message[]|Message} data 数据\n * @returns Boolean 布尔值\n */\nexport const iconList: {\n data: IconRow[]\n get: (type: keyof IconRow, value: any) => IconRow\n} = {\n get: (type: keyof IconRow = 'showTypeName', value: any = 'table') => {\n return iconList.data.find(item => item[type].toString() === value || item[type] === value)!\n },\n data: [\n {\n showTypeName: 'table',\n label: '表格',\n coverImg: 'table.png',\n disabled: () => false,\n subTypeList: [],\n showType: 0,\n baseConfig: {},\n },\n {\n showTypeName: 'line',\n label: '折线图',\n coverImg: 'line-stack.png',\n showType: 1,\n subTypeList: [\n {\n value: 'line-simple',\n icon: 'line-smooth',\n tooltipContent: '折线图',\n },\n {\n value: 'area-basic',\n icon: 'chart-line-area',\n tooltipContent: '折线面积图',\n },\n ],\n baseConfig: {\n tooltip: {\n confine: false,\n trigger: 'axis',\n axisPointer: {\n type: 'line',\n },\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n },\n },\n legend: {\n type: 'scroll',\n top: '25px',\n },\n grid: {\n left: '0',\n bottom: '10px',\n containLabel: true,\n },\n xAxis: {\n type: 'category',\n boundaryGap: false,\n },\n yAxis: {\n type: 'value',\n },\n dataZoom: [\n {\n type: 'inside',\n },\n ],\n },\n disabled: (_: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n if (groupByInfosLenght >= 1 && groupByInfosLenght < 2) {\n return false\n }\n return true\n },\n },\n {\n showTypeName: 'bar',\n label: '柱状图',\n coverImg: 'bar-tick-align.png',\n showType: 2,\n baseConfig: {\n legend: {\n type: 'scroll',\n top: '25px',\n },\n tooltip: {\n confine: false,\n trigger: 'axis',\n axisPointer: {\n type: 'shadow',\n },\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n // myFull: { // 全屏\n // show: true,\n // title: '全屏',\n // icon: 'path://...',\n // }\n },\n },\n grid: {\n left: '0',\n bottom: '20px',\n containLabel: true,\n },\n xAxis: {\n axisLabel: {\n showMaxLabel: true,\n },\n axisTick: {\n alignWithLabel: true,\n },\n },\n yAxis: {},\n dataZoom: [\n {\n type: 'inside',\n },\n ],\n },\n subTypeList: [\n {\n value: 'bar-simple',\n icon: 'bar-simple',\n tooltipContent: '垂直条形图',\n },\n {\n value: 'bar-y-category',\n icon: 'bar-y-category',\n tooltipContent: '水平条形图',\n },\n ],\n disabled: (_: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n if (groupByInfosLenght >= 1) {\n return false\n }\n return true\n },\n },\n {\n showTypeName: 'pie',\n label: '饼图',\n coverImg: 'pie-simple.png',\n showType: 4,\n subTypeList: [\n {\n value: 'pie-simple',\n icon: 'pie-simple',\n tooltipContent: '饼图',\n },\n {\n value: 'pie-borderRadius',\n icon: 'pie-borderRadius',\n tooltipContent: '环形图',\n },\n ],\n baseConfig: {\n tooltip: {\n confine: true,\n formatter: '{a}<br>{b}: {c}({d}%)',\n trigger: 'item',\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n },\n },\n legend: {\n type: 'scroll',\n top: '25px',\n },\n },\n disabled: (selectInfos: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n const selectInfosLength = selectInfos?.length\n if (selectInfosLength <= 4 && groupByInfosLenght > 0 && groupByInfosLenght <= 1) {\n return false\n }\n return true\n },\n },\n {\n showTypeName: 'area',\n label: '地图',\n coverImg: 'area.png',\n showType: 5,\n subTypeList: [],\n baseConfig: {\n tooltip: {\n confine: true,\n trigger: 'item',\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n },\n },\n visualMap: {\n text: ['高', '低'],\n realtime: false,\n calculable: true,\n inRange: {\n color: ['lightskyblue', 'yellow', 'orangered'],\n },\n },\n },\n disabled: (_: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n const flag = groupByInfos?.some(({ colDesc }) => (colDesc.includes('省') || colDesc.includes('市')))\n if (flag && groupByInfosLenght > 0) {\n return false\n }\n return true\n },\n },\n {\n showTypeName: 'funnel',\n label: '漏斗图',\n coverImg: 'funnel.png',\n showType: 6,\n subTypeList: [],\n baseConfig: {\n tooltip: {\n confine: true,\n trigger: 'item',\n formatter: '{a} <br/>{b} : {c}',\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n },\n },\n legend: {\n type: 'scroll',\n top: 20,\n },\n },\n disabled: (selectInfos: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n const selectInfosLength = selectInfos?.length\n if (selectInfosLength <= 5 && groupByInfosLenght > 0 && groupByInfosLenght <= 1) {\n return false\n }\n return true\n },\n },\n\n // { label: 'scatter', value: 7 },\n {\n showTypeName: 'card',\n label: '卡片',\n coverImg: 'card.png',\n showType: 9,\n subTypeList: [],\n baseConfig: {},\n disabled: (selectInfos: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n const selectInfosLength = selectInfos?.length\n if (selectInfosLength > 0 && groupByInfosLenght <= 1) {\n return false\n }\n return true\n },\n },\n {\n showTypeName: 'radar',\n label: '雷达图',\n coverImg: 'radar.png',\n showType: 10,\n subTypeList: [],\n baseConfig: {\n legend: {\n type: 'scroll',\n orient: 'vertical',\n left: 'left',\n top: '25px',\n },\n tooltip: {\n confine: true,\n trigger: 'item',\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n },\n },\n radar: {\n // shape: 'circle',\n center: ['50%', '55%'],\n },\n },\n disabled: (selectInfos: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n if (groupByInfosLenght === 1 && selectInfos.length === 1) {\n return false\n }\n return true\n },\n },\n {\n showTypeName: 'scatter-simple',\n label: '散点图',\n coverImg: '',\n showType: 11,\n subTypeList: [],\n disabled: () => false,\n baseConfig: {\n grid: {\n left: '0',\n bottom: '10px',\n containLabel: true,\n },\n tooltip: {\n showDelay: 0,\n axisPointer: {\n show: true,\n type: 'cross',\n lineStyle: {\n type: 'dashed',\n width: 1,\n },\n },\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n },\n },\n legend: {\n type: 'scroll',\n top: '25px',\n },\n xAxis: {\n splitLine: {\n lineStyle: {\n type: 'dashed',\n },\n },\n },\n yAxis: {\n splitLine: {\n lineStyle: {\n type: 'dashed',\n },\n },\n },\n },\n },\n ],\n}\n\nexport function showTypeText(showType = 0): IconRow {\n const row = iconList.get('showType', showType)\n return row\n}\n\n// 修改默认配置\nexport function setDefaultChartOption(option: IconRow[], changeConfig: any) {\n const obj: {\n [key in IconRow['showTypeName']]: any\n } = {} as { [key in IconRow['showTypeName']]: any }\n option.forEach((item) => {\n obj[item.showTypeName] = merge(item.baseConfig, changeConfig)\n })\n return obj\n}\nexport const defaultChartOption = setDefaultChartOption(iconList.data, {\n backgroundColor: 'transparent',\n title: {\n textStyle: {\n fontSize: 14,\n lineHeight: 16,\n },\n },\n})\n// 获取地图数据(GeoJson)\n// 添加缓存对象\nconst geoJsonCache = new Map<string, GeoJson>()\n\n // 使用 ECharts 内置的中国地图数据\nconst getBuiltinChinaMap = (): GeoJson => {\n try {\n // 尝试获取 ECharts 内置的中国地图数据\n const chinaMap = echarts.getMap('china')\n if (chinaMap && chinaMap.geoJson) {\n return chinaMap.geoJson as GeoJson\n }\n }\n catch (error) {\n console.warn('Failed to get builtin China map:', error)\n }\n \n // 如果获取失败,返回空的地图数据\n return {\n type: 'FeatureCollection',\n features: [],\n } as GeoJson\n}\nexport function getGeoJsonData(options: any): Promise<GeoJson> {\n let { adcode } = options\n\n // 如果传入的是省份名称,转换为代码\n if (typeof adcode === 'string' && !adcode.match(/^\\d{6}$/) && adcode !== '中国' && adcode !== '100000') {\n adcode = getProvinceCode(adcode)\n }\n\n // 检查缓存中是否存在对应的 GeoJSON 数据\n if (geoJsonCache.has(adcode)) {\n const cachedGeoJson = geoJsonCache.get(adcode)\n if (cachedGeoJson) {\n return Promise.resolve(cachedGeoJson)\n }\n }\n\n // 使用免费的替代方案\n return new Promise(async (resolve) => {\n try {\n // 方案1: 优先使用 DataV 的真实地图数据\n if (adcode === '中国' || adcode === '100000') {\n try {\n const chinaData = await getChinaMapData()\n geoJsonCache.set(adcode, chinaData)\n resolve(chinaData)\n return\n }\n catch (error) {\n console.warn('Failed to fetch China map from DataV, using fallback:', error)\n }\n }\n\n // 方案2: 尝试从免费数据源获取省级地图数据\n if (isProvinceCode(adcode)) {\n try {\n // 尝试使用新的省级地图数据获取函数\n const geoJson = await getProvinceMapData(getProvinceName(adcode))\n if (geoJson && geoJson.features && geoJson.features.length > 0) {\n geoJsonCache.set(adcode, geoJson)\n resolve(geoJson)\n return\n }\n }\n catch (error) {\n console.warn('Failed to fetch province map data with new method, trying old method:', error)\n try {\n const geoJson = await fetchMapData(adcode)\n if (geoJson && geoJson.features && geoJson.features.length > 0) {\n geoJsonCache.set(adcode, geoJson)\n resolve(geoJson)\n return\n }\n }\n catch (secondError) {\n console.warn('Failed to fetch province map data with old method:', secondError)\n }\n }\n }\n\n // 方案3: 使用内置的中国地图数据作为备用\n const builtinMap = getBuiltinChinaMap()\n geoJsonCache.set(adcode, builtinMap)\n resolve(builtinMap)\n }\n catch (error) {\n console.error('All map data sources failed, using simple fallback:', error)\n const builtinMap = getBuiltinChinaMap()\n geoJsonCache.set(adcode, builtinMap)\n resolve(builtinMap)\n }\n })\n}\n"],"names":["iconList","get","type","arguments","length","undefined","value","data","find","item","toString","showTypeName","label","coverImg","disabled","subTypeList","showType","baseConfig","icon","tooltipContent","tooltip","confine","trigger","axisPointer","toolbox","show","showTitle","feature","saveAsImage","legend","top","grid","left","bottom","containLabel","xAxis","boundaryGap","yAxis","dataZoom","_","groupByInfos","groupByInfosLenght","axisLabel","showMaxLabel","axisTick","alignWithLabel","formatter","selectInfos","selectInfosLength","visualMap","text","realtime","calculable","inRange","color","flag","some","_ref","colDesc","includes","orient","radar","center","showDelay","lineStyle","width","splitLine","setDefaultChartOption","option","changeConfig","obj","forEach","merge","defaultChartOption","backgroundColor","title","textStyle","fontSize","lineHeight","geoJsonCache","Map","getBuiltinChinaMap","chinaMap","echarts","getMap","geoJson","error","console","warn","features","options","adcode","match","getProvinceCode","has","cachedGeoJson","Promise","resolve","async","chinaData","getChinaMapData","set","isProvinceCode","getProvinceMapData","getProvinceName","fetchMapData","secondError","builtinMap"],"mappings":"oWAcO,MAAMA,EAGT,CACFC,IAAK,WAAgE,IAA/DC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAsB,eAAgBG,yDAAa,QACvD,OAAON,EAASO,KAAKC,KAAKC,GAAQA,EAAKP,GAAMQ,aAAeJ,GAASG,EAAKP,KAAUI,EACtF,EACAC,KAAM,CACJ,CACEI,aAAc,QACdC,MAAO,KACPC,SAAU,YACVC,SAAUA,KAAM,EAChBC,YAAa,GACbC,SAAU,EACVC,WAAY,CAAA,GAEd,CACEN,aAAc,OACdC,MAAO,MACPC,SAAU,iBACVG,SAAU,EACVD,YAAa,CACX,CACET,MAAO,cACPY,KAAM,cACNC,eAAgB,OAElB,CACEb,MAAO,aACPY,KAAM,kBACNC,eAAgB,UAGpBF,WAAY,CACVG,QAAS,CACPC,SAAS,EACTC,QAAS,OACTC,YAAa,CACXrB,KAAM,SAGVsB,QAAS,CACPC,MAAM,EACNC,WAAW,EACXC,QAAS,CAGPC,YAAa,CAAA,IAGjBC,OAAQ,CACN3B,KAAM,SACN4B,IAAK,QAEPC,KAAM,CACJC,KAAM,IACNC,OAAQ,O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utils/config.ts"],"sourcesContent":["import type { GeoJson, IconRow, IGroupByInfos, ISelectInfos } from './types'\nimport { merge } from 'lodash-es'\nimport * as echarts from 'echarts'\nimport { getProvinceCode, isProvinceCode } from './mapData'\n\n/**\n * 禁用功能函数\n * 判断当前图表类型是否被禁用\n * 调用时机:渲染页面\n * @param {object} selectInfos 选择信息\n * @param {object} groupByInfos 分组信息\n * @param {Message[]|Message} data 数据\n * @returns Boolean 布尔值\n */\nexport const iconList: {\n data: IconRow[]\n get: (type: keyof IconRow, value: any) => IconRow\n} = {\n get: (type: keyof IconRow = 'showTypeName', value: any = 'table') => {\n return iconList.data.find(item => item[type].toString() === value || item[type] === value)!\n },\n data: [\n {\n showTypeName: 'table',\n label: '表格',\n coverImg: 'table.png',\n disabled: () => false,\n subTypeList: [],\n showType: 0,\n baseConfig: {},\n },\n {\n showTypeName: 'line',\n label: '折线图',\n coverImg: 'line-stack.png',\n showType: 1,\n subTypeList: [\n {\n value: 'line-simple',\n icon: 'line-smooth',\n tooltipContent: '折线图',\n },\n {\n value: 'area-basic',\n icon: 'chart-line-area',\n tooltipContent: '折线面积图',\n },\n ],\n baseConfig: {\n tooltip: {\n confine: false,\n trigger: 'axis',\n axisPointer: {\n type: 'line',\n },\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n },\n },\n legend: {\n type: 'scroll',\n top: '25px',\n },\n grid: {\n left: '0',\n bottom: '10px',\n containLabel: true,\n },\n xAxis: {\n type: 'category',\n boundaryGap: false,\n },\n yAxis: {\n type: 'value',\n },\n dataZoom: [\n {\n type: 'inside',\n },\n ],\n },\n disabled: (_: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n if (groupByInfosLenght >= 1 && groupByInfosLenght < 2) {\n return false\n }\n return true\n },\n },\n {\n showTypeName: 'bar',\n label: '柱状图',\n coverImg: 'bar-tick-align.png',\n showType: 2,\n baseConfig: {\n legend: {\n type: 'scroll',\n top: '25px',\n },\n tooltip: {\n confine: false,\n trigger: 'axis',\n axisPointer: {\n type: 'shadow',\n },\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n // myFull: { // 全屏\n // show: true,\n // title: '全屏',\n // icon: 'path://...',\n // }\n },\n },\n grid: {\n left: '0',\n bottom: '20px',\n containLabel: true,\n },\n xAxis: {\n axisLabel: {\n showMaxLabel: true,\n },\n axisTick: {\n alignWithLabel: true,\n },\n },\n yAxis: {},\n dataZoom: [\n {\n type: 'inside',\n },\n ],\n },\n subTypeList: [\n {\n value: 'bar-simple',\n icon: 'bar-simple',\n tooltipContent: '垂直条形图',\n },\n {\n value: 'bar-y-category',\n icon: 'bar-y-category',\n tooltipContent: '水平条形图',\n },\n ],\n disabled: (_: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n if (groupByInfosLenght >= 1) {\n return false\n }\n return true\n },\n },\n {\n showTypeName: 'pie',\n label: '饼图',\n coverImg: 'pie-simple.png',\n showType: 4,\n subTypeList: [\n {\n value: 'pie-simple',\n icon: 'pie-simple',\n tooltipContent: '饼图',\n },\n {\n value: 'pie-borderRadius',\n icon: 'pie-borderRadius',\n tooltipContent: '环形图',\n },\n ],\n baseConfig: {\n tooltip: {\n confine: true,\n formatter: '{a}<br>{b}: {c}({d}%)',\n trigger: 'item',\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n },\n },\n legend: {\n type: 'scroll',\n top: '25px',\n },\n },\n disabled: (selectInfos: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n const selectInfosLength = selectInfos?.length\n if (selectInfosLength <= 4 && groupByInfosLenght > 0 && groupByInfosLenght <= 1) {\n return false\n }\n return true\n },\n },\n {\n showTypeName: 'area',\n label: '地图',\n coverImg: 'area.png',\n showType: 5,\n subTypeList: [],\n baseConfig: {\n tooltip: {\n confine: true,\n trigger: 'item',\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n },\n },\n visualMap: {\n text: ['高', '低'],\n realtime: false,\n calculable: true,\n inRange: {\n color: ['#E8F4FD', '#B8D4F7', '#7BA4F0', '#4A7BE8', '#3562e1']\n },\n },\n },\n disabled: (_: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n const flag = groupByInfos?.some(({ colDesc }) => (colDesc.includes('省') || colDesc.includes('市')))\n if (flag && groupByInfosLenght > 0) {\n return false\n }\n return true\n },\n },\n {\n showTypeName: 'funnel',\n label: '漏斗图',\n coverImg: 'funnel.png',\n showType: 6,\n subTypeList: [],\n baseConfig: {\n tooltip: {\n confine: true,\n trigger: 'item',\n formatter: '{a} <br/>{b} : {c}',\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n },\n },\n legend: {\n type: 'scroll',\n top: 20,\n },\n },\n disabled: (selectInfos: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n const selectInfosLength = selectInfos?.length\n if (selectInfosLength <= 5 && groupByInfosLenght > 0 && groupByInfosLenght <= 1) {\n return false\n }\n return true\n },\n },\n\n // { label: 'scatter', value: 7 },\n {\n showTypeName: 'card',\n label: '卡片',\n coverImg: 'card.png',\n showType: 9,\n subTypeList: [],\n baseConfig: {},\n disabled: (selectInfos: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n const selectInfosLength = selectInfos?.length\n if (selectInfosLength > 0 && groupByInfosLenght <= 1) {\n return false\n }\n return true\n },\n },\n {\n showTypeName: 'radar',\n label: '雷达图',\n coverImg: 'radar.png',\n showType: 10,\n subTypeList: [],\n baseConfig: {\n legend: {\n type: 'scroll',\n orient: 'vertical',\n left: 'left',\n top: '25px',\n },\n tooltip: {\n confine: true,\n trigger: 'item',\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n },\n },\n radar: {\n // shape: 'circle',\n center: ['50%', '55%'],\n },\n },\n disabled: (selectInfos: ISelectInfos[], groupByInfos: IGroupByInfos[]) => {\n const groupByInfosLenght = groupByInfos?.length\n if (groupByInfosLenght === 1 && selectInfos.length === 1) {\n return false\n }\n return true\n },\n },\n {\n showTypeName: 'scatter-simple',\n label: '散点图',\n coverImg: '',\n showType: 11,\n subTypeList: [],\n disabled: () => false,\n baseConfig: {\n grid: {\n left: '0',\n bottom: '10px',\n containLabel: true,\n },\n tooltip: {\n showDelay: 0,\n axisPointer: {\n show: true,\n type: 'cross',\n lineStyle: {\n type: 'dashed',\n width: 1,\n },\n },\n },\n toolbox: {\n show: false,\n showTitle: false,\n feature: {\n // dataView: { readOnly: true },\n // restore: {},\n saveAsImage: {},\n },\n },\n legend: {\n type: 'scroll',\n top: '25px',\n },\n xAxis: {\n splitLine: {\n lineStyle: {\n type: 'dashed',\n },\n },\n },\n yAxis: {\n splitLine: {\n lineStyle: {\n type: 'dashed',\n },\n },\n },\n },\n },\n ],\n}\n\nexport function showTypeText(showType = 0): IconRow {\n const row = iconList.get('showType', showType)\n return row\n}\n\n// 修改默认配置\nexport function setDefaultChartOption(option: IconRow[], changeConfig: any) {\n const obj: {\n [key in IconRow['showTypeName']]: any\n } = {} as { [key in IconRow['showTypeName']]: any }\n option.forEach((item) => {\n obj[item.showTypeName] = merge(item.baseConfig, changeConfig)\n })\n return obj\n}\nexport const defaultChartOption = setDefaultChartOption(iconList.data, {\n backgroundColor: 'transparent',\n title: {\n textStyle: {\n fontSize: 14,\n lineHeight: 16,\n },\n },\n})\n// 获取地图数据(GeoJson)\n// 添加缓存对象\nconst geoJsonCache = new Map<string, GeoJson>()\n\n // 使用 ECharts 内置的中国地图数据\nconst getBuiltinChinaMap = (): GeoJson => {\n try {\n // 尝试获取 ECharts 内置的中国地图数据\n const chinaMap = echarts.getMap('china')\n if (chinaMap && chinaMap.geoJson) {\n return chinaMap.geoJson as GeoJson\n }\n }\n catch (error) {\n console.warn('Failed to get builtin China map:', error)\n }\n \n // 如果获取失败,返回空的地图数据\n return {\n type: 'FeatureCollection',\n features: [],\n } as GeoJson\n}\nexport function getGeoJsonData(options: any): Promise<GeoJson> {\n let { adcode } = options\n let baseUrl = 'https://cdnfile.yaomaitong.cn/ksh/lib/geo-data'\n\n // 如果传入的是省份名称,转换为代码\n if (typeof adcode === 'string' && !adcode.match(/^\\d{6}$/) && adcode !== '中国' && adcode !== '100000') {\n adcode = getProvinceCode(adcode)\n }\n\n // 检查缓存中是否存在对应的 GeoJSON 数据\n if (geoJsonCache.has(adcode)) {\n const cachedGeoJson = geoJsonCache.get(adcode)\n if (cachedGeoJson) {\n return Promise.resolve(cachedGeoJson)\n }\n }\n\n // 构建基础 URL\n return new Promise(async (resolve) => {\n try {\n // 方案1: 使用本地地图数据\n if (adcode === '中国' || adcode === '100000') {\n try {\n // 优先尝试本地中国地图数据\n const response = await fetch(`${baseUrl}/china.json`)\n if (response.ok) {\n const chinaData = await response.json()\n geoJsonCache.set(adcode, chinaData)\n resolve(chinaData)\n return\n }\n }\n catch (error) {\n console.warn('Failed to load local China map data:', error)\n }\n }\n\n // 方案2: 使用本地省级地图数据\n if (isProvinceCode(adcode)) {\n try {\n const response = await fetch(`${baseUrl}/${adcode}.json`)\n if (response.ok) {\n const geoJson = await response.json()\n if (geoJson && geoJson.features && geoJson.features.length > 0) {\n geoJsonCache.set(adcode, geoJson)\n resolve(geoJson)\n return\n }\n }\n }\n catch (error) {\n console.warn('Failed to load local province map data:', error)\n }\n }\n\n // 方案3: 使用内置的中国地图数据作为备用\n const builtinMap = getBuiltinChinaMap()\n geoJsonCache.set(adcode, builtinMap)\n resolve(builtinMap)\n }\n catch (error) {\n console.error('All map data sources failed, using simple fallback:', error)\n const builtinMap = getBuiltinChinaMap()\n geoJsonCache.set(adcode, builtinMap)\n resolve(builtinMap)\n }\n })\n}\n"],"names":["iconList","get","type","arguments","length","undefined","value","data","find","item","toString","showTypeName","label","coverImg","disabled","subTypeList","showType","baseConfig","icon","tooltipContent","tooltip","confine","trigger","axisPointer","toolbox","show","showTitle","feature","saveAsImage","legend","top","grid","left","bottom","containLabel","xAxis","boundaryGap","yAxis","dataZoom","_","groupByInfos","groupByInfosLenght","axisLabel","showMaxLabel","axisTick","alignWithLabel","formatter","selectInfos","selectInfosLength","visualMap","text","realtime","calculable","inRange","color","flag","some","_ref","colDesc","includes","orient","radar","center","showDelay","lineStyle","width","splitLine","setDefaultChartOption","option","changeConfig","obj","forEach","merge","defaultChartOption","backgroundColor","title","textStyle","fontSize","lineHeight","geoJsonCache","Map","getBuiltinChinaMap","chinaMap","echarts","getMap","geoJson","error","console","warn","features","options","adcode","baseUrl","match","getProvinceCode","has","cachedGeoJson","Promise","resolve","async","response","fetch","ok","chinaData","json","set","isProvinceCode","builtinMap"],"mappings":"oWAcO,MAAMA,EAGT,CACFC,IAAK,WAAgE,IAA/DC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAsB,eAAgBG,yDAAa,QACvD,OAAON,EAASO,KAAKC,KAAKC,GAAQA,EAAKP,GAAMQ,aAAeJ,GAASG,EAAKP,KAAUI,EACtF,EACAC,KAAM,CACJ,CACEI,aAAc,QACdC,MAAO,KACPC,SAAU,YACVC,SAAUA,KAAM,EAChBC,YAAa,GACbC,SAAU,EACVC,WAAY,CAAA,GAEd,CACEN,aAAc,OACdC,MAAO,MACPC,SAAU,iBACVG,SAAU,EACVD,YAAa,CACX,CACET,MAAO,cACPY,KAAM,cACNC,eAAgB,OAElB,CACEb,MAAO,aACPY,KAAM,kBACNC,eAAgB,UAGpBF,WAAY,CACVG,QAAS,CACPC,SAAS,EACTC,QAAS,OACTC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AAvB3F,yDAAW,EAEtC,OADYhB,EAASC,IAAI,WAAYe,EAEvC"}
@@ -1,2 +1,2 @@
1
- "use strict";const t={PROVINCE:{TIANDITU:()=>"https://api.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=你的天地图token",DATAV:t=>`https://geo.datav.aliyun.com/areas_v3/bound/${t}_full.json`},TIANDITU_ADMIN:{BOUNDARY:t=>`https://api.tianditu.gov.cn/administrative?postStr={"searchWord":"${t}","searchType":"11","needSubInfo":true,"needAll":true,"needPolygon":true,"needPre":true}&type=query&tk=你的天地图token`}};const e={"北京市":"110000","天津市":"120000","河北省":"130000","山西省":"140000","内蒙古自治区":"150000","辽宁省":"210000","吉林省":"220000","黑龙江省":"230000","上海市":"310000","江苏省":"320000","浙江省":"330000","安徽省":"340000","福建省":"350000","江西省":"360000","山东省":"370000","河南省":"410000","湖北省":"420000","湖南省":"430000","广东省":"440000","广西壮族自治区":"450000","海南省":"460000","重庆市":"500000","四川省":"510000","贵州省":"520000","云南省":"530000","西藏自治区":"540000","陕西省":"610000","甘肃省":"620000","青海省":"630000","宁夏回族自治区":"640000","新疆维吾尔自治区":"650000","台湾省":"710000","香港特别行政区":"810000","澳门特别行政区":"820000"},o=Object.fromEntries(Object.entries(e).map(t=>{let[e,o]=t;return[o,e]}));function r(t){return e[t]||"100000"}const a={TOKEN:"你的天地图token",BASE_URL:"https://api.tianditu.gov.cn"};exports.FREE_MAP_SOURCES=t,exports.PROVINCE_CODES=e,exports.PROVINCE_NAMES=o,exports.TIANDITU_CONFIG=a,exports.fetchMapData=async function(e){try{const o=t.PROVINCE.DATAV(e);console.log("Fetching province map data from:",o);const r=await fetch(o);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const a=await r.json();return console.log("Successfully fetched province map data for:",e,a),a}catch(t){throw console.error("Failed to fetch map data for adcode:",e,t),t}},exports.fetchTiandituBoundary=async function(e){try{const o=t.TIANDITU_ADMIN.BOUNDARY(e).replace("你的天地图token",a.TOKEN),r=await fetch(o);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return await r.json()}catch(t){throw console.error("Failed to fetch Tianditu boundary data:",t),t}},exports.getChinaMapData=async function(){try{const t=await fetch("https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json");if(t.ok)return await t.json()}catch(t){console.warn("Failed to fetch China map from DataV:",t)}return{type:"FeatureCollection",features:[{type:"Feature",properties:{name:"中国",adcode:"100000"},geometry:{type:"Polygon",coordinates:[[[73.66,35.42],[78.91,35.42],[81.33,36.08],[85.29,36.08],[88.02,35.42],[90.16,35.42],[92.13,34.76],[94.81,34.76],[97.06,33.44],[99.43,32.78],[101.06,31.46],[102.73,30.14],[104.4,28.82],[106.07,27.5],[107.74,26.18],[109.41,24.86],[111.08,23.54],[112.75,22.22],[114.42,20.9],[116.09,19.58],[117.76,18.26],[119.43,16.94],[121.1,15.62],[122.77,14.3],[124.44,12.98],[126.11,11.66],[127.78,10.34],[129.45,9.02],[131.12,7.7],[132.79,6.38],[134.46,5.06],[135.05,4.4],[135.05,5.06],[135.05,6.38],[135.05,7.7],[135.05,9.02],[135.05,10.34],[135.05,11.66],[135.05,12.98],[135.05,14.3],[135.05,15.62],[135.05,16.94],[135.05,18.26],[135.05,19.58],[135.05,20.9],[135.05,22.22],[135.05,23.54],[135.05,24.86],[135.05,26.18],[135.05,27.5],[135.05,28.82],[135.05,30.14],[135.05,31.46],[135.05,32.78],[135.05,34.1],[135.05,35.42],[134.46,36.08],[133.79,36.74],[133.12,37.4],[132.45,38.06],[131.78,38.72],[131.11,39.38],[130.44,40.04],[129.77,40.7],[129.1,41.36],[128.43,42.02],[127.76,42.68],[127.09,43.34],[126.42,44],[125.75,44.66],[125.08,45.32],[124.41,45.98],[123.74,46.64],[123.07,47.3],[122.4,47.96],[121.73,48.62],[121.06,49.28],[120.39,49.94],[119.72,50.6],[119.05,51.26],[118.38,51.92],[117.71,52.58],[117.04,53.24],[116.37,53.9],[115.7,54.56],[115.03,55.22],[114.36,55.88],[113.69,56.54],[113.02,57.2],[112.35,57.86],[111.68,58.52],[111.01,59.18],[110.34,59.84],[109.67,60.5],[109,61.16],[108.33,61.82],[107.66,62.48],[106.99,63.14],[106.32,63.8],[105.65,64.46],[104.98,65.12],[104.31,65.78],[103.64,66.44],[102.97,67.1],[102.3,67.76],[101.63,68.42],[100.96,69.08],[100.29,69.74],[99.62,70.4],[98.95,71.06],[98.28,71.72],[97.61,72.38],[96.94,73.04],[96.27,73.7],[95.6,74.36],[94.93,75.02],[94.26,75.68],[93.59,76.34],[92.92,77],[92.25,77.66],[91.58,78.32],[90.91,78.98],[90.24,79.64],[89.57,80.3],[88.9,80.96],[88.23,81.62],[87.56,82.28],[86.89,82.94],[86.22,83.6],[85.55,84.26],[84.88,84.92],[84.21,85.58],[83.54,86.24],[82.87,86.9],[82.2,87.56],[81.53,88.22],[80.86,88.88],[80.19,89.54],[79.52,90.2],[78.85,90.86],[78.18,91.52],[77.51,92.18],[76.84,92.84],[76.17,93.5],[75.5,94.16],[74.83,94.82],[74.16,95.48],[73.66,96.14],[73.66,95.48],[73.66,94.82],[73.66,94.16],[73.66,93.5],[73.66,92.84],[73.66,92.18],[73.66,91.52],[73.66,90.86],[73.66,90.2],[73.66,89.54],[73.66,88.88],[73.66,88.22],[73.66,87.56],[73.66,86.9],[73.66,86.24],[73.66,85.58],[73.66,84.92],[73.66,84.26],[73.66,83.6],[73.66,82.94],[73.66,82.28],[73.66,81.62],[73.66,80.96],[73.66,80.3],[73.66,79.64],[73.66,78.98],[73.66,78.32],[73.66,77.66],[73.66,77],[73.66,76.34],[73.66,75.68],[73.66,75.02],[73.66,74.36],[73.66,73.7],[73.66,73.04],[73.66,72.38],[73.66,71.72],[73.66,71.06],[73.66,70.4],[73.66,69.74],[73.66,69.08],[73.66,68.42],[73.66,67.76],[73.66,67.1],[73.66,66.44],[73.66,65.78],[73.66,65.12],[73.66,64.46],[73.66,63.8],[73.66,63.14],[73.66,62.48],[73.66,61.82],[73.66,61.16],[73.66,60.5],[73.66,59.84],[73.66,59.18],[73.66,58.52],[73.66,57.86],[73.66,57.2],[73.66,56.54],[73.66,55.88],[73.66,55.22],[73.66,54.56],[73.66,53.9],[73.66,53.24],[73.66,52.58],[73.66,51.92],[73.66,51.26],[73.66,50.6],[73.66,49.94],[73.66,49.28],[73.66,48.62],[73.66,47.96],[73.66,47.3],[73.66,46.64],[73.66,45.98],[73.66,45.32],[73.66,44.66],[73.66,44],[73.66,43.34],[73.66,42.68],[73.66,42.02],[73.66,41.36],[73.66,40.7],[73.66,40.04],[73.66,39.38],[73.66,38.72],[73.66,38.06],[73.66,37.4],[73.66,36.74],[73.66,36.08],[73.66,35.42]]]}}]}},exports.getProvinceCode=r,exports.getProvinceMapData=async function(t){const e=r(t);try{const t=`https://geo.datav.aliyun.com/areas_v3/bound/${e}_full.json`,o=await fetch(t);if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return await o.json()}catch(e){throw console.error("Failed to fetch province map data for:",t,e),e}},exports.getProvinceName=function(t){return o[t]||"中国"},exports.isProvinceCode=function(t){return/^\d{6}$/.test(t)&&"100000"!==t};
1
+ "use strict";const e={"北京市":"110000","天津市":"120000","河北省":"130000","山西省":"140000","内蒙古自治区":"150000","辽宁省":"210000","吉林省":"220000","黑龙江省":"230000","上海市":"310000","江苏省":"320000","浙江省":"330000","安徽省":"340000","福建省":"350000","江西省":"360000","山东省":"370000","河南省":"410000","湖北省":"420000","湖南省":"430000","广东省":"440000","广西壮族自治区":"450000","海南省":"460000","重庆市":"500000","四川省":"510000","贵州省":"520000","云南省":"530000","西藏自治区":"540000","陕西省":"610000","甘肃省":"620000","青海省":"630000","宁夏回族自治区":"640000","新疆维吾尔自治区":"650000","台湾省":"710000","香港特别行政区":"810000","澳门特别行政区":"820000"};Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[r,t]})),exports.PROVINCE_CODES=e,exports.getProvinceCode=function(t){return e[t]||"100000"},exports.isProvinceCode=function(e){return/^\d{6}$/.test(e)&&"100000"!==e};
2
2
  //# sourceMappingURL=mapData.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mapData.cjs","sources":["../../../../../../../packages/components/src/data-chart/src/utils/mapData.ts"],"sourcesContent":["// 免费的地图数据源\nexport const FREE_MAP_SOURCES = {\n // 省级地图数据源\n PROVINCE: {\n // 使用天地图省级数据\n TIANDITU: () => `https://api.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=你的天地图token`,\n // 使用 DataV 的省级数据\n DATAV: (adcode: string) => `https://geo.datav.aliyun.com/areas_v3/bound/${adcode}_full.json`,\n },\n // 天地图行政区划数据\n TIANDITU_ADMIN: {\n // 获取行政区划边界数据\n BOUNDARY: (adcode: string) => `https://api.tianditu.gov.cn/administrative?postStr={\"searchWord\":\"${adcode}\",\"searchType\":\"11\",\"needSubInfo\":true,\"needAll\":true,\"needPolygon\":true,\"needPre\":true}&type=query&tk=你的天地图token`,\n },\n}\n\n// 中国地图数据 - 使用真实的省级边界数据\nexport const CHINA_MAP_DATA = {\n type: 'FeatureCollection',\n features: [\n // 这里应该包含所有省份的边界数据\n // 由于数据量很大,建议使用外部数据源\n ]\n}\n\n// 获取中国地图数据的函数\nexport async function getChinaMapData(): Promise<any> {\n try {\n // 优先使用 DataV 的中国地图数据\n const response = await fetch('https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json')\n if (response.ok) {\n return await response.json()\n }\n }\n catch (error) {\n console.warn('Failed to fetch China map from DataV:', error)\n }\n\n // 备用方案:使用简化的地图数据\n return {\n type: 'FeatureCollection',\n features: [\n {\n type: 'Feature',\n properties: {\n name: '中国',\n adcode: '100000',\n },\n geometry: {\n type: 'Polygon',\n coordinates: [[\n [73.66, 35.42], [78.91, 35.42], [81.33, 36.08], [85.29, 36.08], \n [88.02, 35.42], [90.16, 35.42], [92.13, 34.76], [94.81, 34.76], \n [97.06, 33.44], [99.43, 32.78], [101.06, 31.46], [102.73, 30.14], \n [104.40, 28.82], [106.07, 27.50], [107.74, 26.18], [109.41, 24.86], \n [111.08, 23.54], [112.75, 22.22], [114.42, 20.90], [116.09, 19.58], \n [117.76, 18.26], [119.43, 16.94], [121.10, 15.62], [122.77, 14.30], \n [124.44, 12.98], [126.11, 11.66], [127.78, 10.34], [129.45, 9.02], \n [131.12, 7.70], [132.79, 6.38], [134.46, 5.06], [135.05, 4.40], \n [135.05, 5.06], [135.05, 6.38], [135.05, 7.70], [135.05, 9.02], \n [135.05, 10.34], [135.05, 11.66], [135.05, 12.98], [135.05, 14.30], \n [135.05, 15.62], [135.05, 16.94], [135.05, 18.26], [135.05, 19.58], \n [135.05, 20.90], [135.05, 22.22], [135.05, 23.54], [135.05, 24.86], \n [135.05, 26.18], [135.05, 27.50], [135.05, 28.82], [135.05, 30.14], \n [135.05, 31.46], [135.05, 32.78], [135.05, 34.10], [135.05, 35.42], \n [134.46, 36.08], [133.79, 36.74], [133.12, 37.40], [132.45, 38.06], \n [131.78, 38.72], [131.11, 39.38], [130.44, 40.04], [129.77, 40.70], \n [129.10, 41.36], [128.43, 42.02], [127.76, 42.68], [127.09, 43.34], \n [126.42, 44.00], [125.75, 44.66], [125.08, 45.32], [124.41, 45.98], \n [123.74, 46.64], [123.07, 47.30], [122.40, 47.96], [121.73, 48.62], \n [121.06, 49.28], [120.39, 49.94], [119.72, 50.60], [119.05, 51.26], \n [118.38, 51.92], [117.71, 52.58], [117.04, 53.24], [116.37, 53.90], \n [115.70, 54.56], [115.03, 55.22], [114.36, 55.88], [113.69, 56.54], \n [113.02, 57.20], [112.35, 57.86], [111.68, 58.52], [111.01, 59.18], \n [110.34, 59.84], [109.67, 60.50], [109.00, 61.16], [108.33, 61.82], \n [107.66, 62.48], [106.99, 63.14], [106.32, 63.80], [105.65, 64.46], \n [104.98, 65.12], [104.31, 65.78], [103.64, 66.44], [102.97, 67.10], \n [102.30, 67.76], [101.63, 68.42], [100.96, 69.08], [100.29, 69.74], \n [99.62, 70.40], [98.95, 71.06], [98.28, 71.72], [97.61, 72.38], \n [96.94, 73.04], [96.27, 73.70], [95.60, 74.36], [94.93, 75.02], \n [94.26, 75.68], [93.59, 76.34], [92.92, 77.00], [92.25, 77.66], \n [91.58, 78.32], [90.91, 78.98], [90.24, 79.64], [89.57, 80.30], \n [88.90, 80.96], [88.23, 81.62], [87.56, 82.28], [86.89, 82.94], \n [86.22, 83.60], [85.55, 84.26], [84.88, 84.92], [84.21, 85.58], \n [83.54, 86.24], [82.87, 86.90], [82.20, 87.56], [81.53, 88.22], \n [80.86, 88.88], [80.19, 89.54], [79.52, 90.20], [78.85, 90.86], \n [78.18, 91.52], [77.51, 92.18], [76.84, 92.84], [76.17, 93.50], \n [75.50, 94.16], [74.83, 94.82], [74.16, 95.48], [73.66, 96.14], \n [73.66, 95.48], [73.66, 94.82], [73.66, 94.16], [73.66, 93.50], \n [73.66, 92.84], [73.66, 92.18], [73.66, 91.52], [73.66, 90.86], \n [73.66, 90.20], [73.66, 89.54], [73.66, 88.88], [73.66, 88.22], \n [73.66, 87.56], [73.66, 86.90], [73.66, 86.24], [73.66, 85.58], \n [73.66, 84.92], [73.66, 84.26], [73.66, 83.60], [73.66, 82.94], \n [73.66, 82.28], [73.66, 81.62], [73.66, 80.96], [73.66, 80.30], \n [73.66, 79.64], [73.66, 78.98], [73.66, 78.32], [73.66, 77.66], \n [73.66, 77.00], [73.66, 76.34], [73.66, 75.68], [73.66, 75.02], \n [73.66, 74.36], [73.66, 73.70], [73.66, 73.04], [73.66, 72.38], \n [73.66, 71.72], [73.66, 71.06], [73.66, 70.40], [73.66, 69.74], \n [73.66, 69.08], [73.66, 68.42], [73.66, 67.76], [73.66, 67.10], \n [73.66, 66.44], [73.66, 65.78], [73.66, 65.12], [73.66, 64.46], \n [73.66, 63.80], [73.66, 63.14], [73.66, 62.48], [73.66, 61.82], \n [73.66, 61.16], [73.66, 60.50], [73.66, 59.84], [73.66, 59.18], \n [73.66, 58.52], [73.66, 57.86], [73.66, 57.20], [73.66, 56.54], \n [73.66, 55.88], [73.66, 55.22], [73.66, 54.56], [73.66, 53.90], \n [73.66, 53.24], [73.66, 52.58], [73.66, 51.92], [73.66, 51.26], \n [73.66, 50.60], [73.66, 49.94], [73.66, 49.28], [73.66, 48.62], \n [73.66, 47.96], [73.66, 47.30], [73.66, 46.64], [73.66, 45.98], \n [73.66, 45.32], [73.66, 44.66], [73.66, 44.00], [73.66, 43.34], \n [73.66, 42.68], [73.66, 42.02], [73.66, 41.36], [73.66, 40.70], \n [73.66, 40.04], [73.66, 39.38], [73.66, 38.72], [73.66, 38.06], \n [73.66, 37.40], [73.66, 36.74], [73.66, 36.08], [73.66, 35.42]\n ]],\n },\n },\n ],\n }\n}\n\n\n\n// 省级行政区代码映射\nexport const PROVINCE_CODES = {\n '北京市': '110000',\n '天津市': '120000',\n '河北省': '130000',\n '山西省': '140000',\n '内蒙古自治区': '150000',\n '辽宁省': '210000',\n '吉林省': '220000',\n '黑龙江省': '230000',\n '上海市': '310000',\n '江苏省': '320000',\n '浙江省': '330000',\n '安徽省': '340000',\n '福建省': '350000',\n '江西省': '360000',\n '山东省': '370000',\n '河南省': '410000',\n '湖北省': '420000',\n '湖南省': '430000',\n '广东省': '440000',\n '广西壮族自治区': '450000',\n '海南省': '460000',\n '重庆市': '500000',\n '四川省': '510000',\n '贵州省': '520000',\n '云南省': '530000',\n '西藏自治区': '540000',\n '陕西省': '610000',\n '甘肃省': '620000',\n '青海省': '630000',\n '宁夏回族自治区': '640000',\n '新疆维吾尔自治区': '650000',\n '台湾省': '710000',\n '香港特别行政区': '810000',\n '澳门特别行政区': '820000',\n}\n\n// 省级名称映射(反向查找)\nexport const PROVINCE_NAMES = Object.fromEntries(\n Object.entries(PROVINCE_CODES).map(([name, code]) => [code, name])\n)\n\n// 获取省级代码\nexport function getProvinceCode(provinceName: string): string {\n return PROVINCE_CODES[provinceName as keyof typeof PROVINCE_CODES] || '100000'\n}\n\n// 获取省级名称\nexport function getProvinceName(provinceCode: string): string {\n return PROVINCE_NAMES[provinceCode] || '中国'\n}\n\n// 判断是否为省级代码\nexport function isProvinceCode(code: string): boolean {\n return /^\\d{6}$/.test(code) && code !== '100000'\n}\n\n// 获取省级地图数据\nexport async function getProvinceMapData(provinceName: string): Promise<any> {\n const provinceCode = getProvinceCode(provinceName)\n \n try {\n const url = `https://geo.datav.aliyun.com/areas_v3/bound/${provinceCode}_full.json`\n \n const response = await fetch(url)\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`)\n }\n \n const data = await response.json()\n return data\n }\n catch (error) {\n console.error('Failed to fetch province map data for:', provinceName, error)\n throw error\n }\n}\n\n// 天地图配置\nexport const TIANDITU_CONFIG = {\n // 天地图 token(需要申请)\n TOKEN: '你的天地图token', // 请替换为您的天地图 token\n // 天地图 API 基础 URL\n BASE_URL: 'https://api.tianditu.gov.cn',\n}\n\n// 获取天地图行政区划数据\nexport async function fetchTiandituBoundary(adcode: string): Promise<any> {\n try {\n const url = FREE_MAP_SOURCES.TIANDITU_ADMIN.BOUNDARY(adcode).replace('你的天地图token', TIANDITU_CONFIG.TOKEN)\n const response = await fetch(url)\n \n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`)\n }\n \n const data = await response.json()\n return data\n }\n catch (error) {\n console.error('Failed to fetch Tianditu boundary data:', error)\n throw error\n }\n}\n\n// 获取地图数据的函数\nexport async function fetchMapData(adcode: string): Promise<any> {\n try {\n // 优先尝试从天地图获取数据\n if (TIANDITU_CONFIG.TOKEN !== '你的天地图token') {\n try {\n const tiandituData = await fetchTiandituBoundary(adcode)\n if (tiandituData && tiandituData.data && tiandituData.data.length > 0) {\n // 转换天地图数据为 GeoJSON 格式\n return convertTiandituToGeoJson(tiandituData)\n }\n }\n catch (error) {\n console.warn('Failed to fetch from Tianditu, trying DataV:', error)\n }\n }\n\n // 备用方案:从 DataV 获取数据\n const url = FREE_MAP_SOURCES.PROVINCE.DATAV(adcode)\n console.log('Fetching province map data from:', url)\n const response = await fetch(url)\n \n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`)\n }\n \n const data = await response.json()\n console.log('Successfully fetched province map data for:', adcode, data)\n return data\n }\n catch (error) {\n console.error('Failed to fetch map data for adcode:', adcode, error)\n throw error\n }\n}\n\n// 转换天地图数据为 GeoJSON 格式\nfunction convertTiandituToGeoJson(tiandituData: any): any {\n const features = tiandituData.data.map((item: any) => ({\n type: 'Feature',\n properties: {\n name: item.name,\n adcode: item.adcode,\n level: item.level,\n },\n geometry: {\n type: 'Polygon',\n coordinates: item.polygon ? [item.polygon] : [],\n },\n }))\n\n return {\n type: 'FeatureCollection',\n features,\n }\n} "],"names":["FREE_MAP_SOURCES","PROVINCE","TIANDITU","DATAV","adcode","TIANDITU_ADMIN","BOUNDARY","PROVINCE_CODES","PROVINCE_NAMES","Object","fromEntries","entries","map","_ref","name","code","getProvinceCode","provinceName","TIANDITU_CONFIG","TOKEN","BASE_URL","async","url","console","log","response","fetch","ok","Error","status","data","json","error","replace","warn","type","features","properties","geometry","coordinates","provinceCode","test"],"mappings":"aACO,MAAMA,EAAmB,CAE9BC,SAAU,CAERC,SAAUA,IAAM,8LAEhBC,MAAQC,GAAmB,+CAA+CA,eAG5EC,eAAgB,CAEdC,SAAWF,GAAmB,qEAAqEA,uHA6GhG,MAAMG,EAAiB,CAC5B,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,SAAU,SACV,MAAO,SACP,MAAO,SACP,OAAQ,SACR,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,UAAW,SACX,MAAO,SACP,MAAO,SACP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AM,yCAA0Cf,EAAce,GAChEA,CACR,CACF,0BA5BO,SAAyBQ,GAC9B,OAAOhC,EAAegC,IAAiB,IACzC,yBAGO,SAAwBzB,GAC7B,MAAO,UAAU0B,KAAK1B,IAAkB,WAATA,CACjC"}
1
+ {"version":3,"file":"mapData.cjs","sources":["../../../../../../../packages/components/src/data-chart/src/utils/mapData.ts"],"sourcesContent":["// 免费的地图数据源\nexport const FREE_MAP_SOURCES = {\n // 省级地图数据源\n PROVINCE: {\n // 使用天地图省级数据\n TIANDITU: () => `https://api.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=你的天地图token`,\n // 使用 DataV 的省级数据\n DATAV: (adcode: string) => `https://geo.datav.aliyun.com/areas_v3/bound/${adcode}_full.json`,\n },\n // 天地图行政区划数据\n TIANDITU_ADMIN: {\n // 获取行政区划边界数据\n BOUNDARY: (adcode: string) => `https://api.tianditu.gov.cn/administrative?postStr={\"searchWord\":\"${adcode}\",\"searchType\":\"11\",\"needSubInfo\":true,\"needAll\":true,\"needPolygon\":true,\"needPre\":true}&type=query&tk=你的天地图token`,\n },\n}\n\n// 中国地图数据 - 使用真实的省级边界数据\nexport const CHINA_MAP_DATA = {\n type: 'FeatureCollection',\n features: [\n // 这里应该包含所有省份的边界数据\n // 由于数据量很大,建议使用外部数据源\n ]\n}\n\n// 获取中国地图数据的函数\nexport async function getChinaMapData(): Promise<any> {\n try {\n // 优先使用 DataV 的中国地图数据\n const response = await fetch('https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json')\n if (response.ok) {\n return await response.json()\n }\n }\n catch (error) {\n console.warn('Failed to fetch China map from DataV:', error)\n }\n\n // 备用方案:使用简化的地图数据\n return {\n type: 'FeatureCollection',\n features: [\n {\n type: 'Feature',\n properties: {\n name: '中国',\n adcode: '100000',\n },\n geometry: {\n type: 'Polygon',\n coordinates: [[\n [73.66, 35.42], [78.91, 35.42], [81.33, 36.08], [85.29, 36.08], \n [88.02, 35.42], [90.16, 35.42], [92.13, 34.76], [94.81, 34.76], \n [97.06, 33.44], [99.43, 32.78], [101.06, 31.46], [102.73, 30.14], \n [104.40, 28.82], [106.07, 27.50], [107.74, 26.18], [109.41, 24.86], \n [111.08, 23.54], [112.75, 22.22], [114.42, 20.90], [116.09, 19.58], \n [117.76, 18.26], [119.43, 16.94], [121.10, 15.62], [122.77, 14.30], \n [124.44, 12.98], [126.11, 11.66], [127.78, 10.34], [129.45, 9.02], \n [131.12, 7.70], [132.79, 6.38], [134.46, 5.06], [135.05, 4.40], \n [135.05, 5.06], [135.05, 6.38], [135.05, 7.70], [135.05, 9.02], \n [135.05, 10.34], [135.05, 11.66], [135.05, 12.98], [135.05, 14.30], \n [135.05, 15.62], [135.05, 16.94], [135.05, 18.26], [135.05, 19.58], \n [135.05, 20.90], [135.05, 22.22], [135.05, 23.54], [135.05, 24.86], \n [135.05, 26.18], [135.05, 27.50], [135.05, 28.82], [135.05, 30.14], \n [135.05, 31.46], [135.05, 32.78], [135.05, 34.10], [135.05, 35.42], \n [134.46, 36.08], [133.79, 36.74], [133.12, 37.40], [132.45, 38.06], \n [131.78, 38.72], [131.11, 39.38], [130.44, 40.04], [129.77, 40.70], \n [129.10, 41.36], [128.43, 42.02], [127.76, 42.68], [127.09, 43.34], \n [126.42, 44.00], [125.75, 44.66], [125.08, 45.32], [124.41, 45.98], \n [123.74, 46.64], [123.07, 47.30], [122.40, 47.96], [121.73, 48.62], \n [121.06, 49.28], [120.39, 49.94], [119.72, 50.60], [119.05, 51.26], \n [118.38, 51.92], [117.71, 52.58], [117.04, 53.24], [116.37, 53.90], \n [115.70, 54.56], [115.03, 55.22], [114.36, 55.88], [113.69, 56.54], \n [113.02, 57.20], [112.35, 57.86], [111.68, 58.52], [111.01, 59.18], \n [110.34, 59.84], [109.67, 60.50], [109.00, 61.16], [108.33, 61.82], \n [107.66, 62.48], [106.99, 63.14], [106.32, 63.80], [105.65, 64.46], \n [104.98, 65.12], [104.31, 65.78], [103.64, 66.44], [102.97, 67.10], \n [102.30, 67.76], [101.63, 68.42], [100.96, 69.08], [100.29, 69.74], \n [99.62, 70.40], [98.95, 71.06], [98.28, 71.72], [97.61, 72.38], \n [96.94, 73.04], [96.27, 73.70], [95.60, 74.36], [94.93, 75.02], \n [94.26, 75.68], [93.59, 76.34], [92.92, 77.00], [92.25, 77.66], \n [91.58, 78.32], [90.91, 78.98], [90.24, 79.64], [89.57, 80.30], \n [88.90, 80.96], [88.23, 81.62], [87.56, 82.28], [86.89, 82.94], \n [86.22, 83.60], [85.55, 84.26], [84.88, 84.92], [84.21, 85.58], \n [83.54, 86.24], [82.87, 86.90], [82.20, 87.56], [81.53, 88.22], \n [80.86, 88.88], [80.19, 89.54], [79.52, 90.20], [78.85, 90.86], \n [78.18, 91.52], [77.51, 92.18], [76.84, 92.84], [76.17, 93.50], \n [75.50, 94.16], [74.83, 94.82], [74.16, 95.48], [73.66, 96.14], \n [73.66, 95.48], [73.66, 94.82], [73.66, 94.16], [73.66, 93.50], \n [73.66, 92.84], [73.66, 92.18], [73.66, 91.52], [73.66, 90.86], \n [73.66, 90.20], [73.66, 89.54], [73.66, 88.88], [73.66, 88.22], \n [73.66, 87.56], [73.66, 86.90], [73.66, 86.24], [73.66, 85.58], \n [73.66, 84.92], [73.66, 84.26], [73.66, 83.60], [73.66, 82.94], \n [73.66, 82.28], [73.66, 81.62], [73.66, 80.96], [73.66, 80.30], \n [73.66, 79.64], [73.66, 78.98], [73.66, 78.32], [73.66, 77.66], \n [73.66, 77.00], [73.66, 76.34], [73.66, 75.68], [73.66, 75.02], \n [73.66, 74.36], [73.66, 73.70], [73.66, 73.04], [73.66, 72.38], \n [73.66, 71.72], [73.66, 71.06], [73.66, 70.40], [73.66, 69.74], \n [73.66, 69.08], [73.66, 68.42], [73.66, 67.76], [73.66, 67.10], \n [73.66, 66.44], [73.66, 65.78], [73.66, 65.12], [73.66, 64.46], \n [73.66, 63.80], [73.66, 63.14], [73.66, 62.48], [73.66, 61.82], \n [73.66, 61.16], [73.66, 60.50], [73.66, 59.84], [73.66, 59.18], \n [73.66, 58.52], [73.66, 57.86], [73.66, 57.20], [73.66, 56.54], \n [73.66, 55.88], [73.66, 55.22], [73.66, 54.56], [73.66, 53.90], \n [73.66, 53.24], [73.66, 52.58], [73.66, 51.92], [73.66, 51.26], \n [73.66, 50.60], [73.66, 49.94], [73.66, 49.28], [73.66, 48.62], \n [73.66, 47.96], [73.66, 47.30], [73.66, 46.64], [73.66, 45.98], \n [73.66, 45.32], [73.66, 44.66], [73.66, 44.00], [73.66, 43.34], \n [73.66, 42.68], [73.66, 42.02], [73.66, 41.36], [73.66, 40.70], \n [73.66, 40.04], [73.66, 39.38], [73.66, 38.72], [73.66, 38.06], \n [73.66, 37.40], [73.66, 36.74], [73.66, 36.08], [73.66, 35.42]\n ]],\n },\n },\n ],\n }\n}\n\n\n\n// 省级行政区代码映射\nexport const PROVINCE_CODES = {\n '北京市': '110000',\n '天津市': '120000',\n '河北省': '130000',\n '山西省': '140000',\n '内蒙古自治区': '150000',\n '辽宁省': '210000',\n '吉林省': '220000',\n '黑龙江省': '230000',\n '上海市': '310000',\n '江苏省': '320000',\n '浙江省': '330000',\n '安徽省': '340000',\n '福建省': '350000',\n '江西省': '360000',\n '山东省': '370000',\n '河南省': '410000',\n '湖北省': '420000',\n '湖南省': '430000',\n '广东省': '440000',\n '广西壮族自治区': '450000',\n '海南省': '460000',\n '重庆市': '500000',\n '四川省': '510000',\n '贵州省': '520000',\n '云南省': '530000',\n '西藏自治区': '540000',\n '陕西省': '610000',\n '甘肃省': '620000',\n '青海省': '630000',\n '宁夏回族自治区': '640000',\n '新疆维吾尔自治区': '650000',\n '台湾省': '710000',\n '香港特别行政区': '810000',\n '澳门特别行政区': '820000',\n}\n\n// 省级名称映射(反向查找)\nexport const PROVINCE_NAMES = Object.fromEntries(\n Object.entries(PROVINCE_CODES).map(([name, code]) => [code, name])\n)\n\n// 获取省级代码\nexport function getProvinceCode(provinceName: string): string {\n return PROVINCE_CODES[provinceName as keyof typeof PROVINCE_CODES] || '100000'\n}\n\n// 获取省级名称\nexport function getProvinceName(provinceCode: string): string {\n return PROVINCE_NAMES[provinceCode] || '中国'\n}\n\n// 判断是否为省级代码\nexport function isProvinceCode(code: string): boolean {\n return /^\\d{6}$/.test(code) && code !== '100000'\n}\n\n// 获取省级地图数据\nexport async function getProvinceMapData(provinceName: string): Promise<any> {\n const provinceCode = getProvinceCode(provinceName)\n \n try {\n const url = `https://geo.datav.aliyun.com/areas_v3/bound/${provinceCode}_full.json`\n \n const response = await fetch(url)\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`)\n }\n \n const data = await response.json()\n return data\n }\n catch (error) {\n console.error('Failed to fetch province map data for:', provinceName, error)\n throw error\n }\n}\n\n// 天地图配置\nexport const TIANDITU_CONFIG = {\n // 天地图 token(需要申请)\n TOKEN: '你的天地图token', // 请替换为您的天地图 token\n // 天地图 API 基础 URL\n BASE_URL: 'https://api.tianditu.gov.cn',\n}\n\n// 获取天地图行政区划数据\nexport async function fetchTiandituBoundary(adcode: string): Promise<any> {\n try {\n const url = FREE_MAP_SOURCES.TIANDITU_ADMIN.BOUNDARY(adcode).replace('你的天地图token', TIANDITU_CONFIG.TOKEN)\n const response = await fetch(url)\n \n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`)\n }\n \n const data = await response.json()\n return data\n }\n catch (error) {\n console.error('Failed to fetch Tianditu boundary data:', error)\n throw error\n }\n}\n\n// 获取地图数据的函数\nexport async function fetchMapData(adcode: string): Promise<any> {\n try {\n // 优先尝试从天地图获取数据\n if (TIANDITU_CONFIG.TOKEN !== '你的天地图token') {\n try {\n const tiandituData = await fetchTiandituBoundary(adcode)\n if (tiandituData && tiandituData.data && tiandituData.data.length > 0) {\n // 转换天地图数据为 GeoJSON 格式\n return convertTiandituToGeoJson(tiandituData)\n }\n }\n catch (error) {\n console.warn('Failed to fetch from Tianditu, trying DataV:', error)\n }\n }\n\n // 备用方案:从 DataV 获取数据\n const url = FREE_MAP_SOURCES.PROVINCE.DATAV(adcode)\n console.log('Fetching province map data from:', url)\n const response = await fetch(url)\n \n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`)\n }\n \n const data = await response.json()\n console.log('Successfully fetched province map data for:', adcode, data)\n return data\n }\n catch (error) {\n console.error('Failed to fetch map data for adcode:', adcode, error)\n throw error\n }\n}\n\n// 转换天地图数据为 GeoJSON 格式\nfunction convertTiandituToGeoJson(tiandituData: any): any {\n const features = tiandituData.data.map((item: any) => ({\n type: 'Feature',\n properties: {\n name: item.name,\n adcode: item.adcode,\n level: item.level,\n },\n geometry: {\n type: 'Polygon',\n coordinates: item.polygon ? [item.polygon] : [],\n },\n }))\n\n return {\n type: 'FeatureCollection',\n features,\n }\n} "],"names":["PROVINCE_CODES","Object","fromEntries","entries","map","_ref","name","code","provinceName","test"],"mappings":"aAyHO,MAAMA,EAAiB,CAC5B,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,SAAU,SACV,MAAO,SACP,MAAO,SACP,OAAQ,SACR,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,UAAW,SACX,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,MAAO,SACP,QAAS,SACT,MAAO,SACP,MAAO,SACP,MAAO,SACP,UAAW,SACX,WAAY,SACZ,MAAO,SACP,UAAW,SACX,UAAW,UAIiBC,OAAOC,YACnCD,OAAOE,QAAQH,GAAgBI,IAAIC,IAAA,IAAEC,EAAMC,GAAIF,EAAA,MAAM,CAACE,EAAMD,uDAIvD,SAAyBE,GAC9B,OAAOR,EAAeQ,IAAgD,QACxE,yBAQO,SAAwBD,GAC7B,MAAO,UAAUE,KAAKF,IAAkB,WAATA,CACjC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),r=require("../../../node_modules/.pnpm/@iconify_vue@5.0.0_vue@3.5.18_typescript@5.8.3_/node_modules/@iconify/vue/dist/iconify.cjs"),n=require("@qxs-bns/hooks");const t={key:2,"aria-hidden":"true"},o=["xlink:href"];var i=e.defineComponent({name:"QxsIcon",__name:"icon",props:{name:{type:String,required:!0},runtime:{type:Boolean,required:!1},flip:{type:String,required:!1},rotate:{type:Number,required:!1},color:{type:String,required:!1},size:{type:[String,Number],required:!1}},setup(i){const s=i,u=e.useAttrs(),c=n.useNamespace("icon"),l=e.computed(()=>0===s.name.indexOf("i-")?s.runtime?"svg":"css":s.name.includes(":")?"svg":"custom"),a=e.computed(()=>{if(0===s.name.indexOf("i-")){let e=s.name;return s.runtime&&(e=e.replace("i-","")),e}return s.name}),p=e.computed(()=>{const e=[];if(""!==s.flip)switch(s.flip){case"horizontal":e.push("rotateY(180deg)");break;case"vertical":e.push("rotateX(180deg)");break;case"both":e.push("rotateX(180deg)"),e.push("rotateY(180deg)")}s.rotate&&e.push(`rotate(${s.rotate%360}deg)`);const{color:r,size:n}=s;return`${r?`color: ${r};`:""}\n ${n?`font-size: ${"number"==typeof n?`${n}px;`:n}`:""}\n ${e.length?`transform: ${e.join(" ")};`:""}`});return(n,i)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(e.unref(c).e("icon")),style:e.normalizeStyle(e.unref(p)+e.unref(u).style)},["css"===e.unref(l)?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(e.unref(a))},null,2)):"svg"===e.unref(l)?(e.openBlock(),e.createBlock(e.unref(r.Icon),{key:1,icon:e.unref(a)},null,8,["icon"])):(e.openBlock(),e.createElementBlock("svg",t,[e.createElementVNode("use",{"xlink:href":`#icon-${e.unref(a)}`},null,8,o)]))],6))}});exports.default=i;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),n=require("../../../node_modules/.pnpm/@iconify_vue@5.0.0_vue@3.5.18_typescript@5.9.2_/node_modules/@iconify/vue/dist/iconify.cjs"),o=require("@qxs-bns/hooks");const r={key:3,"aria-hidden":"true"},t=["xlink:href"];var i=e.defineComponent({name:"QxsIcon",__name:"icon",props:{icon:{type:null,required:!0},runtime:{type:Boolean,required:!1},flip:{type:String,required:!1},rotate:{type:Number,required:!1},color:{type:String,required:!1},size:{type:[String,Number],required:!1}},setup(i){const c=i,u=e.useAttrs(),s=o.useNamespace("icon"),l=e.computed(()=>"object"==typeof c.icon||"function"==typeof c.icon),a=e.computed(()=>l.value?"component":0===c.icon.indexOf("i-")?c.runtime?"svg":"css":c.icon.includes(":")?"svg":"custom"),p=e.computed(()=>{if(l.value)return"";if(0===c.icon.indexOf("i-")){let e=c.icon;return c.runtime&&(e=e.replace("i-","")),e}return c.icon}),f=e.computed(()=>{const e=[];if(""!==c.flip)switch(c.flip){case"horizontal":e.push("rotateY(180deg)");break;case"vertical":e.push("rotateX(180deg)");break;case"both":e.push("rotateX(180deg)"),e.push("rotateY(180deg)")}c.rotate&&e.push(`rotate(${c.rotate%360}deg)`);const{color:n,size:o}=c;return`${n?`color: ${n};`:""}\n ${o?`font-size: ${"number"==typeof o?`${o}px;`:o}`:""}\n ${e.length?`transform: ${e.join(" ")};`:""}`});return(o,i)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass([e.unref(s).b(),e.unref(s).e("icon-wrap")]),style:e.normalizeStyle(e.unref(f)+e.unref(u).style)},["component"===e.unref(a)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon),{key:0})):"css"===e.unref(a)?(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass(e.unref(p))},null,2)):"svg"===e.unref(a)?(e.openBlock(),e.createBlock(e.unref(n.Icon),{key:2,icon:e.unref(p)},null,8,["icon"])):(e.openBlock(),e.createElementBlock("svg",r,[e.createElementVNode("use",{"xlink:href":`#icon-${e.unref(p)}`},null,8,t)]))],6))}});exports.default=i;
2
2
  //# sourceMappingURL=icon.vue.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon.vue.cjs","sources":["../../../../../../packages/components/src/icon/src/icon.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Icon } from '@iconify/vue'\nimport { useNamespace } from '@qxs-bns/hooks'\n\ndefineOptions({\n name: 'QxsIcon',\n})\n\nconst props = defineProps<PropsType>()\n\nconst attrs = useAttrs()\n\nconst ns = useNamespace('icon')\n\nexport interface PropsType {\n name: string\n runtime?: boolean\n flip?: 'horizontal' | 'vertical' | 'both' | ''\n rotate?: number\n color?: string\n size?: string | number\n}\nconst outputType = computed(() => {\n if (props.name.indexOf('i-') === 0) {\n return props.runtime ? 'svg' : 'css'\n }\n else if (props.name.includes(':')) {\n return 'svg'\n }\n else {\n return 'custom'\n }\n})\n\nconst outputName = computed(() => {\n if (props.name.indexOf('i-') === 0) {\n let conversionName = props.name\n if (props.runtime) {\n conversionName = conversionName.replace('i-', '')\n }\n return conversionName\n }\n else {\n return props.name\n }\n})\n\nconst style = computed(() => {\n const transform = []\n if (props.flip !== '') {\n switch (props.flip) {\n case 'horizontal':\n transform.push('rotateY(180deg)')\n break\n case 'vertical':\n transform.push('rotateX(180deg)')\n break\n case 'both':\n transform.push('rotateX(180deg)')\n transform.push('rotateY(180deg)')\n break\n }\n }\n if (props.rotate) {\n transform.push(`rotate(${props.rotate % 360}deg)`)\n }\n const { color, size } = props\n return `${color ? `color: ${color};` : ''}\n ${size ? `font-size: ${typeof size === 'number' ? `${size}px;` : size}` : ''}\n ${transform.length ? `transform: ${transform.join(' ')};` : ''}`\n})\n</script>\n\n<template>\n <i\n :class=\"ns.e('icon')\"\n :style=\"style + attrs.style\"\n >\n <i\n v-if=\"outputType === 'css'\"\n :class=\"outputName\"\n />\n <Icon\n v-else-if=\"outputType === 'svg'\"\n :icon=\"outputName\"\n />\n <svg\n v-else\n aria-hidden=\"true\"\n >\n <use :xlink:href=\"`#icon-${outputName}`\" />\n </svg>\n </i>\n</template>\n"],"names":["props","__props","attrs","useAttrs","ns","useNamespace","outputType","computed","name","indexOf","runtime","includes","outputName","conversionName","replace","style","transform","flip","push","rotate","color","size","length","join","_createElementBlock","class","_normalizeClass","_unref","e","_normalizeStyle","_createBlock","Icon","icon","_openBlock","_hoisted_1","_createElementVNode"],"mappings":"gkBAQA,MAAMA,EAAQC,EAERC,EAAQC,EAAAA,WAERC,EAAKC,EAAAA,aAAa,QAUlBC,EAAaC,EAAAA,SAAS,IACO,IAA7BP,EAAMQ,KAAKC,QAAQ,MACdT,EAAMU,QAAU,MAAQ,MAExBV,EAAMQ,KAAKG,SAAS,KACpB,MAGA,UAILC,EAAaL,EAAAA,SAAS,KAC1B,GAAiC,IAA7BP,EAAMQ,KAAKC,QAAQ,MAAa,CAClC,IAAII,EAAiBb,EAAMQ,KAI3B,OAHIR,EAAMU,UACRG,EAAiBA,EAAeC,QAAQ,KAAM,KAEzCD,CACT,CAEE,OAAOb,EAAMQ,OAIXO,EAAQR,EAAAA,SAAS,KACrB,MAAMS,EAAY,GAClB,GAAmB,KAAfhB,EAAMiB,KACR,OAAQjB,EAAMiB,MACZ,IAAK,aACHD,EAAUE,KAAK,mBACf,MACF,IAAK,WACHF,EAAUE,KAAK,mBACf,MACF,IAAK,OACHF,EAAUE,KAAK,mBACfF,EAAUE,KAAK,mBAIjBlB,EAAMmB,QACRH,EAAUE,KAAK,UAAUlB,EAAMmB,OAAS,WAE1C,MAAMC,MAAEA,EAAAC,KAAOA,GAASrB,EACxB,MAAO,GAAGoB,EAAQ,UAAUA,KAAW,iBAC7BC,EAAO,cAA8B,iBAATA,EAAoB,GAAGA,OAAYA,IAAS,iBACxEL,EAAUM,OAAS,cAAcN,EAAUO,KAAK,QAAU,mCAKpEC,EAAAA,mBAkBI,IAAA,CAjBDC,MAAKC,EAAAA,eAAEC,EAAAA,MAAAvB,GAAGwB,EAAC,SACXb,MAAKc,EAAAA,eAAEF,QAAAZ,GAAQY,EAAAA,MAAAzB,GAAMa,SAGJ,QAAVY,EAAAA,MAAArB,kBADRkB,EAAAA,mBAGE,IAAA,OADCC,uBAAOE,EAAAA,MAAAf,cAGa,QAAVe,EAAAA,MAAArB,kBADbwB,EAAAA,YAGEH,QAAAI,EAAAA,MAAA,OADCC,KAAML,EAAAA,MAAAf,uBAETqB,EAAAA,YAAAT,EAAAA,mBAKM,MALNU,EAKM,CADJC,EAAAA,mBAA2C,MAAA,CAArC,sBAAqBR,EAAAA,MAAAf"}
1
+ {"version":3,"file":"icon.vue.cjs","sources":["../../../../../../packages/components/src/icon/src/icon.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Icon } from '@iconify/vue'\nimport { useNamespace } from '@qxs-bns/hooks'\nimport type { Component } from 'vue'\n\ndefineOptions({\n name: 'QxsIcon',\n})\n\nconst props = defineProps<PropsType>()\n\nconst attrs = useAttrs()\n\nconst ns = useNamespace('icon')\n\nexport interface PropsType {\n icon: string | Component\n runtime?: boolean\n flip?: 'horizontal' | 'vertical' | 'both' | ''\n rotate?: number\n color?: string\n size?: string | number\n}\n\nconst isComponentName = computed(() => typeof props.icon === 'object' || typeof props.icon === 'function')\n\nconst outputType = computed(() => {\n if (isComponentName.value) {\n return 'component'\n }\n if ((props.icon as string).indexOf('i-') === 0) {\n return props.runtime ? 'svg' : 'css'\n }\n else if ((props.icon as string).includes(':')) {\n return 'svg'\n }\n else {\n return 'custom'\n }\n})\n\nconst outputName = computed(() => {\n if (isComponentName.value) return ''\n if ((props.icon as string).indexOf('i-') === 0) {\n let conversionName = props.icon as string\n if (props.runtime) {\n conversionName = conversionName.replace('i-', '')\n }\n return conversionName\n }\n else {\n return props.icon as string\n }\n})\n\nconst style = computed(() => {\n const transform = [] as string[]\n if (props.flip !== '') {\n switch (props.flip) {\n case 'horizontal':\n transform.push('rotateY(180deg)')\n break\n case 'vertical':\n transform.push('rotateX(180deg)')\n break\n case 'both':\n transform.push('rotateX(180deg)')\n transform.push('rotateY(180deg)')\n break\n }\n }\n if (props.rotate) {\n transform.push(`rotate(${props.rotate % 360}deg)`)\n }\n const { color, size } = props\n return `${color ? `color: ${color};` : ''}\n ${size ? `font-size: ${typeof size === 'number' ? `${size}px;` : size}` : ''}\n ${transform.length ? `transform: ${transform.join(' ')};` : ''}`\n})\n</script>\n\n<template>\n <i\n :class=\"[ns.b(), ns.e('icon-wrap')]\"\n :style=\"style + attrs.style\"\n >\n <component\n v-if=\"outputType === 'component'\"\n :is=\"icon as any\"\n />\n <i\n v-else-if=\"outputType === 'css'\"\n :class=\"outputName\"\n />\n <Icon\n v-else-if=\"outputType === 'svg'\"\n :icon=\"outputName\"\n />\n <svg\n v-else\n aria-hidden=\"true\"\n >\n <use :xlink:href=\"`#icon-${outputName}`\" />\n </svg>\n </i>\n</template>\n"],"names":["props","__props","attrs","useAttrs","ns","useNamespace","isComponentName","computed","icon","outputType","value","indexOf","runtime","includes","outputName","conversionName","replace","style","transform","flip","push","rotate","color","size","length","join","_createElementBlock","class","_unref","b","e","_normalizeStyle","_openBlock","_createBlock","_resolveDynamicComponent","key","Icon","_hoisted_1","_createElementVNode"],"mappings":"8jBASA,MAAMA,EAAQC,EAERC,EAAQC,EAAAA,WAERC,EAAKC,EAAAA,aAAa,QAWlBC,EAAkBC,WAAS,IAA4B,iBAAfP,EAAMQ,MAA2C,mBAAfR,EAAMQ,MAEhFC,EAAaF,EAAAA,SAAS,IACtBD,EAAgBI,MACX,YAEoC,IAAxCV,EAAMQ,KAAgBG,QAAQ,MAC1BX,EAAMY,QAAU,MAAQ,MAEvBZ,EAAMQ,KAAgBK,SAAS,KAChC,MAGA,UAILC,EAAaP,EAAAA,SAAS,KAC1B,GAAID,EAAgBI,MAAO,MAAO,GAClC,GAA6C,IAAxCV,EAAMQ,KAAgBG,QAAQ,MAAa,CAC9C,IAAII,EAAiBf,EAAMQ,KAI3B,OAHIR,EAAMY,UACRG,EAAiBA,EAAeC,QAAQ,KAAM,KAEzCD,CACT,CAEE,OAAOf,EAAMQ,OAIXS,EAAQV,EAAAA,SAAS,KACrB,MAAMW,EAAY,GAClB,GAAmB,KAAflB,EAAMmB,KACR,OAAQnB,EAAMmB,MACZ,IAAK,aACHD,EAAUE,KAAK,mBACf,MACF,IAAK,WACHF,EAAUE,KAAK,mBACf,MACF,IAAK,OACHF,EAAUE,KAAK,mBACfF,EAAUE,KAAK,mBAIjBpB,EAAMqB,QACRH,EAAUE,KAAK,UAAUpB,EAAMqB,OAAS,WAE1C,MAAMC,MAAEA,EAAAC,KAAOA,GAASvB,EACxB,MAAO,GAAGsB,EAAQ,UAAUA,KAAW,iBAC7BC,EAAO,cAA8B,iBAATA,EAAoB,GAAGA,OAAYA,IAAS,iBACxEL,EAAUM,OAAS,cAAcN,EAAUO,KAAK,QAAU,mCAKpEC,EAAAA,mBAsBI,IAAA,CArBDC,wBAAQC,EAAAA,MAAAxB,GAAGyB,IAAKD,EAAAA,MAAAxB,GAAG0B,EAAC,eACpBb,MAAKc,EAAAA,eAAEH,QAAAX,GAAQW,EAAAA,MAAA1B,GAAMe,SAGJ,cAAVW,QAAAnB,IADRuB,EAAAA,YAAAC,cAGEC,EAAAA,wBADK1B,EAAAA,MAAI,CAAA2B,IAAA,KAGY,QAAVP,EAAAA,MAAAnB,kBADbiB,EAAAA,mBAGE,IAAA,OADCC,uBAAOC,EAAAA,MAAAd,cAGa,QAAVc,EAAAA,MAAAnB,kBADbwB,EAAAA,YAGEL,QAAAQ,EAAAA,MAAA,OADC5B,KAAMoB,EAAAA,MAAAd,uBAETkB,EAAAA,YAAAN,EAAAA,mBAKM,MALNW,EAKM,CADJC,EAAAA,mBAA2C,MAAA,CAArC,sBAAqBV,EAAAA,MAAAd"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("element-plus/es");require("element-plus/es/components/base/style/index"),require("element-plus/es/components/image-viewer/style/index"),require("element-plus/es/components/upload/style/index"),require("element-plus/es/components/icon/style/index");var t=require("vue"),l=require("@element-plus/icons-vue"),i=require("element-plus");require("element-plus/es/components/message/style/index");const r={class:"image-slot"},a=["src"],n=["onClick"],s=["onClick"],o={class:"tip-content"};var u=t.defineComponent({name:"QxsImageUpload",__name:"image-upload",props:t.mergeModels({action:{type:String,required:!0},headers:{type:null,required:!1},data:{type:null,required:!1},name:{type:String,required:!1,default:"file"},url:{type:String,required:!1},size:{type:Number,required:!1,default:20},width:{type:Number,required:!1,default:160},accept:{type:String,required:!1,default:"image/jpeg,image/jpg,image/png,image/gif"},height:{type:Number,required:!1,default:90},placeholder:{type:String,required:!1,default:"上传图片"},notip:{type:Boolean,required:!1,default:!1},tipText:{type:String,required:!1,default:""},beforeUpload:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:1}},{fileList:{type:Array,default:()=>[]},fileListModifiers:{}}),emits:t.mergeModels(["onSuccess","remove"],["update:fileList"]),setup(u,{emit:p}){const d=p,c=t.useAttrs(),m=t.useModel(u,"fileList"),f=i.useNamespace("image-upload"),g=t.ref(0),v=t.ref({imageViewerVisible:!1,progress:{preview:"",percent:0}}),h=t.computed(()=>f.cssVarBlock({ns:f.namespace.value,width:`${u.width||160}px`,height:`${u.height||90}px`})),y=t.computed(()=>u.accept.split(",").map(e=>e.split("/").pop())),V=t.computed(()=>u.tipText||`上传图片支持 ${y.value.join(" / ")} 格式,且图片大小不超过 ${u.size}MB${u.width&&u.height?`,建议图片尺寸为 ${u.width}*${u.height}`:""}`);function q(e){g.value=m.value.indexOf(e),v.value.imageViewerVisible=!0}function x(e){m.value.splice(m.value.indexOf(e),1)}function w(){v.value.imageViewerVisible=!1}const C=t=>{const l=t.name.split(".").pop()??"",i=y.value.includes(l),r=t.size/1024/1024<u.size;return i?r?(v.value.progress.preview=URL.createObjectURL(t),!u.beforeUpload||u.beforeUpload(t)):(e.ElMessage.error(`上传图片大小不能超过 ${u.size}MB!`),!1):(e.ElMessage.error(`上传图片只支持${y.value.join(" / ")}格式!`),!1)},N=e=>{v.value.progress.percent=Math.floor(e.percent)},b=(...e)=>{v.value.progress={preview:"",percent:0},d("onSuccess",...e)};return(i,u)=>{const p=e.ElIcon,d=e.ElUpload,y=e.ElImageViewer;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(f).e("container")),style:t.normalizeStyle(t.unref(h))},[t.createVNode(d,t.mergeProps(t.unref(c),{"file-list":m.value,"onUpdate:fileList":u[0]||(u[0]=e=>m.value=e),drag:"",limit:i.limit,"list-type":"picture-card",headers:i.headers,action:i.action,data:i.data,name:i.name,accept:i.accept,"before-upload":C,"on-progress":N,"on-preview":q,"on-success":b,class:[t.unref(f).e("control"),i.limit<=m.value.length?t.unref(f).e("more-than-limit"):""],"on-remove":x}),{file:t.withCtx(({file:e})=>[t.createElementVNode("img",{class:t.normalizeClass(`${t.unref(f).namespace.value}-upload-list__item-thumbnail`),src:e.url,alt:""},null,10,a),t.createElementVNode("span",{class:t.normalizeClass(`${t.unref(f).namespace.value}-upload-list__item-actions`)},[t.createElementVNode("span",{class:t.normalizeClass(`${t.unref(f).namespace.value}-upload-list__item-preview`),onClick:t=>q(e)},[t.createVNode(p,null,{default:t.withCtx(()=>[t.createVNode(t.unref(l.ZoomIn))]),_:1})],10,n),i.disabled?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(`${t.unref(f).namespace.value}-upload-list__item-delete`),onClick:t=>x(e)},[t.createVNode(p,null,{default:t.withCtx(()=>[t.createVNode(t.unref(l.Delete))]),_:1})],10,s))],2)]),tip:t.withCtx(()=>[t.renderSlot(i.$slots,"tip",{},()=>[i.notip?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(`${t.unref(f).namespace.value}-upload__tip-text`)},[t.createElementVNode("div",o,t.toDisplayString(t.unref(V)),1)],2))])]),default:t.withCtx(()=>[t.renderSlot(i.$slots,"default",{},()=>[t.createElementVNode("div",r,[t.createVNode(p,null,{default:t.withCtx(()=>[t.createVNode(t.unref(l.Plus))]),_:1}),t.createElementVNode("p",null,t.toDisplayString(i.placeholder),1)])])]),_:3},16,["file-list","limit","headers","action","data","name","accept","class"]),t.unref(v).imageViewerVisible?(t.openBlock(),t.createBlock(y,{key:0,"url-list":m.value.map(e=>e.url).filter(e=>void 0!==e),"initial-index":t.unref(g),teleported:"",onClose:w},null,8,["url-list","initial-index"])):t.createCommentVNode("v-if",!0)],6)}}});exports.default=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("element-plus/es");require("element-plus/es/components/base/style/index"),require("element-plus/es/components/image-viewer/style/index"),require("element-plus/es/components/upload/style/index"),require("element-plus/es/components/icon/style/index");var t=require("vue"),l=require("@element-plus/icons-vue"),i=require("@qxs-bns/icon"),r=require("element-plus");require("element-plus/es/components/message/style/index");const a={class:"image-slot"},n=["src"],s=["onClick"],o=["onClick"],u={class:"tip-content"};var p=t.defineComponent({name:"QxsImageUpload",__name:"image-upload",props:t.mergeModels({action:{type:String,required:!0},headers:{type:null,required:!1},data:{type:null,required:!1},name:{type:String,required:!1,default:"file"},url:{type:String,required:!1},size:{type:Number,required:!1,default:20},width:{type:Number,required:!1,default:160},accept:{type:String,required:!1,default:"image/jpeg,image/jpg,image/png,image/gif"},height:{type:Number,required:!1,default:90},placeholder:{type:String,required:!1,default:"上传图片"},notip:{type:Boolean,required:!1,default:!1},tipText:{type:String,required:!1,default:""},beforeUpload:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:1}},{fileList:{type:Array,default:()=>[]},fileListModifiers:{}}),emits:t.mergeModels(["onSuccess","remove"],["update:fileList"]),setup(p,{emit:d}){const c=d,m=t.useAttrs(),f=t.useModel(p,"fileList"),g=r.useNamespace("image-upload"),v=t.ref(0),h=t.ref({imageViewerVisible:!1,progress:{preview:"",percent:0}}),y=t.computed(()=>g.cssVarBlock({ns:g.namespace.value,width:`${p.width||160}px`,height:`${p.height||90}px`})),q=t.computed(()=>p.accept.split(",").map(e=>e.split("/").pop())),V=t.computed(()=>p.tipText||`上传图片支持 ${q.value.join(" / ")} 格式,且图片大小不超过 ${p.size}MB${p.width&&p.height?`,建议图片尺寸为 ${p.width}*${p.height}`:""}`);function x(e){v.value=f.value.indexOf(e),h.value.imageViewerVisible=!0}function w(e){f.value.splice(f.value.indexOf(e),1)}function C(){h.value.imageViewerVisible=!1}const N=t=>{const l=t.name.split(".").pop()??"",i=q.value.includes(l),r=t.size/1024/1024<p.size;return i?r?(h.value.progress.preview=URL.createObjectURL(t),!p.beforeUpload||p.beforeUpload(t)):(e.ElMessage.error(`上传图片大小不能超过 ${p.size}MB!`),!1):(e.ElMessage.error(`上传图片只支持${q.value.join(" / ")}格式!`),!1)},b=e=>{h.value.progress.percent=Math.floor(e.percent)},_=(...e)=>{h.value.progress={preview:"",percent:0},c("onSuccess",...e)};return(r,p)=>{const d=e.ElIcon,c=e.ElUpload,q=e.ElImageViewer;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(g).e("container")),style:t.normalizeStyle(t.unref(y))},[t.createVNode(c,t.mergeProps(t.unref(m),{"file-list":f.value,"onUpdate:fileList":p[0]||(p[0]=e=>f.value=e),drag:"",limit:r.limit,"list-type":"picture-card",headers:r.headers,action:r.action,data:r.data,name:r.name,accept:r.accept,"before-upload":N,"on-progress":b,"on-preview":x,"on-success":_,class:[t.unref(g).e("control"),r.limit<=f.value.length?t.unref(g).e("more-than-limit"):""],"on-remove":w}),{file:t.withCtx(({file:e})=>[t.createElementVNode("img",{class:t.normalizeClass(`${t.unref(g).namespace.value}-upload-list__item-thumbnail`),src:e.url,alt:""},null,10,n),t.createElementVNode("span",{class:t.normalizeClass(`${t.unref(g).namespace.value}-upload-list__item-actions`)},[t.createElementVNode("span",{class:t.normalizeClass(`${t.unref(g).namespace.value}-upload-list__item-preview`),onClick:t=>x(e)},[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(t.unref(i.ZoomIn))]),_:1})],10,s),r.disabled?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(`${t.unref(g).namespace.value}-upload-list__item-delete`),onClick:t=>w(e)},[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(t.unref(l.Delete))]),_:1})],10,o))],2)]),tip:t.withCtx(()=>[t.renderSlot(r.$slots,"tip",{},()=>[r.notip?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(`${t.unref(g).namespace.value}-upload__tip-text`)},[t.createElementVNode("div",u,t.toDisplayString(t.unref(V)),1)],2))])]),default:t.withCtx(()=>[t.renderSlot(r.$slots,"default",{},()=>[t.createElementVNode("div",a,[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(t.unref(l.Plus))]),_:1}),t.createElementVNode("p",null,t.toDisplayString(r.placeholder),1)])])]),_:3},16,["file-list","limit","headers","action","data","name","accept","class"]),t.unref(h).imageViewerVisible?(t.openBlock(),t.createBlock(q,{key:0,"url-list":f.value.map(e=>e.url).filter(e=>void 0!==e),"initial-index":t.unref(v),teleported:"",onClose:C},null,8,["url-list","initial-index"])):t.createCommentVNode("v-if",!0)],6)}}});exports.default=p;
2
2
  //# sourceMappingURL=image-upload.vue.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-upload.vue.cjs","sources":["../../../../../../packages/components/src/image-upload/src/image-upload.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { UploadFile, UploadFiles, UploadProps } from 'element-plus'\nimport { Delete, Plus, ZoomIn } from '@element-plus/icons-vue'\nimport { useNamespace } from 'element-plus'\n\n// 组件名称\ndefineOptions({\n name: 'QxsImageUpload',\n})\n\n// Props 定义\nconst {\n name = 'file',\n size = 20,\n width = 160,\n height = 90,\n limit = 1,\n placeholder = '上传图片',\n notip = false,\n accept = 'image/jpeg,image/jpg,image/png,image/gif',\n beforeUpload,\n tipText = '',\n disabled = false,\n} = defineProps<ImageUploadProps>()\n\n// Emits 定义\nconst emits = defineEmits<{\n onSuccess: [res: any, uploadFile: UploadFile, uploadFiles: UploadFiles]\n remove: [file: UploadFile]\n}>()\n\n// 类型定义\nexport interface ImageUploadProps {\n action: UploadProps['action']\n headers?: UploadProps['headers']\n data?: UploadProps['data']\n name?: UploadProps['name']\n url?: string\n size?: number\n width?: number\n accept?: string\n height?: number\n placeholder?: string\n notip?: boolean\n tipText?: string\n beforeUpload?: UploadProps['beforeUpload']\n disabled?: boolean\n limit?: number\n}\n\ninterface UploadProgress {\n preview: string\n percent: number\n}\n\nconst attrs = useAttrs()\n\nconst fileList = defineModel('fileList', {\n type: Array as () => UploadFile[],\n default: () => [],\n})\n\n// 命名空间\nconst nsEl = useNamespace('image-upload')\n\nconst initialIndex = ref(0)\n// 响应式数据\nconst uploadData = ref<{\n imageViewerVisible: boolean\n progress: UploadProgress\n}>({\n imageViewerVisible: false,\n progress: {\n preview: '',\n percent: 0,\n },\n})\n\nconst cssVar = computed(() => {\n return nsEl.cssVarBlock({\n ns: nsEl.namespace.value,\n width: `${width || 160}px`,\n height: `${height || 90}px`,\n })\n})\n\n// 计算属性\nconst exts = computed(() =>\n accept.split(',').map(ext => ext.split('/').pop()),\n)\n\nconst tipMessage = computed(\n () =>\n tipText\n || `上传图片支持 ${exts.value.join(\n ' / ',\n )} 格式,且图片大小不超过 ${size}MB${width && height ? `,建议图片尺寸为 ${width}*${height}` : ''}`,\n)\n\n// 方法\nfunction onPreview(file: UploadFile) {\n initialIndex.value = fileList.value.indexOf(file)\n uploadData.value.imageViewerVisible = true\n}\nfunction onRemove(file: UploadFile) {\n fileList.value.splice(fileList.value.indexOf(file), 1)\n}\n\nfunction previewClose() {\n uploadData.value.imageViewerVisible = false\n}\n\nconst handleBeforeUpload: UploadProps['beforeUpload'] = (file) => {\n const fileExt = file.name.split('.').pop() ?? ''\n const isTypeOk = exts.value.includes(fileExt)\n const isSizeOk = file.size / 1024 / 1024 < size\n\n if (!isTypeOk) {\n ElMessage.error(`上传图片只支持${exts.value.join(' / ')}格式!`)\n return false\n }\n\n if (!isSizeOk) {\n ElMessage.error(`上传图片大小不能超过 ${size}MB!`)\n return false\n }\n\n uploadData.value.progress.preview = URL.createObjectURL(file)\n\n return beforeUpload ? beforeUpload(file) : true\n}\n\nconst onProgress: UploadProps['onProgress'] = (evt) => {\n uploadData.value.progress.percent = Math.floor(evt.percent)\n}\n\nconst onSuccess: UploadProps['onSuccess'] = (...args) => {\n uploadData.value.progress = {\n preview: '',\n percent: 0,\n }\n emits('onSuccess', ...args)\n}\n</script>\n\n<template>\n <div\n :class=\"nsEl.e('container')\"\n :style=\"cssVar\"\n >\n <el-upload\n v-bind=\"attrs\"\n v-model:file-list=\"fileList\"\n drag\n :limit=\"limit\"\n list-type=\"picture-card\"\n :headers=\"headers\"\n :action=\"action\"\n :data=\"data\"\n :name=\"name\"\n :accept=\"accept\"\n :before-upload=\"handleBeforeUpload\"\n :on-progress=\"onProgress\"\n :on-preview=\"onPreview\"\n :on-success=\"onSuccess\"\n :class=\"[nsEl.e('control'), limit <= fileList.length ? nsEl.e('more-than-limit') : '']\"\n :on-remove=\"onRemove\"\n >\n <slot>\n <div class=\"image-slot\">\n <el-icon><Plus /></el-icon>\n <p>{{ placeholder }}</p>\n </div>\n </slot>\n <template #file=\"{ file }\">\n <img\n :class=\"`${nsEl.namespace.value}-upload-list__item-thumbnail`\"\n :src=\"file.url\"\n alt=\"\"\n >\n <span :class=\"`${nsEl.namespace.value}-upload-list__item-actions`\">\n <span\n :class=\"`${nsEl.namespace.value}-upload-list__item-preview`\"\n @click=\"onPreview(file)\"\n >\n <el-icon><ZoomIn /></el-icon>\n </span>\n <span\n v-if=\"!disabled\"\n :class=\"`${nsEl.namespace.value}-upload-list__item-delete`\"\n @click=\"onRemove(file)\"\n >\n <el-icon><Delete /></el-icon>\n </span>\n </span>\n </template>\n <template #tip>\n <slot name=\"tip\">\n <div\n v-if=\"!notip\"\n :class=\"`${nsEl.namespace.value}-upload__tip-text`\"\n >\n <div class=\"tip-content\">\n {{ tipMessage }}\n </div>\n </div>\n </slot>\n </template>\n </el-upload>\n\n <el-image-viewer\n v-if=\"uploadData.imageViewerVisible\"\n :url-list=\"fileList.map(item => item.url).filter(v => v !== undefined)\"\n :initial-index=\"initialIndex\"\n teleported\n @close=\"previewClose\"\n />\n </div>\n</template>\n"],"names":["emits","__emit","attrs","useAttrs","fileList","_useModel","__props","nsEl","useNamespace","initialIndex","ref","uploadData","imageViewerVisible","progress","preview","percent","cssVar","computed","cssVarBlock","ns","namespace","value","width","height","exts","split","map","ext","pop","tipMessage","tipText","join","size","onPreview","file","indexOf","onRemove","splice","previewClose","handleBeforeUpload","fileExt","name","isTypeOk","includes","isSizeOk","URL","createObjectURL","beforeUpload","ElMessage","error","onProgress","evt","Math","floor","onSuccess","args","_createElementBlock","class","_normalizeClass","_unref","e","style","_createVNode","_component_el_upload","_mergeProps","$event","drag","limit","headers","action","data","accept","length","_withCtx","_createElementVNode","src","url","alt","onClick","_component_el_icon","ZoomIn","disabled","Delete","tip","_renderSlot","_ctx","notip","_hoisted_5","_toDisplayString","_hoisted_1","Plus","placeholder","_createBlock","_component_el_image_viewer","item","filter","v","teleported","onClose"],"mappings":"06CA0BA,MAAMA,EAAQC,EA6BRC,EAAQC,EAAAA,WAERC,EAAWC,EAAAA,SAAWC,EAAC,YAMvBC,EAAOC,EAAAA,aAAa,gBAEpBC,EAAeC,EAAAA,IAAI,GAEnBC,EAAaD,EAAAA,IAGhB,CACDE,oBAAoB,EACpBC,SAAU,CACRC,QAAS,GACTC,QAAS,KAIPC,EAASC,EAAAA,SAAS,IACfV,EAAKW,YAAY,CACtBC,GAAIZ,EAAKa,UAAUC,MACnBC,MAAO,GAAGhB,EAAAgB,OAAS,QACnBC,OAAQ,GAAGjB,EAAAiB,QAAU,UAKnBC,EAAOP,EAAAA,SAAS,IACpBX,SAAOmB,MAAM,KAAKC,IAAIC,GAAOA,EAAIF,MAAM,KAAKG,QAG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,MAAA9B,IAAU,8BAnCrB,IAKO,CALPuD,EAAAA,WAKOC,sBALP,IAKO,CAJLX,EAAAA,mBAGM,MAHNe,EAGM,CAFJ3B,EAAAA,YAA2BiB,EAAA,KAAA,mBAAlB,IAAQ,CAARjB,EAAAA,YAAQH,EAAAA,MAAA+B,iBACjBhB,EAAAA,mBAAwB,2BAAlBiB,EAAAA,aAAW,0FAwCfhC,EAAAA,MAAAhD,GAAWC,kCADnBgF,EAAAA,YAMEC,EAAA,OAJC,WAAUzF,EAAAiB,MAASK,IAAIoE,GAAQA,EAAKlB,KAAKmB,OAAOC,QAAW,IAANA,GACrD,gBAAerC,EAAAA,MAAAlD,GAChBwF,WAAA,GACCC,QAAO5D"}
1
+ {"version":3,"file":"image-upload.vue.cjs","sources":["../../../../../../packages/components/src/image-upload/src/image-upload.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { UploadFile, UploadFiles, UploadProps } from 'element-plus'\nimport { Delete, Plus } from '@element-plus/icons-vue'\nimport { ZoomIn } from '@qxs-bns/icon'\nimport { useNamespace } from 'element-plus'\n\n// 组件名称\ndefineOptions({\n name: 'QxsImageUpload',\n})\n\n// Props 定义\nconst {\n name = 'file',\n size = 20,\n width = 160,\n height = 90,\n limit = 1,\n placeholder = '上传图片',\n notip = false,\n accept = 'image/jpeg,image/jpg,image/png,image/gif',\n beforeUpload,\n tipText = '',\n disabled = false,\n} = defineProps<ImageUploadProps>()\n\n// Emits 定义\nconst emits = defineEmits<{\n onSuccess: [res: any, uploadFile: UploadFile, uploadFiles: UploadFiles]\n remove: [file: UploadFile]\n}>()\n\n// 类型定义\nexport interface ImageUploadProps {\n action: UploadProps['action']\n headers?: UploadProps['headers']\n data?: UploadProps['data']\n name?: UploadProps['name']\n url?: string\n size?: number\n width?: number\n accept?: string\n height?: number\n placeholder?: string\n notip?: boolean\n tipText?: string\n beforeUpload?: UploadProps['beforeUpload']\n disabled?: boolean\n limit?: number\n}\n\ninterface UploadProgress {\n preview: string\n percent: number\n}\n\nconst attrs = useAttrs()\n\nconst fileList = defineModel('fileList', {\n type: Array as () => UploadFile[],\n default: () => [],\n})\n\n// 命名空间\nconst nsEl = useNamespace('image-upload')\n\nconst initialIndex = ref(0)\n// 响应式数据\nconst uploadData = ref<{\n imageViewerVisible: boolean\n progress: UploadProgress\n}>({\n imageViewerVisible: false,\n progress: {\n preview: '',\n percent: 0,\n },\n})\n\nconst cssVar = computed(() => {\n return nsEl.cssVarBlock({\n ns: nsEl.namespace.value,\n width: `${width || 160}px`,\n height: `${height || 90}px`,\n })\n})\n\n// 计算属性\nconst exts = computed(() =>\n accept.split(',').map(ext => ext.split('/').pop()),\n)\n\nconst tipMessage = computed(\n () =>\n tipText\n || `上传图片支持 ${exts.value.join(\n ' / ',\n )} 格式,且图片大小不超过 ${size}MB${width && height ? `,建议图片尺寸为 ${width}*${height}` : ''}`,\n)\n\n// 方法\nfunction onPreview(file: UploadFile) {\n initialIndex.value = fileList.value.indexOf(file)\n uploadData.value.imageViewerVisible = true\n}\nfunction onRemove(file: UploadFile) {\n fileList.value.splice(fileList.value.indexOf(file), 1)\n}\n\nfunction previewClose() {\n uploadData.value.imageViewerVisible = false\n}\n\nconst handleBeforeUpload: UploadProps['beforeUpload'] = (file) => {\n const fileExt = file.name.split('.').pop() ?? ''\n const isTypeOk = exts.value.includes(fileExt)\n const isSizeOk = file.size / 1024 / 1024 < size\n\n if (!isTypeOk) {\n ElMessage.error(`上传图片只支持${exts.value.join(' / ')}格式!`)\n return false\n }\n\n if (!isSizeOk) {\n ElMessage.error(`上传图片大小不能超过 ${size}MB!`)\n return false\n }\n\n uploadData.value.progress.preview = URL.createObjectURL(file)\n\n return beforeUpload ? beforeUpload(file) : true\n}\n\nconst onProgress: UploadProps['onProgress'] = (evt) => {\n uploadData.value.progress.percent = Math.floor(evt.percent)\n}\n\nconst onSuccess: UploadProps['onSuccess'] = (...args) => {\n uploadData.value.progress = {\n preview: '',\n percent: 0,\n }\n emits('onSuccess', ...args)\n}\n</script>\n\n<template>\n <div\n :class=\"nsEl.e('container')\"\n :style=\"cssVar\"\n >\n <el-upload\n v-bind=\"attrs\"\n v-model:file-list=\"fileList\"\n drag\n :limit=\"limit\"\n list-type=\"picture-card\"\n :headers=\"headers\"\n :action=\"action\"\n :data=\"data\"\n :name=\"name\"\n :accept=\"accept\"\n :before-upload=\"handleBeforeUpload\"\n :on-progress=\"onProgress\"\n :on-preview=\"onPreview\"\n :on-success=\"onSuccess\"\n :class=\"[nsEl.e('control'), limit <= fileList.length ? nsEl.e('more-than-limit') : '']\"\n :on-remove=\"onRemove\"\n >\n <slot>\n <div class=\"image-slot\">\n <el-icon><Plus /></el-icon>\n <p>{{ placeholder }}</p>\n </div>\n </slot>\n <template #file=\"{ file }\">\n <img\n :class=\"`${nsEl.namespace.value}-upload-list__item-thumbnail`\"\n :src=\"file.url\"\n alt=\"\"\n >\n <span :class=\"`${nsEl.namespace.value}-upload-list__item-actions`\">\n <span\n :class=\"`${nsEl.namespace.value}-upload-list__item-preview`\"\n @click=\"onPreview(file)\"\n >\n <el-icon><ZoomIn /></el-icon>\n </span>\n <span\n v-if=\"!disabled\"\n :class=\"`${nsEl.namespace.value}-upload-list__item-delete`\"\n @click=\"onRemove(file)\"\n >\n <el-icon><Delete /></el-icon>\n </span>\n </span>\n </template>\n <template #tip>\n <slot name=\"tip\">\n <div\n v-if=\"!notip\"\n :class=\"`${nsEl.namespace.value}-upload__tip-text`\"\n >\n <div class=\"tip-content\">\n {{ tipMessage }}\n </div>\n </div>\n </slot>\n </template>\n </el-upload>\n\n <el-image-viewer\n v-if=\"uploadData.imageViewerVisible\"\n :url-list=\"fileList.map(item => item.url).filter(v => v !== undefined)\"\n :initial-index=\"initialIndex\"\n teleported\n @close=\"previewClose\"\n />\n </div>\n</template>\n"],"names":["emits","__emit","attrs","useAttrs","fileList","_useModel","__props","nsEl","useNamespace","initialIndex","ref","uploadData","imageViewerVisible","progress","preview","percent","cssVar","computed","cssVarBlock","ns","namespace","value","width","height","exts","split","map","ext","pop","tipMessage","tipText","join","size","onPreview","file","indexOf","onRemove","splice","previewClose","handleBeforeUpload","fileExt","name","isTypeOk","includes","isSizeOk","URL","createObjectURL","beforeUpload","ElMessage","error","onProgress","evt","Math","floor","onSuccess","args","_createElementBlock","class","_normalizeClass","_unref","e","style","_createVNode","_component_el_upload","_mergeProps","$event","drag","limit","headers","action","data","accept","length","_withCtx","_createElementVNode","src","url","alt","onClick","_component_el_icon","ZoomIn","disabled","Delete","tip","_renderSlot","_ctx","notip","_hoisted_5","_toDisplayString","_hoisted_1","Plus","placeholder","_createBlock","_component_el_image_viewer","item","filter","v","teleported","onClose"],"mappings":"q8CA2BA,MAAMA,EAAQC,EA6BRC,EAAQC,EAAAA,WAERC,EAAWC,EAAAA,SAAWC,EAAC,YAMvBC,EAAOC,EAAAA,aAAa,gBAEpBC,EAAeC,EAAAA,IAAI,GAEnBC,EAAaD,EAAAA,IAGhB,CACDE,oBAAoB,EACpBC,SAAU,CACRC,QAAS,GACTC,QAAS,KAIPC,EAASC,EAAAA,SAAS,IACfV,EAAKW,YAAY,CACtBC,GAAIZ,EAAKa,UAAUC,MACnBC,MAAO,GAAGhB,EAAAgB,OAAS,QACnBC,OAAQ,GAAGjB,EAAAiB,QAAU,UAKnBC,EAAOP,EAAAA,SAAS,IACpBX,SAAOmB,MAAM,KAAKC,IAAIC,GAAOA,EAAIF,MAAM,KAAKG,QAGxCC,EAAaZ,EAAAA,SACjB,IACEX,EAAAwB,SACG,UAAUN,EAAKH,MAAMU,KACtB,sBACezB,EAAA0B,SAAS1B,EAAAgB,OAAShB,EAAAiB,OAAS,YAAYjB,EAAAgB,SAAShB,EAAAiB,SAAW,MAIhF,SAASU,EAAUC,GACjBzB,EAAaY,MAAQjB,EAASiB,MAAMc,QAAQD,GAC5CvB,EAAWU,MAAMT,oBAAqB,CACxC,CACA,SAASwB,EAASF,GAChB9B,EAASiB,MAAMgB,OAAOjC,EAASiB,MAAMc,QAAQD,GAAO,EACtD,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B,KAAKmB,OAAOC,QAAW,IAANA,GACrD,gBAAerC,EAAAA,MAAAlD,GAChBwF,WAAA,GACCC,QAAO5D"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qxs-bns/components",
3
3
  "type": "module",
4
- "version": "0.0.56",
4
+ "version": "0.0.58",
5
5
  "description": "Vue 3 Component Library",
6
6
  "license": "MIT",
7
7
  "homepage": "https://trry-hub.github.io/qxs-bns/",
@@ -1 +1 @@
1
- :root [data-fixed-calc-width]{position:fixed;right:0;left:0%}:root [data-mode=mobile] [data-fixed-calc-width]{width:100% !important}.qxs-data-chart__table{box-sizing:border-box;display:flex;flex-direction:column}.qxs-data-chart__table .title{display:flex;align-items:center;justify-content:space-between;padding:0 5px;margin-top:2px;margin-bottom:7px;font-family:sans-serif;font-size:14px;font-weight:bolder;color:#464646}.qxs-data-chart__table>div[class*=-table]{position:relative;display:flex;flex:1;flex-direction:column;overflow:hidden;background-color:rgba(0,0,0,0);border-top-left-radius:4px;border-top-right-radius:4px}.qxs-data-chart__table>div[class*=-table] [class*=-table__body-wrapper] [class*=-table__cell]{border-right:0}.qxs-data-chart__table>div[class*=-table] [class*=-table__body-wrapper] [class$=table__empty-text]{line-height:unset}.qxs-data-chart__empty{display:flex;align-items:center;justify-content:center;height:100%}.qxs-data-chart__empty-content{display:flex;flex-direction:column;align-items:center;pointer-events:none;margin-top:-2px}.qxs-data-chart__empty-description{font-size:14px;color:#74767e;margin-left:1px}.qxs-data-chart__wrapper{height:100%}.qxs-fixed-action-bar__actionbar{bottom:0;z-index:10;padding:var(--qxs-fixed-action-bar-actionbar-padding);padding-bottom:calc(env(safe-area-inset-bottom) + var(--qxs-fixed-action-bar-actionbar-padding-bottom));text-align:center;background-color:var(--qxs-bg-color, #fff);box-shadow:0 0 1px 0 var(--qxs-border-color, #f3f3f2);transition:box-shadow .3s,var(--qxs-transition-box-shadow, #f3f3f2)}.qxs-fixed-action-bar__actionbar.is-shadow{box-shadow:0 0 1px 0 var(--qxs-border-color, #f3f3f2)}.qxs-photo-crop-tool__img-box{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;background-color:#fafafa}.qxs-photo-crop-tool__error-message{color:red}.qxs-photo-crop-tool__image{max-width:100%;max-height:100%;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:contain;object-fit:contain;-webkit-user-drag:none}.qxs-photo-crop-tool__crop-tool-box{position:absolute;width:calc(var(--qxs-photo-crop-tool-width)*1px);max-width:100%;height:calc(var(--qxs-photo-crop-tool-height)*1px);max-height:100%;aspect-ratio:var(--qxs-photo-crop-tool-aspect-ratio);overflow:hidden;cursor:move;border:1px dashed #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.4)}.qxs-photo-crop-tool__crop-tool-box>div{position:absolute;z-index:3;width:30%;aspect-ratio:1/1;background-color:rgba(2,2,2,.01);border-radius:50%;transition:all .3s}.qxs-photo-crop-tool__crop-tool-box>div:after{content:"";position:absolute;width:10px;height:10px;top:50%;left:50%;transform:translate3d(-50%, -50%, 0);border-radius:50%;background-color:var(--qxs-color-primary, #3d61e3)}.qxs-photo-crop-tool__crop-tool-box>div:hover,.qxs-photo-crop-tool__crop-tool-box>div:active{background-color:rgba(2,2,2,.5)}.qxs-photo-crop-tool__top-left{top:0;left:0;cursor:nwse-resize;transform:translate3d(-50%, -50%, 0)}.qxs-photo-crop-tool__top-right{top:0;right:0;cursor:nesw-resize;transform:translate3d(50%, -50%, 0)}.qxs-photo-crop-tool__bottom-right{right:0;bottom:0;cursor:nwse-resize;transform:translate3d(50%, 50%, 0)}.qxs-photo-crop-tool__bottom-left{bottom:0;left:0;cursor:nesw-resize;transform:translate3d(-50%, 50%, 0)}.el-image-upload__container{line-height:initial}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item{width:var(--el-image-upload-width);height:var(--el-image-upload-height)}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item [role=progressbar]{width:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item [role=progressbar] .el-progress-circle{width:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important;height:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important}.el-image-upload__control>.el-upload-list--picture-card .is-drag{width:var(--el-image-upload-width);height:var(--el-image-upload-height)}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger{border:unset;background-color:unset;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger .image-slot [class$=-icon]{font-size:28px;margin-bottom:10px}.el-image-upload__more-than-limit .is-drag{display:none}.el-image-upload__container .el-upload__tip-text{font-size:14px;line-height:32px;color:#c8c8c8}.qxs-file-upload__control .is-drag{display:inline-block !important}.qxs-file-upload__control .is-drag [class$=-upload-dragger]{padding:0}.qxs-file-upload__control .is-drag [class$=-upload-dragger] [class$=-icon--upload]{margin-bottom:0;font-size:40px}.qxs-file-upload__control .is-drag [class$=-upload-dragger] [class$=-upload__text]{padding:0 6px;font-size:14px;line-height:1.5}.qxs-file-upload__control .is-drag.is-dragover{border-width:1px}.qxs-file-upload__control .is-drag .slot{width:160px;height:90px}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce{border-width:1px;border-radius:var(--qxs-border-radius-base, 4px)}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header{box-shadow:0 2px 2px -2px rgba(34,47,62,.1),0 4px 4px -4px rgba(34,47,62,.07)}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce .tox-sidebar-wrap{overflow-y:auto}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce .tox-sidebar-wrap .tox-edit-area::before{border-width:1px;border-radius:0}.qxs-tiny-mce-editor .tox-tinymce-aux{z-index:2500 !important}.qxs-subject-list__list-exam .flex{display:flex;align-items:center}.qxs-subject-list__list-exam .flex-items-center{display:flex;align-items:center}.qxs-subject-list__list-exam .flex-justify-between{display:flex;justify-content:space-between}.qxs-subject-list__list-exam .flex-justify-center{display:flex;justify-content:center}.qxs-subject-list__list-exam .flex-justify-end{display:flex;justify-content:flex-end}.qxs-subject-list__list-exam .margin-left-10{margin-left:10px}.qxs-subject-list__list-exam .label{min-width:50px}.qxs-subject-list__list-exam .flex-1{flex:1}.qxs-subject-list__list-exam .subject-list-wrapper{width:100%;margin-bottom:20px}.qxs-subject-list__list-exam .margin-bottom{margin-bottom:20px}.qxs-subject-list__list-exam .auto-line{flex:1;height:1px;margin:0 15px;background-color:#c8c8c8}.qxs-subject-list__list-exam .title{font-size:14px;font-weight:500}.qxs-subject-list__list-exam .rich-text img{max-width:100%}.qxs-subject-single__single-exam .preview-answer{display:flex;flex-direction:column;margin-bottom:10px}.qxs-subject-single__single-exam .flex{display:flex;align-items:center}.qxs-subject-single__single-exam .margin-bottom{margin-bottom:20px}.qxs-subject-single__single-exam .answer-list .answer-item{margin-top:15px}.qxs-subject-single__single-exam .answer-list .answer-item .input{width:300px}.qxs-subject-single__single-exam .answer-list .answer-item .input [class$=-input]{font-weight:bold}.qxs-subject-single__single-exam .answer-list .answer-item .correct{margin:0 10px}.qxs-subject-single__single-exam .answer-list .answer-item .correct:hover{color:#3d61e3;cursor:pointer}.qxs-subject-single__single-exam .answer-list .answer-item .is-correct{color:#67c23a}.qxs-subject-single__single-exam .answer-list .answer-item .icon{margin-left:10px;font-size:18px;color:#a3a3a3;cursor:pointer}.qxs-subject-single__single-exam .answer-list .answer-item .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-single__single-exam .preview .answer-radio{padding-left:10px}.qxs-subject-single__single-exam .preview .answer-radio .radio{margin-top:10px}.qxs-subject-blank-fill__blank-fill-exam .flex{display:flex;align-items:center}.qxs-subject-blank-fill__blank-fill-exam .label{min-width:50px;margin-right:10px}.qxs-subject-blank-fill__blank-fill-exam .margin-bottom{margin-bottom:20px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item{width:100%;margin-top:15px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item .answer-tags{flex:1;padding:5px 15px;border:1px solid #eee;border-radius:4px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item .answer-tags [class$=-tag]{margin-right:10px}.qxs-subject-blank-fill__blank-fill-exam .preview .content{min-height:100px;padding-top:10px;background-color:#fff}.qxs-subject-text-fill__text-fill-exam .flex{display:flex;align-items:center}.qxs-subject-text-fill__text-fill-exam .label{min-width:50px;margin-right:10px}.qxs-subject-text-fill__text-fill-exam .margin-bottom{margin-bottom:20px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item{width:100%;margin-top:15px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .answer-tags{flex:1;padding:5px 15px;border:1px solid #eee;border-radius:4px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .operation .icon{margin-left:10px;font-size:16px;color:#a3a3a3;cursor:pointer}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .operation .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-text-fill__text-fill-exam .preview .content{min-height:100px;margin-top:10px}.qxs-subject-scale__scale-exam .flex{display:flex;align-items:center}.qxs-subject-scale__scale-exam .label{min-width:50px}.qxs-subject-scale__scale-exam .margin-bottom{margin-bottom:20px}.qxs-subject-scale__scale-exam .answer{margin:20px 0}.qxs-subject-scale__scale-exam .answer .answer-list{margin-left:40px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item{margin-bottom:20px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .order{width:16px;margin-right:10px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .icon{margin-left:10px;font-size:16px;color:#a3a3a3;cursor:pointer}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-scale__scale-exam .preview .answer-radio .radio-item .qxs-radio-wrapper{margin-inline-end:0}.qxs-subject-layout__layout-exam{padding:10px;font-size:12px;color:#5a5a5a}.qxs-subject-layout__layout-exam .edit{position:relative;padding:20px 10px;padding-bottom:10px;margin-top:20px;background-color:#f6f7fb}.qxs-subject-layout__layout-exam .edit .triangle-up{position:absolute;top:-20px;left:100px;width:0;height:0;border-right:20px solid rgba(0,0,0,0);border-bottom:20px solid #f6f7fb;border-left:20px solid rgba(0,0,0,0)}.qxs-subject-action__action-exam .action{padding:20px 0}.qxs-subject-action__action-exam .active{padding-right:10px;padding-left:10px;background-color:#f6f7fb}.qxs-subject-action__action-exam .btn-margin{margin-right:10px}.qxs-subject-action__action-exam .has-set{display:flex;align-items:center;font-size:12px;color:#bbb}.qxs-subject-action__action-exam .vertical-radio-group{display:flex;flex-direction:column;align-items:flex-start;margin-left:20px}.qxs-subject-action__action-exam .vertical-radio-group ::v-deep(.qxs-radio){display:block;margin-right:0}.qxs-subject-type__type-list .type-item{margin-bottom:20px}.qxs-subject-type__type-list .base-subject{display:flex;flex-wrap:wrap;align-items:center}.qxs-subject-type__type-list .base-subject .item{width:50px;height:22px;margin-top:10px;margin-right:10px;font-size:14px;color:#5a5a5a;text-align:center;cursor:pointer;background:#fafafa}.qxs-subject-type__type-list .base-subject .item:hover{color:#3d61e3;background:rgba(61,97,227,.12)}.qxs-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:1em;height:1em;font-size:1em;line-height:1em;vertical-align:-2px;fill:currentcolor}.qxs-icon svg{width:100%;height:100%}
1
+ :root [data-fixed-calc-width]{position:fixed;right:0;left:0%}:root [data-mode=mobile] [data-fixed-calc-width]{width:100% !important}.qxs-data-chart__table{box-sizing:border-box;display:flex;flex-direction:column}.qxs-data-chart__table .title{display:flex;align-items:center;justify-content:space-between;padding:0 5px;margin-top:2px;margin-bottom:7px;font-family:sans-serif;font-size:14px;font-weight:bolder;color:#464646}.qxs-data-chart__table>div[class*=-table]{position:relative;display:flex;flex:1;flex-direction:column;overflow:hidden;background-color:rgba(0,0,0,0);border-top-left-radius:4px;border-top-right-radius:4px}.qxs-data-chart__table>div[class*=-table] [class*=-table__body-wrapper] [class*=-table__cell]{border-right:0}.qxs-data-chart__table>div[class*=-table] [class*=-table__body-wrapper] [class$=table__empty-text]{line-height:unset}.qxs-data-chart__empty{display:flex;align-items:center;justify-content:center;height:100%}.qxs-data-chart__empty-content{display:flex;flex-direction:column;align-items:center;pointer-events:none;margin-top:-2px}.qxs-data-chart__empty-description{font-size:14px;color:#74767e;margin-left:1px}.qxs-data-chart__wrapper{height:100%}.qxs-fixed-action-bar__actionbar{bottom:0;z-index:10;padding:var(--qxs-fixed-action-bar-actionbar-padding);padding-bottom:calc(env(safe-area-inset-bottom) + var(--qxs-fixed-action-bar-actionbar-padding-bottom));text-align:center;background-color:var(--qxs-bg-color, #fff);box-shadow:0 0 1px 0 var(--qxs-border-color, #f3f3f2);transition:box-shadow .3s,var(--qxs-transition-box-shadow, #f3f3f2)}.qxs-fixed-action-bar__actionbar.is-shadow{box-shadow:0 0 1px 0 var(--qxs-border-color, #f3f3f2)}.qxs-photo-crop-tool__img-box{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;background-color:#fafafa}.qxs-photo-crop-tool__error-message{color:red}.qxs-photo-crop-tool__image{max-width:100%;max-height:100%;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:contain;object-fit:contain;-webkit-user-drag:none}.qxs-photo-crop-tool__crop-tool-box{position:absolute;width:calc(var(--qxs-photo-crop-tool-width)*1px);max-width:100%;height:calc(var(--qxs-photo-crop-tool-height)*1px);max-height:100%;aspect-ratio:var(--qxs-photo-crop-tool-aspect-ratio);overflow:hidden;cursor:move;border:1px dashed #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.4)}.qxs-photo-crop-tool__crop-tool-box>div{position:absolute;z-index:3;width:30%;aspect-ratio:1/1;background-color:rgba(2,2,2,.01);border-radius:50%;transition:all .3s}.qxs-photo-crop-tool__crop-tool-box>div:after{content:"";position:absolute;width:10px;height:10px;top:50%;left:50%;transform:translate3d(-50%, -50%, 0);border-radius:50%;background-color:var(--qxs-color-primary, #3d61e3)}.qxs-photo-crop-tool__crop-tool-box>div:hover,.qxs-photo-crop-tool__crop-tool-box>div:active{background-color:rgba(2,2,2,.5)}.qxs-photo-crop-tool__top-left{top:0;left:0;cursor:nwse-resize;transform:translate3d(-50%, -50%, 0)}.qxs-photo-crop-tool__top-right{top:0;right:0;cursor:nesw-resize;transform:translate3d(50%, -50%, 0)}.qxs-photo-crop-tool__bottom-right{right:0;bottom:0;cursor:nwse-resize;transform:translate3d(50%, 50%, 0)}.qxs-photo-crop-tool__bottom-left{bottom:0;left:0;cursor:nesw-resize;transform:translate3d(-50%, 50%, 0)}.el-image-upload__container{line-height:initial}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item{width:var(--el-image-upload-width);height:var(--el-image-upload-height)}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item [role=progressbar]{width:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important}.el-image-upload__control>.el-upload-list--picture-card .el-upload-list__item [role=progressbar] .el-progress-circle{width:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important;height:calc(min(var(--el-image-upload-width),var(--el-image-upload-height))/4*3) !important}.el-image-upload__control>.el-upload-list--picture-card .is-drag{width:var(--el-image-upload-width);height:var(--el-image-upload-height)}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger{border:unset;background-color:unset;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.el-image-upload__control>.el-upload-list--picture-card .is-drag .el-upload-dragger .image-slot [class$=-icon]{font-size:28px;margin-bottom:10px}.el-image-upload__more-than-limit .is-drag{display:none}.el-image-upload__container .el-upload__tip-text{font-size:14px;line-height:32px;color:#c8c8c8}.qxs-file-upload__control .is-drag{display:inline-block !important}.qxs-file-upload__control .is-drag [class$=-upload-dragger]{padding:0}.qxs-file-upload__control .is-drag [class$=-upload-dragger] [class$=-icon--upload]{margin-bottom:0;font-size:40px}.qxs-file-upload__control .is-drag [class$=-upload-dragger] [class$=-upload__text]{padding:0 6px;font-size:14px;line-height:1.5}.qxs-file-upload__control .is-drag.is-dragover{border-width:1px}.qxs-file-upload__control .is-drag .slot{width:160px;height:90px}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce{border-width:1px;border-radius:var(--qxs-border-radius-base, 4px)}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header{box-shadow:0 2px 2px -2px rgba(34,47,62,.1),0 4px 4px -4px rgba(34,47,62,.07)}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce .tox-sidebar-wrap{overflow-y:auto}.qxs-tiny-mce-editor__tiny-mce .tox-tinymce .tox-sidebar-wrap .tox-edit-area::before{border-width:1px;border-radius:0}.qxs-tiny-mce-editor .tox-tinymce-aux{z-index:2500 !important}.qxs-subject-list__list-exam .flex{display:flex;align-items:center}.qxs-subject-list__list-exam .flex-items-center{display:flex;align-items:center}.qxs-subject-list__list-exam .flex-justify-between{display:flex;justify-content:space-between}.qxs-subject-list__list-exam .flex-justify-center{display:flex;justify-content:center}.qxs-subject-list__list-exam .flex-justify-end{display:flex;justify-content:flex-end}.qxs-subject-list__list-exam .margin-left-10{margin-left:10px}.qxs-subject-list__list-exam .label{min-width:50px}.qxs-subject-list__list-exam .flex-1{flex:1}.qxs-subject-list__list-exam .subject-list-wrapper{width:100%;margin-bottom:20px}.qxs-subject-list__list-exam .margin-bottom{margin-bottom:20px}.qxs-subject-list__list-exam .auto-line{flex:1;height:1px;margin:0 15px;background-color:#c8c8c8}.qxs-subject-list__list-exam .title{font-size:14px;font-weight:500}.qxs-subject-list__list-exam .rich-text img{max-width:100%}.qxs-subject-single__single-exam .preview-answer{display:flex;flex-direction:column;margin-bottom:10px}.qxs-subject-single__single-exam .flex{display:flex;align-items:center}.qxs-subject-single__single-exam .margin-bottom{margin-bottom:20px}.qxs-subject-single__single-exam .answer-list .answer-item{margin-top:15px}.qxs-subject-single__single-exam .answer-list .answer-item .input{width:300px}.qxs-subject-single__single-exam .answer-list .answer-item .input [class$=-input]{font-weight:bold}.qxs-subject-single__single-exam .answer-list .answer-item .correct{margin:0 10px}.qxs-subject-single__single-exam .answer-list .answer-item .correct:hover{color:#3d61e3;cursor:pointer}.qxs-subject-single__single-exam .answer-list .answer-item .is-correct{color:#67c23a}.qxs-subject-single__single-exam .answer-list .answer-item .icon{margin-left:10px;font-size:18px;color:#a3a3a3;cursor:pointer}.qxs-subject-single__single-exam .answer-list .answer-item .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-single__single-exam .preview .answer-radio{padding-left:10px}.qxs-subject-single__single-exam .preview .answer-radio .radio{margin-top:10px}.qxs-subject-blank-fill__blank-fill-exam .flex{display:flex;align-items:center}.qxs-subject-blank-fill__blank-fill-exam .label{min-width:50px;margin-right:10px}.qxs-subject-blank-fill__blank-fill-exam .margin-bottom{margin-bottom:20px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item{width:100%;margin-top:15px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item .answer-tags{flex:1;padding:5px 15px;border:1px solid #eee;border-radius:4px}.qxs-subject-blank-fill__blank-fill-exam .answer-list .answer-item .answer-tags [class$=-tag]{margin-right:10px}.qxs-subject-blank-fill__blank-fill-exam .preview .content{min-height:100px;padding-top:10px;background-color:#fff}.qxs-subject-text-fill__text-fill-exam .flex{display:flex;align-items:center}.qxs-subject-text-fill__text-fill-exam .label{min-width:50px;margin-right:10px}.qxs-subject-text-fill__text-fill-exam .margin-bottom{margin-bottom:20px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item{width:100%;margin-top:15px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .answer-tags{flex:1;padding:5px 15px;border:1px solid #eee;border-radius:4px}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .operation .icon{margin-left:10px;font-size:16px;color:#a3a3a3;cursor:pointer}.qxs-subject-text-fill__text-fill-exam .answer-list .answer-item .operation .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-text-fill__text-fill-exam .preview .content{min-height:100px;margin-top:10px}.qxs-subject-scale__scale-exam .flex{display:flex;align-items:center}.qxs-subject-scale__scale-exam .label{min-width:50px}.qxs-subject-scale__scale-exam .margin-bottom{margin-bottom:20px}.qxs-subject-scale__scale-exam .answer{margin:20px 0}.qxs-subject-scale__scale-exam .answer .answer-list{margin-left:40px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item{margin-bottom:20px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .order{width:16px;margin-right:10px}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .icon{margin-left:10px;font-size:16px;color:#a3a3a3;cursor:pointer}.qxs-subject-scale__scale-exam .answer .answer-list .answer-item .disabled{color:#c0c4cc;cursor:not-allowed}.qxs-subject-scale__scale-exam .preview .answer-radio .radio-item .qxs-radio-wrapper{margin-inline-end:0}.qxs-subject-layout__layout-exam{padding:10px;font-size:12px;color:#5a5a5a}.qxs-subject-layout__layout-exam .edit{position:relative;padding:20px 10px;padding-bottom:10px;margin-top:20px;background-color:#f6f7fb}.qxs-subject-layout__layout-exam .edit .triangle-up{position:absolute;top:-20px;left:100px;width:0;height:0;border-right:20px solid rgba(0,0,0,0);border-bottom:20px solid #f6f7fb;border-left:20px solid rgba(0,0,0,0)}.qxs-subject-action__action-exam .action{padding:20px 0}.qxs-subject-action__action-exam .active{padding-right:10px;padding-left:10px;background-color:#f6f7fb}.qxs-subject-action__action-exam .btn-margin{margin-right:10px}.qxs-subject-action__action-exam .has-set{display:flex;align-items:center;font-size:12px;color:#bbb}.qxs-subject-action__action-exam .vertical-radio-group{display:flex;flex-direction:column;align-items:flex-start;margin-left:20px}.qxs-subject-action__action-exam .vertical-radio-group ::v-deep(.qxs-radio){display:block;margin-right:0}.qxs-subject-type__type-list .type-item{margin-bottom:20px}.qxs-subject-type__type-list .base-subject{display:flex;flex-wrap:wrap;align-items:center}.qxs-subject-type__type-list .base-subject .item{width:50px;height:22px;margin-top:10px;margin-right:10px;font-size:14px;color:#5a5a5a;text-align:center;cursor:pointer;background:#fafafa}.qxs-subject-type__type-list .base-subject .item:hover{color:#3d61e3;background:rgba(61,97,227,.12)}.qxs-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:1em;height:1em;font-size:1em;line-height:1em;vertical-align:-2px;color:currentColor;fill:currentColor}.qxs-icon__icon-wrap svg{width:100%;height:100%}.qxs-icon__icon-wrap svg *{fill:currentColor}.qxs-icon__icon-wrap svg [fill=none]{fill:none}
@@ -1 +1 @@
1
- .qxs-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:1em;height:1em;font-size:1em;line-height:1em;vertical-align:-2px;fill:currentcolor}.qxs-icon svg{width:100%;height:100%}
1
+ .qxs-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:1em;height:1em;font-size:1em;line-height:1em;vertical-align:-2px;color:currentColor;fill:currentColor}.qxs-icon__icon-wrap svg{width:100%;height:100%}.qxs-icon__icon-wrap svg *{fill:currentColor}.qxs-icon__icon-wrap svg [fill=none]{fill:none}
@@ -10,10 +10,18 @@
10
10
  font-size: 1em;
11
11
  line-height: 1em;
12
12
  vertical-align: -2px;
13
- fill: currentcolor;
14
-
15
- svg {
16
- width: 100%;
17
- height: 100%;
13
+ color: currentColor;
14
+ fill: currentColor;
15
+ @include e(icon-wrap) {
16
+ svg {
17
+ width: 100%;
18
+ height: 100%;
19
+ }
20
+ svg * {
21
+ fill: currentColor;
22
+ }
23
+ svg [fill="none"] {
24
+ fill: none;
25
+ }
18
26
  }
19
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"area.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/data-chart/src/components/area.vue"],"names":[],"mappings":"AAgPA,OAAO,KAAK,EAAE,aAAa,EAAW,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAU/E,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,aAAa,CAAA;IAC3B,SAAS,CAAC,EAAE,iBAAiB,CAAA;CAC9B,CAAC;;AAmOF,wBAMG"}
1
+ {"version":3,"file":"area.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/data-chart/src/components/area.vue"],"names":[],"mappings":"AAsPA,OAAO,KAAK,EAAE,aAAa,EAAW,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAU/E,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,aAAa,CAAA;IAC3B,SAAS,CAAC,EAAE,iBAAiB,CAAA;CAC9B,CAAC;;AAyOF,wBAMG"}
@@ -1 +1 @@
1
- {"version":3,"file":"card.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/data-chart/src/components/card.vue"],"names":[],"mappings":"AAAA,OAqLO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAc,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;;;cAwM/C,QAAQ,CAAC,iBAAiB,CAAC;;;;;;;;;;cAA3B,QAAQ,CAAC,iBAAiB,CAAC;;;;;;;;;;;AAP/C,wBAgBG"}
1
+ {"version":3,"file":"card.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/data-chart/src/components/card.vue"],"names":[],"mappings":"AAAA,OAqLO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAc,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;;;cAuM/C,QAAQ,CAAC,iBAAiB,CAAC;;;;;;;;;;cAA3B,QAAQ,CAAC,iBAAiB,CAAC;;;;;;;;;;;AAP/C,wBAgBG"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/data-chart/src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAA+B,MAAM,SAAS,CAAA;AAK5E;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,EAAE;IACrB,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,OAAO,CAAA;CA4XlD,CAAA;AAED,wBAAgB,YAAY,CAAC,QAAQ,SAAI,GAAG,OAAO,CAGlD;AAGD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,GAAG;;;;;;;;;;;EAQzE;AACD,eAAO,MAAM,kBAAkB;;;;;;;;;;;CAQ7B,CAAA;AAwBF,wBAAgB,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAuE7D"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/data-chart/src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAA+B,MAAM,SAAS,CAAA;AAK5E;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,EAAE;IACrB,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,OAAO,CAAA;CA4XlD,CAAA;AAED,wBAAgB,YAAY,CAAC,QAAQ,SAAI,GAAG,OAAO,CAGlD;AAGD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,GAAG;;;;;;;;;;;EAQzE;AACD,eAAO,MAAM,kBAAkB;;;;;;;;;;;CAQ7B,CAAA;AAwBF,wBAAgB,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAmE7D"}
@@ -1,5 +1,6 @@
1
+ import type { Component } from 'vue';
1
2
  export interface PropsType {
2
- name: string;
3
+ icon: string | Component;
3
4
  runtime?: boolean;
4
5
  flip?: 'horizontal' | 'vertical' | 'both' | '';
5
6
  rotate?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"icon.vue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/icon/src/icon.vue"],"names":[],"mappings":"AA8GA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,EAAE,CAAA;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB;;AAgHD,wBAMG"}
1
+ {"version":3,"file":"icon.vue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/icon/src/icon.vue"],"names":[],"mappings":"AA8GA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAapC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,EAAE,CAAA;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB;;AA+HD,wBAMG"}
@@ -1 +1 @@
1
- {"version":3,"file":"image-upload.vue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/image-upload/src/image-upload.vue"],"names":[],"mappings":"AAAA,OA6NO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAUxE,KAAK,WAAW,GAAG,gBAAgB,CAAC;AAuBpC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC7B,OAAO,CAAC,EAAE,WAAW,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O,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAoC5C,QAAA,MAAM,eAAe;;;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"subject-action.vue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/subject-action/src/subject-action.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA05BA,wBAqCG"}
1
+ {"version":3,"file":"subject-action.vue.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/subject-action/src/subject-action.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAy5BA,wBAqCG"}
@@ -1 +1 @@
1
- {"version":3,"file":"subject-scale.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/subject-list/src/components/subject-scale.vue"],"names":[],"mappings":"AAgUA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,iBAAiB,CAAC,EAAE,GAAG,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAChC,CAAC;;;;;;;;;;;;;;AA4mBF,wBAOG"}
1
+ {"version":3,"file":"subject-scale.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/subject-list/src/components/subject-scale.vue"],"names":[],"mappings":"AAgUA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,iBAAiB,CAAC,EAAE,GAAG,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAChC,CAAC;;;;;;;;;;;;;;AAymBF,wBAOG"}
@@ -1 +1 @@
1
- {"version":3,"file":"subject-single.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/subject-list/src/components/subject-single.vue"],"names":[],"mappings":"AAulBA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAA;IACpC,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,eAAe,EAAE,MAAM,CAAA;CACxB,CAAC;;;;;;;;;;;;;;;;AA6gCF,wBAOG"}
1
+ {"version":3,"file":"subject-single.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/subject-list/src/components/subject-single.vue"],"names":[],"mappings":"AAulBA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAA;IACpC,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,eAAe,EAAE,MAAM,CAAA;CACxB,CAAC;;;;;;;;;;;;;;;;AAygCF,wBAOG"}
@@ -1 +1 @@
1
- {"version":3,"file":"subject-text-fill.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/subject-list/src/components/subject-text-fill.vue"],"names":[],"mappings":"AAuZA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,mBAAmB,CAAC,EAAE;QACpB,SAAS,EAAE,OAAO,CAAA;QAClB,YAAY,EAAE,OAAO,CAAA;QACrB,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAChC,CAAC;;;;;;;;;;;;;;AAkwBF,wBAOG"}
1
+ {"version":3,"file":"subject-text-fill.vue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/subject-list/src/components/subject-text-fill.vue"],"names":[],"mappings":"AAuZA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,mBAAmB,CAAC,EAAE;QACpB,SAAS,EAAE,OAAO,CAAA;QAClB,YAAY,EAAE,OAAO,CAAA;QACrB,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAChC,CAAC;;;;;;;;;;;;;;AAgwBF,wBAOG"}